(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="8ab7f2cb-5a16-4f38-ba71-de08879edfa1",n._sentryDebugIdIdentifier="sentry-dbid-8ab7f2cb-5a16-4f38-ba71-de08879edfa1")}catch{}})();var u;function r(n,e){return u=e,n}function t(n,e){var i=n.next();if(i=="<"&&n.eat("!")){if(n.eatWhile(/[\-]/))return e.tokenize=o,o(n,e);if(n.eatWhile(/[\w]/))return r("keyword","doindent")}else{if(i=="<"&&n.eat("?"))return e.tokenize=a("meta","?>"),r("meta",i);if(i=="#"&&n.eatWhile(/[\w]/))return r("atom","tag");if(i=="|")return r("keyword","separator");if(i.match(/[\(\)\[\]\-\.,\+\?>]/))return r(null,i);if(i.match(/[\[\]]/))return r("rule",i);if(i=='"'||i=="'")return e.tokenize=c(i),e.tokenize(n,e);if(n.eatWhile(/[a-zA-Z\?\+\d]/)){var l=n.current();return l.substr(l.length-1,l.length).match(/\?|\+/)!==null&&n.backUp(1),r("tag","tag")}else return i=="%"||i=="*"?r("number","number"):(n.eatWhile(/[\w\\\-_%.{,]/),r(null,null))}}function o(n,e){for(var i=0,l;(l=n.next())!=null;){if(i>=2&&l==">"){e.tokenize=t;break}i=l=="-"?i+1:0}return r("comment","comment")}function c(n){return function(e,i){for(var l=!1,f;(f=e.next())!=null;){if(f==n&&!l){i.tokenize=t;break}l=!l&&f=="\\"}return r("string","tag")}}function a(n,e){return function(i,l){for(;!i.eol();){if(i.match(e)){l.tokenize=t;break}i.next()}return n}}const d={name:"dtd",startState:function(){return{tokenize:t,baseIndent:0,stack:[]}},token:function(n,e){if(n.eatSpace())return null;var i=e.tokenize(n,e),l=e.stack[e.stack.length-1];return n.current()=="["||u==="doindent"||u=="["?e.stack.push("rule"):u==="endtag"?e.stack[e.stack.length-1]="endtag":n.current()=="]"||u=="]"||u==">"&&l=="rule"?e.stack.pop():u=="["&&e.stack.push("["),i},indent:function(n,e,i){var l=n.stack.length;return e.charAt(0)==="]"?l--:e.substr(e.length-1,e.length)===">"&&(e.substr(0,1)==="<"||u=="doindent"&&e.length>1||(u=="doindent"?l--:u==">"&&e.length>1||u=="tag"&&e!==">"||(u=="tag"&&n.stack[n.stack.length-1]=="rule"?l--:u=="tag"?l++:e===">"&&n.stack[n.stack.length-1]=="rule"&&u===">"?l--:e===">"&&n.stack[n.stack.length-1]=="rule"||(e.substr(0,1)!=="<"&&e.substr(0,1)===">"?l=l-1:e===">"||(l=l-1)))),(u==null||u=="]")&&l--),n.baseIndent+l*i.unit},languageData:{indentOnInput:/^\s*[\]>]$/}};export{d as dtd};
//# sourceMappingURL=dtd-B1KMFozN.js.map
