!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("elm",function(){function e(e,t,r){return t(r),r(e,t)}var t=/[a-z]/,r=/[A-Z]/,n=/[a-zA-Z0-9_]/,i=/[0-9]/,o=/[0-9A-Fa-f]/,f=/[-&*+.\\/<>=?^|:]/,u=/[(),[\]{}]/,a=/[ \v\f]/;function s(){return function(p,x){if(p.eatWhile(a))return null;var h=p.next();if(u.test(h))return"{"===h&&p.eat("-")?e(p,x,function e(t){return 0==t?s():function(r,n){for(;!r.eol();){var i=r.next();if("{"==i&&r.eat("-"))++t;else if("-"==i&&r.eat("}")&&0==--t)return n(s()),"comment"}return n(e(t)),"comment"}}(1)):"["===h&&p.match("glsl|")?e(p,x,d):"builtin";if("'"===h)return e(p,x,m);if('"'===h)return p.eat('"')?p.eat('"')?e(p,x,l):"string":e(p,x,c);if(r.test(h))return p.eatWhile(n),"variable-2";if(t.test(h)){var k=1===p.pos;return p.eatWhile(n),k?"def":"variable"}if(i.test(h)){if("0"===h){if(p.eat(/[xX]/))return p.eatWhile(o),"number"}else p.eatWhile(i);return p.eat(".")&&p.eatWhile(i),p.eat(/[eE]/)&&(p.eat(/[-+]/),p.eatWhile(i)),"number"}return f.test(h)?"-"===h&&p.eat("-")?(p.skipToEnd(),"comment"):(p.eatWhile(f),"keyword"):"_"===h?"keyword":"error"}}function l(e,t){for(;!e.eol();)if('"'===e.next()&&e.eat('"')&&e.eat('"'))return t(s()),"string";return"string"}function c(e,t){for(;e.skipTo('\\"');)e.next(),e.next();return e.skipTo('"')?(e.next(),t(s()),"string"):(e.skipToEnd(),t(s()),"error")}function m(e,t){for(;e.skipTo("\\'");)e.next(),e.next();return e.skipTo("'")?(e.next(),t(s()),"string"):(e.skipToEnd(),t(s()),"error")}function d(e,t){for(;!e.eol();)if("|"===e.next()&&e.eat("]"))return t(s()),"string";return"string"}var p={case:1,of:1,as:1,if:1,then:1,else:1,let:1,in:1,type:1,alias:1,module:1,where:1,import:1,exposing:1,port:1};return{startState:function(){return{f:s()}},copyState:function(e){return{f:e.f}},lineComment:"--",token:function(e,t){var r=t.f(e,function(e){t.f=e}),n=e.current();return p.hasOwnProperty(n)?"keyword":r}}}),e.defineMIME("text/x-elm","elm")});