var e=RegExp(`\\b((`+[`true`,`false`,`on`,`off`,`yes`,`no`].join(`)|(`)+`))$`,`i`),t={name:`yaml`,token:function(t,n){var r=t.peek(),i=n.escaped;if(n.escaped=!1,r==`#`&&(t.pos==0||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),`comment`;if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return`string`;if(n.literal&&t.indentation()>n.keyCol)return t.skipToEnd(),`string`;if(n.literal&&=!1,t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match(`---`)||t.match(`...`))return`def`;if(t.match(/^\s*-\s+/))return`meta`}if(t.match(/^(\{|\}|\[|\])/))return r==`{`?n.inlinePairs++:r==`}`?n.inlinePairs--:r==`[`?n.inlineList++:n.inlineList--,`meta`;if(n.inlineList>0&&!i&&r==`,`)return t.next(),`meta`;if(n.inlinePairs>0&&!i&&r==`,`)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),`meta`;if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,`meta`;if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return`variable`;if(n.inlinePairs==0&&t.match(/^\s*-?[0-9\.\,]+\s?$/)||n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return`number`;if(t.match(e))return`keyword`}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),`atom`):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,`meta`):(n.pairStart=!1,n.escaped=r==`\\`,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:`#`}}};export{t as yaml};