Registry.require(["helper"],function(){var l=Registry.get("helper"),k={mkCompat:function(a,b,c,e){if(b){if(b.options.compat_wrappedjsobject||e)a=k.unWrappedJsObjectify(a);if(b.options.compat_metadata||e)a=k.unMetaDataify(a);if(b.options.compat_foreach||e)a=k.unEachify(a);if(b.options.compat_arrayleft||e)a=k.unArrayOnLeftSideify(a);b.options.compat_forvarin&&(a=k.fixForVarXStatements(a))}c||(a=a.replace(/([\'\"]{1,1})use strict([\'\"]{1,1})/g,"$1use\u00a0strict$2"));return a},findPrototypes:function(a){if(-1!=
a.indexOf(".toSource("))return!0;var b="indexOf lastIndexOf filter forEach every map some slice".split(" "),c;for(c in b)if(-1!=a.indexOf("Array."+b[c]+"("))return!0},fixForVarXStatements:function(a){a=a.replace(/for[ \t.]*\([ \t.]*var/gi,"for (var");a=a.split("for (");for(var b=1;b<a.length;b++){var c=a[b],e=c.indexOf(")");if(-1!=e){var f=c.substr(0,e);if(-1!=f.search(/[ \r\n]*in[ \r\n]/)){var d=f.match(/^[ \r\n]*(?:var[ \r\n\t]*)*(.*?)[ \r\n]* in [ \r\n]*(.*?)$/);null==d||3>d.length||(f=d[1],d=
d[2],!f||!d||e>c.length||c.search(/\)[\n\r\t ]*\{/)!=e||(c="",c+="{     if (!"+d+".hasOwnProperty("+f+")) continue;",a[b]=a[b].replace("{",c)))}}}return a.join("for (")},unArrayOnLeftSideify:function(a){a=a.split("\n");for(var b in a){var c=a[b],e=c.replace(/[\t ]/g,""),f=e.search("]="),d=e.search("]=="),h=e.search("\\[");-1!=h&&""!=e.substr(0,h)&&(f=-1);if(-1!=f&&f!=d){var f="",d=c.search("="),d=c.substr(d+1,c.length-d-1),c="__narf"+b.toString(),f=f+("var "+c+" = "+d+";\n"),e=l.getStringBetweenTags(e,
"[","]=").split(","),g;for(g in e)d=e[g],""!=d.trim()&&(f+=d+" = "+c+"["+g+"];\n");a[b]=f}}return a.join("\n")},unEachify:function(a){a=a.replace(/for each[ \t]*\(/gi,"for each(");a=a.split("for each");for(var b=1;b<a.length;b++){var c=a[b];if("("!=c.substr(0,1))a[b]=" each"+a[b];else{var c=l.getStringBetweenTags(c,"(",")"),e=c.split(" "),f=null,d=null,h=null,g;for(g in e)""!=e[g]&&"var"!=e[g]&&(f?d?h||(h=e[g]):d=e[g]:f=e[g]);f&&h?(e="var __kk in "+h,d="",d+="{\n    if (!"+h+".hasOwnProperty(__kk)) continue;",
d+=" \n    var "+f+" = "+h+"[__kk];",a[b]=a[b].replace(c,e).replace("{",d)):a[b]=" each"+a[b]}}return a.join("for")},unMetaDataify:function(a){for(var b=a,c=b.indexOf("<><![CDATA[");-1!=c;){var e=b.substr(0,c),f=e.lastIndexOf("\n"),d="";-1!=f&&(d=e.substr(f,e.length-f));b=b.substr(c,b.length-c);c=d.indexOf("/*");d=d.indexOf("//");-1==c&&-1==d&&(d=l.getStringBetweenTags(b,"<><![CDATA[","]]\x3e</>"),c=d.replace(/\"/g,'\\"').replace(/\n/g,'\\n" + \n"'),c=c.replace(/^\n/g,"").replace(/\n$/g,""),c=c.replace(/\r/g,
""),a=a.replace("<><![CDATA["+d+"]]\x3e</>",'(new CDATA("'+c+'"))'));b=b.substr(1,b.length-1);c=b.indexOf("<><![CDATA[")}return a},unWrappedJsObjectify:function(a){a=a.split("\n");for(var b in a){var c=a[b].search(".wrappedJSObject");if(-1!=c){var e=a[b].search("\\/\\/");-1!=e&&e<c||(a[b]=a[b].replace(/\.wrappedJSObject/g,""))}}return a.join("\n")}};Registry.register("compat","0",function(){return k})});
