import{A as k}from"./index.f4d41e67.entry.js";import{a as d}from"./htmlmixed.379b21f1.js";import{a as y}from"./ruby.9de12203.js";function b(u,m){return m.forEach(function(i){i&&typeof i!="string"&&!Array.isArray(i)&&Object.keys(i).forEach(function(o){if(o!=="default"&&!(o in u)){var r=Object.getOwnPropertyDescriptor(i,o);Object.defineProperty(u,o,r.get?r:{enumerable:!0,get:function(){return i[o]}})}})}),Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var a={exports:{}};(function(u,m){(function(i){i(k.exports,d.exports,y.exports)})(function(i){i.defineMode("haml",function(o){var r=i.getMode(o,{name:"htmlmixed"}),c=i.getMode(o,"ruby");function h(n){return function(e,t){var f=e.peek();return f==n&&t.rubyState.tokenize.length==1?(e.next(),t.tokenize=p,"closeAttributeTag"):l(e,t)}}function l(n,e){return n.match("-#")?(n.skipToEnd(),"comment"):c.token(n,e.rubyState)}function p(n,e){var t=n.peek();if(e.previousToken.style=="comment"&&e.indented>e.previousToken.indented)return n.skipToEnd(),"commentLine";if(e.startOfLine){if(t=="!"&&n.match("!!"))return n.skipToEnd(),"tag";if(n.match(/^%[\w:#\.]+=/))return e.tokenize=l,"hamlTag";if(n.match(/^%[\w:]+/))return"hamlTag";if(t=="/")return n.skipToEnd(),"comment"}if((e.startOfLine||e.previousToken.style=="hamlTag")&&(t=="#"||t=="."))return n.match(/[\w-#\.]*/),"hamlAttribute";if(e.startOfLine&&!n.match("-->",!1)&&(t=="="||t=="-"))return e.tokenize=l,e.tokenize(n,e);if(e.previousToken.style=="hamlTag"||e.previousToken.style=="closeAttributeTag"||e.previousToken.style=="hamlAttribute"){if(t=="(")return e.tokenize=h(")"),e.tokenize(n,e);if(t=="{"&&!n.match(/^\{%.*/))return e.tokenize=h("}"),e.tokenize(n,e)}return r.token(n,e.htmlState)}return{startState:function(){var n=i.startState(r),e=i.startState(c);return{htmlState:n,rubyState:e,indented:0,previousToken:{style:null,indented:0},tokenize:p}},copyState:function(n){return{htmlState:i.copyState(r,n.htmlState),rubyState:i.copyState(c,n.rubyState),indented:n.indented,previousToken:n.previousToken,tokenize:n.tokenize}},token:function(n,e){if(n.sol()&&(e.indented=n.indentation(),e.startOfLine=!0),n.eatSpace())return null;var t=e.tokenize(n,e);if(e.startOfLine=!1,t&&t!="commentLine"&&(e.previousToken={style:t,indented:e.indented}),n.eol()&&e.tokenize==l){n.backUp(1);var f=n.peek();n.next(),f&&f!=","&&(e.tokenize=p)}return t=="hamlTag"?t="tag":t=="commentLine"?t="comment":t=="hamlAttribute"?t="attribute":t=="closeAttributeTag"&&(t=null),t}}},"htmlmixed","ruby"),i.defineMIME("text/x-haml","haml")})})();var v=a.exports,z=b({__proto__:null,default:v},[a.exports]);export{z as h};
