nnews-react 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -32,7 +32,7 @@
32
32
  `},c]}}const Lb=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Db=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Pb=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Fb=[...Db,...Pb],Bb=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Os=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Ms=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),zb=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),Ub=Os.concat(Ms).sort().reverse();function $b(e){const t=Lb(e),n=Ub,r="and or not only",i="[\\w-]+",a="("+i+"|@\\{"+i+"\\})",o=[],s=[],l=function(N){return{className:"string",begin:"~?"+N+".*?"+N}},c=function(N,C,O){return{className:N,begin:C,relevance:O}},u={$pattern:/[a-z-]+/,keyword:r,attribute:Bb.join(" ")},d={begin:"\\(",end:"\\)",contains:s,keywords:u,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const p=s.concat({begin:/\{/,end:/\}/,contains:o}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},g={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+zb.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},h={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:s,relevance:0}},m={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:p}},b={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+Fb.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",a,0),c("selector-id","#"+a),c("selector-class","\\."+a,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Os.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Ms.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:p},{begin:"!important"},t.FUNCTION_DISPATCH]},_={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[b]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h,m,_,g,b,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function jb(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function Hb(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,i,a,o]}}function Gb(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},s=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,s,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(c,{contains:[]}),p=e.inherit(u,{contains:[]});c.contains.push(p),u.contains.push(d);let f=[n,l];return[c,u,d,p].forEach(b=>{b.contains=b.contains.concat(f)}),f=f.concat(c,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:f},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:f}]}]},n,a,c,u,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},i,r,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function qb(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,s={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:s,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function Kb(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},s={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,a,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],p=(h,m,b="\\1")=>{const _=b==="\\1"?b:t.concat(b,m);return t.concat(t.concat("(?:",h,")"),m,/(?:\\.|[^\\\/])*?/,_,/(?:\\.|[^\\\/])*?/,b,r)},f=(h,m,b)=>t.concat(t.concat("(?:",h,")"),m,/(?:\\.|[^\\\/])*?/,b,r),g=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:u,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:p("s|tr|y",t.either(...d,{capture:!0}))},{begin:p("s|tr|y","\\(","\\)")},{begin:p("s|tr|y","\\[","\\]")},{begin:p("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:f("(?:m|qr)?",/\//,/\//)},{begin:f("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:f("m|qr",/\(/,/\)/)},{begin:f("m|qr",/\[/,/\]/)},{begin:f("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=g,o.contains=g,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:g}}function Wb(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},s={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(G,H)=>{H.data._beginMatch=G[1]||G[2]},"on:end":(G,H)=>{H.data._beginMatch!==G[1]&&H.ignoreMatch()}},p=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[
33
33
  ]`,g={scope:"string",variants:[u,c,d,p]},h={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},m=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],_=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:b,literal:(G=>{const H=[];return G.forEach(T=>{H.push(T),T.toLowerCase()===T?H.push(T.toUpperCase()):H.push(T.toLowerCase())}),H})(m),built_in:_},O=G=>G.map(H=>H.replace(/\|\d+$/,"")),k={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",O(_).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},B=t.concat(r,"\\b(?!\\()"),z={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),B],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),B],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},I={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},S={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[I,o,z,e.C_BLOCK_COMMENT_MODE,g,h,k]},P={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",O(b).join("\\b|"),"|",O(_).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[S]};S.contains.push(P);const R=[I,z,e.C_BLOCK_COMMENT_MODE,g,h,k],V={begin:t.concat(/#\[\s*\\?/,t.either(i,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:m,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:m,keyword:["new","array"]},contains:["self",...R]},...R,{scope:"meta",variants:[{match:i},{match:a}]}]};return{case_insensitive:!1,keywords:C,contains:[V,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},o,P,z,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},k,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:C,contains:["self",V,o,z,e.C_BLOCK_COMMENT_MODE,g,h]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},g,h]}}function Vb(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function Yb(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Zb(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:s,illegal:/#/},u={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,u,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",f=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,g=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${f}))[eE][+-]?(${p})[jJ]?(?=${g})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${p})[jJ](?=${g})`}]},m={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:s,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},b={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:["self",l,h,d,e.HASH_COMMENT_MODE]}]};return c.contains=[d,h,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s,illegal:/(<\/|\?)|=>/,contains:[l,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[b]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,b,d]}]}}function Xb(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Qb(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Jb(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],u={className:"subst",begin:/#\{/,end:/\}/,keywords:o},d={className:"string",contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},p="[1-9](_?[0-9])*|0",f="[0-9](_?[0-9])*",g={className:"number",relevance:0,variants:[{begin:`\\b(${p})(\\.(${f}))?([eE][+-]?(${f})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},k=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},g,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);u.contains=k,h.contains=k;const S=[{begin:/^\s*=>/,starts:{end:"$",contains:k}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:k}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(S).concat(c).concat(k)}}function ey(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",s=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],u=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:u,keyword:s,literal:l,built_in:c},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+o},{begin:"\\b0o([0-7_]+)"+o},{begin:"\\b0x([A-Fa-f0-9_]+)"+o},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:u}},{className:"punctuation",begin:"->"},a]}}const ty=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),ny=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ry=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],iy=[...ny,...ry],oy=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),ay=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),sy=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ly=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function cy(e){const t=ty(e),n=sy,r=ay,i="@[a-z-]+",a="and or not only",s={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+iy.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},s,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ly.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,s,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:oy.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},s,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function uy(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function dy(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],s=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],p=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],f=u,g=[...c,...l].filter(O=>!u.includes(O)),h={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},m={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},b={match:t.concat(/\b/,t.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function _(O){return t.concat(/\b/,t.either(...O.map(k=>k.replace(/\s+/,"\\s+"))),/\b/)}const N={scope:"keyword",match:_(p),relevance:0};function C(O,{exceptions:k,when:B}={}){const z=B;return k=k||[],O.map(I=>I.match(/\|\d+$/)||k.includes(I)?I:z(I)?`${I}|0`:I)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(g,{when:O=>O.length<3}),literal:a,type:s,built_in:d},contains:[{scope:"type",match:_(o)},N,b,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,m]}}function Ls(e){return e?typeof e=="string"?e:e.source:null}function $t(e){return ae("(?=",e,")")}function ae(...e){return e.map(n=>Ls(n)).join("")}function fy(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function we(...e){return"("+(fy(e).capture?"":"?:")+e.map(r=>Ls(r)).join("|")+")"}const si=e=>ae(/\b/,e,/\w$/.test(e)?/\b/:/\B/),py=["Protocol","Type"].map(si),vo=["init","self"].map(si),gy=["Any","Self"],fr=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Ao=["false","nil","true"],hy=["assignment","associativity","higherThan","left","lowerThan","none","right"],my=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],To=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Ds=we(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Ps=we(Ds,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),pr=ae(Ds,Ps,"*"),Fs=we(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),An=we(Fs,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),He=ae(Fs,An,"*"),gn=ae(/[A-Z]/,An,"*"),by=["attached","autoclosure",ae(/convention\(/,we("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",ae(/objc\(/,He,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],yy=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Ey(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,we(...py,...vo)],className:{2:"keyword"}},a={match:ae(/\./,we(...fr)),relevance:0},o=fr.filter(ie=>typeof ie=="string").concat(["_|0"]),s=fr.filter(ie=>typeof ie!="string").concat(gy).map(si),l={variants:[{className:"keyword",match:we(...s,...vo)}]},c={$pattern:we(/\b\w+/,/#\w+/),keyword:o.concat(my),literal:Ao},u=[i,a,l],d={match:ae(/\./,we(...To)),relevance:0},p={className:"built_in",match:ae(/\b/,we(...To),/(?=\()/)},f=[d,p],g={match:/->/,relevance:0},h={className:"operator",relevance:0,variants:[{match:pr},{match:`\\.(\\.|${Ps})+`}]},m=[g,h],b="([0-9]_*)+",_="([0-9a-fA-F]_*)+",N={className:"number",relevance:0,variants:[{match:`\\b(${b})(\\.(${b}))?([eE][+-]?(${b}))?\\b`},{match:`\\b0x(${_})(\\.(${_}))?([pP][+-]?(${b}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},C=(ie="")=>({className:"subst",variants:[{match:ae(/\\/,ie,/[0\\tnr"']/)},{match:ae(/\\/,ie,/u\{[0-9a-fA-F]{1,8}\}/)}]}),O=(ie="")=>({className:"subst",match:ae(/\\/,ie,/[\t ]*(?:[\r\n]|\r\n)/)}),k=(ie="")=>({className:"subst",label:"interpol",begin:ae(/\\/,ie,/\(/),end:/\)/}),B=(ie="")=>({begin:ae(ie,/"""/),end:ae(/"""/,ie),contains:[C(ie),O(ie),k(ie)]}),z=(ie="")=>({begin:ae(ie,/"/),end:ae(/"/,ie),contains:[C(ie),k(ie)]}),I={className:"string",variants:[B(),B("#"),B("##"),B("###"),z(),z("#"),z("##"),z("###")]},S=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],P={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:S},R=ie=>{const Oe=ae(ie,/\//),W=ae(/\//,ie);return{begin:Oe,end:W,contains:[...S,{scope:"comment",begin:`#(?!.*${W})`,end:/$/}]}},V={scope:"regexp",variants:[R("###"),R("##"),R("#"),P]},G={match:ae(/`/,He,/`/)},H={className:"variable",match:/\$\d+/},T={className:"variable",match:`\\$${An}+`},D=[G,H,T],L={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:yy,contains:[...m,N,I]}]}},j={scope:"keyword",match:ae(/@/,we(...by),$t(we(/\(/,/\s+/)))},y={scope:"meta",match:ae(/@/,He)},q=[L,j,y],X={match:$t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:ae(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,An,"+")},{className:"type",match:gn,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:ae(/\s+&\s+/,$t(gn)),relevance:0}]},x={begin:/</,end:/>/,keywords:c,contains:[...r,...u,...q,g,X]};X.contains.push(x);const re={match:ae(He,/\s*:/),keywords:"_|0",relevance:0},ue={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",re,...r,V,...u,...f,...m,N,I,...D,...q,X]},de={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,X]},Fe={begin:we($t(ae(He,/\s*:/)),$t(ae(He,/\s+/,He,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:He}]},ke={begin:/\(/,end:/\)/,keywords:c,contains:[Fe,...r,...u,...m,N,I,...q,X,ue],endsParent:!0,illegal:/["']/},Be={match:[/(func|macro)/,/\s+/,we(G.match,He,pr)],className:{1:"keyword",3:"title.function"},contains:[de,ke,t],illegal:[/\[/,/%/]},ze={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[de,ke,t],illegal:/\[|%/},Xe={match:[/operator/,/\s+/,pr],className:{1:"keyword",3:"title"}},Lt={begin:[/precedencegroup/,/\s+/,gn],className:{1:"keyword",3:"title"},contains:[X],keywords:[...hy,...Ao],end:/}/},Qe={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},mt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},xe={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,He,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[de,...u,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:gn},...u],relevance:0}]};for(const ie of I.variants){const Oe=ie.contains.find(it=>it.label==="interpol");Oe.keywords=c;const W=[...u,...f,...m,N,I,...D];Oe.contains=[...W,{begin:/\(/,end:/\)/,contains:["self",...W]}]}return{name:"Swift",keywords:c,contains:[...r,Be,ze,Qe,mt,xe,Xe,Lt,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},V,...u,...f,...m,N,I,...D,...q,X,ue]}}const Tn="[A-Za-z$_][0-9A-Za-z$_]*",Bs=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],zs=["true","false","null","undefined","NaN","Infinity"],Us=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],$s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],js=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Hs=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Gs=[].concat(js,Us,$s);function xy(e){const t=e.regex,n=(L,{after:j})=>{const y="</"+L[0].slice(1);return L.input.indexOf(y,j)!==-1},r=Tn,i={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,j)=>{const y=L[0].length+L.index,q=L.input[y];if(q==="<"||q===","){j.ignoreMatch();return}q===">"&&(n(L,{after:y})||j.ignoreMatch());let X;const x=L.input.substring(y);if(X=x.match(/^\s*=/)){j.ignoreMatch();return}if((X=x.match(/^\s+extends\s+/))&&X.index===0){j.ignoreMatch();return}}},s={$pattern:Tn,keyword:Bs,literal:zs,built_in:Gs,"variable.language":Hs},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},N=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,h,m,{match:/\$\d+/},d];p.contains=N.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(N)});const C=[].concat(_,p.contains),O=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(C)}]),k={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:O},B={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},z={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Us,...$s]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},S={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[k],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function R(L){return t.concat("(?!",L.join("|"),")")}const V={match:t.concat(/\b/,R([...js,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},k]},T="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",D={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(T)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[k]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,h,m,_,{match:/\$\d+/},d,z,{scope:"attr",match:r+t.lookahead(":"),relevance:0},D,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:T,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},S,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[k,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[k]},V,P,B,H,{match:/\$[(.]/}]}}function wy(e){const t=e.regex,n=xy(e),r=Tn,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:Tn,keyword:Bs.concat(l),literal:zs,built_in:Gs.concat(i),"variable.language":Hs},u={className:"meta",begin:"@"+r},d=(h,m,b)=>{const _=h.contains.findIndex(N=>N.label===m);if(_===-1)throw new Error("can not find mode to replace");h.contains.splice(_,1,b)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(u);const p=n.contains.find(h=>h.scope==="attr"),f=Object.assign({},p,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,p,f]),n.contains=n.contains.concat([u,a,o,f]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",s);const g=n.contains.find(h=>h.label==="func.def");return g.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function _y(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(o,s),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),p=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,c,u,d,p,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[p]}]}}function ky(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},s={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,o,i,e.QUOTE_STRING_MODE,l,c,s]}}function Sy(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,l,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,o,l,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Ny(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},g={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},h={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},m=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},g,h,a,o],b=[...m];return b.pop(),b.push(s),f.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:m}}const vy={arduino:sb,bash:lb,c:cb,cpp:ub,csharp:db,css:xb,diff:wb,go:_b,graphql:kb,ini:Sb,java:Nb,javascript:Rb,json:Ib,kotlin:Mb,less:$b,lua:jb,makefile:Hb,markdown:Gb,objectivec:qb,perl:Kb,php:Wb,"php-template":Vb,plaintext:Yb,python:Zb,"python-repl":Xb,r:Qb,ruby:Jb,rust:ey,scss:cy,shell:uy,sql:dy,swift:Ey,typescript:wy,vbnet:_y,wasm:ky,xml:Sy,yaml:Ny};function qs(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&qs(n)}),e}class Co{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Ks(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function nt(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const Ay="</span>",Ro=e=>!!e.scope,Ty=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class Cy{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Ks(t)}openNode(t){if(!Ro(t))return;const n=Ty(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Ro(t)&&(this.buffer+=Ay)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const Io=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class li{constructor(){this.rootNode=Io(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Io({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{li._collapse(n)}))}}class Ry extends li{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new Cy(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Zt(e){return e?typeof e=="string"?e:e.source:null}function Ws(e){return gt("(?=",e,")")}function Iy(e){return gt("(?:",e,")*")}function Oy(e){return gt("(?:",e,")?")}function gt(...e){return e.map(n=>Zt(n)).join("")}function My(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function ci(...e){return"("+(My(e).capture?"":"?:")+e.map(r=>Zt(r)).join("|")+")"}function Vs(e){return new RegExp(e.toString()+"|").exec("").length-1}function Ly(e,t){const n=e&&e.exec(t);return n&&n.index===0}const Dy=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ui(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let a=Zt(r),o="";for(;a.length>0;){const s=Dy.exec(a);if(!s){o+=a;break}o+=a.substring(0,s.index),a=a.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?o+="\\"+String(Number(s[1])+i):(o+=s[0],s[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const Py=/\b\B/,Ys="[a-zA-Z]\\w*",di="[a-zA-Z_]\\w*",Zs="\\b\\d+(\\.\\d+)?",Xs="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Qs="\\b(0b[01]+)",Fy="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",By=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=gt(t,/.*\b/,e.binary,/\b.*/)),nt({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Xt={begin:"\\\\[\\s\\S]",relevance:0},zy={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Xt]},Uy={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Xt]},$y={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},jn=function(e,t,n={}){const r=nt({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=ci("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:gt(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},jy=jn("//","$"),Hy=jn("/\\*","\\*/"),Gy=jn("#","$"),qy={scope:"number",begin:Zs,relevance:0},Ky={scope:"number",begin:Xs,relevance:0},Wy={scope:"number",begin:Qs,relevance:0},Vy={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Xt,{begin:/\[/,end:/\]/,relevance:0,contains:[Xt]}]},Yy={scope:"title",begin:Ys,relevance:0},Zy={scope:"title",begin:di,relevance:0},Xy={begin:"\\.\\s*"+di,relevance:0},Qy=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var hn=Object.freeze({__proto__:null,APOS_STRING_MODE:zy,BACKSLASH_ESCAPE:Xt,BINARY_NUMBER_MODE:Wy,BINARY_NUMBER_RE:Qs,COMMENT:jn,C_BLOCK_COMMENT_MODE:Hy,C_LINE_COMMENT_MODE:jy,C_NUMBER_MODE:Ky,C_NUMBER_RE:Xs,END_SAME_AS_BEGIN:Qy,HASH_COMMENT_MODE:Gy,IDENT_RE:Ys,MATCH_NOTHING_RE:Py,METHOD_GUARD:Xy,NUMBER_MODE:qy,NUMBER_RE:Zs,PHRASAL_WORDS_MODE:$y,QUOTE_STRING_MODE:Uy,REGEXP_MODE:Vy,RE_STARTERS_RE:Fy,SHEBANG:By,TITLE_MODE:Yy,UNDERSCORE_IDENT_RE:di,UNDERSCORE_TITLE_MODE:Zy});function Jy(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function eE(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function tE(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Jy,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function nE(e,t){Array.isArray(e.illegal)&&(e.illegal=ci(...e.illegal))}function rE(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function iE(e,t){e.relevance===void 0&&(e.relevance=1)}const oE=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=gt(n.beforeMatch,Ws(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},aE=["of","and","for","in","not","or","if","then","parent","list","value"],sE="keyword";function Js(e,t,n=sE){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(a){Object.assign(r,Js(e[a],t,a))}),r;function i(a,o){t&&(o=o.map(s=>s.toLowerCase())),o.forEach(function(s){const l=s.split("|");r[l[0]]=[a,lE(l[0],l[1])]})}}function lE(e,t){return t?Number(t):cE(e)?0:1}function cE(e){return aE.includes(e.toLowerCase())}const Oo={},lt=e=>{console.error(e)},Mo=(e,...t)=>{console.log(`WARN: ${e}`,...t)},xt=(e,t)=>{Oo[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Oo[`${e}/${t}`]=!0)},Cn=new Error;function el(e,t,{key:n}){let r=0;const i=e[n],a={},o={};for(let s=1;s<=t.length;s++)o[s+r]=i[s],a[s+r]=!0,r+=Vs(t[s-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function uE(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Cn;if(typeof e.beginScope!="object"||e.beginScope===null)throw lt("beginScope must be object"),Cn;el(e,e.begin,{key:"beginScope"}),e.begin=ui(e.begin,{joinWith:""})}}function dE(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Cn;if(typeof e.endScope!="object"||e.endScope===null)throw lt("endScope must be object"),Cn;el(e,e.end,{key:"endScope"}),e.end=ui(e.end,{joinWith:""})}}function fE(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function pE(e){fE(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),uE(e),dE(e)}function gE(e){function t(o,s){return new RegExp(Zt(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(s?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,s]),this.matchAt+=Vs(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const s=this.regexes.map(l=>l[1]);this.matcherRe=t(ui(s,{joinWith:"|"}),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(s);if(!l)return null;const c=l.findIndex((d,p)=>p>0&&d!==void 0),u=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];const l=new n;return this.rules.slice(s).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[s]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,l){this.rules.push([s,l]),l.type==="begin"&&this.count++}exec(s){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(s);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(s)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(o){const s=new r;return o.contains.forEach(l=>s.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&s.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&s.addRule(o.illegal,{type:"illegal"}),s}function a(o,s){const l=o;if(o.isCompiled)return l;[eE,rE,pE,oE].forEach(u=>u(o,s)),e.compilerExtensions.forEach(u=>u(o,s)),o.__beforeBegin=null,[tE,nE,iE].forEach(u=>u(o,s)),o.isCompiled=!0;let c=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=Js(o.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),s&&(o.begin||(o.begin=/\B|\b/),l.beginRe=t(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=t(l.end)),l.terminatorEnd=Zt(l.end)||"",o.endsWithParent&&s.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+s.terminatorEnd)),o.illegal&&(l.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(u){return hE(u==="self"?o:u)})),o.contains.forEach(function(u){a(u,l)}),o.starts&&a(o.starts,s),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=nt(e.classNameAliases||{}),a(e)}function tl(e){return e?e.endsWithParent||tl(e.starts):!1}function hE(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return nt(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:tl(e)?nt(e,{starts:e.starts?nt(e.starts):null}):Object.isFrozen(e)?nt(e):e}var mE="11.11.1";class bE extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const gr=Ks,Lo=nt,Do=Symbol("nomatch"),yE=7,nl=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Ry};function l(T){return s.noHighlightRe.test(T)}function c(T){let D=T.className+" ";D+=T.parentNode?T.parentNode.className:"";const L=s.languageDetectRe.exec(D);if(L){const j=z(L[1]);return j||(Mo(a.replace("{}",L[1])),Mo("Falling back to no-highlight mode for this block.",T)),j?L[1]:"no-highlight"}return D.split(/\s+/).find(j=>l(j)||z(j))}function u(T,D,L){let j="",y="";typeof D=="object"?(j=T,L=D.ignoreIllegals,y=D.language):(xt("10.7.0","highlight(lang, code, ...args) has been deprecated."),xt("10.7.0",`Please use highlight(code, options) instead.
34
34
  https://github.com/highlightjs/highlight.js/issues/2277`),y=T,j=D),L===void 0&&(L=!0);const q={code:j,language:y};G("before:highlight",q);const X=q.result?q.result:d(q.language,q.code,L);return X.code=q.code,G("after:highlight",X),X}function d(T,D,L,j){const y=Object.create(null);function q(w,A){return w.keywords[A]}function X(){if(!W.keywords){ge.addText(oe);return}let w=0;W.keywordPatternRe.lastIndex=0;let A=W.keywordPatternRe.exec(oe),F="";for(;A;){F+=oe.substring(w,A.index);const U=xe.case_insensitive?A[0].toLowerCase():A[0],Y=q(W,U);if(Y){const[fe,We]=Y;if(ge.addText(F),F="",y[U]=(y[U]||0)+1,y[U]<=yE&&(bt+=We),fe.startsWith("_"))F+=A[0];else{const Me=xe.classNameAliases[fe]||fe;ue(A[0],Me)}}else F+=A[0];w=W.keywordPatternRe.lastIndex,A=W.keywordPatternRe.exec(oe)}F+=oe.substring(w),ge.addText(F)}function x(){if(oe==="")return;let w=null;if(typeof W.subLanguage=="string"){if(!t[W.subLanguage]){ge.addText(oe);return}w=d(W.subLanguage,oe,!0,it[W.subLanguage]),it[W.subLanguage]=w._top}else w=f(oe,W.subLanguage.length?W.subLanguage:null);W.relevance>0&&(bt+=w.relevance),ge.__addSublanguage(w._emitter,w.language)}function re(){W.subLanguage!=null?x():X(),oe=""}function ue(w,A){w!==""&&(ge.startScope(A),ge.addText(w),ge.endScope())}function de(w,A){let F=1;const U=A.length-1;for(;F<=U;){if(!w._emit[F]){F++;continue}const Y=xe.classNameAliases[w[F]]||w[F],fe=A[F];Y?ue(fe,Y):(oe=fe,X(),oe=""),F++}}function Fe(w,A){return w.scope&&typeof w.scope=="string"&&ge.openNode(xe.classNameAliases[w.scope]||w.scope),w.beginScope&&(w.beginScope._wrap?(ue(oe,xe.classNameAliases[w.beginScope._wrap]||w.beginScope._wrap),oe=""):w.beginScope._multi&&(de(w.beginScope,A),oe="")),W=Object.create(w,{parent:{value:W}}),W}function ke(w,A,F){let U=Ly(w.endRe,F);if(U){if(w["on:end"]){const Y=new Co(w);w["on:end"](A,Y),Y.isMatchIgnored&&(U=!1)}if(U){for(;w.endsParent&&w.parent;)w=w.parent;return w}}if(w.endsWithParent)return ke(w.parent,A,F)}function Be(w){return W.matcher.regexIndex===0?(oe+=w[0],1):(Pt=!0,0)}function ze(w){const A=w[0],F=w.rule,U=new Co(F),Y=[F.__beforeBegin,F["on:begin"]];for(const fe of Y)if(fe&&(fe(w,U),U.isMatchIgnored))return Be(A);return F.skip?oe+=A:(F.excludeBegin&&(oe+=A),re(),!F.returnBegin&&!F.excludeBegin&&(oe=A)),Fe(F,w),F.returnBegin?0:A.length}function Xe(w){const A=w[0],F=D.substring(w.index),U=ke(W,w,F);if(!U)return Do;const Y=W;W.endScope&&W.endScope._wrap?(re(),ue(A,W.endScope._wrap)):W.endScope&&W.endScope._multi?(re(),de(W.endScope,w)):Y.skip?oe+=A:(Y.returnEnd||Y.excludeEnd||(oe+=A),re(),Y.excludeEnd&&(oe=A));do W.scope&&ge.closeNode(),!W.skip&&!W.subLanguage&&(bt+=W.relevance),W=W.parent;while(W!==U.parent);return U.starts&&Fe(U.starts,w),Y.returnEnd?0:A.length}function Lt(){const w=[];for(let A=W;A!==xe;A=A.parent)A.scope&&w.unshift(A.scope);w.forEach(A=>ge.openNode(A))}let Qe={};function mt(w,A){const F=A&&A[0];if(oe+=w,F==null)return re(),0;if(Qe.type==="begin"&&A.type==="end"&&Qe.index===A.index&&F===""){if(oe+=D.slice(A.index,A.index+1),!i){const U=new Error(`0 width match regex (${T})`);throw U.languageName=T,U.badRule=Qe.rule,U}return 1}if(Qe=A,A.type==="begin")return ze(A);if(A.type==="illegal"&&!L){const U=new Error('Illegal lexeme "'+F+'" for mode "'+(W.scope||"<unnamed>")+'"');throw U.mode=W,U}else if(A.type==="end"){const U=Xe(A);if(U!==Do)return U}if(A.type==="illegal"&&F==="")return oe+=`
35
- `,1;if(Dt>1e5&&Dt>A.index*3)throw new Error("potential infinite loop, way more iterations than matches");return oe+=F,F.length}const xe=z(T);if(!xe)throw lt(a.replace("{}",T)),new Error('Unknown language: "'+T+'"');const ie=gE(xe);let Oe="",W=j||ie;const it={},ge=new s.__emitter(s);Lt();let oe="",bt=0,Ke=0,Dt=0,Pt=!1;try{if(xe.__emitTokens)xe.__emitTokens(D,ge);else{for(W.matcher.considerAll();;){Dt++,Pt?Pt=!1:W.matcher.considerAll(),W.matcher.lastIndex=Ke;const w=W.matcher.exec(D);if(!w)break;const A=D.substring(Ke,w.index),F=mt(A,w);Ke=w.index+F}mt(D.substring(Ke))}return ge.finalize(),Oe=ge.toHTML(),{language:T,value:Oe,relevance:bt,illegal:!1,_emitter:ge,_top:W}}catch(w){if(w.message&&w.message.includes("Illegal"))return{language:T,value:gr(D),illegal:!0,relevance:0,_illegalBy:{message:w.message,index:Ke,context:D.slice(Ke-100,Ke+100),mode:w.mode,resultSoFar:Oe},_emitter:ge};if(i)return{language:T,value:gr(D),illegal:!1,relevance:0,errorRaised:w,_emitter:ge,_top:W};throw w}}function p(T){const D={value:gr(T),illegal:!1,relevance:0,_top:o,_emitter:new s.__emitter(s)};return D._emitter.addText(T),D}function f(T,D){D=D||s.languages||Object.keys(t);const L=p(T),j=D.filter(z).filter(S).map(re=>d(re,T,!1));j.unshift(L);const y=j.sort((re,ue)=>{if(re.relevance!==ue.relevance)return ue.relevance-re.relevance;if(re.language&&ue.language){if(z(re.language).supersetOf===ue.language)return 1;if(z(ue.language).supersetOf===re.language)return-1}return 0}),[q,X]=y,x=q;return x.secondBest=X,x}function g(T,D,L){const j=D&&n[D]||L;T.classList.add("hljs"),T.classList.add(`language-${j}`)}function h(T){let D=null;const L=c(T);if(l(L))return;if(G("before:highlightElement",{el:T,language:L}),T.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",T);return}if(T.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(T)),s.throwUnescapedHTML))throw new bE("One of your code blocks includes unescaped HTML.",T.innerHTML);D=T;const j=D.textContent,y=L?u(j,{language:L,ignoreIllegals:!0}):f(j);T.innerHTML=y.value,T.dataset.highlighted="yes",g(T,L,y.language),T.result={language:y.language,re:y.relevance,relevance:y.relevance},y.secondBest&&(T.secondBest={language:y.secondBest.language,relevance:y.secondBest.relevance}),G("after:highlightElement",{el:T,result:y,text:j})}function m(T){s=Lo(s,T)}const b=()=>{C(),xt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _(){C(),xt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let N=!1;function C(){function T(){C()}if(document.readyState==="loading"){N||window.addEventListener("DOMContentLoaded",T,!1),N=!0;return}document.querySelectorAll(s.cssSelector).forEach(h)}function O(T,D){let L=null;try{L=D(e)}catch(j){if(lt("Language definition for '{}' could not be registered.".replace("{}",T)),i)lt(j);else throw j;L=o}L.name||(L.name=T),t[T]=L,L.rawDefinition=D.bind(null,e),L.aliases&&I(L.aliases,{languageName:T})}function k(T){delete t[T];for(const D of Object.keys(n))n[D]===T&&delete n[D]}function B(){return Object.keys(t)}function z(T){return T=(T||"").toLowerCase(),t[T]||t[n[T]]}function I(T,{languageName:D}){typeof T=="string"&&(T=[T]),T.forEach(L=>{n[L.toLowerCase()]=D})}function S(T){const D=z(T);return D&&!D.disableAutodetect}function P(T){T["before:highlightBlock"]&&!T["before:highlightElement"]&&(T["before:highlightElement"]=D=>{T["before:highlightBlock"](Object.assign({block:D.el},D))}),T["after:highlightBlock"]&&!T["after:highlightElement"]&&(T["after:highlightElement"]=D=>{T["after:highlightBlock"](Object.assign({block:D.el},D))})}function R(T){P(T),r.push(T)}function V(T){const D=r.indexOf(T);D!==-1&&r.splice(D,1)}function G(T,D){const L=T;r.forEach(function(j){j[L]&&j[L](D)})}function H(T){return xt("10.7.0","highlightBlock will be removed entirely in v12.0"),xt("10.7.0","Please use highlightElement now."),h(T)}Object.assign(e,{highlight:u,highlightAuto:f,highlightAll:C,highlightElement:h,highlightBlock:H,configure:m,initHighlighting:b,initHighlightingOnLoad:_,registerLanguage:O,unregisterLanguage:k,listLanguages:B,getLanguage:z,registerAliases:I,autoDetection:S,inherit:Lo,addPlugin:R,removePlugin:V}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=mE,e.regex={concat:gt,lookahead:Ws,either:ci,optional:Oy,anyNumberOfTimes:Iy};for(const T in hn)typeof hn[T]=="object"&&qs(hn[T]);return Object.assign(e,hn),e},At=nl({});At.newInstance=()=>nl({});var EE=At;At.HighlightJS=At;At.default=At;const xE=Hr(EE),Po={},wE="hljs-";function _E(e){const t=xE.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function n(l,c,u){const d=u||Po,p=typeof d.prefix=="string"?d.prefix:wE;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:kE,classPrefix:p});const f=t.highlight(c,{ignoreIllegals:!0,language:l});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const g=f._emitter.root,h=g.data;return h.language=f.language,h.relevance=f.relevance,g}function r(l,c){const d=(c||Po).subset||i();let p=-1,f=0,g;for(;++p<d.length;){const h=d[p];if(!t.getLanguage(h))continue;const m=n(h,l,c);m.data&&m.data.relevance!==void 0&&m.data.relevance>f&&(f=m.data.relevance,g=m)}return g||{type:"root",children:[],data:{language:void 0,relevance:f}}}function i(){return t.listLanguages()}function a(l,c){if(typeof l=="string")t.registerLanguage(l,c);else{let u;for(u in l)Object.hasOwn(l,u)&&t.registerLanguage(u,l[u])}}function o(l,c){if(typeof l=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let u;for(u in l)if(Object.hasOwn(l,u)){const d=l[u];t.registerAliases(typeof d=="string"?d:[...d],{languageName:u})}}}function s(l){return!!t.getLanguage(l)}}class kE{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(o,s){return s?o+"_".repeat(s):n.options.classPrefix+o}),i=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const rl=function(e){if(e==null)return AE;if(typeof e=="function")return Hn(e);if(typeof e=="object")return Array.isArray(e)?SE(e):NE(e);if(typeof e=="string")return vE(e);throw new Error("Expected function, string, or object as test")};function SE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rl(e[n]);return Hn(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function NE(e){const t=e;return Hn(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function vE(e){return Hn(t);function t(n){return n&&n.type===e}}function Hn(e){return t;function t(n,r,i){return!!(TE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function AE(){return!0}function TE(e){return e!==null&&typeof e=="object"&&"type"in e}const il=[],CE=!0,Fo=!1,RE="skip";function IE(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=rl(i),o=r?-1:1;s(e,void 0,[])();function s(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=il,g,h,m;if((!t||a(l,c,u[u.length-1]||void 0))&&(f=OE(n(l,u)),f[0]===Fo))return f;if("children"in l&&l.children){const b=l;if(b.children&&f[0]!==RE)for(h=(r?b.children.length:-1)+o,m=u.concat(b);h>-1&&h<b.children.length;){const _=b.children[h];if(g=s(_,h,m)(),g[0]===Fo)return g;h=typeof g[1]=="number"?g[1]:h+o}}return f}}}function OE(e){return Array.isArray(e)?e:typeof e=="number"?[CE,e]:e==null?il:[e]}function ME(e,t,n,r){let i,a,o;a=t,o=n,i=r,IE(e,a,s,i);function s(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const LE={};function ol(e){const t=e||LE,n=t.aliases,r=t.detect||!1,i=t.languages||vy,a=t.plainText,o=t.prefix,s=t.subset;let l="hljs";const c=_E(i);if(n&&c.registerAlias(n),o){const u=o.indexOf("-");l=u===-1?o:o.slice(0,u)}return function(u,d){ME(u,"element",function(p,f,g){if(p.tagName!=="code"||!g||g.type!=="element"||g.tagName!=="pre")return;const h=DE(p);if(h===!1||!h&&!r||h&&a&&a.includes(h))return;Array.isArray(p.properties.className)||(p.properties.className=[]),p.properties.className.includes(l)||p.properties.className.unshift(l);const m=Jm(p,{whitespace:"pre"});let b;try{b=h?c.highlight(h,m,{prefix:o}):c.highlightAuto(m,{prefix:o,subset:s})}catch(_){const N=_;if(h&&/Unknown language/.test(N.message)){d.message("Cannot highlight as `"+h+"`, it’s not registered",{ancestors:[g,p],cause:N,place:p.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw N}!h&&b.data&&b.data.language&&p.properties.className.push("language-"+b.data.language),b.children.length>0&&(p.children=b.children)})}}function DE(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const i=String(t[n]);if(i==="no-highlight"||i==="nohighlight")return!1;!r&&i.slice(0,5)==="lang-"&&(r=i.slice(5)),!r&&i.slice(0,9)==="language-"&&(r=i.slice(9))}return r}function PE({article:e,onBack:t,onEdit:n,showActions:r=!1}){return E.jsxs("div",{className:"mx-auto max-w-4xl",children:[(t||r&&n)&&E.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t&&E.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Back"]}),r&&n&&E.jsxs("button",{onClick:()=>n(e),className:"flex items-center gap-2 rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Edit"]})]}),E.jsxs("article",{className:"rounded-lg bg-white p-8 shadow-md",children:[E.jsxs("header",{className:"border-b border-gray-200 pb-6",children:[E.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:e.title}),E.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[e.dateAt&&E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(e.dateAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]}),e.category&&E.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:e.category.title}),E.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${e.status===me.Published?"bg-green-100 text-green-800":e.status===me.Draft?"bg-gray-100 text-gray-800":e.status===me.Review?"bg-yellow-100 text-yellow-800":e.status===me.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:me[e.status]})]}),e.tags&&e.tags.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.tags.map(i=>E.jsxs("span",{className:"rounded-md bg-gray-100 px-3 py-1 text-sm text-gray-700",children:["#",i.title]},i.tagId))}),e.roles&&e.roles.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.roles.map(i=>E.jsx("span",{className:"rounded-md bg-purple-100 px-3 py-1 text-sm text-purple-700",children:i.name},i.slug))})]}),E.jsx("div",{className:"prose prose-lg mt-8 max-w-none",children:E.jsx(Ka,{remarkPlugins:[_s],rehypePlugins:[ol],children:e.content})})]})]})}function al({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:a="400px"}){const[o,s]=$.useState("edit");return E.jsxs("div",{className:"space-y-2",children:[r&&E.jsx("label",{className:"block text-sm font-medium text-gray-700",children:r}),E.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 bg-white",children:[E.jsxs("div",{className:"flex border-b border-gray-300 bg-gray-50",children:[E.jsx("button",{type:"button",onClick:()=>s("edit"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="edit"?"border-b-2 border-blue-600 bg-white text-blue-600":"text-gray-600 hover:text-gray-900"}`,children:"Edit"}),E.jsx("button",{type:"button",onClick:()=>s("preview"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="preview"?"border-b-2 border-blue-600 bg-white text-blue-600":"text-gray-600 hover:text-gray-900"}`,children:"Preview"})]}),E.jsx("div",{style:{minHeight:a},children:o==="edit"?E.jsx("textarea",{value:e,onChange:l=>t(l.target.value),placeholder:n,className:"h-full w-full resize-none border-0 p-4 font-mono text-sm focus:outline-none focus:ring-0",style:{minHeight:a}}):E.jsx("div",{className:"prose max-w-none p-4",children:e?E.jsx(Ka,{remarkPlugins:[_s],rehypePlugins:[ol],children:e}):E.jsx("div",{className:"text-gray-400",children:"Nothing to preview"})})})]}),i&&E.jsx("p",{className:"text-sm text-red-600",children:i}),E.jsxs("div",{className:"rounded-md bg-gray-50 p-3 text-xs text-gray-600",children:[E.jsx("p",{className:"font-medium",children:"Markdown Syntax Help:"}),E.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[E.jsxs("div",{children:[E.jsx("strong",{children:"# Heading 1"})," - Main heading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"## Heading 2"})," - Subheading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"**bold text**"})," - Bold"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"*italic text*"})," - Italic"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"[link](url)"})," - Link"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"![alt](image.jpg)"})," - Image"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"- item"})," - Bullet list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"1. item"})," - Numbered list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"`code`"})," - Inline code"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"```language```"})," - Code block"]})]})]})]})}function FE({article:e,categories:t=[],tags:n=[],onSave:r,onCancel:i,loading:a=!1}){const[o,s]=$.useState(""),[l,c]=$.useState(""),[u,d]=$.useState(me.Draft),[p,f]=$.useState(null),[g,h]=$.useState(""),[m,b]=$.useState([]),[_,N]=$.useState(""),[C,O]=$.useState({});$.useEffect(()=>{var I,S;e&&(s(e.title),c(e.content),d(e.status),f(e.categoryId||null),h(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),b(((I=e.tags)==null?void 0:I.map(P=>P.tagId).filter(P=>P!==void 0))||[]),N(((S=e.roles)==null?void 0:S.map(P=>P.slug).join(", "))||""))},[e]);const k=()=>{const I={};return o.trim()||(I.title="Title is required"),l.trim()||(I.content="Content is required"),O(I),Object.keys(I).length===0},B=async I=>{if(I.preventDefault(),!k())return;const S=_.split(",").map(R=>R.trim()).filter(R=>R.length>0),P={title:o.trim(),content:l.trim(),status:u,categoryId:p||void 0,dateAt:g||void 0,tagIds:m.length>0?m:void 0,roleIds:S.length>0?S:void 0};e?await r({articleId:e.articleId,...P}):await r(P)},z=I=>{b(S=>S.includes(I)?S.filter(P=>P!==I):[...S,I])};return E.jsx("form",{onSubmit:B,className:"space-y-6",children:E.jsxs("div",{className:"rounded-lg p-6",children:[E.jsx("h2",{className:"mb-6 text-2xl font-bold text-gray-900 dark:text-gray-100",children:e?"Edit Article":"Create New Article"}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:I=>s(I.target.value),className:`w-full rounded-md border ${C.title?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"} px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter article title"}),C.title&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:C.title})]}),E.jsx("div",{className:"mt-4",children:E.jsx(al,{label:"Content *",value:l,onChange:c,error:C.content,placeholder:"Write your article content in Markdown..."})}),E.jsxs("div",{className:"mt-4 space-y-2",children:[E.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Publication Date"}),E.jsx("input",{id:"dateAt",type:"datetime-local",value:g,onChange:I=>h(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),E.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"status",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),E.jsxs("select",{id:"status",value:u,onChange:I=>d(Number(I.target.value)),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:me.Draft,children:"Draft"}),E.jsx("option",{value:me.Published,children:"Published"}),E.jsx("option",{value:me.Archived,children:"Archived"}),E.jsx("option",{value:me.Scheduled,children:"Scheduled"}),E.jsx("option",{value:me.Review,children:"Review"})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Category"}),E.jsxs("select",{id:"category",value:p||"",onChange:I=>f(I.target.value?Number(I.target.value):null),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:"No Category"}),t.map(I=>E.jsx("option",{value:I.categoryId,children:I.title},I.categoryId))]})]})]}),n.length>0&&E.jsxs("div",{className:"mt-4 space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Tags"}),E.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(I=>E.jsxs("button",{type:"button",onClick:()=>z(I.tagId||0),className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${m.includes(I.tagId||0)?"bg-blue-600 text-white":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:["#",I.title]},I.tagId))})]}),E.jsxs("div",{className:"mt-4 space-y-2",children:[E.jsx("label",{htmlFor:"roles",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Roles"}),E.jsx("input",{id:"roles",type:"text",value:_,onChange:I=>N(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Enter role slugs separated by commas (e.g., admin, editor)"}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of role slugs."})]}),E.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[E.jsx("button",{type:"button",onClick:i,disabled:a,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:a,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:a?"Saving...":e?"Update Article":"Create Article"})]})]})})}/**
35
+ `,1;if(Dt>1e5&&Dt>A.index*3)throw new Error("potential infinite loop, way more iterations than matches");return oe+=F,F.length}const xe=z(T);if(!xe)throw lt(a.replace("{}",T)),new Error('Unknown language: "'+T+'"');const ie=gE(xe);let Oe="",W=j||ie;const it={},ge=new s.__emitter(s);Lt();let oe="",bt=0,Ke=0,Dt=0,Pt=!1;try{if(xe.__emitTokens)xe.__emitTokens(D,ge);else{for(W.matcher.considerAll();;){Dt++,Pt?Pt=!1:W.matcher.considerAll(),W.matcher.lastIndex=Ke;const w=W.matcher.exec(D);if(!w)break;const A=D.substring(Ke,w.index),F=mt(A,w);Ke=w.index+F}mt(D.substring(Ke))}return ge.finalize(),Oe=ge.toHTML(),{language:T,value:Oe,relevance:bt,illegal:!1,_emitter:ge,_top:W}}catch(w){if(w.message&&w.message.includes("Illegal"))return{language:T,value:gr(D),illegal:!0,relevance:0,_illegalBy:{message:w.message,index:Ke,context:D.slice(Ke-100,Ke+100),mode:w.mode,resultSoFar:Oe},_emitter:ge};if(i)return{language:T,value:gr(D),illegal:!1,relevance:0,errorRaised:w,_emitter:ge,_top:W};throw w}}function p(T){const D={value:gr(T),illegal:!1,relevance:0,_top:o,_emitter:new s.__emitter(s)};return D._emitter.addText(T),D}function f(T,D){D=D||s.languages||Object.keys(t);const L=p(T),j=D.filter(z).filter(S).map(re=>d(re,T,!1));j.unshift(L);const y=j.sort((re,ue)=>{if(re.relevance!==ue.relevance)return ue.relevance-re.relevance;if(re.language&&ue.language){if(z(re.language).supersetOf===ue.language)return 1;if(z(ue.language).supersetOf===re.language)return-1}return 0}),[q,X]=y,x=q;return x.secondBest=X,x}function g(T,D,L){const j=D&&n[D]||L;T.classList.add("hljs"),T.classList.add(`language-${j}`)}function h(T){let D=null;const L=c(T);if(l(L))return;if(G("before:highlightElement",{el:T,language:L}),T.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",T);return}if(T.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(T)),s.throwUnescapedHTML))throw new bE("One of your code blocks includes unescaped HTML.",T.innerHTML);D=T;const j=D.textContent,y=L?u(j,{language:L,ignoreIllegals:!0}):f(j);T.innerHTML=y.value,T.dataset.highlighted="yes",g(T,L,y.language),T.result={language:y.language,re:y.relevance,relevance:y.relevance},y.secondBest&&(T.secondBest={language:y.secondBest.language,relevance:y.secondBest.relevance}),G("after:highlightElement",{el:T,result:y,text:j})}function m(T){s=Lo(s,T)}const b=()=>{C(),xt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _(){C(),xt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let N=!1;function C(){function T(){C()}if(document.readyState==="loading"){N||window.addEventListener("DOMContentLoaded",T,!1),N=!0;return}document.querySelectorAll(s.cssSelector).forEach(h)}function O(T,D){let L=null;try{L=D(e)}catch(j){if(lt("Language definition for '{}' could not be registered.".replace("{}",T)),i)lt(j);else throw j;L=o}L.name||(L.name=T),t[T]=L,L.rawDefinition=D.bind(null,e),L.aliases&&I(L.aliases,{languageName:T})}function k(T){delete t[T];for(const D of Object.keys(n))n[D]===T&&delete n[D]}function B(){return Object.keys(t)}function z(T){return T=(T||"").toLowerCase(),t[T]||t[n[T]]}function I(T,{languageName:D}){typeof T=="string"&&(T=[T]),T.forEach(L=>{n[L.toLowerCase()]=D})}function S(T){const D=z(T);return D&&!D.disableAutodetect}function P(T){T["before:highlightBlock"]&&!T["before:highlightElement"]&&(T["before:highlightElement"]=D=>{T["before:highlightBlock"](Object.assign({block:D.el},D))}),T["after:highlightBlock"]&&!T["after:highlightElement"]&&(T["after:highlightElement"]=D=>{T["after:highlightBlock"](Object.assign({block:D.el},D))})}function R(T){P(T),r.push(T)}function V(T){const D=r.indexOf(T);D!==-1&&r.splice(D,1)}function G(T,D){const L=T;r.forEach(function(j){j[L]&&j[L](D)})}function H(T){return xt("10.7.0","highlightBlock will be removed entirely in v12.0"),xt("10.7.0","Please use highlightElement now."),h(T)}Object.assign(e,{highlight:u,highlightAuto:f,highlightAll:C,highlightElement:h,highlightBlock:H,configure:m,initHighlighting:b,initHighlightingOnLoad:_,registerLanguage:O,unregisterLanguage:k,listLanguages:B,getLanguage:z,registerAliases:I,autoDetection:S,inherit:Lo,addPlugin:R,removePlugin:V}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=mE,e.regex={concat:gt,lookahead:Ws,either:ci,optional:Oy,anyNumberOfTimes:Iy};for(const T in hn)typeof hn[T]=="object"&&qs(hn[T]);return Object.assign(e,hn),e},At=nl({});At.newInstance=()=>nl({});var EE=At;At.HighlightJS=At;At.default=At;const xE=Hr(EE),Po={},wE="hljs-";function _E(e){const t=xE.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function n(l,c,u){const d=u||Po,p=typeof d.prefix=="string"?d.prefix:wE;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:kE,classPrefix:p});const f=t.highlight(c,{ignoreIllegals:!0,language:l});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const g=f._emitter.root,h=g.data;return h.language=f.language,h.relevance=f.relevance,g}function r(l,c){const d=(c||Po).subset||i();let p=-1,f=0,g;for(;++p<d.length;){const h=d[p];if(!t.getLanguage(h))continue;const m=n(h,l,c);m.data&&m.data.relevance!==void 0&&m.data.relevance>f&&(f=m.data.relevance,g=m)}return g||{type:"root",children:[],data:{language:void 0,relevance:f}}}function i(){return t.listLanguages()}function a(l,c){if(typeof l=="string")t.registerLanguage(l,c);else{let u;for(u in l)Object.hasOwn(l,u)&&t.registerLanguage(u,l[u])}}function o(l,c){if(typeof l=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let u;for(u in l)if(Object.hasOwn(l,u)){const d=l[u];t.registerAliases(typeof d=="string"?d:[...d],{languageName:u})}}}function s(l){return!!t.getLanguage(l)}}class kE{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(o,s){return s?o+"_".repeat(s):n.options.classPrefix+o}),i=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const rl=function(e){if(e==null)return AE;if(typeof e=="function")return Hn(e);if(typeof e=="object")return Array.isArray(e)?SE(e):NE(e);if(typeof e=="string")return vE(e);throw new Error("Expected function, string, or object as test")};function SE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rl(e[n]);return Hn(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function NE(e){const t=e;return Hn(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function vE(e){return Hn(t);function t(n){return n&&n.type===e}}function Hn(e){return t;function t(n,r,i){return!!(TE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function AE(){return!0}function TE(e){return e!==null&&typeof e=="object"&&"type"in e}const il=[],CE=!0,Fo=!1,RE="skip";function IE(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=rl(i),o=r?-1:1;s(e,void 0,[])();function s(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=il,g,h,m;if((!t||a(l,c,u[u.length-1]||void 0))&&(f=OE(n(l,u)),f[0]===Fo))return f;if("children"in l&&l.children){const b=l;if(b.children&&f[0]!==RE)for(h=(r?b.children.length:-1)+o,m=u.concat(b);h>-1&&h<b.children.length;){const _=b.children[h];if(g=s(_,h,m)(),g[0]===Fo)return g;h=typeof g[1]=="number"?g[1]:h+o}}return f}}}function OE(e){return Array.isArray(e)?e:typeof e=="number"?[CE,e]:e==null?il:[e]}function ME(e,t,n,r){let i,a,o;a=t,o=n,i=r,IE(e,a,s,i);function s(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const LE={};function ol(e){const t=e||LE,n=t.aliases,r=t.detect||!1,i=t.languages||vy,a=t.plainText,o=t.prefix,s=t.subset;let l="hljs";const c=_E(i);if(n&&c.registerAlias(n),o){const u=o.indexOf("-");l=u===-1?o:o.slice(0,u)}return function(u,d){ME(u,"element",function(p,f,g){if(p.tagName!=="code"||!g||g.type!=="element"||g.tagName!=="pre")return;const h=DE(p);if(h===!1||!h&&!r||h&&a&&a.includes(h))return;Array.isArray(p.properties.className)||(p.properties.className=[]),p.properties.className.includes(l)||p.properties.className.unshift(l);const m=Jm(p,{whitespace:"pre"});let b;try{b=h?c.highlight(h,m,{prefix:o}):c.highlightAuto(m,{prefix:o,subset:s})}catch(_){const N=_;if(h&&/Unknown language/.test(N.message)){d.message("Cannot highlight as `"+h+"`, it’s not registered",{ancestors:[g,p],cause:N,place:p.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw N}!h&&b.data&&b.data.language&&p.properties.className.push("language-"+b.data.language),b.children.length>0&&(p.children=b.children)})}}function DE(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const i=String(t[n]);if(i==="no-highlight"||i==="nohighlight")return!1;!r&&i.slice(0,5)==="lang-"&&(r=i.slice(5)),!r&&i.slice(0,9)==="language-"&&(r=i.slice(9))}return r}function PE({article:e,onBack:t,onEdit:n,showActions:r=!1}){return E.jsxs("div",{className:"mx-auto max-w-4xl",children:[(t||r&&n)&&E.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t&&E.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Back"]}),r&&n&&E.jsxs("button",{onClick:()=>n(e),className:"flex items-center gap-2 rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Edit"]})]}),E.jsxs("article",{className:"rounded-lg bg-white p-8 shadow-md",children:[E.jsxs("header",{className:"border-b border-gray-200 pb-6",children:[E.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:e.title}),E.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[e.dateAt&&E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(e.dateAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]}),e.category&&E.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:e.category.title}),E.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${e.status===me.Published?"bg-green-100 text-green-800":e.status===me.Draft?"bg-gray-100 text-gray-800":e.status===me.Review?"bg-yellow-100 text-yellow-800":e.status===me.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:me[e.status]})]}),e.tags&&e.tags.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.tags.map(i=>E.jsxs("span",{className:"rounded-md bg-gray-100 px-3 py-1 text-sm text-gray-700",children:["#",i.title]},i.tagId))}),e.roles&&e.roles.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.roles.map(i=>E.jsx("span",{className:"rounded-md bg-purple-100 px-3 py-1 text-sm text-purple-700",children:i.name},i.slug))})]}),E.jsx("div",{className:"prose prose-lg mt-8 max-w-none",children:E.jsx(Ka,{remarkPlugins:[_s],rehypePlugins:[ol],children:e.content})})]})]})}function al({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:a="400px"}){const[o,s]=$.useState("edit");return E.jsxs("div",{className:"space-y-2",children:[r&&E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r}),E.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900",children:[E.jsxs("div",{className:"flex border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800",children:[E.jsx("button",{type:"button",onClick:()=>s("edit"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="edit"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Edit"}),E.jsx("button",{type:"button",onClick:()=>s("preview"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="preview"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Preview"})]}),E.jsx("div",{style:{minHeight:a},children:o==="edit"?E.jsx("textarea",{value:e,onChange:l=>t(l.target.value),placeholder:n,className:"h-full w-full resize-none border-0 p-4 font-mono text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-0",style:{minHeight:a}}):E.jsx("div",{className:"prose dark:prose-invert max-w-none p-4",children:e?E.jsx(Ka,{remarkPlugins:[_s],rehypePlugins:[ol],children:e}):E.jsx("div",{className:"text-gray-400 dark:text-gray-500",children:"Nothing to preview"})})})]}),i&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:i}),E.jsxs("div",{className:"rounded-md bg-gray-50 dark:bg-gray-800 p-3 text-xs text-gray-600 dark:text-gray-400",children:[E.jsx("p",{className:"font-medium",children:"Markdown Syntax Help:"}),E.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[E.jsxs("div",{children:[E.jsx("strong",{children:"# Heading 1"})," - Main heading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"## Heading 2"})," - Subheading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"**bold text**"})," - Bold"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"*italic text*"})," - Italic"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"[link](url)"})," - Link"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"![alt](image.jpg)"})," - Image"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"- item"})," - Bullet list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"1. item"})," - Numbered list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"`code`"})," - Inline code"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"```language```"})," - Code block"]})]})]})]})}function FE({article:e,categories:t=[],tags:n=[],onSave:r,onCancel:i,loading:a=!1}){const[o,s]=$.useState(""),[l,c]=$.useState(""),[u,d]=$.useState(me.Draft),[p,f]=$.useState(null),[g,h]=$.useState(""),[m,b]=$.useState([]),[_,N]=$.useState(""),[C,O]=$.useState({});$.useEffect(()=>{var I,S;e&&(s(e.title),c(e.content),d(e.status),f(e.categoryId||null),h(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),b(((I=e.tags)==null?void 0:I.map(P=>P.tagId).filter(P=>P!==void 0))||[]),N(((S=e.roles)==null?void 0:S.map(P=>P.slug).join(", "))||""))},[e]);const k=()=>{const I={};return o.trim()||(I.title="Title is required"),l.trim()||(I.content="Content is required"),O(I),Object.keys(I).length===0},B=async I=>{if(I.preventDefault(),!k())return;const S=_.split(",").map(R=>R.trim()).filter(R=>R.length>0),P={title:o.trim(),content:l.trim(),status:u,categoryId:p||void 0,dateAt:g||void 0,tagIds:m.length>0?m:void 0,roleIds:S.length>0?S:void 0};e?await r({articleId:e.articleId,...P}):await r(P)},z=I=>{b(S=>S.includes(I)?S.filter(P=>P!==I):[...S,I])};return E.jsxs("form",{onSubmit:B,className:"space-y-6",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:I=>s(I.target.value),className:`w-full rounded-md border ${C.title?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"} px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter article title"}),C.title&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:C.title})]}),E.jsx("div",{className:"mt-4",children:E.jsx(al,{label:"Content *",value:l,onChange:c,error:C.content,placeholder:"Write your article content in Markdown..."})}),E.jsxs("div",{className:"mt-4 space-y-2",children:[E.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Publication Date"}),E.jsx("input",{id:"dateAt",type:"datetime-local",value:g,onChange:I=>h(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),E.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"status",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),E.jsxs("select",{id:"status",value:u,onChange:I=>d(Number(I.target.value)),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:me.Draft,children:"Draft"}),E.jsx("option",{value:me.Published,children:"Published"}),E.jsx("option",{value:me.Archived,children:"Archived"}),E.jsx("option",{value:me.Scheduled,children:"Scheduled"}),E.jsx("option",{value:me.Review,children:"Review"})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Category"}),E.jsxs("select",{id:"category",value:p||"",onChange:I=>f(I.target.value?Number(I.target.value):null),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:"No Category"}),t.map(I=>E.jsx("option",{value:I.categoryId,children:I.title},I.categoryId))]})]})]}),n.length>0&&E.jsxs("div",{className:"mt-4 space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Tags"}),E.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(I=>E.jsxs("button",{type:"button",onClick:()=>z(I.tagId||0),className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${m.includes(I.tagId||0)?"bg-blue-600 text-white":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:["#",I.title]},I.tagId))})]}),E.jsxs("div",{className:"mt-4 space-y-2",children:[E.jsx("label",{htmlFor:"roles",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Roles"}),E.jsx("input",{id:"roles",type:"text",value:_,onChange:I=>N(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Enter role slugs separated by commas (e.g., admin, editor)"}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of role slugs."})]}),E.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[E.jsx("button",{type:"button",onClick:i,disabled:a,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:a,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:a?"Saving...":e?"Update Article":"Create Article"})]})]})}/**
36
36
  * @license lucide-react v0.462.0 - ISC
37
37
  *
38
38
  * This source code is licensed under the ISC license.