/*! * froala_editor v3.0.3 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2019 Froala Labs */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.codeBeautifier=function(){var e,t,n,i,Q={};function y(i,e){var t={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},n={"@media":!0,"@supports":!0,"@document":!0};e=e||{},i=(i=i||"").replace(/\r\n|[\r\u2028\u2029]/g,"\n");var r=e.indent_size||4,s=e.indent_char||" ",_=e.selector_separator_newline===undefined||e.selector_separator_newline,a=e.end_with_newline!==undefined&&e.end_with_newline,o=e.newline_between_rules===undefined||e.newline_between_rules,l=e.eol?e.eol:"\n";"string"==typeof r&&(r=parseInt(r,10)),e.indent_with_tabs&&(s="\t",r=1),l=l.replace(/\\r/,"\r").replace(/\\n/,"\n");var h,c=/^\s+$/,u=-1,p=0;function d(){return(h=i.charAt(++u))||""}function f(e){var t,n=u;return e&&E(),t=i.charAt(u+1)||"",u=n-1,d(),t}function T(e){for(var t=u;d();)if("\\"===h)d();else{if(-1!==e.indexOf(h))break;if("\n"===h)break}return i.substring(t,u+1)}function E(){for(var e="";c.test(f());)d(),e+=h;return e}function g(){var e="";for(h&&c.test(h)&&(e=h);c.test(d());)e+=h;return e}function x(e){var t=u;for(e="/"===f(),d();d();){if(!e&&"*"===h&&"/"===f()){d();break}if(e&&"\n"===h)return i.substring(t,u)}return i.substring(t,u)+h}function w(e){return i.substring(u-e.length,u).toLowerCase()===e}function K(){for(var e=0,t=u+1;tn&&(n=e.line_indent_level)),{mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,line_indent_level:e?e.line_indent_level:n,start_line_index:l.get_line_number(),ternary_depth:0}}for(p={TK_START_EXPR:function L(){O();var e=Z.Expression;if("["===h.text){if("TK_WORD"===_||")"===c.last_text)return"TK_RESERVED"===_&&Y(c.last_text,s.line_starters)&&(l.space_before_token=!0),v(e),m(),b(),void(d.space_in_paren&&(l.space_before_token=!0));e=Z.ArrayLiteral,S(c.mode)&&("["!==c.last_text&&(","!==c.last_text||"]"!==a&&"}"!==a)||d.keep_array_indentation||K())}else"TK_RESERVED"===_&&"for"===c.last_text?e=Z.ForInitializer:"TK_RESERVED"===_&&Y(c.last_text,["if","while"])&&(e=Z.Conditional);" "===c.last_text||"TK_START_BLOCK"===_?K():"TK_END_EXPR"===_||"TK_START_EXPR"===_||"TK_END_BLOCK"===_||"."===c.last_text?w(h.wanted_newline):"TK_RESERVED"===_&&"("===h.text||"TK_WORD"===_||"TK_OPERATOR"===_?"TK_RESERVED"===_&&("function"===c.last_word||"typeof"===c.last_word)||"*"===c.last_text&&"function"===a?d.space_after_anon_function&&(l.space_before_token=!0):"TK_RESERVED"!==_||!Y(c.last_text,s.line_starters)&&"catch"!==c.last_text||d.space_before_conditional&&(l.space_before_token=!0):l.space_before_token=!0;"("===h.text&&"TK_RESERVED"===_&&"await"===c.last_word&&(l.space_before_token=!0);"("===h.text&&("TK_EQUALS"!==_&&"TK_OPERATOR"!==_||y()||w());v(e),m(),d.space_in_paren&&(l.space_before_token=!0);b()},TK_END_EXPR:function I(){for(;c.mode===Z.Statement;)k();c.multiline_frame&&w("]"===h.text&&S(c.mode)&&!d.keep_array_indentation);d.space_in_paren&&("TK_START_EXPR"!==_||d.space_in_empty_paren?l.space_before_token=!0:(l.trim(),l.space_before_token=!1));"]"===h.text&&d.keep_array_indentation?(m(),k()):(k(),m());l.remove_redundant_indentation(u),c.do_while&&u.mode===Z.Conditional&&(u.mode=Z.Expression,c.do_block=!1,c.do_while=!1)},TK_START_BLOCK:function V(){var e=D(1),t=D(2);t&&(":"===t.text&&Y(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||Y(e.text,["get","set"])&&Y(t.type,["TK_WORD","TK_RESERVED"]))?Y(a,["class","interface"])?v(Z.BlockStatement):v(Z.ObjectLiteral):v(Z.BlockStatement);var n=!e.comments_before.length&&"}"===e.text&&"function"===c.last_word&&"TK_END_EXPR"===_;"expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?"TK_OPERATOR"!==_&&(n||"TK_EQUALS"===_||"TK_RESERVED"===_&&N(c.last_text)&&"else"!==c.last_text)?l.space_before_token=!0:K(!1,!0):"TK_OPERATOR"!==_&&"TK_START_EXPR"!==_?"TK_START_BLOCK"===_?K():l.space_before_token=!0:S(u.mode)&&","===c.last_text&&("}"===a?l.space_before_token=!0:K());m(),b()},TK_END_BLOCK:function P(){for(;c.mode===Z.Statement;)k();var e="TK_START_BLOCK"===_;"expand"===d.brace_style?e||K():e||(S(c.mode)&&d.keep_array_indentation?(d.keep_array_indentation=!1,K(),d.keep_array_indentation=!0):K());k(),m()},TK_WORD:C,TK_RESERVED:C,TK_SEMICOLON:function B(){O()&&(l.space_before_token=!1);for(;c.mode===Z.Statement&&!c.if_block&&!c.do_block;)k();m()},TK_STRING:function j(){O()?l.space_before_token=!0:"TK_RESERVED"===_||"TK_WORD"===_?l.space_before_token=!0:"TK_COMMA"===_||"TK_START_EXPR"===_||"TK_EQUALS"===_||"TK_OPERATOR"===_?y()||w():K();m()},TK_EQUALS:function M(){O();c.declaration_statement&&(c.declaration_assignment=!0);l.space_before_token=!0,m(),l.space_before_token=!0},TK_OPERATOR:function U(){O();if("TK_RESERVED"===_&&N(c.last_text))return l.space_before_token=!0,void m();if("*"===h.text&&"TK_DOT"===_)return void m();if(":"===h.text&&c.in_case)return c.case_body=!0,b(),m(),K(),void(c.in_case=!1);if("::"===h.text)return void m();"TK_OPERATOR"===_&&w();var e=!0,t=!0;Y(h.text,["--","++","!","~"])||Y(h.text,["-","+"])&&(Y(_,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||Y(c.last_text,s.line_starters)||","===c.last_text)?(t=e=!1,!h.wanted_newline||"--"!==h.text&&"++"!==h.text||K(!1,!0)," "===c.last_text&&A(c.mode)&&(e=!0),"TK_RESERVED"===_?e=!0:"TK_END_EXPR"===_?e=!("]"===c.last_text&&("--"===h.text||"++"===h.text)):"TK_OPERATOR"===_&&(e=Y(h.text,["--","-","++","+"])&&Y(c.last_text,["--","-","++","+"]),Y(h.text,["+","-"])&&Y(c.last_text,["--","++"])&&(t=!0)),c.mode!==Z.BlockStatement&&c.mode!==Z.Statement||"{"!==c.last_text&&" "!==c.last_text||K()):":"===h.text?0===c.ternary_depth?e=!1:c.ternary_depth-=1:"?"===h.text?c.ternary_depth+=1:"*"===h.text&&"TK_RESERVED"===_&&"function"===c.last_text&&(t=e=!1);l.space_before_token=l.space_before_token||e,m(),l.space_before_token=t},TK_COMMA:function W(){if(c.declaration_statement)return A(c.parent.mode)&&(c.declaration_assignment=!1),m(),void(c.declaration_assignment?K(c.declaration_assignment=!1,!0):(l.space_before_token=!0,d.comma_first&&w()));m(),c.mode===Z.ObjectLiteral||c.mode===Z.Statement&&c.parent.mode===Z.ObjectLiteral?(c.mode===Z.Statement&&k(),K()):(l.space_before_token=!0,d.comma_first&&w())},TK_BLOCK_COMMENT:function z(){if(l.raw)return l.add_raw_token(h),void(h.directives&&"end"===h.directives.preserve&&(d.test_output_raw||(l.raw=!1)));if(h.directives)return K(!1,!0),m(),"start"===h.directives.preserve&&(l.raw=!0),void K(!1,!0);if(!Q.newline.test(h.text)&&!h.wanted_newline)return l.space_before_token=!0,m(),void(l.space_before_token=!0);var e,t=function _(e){var t;e=e.replace(/\x0d/g,"");var n=[];t=e.indexOf("\n");for(;-1!==t;)n.push(e.substring(0,t)),e=e.substring(t+1),t=e.indexOf("\n");e.length&&n.push(e);return n}(h.text),n=!1,i=!1,r=h.whitespace_before,s=r.length;K(!1,!0),1s?m(t[e].substring(s)):l.add_token(t[e]);K(!1,!0)},TK_COMMENT:function G(){h.wanted_newline?K(!1,!0):l.trim(!0);l.space_before_token=!0,m(),K(!1,!0)},TK_DOT:function X(){O();"TK_RESERVED"===_&&N(c.last_text)?l.space_before_token=!0:w(")"===c.last_text&&d.break_chained_methods);m()},TK_UNKNOWN:function F(){m(),"\n"===h.text[h.text.length-1]&&K()},TK_EOF:function $(){for(;c.mode===Z.Statement;)k()}},d={},(e=e||{}).braces_on_own_line!==undefined&&(d.brace_style=e.braces_on_own_line?"expand":"collapse"),d.brace_style=e.brace_style?e.brace_style:d.brace_style?d.brace_style:"collapse","expand-strict"===d.brace_style&&(d.brace_style="expand"),d.indent_size=e.indent_size?parseInt(e.indent_size,10):4,d.indent_char=e.indent_char?e.indent_char:" ",d.eol=e.eol?e.eol:"\n",d.preserve_newlines=e.preserve_newlines===undefined||e.preserve_newlines,d.break_chained_methods=e.break_chained_methods!==undefined&&e.break_chained_methods,d.max_preserve_newlines=e.max_preserve_newlines===undefined?0:parseInt(e.max_preserve_newlines,10),d.space_in_paren=e.space_in_paren!==undefined&&e.space_in_paren,d.space_in_empty_paren=e.space_in_empty_paren!==undefined&&e.space_in_empty_paren,d.jslint_happy=e.jslint_happy!==undefined&&e.jslint_happy,d.space_after_anon_function=e.space_after_anon_function!==undefined&&e.space_after_anon_function,d.keep_array_indentation=e.keep_array_indentation!==undefined&&e.keep_array_indentation,d.space_before_conditional=e.space_before_conditional===undefined||e.space_before_conditional,d.unescape_strings=e.unescape_strings!==undefined&&e.unescape_strings,d.wrap_line_length=e.wrap_line_length===undefined?0:parseInt(e.wrap_line_length,10),d.e4x=e.e4x!==undefined&&e.e4x,d.end_with_newline=e.end_with_newline!==undefined&&e.end_with_newline,d.comma_first=e.comma_first!==undefined&&e.comma_first,d.test_output_raw=e.test_output_raw!==undefined&&e.test_output_raw,d.jslint_happy&&(d.space_after_anon_function=!0),e.indent_with_tabs&&(d.indent_char="\t",d.indent_size=1),d.eol=d.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),o="";0d.max_preserve_newlines&&(t=d.max_preserve_newlines),d.preserve_newlines&&1=d.wrap_line_length&&K(!1,!0)}}function K(e,t){if(!t&&" "!==c.last_text&&","!==c.last_text&&"="!==c.last_text&&"TK_OPERATOR"!==_)for(;c.mode===Z.Statement&&!c.if_block&&!c.do_block;)k();l.add_new_line(e)&&(c.multiline_frame=!0)}function R(){l.just_added_newline()&&(d.keep_array_indentation&&S(c.mode)&&h.wanted_newline?(l.current_line.push(h.whitespace_before),l.space_before_token=!1):l.set_indent(c.indentation_level)&&(c.line_indent_level=c.indentation_level))}function m(e){l.raw?l.add_raw_token(h):(d.comma_first&&"TK_COMMA"===_&&l.just_added_newline()&&","===l.previous_line.last()&&(l.previous_line.pop(),R(),l.add_token(","),l.space_before_token=!0),e=e||h.text,R(),l.add_token(e))}function b(){c.indentation_level+=1}function v(e){u=c?(t.push(c),c):E(null,e),c=E(u,e)}function S(e){return e===Z.ArrayLiteral}function A(e){return Y(e,[Z.Expression,Z.ForInitializer,Z.Conditional])}function k(){0=f.length?null:f[t]}function C(){("TK_RESERVED"===h.type&&c.mode!==Z.ObjectLiteral&&Y(h.text,["set","get"])&&(h.type="TK_WORD"),"TK_RESERVED"===h.type&&c.mode===Z.ObjectLiteral)&&(":"===D(1).text&&(h.type="TK_WORD"));if(O()||!h.wanted_newline||A(c.mode)||"TK_OPERATOR"===_&&"--"!==c.last_text&&"++"!==c.last_text||"TK_EQUALS"===_||!d.preserve_newlines&&"TK_RESERVED"===_&&Y(c.last_text,["const","let","const","set","get"])||K(),c.do_block&&!c.do_while){if("TK_RESERVED"===h.type&&"while"===h.text)return l.space_before_token=!0,m(),l.space_before_token=!0,void(c.do_while=!0);K(),c.do_block=!1}if(c.if_block)if(c.else_block||"TK_RESERVED"!==h.type||"else"!==h.text){for(;c.mode===Z.Statement;)k();c.if_block=!1,c.else_block=!1}else c.else_block=!0;if("TK_RESERVED"===h.type&&("case"===h.text||"default"===h.text&&c.in_case_statement))return K(),(c.case_body||d.jslint_happy)&&(!function e(){0c.parent.indentation_level)&&(c.indentation_level-=1)}(),c.case_body=!1),m(),c.in_case=!0,void(c.in_case_statement=!0);if("TK_RESERVED"===h.type&&"function"===h.text&&((Y(c.last_text,["}"," "])||l.just_added_newline()&&!Y(c.last_text,["[","{",":","=",","]))&&(l.just_added_blankline()||h.comments_before.length||(K(),K(!0))),"TK_RESERVED"===_||"TK_WORD"===_?"TK_RESERVED"===_&&Y(c.last_text,["get","set","new","return","export","async"])?l.space_before_token=!0:"TK_RESERVED"===_&&"default"===c.last_text&&"export"===a?l.space_before_token=!0:K():"TK_OPERATOR"===_||"="===c.last_text?l.space_before_token=!0:(c.multiline_frame||!A(c.mode)&&!S(c.mode))&&K()),"TK_COMMA"!==_&&"TK_START_EXPR"!==_&&"TK_EQUALS"!==_&&"TK_OPERATOR"!==_||y()||w(),"TK_RESERVED"===h.type&&Y(h.text,["function","get","set"]))return m(),void(c.last_word=h.text);(n="NONE","TK_END_BLOCK"===_?"TK_RESERVED"===h.type&&Y(h.text,["else","catch","finally"])?"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?n="NEWLINE":(n="SPACE",l.space_before_token=!0):n="NEWLINE":"TK_SEMICOLON"===_&&c.mode===Z.BlockStatement?n="NEWLINE":"TK_SEMICOLON"===_&&A(c.mode)?n="SPACE":"TK_STRING"===_?n="NEWLINE":"TK_RESERVED"===_||"TK_WORD"===_||"*"===c.last_text&&"function"===a?n="SPACE":"TK_START_BLOCK"===_?n="NEWLINE":"TK_END_EXPR"===_&&(l.space_before_token=!0,n="NEWLINE"),"TK_RESERVED"===h.type&&Y(h.text,s.line_starters)&&")"!==c.last_text&&(n="else"===c.last_text||"export"===c.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===h.type&&Y(h.text,["else","catch","finally"]))?"TK_END_BLOCK"!==_||"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?K():(l.trim(!0),"}"!==l.current_line.last()&&K(),l.space_before_token=!0):"NEWLINE"===n?"TK_RESERVED"===_&&N(c.last_text)?l.space_before_token=!0:"TK_END_EXPR"!==_?"TK_START_EXPR"===_&&"TK_RESERVED"===h.type&&Y(h.text,["const","let","const"])||":"===c.last_text||("TK_RESERVED"===h.type&&"if"===h.text&&"else"===c.last_text?l.space_before_token=!0:K()):"TK_RESERVED"===h.type&&Y(h.text,s.line_starters)&&")"!==c.last_text&&K():c.multiline_frame&&S(c.mode)&&","===c.last_text&&"}"===a?K():"SPACE"===n&&(l.space_before_token=!0);m(),c.last_word=h.text,"TK_RESERVED"===h.type&&"do"===h.text&&(c.do_block=!0),"TK_RESERVED"===h.type&&"if"===h.text&&(c.if_block=!0)}_="TK_START_BLOCK",a="",(l=new q(o,T)).raw=d.test_output_raw,t=[],v(Z.BlockStatement),this.beautify=function(){var e,t;for(s=new ee(i,d,o),f=s.tokenize(),r=0;e=D();){for(var n=0;n=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");this.line_starters="continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var I,V,P,B,j,M,U=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),W=/([\s\S]*?)((?:\*\/)|$)/g,z=/([^\n\r\u2028\u2029]*)/g,G=/\/\* beautify( \w+[:]\w+)+ \*\//g,X=/ (\w+)[:](\w+)/g,F=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,$=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function _(){var e,t,n=[];if(I=0,V="",M<=j)return["","TK_EOF"];t=B.length?B[B.length-1]:new J("TK_START_BLOCK","{");var i=k.charAt(j);for(j+=1;Y(i,O);){if(Q.newline.test(i)?"\n"===i&&"\r"===k.charAt(j-2)||(I+=1,n=[]):n.push(i),M<=j)return["","TK_EOF"];i=k.charAt(j),j+=1}if(n.length&&(V=n.join("")),N.test(i)){var r=!0,s=!0,_=N;for("0"===i&&j/))&&("TK_RESERVED"===t.type&&Y(t.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===t.type&&")"===t.text&&t.parent&&"TK_RESERVED"===t.parent.type&&Y(t.parent.text,["if","while","for"])||Y(t.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var c=i,u=!1,p=!1;if(e=i,"/"===c)for(var d=!1;j/g,T=k.slice(j-1),E=f.exec(T);if(E&&0===E.index){for(var g=E[2],x=0;E;){var w=!!E[1],K=E[2],R=!!E[E.length-1]||"![CDATA["===K.slice(0,8);if(K!==g||R||(w?--x:++x),x<=0)break;E=f.exec(T)}var m=E?E.index+E[0].length:T.length;return T=T.slice(0,m),j+=m-1,[T=T.replace(Q.lineBreak,"\n"),"TK_STRING"]}}else for(;j=this.wrap_line_length?(this.print_newline(!1,e),this.print_indentation(e)):(this.line_char_count++,e.push(" "))},this.get_content=function(){for(var e="",t=[];"<"!=this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(t);else{if(g){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",n=new RegExp("","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos=this.input.length)return e&&(this.pos=o,this.line_char_count=l),r.length?r.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))_=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),_=!0),"="===i&&(_=!1),r.length&&"="!=r[r.length-1]&&">"!=i&&_){if(this.space_or_wrap(r),_=!1,!a&&"force"===x&&"/"!=i){this.print_newline(!0,r),this.print_indentation(r);for(var h=0;h"!=i);var u,p,d=r.join("");u=-1!=d.indexOf(" ")?d.indexOf(" "):"{"===d[0]?d.indexOf("}"):d.indexOf(">"),p="<"!==d[0]&&g?"#"===d[2]?3:2:1;var f=d.substring(p,u).toLowerCase();return"/"===d.charAt(d.length-2)||this.Utils.in_array(f,this.Utils.single_token)?e||(this.tag_type="SINGLE"):g&&"{"===d[0]&&"else"===f?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(f,E)?(s=this.get_unformatted("",d),r.push(s),this.pos,this.tag_type="SINGLE"):"script"===f&&(-1===d.search("type")||-1",i=!0):0===t.indexOf("",i=!0):0===t.indexOf("",i=!0):0===t.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===t.indexOf("{{!")?(n="}}",i=!0):0===t.indexOf("",i=!0):0===t.indexOf("<%")&&(n="%>",i=!0)),r=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var n="",i="",r=0,s=!0;do{if(this.pos>=this.input.length)return i;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===n||"\r"===n){i+="\n",this.line_char_count=0;continue}}i+=n,this.line_char_count++,s=!0,g&&"{"===n&&i.length&&"{"===i[i.length-2]&&(r=(i+=this.get_unformatted("}}")).length)}while(-1===i.toLowerCase().indexOf(e,r));return i},this.get_token=function(){var e;if("TK_TAG_SCRIPT"!==this.last_token&&"TK_TAG_STYLE"!==this.last_token)return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0;var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":new Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!=e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var n=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,t))},this.printer=function(e,t,n,i,r){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=r,this.indent_level=0,this.wrap_line_length=i;for(var s=this.line_char_count=0;s