!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";function t(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}e.defineMode("asn.1",function(e,t){var i,n=e.indentUnit,o=t.keywords||{},E=t.cmipVerbs||{},a=t.compareTypes||{},s=t.status||{},I=t.tags||{},T=t.storage||{},u=t.modifier||{},S=t.accessTypes||{},l=t.multiLineStrings,c=!1!==t.indentStatements,A=/[\|\^]/;function p(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=function(E){return function(e,t){for(var n,r=!1,i=!1;null!=(n=e.next());){if(n==E&&!r){var o=e.peek();o&&("b"!=(o=o.toLowerCase())&&"h"!=o&&"o"!=o||e.next()),i=!0;break}r=!r&&"\\"==n}return!i&&(r||l)||(t.tokenize=null),"string"}}(n),t.tokenize(e,t);if(/[\[\]\(\){}:=,;]/.test(n))return i=n,"punctuation";if("-"==n&&e.eat("-"))return e.skipToEnd(),"comment";if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if(A.test(n))return e.eatWhile(A),"operator";e.eatWhile(/[\w\-]/);var r=e.current();return o.propertyIsEnumerable(r)?"keyword":E.propertyIsEnumerable(r)?"variable cmipVerbs":a.propertyIsEnumerable(r)?"atom compareTypes":s.propertyIsEnumerable(r)?"comment status":I.propertyIsEnumerable(r)?"variable-3 tags":T.propertyIsEnumerable(r)?"builtin storage":u.propertyIsEnumerable(r)?"string-2 modifier":S.propertyIsEnumerable(r)?"atom accessTypes":"variable"}function N(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function m(e,t,n){var r=e.indented;return e.context&&"statement"==e.context.type&&(r=e.context.indented),e.context=new N(r,t,n,null,e.context)}function O(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new N((e||0)-n,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;i=null;var r=(t.tokenize||p)(e,t);if("comment"==r)return r;if(null==n.align&&(n.align=!0),";"!=i&&":"!=i&&","!=i||"statement"!=n.type)if("{"==i)m(t,e.column(),"}");else if("["==i)m(t,e.column(),"]");else if("("==i)m(t,e.column(),")");else if("}"==i){for(;"statement"==n.type;)n=O(t);for("}"==n.type&&(n=O(t));"statement"==n.type;)n=O(t)}else i==n.type?O(t):c&&(("}"==n.type||"top"==n.type)&&";"!=i||"statement"==n.type&&"newstatement"==i)&&m(t,e.column(),"statement");else O(t);return t.startOfLine=!1,r},electricChars:"{}",lineComment:"--",fold:"brace"}}),e.defineMIME("text/x-ttcn-asn",{name:"asn.1",keywords:t("DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS MINACCESS MAXACCESS REVISION STATUS DESCRIPTION SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY IMPLIED EXPORTS"),cmipVerbs:t("ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE"),compareTypes:t("OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL TEXTUAL-CONVENTION"),status:t("current deprecated mandatory obsolete"),tags:t("APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS UNIVERSAL"),storage:t("BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING UTCTime InterfaceIndex IANAifType CMIP-Attribute REAL PACKAGE PACKAGES IpAddress PhysAddress NetworkAddress BITS BMPString TimeStamp TimeTicks TruthValue RowStatus DisplayString GeneralString GraphicString IA5String NumericString PrintableString SnmpAdminAtring TeletexString UTF8String VideotexString VisibleString StringStore ISO646String T61String UniversalString Unsigned32 Integer32 Gauge Gauge32 Counter Counter32 Counter64"),modifier:t("ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS DEFINED"),accessTypes:t("not-accessible accessible-for-notify read-only read-create read-write"),multiLineStrings:!0})});