import{i as T}from"./index-B-vFg-u2.js";function _(i,t){for(var e=0;e<t.length;e++){const n=t[e];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in i)){const r=Object.getOwnPropertyDescriptor(n,s);r&&Object.defineProperty(i,s,r.get?r:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var u,f;function R(){if(f)return u;f=1,u=function(t){const e="built_in",n={},s={begin:"}",className:e,endsParent:!0},r={begin:"{",end:"}",contains:[t.QUOTE_STRING_MODE,"self"]},v={begin:"{",end:"}",contains:["self"],skip:!0},E={variants:[{begin:/"/,end:/"/,skip:!0},{begin:/'/,end:/'/,skip:!0}],skip:!0},B=t.COMMENT("@\\*","\\*@",{relevance:10}),k={begin:"@[A-Za-z0-9\\._:-]+",returnBegin:!0,end:"(\\r|\\n|<|\\s|\"|')",subLanguage:"csharp",contains:[{begin:"@",className:e},{begin:"\\[",end:"\\]",skip:!0},{begin:"\\(",end:"\\)",skip:!0}],returnEnd:!0},c={begin:"[@]{0,1}<text>",returnBegin:!0,end:"</text>",returnEnd:!0,subLanguage:"cshtml-razor",contains:[{begin:"[@]{0,1}<text>",className:e},{begin:"</text>",className:e,endsParent:!0}]},y={variants:[{begin:"@@"},{begin:"[a-zA-Z]+@"}],skip:!0},l={begin:"@\\(",end:"\\)",returnBegin:!0,returnEnd:!0,subLanguage:"csharp",contains:[{begin:"@\\(",className:e},{begin:"\\(",end:"\\)",subLanguage:"csharp",contains:[t.QUOTE_STRING_MODE,"self",c]},c,{begin:"\\)",className:e,endsParent:!0}]},L=i(t,[k,l]),b="^\\s*@(page|model|using|inherits|inject|layout)",C={begin:b+"[^\\r\\n{\\(]*$",end:"$",returnBegin:!0,returnEnd:!0,contains:[{begin:b,className:e},{variants:[{begin:"\\r|\\n",endsParent:!0},{begin:"\\s[^\\r\\n]+",end:"$"},{begin:"$"}],className:"type",endsParent:!0}]},d={variants:[{begin:"@\\{",end:"}"},{begin:"@code\\s*\\{",end:"}"}],returnBegin:!0,returnEnd:!0,subLanguage:"csharp",contains:[{begin:"@(code\\s*)?\\{",className:e},n,v,E,s]},x={begin:"^\\s*@helper\\s+[^{\\s]+(?:\\s+[^{\\s]+)*\\s*{",returnBegin:!0,returnEnd:!0,end:"}",subLanguage:"cshtml-razor",contains:[{begin:"@helper",className:e},{begin:"{",className:e},s]},o=["for","if","switch","while","using","lock","foreach"].map(a=>({begin:"@".concat(a,"(?![\\w\\d])[^{]*\\{"),end:"}"})),g=[{begin:"\\}\\s*else\\s*(if[^\\{]+|)\\{"}],m={variants:o,returnBegin:!0,returnEnd:!0,subLanguage:"csharp",contains:[{variants:o.map(function(a){return{begin:a.begin}}),returnBegin:!0,contains:[{begin:"@",className:e},{variants:o.map(function(a){return{begin:"".concat(a.begin).substring(1,a.begin.length-2)}}),subLanguage:"csharp"},{begin:"{",className:e}]},n,{variants:g,returnBegin:!0,contains:[{begin:"}",className:e},{begin:g[0].begin.substring(2,g[0].begin.length-2),subLanguage:"csharp"},{begin:"{",className:e}]},r,s]},p={begin:"@try\\s*{",end:"}",returnBegin:!0,returnEnd:!0,subLanguage:"csharp",contains:[{begin:"@",className:e},{begin:"try\\s*{",subLanguage:"csharp"},{variants:[{begin:"}\\s*catch\\s*\\([^\\)]+\\)\\s*{"},{begin:"}\\s*finally\\s*{"}],returnBegin:!0,contains:[{begin:"}",className:e},{variants:[{begin:"\\s*catch\\s*\\([^\\)]+\\)\\s*"},{begin:"\\s*finally\\s*"}],subLanguage:"csharp"},{begin:"{",className:e}]},n,r,s]},N="@section\\s+[a-zA-Z0-9]+\\s*{",h=[C,x,d,m,{begin:N,returnBegin:!0,returnEnd:!0,end:"}",subLanguage:"cshtml-razor",contains:[{begin:N,className:e},r,s]},{begin:"@await ",returnBegin:!0,subLanguage:"csharp",end:"(\\r|\\n|<|\\s)",contains:[{begin:"@await ",className:e},{begin:"[<\\r\\n]",endsParent:!0}]},p,y,c,B,l,{className:"meta",begin:"<!DOCTYPE",end:">",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10}].concat(L);return[d,m,p].forEach(function(a){const A=h.filter(function(P){return P!==a}),O=a.contains.indexOf(n);a.contains.splice.apply(a.contains,[O,1].concat(A))}),{aliases:["cshtml","razor","razor-cshtml","cshtml-razor"],contains:h}};function i(t,e){const n=t.COMMENT("<!--","-->",{relevance:10}),r={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:"[A-Za-z0-9\\._:-]+",relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",variants:[{begin:/"/,end:/"/,contains:e},{begin:/'/,end:/'/,contains:e},{begin:/[^\s"'=<>`]+/}]}]}]};return[{className:"meta",begin:"<!DOCTYPE",end:">",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},n,{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:"<style(?=\\s|>|$)",end:">",keywords:{name:"style"},contains:[r],starts:{end:"</style>",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"<script(?=\\s|>|$)",end:">",keywords:{name:"script"},contains:[r],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml"]}},{className:"tag",begin:"</?",end:"/?>",contains:[{className:"name",begin:/[^/><\s]+/,relevance:0},r]}].concat(e)}return u}var z=R();const w=T(z),I=_({__proto__:null,default:w},[z]);export{I as c};
