%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/gachan/www/wp-content/plugins/mailchimp/assets/js/third-party/
Upload File :
Create Path :
Current File : /home/gachan/www/wp-content/plugins/mailchimp/assets/js/third-party/beautify-html.min.js

!function(){function a(a){return a.replace(/^\s+|\s+$/g,"")}function b(a){return a.replace(/^\s+/g,"")}function c(c,d,e,f){function g(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=i,this.Utils={whitespace:"\n\r	 ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(a,b){for(var c=0;c<b.length;c++)if(a===b[c])return!0;return!1}},this.traverse_whitespace=function(){var a="";if(a=this.input.charAt(this.pos),this.Utils.in_array(a,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(a,this.Utils.whitespace);)o&&"\n"===a&&this.newlines<=p&&(this.newlines+=1),this.pos++,a=this.input.charAt(this.pos);return!0}return!1},this.get_content=function(){for(var a="",b=[],c=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return b.length?b.join(""):["","TK_EOF"];if(this.traverse_whitespace())b.length&&(c=!0);else{if(indent_handlebars){var d=this.input.substr(this.pos,3);if("{{#"===d||"{{/"===d)break;if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}a=this.input.charAt(this.pos),this.pos++,c&&(this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,b),this.print_indentation(b)):(this.line_char_count++,b.push(" ")),c=!1),this.line_char_count++,b.push(a)}}return b.length?b.join(""):""},this.get_contents_to=function(a){if(this.pos===this.input.length)return["","TK_EOF"];var b="",c=new RegExp("</"+a+"\\s*>","igm");c.lastIndex=this.pos;var d=c.exec(this.input),e=d?d.index:this.input.length;return this.pos<e&&(b=this.input.substring(this.pos,e),this.pos=e),b},this.record_tag=function(a){this.tags[a+"count"]?(this.tags[a+"count"]++,this.tags[a+this.tags[a+"count"]]=this.indent_level):(this.tags[a+"count"]=1,this.tags[a+this.tags[a+"count"]]=this.indent_level),this.tags[a+this.tags[a+"count"]+"parent"]=this.tags.parent,this.tags.parent=a+this.tags[a+"count"]},this.retrieve_tag=function(a){if(this.tags[a+"count"]){for(var b=this.tags.parent;b&&a+this.tags[a+"count"]!==b;)b=this.tags[b+"parent"];b&&(this.indent_level=this.tags[a+this.tags[a+"count"]],this.tags.parent=this.tags[b+"parent"]),delete this.tags[a+this.tags[a+"count"]+"parent"],delete this.tags[a+this.tags[a+"count"]],1===this.tags[a+"count"]?delete this.tags[a+"count"]:this.tags[a+"count"]--}},this.indent_to_tag=function(a){if(this.tags[a+"count"]){for(var b=this.tags.parent;b&&a+this.tags[a+"count"]!==b;)b=this.tags[b+"parent"];b&&(this.indent_level=this.tags[a+this.tags[a+"count"]])}},this.get_tag=function(a){var b,c,d,e="",f=[],g="",h=!1,i=this.pos,j=this.line_char_count;a=void 0!==a?a:!1;do{if(this.pos>=this.input.length)return a&&(this.pos=i,this.line_char_count=j),f.length?f.join(""):["","TK_EOF"];if(e=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(e,this.Utils.whitespace))h=!0;else{if(("'"===e||'"'===e)&&(e+=this.get_unformatted(e),h=!0),"="===e&&(h=!1),f.length&&"="!==f[f.length-1]&&">"!==e&&h&&(this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,f),this.print_indentation(f)):(f.push(" "),this.line_char_count++),h=!1),indent_handlebars&&"<"===d&&e+this.input.charAt(this.pos)==="{{"&&(e+=this.get_unformatted("}}"),f.length&&" "!==f[f.length-1]&&"<"!==f[f.length-1]&&(e=" "+e),h=!0),"<"!==e||d||(b=this.pos-1,d="<"),indent_handlebars&&!d&&f.length>=2&&"{"===f[f.length-1]&&"{"==f[f.length-2]&&(b="#"===e||"/"===e?this.pos-3:this.pos-2,d="{"),this.line_char_count++,f.push(e),f[1]&&"!"===f[1]){f=[this.get_comment(b)];break}if(indent_handlebars&&"{"===d&&f.length>2&&"}"===f[f.length-2]&&"}"===f[f.length-1])break}}while(">"!==e);var k,l,m=f.join("");k=m.indexOf(-1!==m.indexOf(" ")?" ":"{"===m[0]?"}":">"),l="<"!==m[0]&&indent_handlebars?"#"===m[2]?3:2:1;var o=m.substring(l,k).toLowerCase();return"/"===m.charAt(m.length-2)||this.Utils.in_array(o,this.Utils.single_token)?a||(this.tag_type="SINGLE"):indent_handlebars&&"{"===m[0]&&"else"===o?a||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):"script"===o?a||(this.record_tag(o),this.tag_type="SCRIPT"):"style"===o?a||(this.record_tag(o),this.tag_type="STYLE"):this.is_unformatted(o,n)?(g=this.get_unformatted("</"+o+">",m),f.push(g),b>0&&this.Utils.in_array(this.input.charAt(b-1),this.Utils.whitespace)&&f.splice(0,0,this.input.charAt(b-1)),c=this.pos-1,this.Utils.in_array(this.input.charAt(c+1),this.Utils.whitespace)&&f.push(this.input.charAt(c+1)),this.tag_type="SINGLE"):"!"===o.charAt(0)?a||(this.tag_type="SINGLE",this.traverse_whitespace()):a||("/"===o.charAt(0)?(this.retrieve_tag(o.substring(1)),this.tag_type="END",this.traverse_whitespace()):(this.record_tag(o),"html"!==o.toLowerCase()&&(this.indent_content=!0),this.tag_type="START",this.traverse_whitespace()),this.Utils.in_array(o,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),a&&(this.pos=i,this.line_char_count=j),f.join("")},this.get_comment=function(a){var b="",c=">",d=!1;for(this.pos=a,input_char=this.input.charAt(this.pos),this.pos++;this.pos<=this.input.length&&(b+=input_char,b[b.length-1]!==c[c.length-1]||-1===b.indexOf(c));)!d&&b.length<10&&(0===b.indexOf("<![if")?(c="<![endif]>",d=!0):0===b.indexOf("<![cdata[")?(c="]]>",d=!0):0===b.indexOf("<![")?(c="]>",d=!0):0===b.indexOf("<!--")&&(c="-->",d=!0)),input_char=this.input.charAt(this.pos),this.pos++;return b},this.get_unformatted=function(a,b){if(b&&-1!==b.toLowerCase().indexOf(a))return"";var c="",d="",e=0,f=!0;do{if(this.pos>=this.input.length)return d;if(c=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(c,this.Utils.whitespace)){if(!f){this.line_char_count--;continue}if("\n"===c||"\r"===c){d+="\n",this.line_char_count=0;continue}}d+=c,this.line_char_count++,f=!0,indent_handlebars&&"{"===c&&d.length&&"{"===d[d.length-2]&&(d+=this.get_unformatted("}}"),e=d.length)}while(-1===d.toLowerCase().indexOf(a,e));return d},this.get_token=function(){var a;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var b=this.last_token.substr(7);return a=this.get_contents_to(b),"string"!=typeof a?a:[a,"TK_"+b]}if("CONTENT"===this.current_mode)return a=this.get_content(),"string"!=typeof a?a:[a,"TK_CONTENT"];if("TAG"===this.current_mode){if(a=this.get_tag(),"string"!=typeof a)return a;var c="TK_TAG_"+this.tag_type;return[a,c]}},this.get_full_indent=function(a){return a=this.indent_level+a||0,1>a?"":Array(a+1).join(this.indent_string)},this.is_unformatted=function(a,b){if(!this.Utils.in_array(a,b))return!1;if("a"!==a.toLowerCase()||!this.Utils.in_array("a",b))return!0;var c=this.get_tag(!0),d=(c||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!d||this.Utils.in_array(d,b)?!0:!1},this.printer=function(a,c,d,e,f){this.input=a||"",this.output=[],this.indent_character=c,this.indent_string="",this.indent_size=d,this.brace_style=f,this.indent_level=0,this.wrap_line_length=e,this.line_char_count=0;for(var g=0;g<this.indent_size;g++)this.indent_string+=this.indent_character;this.print_newline=function(a,b){this.line_char_count=0,b&&b.length&&(a||"\n"!==b[b.length-1])&&b.push("\n")},this.print_indentation=function(a){for(var b=0;b<this.indent_level;b++)a.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(a){(a||""!==a)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),a=b(a)),this.print_token_raw(a)},this.print_token_raw=function(a){a&&""!==a&&(a.length>1&&"\n"===a[a.length-1]?(this.output.push(a.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(a));for(var b=0;b<this.newlines;b++)this.print_newline(b>0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}var h,i,j,k,l,m,n,o,p;for(d=d||{},void 0!==d.wrap_line_length&&0!==parseInt(d.wrap_line_length,10)||void 0!==d.max_char&&0!==parseInt(d.max_char,10)||(d.wrap_line_length=d.max_char),i=d.indent_inner_html||!1,j=parseInt(d.indent_size||4,10),k=d.indent_char||" ",m=d.brace_style||"collapse",l=0===parseInt(d.wrap_line_length,10)?32786:parseInt(d.wrap_line_length||250,10),n=d.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],o=d.preserve_newlines||!0,p=o?parseInt(d.max_preserve_newlines||32786,10):0,indent_handlebars=d.indent_handlebars||!1,h=new g,h.printer(c,k,j,l,m);;){var q=h.get_token();if(h.token_text=q[0],h.token_type=q[1],"TK_EOF"===h.token_type)break;switch(h.token_type){case"TK_TAG_START":h.print_newline(!1,h.output),h.print_token(h.token_text),h.indent_content&&(h.indent(),h.indent_content=!1),h.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":h.print_newline(!1,h.output),h.print_token(h.token_text),h.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===h.last_token&&""===h.last_text){var r=h.token_text.match(/\w+/)[0],s=null;h.output.length&&(s=h.output[h.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),(null===s||s[1]!==r)&&h.print_newline(!1,h.output)}h.print_token(h.token_text),h.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var t=h.token_text.match(/^\s*<([a-z]+)/i);t&&h.Utils.in_array(t[1],n)||h.print_newline(!1,h.output),h.print_token(h.token_text),h.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":h.print_token(h.token_text),h.indent_content&&(h.indent(),h.indent_content=!1),h.current_mode="CONTENT";break;case"TK_CONTENT":h.print_token(h.token_text),h.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==h.token_text){h.print_newline(!1,h.output);var u,v=h.token_text,w=1;"TK_SCRIPT"===h.token_type?u="function"==typeof e&&e:"TK_STYLE"===h.token_type&&(u="function"==typeof f&&f),"keep"===d.indent_scripts?w=0:"separate"===d.indent_scripts&&(w=-h.indent_level);var x=h.get_full_indent(w);if(u)v=u(v.replace(/^\s*/,x),d);else{var y=v.match(/^\s*/)[0],z=y.match(/[^\n\r]*$/)[0].split(h.indent_string).length-1,A=h.get_full_indent(w-z);v=v.replace(/^\s*/,x).replace(/\r\n|\r|\n/g,"\n"+A).replace(/\s+$/,"")}v&&(h.print_token_raw(x+a(v)),h.print_newline(!1,h.output))}h.current_mode="TAG"}h.last_token=h.token_type,h.last_text=h.token_text}return h.output.join("")}if("function"==typeof define)define(["./beautify.js","./beautify-css.js"],function(a,b){return{html_beautify:function(d,e){return c(d,e,a,b)}}});else if("undefined"!=typeof exports){var d=require("./beautify.js").js_beautify,e=require("./beautify-css.js").css_beautify;exports.html_beautify=function(a,b){return c(a,b,d,e)}}else"undefined"!=typeof window?window.html_beautify=function(a,b){return c(a,b,window.js_beautify,window.css_beautify)}:"undefined"!=typeof global&&(global.html_beautify=function(a,b){return c(a,b,global.js_beautify,global.css_beautify)})}();

Zerion Mini Shell 1.0