-
Notifications
You must be signed in to change notification settings - Fork 11
/
html-beautify.js
1 lines (1 loc) · 41.6 KB
/
html-beautify.js
1
!function(){var n,i;function _(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,_),e.l=!0,e.exports}var r=(i={},_.m=n=[,,function(t,e,n){"use strict";function _(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function i(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",0<t.indent_level&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function r(t,e){this.__indent_cache=new i(t,e),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new _(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}_.prototype.clone_empty=function(){var t=new _(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},_.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},_.prototype.has_match=function(t){for(var e=this.__items.length-1;0<=e;e--)if(this.__items[e].match(t))return!0;return!1},_.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},_.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},_.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},_.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},_.prototype.is_empty=function(){return 0===this.__items.length},_.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},_.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},_.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},_.prototype._remove_indent=function(){0<this.__indent_count&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},_.prototype._remove_wrap_indent=function(){0<this.__wrap_point_indent_count&&(this.__wrap_point_indent_count-=1)},_.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},_.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t},i.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e},i.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e]},i.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(t-=(e=Math.floor(t/this.__indent_size))*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)},r.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},r.prototype.get_line_number=function(){return this.__lines.length},r.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},r.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},r.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},r.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},r.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==t&&(n=n.replace(/[\n]/g,t)),n},r.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},r.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),1<this.__lines.length?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},r.prototype.add_raw_token=function(t){for(var e=0;e<t.newlines;e++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},r.prototype.add_token=function(t){this.__add_space_before_token(),this.current_line.push(t),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},r.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},r.prototype.remove_indent=function(t){for(var e=this.__lines.length;t<e;)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()},r.prototype.trim=function(t){for(t=void 0!==t&&t,this.current_line.trim();t&&1<this.__lines.length&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=1<this.__lines.length?this.__lines[this.__lines.length-2]:null},r.prototype.just_added_newline=function(){return this.current_line.is_empty()},r.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},r.prototype.ensure_empty_line_above=function(t,e){for(var n=this.__lines.length-2;0<=n;){var i=this.__lines[n];if(i.is_empty())break;if(0!==i.item(0).indexOf(t)&&i.item(-1)!==e){this.__lines.splice(n+1,0,new _(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},t.exports.Output=r},function(t,e,n){"use strict";t.exports.Token=function(t,e,n,i){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}},,,function(t,e,n){"use strict";function i(t,e){this.raw_options=_(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php"],["auto"])}function _(t,e){var n,i={};for(n in t=r(t))n!==e&&(i[n]=t[n]);if(e&&t[e])for(n in t[e])i[n]=t[e][n];return i}function r(t){var e,n={};for(e in t){n[e.replace(/-/g,"_")]=t[e]}return n}i.prototype._get_array=function(t,e){var n=this.raw_options[t],i=e||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},i.prototype._get_boolean=function(t,e){var n=this.raw_options[t];return void 0===n?!!e:!!n},i.prototype._get_characters=function(t,e){var n=this.raw_options[t],i=e||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},i.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var i=parseInt(n,10);return isNaN(i)&&(i=e),i},i.prototype._get_selection=function(t,e,n){var i=this._get_selection_list(t,e,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+t+"' can only be one of the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i[0]},i.prototype._get_selection_list=function(t,e,n){if(!e||0===e.length)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var i=this._get_array(t,n);if(!this._is_valid_selection(i,e))throw new Error("Invalid Option Value: The option '"+t+"' can contain only the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return i},i.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some(function(t){return-1===e.indexOf(t)})},t.exports.Options=i,t.exports.normalizeOpts=r,t.exports.mergeOpts=_},,function(t,e,n){"use strict";var _=RegExp.prototype.hasOwnProperty("sticky");function i(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){0<this.__position&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},i.prototype.peek=function(t){var e=null;return t=t||0,0<=(t+=this.__position)&&t<this.__input_length&&(e=this.__input.charAt(t)),e},i.prototype.__match=function(t,e){t.lastIndex=e;var n=t.exec(this.__input);return!n||_&&t.sticky||n.index!==e&&(n=null),n},i.prototype.test=function(t,e){return e=e||0,0<=(e+=this.__position)&&e<this.__input_length&&!!this.__match(t,e)},i.prototype.testChar=function(t,e){var n=this.peek(e);return t.lastIndex=0,null!==n&&t.test(n)},i.prototype.match=function(t){var e=this.__match(t,this.__position);return e?this.__position+=e[0].length:e=null,e},i.prototype.read=function(t,e,n){var i,_="";return t&&(i=this.match(t))&&(_+=i[0]),!e||!i&&t||(_+=this.readUntil(e,n)),_},i.prototype.readUntil=function(t,e){var n,i=this.__position;t.lastIndex=this.__position;var _=t.exec(this.__input);return _?(i=_.index,e&&(i+=_[0].length)):i=this.__input_length,n=this.__input.substring(this.__position,i),this.__position=i,n},i.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},i.prototype.get_regexp=function(t,e){var n=null,i="g";return e&&_&&(i="y"),"string"==typeof t&&""!==t?n=new RegExp(t,i):t&&(n=new RegExp(t.source,i)),n},i.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(t){var e=this.__position,n=this.readUntilAfter(t);return this.__position=e,n},i.prototype.lookBack=function(t){var e=this.__position-1;return e>=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=i},function(t,e,n){"use strict";function i(t,e){this._input=new _(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)}var _=n(8).InputScanner,r=n(3).Token,s=n(10).TokenStream,a=n(11).WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"};i.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new s,this._reset();for(var e=new r(o.START,""),n=null,i=[],_=new s;e.type!==o.EOF;){for(t=this._get_next_token(e,n);this._is_comment(t);)_.add(t),t=this._get_next_token(e,n);_.isEmpty()||(t.comments_before=_,_=new s),t.parent=n,this._is_opening(t)?(i.push(n),n=t):n&&this._is_closing(t,n)&&((t.opened=n).closed=t,n=i.pop(),t.parent=n),(t.previous=e).next=t,this.__tokens.add(t),e=t}return this.__tokens},i.prototype._is_first_token=function(){return this.__tokens.isEmpty()},i.prototype._reset=function(){},i.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(o.RAW,n):this._create_token(o.EOF,"")},i.prototype._is_comment=function(t){return!1},i.prototype._is_opening=function(t){return!1},i.prototype._is_closing=function(t,e){return!1},i.prototype._create_token=function(t,e){return new r(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},i.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=i,t.exports.TOKEN=o},function(t,e,n){"use strict";function i(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}i.prototype.restart=function(){this.__position=0},i.prototype.isEmpty=function(){return 0===this.__tokens_length},i.prototype.hasNext=function(){return this.__position<this.__tokens_length},i.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__tokens[this.__position],this.__position+=1),t},i.prototype.peek=function(t){var e=null;return t=t||0,0<=(t+=this.__position)&&t<this.__tokens_length&&(e=this.__tokens[t]),e},i.prototype.add=function(t){this.__parent_token&&(t.parent=this.__parent_token),this.__tokens.push(t),this.__tokens_length+=1},t.exports.TokenStream=i},function(t,e,n){"use strict";var i=n(12).Pattern;function _(t,e){i.call(this,t,e),e?this._line_regexp=this._input.get_regexp(e._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}(_.prototype=new i).__set_whitespace_patterns=function(t,e){t+="\\t ",e+="\\n\\r",this._match_pattern=this._input.get_regexp("["+t+e+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+e+"]")},_.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var t=this._input.read(this._match_pattern);if(" "===t)this.whitespace_before_token=" ";else if(t){var e=this.__split(this._newline_regexp,t);this.newline_count=e.length-1,this.whitespace_before_token=e[this.newline_count]}return t},_.prototype.matching=function(t,e){var n=this._create();return n.__set_whitespace_patterns(t,e),n._update(),n},_.prototype._create=function(){return new _(this._input,this)},_.prototype.__split=function(t,e){for(var n=t.lastIndex=0,i=[],_=t.exec(e);_;)i.push(e.substring(n,_.index)),n=_.index+_[0].length,_=t.exec(e);return n<e.length?i.push(e.substring(n,e.length)):i.push(""),i},t.exports.WhitespacePattern=_},function(t,e,n){"use strict";function i(t,e){this._input=t,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,e&&(this._starting_pattern=this._input.get_regexp(e._starting_pattern,!0),this._match_pattern=this._input.get_regexp(e._match_pattern,!0),this._until_pattern=this._input.get_regexp(e._until_pattern),this._until_after=e._until_after)}i.prototype.read=function(){var t=this._input.read(this._starting_pattern);return this._starting_pattern&&!t||(t+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),t},i.prototype.read_match=function(){return this._input.match(this._match_pattern)},i.prototype.until_after=function(t){var e=this._create();return e._until_after=!0,e._until_pattern=this._input.get_regexp(t),e._update(),e},i.prototype.until=function(t){var e=this._create();return e._until_after=!1,e._until_pattern=this._input.get_regexp(t),e._update(),e},i.prototype.starting_with=function(t){var e=this._create();return e._starting_pattern=this._input.get_regexp(t,!0),e._update(),e},i.prototype.matching=function(t){var e=this._create();return e._match_pattern=this._input.get_regexp(t,!0),e._update(),e},i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){},t.exports.Pattern=i},function(t,e,n){"use strict";function i(t,e){t="string"==typeof t?t:t.source,e="string"==typeof e?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+e,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+e,"g")}i.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(t);n;)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e},i.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=i},function(t,e,n){"use strict";var i=n(12).Pattern,_={django:!1,erb:!1,handlebars:!1,php:!1};function r(t,e){i.call(this,t,e),this.__template_pattern=null,this._disabled=Object.assign({},_),this._excluded=Object.assign({},_),e&&(this.__template_pattern=this._input.get_regexp(e.__template_pattern),this._excluded=Object.assign(this._excluded,e._excluded),this._disabled=Object.assign(this._disabled,e._disabled));var n=new i(t);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[=]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/)}}(r.prototype=new i)._create=function(){return new r(this._input,this)},r.prototype._update=function(){this.__set_templated_pattern()},r.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},r.prototype.read_options=function(t){var e=this._create();for(var n in _)e._disabled[n]=-1===t.templating.indexOf(n);return e._update(),e},r.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},r.prototype.read=function(){var t="";t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},r.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},r.prototype._read_template=function(){var t="",e=this._input.peek();if("<"===e){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(t=t||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(t=t||this.__patterns.erb.read())}else"{"===e&&(this._disabled.handlebars||this._excluded.handlebars||(t=(t=(t=t||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=(t=t||this.__patterns.django_comment.read())||this.__patterns.django.read())));return t},t.exports.TemplatablePattern=r},,,,function(t,e,n){"use strict";var _=n(19).Beautifier,i=n(20).Options;t.exports=function(t,e,n,i){return new _(t,e,n,i).beautify()},t.exports.defaultOptions=function(){return new i}},function(t,e,n){"use strict";function p(t,e){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=t.max_preserve_newlines,this.preserve_newlines=t.preserve_newlines,this._output=new i(t,e)}var r=n(20).Options,i=n(2).Output,h=n(21).Tokenizer,u=n(21).TOKEN,l=/\r\n|[\r\n]/,c=/\r\n|[\r\n]/g;p.prototype.current_line_has_match=function(t){return this._output.current_line.has_match(t)},p.prototype.set_space_before_token=function(t,e){this._output.space_before_token=t,this._output.non_breaking_space=e},p.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},p.prototype.add_raw_token=function(t){this._output.add_raw_token(t)},p.prototype.print_preserved_newlines=function(t){var e=0;t.type!==u.TEXT&&t.previous.type!==u.TEXT&&(e=t.newlines?1:0),this.preserve_newlines&&(e=t.newlines<this.max_preserve_newlines+1?t.newlines:this.max_preserve_newlines+1);for(var n=0;n<e;n++)this.print_newline(0<n);return 0!==e},p.prototype.traverse_whitespace=function(t){return!(!t.whitespace_before&&!t.newlines)&&(this.print_preserved_newlines(t)||(this._output.space_before_token=!0),!0)},p.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},p.prototype.print_newline=function(t){this._output.add_new_line(t)},p.prototype.print_token=function(t){t.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(t.text))},p.prototype.indent=function(){this.indent_level++},p.prototype.get_full_indent=function(t){return(t=this.indent_level+(t||0))<1?"":this._output.get_indent_string(t)};function s(t,e){var n=null,i=null;return e.closed?("script"===t?n="text/javascript":"style"===t&&(n="text/css"),-1<(n=function(t){for(var e=null,n=t.next;n.type!==u.EOF&&t.closed!==n;){if(n.type===u.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===u.EQUALS&&n.next.next&&n.next.next.type===u.VALUE&&(e=n.next.next.text);break}n=n.next}return e}(e)||n).search("text/css")?i="css":-1<n.search(/(text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect)/)?i="javascript":-1<n.search(/(text|application|dojo)\/(x-)?(html)/)?i="html":-1<n.search(/test\/null/)&&(i="null"),i):null}function a(t,e){return-1!==e.indexOf(t)}function _(t,e,n){this.parent=t||null,this.tag=e?e.tag_name:"",this.indent_level=n||0,this.parser_token=e||null}function d(t){this._printer=t,this._current_frame=null}function f(t,e,n,i){this._source_text=t||"",e=e||{},this._js_beautify=n,this._css_beautify=i,this._tag_stack=null;var _=new r(e,"html");this._options=_,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,"force".length),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,"preserve".length),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}d.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},d.prototype.record_tag=function(t){var e=new _(this._current_frame,t,this._printer.indent_level);this._current_frame=e},d.prototype._try_pop_frame=function(t){var e=null;return t&&(e=t.parser_token,this._printer.indent_level=t.indent_level,this._current_frame=t.parent),e},d.prototype._get_frame=function(t,e){for(var n=this._current_frame;n&&-1===t.indexOf(n.tag);){if(e&&-1!==e.indexOf(n.tag)){n=null;break}n=n.parent}return n},d.prototype.try_pop=function(t,e){var n=this._get_frame([t],e);return this._try_pop_frame(n)},d.prototype.indent_to_tag=function(t){var e=this._get_frame(t);e&&(this._printer.indent_level=e.indent_level)},f.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;"auto"===this._options.eol&&(e="\n",t&&l.test(t)&&(e=t.match(l)[0]));var n=(t=t.replace(c,"\n")).match(/^[\t ]*/)[0],i={text:"",type:""},_=new g,r=new p(this._options,n),s=new h(t,this._options).tokenize();this._tag_stack=new d(r);for(var a=null,o=s.next();o.type!==u.EOF;)o.type===u.TAG_OPEN||o.type===u.COMMENT?_=a=this._handle_tag_open(r,o,_,i):o.type===u.ATTRIBUTE||o.type===u.EQUALS||o.type===u.VALUE||o.type===u.TEXT&&!_.tag_complete?a=this._handle_inside_tag(r,o,_,s):o.type===u.TAG_CLOSE?a=this._handle_tag_close(r,o,_):o.type===u.TEXT?a=this._handle_text(r,o,_):r.add_raw_token(o),i=a,o=s.next();return r._output.get_code(e)},f.prototype._handle_tag_close=function(t,e,n){var i={text:e.text,type:e.type};return t.alignment_size=0,n.tag_complete=!0,t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),n.is_unformatted?t.add_raw_token(e):("<"===n.tag_start_char&&(t.set_space_before_token("/"===e.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&t.print_newline(!1)),t.print_token(e)),!n.indent_content||n.is_unformatted||n.is_content_unformatted||(t.indent(),n.indent_content=!1),n.is_inline_element||n.is_unformatted||n.is_content_unformatted||t.set_wrap_point(),i},f.prototype._handle_inside_tag=function(t,e,n,i){var _=n.has_wrapped_attrs,r={text:e.text,type:e.type};if(t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),n.is_unformatted)t.add_raw_token(e);else if("{"===n.tag_start_char&&e.type===u.TEXT)t.print_preserved_newlines(e)?(e.newlines=0,t.add_raw_token(e)):t.print_token(e);else{if(e.type===u.ATTRIBUTE?(t.set_space_before_token(!0),n.attr_count+=1):e.type===u.EQUALS?t.set_space_before_token(!1):e.type===u.VALUE&&e.previous.type===u.EQUALS&&t.set_space_before_token(!1),e.type===u.ATTRIBUTE&&"<"===n.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(t.traverse_whitespace(e),_=_||0!==e.newlines),this._is_wrap_attributes_force)){var s=1<n.attr_count;if(this._is_wrap_attributes_force_expand_multiline&&1===n.attr_count){var a,o=!0,p=0;do{if((a=i.peek(p)).type===u.ATTRIBUTE){o=!1;break}p+=1}while(p<4&&a.type!==u.EOF&&a.type!==u.TAG_CLOSE);s=!o}s&&(t.print_newline(!1),_=!0)}t.print_token(e),_=_||t.previous_token_wrapped(),n.has_wrapped_attrs=_}return r},f.prototype._handle_text=function(t,e,n){var i={text:e.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(t,e,n):n.is_unformatted||n.is_content_unformatted?t.add_raw_token(e):(t.traverse_whitespace(e),t.print_token(e)),i},f.prototype._print_custom_beatifier_text=function(t,e,n){var i=this;if(""!==e.text){var _,r=e.text,s=1,a="",o="";"javascript"===n.custom_beautifier_name&&"function"==typeof this._js_beautify?_=this._js_beautify:"css"===n.custom_beautifier_name&&"function"==typeof this._css_beautify?_=this._css_beautify:"html"===n.custom_beautifier_name&&(_=function(t,e){return new f(t,e,i._js_beautify,i._css_beautify).beautify()}),"keep"===this._options.indent_scripts?s=0:"separate"===this._options.indent_scripts&&(s=-t.indent_level);var p=t.get_full_indent(s);if(r=r.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===r[0]&&r.match(/^(<!--|<!\[CDATA\[)/)){var h=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(r);if(!h)return void t.add_raw_token(e);a=p+h[1]+"\n",r=h[4],h[5]&&(o=p+h[5]),r=r.replace(/\n[ \t]*$/,""),(h[2]||-1!==h[3].indexOf("\n"))&&(h=h[3].match(/[ \t]+$/))&&(e.whitespace_before=h[0])}if(r)if(_){var u=function(){this.eol="\n"};u.prototype=this._options.raw_options,r=_(p+r,new u)}else{var l=e.whitespace_before;l&&(r=r.replace(new RegExp("\n("+l+")?","g"),"\n")),r=p+r.replace(/\n/g,"\n"+p)}a&&(r=r?a+r+"\n"+o:a+o),t.print_newline(!1),r&&(e.text=r,e.whitespace_before="",e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}},f.prototype._handle_tag_open=function(t,e,n,i){var _=this._get_tag_open_token(e);return(n.is_unformatted||n.is_content_unformatted)&&e.type===u.TAG_OPEN&&0===e.text.indexOf("</")?t.add_raw_token(e):(t.traverse_whitespace(e),this._set_tag_position(t,e,_,n,i),_.is_inline_element||t.set_wrap_point(),t.print_token(e)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(_.alignment_size=e.text.length+1),_.tag_complete||_.is_unformatted||(t.alignment_size=_.alignment_size),_};var g=function(t,e){var n;(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",e)?(this.tag_start_char=e.text[0],this.text=e.text,n="<"===this.tag_start_char?e.text.match(/^<([^\s>]*)/):e.text.match(/^{{[#\^]?([^\s}]+)/),this.tag_check=n?n[1]:"",this.tag_check=this.tag_check.toLowerCase(),e.type===u.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||e.closed&&"/>"===e.closed.text,this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(2)))):this.tag_complete=!0};f.prototype._get_tag_open_token=function(t){var e=new g(this._tag_stack.get_parser_token(),t);return e.alignment_size=this._options.wrap_attributes_indent_size,e.is_end_tag=e.is_end_tag||a(e.tag_check,this._options.void_elements),e.is_empty_element=e.tag_complete||e.is_start_tag&&e.is_end_tag,e.is_unformatted=!e.tag_complete&&a(e.tag_check,this._options.unformatted),e.is_content_unformatted=!e.is_empty_element&&a(e.tag_check,this._options.content_unformatted),e.is_inline_element=a(e.tag_name,this._options.inline)||"{"===e.tag_start_char,e},f.prototype._set_tag_position=function(t,e,n,i,_){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||(n.parent&&(n.parent.multiline_content=!0),t.print_newline(!1))),this._tag_stack.record_tag(n),"script"!==n.tag_name&&"style"!==n.tag_name||n.is_unformatted||n.is_content_unformatted||(n.custom_beautifier_name=s(n.tag_check,e)))),a(n.tag_check,this._options.extra_liners)&&(t.print_newline(!1),t._output.just_added_blankline()||t.print_newline(!0)),n.is_empty_element){if("{"===n.tag_start_char&&"else"===n.tag_check)this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0,t.current_line_has_match(/{{#if/)||t.print_newline(!1);"!--"===n.tag_name&&_.type===u.TAG_CLOSE&&i.is_end_tag&&-1===n.text.indexOf("\n")||n.is_inline_element||n.is_unformatted||t.print_newline(!1)}else n.is_unformatted||n.is_content_unformatted?n.is_inline_element||n.is_unformatted||t.print_newline(!1):n.is_end_tag?(n.start_tag_token&&n.start_tag_token.multiline_content||!(n.is_inline_element||i.is_inline_element||_.type===u.TAG_CLOSE&&n.start_tag_token===i||"TK_CONTENT"===_.type))&&t.print_newline(!1):(n.indent_content=!n.custom_beautifier_name,"<"===n.tag_start_char&&("html"===n.tag_name?n.indent_content=this._options.indent_inner_html:"head"===n.tag_name?n.indent_content=this._options.indent_head_inner_html:"body"===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),n.is_inline_element||"TK_CONTENT"===_.type||(n.parent&&(n.parent.multiline_content=!0),t.print_newline(!1)))},f.prototype._do_optional_end_element=function(t){var e=null;if(!t.is_empty_element&&t.is_start_tag&&t.parent)return"body"===t.tag_name?e=e||this._tag_stack.try_pop("head"):"li"===t.tag_name?e=e||this._tag_stack.try_pop("li",["ol","ul"]):"dd"===t.tag_name||"dt"===t.tag_name?e=(e=e||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]):"rp"===t.tag_name||"rt"===t.tag_name?e=(e=e||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===t.tag_name?e=e||this._tag_stack.try_pop("optgroup",["select"]):"option"===t.tag_name?e=e||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===t.tag_name?e=e||this._tag_stack.try_pop("caption",["table"]):"thead"===t.tag_name?e=(e=e||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===t.tag_name||"tfoot"===t.tag_name?e=(e=(e=(e=e||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===t.tag_name?e=(e=(e=e||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==t.tag_name&&"td"!==t.tag_name||(e=(e=e||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"])),t.parent=this._tag_stack.get_parser_token(),e},t.exports.Beautifier=f},function(t,e,n){"use strict";var i=n(6).Options;function _(t){i.call(this,t,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}_.prototype=new i,t.exports.Options=_},function(t,e,n){"use strict";function i(t,e){r.call(this,t,e),this._current_tag_name="";var n=new a(this._input).read_options(this._options),i=new o(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =\/>]/),element_name:n.until(/[\n\r\t >\/]/),handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),handlebars_open:i.until(/[\n\r\t }]/),handlebars_raw_close:i.until(/}}/),comment:i.starting_with(/<!--/).until_after(/-->/),cdata:i.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:i.starting_with(/<!\[/).until_after(/]>/),processing:i.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var _=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=i.matching(_).until_after(_)}}var r=n(9).Tokenizer,_=n(9).TOKEN,s=n(13).Directives,a=n(14).TemplatablePattern,o=n(12).Pattern,p={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:_.START,RAW:_.RAW,EOF:_.EOF},h=new s(/<\!--/,/-->/);(i.prototype=new r)._is_comment=function(t){return!1},i.prototype._is_opening=function(t){return t.type===p.TAG_OPEN},i.prototype._is_closing=function(t,e){return t.type===p.TAG_CLOSE&&e&&((">"===t.text||"/>"===t.text)&&"<"===e.text[0]||"}}"===t.text&&"{"===e.text[0]&&"{"===e.text[1])},i.prototype._reset=function(){this._current_tag_name=""},i.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var i=this._input.peek();return null===i?this._create_token(p.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_open_handlebars(i,e))||this._read_attribute(i,t,e))||this._read_raw_content(i,t,e))||this._read_close(i,e))||this._read_content_word(i))||this._read_comment_or_cdata(i))||this._read_processing(i))||this._read_open(i,e))||this._create_token(p.UNKNOWN,this._input.next())},i.prototype._read_comment_or_cdata=function(t){var e=null,n=null,i=null;"<"===t&&("!"===this._input.peek(1)&&((n=this.__patterns.comment.read())?(i=h.get_directives(n))&&"start"===i.ignore&&(n+=h.readIgnored(this._input)):n=this.__patterns.cdata.read()),n&&((e=this._create_token(p.COMMENT,n)).directives=i));return e},i.prototype._read_processing=function(t){var e=null,n=null;if("<"===t){var i=this._input.peek(1);"!"!==i&&"?"!==i||(n=(n=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),n&&((e=this._create_token(p.COMMENT,n)).directives=null)}return e},i.prototype._read_open=function(t,e){var n=null,i=null;return e||"<"===t&&(n=this._input.next(),"/"===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),i=this._create_token(p.TAG_OPEN,n)),i},i.prototype._read_open_handlebars=function(t,e){var n=null,i=null;return e||this._options.indent_handlebars&&"{"===t&&"{"===this._input.peek(1)&&(i="!"===this._input.peek(2)?(n=(n=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),this._create_token(p.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),this._create_token(p.TAG_OPEN,n))),i},i.prototype._read_close=function(t,e){var n=null,i=null;return e&&("<"===e.text[0]&&(">"===t||"/"===t&&">"===this._input.peek(1))?(n=this._input.next(),"/"===t&&(n+=this._input.next()),i=this._create_token(p.TAG_CLOSE,n)):"{"===e.text[0]&&"}"===t&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),i=this._create_token(p.TAG_CLOSE,"}}"))),i},i.prototype._read_attribute=function(t,e,n){var i=null,_="";if(n&&"<"===n.text[0])if("="===t)i=this._create_token(p.EQUALS,this._input.next());else if('"'===t||"'"===t){var r=this._input.next();r+='"'===t?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),i=this._create_token(p.VALUE,r)}else(_=this.__patterns.attribute.read())&&(i=e.type===p.EQUALS?this._create_token(p.VALUE,_):this._create_token(p.ATTRIBUTE,_));return i},i.prototype._is_content_unformatted=function(t){return-1===this._options.void_elements.indexOf(t)&&(-1!==this._options.content_unformatted.indexOf(t)||-1!==this._options.unformatted.indexOf(t))},i.prototype._read_raw_content=function(t,e,n){var i="";if(n&&"{"===n.text[0])i=this.__patterns.handlebars_raw_close.read();else if(e.type===p.TAG_CLOSE&&"<"===e.opened.text[0]){var _=e.opened.text.substr(1).toLowerCase();if("script"===_||"style"===_){var r=this._read_comment_or_cdata(t);if(r)return r.type=p.TEXT,r;i=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(_)&&(i=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig")))}return i?this._create_token(p.TEXT,i):null},i.prototype._read_content_word=function(t){var e="";if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(e=this.__patterns.unformatted_content_delimiter.read()),e=e||this.__patterns.word.read())return this._create_token(p.TEXT,e)},t.exports.Tokenizer=i,t.exports.TOKEN=p}],_.c=i,_.d=function(t,e,n){_.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},_.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},_.t=function(e,t){if(1&t&&(e=_(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(_.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)_.d(n,i,function(t){return e[t]}.bind(null,i));return n},_.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return _.d(e,"a",e),e},_.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},_.p="",_(_.s=18));if("function"==typeof define&&define.amd)define(["require","./beautify","./beautify-css"],function(t){var n=t("./beautify"),i=t("./beautify-css");return{html_beautify:function(t,e){return r(t,e,n.js_beautify,i.css_beautify)}}});else if("undefined"!=typeof exports){var s=require("./beautify.js"),a=require("./beautify-css.js");exports.html_beautify=function(t,e){return r(t,e,s.js_beautify,a.css_beautify)}}else"undefined"!=typeof window?window.html_beautify=function(t,e){return r(t,e,window.js_beautify,window.css_beautify)}:"undefined"!=typeof global&&(global.html_beautify=function(t,e){return r(t,e,global.js_beautify,global.css_beautify)})}();