|
1
|
|
-(()=>{var e,t={69:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)},s=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return o(t,e),t},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var l=a(n(609)),c="undefined"!=typeof window&&"navigator"in window&&/Win/i.test(navigator.platform),u="undefined"!=typeof window&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),d="npm__react-simple-code-editor__textarea",p="\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.".concat(d,":empty {\n -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n /**\n * IE doesn't support '-webkit-text-fill-color'\n * So we use 'color: transparent' to make the text transparent on IE\n * Unlike other browsers, it doesn't affect caret color in IE\n */\n .").concat(d," {\n color: transparent !important;\n }\n\n .").concat(d,"::selection {\n background-color: #accef7 !important;\n color: transparent !important;\n }\n}\n"),h=l.forwardRef((function(e,t){var n=e.autoFocus,s=e.disabled,o=e.form,a=e.highlight,h=e.ignoreTabKey,g=void 0!==h&&h,f=e.insertSpaces,b=void 0===f||f,y=e.maxLength,k=e.minLength,v=e.name,_=e.onBlur,x=e.onClick,S=e.onFocus,C=e.onKeyDown,j=e.onKeyUp,N=e.onValueChange,w=e.padding,L=void 0===w?0:w,P=e.placeholder,T=e.preClassName,A=e.readOnly,R=e.required,O=e.style,E=e.tabSize,B=void 0===E?2:E,M=e.textareaClassName,I=e.textareaId,F=e.value,H=i(e,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),D=l.useRef({stack:[],offset:-1}),G=l.useRef(null),$=l.useState(!0),W=$[0],z=$[1],U={paddingTop:"object"==typeof L?L.top:L,paddingRight:"object"==typeof L?L.right:L,paddingBottom:"object"==typeof L?L.bottom:L,paddingLeft:"object"==typeof L?L.left:L},q=a(F),V=function(e,t){return e.substring(0,t).split("\n")},J=l.useCallback((function(e,t){var n,s,o;void 0===t&&(t=!1);var a=D.current,i=a.stack,l=a.offset;if(i.length&&l>-1){D.current.stack=i.slice(0,l+1);var c=D.current.stack.length;if(c>100){var u=c-100;D.current.stack=i.slice(u,c),D.current.offset=Math.max(D.current.offset-u,0)}}var d=Date.now();if(t){var p=D.current.stack[D.current.offset];if(p&&d-p.timestamp<3e3){var h=/[^a-z0-9]([a-z0-9]+)$/i,m=null===(n=V(p.value,p.selectionStart).pop())||void 0===n?void 0:n.match(h),g=null===(s=V(e.value,e.selectionStart).pop())||void 0===s?void 0:s.match(h);if((null==m?void 0:m[1])&&(null===(o=null==g?void 0:g[1])||void 0===o?void 0:o.startsWith(m[1])))return void(D.current.stack[D.current.offset]=r(r({},e),{timestamp:d}))}}D.current.stack.push(r(r({},e),{timestamp:d})),D.current.offset++}),[]),K=l.useCallback((function(){var e=G.current;if(e){var t=e.value,n=e.selectionStart,r=e.selectionEnd;J({value:t,selectionStart:n,selectionEnd:r})}}),[J]),X=function(e){var t=G.current;t&&(t.value=e.value,t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd,null==N||N(e.value))},Q=function(e){var t=G.current,n=D.current.stack[D.current.offset];n&&t&&(D.current.stack[D.current.offset]=r(r({},n),{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})),J(e),X(e)};return l.useEffect((function(){K()}),[K]),l.useImperativeHandle(t,(function(){return{get session(){return{history:D.current}},set session(e){D.current=e.history}}}),[]),l.createElement("div",r({},H,{style:r(r({},m.container),O)}),l.createElement("pre",r({className:T,"aria-hidden":"true",style:r(r(r({},m.editor),m.highlight),U)},"string"==typeof q?{dangerouslySetInnerHTML:{__html:q+"<br />"}}:{children:q})),l.createElement("textarea",{ref:function(e){return G.current=e},style:r(r(r({},m.editor),m.textarea),U),className:d+(M?" ".concat(M):""),id:I,value:F,onChange:function(e){var t=e.currentTarget,n=t.value,r=t.selectionStart,s=t.selectionEnd;J({value:n,selectionStart:r,selectionEnd:s},!0),N(n)},onKeyDown:function(e){if(!C||(C(e),!e.defaultPrevented)){"Escape"===e.key&&e.currentTarget.blur();var t=e.currentTarget,n=t.value,r=t.selectionStart,s=t.selectionEnd,o=(b?" ":"\t").repeat(B);if("Tab"===e.key&&!g&&W)if(e.preventDefault(),e.shiftKey){var a=(p=V(n,r)).length-1,i=V(n,s).length-1,l=n.split("\n").map((function(e,t){return t>=a&&t<=i&&e.startsWith(o)?e.substring(o.length):e})).join("\n");if(n!==l){var d=p[a];Q({value:l,selectionStart:(null==d?void 0:d.startsWith(o))?r-o.length:r,selectionEnd:s-(n.length-l.length)})}}else if(r!==s){var p,h=(p=V(n,r)).length-1,m=V(n,s).length-1;d=p[h],Q({value:n.split("\n").map((function(e,t){return t>=h&&t<=m?o+e:e})).join("\n"),selectionStart:d&&/\S/.test(d)?r+o.length:r,selectionEnd:s+o.length*(m-h+1)})}else{var f=r+o.length;Q({value:n.substring(0,r)+o+n.substring(s),selectionStart:f,selectionEnd:f})}else if("Backspace"===e.key){var y=r!==s;n.substring(0,r).endsWith(o)&&!y&&(e.preventDefault(),f=r-o.length,Q({value:n.substring(0,r-o.length)+n.substring(s),selectionStart:f,selectionEnd:f}))}else if("Enter"===e.key){if(r===s){var k=V(n,r).pop(),v=null==k?void 0:k.match(/^\s+/);if(null==v?void 0:v[0]){e.preventDefault();var _="\n"+v[0];f=r+_.length,Q({value:n.substring(0,r)+_+n.substring(s),selectionStart:f,selectionEnd:f})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var x=void 0;57===e.keyCode&&e.shiftKey?x=["(",")"]:219===e.keyCode?x=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?x=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(x=["`","`"]),r!==s&&x&&(e.preventDefault(),Q({value:n.substring(0,r)+x[0]+n.substring(r,s)+x[1]+n.substring(s),selectionStart:r,selectionEnd:s+2}))}else!(u?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(u?e.metaKey&&90===e.keyCode&&e.shiftKey:c?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),function(){var e=D.current,t=e.stack,n=e.offset,r=t[n+1];r&&(X(r),D.current.offset=Math.min(n+1,t.length-1))}()):77!==e.keyCode||!e.ctrlKey||u&&!e.shiftKey||(e.preventDefault(),z((function(e){return!e}))):(e.preventDefault(),function(){var e=D.current,t=e.stack,n=e.offset,r=t[n-1];r&&(X(r),D.current.offset=Math.max(n-1,0))}())}},onClick:x,onKeyUp:j,onFocus:S,onBlur:_,disabled:s,form:o,maxLength:y,minLength:k,name:v,placeholder:P,readOnly:A,required:R,autoFocus:n,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),l.createElement("style",{dangerouslySetInnerHTML:{__html:p}}))})),m={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}};t.default=h},217:function(e){e.exports=(()=>{"use strict";var e={350:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:"undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},36:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.toOptionalTokenType=t.EncodedTokenAttributes=void 0,(n=t.EncodedTokenAttributes||(t.EncodedTokenAttributes={})).toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},n.print=function(e){const t=n.getLanguageId(e),r=n.getTokenType(e),s=n.getFontStyle(e),o=n.getForeground(e),a=n.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:s,foreground:o,background:a})},n.getLanguageId=function(e){return(255&e)>>>0},n.getTokenType=function(e){return(768&e)>>>8},n.containsBalancedBrackets=function(e){return!!(1024&e)},n.getFontStyle=function(e){return(30720&e)>>>11},n.getForeground=function(e){return(16744448&e)>>>15},n.getBackground=function(e){return(4278190080&e)>>>24},n.set=function(e,t,r,s,o,a,i){let l=n.getLanguageId(e),c=n.getTokenType(e),u=n.containsBalancedBrackets(e)?1:0,d=n.getFontStyle(e),p=n.getForeground(e),h=n.getBackground(e);return 0!==t&&(l=t),8!==r&&(c=r),null!==s&&(u=s?1:0),-1!==o&&(d=o),0!==a&&(p=a),0!==i&&(h=i),(l|c<<8|u<<10|d<<11|p<<15|h<<24)>>>0},t.toOptionalTokenType=function(e){return e}},996:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasicScopeAttributesProvider=t.BasicScopeAttributes=void 0;const r=n(878);class s{constructor(e,t){this.languageId=e,this.tokenType=t}}t.BasicScopeAttributes=s;class o{constructor(e,t){this._getBasicScopeAttributes=new r.CachedFn((e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new s(t,n)})),this._defaultAttributes=new s(e,8),this._embeddedLanguagesMatcher=new a(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?o._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(o.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}t.BasicScopeAttributesProvider=o,o._NULL_SCOPE_METADATA=new s(0,0),o.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class a{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>r.escapeRegExpCharacters(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}},947:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LineTokens=t.BalancedBracketSelectors=t.StateStack=t.AttributedScopeStack=t.Grammar=t.createGrammar=void 0;const r=n(350),s=n(36),o=n(736),a=n(44),i=n(792),l=n(583),c=n(878),u=n(996),d=n(47);function p(e,t,n,r,s){const a=o.createMatchers(t,h),l=i.RuleFactory.getCompiledRuleId(n,r,s.repository);for(const n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:l,grammar:s,priority:n.priority})}function h(e,t){if(t.length<e.length)return!1;let n=0;return e.every((e=>{for(let r=n;r<t.length;r++)if(m(t[r],e))return n=r+1,!0;return!1}))}function m(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}t.createGrammar=function(e,t,n,r,s,o,a,i){return new g(e,t,n,r,s,o,a,i)};class g{constructor(e,t,n,r,s,a,i,l){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=l,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=f(t,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const e of Object.keys(s)){const t=o.createMatchers(e,h);for(const n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:s[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=[],t=this._rootScopeName,n=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(n){const r=n.injections;if(r)for(let t in r)p(e,t,r[t],this,n);const s=this._grammarRepository.injections(t);s&&s.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&p(e,t,n,this,n)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),r.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(` - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,n=e(i.ruleIdFromNumber(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[i.ruleIdToNumber(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=f(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let o;if(-1===this._rootId&&(this._rootId=i.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),t&&t!==y.NULL)o=!1,t.reset();else{o=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=s.EncodedTokenAttributes.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null);let i;i=a?b.createRootAndLookUpScopeName(a,r,this):b.createRoot("unknown",r),t=new y(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const l=this.createOnigString(e),c=l.content.length,u=new k(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),p=d._tokenizeString(this,l,o,0,t,u,!0,r);return a.disposeOnigString(l),{lineLength:c,lineTokens:u,ruleStack:p.stack,stoppedEarly:p.stoppedEarly}}}function f(e,t){return(e=c.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}t.Grammar=g;class b{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static createRoot(e,t){return new b(null,new l.ScopeStack(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const r=n.getMetadataForScope(e),s=new l.ScopeStack(null,e),o=n.themeProvider.themeMatch(s),a=b.mergeAttributes(t,r,o);return new b(null,s,a)}get scopeName(){return this.scopePath.scopeName}equals(e){return b._equals(this,e)}static _equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,o=0,a=0;return null!==n&&(r=n.fontStyle,o=n.foregroundId,a=n.backgroundId),s.EncodedTokenAttributes.set(e,t.languageId,t.tokenType,null,r,o,a)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return b._pushAttributed(this,e,t);const n=e.split(/ /g);let r=this;for(const e of n)r=b._pushAttributed(r,e,t);return r}static _pushAttributed(e,t,n){const r=n.getMetadataForScope(t),s=e.scopePath.push(t),o=n.themeProvider.themeMatch(s),a=b.mergeAttributes(e.tokenAttributes,r,o);return new b(e,s,a)}getScopeNames(){return this.scopePath.getSegments()}}t.AttributedScopeStack=b;class y{constructor(e,t,n,r,s,o,a,i){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=i,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}equals(e){return null!==e&&y._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e.contentNameScopesList.equals(t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){y._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,r,s,o,a){return new y(this,e,t,n,r,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new y(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}}t.StateStack=y,y.NULL=new y(null,0,0,0,!1,null,null,null),t.BalancedBracketSelectors=class{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):o.createMatchers(e,h).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>o.createMatchers(e,h).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}};class k{constructor(e,t,n,s){this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,r.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e.tokenAttributes,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e.getScopeNames();for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=s.EncodedTokenAttributes.set(n,0,s.toOptionalTokenType(e.type),null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(t))}if(o&&(n=s.EncodedTokenAttributes.set(n,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(r.DebugFlags.InDebugMode){const n=e.getScopeNames();console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log(" * "+n[e])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t)}const n=e.getScopeNames();if(r.DebugFlags.InDebugMode){console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log(" * "+n[e])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}}t.LineTokens=k},965:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseInclude=t.TopLevelRepositoryReference=t.TopLevelReference=t.RelativeReference=t.SelfReference=t.BaseReference=t.ScopeDependencyProcessor=t.ExternalReferenceCollector=t.TopLevelRepositoryRuleReference=t.TopLevelRuleReference=void 0;const r=n(878);class s{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}t.TopLevelRuleReference=s;class o{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}}t.TopLevelRepositoryRuleReference=o;class a{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}}function i(e,t,n,r){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const a=n.lookup(t);e instanceof s?c({baseGrammar:a,selfGrammar:o},r):l(e.ruleName,{baseGrammar:a,selfGrammar:o,repository:o.repository},r);const i=n.injections(e.scopeName);if(i)for(const e of i)r.add(new s(e))}function l(e,t,n){t.repository&&t.repository[e]&&u([t.repository[e]],t,n)}function c(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&u(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&u(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function u(e,t,n){for(const a of e){if(n.visitedRule.has(a))continue;n.visitedRule.add(a);const e=a.repository?r.mergeObjects({},t.repository,a.repository):t.repository;Array.isArray(a.patterns)&&u(a.patterns,{...t,repository:e},n);const i=a.include;if(!i)continue;const d=f(i);switch(d.kind){case 0:c({...t,selfGrammar:t.baseGrammar},n);break;case 1:c(t,n);break;case 2:l(d.ruleName,{...t,repository:e},n);break;case 3:case 4:const r=d.scopeName===t.selfGrammar.scopeName?t.selfGrammar:d.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){const s={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};4===d.kind?l(d.ruleName,s,n):c(s,n)}else 4===d.kind?n.add(new o(d.scopeName,d.ruleName)):n.add(new s(d.scopeName))}}}t.ExternalReferenceCollector=a,t.ScopeDependencyProcessor=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new s(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new a;for(const n of e)i(n,this.initialScopeName,this.repo,t);for(const e of t.references)if(e instanceof s){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName))continue;if(this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};class d{constructor(){this.kind=0}}t.BaseReference=d;class p{constructor(){this.kind=1}}t.SelfReference=p;class h{constructor(e){this.ruleName=e,this.kind=2}}t.RelativeReference=h;class m{constructor(e){this.scopeName=e,this.kind=3}}t.TopLevelReference=m;class g{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function f(e){if("$base"===e)return new d;if("$self"===e)return new p;const t=e.indexOf("#");if(-1===t)return new m(e);if(0===t)return new h(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new g(n,r)}}t.TopLevelRepositoryReference=g,t.parseInclude=f},391:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(947),t)},47:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t._tokenizeString=void 0;const r=n(350),s=n(44),o=n(792),a=n(878);class i{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function l(e,t,n,s,l,d,h,m){const g=t.content.length;let f=!1,b=-1;if(h){const a=function(e,t,n,s,a,i){let l=a.beginRuleCapturedEOL?0:-1;const c=[];for(let t=a;t;t=t.pop()){const n=t.getRule(e);n instanceof o.BeginWhileRule&&c.push({rule:n,stack:t})}for(let d=c.pop();d;d=c.pop()){const{ruleScanner:c,findOptions:h}=u(d.rule,e,d.stack.endRule,n,s===l),m=c.findNextMatchSync(t,s,h);if(r.DebugFlags.InDebugMode&&(console.log(" scanning for while rule"),console.log(c.toString())),!m){r.DebugFlags.InDebugMode&&console.log(" popping "+d.rule.debugName+" - "+d.rule.debugWhileRegExp),a=d.stack.pop();break}if(m.ruleId!==o.whileRuleId){a=d.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(i.produce(d.stack,m.captureIndices[0].start),p(e,t,n,d.stack,i,d.rule.whileCaptures,m.captureIndices),i.produce(d.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>s&&(s=m.captureIndices[0].end,n=!1))}return{stack:a,linePos:s,anchorPosition:l,isFirstLine:n}}(e,t,n,s,l,d);l=a.stack,s=a.linePos,n=a.isFirstLine,b=a.anchorPosition}const y=Date.now();for(;!f;){if(0!==m&&Date.now()-y>m)return new i(l,!0);k()}return new i(l,!1);function k(){r.DebugFlags.InDebugMode&&(console.log(""),console.log(`@@scanNext ${s}: |${t.content.substr(s).replace(/\n$/,"\\n")}|`));const i=function(e,t,n,s,o,i){const l=function(e,t,n,s,o,i){const l=o.getRule(e),{ruleScanner:u,findOptions:d}=c(l,e,o.endRule,n,s===i);let p=0;r.DebugFlags.InDebugMode&&(p=a.performanceNow());const h=u.findNextMatchSync(t,s,d);if(r.DebugFlags.InDebugMode){const e=a.performanceNow()-p;e>5&&console.warn(`Rule ${l.debugName} (${l.id}) matching took ${e} against '${t}'`),console.log(` scanning for (linePos: ${s}, anchorPosition: ${i})`),console.log(u.toString()),h&&console.log(`matched rule id: ${h.ruleId} from ${h.captureIndices[0].start} to ${h.captureIndices[0].end}`)}return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}(e,t,n,s,o,i),u=e.getInjections();if(0===u.length)return l;const d=function(e,t,n,s,o,a,i){let l,u=Number.MAX_VALUE,d=null,p=0;const h=a.contentNameScopesList.getScopeNames();for(let a=0,m=e.length;a<m;a++){const m=e[a];if(!m.matcher(h))continue;const g=t.getRule(m.ruleId),{ruleScanner:f,findOptions:b}=c(g,t,null,s,o===i),y=f.findNextMatchSync(n,o,b);if(!y)continue;r.DebugFlags.InDebugMode&&(console.log(` matched injection: ${m.debugSelector}`),console.log(f.toString()));const k=y.captureIndices[0].start;if(!(k>=u)&&(u=k,d=y.captureIndices,l=y.ruleId,p=m.priority,u===o))break}return d?{priorityMatch:-1===p,captureIndices:d,matchedRuleId:l}:null}(u,e,t,n,s,o,i);if(!d)return l;if(!l)return d;const p=l.captureIndices[0].start,h=d.captureIndices[0].start;return h<p||d.priorityMatch&&h===p?d:l}(e,t,n,s,l,b);if(!i)return r.DebugFlags.InDebugMode&&console.log(" no more matches."),d.produce(l,g),void(f=!0);const u=i.captureIndices,h=i.matchedRuleId,m=!!(u&&u.length>0)&&u[0].end>s;if(h===o.endRuleId){const o=l.getRule(e);r.DebugFlags.InDebugMode&&console.log(" popping "+o.debugName+" - "+o.debugEndRegExp),d.produce(l,u[0].start),l=l.withContentNameScopesList(l.nameScopesList),p(e,t,n,l,d,o.endCaptures,u),d.produce(l,u[0].end);const a=l;if(l=l.parent,b=a.getAnchorPos(),!m&&a.getEnterPos()===s)return r.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),l=a,d.produce(l,g),void(f=!0)}else{const a=e.getRule(h);d.produce(l,u[0].start);const i=l,c=a.getName(t.content,u),y=l.contentNameScopesList.pushAttributed(c,e);if(l=l.push(h,s,b,u[0].end===g,null,y,y),a instanceof o.BeginEndRule){const s=a;r.DebugFlags.InDebugMode&&console.log(" pushing "+s.debugName+" - "+s.debugBeginRegExp),p(e,t,n,l,d,s.beginCaptures,u),d.produce(l,u[0].end),b=u[0].end;const o=s.getContentName(t.content,u),c=y.pushAttributed(o,e);if(l=l.withContentNameScopesList(c),s.endHasBackReferences&&(l=l.withEndRule(s.getEndWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return r.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),d.produce(l,g),void(f=!0)}else if(a instanceof o.BeginWhileRule){const s=a;r.DebugFlags.InDebugMode&&console.log(" pushing "+s.debugName),p(e,t,n,l,d,s.beginCaptures,u),d.produce(l,u[0].end),b=u[0].end;const o=s.getContentName(t.content,u),c=y.pushAttributed(o,e);if(l=l.withContentNameScopesList(c),s.whileHasBackReferences&&(l=l.withEndRule(s.getWhileWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return r.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),d.produce(l,g),void(f=!0)}else{const s=a;if(r.DebugFlags.InDebugMode&&console.log(" matched "+s.debugName+" - "+s.debugMatchRegExp),p(e,t,n,l,d,s.captures,u),d.produce(l,u[0].end),l=l.pop(),!m)return r.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),l=l.safePop(),d.produce(l,g),void(f=!0)}}u[0].end>s&&(s=u[0].end,n=!1)}}function c(e,t,n,s,o){return r.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:d(s,o)}:{ruleScanner:e.compileAG(t,n,s,o),findOptions:0}}function u(e,t,n,s,o){return r.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:d(s,o)}:{ruleScanner:e.compileWhileAG(t,n,s,o),findOptions:0}}function d(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function p(e,t,n,r,o,a,i){if(0===a.length)return;const c=t.content,u=Math.min(a.length,i.length),d=[],p=i[0].end;for(let t=0;t<u;t++){const u=a[t];if(null===u)continue;const m=i[t];if(0===m.length)continue;if(m.start>p)break;for(;d.length>0&&d[d.length-1].endPos<=m.start;)o.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop();if(d.length>0?o.produceFromScopes(d[d.length-1].scopes,m.start):o.produce(r,m.start),u.retokenizeCapturedWithRuleId){const t=u.getName(c,i),a=r.contentNameScopesList.pushAttributed(t,e),d=u.getContentName(c,i),p=a.pushAttributed(d,e),h=r.push(u.retokenizeCapturedWithRuleId,m.start,-1,!1,null,a,p),g=e.createOnigString(c.substring(0,m.end));l(e,g,n&&0===m.start,m.start,h,o,!1,0),s.disposeOnigString(g);continue}const g=u.getName(c,i);if(null!==g){const t=(d.length>0?d[d.length-1].scopes:r.contentNameScopesList).pushAttributed(g,e);d.push(new h(t,m.end))}}for(;d.length>0;)o.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop()}t._tokenizeString=l;class h{constructor(e,t){this.scopes=e,this.endPos=t}}t.LocalStackElement=h},974:(e,t)=>{function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSON=void 0,t.parseJSON=function(e,t,a){let i=new r(e),l=new s,c=0,u=null,d=[],p=[];function h(){d.push(c),p.push(u)}function m(){c=d.pop(),u=p.pop()}function g(e){n(i,e)}for(;o(i,l);){if(0===c){if(null!==u&&g("too many constructs in root"),3===l.type){u={},a&&(u.$vscodeTextmateLocation=l.toLocation(t)),h(),c=1;continue}if(2===l.type){u=[],h(),c=4;continue}g("unexpected token in root")}if(2===c){if(5===l.type){m();continue}if(7===l.type){c=3;continue}g("expected , or }")}if(1===c||3===c){if(1===c&&5===l.type){m();continue}if(1===l.type){let e=l.value;if(o(i,l)&&6===l.type||g("expected colon"),o(i,l)||g("expected value"),c=2,1===l.type){u[e]=l.value;continue}if(8===l.type){u[e]=null;continue}if(9===l.type){u[e]=!0;continue}if(10===l.type){u[e]=!1;continue}if(11===l.type){u[e]=parseFloat(l.value);continue}if(2===l.type){let t=[];u[e]=t,h(),c=4,u=t;continue}if(3===l.type){let n={};a&&(n.$vscodeTextmateLocation=l.toLocation(t)),u[e]=n,h(),c=1,u=n;continue}}g("unexpected token in dict")}if(5===c){if(4===l.type){m();continue}if(7===l.type){c=6;continue}g("expected , or ]")}if(4===c||6===c){if(4===c&&4===l.type){m();continue}if(c=5,1===l.type){u.push(l.value);continue}if(8===l.type){u.push(null);continue}if(9===l.type){u.push(!0);continue}if(10===l.type){u.push(!1);continue}if(11===l.type){u.push(parseFloat(l.value));continue}if(2===l.type){let e=[];u.push(e),h(),c=4,u=e;continue}if(3===l.type){let e={};a&&(e.$vscodeTextmateLocation=l.toLocation(t)),u.push(e),h(),c=1,u=e;continue}g("unexpected token in array")}g("unknown state")}return 0!==p.length&&g("unclosed constructs"),u};class r{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class s{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function o(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let r,s=e.source,o=e.pos,a=e.len,i=e.line,l=e.char;for(;;){if(o>=a)return!1;if(r=s.charCodeAt(o),32!==r&&9!==r&&13!==r){if(10!==r)break;o++,i++,l=0}else o++,l++}if(t.offset=o,t.line=i,t.char=l,34===r){for(t.type=1,o++,l++;;){if(o>=a)return!1;if(r=s.charCodeAt(o),o++,l++,92!==r){if(34===r)break}else o++,l++}t.value=s.substring(t.offset+1,o-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,r)=>{switch(r){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:n(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===r)t.type=2,o++,l++;else if(123===r)t.type=3,o++,l++;else if(93===r)t.type=4,o++,l++;else if(125===r)t.type=5,o++,l++;else if(58===r)t.type=6,o++,l++;else if(44===r)t.type=7,o++,l++;else if(110===r){if(t.type=8,o++,l++,r=s.charCodeAt(o),117!==r)return!1;if(o++,l++,r=s.charCodeAt(o),108!==r)return!1;if(o++,l++,r=s.charCodeAt(o),108!==r)return!1;o++,l++}else if(116===r){if(t.type=9,o++,l++,r=s.charCodeAt(o),114!==r)return!1;if(o++,l++,r=s.charCodeAt(o),117!==r)return!1;if(o++,l++,r=s.charCodeAt(o),101!==r)return!1;o++,l++}else if(102===r){if(t.type=10,o++,l++,r=s.charCodeAt(o),97!==r)return!1;if(o++,l++,r=s.charCodeAt(o),108!==r)return!1;if(o++,l++,r=s.charCodeAt(o),115!==r)return!1;if(o++,l++,r=s.charCodeAt(o),101!==r)return!1;o++,l++}else for(t.type=11;;){if(o>=a)return!1;if(r=s.charCodeAt(o),!(46===r||r>=48&&r<=57||101===r||69===r||45===r||43===r))break;o++,l++}return t.len=o-t.offset,null===t.value&&(t.value=s.substr(t.offset,t.len)),e.pos=o,e.line=i,e.char=l,!0}},787:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=t.INITIAL=t.Registry=void 0;const o=n(391),a=n(50),i=n(652),l=n(583),c=n(965);s(n(44),t),t.Registry=class{constructor(e){this._options=e,this._syncRegistry=new i.SyncRegistry(l.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(l.Theme.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new o.BalancedBracketSelectors(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}async _loadGrammar(e,t,n,r,s){const o=new c.ScopeDependencyProcessor(this._syncRegistry,e);for(;o.Q.length>0;)await Promise.all(o.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),o.processQueue();return this._grammarForScopeName(e,t,n,r,s)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}async addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,s)}},t.INITIAL=o.StateStack.NULL,t.parseRawGrammar=a.parseRawGrammar},736:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){const r=[],s=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}(e);let o=s.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=s.next()}let t=i();if(r.push({matcher:t,priority:e}),","!==o)break;o=s.next()}return r;function a(){if("-"===o){o=s.next();const e=a();return t=>!!e&&!e(t)}if("("===o){o=s.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===o||","===o);){do{o=s.next()}while("|"===o||","===o);t=i()}return t=>e.some((e=>e(t)))}();return")"===o&&(o=s.next()),e}if(n(o)){const e=[];do{e.push(o),o=s.next()}while(n(o));return n=>t(e,n)}return null}function i(){const e=[];let t=a();for(;t;)e.push(t),t=a();return t=>e.every((e=>e(t)))}}},44:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.disposeOnigString=void 0,t.disposeOnigString=function(e){"function"==typeof e.dispose&&e.dispose()}},50:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;const r=n(69),s=n(350),o=n(974);t.parseRawGrammar=function(e,t=null){return null!==t&&/\.json$/.test(t)?(n=e,a=t,s.DebugFlags.InDebugMode?o.parseJSON(n,a,!0):JSON.parse(n)):function(e,t){return s.DebugFlags.InDebugMode?r.parseWithLocation(e,t,"$vscodeTextmateLocation"):r.parsePLIST(e)}(e,t);var n,a}},69:(e,t)=>{function n(e,t,n){const r=e.length;let s=0,o=1,a=0;function i(t){if(null===n)s+=t;else for(;t>0;)10===e.charCodeAt(s)?(s++,o++,a=0):(s++,a++),t--}function l(e){null===n?s=e:i(e-s)}function c(){for(;s<r;){let t=e.charCodeAt(s);if(32!==t&&9!==t&&13!==t&&10!==t)break;i(1)}}function u(t){return e.substr(s,t.length)===t&&(i(t.length),!0)}function d(t){let n=e.indexOf(t,s);l(-1!==n?n+t.length:r)}function p(t){let n=e.indexOf(t,s);if(-1!==n){let r=e.substring(s,n);return l(n+t.length),r}{let t=e.substr(s);return l(r),t}}r>0&&65279===e.charCodeAt(0)&&(s=1);let h=0,m=null,g=[],f=[],b=null;function y(e,t){g.push(h),f.push(m),h=e,m=t}function k(){if(0===g.length)return v("illegal state stack");h=g.pop(),m=f.pop()}function v(t){throw new Error("Near offset "+s+": "+t+" ~~~"+e.substr(s,50)+"~~~")}const _=function(){if(null===b)return v("missing <key>");let e={};null!==n&&(e[n]={filename:t,line:o,char:a}),m[b]=e,b=null,y(1,e)},x=function(){if(null===b)return v("missing <key>");let e=[];m[b]=e,b=null,y(2,e)},S=function(){let e={};null!==n&&(e[n]={filename:t,line:o,char:a}),m.push(e),y(1,e)},C=function(){let e=[];m.push(e),y(2,e)};function j(){if(1!==h)return v("unexpected </dict>");k()}function N(){return 1===h||2!==h?v("unexpected </array>"):void k()}function w(e){if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function L(e){if(isNaN(e))return v("cannot parse float");if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function P(e){if(isNaN(e))return v("cannot parse integer");if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function T(e){if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function A(e){if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function R(e){if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function O(){let e=p(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function E(e){if(e.isClosed)return"";let t=p("</");return d(">"),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&|<|>|"|'/g,(function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return e}))}for(;s<r&&(c(),!(s>=r));){const l=e.charCodeAt(s);if(i(1),60!==l)return v("expected <");if(s>=r)return v("unexpected end of input");const p=e.charCodeAt(s);if(63===p){i(1),d("?>");continue}if(33===p){if(i(1),u("--")){d("--\x3e");continue}d(">");continue}if(47===p){if(i(1),c(),u("plist")){d(">");continue}if(u("dict")){d(">"),j();continue}if(u("array")){d(">"),N();continue}return v("unexpected closed tag")}let g=O();switch(g.name){case"dict":1===h?_():2===h?S():(m={},null!==n&&(m[n]={filename:t,line:o,char:a}),y(1,m)),g.isClosed&&j();continue;case"array":1===h?x():2===h?C():(m=[],y(2,m)),g.isClosed&&N();continue;case"key":B=E(g),1!==h?v("unexpected <key>"):null!==b?v("too many <key>"):b=B;continue;case"string":w(E(g));continue;case"real":L(parseFloat(E(g)));continue;case"integer":P(parseInt(E(g),10));continue;case"date":T(new Date(E(g)));continue;case"data":A(E(g));continue;case"true":E(g),R(!0);continue;case"false":E(g),R(!1);continue}if(!/^plist/.test(g.name))return v("unexpected opened tag "+g.name)}var B;return m}Object.defineProperty(t,"__esModule",{value:!0}),t.parsePLIST=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,r){return n(e,t,r)},t.parsePLIST=function(e){return n(e,null,null)}},652:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;const r=n(391);t.SyncRegistry=class{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,n,s,o){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,r.createGrammar(e,a,t,n,s,o,this,await this._onigLibPromise))}return this._grammars.get(e)}}},792:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompiledRule=t.RegExpSourceList=t.RegExpSource=t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.CaptureRule=t.Rule=t.ruleIdToNumber=t.ruleIdFromNumber=t.whileRuleId=t.endRuleId=void 0;const r=n(878),s=n(965),o=/\\(\d+)/,a=/\\(\d+)/g;Symbol("RuleId"),t.endRuleId=-1,t.whileRuleId=-2,t.ruleIdFromNumber=function(e){return e},t.ruleIdToNumber=function(e){return e};class i{constructor(e,t,n,s){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=r.RegexSource.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=r.RegexSource.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${r.basename(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?r.RegexSource.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?r.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName}}t.Rule=i;class l extends i{constructor(e,t,n,r,s){super(e,t,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}}t.CaptureRule=l;class c extends i{constructor(e,t,n,r,s){super(e,t,n,null),this._match=new m(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.MatchRule=c;class u extends i{constructor(e,t,n,r,s){super(e,t,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.IncludeOnlyRule=u;class d extends i{constructor(e,t,n,r,s,o,a,i,l,c){super(e,t,n,r),this._begin=new m(s,this.id),this.beginCaptures=o,this._end=new m(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=i,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}}t.BeginEndRule=d;class p extends i{constructor(e,n,r,s,o,a,i,l,c){super(e,n,r,s),this._begin=new m(o,this.id),this.beginCaptures=a,this.whileCaptures=l,this._while=new m(i,t.whileRuleId),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new g,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}}t.BeginWhileRule=p;class h{static createCaptureRule(e,t,n,r,s){return e.registerRule((e=>new l(t,e,n,r,s)))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule((s=>{if(e.id=s,e.match)return new c(e.$vscodeTextmateLocation,e.id,e.name,e.match,h._compileCaptures(e.captures,t,n));if(void 0===e.begin){e.repository&&(n=r.mergeObjects({},n,e.repository));let s=e.patterns;return void 0===s&&e.include&&(s=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,h._compilePatterns(s,t,n))}return e.while?new p(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,h._compileCaptures(e.whileCaptures||e.captures,t,n),h._compilePatterns(e.patterns,t,n)):new d(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,h._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,h._compilePatterns(e.patterns,t,n))})),e.id}static _compileCaptures(e,t,n){let r=[];if(e){let s=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>s&&(s=e)}for(let e=0;e<=s;e++)r[e]=null;for(const s in e){if("$vscodeTextmateLocation"===s)continue;const o=parseInt(s,10);let a=0;e[s].patterns&&(a=h.getCompiledRuleId(e[s],t,n)),r[o]=h.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return r}static _compilePatterns(e,t,n){let r=[];if(e)for(let o=0,a=e.length;o<a;o++){const a=e[o];let i=-1;if(a.include){const e=s.parseInclude(a.include);switch(e.kind){case 0:case 1:i=h.getCompiledRuleId(n[a.include],t,n);break;case 2:let r=n[e.ruleName];r&&(i=h.getCompiledRuleId(r,t,n));break;case 3:case 4:const s=e.scopeName,o=4===e.kind?e.ruleName:null,l=t.getExternalGrammar(s,n);if(l)if(o){let e=l.repository[o];e&&(i=h.getCompiledRuleId(e,t,l.repository))}else i=h.getCompiledRuleId(l.repository.$self,t,l.repository)}}else i=h.getCompiledRuleId(a,t,n);if(-1!==i){const e=t.getRule(i);let n=!1;if((e instanceof u||e instanceof d||e instanceof p)&&e.hasMissingPatterns&&0===e.patterns.length&&(n=!0),n)continue;r.push(i)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}}t.RuleFactory=h;class m{constructor(e,t){if(e){const t=e.length;let n=0,r=[],s=!1;for(let o=0;o<t;o++)if("\\"===e.charAt(o)&&o+1<t){const t=e.charAt(o+1);"z"===t?(r.push(e.substring(n,o)),r.push("$(?!\\n)(?<!\\n)"),n=o+2):"A"!==t&&"G"!==t||(s=!0),o++}this.hasAnchor=s,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=o.test(this.source)}clone(){return new m(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){let n=t.map((t=>e.substring(t.start,t.end)));return a.lastIndex=0,this.source.replace(a,((e,t)=>r.escapeRegExpCharacters(n[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,n,r,s=[],o=[],a=[],i=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),s[e]=n,o[e]=n,a[e]=n,i[e]=n,"\\"===n&&e+1<t&&(r=this.source.charAt(e+1),"A"===r?(s[e+1]="",o[e+1]="",a[e+1]="A",i[e+1]="A"):"G"===r?(s[e+1]="",o[e+1]="G",a[e+1]="",i[e+1]="G"):(s[e+1]=r,o[e+1]=r,a[e+1]=r,i[e+1]=r),e++);return{A0_G0:s.join(""),A0_G1:o.join(""),A1_G0:a.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}t.RegExpSource=m;class g{constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map((e=>e.source));this._cached=new f(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map((e=>e.resolveAnchors(t,n)));return new f(e,r,this._items.map((e=>e.ruleId)))}}t.RegExpSourceList=g;class f{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}}t.CompiledRule=f},583:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.ColorMap=t.fontStyleToString=t.ParsedThemeRule=t.parseTheme=t.StyleAttributes=t.ScopeStack=t.Theme=void 0;const r=n(878);class s{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n,this._cachedMatchRoot=new r.CachedFn((e=>this._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(l(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let n=r.strcmp(e.scope,t.scope);return 0!==n?n:(n=r.strArrCmp(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)}));let n=0,o="#000000",a="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(o=t.foreground),null!==t.background&&(a=t.background)}let l=new u(t),c=new i(n,l.getId(o),l.getId(a)),h=new p(new d(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];h.insert(0,n.scope,n.parentScopes,n.fontStyle,l.getId(n.foreground),l.getId(n.background))}return new s(l,c,h)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find((t=>function(e,t){if(null===t)return!0;let n=0,r=t[n];for(;e;){if(a(e.scopeName,r)){if(n++,n===t.length)return!0;r=t[n]}e=e.parent}return!1}(e.parent,t.parentScopes)));return n?new i(n.fontStyle,n.foreground,n.background):null}}t.Theme=s;class o{constructor(e,t){this.parent=e,this.scopeName=t}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new o(t,e[n]);return t}push(e){return new o(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}}function a(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}t.ScopeStack=o;class i{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}}function l(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let e=0,o=t.length;e<o;e++){let o,a=t[e];if(!a.settings)continue;if("string"==typeof a.scope){let e=a.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),o=e.split(",")}else o=Array.isArray(a.scope)?a.scope:[""];let i=-1;if("string"==typeof a.settings.fontStyle){i=0;let e=a.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}let l=null;"string"==typeof a.settings.foreground&&r.isValidHexColor(a.settings.foreground)&&(l=a.settings.foreground);let u=null;"string"==typeof a.settings.background&&r.isValidHexColor(a.settings.background)&&(u=a.settings.background);for(let t=0,r=o.length;t<r;t++){let r=o[t].trim().split(" "),a=r[r.length-1],d=null;r.length>1&&(d=r.slice(0,r.length-1),d.reverse()),n[s++]=new c(a,d,e,i,l,u)}}return n}t.StyleAttributes=i,t.parseTheme=l;class c{constructor(e,t,n,r,s,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}}t.ParsedThemeRule=c,t.fontStyleToString=function(e){if(-1===e)return"not set";let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),""===t&&(t="none"),t.trim()};class u{constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}}t.ColorMap=u;class d{constructor(e,t,n,r,s){this.scopeDepth=e,this.parentScopes=t,this.fontStyle=n,this.foreground=r,this.background=s}clone(){return new d(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}}t.ThemeTrieElementRule=d;class p{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const n=e.parentScopes,r=t.parentScopes;let s=null===n?0:n.length,o=null===r?0:r.length;if(s===o)for(let e=0;e<s;e++){const t=n[e].length,s=r[e].length;if(t!==s)return s-t}return o-s}return t.scopeDepth-e.scopeDepth}match(e){if(""===e)return p._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));let t,n,r=e.indexOf(".");return-1===r?(t=e,n=""):(t=e.substring(0,r),n=e.substring(r+1)),this._children.hasOwnProperty(t)?this._children[t].match(n):p._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes))}insert(e,t,n,r,s,o){if(""===t)return void this._doInsertHere(e,n,r,s,o);let a,i,l,c=t.indexOf(".");-1===c?(a=t,i=""):(a=t.substring(0,c),i=t.substring(c+1)),this._children.hasOwnProperty(a)?l=this._children[a]:(l=new p(this._mainRule.clone(),d.cloneArr(this._rulesWithParentScopes)),this._children[a]=l),l.insert(e+1,i,n,r,s,o)}_doInsertHere(e,t,n,s,o){if(null!==t){for(let a=0,i=this._rulesWithParentScopes.length;a<i;a++){let i=this._rulesWithParentScopes[a];if(0===r.strArrCmp(i.parentScopes,t))return void i.acceptOverwrite(e,n,s,o)}-1===n&&(n=this._mainRule.fontStyle),0===s&&(s=this._mainRule.foreground),0===o&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new d(e,t,n,s,o))}else this._mainRule.acceptOverwrite(e,n,s,o)}}t.ThemeTrieElement=p},878:(e,t)=>{function n(e){return Array.isArray(e)?function(e){let t=[];for(let r=0,s=e.length;r<s;r++)t[r]=n(e[r]);return t}(e):"object"==typeof e?function(e){let t={};for(let r in e)t[r]=n(e[r]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.performanceNow=t.CachedFn=t.escapeRegExpCharacters=t.isValidHexColor=t.strArrCmp=t.strcmp=t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(e)},t.mergeObjects=function(e,...t){return t.forEach((t=>{for(let n in t)e[n]=t[n]})),e},t.basename=function e(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};let r=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function s(e,t){return e<t?-1:e>t?1:0}t.RegexSource=class{static hasCaptures(e){return null!==e&&(r.lastIndex=0,r.test(e))}static replaceCaptures(e,t,n){return e.replace(r,((e,r,s,o)=>{let a=n[parseInt(r||s,10)];if(!a)return e;{let e=t.substring(a.start,a.end);for(;"."===e[0];)e=e.substring(1);switch(o){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}},t.strcmp=s,t.strArrCmp=function(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=s(e[r],t[r]);if(0!==n)return n}return 0}return n-r},t.isValidHexColor=function(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))},t.escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},t.CachedFn=class{constructor(e){this.fn=e,this.cache=new Map}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},t.performanceNow="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()}}},t={};return function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(787)})()},347:(e,t,n)=>{"use strict";const r=window.wp.blocks,s=window.wp.hooks,o=window.wp.i18n,a=window.wp.blockEditor;var i=n(942),l=n.n(i);const c=JSON.parse('{"dark-plus":{"name":"Dark Plus"},"dracula-soft":{"name":"Dracula Soft"},"dracula":{"name":"Dracula"},"github-dark-dimmed":{"name":"GitHub Dark Dimmed"},"github-dark":{"name":"Github Dark"},"github-light":{"name":"Github Light"},"light-plus":{"name":"Light Plus"},"material-darker":{"name":"Material Darker","alias":"material-theme-darker"},"material-default":{"name":"Material Default","alias":"material-theme"},"material-lighter":{"name":"Material Lighter","alias":"material-theme-lighter"},"material-ocean":{"name":"Material Ocean","alias":"material-theme-ocean"},"material-palenight":{"name":"Material Palenight","alias":"material-theme-palenight"},"min-dark":{"name":"Min Dark"},"min-light":{"name":"Min Light"},"monokai":{"name":"Monokai"},"nord":{"name":"Nord"},"one-dark-pro":{"name":"One Dark Pro"},"poimandres":{"name":"Poimandres"},"rose-pine-dawn":{"name":"Rose Pine Dawn"},"rose-pine-moon":{"name":"Rose Pine Moon"},"rose-pine":{"name":"Rose Pine"},"slack-dark":{"name":"Slack Dark"},"slack-ochin":{"name":"Slack Ochin"},"solarized-dark":{"name":"Solarized Dark"},"solarized-light":{"name":"Solarized Light"},"vitesse-dark":{"name":"Vitesse Dark"},"vitesse-light":{"name":"Vitesse Light"}}'),u=window.wp.element;var d=n(69),p=n.n(d);const h=window.wp.apiFetch;var m=n.n(h),g=n(609),f=n(888),b=Object.prototype.hasOwnProperty;const y=new WeakMap,k=()=>{},v=k(),_=Object,x=e=>e===v,S=e=>"function"==typeof e,C=(e,t)=>({...e,...t}),j=e=>S(e.then),N={},w={},L="undefined",P=typeof window!=L,T=typeof document!=L,A=P&&"Deno"in window,R=(e,t)=>{const n=y.get(e);return[()=>!x(t)&&e.get(t)||N,r=>{if(!x(t)){const s=e.get(t);t in w||(w[t]=s),n[5](t,C(s,r),s||N)}},n[6],()=>!x(t)&&t in w?w[t]:!x(t)&&e.get(t)||N]};let O=!0;const[E,B]=P&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[k,k],M={isOnline:()=>O,isVisible:()=>{const e=T&&document.visibilityState;return x(e)||"hidden"!==e}},I={initFocus:e=>(T&&document.addEventListener("visibilitychange",e),E("focus",e),()=>{T&&document.removeEventListener("visibilitychange",e),B("focus",e)}),initReconnect:e=>{const t=()=>{O=!0,e()},n=()=>{O=!1};return E("online",t),E("offline",n),()=>{B("online",t),B("offline",n)}}},F=!g.useId,H=!P||A,D=H?g.useEffect:g.useLayoutEffect,G="undefined"!=typeof navigator&&navigator.connection,$=!H&&G&&(["slow-2g","2g"].includes(G.effectiveType)||G.saveData),W=new WeakMap,z=(e,t)=>_.prototype.toString.call(e)===`[object ${t}]`;let U=0;const q=e=>{const t=typeof e,n=z(e,"Date"),r=z(e,"RegExp"),s=z(e,"Object");let o,a;if(_(e)!==e||n||r)o=n?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=W.get(e),o)return o;if(o=++U+"~",W.set(e,o),Array.isArray(e)){for(o="@",a=0;a<e.length;a++)o+=q(e[a])+",";W.set(e,o)}if(s){o="#";const t=_.keys(e).sort();for(;!x(a=t.pop());)x(e[a])||(o+=a+":"+q(e[a])+",");W.set(e,o)}}return o},V=e=>{if(S(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?q(e):"",t]};let J=0;const K=()=>++J;async function X(...e){const[t,n,r,s]=e,o=C({populateCache:!0,throwOnError:!0},"boolean"==typeof s?{revalidate:s}:s||{});let a=o.populateCache;const i=o.rollbackOnError;let l=o.optimisticData;const c=o.throwOnError;if(S(n)){const e=n,r=[],s=t.keys();for(const n of s)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(u))}return u(n);async function u(n){const[s]=V(n);if(!s)return;const[u,d]=R(t,s),[p,h,m,g]=y.get(t),f=()=>{const e=p[s];return(S(o.revalidate)?o.revalidate(u().data,n):!1!==o.revalidate)&&(delete m[s],delete g[s],e&&e[0])?e[0](2).then((()=>u().data)):u().data};if(e.length<3)return f();let b,k=r;const _=K();h[s]=[_,0];const C=!x(l),N=u(),w=N.data,L=N._c,P=x(L)?w:L;if(C&&(l=S(l)?l(P,w):l,d({data:l,_c:P})),S(k))try{k=k(P)}catch(e){b=e}if(k&&j(k)){if(k=await k.catch((e=>{b=e})),_!==h[s][0]){if(b)throw b;return k}b&&C&&(e=>"function"==typeof i?i(e):!1!==i)(b)&&(a=!0,d({data:P,_c:v}))}if(a&&!b)if(S(a)){const e=a(k,P);d({data:e,error:v,_c:v})}else d({data:k,error:v,_c:v});if(h[s][1]=K(),Promise.resolve(f()).then((()=>{d({_c:v})})),!b)return k;if(c)throw b}}const Q=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Y=(e,t)=>{if(!y.has(e)){const n=C(I,t),r=Object.create(null),s=X.bind(v,e);let o=k;const a=Object.create(null),i=(e,t)=>{const n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);const s=a[t];if(s)for(const e of s)e(n,r)},c=()=>{if(!y.has(e)&&(y.set(e,[r,Object.create(null),Object.create(null),Object.create(null),s,l,i]),!H)){const t=n.initFocus(setTimeout.bind(v,Q.bind(v,r,0))),s=n.initReconnect(setTimeout.bind(v,Q.bind(v,r,1)));o=()=>{t&&t(),s&&s(),y.delete(e)}}};return c(),[e,s,c,o]}return[e,y.get(e)[4]]},[Z,ee]=Y(new Map),te=C({onLoadingSlow:k,onSuccess:k,onError:k,onErrorRetry:(e,__,t,n,r)=>{const s=t.errorRetryCount,o=r.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*t.errorRetryInterval;!x(s)&&o>s||setTimeout(n,a,r)},onDiscarded:k,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:$?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:$?5e3:3e3,compare:function e(t,n){var r,s;if(t===n)return!0;if(t&&n&&(r=t.constructor)===n.constructor){if(r===Date)return t.getTime()===n.getTime();if(r===RegExp)return t.toString()===n.toString();if(r===Array){if((s=t.length)===n.length)for(;s--&&e(t[s],n[s]););return-1===s}if(!r||"object"==typeof t){for(r in s=0,t){if(b.call(t,r)&&++s&&!b.call(n,r))return!1;if(!(r in n)||!e(t[r],n[r]))return!1}return Object.keys(n).length===s}}return t!=t&&n!=n},isPaused:()=>!1,cache:Z,mutate:ee,fallback:{}},M),ne=(e,t)=>{const n=C(e,t);if(t){const{use:r,fallback:s}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),s&&a&&(n.fallback=C(s,a))}return n},re=(0,g.createContext)({}),se=P&&window.__SWR_DEVTOOLS_USE__,oe=se?window.__SWR_DEVTOOLS_USE__:[],ae=e=>S(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],ie=oe.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=V(t),[,,,s]=y.get(Z);if(r.startsWith("$inf$"))return n(...e);const o=s[r];return x(o)?n(...e):(delete s[r],o)}),r)));se&&(window.__SWR_DEVTOOLS_REACT__=g);const le=()=>{};le(),new WeakMap;const ce=g.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e}}),ue={dedupe:!0},de=(_.defineProperty((e=>{const{value:t}=e,n=(0,g.useContext)(re),r=S(t),s=(0,g.useMemo)((()=>r?t(n):t),[r,n,t]),o=(0,g.useMemo)((()=>r?s:ne(n,s)),[r,n,s]),a=s&&s.provider,i=(0,g.useRef)(v);a&&!i.current&&(i.current=Y(a(o.cache||Z),s));const l=i.current;return l&&(o.cache=l[0],o.mutate=l[1]),D((()=>{if(l)return l[2]&&l[2](),l[3]}),[]),(0,g.createElement)(re.Provider,C(e,{value:o}))}),"defaultValue",{value:te}),pe=(e,t,n)=>{const{cache:r,compare:s,suspense:o,fallbackData:a,revalidateOnMount:i,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:p}=n,[h,m,b,k]=y.get(r),[_,N]=V(e),w=(0,g.useRef)(!1),T=(0,g.useRef)(!1),A=(0,g.useRef)(_),O=(0,g.useRef)(t),E=(0,g.useRef)(n),B=()=>E.current,M=()=>B().isVisible()&&B().isOnline(),[I,G,$,W]=R(r,_),z=(0,g.useRef)({}).current,U=x(a)?x(n.fallback)?v:n.fallback[_]:a,q=(e,t)=>{for(const n in z){const r=n;if("data"===r){if(!s(e[r],t[r])){if(!x(e[r]))return!1;if(!s(se,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},J=(0,g.useMemo)((()=>{const e=!!_&&!!t&&(x(i)?!B().isPaused()&&!o&&!1!==l:i),n=t=>{const n=C(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=I(),s=W(),a=n(r),c=r===s?a:n(s);let u=a;return[()=>{const e=n(I());return q(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>c]}),[r,_]),Q=(0,f.useSyncExternalStore)((0,g.useCallback)((e=>$(_,((t,n)=>{q(n,t)||e()}))),[r,_]),J[0],J[1]),Y=!w.current,Z=h[_]&&h[_].length>0,ee=Q.data,te=x(ee)?U&&j(U)?ce(U):U:ee,ne=Q.error,re=(0,g.useRef)(te),se=p?x(ee)?x(re.current)?te:re.current:ee:te,oe=!(Z&&!x(ne))&&(Y&&!x(i)?i:!B().isPaused()&&(o?!x(te)&&l:x(te)||l)),ae=!!(_&&t&&Y&&oe),ie=x(Q.isValidating)?ae:Q.isValidating,le=x(Q.isLoading)?ae:Q.isLoading,de=(0,g.useCallback)((async e=>{const t=O.current;if(!_||!t||T.current||B().isPaused())return!1;let r,o,a=!0;const i=e||{},l=!b[_]||!i.dedupe,c=()=>F?!T.current&&_===A.current&&w.current:_===A.current,u={isValidating:!1,isLoading:!1},d=()=>{G(u)},p=()=>{const e=b[_];e&&e[1]===o&&delete b[_]},g={isValidating:!0};x(I().data)&&(g.isLoading=!0);try{if(l&&(G(g),n.loadingTimeout&&x(I().data)&&setTimeout((()=>{a&&c()&&B().onLoadingSlow(_,n)}),n.loadingTimeout),b[_]=[t(N),K()]),[r,o]=b[_],r=await r,l&&setTimeout(p,n.dedupingInterval),!b[_]||b[_][1]!==o)return l&&c()&&B().onDiscarded(_),!1;u.error=v;const e=m[_];if(!x(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return d(),l&&c()&&B().onDiscarded(_),!1;const i=I().data;u.data=s(i,r)?i:r,l&&c()&&B().onSuccess(r,_,n)}catch(e){p();const t=B(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,_,t),(!0===n||S(n)&&n(e))&&(B().revalidateOnFocus&&B().revalidateOnReconnect&&!M()||t.onErrorRetry(e,_,t,(e=>{const t=h[_];t&&t[0]&&t[0](3,e)}),{retryCount:(i.retryCount||0)+1,dedupe:!0}))))}return a=!1,d(),!0}),[_,r]),pe=(0,g.useCallback)(((...e)=>X(r,A.current,...e)),[]);if(D((()=>{O.current=t,E.current=n,x(ee)||(re.current=ee)})),D((()=>{if(!_)return;const e=de.bind(v,ue);let t=0;if(B().revalidateOnFocus){const e=Date.now();t=e+B().focusThrottleInterval}const n=((e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}})(_,h,((n,r={})=>{if(0==n){const n=Date.now();B().revalidateOnFocus&&n>t&&M()&&(t=n+B().focusThrottleInterval,e())}else if(1==n)B().revalidateOnReconnect&&M()&&e();else{if(2==n)return de();if(3==n)return de(r)}}));return T.current=!1,A.current=_,w.current=!0,G({_k:N}),oe&&(x(te)||H?e():(e=>{P&&typeof window.requestAnimationFrame!=L?window.requestAnimationFrame(e):setTimeout(e,1)})(e)),()=>{T.current=!0,n()}}),[_]),D((()=>{let e;function t(){const t=S(c)?c(I().data):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){I().error||!u&&!B().isVisible()||!d&&!B().isOnline()?t():de(ue).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[c,u,d,_]),(0,g.useDebugValue)(se),o&&x(te)&&_){if(!F&&H)throw new Error("Fallback data is required when using Suspense in SSR.");O.current=t,E.current=n,T.current=!1;const e=k[_];if(!x(e)){const t=pe(e);ce(t)}if(!x(ne))throw ne;{const e=de(ue);x(se)||(e.status="fulfilled",e.value=!0),ce(e)}}return{mutate:pe,get data(){return z.data=!0,se},get error(){return z.error=!0,ne},get isValidating(){return z.isValidating=!0,ie},get isLoading(){return z.isLoading=!0,le}}},function(...e){const t=C(te,(0,g.useContext)(re)),[n,r,s]=ae(e),o=ne(t,s);let a=pe;const{use:i}=o,l=(i||[]).concat(ie);for(let e=l.length;e--;)a=l[e](a);return a(n,r||o.fetcher||null,o)});var pe;const he=((e,t)=>(...n)=>{const[r,s,o]=ae(n),a=(o.use||[]).concat(t);return e(r,s,{...o,use:a})})(de,(e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)))),me=e=>m()({path:e}),ge=()=>{const{data:e}=he("/code-block-pro/v1/can-save-html",me);return e},fe=e=>{let t;const n=new Set,r=(e,r)=>{const s="function"==typeof e?e(t):e;if(!Object.is(s,t)){const e=t;t=(null!=r?r:"object"!=typeof s||null===s)?s:Object.assign({},t,s),n.forEach((n=>n(t,e)))}},s=()=>t,o={setState:r,getState:s,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e))},a=t=e(r,s,o);return o},be=e=>e,ye=e=>{const t=(e=>e?fe(e):fe)(e),n=e=>function(e,t=be){const n=g.useSyncExternalStore(e.subscribe,(()=>t(e.getState())),(()=>t(e.getInitialState())));return g.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},ke=e=>e?ye(e):ye,ve=new Map,_e=e=>{const t=ve.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},xe=(e,t={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:a,store:i,...l}=t;let c;try{c=(null==o||o)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!c)return e(n,r,s);const{connection:u,...d}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const r=ve.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return ve.set(n.name,s),{type:"tracked",store:e,...s}})(i,c,l);let p=!0;s.setState=(e,t,o)=>{const c=n(e,t);if(!p)return c;const d=void 0===o?{type:a||"anonymous"}:"string"==typeof o?{type:o}:o;return void 0===i?(null==u||u.send(d,r()),c):(null==u||u.send({...d,type:`${i}/${d.type}`},{..._e(l.name),[i]:s.getState()}),c)};const h=(...e)=>{const t=p;p=!1,n(...e),p=t},m=e(s.setState,r,s);if("untracked"===d.type?null==u||u.init(m):(d.stores[d.store]=s,null==u||u.init(Object.fromEntries(Object.entries(d.stores).map((([e,t])=>[e,e===d.store?m:t.getState()]))))),s.dispatchFromDevtools&&"function"==typeof s.dispatch){let e=!1;const t=s.dispatch;s.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):Se(e.payload,(e=>{if("__setState"!==e.type)s.dispatchFromDevtools&&"function"==typeof s.dispatch&&s.dispatch(e);else{if(void 0===i)return void h(e.state);1!==Object.keys(e.state).length&&console.error('\n [zustand devtools middleware] Unsupported __setState action format.\n When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n ');const t=e.state[i];if(null==t)return;JSON.stringify(s.getState())!==JSON.stringify(t)&&h(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return h(m),void 0===i?null==u?void 0:u.init(s.getState()):null==u?void 0:u.init(_e(l.name));case"COMMIT":return void 0===i?void(null==u||u.init(s.getState())):null==u?void 0:u.init(_e(l.name));case"ROLLBACK":return Se(e.state,(e=>{if(void 0===i)return h(e),void(null==u||u.init(s.getState()));h(e[i]),null==u||u.init(_e(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Se(e.state,(e=>{void 0!==i?JSON.stringify(s.getState())!==JSON.stringify(e[i])&&h(e[i]):h(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;return h(void 0===i?r:r[i]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return p=!p}return}})),m},Se=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)};function Ce(e,t){let n;try{n=e()}catch(e){return}const r={getItem:e=>{var r;const s=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(r=n.getItem(e))?r:null;return o instanceof Promise?o.then(s):s(o)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)};return r}const je=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>je(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>je(t)(e)}}},Ne=(e,t)=>(n,r,s)=>{let o={storage:Ce((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},a=!1;const i=new Set,l=new Set;let c=o.storage;if(!c)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...e)}),r,s);const u=()=>{const e=o.partialize({...r()});return c.setItem(o.name,{state:e,version:o.version})},d=s.setState;s.setState=(e,t)=>{d(e,t),u()};const p=e(((...e)=>{n(...e),u()}),r,s);let h;s.getInitialState=()=>p;const m=()=>{var e,t;if(!c)return;a=!1,i.forEach((e=>{var t;return e(null!=(t=r())?t:p)}));const s=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=r())?e:p))||void 0;return je(c.getItem.bind(c))(o.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return[!1,e.state];if(o.migrate){const t=o.migrate(e.state,e.version);return t instanceof Promise?t.then((e=>[!0,e])):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]})).then((e=>{var t;const[s,a]=e;if(h=o.merge(a,null!=(t=r())?t:p),n(h,!0),s)return u()})).then((()=>{null==s||s(h,void 0),h=r(),a=!0,l.forEach((e=>e(h)))})).catch((e=>{null==s||s(void 0,e)}))};return s.persist={setOptions:e=>{o={...o,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:e=>(i.add(e),()=>{i.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},o.skipHydration||m(),h||p},we="/code-block-pro/v1/settings",Le=async e=>{const t=await m()({path:we});return t?.[e]},Pe={previousTheme:"nord",previousLineHeight:"1.25rem",previousFontFamily:"Code-Pro-JetBrains-Mono",previousFontSize:".875rem",previousHeaderType:"headlights",previousFooterType:"none",previousClampFonts:!1,previousDisablePadding:!1,previousLineNumbers:!1,previousHighlightingHover:!1,previousCopyButton:!0,previousCopyButtonType:"heroicons",previousCopyButtonString:(0,o.__)("Copy","code-block-pro"),previusCopyButtonStringCopied:(0,o.__)("Copied","code-block-pro"),previousTabSize:2,previousUseTabs:!1,previousSeeMoreType:"",previousSeeMoreString:"",previousSeeMoreTransition:!1,previousSeeMoreCollapse:!1,previousSeeMoreCollapseString:""},Te={getItem:async e=>{var t;const n=await Le(e);return JSON.stringify({version:null!==(t=n?.version)&&void 0!==t?t:0,state:n||Pe})},setItem:async(e,t)=>{const{state:n,version:r}=JSON.parse(t),s={[e]:Object.assign(await Le(e)||Pe,n,r)};await m()({path:we,method:"POST",data:s})},removeItem:async e=>{const t={[e]:null};await m()({path:we,method:"POST",data:t})}},Ae=ke()(Ne(xe((e=>({...Pe,updateThemeHistory(t){e((e=>Object.keys(t).reduce(((n,r)=>{const s=r,o=`previous${r.charAt(0).toUpperCase()+r.slice(1)}`;return Object.keys(e).includes(o)?{...n,[o]:t[s]}:n}),{...e})))}})),{name:"Code Block Pro Theme Settings"}),{name:"code_block_pro_settings",storage:Ce((()=>Te))}));var Re=n(486),Oe=n(217);const Ee=[{id:"abap",scopeName:"source.abap",path:"abap.tmLanguage.json",displayName:"ABAP",samplePath:"abap.sample"},{id:"actionscript-3",scopeName:"source.actionscript.3",path:"actionscript-3.tmLanguage.json",displayName:"ActionScript",samplePath:"actionscript-3.sample"},{id:"ada",scopeName:"source.ada",path:"ada.tmLanguage.json",displayName:"Ada",samplePath:"ada.sample"},{id:"apache",scopeName:"source.apacheconf",path:"apache.tmLanguage.json",displayName:"Apache Conf",samplePath:"apache.sample"},{id:"apex",scopeName:"source.apex",path:"apex.tmLanguage.json",displayName:"Apex",samplePath:"apex.sample"},{id:"apl",scopeName:"source.apl",path:"apl.tmLanguage.json",displayName:"APL",samplePath:"apl.sample",embeddedLangs:["html","xml","css","javascript","json"]},{id:"applescript",scopeName:"source.applescript",path:"applescript.tmLanguage.json",displayName:"AppleScript",samplePath:"applescript.sample"},{id:"ara",scopeName:"source.ara",path:"ara.tmLanguage.json",displayName:"Ara",samplePath:"ara.sample"},{id:"asm",scopeName:"source.asm.x86_64",path:"asm.tmLanguage.json",displayName:"Assembly",samplePath:"asm.sample"},{id:"astro",scopeName:"source.astro",path:"astro.tmLanguage.json",displayName:"Astro",samplePath:"astro.sample",embeddedLangs:["json","javascript","typescript","stylus","sass","css","scss","less","postcss","tsx"]},{id:"awk",scopeName:"source.awk",path:"awk.tmLanguage.json",displayName:"AWK",samplePath:"awk.sample"},{id:"ballerina",scopeName:"source.ballerina",path:"ballerina.tmLanguage.json",displayName:"Ballerina",samplePath:"ballerina.sample"},{id:"bat",scopeName:"source.batchfile",path:"bat.tmLanguage.json",displayName:"Batch",samplePath:"bat.sample",aliases:["batch"]},{id:"beancount",scopeName:"text.beancount",path:"beancount.tmLanguage.json",displayName:"Beancount",samplePath:"beancount.sample"},{id:"berry",scopeName:"source.berry",path:"berry.tmLanguage.json",displayName:"Berry",samplePath:"berry.sample",aliases:["be"]},{id:"bibtex",scopeName:"text.bibtex",path:"bibtex.tmLanguage.json",displayName:"BibTeX",samplePath:"bibtex.sample"},{id:"bicep",scopeName:"source.bicep",path:"bicep.tmLanguage.json",displayName:"Bicep",samplePath:"bicep.sample"},{id:"blade",scopeName:"text.html.php.blade",path:"blade.tmLanguage.json",displayName:"Blade",samplePath:"blade.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"c",scopeName:"source.c",path:"c.tmLanguage.json",displayName:"C",samplePath:"c.sample"},{id:"cadence",scopeName:"source.cadence",path:"cadence.tmLanguage.json",displayName:"Cadence",samplePath:"cadence.sample",aliases:["cdc"]},{id:"clarity",scopeName:"source.clar",path:"clarity.tmLanguage.json",displayName:"Clarity",samplePath:"clarity.sample"},{id:"clojure",scopeName:"source.clojure",path:"clojure.tmLanguage.json",displayName:"Clojure",samplePath:"clojure.sample",aliases:["clj"]},{id:"cmake",scopeName:"source.cmake",path:"cmake.tmLanguage.json",displayName:"CMake",samplePath:"cmake.sample"},{id:"cobol",scopeName:"source.cobol",path:"cobol.tmLanguage.json",displayName:"COBOL",samplePath:"cobol.sample",embeddedLangs:["sql","html","java"]},{id:"codeql",scopeName:"source.ql",path:"codeql.tmLanguage.json",displayName:"CodeQL",samplePath:"codeql.sample",aliases:["ql"]},{id:"coffee",scopeName:"source.coffee",path:"coffee.tmLanguage.json",displayName:"CoffeeScript",samplePath:"coffee.sample",embeddedLangs:["javascript"]},{id:"cpp",scopeName:"source.cpp",path:"cpp.tmLanguage.json",displayName:"C++",samplePath:"cpp.sample",aliases:["c++"],embeddedLangs:["glsl","sql"]},{id:"crystal",scopeName:"source.crystal",path:"crystal.tmLanguage.json",displayName:"Crystal",samplePath:"crystal.sample",embeddedLangs:["html","sql","css","c","javascript","shellscript"]},{id:"csharp",scopeName:"source.cs",path:"csharp.tmLanguage.json",displayName:"C#",samplePath:"csharp.sample",aliases:["c#","cs"]},{id:"css",scopeName:"source.css",path:"css.tmLanguage.json",displayName:"CSS",samplePath:"css.sample"},{id:"csv",scopeName:"text.csv",path:"csv.tmLanguage.json",displayName:"csv syntax",samplePath:"csv.sample"},{id:"cue",scopeName:"source.cue",path:"cue.tmLanguage.json",displayName:"CUE",samplePath:"cue.sample"},{id:"cypher",scopeName:"source.cypher",path:"cypher.tmLanguage.json",displayName:"Cypher",samplePath:"cypher.sample",aliases:["cql"]},{id:"d",scopeName:"source.d",path:"d.tmLanguage.json",displayName:"D",samplePath:"d.sample"},{id:"dart",scopeName:"source.dart",path:"dart.tmLanguage.json",displayName:"Dart",samplePath:"dart.sample"},{id:"dax",scopeName:"source.dax",path:"dax.tmLanguage.json",displayName:"DAX",samplePath:"dax.sample"},{id:"diff",scopeName:"source.diff",path:"diff.tmLanguage.json",displayName:"Diff",samplePath:"diff.sample"},{id:"docker",scopeName:"source.dockerfile",path:"docker.tmLanguage.json",displayName:"Docker",samplePath:"docker.sample",aliases:["dockerfile"]},{id:"dream-maker",scopeName:"source.dm",path:"dream-maker.tmLanguage.json",displayName:"Dream Maker",samplePath:"dream-maker.sample"},{id:"elixir",scopeName:"source.elixir",path:"elixir.tmLanguage.json",displayName:"Elixir",samplePath:"elixir.sample",embeddedLangs:["html"]},{id:"elm",scopeName:"source.elm",path:"elm.tmLanguage.json",displayName:"Elm",samplePath:"elm.sample",embeddedLangs:["glsl"]},{id:"erb",scopeName:"text.html.erb",path:"erb.tmLanguage.json",displayName:"ERB",samplePath:"erb.sample",embeddedLangs:["html","ruby"]},{id:"erlang",scopeName:"source.erlang",path:"erlang.tmLanguage.json",displayName:"Erlang",samplePath:"erlang.sample",aliases:["erl"]},{id:"fish",scopeName:"source.fish",path:"fish.tmLanguage.json",displayName:"Fish",samplePath:"fish.sample"},{id:"fsharp",scopeName:"source.fsharp",path:"fsharp.tmLanguage.json",displayName:"F#",samplePath:"fsharp.sample",aliases:["f#","fs"],embeddedLangs:["markdown"]},{id:"gdresource",scopeName:"source.gdresource",path:"gdresource.tmLanguage.json",displayName:"GDResource",samplePath:"gdresource.sample",embeddedLangs:["gdshader","gdscript"]},{id:"gdscript",scopeName:"source.gdscript",path:"gdscript.tmLanguage.json",displayName:"GDScript",samplePath:"gdscript.sample"},{id:"gdshader",scopeName:"source.gdshader",path:"gdshader.tmLanguage.json",displayName:"GDShader",samplePath:"gdshader.sample"},{id:"gherkin",scopeName:"text.gherkin.feature",path:"gherkin.tmLanguage.json",displayName:"Gherkin",samplePath:"gherkin.sample"},{id:"git-commit",scopeName:"text.git-commit",path:"git-commit.tmLanguage.json",displayName:"Git Commit Message",embeddedLangs:["diff"]},{id:"git-rebase",scopeName:"text.git-rebase",path:"git-rebase.tmLanguage.json",displayName:"Git Rebase Message",embeddedLangs:["shellscript"]},{id:"glimmer-js",scopeName:"source.gjs",path:"glimmer-js.tmLanguage.json",displayName:"Glimmer JS",aliases:["gjs"],embeddedLangs:["javascript","handlebars"]},{id:"glimmer-ts",scopeName:"source.gts",path:"glimmer-ts.tmLanguage.json",displayName:"Glimmer TS",aliases:["gts"],embeddedLangs:["typescript","handlebars"]},{id:"glsl",scopeName:"source.glsl",path:"glsl.tmLanguage.json",displayName:"GLSL",samplePath:"glsl.sample",embeddedLangs:["c"]},{id:"gnuplot",scopeName:"source.gnuplot",path:"gnuplot.tmLanguage.json",displayName:"Gnuplot",samplePath:"gnuplot.sample"},{id:"go",scopeName:"source.go",path:"go.tmLanguage.json",displayName:"Go",samplePath:"go.sample"},{id:"graphql",scopeName:"source.graphql",path:"graphql.tmLanguage.json",displayName:"GraphQL",samplePath:"graphql.sample",aliases:["gql"],embeddedLangs:["javascript","typescript","jsx","tsx"]},{id:"groovy",scopeName:"source.groovy",path:"groovy.tmLanguage.json",displayName:"Groovy",samplePath:"groovy.sample"},{id:"hack",scopeName:"source.hack",path:"hack.tmLanguage.json",displayName:"Hack",samplePath:"hack.sample",embeddedLangs:["html","sql"]},{id:"haml",scopeName:"text.haml",path:"haml.tmLanguage.json",displayName:"Ruby Haml",samplePath:"haml.sample",embeddedLangs:["ruby","javascript","sass","coffee","markdown","css"]},{id:"handlebars",scopeName:"text.html.handlebars",path:"handlebars.tmLanguage.json",displayName:"Handlebars",samplePath:"handlebars.sample",aliases:["hbs"],embeddedLangs:["html","css","javascript","yaml"]},{id:"haskell",scopeName:"source.haskell",path:"haskell.tmLanguage.json",displayName:"Haskell",samplePath:"haskell.sample",aliases:["hs"]},{id:"hcl",scopeName:"source.hcl",path:"hcl.tmLanguage.json",displayName:"HashiCorp HCL",samplePath:"hcl.sample"},{id:"hjson",scopeName:"source.hjson",path:"hjson.tmLanguage.json",displayName:"Hjson",samplePath:"hjson.sample"},{id:"hlsl",scopeName:"source.hlsl",path:"hlsl.tmLanguage.json",displayName:"HLSL",samplePath:"hlsl.sample"},{id:"html",scopeName:"text.html.basic",path:"html.tmLanguage.json",displayName:"HTML",samplePath:"html.sample",embeddedLangs:["javascript","css"]},{id:"http",scopeName:"source.http",path:"http.tmLanguage.json",displayName:"HTTP",samplePath:"http.sample",embeddedLangs:["shellscript","json","xml","graphql"]},{id:"imba",scopeName:"source.imba",path:"imba.tmLanguage.json",displayName:"Imba",samplePath:"imba.sample"},{id:"ini",scopeName:"source.ini",path:"ini.tmLanguage.json",displayName:"INI",samplePath:"ini.sample",aliases:["properties"]},{id:"java",scopeName:"source.java",path:"java.tmLanguage.json",displayName:"Java",samplePath:"java.sample"},{id:"javascript",scopeName:"source.js",path:"javascript.tmLanguage.json",displayName:"JavaScript",samplePath:"javascript.sample",aliases:["js"]},{id:"jinja-html",scopeName:"text.html.jinja",path:"jinja-html.tmLanguage.json",displayName:"Jinja",samplePath:"jinja-html.sample",embeddedLangs:["html"]},{id:"jison",scopeName:"source.jison",path:"jison.tmLanguage.json",displayName:"Jison",samplePath:"jison.sample",embeddedLangs:["javascript"]},{id:"json",scopeName:"source.json",path:"json.tmLanguage.json",displayName:"JSON",samplePath:"json.sample"},{id:"json5",scopeName:"source.json5",path:"json5.tmLanguage.json",displayName:"JSON5",samplePath:"json5.sample"},{id:"jsonc",scopeName:"source.json.comments",path:"jsonc.tmLanguage.json",displayName:"JSON with Comments",samplePath:"jsonc.sample"},{id:"jsonl",scopeName:"source.json.lines",path:"jsonl.tmLanguage.json",displayName:"JSON Lines",samplePath:"jsonl.sample"},{id:"jsonnet",scopeName:"source.jsonnet",path:"jsonnet.tmLanguage.json",displayName:"Jsonnet",samplePath:"jsonnet.sample"},{id:"jssm",scopeName:"source.jssm",path:"jssm.tmLanguage.json",displayName:"JSSM",samplePath:"jssm.sample",aliases:["fsl"]},{id:"jsx",scopeName:"source.js.jsx",path:"jsx.tmLanguage.json",displayName:"JSX",samplePath:"jsx.sample"},{id:"julia",scopeName:"source.julia",path:"julia.tmLanguage.json",displayName:"Julia",samplePath:"julia.sample",embeddedLangs:["cpp","python","javascript","r","sql"]},{id:"kotlin",scopeName:"source.kotlin",path:"kotlin.tmLanguage.json",displayName:"Kotlin",samplePath:"kotlin.sample",aliases:["kt","kts"]},{id:"kusto",scopeName:"source.kusto",path:"kusto.tmLanguage.json",displayName:"Kusto",samplePath:"kusto.sample",aliases:["kql"]},{id:"latex",scopeName:"text.tex.latex",path:"latex.tmLanguage.json",displayName:"LaTeX",samplePath:"latex.sample",embeddedLangs:["tex","css","haskell","html","xml","java","lua","julia","ruby","javascript","typescript","python","yaml","rust","scala","gnuplot"]},{id:"less",scopeName:"source.css.less",path:"less.tmLanguage.json",displayName:"Less",samplePath:"less.sample"},{id:"liquid",scopeName:"text.html.liquid",path:"liquid.tmLanguage.json",displayName:"Liquid",samplePath:"liquid.sample",embeddedLangs:["html","css","json","javascript"]},{id:"lisp",scopeName:"source.lisp",path:"lisp.tmLanguage.json",displayName:"Lisp",samplePath:"lisp.sample"},{id:"logo",scopeName:"source.logo",path:"logo.tmLanguage.json",displayName:"Logo",samplePath:"logo.sample"},{id:"lua",scopeName:"source.lua",path:"lua.tmLanguage.json",displayName:"Lua",samplePath:"lua.sample",embeddedLangs:["c"]},{id:"make",scopeName:"source.makefile",path:"make.tmLanguage.json",displayName:"Makefile",samplePath:"make.sample",aliases:["makefile"]},{id:"markdown",scopeName:"text.html.markdown",path:"markdown.tmLanguage.json",displayName:"Markdown",samplePath:"markdown.sample",aliases:["md"],embeddedLangs:["css","html","ini","java","lua","make","perl","r","ruby","php","sql","vb","xml","xsl","yaml","bat","clojure","coffee","c","cpp","diff","docker","git-commit","git-rebase","go","groovy","pug","javascript","json","jsonc","less","objective-c","swift","scss","raku","powershell","python","julia","rust","scala","shellscript","typescript","tsx","csharp","fsharp","dart","handlebars","erlang","elixir","latex","bibtex"]},{id:"marko",scopeName:"text.marko",path:"marko.tmLanguage.json",displayName:"Marko",samplePath:"marko.sample",embeddedLangs:["css","less","scss","javascript"]},{id:"matlab",scopeName:"source.matlab",path:"matlab.tmLanguage.json",displayName:"MATLAB",samplePath:"matlab.sample"},{id:"mdc",scopeName:"text.markdown.mdc",path:"mdc.tmLanguage.json",displayName:"mdc",samplePath:"mdc.sample",embeddedLangs:["markdown","yaml"]},{id:"mdx",scopeName:"source.mdx",path:"mdx.tmLanguage.json",displayName:"MDX",samplePath:"mdx.sample",embeddedLangs:["tsx","toml","yaml","c","clojure","coffee","cpp","csharp","css","diff","docker","elixir","elm","erlang","go","graphql","haskell","html","ini","java","javascript","json","julia","kotlin","less","lua","make","markdown","objective-c","perl","python","r","ruby","rust","scala","scss","shellscript","shellsession","sql","xml","swift","typescript"]},{id:"mermaid",scopeName:"source.mermaid",path:"mermaid.tmLanguage.json",displayName:"Mermaid",samplePath:"mermaid.sample"},{id:"mojo",scopeName:"source.mojo",path:"mojo.tmLanguage.json",displayName:"MagicPython",samplePath:"mojo.sample"},{id:"narrat",scopeName:"source.narrat",path:"narrat.tmLanguage.json",displayName:"Narrat Language",samplePath:"narrat.sample",aliases:["nar"]},{id:"nextflow",scopeName:"source.nextflow",path:"nextflow.tmLanguage.json",displayName:"Nextflow",samplePath:"nextflow.sample",aliases:["nf"]},{id:"nginx",scopeName:"source.nginx",path:"nginx.tmLanguage.json",displayName:"Nginx",samplePath:"nginx.sample",embeddedLangs:["lua"]},{id:"nim",scopeName:"source.nim",path:"nim.tmLanguage.json",displayName:"Nim",samplePath:"nim.sample",embeddedLangs:["c","html","xml","javascript","css","glsl","markdown"]},{id:"nix",scopeName:"source.nix",path:"nix.tmLanguage.json",displayName:"Nix",samplePath:"nix.sample"},{id:"nushell",scopeName:"source.nushell",path:"nushell.tmLanguage.json",displayName:"nushell",samplePath:"nushell.sample",aliases:["nu"]},{id:"objective-c",scopeName:"source.objc",path:"objective-c.tmLanguage.json",displayName:"Objective-C",samplePath:"objective-c.sample",aliases:["objc"]},{id:"objective-cpp",scopeName:"source.objcpp",path:"objective-cpp.tmLanguage.json",displayName:"Objective-C++",samplePath:"objective-cpp.sample"},{id:"ocaml",scopeName:"source.ocaml",path:"ocaml.tmLanguage.json",displayName:"OCaml",samplePath:"ocaml.sample"},{id:"pascal",scopeName:"source.pascal",path:"pascal.tmLanguage.json",displayName:"Pascal",samplePath:"pascal.sample"},{id:"perl",scopeName:"source.perl",path:"perl.tmLanguage.json",displayName:"Perl",samplePath:"perl.sample",embeddedLangs:["html","xml","css","javascript","sql"]},{id:"php",scopeName:"source.php",path:"php.tmLanguage.json",displayName:"PHP",samplePath:"php.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"plsql",scopeName:"source.plsql.oracle",path:"plsql.tmLanguage.json",displayName:"PL/SQL",samplePath:"plsql.sample"},{id:"postcss",scopeName:"source.css.postcss",path:"postcss.tmLanguage.json",displayName:"PostCSS",samplePath:"postcss.sample"},{id:"powerquery",scopeName:"source.powerquery",path:"powerquery.tmLanguage.json",displayName:"PowerQuery",samplePath:"powerquery.sample"},{id:"powershell",scopeName:"source.powershell",path:"powershell.tmLanguage.json",displayName:"PowerShell",samplePath:"powershell.sample",aliases:["ps","ps1"]},{id:"prisma",scopeName:"source.prisma",path:"prisma.tmLanguage.json",displayName:"Prisma",samplePath:"prisma.sample"},{id:"prolog",scopeName:"source.prolog",path:"prolog.tmLanguage.json",displayName:"Prolog",samplePath:"prolog.sample"},{id:"proto",scopeName:"source.proto",path:"proto.tmLanguage.json",displayName:"Protocol Buffer 3",samplePath:"proto.sample"},{id:"pug",scopeName:"text.pug",path:"pug.tmLanguage.json",displayName:"Pug",samplePath:"pug.sample",aliases:["jade"],embeddedLangs:["javascript","css","sass","scss","stylus","coffee","html"]},{id:"puppet",scopeName:"source.puppet",path:"puppet.tmLanguage.json",displayName:"Puppet",samplePath:"puppet.sample"},{id:"purescript",scopeName:"source.purescript",path:"purescript.tmLanguage.json",displayName:"PureScript",samplePath:"purescript.sample"},{id:"python",scopeName:"source.python",path:"python.tmLanguage.json",displayName:"Python",samplePath:"python.sample",aliases:["py"]},{id:"r",scopeName:"source.r",path:"r.tmLanguage.json",displayName:"R",samplePath:"r.sample"},{id:"raku",scopeName:"source.perl.6",path:"raku.tmLanguage.json",displayName:"Raku",samplePath:"raku.sample",aliases:["perl6"]},{id:"razor",scopeName:"text.aspnetcorerazor",path:"razor.tmLanguage.json",displayName:"ASP.NET Razor",samplePath:"razor.sample",embeddedLangs:["html","csharp"]},{id:"reg",scopeName:"source.reg",path:"reg.tmLanguage.json",displayName:"Windows Registry Script",samplePath:"reg.sample"},{id:"rel",scopeName:"source.rel",path:"rel.tmLanguage.json",displayName:"Rel",samplePath:"rel.sample"},{id:"riscv",scopeName:"source.riscv",path:"riscv.tmLanguage.json",displayName:"RISC-V",samplePath:"riscv.sample"},{id:"rst",scopeName:"source.rst",path:"rst.tmLanguage.json",displayName:"reStructuredText",samplePath:"rst.sample",embeddedLangs:["cpp","python","javascript","shellscript","yaml","cmake","ruby"]},{id:"ruby",scopeName:"source.ruby",path:"ruby.tmLanguage.json",displayName:"Ruby",samplePath:"ruby.sample",aliases:["rb"],embeddedLangs:["html","xml","sql","css","c","javascript","shellscript","lua"]},{id:"rust",scopeName:"source.rust",path:"rust.tmLanguage.json",displayName:"Rust",samplePath:"rust.sample",aliases:["rs"]},{id:"sas",scopeName:"source.sas",path:"sas.tmLanguage.json",displayName:"SAS",samplePath:"sas.sample",embeddedLangs:["sql"]},{id:"sass",scopeName:"source.sass",path:"sass.tmLanguage.json",displayName:"Sass",samplePath:"sass.sample"},{id:"scala",scopeName:"source.scala",path:"scala.tmLanguage.json",displayName:"Scala",samplePath:"scala.sample"},{id:"scheme",scopeName:"source.scheme",path:"scheme.tmLanguage.json",displayName:"Scheme",samplePath:"scheme.sample"},{id:"scss",scopeName:"source.css.scss",path:"scss.tmLanguage.json",displayName:"SCSS",samplePath:"scss.sample",embeddedLangs:["css"]},{id:"shaderlab",scopeName:"source.shaderlab",path:"shaderlab.tmLanguage.json",displayName:"ShaderLab",samplePath:"shaderlab.sample",aliases:["shader"],embeddedLangs:["hlsl"]},{id:"shellscript",scopeName:"source.shell",path:"shellscript.tmLanguage.json",displayName:"Shell",samplePath:"shellscript.sample",aliases:["bash","sh","shell","zsh"]},{id:"shellsession",scopeName:"text.shell-session",path:"shellsession.tmLanguage.json",displayName:"Shell Session",samplePath:"shellsession.sample",aliases:["console"],embeddedLangs:["shellscript"]},{id:"smalltalk",scopeName:"source.smalltalk",path:"smalltalk.tmLanguage.json",displayName:"Smalltalk",samplePath:"smalltalk.sample"},{id:"solidity",scopeName:"source.solidity",path:"solidity.tmLanguage.json",displayName:"Solidity",samplePath:"solidity.sample"},{id:"sparql",scopeName:"source.sparql",path:"sparql.tmLanguage.json",displayName:"SPARQL",samplePath:"sparql.sample",embeddedLangs:["turtle"]},{id:"splunk",scopeName:"source.splunk_search",path:"splunk.tmLanguage.json",displayName:"Splunk Query Language",samplePath:"splunk.sample",aliases:["spl"]},{id:"sql",scopeName:"source.sql",path:"sql.tmLanguage.json",displayName:"SQL",samplePath:"sql.sample"},{id:"ssh-config",scopeName:"source.ssh-config",path:"ssh-config.tmLanguage.json",displayName:"SSH Config",samplePath:"ssh-config.sample"},{id:"stata",scopeName:"source.stata",path:"stata.tmLanguage.json",displayName:"Stata",samplePath:"stata.sample",embeddedLangs:["sql"]},{id:"stylus",scopeName:"source.stylus",path:"stylus.tmLanguage.json",displayName:"Stylus",samplePath:"stylus.sample",aliases:["styl"]},{id:"svelte",scopeName:"source.svelte",path:"svelte.tmLanguage.json",displayName:"Svelte",samplePath:"svelte.sample",embeddedLangs:["javascript","typescript","coffee","stylus","sass","css","scss","less","postcss","pug","markdown"]},{id:"swift",scopeName:"source.swift",path:"swift.tmLanguage.json",displayName:"Swift",samplePath:"swift.sample"},{id:"system-verilog",scopeName:"source.systemverilog",path:"system-verilog.tmLanguage.json",displayName:"SystemVerilog",samplePath:"system-verilog.sample"},{id:"tasl",scopeName:"source.tasl",path:"tasl.tmLanguage.json",displayName:"Tasl",samplePath:"tasl.sample"},{id:"tcl",scopeName:"source.tcl",path:"tcl.tmLanguage.json",displayName:"Tcl",samplePath:"tcl.sample"},{id:"tex",scopeName:"text.tex",path:"tex.tmLanguage.json",displayName:"TeX",samplePath:"tex.sample",embeddedLangs:["r"]},{id:"toml",scopeName:"source.toml",path:"toml.tmLanguage.json",displayName:"TOML",samplePath:"toml.sample"},{id:"tsx",scopeName:"source.tsx",path:"tsx.tmLanguage.json",displayName:"TSX",samplePath:"tsx.sample"},{id:"turtle",scopeName:"source.turtle",path:"turtle.tmLanguage.json",displayName:"Turtle",samplePath:"turtle.sample"},{id:"twig",scopeName:"text.html.twig",path:"twig.tmLanguage.json",displayName:"Twig",samplePath:"twig.sample",embeddedLangs:["css","javascript","scss","php","python","ruby"]},{id:"typescript",scopeName:"source.ts",path:"typescript.tmLanguage.json",displayName:"TypeScript",samplePath:"typescript.sample",aliases:["ts"]},{id:"v",scopeName:"source.v",path:"v.tmLanguage.json",displayName:"V",samplePath:"v.sample"},{id:"vb",scopeName:"source.asp.vb.net",path:"vb.tmLanguage.json",displayName:"Visual Basic",samplePath:"vb.sample",aliases:["cmd"]},{id:"verilog",scopeName:"source.verilog",path:"verilog.tmLanguage.json",displayName:"Verilog",samplePath:"verilog.sample"},{id:"vhdl",scopeName:"source.vhdl",path:"vhdl.tmLanguage.json",displayName:"VHDL",samplePath:"vhdl.sample"},{id:"viml",scopeName:"source.viml",path:"viml.tmLanguage.json",displayName:"Vim Script",samplePath:"viml.sample",aliases:["vim","vimscript"]},{id:"vue-html",scopeName:"text.html.vue-html",path:"vue-html.tmLanguage.json",displayName:"Vue HTML",samplePath:"vue-html.sample",embeddedLangs:["vue","javascript"]},{id:"vue",scopeName:"source.vue",path:"vue.tmLanguage.json",displayName:"Vue",samplePath:"vue.sample",embeddedLangs:["html","markdown","pug","stylus","sass","css","scss","less","javascript","typescript","jsx","tsx","json","jsonc","json5","yaml","toml","graphql"]},{id:"vyper",scopeName:"source.vyper",path:"vyper.tmLanguage.json",displayName:"Vyper",samplePath:"vyper.sample",aliases:["vy"]},{id:"wasm",scopeName:"source.wat",path:"wasm.tmLanguage.json",displayName:"WebAssembly",samplePath:"wasm.sample"},{id:"wenyan",scopeName:"source.wenyan",path:"wenyan.tmLanguage.json",displayName:"Wenyan",samplePath:"wenyan.sample",aliases:["文言"]},{id:"wgsl",scopeName:"source.wgsl",path:"wgsl.tmLanguage.json",displayName:"WGSL",samplePath:"wgsl.sample"},{id:"wolfram",scopeName:"source.wolfram",path:"wolfram.tmLanguage.json",displayName:"Wolfram",samplePath:"wolfram.sample",aliases:["wl"]},{id:"xml",scopeName:"text.xml",path:"xml.tmLanguage.json",displayName:"XML",samplePath:"xml.sample",embeddedLangs:["java"]},{id:"xsl",scopeName:"text.xml.xsl",path:"xsl.tmLanguage.json",displayName:"XSL",samplePath:"xsl.sample",embeddedLangs:["xml"]},{id:"yaml",scopeName:"source.yaml",path:"yaml.tmLanguage.json",displayName:"YAML",samplePath:"yaml.sample",aliases:["yml"]},{id:"zenscript",scopeName:"source.zenscript",path:"zenscript.tmLanguage.json",displayName:"ZenScript",samplePath:"zenscript.sample"},{id:"zig",scopeName:"source.zig",path:"zig.tmLanguage.json",displayName:"zig",samplePath:"zig.sample"}];var Be,Me,Ie,Fe,He=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e))(He||{});class De{static toBinaryStr(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t}static printMetadata(e){let t=De.getLanguageId(e),n=De.getTokenType(e),r=De.getFontStyle(e),s=De.getForeground(e),o=De.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:r,foreground:s,background:o})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>15}static getBackground(e){return(4286578688&e)>>>24}static containsBalancedBrackets(e){return!!(1024&e)}static set(e,t,n,r,s,o){let a=De.getLanguageId(e),i=De.getTokenType(e),l=De.getFontStyle(e),c=De.getForeground(e),u=De.getBackground(e);return 0!==t&&(a=t),0!==n&&(i=8===n?0:n),-1!==r&&(l=r),0!==s&&(c=s),0!==o&&(u=o),(a|i<<8|l<<11|(De.containsBalancedBrackets(e)?1:0)<<10|c<<15|u<<24)>>>0}}function Ge(e){return e.endsWith("/")||e.endsWith("\\")?e.slice(0,-1):e}function $e(e){return e.startsWith("./")?e.slice(2):e}function We(e){const t=e.split(/[\/\\]/g);return t.slice(0,t.length-1)}function ze(...e){return e.map(Ge).map($e).join("/")}function Ue(e){return 32===e||9===e}function qe(e){return 10===e||13===e}function Ve(e){return e>=48&&e<=57}!function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(Be||(Be={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(Me||(Me={})),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(Ie||(Ie={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(Fe||(Fe={}));const Je=function(e,t=[],n=Me.DEFAULT){let r=null,s=[];const o=[];function a(e){Array.isArray(s)?s.push(e):null!==r&&(s[r]=e)}return function(e,t,n=Me.DEFAULT){const r=function(e,t=!1){const n=e.length;let r=0,s="",o=0,a=16,i=0,l=0,c=0,u=0,d=0;function p(t,n){let s=0,o=0;for(;s<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)o=16*o+t-48;else if(t>=65&&t<=70)o=16*o+t-65+10;else{if(!(t>=97&&t<=102))break;o=16*o+t-97+10}r++,s++}return s<t&&(o=-1),o}function h(){if(s="",d=0,o=r,l=i,u=c,r>=n)return o=n,a=17;let t=e.charCodeAt(r);if(Ue(t)){do{r++,s+=String.fromCharCode(t),t=e.charCodeAt(r)}while(Ue(t));return a=15}if(qe(t))return r++,s+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,s+="\n"),i++,c=r,a=14;switch(t){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,s=function(){let t="",s=r;for(;;){if(r>=n){t+=e.substring(s,r),d=2;break}const o=e.charCodeAt(r);if(34===o){t+=e.substring(s,r),r++;break}if(92!==o){if(o>=0&&o<=31){if(qe(o)){t+=e.substring(s,r),d=2;break}d=6}r++}else{if(t+=e.substring(s,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=p(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}s=r}}return t}(),a=10;case 47:const l=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!qe(e.charCodeAt(r));)r++;return s=e.substring(l,r),a=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let o=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,o=!0;break}r++,qe(t)&&(13===t&&10===e.charCodeAt(r)&&r++,i++,c=r)}return o||(r++,d=1),s=e.substring(l,r),a=13}return s+=String.fromCharCode(t),r++,a=16;case 45:if(s+=String.fromCharCode(t),r++,r===n||!Ve(e.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&Ve(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&Ve(e.charCodeAt(r))))return d=3,e.substring(t,r);for(r++;r<e.length&&Ve(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&Ve(e.charCodeAt(r))){for(r++;r<e.length&&Ve(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}(),a=11;default:for(;r<n&&m(t);)r++,t=e.charCodeAt(r);if(o!==r){switch(s=e.substring(o,r),s){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return s+=String.fromCharCode(t),r++,a=16}}function m(e){if(Ue(e)||qe(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,s="",o=0,a=16,d=0},getPosition:()=>r,scan:t?function(){let e;do{e=h()}while(e>=12&&e<=15);return e}:h,getToken:()=>a,getTokenValue:()=>s,getTokenOffset:()=>o,getTokenLength:()=>r-o,getTokenStartLine:()=>l,getTokenStartCharacter:()=>o-u,getTokenError:()=>d}}(e,!1),s=[];function o(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>s.slice())):()=>!0}function i(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>s.slice())):()=>!0}const c=a(t.onObjectBegin),u=l(t.onObjectProperty),d=o(t.onObjectEnd),p=a(t.onArrayBegin),h=o(t.onArrayEnd),m=l(t.onLiteralValue),g=i(t.onSeparator),f=o(t.onComment),b=i(t.onError),y=n&&n.disallowComments,k=n&&n.allowTrailingComma;function v(){for(;;){const e=r.scan();switch(r.getTokenError()){case 4:_(14);break;case 5:_(15);break;case 3:_(13);break;case 1:y||_(11);break;case 2:_(12);break;case 6:_(16)}switch(e){case 12:case 13:y?_(10):f();break;case 16:_(1);break;case 15:case 14:break;default:return e}}}function _(e,t=[],n=[]){if(b(e),t.length+n.length>0){let e=r.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){v();break}if(-1!==n.indexOf(e))break;e=v()}}}function x(e){const t=r.getTokenValue();return e?m(t):(u(t),s.push(t)),v(),!0}function S(){switch(r.getToken()){case 3:return function(){p(),v();let e=!0,t=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||_(4,[],[]),g(","),v(),4===r.getToken()&&k)break}else t&&_(6,[],[]);e?(s.push(0),e=!1):s[s.length-1]++,S()||_(4,[],[4,5]),t=!0}return h(),e||s.pop(),4!==r.getToken()?_(8,[4],[]):v(),!0}();case 1:return function(){c(),v();let e=!1;for(;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||_(4,[],[]),g(","),v(),2===r.getToken()&&k)break}else e&&_(6,[],[]);(10!==r.getToken()?(_(3,[],[2,5]),!1):(x(!1),6===r.getToken()?(g(":"),v(),S()||_(4,[],[2,5])):_(5,[],[2,5]),s.pop(),!0))||_(4,[],[2,5]),e=!0}return d(),2!==r.getToken()?_(7,[2],[]):v(),!0}();case 10:return x(!0);default:return function(){switch(r.getToken()){case 11:const e=r.getTokenValue();let t=Number(e);isNaN(t)&&(_(2),t=0),m(t);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return v(),!0}()}}v(),17===r.getToken()?!!n.allowEmptyContent||_(4,[],[]):S()?17!==r.getToken()&&_(9,[],[]):_(4,[],[])}(e,{onObjectBegin:()=>{const e={};a(e),o.push(s),s=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{s=o.pop()},onArrayBegin:()=>{const e=[];a(e),o.push(s),s=e,r=null},onArrayEnd:()=>{s=o.pop()},onLiteralValue:a,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),s[0]};var Ke;!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(Ke||(Ke={}));const Xe="undefined"!=typeof self&&void 0!==self.WorkerGlobalScope,Qe="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"node"===process.release.name,Ye="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"bun"===process.release.name,Ze=Xe||!Qe&&!Ye;let et="",tt="";let nt=null;function rt(e){if(Ze)return`${et}${e}`;{const t=n(485);return t.isAbsolute(e)?e:t.resolve("/","..",e)}}async function st(e){const t=[],r=await async function(e){const t=rt(e);if(Ze)return await fetch(t).then((e=>e.text()));{const e=n(673);return await e.promises.readFile(t,"utf-8")}}(e);let s;try{s=JSON.parse(r)}catch(e){if(s=Je(r,t,{allowTrailingComma:!0}),t.length)throw t[0]}return s}async function ot(e){const t=at(await st(e));if(t.include){const n=await ot(ze(...We(e),t.include));n.settings&&(t.settings=n.settings.concat(t.settings)),n.bg&&!t.bg&&(t.bg=n.bg),n.colors&&(t.colors={...n.colors,...t.colors}),delete t.include}return t}function at(e){const t=e.type||"dark",n={name:e.name,type:t,...e,...ct(e)};var r;return e.include&&(n.include=e.include),e.tokenColors&&(n.settings=e.tokenColors,delete n.tokenColors),(r=n).settings||(r.settings=[]),r.settings[0]&&r.settings[0].settings&&!r.settings[0].scope||r.settings.unshift({settings:{foreground:r.fg,background:r.bg}}),n}const it={light:"#333333",dark:"#bbbbbb"},lt={light:"#fffffe",dark:"#1e1e1e"};function ct(e){let t,n,r=e.settings?e.settings:e.tokenColors;const s=r?r.find((e=>!e.name&&!e.scope)):void 0;return s?.settings?.foreground&&(t=s.settings.foreground),s?.settings?.background&&(n=s.settings.background),!t&&e?.colors?.["editor.foreground"]&&(t=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),t||(t="light"===e.type?it.light:it.dark),n||(n="light"===e.type?lt.light:lt.dark),{fg:t,bg:n}}class ut{constructor(e,t){this.languagesPath="languages/",this.languageMap={},this.scopeToLangMap={},this._onigLibPromise=e,this._onigLibName=t}get onigLib(){return this._onigLibPromise}getOnigLibName(){return this._onigLibName}getLangRegistration(e){return this.languageMap[e]}async loadGrammar(e){const t=this.scopeToLangMap[e];if(!t)return null;if(t.grammar)return t.grammar;const n=await async function(e){return await st(e)}(Ee.includes(t)?`${this.languagesPath}${t.path}`:t.path);return t.grammar=n,n}addLanguage(e){this.languageMap[e.id]=e,e.aliases&&e.aliases.forEach((t=>{this.languageMap[t]=e})),this.scopeToLangMap[e.scopeName]=e}}function dt(e,t){let n=[];for(let r=0,s=t.length;r<s;r++){let s=t.slice(0,r),o=t[r];n[r]={scopeName:o,themeMatches:mt(e,o,s)}}return n}function pt(e,t){let n=e+".";return e===t||t.substring(0,n.length)===n}function ht(e,t,n,r){if(!pt(e,n))return!1;let s=t.length-1,o=r.length-1;for(;s>=0&&o>=0;)pt(t[s],r[o])&&s--,o--;return-1===s}function mt(e,t,n){let r=[],s=0;for(let o=0,a=e.settings.length;o<a;o++){let a,i=e.settings[o];if("string"==typeof i.scope)a=i.scope.split(/,/).map((e=>e.trim()));else{if(!Array.isArray(i.scope))continue;a=i.scope}for(let e=0,o=a.length;e<o;e++){let l=a[e].split(/ /);ht(l[l.length-1],l.slice(0,l.length-1),t,n)&&(r[s++]=i,e=o)}}return r}var gt=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ft={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function bt(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function yt(e){const t=e.shift();if("2"===t){const t=e.splice(0,3).map((e=>Number.parseInt(e)));if(3!==t.length||t.some((e=>Number.isNaN(e))))return;return{type:"rgb",rgb:t}}if("5"===t){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function kt(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)ft[r]&&t.push({type:"setDecoration",value:ft[r]});else if(r<=29){const e=ft[r-20];e&&t.push({type:"resetDecoration",value:e})}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:gt[r-30]}});else if(38===r){const n=yt(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:gt[r-40]}});else if(48===r){const n=yt(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:gt[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:gt[r-100+8]}})}return t}var vt={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function _t(e=vt){function t(t){return e[t]}function n(e){return`#${e.map((e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0"))).join("")}`}let r;return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return s=e.index,function(){if(r)return r;r=[];for(let e=0;e<gt.length;e++)r.push(t(gt[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let s=0;s<6;s++)for(let o=0;o<6;o++)r.push(n([e[t],e[s],e[o]]));let s=8;for(let e=0;e<24;e++,s+=10)r.push(n([s,s,s]));return r}()[s]}var s}}}const xt={pre:({className:e,style:t,children:n})=>`<pre class="${e}" style="${t}" tabindex="0">${n}</pre>`,code:({children:e})=>`<code>${e}</code>`,line:({className:e,children:t})=>`<span class="${e}">${t}</span>`,token:({style:e,children:t})=>`<span style="${e}">${t}</span>`};function St(e,t={}){const n=t.bg||"#fff",r=function(e){const t=new Map;for(const n of e){const e=n.line;t.has(e)?t.get(e).push(n):t.set(e,[n])}return t}(t.lineOptions??[]),s=t.elements||{};function o(e="",t={},n){const r=s[e]||xt[e];return r?(n=n.filter(Boolean),r({...t,children:"code"===e?n.join("\n"):n.join("")})):""}return o("pre",{className:"shiki "+(t.themeName||""),style:`background-color: ${n}`},[t.langId?`<div class="language-id">${t.langId}</div>`:"",o("code",{},e.map(((n,s)=>{const a=s+1;return o("line",{className:function(e){const t=new Set(["line"]);for(const n of e)for(const e of n.classes??[])t.add(e);return Array.from(t)}(r.get(a)??[]).join(" "),lines:e,line:n,index:s},n.map(((e,r)=>{const s=[`color: ${e.color||t.fg}`];return e.fontStyle&He.Italic&&s.push("font-style: italic"),e.fontStyle&He.Bold&&s.push("font-weight: bold"),e.fontStyle&He.Underline&&s.push("text-decoration: underline"),o("token",{style:s.join("; "),tokens:n,token:e,index:r},[(a=e.content,a.replace(/[&<>"']/g,(e=>Ct[e])))]);var a})))})))])}const Ct={"&":"&","<":"<",">":">",'"':""","'":"'"};class jt extends Oe.Registry{constructor(e){super(e),this._resolver=e,this.themesPath="themes/",this._resolvedThemes={},this._resolvedGrammars={},this._langGraph=new Map,this._langMap=Ee.reduce(((e,t)=>(e[t.id]=t,e)),{})}getTheme(e){return"string"==typeof e?this._resolvedThemes[e]:e}async loadTheme(e){return"string"==typeof e?(this._resolvedThemes[e]||(this._resolvedThemes[e]=await ot(`${this.themesPath}${e}.json`)),this._resolvedThemes[e]):((e=at(e)).name&&(this._resolvedThemes[e.name]=e),e)}async loadThemes(e){return await Promise.all(e.map((e=>this.loadTheme(e))))}getLoadedThemes(){return Object.keys(this._resolvedThemes)}getGrammar(e){return this._resolvedGrammars[e]}async loadLanguage(e){const t=e.embeddedLangs?.reduce((async(e,t,n)=>{if(!this.getLoadedLanguages().includes(t)&&this._resolver.getLangRegistration(t))return await this._resolver.loadGrammar(this._resolver.getLangRegistration(t).scopeName),e[this._resolver.getLangRegistration(t).scopeName]=n+2,e}),{}),n={embeddedLanguages:t,balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]},r=await this.loadGrammarWithConfiguration(e.scopeName,1,n);this._resolvedGrammars[e.id]=r,e.aliases&&e.aliases.forEach((e=>{this._resolvedGrammars[e]=r}))}async loadLanguages(e){for(const t of e)this.resolveEmbeddedLanguages(t);const t=Array.from(this._langGraph.values());for(const e of t)this._resolver.addLanguage(e);for(const e of t)await this.loadLanguage(e)}getLoadedLanguages(){return Object.keys(this._resolvedGrammars)}resolveEmbeddedLanguages(e){if(this._langGraph.has(e.id)||this._langGraph.set(e.id,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap[t])}}function Nt(e){return"string"==typeof e?Ee.find((t=>t.id===e||t.aliases?.includes(e))):e}async function wt(e){const{_languages:t,_themes:r,_wasmPath:s}=function(e){let t=Ee,n=e.themes||[],r=e.paths?.wasm?e.paths.wasm.endsWith("/")?e.paths.wasm:e.paths.wasm+"/":"dist/";return e.langs&&(t=e.langs.map(Nt)),e.theme&&n.unshift(e.theme),n.length||(n=["nord"]),{_languages:t,_themes:n,_wasmPath:r}}(e),o=new ut(async function(e){if(!nt){let t;if(Ze)t="string"==typeof tt?(0,Re.loadWASM)({data:await fetch(rt(ze(...We(e),"onig.wasm")))}):(0,Re.loadWASM)({data:tt});else{const e=n(485).join(486,"../onig.wasm"),r=n(673).readFileSync(e).buffer;t=(0,Re.loadWASM)(r)}nt=t.then((()=>({createOnigScanner:e=>(0,Re.createOnigScanner)(e),createOnigString:e=>(0,Re.createOnigString)(e)})))}return nt}(s),"vscode-oniguruma"),a=new jt(o);e.paths?.themes&&(a.themesPath=e.paths.themes.endsWith("/")?e.paths.themes:e.paths.themes+"/"),e.paths?.languages&&(o.languagesPath=e.paths.languages.endsWith("/")?e.paths.languages:e.paths.languages+"/");const i=(await a.loadThemes(r))[0];let l;await a.loadLanguages(t);let c=function(){const e={"#000001":"var(--shiki-color-text)","#000002":"var(--shiki-color-background)","#000004":"var(--shiki-token-constant)","#000005":"var(--shiki-token-string)","#000006":"var(--shiki-token-comment)","#000007":"var(--shiki-token-keyword)","#000008":"var(--shiki-token-parameter)","#000009":"var(--shiki-token-function)","#000010":"var(--shiki-token-string-expression)","#000011":"var(--shiki-token-punctuation)","#000012":"var(--shiki-token-link)"};for(let t=0;t<gt.length;t++){const n=`#A${t.toString().padStart(5,"0")}`,r=gt[t].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();e[n]=`var(--shiki-color-ansi-${r})`}return e}();function u(e){const t=e?a.getTheme(e):i;if(!t)throw Error(`No theme registration for ${e}`);l&&l.name===t.name||(a.setTheme(t),l=t);const n=a.getColorMap();return"css"===t.type&&function(e,t){e.bg=c[e.bg]||e.bg,e.fg=c[e.fg]||e.fg,Object.entries(e.colors).forEach((([t,n])=>{e.colors[t]=c[n]||n})),t.forEach(((e,n)=>{t[n]=c[e]||e}))}(t,n),{_theme:t,_colorMap:n}}function d(e,t="text",n,r={includeExplanation:!0}){if(function(e){return!e||["plaintext","txt","text"].includes(e)}(t))return[...e.split(/\r\n|\r|\n/).map((e=>[{content:e}]))];const{_grammar:s}=function(e){const t=a.getGrammar(e);if(!t)throw Error(`No language registration for ${e}`);return{_grammar:t}}(t),{_theme:o,_colorMap:i}=u(n);return function(e,t,n,r,s){let o=n.split(/\r\n|\r|\n/),a=Oe.INITIAL,i=[],l=[];for(let n=0,c=o.length;n<c;n++){let c,u,d,p=o[n];if(""===p){i=[],l.push([]);continue}s.includeExplanation&&(c=r.tokenizeLine(p,a),u=c.tokens,d=0);let h=r.tokenizeLine2(p,a),m=h.tokens.length/2;for(let n=0;n<m;n++){let r=h.tokens[2*n],o=n+1<m?h.tokens[2*n+2]:p.length;if(r===o)continue;let a=h.tokens[2*n+1],l=t[De.getForeground(a)],c=De.getFontStyle(a),g=[];if(s.includeExplanation){let t=0;for(;r+t<o;){let n=u[d],r=p.substring(n.startIndex,n.endIndex);t+=r.length,g.push({content:r,scopes:dt(e,n.scopes)}),d++}}i.push({content:p.substring(r,o),color:l,fontStyle:c,explanation:g})}l.push(i),i=[],a=h.ruleStack}return l}(o,i,e,s,r)}function p(e,t){const{_theme:n}=u(t);return function(e,t){const n=t.split(/\r?\n/),r=_t(Object.fromEntries(gt.map((t=>[t,e.colors[`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`]])))),s=function(){let e=null,t=null,n=new Set;return{parse(r){const s=[];let o=0;do{const a=bt(r,o),i=a.sequence?r.substring(o,a.startPosition):r.substring(o);if(i.length>0&&s.push({value:i,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const r=kt(a.sequence);for(const s of r)"resetAll"===s.type?(e=null,t=null,n.clear()):"resetForegroundColor"===s.type?e=null:"resetBackgroundColor"===s.type?t=null:"resetDecoration"===s.type&&n.delete(s.value);for(const s of r)"setForegroundColor"===s.type?e=s.value:"setBackgroundColor"===s.type?t=s.value:"setDecoration"===s.type&&n.add(s.value)}o=a.position}while(o<r.length);return s}}}();return n.map((t=>s.parse(t).map((t=>{let n;n=t.decorations.has("reverse")?t.background?r.value(t.background):e.bg:t.foreground?r.value(t.foreground):e.fg,t.decorations.has("dim")&&(n=function(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t){if(t[3]){const e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map((e=>`${e}${e}`)).join("")}80`}const n=e.match(/var\((--shiki-color-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(n));let s=He.None;return t.decorations.has("bold")&&(s|=He.Bold),t.decorations.has("italic")&&(s|=He.Italic),t.decorations.has("underline")&&(s|=He.Underline),{content:t.value,color:n,fontStyle:s}}))))}(n,e)}return{codeToThemedTokens:d,codeToHtml:function(e,t="text",n){let r;r="object"==typeof t?t:{lang:t,theme:n};const s=d(e,r.lang,r.theme,{includeExplanation:!1}),{_theme:o}=u(r.theme);return St(s,{fg:o.fg,bg:o.bg,lineOptions:r?.lineOptions,themeName:o.name})},ansiToThemedTokens:p,ansiToHtml:function(e,t){const n=p(e,t?.theme),{_theme:r}=u(t?.theme);return St(n,{fg:r.fg,bg:r.bg,lineOptions:t?.lineOptions,themeName:r.name})},getTheme:e=>u(e)._theme,loadTheme:async function(e){await a.loadTheme(e)},loadLanguage:async function(e){const t=Nt(e);o.addLanguage(t),await a.loadLanguage(t)},getBackgroundColor:function(e){const{_theme:t}=u(e);return t.bg},getForegroundColor:function(e){const{_theme:t}=u(e);return t.fg},getLoadedThemes:function(){return a.getLoadedThemes()},getLoadedLanguages:function(){return a.getLoadedLanguages()},setColorReplacements:function(e){c=e}}}const Lt={"actionscript-3":["as3"],bat:["batch"],berry:["be"],cadence:["cdc"],clojure:["clj"],codeql:["ql"],cpp:["arduino"],csharp:["c#","cs"],cypher:["cql"],docker:["dockerfile"],erlang:["erl"],fsharp:["f#","fs"],gjs:["glimmer-js"],gts:["glimmer-ts"],haskell:["hs"],handlebars:["hbs"],ini:["properties"],java:["javafx"],javascript:["jscript","js"],jssm:["fsl"],kusto:["kql"],make:["makefile"],markdown:["md"],matlab:["matlabkey"],narrat:["nar"],nextflow:["nf"],"objective-c":["objc"],pascal:["delphi"],powershell:["ps","ps1"],pug:["jade"],python:["py"],raku:["perl6"],ruby:["rb"],rust:["rs"],shaderlab:["shader"],shellscript:["shell","sh","git-commit","git-rebase"],sellsession:["console"],stylus:["styl"],typescript:["ts"],vb:["cmd"],viml:["vim","vimscript"],vyper:["vy"],wenyan:["文言"],xml:["coldfusion"],yaml:["yml"]},Pt=e=>{if(e)return Object.keys(Lt).find((t=>Lt[t].includes(e)))},Tt=(e=>{const t=Object.values(Lt).flat();return Object.keys(e).reduce(((n,r)=>(t.includes(r)||(n[r]=e[r]),n)),{})})(JSON.parse('{"abap":"ABAP","actionscript-3":"ActionScript 3","ada":"Ada","ansi":"ANSI","apache":"Apache","apex":"Apex","apl":"APL","applescript":"AppleScript","ara":"Ara","asm":"ASM","astro":"Astro","awk":"Awk","ballerina":"Ballerina","bat":"BAT (Batchfile)","batch":"BAT (Batchfile)","beancount":"Ledger (Beancount)","berry":"Berry","be":"Berry","bibtex":"BibTeX","bicep":"BICEP","blade":"Blade","c":"C","cadence":"Cadence","cdc":"Cadence","clarity":"Clarity","clj":"Clojure","clojure":"Clojure","cmake":"CMake","cobol":"COBOL","codeql":"CodeQL","console":"Console","shellsession":"ShellSession","cypher":"Cypher","cql":"Cypher","ql":"CodeQL","coffee":"CoffeeScript","cpp":"C++","crystal":"Crystal","csharp":"C#","c#":"C#","cs":"C#","css":"CSS","cue":"CUE","d":"D","dart":"Dart","dax":"DAX","diff":"Diff","docker":"Dockerfile","dockerfile":"Dockerfile","dream-maker":"DreamMaker","elixir":"Elixir","elm":"Elm","erb":"ERB","erlang":"Erlang","erl":"Erlang","fish":"Fish","fsharp":"F#","f#":"F#","fs":"F#","gdresource":"GDResource","gdscript":"GDScript","gdshader":"GDShader","gherkin":"Gherkin","git-commit":"Git Commit","git-rebase":"Git Rebase","glsl":"GLSL","glimmer-js":"Glimmer (JS)","gjs":"Glimmer (JS)","glimmer-ts":"Glimmer (TS)","gts":"Glimmer (TS)","gnuplot":"Gnuplot","go":"Go","graphql":"GraphQL","groovy":"Groovy","hack":"Hack","haml":"HAML","handlebars":"Handlebars","hbs":"Handlebars","haskell":"Haskell","hs":"Haskell","hcl":"HCL","hjson":"Hjson","hlsl":"HLSL","html":"HTML","http":"HTTP","imba":"Imba","ini":"INI","properties":"INI","java":"Java","javascript":"JavaScript","js":"JavaScript","jinja-html":"Jinja HTML","jison":"Jison","json":"JSON","json5":"JSON5","jsonc":"JSONC","jsonl":"JSONL","jsonnet":"JSONnet","jssm":"JSSM","fsl":"JSSM","jsx":"JSX","julia":"Julia","kotlin":"Kotlin","kusto":"Kusto","kql":"Kusto","latex":"LaTeX","less":"LESS","liquid":"Liquid","lisp":"Lisp","logo":"Logo","lua":"Lua","make":"Makefile","makefile":"Makefile","markdown":"Markdown","md":"Markdown","marko":"Marko","matlab":"MATLAB","mdx":"MDX","mermaid":"Mermaid","mojo":"Mojo","narrat":"Narrat","nar":"Narrat","nextflow":"Nextflow","nf":"Nextflow","nginx":"Nginx","nim":"Nim","nix":"Nix","objective-c":"Objective-C","objc":"Objective-C","objective-cpp":"Objective-C++","ocaml":"OCaml","pascal":"Pascal","perl":"Perl","php":"PHP","plaintext":"Plaintext","plsql":"PLSQL","postcss":"PostCSS","powerquery":"Power Query","powershell":"PowerShell","ps":"PowerShell","ps1":"PowerShell","prisma":"Prisma","prolog":"Prolog","proto":"Protocol Buffers","pug":"Pug","jade":"Pug","puppet":"Puppet","purescript":"PureScript","python":"Python","py":"Python","r":"R","raku":"Raku","perl6":"Raku","razor":"Razor","reg":"Windows Registry","rel":"Rel","riscv":"RISC-V","rst":"RST","ruby":"Ruby","rb":"Ruby","rust":"Rust","rs":"Rust","sas":"SAS","sass":"Sass","scala":"Scala","scheme":"Scheme","scss":"SCSS","shaderlab":"ShaderLab","shader":"Shader","shellscript":"ShellScript","splunk":"Splunk SPL","bash":"Bash","shell":"ShellScript","sh":"ShellScript","zsh":"Zsh","smalltalk":"Smalltalk","solidity":"Solidity","sparql":"SPARQL","sql":"SQL","ssh-config":"SSH Config","stata":"Stata","stylus":"Stylus","styl":"Stylus","svelte":"Svelte","swift":"Swift","system-verilog":"SystemVerilog","tasl":"TASL","tcl":"TCL","tex":"TeX","toml":"TOML","tsx":"TSX","turtle":"Turtle","twig":"Twig","typescript":"TypeScript","ts":"TypeScript","v":"V","vb":"VB","cmd":"VB","verilog":"Verilog","vhdl":"VHDL","viml":"VimL","vim":"VimL","vimscript":"VimL","vue-html":"Vue HTML","vue":"Vue","vyper":"Vyper","vy":"Vyper","wasm":"WASM","wenyan":"Wenyan","文言":"Wenyan","wgsl":"WGSL","wolfram":"Wolfram","xml":"XML","xsl":"XSL","yaml":"YAML","yml":"YAML","zig":"Zig","zenscript":"ZenScript"}')),At=e=>"ansi"===e?"shellscript":e,Rt=({theme:e,lang:t,ready:n})=>{if(!n)throw new Error;const r=(0,s.applyFilters)("blocks.codeBlockPro.theme",e),o=c?.[r]?.alias;return wt({langs:"plaintext"===t?[]:[At(t)],theme:null!=o?o:r})};let Ot=!1;const Et=({theme:e,lang:t,ready:n=!0})=>{const[r,o]=(0,u.useState)(!1),a=(0,s.applyFilters)("blocks.codeBlockPro.themes",c);if(!Ot){Ot=!0;const e=window.codeBlockPro?.pluginUrl+"build/shiki/";i=(0,s.applyFilters)("blocks.codeBlockPro.assetDir",e),et=i.endsWith("/")?i:i+"/"}var i;a[e]?.custom&&(e="css-variables");const{data:l,error:d}=he({theme:e,lang:t,ready:n&&r},Rt);return(0,u.useEffect)((()=>{const e=window.codeBlockPro?.pluginUrl+"build/shiki/";fetch(e+"dist/onig.wasm").then((e=>e.arrayBuffer())).then((e=>{tt=e,o(!0)}))}),[]),{highlighter:l,error:d,loading:!l&&!d||!r}},Bt=ke()(Ne(xe(((e,t)=>({previousLanguage:"javascript",setPreviousLanguage(n){e({previousLanguage:n}),t().addRecentLanguage(n)},recentLanguages:[],addRecentLanguage(t){e((e=>e.recentLanguages.includes(t)?e:{recentLanguages:[...e.recentLanguages?.slice(-4)||[],t]}))}})),{name:"Code Block Pro Language"}),{name:"code-block-pro-last-language"})),Mt=(e,t)=>{try{return JSON.parse(`[${null!=e?e:""}]`).map((e=>{const n=isNaN(Number(t))?0:Math.max(Number(t)-1,0);return"number"==typeof e?e-n:Array.from({length:e[1]-e[0]+1},((t,r)=>e[0]+r-n))})).filter((e=>!Array.isArray(e)||e?.length>0)).flat().filter((e=>e>=0))}catch(e){return console.error(e),[]}},It=e=>{const t=JSON.parse(`[${null!=e?e:""}]`).filter((e=>Array.isArray(e))),n=t.some((e=>e.some((e=>Array.isArray(e)))));if(n)throw new Error("Nested arrays not allowed");if(t.some((e=>e[0]>=e[1])))throw new Error("Nested arrays must be in order");return!0},Ft=window.wp.escapeHtml,Ht=window.wp.htmlEntities,Dt=(e,{useDecodeURI:t})=>{if(t)try{return encodeURIComponent(e)}catch(t){return console.error(t),e}return(0,Ft.escapeHTML)(e)},Gt=(e,{useDecodeURI:t})=>{if(t)try{return decodeURIComponent(e)}catch(t){return console.error(t),e}return(0,Ht.decodeEntities)(e)};var $t={grad:.9,turn:360,rad:360/(2*Math.PI)},Wt=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},zt=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Ut=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},qt=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Vt=function(e){return{r:Ut(e.r,0,255),g:Ut(e.g,0,255),b:Ut(e.b,0,255),a:Ut(e.a)}},Jt=function(e){return{r:zt(e.r),g:zt(e.g),b:zt(e.b),a:zt(e.a,3)}},Kt=/^#([0-9a-f]{3,8})$/i,Xt=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Qt=function(e){var t=e.r,n=e.g,r=e.b,s=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),i=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(i<0?i+6:i),s:o?a/o*100:0,v:o/255*100,a:s}},Yt=function(e){var t=e.h,n=e.s,r=e.v,s=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),i=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:255*[r,i,a,a,l,r][c],g:255*[l,r,r,i,a,a][c],b:255*[a,a,l,r,r,i][c],a:s}},Zt=function(e){return{h:qt(e.h),s:Ut(e.s,0,100),l:Ut(e.l,0,100),a:Ut(e.a)}},en=function(e){return{h:zt(e.h),s:zt(e.s),l:zt(e.l),a:zt(e.a,3)}},tn=function(e){return Yt((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},nn=function(e){return{h:(t=Qt(e)).h,s:(s=(200-(n=t.s))*(r=t.v)/100)>0&&s<200?n*r/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,n,r,s},rn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,on=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,an=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ln={string:[[function(e){var t=Kt.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?zt(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?zt(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=on.exec(e)||an.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Vt({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=rn.exec(e)||sn.exec(e);if(!t)return null;var n,r,s=Zt({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*($t[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return tn(s)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,s=e.a,o=void 0===s?1:s;return Wt(t)&&Wt(n)&&Wt(r)?Vt({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,s=e.a,o=void 0===s?1:s;if(!Wt(t)||!Wt(n)||!Wt(r))return null;var a=Zt({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return tn(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,s=e.a,o=void 0===s?1:s;if(!Wt(t)||!Wt(n)||!Wt(r))return null;var a=function(e){return{h:qt(e.h),s:Ut(e.s,0,100),v:Ut(e.v,0,100),a:Ut(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return Yt(a)},"hsv"]]},cn=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},un=function(e,t){var n=nn(e);return{h:n.h,s:Ut(n.s+100*t,0,100),l:n.l,a:n.a}},dn=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},pn=function(e,t){var n=nn(e);return{h:n.h,s:n.s,l:Ut(n.l+100*t,0,100),a:n.a}},hn=function(){function e(e){this.parsed=function(e){return"string"==typeof e?cn(e.trim(),ln.string):"object"==typeof e&&null!==e?cn(e,ln.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return zt(dn(this.rgba),2)},e.prototype.isDark=function(){return dn(this.rgba)<.5},e.prototype.isLight=function(){return dn(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Jt(this.rgba)).r,n=e.g,r=e.b,o=(s=e.a)<1?Xt(zt(255*s)):"","#"+Xt(t)+Xt(n)+Xt(r)+o;var e,t,n,r,s,o},e.prototype.toRgb=function(){return Jt(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Jt(this.rgba)).r,n=e.g,r=e.b,(s=e.a)<1?"rgba("+t+", "+n+", "+r+", "+s+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,s},e.prototype.toHsl=function(){return en(nn(this.rgba))},e.prototype.toHslString=function(){return t=(e=en(nn(this.rgba))).h,n=e.s,r=e.l,(s=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+s+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,s},e.prototype.toHsv=function(){return e=Qt(this.rgba),{h:zt(e.h),s:zt(e.s),v:zt(e.v),a:zt(e.a,3)};var e},e.prototype.invert=function(){return mn({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),mn(un(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),mn(un(this.rgba,-e))},e.prototype.grayscale=function(){return mn(un(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),mn(pn(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),mn(pn(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?mn({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):zt(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=nn(this.rgba);return"number"==typeof e?mn({h:e,s:t.s,l:t.l,a:t.a}):zt(t.h)},e.prototype.isEqual=function(e){return this.toHex()===mn(e).toHex()},e}(),mn=function(e){return e instanceof hn?e:new hn(e)},gn=[];!function(e){e.forEach((function(e){gn.indexOf(e)<0&&(e(hn,ln),gn.push(e))}))}([function(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var s in n)r[n[s]]=s;var o={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var s,a,i=r[this.toHex()];if(i)return i;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!o.length)for(var d in n)o[d]=new e(n[d]).toRgb();for(var p in n){var h=(s=l,a=o[p],Math.pow(s.r-a.r,2)+Math.pow(s.g-a.g,2)+Math.pow(s.b-a.b,2));h<c&&(c=h,u=p)}return u}},t.string.push([function(t){var r=t.toLowerCase(),s="transparent"===r?"#0000":n[r];return s?new e(s).toRgb():null},"name"])}]);const fn=(e,t)=>{const n=(0,s.applyFilters)("blocks.codeBlockPro.themes",c);if(n?.[t.theme]?.styles?.["line-background"])return n?.[t?.theme]?.styles?.["line-background"];if(e.startsWith("var")){const t=document.documentElement,n=getComputedStyle(t).getPropertyValue(e.replace(/^var\((--[\w-]+)\)$/,"$1")).trim()||getComputedStyle(t).getPropertyValue("--cbp-text");return mn(n).saturate(.5).alpha(.2).toRgbString()}return mn(e).saturate(.5).alpha(.2).toRgbString()},bn=e=>{const t=(0,s.applyFilters)("blocks.codeBlockPro.themes",c);return t?.[e.theme]?.styles?.["line-number-color"]?t?.[e?.theme]?.styles?.["line-number-color"]:e.textColor},yn=e=>{const t=(0,s.applyFilters)("blocks.codeBlockPro.themes",c);return e?.theme&&t?.[e?.theme]?.styles?.["color-background"]?t?.[e?.theme]?.styles?.["color-background"]:e.bgColor},kn=e=>{const t=(0,s.applyFilters)("blocks.codeBlockPro.themes",c);return e?.theme&&t?.[e?.theme]?.styles?.["color-text"]?t?.[e?.theme]?.styles?.["color-text"]:e.textColor},vn=e=>{if(e)return[e.split(".")[0],"ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas","monospace"].join(",")},xn=(e,t)=>{if(e)return t&&parseFloat(e)?`clamp(${16*parseFloat(e)}px, ${e}, ${24*parseFloat(e)}px)`:e},Sn=window.wp.components,Cn=window.ReactJSXRuntime,jn=()=>(0,Cn.jsx)(Sn.Card,{children:(0,Cn.jsx)(Sn.CardBody,{children:(0,Cn.jsx)(Sn.Tip,{children:(0,Cn.jsx)("span",{className:"text-sm",dangerouslySetInnerHTML:{__html:(0,o.sprintf)((0,o.__)("Read-only mode: The %s capability is required.","code-block-pro"),"<code>unfiltered_html</code>")}})})})}),Nn=({attributes:e,setAttributes:t})=>{const{language:n,theme:r,code:a="",bgColor:i,textColor:l,disablePadding:c,lineNumbers:d,startingLineNumber:h,footerType:m,fontSize:g,lineBlurs:f,lineHighlights:b,enableBlurring:y,enableHighlighting:k,seeMoreAfterLine:v,seeMoreTransition:_,enableMaxHeight:x,editorHeight:S,useDecodeURI:C,useEscapeShortCodes:j,tabSize:N,useTabs:w}=e,L=(0,u.useRef)(null),P=ge(),[T,A]=(0,u.useState)(0),R=(0,u.useRef)(null),{previousLanguage:O}=Bt(),{highlighter:E,error:B,loading:M}=Et({theme:r,lang:null!=n?n:O}),I=m&&"none"!==m;(({attributes:e,setAttributes:t})=>{const{theme:n,fontSize:r,fontFamily:s,lineHeight:o,copyButton:a,copyButtonType:i,copyButtonString:l,copyButtonStringCopied:c,headerType:d,footerType:p,clampFonts:h,disablePadding:m,lineNumbers:g,highlightingHover:f,tabSize:b,useTabs:y,seeMoreType:k,seeMoreString:v,seeMoreTransition:_,seeMoreCollapse:x,seeMoreCollapseString:S}=e,{previousTheme:C,previousFontSize:j,previousFontFamily:N,previousLineHeight:w,previousHeaderType:L,previousFooterType:P,previousClampFonts:T,previousDisablePadding:A,previousLineNumbers:R,previousHighlightingHover:O,previousCopyButton:E,previousCopyButtonType:B,previousCopyButtonString:M,previousCopyButtonStringCopied:I,previousTabSize:F,previousUseTabs:H,previousSeeMoreType:D,previousSeeMoreString:G,previousSeeMoreTransition:$,previousSeeMoreCollapse:W,previousSeeMoreCollapseString:z}=Ae(),U=(()=>{const[e,t]=(0,u.useState)(Ae.persist.hasHydrated);return(0,u.useEffect)((()=>{const e=Ae.persist.onFinishHydration((()=>t(!0)));return()=>{e()}}),[]),e})(),q=(0,u.useRef)(!1);(0,u.useEffect)((()=>{q.current||void 0===a&&E&&t({copyButton:E})}),[E,a,t]),(0,u.useEffect)((()=>{q.current||i||t({copyButtonType:B})}),[B,i,t]),(0,u.useEffect)((()=>{q.current||l||void 0===l||t({copyButtonString:M})}),[M,l,t]),(0,u.useEffect)((()=>{q.current||c||void 0===c||t({copyButtonStringCopied:I})}),[I,c,t]),(0,u.useEffect)((()=>{q.current||n||t({theme:C})}),[C,n,t]),(0,u.useEffect)((()=>{q.current||r||t({fontSize:j})}),[j,r,t]),(0,u.useEffect)((()=>{q.current||s||""===s||t({fontFamily:N})}),[N,s,t]),(0,u.useEffect)((()=>{q.current||o||t({lineHeight:w})}),[w,o,t]),(0,u.useEffect)((()=>{q.current||d||t({headerType:L})}),[L,d,t]),(0,u.useEffect)((()=>{q.current||void 0===p&&t({footerType:P})}),[P,p,t]),(0,u.useEffect)((()=>{q.current||void 0===h&&t({clampFonts:T})}),[T,h,t]),(0,u.useEffect)((()=>{q.current||void 0===m&&t({disablePadding:A})}),[A,m,t]),(0,u.useEffect)((()=>{q.current||void 0===g&&t({lineNumbers:R})}),[R,g,t]),(0,u.useEffect)((()=>{q.current||void 0===b&&t({tabSize:F})}),[F,b,t]),(0,u.useEffect)((()=>{q.current||void 0===y&&t({useTabs:H})}),[H,y,t]),(0,u.useEffect)((()=>{q.current||void 0===k&&t({seeMoreType:D})}),[D,k,t]),(0,u.useEffect)((()=>{q.current||void 0===v&&t({seeMoreString:G})}),[G,v,t]),(0,u.useEffect)((()=>{q.current||void 0===_&&t({seeMoreTransition:$})}),[$,_,t]),(0,u.useEffect)((()=>{q.current||void 0===x&&t({seeMoreCollapse:W})}),[W,x,t]),(0,u.useEffect)((()=>{q.current||void 0===S&&t({seeMoreCollapseString:z})}),[z,S,t]),(0,u.useEffect)((()=>{q.current||void 0===f&&t({highlightingHover:O})}),[O,f,t]),(0,u.useEffect)((()=>{requestAnimationFrame((()=>{q.current=!0}))}),[U])})({attributes:e,setAttributes:t});const F=(0,u.useCallback)((()=>k?Mt(b,h).map((e=>({line:e,classes:["cbp-line-highlight"]}))):[]),[k,b,h]),H=(0,u.useCallback)((()=>y?Mt(f,h).map((e=>({line:e,classes:["cbp-no-blur"]}))):[]),[y,f,h]);return(0,u.useEffect)((()=>{E&&t({bgColor:E.getBackgroundColor(),textColor:E.getForegroundColor()})}),[r,E,t,P]),(0,u.useEffect)((()=>{if(!E)return;const r=null!=n?n:O,o=At(r),i=Gt(a,{useDecodeURI:C}),c=[...F(),...H(),x&&!Number.isNaN(v)?{line:Number(v),classes:["cbp-see-more-line",_?"cbp-see-more-transition":""]}:{}],u="ansi"===r?E.ansiToHtml(i,{lineOptions:c}):E.codeToHtml(i,{lang:o,lineOptions:c}),d=(0,s.applyFilters)("blocks.codeBlockPro.codeHTML",u,e),p=fn(l,e);var h;t({codeHTML:j?(h=d,h.replaceAll(/\[([^<>&/[\]\x00-\x20=]+)\]/g,(e=>e.replace("[","[").replace("]","]")))):d,lineHighlightColor:p})}),[E,v,_,P,l,a,x,n,t,O,e,b,f,H,F,C,j]),(0,u.useLayoutEffect)((()=>{var e;if(!R.current)return;if(!d)return void t({lineNumbersWidth:void 0});const n=R?.current?.querySelectorAll(".line"),r=Number(null!=h?h:0)+(null!==(e=n?.length)&&void 0!==e?e:0);if(!n?.[0])return;t({highestLineNumber:r});const{font:s}=getComputedStyle(n?.[0]);A(((e,t)=>{const n=document.createElement("canvas").getContext("2d");return n?(n.font=t||getComputedStyle(document.body).font,n.measureText(e).width):0})(String(r),s))}),[d,h,a,M,P,B,L,R,t,g,M]),M||E?M&&a||B?(0,Cn.jsx)("div",{className:"px-4 text-left flex items-center",style:{backgroundColor:i,color:l,minHeight:36},children:null!==(D=B?.message)&&void 0!==D?D:""}):void 0===P?null:(0,Cn.jsxs)("div",{ref:R,style:{maxHeight:Number(S)?Number(S):void 0,overflow:Number(S)?"auto":void 0},children:[P?null:(0,Cn.jsx)("div",{className:"absolute inset-0 z-10",children:(0,Cn.jsx)(jn,{})}),(0,Cn.jsx)(p(),{value:Gt(a,{useDecodeURI:C}),onValueChange:n=>t({code:Dt(n,e)}),autoFocus:!a,tabSize:w?1:N||2,insertSpaces:!w,padding:{top:c?0:16,bottom:c||I?0:16,left:!d&&c?0:d?c?(null!=T?T:0)+16:(null!=T?T:0)+32:16,right:0},style:{backgroundColor:i,color:l,minHeight:P?void 0:200},onKeyDown:e=>"Tab"===e.key&&R.current?.querySelector("textarea")?.focus(),highlight:e=>E?.codeToHtml(Gt(e,{useDecodeURI:C}),{lang:At(null!=n?n:O),lineOptions:[...F(),...H()]})?.replace(/<\/?[pre|code][^>]*>/g,"")})]}):(0,Cn.jsx)("div",{className:"px-4 text-left flex items-center",style:{backgroundColor:i,color:l,minHeight:36},children:(0,o.sprintf)((0,o.__)("Theme %s not found. Please select a different theme.","code-block-pro"),r)});var D},wn=e=>{var t,n;const{language:r,bgColor:s,textColor:o,footerString:a,footerLink:i,footerLinkTarget:l,disablePadding:c}=e,u=mn(o),d=o?.startsWith("var(")?null!==(t=kn(e))&&void 0!==t?t:o:u.isDark()?u.lighten(.05).toHex():u.darken(.05).toHex();return(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"flex-end",padding:c?"10px 0 0 0":"10px",width:"100%",justifyContent:"flex-end",backgroundColor:null!==(n=yn(e))&&void 0!==n?n:s,color:d,fontSize:"12px",lineHeight:"1",position:"relative"},children:(0,Cn.jsx)(Ln,{text:a||Tt[r],color:d,link:i,linkTarget:l})})},Ln=({text:e,color:t,link:n,linkTarget:r})=>{if(!n)return(0,Cn.jsx)(Cn.Fragment,{children:e});const s={color:t,textDecoration:"none",fontWeight:"normal",border:"none",background:"none",borderRadius:"0",padding:"0",margin:"0"};return r?(0,Cn.jsx)("a",{className:"cbp-footer-link",href:n,style:s,target:"_blank",rel:"noopener noreferrer",children:e}):(0,Cn.jsx)("a",{className:"cbp-footer-link",href:n,style:s,children:e})},Pn=e=>{var t,n;const{language:r,bgColor:s,textColor:o,footerString:a,footerLink:i,footerLinkTarget:l,disablePadding:c}=e,u=mn(o),d=o?.startsWith("var(")?null!==(t=kn(e))&&void 0!==t?t:o:u.isDark()?u.lighten(.05).toHex():u.darken(.05).toHex();return(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"flex-end",padding:c?"10px 0 0 0":"10px",width:"100%",justifyContent:"flex-start",backgroundColor:null!==(n=yn(e))&&void 0!==n?n:s,color:d,fontSize:"12px",lineHeight:"1",position:"relative"},children:(0,Cn.jsx)(Tn,{text:a||Tt[r],color:d,link:i,linkTarget:l})})},Tn=({text:e,color:t,link:n,linkTarget:r})=>{if(!n)return(0,Cn.jsx)(Cn.Fragment,{children:e});const s={color:t,textDecoration:"none",fontWeight:"normal",border:"none",background:"none",borderRadius:"0",padding:"0",margin:"0"};return r?(0,Cn.jsx)("a",{className:"cbp-footer-link",href:n,style:s,target:"_blank",rel:"noopener noreferrer",children:e}):(0,Cn.jsx)("a",{className:"cbp-footer-link",href:n,style:s,children:e})},An=({attributes:e,onClick:t})=>{const{footerType:n,...r}=e,{bgColor:s}=e,a={none:(0,o.__)("None","code-block-pro"),simpleStringEnd:(0,o.__)("Simple string end","code-block-pro"),simpleStringStart:(0,o.__)("Simple string start","code-block-pro")};return(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:Object.entries(a).map((([e,a])=>(0,Cn.jsx)(Sn.BaseControl,{id:`code-block-pro-footer-${e}`,label:n===e?(0,o.sprintf)((0,o.__)("%s (current)","code-block-pro"),a):a,help:["simpleStringEnd","simpleStringStart"].includes(e)?(0,o.__)("Set the text at the top of this panel.","code-block-pro"):void 0,children:(0,Cn.jsx)("button",{id:`code-block-pro-footer-${e}`,type:"button",onClick:()=>t(e),className:"p-0 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto",children:(0,Cn.jsxs)("span",{className:"pointer-events-none w-full",children:[(0,Cn.jsx)("span",{className:"block w-full h-8",style:{backgroundColor:s}}),(0,Cn.jsx)(Rn,{footerType:e,...r})]})})},e)))})},Rn=e=>{const{footerType:t}=e;return"simpleStringEnd"===t?(0,Cn.jsx)(wn,{...e}):"simpleStringStart"===t?(0,Cn.jsx)(Pn,{...e}):null},On=e=>(0,Cn.jsx)("span",{style:{display:"block",padding:"16px 0 0 16px",marginBottom:"-1px",width:"100%",textAlign:"left",backgroundColor:yn(e)},children:(0,Cn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:54,height:14,viewBox:"0 0 54 14",children:(0,Cn.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",children:[(0,Cn.jsx)("circle",{cx:"6",cy:"6",r:"6",fill:"#FF5F56",stroke:"#E0443E",strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"26",cy:"6",r:"6",fill:"#FFBD2E",stroke:"#DEA123",strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"46",cy:"6",r:"6",fill:"#27C93F",stroke:"#1AAB29",strokeWidth:".5"})]})})}),En=e=>{const{textColor:t}=e;return(0,Cn.jsx)("span",{style:{display:"block",padding:"16px 0 0 16px",marginBottom:"-1px",width:"100%",textAlign:"left",backgroundColor:yn(e)},children:(0,Cn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:54,height:14,viewBox:"0 0 54 14",children:(0,Cn.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",children:[(0,Cn.jsx)("circle",{cx:"6",cy:"6",r:"6",fill:mn(t).alpha(.2).toHex(),stroke:mn(t).alpha(.3).toHex(),strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"26",cy:"6",r:"6",fill:mn(t).alpha(.2).toHex(),stroke:mn(t).alpha(.3).toHex(),strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"46",cy:"6",r:"6",fill:mn(t).alpha(.2).toHex(),stroke:mn(t).alpha(.3).toHex(),strokeWidth:".5"})]})})})},Bn=({bgColor:e})=>{const t=mn(e),n=t.isDark()?t.lighten(.05):t.darken(.05);return(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"center",padding:"10px 0px 10px 16px",marginBottom:"-2px",width:"100%",textAlign:"left",backgroundColor:n.toHex()},children:(0,Cn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:62,height:20,viewBox:"0 0 62 20",children:(0,Cn.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",children:[(0,Cn.jsx)("circle",{cx:"8",cy:"8",r:"8",fill:e,stroke:e,strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"30",cy:"8",r:"8",fill:e,stroke:e,strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"52",cy:"8",r:"8",fill:e,stroke:e,strokeWidth:".5"})]})})})},Mn=e=>{const{language:t,bgColor:n,textColor:r,headerString:s}=e;let o=mn(n).toHex();const a=mn(r);let i=a.isDark()?a.lighten(.05).toHex():a.darken(.05).toHex();var l,c;return n?.startsWith("var(")&&(o=null!==(l=yn(e))&&void 0!==l?l:n),r?.startsWith("var(")&&(i=null!==(c=kn(e))&&void 0!==c?c:r),(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"center",padding:"16px 0 0 16px",width:"100%",textAlign:"left",backgroundColor:o},children:(0,Cn.jsx)("span",{style:{background:i,padding:"0.3rem 0.5rem 0.2rem",borderRadius:"1rem",fontSize:"0.8em",lineHeight:1,height:"1.25rem",textAlign:"center",display:"inline-flex",alignItems:"center",justifyContent:"center",color:o},children:s||Tt[t]})})},In=e=>{const{language:t,bgColor:n,textColor:r,headerString:s}=e,o=mn(n);let a=o.isDark()?o.lighten(.05).toHex():o.darken(.05).toHex();const i=mn(r);let l=i.isDark()?i.lighten(.05).toHex():i.darken(.05).toHex();var c,u;return n?.startsWith("var(")&&(a=null!==(c=yn(e))&&void 0!==c?c:n),r?.startsWith("var(")&&(l=null!==(u=kn(e))&&void 0!==u?u:r),(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"center",padding:"10px 0px 10px 16px",marginBottom:"-2px",width:"100%",textAlign:"left",backgroundColor:a,color:l},children:s||Tt[t]})},Fn=e=>{const{language:t,bgColor:n,textColor:r,headerString:s}=e;let o=fn(r,e);var a;return r?.startsWith("var(")&&(o=null!==(a=kn(e))&&void 0!==a?a:r),(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"center",padding:"10px 0px 0 16px",fontSize:"0.8em",width:"100%",textAlign:"left",backgroundColor:n,fontStyle:"italic",color:r},children:(0,Cn.jsx)("span",{style:{borderBottom:`1px solid ${o}`},children:s||Tt[t]})})},Hn=()=>(0,Cn.jsx)("div",{className:"block w-full h-8 pt-2",children:(0,o.__)("Not supported with this theme","code-block-pro")}),Dn=["headlightsMutedAlt"],Gn=({attributes:e,onClick:t})=>{const{headerType:n,...r}=e,{bgColor:s}=e,a={none:(0,o.__)("None","code-block-pro"),headlights:(0,o.__)("Headlights","code-block-pro"),headlightsMuted:(0,o.__)("Headlights muted","code-block-pro"),headlightsMutedAlt:(0,o.__)("Headlights muted alt","code-block-pro"),simpleString:(0,o.__)("Simple string","code-block-pro"),stringSmall:(0,o.__)("String muted","code-block-pro"),pillString:(0,o.__)("Pill string","code-block-pro")},i=s?.startsWith("var(");return(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:Object.entries(a).map((([e,a])=>(0,Cn.jsxs)(Sn.BaseControl,{id:`code-block-pro-header-${e}`,label:n===e?(0,o.sprintf)((0,o.__)("%s (current)","code-block-pro"),a):a,help:["simpleString","pillString","stringSmall"].includes(e)?(0,o.__)("Set the text at the top of this panel.","code-block-pro"):void 0,children:[(0,Cn.jsx)("button",{id:`code-block-pro-header-${e}`,type:"button",onClick:()=>t(e),className:"p-0 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto",children:(0,Cn.jsxs)("span",{className:"pointer-events-none w-full",children:[(0,Cn.jsx)($n,{headerType:e,...r}),(0,Cn.jsx)("span",{className:"block w-full h-8",style:{backgroundColor:s}})]})}),i&&Dn.includes(e)&&(0,Cn.jsx)(Hn,{})]},e)))})},$n=e=>{const{headerType:t,bgColor:n}=e,r=n?.startsWith("var(");return r&&Dn.includes(null!=t?t:"")?null:"headlights"===t?(0,Cn.jsx)(On,{...e}):"headlightsMuted"===t?(0,Cn.jsx)(En,{...e}):"headlightsMutedAlt"===t?(0,Cn.jsx)(Bn,{...e}):"simpleString"===t?(0,Cn.jsx)(In,{...e}):"stringSmall"===t?(0,Cn.jsx)(Fn,{...e}):"pillString"===t?(0,Cn.jsx)(Mn,{...e}):null},Wn=e=>{const{bgColor:t,textColor:n,seeMoreString:r,disablePadding:s,context:a,footerType:i,seeMoreCollapse:l,seeMoreCollapseString:c}=e;let u=mn(t).toHex();const d=mn(n);let p=d.isDark()?d.lighten(.05).toHex():d.darken(.05).toHex();const h="none"!==i,m="editor"===a,g=r||(0,o.__)("Expand","code-block-pro");var f;return t?.startsWith("var(")&&(u=null!==(f=yn(e))&&void 0!==f?f:t),n?.startsWith("var(")&&(p=n),(0,Cn.jsx)("div",{className:"cbp-see-more-container","data-see-more-collapse-string":l?c||(0,o.__)("Collapse","code-block-pro"):void 0,"data-see-more-string":l?g:void 0,style:{display:"front"===a?"none":"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",backgroundColor:"transparent",fontSize:"12px",lineHeight:"1",position:"relative",marginBottom:h||m?0:"-16px",height:h&&!m?"16px":"32px"},children:(0,Cn.jsx)("span",{role:m?"presentation":"button",tabIndex:m?-1:0,className:"cbp-see-more-simple-btn cbp-see-more-simple-btn-hover",style:{color:p,backgroundColor:u,padding:s?"10px 0 0":"10px 16px",cursor:"default"},children:g})})},zn=e=>{const{bgColor:t,textColor:n,seeMoreString:r,disablePadding:s,context:a,footerType:i,seeMoreCollapse:l,seeMoreCollapseString:c}=e;let u=mn(t).toHex();const d=mn(n);let p=d.isDark()?d.lighten(.05).toHex():d.darken(.05).toHex();const h="none"!==i,m="editor"===a,g=r||(0,o.__)("Expand","code-block-pro");var f,b;return n?.startsWith("var(")&&(p=null!==(f=kn(e))&&void 0!==f?f:n),t?.startsWith("var(")&&(u=null!==(b=yn(e))&&void 0!==b?b:t),(0,Cn.jsx)("div",{className:"cbp-see-more-container","data-see-more-collapse-string":l?c||(0,o.__)("Collapse","code-block-pro"):void 0,"data-see-more-string":l?g:void 0,style:{display:"front"===a?"none":"flex",flexDirection:"column",alignItems:"flex-end",width:"100%",backgroundColor:"transparent",fontSize:"12px",lineHeight:"1",position:"relative",marginBottom:h||m?0:"-16px",height:h&&!m?"16px":"32px"},children:(0,Cn.jsx)("span",{role:m?"presentation":"button",tabIndex:m?-1:0,className:"cbp-see-more-simple-btn cbp-see-more-simple-btn-hover",style:{color:p,backgroundColor:u,padding:s?"10px 0 0":"10px 16px",cursor:"default"},children:g})})},Un=e=>{const{bgColor:t,textColor:n,seeMoreString:r,context:s,footerType:a,seeMoreCollapse:i,seeMoreCollapseString:l}=e;let c,u,d;if(t?.startsWith("var(")){var p,h;c=null!==(p=yn(e))&&void 0!==p?p:t,d=c,u=null!==(h=kn(e))&&void 0!==h?h:n}else{const e=mn(t),r=mn(n);u=e.isDark()?r.lighten(.15).toHex():r.darken(.15).toHex(),d=e.isDark()?e.lighten(.1).toHex():e.darken(.1).toHex(),c=e.toHex()}const m="none"!==a,g="editor"===s,f=r||(0,o.__)("Expand","code-block-pro");return(0,Cn.jsxs)("div",{className:"cbp-see-more-container","data-see-more-collapse-string":i?l||(0,o.__)("Collapse","code-block-pro"):void 0,"data-see-more-string":i?f:void 0,style:{display:"front"===s?"none":"flex",flexDirection:"column",alignItems:"center",width:"100%",fontSize:"12px",lineHeight:"1",position:"relative",paddingTop:m?0:"4px",marginBottom:m||g?0:"-16px",height:m&&!g?0:"32px"},children:[!m&&(0,Cn.jsx)("div",{style:{backgroundColor:c,height:"50%",position:"absolute",top:0,left:0,right:0},"aria-hidden":"true"}),(0,Cn.jsx)("span",{role:g?"presentation":"button",tabIndex:g?-1:0,className:"cbp-see-more-simple-btn cbp-see-more-simple-btn-hover",style:{color:u,backgroundColor:d,padding:"6px 14px",cursor:"default",position:"relative",borderRadius:"6px",transform:m?"translateY(-50%)":void 0},children:f})]})},qn=({attributes:e,onClick:t})=>{const{seeMoreType:n,...r}=e,{bgColor:s}=e,a={none:(0,o.__)("None","code-block-pro"),roundCenter:(0,o.__)("See more center","code-block-pro"),blockLeft:(0,o.__)("See more left","code-block-pro"),blockRight:(0,o.__)("See more right","code-block-pro")};return(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:Object.entries(a).map((([e,a])=>(0,Cn.jsx)(Sn.BaseControl,{id:`code-block-pro-see-more-${e}`,label:n===e||!n&&"none"===e?(0,o.sprintf)((0,o.__)("%s (current)","code-block-pro"),a):a,children:(0,Cn.jsx)("button",{id:`code-block-pro-see-more-${e}`,type:"button",onClick:()=>t(e),className:"p-0 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto",children:(0,Cn.jsxs)("span",{className:"pointer-events-none w-full",children:[(0,Cn.jsx)("span",{className:"block w-full h-8",style:{backgroundColor:s}}),(0,Cn.jsx)(Vn,{seeMoreType:e,context:"editor",...r})]})})},e)))})},Vn=e=>{const{seeMoreType:t,enableMaxHeight:n,context:r}=e;return n?"roundCenter"===t?(0,Cn.jsx)(Un,{...e,context:r}):"blockLeft"===t?(0,Cn.jsx)(Wn,{...e,context:r}):"blockRight"===t?(0,Cn.jsx)(zn,{...e,context:r}):null:null},Jn=function({onlyFirst:e=!1}={}){const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}();function Kn(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Jn,"")}const Xn=(0,u.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,u.cloneElement)(e,{width:t,height:t,...n,ref:r})})),Qn=window.wp.primitives,Yn=(0,Cn.jsx)(Qn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Cn.jsx)(Qn.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"})}),Zn=({text:e,color:t})=>void 0===e?(0,Cn.jsx)(Xn,{icon:Yn,fill:t,className:"border border-solid border-gray-900"}):(0,Cn.jsx)("span",{className:"cbp-btn-text",children:e||(0,o.__)("Copy","code-block-pro")}),er={heroicons:{label:(0,o.__)("Clipboard","code-block-pro"),Component:()=>(0,Cn.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:24,height:24},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[(0,Cn.jsx)("path",{className:"with-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),(0,Cn.jsx)("path",{className:"without-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})]})},twoSquares:{label:(0,o.__)("Two Squares","code-block-pro"),Component:()=>(0,Cn.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:24,height:24},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[(0,Cn.jsx)("path",{className:"with-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}),(0,Cn.jsx)("path",{className:"without-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"})]})},textSimple:{label:(0,o.__)("Text Simple","code-block-pro"),Component:e=>(0,Cn.jsx)(Zn,{...e})}},tr=({attributes:e})=>{var t;const{copyButtonType:n,copyButtonString:r,copyButtonStringCopied:s,useDecodeURI:a,code:i,textColor:l,bgColor:c,headerType:u}=e,d="textSimple"===n,p=d?c:l,h=d?l:void 0,{Component:m}=null!==(t=er?.[n])&&void 0!==t?t:er.heroicons;return(0,Cn.jsx)("span",{role:"button",tabIndex:0,"data-encoded":!!a||void 0,"data-code":Kn(a?encodeURIComponent(null!=i?i:""):null!=i?i:""),style:{color:null!=p?p:"inherit",display:"none",backgroundColor:h},"aria-label":null!=r?r:(0,o.__)("Copy","code-block-pro"),"data-copied-text":d?null!=s?s:(0,o.__)("Copied!","code-block-pro"):void 0,"data-has-text-button":d?n:void 0,"data-inside-header-type":d?u:void 0,"aria-live":d?"polite":void 0,className:"code-block-pro-copy-button",children:(0,Cn.jsx)(m,{text:r})})},nr=e=>{const{copyButton:t}=e;return t?(0,Cn.jsx)(tr,{attributes:e}):null},rr=window.wp.data,sr=window.wp.editPost,or=({attributes:e,setAttributes:t})=>{const[n,r]=(0,u.useState)(e.language),{previousLanguage:s,setPreviousLanguage:o}=Bt();return(0,u.useEffect)((()=>{n||t({language:s})}),[n,s,t]),(0,u.useEffect)((()=>{r(e.language)}),[e.language]),[n,e=>{t({language:e}),r(e),o(e)}]},ar=ke()(xe((e=>({bringAttentionToPanel:!1,setBringAttentionToPanel:t=>{e((()=>({bringAttentionToPanel:t})))}})),{name:"Code Block Pro Globals"})),ir=({attributes:e,setAttributes:t})=>{var n,r;const{updateThemeHistory:s}=Ae();return(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-show-copy-button",children:[(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"copy-button",label:(0,o.__)("Copy Button","code-block-pro"),help:(0,o.__)("Adds a button to copy the code","code-block-pro"),checked:e.copyButton,onChange:e=>{t({copyButton:e}),s({copyButton:e})}}),e.copyButton&&(0,Cn.jsx)("div",{className:"flex gap-2 -mt-3",children:Object.entries(er).map((([n,r])=>{const{Component:o}=r,{copyButtonType:a,bgColor:i,textColor:c}=e,u=a===n;return(0,Cn.jsx)("div",{style:{backgroundColor:i},children:(0,Cn.jsxs)("button",{id:`code-block-pro-copy-button-${n}`,type:"button",onClick:()=>{t({copyButtonType:n}),s({copyButtonType:n})},style:{color:c},"aria-current":u,className:l()("sidebar-copy-button relative border-0 flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none ring-wp-theme-500 focus:ring-wp overflow-x-auto top-0 right-0 left-auto bg-transparent border-none transition-opacity duration-200 ease-in-out leading-none z-10 p-1 opacity-90",{"ring-wp":u}),children:[(0,Cn.jsx)("span",{className:"sr-only",children:r.label}),(0,Cn.jsx)("span",{className:"pointer-events-none w-full",children:(0,Cn.jsx)(o,{color:c})})]})},n)}))}),e.copyButton&&(0,Cn.jsxs)("div",{style:{marginTop:"1rem"},children:[(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-copy-button-text",autoComplete:"off",label:(0,o.__)("Button label","code-block-pro"),placeholder:(0,o.__)("Copy","code-block-pro"),onChange:e=>{t({copyButtonString:e})},value:null!==(n=e.copyButtonString)&&void 0!==n?n:""}),"textSimple"===e.copyButtonType&&(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-copy-button-text-copied",autoComplete:"off",label:(0,o.__)("Copied Text","code-block-pro"),placeholder:(0,o.__)("Copied!","code-block-pro"),onChange:e=>{t({copyButtonStringCopied:e})},value:null!==(r=e.copyButtonStringCopied)&&void 0!==r?r:"",help:(0,o.__)("Text briefly shown after the code is copied")})]})]})},lr=({attributes:e,setAttributes:t})=>(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:(0,Cn.jsx)(Sn.PanelBody,{title:(0,o.__)("Buttons","code-block-pro"),initialOpen:!1,children:(0,Cn.jsx)(ir,{attributes:e,setAttributes:t})})}),cr=({value:e,onChange:t})=>(0,Cn.jsx)(Sn.FontSizePicker,{onChange:e=>{t(null!=e?e:".875rem")},value:e,fontSizes:[{name:"Tiny",size:".75rem",slug:"tiny"},{name:"Small",size:".875rem",slug:"small"},{name:"Normal",size:"1rem",slug:"normal"},{name:"Big",size:"1.125rem",slug:"big"}]}),ur=({value:e,onChange:t})=>(0,Cn.jsx)(Sn.FontSizePicker,{onChange:e=>{t(null!=e?e:".875rem")},value:e,fontSizes:[{name:"None",size:"1rem",slug:"none"},{name:"Tight",size:"1.25rem",slug:"tight"},{name:"Normal",size:"1.5rem",slug:"normal"},{name:"Relaxed",size:"1.625rem",slug:"relaxed"}]}),dr=({value:e,onChange:t})=>{const n={"":(0,o.__)("System Default","code-block-pro"),"Code-Pro-Comic-Mono.ttf":"Comic Mono","Code-Pro-Cozette":"Cozette","Code-Pro-Deja-Vu-Mono.ttf":"DejaVu Mono","Code-Pro-Fantasque-Sans-Mono":"Fantasque Sans Mono","Code-Pro-Fira-Code":"Fira Code","Code-Pro-Geist-Mono":"Geist Mono","Code-Pro-Hack":"Hack","Code-Pro-JetBrains-Mono":"JetBrains Mono","Code-Pro-JetBrains-Mono-NL.ttf":"JetBrains Mono (No Ligatures)","Code-Pro-Monaspace-Argon.woff":"Monaspace Argon","Code-Pro-Monaspace-Krypton.woff":"Monaspace Krypton","Code-Pro-Monaspace-Neon.woff":"Monaspace Neon","Code-Pro-Monaspace-Radon.woff":"Monaspace Radon","Code-Pro-Monaspace-Xenon.woff":"Monaspace Xenon","Code-Pro-Roboto-Mono.ttf":"Roboto Mono"};return(0,Cn.jsx)(Sn.SelectControl,{id:"code-block-pro-font-family",label:(0,o.__)("Font Family","code-block-pro"),value:e,onChange:t,options:Object.entries(n).map((([e,t])=>({label:t,value:e})))})},pr=({attributes:e,setAttributes:t})=>{var n,r,s,a,i,l;const[c,d]=(0,u.useState)(e?.editorHeight),[p,h]=(0,u.useState)(null!==(n=e?.enableMaxHeight)&&void 0!==n&&n),[m,g]=(0,u.useState)(null!==(r=e?.seeMoreString)&&void 0!==r?r:""),[f,b]=(0,u.useState)(null!==(s=e?.seeMoreAfterLine)&&void 0!==s?s:""),[y,k]=(0,u.useState)(null!==(a=e?.seeMoreTransition)&&void 0!==a&&a),[v,_]=(0,u.useState)(null!==(i=e?.seeMoreCollapse)&&void 0!==i&&i),[x,S]=(0,u.useState)(null!==(l=e?.seeMoreCollapseString)&&void 0!==l?l:""),C=(0,u.useRef)(Number(e?.editorHeight)>0),{updateThemeHistory:j}=Ae();return(0,u.useEffect)((()=>{t({editorHeight:c,seeMoreString:m,seeMoreAfterLine:f,seeMoreTransition:y,seeMoreCollapse:v,seeMoreCollapseString:x,enableMaxHeight:p})}),[c,m,f,y,v,x,t,p]),(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Max Height","code-block-pro"),initialOpen:C.current,children:[(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-editor-height",children:(0,Cn.jsx)(Sn.TextControl,{spellCheck:!1,autoComplete:"off","data-cy-cbp":"editor-height",type:"number",label:(0,o.__)("Max editor height (admin only)","code-block-pro"),help:(0,o.__)("Set to 0 to disable.","code-block-pro"),placeholder:"0",onChange:e=>{d(e)},value:c})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-see-more-enabled",children:(0,Cn.jsx)(Sn.CheckboxControl,{label:(0,o.__)("Enable frontend max height","code-block-pro"),help:(0,o.__)("Enable this, then select a specific line number below.","code-block-pro"),"data-cy":"enable-max-height",checked:p,onChange:e=>{h(e)}})}),p&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-see-more-line",children:(0,Cn.jsx)(Sn.TextControl,{"data-cy":"see-more-line",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Hide after line","code-block-pro"),help:(0,o.__)("Enter the last visible line number.","code-block-pro"),onChange:e=>{b(e)},value:f})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-see-more-transition",children:(0,Cn.jsx)(Sn.CheckboxControl,{label:(0,o.__)("Animate height transition","code-block-pro"),checked:y,onChange:e=>{k(e),j({seeMoreTransition:e})}})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-see-more-text",children:(0,Cn.jsx)(Sn.TextControl,{"data-cy":"see-more-text",spellCheck:!1,autoComplete:"off",label:(0,o.__)("See more text","code-block-pro"),placeholder:(0,o.__)("Expand","code-block-pro"),onChange:e=>{g(e),j({seeMoreString:e})},value:null!=m?m:""})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-see-more-collapse",children:(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"enable-collapse",label:(0,o.__)("Allow users to collapse","code-block-pro"),checked:v,onChange:e=>{_(e),j({seeMoreCollapse:e})}})}),v?(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-collapse-text",children:(0,Cn.jsx)(Sn.TextControl,{"data-cy":"collapse-text",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Collapse text","code-block-pro"),placeholder:(0,o.__)("Collapse","code-block-pro"),onChange:e=>{S(e),j({seeMoreCollapseString:e})},value:null!=x?x:""})}):null,(0,Cn.jsx)(qn,{attributes:e,onClick:e=>{t({seeMoreType:e}),j({seeMoreType:e})}})]})]})},hr=({name:e,attributes:t,setAttributes:n})=>{const{Slot:r}=(0,u.useMemo)((()=>(0,Sn.createSlotFill)(e)),[e]);return(0,Cn.jsx)(r,{fillProps:{attributes:t,setAttributes:n,languages:Tt,getCode:()=>Gt(t.code,t),setCode:e=>n({code:Dt(e,t)})}})},mr="/code-block-pro/v1/settings",gr=async e=>{const t=await m()({path:mr});return t?.[e]},fr={seenNotices:[],hiddenThemes:[]},br={getItem:async e=>{var t;const n=await gr(e);return JSON.stringify({version:null!==(t=n?.version)&&void 0!==t?t:0,state:n||fr})},setItem:async(e,t)=>{const{state:n,version:r}=JSON.parse(t),s={[e]:Object.assign(await gr(e)||fr,n,{version:r})};await m()({path:mr,method:"POST",data:s})},removeItem:async e=>{const t={[e]:null};await m()({path:mr,method:"POST",data:t})}},yr=ke()(Ne(xe((e=>({...fr,setSeenNotice(t){e((e=>e.seenNotices.includes(t)?e:{seenNotices:[...e.seenNotices,t]}))},toggleHiddenTheme(t){e((e=>({hiddenThemes:e.hiddenThemes.includes(t)?e.hiddenThemes.filter((e=>e!==t)):[...e.hiddenThemes,t]})))}})),{name:"Code Block Pro Settings"}),{name:"code_block_pro_settings_2",storage:Ce((()=>br))})),kr=()=>Object.entries((0,s.applyFilters)("blocks.codeBlockPro.themes",c)).map((([e,{name:t,priority:n,custom:r}])=>({name:t,slug:e,priority:n,custom:r}))),vr=()=>kr().filter((({priority:e})=>e)),_r=({search:e,setSearch:t})=>{const[n,r]=(0,u.useState)(!1);return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-filter-themes",children:[(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-search-themes",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Search themes","code-block-pro"),onChange:t,value:e}),(0,Cn.jsxs)("div",{className:"-mt-2 mb-4 flex flex-wrap gap-2",children:[(0,Cn.jsx)(Sn.Button,{"data-cy":"manage-themes",variant:"secondary",size:"small",onClick:()=>r(!0),children:(0,o.__)("Manage themes","code-block-pro")}),(0,s.applyFilters)("blocks.codeBlockPro.themesPanelButtons",null)]})]})}),n&&(0,Cn.jsx)(xr,{closeModal:()=>r(!1)})]})},xr=({closeModal:e})=>{const{hiddenThemes:t,toggleHiddenTheme:n}=yr(),r=vr();return(0,Cn.jsx)(Sn.Modal,{title:(0,o.__)("Manage Themes","code-block-pro"),onRequestClose:e,className:"code-block-pro-editor",children:(0,Cn.jsxs)("div",{id:"code-block-pro-theme-manager",className:"flex flex-col gap-4 mt-2",children:[r?.length>0?(0,Cn.jsxs)("div",{className:"flex flex-col gap-4 bg-gray-100 p-4",children:[(0,Cn.jsx)("h2",{className:"m-0 my-2 text-center",children:(0,o.__)("Priority themes","code-block-pro")}),(0,Cn.jsx)("div",{className:"md:grid gap-3 grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[...kr().filter((({custom:e})=>e)),...r].map((({name:e,slug:r})=>(0,Cn.jsx)(Sn.ToggleControl,{checked:!t.includes(r),label:e,onChange:()=>n(r)},r)))})]}):null,(0,Cn.jsx)("div",{className:l()("md:grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",{"p-4":r?.length>0}),children:kr().filter((({priority:e,custom:t})=>!e&&!t)).map((({name:e,slug:r})=>(0,Cn.jsx)(Sn.ToggleControl,{checked:!t.includes(r),label:e,onChange:()=>n(r)},r)))}),r?.length>0?null:(0,Cn.jsx)("div",{className:"font-semibold text-base",children:(0,Cn.jsx)(Sn.ExternalLink,{href:"https://code-block-pro.com/themes?utm_campaign=notice&utm_source=manage-themes",children:(0,o.__)("Get 25+ more themes here","code-block-pro")})})]})})},Sr=({id:e,theme:t,lang:n,onClick:r,code:s,fontSize:a,lineHeight:i,fontFamily:l,clampFonts:c,styles:d})=>{const[p,h]=(0,u.useState)(!1),{highlighter:m,error:g,loading:f}=Et({theme:t,lang:s?n:"c",ready:p}),[b,y]=(0,u.useState)(""),[k,v]=(0,u.useState)("#ffffff"),_=(0,u.useRef)(new IntersectionObserver((([e])=>{e.isIntersecting&&(h(!0),_.current.disconnect())}))),x="\nfloat Q_rsqrt( float number )\n{\n long i;\n float x2, y;\n const float threehalfs = 1.5F;\n\n x2 = number * 0.5F;\n y = number;\n i = * ( long * ) &y; // evil floating point bit level hacking\n i = 0x5f3759df - ( i >> 1 ); // what the frack?\n y = * ( float * ) &i;\n y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration\n// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed\n\n return y;\n}".trim();return(0,u.useEffect)((()=>{if(!m)return;if("ansi"===n&&s)return y(m.ansiToHtml(s)),void v(m.getBackgroundColor());const e=s?m.codeToHtml((0,Ht.decodeEntities)(s),{lang:n}):m.codeToHtml((0,Ht.decodeEntities)(x),{lang:"c"});y(e),v(m.getBackgroundColor())}),[m,n,s,x]),(0,Cn.jsx)("button",{id:e,type:"button",onClick:r,className:"cbp-theme-preview p-4 px-3 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto max-h-80 overflow-y-hidden",style:{backgroundColor:k,minHeight:"50px",...Object.entries(null!=d?d:{}).reduce(((e,[t,n])=>({...e,[`--shiki-${t}`]:n})),{})},children:f||g||!p?(0,Cn.jsx)("span",{id:e,ref:e=>{e&&_.current.observe(e)},style:{minHeight:"200px"},className:"flex items-center justify-center p-6 w-full",children:g?.message||(0,o.__)("Loading...","code-block-pro")}):(0,Cn.jsx)("span",{className:"pointer-events-none",style:{fontSize:xn(a,c),fontFamily:vn(l),lineHeight:xn(i,c)},dangerouslySetInnerHTML:{__html:b}})})},Cr=e=>{const{hiddenThemes:t}=yr(),n=(0,s.applyFilters)("blocks.codeBlockPro.themes",c),r=Object.entries(n).filter((([e])=>!t.includes(e))).filter((([t])=>t.includes(e.search.toLocaleLowerCase()))).map((([e,t])=>({slug:e,...t}))).sort(((e,t)=>e.priority===t.priority?0:e.priority?-1:1)).sort(((e,t)=>e.custom===t.custom?0:e.custom?-1:1)),a=vr();return(0,Cn.jsxs)("div",{className:"code-block-pro-editor",style:{tabSize:e.tabSize},children:[e.search?.length>0?(0,Cn.jsx)(Sn.BaseControl,{id:"add-on-themes",children:a?.length>0?null:(0,Cn.jsx)("div",{className:"font-semibold text-base",children:(0,Cn.jsx)(Sn.ExternalLink,{href:"https://code-block-pro.com/?utm_campaign=notice&utm_source=search",children:(0,o.__)("Get 25+ more themes here","code-block-pro")})})}):null,r.slice(0,9).map((t=>(0,Cn.jsx)(jr,{...t,...e},t.slug))),e.search?.length>0?null:(0,Cn.jsx)(Sn.BaseControl,{id:"add-on-themes",children:a?.length>0?null:(0,Cn.jsx)("div",{className:"font-semibold text-base",children:(0,Cn.jsx)(Sn.ExternalLink,{href:"https://code-block-pro.com/themes?utm_campaign=notice&utm_source=mid-themes",children:(0,o.__)("Get 25+ more themes here","code-block-pro")})})}),r.slice(9).map((t=>(0,Cn.jsx)(jr,{...t,...e},t.slug))),e.search?.length>0?null:(0,Cn.jsx)(Sn.BaseControl,{id:"add-on-themes",children:a?.length>0?null:(0,Cn.jsx)("div",{className:"font-semibold text-base",children:(0,Cn.jsx)(Sn.ExternalLink,{href:"https://code-block-pro.com/themes?utm_campaign=notice&utm_source=below-themes",children:(0,o.__)("Get 25+ more themes here","code-block-pro")})})})]})},jr=({slug:e,name:t,theme:n,language:r,code:s,fontSize:a,lineHeight:i,fontFamily:l,clampFonts:c,onClick:u,styles:d,helpUrl:p})=>(0,Cn.jsx)(Sn.BaseControl,{id:`code-block-pro-theme-${e}`,label:n===e?(0,o.sprintf)((0,o.__)("%s (current)","code-block-pro"),t):t,children:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(Sr,{id:`code-block-pro-theme-${e}`,theme:e,lang:r,fontSize:a,lineHeight:i,fontFamily:l,clampFonts:c,styles:d,onClick:()=>{u(e)},code:s}),p?.url?(0,Cn.jsx)("div",{className:"mt-2",children:(0,Cn.jsx)(Sn.ExternalLink,{href:p.url,children:p?.text||(0,o.__)("Read more","code-block-pro")})}):null]})}),Nr=({bringAttentionToThemes:e,attributes:t,setAttributes:n})=>{const{updateThemeHistory:r}=Ae(),[s,a]=(0,u.useState)(""),i=(()=>{const[e,t]=(0,u.useState)(yr.persist.hasHydrated);return(0,u.useEffect)((()=>{const e=yr.persist.onFinishHydration((()=>t(!0)));return()=>{e()}}),[]),e})();return(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Theme","code-block-pro"),initialOpen:null!=e&&e,children:[i&&(0,Cn.jsx)(_r,{search:s,setSearch:a}),i&&(0,Cn.jsx)(Cr,{...t,search:s,onClick:e=>{n({theme:e}),r({theme:e})}})]})},wr=({attributes:e,setAttributes:t})=>{var n,r,s;const a=(0,u.useRef)(null);return(0,u.useEffect)((()=>{try{It(e.lineBlurs),a.current?.querySelector("input")?.classList.remove("cbp-input-error")}catch(e){console.error(e),a.current?.querySelector("input")?.classList.add("cbp-input-error")}}),[e.lineBlurs]),(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-show-blurring",children:[(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"enable-blur",label:(0,o.__)("Line blurring","code-block-pro"),help:(0,o.__)("Blur surrounding code to focus on specific lines.","code-block-pro"),checked:null!==(n=e.enableBlurring)&&void 0!==n&&n,onChange:e=>{t({enableBlurring:e})}}),e.enableBlurring&&(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-show-blurred-lines",children:[(0,Cn.jsx)("div",{ref:a,children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-show-blurred-lines",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Focus on the following","code-block-pro"),help:(0,o.sprintf)((0,o.__)("Try %1$s or %2$s for a range.","code-block-pro"),"1,5","1,[3,5]"),onChange:e=>{t({lineBlurs:e})},value:null!==(r=e?.lineBlurs)&&void 0!==r?r:""})}),(0,Cn.jsx)(Sn.CheckboxControl,{label:(0,o.__)("Remove blur on hover","code-block-pro"),checked:null!==(s=e.removeBlurOnHover)&&void 0!==s&&s,onChange:e=>{t({removeBlurOnHover:e})}})]})]})},Lr=({attributes:e,setAttributes:t})=>{var n,r,s;const a=(0,u.useRef)(null);return(0,u.useEffect)((()=>{try{It(e.lineHighlights),a.current?.querySelector("input")?.classList.remove("cbp-input-error")}catch(e){console.error(e),a.current?.querySelector("input")?.classList.add("cbp-input-error")}}),[e.lineHighlights]),(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-show-highlighting",children:[(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"enable-highlighting",label:(0,o.__)("Line highlights","code-block-pro"),help:(0,o.__)("Highlight individual lines to bring attention to specific code.","code-block-pro"),checked:null!==(n=e.enableHighlighting)&&void 0!==n&&n,onChange:e=>{t({enableHighlighting:e})}}),e.enableHighlighting&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-show-highlighted-lines",children:(0,Cn.jsx)("div",{ref:a,children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-show-highlighted-lines",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Highlight the following","code-block-pro"),help:(0,o.sprintf)((0,o.__)("Try %1$s or %2$s for a range.","code-block-pro"),"1,5","1,[3,5]"),onChange:e=>{t({lineHighlights:e})},value:null!==(r=e?.lineHighlights)&&void 0!==r?r:""})})}),(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"enable-highlighting-hover",label:(0,o.__)("Line highlights on hover","code-block-pro"),help:(0,o.__)("Every line will be highlighted when hovered.","code-block-pro"),checked:null!==(s=e.highlightingHover)&&void 0!==s&&s,onChange:e=>{t({highlightingHover:e})}})]})},Pr=({attributes:e,setAttributes:t})=>{var n,r,s;const[i,l]=or({attributes:e,setAttributes:t}),{recentLanguages:c}=Bt(),{updateThemeHistory:d}=Ae(),{bringAttentionToPanel:p}=ar(),{headerType:h,footerType:m}=e,g=new Map(Object.entries(Tt).sort(((e,t)=>e[1].localeCompare(t[1])))),f=ge(),b=["simpleStringEnd","simpleStringStart"],y=["simpleString","pillString","stringSmall"].includes(h),k=b.includes(null!=m?m:""),v=b.includes(null!=m?m:""),_=b.includes(null!=m?m:""),[x,S]=(0,u.useState)(!1),{openGeneralSidebar:C,closeGeneralSidebar:j}=(0,rr.useDispatch)(sr.store);return(0,u.useEffect)((()=>{p&&j("edit-post/block").then((()=>{S(p),C("edit-post/block")}))}),[p,j,C]),f?(0,Cn.jsxs)(a.InspectorControls,{children:[(0,Cn.jsx)(hr,{name:"CodeBlockPro.Sidebar.Start",attributes:e,setAttributes:t}),(0,Cn.jsx)(Sn.PanelBody,{title:(0,o.__)("Line Settings","code-block-pro"),initialOpen:!1,children:(0,Cn.jsxs)("div",{className:"code-block-pro-editor",children:[(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-show-line-numbers",children:[(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"show-line-numbers",label:(0,o.__)("Line numbers","code-block-pro"),help:(0,o.__)("Enable line numbers and set a starting number.","code-block-pro"),checked:e.lineNumbers,onChange:e=>{t({lineNumbers:e}),d({lineNumbers:e})}}),e.lineNumbers&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-line-number-start",children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-line-number-start",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Start from","code-block-pro"),onChange:e=>{t({startingLineNumber:e})},value:e.startingLineNumber})})]}),(0,Cn.jsx)(Lr,{attributes:e,setAttributes:t}),(0,Cn.jsx)(wr,{attributes:e,setAttributes:t})]})}),(0,Cn.jsx)(Nr,{bringAttentionToThemes:"theme-select"===x,attributes:e,setAttributes:t}),(0,Cn.jsx)(Sn.PanelBody,{title:(0,o.__)("Language","code-block-pro"),initialOpen:"language-select"===x,children:(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-language",children:[(0,Cn.jsx)(Sn.SelectControl,{id:"code-block-pro-language",label:(0,o.__)("Code Language","code-block-pro"),"data-cy-cbp":"language-select",value:i,onChange:e=>l(e),help:"ansi"===i?(0,o.__)("Some code themes may not render ANSI correctly. Control sequences render only on the front.","code-block-pro"):null,options:[...g.entries()].map((([e,t])=>({label:t.replace("ANSI","ANSI (experimental)"),value:e})))}),c?.length>0?(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)("span",{className:"mb-2 block",children:(0,o.__)("Recently Used","code-block-pro")}),(0,Cn.jsx)("div",{className:"flex flex-col gap-1",children:c?.map((e=>{var t;return(0,Cn.jsx)(Sn.Button,{variant:"link",onClick:()=>l(e),children:null!==(t=Tt[e])&&void 0!==t?t:e},e)}))})]}):null]})})}),(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Header Type","code-block-pro"),initialOpen:!1,children:[y&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-header-text",children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-header-text",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Header Text","code-block-pro"),placeholder:Tt[i],onChange:e=>{t({headerString:e})},value:null!==(n=e.headerString)&&void 0!==n?n:""})}),(0,Cn.jsx)(Gn,{attributes:e,onClick:e=>{t({headerType:e}),d({headerType:e})}})]}),(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Footer Type","code-block-pro"),initialOpen:!1,children:[k&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-footer-text",children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-footer-text",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Footer Text","code-block-pro"),placeholder:Tt[i],onChange:e=>{t({footerString:e})},value:null!==(r=e.footerString)&&void 0!==r?r:""})}),v&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-footer-link",children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-footer-link",spellCheck:!1,type:"url",autoComplete:"off",label:(0,o.__)("Footer Link","code-block-pro"),placeholder:"https://example.com",help:(0,o.__)("Leave blank to disable","code-block-pro"),onChange:e=>{t({footerLink:e})},value:null!==(s=e.footerLink)&&void 0!==s?s:""})}),_&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-footer-link-target",children:(0,Cn.jsx)(Sn.CheckboxControl,{id:"code-block-pro-footer-link-target",label:(0,o.__)("Open in new tab?","code-block-pro"),checked:e.footerLinkTarget,onChange:e=>{t({footerLinkTarget:e}),d({footerLinkTarget:e})}})}),(0,Cn.jsx)(An,{attributes:e,onClick:e=>{t({footerType:e}),d({footerType:e})}})]}),(0,Cn.jsx)(hr,{name:"CodeBlockPro.Sidebar.Middle",attributes:e,setAttributes:t}),(0,Cn.jsx)(lr,{attributes:e,setAttributes:t}),(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Font Styling","code-block-pro"),initialOpen:!1,children:[(0,Cn.jsxs)("div",{className:"code-block-pro-editor","data-cy":"font-size-select",children:[(0,Cn.jsx)("h2",{className:"m-0",children:(0,o.__)("Font Size","code-block-pro")}),(0,Cn.jsx)(cr,{value:e.fontSize,onChange:e=>{t({fontSize:e}),d({fontSize:e})}})]}),(0,Cn.jsxs)("div",{className:"code-block-pro-editor","data-cy":"font-line-height-select",children:[(0,Cn.jsx)("h2",{className:"m-0",children:(0,o.__)("Line Height","code-block-pro")}),(0,Cn.jsx)(ur,{value:e.lineHeight,onChange:e=>{t({lineHeight:e}),d({lineHeight:e})}})]}),(0,Cn.jsx)("div",{className:"code-block-pro-editor","data-cy":"font-family-select",children:(0,Cn.jsx)(dr,{value:e.fontFamily,onChange:e=>{t({fontFamily:e}),d({fontFamily:e})}})}),(0,Cn.jsx)("div",{className:"code-block-pro-editor","data-cy":"clamp-fonts",children:(0,Cn.jsx)("div",{className:"mt-6",children:(0,Cn.jsx)(Sn.CheckboxControl,{label:(0,o.__)("Clamp Font Sizes","code-block-pro"),help:(0,o.__)("Check this if your font sizes are unusually large or tiny.","code-block-pro"),checked:e.clampFonts,onChange:e=>{t({clampFonts:e}),d({clampFonts:e})}})})})]}),(0,Cn.jsx)(pr,{attributes:e,setAttributes:t}),(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Extra Settings","code-block-pro"),initialOpen:!1,children:[(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-disable-padding",children:(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"disable-padding",label:(0,o.__)("Disable Padding","code-block-pro"),help:(0,o.__)("This is useful if you pick a theme that matches your background color, and want the code to line up to the edge of your content. You may need to add your own padding with CSS.","code-block-pro"),checked:e.disablePadding,onChange:e=>{t({disablePadding:e}),d({disablePadding:e})}})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-decode-uri",children:(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"use-decode-uri",label:(0,o.__)("Encode special characters","code-block-pro"),help:(0,o.__)("Select this to allow HTML entities such as < and > and others to be displayed. You may need to re-add the code after changing this","code-block-pro"),checked:e.useDecodeURI,onChange:e=>{t({useDecodeURI:e}),d({useDecodeURI:e})}})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-escape-shortcodes",children:(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"use-escape-shortcodes",label:(0,o.__)("Escape WordPress shortcodes","code-block-pro"),help:(0,o.__)("Select this to prevent php shortcodes from executing.","code-block-pro"),checked:e.useEscapeShortCodes,onChange:e=>{t({useEscapeShortCodes:e}),d({useEscapeShortCodes:e})}})}),(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-editor-tab-size",children:[(0,Cn.jsx)(Sn.TextControl,{spellCheck:!1,autoComplete:"off",type:"number","data-cy":"editor-tab-size",label:(0,o.__)("Editor tab size","code-block-pro"),help:(0,o.__)("The number of spaces to insert when pressing tab key.","code-block-pro"),value:e.tabSize,onChange:e=>{const n=e?Number(e):void 0;t({tabSize:n}),d({tabSize:n})}}),(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"use-tabs",label:(0,o.__)("Use real tabs","code-block-pro"),help:(0,o.__)("Inserts an actual tab character instead of a space. The width defined above.","code-block-pro"),checked:e.useTabs,onChange:e=>{t({useTabs:e}),d({useTabs:e})}})]})]}),(0,Cn.jsx)(hr,{name:"CodeBlockPro.Sidebar.End",attributes:e,setAttributes:t})]}):(0,Cn.jsx)(a.InspectorControls,{children:f?null:(0,Cn.jsx)(jn,{})})},Tr=({attributes:e,setAttributes:t})=>{var n,r;const[i]=or({attributes:e,setAttributes:t}),{theme:l,bgColor:u,textColor:d}=e,p=(0,s.applyFilters)("blocks.codeBlockPro.themes",c),{setBringAttentionToPanel:h}=ar();return void 0===ge()?null:(0,Cn.jsxs)(a.BlockControls,{children:[(0,Cn.jsx)(Sn.ToolbarGroup,{className:"code-block-pro-editor",children:(0,Cn.jsx)(Sn.ToolbarButton,{icon:()=>{var e;return(null!==(e=Tt[i])&&void 0!==e?e:i)?.replace("ANSI","ANSI (experimental)")},onClick:()=>h("language-select"),label:(0,o.__)("Press to open sidebar panel","code-block-pro"),style:{width:"auto"}})}),p[l]?.name&&(0,Cn.jsx)(Sn.ToolbarGroup,{className:"code-block-pro-editor",children:(0,Cn.jsx)(Sn.ToolbarButton,{icon:()=>p[l]?.name,onClick:()=>h("theme-select"),label:(0,o.__)("Press to open sidebar panel","code-block-pro"),style:{width:"auto"},children:(0,Cn.jsxs)("span",{className:"flex mx-2",children:[(0,Cn.jsx)("span",{style:{backgroundColor:null!==(n=p[l]?.styles?.["color-background"])&&void 0!==n?n:u},className:"w-3 h-3 border border-gray-400 border-solid border-1 rounded-full inline-block"}),(0,Cn.jsx)("span",{style:{backgroundColor:null!==(r=p[l]?.styles?.["color-text"])&&void 0!==r?r:d},className:"w-3 h-3 border border-gray-400 border-solid border-1 rounded-full inline-block transform -translate-x-1"})]})})})]})},Ar=({attributes:e,setAttributes:t})=>{const{clampFonts:n,disablePadding:r,enableBlurring:o,enableHighlighting:i,footerType:u,fontSize:d,fontFamily:p,highestLineNumber:h,highlightingHover:m,lineHeight:g,lineHighlightColor:f,lineNumbers:b,lineNumbersWidth:y,removeBlurOnHover:k,startingLineNumber:v,tabSize:_,theme:x,useTabs:S}=e,C=(0,s.applyFilters)("blocks.codeBlockPro.themes",c),j=C[x]?.styles;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(Pr,{attributes:e,setAttributes:t}),(0,Cn.jsx)(Tr,{attributes:e,setAttributes:t}),(0,Cn.jsxs)("div",{...(0,a.useBlockProps)({className:l()("code-block-pro-editor",{"padding-disabled":r,"padding-bottom-disabled":u&&"none"!==u,"cbp-has-line-numbers":b,"cbp-blur-enabled":o,"cbp-unblur-on-hover":k,"cbp-highlight-hover":m}),style:{fontSize:xn(d,n),"--cbp-line-number-color":b?bn(e):void 0,"--cbp-line-number-start":Number(v)>1?v:void 0,"--cbp-line-number-width":h?`calc(${String(h).length} * ${d})`:y?`${y}px`:void 0,"--cbp-line-highlight-color":i||m?f:void 0,"--cbp-line-height":g,tabSize:void 0===S?void 0:_,fontFamily:vn(p),lineHeight:xn(g,n),...Object.entries(null!=j?j:{}).reduce(((e,[t,n])=>({...e,[`--shiki-${t}`]:n})),{}),...(0,s.applyFilters)("blocks.codeBlockPro.additionalEditorAttributes",{},e)}}),children:[(0,Cn.jsx)($n,{...e}),(0,Cn.jsx)(nr,{...e}),(0,Cn.jsx)(Nn,{attributes:e,setAttributes:t}),(0,Cn.jsx)(Rn,{...e}),(0,Cn.jsx)(Vn,{...e})]})]})},Rr=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"kevinbatdorf/code-block-pro","version":"1.13.0","title":"Code Block Pro - Beautiful syntax highlighting","category":"common","description":"Code highlighting powered by the VS Code engine. No overhead.","attributes":{"code":{"type":"string"},"codeHTML":{"type":"string"},"language":{"type":"string"},"theme":{"type":"string"},"align":{"type":"string"},"bgColor":{"type":"string","default":"#282a37"},"textColor":{"type":"string","default":"#f8f8f2"},"fontSize":{"type":"string"},"fontFamily":{"type":"string"},"lineHeight":{"type":"string"},"lineNumbers":{"type":"boolean"},"clampFonts":{"type":"boolean"},"editorHeight":{"type":"string"},"headerType":{"type":"string"},"footerType":{"type":"string"},"headerString":{"type":"string"},"disablePadding":{"type":"boolean"},"footerString":{"type":"string"},"footerLink":{"type":"string"},"enableMaxHeight":{"type":"boolean"},"seeMoreType":{"type":"string"},"seeMoreString":{"type":"string"},"seeMoreAfterLine":{"type":"string"},"seeMoreTransition":{"type":"boolean"},"seeMoreCollapse":{"type":"boolean"},"seeMoreCollapseString":{"type":"string"},"footerLinkTarget":{"type":"boolean"},"startingLineNumber":{"type":"number","default":1},"lineNumbersWidth":{"type":"number"},"enableHighlighting":{"type":"boolean"},"highlightingHover":{"type":"boolean"},"lineHighlights":{"type":"string"},"lineHighlightColor":{"type":"string"},"enableBlurring":{"type":"boolean"},"lineBlurs":{"type":"string"},"removeBlurOnHover":{"type":"boolean"},"frame":{"type":"boolean"},"renderType":{"type":"string","default":"code"},"label":{"type":"string","default":""},"copyButton":{"type":"boolean"},"copyButtonType":{"type":"string"},"copyButtonString":{"type":"string"},"copyButtonStringCopied":{"type":"string"},"tabSize":{"type":"number"},"useTabs":{"type":"boolean"}},"supports":{"html":false,"align":["wide","full"]},"textdomain":"code-block-pro","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./front/front.js"}'),Or=()=>(0,Cn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:24,height:24},fill:"none",viewBox:"0 0 24 24",stroke:"#1e1e1e",strokeWidth:"2",children:(0,Cn.jsx)("path",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),Er=({attributes:e})=>{const{clampFonts:t,code:n,codeHTML:r,disablePadding:o,enableBlurring:i,enableHighlighting:u,footerType:d,fontSize:p,fontFamily:h,highestLineNumber:m,highlightingHover:g,lineHeight:f,lineHighlightColor:b,lineNumbers:y,lineNumbersWidth:k,removeBlurOnHover:v,startingLineNumber:_,tabSize:x,theme:S,useTabs:C}=e,j=(0,s.applyFilters)("blocks.codeBlockPro.themes",c),N=j[S]?.styles;return(0,Cn.jsx)("div",{...a.useBlockProps.save({className:l()({"padding-disabled":o,"padding-bottom-disabled":d&&"none"!==d,"cbp-has-line-numbers":y,"cbp-blur-enabled":i,"cbp-unblur-on-hover":v,"cbp-highlight-hover":g})}),"data-code-block-pro-font-family":h,style:{fontSize:xn(p,t),fontFamily:vn(h),"--cbp-line-number-color":y?bn(e):void 0,"--cbp-line-number-start":Number(_)>1?_:void 0,"--cbp-line-number-width":m?`calc(${String(m).length} * ${(e=>"Code-Pro-Fantasque-Sans-Mono"===e?.5:.6)(h)} * ${p})`:k?`${k}px`:void 0,"--cbp-line-highlight-color":u||g?b:void 0,lineHeight:xn(f,t),"--cbp-tab-width":void 0===C?void 0:String(x),tabSize:void 0===C?void 0:"var(--cbp-tab-width, 2)",...Object.entries(null!=N?N:{}).reduce(((e,[t,n])=>({...e,[`--shiki-${t}`]:n})),{}),...(0,s.applyFilters)("blocks.codeBlockPro.additionalOutputAttributes",{},e)},children:n?.length>0?(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)($n,{...e}),(0,Cn.jsx)(nr,{...e}),(0,Cn.jsx)(a.RichText.Content,{value:r}),(0,Cn.jsx)(Rn,{...e}),(0,Cn.jsx)(Vn,{...e})]}):null})};(0,r.registerBlockType)(Rr.name,{...Rr,icon:Or,attributes:{code:{type:"string"},codeHTML:{type:"string"},language:{type:"string"},theme:{type:"string"},align:{type:"string"},bgColor:{type:"string",default:"#282a37"},textColor:{type:"string",default:"#f8f8f2"},fontSize:{type:"string"},fontFamily:{type:"string"},lineHeight:{type:"string"},clampFonts:{type:"boolean"},editorHeight:{type:"string"},lineNumbers:{type:"boolean"},headerType:{type:"string"},headerString:{type:"string"},disablePadding:{type:"boolean"},footerType:{type:"string"},footerString:{type:"string"},footerLink:{type:"string"},footerLinkTarget:{type:"boolean"},enableMaxHeight:{type:"boolean"},seeMoreType:{type:"string"},seeMoreString:{type:"string"},seeMoreAfterLine:{type:"string"},seeMoreTransition:{type:"boolean"},seeMoreCollapse:{type:"boolean"},seeMoreCollapseString:{type:"string"},startingLineNumber:{type:"string"},lineNumbersWidth:{type:"number"},highestLineNumber:{type:"number"},enableHighlighting:{type:"boolean"},highlightingHover:{type:"boolean"},lineHighlights:{type:"string"},lineHighlightColor:{type:"string"},enableBlurring:{type:"boolean"},lineBlurs:{type:"string"},removeBlurOnHover:{type:"boolean"},frame:{type:"boolean"},renderType:{type:"string",default:"code"},label:{type:"string",default:""},copyButton:{type:"boolean"},copyButtonType:{type:"string"},copyButtonString:{type:"string",default:(0,o.__)("Copy","code-block-pro")},copyButtonStringCopied:{type:"string",default:(0,o.__)("Copied!","code-block-pro")},useDecodeURI:{type:"boolean",default:!1},useEscapeShortCodes:{type:"boolean",default:!1},tabSize:{type:"number",default:2},useTabs:{type:"boolean"}},supports:{html:!1,align:["wide","full"]},title:(0,o.__)("Code Pro","code-block-pro"),edit:({attributes:e,setAttributes:t})=>(0,Cn.jsx)(Ar,{attributes:e,setAttributes:t}),save:({attributes:e})=>(0,Cn.jsx)(Er,{attributes:e}),transforms:{from:[{type:"block",blocks:["core/code","syntaxhighlighter/code"],transform:e=>{const{content:t,language:n}=e;return(0,r.createBlock)(Rr.name,{code:t?(0,Ft.escapeHTML)((e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value})(t)):void 0,language:Pt(n)})}}],to:[{type:"block",blocks:["core/code"],transform:e=>{const{code:t}=e;return(0,r.createBlock)("core/code",{content:t})}}]}}),(0,s.addFilter)("editor.BlockEdit",Rr.name,(e=>t=>((e,t)=>{const{attributes:n,clientId:s}=t,{previousLanguage:i}=Bt(),l=(0,rr.useSelect)((e=>{const t=e(a.store).getBlock(s);return["core/code","syntaxhighlighter/code"].includes(t.name)}),[s]),{replaceBlock:c}=(0,rr.useDispatch)(a.store),u=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value};return l?(0,Cn.jsxs)(Cn.Fragment,{children:[e&&(0,Cn.jsx)(e,{...t}),(0,Cn.jsx)(a.BlockControls,{children:(0,Cn.jsx)(Sn.ToolbarGroup,{children:(0,Cn.jsx)(Sn.ToolbarButton,{icon:Or,label:(0,o.__)("Convert to Code Pro","code-block-pro"),onClick:()=>{var e;const t=(0,r.createBlock)(Rr.name,{code:n?.content?u(n.content):void 0,language:null!==(e=Pt(n?.language))&&void 0!==e?e:i});c(s,[t])}})})})]}):(0,Cn.jsx)(e,{...t})})(e,t)))},485:()=>{},486:function(e){var t;t=()=>{return e={770:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultDebugCall=t.createOnigScanner=t.createOnigString=t.loadWASM=t.OnigScanner=t.OnigString=void 0;const s=r(n(418));let o=null,a=!1;class i{static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){const s=e.charCodeAt(n);let o=s,a=!1;if(s>=55296&&s<=56319&&n+1<r){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(o=65536+(s-55296<<10)|t-56320,a=!0)}t+=o<=127?1:o<=2047?2:o<=65535?3:4,a&&n++}return t}constructor(e){const t=e.length,n=i._utf8ByteLength(e),r=n!==t,s=r?new Uint32Array(t+1):null;r&&(s[t]=n);const o=r?new Uint32Array(n+1):null;r&&(o[n]=t);const a=new Uint8Array(n);let l=0;for(let n=0;n<t;n++){const i=e.charCodeAt(n);let c=i,u=!1;if(i>=55296&&i<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=65536+(i-55296<<10)|t-56320,u=!0)}r&&(s[n]=l,u&&(s[n+1]=l),c<=127?o[l+0]=n:c<=2047?(o[l+0]=n,o[l+1]=n):c<=65535?(o[l+0]=n,o[l+1]=n,o[l+2]=n):(o[l+0]=n,o[l+1]=n,o[l+2]=n,o[l+3]=n)),c<=127?a[l++]=c:c<=2047?(a[l++]=192|(1984&c)>>>6,a[l++]=128|(63&c)>>>0):c<=65535?(a[l++]=224|(61440&c)>>>12,a[l++]=128|(4032&c)>>>6,a[l++]=128|(63&c)>>>0):(a[l++]=240|(1835008&c)>>>18,a[l++]=128|(258048&c)>>>12,a[l++]=128|(4032&c)>>>6,a[l++]=128|(63&c)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class l{constructor(e){if(this.id=++l.LAST_ID,!o)throw new Error("Must invoke loadWASM first.");this._onigBinding=o,this.content=e;const t=new i(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!l._sharedPtrInUse?(l._sharedPtr||(l._sharedPtr=o._omalloc(1e4)),l._sharedPtrInUse=!0,o.HEAPU8.set(t.utf8Value,l._sharedPtr),this.ptr=l._sharedPtr):this.ptr=t.createString(o)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===l._sharedPtr?l._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}t.OnigString=l,l.LAST_ID=0,l._sharedPtr=0,l._sharedPtrInUse=!1;class c{constructor(e){if(!o)throw new Error("Must invoke loadWASM first.");const t=[],n=[];for(let r=0,s=e.length;r<s;r++){const s=new i(e[r]);t[r]=s.createString(o),n[r]=s.utf8Length}const r=o._omalloc(4*e.length);o.HEAPU32.set(t,r/4);const s=o._omalloc(4*e.length);o.HEAPU32.set(n,s/4);const a=o._createOnigScanner(r,s,e.length);for(let n=0,r=e.length;n<r;n++)o._ofree(t[n]);o._ofree(s),o._ofree(r),0===a&&function(e){throw new Error(e.UTF8ToString(e._getLastOnigError()))}(o),this._onigBinding=o,this._ptr=a}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=a,s=0;if("number"==typeof n?(8&n&&(r=!0),s=n):"boolean"==typeof n&&(r=n),"string"==typeof e){e=new l(e);const n=this._findNextMatchSync(e,t,r,s);return e.dispose(),n}return this._findNextMatchSync(e,t,r,s)}_findNextMatchSync(e,t,n,r){const s=this._onigBinding;let o;if(o=n?s._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r):s._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r),0===o)return null;const a=s.HEAPU32;let i=o/4;const l=a[i++],c=a[i++];let u=[];for(let t=0;t<c;t++){const n=e.convertUtf8OffsetToUtf16(a[i++]),r=e.convertUtf8OffsetToUtf16(a[i++]);u[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:u}}}t.OnigScanner=c;let u=!1,d=null;t.loadWASM=function(e){if(u)return d;let t,n,r,a;if(u=!0,function(e){return"function"==typeof e.instantiator}(e))t=e.instantiator,n=e.print;else{let r;!function(e){return void 0!==e.data}(e)?r=e:(r=e.data,n=e.print),t=function(e){return"undefined"!=typeof Response&&e instanceof Response}(r)?"function"==typeof WebAssembly.instantiateStreaming?function(e){return t=>WebAssembly.instantiateStreaming(e,t)}(r):function(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(r):function(e){return t=>WebAssembly.instantiate(e,t)}(r)}return d=new Promise(((e,t)=>{r=e,a=t})),function(e,t,n,r){(0,s.default)({print:t,instantiateWasm:(t,n)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>n(e.instance)),r),{}}}).then((e=>{o=e,n()}))}(t,n,r,a),d},t.createOnigString=function(e){return new l(e)},t.createOnigScanner=function(e){return new c(e)},t.setDefaultDebugCall=function(e){a=e}},418:e=>{var t=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,n,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,r){t=e,n=r}));var s,o=Object.assign({},r),a=[];s=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),function(e){e||L(void 0)}("object"==typeof t),t)},"undefined"!=typeof scriptArgs?a=scriptArgs:void 0!==arguments&&(a=arguments),"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var i,l,c=r.print||console.log.bind(console),u=r.printErr||console.warn.bind(console);Object.assign(r,o),o=null,r.arguments&&(a=r.arguments),r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(i=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var d,p,h,m=!1,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,n){for(var r=t+n,s=t;e[s]&&!(s>=r);)++s;if(s-t>16&&e.buffer&&g)return g.decode(e.subarray(t,s));for(var o="";t<s;){var a=e[t++];if(128&a){var i=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if((a=224==(240&a)?(15&a)<<12|i<<6|l:(7&a)<<18|i<<12|l<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|i)}else o+=String.fromCharCode(a)}return o}function b(e){d=e,r.HEAP8=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU8=p=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=h=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}r.INITIAL_MEMORY;var y=[],k=[],v=[];function _(e){y.unshift(e)}function x(e){v.unshift(e)}var S,C,j=0,N=null,w=null;function L(e){r.onAbort&&r.onAbort(e),u(e="Aborted("+e+")"),m=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function P(e){return e.startsWith("data:application/octet-stream;base64,")}function T(e){try{if(e==S&&i)return new Uint8Array(i);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}catch(e){L(e)}}function A(e){for(;e.length>0;)e.shift()(r)}function R(e){try{return l.grow(e-d.byteLength+65535>>>16),b(l.buffer),1}catch(e){}}P(S="onig.wasm")||(S=function(e){return r.locateFile?r.locateFile(e,""):""+e}(S)),C="undefined"!=typeof dateNow?dateNow:()=>performance.now();var O=[null,[],[]];function E(e,t){var n=O[e];0===t||10===t?((1===e?c:u)(f(n,0)),n.length=0):n.push(t)}var B,M={emscripten_get_now:C,emscripten_memcpy_big:function(e,t,n){p.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){var t,n=p.length,r=2147483648;if((e>>>=0)>r)return!1;for(var s=1;s<=4;s*=2){var o=n*(1+.2/s);if(o=Math.min(o,e+100663296),R(Math.min(r,(t=Math.max(e,o))+(65536-t%65536)%65536)))return!0}return!1},fd_write:function(e,t,n,r){for(var s=0,o=0;o<n;o++){var a=h[t>>2],i=h[t+4>>2];t+=8;for(var l=0;l<i;l++)E(e,p[a+l]);s+=i}return h[r>>2]=s,0}};function I(e){function n(){B||(B=!0,r.calledRun=!0,m||(A(k),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)x(r.postRun.shift());A(v)}()))}e=e||a,j>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)_(r.preRun.shift());A(y)}(),j>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(function(){var e={env:M,wasi_snapshot_preview1:M};function t(e,t){var n=e.exports;r.asm=n,b((l=r.asm.memory).buffer),r.asm.__indirect_function_table,function(e){k.unshift(e)}(r.asm.__wasm_call_ctors),function(){if(j--,r.monitorRunDependencies&&r.monitorRunDependencies(j),0==j&&(null!==N&&(clearInterval(N),N=null),w)){var e=w;w=null,e()}}()}function s(e){t(e.instance)}function o(t){return Promise.resolve().then((function(){return T(S)})).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){u("failed to asynchronously prepare wasm: "+e),L(e)}))}if(j++,r.monitorRunDependencies&&r.monitorRunDependencies(j),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){u("Module.instantiateWasm callback failed with error: "+e),n(e)}(i||"function"!=typeof WebAssembly.instantiateStreaming||P(S)||"function"!=typeof fetch?o(s):fetch(S,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return u("wasm streaming compile failed: "+e),u("falling back to ArrayBuffer instantiation"),o(s)}))}))).catch(n)}(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r.___errno_location=function(){return(r.___errno_location=r.asm.__errno_location).apply(null,arguments)},r._omalloc=function(){return(r._omalloc=r.asm.omalloc).apply(null,arguments)},r._ofree=function(){return(r._ofree=r.asm.ofree).apply(null,arguments)},r._getLastOnigError=function(){return(r._getLastOnigError=r.asm.getLastOnigError).apply(null,arguments)},r._createOnigScanner=function(){return(r._createOnigScanner=r.asm.createOnigScanner).apply(null,arguments)},r._freeOnigScanner=function(){return(r._freeOnigScanner=r.asm.freeOnigScanner).apply(null,arguments)},r._findNextOnigScannerMatch=function(){return(r._findNextOnigScannerMatch=r.asm.findNextOnigScannerMatch).apply(null,arguments)},r._findNextOnigScannerMatchDbg=function(){return(r._findNextOnigScannerMatchDbg=r.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},r.stackSave=function(){return(r.stackSave=r.asm.stackSave).apply(null,arguments)},r.stackRestore=function(){return(r.stackRestore=r.asm.stackRestore).apply(null,arguments)},r.stackAlloc=function(){return(r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r.UTF8ToString=function(e,t){return e?f(p,e,t):""},w=function e(){B||I(),B||(w=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return I(),e.ready});e.exports=t}},t={},function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(770);var e,t},e.exports=t()},493:(e,t,n)=>{"use strict";var r=n(609),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,i=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!s(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),s=r[0].inst,u=r[1];return i((function(){s.value=n,s.getSnapshot=t,c(s)&&u({inst:s})}),[e,n,t]),a((function(){return c(s)&&u({inst:s}),e((function(){c(s)&&u({inst:s})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},609:e=>{"use strict";e.exports=window.React},673:()=>{},888:(e,t,n)=>{"use strict";e.exports=n(493)},942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(s.default=s,e.exports=s):void 0===(n=function(){return s}.apply(t,[]))||(e.exports=n)}()}},n={};function r(e){var s=n[e];if(void 0!==s)return s.exports;var o=n[e]={exports:{}};return t[e].call(o.exports,o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,n,s,o)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,s,o]=e[u],i=!0,l=0;l<n.length;l++)(!1&o||a>=o)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(i=!1,o<a&&(a=o));if(i){e.splice(u--,1);var c=s();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,s,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var s,o,[a,i,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(s in i)r.o(i,s)&&(r.m[s]=i[s]);if(l)var u=l(r)}for(t&&t(n);c<a.length;c++)o=a[c],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return r.O(u)},n=globalThis.webpackChunkcode_block_pro=globalThis.webpackChunkcode_block_pro||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var s=r.O(void 0,[350],(()=>r(347)));s=r.O(s)})(); |
|
1
|
+(()=>{var e,t={739:(e,t,n)=>{"use strict";const r=window.wp.element,a=window.wp.blockEditor,o=window.wp.blocks,s=window.wp.hooks,i=window.wp.i18n,c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"kevinbatdorf/code-block-pro","version":"1.2.0","title":"Code Block Pro","category":"common","description":"Code highlighting powered by the VS Code engine","attributes":{"code":{"type":"string"},"codeHTML":{"type":"string"},"language":{"type":"string"},"theme":{"type":"string"},"align":{"type":"string","default":"none"},"bgColor":{"type":"string","default":"#282a37"},"textColor":{"type":"string","default":"#f8f8f2"},"lineNumbers":{"type":"boolean"},"startingLineNumber":{"type":"number","default":1},"frame":{"type":"boolean"},"renderType":{"type":"string","default":"code"},"label":{"type":"string","default":""},"copyButton":{"type":"boolean"}},"supports":{"html":false,"align":["full","wide"]},"textdomain":"code-block-pro","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./front/front.js"}');var u=n(460),l=n.n(u),p=n(930),h=n(190);const d=[{id:"abap",scopeName:"source.abap",path:"abap.tmLanguage.json",samplePath:"abap.sample"},{id:"actionscript-3",scopeName:"source.actionscript.3",path:"actionscript-3.tmLanguage.json",samplePath:"actionscript-3.sample"},{id:"ada",scopeName:"source.ada",path:"ada.tmLanguage.json",samplePath:"ada.sample"},{id:"apache",scopeName:"source.apacheconf",path:"apache.tmLanguage.json"},{id:"apex",scopeName:"source.apex",path:"apex.tmLanguage.json",samplePath:"apex.sample"},{id:"apl",scopeName:"source.apl",path:"apl.tmLanguage.json",embeddedLangs:["html","xml","css","javascript","json"]},{id:"applescript",scopeName:"source.applescript",path:"applescript.tmLanguage.json",samplePath:"applescript.sample"},{id:"asm",scopeName:"source.asm.x86_64",path:"asm.tmLanguage.json",samplePath:"asm.sample"},{id:"astro",scopeName:"source.astro",path:"astro.tmLanguage.json",samplePath:"astro.sample",embeddedLangs:["json","javascript","typescript","tsx","css","less","sass","scss","stylus"]},{id:"awk",scopeName:"source.awk",path:"awk.tmLanguage.json",samplePath:"awk.sample"},{id:"ballerina",scopeName:"source.ballerina",path:"ballerina.tmLanguage.json",samplePath:"ballerina.sample"},{id:"bat",scopeName:"source.batchfile",path:"bat.tmLanguage.json",samplePath:"bat.sample",aliases:["batch"]},{id:"berry",scopeName:"source.berry",path:"berry.tmLanguage.json",samplePath:"berry.sample",aliases:["be"]},{id:"bibtex",scopeName:"text.bibtex",path:"bibtex.tmLanguage.json"},{id:"bicep",scopeName:"source.bicep",path:"bicep.tmLanguage.json",samplePath:"bicep.sample"},{id:"blade",scopeName:"text.html.php.blade",path:"blade.tmLanguage.json",samplePath:"blade.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"c",scopeName:"source.c",path:"c.tmLanguage.json",samplePath:"c.sample"},{id:"cadence",scopeName:"source.cadence",path:"cadence.tmLanguage.json",samplePath:"cadence.sample",aliases:["cdc"]},{id:"clarity",scopeName:"source.clar",path:"clarity.tmLanguage.json",samplePath:"clarity.sample"},{id:"clojure",scopeName:"source.clojure",path:"clojure.tmLanguage.json",samplePath:"clojure.sample",aliases:["clj"]},{id:"cmake",scopeName:"source.cmake",path:"cmake.tmLanguage.json",samplePath:"cmake.sample"},{id:"cobol",scopeName:"source.cobol",path:"cobol.tmLanguage.json",samplePath:"cobol.sample",embeddedLangs:["sql","html","java"]},{id:"codeql",scopeName:"source.ql",path:"codeql.tmLanguage.json",samplePath:"codeql.sample",aliases:["ql"]},{id:"coffee",scopeName:"source.coffee",path:"coffee.tmLanguage.json",samplePath:"coffee.sample",embeddedLangs:["javascript"]},{id:"cpp",scopeName:"source.cpp",path:"cpp.tmLanguage.json",samplePath:"cpp.sample",embeddedLangs:["glsl","sql"]},{id:"crystal",scopeName:"source.crystal",path:"crystal.tmLanguage.json",samplePath:"crystal.sample",embeddedLangs:["html","sql","css","c","javascript","shellscript"]},{id:"csharp",scopeName:"source.cs",path:"csharp.tmLanguage.json",samplePath:"csharp.sample",aliases:["c#"]},{id:"css",scopeName:"source.css",path:"css.tmLanguage.json",samplePath:"css.sample"},{id:"cue",scopeName:"source.cue",path:"cue.tmLanguage.json",samplePath:"cue.sample"},{id:"d",scopeName:"source.d",path:"d.tmLanguage.json",samplePath:"d.sample"},{id:"dart",scopeName:"source.dart",path:"dart.tmLanguage.json",samplePath:"dart.sample"},{id:"diff",scopeName:"source.diff",path:"diff.tmLanguage.json",samplePath:"diff.sample"},{id:"docker",scopeName:"source.dockerfile",path:"docker.tmLanguage.json",samplePath:"docker.sample"},{id:"dream-maker",scopeName:"source.dm",path:"dream-maker.tmLanguage.json"},{id:"elixir",scopeName:"source.elixir",path:"elixir.tmLanguage.json",samplePath:"elixir.sample",embeddedLangs:["html"]},{id:"elm",scopeName:"source.elm",path:"elm.tmLanguage.json",samplePath:"elm.sample",embeddedLangs:["glsl"]},{id:"erb",scopeName:"text.html.erb",path:"erb.tmLanguage.json",samplePath:"erb.sample",embeddedLangs:["html","ruby"]},{id:"erlang",scopeName:"source.erlang",path:"erlang.tmLanguage.json",samplePath:"erlang.sample"},{id:"fish",scopeName:"source.fish",path:"fish.tmLanguage.json",samplePath:"fish.sample"},{id:"fsharp",scopeName:"source.fsharp",path:"fsharp.tmLanguage.json",samplePath:"fsharp.sample",aliases:["f#"],embeddedLangs:["markdown"]},{id:"gherkin",scopeName:"text.gherkin.feature",path:"gherkin.tmLanguage.json"},{id:"git-commit",scopeName:"text.git-commit",path:"git-commit.tmLanguage.json",embeddedLangs:["diff"]},{id:"git-rebase",scopeName:"text.git-rebase",path:"git-rebase.tmLanguage.json",embeddedLangs:["shellscript"]},{id:"glsl",scopeName:"source.glsl",path:"glsl.tmLanguage.json",samplePath:"glsl.sample",embeddedLangs:["c"]},{id:"gnuplot",scopeName:"source.gnuplot",path:"gnuplot.tmLanguage.json"},{id:"go",scopeName:"source.go",path:"go.tmLanguage.json",samplePath:"go.sample"},{id:"graphql",scopeName:"source.graphql",path:"graphql.tmLanguage.json",embeddedLangs:["javascript","typescript","jsx","tsx"]},{id:"groovy",scopeName:"source.groovy",path:"groovy.tmLanguage.json"},{id:"hack",scopeName:"source.hack",path:"hack.tmLanguage.json",embeddedLangs:["html","sql"]},{id:"haml",scopeName:"text.haml",path:"haml.tmLanguage.json",embeddedLangs:["ruby","javascript","sass","coffee","markdown","css"]},{id:"handlebars",scopeName:"text.html.handlebars",path:"handlebars.tmLanguage.json",aliases:["hbs"],embeddedLangs:["html","css","javascript","yaml"]},{id:"haskell",scopeName:"source.haskell",path:"haskell.tmLanguage.json"},{id:"hcl",scopeName:"source.hcl",path:"hcl.tmLanguage.json"},{id:"hlsl",scopeName:"source.hlsl",path:"hlsl.tmLanguage.json"},{id:"html",scopeName:"text.html.basic",path:"html.tmLanguage.json",samplePath:"html.sample",embeddedLangs:["javascript","css"]},{id:"ini",scopeName:"source.ini",path:"ini.tmLanguage.json"},{id:"java",scopeName:"source.java",path:"java.tmLanguage.json",samplePath:"java.sample"},{id:"javascript",scopeName:"source.js",path:"javascript.tmLanguage.json",samplePath:"javascript.sample",aliases:["js"]},{id:"jinja-html",scopeName:"text.html.jinja",path:"jinja-html.tmLanguage.json",embeddedLangs:["html"]},{id:"json",scopeName:"source.json",path:"json.tmLanguage.json"},{id:"jsonc",scopeName:"source.json.comments",path:"jsonc.tmLanguage.json"},{id:"jsonnet",scopeName:"source.jsonnet",path:"jsonnet.tmLanguage.json"},{id:"jssm",scopeName:"source.jssm",path:"jssm.tmLanguage.json",samplePath:"jssm.sample",aliases:["fsl"]},{id:"jsx",scopeName:"source.js.jsx",path:"jsx.tmLanguage.json"},{id:"julia",scopeName:"source.julia",path:"julia.tmLanguage.json",embeddedLangs:["cpp","python","javascript","r","sql"]},{id:"kotlin",scopeName:"source.kotlin",path:"kotlin.tmLanguage.json"},{id:"latex",scopeName:"text.tex.latex",path:"latex.tmLanguage.json",embeddedLangs:["tex","css","haskell","html","xml","java","lua","julia","ruby","javascript","typescript","python","yaml","scala","gnuplot"]},{id:"less",scopeName:"source.css.less",path:"less.tmLanguage.json",embeddedLangs:["css"]},{id:"liquid",scopeName:"text.html.liquid",path:"liquid.tmLanguage.json",samplePath:"liquid.sample",embeddedLangs:["html","css","json","javascript"]},{id:"lisp",scopeName:"source.lisp",path:"lisp.tmLanguage.json"},{id:"logo",scopeName:"source.logo",path:"logo.tmLanguage.json"},{id:"lua",scopeName:"source.lua",path:"lua.tmLanguage.json",embeddedLangs:["c"]},{id:"make",scopeName:"source.makefile",path:"make.tmLanguage.json",aliases:["makefile"]},{id:"markdown",scopeName:"text.html.markdown",path:"markdown.tmLanguage.json",aliases:["md"],embeddedLangs:["css","html","ini","java","lua","make","perl","r","ruby","php","sql","vb","xml","xsl","yaml","bat","clojure","coffee","c","cpp","diff","docker","git-commit","git-rebase","go","groovy","pug","javascript","json","jsonc","less","objective-c","swift","scss","raku","powershell","python","julia","rust","scala","shellscript","typescript","tsx","csharp","fsharp","dart","handlebars","erlang","elixir","latex","bibtex"]},{id:"marko",scopeName:"text.marko",path:"marko.tmLanguage.json",embeddedLangs:["css","less","scss","typescript"]},{id:"matlab",scopeName:"source.matlab",path:"matlab.tmLanguage.json"},{id:"mdx",scopeName:"text.html.markdown.jsx",path:"mdx.tmLanguage.json",embeddedLangs:["jsx","markdown"]},{id:"mermaid",scopeName:"source.mermaid",path:"mermaid.tmLanguage.json"},{id:"nginx",scopeName:"source.nginx",path:"nginx.tmLanguage.json",embeddedLangs:["lua"]},{id:"nim",scopeName:"source.nim",path:"nim.tmLanguage.json",embeddedLangs:["c","html","xml","javascript","css","glsl","markdown"]},{id:"nix",scopeName:"source.nix",path:"nix.tmLanguage.json"},{id:"objective-c",scopeName:"source.objc",path:"objective-c.tmLanguage.json",aliases:["objc"]},{id:"objective-cpp",scopeName:"source.objcpp",path:"objective-cpp.tmLanguage.json"},{id:"ocaml",scopeName:"source.ocaml",path:"ocaml.tmLanguage.json"},{id:"pascal",scopeName:"source.pascal",path:"pascal.tmLanguage.json"},{id:"perl",scopeName:"source.perl",path:"perl.tmLanguage.json",embeddedLangs:["html","xml","css","javascript","sql"]},{id:"php",scopeName:"source.php",path:"php.tmLanguage.json",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"plsql",scopeName:"source.plsql.oracle",path:"plsql.tmLanguage.json"},{id:"postcss",scopeName:"source.css.postcss",path:"postcss.tmLanguage.json"},{id:"powershell",scopeName:"source.powershell",path:"powershell.tmLanguage.json",aliases:["ps","ps1"]},{id:"prisma",scopeName:"source.prisma",path:"prisma.tmLanguage.json",samplePath:"prisma.sample"},{id:"prolog",scopeName:"source.prolog",path:"prolog.tmLanguage.json"},{id:"pug",scopeName:"text.pug",path:"pug.tmLanguage.json",aliases:["jade"],embeddedLangs:["javascript","css","sass","stylus","coffee","html"]},{id:"puppet",scopeName:"source.puppet",path:"puppet.tmLanguage.json"},{id:"purescript",scopeName:"source.purescript",path:"purescript.tmLanguage.json"},{id:"python",scopeName:"source.python",path:"python.tmLanguage.json",samplePath:"python.sample",aliases:["py"]},{id:"r",scopeName:"source.r",path:"r.tmLanguage.json"},{id:"raku",scopeName:"source.perl.6",path:"raku.tmLanguage.json",aliases:["perl6"]},{id:"razor",scopeName:"text.aspnetcorerazor",path:"razor.tmLanguage.json",embeddedLangs:["html","csharp"]},{id:"rel",scopeName:"source.rel",path:"rel.tmLanguage.json",samplePath:"rel.sample"},{id:"riscv",scopeName:"source.riscv",path:"riscv.tmLanguage.json"},{id:"rst",scopeName:"source.rst",path:"rst.tmLanguage.json",embeddedLangs:["cpp","python","javascript","shellscript","yaml","cmake","ruby"]},{id:"ruby",scopeName:"source.ruby",path:"ruby.tmLanguage.json",samplePath:"ruby.sample",aliases:["rb"],embeddedLangs:["html","xml","sql","css","c","javascript","shellscript","lua"]},{id:"rust",scopeName:"source.rust",path:"rust.tmLanguage.json",aliases:["rs"]},{id:"sas",scopeName:"source.sas",path:"sas.tmLanguage.json",embeddedLangs:["sql"]},{id:"sass",scopeName:"source.sass",path:"sass.tmLanguage.json"},{id:"scala",scopeName:"source.scala",path:"scala.tmLanguage.json"},{id:"scheme",scopeName:"source.scheme",path:"scheme.tmLanguage.json"},{id:"scss",scopeName:"source.css.scss",path:"scss.tmLanguage.json",embeddedLangs:["css"]},{id:"shaderlab",scopeName:"source.shaderlab",path:"shaderlab.tmLanguage.json",aliases:["shader"],embeddedLangs:["hlsl"]},{id:"shellscript",scopeName:"source.shell",path:"shellscript.tmLanguage.json",aliases:["shell","bash","sh","zsh"],embeddedLangs:["ruby","python","applescript","html","markdown"]},{id:"smalltalk",scopeName:"source.smalltalk",path:"smalltalk.tmLanguage.json"},{id:"solidity",scopeName:"source.solidity",path:"solidity.tmLanguage.json"},{id:"sparql",scopeName:"source.sparql",path:"sparql.tmLanguage.json",samplePath:"sparql.sample",embeddedLangs:["turtle"]},{id:"sql",scopeName:"source.sql",path:"sql.tmLanguage.json"},{id:"ssh-config",scopeName:"source.ssh-config",path:"ssh-config.tmLanguage.json"},{id:"stata",scopeName:"source.stata",path:"stata.tmLanguage.json",samplePath:"stata.sample",embeddedLangs:["sql"]},{id:"stylus",scopeName:"source.stylus",path:"stylus.tmLanguage.json",aliases:["styl"]},{id:"svelte",scopeName:"source.svelte",path:"svelte.tmLanguage.json",embeddedLangs:["javascript","typescript","coffee","stylus","sass","css","scss","less","postcss","pug","markdown"]},{id:"swift",scopeName:"source.swift",path:"swift.tmLanguage.json"},{id:"system-verilog",scopeName:"source.systemverilog",path:"system-verilog.tmLanguage.json"},{id:"tasl",scopeName:"source.tasl",path:"tasl.tmLanguage.json",samplePath:"tasl.sample"},{id:"tcl",scopeName:"source.tcl",path:"tcl.tmLanguage.json"},{id:"tex",scopeName:"text.tex",path:"tex.tmLanguage.json",embeddedLangs:["r"]},{id:"toml",scopeName:"source.toml",path:"toml.tmLanguage.json"},{id:"tsx",scopeName:"source.tsx",path:"tsx.tmLanguage.json",samplePath:"tsx.sample"},{id:"turtle",scopeName:"source.turtle",path:"turtle.tmLanguage.json",samplePath:"turtle.sample"},{id:"twig",scopeName:"text.html.twig",path:"twig.tmLanguage.json",embeddedLangs:["css","javascript","php","python","ruby"]},{id:"typescript",scopeName:"source.ts",path:"typescript.tmLanguage.json",aliases:["ts"]},{id:"vb",scopeName:"source.asp.vb.net",path:"vb.tmLanguage.json",aliases:["cmd"]},{id:"verilog",scopeName:"source.verilog",path:"verilog.tmLanguage.json"},{id:"vhdl",scopeName:"source.vhdl",path:"vhdl.tmLanguage.json"},{id:"viml",scopeName:"source.viml",path:"viml.tmLanguage.json",aliases:["vim","vimscript"]},{id:"vue-html",scopeName:"text.html.vue-html",path:"vue-html.tmLanguage.json",embeddedLangs:["vue","javascript"]},{id:"vue",scopeName:"source.vue",path:"vue.tmLanguage.json",embeddedLangs:["json","markdown","pug","haml","liquid","vue-html","sass","scss","less","stylus","postcss","css","typescript","coffee","javascript"]},{id:"wasm",scopeName:"source.wat",path:"wasm.tmLanguage.json"},{id:"wenyan",scopeName:"source.wenyan",path:"wenyan.tmLanguage.json",aliases:["文言"]},{id:"xml",scopeName:"text.xml",path:"xml.tmLanguage.json",embeddedLangs:["java"]},{id:"xsl",scopeName:"text.xml.xsl",path:"xsl.tmLanguage.json",embeddedLangs:["xml"]},{id:"yaml",scopeName:"source.yaml",path:"yaml.tmLanguage.json"},{id:"zenscript",scopeName:"source.zenscript",path:"zenscript.tmLanguage.json",samplePath:"zenscript.sample"}];var f,g=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e))(g||{});class m{static toBinaryStr(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t}static printMetadata(e){let t=m.getLanguageId(e),n=m.getTokenType(e),r=m.getFontStyle(e),a=m.getForeground(e),o=m.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:r,foreground:a,background:o})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(1792&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static set(e,t,n,r,a,o){let s=m.getLanguageId(e),i=m.getTokenType(e),c=m.getFontStyle(e),u=m.getForeground(e),l=m.getBackground(e);return 0!==t&&(s=t),0!==n&&(i=8===n?0:n),-1!==r&&(c=r),0!==a&&(u=a),0!==o&&(l=o),(s<<0|i<<8|c<<11|u<<14|l<<23)>>>0}}function v(e){return e.endsWith("/")||e.endsWith("\\")?e.slice(0,-1):e}function y(e){return e.startsWith("./")?e.slice(2):e}function b(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function _(e){return 10===e||13===e||8232===e||8233===e}function k(e){return e>=48&&e<=57}!function(e){e.DEFAULT={allowTrailingComma:!1}}(f||(f={}));var S=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=f.DEFAULT);var r=null,a=[],o=[];function s(e){Array.isArray(a)?a.push(e):null!==r&&(a[r]=e)}return function(e,t,n){void 0===n&&(n=f.DEFAULT);var r=function(e,t){void 0===t&&(t=!1);var n=e.length,r=0,a="",o=0,s=16,i=0,c=0,u=0,l=0,p=0;function h(t,n){for(var a=0,o=0;a<t||!n;){var s=e.charCodeAt(r);if(s>=48&&s<=57)o=16*o+s-48;else if(s>=65&&s<=70)o=16*o+s-65+10;else{if(!(s>=97&&s<=102))break;o=16*o+s-97+10}r++,a++}return a<t&&(o=-1),o}function d(){if(a="",p=0,o=r,c=i,l=u,r>=n)return o=n,s=17;var t=e.charCodeAt(r);if(b(t)){do{r++,a+=String.fromCharCode(t),t=e.charCodeAt(r)}while(b(t));return s=15}if(_(t))return r++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,a+="\n"),i++,u=r,s=14;switch(t){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,a=function(){for(var t="",a=r;;){if(r>=n){t+=e.substring(a,r),p=2;break}var o=e.charCodeAt(r);if(34===o){t+=e.substring(a,r),r++;break}if(92!==o){if(o>=0&&o<=31){if(_(o)){t+=e.substring(a,r),p=2;break}p=6}r++}else{if(t+=e.substring(a,r),++r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var s=h(4,!0);s>=0?t+=String.fromCharCode(s):p=4;break;default:p=5}a=r}}return t}(),s=10;case 47:var d=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!_(e.charCodeAt(r));)r++;return a=e.substring(d,r),s=12}if(42===e.charCodeAt(r+1)){r+=2;for(var g=n-1,m=!1;r<g;){var v=e.charCodeAt(r);if(42===v&&47===e.charCodeAt(r+1)){r+=2,m=!0;break}r++,_(v)&&(13===v&&10===e.charCodeAt(r)&&r++,i++,u=r)}return m||(r++,p=1),a=e.substring(d,r),s=13}return a+=String.fromCharCode(t),r++,s=16;case 45:if(a+=String.fromCharCode(t),++r===n||!k(e.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){var t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&k(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(!(++r<e.length&&k(e.charCodeAt(r))))return p=3,e.substring(t,r);for(r++;r<e.length&&k(e.charCodeAt(r));)r++}var n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if((++r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&k(e.charCodeAt(r))){for(r++;r<e.length&&k(e.charCodeAt(r));)r++;n=r}else p=3;return e.substring(t,n)}(),s=11;default:for(;r<n&&f(t);)r++,t=e.charCodeAt(r);if(o!==r){switch(a=e.substring(o,r)){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return a+=String.fromCharCode(t),r++,s=16}}function f(e){if(b(e)||_(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,a="",o=0,s=16,p=0},getPosition:function(){return r},scan:t?function(){var e;do{e=d()}while(e>=12&&e<=15);return e}:d,getToken:function(){return s},getTokenValue:function(){return a},getTokenOffset:function(){return o},getTokenLength:function(){return r-o},getTokenStartLine:function(){return c},getTokenStartCharacter:function(){return o-l},getTokenError:function(){return p}}}(e,!1);function a(e){return e?function(){return e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}function o(e){return e?function(t){return e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}var s=a(t.onObjectBegin),i=o(t.onObjectProperty),c=a(t.onObjectEnd),u=a(t.onArrayBegin),l=a(t.onArrayEnd),p=o(t.onLiteralValue),h=o(t.onSeparator),d=a(t.onComment),g=o(t.onError),m=n&&n.disallowComments,v=n&&n.allowTrailingComma;function y(){for(;;){var e=r.scan();switch(r.getTokenError()){case 4:S(14);break;case 5:S(15);break;case 3:S(13);break;case 1:m||S(11);break;case 2:S(12);break;case 6:S(16)}switch(e){case 12:case 13:m?S(10):d();break;case 16:S(1);break;case 15:case 14:break;default:return e}}}function S(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),g(e),t.length+n.length>0)for(var a=r.getToken();17!==a;){if(-1!==t.indexOf(a)){y();break}if(-1!==n.indexOf(a))break;a=y()}}function w(e){var t=r.getTokenValue();return e?p(t):i(t),y(),!0}function L(){switch(r.getToken()){case 3:return function(){u(),y();for(var e=!1;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||S(4,[],[]),h(","),y(),4===r.getToken()&&v)break}else e&&S(6,[],[]);L()||S(4,[],[4,5]),e=!0}return l(),4!==r.getToken()?S(8,[4],[]):y(),!0}();case 1:return function(){s(),y();for(var e=!1;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||S(4,[],[]),h(","),y(),2===r.getToken()&&v)break}else e&&S(6,[],[]);(10!==r.getToken()?(S(3,[],[2,5]),!1):(w(!1),6===r.getToken()?(h(":"),y(),L()||S(4,[],[2,5])):S(5,[],[2,5]),!0))||S(4,[],[2,5]),e=!0}return c(),2!==r.getToken()?S(7,[2],[]):y(),!0}();case 10:return w(!0);default:return function(){switch(r.getToken()){case 11:var e=r.getTokenValue(),t=Number(e);isNaN(t)&&(S(2),t=0),p(t);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return y(),!0}()}}y(),17===r.getToken()?!!n.allowEmptyContent||S(4,[],[]):L()?17!==r.getToken()&&S(9,[],[]):S(4,[],[])}(e,{onObjectBegin:function(){var e={};s(e),o.push(a),a=e,r=null},onObjectProperty:function(e){r=e},onObjectEnd:function(){a=o.pop()},onArrayBegin:function(){var e=[];s(e),o.push(a),a=e,r=null},onArrayEnd:function(){a=o.pop()},onLiteralValue:s,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n),a[0]},w=Object.defineProperty,L=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))C.call(t,n)&&x(e,n,t[n]);if(L)for(var n of L(t))j.call(t,n)&&x(e,n,t[n]);return e};const N="undefined"!=typeof self&&void 0!==self.WorkerGlobalScope,T="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"node"===process.release.name,E=N||!T;let O="",R=null;function A(e){if(E)return O||console.warn("[Shiki] no CDN provider found, use `setCDN()` to specify the CDN for loading the resources before calling `getHighlighter()`"),`${O}${e}`;{const t=n(318);return t.isAbsolute(e)?e:t.resolve("/","..",e)}}async function I(e){const t=[],r=S(await async function(e){const t=A(e);if(E)return await fetch(t).then((e=>e.text()));{const e=n(799);return await e.promises.readFile(t,"utf-8")}}(e),t,{allowTrailingComma:!0});if(t.length)throw t[0];return r}async function M(e){const t=D(await I(e));if(t.include){const n=await M(function(...e){return e.map(v).map(y).join("/")}(...function(e){const t=e.split(/[\/\\]/g);return t.slice(0,t.length-1)}(e),t.include));n.settings&&(t.settings=n.settings.concat(t.settings)),n.bg&&!t.bg&&(t.bg=n.bg),n.colors&&(t.colors=P(P({},n.colors),t.colors)),delete t.include}return t}function D(e){const t=e.type||"dark",n=P(P({name:e.name,type:t},e),function(e){var t,n,r,a;let o,s,i=e.settings?e.settings:e.tokenColors;const c=i?i.find((e=>!e.name&&!e.scope)):void 0;return(null==(t=null==c?void 0:c.settings)?void 0:t.foreground)&&(o=c.settings.foreground),(null==(n=null==c?void 0:c.settings)?void 0:n.background)&&(s=c.settings.background),!o&&(null==(r=null==e?void 0:e.colors)?void 0:r["editor.foreground"])&&(o=e.colors["editor.foreground"]),!s&&(null==(a=null==e?void 0:e.colors)?void 0:a["editor.background"])&&(s=e.colors["editor.background"]),o||(o="light"===e.type?G:F),s||(s="light"===e.type?B:W),{fg:o,bg:s}}(e));var r;return e.include&&(n.include=e.include),e.tokenColors&&(n.settings=e.tokenColors,delete n.tokenColors),(r=n).settings||(r.settings=[]),r.settings[0]&&r.settings[0].settings&&!r.settings[0].scope||r.settings.unshift({settings:{foreground:r.fg,background:r.bg}}),n}const G="#333333",F="#bbbbbb",B="#fffffe",W="#1e1e1e";class U{constructor(e,t){this.languagesPath="languages/",this.languageMap={},this.scopeToLangMap={},this._onigLibPromise=e,this._onigLibName=t}get onigLib(){return this._onigLibPromise}getOnigLibName(){return this._onigLibName}getLangRegistration(e){return this.languageMap[e]}async loadGrammar(e){const t=this.scopeToLangMap[e];if(!t)return null;if(t.grammar)return t.grammar;const n=await async function(e){return await I(e)}(d.includes(t)?`${this.languagesPath}${t.path}`:t.path);return t.grammar=n,n}addLanguage(e){this.languageMap[e.id]=e,e.aliases&&e.aliases.forEach((t=>{this.languageMap[t]=e})),this.scopeToLangMap[e.scopeName]=e}}function q(e,t){let n=[];for(let r=0,a=t.length;r<a;r++){let a=t.slice(0,r),o=t[r];n[r]={scopeName:o,themeMatches:H(e,o,a)}}return n}function $(e,t){let n=e+".";return e===t||t.substring(0,n.length)===n}function z(e,t,n,r){if(!$(e,n))return!1;let a=t.length-1,o=r.length-1;for(;a>=0&&o>=0;)$(t[a],r[o])&&a--,o--;return-1===a}function H(e,t,n){let r=[],a=0;for(let o=0,s=e.settings.length;o<s;o++){let s,i=e.settings[o];if("string"==typeof i.scope)s=i.scope.split(/,/).map((e=>e.trim()));else{if(!Array.isArray(i.scope))continue;s=i.scope}for(let e=0,o=s.length;e<o;e++){let c=s[e].split(/ /);z(c[c.length-1],c.slice(0,c.length-1),t,n)&&(r[a++]=i,e=o)}}return r}var V=Object.defineProperty,K=Object.defineProperties,J=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,Z=(e,t,n)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const ee={pre:({className:e,style:t,children:n})=>`<pre class="${e}" style="${t}">${n}</pre>`,code:({children:e})=>`<code>${e}</code>`,line:({className:e,children:t})=>`<span class="${e}">${t}</span>`,token:({style:e,children:t})=>`<span style="${e}">${t}</span>`};const te={"&":"&","<":"<",">":">",'"':""","'":"'"};class ne extends h.Registry{constructor(e){super(e),this._resolver=e,this.themesPath="themes/",this._resolvedThemes={},this._resolvedGrammars={}}getTheme(e){return"string"==typeof e?this._resolvedThemes[e]:e}async loadTheme(e){return"string"==typeof e?(this._resolvedThemes[e]||(this._resolvedThemes[e]=await M(`${this.themesPath}${e}.json`)),this._resolvedThemes[e]):((e=D(e)).name&&(this._resolvedThemes[e.name]=e),e)}async loadThemes(e){return await Promise.all(e.map((e=>this.loadTheme(e))))}getLoadedThemes(){return Object.keys(this._resolvedThemes)}getGrammar(e){return this._resolvedGrammars[e]}async loadLanguage(e){const t=await this.loadGrammar(e.scopeName);this._resolvedGrammars[e.id]=t,e.aliases&&e.aliases.forEach((e=>{this._resolvedGrammars[e]=t}))}async loadLanguages(e){for(const t of e)this._resolver.addLanguage(t);for(const t of e)await this.loadLanguage(t)}getLoadedLanguages(){return Object.keys(this._resolvedGrammars)}}function re(e){return"string"==typeof e?d.find((t=>{var n;return t.id===e||(null==(n=t.aliases)?void 0:n.includes(e))})):e}async function ae(e){var t,r;const{_languages:a,_themes:o}=function(e){let t=d,n=e.themes||[];return e.langs&&(t=e.langs.map(re)),e.theme&&n.unshift(e.theme),n.length||(n=["nord"]),{_languages:t,_themes:n}}(e),s=new U(async function(){if(!R){let e;if(E)e=(0,p.loadWASM)({data:await fetch(A("dist/onig.wasm")).then((e=>e.arrayBuffer()))});else{const t=n(318).join(930,"../onig.wasm"),r=n(799).readFileSync(t).buffer;e=(0,p.loadWASM)(r)}R=e.then((()=>({createOnigScanner:e=>(0,p.createOnigScanner)(e),createOnigString:e=>(0,p.createOnigString)(e)})))}return R}(),"vscode-oniguruma"),i=new ne(s);(null==(t=e.paths)?void 0:t.themes)&&(i.themesPath=e.paths.themes),(null==(r=e.paths)?void 0:r.languages)&&(s.languagesPath=e.paths.languages);const c=(await i.loadThemes(o))[0];let u;await i.loadLanguages(a);let l={"#000001":"var(--shiki-color-text)","#000002":"var(--shiki-color-background)","#000004":"var(--shiki-token-constant)","#000005":"var(--shiki-token-string)","#000006":"var(--shiki-token-comment)","#000007":"var(--shiki-token-keyword)","#000008":"var(--shiki-token-parameter)","#000009":"var(--shiki-token-function)","#000010":"var(--shiki-token-string-expression)","#000011":"var(--shiki-token-punctuation)","#000012":"var(--shiki-token-link)"};function f(e){const t=e?i.getTheme(e):c;if(!t)throw Error(`No theme registration for ${e}`);u&&u.name===t.name||(i.setTheme(t),u=t);const n=i.getColorMap();return"css"===t.type&&function(e,t){e.bg=l[e.bg]||e.bg,e.fg=l[e.fg]||e.fg,t.forEach(((e,n)=>{t[n]=l[e]||e}))}(t,n),{_theme:t,_colorMap:n}}function v(e,t="text",n,r={includeExplanation:!0}){if(function(e){return!e||["plaintext","txt","text"].includes(e)}(t))return[...e.split(/\r\n|\r|\n/).map((e=>[{content:e}]))];const{_grammar:a}=function(e){const t=i.getGrammar(e);if(!t)throw Error(`No language registration for ${e}`);return{_grammar:t}}(t),{_theme:o,_colorMap:s}=f(n);return function(e,t,n,r,a){let o=n.split(/\r\n|\r|\n/),s=h.INITIAL,i=[],c=[];for(let n=0,u=o.length;n<u;n++){let u,l,p,h=o[n];if(""===h){i=[],c.push([]);continue}a.includeExplanation&&(u=r.tokenizeLine(h,s),l=u.tokens,p=0);let d=r.tokenizeLine2(h,s),f=d.tokens.length/2;for(let n=0;n<f;n++){let r=d.tokens[2*n],o=n+1<f?d.tokens[2*n+2]:h.length;if(r===o)continue;let s=d.tokens[2*n+1],c=t[m.getForeground(s)],u=m.getFontStyle(s),g=[];if(a.includeExplanation){let t=0;for(;r+t<o;){let n=l[p],r=h.substring(n.startIndex,n.endIndex);t+=r.length,g.push({content:r,scopes:q(e,n.scopes)}),p++}}i.push({content:h.substring(r,o),color:c,fontStyle:u,explanation:g})}c.push(i),i=[],s=d.ruleStack}return c}(o,s,e,a,r)}return{codeToThemedTokens:v,codeToHtml:function(e,t="text",n){let r;r="object"==typeof t?t:{lang:t,theme:n};const a=v(e,r.lang,r.theme,{includeExplanation:!1}),{_theme:o}=f(r.theme);return function(e,t={}){var n;const r=t.bg||"#fff",a=function(e,t){const n=new Map;for(const t of e){const e=t.line;n.has(e)?n.get(e).push(t):n.set(e,[t])}return n}(null!=(n=t.lineOptions)?n:[]),o=t.elements||{};function s(e="",t={},n){const r=o[e]||ee[e];return r?(n=n.filter(Boolean),r((a=((e,t)=>{for(var n in t||(t={}))X.call(t,n)&&Z(e,n,t[n]);if(Q)for(var n of Q(t))Y.call(t,n)&&Z(e,n,t[n]);return e})({},t),s={children:"code"===e?n.join("\n"):n.join("")},K(a,J(s))))):"";var a,s}return s("pre",{className:"shiki",style:`background-color: ${r}`},[t.langId?`<div class="language-id">${t.langId}</div>`:"",s("code",{},e.map(((n,r)=>{var o;const i=r+1,c=function(e){var t;const n=new Set(["line"]);for(const r of e)for(const e of null!=(t=r.classes)?t:[])n.add(e);return Array.from(n)}(null!=(o=a.get(i))?o:[]).join(" ");return s("line",{className:c,lines:e,line:n,index:r},n.map(((e,r)=>{const a=[`color: ${e.color||t.fg}`];return e.fontStyle&g.Italic&&a.push("font-style: italic"),e.fontStyle&g.Bold&&a.push("font-weight: bold"),e.fontStyle&g.Underline&&a.push("text-decoration: underline"),s("token",{style:a.join("; "),tokens:n,token:e,index:r},[(o=e.content,o.replace(/[&<>"']/g,(e=>te[e])))]);var o})))})))])}(a,{fg:o.fg,bg:o.bg,lineOptions:null==r?void 0:r.lineOptions})},getTheme:e=>f(e)._theme,loadTheme:async function(e){await i.loadTheme(e)},loadLanguage:async function(e){const t=re(e);s.addLanguage(t),await i.loadLanguage(t)},getBackgroundColor:function(e){const{_theme:t}=f(e);return t.bg},getForegroundColor:function(e){const{_theme:t}=f(e);return t.fg},getLoadedThemes:function(){return i.getLoadedThemes()},getLoadedLanguages:function(){return i.getLoadedLanguages()},setColorReplacements:function(e){l=e}}}var oe=n(196);function se(e,t,n,r){return new(n||(n=Promise))((function(a,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function i(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,i)}c((r=r.apply(e,t||[])).next())}))}function ie(e,t){var n,r,a,o,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(o){return function(i){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){s.label=o[1];break}if(6===o[0]&&s.label<a[1]){s.label=a[1],a=o;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(o);break}a[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,i])}}}var ce,ue=function(){},le=ue(),pe=Object,he=function(e){return e===le},de=function(e){return"function"==typeof e},fe=function(e,t){return pe.assign({},e,t)},ge="undefined",me=function(){return typeof window!=ge},ve=new WeakMap,ye=0,be=function(e){var t,n,r=typeof e,a=e&&e.constructor,o=a==Date;if(pe(e)!==e||o||a==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=ve.get(e))return t;if(t=++ye+"~",ve.set(e,t),a==Array){for(t="@",n=0;n<e.length;n++)t+=be(e[n])+",";ve.set(e,t)}if(a==pe){t="#";for(var s=pe.keys(e).sort();!he(n=s.pop());)he(e[n])||(t+=n+":"+be(e[n])+",");ve.set(e,t)}}return t},_e=!0,ke=me(),Se=typeof document!=ge,we=ke&&window.addEventListener?window.addEventListener.bind(window):ue,Le=Se?document.addEventListener.bind(document):ue,Ce=ke&&window.removeEventListener?window.removeEventListener.bind(window):ue,je=Se?document.removeEventListener.bind(document):ue,xe={isOnline:function(){return _e},isVisible:function(){var e=Se&&document.visibilityState;return he(e)||"hidden"!==e}},Pe={initFocus:function(e){return Le("visibilitychange",e),we("focus",e),function(){je("visibilitychange",e),Ce("focus",e)}},initReconnect:function(e){var t=function(){_e=!0,e()},n=function(){_e=!1};return we("online",t),we("offline",n),function(){Ce("online",t),Ce("offline",n)}}},Ne=!me()||"Deno"in window,Te=Ne?oe.useEffect:oe.useLayoutEffect,Ee="undefined"!=typeof navigator&&navigator.connection,Oe=!Ne&&Ee&&(["slow-2g","2g"].includes(Ee.effectiveType)||Ee.saveData),Re=function(e){if(de(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?be(e):"",t,e?"$swr$"+e:""]},Ae=new WeakMap,Ie=function(e,t,n,r,a,o,s){void 0===s&&(s=!0);var i=Ae.get(e),c=i[0],u=i[1],l=i[3],p=c[t],h=u[t];if(s&&h)for(var d=0;d<h.length;++d)h[d](n,r,a);return o&&(delete l[t],p&&p[0])?p[0](2).then((function(){return e.get(t)})):e.get(t)},Me=0,De=function(){return++Me},Ge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return se(void 0,void 0,void 0,(function(){var t,n,r,a,o,s,i,c,u,l,p,h,d,f,g,m,v,y,b,_,k;return ie(this,(function(S){switch(S.label){case 0:if(t=e[0],n=e[1],r=e[2],a=e[3],s=!!he((o="boolean"==typeof a?{revalidate:a}:a||{}).populateCache)||o.populateCache,i=!1!==o.revalidate,c=!1!==o.rollbackOnError,u=o.optimisticData,l=Re(n),p=l[0],h=l[2],!p)return[2];if(d=Ae.get(t),f=d[2],e.length<3)return[2,Ie(t,p,t.get(p),le,le,i,!0)];if(g=r,v=De(),f[p]=[v,0],y=!he(u),b=t.get(p),y&&(_=de(u)?u(b):u,t.set(p,_),Ie(t,p,_)),de(g))try{g=g(t.get(p))}catch(e){m=e}return g&&de(g.then)?[4,g.catch((function(e){m=e}))]:[3,2];case 1:if(g=S.sent(),v!==f[p][0]){if(m)throw m;return[2,g]}m&&y&&c&&(s=!0,g=b,t.set(p,b)),S.label=2;case 2:return s&&(m||(de(s)&&(g=s(g,b)),t.set(p,g)),t.set(h,fe(t.get(h),{error:m}))),f[p][1]=De(),[4,Ie(t,p,g,m,le,i,!!s)];case 3:if(k=S.sent(),m)throw m;return[2,s?k:g]}}))}))},Fe=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Be=function(e,t){if(!Ae.has(e)){var n=fe(Pe,t),r={},a=Ge.bind(le,e),o=ue;if(Ae.set(e,[r,{},{},{},a]),!Ne){var s=n.initFocus(setTimeout.bind(le,Fe.bind(le,r,0))),i=n.initReconnect(setTimeout.bind(le,Fe.bind(le,r,1)));o=function(){s&&s(),i&&i(),Ae.delete(e)}}return[e,a,o]}return[e,Ae.get(e)[4]]},We=Be(new Map),Ue=We[0],qe=We[1],$e=fe({onLoadingSlow:ue,onSuccess:ue,onError:ue,onErrorRetry:function(e,__,t,n,r){var a=t.errorRetryCount,o=r.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*t.errorRetryInterval;!he(a)&&o>a||setTimeout(n,s,r)},onDiscarded:ue,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Oe?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Oe?5e3:3e3,compare:function(e,t){return be(e)==be(t)},isPaused:function(){return!1},cache:Ue,mutate:qe,fallback:{}},xe),ze=function(e,t){var n=fe(e,t);if(t){var r=e.use,a=e.fallback,o=t.use,s=t.fallback;r&&o&&(n.use=r.concat(o)),a&&s&&(n.fallback=fe(a,s))}return n},He=(0,oe.createContext)({}),Ve=function(e){return de(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Ke=function(){return fe($e,(0,oe.useContext)(He))},Je=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},Qe={dedupe:!0},Xe=(pe.defineProperty((function(e){var t=e.value,n=ze((0,oe.useContext)(He),t),r=t&&t.provider,a=(0,oe.useState)((function(){return r?Be(r(n.cache||Ue),t):le}))[0];return a&&(n.cache=a[0],n.mutate=a[1]),Te((function(){return a?a[2]:le}),[]),(0,oe.createElement)(He.Provider,fe(e,{value:n}))}),"default",{value:$e}),ce=function(e,t,n){var r=n.cache,a=n.compare,o=n.fallbackData,s=n.suspense,i=n.revalidateOnMount,c=n.refreshInterval,u=n.refreshWhenHidden,l=n.refreshWhenOffline,p=Ae.get(r),h=p[0],d=p[1],f=p[2],g=p[3],m=Re(e),v=m[0],y=m[1],b=m[2],_=(0,oe.useRef)(!1),k=(0,oe.useRef)(!1),S=(0,oe.useRef)(v),w=(0,oe.useRef)(t),L=(0,oe.useRef)(n),C=function(){return L.current},j=function(){return C().isVisible()&&C().isOnline()},x=function(e){return r.set(b,fe(r.get(b),e))},P=r.get(v),N=he(o)?n.fallback[v]:o,T=he(P)?N:P,E=r.get(b)||{},O=E.error,R=!_.current,A=function(){return R&&!he(i)?i:!C().isPaused()&&(s?!he(T)&&n.revalidateIfStale:he(T)||n.revalidateIfStale)},I=!(!v||!t)&&(!!E.isValidating||R&&A()),M=function(e,t){var n=(0,oe.useState)({})[1],r=(0,oe.useRef)(e),a=(0,oe.useRef)({data:!1,error:!1,isValidating:!1}),o=(0,oe.useCallback)((function(e){var o=!1,s=r.current;for(var i in e){var c=i;s[c]!==e[c]&&(s[c]=e[c],a.current[c]&&(o=!0))}o&&!t.current&&n({})}),[]);return Te((function(){r.current=e})),[r,a.current,o]}({data:T,error:O,isValidating:I},k),D=M[0],G=M[1],F=M[2],B=(0,oe.useCallback)((function(e){return se(void 0,void 0,void 0,(function(){var t,o,s,i,c,u,l,p,h,d,m,b,L;return ie(this,(function(P){switch(P.label){case 0:if(t=w.current,!v||!t||k.current||C().isPaused())return[2,!1];i=!0,c=e||{},u=!g[v]||!c.dedupe,l=function(){return!k.current&&v===S.current&&_.current},p=function(){var e=g[v];e&&e[1]===s&&delete g[v]},h={isValidating:!1},d=function(){x({isValidating:!1}),l()&&F(h)},x({isValidating:!0}),F({isValidating:!0}),P.label=1;case 1:return P.trys.push([1,3,,4]),u&&(Ie(r,v,D.current.data,D.current.error,!0),n.loadingTimeout&&!r.get(v)&&setTimeout((function(){i&&l()&&C().onLoadingSlow(v,n)}),n.loadingTimeout),g[v]=[t.apply(void 0,y),De()]),L=g[v],o=L[0],s=L[1],[4,o];case 2:return o=P.sent(),u&&setTimeout(p,n.dedupingInterval),g[v]&&g[v][1]===s?(x({error:le}),h.error=le,m=f[v],!he(m)&&(s<=m[0]||s<=m[1]||0===m[1])?(d(),u&&l()&&C().onDiscarded(v),[2,!1]):(a(D.current.data,o)?h.data=D.current.data:h.data=o,a(r.get(v),o)||r.set(v,o),u&&l()&&C().onSuccess(o,v,n),[3,4])):(u&&l()&&C().onDiscarded(v),[2,!1]);case 3:return b=P.sent(),p(),C().isPaused()||(x({error:b}),h.error=b,u&&l()&&(C().onError(b,v,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||de(n.shouldRetryOnError)&&n.shouldRetryOnError(b))&&j()&&C().onErrorRetry(b,v,n,B,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return i=!1,d(),l()&&u&&Ie(r,v,h.data,h.error,!1),[2,!0]}}))}))}),[v]),W=(0,oe.useCallback)(Ge.bind(le,r,(function(){return S.current})),[]);if(Te((function(){w.current=t,L.current=n})),Te((function(){if(v){var e=v!==S.current,t=B.bind(le,Qe),n=0,r=Je(v,d,(function(e,t,n){F(fe({error:t,isValidating:n},a(D.current.data,e)?le:{data:e}))})),o=Je(v,h,(function(e){if(0==e){var r=Date.now();C().revalidateOnFocus&&r>n&&j()&&(n=r+C().focusThrottleInterval,t())}else if(1==e)C().revalidateOnReconnect&&j()&&t();else if(2==e)return B()}));return k.current=!1,S.current=v,_.current=!0,e&&F({data:T,error:O,isValidating:I}),A()&&(he(T)||Ne?t():(s=t,me()&&typeof window.requestAnimationFrame!=ge?window.requestAnimationFrame(s):setTimeout(s,1))),function(){k.current=!0,r(),o()}}var s}),[v,B]),Te((function(){var e;function t(){var t=de(c)?c(T):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){D.current.error||!u&&!C().isVisible()||!l&&!C().isOnline()?t():B(Qe).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[c,u,l,B]),(0,oe.useDebugValue)(T),s&&he(T)&&v)throw w.current=t,L.current=n,k.current=!1,he(O)?B(Qe):O;return{mutate:W,get data(){return G.data=!0,T},get error(){return G.error=!0,O},get isValidating(){return G.isValidating=!0,I}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Ke(),r=Ve(e),a=r[0],o=r[1],s=r[2],i=ze(n,s),c=ce,u=i.use;if(u)for(var l=u.length;l-- >0;)c=u[l](c);return c(a,o||i.fetcher,i)}),Ye=function(){return Ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},Ye.apply(this,arguments)},Ze=function(e){return"function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},et=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var a=Ze(n),o=a[0],s=a[1],i=a[2],c=(i.use||[]).concat(t);return e(o,s,Ye(Ye({},i),{use:c}))}}(Xe,(function(e){return function(t,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)}}));const tt=e=>{let{theme:t,lang:n,ready:r}=e;if(!r)throw new Error((0,i.__)("Loading...","code-block-pro"));return ae({langs:[n],theme:(0,s.applyFilters)("blocks.codeBlockPro.theme",t)})};let nt=!1;const rt=e=>{let{theme:t,lang:n,ready:r=!0}=e;if(!nt){var a;nt=!0;const e=(null===(a=window.codeBlockPro)||void 0===a?void 0:a.pluginUrl)+"/build/shiki/";o=(0,s.applyFilters)("blocks.codeBlockPro.assetDir",e),O=o}var o;const{data:i,error:c}=et({theme:t,lang:n,ready:r},tt);return{highlighter:i,error:c,loading:!i&&!c}},at=e=>{let t;const n=new Set,r=(e,r)=>{const a="function"==typeof e?e(t):e;if(a!==t){const e=t;t=(null!=r?r:"object"!=typeof a)?a:Object.assign({},t,a),n.forEach((n=>n(t,e)))}},a=()=>t,o={setState:r,getState:a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,a,o),o};var ot=n(798);const{useSyncExternalStoreWithSelector:st}=ot,it=e=>{const t="function"==typeof e?(e=>e?at(e):at)(e):e,n=(e,n)=>function(e,t=e.getState,n){const r=st(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return(0,oe.useDebugValue)(r),r}(t,e,n);return Object.assign(n,t),n};var ct=e=>e?it(e):it;const ut=(e,t={})=>(n,r,a)=>{const{enabled:o,anonymousActionType:s,...i}=t;let c;try{c=(null==o||o)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,a);const u=c.connect(i);let l=!0;a.setState=(e,t,a)=>{const o=n(e,t);return l?(u.send(void 0===a?{type:s||"anonymous"}:null!==(i=a)&&"object"==typeof i&&"type"in i?a:{type:a},r()),o):o;var i};const p=(...e)=>{const t=l;l=!1,n(...e),l=t},h=e(a.setState,r,a);if(u.init(h),a.dispatchFromDevtools&&"function"==typeof a.dispatch){let e=!1;const t=a.dispatch;a.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):lt(e.payload,(e=>{"__setState"!==e.type?a.dispatchFromDevtools&&"function"==typeof a.dispatch&&a.dispatch(e):p(e.state)}));case"DISPATCH":switch(e.payload.type){case"RESET":return p(h),u.init(a.getState());case"COMMIT":return u.init(a.getState());case"ROLLBACK":return lt(e.state,(e=>{p(e),u.init(a.getState())}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return lt(e.state,(e=>{p(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;return p(r),void u.send(null,n)}case"PAUSE_RECORDING":return l=!l}return}})),h},lt=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)},pt=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>pt(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>pt(t)(e)}}},ht=(e,t)=>(n,r,a)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const i=new Set,c=new Set;let u;try{u=o.getStorage()}catch(e){}if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...e)}),r,a);const l=pt(o.serialize),p=()=>{const e=o.partialize({...r()});let t;const n=l({state:e,version:o.version}).then((e=>u.setItem(o.name,e))).catch((e=>{t=e}));if(t)throw t;return n},h=a.setState;a.setState=(e,t)=>{h(e,t),p()};const d=e(((...e)=>{n(...e),p()}),r,a);let f;const g=()=>{var e;if(!u)return;s=!1,i.forEach((e=>e(r())));const t=(null==(e=o.onRehydrateStorage)?void 0:e.call(o,r()))||void 0;return pt(u.getItem.bind(u))(o.name).then((e=>{if(e)return o.deserialize(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return e.state;if(o.migrate)return o.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return f=o.merge(e,null!=(t=r())?t:d),n(f,!0),p()})).then((()=>{null==t||t(f,void 0),s=!0,c.forEach((e=>e(f)))})).catch((e=>{null==t||t(void 0,e)}))};return a.persist={setOptions:e=>{o={...o,...e},e.getStorage&&(u=e.getStorage())},clearStorage:()=>{null==u||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>g(),hasHydrated:()=>s,onHydrate:e=>(i.add(e),()=>{i.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},g(),f||d},dt=ct()(ht(ut((e=>({seenNotices:[],setSeenNotice(t){e((e=>e.seenNotices.includes(t)?e:{seenNotices:[...e.seenNotices,t]}))},previousSettings:{copyButton:!0},setPreviousSettings(t){e((e=>({previousSettings:{...e.previousSettings,...t}})))}})),{name:"Code Block Pro Globals"}),{name:"code-block-pro-last-globals",getStorage:()=>localStorage,partialize:e=>{var t,n;return{seenNotices:null!==(t=null==e?void 0:e.seenNotices)&&void 0!==t?t:[],previousSettings:null!==(n=null==e?void 0:e.previousSettings)&&void 0!==n?n:{}}}})),ft=ct()(ht(ut((e=>({previousLanguage:"javascript",setPreviousLanguage(t){e({previousLanguage:t})}})),{name:"Code Block Pro Language"}),{name:"code-block-pro-last-language",getStorage:()=>localStorage,partialize:e=>{var t;return{previousLanguage:null!==(t=null==e?void 0:e.previousLanguage)&&void 0!==t?t:null}}})),gt=ct()(ht(ut((e=>({previousTheme:"nord",setPreviousTheme(t){e({previousTheme:t})}})),{name:"Code Block Pro Theme"}),{name:"code-block-pro-last-theme",getStorage:()=>localStorage,partialize:e=>{var t;return{previousTheme:null!==(t=null==e?void 0:e.previousTheme)&&void 0!==t?t:null}}})),mt=e=>{let{attributes:t,setAttributes:n}=e;const{language:a,theme:o,code:i="",bgColor:c,textColor:u}=t,p=(0,r.useRef)(null),{previousLanguage:h}=ft(),{previousSettings:d}=dt(),{previousTheme:f}=gt(),{highlighter:g,error:m,loading:v}=rt({theme:o,lang:null!=a?a:h});var y;return(0,r.useEffect)((()=>{t.copyButton||n({copyButton:d.copyButton})}),[d,t,n]),(0,r.useEffect)((()=>{o||n({theme:f})}),[f,o,n]),(0,r.useEffect)((()=>{g&&n({bgColor:g.getBackgroundColor(),textColor:g.getForegroundColor()})}),[o,g,n]),(0,r.useEffect)((()=>{g&&n({codeHTML:(0,s.applyFilters)("blocks.codeBlockPro.codeHTML",g.codeToHtml(i,{lang:null!=a?a:h}),t)})}),[g,i,a,n,h,t]),v&&i||m?(0,r.createElement)("div",{className:"p-8 px-6 text-left",style:{backgroundColor:c,color:u}},null!==(y=null==m?void 0:m.message)&&void 0!==y?y:""):(0,r.createElement)("div",{ref:p},(0,r.createElement)(l(),{value:i,onValueChange:e=>n({code:e}),padding:24,style:{backgroundColor:c,color:u},onKeyDown:e=>{var t,n;return"Tab"===e.key&&(null===(t=p.current)||void 0===t||null===(n=t.querySelector("textarea"))||void 0===n?void 0:n.focus())},highlight:e=>{var t;return null==g||null===(t=g.codeToHtml(e,{lang:null!=a?a:h}))||void 0===t?void 0:t.replace(/<\/?[pre|code][^>]*>/g,"")}}))},vt=window.wp.components,yt=window.wp.data,bt=()=>(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:24,height:24},fill:"none",viewBox:"0 0 24 24",stroke:"#1e1e1e",strokeWidth:"2"},(0,r.createElement)("path",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})),_t=JSON.parse('{"abap":"ABAP","actionscript-3":"ActionScript 3","ada":"Ada","apache":"Apache","apex":"Apex","apl":"APL","applescript":"AppleScript","asm":"ASM","astro":"Astro","awk":"Awk","ballerina":"Ballerina","bat":"BAT","batch":"Batch","be":"BE","berry":"Berry","bibtex":"BibTeX","bicep":"BICEP","blade":"Blade","c":"C","cadence":"Cadence","cdc":"CDC","clarity":"Clarity","clj":"Clojure","clojure":"Clojure","cmake":"CMake","cobol":"COBOL","codeql":"CodeQL","ql":"CodeQL","coffee":"CoffeeScript","cpp":"C++","crystal":"Crystal","csharp":"C#","c#":"C#","css":"CSS","cue":"CUE","d":"D","dart":"Dart","diff":"Diff","docker":"Docker","dream-maker":"DreamMaker","elixir":"Elixir","elm":"Elm","erb":"ERB","html-ruby-erb":"ERB","erlang":"Erlang","fish":"Fish","fsharp":"F#","f#":"F#","fsl":"FSL","gherkin":"Gherkin","git-commit":"Git Commit","git-rebase":"Git Rebase","glsl":"GLSL","gnuplot":"Gnuplot","go":"Go","graphql":"GraphQL","groovy":"Groovy","hack":"Hack","haml":"HAML","handlebars":"Handlebars","haskell":"Haskell","hbs":"HBS","hcl":"HCL","hlsl":"HLSL","html":"HTML","ini":"INI","java":"Java","javascript":"JavaScript","js":"JavaScript","jinja-html":"Jinja HTML","json":"JSON","jsonc":"JSONC","jsonnet":"JSONnet","jssm":"JSSM","jsx":"JSX","julia":"Julia","kotlin":"Kotlin","latex":"LaTeX","less":"LESS","liquid":"Liquid","lisp":"Lisp","logo":"Logo","lua":"Lua","make":"Makefile","makefile":"Makefile","markdown":"Markdown","md":"Markdown","marko":"Marko","matlab":"MATLAB","mdx":"MDX","mermaid":"Mermaid","nginx":"Nginx","nim":"Nim","nix":"Nix","objective-c":"Objective-C","objc":"Objective-C","objective-cpp":"Objective-C++","ocaml":"OCaml","pascal":"Pascal","perl":"Perl","php":"PHP","plsql":"PLSQL","postcss":"PostCSS","powershell":"PowerShell","ps":"PowerShell","ps1":"PowerShell","prisma":"Prisma","prolog":"Prolog","pug":"Pug","jade":"Pug","puppet":"Puppet","purescript":"PureScript","python":"Python","py":"Python","r":"R","raku":"Raku","perl6":"Raku","razor":"Razor","rel":"Rel","riscv":"RISC-V","rst":"RST","ruby":"Ruby","rb":"Ruby","rust":"Rust","rs":"Rust","sas":"SAS","sass":"Sass","scala":"Scala","scheme":"Scheme","scss":"SCSS","shaderlab":"ShaderLab","shader":"Shader","shellscript":"ShellScript","bash":"ShellScript","shell":"ShellScript","sh":"ShellScript","zsh":"ShellScript","smalltalk":"Smalltalk","solidity":"Solidity","sparql":"SPARQL","sql":"SQL","ssh-config":"SSH Config","stata":"Stata","stylus":"Stylus","styl":"Stylus","svelte":"Svelte","swift":"Swift","system-verilog":"SystemVerilog","tasl":"TASL","tcl":"TCL","tex":"TeX","toml":"TOML","tsx":"TSX","turtle":"Turtle","twig":"Twig","typescript":"TypeScript","ts":"TypeScript","vb":"VB","cmd":"VB","verilog":"Verilog","vhdl":"VHDL","viml":"VimL","vim":"VimL","vimscript":"VimL","vue-html":"Vue HTML","vue":"Vue","wasm":"WASM","wenyan":"Wenyan","文言":"Wenyan","xml":"XML","xsl":"XSL","yaml":"YAML","zenscript":"ZenScript"}'),kt={"actionscript-3":["as3"],cpp:["arduino"],xml:["coldfusion"],pascal:["delphi"],java:["javafx"],javascript:["jscript","js"],matlab:["matlabkey"],"objective-c":["objc"],bat:["batch"],berry:["be"],cadence:["cdc"],clojure:["clj"],csharp:["c#"],erlang:["erl"],fsharp:["f#"],haskell:["hs"],handlebars:["hbs"],jssm:["fsl"],make:["makefile"],markdown:["md"],powershell:["ps","ps1"],pug:["jade"],python:["py"],raku:["perl6"],ruby:["rb"],rust:["rs"],"html-ruby-erb":["erb"],shaderlab:["shader"],shellscript:["shell","bash","sh","zsh"],stylus:["styl"],typescript:["ts"],vb:["cmd"],viml:["vim","vimscript"],wenyan:["文言"],codeql:["ql"]},St=e=>{if(e)return Object.keys(kt).find((t=>kt[t].includes(e)))},wt=(e=>{const t=Object.values(kt).flat();return Object.keys(e).reduce(((n,r)=>(t.includes(r)||(n[r]=e[r]),n)),{})})(_t),Lt=JSON.parse('{"dark-plus":"Dark Plus","dracula-soft":"Dracula Soft","dracula":"Dracula","github-dark-dimmed":"GitHub Dark Dimmed","github-dark":"Github Dark","github-light":"Github Light","hc_light":"HC Light","light-plus":"Light Plus","material-darker":"Material Darker","material-default":"Material Default","material-lighter":"Material Lighter","material-ocean":"Material Ocean","material-palenight":"Material Palenight","min-dark":"Min Dark","min-light":"Min Light","monokai":"Monokai","nord":"Nord","one-dark-pro":"One Dark Pro","poimandres":"Poimandres","rose-pine-dawn":"Rose Pine Dawn","rose-pine-moon":"Rose Pine Moon","rose-pine":"Rose Pine","slack-dark":"Slack Dark","slack-ochin":"Slack Ochin","solarized-dark":"Solarized Dark","solarized-light":"Solarized Light","vitesse-dark":"Vitesse Dark","vitesse-light":"Vitesse Light"}'),Ct=e=>{let{attributes:t,setAttributes:n}=e;const[a,o]=(0,r.useState)(t.language),{previousLanguage:s,setPreviousLanguage:i}=ft();return(0,r.useEffect)((()=>{a||n({language:s})}),[a,s,n]),(0,r.useEffect)((()=>{o(t.language)}),[t.language]),[a,e=>{n({language:e}),o(e),i(e)}]},jt=()=>{const{seenNotices:e,setSeenNotice:t}=dt(),[n,a]=(0,r.useState)(!1),[o,s]=(0,r.useState)(""),[i,c]=(0,r.useState)(!1),u=(0,yt.useSelect)((e=>{const t=e("core").getCurrentUser(),n=e("core").getEntityRecord("root","user",t.id);return null==n?void 0:n.email}));return(0,r.useEffect)((()=>{s(u)}),[u]),(0,r.useEffect)((()=>{if(!i)return;const e=setTimeout((()=>{t("beta-signup")}),4e3);return()=>clearTimeout(e)}),[i,t]),null},xt=e=>{let{id:t,theme:n,lang:a,onClick:o,code:s}=e;const[c,u]=(0,r.useState)(!1),{highlighter:l,error:p,loading:h}=rt({theme:n,lang:s?a:"c",ready:c}),[d,f]=(0,r.useState)(""),[g,m]=(0,r.useState)("#ffffff"),v=(0,r.useRef)(new IntersectionObserver((e=>{let[t]=e;t.isIntersecting&&(u(!0),v.current.disconnect())}))),y="\nfloat Q_rsqrt( float number )\n{\n long i;\n float x2, y;\n const float threehalfs = 1.5F;\n\n x2 = number * 0.5F;\n y = number;\n i = * ( long * ) &y; // evil floating point bit level hacking\n i = 0x5f3759df - ( i >> 1 ); // what the frack?\n y = * ( float * ) &i;\n y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration\n// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed\n\n return y;\n}".trim();return(0,r.useEffect)((()=>{if(!l)return;const e=s?l.codeToHtml(s,{lang:a}):l.codeToHtml(y,{lang:"c"});f(e),m(l.getBackgroundColor())}),[l,a,s,y]),h||p||!c?(0,r.createElement)("div",{ref:e=>{e&&v.current.observe(e)},style:{minHeight:"200px"},className:"flex items-center justify-center p-6 bg-gray-50"},(null==p?void 0:p.message)||(0,i.__)("Loading...","code-block-pro")):(0,r.createElement)("button",{id:t,type:"button",onClick:o,className:"p-4 px-3 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-scroll",style:{backgroundColor:g,minHeight:"50px"}},(0,r.createElement)("span",{className:"pointer-events-none",dangerouslySetInnerHTML:{__html:d}}))},Pt=e=>{let{attributes:t,setAttributes:n}=e;const[o,s]=Ct({attributes:t,setAttributes:n}),{setPreviousTheme:c}=gt(),{setPreviousSettings:u}=dt();return(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(vt.PanelBody,{title:(0,i.__)("Settings","code-block-pro"),initialOpen:!0},(0,r.createElement)("div",{className:"code-block-pro-editor"},(0,r.createElement)(vt.BaseControl,{id:"code-block-pro-settings"},(0,r.createElement)(vt.SelectControl,{label:(0,i.__)("Language","code-block-pro"),"data-cy-cbp":"language-select",value:o,onChange:s,options:Object.entries(wt).map((e=>{let[t,n]=e;return{label:n,value:t}}))}),(0,r.createElement)(vt.CheckboxControl,{label:(0,i.__)("Copy Button","code-block-pro"),help:(0,i.__)("If checked, users will be able to copy your code snippet to their clipboard.","code-block-pro"),checked:t.copyButton,onChange:e=>{u({copyButton:e}),n({copyButton:e})}})),(0,r.createElement)(jt,null))),(0,r.createElement)(vt.PanelBody,{title:(0,i.__)("Themes","code-block-pro"),initialOpen:!1},(0,r.createElement)("div",{className:"code-block-pro-editor"},Object.entries(Lt).map((e=>{let[a,s]=e;return(0,r.createElement)(vt.BaseControl,{id:`code-block-pro-theme-${a}`,label:t.theme===a?(0,i.sprintf)((0,i.__)("%s (current)","code-block-pro"),s):s,key:a},(0,r.createElement)(xt,{id:`code-block-pro-theme-${a}`,theme:a,lang:o,onClick:()=>{n({theme:a}),c(a)},code:t.code}))})))))},Nt=e=>{let{attributes:t,setAttributes:n}=e;const[o,s]=Ct({attributes:t,setAttributes:n});return(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(vt.ToolbarGroup,{className:"code-block-pro-editor"},(0,r.createElement)(vt.Dropdown,{renderContent:()=>(0,r.createElement)(Tt,{language:o,setLanguage:s}),renderToggle:e=>{var t;let{isOpen:n,onToggle:a}=e;return(0,r.createElement)(vt.Button,{onClick:a,"aria-expanded":n,"aria-haspopup":"true"},null!==(t=wt[o])&&void 0!==t?t:o)}})))},Tt=e=>{let{language:t,setLanguage:n}=e;return(0,r.createElement)(vt.NavigableMenu,{orientation:"vertical",role:"menu",style:{minWidth:"200px"}},(0,r.createElement)(vt.MenuGroup,{label:(0,i.__)("Select language","code-block-pro")},Object.entries(wt).map((e=>{let[a,o]=e;return(0,r.createElement)(vt.MenuItem,{key:a,role:"menuitem",style:{width:"100%"},isSelected:t===a,variant:t===a?"primary":void 0,onClick:()=>{n(a)}},o)}))))},Et=e=>{var t;let{attributes:n}=e;return(0,r.createElement)("span",{role:"button",tabIndex:0,"data-code":n.code,style:{color:null!==(t=null==n?void 0:n.textColor)&&void 0!==t?t:"inherit",display:"none"},"aria-label":(0,i.__)("Copy","code-block-pro"),className:"code-block-pro-copy-button"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:24,height:24},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,r.createElement)("path",{className:"with-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),(0,r.createElement)("path",{className:"without-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})))};(0,o.registerBlockType)(c.name,{...c,icon:bt,attributes:{code:{type:"string"},codeHTML:{type:"string"},language:{type:"string"},theme:{type:"string"},align:{type:"string",default:"none"},bgColor:{type:"string",default:"#282a37"},textColor:{type:"string",default:"#f8f8f2"},lineNumbers:{type:"boolean"},startingLineNumber:{type:"number",default:1},frame:{type:"boolean"},renderType:{type:"string",default:"code"},label:{type:"string",default:""},copyButton:{type:"boolean"}},title:(0,i.__)("Code Pro","code-block-pro"),edit:e=>{let{attributes:t,setAttributes:n}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Pt,{attributes:t,setAttributes:n}),(0,r.createElement)(Nt,{attributes:t,setAttributes:n}),(0,r.createElement)("div",(0,a.useBlockProps)({className:"code-block-pro-editor"}),(0,r.createElement)(mt,{attributes:t,setAttributes:n})))},save:e=>{var t;let{attributes:n}=e;return(0,r.createElement)("div",a.useBlockProps.save(),(null===(t=n.code)||void 0===t?void 0:t.length)>0?(0,r.createElement)(r.Fragment,null,n.copyButton&&(0,r.createElement)(Et,{attributes:n}),(0,r.createElement)(a.RichText.Content,{value:n.codeHTML})):null)}}),(0,s.addFilter)("editor.BlockEdit",c.name,(e=>t=>((e,t)=>{const{attributes:n,clientId:s}=t,{previousLanguage:u}=ft(),l=(0,yt.useSelect)((e=>{const t=e(a.store).getBlock(s);return["core/code","syntaxhighlighter/code"].includes(t.name)}),[s]),{replaceBlock:p}=(0,yt.useDispatch)(a.store),h=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value};return l?(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(e,t),(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(vt.ToolbarGroup,null,(0,r.createElement)(vt.ToolbarButton,{icon:bt,label:(0,i.__)("Convert to Code Pro","code-block-pro"),onClick:()=>{var e;const t=(0,o.createBlock)(c.name,{code:null!=n&&n.content?h(n.content):void 0,language:null!==(e=St(null==n?void 0:n.language))&&void 0!==e?e:u});p(s,[t])}})))):(0,r.createElement)(e,t)})(e,t)))},460:function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)},s=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return i(t,e),t},u=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var l=c(n(196)),p=90,h=219,d=222,f=192,g=100,m="undefined"!=typeof window&&"navigator"in window&&/Win/i.test(navigator.platform),v="undefined"!=typeof window&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),y="npm__react-simple-code-editor__textarea",b="\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.".concat(y,":empty {\n -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n /**\n * IE doesn't support '-webkit-text-fill-color'\n * So we use 'color: transparent' to make the text transparent on IE\n * Unlike other browsers, it doesn't affect caret color in IE\n */\n .").concat(y," {\n color: transparent !important;\n }\n\n .").concat(y,"::selection {\n background-color: #accef7 !important;\n color: transparent !important;\n }\n}\n"),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={capture:!0},t._recordCurrentState=function(){var e=t._input;if(e){var n=e.value,r=e.selectionStart,a=e.selectionEnd;t._recordChange({value:n,selectionStart:r,selectionEnd:a})}},t._getLines=function(e,t){return e.substring(0,t).split("\n")},t._recordChange=function(e,n){var r,a,s;void 0===n&&(n=!1);var i=t._history,c=i.stack,u=i.offset;if(c.length&&u>-1){t._history.stack=c.slice(0,u+1);var l=t._history.stack.length;if(l>g){var p=l-g;t._history.stack=c.slice(p,l),t._history.offset=Math.max(t._history.offset-p,0)}}var h=Date.now();if(n){var d=t._history.stack[t._history.offset];if(d&&h-d.timestamp<3e3){var f=/[^a-z0-9]([a-z0-9]+)$/i,m=null===(r=t._getLines(d.value,d.selectionStart).pop())||void 0===r?void 0:r.match(f),v=null===(a=t._getLines(e.value,e.selectionStart).pop())||void 0===a?void 0:a.match(f);if((null==m?void 0:m[1])&&(null===(s=null==v?void 0:v[1])||void 0===s?void 0:s.startsWith(m[1])))return void(t._history.stack[t._history.offset]=o(o({},e),{timestamp:h}))}}t._history.stack.push(o(o({},e),{timestamp:h})),t._history.offset++},t._updateInput=function(e){var n=t._input;n&&(n.value=e.value,n.selectionStart=e.selectionStart,n.selectionEnd=e.selectionEnd,t.props.onValueChange(e.value))},t._applyEdits=function(e){var n=t._input,r=t._history.stack[t._history.offset];r&&n&&(t._history.stack[t._history.offset]=o(o({},r),{selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})),t._recordChange(e),t._updateInput(e)},t._undoEdit=function(){var e=t._history,n=e.stack,r=e.offset,a=n[r-1];a&&(t._updateInput(a),t._history.offset=Math.max(r-1,0))},t._redoEdit=function(){var e=t._history,n=e.stack,r=e.offset,a=n[r+1];a&&(t._updateInput(a),t._history.offset=Math.min(r+1,n.length-1))},t._handleKeyDown=function(e){var n=t.props,r=n.tabSize,a=n.insertSpaces,o=n.ignoreTabKey,s=n.onKeyDown;if(!s||(s(e),!e.defaultPrevented)){27===e.keyCode&&e.currentTarget.blur();var i=e.currentTarget,c=i.value,u=i.selectionStart,l=i.selectionEnd,g=(a?" ":"\t").repeat(r);if(9===e.keyCode&&!o&&t.state.capture)if(e.preventDefault(),e.shiftKey){var y=(S=t._getLines(c,u)).length-1,b=t._getLines(c,l).length-1,_=c.split("\n").map((function(e,t){return t>=y&&t<=b&&e.startsWith(g)?e.substring(g.length):e})).join("\n");if(c!==_){var k=S[y];t._applyEdits({value:_,selectionStart:(null==k?void 0:k.startsWith(g))?u-g.length:u,selectionEnd:l-(c.length-_.length)})}}else if(u!==l){var S,w=(S=t._getLines(c,u)).length-1,L=t._getLines(c,l).length-1;k=S[w],t._applyEdits({value:c.split("\n").map((function(e,t){return t>=w&&t<=L?g+e:e})).join("\n"),selectionStart:k&&/\S/.test(k)?u+g.length:u,selectionEnd:l+g.length*(L-w+1)})}else{var C=u+g.length;t._applyEdits({value:c.substring(0,u)+g+c.substring(l),selectionStart:C,selectionEnd:C})}else if(8===e.keyCode){var j=u!==l;c.substring(0,u).endsWith(g)&&!j&&(e.preventDefault(),C=u-g.length,t._applyEdits({value:c.substring(0,u-g.length)+c.substring(l),selectionStart:C,selectionEnd:C}))}else if(13===e.keyCode){if(u===l){var x=t._getLines(c,u).pop(),P=null==x?void 0:x.match(/^\s+/);if(null==P?void 0:P[0]){e.preventDefault();var N="\n"+P[0];C=u+N.length,t._applyEdits({value:c.substring(0,u)+N+c.substring(l),selectionStart:C,selectionEnd:C})}}}else if(57===e.keyCode||e.keyCode===h||e.keyCode===d||e.keyCode===f){var T=void 0;57===e.keyCode&&e.shiftKey?T=["(",")"]:e.keyCode===h?T=e.shiftKey?["{","}"]:["[","]"]:e.keyCode===d?T=e.shiftKey?['"','"']:["'","'"]:e.keyCode!==f||e.shiftKey||(T=["`","`"]),u!==l&&T&&(e.preventDefault(),t._applyEdits({value:c.substring(0,u)+T[0]+c.substring(u,l)+T[1]+c.substring(l),selectionStart:u,selectionEnd:l+2}))}else!(v?e.metaKey&&e.keyCode===p:e.ctrlKey&&e.keyCode===p)||e.shiftKey||e.altKey?(v?e.metaKey&&e.keyCode===p&&e.shiftKey:m?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&e.keyCode===p&&e.shiftKey)&&!e.altKey?(e.preventDefault(),t._redoEdit()):77!==e.keyCode||!e.ctrlKey||v&&!e.shiftKey||(e.preventDefault(),t.setState((function(e){return{capture:!e.capture}}))):(e.preventDefault(),t._undoEdit())}},t._handleChange=function(e){var n=e.currentTarget,r=n.value,a=n.selectionStart,o=n.selectionEnd;t._recordChange({value:r,selectionStart:a,selectionEnd:o},!0),t.props.onValueChange(r)},t._history={stack:[],offset:-1},t._input=null,t}return a(t,e),t.prototype.componentDidMount=function(){this._recordCurrentState()},Object.defineProperty(t.prototype,"session",{get:function(){return{history:this._history}},set:function(e){this._history=e.history},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.value,r=t.style,a=t.padding,s=t.highlight,i=t.textareaId,c=t.textareaClassName,p=t.autoFocus,h=t.disabled,d=t.form,f=t.maxLength,g=t.minLength,m=t.name,v=t.placeholder,_=t.readOnly,S=t.required,w=t.onClick,L=t.onFocus,C=t.onBlur,j=t.onKeyUp,x=(t.onKeyDown,t.onValueChange,t.tabSize,t.insertSpaces,t.ignoreTabKey,t.preClassName),P=u(t,["value","style","padding","highlight","textareaId","textareaClassName","autoFocus","disabled","form","maxLength","minLength","name","placeholder","readOnly","required","onClick","onFocus","onBlur","onKeyUp","onKeyDown","onValueChange","tabSize","insertSpaces","ignoreTabKey","preClassName"]),N={paddingTop:a,paddingRight:a,paddingBottom:a,paddingLeft:a},T=s(n);return l.createElement("div",o({},P,{style:o(o({},k.container),r)}),l.createElement("textarea",{ref:function(t){return e._input=t},style:o(o(o({},k.editor),k.textarea),N),className:y+(c?" ".concat(c):""),id:i,value:n,onChange:this._handleChange,onKeyDown:this._handleKeyDown,onClick:w,onKeyUp:j,onFocus:L,onBlur:C,disabled:h,form:d,maxLength:f,minLength:g,name:m,placeholder:v,readOnly:_,required:S,autoFocus:p,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),l.createElement("pre",o({className:x,"aria-hidden":"true",style:o(o(o({},k.editor),k.highlight),N)},"string"==typeof T?{dangerouslySetInnerHTML:{__html:T+"<br />"}}:{children:T})),l.createElement("style",{type:"text/css",dangerouslySetInnerHTML:{__html:b}}))},t.defaultProps={tabSize:2,insertSpaces:!0,ignoreTabKey:!1,padding:0},t}(l.Component);t.default=_;var k={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}}},250:(e,t,n)=>{"use strict";var r=n(196),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,i=r.useLayoutEffect,c=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),a=r[0].inst,l=r[1];return i((function(){a.value=n,a.getSnapshot=t,u(a)&&l({inst:a})}),[e,n,t]),s((function(){return u(a)&&l({inst:a}),e((function(){u(a)&&l({inst:a})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},139:(e,t,n)=>{"use strict";var r=n(196),a=n(688),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=a.useSyncExternalStore,i=r.useRef,c=r.useEffect,u=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,a){var p=i(null);if(null===p.current){var h={hasValue:!1,value:null};p.current=h}else h=p.current;p=u((function(){function e(e){if(!c){if(c=!0,s=e,e=r(e),void 0!==a&&h.hasValue){var t=h.value;if(a(t,e))return i=t}return i=e}if(t=i,o(s,e))return t;var n=r(e);return void 0!==a&&a(t,n)?t:(s=e,i=n)}var s,i,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,a]);var d=s(e,p[0],p[1]);return c((function(){h.hasValue=!0,h.value=d}),[d]),l(d),d}},688:(e,t,n)=>{"use strict";e.exports=n(250)},798:(e,t,n)=>{"use strict";e.exports=n(139)},930:function(e){var t,n;e.exports=(t={770:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultDebugCall=t.createOnigScanner=t.createOnigString=t.loadWASM=t.OnigScanner=t.OnigString=void 0;const a=r(n(418));let o=null,s=!1;class i{constructor(e){const t=e.length,n=i._utf8ByteLength(e),r=n!==t,a=r?new Uint32Array(t+1):null;r&&(a[t]=n);const o=r?new Uint32Array(n+1):null;r&&(o[n]=t);const s=new Uint8Array(n);let c=0;for(let n=0;n<t;n++){const i=e.charCodeAt(n);let u=i,l=!1;if(i>=55296&&i<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(u=65536+(i-55296<<10)|t-56320,l=!0)}r&&(a[n]=c,l&&(a[n+1]=c),u<=127?o[c+0]=n:u<=2047?(o[c+0]=n,o[c+1]=n):u<=65535?(o[c+0]=n,o[c+1]=n,o[c+2]=n):(o[c+0]=n,o[c+1]=n,o[c+2]=n,o[c+3]=n)),u<=127?s[c++]=u:u<=2047?(s[c++]=192|(1984&u)>>>6,s[c++]=128|(63&u)>>>0):u<=65535?(s[c++]=224|(61440&u)>>>12,s[c++]=128|(4032&u)>>>6,s[c++]=128|(63&u)>>>0):(s[c++]=240|(1835008&u)>>>18,s[c++]=128|(258048&u)>>>12,s[c++]=128|(4032&u)>>>6,s[c++]=128|(63&u)>>>0),l&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){const a=e.charCodeAt(n);let o=a,s=!1;if(a>=55296&&a<=56319&&n+1<r){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(o=65536+(a-55296<<10)|t-56320,s=!0)}t+=o<=127?1:o<=2047?2:o<=65535?3:4,s&&n++}return t}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class c{constructor(e){if(this.id=++c.LAST_ID,!o)throw new Error("Must invoke loadWASM first.");this._onigBinding=o,this.content=e;const t=new i(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!c._sharedPtrInUse?(c._sharedPtr||(c._sharedPtr=o._omalloc(1e4)),c._sharedPtrInUse=!0,o.HEAPU8.set(t.utf8Value,c._sharedPtr),this.ptr=c._sharedPtr):this.ptr=t.createString(o)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===c._sharedPtr?c._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}t.OnigString=c,c.LAST_ID=0,c._sharedPtr=0,c._sharedPtrInUse=!1;class u{constructor(e){if(!o)throw new Error("Must invoke loadWASM first.");const t=[],n=[];for(let r=0,a=e.length;r<a;r++){const a=new i(e[r]);t[r]=a.createString(o),n[r]=a.utf8Length}const r=o._omalloc(4*e.length);o.HEAPU32.set(t,r/4);const a=o._omalloc(4*e.length);o.HEAPU32.set(n,a/4);const s=o._createOnigScanner(r,a,e.length);for(let n=0,r=e.length;n<r;n++)o._ofree(t[n]);o._ofree(a),o._ofree(r),0===s&&function(e){throw new Error(e.UTF8ToString(e._getLastOnigError()))}(o),this._onigBinding=o,this._ptr=s}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=s,a=0;if("number"==typeof n?(8&n&&(r=!0),a=n):"boolean"==typeof n&&(r=n),"string"==typeof e){e=new c(e);const n=this._findNextMatchSync(e,t,r,a);return e.dispose(),n}return this._findNextMatchSync(e,t,r,a)}_findNextMatchSync(e,t,n,r){const a=this._onigBinding;let o;if(o=n?a._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r):a._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r),0===o)return null;const s=a.HEAPU32;let i=o/4;const c=s[i++],u=s[i++];let l=[];for(let t=0;t<u;t++){const n=e.convertUtf8OffsetToUtf16(s[i++]),r=e.convertUtf8OffsetToUtf16(s[i++]);l[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:l}}}t.OnigScanner=u;let l=!1,p=null;t.loadWASM=function(e){if(l)return p;let t,n,r,s;if(l=!0,function(e){return"function"==typeof e.instantiator}(e))t=e.instantiator,n=e.print;else{let r;!function(e){return void 0!==e.data}(e)?r=e:(r=e.data,n=e.print),t=function(e){return"undefined"!=typeof Response&&e instanceof Response}(r)?"function"==typeof WebAssembly.instantiateStreaming?function(e){return t=>WebAssembly.instantiateStreaming(e,t)}(r):function(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(r):function(e){return t=>WebAssembly.instantiate(e,t)}(r)}return p=new Promise(((e,t)=>{r=e,s=t})),function(e,t,n,r){a.default({print:t,instantiateWasm:(t,n)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>n(e.instance)),r),{}}}).then((e=>{o=e,n()}))}(t,n,r,s),p},t.createOnigString=function(e){return new c(e)},t.createOnigScanner=function(e){return new u(e)},t.setDefaultDebugCall=function(e){s=e}},418:e=>{var t=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,n,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,r){t=e,n=r}));var a,o={};for(a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);var s,i=[],c=!1,u=!1,l="";function p(e){return r.locateFile?r.locateFile(e,l):l+e}s=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(y("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?i=scriptArgs:void 0!==arguments&&(i=arguments),"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var h=r.print||console.log.bind(console),d=r.printErr||console.warn.bind(console);for(a in o)o.hasOwnProperty(a)&&(r[a]=o[a]);o=null,r.arguments&&(i=r.arguments),r.thisProgram&&r.thisProgram,r.quit&&r.quit;var f,g,m=function(e){};r.wasmBinary&&(f=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&q("no native wasm support detected");var v=!1;function y(e,t){e||q("Assertion failed: "+t)}var b,_,k,S="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function w(e,t,n){for(var r=t+n,a=t;e[a]&&!(a>=r);)++a;if(a-t>16&&e.subarray&&S)return S.decode(e.subarray(t,a));for(var o="";t<a;){var s=e[t++];if(128&s){var i=63&e[t++];if(192!=(224&s)){var c=63&e[t++];if((s=224==(240&s)?(15&s)<<12|i<<6|c:(7&s)<<18|i<<12|c<<6|63&e[t++])<65536)o+=String.fromCharCode(s);else{var u=s-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&s)<<6|i)}else o+=String.fromCharCode(s)}return o}function L(e,t){return e?w(_,e,t):""}function C(e,t){return e%t>0&&(e+=t-e%t),e}function j(e){b=e,r.HEAP8=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=k=new Int32Array(e),r.HEAPU8=_=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le"),r.INITIAL_MEMORY;var x,P=[],N=[],T=[],E=[];function O(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)M(r.preRun.shift());Y(P)}function R(){Y(N)}function A(){Y(T)}function I(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)D(r.postRun.shift());Y(E)}function M(e){P.unshift(e)}function D(e){E.unshift(e)}N.push({func:function(){ce()}});var G=0,F=null,B=null;function W(e){G++,r.monitorRunDependencies&&r.monitorRunDependencies(G)}function U(e){if(G--,r.monitorRunDependencies&&r.monitorRunDependencies(G),0==G&&(null!==F&&(clearInterval(F),F=null),B)){var t=B;B=null,t()}}function q(e){r.onAbort&&r.onAbort(e),d(e+=""),v=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function $(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}r.preloadedImages={},r.preloadedAudios={};var z="data:application/octet-stream;base64,";function H(e){return $(e,z)}var V,K="onig.wasm";function J(e){try{if(e==K&&f)return new Uint8Array(f);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}catch(e){q(e)}}function Q(){return f||!c&&!u||"function"!=typeof fetch?Promise.resolve().then((function(){return J(K)})):fetch(K,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+K+"'";return e.arrayBuffer()})).catch((function(){return J(K)}))}function X(){var e={env:ie,wasi_snapshot_preview1:ie};function t(e,t){var n=e.exports;r.asm=n,j((g=r.asm.memory).buffer),x=r.asm.__indirect_function_table,U()}function a(e){t(e.instance)}function o(t){return Q().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){d("failed to asynchronously prepare wasm: "+e),q(e)}))}if(W(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){return d("Module.instantiateWasm callback failed with error: "+e),!1}return(f||"function"!=typeof WebAssembly.instantiateStreaming||H(K)||"function"!=typeof fetch?o(a):fetch(K,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(a,(function(e){return d("wasm streaming compile failed: "+e),d("falling back to ArrayBuffer instantiation"),o(a)}))}))).catch(n),{}}function Y(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?x.get(n)():x.get(n)(t.arg):n(void 0===t.arg?null:t.arg)}else t(r)}}function Z(e,t,n){_.copyWithin(e,t,t+n)}function ee(){return _.length}function te(e){try{return g.grow(e-b.byteLength+65535>>>16),j(g.buffer),1}catch(e){}}function ne(e){var t=ee(),n=2147483648;if(e>n)return!1;for(var r=1;r<=4;r*=2){var a=t*(1+.2/r);if(a=Math.min(a,e+100663296),te(Math.min(n,C(Math.max(e,a),65536))))return!0}return!1}H(K)||(K=p(K)),V="undefined"!=typeof dateNow?dateNow:function(){return performance.now()};var re={mappings:{},buffers:[null,[],[]],printChar:function(e,t){var n=re.buffers[e];0===t||10===t?((1===e?h:d)(w(n,0)),n.length=0):n.push(t)},varargs:void 0,get:function(){return re.varargs+=4,k[re.varargs-4>>2]},getStr:function(e){return L(e)},get64:function(e,t){return e}};function ae(e,t,n,r){for(var a=0,o=0;o<n;o++){for(var s=k[t+8*o>>2],i=k[t+(8*o+4)>>2],c=0;c<i;c++)re.printChar(e,_[s+c]);a+=i}return k[r>>2]=a,0}function oe(e){m(0|e)}var se,ie={emscripten_get_now:V,emscripten_memcpy_big:Z,emscripten_resize_heap:ne,fd_write:ae,setTempRet0:oe},ce=(X(),r.___wasm_call_ctors=function(){return(ce=r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)});function ue(e){function n(){se||(se=!0,r.calledRun=!0,v||(R(),A(),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),I()))}e=e||i,G>0||(O(),G>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(r.___errno_location=function(){return(r.___errno_location=r.asm.__errno_location).apply(null,arguments)},r._omalloc=function(){return(r._omalloc=r.asm.omalloc).apply(null,arguments)},r._ofree=function(){return(r._ofree=r.asm.ofree).apply(null,arguments)},r._getLastOnigError=function(){return(r._getLastOnigError=r.asm.getLastOnigError).apply(null,arguments)},r._createOnigScanner=function(){return(r._createOnigScanner=r.asm.createOnigScanner).apply(null,arguments)},r._freeOnigScanner=function(){return(r._freeOnigScanner=r.asm.freeOnigScanner).apply(null,arguments)},r._findNextOnigScannerMatch=function(){return(r._findNextOnigScannerMatch=r.asm.findNextOnigScannerMatch).apply(null,arguments)},r._findNextOnigScannerMatchDbg=function(){return(r._findNextOnigScannerMatchDbg=r.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},r.stackSave=function(){return(r.stackSave=r.asm.stackSave).apply(null,arguments)},r.stackRestore=function(){return(r.stackRestore=r.asm.stackRestore).apply(null,arguments)},r.stackAlloc=function(){return(r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r.UTF8ToString=L,B=function e(){se||ue(),se||(B=e)},r.run=ue,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return ue(),e.ready});e.exports=t}},n={},function e(r){var a=n[r];if(void 0!==a)return a.exports;var o=n[r]={exports:{}};return t[r].call(o.exports,o,o.exports,e),o.exports}(770))},190:function(e){e.exports=(()=>{"use strict";var e={350:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:"undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},527:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t.StackElement=t.ScopeListElement=t.StackElementMetadata=t.Grammar=t.ScopeMetadata=t.ScopeDependencyProcessor=t.ScopeDependencyCollector=t.PartialScopeDependency=t.FullScopeDependency=t.createGrammar=void 0;var r=n(878),a=n(792),o=n(736),s=n(350),i="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()};t.createGrammar=function(e,t,n,r,a,o,s){return new k(e,t,n,r,a,o,s)};var c=function(e){this.scopeName=e};t.FullScopeDependency=c;var u=function(){function e(e,t){this.scopeName=e,this.include=t}return e.prototype.toKey=function(){return this.scopeName+"#"+this.include},e}();t.PartialScopeDependency=u;var l=function(){function e(){this.full=[],this.partial=[],this.visitedRule=new Set,this._seenFull=new Set,this._seenPartial=new Set}return e.prototype.add=function(e){e instanceof c?this._seenFull.has(e.scopeName)||(this._seenFull.add(e.scopeName),this.full.push(e)):this._seenPartial.has(e.toKey())||(this._seenPartial.add(e.toKey()),this.partial.push(e))},e}();function p(e,t,n,a,o){for(var s=0,i=a;s<i.length;s++){var l=i[s];if(!e.visitedRule.has(l)){e.visitedRule.add(l);var h=l.repository?r.mergeObjects({},o,l.repository):o;Array.isArray(l.patterns)&&p(e,t,n,l.patterns,h);var d=l.include;if(d)if("$base"===d||d===t.scopeName)g(e,t,t);else if("$self"===d||d===n.scopeName)g(e,t,n);else if("#"===d.charAt(0))f(e,t,n,d.substring(1),h);else{var m=d.indexOf("#");if(m>=0){var v=d.substring(0,m),y=d.substring(m+1);v===t.scopeName?f(e,t,t,y,h):v===n.scopeName?f(e,t,n,y,h):e.add(new u(v,d.substring(m+1)))}else e.add(new c(d))}}}}t.ScopeDependencyCollector=l;var h=function(){function e(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new c(this.initialScopeName)]}return e.prototype.processQueue=function(){var e=this.Q;this.Q=[];for(var t=new l,n=0,r=e;n<r.length;n++){var a=r[n];d(this.repo,this.initialScopeName,t,a)}for(var o=0,s=t.full;o<s.length;o++)a=s[o],this.seenFullScopeRequests.has(a.scopeName)||(this.seenFullScopeRequests.add(a.scopeName),this.Q.push(a));for(var i=0,c=t.partial;i<c.length;i++)a=c[i],this.seenFullScopeRequests.has(a.scopeName)||this.seenPartialScopeRequests.has(a.toKey())||(this.seenPartialScopeRequests.add(a.toKey()),this.Q.push(a))},e}();function d(e,t,n,r){var a=e.lookup(r.scopeName);if(a){r instanceof c?g(n,e.lookup(t),a):f(n,e.lookup(t),a,r.include);var o=e.injections(r.scopeName);if(o)for(var s=0,i=o;s<i.length;s++){var u=i[s];n.add(new c(u))}}else if(r.scopeName===t)throw new Error("No grammar provided for <"+t+">")}function f(e,t,n,r,a){void 0===a&&(a=n.repository),a&&a[r]&&p(e,t,n,[a[r]],a)}function g(e,t,n){if(n.patterns&&Array.isArray(n.patterns)&&p(e,t,n,n.patterns,n.repository),n.injections){var r=[];for(var a in n.injections)r.push(n.injections[a]);p(e,t,n,r,n.repository)}}function m(e,t){if(!e)return!1;if(e===t)return!0;var n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}function v(e,t){if(t.length<e.length)return!1;var n=0;return e.every((function(e){for(var r=n;r<t.length;r++)if(m(t[r],e))return n=r+1,!0;return!1}))}function y(e,t,n,r,s){for(var i=o.createMatchers(t,v),c=a.RuleFactory.getCompiledRuleId(n,r,s.repository),u=0,l=i;u<l.length;u++){var p=l[u];e.push({debugSelector:t,matcher:p.matcher,ruleId:c,grammar:s,priority:p.priority})}}t.ScopeDependencyProcessor=h;var b=function(e,t,n,r){this.scopeName=e,this.languageId=t,this.tokenType=n,this.themeData=r};t.ScopeMetadata=b;var _=function(){function e(t,n,r){if(this._initialLanguage=t,this._themeProvider=n,this._cache=new Map,this._defaultMetaData=new b("",this._initialLanguage,0,[this._themeProvider.getDefaults()]),this._embeddedLanguages=Object.create(null),r)for(var a=Object.keys(r),o=0,s=a.length;o<s;o++){var i=a[o],c=r[i];"number"==typeof c&&0!==c?this._embeddedLanguages[i]=c:console.warn("Invalid embedded language found at scope "+i+": <<"+c+">>")}var u=Object.keys(this._embeddedLanguages).map((function(t){return e._escapeRegExpCharacters(t)}));0===u.length?this._embeddedLanguagesRegex=null:(u.sort(),u.reverse(),this._embeddedLanguagesRegex=new RegExp("^(("+u.join(")|(")+"))($|\\.)",""))}return e.prototype.onDidChangeTheme=function(){this._cache=new Map,this._defaultMetaData=new b("",this._initialLanguage,0,[this._themeProvider.getDefaults()])},e.prototype.getDefaultMetadata=function(){return this._defaultMetaData},e._escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},e.prototype.getMetadataForScope=function(t){if(null===t)return e._NULL_SCOPE_METADATA;var n=this._cache.get(t);return n||(n=this._doGetMetadataForScope(t),this._cache.set(t,n),n)},e.prototype._doGetMetadataForScope=function(e){var t=this._scopeToLanguage(e),n=this._toStandardTokenType(e),r=this._themeProvider.themeMatch(e);return new b(e,t,n,r)},e.prototype._scopeToLanguage=function(e){if(!e)return 0;if(!this._embeddedLanguagesRegex)return 0;var t=e.match(this._embeddedLanguagesRegex);return t&&(this._embeddedLanguages[t[1]]||0)||0},e.prototype._toStandardTokenType=function(t){var n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 0;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 8}throw new Error("Unexpected match for standard token type!")},e._NULL_SCOPE_METADATA=new b("",0,0,null),e.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/,e}(),k=function(){function e(e,t,n,r,a,s,i){if(this._scopeName=e,this._scopeMetadataProvider=new _(n,s,r),this._onigLib=i,this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=w(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(var c=0,u=Object.keys(a);c<u.length;c++)for(var l=u[c],p=0,h=o.createMatchers(l,v);p<h.length;p++){var d=h[p];this._tokenTypeMatchers.push({matcher:d.matcher,type:a[l]})}}return e.prototype.dispose=function(){for(var e=0,t=this._ruleId2desc;e<t.length;e++){var n=t[e];n&&n.dispose()}},e.prototype.createOnigScanner=function(e){return this._onigLib.createOnigScanner(e)},e.prototype.createOnigString=function(e){return this._onigLib.createOnigString(e)},e.prototype.onDidChangeTheme=function(){this._scopeMetadataProvider.onDidChangeTheme()},e.prototype.getMetadataForScope=function(e){return this._scopeMetadataProvider.getMetadataForScope(e)},e.prototype._collectInjections=function(){var e=this,t={lookup:function(t){return t===e._scopeName?e._grammar:e.getExternalGrammar(t)},injections:function(t){return e._grammarRepository.injections(t)}},n=new h(t,this._scopeName),r=[];return n.seenFullScopeRequests.forEach((function(n){var a=t.lookup(n);if(a){var o=a.injections;if(o)for(var s in o)y(r,s,o[s],e,a);if(e._grammarRepository){var i=e._grammarRepository.injections(n);i&&i.forEach((function(t){var n=e.getExternalGrammar(t);if(n){var a=n.injectionSelector;a&&y(r,a,n,e,n)}}))}}})),r.sort((function(e,t){return e.priority-t.priority})),r},e.prototype.getInjections=function(){if(null===this._injections&&(this._injections=this._collectInjections(),s.DebugFlags.InDebugMode&&this._injections.length>0)){console.log("Grammar "+this._scopeName+" contains the following injections:");for(var e=0,t=this._injections;e<t.length;e++){var n=t[e];console.log(" - "+n.debugSelector)}}return this._injections},e.prototype.registerRule=function(e){var t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n},e.prototype.getRule=function(e){return this._ruleId2desc[e]},e.prototype.getExternalGrammar=function(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){var n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=w(n,t&&t.$base),this._includedGrammars[e]}},e.prototype.tokenizeLine=function(e,t,n){void 0===n&&(n=0);var r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}},e.prototype.tokenizeLine2=function(e,t,n){void 0===n&&(n=0);var r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}},e.prototype._tokenize=function(e,t,n,r){var o;if(-1===this._rootId&&(this._rootId=a.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),t&&t!==R.NULL)o=!1,t.reset();else{o=!0;var s=this._scopeMetadataProvider.getDefaultMetadata(),i=s.themeData[0],c=E.set(0,s.languageId,s.tokenType,i.fontStyle,i.foreground,i.background),u=this.getRule(this._rootId).getName(null,null),l=this._scopeMetadataProvider.getMetadataForScope(u),p=O.mergeMetadata(c,null,l),h=new O(null,null===u?"unknown":u,p);t=new R(null,this._rootId,-1,-1,!1,null,h,h)}e+="\n";var d=this.createOnigString(e),f=d.content.length,g=new I(n,e,this._tokenTypeMatchers),m=T(this,d,o,0,t,g,!0,r);return S(d),{lineLength:f,lineTokens:g,ruleStack:m.stack,stoppedEarly:m.stoppedEarly}},e}();function S(e){"function"==typeof e.dispose&&e.dispose()}function w(e,t){return(e=r.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}function L(e,t,n,r,a,o,s){if(0!==o.length){for(var i=t.content,c=Math.min(o.length,s.length),u=[],l=s[0].end,p=0;p<c;p++){var h=o[p];if(null!==h){var d=s[p];if(0!==d.length){if(d.start>l)break;for(;u.length>0&&u[u.length-1].endPos<=d.start;)a.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?a.produceFromScopes(u[u.length-1].scopes,d.start):a.produce(r,d.start),h.retokenizeCapturedWithRuleId){var f=h.getName(i,s),g=r.contentNameScopesList.push(e,f),m=h.getContentName(i,s),v=g.push(e,m),y=r.push(h.retokenizeCapturedWithRuleId,d.start,-1,!1,null,g,v),b=e.createOnigString(i.substring(0,d.end));T(e,b,n&&0===d.start,d.start,y,a,!1,0),S(b)}else{var _=h.getName(i,s);if(null!==_){var k=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).push(e,_);u.push(new A(k,d.end))}}}}}for(;u.length>0;)a.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}}function C(e){for(var t=[],n=0,r=e.rules.length;n<r;n++)t.push(" - "+e.rules[n]+": "+e.debugRegExps[n]);return t.join("\n")}function j(e,t){var n=0;return e||(n|=1),t||(n|=4),n}function x(e,t,n,r,a){return s.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:j(r,a)}:{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function P(e,t,n,r,a){return s.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:j(r,a)}:{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}t.Grammar=k;var N=function(e,t){this.stack=e,this.stoppedEarly=t};function T(e,t,n,r,o,c,u,l){var p=t.content.length,h=!1,d=-1;if(u){var f=function(e,t,n,r,o,i){for(var c=o.beginRuleCapturedEOL?0:-1,u=[],l=o;l;l=l.pop()){var p=l.getRule(e);p instanceof a.BeginWhileRule&&u.push({rule:p,stack:l})}for(var h=u.pop();h;h=u.pop()){var d=P(h.rule,e,h.stack.endRule,n,r===c),f=d.ruleScanner,g=d.findOptions,m=f.scanner.findNextMatchSync(t,r,g);if(s.DebugFlags.InDebugMode&&(console.log(" scanning for while rule"),console.log(C(f))),!m){s.DebugFlags.InDebugMode&&console.log(" popping "+h.rule.debugName+" - "+h.rule.debugWhileRegExp),o=h.stack.pop();break}if(-2!==f.rules[m.index]){o=h.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(i.produce(h.stack,m.captureIndices[0].start),L(e,t,n,h.stack,i,h.rule.whileCaptures,m.captureIndices),i.produce(h.stack,m.captureIndices[0].end),c=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}return{stack:o,linePos:r,anchorPosition:c,isFirstLine:n}}(e,t,n,r,o,c);o=f.stack,r=f.linePos,n=f.isFirstLine,d=f.anchorPosition}for(var g=Date.now();!h;){if(0!==l&&Date.now()-g>l)return new N(o,!0);m()}return new N(o,!1);function m(){s.DebugFlags.InDebugMode&&(console.log(""),console.log("@@scanNext "+r+": |"+t.content.substr(r).replace(/\n$/,"\\n")+"|"));var u=function(e,t,n,r,a,o){var c=function(e,t,n,r,a,o){var c=a.getRule(e),u=x(c,e,a.endRule,n,r===o),l=u.ruleScanner,p=u.findOptions,h=0;s.DebugFlags.InDebugMode&&(h=i());var d=l.scanner.findNextMatchSync(t,r,p);if(s.DebugFlags.InDebugMode){var f=i()-h;f>5&&console.warn("Rule "+c.debugName+" ("+c.id+") matching took "+f+" against '"+t+"'"),console.log(" scanning for (linePos: "+r+", anchorPosition: "+o+")"),console.log(C(l)),d&&console.log("matched rule id: "+l.rules[d.index]+" from "+d.captureIndices[0].start+" to "+d.captureIndices[0].end)}return d?{captureIndices:d.captureIndices,matchedRuleId:l.rules[d.index]}:null}(e,t,n,r,a,o),u=e.getInjections();if(0===u.length)return c;var l=function(e,t,n,r,a,o,i){for(var c,u=Number.MAX_VALUE,l=null,p=0,h=o.contentNameScopesList.generateScopes(),d=0,f=e.length;d<f;d++){var g=e[d];if(g.matcher(h)){var m=x(t.getRule(g.ruleId),t,null,r,a===i),v=m.ruleScanner,y=m.findOptions,b=v.scanner.findNextMatchSync(n,a,y);if(b){s.DebugFlags.InDebugMode&&(console.log(" matched injection: "+g.debugSelector),console.log(C(v)));var _=b.captureIndices[0].start;if(!(_>=u)&&(u=_,l=b.captureIndices,c=v.rules[b.index],p=g.priority,u===a))break}}}return l?{priorityMatch:-1===p,captureIndices:l,matchedRuleId:c}:null}(u,e,t,n,r,a,o);if(!l)return c;if(!c)return l;var p=c.captureIndices[0].start,h=l.captureIndices[0].start;return h<p||l.priorityMatch&&h===p?l:c}(e,t,n,r,o,d);if(!u)return s.DebugFlags.InDebugMode&&console.log(" no more matches."),c.produce(o,p),void(h=!0);var l=u.captureIndices,f=u.matchedRuleId,g=!!(l&&l.length>0)&&l[0].end>r;if(-1===f){var m=o.getRule(e);s.DebugFlags.InDebugMode&&console.log(" popping "+m.debugName+" - "+m.debugEndRegExp),c.produce(o,l[0].start),o=o.setContentNameScopesList(o.nameScopesList),L(e,t,n,o,c,m.endCaptures,l),c.produce(o,l[0].end);var v=o;if(o=o.pop(),d=v.getAnchorPos(),!g&&v.getEnterPos()===r)return s.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),o=v,c.produce(o,p),void(h=!0)}else{var y=e.getRule(f);c.produce(o,l[0].start);var b=o,_=y.getName(t.content,l),k=o.contentNameScopesList.push(e,_);if(o=o.push(f,r,d,l[0].end===p,null,k,k),y instanceof a.BeginEndRule){var S=y;s.DebugFlags.InDebugMode&&console.log(" pushing "+S.debugName+" - "+S.debugBeginRegExp),L(e,t,n,o,c,S.beginCaptures,l),c.produce(o,l[0].end),d=l[0].end;var w=S.getContentName(t.content,l),j=k.push(e,w);if(o=o.setContentNameScopesList(j),S.endHasBackReferences&&(o=o.setEndRule(S.getEndWithResolvedBackReferences(t.content,l))),!g&&b.hasSameRuleAs(o))return s.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),c.produce(o,p),void(h=!0)}else if(y instanceof a.BeginWhileRule){if(S=y,s.DebugFlags.InDebugMode&&console.log(" pushing "+S.debugName),L(e,t,n,o,c,S.beginCaptures,l),c.produce(o,l[0].end),d=l[0].end,w=S.getContentName(t.content,l),j=k.push(e,w),o=o.setContentNameScopesList(j),S.whileHasBackReferences&&(o=o.setEndRule(S.getWhileWithResolvedBackReferences(t.content,l))),!g&&b.hasSameRuleAs(o))return s.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),c.produce(o,p),void(h=!0)}else{var P=y;if(s.DebugFlags.InDebugMode&&console.log(" matched "+P.debugName+" - "+P.debugMatchRegExp),L(e,t,n,o,c,P.captures,l),c.produce(o,l[0].end),o=o.pop(),!g)return s.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),o=o.safePop(),c.produce(o,p),void(h=!0)}}l[0].end>r&&(r=l[0].end,n=!1)}}var E=function(){function e(){}return e.toBinaryStr=function(e){for(var t=e.toString(2);t.length<32;)t="0"+t;return t},e.printMetadata=function(t){var n=e.getLanguageId(t),r=e.getTokenType(t),a=e.getFontStyle(t),o=e.getForeground(t),s=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:o,background:s})},e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(768&e)>>>8},e.getFontStyle=function(e){return(15360&e)>>>10},e.getForeground=function(e){return(8372224&e)>>>14},e.getBackground=function(e){return(4286578688&e)>>>23},e.set=function(t,n,r,a,o,s){var i=e.getLanguageId(t),c=e.getTokenType(t),u=e.getFontStyle(t),l=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(i=n),0!==r&&(c=8===r?0:r),-1!==a&&(u=a),0!==o&&(l=o),0!==s&&(p=s),(i<<0|c<<8|u<<10|l<<14|p<<23)>>>0},e}();t.StackElementMetadata=E;var O=function(){function e(e,t,n){this.parent=e,this.scope=t,this.metadata=n}return e._equals=function(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scope!==t.scope||e.metadata!==t.metadata)return!1;e=e.parent,t=t.parent}},e.prototype.equals=function(t){return e._equals(this,t)},e._matchesScope=function(e,t,n){return t===e||e.substring(0,n.length)===n},e._matches=function(e,t){if(null===t)return!0;for(var n=t.length,r=0,a=t[r],o=a+".";e;){if(this._matchesScope(e.scope,a,o)){if(++r===n)return!0;o=(a=t[r])+"."}e=e.parent}return!1},e.mergeMetadata=function(e,t,n){if(null===n)return e;var r=-1,a=0,o=0;if(null!==n.themeData)for(var s=0,i=n.themeData.length;s<i;s++){var c=n.themeData[s];if(this._matches(t,c.parentScopes)){r=c.fontStyle,a=c.foreground,o=c.background;break}}return E.set(e,n.languageId,n.tokenType,r,a,o)},e._push=function(t,n,r){for(var a=0,o=r.length;a<o;a++){var s=r[a],i=n.getMetadataForScope(s),c=e.mergeMetadata(t.metadata,t,i);t=new e(t,s,c)}return t},e.prototype.push=function(t,n){return null===n?this:n.indexOf(" ")>=0?e._push(this,t,n.split(/ /g)):e._push(this,t,[n])},e._generateScopes=function(e){for(var t=[],n=0;e;)t[n++]=e.scope,e=e.parent;return t.reverse(),t},e.prototype.generateScopes=function(){return e._generateScopes(this)},e}();t.ScopeListElement=O;var R=function(){function e(e,t,n,r,a,o,s,i){this._stackElementBrand=void 0,this.parent=e,this.depth=this.parent?this.parent.depth+1:1,this.ruleId=t,this._enterPos=n,this._anchorPos=r,this.beginRuleCapturedEOL=a,this.endRule=o,this.nameScopesList=s,this.contentNameScopesList=i}return e._structuralEquals=function(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}},e._equals=function(e,t){return e===t||!!this._structuralEquals(e,t)&&e.contentNameScopesList.equals(t.contentNameScopesList)},e.prototype.clone=function(){return this},e.prototype.equals=function(t){return null!==t&&e._equals(this,t)},e._reset=function(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent},e.prototype.reset=function(){e._reset(this)},e.prototype.pop=function(){return this.parent},e.prototype.safePop=function(){return this.parent?this.parent:this},e.prototype.push=function(t,n,r,a,o,s,i){return new e(this,t,n,r,a,o,s,i)},e.prototype.getEnterPos=function(){return this._enterPos},e.prototype.getAnchorPos=function(){return this._anchorPos},e.prototype.getRule=function(e){return e.getRule(this.ruleId)},e.prototype._writeString=function(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]="("+this.ruleId+", TODO-"+this.nameScopesList+", TODO-"+this.contentNameScopesList+")",t},e.prototype.toString=function(){var e=[];return this._writeString(e,0),"["+e.join(",")+"]"},e.prototype.setContentNameScopesList=function(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)},e.prototype.setEndRule=function(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)},e.prototype.hasSameRuleAs=function(e){for(var t=this;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1},e.NULL=new e(null,0,0,0,!1,null,null,null),e}();t.StackElement=R;var A=function(e,t){this.scopes=e,this.endPos=t};t.LocalStackElement=A;var I=function(){function e(e,t,n){this._emitBinaryTokens=e,this._tokenTypeOverrides=n,s.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}return e.prototype.produce=function(e,t){this.produceFromScopes(e.contentNameScopesList,t)},e.prototype.produceFromScopes=function(e,t){if(!(this._lastTokenEndIndex>=t)){if(this._emitBinaryTokens){var n=e.metadata;if(this._tokenTypeOverrides.length>0)for(var r=e.generateScopes(),a=0,o=this._tokenTypeOverrides;a<o.length;a++){var i=o[a];i.matcher(r)&&(n=E.set(n,0,M(i.type),-1,0,0))}if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(s.DebugFlags.InDebugMode){var c=e.generateScopes();console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(var u=0;u<c.length;u++)console.log(" * "+c[u])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t)}var l=e.generateScopes();if(s.DebugFlags.InDebugMode)for(console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|"),u=0;u<l.length;u++)console.log(" * "+l[u]);this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:l}),this._lastTokenEndIndex=t}},e.prototype.getResult=function(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens},e.prototype.getBinaryResult=function(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);for(var n=new Uint32Array(this._binaryTokens.length),r=0,a=this._binaryTokens.length;r<a;r++)n[r]=this._binaryTokens[r];return n},e}();function M(e){switch(e){case 3:return 3;case 2:return 2;case 1:return 1;default:return 8}}},25:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;var r=n(69),a=n(350),o=n(974);t.parseRawGrammar=function(e,t){return void 0===t&&(t=null),null!==t&&/\.json$/.test(t)?(n=e,s=t,a.DebugFlags.InDebugMode?o.parse(n,s,!0):JSON.parse(n)):function(e,t){return a.DebugFlags.InDebugMode?r.parseWithLocation(e,t,"$vscodeTextmateLocation"):r.parse(e)}(e,t);var n,s}},974:(e,t)=>{function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0,t.parse=function(e,t,s){var i=new r(e),c=new a,u=0,l=null,p=[],h=[];function d(){p.push(u),h.push(l)}function f(){u=p.pop(),l=h.pop()}function g(e){n(i,e)}for(;o(i,c);){if(0===u){if(null!==l&&g("too many constructs in root"),3===c.type){l={},s&&(l.$vscodeTextmateLocation=c.toLocation(t)),d(),u=1;continue}if(2===c.type){l=[],d(),u=4;continue}g("unexpected token in root")}if(2===u){if(5===c.type){f();continue}if(7===c.type){u=3;continue}g("expected , or }")}if(1===u||3===u){if(1===u&&5===c.type){f();continue}if(1===c.type){var m=c.value;if(o(i,c)&&6===c.type||g("expected colon"),o(i,c)||g("expected value"),u=2,1===c.type){l[m]=c.value;continue}if(8===c.type){l[m]=null;continue}if(9===c.type){l[m]=!0;continue}if(10===c.type){l[m]=!1;continue}if(11===c.type){l[m]=parseFloat(c.value);continue}if(2===c.type){var v=[];l[m]=v,d(),u=4,l=v;continue}if(3===c.type){var y={};s&&(y.$vscodeTextmateLocation=c.toLocation(t)),l[m]=y,d(),u=1,l=y;continue}}g("unexpected token in dict")}if(5===u){if(4===c.type){f();continue}if(7===c.type){u=6;continue}g("expected , or ]")}if(4===u||6===u){if(4===u&&4===c.type){f();continue}if(u=5,1===c.type){l.push(c.value);continue}if(8===c.type){l.push(null);continue}if(9===c.type){l.push(!0);continue}if(10===c.type){l.push(!1);continue}if(11===c.type){l.push(parseFloat(c.value));continue}if(2===c.type){v=[],l.push(v),d(),u=4,l=v;continue}if(3===c.type){y={},s&&(y.$vscodeTextmateLocation=c.toLocation(t)),l.push(y),d(),u=1,l=y;continue}g("unexpected token in array")}g("unknown state")}return 0!==h.length&&g("unclosed constructs"),l};var r=function(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0},a=function(){function e(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}return e.prototype.toLocation=function(e){return{filename:e,line:this.line,char:this.char}},e}();function o(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;for(var r,a=e.source,o=e.pos,s=e.len,i=e.line,c=e.char;;){if(o>=s)return!1;if(32!==(r=a.charCodeAt(o))&&9!==r&&13!==r){if(10!==r)break;o++,i++,c=0}else o++,c++}if(t.offset=o,t.line=i,t.char=c,34===r){for(t.type=1,o++,c++;;){if(o>=s)return!1;if(r=a.charCodeAt(o),o++,c++,92!==r){if(34===r)break}else o++,c++}t.value=a.substring(t.offset+1,o-1).replace(/\\u([0-9A-Fa-f]{4})/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/\\(.)/g,(function(t,r){switch(r){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:n(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===r)t.type=2,o++,c++;else if(123===r)t.type=3,o++,c++;else if(93===r)t.type=4,o++,c++;else if(125===r)t.type=5,o++,c++;else if(58===r)t.type=6,o++,c++;else if(44===r)t.type=7,o++,c++;else if(110===r){if(t.type=8,o++,c++,117!==(r=a.charCodeAt(o)))return!1;if(o++,c++,108!==(r=a.charCodeAt(o)))return!1;if(o++,c++,108!==(r=a.charCodeAt(o)))return!1;o++,c++}else if(116===r){if(t.type=9,o++,c++,114!==(r=a.charCodeAt(o)))return!1;if(o++,c++,117!==(r=a.charCodeAt(o)))return!1;if(o++,c++,101!==(r=a.charCodeAt(o)))return!1;o++,c++}else if(102===r){if(t.type=10,o++,c++,97!==(r=a.charCodeAt(o)))return!1;if(o++,c++,108!==(r=a.charCodeAt(o)))return!1;if(o++,c++,115!==(r=a.charCodeAt(o)))return!1;if(o++,c++,101!==(r=a.charCodeAt(o)))return!1;o++,c++}else for(t.type=11;;){if(o>=s)return!1;if(!(46===(r=a.charCodeAt(o))||r>=48&&r<=57||101===r||69===r||45===r||43===r))break;o++,c++}return t.len=o-t.offset,null===t.value&&(t.value=a.substr(t.offset,t.len)),e.pos=o,e.line=i,e.char=c,!0}},787:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function i(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,i)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,a,o,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(o){return function(i){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){s.label=o[1];break}if(6===o[0]&&s.label<a[1]){s.label=a[1],a=o;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(o);break}a[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,i])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=t.INITIAL=t.Registry=void 0;var i=n(652),c=n(25),u=n(583),l=n(527);a(n(42),t);var p=function(){function e(e){this._options=e,this._syncRegistry=new i.SyncRegistry(u.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}return e.prototype.dispose=function(){this._syncRegistry.dispose()},e.prototype.setTheme=function(e,t){this._syncRegistry.setTheme(u.Theme.createFromRawTheme(e,t))},e.prototype.getColorMap=function(){return this._syncRegistry.getColorMap()},e.prototype.loadGrammarWithEmbeddedLanguages=function(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})},e.prototype.loadGrammarWithConfiguration=function(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes)},e.prototype.loadGrammar=function(e){return this._loadGrammar(e,0,null,null)},e.prototype._doLoadSingleGrammar=function(e){return o(this,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:return[4,this._options.loadGrammar(e)];case 1:return(t=r.sent())&&(n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0,this._syncRegistry.addGrammar(t,n)),[2]}}))}))},e.prototype._loadSingleGrammar=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),[2,this._ensureGrammarCache.get(e)]}))}))},e.prototype._loadGrammar=function(e,t,n,r){return o(this,void 0,void 0,(function(){var a,o=this;return s(this,(function(s){switch(s.label){case 0:a=new l.ScopeDependencyProcessor(this._syncRegistry,e),s.label=1;case 1:return a.Q.length>0?[4,Promise.all(a.Q.map((function(e){return o._loadSingleGrammar(e.scopeName)})))]:[3,3];case 2:return s.sent(),a.processQueue(),[3,1];case 3:return[2,this.grammarForScopeName(e,t,n,r)]}}))}))},e.prototype.addGrammar=function(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=0),void 0===r&&(r=null),o(this,void 0,void 0,(function(){return s(this,(function(a){switch(a.label){case 0:return this._syncRegistry.addGrammar(e,t),[4,this.grammarForScopeName(e.scopeName,n,r)];case 1:return[2,a.sent()]}}))}))},e.prototype.grammarForScopeName=function(e,t,n,r){return void 0===t&&(t=0),void 0===n&&(n=null),void 0===r&&(r=null),this._syncRegistry.grammarForScopeName(e,t,n,r)},e}();t.Registry=p,t.INITIAL=l.StackElement.NULL,t.parseRawGrammar=c.parseRawGrammar},736:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){for(var r,a,o,s=[],i=(o=(a=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(r=e),{next:function(){if(!o)return null;var e=o[0];return o=a.exec(r),e}}),c=i.next();null!==c;){var u=0;if(2===c.length&&":"===c.charAt(1)){switch(c.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log("Unknown priority "+c+" in scope selector")}c=i.next()}var l=h();if(s.push({matcher:l,priority:u}),","!==c)break;c=i.next()}return s;function p(){if("-"===c){c=i.next();var e=p();return function(t){return!!e&&!e(t)}}if("("===c){c=i.next();var r=function(){for(var e=[],t=h();t&&(e.push(t),"|"===c||","===c);){do{c=i.next()}while("|"===c||","===c);t=h()}return function(t){return e.some((function(e){return e(t)}))}}();return")"===c&&(c=i.next()),r}if(n(c)){var a=[];do{a.push(c),c=i.next()}while(n(c));return function(e){return t(a,e)}}return null}function h(){for(var e=[],t=p();t;)e.push(t),t=p();return function(t){return e.every((function(e){return e(t)}))}}}},69:(e,t)=>{function n(e,t,n){var r=e.length,a=0,o=1,s=0;function i(t){if(null===n)a+=t;else for(;t>0;)10===e.charCodeAt(a)?(a++,o++,s=0):(a++,s++),t--}function c(e){null===n?a=e:i(e-a)}function u(){for(;a<r;){var t=e.charCodeAt(a);if(32!==t&&9!==t&&13!==t&&10!==t)break;i(1)}}function l(t){return e.substr(a,t.length)===t&&(i(t.length),!0)}function p(t){var n=e.indexOf(t,a);c(-1!==n?n+t.length:r)}function h(t){var n=e.indexOf(t,a);if(-1!==n){var o=e.substring(a,n);return c(n+t.length),o}return o=e.substr(a),c(r),o}r>0&&65279===e.charCodeAt(0)&&(a=1);var d=0,f=null,g=[],m=[],v=null;function y(e,t){g.push(d),m.push(f),d=e,f=t}function b(){if(0===g.length)return _("illegal state stack");d=g.pop(),f=m.pop()}function _(t){throw new Error("Near offset "+a+": "+t+" ~~~"+e.substr(a,50)+"~~~")}var k,S,w,L,C,j=function(){if(null===v)return _("missing <key>");var e={};null!==n&&(e[n]={filename:t,line:o,char:s}),f[v]=e,v=null,y(1,e)},x=function(){if(null===v)return _("missing <key>");var e=[];f[v]=e,v=null,y(2,e)};function P(){if(1!==d)return _("unexpected </dict>");b()}function N(){return 1===d||2!==d?_("unexpected </array>"):void b()}function T(e){if(1===d){if(null===v)return _("missing <key>");f[v]=e,v=null}else 2===d?f.push(e):f=e}function E(e){if(isNaN(e))return _("cannot parse float");if(1===d){if(null===v)return _("missing <key>");f[v]=e,v=null}else 2===d?f.push(e):f=e}function O(e){if(isNaN(e))return _("cannot parse integer");if(1===d){if(null===v)return _("missing <key>");f[v]=e,v=null}else 2===d?f.push(e):f=e}function R(e){if(1===d){if(null===v)return _("missing <key>");f[v]=e,v=null}else 2===d?f.push(e):f=e}function A(e){if(1===d){if(null===v)return _("missing <key>");f[v]=e,v=null}else 2===d?f.push(e):f=e}function I(e){if(1===d){if(null===v)return _("missing <key>");f[v]=e,v=null}else 2===d?f.push(e):f=e}function M(e){if(e.isClosed)return"";var t=h("</");return p(">"),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&|<|>|"|'/g,(function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return e}))}for(;a<r&&(u(),!(a>=r));){var D=e.charCodeAt(a);if(i(1),60!==D)return _("expected <");if(a>=r)return _("unexpected end of input");var G=e.charCodeAt(a);if(63!==G)if(33!==G){if(47===G){if(i(1),u(),l("plist")){p(">");continue}if(l("dict")){p(">"),P();continue}if(l("array")){p(">"),N();continue}return _("unexpected closed tag")}var F=(S=void 0,w=void 0,w=!1,47===(S=h(">")).charCodeAt(S.length-1)&&(w=!0,S=S.substring(0,S.length-1)),{name:S.trim(),isClosed:w});switch(F.name){case"dict":1===d?j():2===d?(C=void 0,C={},null!==n&&(C[n]={filename:t,line:o,char:s}),f.push(C),y(1,C)):(f={},null!==n&&(f[n]={filename:t,line:o,char:s}),y(1,f)),F.isClosed&&P();continue;case"array":1===d?x():2===d?(void 0,L=[],f.push(L),y(2,L)):y(2,f=[]),F.isClosed&&N();continue;case"key":k=M(F),1!==d?_("unexpected <key>"):null!==v?_("too many <key>"):v=k;continue;case"string":T(M(F));continue;case"real":E(parseFloat(M(F)));continue;case"integer":O(parseInt(M(F),10));continue;case"date":R(new Date(M(F)));continue;case"data":A(M(F));continue;case"true":M(F),I(!0);continue;case"false":M(F),I(!1);continue}if(!/^plist/.test(F.name))return _("unexpected opened tag "+F.name)}else{if(i(1),l("--")){p("--\x3e");continue}p(">")}else i(1),p("?>")}return f}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,r){return n(e,t,r)},t.parse=function(e){return n(e,null,null)}},652:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function i(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,i)}c((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,o,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(o){return function(i){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){s.label=o[1];break}if(6===o[0]&&s.label<a[1]){s.label=a[1],a=o;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(o);break}a[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,i])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;var o=n(527),s=function(){function e(e,t){this._theme=e,this._grammars={},this._rawGrammars={},this._injectionGrammars={},this._onigLibPromise=t}return e.prototype.dispose=function(){for(var e in this._grammars)this._grammars.hasOwnProperty(e)&&this._grammars[e].dispose()},e.prototype.setTheme=function(e){var t=this;this._theme=e,Object.keys(this._grammars).forEach((function(e){t._grammars[e].onDidChangeTheme()}))},e.prototype.getColorMap=function(){return this._theme.getColorMap()},e.prototype.addGrammar=function(e,t){this._rawGrammars[e.scopeName]=e,t&&(this._injectionGrammars[e.scopeName]=t)},e.prototype.lookup=function(e){return this._rawGrammars[e]},e.prototype.injections=function(e){return this._injectionGrammars[e]},e.prototype.getDefaults=function(){return this._theme.getDefaults()},e.prototype.themeMatch=function(e){return this._theme.match(e)},e.prototype.grammarForScopeName=function(e,t,n,s){return r(this,void 0,void 0,(function(){var r,i,c,u,l;return a(this,(function(a){switch(a.label){case 0:return this._grammars[e]?[3,2]:(r=this._rawGrammars[e])?(i=this._grammars,c=e,u=o.createGrammar,l=[e,r,t,n,s,this],[4,this._onigLibPromise]):[2,null];case 1:i[c]=u.apply(void 0,l.concat([a.sent()])),a.label=2;case 2:return[2,this._grammars[e]]}}))}))},e}();t.SyncRegistry=s},792:function(e,t,n){var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.RegExpSourceList=t.RegExpSource=t.CaptureRule=t.Rule=t.CompiledRule=void 0;var o=n(878),s=/\\(\d+)/,i=/\\(\d+)/g,c=function(){function e(e,t,n){this.debugRegExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}return e.prototype.dispose=function(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()},e}();t.CompiledRule=c;var u=function(){function e(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=o.RegexSource.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=o.RegexSource.hasCaptures(this._contentName)}return Object.defineProperty(e.prototype,"debugName",{get:function(){var e=this.$location?o.basename(this.$location.filename)+":"+this.$location.line:"unknown";return this.constructor.name+"#"+this.id+" @ "+e},enumerable:!1,configurable:!0}),e.prototype.getName=function(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?o.RegexSource.replaceCaptures(this._name,e,t):this._name},e.prototype.getContentName=function(e,t){return this._contentNameIsCapturing&&null!==this._contentName?o.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName},e}();t.Rule=u;var l=function(e){function t(t,n,r,a,o){var s=e.call(this,t,n,r,a)||this;return s.retokenizeCapturedWithRuleId=o,s}return a(t,e),t.prototype.dispose=function(){},t.prototype.collectPatternsRecursive=function(e,t,n){throw new Error("Not supported!")},t.prototype.compile=function(e,t){throw new Error("Not supported!")},t.prototype.compileAG=function(e,t,n,r){throw new Error("Not supported!")},t}(u);t.CaptureRule=l;var p=function(){function e(e,t,n){if(void 0===n&&(n=!0),n)if(e){for(var r=e.length,a=0,o=[],i=!1,c=0;c<r;c++)if("\\"===e.charAt(c)&&c+1<r){var u=e.charAt(c+1);"z"===u?(o.push(e.substring(a,c)),o.push("$(?!\\n)(?<!\\n)"),a=c+2):"A"!==u&&"G"!==u||(i=!0),c++}this.hasAnchor=i,0===a?this.source=e:(o.push(e.substring(a,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=s.test(this.source)}return e.prototype.clone=function(){return new e(this.source,this.ruleId,!0)},e.prototype.setSource=function(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))},e.prototype.resolveBackReferences=function(e,t){var n=t.map((function(t){return e.substring(t.start,t.end)}));return i.lastIndex=0,this.source.replace(i,(function(e,t){return(n[parseInt(t,10)]||"").replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}))},e.prototype._buildAnchorCache=function(){var e,t,n,r,a=[],o=[],s=[],i=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),a[e]=n,o[e]=n,s[e]=n,i[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(a[e+1]="",o[e+1]="",s[e+1]="A",i[e+1]="A"):"G"===r?(a[e+1]="",o[e+1]="G",s[e+1]="",i[e+1]="G"):(a[e+1]=r,o[e+1]=r,s[e+1]=r,i[e+1]=r),e++);return{A0_G0:a.join(""),A0_G1:o.join(""),A1_G0:s.join(""),A1_G1:i.join("")}},e.prototype.resolveAnchors=function(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source},e}();t.RegExpSource=p;var h=function(){function e(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}return e.prototype.dispose=function(){this._disposeCaches()},e.prototype._disposeCaches=function(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)},e.prototype.push=function(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor},e.prototype.unshift=function(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor},e.prototype.length=function(){return this._items.length},e.prototype.setSource=function(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))},e.prototype.compile=function(e){if(!this._cached){var t=this._items.map((function(e){return e.source}));this._cached=new c(e,t,this._items.map((function(e){return e.ruleId})))}return this._cached},e.prototype.compileAG=function(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)},e.prototype._resolveAnchors=function(e,t,n){var r=this._items.map((function(e){return e.resolveAnchors(t,n)}));return new c(e,r,this._items.map((function(e){return e.ruleId})))},e}();t.RegExpSourceList=h;var d=function(e){function t(t,n,r,a,o){var s=e.call(this,t,n,r,null)||this;return s._match=new p(a,s.id),s.captures=o,s._cachedCompiledPatterns=null,s}return a(t,e),t.prototype.dispose=function(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)},Object.defineProperty(t.prototype,"debugMatchRegExp",{get:function(){return""+this._match.source},enumerable:!1,configurable:!0}),t.prototype.collectPatternsRecursive=function(e,t,n){t.push(this._match)},t.prototype.compile=function(e,t){return this._getCachedCompiledPatterns(e).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new h,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns},t}(u);t.MatchRule=d;var f=function(e){function t(t,n,r,a,o){var s=e.call(this,t,n,r,a)||this;return s.patterns=o.patterns,s.hasMissingPatterns=o.hasMissingPatterns,s._cachedCompiledPatterns=null,s}return a(t,e),t.prototype.dispose=function(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)},t.prototype.collectPatternsRecursive=function(e,t,n){var r,a;for(r=0,a=this.patterns.length;r<a;r++)e.getRule(this.patterns[r]).collectPatternsRecursive(e,t,!1)},t.prototype.compile=function(e,t){return this._getCachedCompiledPatterns(e).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new h,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns},t}(u);t.IncludeOnlyRule=f;var g=function(e){function t(t,n,r,a,o,s,i,c,u,l){var h=e.call(this,t,n,r,a)||this;return h._begin=new p(o,h.id),h.beginCaptures=s,h._end=new p(i||"",-1),h.endHasBackReferences=h._end.hasBackReferences,h.endCaptures=c,h.applyEndPatternLast=u||!1,h.patterns=l.patterns,h.hasMissingPatterns=l.hasMissingPatterns,h._cachedCompiledPatterns=null,h}return a(t,e),t.prototype.dispose=function(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)},Object.defineProperty(t.prototype,"debugBeginRegExp",{get:function(){return""+this._begin.source},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugEndRegExp",{get:function(){return""+this._end.source},enumerable:!1,configurable:!0}),t.prototype.getEndWithResolvedBackReferences=function(e,t){return this._end.resolveBackReferences(e,t)},t.prototype.collectPatternsRecursive=function(e,t,n){if(n){var r,a=void 0;for(a=0,r=this.patterns.length;a<r;a++)e.getRule(this.patterns[a]).collectPatternsRecursive(e,t,!1)}else t.push(this._begin)},t.prototype.compile=function(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e,t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new h,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0),this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)),this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns},t}(u);t.BeginEndRule=g;var m=function(e){function t(t,n,r,a,o,s,i,c,u){var l=e.call(this,t,n,r,a)||this;return l._begin=new p(o,l.id),l.beginCaptures=s,l.whileCaptures=c,l._while=new p(i,-2),l.whileHasBackReferences=l._while.hasBackReferences,l.patterns=u.patterns,l.hasMissingPatterns=u.hasMissingPatterns,l._cachedCompiledPatterns=null,l._cachedCompiledWhilePatterns=null,l}return a(t,e),t.prototype.dispose=function(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)},Object.defineProperty(t.prototype,"debugBeginRegExp",{get:function(){return""+this._begin.source},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugWhileRegExp",{get:function(){return""+this._while.source},enumerable:!1,configurable:!0}),t.prototype.getWhileWithResolvedBackReferences=function(e,t){return this._while.resolveBackReferences(e,t)},t.prototype.collectPatternsRecursive=function(e,t,n){if(n){var r,a=void 0;for(a=0,r=this.patterns.length;a<r;a++)e.getRule(this.patterns[a]).collectPatternsRecursive(e,t,!1)}else t.push(this._begin)},t.prototype.compile=function(e,t){return this._getCachedCompiledPatterns(e).compile(e)},t.prototype.compileAG=function(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)},t.prototype._getCachedCompiledPatterns=function(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new h,this.collectPatternsRecursive(e,this._cachedCompiledPatterns,!0)),this._cachedCompiledPatterns},t.prototype.compileWhile=function(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)},t.prototype.compileWhileAG=function(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)},t.prototype._getCachedCompiledWhilePatterns=function(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new h,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns},t}(u);t.BeginWhileRule=m;var v=function(){function e(){}return e.createCaptureRule=function(e,t,n,r,a){return e.registerRule((function(e){return new l(t,e,n,r,a)}))},e.getCompiledRuleId=function(t,n,r){return t.id||n.registerRule((function(a){if(t.id=a,t.match)return new d(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=o.mergeObjects({},r,t.repository));var s=t.patterns;return void 0===s&&t.include&&(s=[{include:t.include}]),new f(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(s,n,r))}return t.while?new m(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new g(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))})),t.id},e._compileCaptures=function(t,n,r){var a=[];if(t){var o=0;for(var s in t)"$vscodeTextmateLocation"!==s&&(c=parseInt(s,10))>o&&(o=c);for(var i=0;i<=o;i++)a[i]=null;for(var s in t)if("$vscodeTextmateLocation"!==s){var c=parseInt(s,10),u=0;t[s].patterns&&(u=e.getCompiledRuleId(t[s],n,r)),a[c]=e.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,u)}}return a},e._compilePatterns=function(t,n,r){var a=[];if(t)for(var o=0,s=t.length;o<s;o++){var i=t[o],c=-1;if(i.include)if("#"===i.include.charAt(0)){var u=r[i.include.substr(1)];u&&(c=e.getCompiledRuleId(u,n,r))}else if("$base"===i.include||"$self"===i.include)c=e.getCompiledRuleId(r[i.include],n,r);else{var l=null,p=null,h=i.include.indexOf("#");h>=0?(l=i.include.substring(0,h),p=i.include.substring(h+1)):l=i.include;var d=n.getExternalGrammar(l,r);if(d)if(p){var v=d.repository[p];v&&(c=e.getCompiledRuleId(v,n,d.repository))}else c=e.getCompiledRuleId(d.repository.$self,n,d.repository)}else c=e.getCompiledRuleId(i,n,r);if(-1!==c){var y=n.getRule(c),b=!1;if((y instanceof f||y instanceof g||y instanceof m)&&y.hasMissingPatterns&&0===y.patterns.length&&(b=!0),b)continue;a.push(c)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}},e}();t.RuleFactory=v},583:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.strArrCmp=t.strcmp=t.Theme=t.ColorMap=t.parseTheme=t.ParsedThemeRule=void 0;var n=function(e,t,n,r,a,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=o};function r(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function a(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];for(var t=e.settings,a=[],o=0,s=0,i=t.length;s<i;s++){var c=t[s];if(c.settings){var u=void 0;u="string"==typeof c.scope?c.scope.replace(/^[,]+/,"").replace(/[,]+$/,"").split(","):Array.isArray(c.scope)?c.scope:[""];var l=-1;if("string"==typeof c.settings.fontStyle){l=0;for(var p=0,h=(g=c.settings.fontStyle.split(" ")).length;p<h;p++)switch(g[p]){case"italic":l|=1;break;case"bold":l|=2;break;case"underline":l|=4;break;case"strikethrough":l|=8}}var d=null;"string"==typeof c.settings.foreground&&r(c.settings.foreground)&&(d=c.settings.foreground);var f=null;for("string"==typeof c.settings.background&&r(c.settings.background)&&(f=c.settings.background),p=0,h=u.length;p<h;p++){var g,m=(g=u[p].trim().split(" "))[g.length-1],v=null;g.length>1&&(v=g.slice(0,g.length-1)).reverse(),a[o++]=new n(m,v,s,l,d,f)}}}return a}t.ParsedThemeRule=n,t.parseTheme=a;var o=function(){function e(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(var t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}return e.prototype.getId=function(e){if(null===e)return 0;e=e.toUpperCase();var t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error("Missing color in color map - "+e);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t},e.prototype.getColorMap=function(){return this._id2color.slice(0)},e}();t.ColorMap=o;var s=function(){function e(e,t,n){this._colorMap=e,this._root=n,this._defaults=t,this._cache={}}return e.createFromRawTheme=function(e,t){return this.createFromParsedTheme(a(e),t)},e.createFromParsedTheme=function(e,t){return function(e,t){e.sort((function(e,t){var n=i(e.scope,t.scope);return 0!==n||0!==(n=c(e.parentScopes,t.parentScopes))?n:e.index-t.index}));for(var n=0,r="#000000",a="#ffffff";e.length>=1&&""===e[0].scope;){var p=e.shift();-1!==p.fontStyle&&(n=p.fontStyle),null!==p.foreground&&(r=p.foreground),null!==p.background&&(a=p.background)}for(var h=new o(t),d=new u(0,null,n,h.getId(r),h.getId(a)),f=new l(new u(0,null,-1,0,0),[]),g=0,m=e.length;g<m;g++){var v=e[g];f.insert(0,v.scope,v.parentScopes,v.fontStyle,h.getId(v.foreground),h.getId(v.background))}return new s(h,d,f)}(e,t)},e.prototype.getColorMap=function(){return this._colorMap.getColorMap()},e.prototype.getDefaults=function(){return this._defaults},e.prototype.match=function(e){return this._cache.hasOwnProperty(e)||(this._cache[e]=this._root.match(e)),this._cache[e]},e}();function i(e,t){return e<t?-1:e>t?1:0}function c(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;var n=e.length,r=t.length;if(n===r){for(var a=0;a<n;a++){var o=i(e[a],t[a]);if(0!==o)return o}return 0}return n-r}t.Theme=s,t.strcmp=i,t.strArrCmp=c;var u=function(){function e(e,t,n,r,a){this.scopeDepth=e,this.parentScopes=t,this.fontStyle=n,this.foreground=r,this.background=a}return e.prototype.clone=function(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)},e.cloneArr=function(e){for(var t=[],n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t},e.prototype.acceptOverwrite=function(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)},e}();t.ThemeTrieElementRule=u;var l=function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={}),this._mainRule=e,this._rulesWithParentScopes=t,this._children=n}return e._sortBySpecificity=function(e){return 1===e.length||e.sort(this._cmpBySpecificity),e},e._cmpBySpecificity=function(e,t){if(e.scopeDepth===t.scopeDepth){var n=e.parentScopes,r=t.parentScopes,a=null===n?0:n.length,o=null===r?0:r.length;if(a===o)for(var s=0;s<a;s++){var i=n[s].length,c=r[s].length;if(i!==c)return c-i}return o-a}return t.scopeDepth-e.scopeDepth},e.prototype.match=function(t){if(""===t)return e._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));var n,r,a=t.indexOf(".");return-1===a?(n=t,r=""):(n=t.substring(0,a),r=t.substring(a+1)),this._children.hasOwnProperty(n)?this._children[n].match(r):e._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes))},e.prototype.insert=function(t,n,r,a,o,s){if(""!==n){var i,c,l,p=n.indexOf(".");-1===p?(i=n,c=""):(i=n.substring(0,p),c=n.substring(p+1)),this._children.hasOwnProperty(i)?l=this._children[i]:(l=new e(this._mainRule.clone(),u.cloneArr(this._rulesWithParentScopes)),this._children[i]=l),l.insert(t+1,c,r,a,o,s)}else this._doInsertHere(t,r,a,o,s)},e.prototype._doInsertHere=function(e,t,n,r,a){if(null!==t){for(var o=0,s=this._rulesWithParentScopes.length;o<s;o++){var i=this._rulesWithParentScopes[o];if(0===c(i.parentScopes,t))return void i.acceptOverwrite(e,n,r,a)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===a&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new u(e,t,n,r,a))}else this._mainRule.acceptOverwrite(e,n,r,a)},e}();t.ThemeTrieElement=l},42:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},878:(e,t)=>{function n(e){return Array.isArray(e)?function(e){for(var t=[],r=0,a=e.length;r<a;r++)t[r]=n(e[r]);return t}(e):"object"==typeof e?function(e){var t={};for(var r in e)t[r]=n(e[r]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(e)},t.mergeObjects=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){for(var n in t)e[n]=t[n]})),e},t.basename=function e(t){var n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};var r=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,a=function(){function e(){}return e.hasCaptures=function(e){return null!==e&&(r.lastIndex=0,r.test(e))},e.replaceCaptures=function(e,t,n){return e.replace(r,(function(e,r,a,o){var s=n[parseInt(r||a,10)];if(!s)return e;for(var i=t.substring(s.start,s.end);"."===i[0];)i=i.substring(1);switch(o){case"downcase":return i.toLowerCase();case"upcase":return i.toUpperCase();default:return i}}))},e}();t.RegexSource=a}},t={};return function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(787)})()},196:e=>{"use strict";e.exports=window.React},799:()=>{},318:()=>{}},n={};function r(e){var a=n[e];if(void 0!==a)return a.exports;var o=n[e]={exports:{}};return t[e].call(o.exports,o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,n,a,o)=>{if(!n){var s=1/0;for(l=0;l<e.length;l++){n=e[l][0],a=e[l][1],o=e[l][2];for(var i=!0,c=0;c<n.length;c++)(!1&o||s>=o)&&Object.keys(r.O).every((e=>r.O[e](n[c])))?n.splice(c--,1):(i=!1,o<s&&(s=o));if(i){e.splice(l--,1);var u=a();void 0!==u&&(t=u)}}return t}o=o||0;for(var l=e.length;l>0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[n,a,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={826:0,431:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var a,o,s=n[0],i=n[1],c=n[2],u=0;if(s.some((t=>0!==e[t]))){for(a in i)r.o(i,a)&&(r.m[a]=i[a]);if(c)var l=c(r)}for(t&&t(n);u<s.length;u++)o=s[u],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return r.O(l)},n=self.webpackChunkcode_block_pro=self.webpackChunkcode_block_pro||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var a=r.O(void 0,[431],(()=>r(739)));a=r.O(a)})(); |