MediaWiki:Prettydiff.js

/*prettydiff.com api.topcoms: true, api.insize: 4, api.inchar: " " */ /*global o, exports */ /* @source: http://prettydiff.com/documentation.php

@licstart The following is the entire license notice for the JavaScript code in this page.

Created by Austin Cheney originally on 3 Mar 2009. This code may not be used or redistributed unless the following conditions are met:

There is no licensing associated with diffview.css. Please use, redistribute, and alter to your content. However, diffview.css provided from Pretty Diff is different from and not aligned with diffview.css originally from Snowtide Informatics.

* The use of diffview.js and prettydiff.js must contain the following copyright: Copyright (c) 2007, Snowtide Informatics Systems, Inc. All rights reserved.

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Snowtide Informatics Systems nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

- used as diffview function 

* The author of fulljsmin.js and date of creation must be stated as: Franck Marcia - 31 Aug 2006

- used as jsmin function: 

* The fulljsmin.js is used with permission from the author of jsminc.c and such must be stated as: Copyright (c) 2002 Douglas Crockford (www.crockford.com)

* The author of js-beautify.js must be stated as: Written by Einars Lielmanis,  http://elfz.laacz.lv/beautify/

Originally converted to javascript by Vital,  http://my.opera.com/Vital/blog/2007/11/21/ javascript-beautify-on-javascript-translated

- used as js_beautify function 

* cleanCSS.js is originally written by Anthony Lieuallen http://tools.arantius.com/tabifier

- used as cleanCSS function 

* charDecoder.js is written by Austin Cheney. Use of this function requires that credit be given to Austin Cheney. http://prettydiff.com/

- used as charDecoder function 

* csvbeauty.js is written by Austin Cheney. Use of this function requires that credit be given to Austin Cheney. http://prettydiff.com/

- used as csvbeauty function 

* csvmin.js is written by Austin Cheney. Use of this function requires that credit be given to Austin Cheney. http://prettydiff.com/

- used as csvmin function 

* markupmin.js is written by Austin Cheney. Use of this function requires that credit be given to Austin Cheney. http://prettydiff.com/

- used as markupmin function 

* markup_beauty.js is written by Austin Cheney. Use of this function requires that credit be given to Austin Cheney. http://prettydiff.com/

- used as markup-beauty function 

* o object literal is in the pd.js file and exists to provide a one time and external means of access to the DOM.

--- * The code mentioned above has significantly expanded documentation in each of the respective function's external JS file as linked from the documentation page: 

* The compilation of cssClean, csvbeauty, csvmin, jsmin, jsdifflib, markup_beauty, markupmin, and js-beautify in this manner is a result of the prettydiff function contained in prettydiff.js. The per character highlighting is the result of the charcomp function also contained in prettydiff.js. Any use or redistribution of these functions must mention the following: Prettydiff created by Austin Cheney originally on 3 Mar 2009. 

Join the Pretty Diff mailing list at: https://groups.google.com/d/forum/pretty-diff

* In addition to the previously stated requirements any use of any component, aside from directly using the full files in their entirety, must restate the license mentioned at the top of each concerned file.

If each and all these conditions are met use and redistribution of prettydiff and its required assets is unlimited without author permission.

@licend The above is the entire license notice for the JavaScript code in this page.

*/ var prettydiff=function(i){var d=(function{var p=new Date,n=p.getTime;return n}),j,h=function(B){var w=0,t=0,C=0,q=0,p=0,u=B,s=[],A=[],v=[],r=(/u\+[0-9a-f]{4,5}\+/),D=(/u\![0-9a-f]{4,5}\+/),n=(/\&\#[0-9]{1,6}\;/),z=(/\&\![0-9]{1,6}\;/);if((!o.rh&&!o.rh.innerHTML)||(u.search(D)===-1&&u.search(r)===-1&&u.search(z)===-1&&u.search(n)===-1)){return B}q=B.length;for(w=0;w<q;w+=1){if(u.search(n)===-1||(u.search(r)<u.search(n)&&u.search(r)!==-1)){t=u.search(r);v.push(t+"|h");p=u.length;for(C=t;C<p;C+=1){if(u.charAt(C)==="+"&&u.charAt(C-1)==="u"){s=u.split("");s.splice(C,1,"!");u=s.join("")}if(u.charAt(C)==="+"&&u.charAt(C-1)!=="u"){C+=1;break}}A.push(u.slice(t+2,C-1));u=u.replace(D,"")}else{if(u.search(r)===-1||(u.search(n)<u.search(r)&&u.search(n)!==-1)){t=u.search(n);v.push(t+"|d");p=u.length;for(C=t;C<p;C+=1){if(u.charAt(C)==="#"){s=u.split("");s.splice(C,1,"!");u=s.join("")}if(u.charAt(C)===";"){C+=1;break}}A.push(u.slice(t+2,C-1));u=u.replace(z,"")}}if(u.search(r)===-1&&u.search(n)===-1){break}}u=u.replace(/u\![0-9a-f]{4,5}\+/g,"").replace(/\&\![0-9]{1,6}\;/g,"").split("");t=A.length;s=[];for(w=0;w<t;w+=1){v[w]=v[w].split("|");if(v[w][1]==="h"){A[w]=parseInt(A[w],16)}o.rh.innerHTML="&#"+parseInt(A[w],10)+";";A[w]=o.rh.innerHTML;s.push(A[w])}return s.join("")},b=function(t,r){var s="",p=0,n=0,u=[],q="Error: Unterminated string begging at character number ";(function{var v=0,y=0,w=0,x="";t=t.replace(/"{2}/g,"{csvquote}");x=t;t=t.split("");w=t.length;for(p=0;pt.length){return t}if(t===q){if(p!==t.length-1){return t+p+", '"+s+"'."}return t+p+"."}t=t.replace(/\n/g,"\n\n{-}\n\n");if(t.charAt(t.length-r.length)===r){t=t.slice(0,t.length+1-r.length)+"{|}"}do{t=t.replace(r,"\n")}while(t.indexOf(r)!==-1);n=u.length;for(p=0;p<n;p+=1){u[p]=u[p].replace(/\n/g,"{ }");t=t.replace("{csvstring}",u[p])}return t.replace(/\{csvquote\}/g,'"')},m=function(p,n){if(n===""){n=","}else{n=h(n)}(function{var q=function(A){var B=[],D=0,C=A.length-2;if(A.length===2){return"{ }"}for(D=0;D2){u=x.length-1;for(v=1;v/g,"//-->")}});var q=(typeof U.source!=="string"||U.source==="")?"Error: no source supplied to jsmin.":U.source,w=(U.level===1||U.level===2||U.level===3)?U.level:2,ac=(U.type==="javascript"||U.type==="css")?U.type:"javascript",y=(U.alter===true)?true:false,O=(U.fcomment===true)?true:false,N="",s=q.match(/\@charset\s+("|')[\w\-]+("|');?/gi),K="",ab="",aa="",P=0,M=0,H=-1,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",I="0123456789",R="",V="",n=[],v=false,z=H,A=function(ad){if(typeof ad==="string"){return ad!==H&&(V.indexOf(ad)>-1||ad.charCodeAt(0)>126)}},B=function(ad){if(ad.indexOf("\n")===-1){return ad}ad=ad.split("");ad[0]=ad[0]+";";return ad.join("")},J=function(ad){var ae=ad.replace(/\s+/,"");if(ad.indexOf("\n")>-1){return ae+";"}return ae+" "},r=function(aj){var al=0,am=aj.split(""),ak=am.length,ai=0,ah=0,ag="",af="",ae="",ad="";for(al=0;al<ak;al+=1){if(am[al]==="\\"){al+=1}else{if(am[al]==='"'&&af===""){af='"'}else{if(am[al]==="'"&&af===""){af="'"}else{if(am[al]==="/"&&af===""&&!A(am[al-1])&&am[al-1]!==")"&&am[al-1]!=="]"){if(am[al-1]===" "){am[al-1]="";if(!A(am[al-2])){af="/";am[al]="pd"}else{if(am[al+1]===" "){am[al+1]=""}}}else{af="/";am[al]="pd"}}else{if(am[al]==="/"&&af===""&&am[al+1]===" "&&A(am[al-1])){am[al+1]=""}else{if(am[al]==='"'&&af==='"'){af=""}else{if(am[al]==="'"&&af==="'"){af=""}else{if(am[al]==="/"&&af==="/"){af="";am[al]="pd"}else{if((af==="'"||af==='"')&&am[al-2]==="\\"&&am[al-1]===";"){am[al-1]="";am[al-2]=" "}else{if(af===""&&(am[al]==="}"||am[al]===")")){if((am[al+1]!=="("&&am[al+1]!=="["&&am[al+1]!==","&&am[al+1]!==";"&&am[al+1]!=="."&&am[al+1]!=="?"&&am[al+1]!=="*"&&am[al+1]!=="+"&&am[al+1]!=="-"&&(am[al+1]!=="\n"||(am[al+1]==="\n"&&am[al+2]!=="("&&am[al+2]!=="["&&am[al+2]!=="+"&&am[al+2]!=="-"&&am[al+2]!=="/"))&&typeof am[al-3]==="string"&&am[al-2]==="="&&am[al-1]==="{"&&am[al]==="}"&&(am[al+1]!=="\n"||(am[al+1]==="\n"&&am[al+2]!=="+"&&am[al+2]!=="-"))&&(A(am[al-3])||am[al-3]==="]"||am[al-3]===")"))){am[al]+=";"}else{ah=-1;ag="";ae="";if(am[al]==="}"){ae="}";ad="{"}else{ae=")";ad="("}for(ai=al-1;ai>-1;ai-=1){if((ai>1&&am[ai-1]==="\\"&&am[ai-2]!=="\\")||(ai===1&&am[ai-1]==="\\")){ai-=1}else{if(am[ai].charAt(0)===ae&&ag===""){ah-=1}else{if(am[ai]===ad&&ag===""){ah+=1}else{if(am[ai]==='"'&&ag===""){ag='"'}else{if(am[ai]==="'"&&ag===""){ag="'"}else{if(am[ai]==="pd"&&ag===""){ag="/"}else{if(am[ai]==='"'&&ag==='"'){ag=""}else{if(am[ai]==="'"&&ag==="'"){ag=""}else{if(am[ai]==="pd"&&ag==="/"){ag=""}}}}}}}}}if(ah===0&&(ai!==al-1||(ai===al-1&&typeof am[ai-1]==="string"&&am[ai-1]!==am[al]))){if(am[ai-1]===")"&&ae==="}"){ai-=2;ah=-1;ag="";for(ai;ai>-1;ai-=1){if((ai>1&&am[ai-1]==="\\"&&am[ai-2]!=="\\")||(ai===1&&am[ai-1]==="\\")){ai-=1}else{if(am[ai]===")"&&ag===""){ah-=1}else{if(am[ai]==="("&&ag===""){ah+=1}else{if(am[ai]==='"'&&ag===""){ag='"'}else{if(am[ai]==="'"&&ag===""){ag="'"}else{if(am[ai]==="pd"&&ag===""){ag="/"}else{if(am[ai]==='"'&&ag==='"'){ag=""}else{if(am[ai]==="'"&&ag==="'"){ag=""}else{if(am[ai]==="pd"&&ag==="/"){ag=""}}}}}}}}}if(ah===0){ai-=1;if(am[al+1]!=="("&&am[al+1]!=="["&&am[al+1]!==","&&am[al+1]!==";"&&am[al+1]!=="."&&am[al+1]!=="?"&&am[al+1]!=="*"&&am[al+1]!=="+"&&am[al+1]!=="-"&&typeof am[ai-9]==="string"&&am[ai-8]==="="&&am[ai-7]==="f"&&am[ai-6]==="u"&&am[ai-5]==="n"&&am[ai-4]==="c"&&am[ai-3]==="t"&&am[ai-2]==="i"&&am[ai-1]==="o"&&am[ai]==="n"&&(A(am[ai-9])||am[ai-9]==="]"||am[ai-9]===")")){am[al]+=";"}break}}break}else{if(typeof am[ai-2]==="string"&&am[ai-1]==="="&&(am[al-1].length===1||am[al-1]==="pd")&&(A(am[ai-2]||am[ai-2]==="]"||am[ai-2]===")"))){if(am[al+1]!=="("&&am[al+1]!=="["&&am[al+1]!==","&&am[al+1]!==";"&&am[al+1]!=="."&&am[al+1]!=="?"&&am[al+1]!=="*"&&am[al+1]!=="+"&&am[al+1]!=="-"&&(am[al+1]!=="\n"||(am[al+1]==="\n"&&am[al+2]!=="("&&am[al+2]!=="["&&am[al+2]!=="+"&&am[al+2]!=="-"&&am[al+2]!=="/"))&&(typeof am[al+1]!=="string"||am[al+1]!=="/")){am[al]+=";"}break}else{break}}}}}}else{if(af===""&&am[al]==="\n"){if((/\w/).test(am[al+1])&&am[al-1]!=="}"&&am[al-1]!==")"&&am[al-1].indexOf(";")===-1){am[al]=";"}else{am[al]=""}}}}}}}}}}}}}for(al=0;al<ak;al+=1){if(am[al]==="pd"){am[al]="/"}else{if(am[al]==="/"&&typeof am[al+1]==="string"&&am[al+1]===" "){am[al+1]=""}}}return am.join("").replace(/\"/g,'"').replace(/\'/g,"'")},u=function(aq){var ap=0,ak=0,aj=0,ai=-1,af=0,ae=0,ad=0,ao=aq.length,an=[],am=[],ah=[],ag=[],al=false,ar=function(av){var au=av.charAt(0),at=false;if(av.length===8||av.length===5){av=av.substr(1);at=true}av=av.toLowerCase;if(av.length===7&&av.charAt(1)===av.charAt(2)&&av.charAt(3)===av.charAt(4)&&av.charAt(5)===av.charAt(6)){av="#"+av.charAt(1)+av.charAt(3)+av.charAt(5)}if(at&&!(/\s/).test(au)&&au!==":"){av=au+" "+av}else{if(at&&au===":"){av=":PDpoundPD"+av}else{if(at&&(/\s/).test(au)){av=" "+av}}}return av};(function{var aw=function(ay){if(ay.indexOf("\n")===-1){return ay}return ay.replace(/\s+/,";")},at=aq.length,ax=[],av=0,au="";for(ap=0;ap<at;ap+=1){ax.push(aq.charAt(ap));if(aq.charAt(ap)==="{"||aq.charAt(ap+1)==="}"){if(ax[0]==="}"){am.push("}");ax[0]=""}au=ax.join("");if(au.indexOf("{")>-1){av=Math.max(au.lastIndexOf("\n"),au.lastIndexOf(";"));am.push(au.substring(0,av+1).replace(/^(\s+)/,"").replace(/(\w|\)|"|')\s+/g,aw));am.push(au.substring(av+1))}else{am.push(au.replace(/^(\s+)/,"").replace(/\s+\w+(\-\w+)*:/g,aw))}ax=[]}}am.push("}")});for(ao=ap-1;ao>0;ao-=1){if(aq.charAt(ao)==="/"&&aq.charAt(ao-1)&&aq.charAt(ao-1)==="*"){for(ak=ao-1;ak>0;ak-=1){if(aq.charAt(ak)==="/"&&aq.charAt(ak+1)==="*"){ao=ak;break}}}else{if(!/[\}\s]/.test(aq.charAt(ao))){break}}}(function{var aB=0,aA=am.length,az=0,ax=0,aw=1,av=[],au=[],at=[],ay=false;for(aB=0;aB<aA;aB+=1){if(am[aB]==="}"){ax-=1;if(ax===aw-1&&av.length>0){au=am.slice(0,aB);at=am.slice(aB,am.length);am=[].concat(au,av,at);av=[];aB=au.length-1;aA=am.length}}else{if(am[aB].indexOf("{")>-1){ax+=1;if(ax>aw){ay=true;aw=ax-1;av.push(am[aB]);am[aB]="";for(az=aB+1;az<aA;az+=1){av.push(am[az]);if(am[az].indexOf("{")>-1){ax+=1;am[az]=""}else{if(am[az]==="}"){ax-=1;am[az]="";if(ax===aw){break}}else{am[az]=""}}}}}}}if(ay){aA=am.length;av=[];for(aB=0;aB<aA;aB+=1){if(av.length>0&&av[av.length-1].indexOf("{")===-1&&am[aB]!=="}"&&am[aB].indexOf("{")===-1){av[av.length-1]=av[av.length-1]+am[aB]}else{if(am[aB]!==""){av.push(am[aB])}}}am=[].concat(av)}});ao=am.length;for(ap=0;ap<ao-1;ap+=1){if(am[ap].charAt(am[ap].length-1)!=="{"){if(am[ap].indexOf("url(")>-1){ah=am[ap].split("");aj=ah.length;for(ak=3;ak<aj;ak+=1){if(ah[ak-3]==="u"&&ah[ak-2]==="r"&&ah[ak-1]==="l"&&ah[ak]==="("){al=true}if(al){if(ah[ak-1]!=="\\"&&ah[ak]===")"){al=false}else{if(ah[ak]===";"){ah[ak]="~PrettyDiffSemi~"}else{if(ah[ak]===":"){ah[ak]="~PrettyDiffColon~"}}}}}am[ap]=ah.join("")}if(am[ap].charAt(am[ap].length-1)===";"){am[ap]=am[ap].substr(0,am[ap].length-1)}if(am[ap].indexOf("{")>-1||am[ap].indexOf(",")>am[ap].length-3){an=[am[ap]]}else{an=am[ap].replace(/(\w|\W)?#[a-fA-F0-9]{3,6}(?!(\w*\)))(?=(|\s|\)\}|,))/g,ar).replace(/:/g,"~PDCSEP~").split(";").sort}aj=an.length;ah=[];for(ak=0;ak<aj;ak+=1){if(an[ak].charAt(0)==="_"){an.push(an[ak]);an.splice(ak,1)}ah.push(an[ak].split("~PDCSEP~"))}an=[].concat(ah);aj=an.length;af=0;ae=0;ai=-1;for(ak=1;ak<aj;ak+=1){if(an[ak].length>1&&an[ak][0]===an[ak-1][0]){an[ak-1]=["",""]}}for(ak=0;ak<aj;ak+=1){if(an[ak-1]&&an[ak-1][0]===an[ak][0]&&(/\-[a-z]/).test(an[ak-1][1])===false&&(/\-[a-z]/).test(an[ak][1])===false){an[ak-1]=["",""]}if(an[ak][0]!=="margin"&&an[ak][0].indexOf("margin")!==-1){af+=1;if(af===4){ag=[an[ak][1]];ad=ak;do{ad-=1;if(an[ad].length>1&&an[ad][1]!==""){ag.push(an[ad][1]);an[ad]=["",""]}}while(ag.length<4&&ad>0);an[ak]=["margin",ag[0]+" "+ag[1]+" "+ag[3]+" "+ag[2]];af=0}}else{if(an[ak][0]!=="padding"&&an[ak][0].indexOf("padding")!==-1){ae+=1;if(ae===4){ag=[an[ak][1]];ad=ak;do{ad-=1;if(an[ad].length>1&&an[ad][1]!==""){ag.push(an[ad][1]);an[ad]=["",""]}}while(ag.length<4&&ad>0);an[ak]=["padding",ag[0]+" "+ag[1]+" "+ag[3]+" "+ag[2]];ae=0}}}if(ai===-1&&an[ak+1]&&an[ak][0].charAt(0)!=="-"&&(an[ak][0].indexOf("cue")!==-1||an[ak][0].indexOf("list-style")!==-1||an[ak][0].indexOf("outline")!==-1||an[ak][0].indexOf("overflow")!==-1||an[ak][0].indexOf("pause")!==-1)&&(an[ak][0]===an[ak+1][0].substring(0,an[ak+1][0].lastIndexOf("-"))||an[ak][0].substring(0,an[ak][0].lastIndexOf("-"))===an[ak+1][0].substring(0,an[ak+1][0].lastIndexOf("-")))){ai=ak;if(an[ai][0].indexOf("-")!==-1&&an[ai][0]!=="list-style"){an[ai][0]=an[ai][0].substring(0,an[ai][0].lastIndexOf("-"))}}else{if(ai!==-1&&an[ai][0]===an[ak][0].substring(0,an[ak][0].lastIndexOf("-"))){if(an[ai][0]==="cue"||an[ai][0]==="pause"){an[ai][1]=an[ak][1]+" "+an[ai][1]}else{an[ai][1]=an[ai][1]+" "+an[ak][1]}an[ak]=["",""]}else{if(ai!==-1){ai=-1}}}}for(ak=0;ak<aj;ak+=1){if(an[ak].length>1&&an[ak][0]!==""){for(ad=ak+1;ad<aj;ad+=1){if(an[ad].length>1&&an[ak][0]===an[ad][0]){an[ak]=["",""]}}}}ah=[];for(ak=0;ak<aj;ak+=1){if(typeof an[ak]!=="string"&&an[ak]!==undefined&&an[ak][0]!==""){ah[ak]=an[ak].join(":")}else{if(typeof an[ak]==="string"){ah[ak]=an[ak].replace(/~PDCSEP~/g,":")}}}am[ap]=ah.join(";").replace(/;+/g,";").replace(/^;/,"");if(am[ap]!=="}"&&typeof am[ap+1]==="string"&&am[ap+1]!=="}"&&am[ap+1].indexOf("{")>-1&&!(/(\,\s*)$/).test(am[ap])){am[ap]=am[ap]+";"}}am[ap]=am[ap].replace(/\)\s+\{/g,"){")}return am.join("").replace(/PDpoundPD#/g,"#")},T=function(aj){var af=0,ae=[],ai="",ad=aj.replace(/\\\)/g,"~PDpar~").split("url("),ah=ad.length,ag="";for(af=1;af<ah;af+=1){ag='"';if(ad[af].charAt(0)==='"'){ag=""}else{if(ad[af].charAt(0)==="'"){ad[af]=ad[af].substr(1,ad[af].length-1)}}ae=ad[af].split(")");ai=ae[0];if(ai.charAt(ai.length-1)!=='"'&&ai.charAt(ai.length-1)!=="'"){ai=ai+'"'}else{if(ai.charAt(ai.length-1)==="'"||ai.charAt(ai.length-1)==='"'){ai=ai.substr(0,ai.length-1)+'"'}}ae[0]=ai;ad[af]="url("+ag+ae.join(")")}return ad.join("").replace(/~PDpar~/g,"\\)")},D=function(ad){return ad.replace(/\-/," -")},S=function(ad){var ae,af=function(ag){ag=Number(ag).toString(16);if(ag.length===1){ag="0"+ag}return ag};ae="#"+ad.replace(/\d+/g,af).replace(/rgb\(/,"").replace(/,/g,"").replace(/\)/,"").replace(/\s*/g,"");return ae},Y=function(af){var ae=af.split(":"),ad=[];if(ae[0].indexOf("background")>-1||ae.length>2){return af}ad=ae[1].split(" ");if(ad.length===4){if(ad[0]===ad[1]&&ad[1]===ad[2]&&ad[2]===ad[3]){ad[1]="";ad[2]="";ad[3]=""}else{if(ad[0]===ad[2]&&ad[1]===ad[3]&&ad[0]!==ad[1]){ad[2]="";ad[3]=""}else{if(ad[0]!==ad[2]&&ad[1]===ad[3]){ad[3]=""}}}}else{if(ad.length===3&&ad[0]===ad[2]&&ad[0]!==ad[1]){ad[2]=""}else{if(ad.length===2&&ab!==" "&&ad[0]===ad[1]){ad[1]=""}}}return ae[0]+":"+ad.join(" ").replace(/\s+/g," ").replace(/\s+$/,"")},G=function(ad){var ae=ad.substr(0,ad.indexOf(":")+1);if(ae==="radius:"||ae==="shadow:"||ad.charAt(ad.length-1)!=="0"||(ad.charAt(ad.length-1)==="0"&&ad.charAt(ad.length-2)!==" ")){return ad}return ae+"0"},L=function(ad){var ae=ad.indexOf(".");return ad.substr(0,ae)},F=function(ad){var ae=ad.charAt(0);if(ae==="#"||ae==="."||/[a-f0-9]/.test(ae)){return ad}return ae+"0"},C=function(ad){var ae=ad.indexOf(".");return ad.charAt(0)+ad.substr(ae,ad.length)},E=function(ad){return ad.replace(/%/,"% ")},W=function(ad){if(ad.indexOf("\n")>-1){return");!"}return ad},Z=function{var ad=z;if(P===M){return H}z=H;if(ad===H){ad=q.charAt(P);P+=1}if(ad>=" "||ad==="\n"){return ad}if(ad==="\r"){return"\n"}return" "},x=function{z=Z;return z},t=function{var ad=Z;if(ad==="/"&&(ac==="javascript"||(ac==="css"&&x!=="/"))){switch(x){case"/":for{ad=Z;if(ad<="\n"){return ad}}break;case"*":Z;for{switch(Z){case"'":ad=Z.replace(/'/,"");break;case'"':ad=Z.replace(/"/,"");break;case"*":if(x==="/"){Z;return" "}break;case H:K="Error: Unterminated block comment.";return K}}break;default:return ad}}return ad},p=function(ae){var ad=[];if(ae===1){ad.push(ab)}if(ae<3){ab=aa;if(ab==="'"||ab==='"'){if(ae===1&&(ad[0]===")"||ad[0]==="]")&&v){ab=";";return ad[0]}for{ad.push(ab);ab=Z;if(ab===aa){break}if(ab<="\n"){if(ac==="css"){K="Error: This does not appear to be CSS."}else{K="Error: This does not appear to be JavaScript."}return K}if(ab==="\\"){ad.push(ab);ab=Z}}}}aa=t;if(aa==="/"&&"(,=:[!&|".indexOf(ab)>-1&&ac!=="css"){ad.push(ab);ad.push(aa);for{ab=Z;if(ab==="/"){break}else{if(ab==="\\"){ad.push(ab);ab=Z}else{if(ab<="\n"){K="Error: unterminated JavaScript Regular Expression literal";return K}}}ad.push(ab)}aa=t}return ad.join("")},X=function{(function{var aj=0,ai=q.length,ak="";if(O!==true||(/^\s*\/\*/.test(q)!==true&&/^\s*\/\//.test(q)!==true)){return}for(aj=0;aj<ai;aj+=1){if(ak===""){if(q.charAt(aj)==="/"&&q.charAt(aj+1)&&(q.charAt(aj+1)==="*"||q.charAt(aj+1)==="/")){ak=q.substr(aj,2);n.push(q.charAt(aj))}else{if(/\s/.test(q.charAt(aj))!==true){return}}}else{n.push(q.charAt(aj));if(q.charAt(aj)==="*"&&ak==="/*"&&q.charAt(aj+1)&&q.charAt(aj+1)==="/"){n.push("/\n");if(q.charAt(aj+2)&&q.charAt(aj+2)==="\n"){aj+=2}else{aj+=1}ak=""}else{if((q.charAt(aj)==="\n"||q.charAt(aj)==="\r")&&ak==="//"){ak=""}}}}});var ag=[],af="",ae=0,ad=true,ah=false;if(K!==""){return K}ab="\n";ag.push(p(3));while(ab!==H){if(ab===" "&&!(ac==="css"&&aa==="#")){if(A(aa)){ag.push(p(1))}else{ag.push(p(2));if(v){af=ag[ag.length-1];if((A(af)||af==="'"||af==='"'||af==="]"||af===")")&&ab==="}"){ag.push(";")}}}}else{if(ab==="\n"){switch(aa){case"{":case"[":case"(":case"+":case"-":ag.push(p(1));break;case" ":ag.push(p(3));break;default:if(A(aa)){ag.push(p(1))}else{if(w===1&&aa!=="\n"){ag.push(p(1))}else{ag.push(p(2))}}}}else{switch(aa){case" ":if(A(ab)){ag.push(p(1));break}ag.push(p(3));break;case"\n":if(w===1&&ab!=="\n"){ag.push(p(1))}else{if(ab==="}"){ad=true;if(w===3){ag.push(p(3))}else{ag.push(p(1))}}else{if(A(ab)){ag.push(p(1));if(v){af=ag[ag.length-1];if(af===":"){ad=false}if(ad&&(A(af)||af==="]"||af===")")&&ab==="\n"&&(aa==="}"||aa===" ")){ag.push(";")}}}else{ag.push(p(3))}}}break;default:ag.push(p(1));if(v){af=ag[ag.length-1];if(af==="{"){ad=true}else{if(af.charAt(0)===":"){ad=false}else{if((ag[ag.length-3]+ag[ag.length-2]+ag[ag.length-1]==="if(")||(ag[ag.length-4]+ag[ag.length-3]+ag[ag.length-2]+ag[ag.length-1]==="for(")){ad=false;ah=true}else{if(ag[ag.length-1]==="("&&ag[ag.length-2]===""){ae=ag.length-2;do{ae-=1}while(ag[ae]==="");if((ag[ae-1]+ag[ae]+ag[ag.length-1]==="if(")||(ag[ae-2]+ag[ae-1]+ag[ae]+ag[ag.length-1]==="for(")){ad=false;ah=true}}}}}if(ad&&(((af==="]"||af===")")&&A(ab)&&ab!=="/")||(ab==="}"&&(A(af)||af==="'"||af==='"')))){ag.push(";")}if(ah&&af===")"){ad=true;ah=false}}break}}}}return ag.join("")};if(ac==="css"){R="-._\\"}else{if(y&&w===2){v=true;q=q.replace(/\r\n?/g,"\n").replace(/("|')\s+["'a-zA-Z_$]/g,B).replace(/\)\s+\!(?!\=)/g,W)}R="_$//"}if(ac==="css"&&y){q=u(q.replace(/; /g,";\n"))}V=Q+I+R;P=0;M=q.length;N=X(q);if(/\s/.test(N.charAt(0))){N=N.slice(1,N.length)}if(ac==="css"){N=N.replace(/\: #/g,":#").replace(/\; #/g,";#").replace(/\, #/g,",#").replace(/\s+/g," ").replace(/\} /g,"}").replace(/\{ /g,"{").replace(/\\\)/g,"~PDpar~").replace(/\)/g,") ").replace(/\) ;/g,");").replace(/\d%\.?[a-z0-9]/g,E);if(y){N=N.replace(/@charset("|')?[\w\-]+("|')?;?/gi,"").replace(/(#|\.)?[\w]*\{\}/gi,"").replace(/(\S|\s)0+/g,F).replace(/:[\w\s\!\.\-%]*\d+\.0*(?!\d)/g,L).replace(/(:| )0+\.\d+/g,C).replace(/\w+(\-\w+)*:((((\-?(\d*\.\d+)|\d+)[a-zA-Z]+)|0) )+(((\-?(\d*\.\d+)|\d+)[a-zA-Z]+)|0)/g,Y).replace(/\};/g,"}").replace(/^;/,"").replace(/ \}/g,"}");N=N.replace(/:\.?0(\%|px|in|cm|mm|em|ex|pt|pc)/g,":0").replace(/ \.?0(\%|px|in|cm|mm|em|ex|pt|pc)/g," 0").replace(/bottom:none/g,"bottom:0").replace(/top:none/g,"top:0").replace(/left:none/g,"left:0").replace(/right:none/,"right:0").replace(/:0 0 0 0/g,":0").replace(/:(\s*([0-9]+\.)?[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?)+\-([0-9]*\.)?[0-9]/g,D);N=N.replace(/[a-z]*:(0\s*)+\-?\.?\d?/g,G).replace(/ 0 0 0 0/g," 0").replace(/rgb\(\d+,\d+,\d+\)/g,S).replace(/background\-position:0;/gi,"background-position:0 0;").replace(/;+/g,";").replace(/\s*[\w\-]+:\s*\}/g,"}").replace(/\s*[\w\-]+:\s*;/g,"").replace(/;\}/g,"}").replace(/\{;/g,"{").replace(/\{\s+\}/g,"{}").replace(/\s+\)/g,")").replace(/\s+\,/g,",");if(s===null){s=[""]}else{if(s[0].charAt(s[0].length-1)!==";"){s[0]=s[0]+";"}}N=s[0].replace(/@charset/i,"@charset")+T(N).replace(/~PrettyDiffColon~/g,":").replace(/~PrettyDiffSemi~/g,";")}N=N.replace(/~PDpar~/g,"\\)")}else{if(v){N=N.replace(/(\s+)$/,"").replace(/((return)|(continue)|(break)|(throw))\s+/g,J).replace(/(\n+)!+(\+|\-)/g,";").replace(/\}\u003b(!=\))/g,"}").replace(/x{2}-->/g,"//-->");N=r(N);if(N.charAt(N.length-1)!==";"&&N.charAt(N.length-1)!=="}"){N=N+";"}}else{N=N.replace(/^\s+/,"").replace(/x{2}-->/g,"//-->")}}if(K!==""){return K}return n.join("")+N},k=function(v){var A=(typeof v.source!=="string"||v.source==="")?"Error: no source supplied to cleanCSS.":v.source,E=(typeof v.size!=="number"||v.size<0)?4:v.size,n=(typeof v.character!=="string")?" ":v.character,r=(v.comment==="noindent")?"noindent":"",p=(v.alter===true)?true:false,F=A.length,M=0,K=0,J=[],y=A.match(/\@charset\s+("|')[\w\-]+("|');?/gi),t="",B=Number(E),C=function(S){var O=0,N=[],R="",q=S.replace(/\\\)/g,"~PDpar~").split("url("),Q=q.length,P="";for(O=1;O<Q;O+=1){P='"';if(q[O].charAt(0)==='"'){P=""}else{if(q[O].charAt(0)==="'"){q[O]=q[O].substr(1,q[O].length-1)}}N=q[O].split(")");R=N[0];if(R.charAt(R.length-1)!=='"'&&R.charAt(R.length-1)!=="'"){R=R+'"'}else{if(R.charAt(R.length-1)==="'"||R.charAt(R.length-1)==='"'){R=R.substr(0,R.length-1)+'"'}}N[0]=R.replace(/\s*\/\s*/g,"/");q[O]="url("+P+N.join(")")}return q.join("").replace(/~PDpar~/g,"\\)")},I=function(q){var O=[],N=q.split(": ");if(N[0].indexOf("background")>-1||N.length>2){return q}O=N[1].split(" ");if(O.length===4){if(O[0]===O[1]&&O[1]===O[2]&&O[2]===O[3]){O[1]="";O[2]="";O[3]=""}else{if(O[0]===O[2]&&O[1]===O[3]&&O[0]!==O[1]){O[2]="";O[3]=""}else{if(O[0]!==O[2]&&O[1]===O[3]){O[3]=""}}}}else{if(O.length===3&&O[0]===O[2]&&O[0]!==O[1]){O[2]=""}else{if(O.length===2&&O[0]===O[1]){O[1]=""}}}return N[0]+": "+O.join(" ").replace(/\s+/g," ").replace(/\s+$/,"")},z=function(x){var q=x.indexOf(".");return x.substr(0,q)},w=function(x){var q=x.charAt(0);if(q==="#"||q==="."||/[a-f0-9]/.test(q)){return x}return q+"0;"},H=function(q){return q.replace(/ \./g," 0.")},L=function(N){var q=N.match(/^(\s*)/)[0],x=q.substr(0,q.length-t.length);if(N.charAt(N.length-1)==="}"){return x+"}"}return x.replace(/(\s+)$/,"")},G=function(q){return q.replace(/%/,"% ")},D=function(q){return q.replace(/\s*;\n/,"\n")},u=function{var P=0,N=0,q=A.length,O=[],R="",x=[t],Q=A.split("");for(P=0;P<q;P+=1){if("{"===Q[P]){O.push(t);R=O.join("");x.push(" {\n"+R)}else{if("\n"===Q[P]){x.push("\n"+R)}else{if("}"===Q[P]){x[x.length-1]=x[x.length-1].replace(/\s*$/,"");O=O.slice(0,O.length-1);R=O.join("");if(Q[P+1]+Q[P+2]!=="*/"){x.push("\n"+R+"}\n"+R)}else{x.push("\n"+R+"}")}}else{if(Q[P-1]===","&&(/\s/).test(Q[P])===false){x.push(" ");x.push(Q[P])}else{if(";"===Q[P]&&"}"!==Q[P+1]){x.push(";\n"+R)}else{if(P>3&&Q[P-3]==="u"&&Q[P-2]==="r"&&Q[P-1]==="l"&&Q[P]==="("){for(N=P;N<q;N+=1){x.push(Q[N]);if(Q[N]===")"&&Q[N-1]!=="\\"){P=N;break}}}else{x.push(Q[P])}}}}}}}if(P>=q){x=[x.join("").replace(/^(\s*)/,"").replace(/(\s*)$/,"")];A=x.join("");O=[]}},s=function(O){var ae=0,aa=0,Z=0,X=-1,S=0,R=0,P=0,Q="",ad=O.length,ac=[],ab=[],W=[],U=[],Y=false,V=function(af){var x=af.charAt(0),q=false;if(af.length===8||af.length===5){af=af.substr(1);q=true}af=af.toLowerCase;if(af.length===7&&af.charAt(1)===af.charAt(2)&&af.charAt(3)===af.charAt(4)&&af.charAt(5)===af.charAt(6)){af="#"+af.charAt(1)+af.charAt(3)+af.charAt(5)}if(x===":"){af=x+"PDpoundPD"+af}else{if(q&&!(/\s/).test(x)&&x!=="("){af=x+" "+af}else{if(q&&((/\s/).test(x)||x==="(")){af=x+af}}}return af},N=(/[\w\s:#\-\=\!\(\)"'\[\]\.%-\_\?\/\\]\/\*/),T=function(q){return q.replace(/\s*\/\*/,";/*")};(function{var ah=function(q){if(q.indexOf("\n")===-1){return q}return q.replace(/\s+/,";")},x=O.length,ai=[],ag=0,af="";for(ae=0;ae<x;ae+=1){ai.push(O.charAt(ae));if(O.charAt(ae)==="{"||O.charAt(ae+1)==="}"){if(ai[0]==="}"){ab.push("}");ai[0]=""}af=ai.join("");if(af.indexOf("{")>-1&&(af.indexOf("\n")>-1||af.indexOf(";")>-1)){ag=Math.max(af.lastIndexOf("\n"),af.lastIndexOf(";"));ab.push(af.substring(0,ag+1).replace(/(\w|\)|"|')\s+/g,ah));ab.push(af.substring(ag+1))}else{ab.push(af.replace(/(\w|\)|"|')\s+/g,ah))}ai=[]}}ab.push("}")});for(ad=ae-1;ad>0;ad-=1){if(O.charAt(ad)==="/"&&O.charAt(ad-1)&&O.charAt(ad-1)==="*"){for(aa=ad-1;aa>0;aa-=1){if(O.charAt(aa)==="/"&&O.charAt(aa+1)==="*"){ad=aa;break}}}else{if(!/[\}\s]/.test(O.charAt(ad))){break}}}(function{var al=0,ak=ab.length,aj=0,ah=0,ag=1,af=[],x=[],q=[],ai=false;for(al=0;al<ak;al+=1){if(ab[al]==="}"){ah-=1;if(ah===ag-1&&af.length>0){x=ab.slice(0,al);q=ab.slice(al,ab.length);ab=[].concat(x,af,q);af=[];al=x.length-1;ak=ab.length}}else{if(ab[al].indexOf("{")>-1){ah+=1;if(ah>ag){ai=true;ag=ah-1;af.push(ab[al]);ab[al]="";for(aj=al+1;aj<ak;aj+=1){af.push(ab[aj]);if(ab[aj].indexOf("{")>-1){ah+=1;ab[aj]=""}else{if(ab[aj]==="}"){ah-=1;ab[aj]="";if(ah===ag){break}}else{ab[aj]=""}}}}}}}if(ai){ak=ab.length;af=[];for(al=0;al<ak;al+=1){if(af.length>0&&af[af.length-1].indexOf("{")===-1&&ab[al]!=="}"&&ab[al].indexOf("{")===-1){af[af.length-1]=af[af.length-1]+ab[al]}else{if(ab[al]!==""){af.push(ab[al])}}}ab=[].concat(af)}});for(ae=ab.length-1;ae>0;ae-=1){if(ab[ae]==="}"){ad+=1}else{break}}ad=ab.length;for(ae=0;ae<ad;ae+=1){if(ab[ae].charAt(ab[ae].length-1)==="{"){ab[ae]=ab[ae].replace(/,\s*/g,",\n").replace(/>/g," > ")}else{if(ab[ae].indexOf("url(")>-1){W=ab[ae].split("");Z=W.length;for(aa=3;aa<Z;aa+=1){if(W[aa-3]==="u"&&W[aa-2]==="r"&&W[aa-1]==="l"&&W[aa]==="("){Y=true}if(Y){if(W[aa-1]!=="\\"&&W[aa]===")"){Y=false}else{if(W[aa]===";"){W[aa]="~PrettyDiffSemi~"}else{if(W[aa]===":"){W[aa]="~PrettyDiffColon~"}}}}}ab[ae]=W.join("")}if(ab[ae].charAt(ab[ae].length-1)===";"){ab[ae]=ab[ae].substr(0,ab[ae].length-1)}Q=ab[ae].replace(N,T);ac=Q.replace(/(\w|\W)?#[a-fA-F0-9]{3,6}(?!(\w*\)))/g,V).replace(/\*\//g,"*/;").replace(/:/g,"~PDCSEP~").split(";");Z=ac.length;W=[];U=[];for(aa=0;aa<Z;aa+=1){if(/^(\/\*)/.test(ac[aa])){W.push(ac[aa].replace(/\/\*\s*/,"/* "))}else{if(ac[aa]!==""){U.push(ac[aa].replace(/^\s*/,""))}}}U=U.sort;Z=U.length;ac=[];for(aa=0;aa<Z;aa+=1){if(U[aa].charAt(0)==="_"){U.push(U[aa]);U.splice(aa,1)}ac.push(U[aa].split("~PDCSEP~"))}ac=W.concat(ac);Z=ac.length;S=0;R=0;X=-1;for(aa=1;aa<Z;aa+=1){if(ac[aa].length>1&&ac[aa][0]===ac[aa-1][0]){ac[aa-1]=["",""]}}for(aa=0;aa<Z;aa+=1){if(ac[aa-1]&&ac[aa-1][0]===ac[aa][0]&&(/\-[a-z]/).test(ac[aa-1][1])===false&&(/\-[a-z]/).test(ac[aa][1])===false){ac[aa-1]=["",""]}if(ac[aa].length>1){ac[aa][1]=ac[aa][1].replace(/\//g," / ").replace(/\*/g,"* ")}if(ac[aa][0]!=="margin"&&ac[aa][0].indexOf("margin")!==-1){S+=1;if(S===4){U=[ac[aa][1]];P=aa;do{P-=1;if(ac[P].length>1&&ac[P][1]!==""){U.push(ac[P][1]);ac[P]=["",""]}}while(U.length<4&&P>0);ac[aa]=["margin",U[0]+" "+U[1]+" "+U[3]+" "+U[2]];S=0}}else{if(ac[aa][0]!=="padding"&&ac[aa][0].indexOf("padding")!==-1){R+=1;if(R===4){U=[ac[aa][1]];P=aa;do{P-=1;if(ac[P].length>1&&ac[P][1]!==""){U.push(ac[P][1]);ac[P]=["",""]}}while(U.length<4&&P>0);ac[aa]=["padding",U[0]+" "+U[1]+" "+U[3]+" "+U[2]];R=0}}}if(X===-1&&ac[aa+1]&&ac[aa][0].charAt(0)!=="-"&&(ac[aa][0].indexOf("cue")!==-1||ac[aa][0].indexOf("list-style")!==-1||ac[aa][0].indexOf("outline")!==-1||ac[aa][0].indexOf("overflow")!==-1||ac[aa][0].indexOf("pause")!==-1)&&(ac[aa][0]===ac[aa+1][0].substring(0,ac[aa+1][0].lastIndexOf("-"))||ac[aa][0].substring(0,ac[aa][0].lastIndexOf("-"))===ac[aa+1][0].substring(0,ac[aa+1][0].lastIndexOf("-")))){X=aa;if(ac[X][0].indexOf("-")!==-1&&ac[X][0]!=="list-style"){ac[X][0]=ac[X][0].substring(0,ac[X][0].lastIndexOf("-"))}}else{if(X!==-1&&ac[X][0]===ac[aa][0].substring(0,ac[aa][0].lastIndexOf("-"))){if(ac[X][0]==="cue"||ac[X][0]==="pause"){ac[X][1]=ac[aa][1]+" "+ac[X][1]}else{ac[X][1]=ac[X][1]+" "+ac[aa][1]}ac[aa]=["",""]}else{if(X!==-1){X=-1}}}}for(aa=0;aa<Z;aa+=1){if(ac[aa].length>1&&ac[aa][0]!==""){for(P=aa+1;P<Z;P+=1){if(ac[P].length>1&&ac[aa][0]===ac[P][0]){ac[aa]=["",""]}}}}W=[];for(aa=0;aa<Z;aa+=1){if(typeof ac[aa]!=="string"&&ac[aa]!==undefined&&ac[aa][0]!==""){W.push(ac[aa].join(": "))}else{if(typeof ac[aa]==="string"){W.push(ac[aa].replace(/~PDCSEP~/g,": "))}}}ab[ae]=(W.join(";")+";").replace(/^;/,"")}}return ab.join("").replace(/\*\/\s*;\s*/g,"*/\n").replace(/(\s*[\w\-]+:)$/g,"\n}").replace(/\s*;$/,"").replace(/PDpoundPD#/g,"#")};(function{var x,q=[];for(x=0;x<B;x+=1){q.push(n)}t=q.join("")});if("\n"===A.charAt(0)){A=A.substr(1)}(function{var O=A.split(""),q=O.length,x=0,N=false;for(x=1;x<q;x+=1){if(O[x]==="*"&&O[x-1]==="/"&&!N){N=true}else{if(N){if(O[x]===","){O[x]="~PrettyDiffComma~"}else{if(O[x]===";"){O[x]="~PrettyDiffSemi~"}else{if(O[x]==="/"&&O[x-1]==="*"){N=false}}}}}}A=O.join("")});A=A.replace(/[ \t\r\v\f]+/g," ").replace(/\n (?!\*)/g,"\n").replace(/\s?([;:{}+>])\s?/g,"$1").replace(/\{(\.*):(\.*)\}/g,"{$1: $2}").replace(/\b\*/g," *").replace(/\*\/\s?/g,"*/\n").replace(/\d%\.?\d/g,G);if(p===true){A=s(A)}u;if(p===true){J=A.split("*/");K=J.length;for(M=0;M<K;M+=1){if(J[M].search(/\s*\/\*/)!==0){J[M]=J[M].replace(/@charset\s*("|')?[\w\-]+("|')?;?\s*/gi,"").replace(/(\S|\s)0+(%|in|cm|mm|em|ex|pt|pc)?;/g,w).replace(/:[\w\s\!\.\-%]*\d+\.0*(?!\d)/g,z).replace(/:[\w\s\!\.\-%]* \.\d+/g,H).replace(/ \.?0((?=;)|(?= )|%|in|cm|mm|em|ex|pt|pc)/g," 0px");J[M]=J[M].replace(/\w+(\-\w+)*: ((((\-?(\d*\.\d+)|\d+)[a-zA-Z]+)|0) )+(((\-?(\d*\.\d+)|\d+)[a-zA-Z]+)|0)/g,I).replace(/background\-position: 0px;/g,"background-position: 0px 0px;").replace(/\s+\*\//g,"*/");J[M]=J[M].replace(/\s*[\w\-]+\:\s*(\}|;)/g,L).replace(/\{\s+\}/g,"{}").replace(/\}\s*;\s*\}/g,D).replace(/:\s+#/g,": #").replace(/(\s+;+\n)+/g,"\n")}}A=J.join("*/");if(y===null){y=[""]}else{if(y[0].charAt(y[0].length-1)!==";"){y[0]=y[0]+";\n"}else{y[0]=y[0]+"\n"}}A=y[0].replace(/@charset/i,"@charset")+C(A).replace(/~PrettyDiffColon~/g,":").replace(/~PrettyDiffSemi~/g,";").replace(/~PrettyDiffComma~/g,",")}if(r==="noindent"){A=A.replace(/\s+\/\*/g,"\n/*").replace(/\n\s+\*\//g,"\n*/")}(function{var U=0,T=[],S=A.split("\n"),R=S.length,Q=[],P=F.toString.replace(/\B(?=(\d{3})+(?!\d))/g,","),O=A.length.toString.replace(/\B(?=(\d{3})+(?!\d))/g,","),N=0,x="",q=0;for(U=0;U<R;U+=1){if(S[U].charAt(0)==="/"&&S[U].charAt(1)==="*"){for(U;U<R;U+=1){if(S[U].charAt(S[U].length-2)==="*"&&S[U].charAt(S[U].length-1)==="/"){break}}}else{if(S[U].indexOf("url")!==-1&&S[U].indexOf('url("")')===-1&&S[U].indexOf("url('')")===-1&&S[U].indexOf("url")===-1){T.push(S[U])}}}R=T.length;for(U=0;U<R;U+=1){T[U]=T[U].substr(T[U].indexOf('url("')+5,T[U].length);T[U]=T[U].substr(0,T[U].indexOf('")'))}for(U=0;U<R;U+=1){Q[U]=1;for(q=U+1;q<R;q+=1){if(T[U]===T[q]){Q[U]+=1;T[q]=""}}}for(U=0;U<R;U+=1){if(T[U]!==""){N+=1;Q[U]=Q[U]+"x";if(Q[U]==="1x"){Q[U]=" "+Q[U]+" "}T[U]="<li>"+Q[U]+" - "+T[U]+"</li>"}}if(R!==0){x=" List of HTTP requests: <ul>"+T.join("")+"</ul>"}j=" Total input size: "+P+" characters Total output size: "+O+" characters  Number of HTTP requests: "+N+" "+x});return A},e=function(al){(function{if(!al.source||typeof al.source!=="string"){al.source=""}else{al.source=al.source.replace(/var /g,"var prettydiffvar,")}if(al.insize===undefined||isNaN(al.insize)){al.insize=4}if(!al.inchar||al.inchar.length<1||typeof al.inchar!=="string"){al.inchar=" "}if(!al.inlevel||isNaN(al.inlevel)){al.inlevel=0}if(typeof al.preserve!=="boolean"){al.preserve=true}if(!al.preserve_max||isNaN(al.preserve_max)){al.preserve_max=0}if(!al.space||al.space!==true){al.space=false}if(!al.braces||typeof al.braces!=="boolean"){if(al.braces==="allman"){al.braces=true}else{al.braces=false}}if(!al.inarray||al.inarray!==true){al.inarray=false}if(!al.content||al.content!==true){al.content=false}if(!al.comments||typeof al.comments!=="boolean"){if(al.comments==="noindent"){al.comments=true}else{al.comments=false}}});var av=[0,0],au=[0,0],at=[0,0,0],ar=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],aq=[0,0,0,0,0],ap=[0,0],af=[0,0,0,0],aw=0,z=al.insize,r=al.source,H=al.source.length+1,aj=[],O=[],D="",ag="TK_START_EXPR",y="",ad="",x=-1,A="",I="",M="",Z="",G={previous_mode:"BLOCK",mode:"BLOCK",var_line:false,var_line_reindented:false,in_html_comment:false,if_line:false,in_case:false,eat_next_space:false,indentation_baseline:-1,indentation_level:al.inlevel||0},X=0,S=false,az=false,ax=false,E=false,ay=0,s=[G],aA="",an=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9","_","$"],v=["+","-","*","/","%","&","++","--","=","+=","-=","*=","/=","%=","==","===","!=","!==",">","<",">=","<=",">>","<<",">>>",">>>=",">>=","<<=","&&","&=","|","||","!","!!",",",":","?","^","^=","|=","::"],C=0,ae="",ak="",R=false,ai=false,aC=false,Y="",q=true,W=true,ah=false,Q=0,aB=false,ab=false,ac=function(n){return n==="[EXPRESSION]"||n==="[INDENTED-EXPRESSION]"},p=function(n){return n.replace(/^\s\s*|\s\s*$/,"")},N=function(t){var n=0;G.eat_next_space=false;if(al.inarray&&ac(G.mode)){return}t=(t===undefined)?true:t;G.if_line=false;if(!O.length){return}while(O[O.length-1]===" "||O[O.length-1]===aA){O.pop}if(O[O.length-1]!=="\n"||!t){aC=true;O.push("\n")}for(n=0;n<G.indentation_level;n+=1){O.push(aA)}if(G.var_line&&G.var_line_reindented){O.push(aA)}},T=function(n){var t=n.split(/\x0a|\x0d\x0a/),w=t.length,aD=0;N;O.push(t[0]);for(aD=1;aD<w;aD+=1){N;if((/\}|((\!|\=)\=)/).test(t[aD])||(/(|(\)\s*\{\s*))$/).test(t[aD])||((/^(\s*("|'))/).test(t[aD])&&(/(("|')\s*;?)$/).test(t[aD]))){O.push(t[aD])}else{O.push(" ");O.push(p(t[aD]))}}N},K=function(n){var w=0,t=n.length;for(w=0;w<t;w+=1){if(n.charAt(w)===" "){af[1]+=1}else{if(n.charAt(w)==="\t"){af[2]+=1}else{if(n.charAt(w)==="\n"){af[0]+=1}else{if(al.source.charAt(w)==="\r"||al.source.charAt(w)==="\f"||al.source.charAt(w)==="\v"){af[3]+=1}}}}}},F=function(n){n=(n===undefined)?false:n;while(O.length&&(O[O.length-1]===" "||O[O.length-1]===aA||(n&&(O[O.length-1]==="\n"||O[O.length-1]==="\r")))){O.pop}},J=function{var n=" ";if(G.eat_next_space){G.eat_next_space=false;return}if(O.length){n=O[O.length-1]}if(n!==" "&&n!=="\n"&&n!==aA){O.push(" ")}},V=function{aC=false;G.eat_next_space=false;O.push(D)},B=function(n){s.push(G);G={previous_mode:(G)?G.mode:"BLOCK",mode:n,var_line:false,var_line_reindented:false,in_html_comment:false,if_line:false,in_case:false,eat_next_space:false,indentation_baseline:-1,indentation_level:((G)?G.indentation_level+((G.var_line&&G.var_line_reindented)?1:0):al.inlevel)}},P=function(n){return n==="[EXPRESSION]"||n==="[INDENTED-EXPRESSION]"||n==="(EXPRESSION)"},u=function{R=(G.mode==="DO_BLOCK");if(s.length>0){G=s.pop}},aa=function(w,n){var t=0;for(t=0;t<n.length;t+=1){if(n[t]===w){return true}}return false},L=function{var n=0,w=0,t=0;for(n=O.length-1;n>=0;n-=1){if(O[n]===":"&&w===0){t+=1}else{if(O[n]==="?"&&w===0){if(t===0){return true}t-=1}else{if(O[n]==="{"||O[n]==="("||O[n]==="["){if(O[n]==="{"&&w===0){return false}w-=1}else{if(O[n]===")"||O[n]==="}"||O[n]==="]"){w+=1}}}}}},U=function{var n=0;for(n=O.length-2;n>0;n-=1){if(/^(\s+)$/.test(O[n])){O[n]=""}else{if(aa(O[n],v)){O[n+1]=" ";break}}}},ao=function(aD){var t=(aD.indexOf("}")-1),n="",w="";if(aD.charAt(0)==="\n"){n="\n";w=aD.substr(1,t)}else{w=aD.substr(0,t)}return n+w+"}\n"+w+"(function"},am=function{var aG="",w=0,aD="",aH=false,aI=false,aJ="",aF=false,n="",aE=false,t=0;if(C>=H){return["","TK_EOF"]}ai=false;aG=r.charAt(C);C+=1;aI=al.inarray&&ac(G.mode);if(aI){t=0;while(aG==="\n"||aG==="\r"||aG==="\t"||aG===" "){if(aG==="\n"){F;O.push("\n");aC=true;t=0}else{if(aG==="\t"){t+=4}else{if(aG!=="\r"){t+=1}}}if(C>=H){return["","TK_EOF"]}aG=r.charAt(C);C+=1}if(G.indentation_baseline===-1){G.indentation_baseline=t}if(aC){for(w=0;w<G.indentation_level+1;w+=1){O.push(aA)}if(G.indentation_baseline!==-1){for(w=0;w<t-G.indentation_baseline;w+=1){O.push(" ")}}}}else{(function{var aK=0;while(aG==="\n"||aG==="\r"||aG==="\t"||aG===" "){if(aG==="\n"){aK+=((al.preserve_max)?(aK<=al.preserve_max)?1:0:1)}if(C>=H){return["","TK_EOF"]}aG=r.charAt(C);C+=1}if(al.preserve){if(aK>1){for(w=0;w<aK;w+=1){N(w===0);aC=true}}}ai=aK>0});if(C>=H){return["","TK_EOF"]}}if(aa(aG,an)){if(C<H){while(aa(r.charAt(C),an)){aG+=r.charAt(C);C+=1;if(C===H){break}}}if(C!==H&&aG.match(/^\d+[Ee]$/)&&(r.charAt(C)==="-"||r.charAt(C)==="+")){return(function{var aK=[r.charAt(C)],aL=true;while(C<H){C+=1;if(r.charAt(C).match(/\d|\./)){if(r.charAt(C).match(/\./)){if(aL){aL=false}else{aK.push(" ")}}aK.push(r.charAt(C))}else{break}}aG+=aK.join("");return[aG,"TK_WORD"]})}if(aG==="in"){return[aG,"TK_OPERATOR"]}if(ai&&ag!=="TK_OPERATOR"&&!G.if_line&&(al.preserve||A!=="var")){N}return[aG,"TK_WORD"]}if(aG==="("||aG==="["){return[aG,"TK_START_EXPR"]}if(aG===")"||aG==="]"){return[aG,"TK_END_EXPR"]}if(aG==="{"){return[aG,"TK_START_BLOCK"]}if(aG==="}"){return[aG,"TK_END_BLOCK"]}if(aG===";"){return[aG,"TK_SEMICOLON"]}if(aG==="/"){aD="";aH=true;if(r.charAt(C)==="*"){C+=1;if(C<H){while(!(r.charAt(C)==="*"&&r.charAt(C+1)&&r.charAt(C+1)==="/")&&C<H){aG=r.charAt(C);aD+=aG;if(aG==="\x0d"||aG==="\x0a"){aH=false}C+=1;if(C>=H){break}}}C+=2;if(aH){return["/*"+aD+"*/","TK_INLINE_COMMENT"]}return["/*"+aD+"*/","TK_BLOCK_COMMENT"]}if(r.charAt(C)==="/"){aD=aG;while(r.charAt(C)!=="\r"&&r.charAt(C)!=="\n"){aD+=r.charAt(C);C+=1;if(C>=H){break}}C+=1;if(ai){N}return[aD,"TK_COMMENT"]}}if(aG==="'"||aG==='"'||(aG==="/"&&((ag==="TK_WORD"&&(A==="return"||A==="do"))||(ag==="TK_COMMENT"||ag==="TK_START_EXPR"||ag==="TK_START_BLOCK"||ag==="TK_END_BLOCK"||ag==="TK_OPERATOR"||ag==="TK_EQUALS"||ag==="TK_EOF"||ag==="TK_SEMICOLON")))){aJ=aG;aF=false;n=aG;if(C<H){if(aJ==="/"){aE=false;while(aF||aE||r.charAt(C)!==aJ){n+=r.charAt(C);if(!aF){aF=r.charAt(C)==="\\";if(r.charAt(C)==="["){aE=true}else{if(r.charAt(C)==="]"){aE=false}}}else{aF=false}C+=1;if(C>=H){return[n,"TK_STRING"]}}}else{while(aF||r.charAt(C)!==aJ){n+=r.charAt(C);if(!aF){aF=r.charAt(C)==="\\"}else{aF=false}C+=1;if(C>=H){return[n,"TK_STRING"]}}}}C+=1;n+=aJ;if(aJ==="/"){while(C<H&&aa(r.charAt(C),an)){n+=r.charAt(C);C+=1}}return[n,"TK_STRING"]}if(aG==="#"){if(C<H&&(r.charAt(C)==="0"||r.charAt(C)==="1"||r.charAt(C)==="2"||r.charAt(C)==="3"||r.charAt(C)==="4"||r.charAt(C)==="5"||r.charAt(C)==="6"||r.charAt(C)==="7"||r.charAt(C)==="8"||r.charAt(C)==="9")){return(function{var aK="#";do{aG=r.charAt(C);aK+=aG;C+=1}while(C<H&&aG!=="#"&&aG!=="=");if(aG!=="#"&&r.charAt(C)==="["&&r.charAt(C+1)==="]"){aK+="[]";C+=2}else{if(aG!=="#"&&r.charAt(C)==="{"&&r.charAt(C+1)==="}"){aK+="{}";C+=2}}return[aK,"TK_WORD"]})}}if(aG==="<"&&r.substring(C-1,C+3)===""){G.in_html_comment=false;C+=2;if(ai){N}return["-->","TK_COMMENT"]}if(aa(aG,v)){while(C<H&&aa(aG+r.charAt(C),v)){aG+=r.charAt(C);C+=1;if(C>=H){break}}if(aG==="="){return[aG,"TK_EQUALS"]}return[aG,"TK_OPERATOR"]}return[aG,"TK_UNKNOWN"]};if(al.source===""){return"Error: no source code supplied to js_beautify.js"}while(z>0){aA+=al.inchar;z-=1}C=0;while(true){aj=am(C);D=aj[0];ak=aj[1];if(ak==="TK_EOF"){break}else{if(ak==="TK_START_EXPR"){aq[4]+=1;ah=false;if(D==="["){Q+=1;if(ag==="TK_WORD"||A===")"){if(A==="continue"||A==="try"||A==="throw"||A==="return"||A==="var"||A==="if"||A==="switch"||A==="case"||A==="default"||A==="for"||A==="while"||A==="break"||A==="function"){J}B("(EXPRESSION)");V}else{if(G.mode==="[EXPRESSION]"||G.mode==="[INDENTED-EXPRESSION]"){if(I==="]"&&A===","){if(G.mode==="[EXPRESSION]"){G.mode="[INDENTED-EXPRESSION]";if(!al.inarray){G.indentation_level+=1}}B("[EXPRESSION]");if(!al.inarray){N}}else{if(A==="["||(A===","&&I==="}")){if(G.mode==="[EXPRESSION]"){G.mode="[INDENTED-EXPRESSION]";if(!al.inarray&&A==="["){G.indentation_level+=1}}B("[EXPRESSION]");if(!al.inarray){N}}else{if(G.var_line_reindented){B("[EXPRESSION]");G.var_line_reindented=true}else{B("[EXPRESSION]")}}}}else{if(G.var_line_reindented){B("[EXPRESSION]");G.var_line_reindented=true}else{B("[EXPRESSION]")}}}}else{if(G.var_line_reindented){B("(EXPRESSION)");G.var_line_reindented=true}else{B("(EXPRESSION)")}}if(D!=="["||(D==="["&&(ag!=="TK_WORD"&&A!==")"))){if(A===";"||ag==="TK_START_BLOCK"){N}else{if(ag!=="TK_END_EXPR"&&ag!=="TK_START_EXPR"&&ag!=="TK_END_BLOCK"&&A!=="."){if((ag!=="TK_WORD"&&ag!=="TK_OPERATOR")||(M==="function"&&al.space)){J}else{if(A==="continue"||A==="try"||A==="throw"||A==="return"||A==="var"||A==="if"||A==="switch"||A==="case"||A==="default"||A==="for"||A==="while"||A==="break"||A==="function"||A==="catch"){J}}}}V}if(E&&D==="("){ay+=1}}else{if(ak==="TK_END_EXPR"){aq[4]+=1;if(I==="}"){ah=true}if(ab&&D==="]"){G.indentation_level-=3;s[s.length-1].indentation_level=G.indentation_level-1;if(G.var_line_reindented){B("[INDENTED-EXPRESSION]");G.var_line_reindented=true}else{B("[INDENTED-EXPRESSION]")}ab=false}if(D==="]"&&(al.inarray||aB)){if(A==="}"&&I!=="{"){if(O.length&&O[O.length-1]===aA){O.pop}V;u}else{V}}else{if(D==="]"&&(A==="}"||(G.mode==="[INDENTED-EXPRESSION]"&&A==="]"))){if(A==="}"&&Q===0){G.indentation_level-=1;if(G.var_line_reindented){B("[INDENTED-EXPRESSION]");G.var_line_reindented=true}else{B("[INDENTED-EXPRESSION]")}}else{u}V}else{u;V}}if(E&&D===")"){ay-=1;if(ay===0){E=false}}if(D==="]"){Q-=1;if(Q===0){aB=false;ab=false}}}else{if(ak==="TK_START_BLOCK"){aq[4]+=1;ah=false;if(A==="["){if(!aB){G.indentation_level+=1}aB=true}if(M==="do"){B("DO_BLOCK")}else{if(G.var_line_reindented){B("BLOCK");G.var_line_reindented=true}else{B("BLOCK")}}if(ad==="TK_START_BLOCK"&&!isNaN(x)){x+=1}if(al.braces){if(ag!=="TK_OPERATOR"){if(A==="return"){J}else{N}}}else{if(X>1){G.indentation_level+=1;S=true;ax=true}if(ag!=="TK_OPERATOR"&&ag!=="TK_START_EXPR"){G.indentation_level+=1;if(ag==="TK_START_BLOCK"){N}else{J}}else{if(Q>0){if(!aB&&!ab){if(A===":"){G.indentation_level+=1}else{G.indentation_level+=3}}else{if(ab&&A===","){G.indentation_level+=1}}if(A===","&&O[O.length-1]===aA){do{O.pop}while(O[O.length-1]!==",");J}if(G.var_line_reindented){B("BLOCK");G.var_line_reindented=true}else{B("BLOCK")}aB=true}else{G.indentation_level+=1}}}V;E=false;ay=0}else{if(ak==="TK_END_BLOCK"){aq[4]+=1;if(A==="{"&&(I===","||I==="[")){O[O.length-1]="";if(I==="["){N}O.push("{");V}else{if(!aB){u}else{G.indentation_level-=1;s[s.length-1].indentation_level=G.indentation_level-1;if(G.var_line_reindented){B("TK_END_BLOCK");G.var_line_reindented=true}else{B("TK_END_BLOCK")}aB=false;ab=true}X=0;if(S){ah=true}else{ah=false}if(x===0){x="x"}else{if(x===-1&&S&&ax){G.var_line_reindented=true}else{if(ad==="TK_START_BLOCK"&&!isNaN(x)){x-=1}else{if(x==="a"){if(G.var_line&&!G.var_line_reindented){G.var_line_reindented=true;x=-1}}}}}if(al.braces){if(A==="{"&&aa(I,v)){U}else{if(x==="y"){ad="";x="a"}N;if(x==="x"){if(G.var_line&&!ax&&!S){G.var_line_reindented=true}x="y"}}V}else{if(ag==="TK_START_BLOCK"){if(aC){if(O.length&&O[O.length-1]===aA){O.pop}}else{F}}else{if(ac(G.mode)&&al.inarray){al.inarray=false;N;al.inarray=true}else{if(x==="y"){ad="";x="a"}N;if(x==="x"){if(G.var_line&&!ax&&!S){G.var_line_reindented=true}x="y"}}}if(!ax&&S&&!G.var_line_reindented){if((G.mode==="(EXPRESSION)"&&!G.var_line)||(G.mode==="BLOCK"&&G.var_line)){if(A!=="}"&&x===-1&&G.mode==="(EXPRESSION)"){O.push(aA)}S=false}}V}if(!aB&&G.var_line_reindented&&Q===0&&I==="]"&&G.indentation_level===1){G.indentation_level=0}}}else{if(ak==="TK_WORD"){if(D==="alert"){ar[0]+=1}else{if(D==="break"){ar[2]+=1}else{if(D==="case"){ar[4]+=1}else{if(D==="catch"){ar[48]+=1}else{if(D==="continue"){ar[6]+=1}else{if(D==="default"){ar[8]+=1}else{if(D==="delete"){ar[10]+=1}else{if(D==="do"){ar[12]+=1}else{if(D==="document"){ar[44]+=1}else{if(D==="else"){ar[14]+=1}else{if(D==="eval"){ar[16]+=1}else{if(D==="for"){ar[18]+=1}else{if(D==="function"){ar[20]+=1}else{if(D==="if"){ar[22]+=1}else{if(D==="in"){ar[24]+=1}else{if(D==="label"){ar[26]+=1}else{if(D==="new"){ar[28]+=1}else{if(D==="return"){ar[30]+=1}else{if(D==="switch"){ar[32]+=1}else{if(D==="this"){ar[34]+=1}else{if(D==="throw"){ar[50]+=1}else{if(D==="try"){ar[52]+=1}else{if(D==="typeof"){ar[36]+=1}else{if(D==="var"){ar[38]+=1}else{if(D==="while"){ar[40]+=1}else{if(D==="with"){ar[42]+=1}else{if(D==="window"){ar[46]+=1}else{if(D!=="prettydiffvar"){ap[0]+=1;ap[1]+=D.length}}}}}}}}}}}}}}}}}}}}}}}}}}}}if(D!=="var"&&A===";"){ax=false}if(A===";"&&I==="}"&&x==="y"){G.indentation_level-=1}if(A==="{"&&((I===":"&&ax)||(I===")"&&y==="TK_START_BLOCK"&&!ax))){O.push(aA);G.indentation_level+=1;if(D!=="var"&&!isNaN(x)){x+=1}}if(R){J;V;J;R=false}else{if(D==="do"){N;V}else{if(D==="case"||D==="default"){if(A===":"){if(O.length&&O[O.length-1]===aA){O.pop}}else{G.indentation_level-=1;N;G.indentation_level+=1}V;G.in_case=true}else{if(D==="function"){if(ax&&(G.var_line||(!G.var_line&&Z==="var"))){X+=1}else{if(!ax){X-=1}}if(ax&&G.var_line&&Z==="var"&&!S&&X===0){G.var_line_reindented=true}}ae="NONE";if(ag==="TK_END_BLOCK"){if(al.braces||(D!=="else"&&D!=="catch"&&D!=="finally")){ae="NEWLINE"}else{ae="SPACE";J}}else{if(ag==="TK_STRING"||ag==="TK_START_BLOCK"||(ag==="TK_SEMICOLON"&&(G.mode==="BLOCK"||G.mode==="DO_BLOCK"))){ae="NEWLINE"}else{if(ag==="TK_WORD"||(ag==="TK_SEMICOLON"&&P(G.mode))){ae="SPACE"}else{if(ag==="TK_END_EXPR"){J;ae="NEWLINE"}}}}if(G.if_line&&ag==="TK_END_EXPR"){G.if_line=false}if(D==="else"||D==="catch"||D==="finally"){if(ag!=="TK_END_BLOCK"||al.braces){N}else{F(true);J}}else{if(ag!=="TK_START_EXPR"&&A!=="="&&A!==","&&(D==="continue"||D==="try"||D==="throw"||D==="return"||D==="var"||D==="if"||D==="switch"||D==="case"||D==="default"||D==="for"||D==="while"||D==="break"||D==="function"||ae==="NEWLINE")){if(A==="return"||A==="throw"||(ag!=="TK_END_EXPR"&&A!==":"&&(ag!=="TK_START_EXPR"||D!=="var"))){if((D==="if"&&M==="else"&&A!=="{")||(D==="function"&&(ag==="TK_OPERATOR"||A==="return"))){J}else{N}}else{if(A!==")"&&A!==":"&&(D==="continue"||D==="try"||D==="throw"||D==="return"||D==="var"||D==="if"||D==="switch"||D==="case"||D==="default"||D==="for"||D==="while"||D==="break"||D==="function")){N}}}else{if(ae==="SPACE"||(E&&A===";")){J}else{if(A===";"||(ac(G.mode)&&A===","&&I==="}")){N}}}}if(D==="var"){if(!S&&ag==="TK_START_BLOCK"&&ax){if(X>=0){S=true}}else{if(ag==="TK_START_BLOCK"){if(y==="TK_START_BLOCK"){if(ag==="TK_START_BLOCK"){y="";ad="TK_START_BLOCK";x=0}}else{y="TK_START_BLOCK"}}else{if(ag==="TK_START_BLOCK"&&y===""){y="TK_START_BLOCK"}}}G.var_line=true;G.var_line_reindented=false;ax=true}V;if(D==="typeof"){J}if(D==="if"){G.if_line=true}if(D==="else"){G.if_line=false}if(D==="for"){E=true}}}Z=M;M=D}}else{if(ak==="TK_SEMICOLON"){aq[3]+=1;if(A==="}"){ax=true}V;G.var_line=false;G.var_line_reindented=false;if(X<2){S=false}y=""}else{if(ak==="TK_STRING"){at[0]+=1;if((D.charAt(0)==='"'&&D.charAt(D.length-1)==='"')||(D.charAt(0)==="'"&&D.charAt(D.length-1)==="'")){at[1]+=D.length-2;at[2]+=2}else{at[1]+=D.length}K(D);if(ag==="TK_START_BLOCK"||ag==="TK_END_BLOCK"||ag==="TK_SEMICOLON"){N}else{if(ag==="TK_WORD"){J}}if(al.content){O.push(D.charAt(0)+"text"+D.charAt(0))}else{V}}else{if(ak==="TK_EQUALS"){aq[0]+=1;aq[1]+=1;J;V;J}else{if(ak==="TK_OPERATOR"){if(D!==","){aq[0]+=1;aq[1]+=D.length}y="";if(D===","){if(x==="y"&&ag!=="TK_END_BLOCK"){G.indentation_level-=1}if(az){az=false;if(A==="}"){G.var_line_reindented=true}}if(A==="}"&&I==="{"&&Z==="var"&&G.var_line){az=true;G.var_line_reindented=true}aq[2]+=1;if(G.mode!=="(EXPRESSION)"&&I!==":"){ax=false}if(G.var_line&&G.mode!=="(EXPRESSION)"){G.var_line_reindented=true;V;if(M!=="prettydiffvar"){N}}else{if(ag==="TK_END_BLOCK"&&G.mode!=="(EXPRESSION)"){V;if(A==="}"&&(Q===0||aB)){N}else{J}}else{if(G.mode!=="(EXPRESSION)"&&(Q===0||(aB&&(G.mode==="BLOCK"||G.mode==="TK_END_BLOCK"||G.mode==="OBJECT"||L)))){V;N}else{V;J}}}}else{if(A==="return"||A==="throw"){J;V}else{if(D==="::"){V}else{if(D==="--"||D==="++"||D==="!"||((D==="-"||D==="+")&&(ag==="TK_START_BLOCK"||ag==="TK_START_EXPR"||ag==="TK_EQUALS"||ag==="TK_OPERATOR"||A==="continue"||A==="try"||A==="throw"||A==="return"||A==="var"||A==="if"||A==="switch"||A==="case"||A==="default"||A==="for"||A==="while"||A==="break"||A==="function"))){q=false;W=false;if(A===";"&&P(G.mode)){q=true}if(ag==="TK_WORD"&&(A==="continue"||A==="try"||A==="throw"||A==="return"||A==="var"||A==="if"||A==="switch"||A==="case"||A==="default"||A==="for"||A==="while"||A==="break"||A==="function")){q=true}if(G.mode==="BLOCK"&&(A==="{"||A===";")){N}}else{if(D==="."){q=false}}}}}if(D!==","&&D!==":"&&(D!=="-"||(D==="-"&&A!=="continue"&&A!=="try"&&A!=="throw"&&A!=="return"&&A!=="var"&&A!=="if"&&A!=="switch"&&A!=="case"&&A!=="default"&&A!=="for"&&A!=="while"&&A!=="break"&&A!=="function"))){if(q){J}V;if(W){J}}else{if(D===":"){if(G.in_case){V;N;G.in_case=false}else{if(L){J;V;J;G.mode="OBJECT"}else{if(G.in_case){J;V;J}else{if(I!=="case"&&I!=="default"&&A!=="case"&&A!=="default"){V;J}}}}}}q=true;W=true}else{if(ak==="TK_BLOCK_COMMENT"){av[0]+=1;av[1]+=D.length;K(D);if(al.comments){for(aw=O.length-1;aw>0;aw-=1){if(O[aw]===aA||O[aw]===" "){O[aw]=""}else{break}}O.push("\n");V;O.push("\n")}else{T(D)}}else{if(ak==="TK_INLINE_COMMENT"){av[0]+=1;av[1]+=D.length;K(D);V;if(P(G.mode)){J}else{if(al.comments){O.push("\n")}else{N}}}else{if(ak==="TK_COMMENT"){au[0]+=1;au[1]+=D.length;K(D);if(al.comments){for(aw=O.length-1;aw>0;aw-=1){if(O[aw]===aA){O[aw]=""}else{break}}}else{if(ai){N}else{J}}V;N}else{if(ak==="TK_UNKNOWN"){aq[0]+=1;aq[1]+=D.length;K(D);if(A==="return"||A==="throw"){J}V}}}}}}}}}}}}}}I=A;ag=ak;A=D}Y=O.join("").replace(/var prettydiffvar\,\s*/g,"var ").replace(/^(\s+)/,"").replace(/(\s+)$/,"").replace(/\s*\}\(function/g,ao).replace(/\n( |\t)+\n/g,"\n\n").replace(/ \n/g,"\n");(function{var aM=0,aL=0,aH=1,aG=1,aF=0,aE=0,aD=0,t=0,n=[],aK=[],w,aI=function(aN,aO){if(aO===0){return"0.00%"}return((aN/aO)*100).toFixed(2)+"%"},aJ=function(aP,aN,aS,aR,aQ){var aO=["  Keyword '"];aO.push(aP);aO.push("' <td ");aO.push(aN);aO.push(">");aO.push(aS);aO.push("  ");aO.push(aI(aS,ar[54]));aO.push("  ");aO.push(aI(aS,aQ[0]));aO.push("  ");aO.push(aR);aO.push("  ");aO.push(aI(aR,ar[55]));aO.push("  ");aO.push(aI(aR,aQ[1]));aO.push("  ");return aO.join("")};if(Y.length<=H){aL=H}else{aL=Y.length}for(aM=0;aM<aL;aM+=1){if(al.source.charAt(aM)===" "){aF+=1}else{if(al.source.charAt(aM)==="\t"){aE+=1}else{if(al.source.charAt(aM)==="\n"){aH+=1}else{if(al.source.charAt(aM)==="\r"||al.source.charAt(aM)==="\f"||al.source.charAt(aM)==="\v"){t+=1}}}}if(Y.charAt(aM)==="\n"){aG+=1}}if(ar[0]>0){n[0]=" class='bad'"}else{n[0]=""}if(ar[6]>0){n[1]=" class='bad'"}else{n[1]=""}if(ar[16]>0){n[2]=" class='bad'"}else{n[2]=""}if(ar[42]>0){n[3]=" class='bad'"}else{n[3]=""}aF=aF-af[1];aE=aE-af[2];t=t-af[3];aD=((aH-1-af[0])+aF+aE+t);aq.push(at[2]+aq[0]+aq[2]+aq[3]+aq[4]);aq.push(at[2]+aq[1]+aq[2]+aq[3]+aq[4]);av.push(av[0]+au[0]);av.push(av[1]+au[1]);ar[1]=ar[0]*5;ar[3]=ar[2]*5;ar[5]=ar[4]*4;ar[7]=ar[6]*8;ar[9]=ar[8]*7;ar[11]=ar[10]*6;ar[13]=ar[12]*2;ar[15]=ar[14]*4;ar[17]=ar[16]*4;ar[19]=ar[18]*3;ar[21]=ar[20]*8;ar[23]=ar[22]*2;ar[25]=ar[24]*2;ar[27]=ar[26]*5;ar[29]=ar[28]*3;ar[31]=ar[30]*6;ar[33]=ar[32]*6;ar[35]=ar[34]*4;ar[37]=ar[36]*6;ar[39]=ar[38]*3;ar[41]=ar[40]*5;ar[43]=ar[42]*4;ar[45]=ar[44]*8;ar[47]=ar[46]*6;ar[49]=ar[48]*5;ar[51]=ar[50]*5;ar[53]=ar[52]*3;ar[54]=ar[0]+ar[2]+ar[4]+ar[6]+ar[8]+ar[10]+ar[12]+ar[14]+ar[16]+ar[18]+ar[20]+ar[22]+ar[24]+ar[26]+ar[28]+ar[30]+ar[32]+ar[34]+ar[36]+ar[38]+ar[40]+ar[42]+ar[44]+ar[46]+ar[48]+ar[50]+ar[52];ar[55]=ar[1]+ar[3]+ar[5]+ar[7]+ar[9]+ar[11]+ar[13]+ar[15]+ar[17]+ar[19]+ar[21]+ar[23]+ar[25]+ar[27]+ar[29]+ar[31]+ar[33]+ar[35]+ar[37]+ar[39]+ar[41]+ar[43]+ar[45]+ar[47]+ar[49]+ar[51]+ar[53];aK.push(av[2]+at[0]+aq[5]+ar[54]+ap[0]+aD);aK.push(av[3]+at[1]+aq[6]+ar[55]+ap[1]+aD);w=[" "];w.push(" ");w.push(" ");j=w.join("")});return Y},g=function(u){var r=0,y=(typeof u.source==="string")?u.source.split(""):"Error: no content supplied to markup.",s=(u.comments!=="comments"&&u.comments!=="beautify"&&u.comments!=="diff")?"":u.comments,z=(u.presume_html===true)?true:false,q=(u.top_comments===true)?true:false,p=function{var x=0,B=[],A=y.length;for(x=r;x<A;x+=1){if(y[x]===">"){break}else{B.push(y[x]);y[x]=""}}r=x;y[r]=B.join("").replace(/\s+/g," ").replace(/\s*,\s+/g,", ").replace(/\s*\/\s*/g,"/").replace(/\s*=\s*/g,"=").replace(/ \="/g,'="').replace(/ \='/g,"='")+">"},n=function{var A=y.length,x=0,B=[];for(x=r;x<A;x+=1){if(y[x]==="-"&&y[x+1]==="-"&&y[x+2]===">"){y[x]="";y[x+1]="";y[x+2]="";r=x+2;break}else{if(s==="beautify"||s==="comments"){B.push(y[x])}y[x]=""}}if(s==="comments"||s==="beautify"){y[r]=" "+B.join("")+"-->"}},v=function(N){var M=0,L=[],K=0,I="",G="",F="</"+N,D="",A=y.length,x=(/^(\s*\/+<!\[+[A-Z]+\[+)/),E=(/(\/+\]+>\s*)$/),C=(/^(\s*<\!\-\-)/),H=(/(\/+\-\->\s*)$/),J="",B="",O=u.source;if(typeof c!=="function"){return}for(M=r;M<A;M+=1){if((O.slice(M,M+F.length)).toLowerCase===F){K=M;break}}for(M=r;M<K;M+=1){if(y[M-1]!==">"){L.push(y[M]);y[M]=""}else{break}}D=L[0];L.splice(0,1);if((/\s/).test(L[0])){L.splice(0,1)}for(K;K<A;K+=1){if(y[K]!==">"){G=G+y[K];y[K]=""}else{break}}G=G+">";r=K;if(L.join("")===""){y[r]=D+G;return}I=L.join("");if(s!=="beautify"){if(x.test(I)){J=I.match(x)[0];I=I.replace(x,"")}else{if(C.test(I)){J=I.match(C)[0];I=I.replace(C,"")}}if(E.test(I)){B=I.match(E)[0];I=I.replace(E,"")}else{if(H.test(I)){B=I.match(H)[0];I=I.replace(H,"")}}if(N==="style"){I=J+c({source:I,level:3,type:"css",alter:true,fcomment:q})+B}else{I=J+c({source:I,level:2,type:"javascript",alter:true,fcomment:q})+B}}A=I.length;for(M=0;M<A;M+=1){if((/\s/).test(I.charAt(M))){I=I.substr(M+1)}else{break}}y[r]=D+I+G},w=function(B){var C=y.length,A=0,x=[],D=0;for(D=r;D<C;D+=1){if(y[D-1]+y[D]===B){break}}for(A=r;A<D;A+=1){x.push(y[A]);y[A]=""}y[r]=x.join("");r=D},t=function{var B=y.length,A=0,x=[];for(A=r;A<B;A+=1){if(y[A]==="<"){break}else{x.push(y[A]);y[A]=""}}r=A-1;y[r]=x.join("").replace(/\s+/g," ")};(function{var A=[],x=0,D=y.length,B="",C=u.source;for(r=0;r<y.length;r+=1){if((C.slice(r,r+7)).toLowerCase==="<script"){A=[];for(x=r+8;x<D;x+=1){if(C.charAt(x)===">"){break}A.push(C.charAt(x))}B=A.join("").toLowerCase.replace(/'/g,'"');if(s!=="beautify"&&s!=="diff"){p}if(B.indexOf('type="')===-1||B.indexOf('type="text/javascript"')!==-1||B.indexOf('type="application/javascript"')!==-1||B.indexOf('type="application/x-javascript"')!==-1||B.indexOf('type="text/ecmascript"')!==-1||B.indexOf('type="application/ecmascript"')!==-1){v("script")}}else{if((C.slice(r,r+6)).toLowerCase==="<style"){A=[];for(x=r+7;x<D;x+=1){if(C.charAt(x)===">"){break}A.push(C.charAt(x))}B=A.join("").toLowerCase.replace(/'/g,'"');if(s!=="beautify"&&s!=="diff"){p}if(B.indexOf('type="')===-1||B.indexOf('type="text/css"')!==-1){v("style")}}else{if(C.slice(r,r+4)==="\s+/g,"--> ").replace(/\s+<\?php/g," <?php").replace(/\s+<%/g," <%").replace(/\s*>\s+/g,"> ").replace(/\s+<\s*/g," <").replace(/\s+\/>/g,"/>").replace(/\s+>/g,">");if((/\s/).test(C.charAt(0))){C=C.slice(1,C.length)}return C})},l=function(q){(function{if(!q.source||typeof q.source!=="string"){q.source=""}if(q.insize===undefined||isNaN(q.insize)){q.insize=4}if(typeof q.inchar!=="string"||q.inchar.length<1){q.inchar=" "}if(!q.mode||q.mode!=="diff"){q.mode="beautify"}if(!q.comments||q.comments!=="indent"){q.comments="noindent"}if(!q.style||q.style!=="indent"){q.style="noindent"}if(typeof q.html!=="boolean"){q.html=false}if(typeof q.content!=="boolean"){q.content=false}if(typeof q.force_indent!=="boolean"){q.force_indent=false}});var r=[],u=[],t=[],v=[],p=[],s=[],n=q.source;(function{var x=function(z){z=z.replace(/</g,"\nprettydiffcdatas");return z},w=function(z){z=z.replace(/>/g,"\nprettydiffcdatae");return z};n=n.replace(/\/+<!\[+[A-Z]+\[+/g,x).replace(/\/+\]+>/g,w)});(function{var w=(function{var M=0,L=0,K=q.source.length,J=[],I=0,H=-1,G=0,F=0,E=-1,D=0,C=0,B=false,A=false,z=0,y=[">"],x=false,N=0;for(M=0;M<K;M+=1){if(n.substr(M,7).toLowerCase==="<script"){for(L=M+7;L<K;L+=1){if(n.charAt(L)+n.charAt(L+1)+n.charAt(L+2).toLowerCase+n.charAt(L+3).toLowerCase+n.charAt(L+4).toLowerCase+n.charAt(L+5).toLowerCase+n.charAt(L+6).toLowerCase+n.charAt(L+7).toLowerCase+n.charAt(L+8)==="<\/script>"){if(/></.test(n.substr(M,L))){H+=2}else{H+=3}M=L+8;break}}}else{if(n.substr(M,6).toLowerCase==="<style"){for(L=M+6;L<K;L+=1){if(n.charAt(L)+n.charAt(L+1)+n.charAt(L+2).toLowerCase+n.charAt(L+3).toLowerCase+n.charAt(L+4).toLowerCase+n.charAt(L+5).toLowerCase+n.charAt(L+6).toLowerCase+n.charAt(L+7)===" "){if(/></.test(n.substr(M,L))){H+=2}else{H+=3}M=L+7;break}}}else{if(n.substr(M,5)==="<?php"){for(L=M+5;L<K;L+=1){if(n.charAt(L-1)==="?"&&n.charAt(L)===">"){M=L;H+=1;break}}}else{if(n.charAt(M)==="<"&&n.charAt(M+1)==="%"){for(L=M+2;L<K;L+=1){if(n.charAt(L-1)==="%"&&n.charAt(L)===">"){M=L;H+=1;break}}}else{if(n.charAt(M)==="<"&&n.charAt(M+1)==="!"&&n.charAt(M+2)==="["){for(L=M+2;L<K;L+=1){if(n.charAt(L-1)==="]"&&n.charAt(L)===">"){M=L;H+=1;break}}}else{if(n.charAt(M)==="<"&&n.charAt(M+1)==="!"&&/[A-Z]|\[/.test(n.charAt(M+2))){for(L=M+3;L<K;L+=1){if(n.charAt(L)==="<"&&K>L+3&&n.charAt(L+1)==="!"&&n.charAt(L+2)==="-"&&n.charAt(L+3)==="-"){for(N=L+4;N<K;N+=1){if(n.charAt(N-2)==="-"&&n.charAt(N-1)==="-"&&n.charAt(N)===">"){L=N;break}}}else{if(n.charAt(L)===">"&&y[y.length-1]===">"&&y.length===1){H+=1;if(x){J.push([M,L,H,M])}x=false;M=L;y=[">"];break}else{if(n.charAt(L)==="<"){y.push(">");x=true}else{if(n.charAt(L)===">"&&y.length>1){y.pop;x=true}else{if(n.charAt(L)==="["){y.push("]")}else{if(n.charAt(L)==="]"){y.pop}else{if(n.charAt(L)==='"'){if(y[y.length-1]==='"'){y.pop}else{y.push('"')}}else{if(n.charAt(L)==="'"){if(y[y.length-1]==="'"){y.pop}else{y.push("'")}}}}}}}}}}}else{if(n.charAt(M)===n.charAt(M+1)&&(n.charAt(M)==='"'||n.charAt(M)==="'")){M+=1}else{if(n.charAt(M-1)==="="&&(n.charAt(M)==='"'||n.charAt(M)==="'")){A=false;for(C=M-1;C>0;C-=1){if((n.charAt(C)==='"'&&n.charAt(M)==='"')||(n.charAt(C)==="'"&&n.charAt(M)==="'")||n.charAt(C)==="<"){break}else{if(n.charAt(C)===">"){A=true;break}}}if(!A){B=false;for(L=M+1;L<K;L+=1){if(n.substr(L,7).toLowerCase==="<script"){for(z=L+7;z<K;z+=1){if(n.charAt(z)+n.charAt(z+1)+n.charAt(z+2).toLowerCase+n.charAt(z+3).toLowerCase+n.charAt(z+4).toLowerCase+n.charAt(z+5).toLowerCase+n.charAt(z+6).toLowerCase+n.charAt(z+7).toLowerCase+n.charAt(z+8)==="<\/script>"){L=z+8;break}}}else{if(n.substr(L,6).toLowerCase==="<style"){for(z=L+6;z<K;z+=1){if(n.charAt(z)+n.charAt(z+1)+n.charAt(z+2).toLowerCase+n.charAt(z+3).toLowerCase+n.charAt(z+4).toLowerCase+n.charAt(z+5).toLowerCase+n.charAt(z+6).toLowerCase+n.charAt(z+7)===" "){L=z+7;break}}}else{if(n.substr(L,5)==="<?php"){for(z=L+5;z<K;z+=1){if(n.charAt(z-1)==="?"&&n.charAt(z)===">"){L=z;break}}}else{if(n.charAt(L)==="<"&&n.charAt(L+1)==="%"){for(z=L+5;z<K;z+=1){if(n.charAt(z-1)==="%"&&n.charAt(z)===">"){L=z;break}}}else{if(n.charAt(L)===">"||n.charAt(L)==="<"){B=true}else{if((n.charAt(L-1)!=="\\"&&((n.charAt(M)==='"'&&n.charAt(L)==='"')||(n.charAt(M)==="'"&&n.charAt(L)==="'")))||L===K-1){if(E!==H&&D===1){D=0;H-=1;E-=1}else{if(E===H){for(I=G+1;I>M;I+=1){if(!/\s/.test(n.charAt(I))){break}}F=I;if(G<M&&D!==1){D=1;H+=1;E+=1}}}if(B){J.push([M,L,H,F])}M=L;break}}}}}}}}}else{if(n.charAt(M)==="<"){if(n.charAt(M+1)==="!"&&n.charAt(M+2)==="-"&&n.charAt(M+3)==="-"){for(L=M+4;L<n.length;L+=1){if(n.charAt(L)==="-"&&n.charAt(L+1)==="-"&&n.charAt(L+2)===">"){break}}H+=1;M=L+2}else{H+=1;F=M}}else{if(n.charAt(M+1)==="<"&&n.charAt(M)!==">"){for(L=M;L>0;L-=1){if(!/\s/.test(n.charAt(L))&&n.charAt(L)!==">"){H+=1;E+=1;F=M;break}else{if(n.charAt(L)===">"){if(H!==E){E+=1;G=M}break}}}}else{if(n.charAt(M)===">"){E+=1;G=M}}}}}}}}}}}}return J});(function{var I=0,H=0,F=w.length,E=0,D=0,C=0,B=0,A=0,z=0,x=0,G=n.split("");for(I=0;I<F;I+=1){A=w[I][0]+1;D=w[I][1];C=w[I][2];z=w[I][3];for(E=A;E<D;E+=1){B=0;if(G[E]==="<"){G[E]="[";for(H=E;H>z;H-=1){B+=1;if(/\s/.test(G[H])){for(x=H-1;x>z;x-=1){if(!/\s/.test(G[x])){if(G[x]!=="="){B+=1}else{if(/\s/.test(G[x-1])){B-=1}}H=x;break}}}}if(/\s/.test(G[A])){B-=1}p.push(["<",B,C])}else{if(G[E]===">"){G[E]="]";for(H=E;H>z;H-=1){B+=1;if(/\s/.test(G[H])){for(x=H-1;x>z;x-=1){if(!/\s/.test(G[x])){if(G[x]!=="="){B+=1}else{if(/\s/.test(G[x-1])){B-=1}}H=x;break}}}}if(/\s/.test(G[A])){B-=1}p.push([">",B,C])}}}}n=G.join("")})});(function{var A=0,D=g({source:n,comments:q.mode,presume_html:q.html}).split(""),z="",w=function(G){var F=[],y=G.length,K=G.split("").reverse,J=0,I="",H=true,E=D.length;if(A>0&&D[A-1]===" "){I=" "}for(A;A<E;A+=1){F.push(D[A]);if(G==="]>"){if(D[A]==="["){H=false}if(H&&D[A]===">"){K=[">"];y=1}}if(F[F.length-1]===K[0]){if(y===1){return I+F.join("")}for(J=0;J<y;J+=1){if(K[J]!==F[F.length-(J+1)]){break}}if(J===y){return I+F.join("")}}}return I+F.join("")},C=[],B=function(H){var I=0,G="",F=0,E="",y=D.length;for(I=A;I<y;I+=1){if(E===""&&D[I-1]!=="\\"){if(D[I]==="/"&&D[I+1]&&D[I+1]==="/"){E="//"}else{if(D[I]==="/"&&D[I+1]&&D[I+1]==="*"){E="/*"}else{if(D[I]==="'"||D[I]==='"'||D[I]==="/"){if(D[I]==="/"){for(F=I-1;F>0;F-=1){if(!/\s/.test(D[F])){break}}if(D[F]===")"||D[F]==="]"||D[F]==="}"||/\w/.test(D[F])){E=""}else{E="/"}}else{E=D[I]}}}}}else{if(D[I-1]!=="\\"&&((E==="'"&&D[I]==="'")||(E==='"'&&D[I]==='"')||(E==="/"&&D[I]==="/")||(E==="//"&&(D[I]==="\n"||(D[I-4]&&D[I-4]==="/"&&D[I-3]==="/"&&D[I-2]==="-"&&D[I-1]==="-"&&D[I]===">")))||(E==="/*"&&D[I-1]==="*"&&D[I]==="/"))){E=""}}if(((H==="script"&&E==="")||H==="style")&&D[I]==="<"&&D[I+1]==="/"&&D[I+2].toLowerCase==="s"){if(H==="script"&&(D[I+3].toLowerCase==="c"&&D[I+4].toLowerCase==="r"&&D[I+5].toLowerCase==="i"&&D[I+6].toLowerCase==="p"&&D[I+7].toLowerCase==="t")){break}else{if(H==="style"&&(D[I+3].toLowerCase==="t"&&D[I+4].toLowerCase==="y"&&D[I+5].toLowerCase==="l"&&D[I+6].toLowerCase==="e")){break}}}else{if(H==="other"&&D[I]==="<"){break}else{G=G+D[I]}}}A=I-1;if(q.content){if(G.charAt(0)===" "&&G.charAt(G.length-1)===" "){G=" text "}else{if(G.charAt(0)===" "){G=" text"}else{if(G.charAt(G.length-1)===" "){G="text "}else{G="text"}}}}return G},x=D.length;for(A=0;A<x;A+=1){if(r[r.length-1]==="T_script"&&!(D[A]==="<"&&D[A+1]==="/"&&D[A+2].toLowerCase==="s"&&D[A+3].toLowerCase==="c"&&D[A+4].toLowerCase==="r"&&D[A+5].toLowerCase==="i"&&D[A+6].toLowerCase==="p"&&D[A+7].toLowerCase==="t")){u.push(B("script"));r.push("T_content")}else{if(r[r.length-1]==="T_style"&&!(D[A]==="<"&&D[A+1]==="/"&&D[A+2].toLowerCase==="s"&&D[A+3].toLowerCase==="t"&&D[A+4].toLowerCase==="y"&&D[A+5].toLowerCase==="l"&&D[A+6].toLowerCase==="e")){u.push(B("style"));r.push("T_content")}else{if(D[A]==="<"&&D[A+1]==="!"&&D[A+2]==="-"&&D[A+3]==="-"&&D[A+4]!=="#"&&r[r.length-1]!=="T_style"){u.push(w("-->"));r.push("T_comment")}else{if(D[A]==="<"&&D[A+1]==="!"&&D[A+2]==="-"&&D[A+3]==="-"&&D[A+4]==="#"){u.push(w("-->"));r.push("T_ssi")}else{if(D[A]==="<"&&D[A+1]==="!"&&D[A+2]!=="-"){u.push(w("]>"));r.push("T_sgml")}else{if(D[A]==="<"&&D[A+1]==="?"&&D[A+2].toLowerCase==="x"&&D[A+3].toLowerCase==="m"&&D[A+4].toLowerCase==="l"){u.push(w("?>"));r.push("T_xml")}else{if(D[A]==="<"&&D[A+1]==="?"&&D[A+2].toLowerCase==="p"&&D[A+3].toLowerCase==="h"&&D[A+4].toLowerCase==="p"){u.push(w("?>"));r.push("T_php")}else{if(D[A]==="<"&&D[A+1].toLowerCase==="s"&&D[A+2].toLowerCase==="c"&&D[A+3].toLowerCase==="r"&&D[A+4].toLowerCase==="i"&&D[A+5].toLowerCase==="p"&&D[A+6].toLowerCase==="t"){u.push(w(">"));z=u[u.length-1].toLowerCase.replace(/'/g,'"');if(z.charAt(z.length-2)==="/"){r.push("T_singleton")}else{if(z.indexOf(' type="')===-1||z.indexOf(' type="text/javascript"')!==-1||z.indexOf(' type="application/javascript"')!==-1||z.indexOf(' type="application/x-javascript"')!==-1||z.indexOf(' type="text/ecmascript"')!==-1||z.indexOf(' type="application/ecmascript"')!==-1){r.push("T_script")}else{r.push("T_tag_start")}}}else{if(D[A]==="<"&&D[A+1].toLowerCase==="s"&&D[A+2].toLowerCase==="t"&&D[A+3].toLowerCase==="y"&&D[A+4].toLowerCase==="l"&&D[A+5].toLowerCase==="e"){u.push(w(">"));z=u[u.length-1].toLowerCase.replace(/'/g,'"');if(z.indexOf(' type="')===-1||z.indexOf(' type="text/css"')!==-1){r.push("T_style")}else{r.push("T_tag_start")}}else{if(D[A]==="<"&&D[A+1]==="%"){u.push(w("%>"));r.push("T_asp")}else{if(D[A]==="<"&&D[A+1]==="/"){u.push(w(">"));r.push("T_tag_end")}else{if(D[A]==="<"&&r[r.length-1]!=="T_script"&&r[r.length-1]!=="T_style"&&(D[A+1]!=="!"||D[A+1]!=="?"||D[A+1]!=="/"||D[A+1]!=="%")){for(C=A;C<x;C+=1){if(D[C]!=="?"&&D[C]!=="%"){if(D[C]==="/"&&D[C+1]===">"){u.push(w("/>"));r.push("T_singleton");break}else{if(D[C+1]===">"){u.push(w(">"));r.push("T_tag_start");break}}}}}else{if(D[A-1]===">"&&(D[A]!=="<"||(D[A]!==" "&&D[A+1]!=="<"))){if(r[r.length-1]==="T_script"){u.push(B("script"));r.push("T_content")}else{if(r[r.length-1]==="T_style"){u.push(B("style"));r.push("T_content")}else{if(D[A-1]+D[A]+D[A+1]!=="> <"){u.push(B("other"));r.push("T_content")}}}}}}}}}}}}}}}}}});(function{var w=0,x=r.length;for(w=0;w<x;w+=1){u[w]=u[w].replace(/\s*prettydiffcdatas/g,"<").replace(/\s*prettydiffcdatae/g,">");if(r[w]==="T_sgml"||r[w]==="T_xml"){t.push("parse")}else{if(r[w]==="T_asp"||r[w]==="T_php"||r[w]==="T_ssi"){t.push("singleton")}else{if(r[w]==="T_comment"){t.push("comment")}else{if((r[w]==="T_content"&&u[w]!==" ")&&r[w-1]==="T_script"){t.push("external")}else{if(r[w]==="T_content"&&r[w-1]==="T_style"){t.push("external")}else{if(r[w]==="T_content"&&u[w].charAt(0)===" "&&u[w].charAt(u[w].length-1)===" "){t.push("mixed_both")}else{if(r[w]==="T_content"&&u[w].charAt(0)===" "&&u[w].charAt(u[w].length-1)!==" "){t.push("mixed_start")}else{if(r[w]==="T_content"&&u[w].charAt(0)!==" "&&u[w].charAt(u[w].length-1)===" "){t.push("mixed_end")}else{if(r[w]==="T_content"){t.push("content")}else{if(r[w]==="T_tag_start"){t.push("start")}else{if(r[w]==="T_style"){u[w]=u[w].replace(/\s+/g," ");t.push("start")}else{if(r[w]==="T_script"){u[w]=u[w].replace(/\s+/g," ");t.push("start")}else{if(r[w]==="T_singleton"){t.push("singleton")}else{if(r[w]==="T_tag_end"){t.push("end")}}}}}}}}}}}}}}}s=[].concat(u)});(function{var y=0,w="",z=0,x=0;if(!q.html){return}x=t.length;for(z=0;z<x;z+=1){if(t[z]==="start"){y=u[z].indexOf(" ");if(u[z].length===3){w=u[z].charAt(1).toLowerCase}else{if(y===-1){w=u[z].slice(1,u[z].length-1).toLowerCase}else{if(y===0){w=u[z].slice(1,u[z].length);y=w.indexOf(" ");w=w.slice(1,y).toLowerCase}else{w=u[z].slice(1,y).toLowerCase}}}if(w==="area"||w==="base"||w==="basefont"||w==="br"||w==="col"||w==="embed"||w==="eventsource"||w==="frame"||w==="hr"||w==="img"||w==="input"||w==="keygen"||w==="link"||w==="meta"||w==="param"||w==="progress"||w==="source"||w==="wbr"){t[z]="singleton";r[z]="T_singleton"}}}});(function{var w=0,A=function(C){var D=0,B=0;if(C==="start"){B+=1}for(D=w-1;D>-1;D-=1){if(t[D]==="start"&&v[D]==="x"){B+=1}else{if(t[D]==="end"){B-=1}else{if(t[D]==="start"&&v[D]!=="x"){return v.push(v[D]+B)}}}if(D===0){if(t[D]!=="start"){return v.push(0)}if(t[w]==="mixed_start"||t[w]==="content"||(t[w]==="singleton"&&u[w].charAt(0)!==" ")){return v.push("x")}return v.push(1)}}},z=function{var C=function(D){for(D;D>0;D-=1){if(v[D]!=="x"){return v.push(v[D]+1)}}},B=function{var D=0,G=false,E=function{var I=0,H=function{var K=0,L=0,J=0;for(L=w-1;L>0;L-=1){if((t[L]==="start"&&t[L+1]==="start"&&v[L]===v[L+1]-1)||(t[L]==="start"&&t[L-1]!=="start"&&v[L]===v[L-1])){break}}for(K=L+1;K<w;K+=1){if(t[K]==="mixed_start"&&t[K+1]==="end"){J+=1}}if(t[L-1]==="end"&&v[L-1]!=="x"&&J===0){J+=1}if(J!==0){if(v[w-1]==="x"){return J-1}return J}for(L;L<w;L+=1){if(t[L]==="start"){J+=1}else{if(t[L]==="end"){J-=1}}}return J};for(I=w-1;I>0;I-=1){if(t[I]!=="mixed_end"||(t[I]==="start"&&v[I]!=="x")){if(t[I-1]==="end"){G=true;if(t[w-1]==="mixed_both"&&v[w-1]===v[I]-H){return v.push(v[I]-(H+1))}if(t[w-2]==="start"&&(t[w-1]==="mixed_end"||t[w-1]==="mixed_both")){return v.push(v[I])}if(v[I]!=="x"){if(t[I]==="mixed_both"&&I!==w-H){if(I===w-1){return v.push(v[I]-1)}return v.push(v[I]+H)}if(t[w-1]==="mixed_end"&&H===0){return v.push(v[I]-1)}if(v[w-1]==="x"&&(t[w-2]!=="end"||(t[w-2]==="end"&&v[w-2]!=="x"))){return v.push(v[I]+H)}return v.push(v[I]-H)}}else{G=false;return}}}},F=function{var H=0,I=0;for(I=w;I>0;I-=1){if(t[I]==="end"){H+=1}else{if(t[I]==="start"){H-=1}}if(H===0){return I}}};if(t[w-1]==="end"&&v[w-1]!=="x"){if(t[w-2]==="start"&&v[w-2]==="x"){for(D=w-2;D>0;D-=1){if(v[D]!=="x"){break}}if(t[D]==="start"){return A("end")}return v.push(v[D]-1)}if(t[w-2]==="start"&&v[w-2]!=="x"){return v.push(v[w-2]-1)}return v.push(v[w-1]-1)}E;if(G){return}return(function{var I=0,H=0;for(H=F;H>0;H-=1){if(t[H]==="start"){I+=1}else{if(t[H]==="end"){I-=1}}if(v[H]!=="x"){if(t[H]==="end"&&t[H-1]==="start"&&v[H-1]!=="x"){return v.push(v[H])}if(v[w-1]==="x"&&u[w].charAt(0)!==" "&&t[w-1]!=="mixed_end"&&(t[w-2]!=="end"||v[w-2]!=="x")&&(t[w-3]!=="end"||v[w-3]!=="x")){return v.push("x")}return v.push(v[H]+(I-1))}}I=0;for(H=w;H>-1;H-=1){if(t[H]==="start"){I+=1}else{if(t[H]==="end"){I-=1}}}return v.push(I)})};if(t[w-1]==="end"||t[w-1]==="mixed_both"||t[w-1]==="mixed_end"){return B}if(t[w-1]==="mixed_start"||t[w-1]==="content"){return v.push("x")}if(t[w-1]==="external"){return(function{var D=0,E=-1;for(D=w-2;D>0;D-=1){if(t[D]==="start"){E+=1}else{if(t[D]==="end"){E-=1}}if(v[D]!=="x"){break}}if(t[D]==="end"){E+=1}return v.push(v[D]+E)})}if(u[w].charAt(0)!==" "){if(t[w-1]==="singleton"||t[w-1]==="content"){return v.push("x")}return(function{var D=0,E=0;for(D=w-1;D>0;D-=1){if(t[D]==="singleton"&&v[D]==="x"&&((t[D-1]==="singleton"&&v[D-1]!=="x")||t[D-1]!=="singleton")){E+=1}if(v[D]!==0&&v[D]!=="x"&&t[w-1]!=="start"){if(t[D]==="mixed_both"||t[D]==="mixed_start"){return v.push(v[D]-E)}if(v[D]===E||(t[D]==="singleton"&&(t[D-1]==="content"||t[D-1]==="mixed_start"))){return v.push(v[D])}return v.push(v[D]-1)}if(t[D]==="start"&&v[D]==="x"){return C(D)}if(t[w-1]==="start"){return v.push(v[D])}}return v.push(0)})}return A("end")},y=function(F){var D=0,C=0,B=0,E=function{var I=0,G=1,H=-1;for(I=D;I>0;I-=1){if(t[I]==="start"){H-=1;if(v[I]==="x"){G+=1}}else{if(t[I]==="end"){H+=1;G-=1}}if(v[I]===0){D=0;for(C=w-1;C>I;C-=1){if(t[C]==="start"){D+=1}else{if(t[C]==="end"){D-=1}}}if(D>0){if(v[I+1]==="x"){return v.push(((H)*-1)-1)}if(t[I]!=="external"&&(q.comments!=="noindent"||(q.comments==="noindent"&&t[I]!=="comment"))){return v.push((H+1)*-1)}}else{for(D=w-1;D>0;D-=1){if(v[D]!=="x"){return v.push(v[D])}}}}if(v[I]!=="x"&&v[w-1]!=="x"){if(t[I]==="start"||t[I]==="end"){return v.push(v[I]+G)}return v.push(v[I]+G-1)}if(H===-1&&v[I]==="x"){break}else{if(H===1&&v[I]!=="x"&&t[I]!=="mixed_start"&&t[I]!=="content"){if(t[I-1]==="mixed_end"||(v[w-1]==="x"&&t[w-1]==="end"&&t[I]!=="end")){return v.push(v[I]-H-1)}return v.push(v[I]-H)}}if(H===0&&v[I]!=="x"){return A("start")}}return A("start")};(function{var G=0;if(F===1){D=0;C=0;B=0}else{for(G=F-1;G>0;G-=1){if(t[G]!=="comment"){D=G;break}}if(D===1){C=0;B=0}else{for(G=D-1;G>0;G-=1){if(t[G]!=="comment"){C=G;break}}if(C===1){B=0}else{for(G=C-1;G>0;G-=1){if(t[G]!=="comment"){B=G;break}}}}}});if(w-1===0&&t[0]==="start"){return v.push(1)}if(t[D]==="mixed_start"||t[D]==="content"||t[w-1]==="mixed_start"||t[w-1]==="content"||(t[w]==="singleton"&&(t[w-1]==="start"||t[w-1]==="singleton"||t[w-1]==="end")&&u[w].charAt(0)!==" ")){return v.push("x")}if((t[w-1]==="comment"&&v[w-1]===0)||((t[B]==="mixed_start"||t[B]==="content")&&t[C]==="end"&&(t[D]==="mixed_end"||t[D]==="mixed_both"))){return A("start")}if(t[w-1]==="comment"&&v[w-1]!=="x"){return v.push(v[w-1])}if((t[D]==="start"&&v[D]==="x")||(t[D]!=="mixed_end"&&t[D]!=="mixed_both"&&v[D]==="x")){if(v[w-1]==="x"&&u[w].charAt(0)!==" "&&t[w-1]!=="start"&&u[w-1].charAt(u[w-1].length-1)!==" "){if((t[w-1]==="end"&&t[w-2]==="end")||(t[w-1]==="end"&&t[w]!=="end"&&t[w+1]!=="mixed_start"&&t[w+1]!=="content")){return A("start")}return v.push("x")}return E}if(t[D]==="end"&&v[D]!=="x"&&(t[D-1]!=="start"||(t[D-1]==="start"&&v[D-1]!=="x"))){if(v[D]<0){return A("start")}return v.push(v[D])}if(t[B]!=="mixed_start"&&t[B]!=="content"&&(t[D]==="mixed_end"||t[D]==="mixed_both")){return(function{var I=0,H=0,J=0,G=0;for(I=D;I>0;I-=1){if(t[I]==="end"){H+=1}if(t[I]==="start"){J+=1}if(v[I]===0&&I!==0){G=I}if(t[D]==="mixed_both"&&v[I]!=="x"){return v.push(v[I])}if(t[I]!=="comment"&&t[I]!=="content"&&t[I]!=="external"&&t[I]!=="mixed_end"&&v[I]!=="x"){if(t[I]==="start"&&v[I]!=="x"){if(t[w-1]!=="end"){return v.push(v[I]+(J-H))}if((v[I]===v[I-1]&&t[I-1]!=="end"&&v[I+1]!=="x")||(t[w-2]==="start"&&v[w-2]!=="x"&&v[w-1]==="x")){return v.push(v[I]+1)}if(J<=1){return v.push(v[I])}}else{if(H>0){if(J>1){if(G!==0){return A("start")}return v.push(v[I]+1)}return v.push(v[I]-H+1)}}return v.push(v[I]+J)}}return A("start")})}if(t[D]==="start"&&v[D]!=="x"){return(function{var G=0;for(G=w-1;G>-1;G-=1){if(t[G]!=="comment"&&t[G]!=="content"&&t[G]!=="external"&&t[G]!=="mixed_end"){if(t[w+1]&&u[w].charAt(0)!==" "&&(t[w+1]==="mixed_end"||t[w+1]==="content"||(u[w+1].charAt(0)!==" "&&t[w+1]==="singleton"))){return v.push("x")}return v.push(v[G]+1)}}return v.push(0)})}if(u[w].charAt(0)!==" "&&(t[w-1]==="singleton"||t[w-1]==="content"||t[w-1]==="mixed_start")){return v.push("x")}return A("start")},x=function{var B;if(t[w]!=="start"&&v[w-1]==="x"&&t[w-1]!=="content"&&u[w].charAt(0)!==" "&&t[w-1]!=="mixed_start"&&t[w-1]!=="mixed_end"){return v.push("x")}if(t[w]!=="start"&&u[w]===" "){u[w]="";return v.push("x")}if(t[w-1]!=="comment"){y(w)}else{for(B=w-1;B>0;B-=1){if(t[B]!=="comment"){break}}y(B+1)}};(function{var C=0,B="",G=0,F=0,E=p.length,D=[];for(C=0;C<E;C+=1){B=p[C][0];G=p[C][1];F=p[C][2];if(typeof u[F]==="string"){if(u[F].charAt(0)===" "){G+=1}D=u[F].split("");if(B==="<"&&D[G]==="["){D[G]="<"}else{if(B===">"&&D[G]==="]"){D[G]=">"}}u[F]=D.join("")}}});(function{var H=false,C=false,J=[],I=[],B=(/^(\s*\/*<\!\[+[A-Z]+\[+)/),E=(/(\/*\]+>\s*)$/),D=(/^(\s*<\!\-\-)/),G=(/(\-\->\s*)$/),F=t.length;for(w=0;w<F;w+=1){H=false;C=false;J=[""];I=[""];if(w===0){v.push(0)}else{if(q.force_indent){if(t[w]==="end"){if(t[w-1]==="start"){v.push(v[w-1])}else{v.push(v[w-1]-1)}}else{if(t[w-1]==="start"){v.push(v[w-1]+1)}else{v.push(v[w-1])}if(t[w]==="mixed_end"){u[w]=u[w].slice(0,u[w].length-1)}}}else{if(t[w]==="external"){if(/\s*<\!\-\-\s*\-\->\s*/.test(u[w])){if(u[w].charAt(0)===" "){u[w]=u[w].substr(1)}if(u[w].charAt(u[w].length-1)===" "){u[w]=u[w].substr(0,u[w].length-1)}t[w]="comment";r[w]="T_comment";if(q.comments!=="noindent"){x}else{v.push(0)}}else{if(r[w-1]==="T_script"){v.push(0);if(D.test(u[w])){H=true;u[w]=u[w].replace(D,"")}else{if(B.test(u[w])){J=B.exec(u[w]);u[w]=u[w].replace(B,"")}}if(G.test(u[w])&&!/(\/\/\-\->\s*)$/.test(u[w])){C=true;u[w]=u[w].replace(G,"")}else{if(E.test(u[w])){I=E.exec(u[w]);u[w]=u[w].replace(E,"")}}if(typeof e==="function"){u[w]=e({source:u[w],insize:i.insize,inchar:i.inchar,preserve:true,preserve_max:1,inlevel:0,space:true,braces:q.indent,inarray:false,comments:q.comments})}if(H){u[w]=""}else{if(I[0]!==""){u[w]=u[w]+"\n"+I[0]}}u[w]=u[w].replace(/(\/\/(\s)+\-\->(\s)*)$/,"//-->").replace(/^(\s*)/,"").replace(/(\s*)$/,"")}else{if(r[w-1]==="T_style"){v.push(0);if(D.test(u[w])){H=true;u[w]=u[w].replace(D,"")}else{if(B.test(u[w])){J=B.exec(u[w]);u[w]=u[w].replace(B,"")}}if(G.test(u[w])&&!/(\/\/\-\->\s*)$/.test(u[w])){C=true;u[w].replace(G,"")}else{if(E.test(u[w])){I=E.exec(u[w]);u[w]=u[w].replace(E,"")}}if(typeof k==="function"){u[w]=k({source:u[w],size:q.insize,character:q.inchar,comment:q.comments,alter:true})}if(H){u[w]=""}else{if(I[0]!==""){u[w]=u[w]+"\n"+I[0]}}u[w]=u[w].replace(/^(\s*)/,"").replace(/(\s*)$/,"")}}}}else{if(t[w]==="comment"&&q.comments!=="noindent"){x}else{if(t[w]==="comment"&&q.comments==="noindent"){v.push(0)}else{if(t[w]==="content"){v.push("x")}else{if(t[w]==="parse"){x}else{if(t[w]==="mixed_both"){x}else{if(t[w]==="mixed_start"){x}else{if(t[w]==="mixed_end"){u[w]=u[w].slice(0,u[w].length-1);v.push("x")}else{if(t[w]==="start"){x}else{if(t[w]==="end"){z}else{if(t[w]==="singleton"){x}}}}}}}}}}}}}}})});(function{var A=(function{var D=0,C=q.insize,F=q.inchar,E=[];for(D=0;D<C;D+=1){E.push(F)}return E.join("")}),z=0,w=u.length,B=function(K){var J=0,I=(typeof v[z]==="number")?v[z]:0,H=0,G=0,D=[],C="",F=[],E=function{var M=C,L=H;if(L===0){return M}do{M+=A;L-=1}while(L>0);return M};for(J=0;J<I;J+=1){D.push(A)}if(t[z]==="mixed_both"){K=K.slice(0,K.length-1)}C=D.join("");K="\n"+C+K;if(t[z]==="parse"&&/\[\s*</.test(u[z])){u[z]=u[z].replace(/\[\s+</g,"[<");F=u[z].split("");I=F.length;for(J=0;J<I;J+=1){if(F[J]==="["){H+=1;F[J]="[\n"+E}else{if(F[J]==="]"){H-=1;F[J]="\n"+E+"]"}else{if(F[J]==="<"&&I>J+3&&F[J+1]==="!"&&F[J+2]==="-"&&F[J+3]==="-"){if(J===0||F[J-1].charAt(0)!=="["){F[J]="\n"+E+"<"}for(G=J+4;G<I;G+=1){if(F[G-2]==="-"&&F[G-1]==="-"&&F[G]===">"){J=G;break}}}else{if(F[J]==="<"&&(J===0||F[J-1].charAt(0)!=="[")){F[J]="\n"+E+"<"}}}}}K=F.join("").replace(/\s>/g,">")}return K},y=function(E){var F=0,D=0,C=[];for(D=z;D>0;D-=1){if(v[D]!=="x"){break}}for(F=0;F<v[D];F+=1){C.push(A)}E="\n"+C.join("")+E;return E},x=function(E){var F=0,D=0,H=0,G="",C=[];if(v[z-1]==="x"){for(D=z-1;D>0;D-=1){if(t[D]==="start"){F+=1}else{if(t[D]==="end"){F-=1}}if(v[D]!=="x"){break}}if(t[D]==="end"){F+=1}for(H=0;H<v[D]+F;H+=1){C.push(A)}}else{for(H=0;H<v[z-1]+1;H+=1){C.push(A)}}G=C.join("");return"\n"+G+E.replace(/\n/g,"\n"+G)};for(z=0;z<w;z+=1){if(t[z]==="end"&&(q.force_indent||(t[z-1]!=="content"&&t[z-1]!=="mixed_start"))){if(u[z].charAt(0)===" "){u[z]=u[z].substr(1)}if(v[z]!=="x"&&t[z-1]!=="start"){u[z]=y(u[z])}}else{if(t[z]==="external"&&q.style==="indent"){u[z]=x(u[z])}else{if(v[z]!=="x"&&(t[z-1]!=="content"&&(t[z-1]!=="mixed_start"||q.force_indent))){if(u[z].charAt(0)===" "){u[z]=u[z].substr(1)}u[z]=B(u[z])}}}}});(function{var A=[],B=t.length,C=s.join("").length,D=(function{var G=0,F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],K=[],J=[],I=[],H=[];for(G=0;G<B;G+=1){switch(t[G]){case"end":F[1]+=1;L[1]+=s[G].length;if(s[G].charAt(0)===" "&&t[G-1]==="singleton"){L[1]-=1;L[2]+=1}break;case"singleton":F[2]+=1;L[2]+=s[G].length;if(((u[G].indexOf("<embed ")!==-1||u[G].indexOf("<img ")!==-1||u[G].indexOf("<iframe ")!==-1)&&(u[G].indexOf("src")!==-1&&u[G].indexOf('src=""')===-1&&u[G].indexOf("src=")===-1))||(u[G].indexOf("<link ")!==-1&&u[G].indexOf("rel")!==-1&&u[G].indexOf("canonical")===-1)){A.push(u[G])}break;case"comment":F[3]+=1;L[3]+=s[G].length;break;case"content":F[4]+=1;L[4]+=s[G].length;break;case"mixed_start":F[5]+=1;L[5]+=(s[G].length-1);break;case"mixed_end":F[6]+=1;L[6]+=(s[G].length-1);break;case"mixed_both":F[7]+=1;L[7]+=(s[G].length-2);break;case"parse":F[10]+=1;L[10]+=s[G].length;break;case"external":F[17]+=1;L[17]+=s[G].length;if(((u[G].indexOf("<script")!==-1||u[G].indexOf("<embed ")!==-1||u[G].indexOf("<img ")!==-1||u[G].indexOf("<iframe ")!==-1)&&(u[G].indexOf("src")!==-1&&u[G].indexOf('src=""')===-1&&u[G].indexOf("src=")===-1))||(u[G].indexOf("<link ")!==-1&&u[G].indexOf("rel")!==-1&&u[G].indexOf("canonical")===-1)){A.push(u[G])}break;default:switch(r[G]){case"T_tag_start":F[0]+=1;L[0]+=s[G].length;if(((u[G].indexOf("<embed ")!==-1||u[G].indexOf("<img ")!==-1||u[G].indexOf("<iframe ")!==-1)&&(u[G].indexOf("src")!==-1&&u[G].indexOf('src=""')===-1&&u[G].indexOf("src=''")===-1))||(u[G].indexOf("<link ")!==-1&&u[G].indexOf("rel")!==-1&&u[G].indexOf("canonical")===-1)){A.push(u[G])}break;case"T_sgml":F[8]+=1;L[8]+=s[G].length;break;case"T_xml":F[9]+=1;L[9]+=s[G].length;break;case"T_ssi":F[11]+=1;L[11]+=s[G].length;break;case"T_asp":F[12]+=1;L[12]+=s[G].length;break;case"T_php":F[13]+=1;L[13]+=s[G].length;break;case"T_script":F[15]+=1;L[15]+=s[G].length;if(u[G].indexOf(" src")!==-1){A.push(u[G])}break;case"T_style":F[16]+=1;L[16]+=s[G].length;break}}}K=[F[0]+F[1]+F[2]+F[3],F[4]+F[5]+F[6]+F[7],F[15]+F[16]+F[17],F[11]+F[12]+F[13]];J=[L[0]+L[1]+L[2]+L[3],L[4]+L[5]+L[6]+L[7],L[15]+L[16]+L[17],L[11]+L[12]+L[13]];I=[K[0],K[0],K[0],K[0],K[1],K[1],K[1],K[1],F[10],F[10],F[10],K[3],K[3],K[3],K[3],K[2],K[2],K[2]];H=[J[0],J[0],J[0],J[0],J[1],J[1],J[1],J[1],L[10],L[10],L[10],J[3],J[3],J[3],J[3],J[2],J[2],J[2]];F[2]=F[2]-K[3];L[2]=L[2]-J[3];return[F,L,K,J,I,H]}),x=function(F){var I=function(L){if(D[3][L]===0){return"0.00%"}return"100.00%"},H=function(L){if(D[2][L]===0){return"0.00%"}return"100.00%"},G=[],K="",J="";switch(F){case 0:if((D[2][F]/B)<0.7){K="bad"}else{K="good"}if((D[3][F]/C)>0.4){J="bad"}else{J="good"}break;case 1:if((D[2][F]/B)<0.25){K="bad"}else{K="good"}if((D[3][F]/C)<0.6){J="bad"}else{J="good"}break;case 2:if((D[2][F]/B)>0.05){K="bad"}else{K="good"}if((D[3][F]/C)>0.05){J="bad"}else{J="good"}break}G=["  "];G.push(D[2][F]);G.push("  ");G.push(H(F));G.push(" <td class='");G.push(K);G.push("'>");G.push(((D[2][F]/B)*100).toFixed(2));G.push("%  ");G.push(D[3][F]);G.push("  ");G.push(I(F));G.push(" <td class='");G.push(J);G.push("'>");G.push(((D[3][F]/C)*100).toFixed(2));G.push("%  ");return G.join("")},y=(function{var F=0,L="",K=[],I=[],H=(function{var N=0,R=["*** Start Tags","End Tags","Singleton Tags","Comments","Flat String","String with Space at Start","String with Space at End","String with Space at Start and End","SGML","XML","Total Parsing Declarations","SSI","ASP","PHP","Total Server Side Tags","*** Script Tags","*** Style Tags","JavaScript/CSS Code"],Q=[],O="",M="",P=D[0].length;for(N=0;N<P;N+=1){if(D[4][N]===0){O="0.00%"}else{if(D[0][N]===D[4][N]){O="100.00%"}else{O=((D[0][N]/D[4][N])*100).toFixed(2)+"%"}}if(D[5][N]===0){M="0.00%"}else{if(D[1][N]===D[5][N]){M="100.00%"}else{M=((D[1][N]/D[5][N])*100).toFixed(2)+"%"}}Q=["  "+R[N]];Q.push("  ");Q.push(D[0][N]);Q.push("  ");Q.push(O);Q.push("  ");Q.push(((D[0][N]/B)*100).toFixed(2));Q.push("%  ");Q.push(D[1][N]);Q.push("  ");Q.push(M);Q.push("  ");Q.push(((D[1][N]/C)*100).toFixed(2));Q.push("%  ");if(N===3){Q.push("  Total Common Tags");Q.push(x(0));Q.push(" <th colspan='7'>Content  ")}else{if(N===7){Q.push("  Total Content");Q.push(x(1));Q.push(" <th colspan='7'>Parsing Declarations  ")}else{if(N===10){Q.push(" <th colspan='7'>Server Side Tags  ")}else{if(N===14){Q.push(" <th colspan='7'>Style and Script Code/Tags  ")}else{if(N===17){Q.push("  Total Script and Style Tags/Code");Q.push(x(2))}}}}}R[N]=Q.join("")}return R.join("")}),G=[" "],J=A.length;G.push((function{var Z=0,X=0,W=B,V=[],U=[],T=0,S=0,R=[],Q=[],P=[],O="",N=[],aa=[],Y="",M=function(ab){return ab.replace(/(\,|\.|\?|\!|\:) /," ")};for(Z=0;Z<W;Z+=1){if(t[Z]==="content"){R.push(" ");R.push(u[Z])}else{if(t[Z]==="mixed_start"){R.push(u[Z])}else{if(t[Z]==="mixed_both"){R.push(u[Z].substr(0,u[Z].length))}else{if(t[Z]==="mixed_end"){R.push(" ");R.push(u[Z].substr(0,u[Z].length))}}}}}Y=R.join("");if(Y.length===0){return""}Y=Y.substr(1,Y.length).toLowerCase;aa=Y.replace(/\ ?/gi," ").replace(/[a-z](\,|\.|\?|\!|\:) /gi,M).replace(/(\(|\)|"|\{|\}|\[|\])/g,"").replace(/\s+/g," ").split(" ");W=aa.length;for(Z=0;Z<W;Z+=1){if(aa[Z]!==""){V.push([1,aa[Z]]);T+=1;for(X=Z+1;X<W;X+=1){if(aa[X]===aa[Z]){V[V.length-1][0]+=1;aa[X]="";T+=1}}}}W=V.length;for(Z=0;Z<W;Z+=1){S=Z;for(X=Z+1;X<W;X+=1){if(V[X][0]>V[S][0]&&V[X][1]!==""){S=X}}O=V[S][1];if(O.length<3||O.length>30||!(/[a-zA-Z]/).test(O)||(/&\#?\w+;/).test(O)||O==="the"||O==="and"||O==="for"||O==="are"||O==="this"||O==="from"||O==="with"||O==="that"){Q.push(V[S])}else{Q.push(V[S]);P.push(V[S])}if(V[S]!==V[Z]){V[S]=V[Z]}else{V[S]=[0,""]}if(P.length===11){break}}if(Q.length<2){return""}X=Q.length;for(Z=0;Z<X;Z+=1){if(Z>9){Q[Z]=""}else{N[Z]=(Q[Z+1])?(Q[Z][0]/Q[Z+1][0]).toFixed(2):"1.00";Q[Z]="  "+(Z+1)+"  "+Q[Z][1].replace(/&/g,"&amp;")+"  "+Q[Z][0]+"  "+N[Z]+"  "+((Q[Z][0]/T)*100).toFixed(2)+"%  "}}if(Q[10]){Q[10]=""}if(P.length>10){X=10}else{X=P.length}N=[];for(Z=0;Z<X;Z+=1){N[Z]=(P[Z+1])?(P[Z][0]/P[Z+1][0]).toFixed(2):"1.00";P[Z]="  "+(Z+1)+"  "+P[Z][1].replace(/&/g,"&amp;")+"  "+P[Z][0]+"  "+N[Z]+"  "+((P[Z][0]/T)*100).toFixed(2)+"%  "}if(P[10]){P[10]=""}if(X>10){P[P.length-1]=""}U.push(" ");return U.join("")}));G.push("  * The number of requests is determined from the input submitted only and does not count the additional HTTP requests supplied from dynamically executed code, frames, iframes, css, or other external entities. **");G.push("Character size is measured from the individual pieces of tags and content specifically between minification and beautification. *** The number of starting &lt;script&gt; and &lt;style&gt; tags is subtracted from the total number of start tags.");G.push("The combination of those three values from the table above should equal the number of end tags or the code is in error. ");G.push(L);return G.join("")}),w=function(F,G){return(((D[3][0]+F)/C)/((D[3][1]*G)/C))},z=(function{var M="",L=C/7500,K=u.join("").length,J=q.source.length,I=0,H=[" If the input is content it receives an efficiency score of "],G="",F="",O="",N="";M=L.toFixed(0);if(L>0){L=(A.length-M)*4}else{L=0}if(D[3][1]===0){D[2][1]=1e-8;D[3][1]=1e-8}I=(((D[2][0]+D[2][2]-L)/B)/(D[2][1]/B));G=(I/w(D[3][2],1)).toPrecision(2);F=(I/w(D[1][15],1)).toPrecision(2);O=(I/w(D[3][2],4)).toPrecision(2);N=(I/w(D[1][15],4)).toPrecision(2);if(G===F){F="";N=""}else{F=", or "+F+" if inline script code and style tags are removed";N=", or "+N+" if inline script code and style tags are removed"}H.push(G);H.push(" ");H.push(F);H.push(". The efficiency score if this input is a large form or application is ");H.push(O);H.push(" ");H.push(N);H.push(". Efficient markup achieves scores higher than 2.00 and excellent markup achieves scores higher than 4.00. The score reflects the highest number of tags to pieces of content where the weight of those tags is as small as possible compared to the weight of the content.");H.push("The score is a performance metric only and is not associated with validity or well-formedness, but semantic code typically achieves the highest scores. All values are rounded to the nearest hundreth. Total input size: ");H.push(J.toString.replace(/\B(?=(\d{3})+(?!\d))/g,","));H.push(" characters Total output size: ");H.push(K.toString.replace(/\B(?=(\d{3})+(?!\d))/g,","));H.push(" characters  * Total number of HTTP requests in supplied HTML: ");H.push(A.length);H.push(" ");return H.join("")}),E=(function{var F=0,H=[" "],G="";if(D[0][0]+D[0][15]+D[0][16]!==D[0][1]){G="s";F=(D[0][0]+D[0][15]+D[0][16])-D[0][1];if(F>0){if(F===1){G=""}H.push(F);H.push(" more start tag");H.push(G);H.push(" than end tag");H.push(G);H.push("!")}else{if(F===-1){G=""}H.push(F*-1);H.push(" more end tag");H.push(G);H.push(" than start tag");H.push(G);H.push("!")}H.push(" The combined total number of start tags, script tags, and style tags should equal the number of end tags. For HTML this problem may be solved by selecting the ' Presume SGML type HTML ' option. ")}else{return""}return H.join("")});j=E+z+y});return u.join("").replace(/\n(\s)+\n/g,"\n\n").replace(/^\s+/,"")},a=function(y){(function{if(typeof y.baseTextLines!=="string"){y.baseTextLines="Error: Cannot build diff view; baseTextLines is not defined."}if(typeof y.newTextLines!=="string"){y.newTextLines="Error: Cannot build diff view; newTextLines is not defined."}if(y.inline!==true){y.inline=false}if(isNaN(Number(y.contextSize))){y.contextSize=""}if(typeof y.baseTextName!=="string"){y.baseTextName="Base Source"}if(typeof y.newTextName!=="string"){y.newTextName="New Source"}if(typeof y.tchar!=="string"){y.tchar=""}if(isNaN(Number(y.tsize))){if(y.tchar===""){y.tsize=0}else{y.tsize=1}}});var x=0,t=0,r=(function{var B=Number(y.tsize),A=0,C=[];if(y.tchar===""){return""}for(A=0;A<B;A+=1){C.push(y.tchar)}return C.join("")}),w=y.inline,p=(y.contextSize==="")?-1:Number(y.contextSize),s=function(E){var A=E.indexOf("\n"),D=E.indexOf("\r"),C=((A>-1&&D>-1)||D<0)?"\n":"\r",B=E.replace(/\&/g,"&amp;").replace(/\$#lt;/g,"%#lt;").replace(/\$#gt;/g,"%#gt;").replace(/</g,"$#lt;").replace(/>/g,"$#gt;");if(C==="\n"){E=E.replace(/\r/g,"")}else{E=E.replace(/\n/g,"")}return B.split(C)},z=s(y.baseTextLines),u=s(y.newTextLines),n=y.baseTextName,q=y.newTextName,v=(function{var A={},D=function(J){if(A.hasOwnProperty(J)){return A[J]}},G=[],F=[],E=false,C=[],H=[],I=[],B=function{var ae=0,ac=0,L=0,ab=0,S=0,Q=0,M=[],aa=0,Z=0,Y=0,R=[],X=0,U=0,K=0,J=0,P=0,O=0,W=G.length,T=F.length,V=0,W,0,T,N=[],ad=function(ag,aj){var ai=0,ah=Math.max(ag.length,aj.length);for(ai=0;ai<ah;ai+=1){if(ag[ai]<aj[ai]){return -1}if(ag[ai]>aj[ai]){return 1}}return(ag.length===aj.length)?0:((ag.length<aj.length)?-1:1)},af=function(ar,al,at,ao){var aq=0,ap=H.length,an=0,am=0,ak=0,aj=[0,0],ah=ar,ag=at,ai=0;for(an=ar;an<al;an+=1){for(aq=0;aq<ap;aq+=1){if(H[aq][1]===G[an]&&(G[an]!==F[an]||an===al-1||G[an+1]===F[an+1])){am=H[aq][0];break}}if(aq!==ap){if(am>=at){if(am>=ao){break}if(aj[0]===am-1){ak=aj[1]+1}else{ak=1}if(ak>ai){ah=an-ak+1;ag=am-ak+1;ai=ak}}aj=[am,ak]}}while(ah>ar&&ag>at&&!D(F[ag-1])&&G[ah-1]===F[ag-1]){ah-=1;ag-=1;ai+=1}while(ah+ai<al&&ag+ai<ao&&!D(F[ag+ai])&&G[ah+ai]===F[ag+ai]){ai+=1}while(ah>ar&&ag>at&&D(F[ag-1])&&G[ah-1]===F[ag-1]){ah-=1;ag-=1;ai+=1}while(ah+ai<al&&ag+ai<ao&&D(F[ag+ai])&&G[ah+ai]===F[ag+ai]){ai+=1}return[ah,ag,ai]};while(V.length){M=V.pop;L=M[0];ab=M[1];S=M[2];Q=M[3];R=af(L,ab,S,Q);aa=R[0];Z=R[1];Y=R[2];if(Y>0){C.push(R);if(L<aa&&S<Z){V.push([L,aa,S,Z])}if(aa+Y<ab&&Z+Y<Q){V.push([aa+Y,ab,Z+Y,Q])}}}C.sort(ad);ac=C.length;for(ae=0;ae<ac;ae+=1){U=C[ae][0];J=C[ae][1];O=C[ae][2];if(X+P===U&&K+P===J){P+=O}else{if(P){N.push([X,K,P])}X=U;K=J;P=O}}if(P){N.push([X,K,P])}N.push([W,T,0]);return N};(function{(function{if(z.length>u.length){E=true;G=u;F=z}else{G=z;F=u}});(function{var K=0,M=0,J="",L=F.length;for(K=0;K<L;K+=1){J=F[K];for(M=H.length-1;M>-1;M-=1){if(H[M][1]===J){break}}if(M>-1){if(L>=200&&100>L){H.splice(M,1)}}else{H.push([K,J])}}});(function{var P=0,K=0,R=0,S="",O=0,M=0,L=0,J=B,N=J.length,Q=function(U,Y,W){var V=function(aa,Z){var ad=aa.replace(/^(\s+)/,"").split(""),ac=Math.min(ad.length,Z.length),ab=0;for(ab=0;ab<ac;ab+=1){if(ad[ab]!==Z[ab]){return ab}}return ab},T=W.replace(/^(\s+)/,"").split(""),X=V(Y,T)-V(U,T);if(X>0){return true}return false};for(O=0;O<N;O+=1){P=J[O][0];K=J[O][1];R=J[O][2];S="";if(M<P&&L<K){if(M-L!==P-K&&L-K<3&&M-P<3){if(E&&M-P>L-K){if(Q(F[L],F[L+1],G[M])){I.push(["delete",L,L+1,M,M]);I.push(["replace",L+1,K,M,P])}else{I.push(["replace",L,K,M,P])}}else{if(!E&&K-L>P-M){if(Q(F[L],F[L+1],G[M])){I.push(["insert",M,M,L,L+1]);I.push(["replace",M,P,L+1,K])}else{I.push(["replace",M,P,L,K])}}else{S="replace"}}}else{S="replace"}}else{if(M<P){if(E){S="insert"}else{S="delete"}}else{if(L<K){if(E){S="delete"}else{S="insert"}}}}if(S!==""){if(E){I.push([S,L,K,M,P])}else{I.push([S,M,P,L,K])}}M=P+R;L=K+R;if(R>0){if(E){I.push(["equal",K,L,P,M])}else{I.push(["equal",P,M,K,L])}}}})});return I});return(function{var L=[" ");return[L.join("").replace(/\$#gt;/g,"&gt;").replace(/\$#lt;/g,"&lt;").replace(/\%#lt;/g,"$#lt;").replace(/\%#gt;/g,"$#gt;"),x,t]})},f=function(s){(function{if(!s.source||s.source===""){s.source="Source sample is missing."}if(!s.mode||s.mode===""||(s.mode!=="minify"&&s.mode!=="diff")){s.mode="beautify"}if(s.mode==="diff"&&(!s.diff||s.diff==="")){s.diff="Diff sample is missing."}if(!s.lang||s.lang===""||(s.lang!=="javascript"&&s.lang!=="css"&&s.lang!=="markup"&&s.lang!=="html"&&s.lang!=="csv"&&s.lang!=="text")){s.lang="auto"}else{if(s.lang==="html"){s.lang="markup";s.html=true}}if(typeof s.topcoms!=="boolean"){s.topcoms=false}if(!s.csvchar||typeof s.csvchar!=="string"||s.csvchar===""){s.csvchar=","}if(!s.comments||s.comments!=="noindent"){s.comments="indent"}if(typeof s.content!=="boolean"){s.content=false}if(typeof s.force_indent!=="boolean"){s.force_indent=false}if(typeof s.context!=="number"||isNaN(s.context)){s.context=""}if(!s.diffview||s.diffview!=="inline"){s.diffview="sidebyside"}if(!s.html||typeof s.html!=="boolean"){if(s.html==="html-yes"){s.html=true}else{s.html=false}}if(s.insize===undefined||isNaN(s.insize)){s.insize=4}if(typeof s.inchar!=="string"){s.inchar=" "}if(!s.indent||s.indent!=="allman"){s.indent=""}if(typeof s.quote!=="boolean"){s.quote=false}if(typeof s.semicolon!=="boolean"){s.semicolon=false}if(!s.style||s.style!=="noindent"){s.style="indent"}if(typeof s.content!=="boolean"){s.content=false}if(typeof s.sourcelabel!=="string"||s.sourcelabel.length<1){s.sourcelabel="base"}if(typeof s.difflabel!=="string"||s.difflabel.length<1){s.difflabel="base"}});var v="",u=false,p=(/^\s+$/g),r="",n="",q=function{var B="",A="",z=0,x=0,y=new Date,D=((y.getTime-d)/1000),C=D.toFixed(3),E=function(F,H){var G="";if(F>1){G=F+H+"s "}else{G=F+H+" "}return G},w=function{B=(D/60).toFixed(1);z=Number(B.toString.split(".")[0]);C=(D-(z*60)).toFixed(3);B=E(B," minute")};if(D>=60&&D<3600){w}else{if(D>=3600){A=(D/3600).toFixed(1);x=Number(A.toString.split(".")[0]);D=D-(x*3600);A=E(A," hour");w}}return" Execution time: "+A+B+C+" seconds "},t=function{var E="",D=s.source.length,C=s.source.indexOf("/*prettydiff.com")+16,B=true,A=[],z=-1,y=0,x=[],w="";if(s.source.indexOf("/*prettydiff.com")===-1&&s.diff.indexOf("/*prettydiff.com")===-1){return}if(C===15&&typeof s.diff==="string"){C=s.diff.indexOf("/*prettydiff.com")+16;B=false}else{if(C===15){return}}for(C;C<D;C+=1){if(B){if(s.source.charAt(C)==="*"&&s.source.charAt(C+1)&&s.source.charAt(C+1)==="/"){break}x.push(s.source.charAt(C))}else{if(s.diff.charAt(C)==="*"&&s.diff.charAt(C+1)&&s.diff.charAt(C+1)==="/"){break}x.push(s.diff.charAt(C))}}E=x.join("").toLowerCase;D=E.length;for(C=0;C<D;C+=1){if((!E.charAt(C-1)||E.charAt(C-1)!=="\\")&&(E.charAt(C)==='"'||E.charAt(C)==="'")){if(w===""){w=E.charAt(C)}else{w=""}}if(w===""){if(E.charAt(C)===","){y=z+1;z=C;A.push(E.substring(y,z).replace(/^(\s*)/,"").replace(/(\s*)$/,""))}}}y=z+1;z=E.length;A.push(E.substring(y,z).replace(/^(\s*)/,"").replace(/(\s*)$/,""));w="";D=A.length;x=[];for(C=0;C<D;C+=1){E=A[C].length;for(y=0;y<E;y+=1){if(A[C].indexOf(":")===-1){A[C]="";break}else{x=[]}if((!A[C].charAt(y-1)||A[C].charAt(y-1)!=="\\")&&(A[C].charAt(y)==='"'||A[C].charAt(y)==="'")){if(w===""){w=A[C].charAt(y)}else{w=""}}if(w===""){if(A[C].charAt(y)===":"){x.push(A[C].substring(0,y).replace(/(\s*)$/,""));x.push(A[C].substring(y+1).replace(/^(\s*)/,""));if(x[1].charAt(0)===x[1].charAt(x[1].length-1)&&x[1].charAt(x[1].length-2)!=="\\"&&(x[1].charAt(0)==='"'||x[1].charAt(0)==="'")){x[1]=x[1].substring(1,x[1].length-1)}A[C]=x;break}}}}for(C=0;C<D;C+=1){if(A[C][1]){if(A[C][0]==="api.mode"){if(A[C][1]==="beautify"){s.mode="beautify"}else{if(A[C][1]==="minify"){s.mode="minify"}else{if(A[C][1]==="diff"){s.mode="diff"}}}}else{if(A[C][0]==="api.lang"){if(A[C][1]==="auto"){s.lang="auto"}else{if(A[C][1]==="javascript"){s.lang="javascript"}else{if(A[C][1]==="css"){s.lang="csv"}else{if(A[C][1]==="csv"){s.lang="csv"}else{if(A[C][1]==="markup"){s.lang="markup"}else{if(A[C][1]==="text"){s.lang="text"}}}}}}}else{if(A[C][0]==="api.csvchar"){s.csvchar=A[C][1]}else{if(A[C][0]==="api.insize"&&!/\D/.test(A[C][1])){s.insize=A[C][1]}else{if(A[C][0]==="api.inchar"){s.inchar=A[C][1]}else{if(A[C][0]==="api.comments"){if(A[C][1]==="indent"){s.comments="indent"}else{if(A[C][1]==="noindent"){s.comments="noindent"}}}else{if(A[C][0]==="api.indent"){if(A[C][1]==="knr"){s.indent="knr"}else{if(A[C][1]==="allman"){s.indent="allman"}}}else{if(A[C][0]==="api.style"){if(A[C][1]==="indent"){s.style="indent"}else{if(A[C][1]==="noindent"){s.style="noindent"}}}else{if(A[C][0]==="api.html"){if(A[C][1]==="html-no"){s.html="html-no"}else{if(A[C][1]==="html-yes"){s.html="html-yes"}}}else{if(A[C][0]==="api.context"&&(!/\D/.test(A[C][1])||A[C][1]==="")){s.context=A[C][1]}else{if(A[C][0]==="api.content"){if(A[C][1]==="true"){s.content=true}else{if(A[C][1]==="false"){s.content=false}}}else{if(A[C][0]==="api.quote"){if(A[C][1]==="true"){s.quote=true}else{if(A[C][1]==="false"){s.quote=false}}}else{if(A[C][0]==="api.semicolon"){if(A[C][1]==="true"){s.semicolon=true}else{if(A[C][1]==="false"){s.semicolon=false}}}else{if(A[C][0]==="api.diffview"){if(A[C][1]==="sidebyside"){s.diffview="sidebyside"}else{if(A[C][1]==="inline"){s.diffview="inline"}}}else{if(A[C][0]==="api.sourcelabel"){s.sourcelabel=A[C][1]}else{if(A[C][0]==="api.difflabel"){s.difflabel=A[C][1]}else{if(A[C][0]==="api.topcoms"){if(A[C][1]==="true"){s.topcoms=true}else{if(A[C][1]==="false"){s.topcoms=false}}}else{if(A[C][0]==="api.force_indent"){if(A[C][1]==="true"){s.force_indent=true}else{if(A[C][1]==="false"){s.force_indent=false}}}}}}}}}}}}}}}}}}}}}}};if(s.source==="Source sample is missing."){return["Error: Source sample is missing.",""]}if(s.diff==="Diff sample is missing."&&s.mode==="diff"){return["Error: Diff sample is missing.",""]}if(s.lang==="auto"){(function{var x=s.source,w=x.replace(/\[[a-zA-Z][\w\-]*\=("|')?[a-zA-Z][\w\-]*("|')?\]/g,"").split(""),C=w.length,B=0,A=false,z="",y=false;u=true;if(!/^(\s*<)/.test(x)&&!/(>\s*)$/.test(x)){for(B=1;B<C;B+=1){if(!A){if(w[B]==="*"&&w[B-1]==="/"){w[B-1]="";A=true}else{if(!y&&w[B]==="f"&&B<C-6&&w[B+1]==="i"&&w[B+2]==="l"&&w[B+3]==="t"&&w[B+4]==="e"&&w[B+5]==="r"&&w[B+6]===":"){y=true}}}else{if(A&&w[B]==="*"&&B!==C-1&&w[B+1]==="/"){A=false;w[B]="";w[B+1]=""}else{if(y&&w[B]===";"){y=false;w[B]=""}}}if(A||y){w[B]=""}}z=w.join("");if(/^(\s*\{)/.test(x)&&/(\}\s*)$/.test(x)&&x.indexOf(",")!==-1){s.lang="javascript";v="JSON"}else{if(/((\}?(\(\))?\)*;?\s*)|([a-z0-9]("|')?\)*);?(\s*\})*)$/i.test(x)&&(/var\s+[a-z]+[a-zA-Z0-9]*/.test(x)||/(\=\s*function)|(\s*function\s+(\w*\s+)?\/.test(x)||x.indexOf("{")===-1||(/^(\s*if\s+\/).test(x))){if(s.mode==="diff"&&(x.indexOf("(")===-1||x.indexOf("=")===-1||(x.indexOf(";")===-1&&x.indexOf("{")===-1))){s.lang="text";v="Plain Text"}else{s.lang="javascript";v="JavaScript"}}else{if(/^(\s*[\$\.#@a-z0-9])|^(\s*\/\*)|^(\s*\*\s*\{)/i.test(x)&&!/^(\s*if\s*\/.test(x)&&x.indexOf("{")!==-1&&!(/\=\s*(\{|\[|\/).test(z)&&!(/(\+|\-|\=|\*|\?)\=/).test(z)&&!(/function(\s+\w+)*\s*\(/).test(z)){s.lang="css";v="CSS"}else{if(s.mode==="diff"){s.lang="text";v="unknown"}else{s.lang="javascript";v="JavaScript"}}}}}else{if((/(>[\w\s:]*)?<(\/|\!)?[\w\s:\-\[]+/.test(x)&&/^(\s*<)/.test(x)&&/(>\s*)$/.test(x))||(/^(\s*<s((cript)|(tyle)))/i.test(x)&&/(<\/s((cript)|(tyle))>\s*)$/i.test(x))){s.lang="markup";if(/^(\s*<\?xml)/.test(x)){if(/XHTML\s+1\.1/.test(x)||/XHTML\s+1\.0\s+(S|s)((trict)|(TRICT))/.test(x)){v="XHTML"}else{v="XML"}}else{if(/<[a-zA-Z]/.test(x)===false&&/<\![A-Z]/.test(x)){v="SGML"}else{if(s.html===true||/^(\s*<\!doctype html>)/i.test(x)||(/^(\s*<\!DOCTYPE\s+((html)|(HTML))\s+PUBLIC\s+)/.test(x)&&/XHTML\s+1\.1/.test(x)===false&&/XHTML\s+1\.0\s+(S|s)((trict)|(TRICT))/.test(x)===false)){v="HTML"}else{v="markup"}}}}else{if(s.mode==="diff"){s.lang="text";v="unknown"}else{s.lang="javascript";v="JavaScript"}}}if(v==="unknown"){if(s.mode==="diff"){v="Plain Text"}else{v="JavaScript"}v=" Language set to auto, but language could not be determined. Language defaulted to "+v+" . "}else{v=" Language set to auto . Presumed language is "+v+" . "}})}t;if(s.mode==="minify"){if(s.lang==="css"){r=c({source:s.source,level:3,type:"css",alter:true,fcomment:s.topcoms})}else{if(s.lang==="csv"){r=m(s.source,s.csvchar)}else{if(s.lang==="markup"){r=g({source:s.source,comments:"",presume_html:s.html,top_comments:s.topcoms})}else{if(s.lang==="text"){r=s.source}else{r=c({source:s.source,level:2,type:"javascript",alter:true,fcomment:s.topcoms})}}}}return(function{var w=function{var H=0,G=0,F=s.source,E=F.length,D=0,C=r.length,B=E-C,A=0,z=0,y=((B/E)*100).toFixed(2)+"%",x="";for(H=0;H<E;H+=1){if(F.charAt(H)==="\n"){G+=1}}D=s.source.length+G;A=D-C;z=D-E+1;x=((A/D)*100).toFixed(2)+"%";return" "};if(u===true){return[r,q+v+w]}return[r,q+w]})}if(s.mode==="beautify"){if(s.lang==="css"){r=k({source:s.source,size:s.insize,character:s.inchar,comment:s.comments,alter:true});n=j}else{if(s.lang==="csv"){r=b(s.source,s.csvchar);n=""}else{if(s.lang==="markup"){r=l({source:s.source,insize:s.insize,inchar:s.inchar,mode:"beautify",comments:s.comments,style:s.style,html:s.html,force_indent:s.force_indent});n=j;if(s.inchar!=="\t"){r=r.replace(/\n[\t]* \/>/g,"")}}else{if(s.lang==="text"){r=s.source;n=""}else{r=e({source:s.source,insize:s.insize,inchar:s.inchar,preserve:true,preserve_max:1,inlevel:0,space:true,braces:s.indent,inarray:false,comments:s.comments});n=j}}}}if(!n){n=""}if(u===true&&s.lang!=="csv"&&s.lang!=="text"){return[r,q+v+n]}return[r,q+n]}if(s.mode==="diff"){if(s.lang==="css"){r=c({source:s.source,level:3,type:"css",alter:false,fcomment:s.topcoms});r=k({source:r,size:s.insize,character:s.inchar,comment:s.comments,alter:false});n=c({source:s.diff,level:3,type:"css",alter:false,fcomment:false});n=k({source:n,size:s.insize,character:s.inchar,comment:s.comments,alter:false})}else{if(s.lang==="csv"){r=b(s.source,s.csvchar);n=b(s.diff,s.csvchar)}else{if(s.lang==="markup"){r=l({source:s.source,insize:s.insize,inchar:s.inchar,mode:"diff",comments:s.comments,style:s.style,html:s.html,content:s.content,force_indent:s.force_indent}).replace(/\n[\t]* \/>/g,"");n=l({source:s.diff,insize:s.insize,inchar:s.inchar,mode:"diff",comments:s.comments,style:s.style,html:s.html,content:s.content,force_indent:s.force_indent}).replace(/\n[\t]* \/>/g,"")}else{if(s.lang==="text"){r=s.source;n=s.diff}else{r=c({source:s.source,level:3,type:"javascript",alter:false,fcomments:false});r=e({source:r,insize:s.insize,inchar:s.inchar,preserve:true,preserve_max:1,inlevel:0,space:true,braces:s.indent,inarray:false,comments:s.comments,content:s.content});n=c({source:s.diff,level:3,type:"javascript",alter:false,fcomments:false});n=e({source:n,insize:s.insize,inchar:s.inchar,preserve:true,preserve_max:1,inlevel:0,space:true,braces:s.indent,inarray:false,comments:s.comments,content:s.content})}}}}if(s.quote===true){r=r.replace(/'/g,'"');n=n.replace(/'/g,'"')}if(s.semicolon===true){r=r.replace(/;\n/g,"\n");n=n.replace(/;\n/g,"\n")}if(s.sourcelabel===""||p.test(s.sourcelabel)){s.sourcelabel="Base Text"}if(s.difflabel===""||p.test(s.difflabel)){s.difflabel="New Text"}if(s.diffview==="inline"){s.diffview=true}return(function{var w=[],z="s",y="s",x="";if(r==="Error: This does not appear to be JavaScript."||n==="Error: This does not appear to be JavaScript."){w[1]=[" Error: Please try using the option labeled Plain Text (diff only) . The input does not appear to be markup, CSS, or JavaScript. ",0,0]}else{if(s.lang!=="text"){x=s.inchar}w[1]=a({baseTextLines:r,newTextLines:n,baseTextName:s.sourcelabel,newTextName:s.difflabel,contextSize:s.context,inline:s.diffview,tchar:x,tsize:s.insize});if(w[1][2]===1){y="";if(w[1][1]===0){z=""}}}w[0]=" Number of differences: "+(w[1][1]+w[1][2])+" difference"+z+" from "+w[1][2]+" line"+y+" of code. ";if(u===true){return[w[1][0],q+v+w[0]]}return[w[1][0],q+w[0]]})}};return f(i)};if(typeof exports==="object"&&exports!==undefined){exports.api=function(a){return prettydiff(a)}};