require.def("core/lib",["core/trace"],function(a){var b={},c=navigator.userAgent.toLowerCase();b.isFirefox=/firefox/.test(c),b.isOpera=/opera/.test(c),b.isWebkit=/webkit/.test(c),b.isSafari=/webkit/.test(c),b.isIE=/msie/.test(c)&&!/opera/.test(c),b.isIE6=/msie 6/i.test(navigator.appVersion),b.browserVersion=(c.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],b.isIElt8=b.isIE&&b.browserVersion-0<8,b.extend=function d(a,c){var d={};b.append(d,a),b.append(d,c);return d},b.append=function(a,b){for(var c in b)a[c]=b[c];return a},b.bind=function(){var a=b.cloneArray(arguments),c=a.shift(),d=a.shift();return function(){return c.apply(d,b.arrayInsert(b.cloneArray(a),0,arguments))}},b.bindFixed=function(){var a=b.cloneArray(arguments),c=a.shift(),d=a.shift();return function(){return c.apply(d,a)}},b.dispatch=function(b,c,d){for(var e=0;b&&e=a.top&&c<=a.top+a.height&&b>=a.left&&b<=a.left+a.width},b.cloneArray=function(a,b){var c=[];if(b)for(var d=0;d2?2:b,b=b<-1?-1:b;if(b==-1)return a+" B";var c=Math.pow(10,b);return a==-1||a==undefined?"?":a==0?"0":a<1024?a+" B":a<1048576?Math.round(a/1024*c)/c+" KB":Math.round(a/1048576*c)/c+" MB"},b.formatTime=function(a){return a==-1?"-":a<1e3?a+"ms":a<6e4?Math.ceil(a/10)/100+"s":Math.ceil(a/6e4*100)/100+"m"},b.formatNumber=function(a){a+="";var b=a.split("."),c=b[0],d=b.length>1?"."+b[1]:"",e=/(\d+)(\d{3})/;while(e.test(c))c=c.replace(e,"$1 $2");return c+d},b.formatString=function(a){var c=b.cloneArray(arguments),a=c.shift();for(var d=0;d0?"-":"+")+b(Math.abs(e))+":"+b(Math.abs(f));return c+g},b.getFileName=function(c){try{var d=b.splitURLBase(c);return d.name}catch(e){a.log(unescape(c))}return c},b.getFileExtension=function(a){if(!a)return null;var b=a.indexOf("?");b!=-1&&(a=a.substr(0,b));var c=a.lastIndexOf(".");return a.substr(c+1)},b.splitURLBase=function(a){if(b.isDataURL(a))return b.splitDataURL(a);return b.splitURLTrue(a)},b.isDataURL=function(a){return a&&a.substr(0,5)=="data:"},b.splitDataURL=function(a){var c=a.indexOf(":",3);if(c!=4)return!1;var d=a.indexOf(",",c+1);if(d"+l}else e.name=k.name,e.path=k.path}else e.hasOwnProperty("path")||(e.path="data:"),e.hasOwnProperty("name")||(e.name=decodeURIComponent(e.encodedContent.substr(0,200)).replace(/\s*$/,""));return e},b.splitURLTrue=function(a){var b=/:\/{1,3}(.*?)\/([^\/]*?)\/?($|\?.*)/,c=b.exec(a);return c?c[2]?{path:c[1],name:c[2]+c[3]}:{path:c[1],name:c[1]}:{name:a,path:a}},b.getURLParameter=function(a){var b=window.location.search.substring(1),c=b.split("&");for(var d=0;dd&&!c&&(k=b.$STR("LargeData")),e.push({name:f(j),value:f(k)})}else{var j=g[h];e.push({name:f(j),value:""})}}catch(l){}e.sort(function(a,b){return a.name<=b.name?-1:1});return e},b.getBody=function(a){if(a.body)return a.body;var b=a.getElementsByTagName("body")[0];if(b)return b;return null},b.getHead=function(a){return a.getElementsByTagName("head")[0]},b.getAncestorByClass=function(a,c){for(var d=a;d;d=d.parentNode)if(b.hasClass(d,c))return d;return null},b.$=function(){return b.getElementByClass.apply(this,arguments)},b.getElementByClass=function(a,c){if(!a)return null;var d=b.cloneArray(arguments);d.splice(0,1);for(var e=a.firstChild;e;e=e.nextSibling){var f=b.cloneArray(d);f.unshift(e);if(b.hasClass.apply(this,f))return e;var g=b.getElementByClass.apply(this,f);if(g)return g}return null},b.getElementsByClass=function(a,c){function f(a,c,d){for(var e=a.firstChild;e;e=e.nextSibling){var g=b.cloneArray(c);g.unshift(e),b.hasClass.apply(null,g)&&d.push(e),f(e,c,d)}}if(a.querySelectorAll){var d=b.cloneArray(arguments);d.shift();var e="."+d.join(".");return a.querySelectorAll(e)}var g=[],d=b.cloneArray(arguments);d.shift(),f(a,d,g);return g},b.getChildByClass=function(a){for(var c=1;c=0){var d=b.length;a.className=a.className.substr(0,c-1)+a.className.substr(c+d)}}},b.toggleClass=function(a,c){if(b.hasClass(a,c)){b.removeClass(a,c);return!1}b.setClass(a,c);return!0},b.setClassTimed=function(a,c,d){d||(d=1300),a.__setClassTimeout?clearTimeout(a.__setClassTimeout):b.setClass(a,c),a.__setClassTimeout=setTimeout(function(){delete a.__setClassTimeout,b.removeClass(a,c)},d)},b.trim=function(a){return a.replace(/^\s*|\s*$/g,"")},b.wrapText=function(a,c){var d=/[^A-Za-z_$0-9'"-]/,e=[],f=100,g=b.splitLines(a);for(var h=0;hf){var j=d.exec(i.substr(f,100)),k=f+(j?j.index:0),l=i.substr(0,k);i=i.substr(k),c||e.push("
"),e.push(c?l:b.escapeHTML(l)),c||e.push("
")}c||e.push("
"),e.push(c?i:b.escapeHTML(i)),c||e.push("
")}return e.join(c?"\n":"")},b.insertWrappedText=function(a,c,d){c.innerHTML="
"+b.wrapText(a,d)+"
"},b.splitLines=function(a){var b=/\r\n|\r|\n/;if(!a)return[];if(a.split)return a.split(b);var c=a+"",d=c.split(b);return d},b.getPrettyDomain=function(a){var b=/[^:]+:\/{1,3}(www\.)?([^\/]+)/.exec(a);return b?b[2]:""},b.escapeHTML=function(a){function b(a){switch(a){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}return"?"}return String(a).replace(/[<>&"']/g,b)},b.cropString=function(a,c){a=a+"";if(c)var d=c/2;else var d=50;return a.length>c?b.escapeNewLines(a.substr(0,d)+"..."+a.substr(a.length-d)):b.escapeNewLines(a)},b.escapeNewLines=function(a){return a.replace(/\r/g,"\\r").replace(/\n/g,"\\n")},b.cloneJSON=function(b){if(b==null||typeof b!="object")return b;try{var c=b.constructor();for(var d in b)c[d]=this.cloneJSON(b[d]);return c}catch(e){a.exception(e)}return null},b.getOverflowParent=function(a){for(var b=a.parentNode;b;b=b.offsetParent)if(b.scrollHeight>b.offsetHeight)return b},b.getElementBox=function(a){var c={};if(a.getBoundingClientRect){var d=a.getBoundingClientRect(),e=b.isIE?document.body.clientTop||document.documentElement.clientTop:0,f=b.getWindowScrollPosition();c.top=Math.round(d.top-e+f.top),c.left=Math.round(d.left-e+f.left),c.height=Math.round(d.bottom-d.top),c.width=Math.round(d.right-d.left)}else{var g=b.getElementPosition(a);c.top=g.top,c.left=g.left,c.height=a.offsetHeight,c.width=a.offsetWidth}return c},b.getElementPosition=function(a){var b=0,c=0;do b+=a.offsetLeft,c+=a.offsetTop;while(a=a.offsetParent);return{left:b,top:c}},b.getWindowSize=function(){var a=0,b=0,c;typeof window.innerWidth=="number"?(a=window.innerWidth,b=window.innerHeight):(c=document.documentElement)&&(c.clientHeight||c.clientWidth)?(a=c.clientWidth,b=c.clientHeight):(c=document.body)&&(c.clientHeight||c.clientWidth)&&(a=c.clientWidth,b=c.clientHeight);return{width:a,height:b}},b.getWindowScrollSize=function(){var a=0,c=0,d;!b.isIEQuiksMode&&(d=document.documentElement)&&(d.scrollHeight||d.scrollWidth)&&(a=d.scrollWidth,c=d.scrollHeight),(d=document.body)&&(d.scrollHeight||d.scrollWidth)&&(d.scrollWidth>a||d.scrollHeight>c)&&(a=d.scrollWidth,c=d.scrollHeight);return{width:a,height:c}},b.getWindowScrollPosition=function(){var a=0,b=0,c;typeof window.pageYOffset=="number"?(a=window.pageYOffset,b=window.pageXOffset):(c=document.body)&&(c.scrollTop||c.scrollLeft)?(a=c.scrollTop,b=c.scrollLeft):(c=document.documentElement)&&(c.scrollTop||c.scrollLeft)&&(a=c.scrollTop,b=c.scrollLeft);return{top:a,left:b}},b.scrollIntoCenterView=function(a,c,d,e){if(a){c||(c=b.getOverflowParent(a));if(!c)return;var f=b.getClientOffset(a);if(!e){var g=f.y-c.scrollTop,h=c.scrollTop+c.clientHeight-(f.y+a.offsetHeight);if(g<0||h<0){var i=f.y-c.clientHeight/2;c.scrollTop=i}}if(!d){var j=f.x-c.scrollLeft,k=c.scrollLeft+c.clientWidth-(f.x+a.clientWidth);if(j<0||k<0){var l=f.x-c.clientWidth/2;c.scrollLeft=l}}}},b.getClientOffset=function(a){function b(a,c,d){var e=a.offsetParent,f=d.getComputedStyle(a,"");a.offsetLeft&&(c.x+=a.offsetLeft+parseInt(f.borderLeftWidth)),a.offsetTop&&(c.y+=a.offsetTop+parseInt(f.borderTopWidth)),e?e.nodeType==1&&b(e,c,d):a.ownerDocument.defaultView.frameElement&&b(a.ownerDocument.defaultView.frameElement,c,a.ownerDocument.defaultView)}var c={x:0,y:0};if(a){var d=a.ownerDocument.defaultView;b(a,c,d)}return c},b.addStyleSheet=function(a,c){if(!a.getElementById(c)){var d=a.createElement("link");d.type="text/css",d.rel="stylesheet",d.href=c,d.setAttribute("id",c);var e=b.getHead(a);e.appendChild(d)}},b.selectElementText=function(a,b,c){var d=window,e=d.document;if(d.getSelection&&e.createRange){var f=d.getSelection(),g=e.createRange();g.setStart(a,b),g.setEnd(a,c),f.removeAllRanges(),f.addRange(g)}else e.body.createTextRange&&(g=e.body.createTextRange(),g.moveToElementText(a),g.select())};return b}),function(){function c(a,b,c,d,e){var f=d+b+"/"+e;require._fileExists(a.nameToUrl(f,null))&&c.push(f)}function b(a,b,c,d,e,f){b[a]&&(c.push(a),(b[a]===!0||b[a]===1)&&d.push(e+a+"/"+f))}var a=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",{version:"0.24.0",load:function(d,e,f,g){g=g||{};var h,i=a.exec(d),j=i[1],k=i[4],l=i[5],m=k.split("-"),n=[],o={},p,q,r="";i[5]?(j=i[1],h=j+l):(h=d,l=i[4],k=g.locale||(g.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),m=k.split("-"));if(g.isBuild){n.push(h),c(e,"root",n,j,l);for(p=0;q=m[p];p++)r+=(r?"-":"")+q,c(e,r,n,j,l);e(n),f()}else e([h],function(a){var c=[];b("root",a,c,n,j,l);for(p=0;q=m[p];p++)r+=(r?"-":"")+q,b(r,a,c,n,j,l);e(n,function(){var b,d;for(b=c.length-1;b>-1&&(q=c[b]);b--){d=a[q];if(d===!0||d===1)d=e(j+q+"/"+l);require.mixin(o,d)}f(o)})})}})}(),define("nls/requestList",{root:{fromCache:"From Cache",menuBreakLayout:"Break Timeline Layout",menuOpenRequestInWindow:"Open Request in New Window",menuOpenResponseInWindow:"Open Response in New Window",request:"Request",requests:"Requests",tooltipSize:"%S (%S bytes)",tooltipZippedSize:"%S (%S bytes) - compressed",tooltipUnzippedSize:"%S (%S bytes) - uncompressed",unknownSize:"Unknown size","request.Started":"Request start time since the beginning","request.phases.label":"Request phases start and elapsed time relative to the request start:","request.phase.Resolving":"DNS Lookup","request.phase.Connecting":"Connecting","request.phase.Blocking":"Blocking","request.phase.Sending":"Sending","request.phase.Waiting":"Waiting","request.phase.Receiving":"Receiving","request.timings.label":"Event timing relative to the request start:",ContentLoad:"DOM Loaded",WindowLoad:"Page Loaded","page.event.Load":"Page Loaded",menuBreakTimeline:"Break Timeline Layout",menuOpenRequest:"Open Request in New Window",menuOpenResponse:"Open Response in New Window"}}),require.def("preview/jsonSchema",[],function(){var a={validate:function(a,b){return this._validate(a,b,!1)},checkPropertyChange:function(a,b,c){return this._validate(a,b,c||"property")},_validate:function(a,b,c){function f(a,b,f,g){if(typeof b=="object"){(typeof a!="object"||a instanceof Array)&&d.push({property:f,message:"an object is required"});for(var h in b)if(b.hasOwnProperty(h)&&(h.charAt(0)!="_"||h.charAt(1)!="_")){var i=a[h],j=b[h];e(i,j,f,h)}}for(h in a){a.hasOwnProperty(h)&&(h.charAt(0)!="_"||h.charAt(1)!="_")&&b&&!b[h]&&g===!1&&d.push({property:f,message:typeof i+"The property "+h+" is not defined in the schema and the schema does not allow additional properties"});var k=b&&b[h]&&b[h].requires;k&&!(k in a)&&d.push({property:f,message:"the presence of the property "+h+" requires that "+k+" also be present"}),i=a[h],b&&typeof b=="object"&&!(h in b)&&e(i,g,f,h),!c&&i&&i.$schema&&(d=d.concat(e(i,i.$schema,f,h)))}return d}function e(a,b,g,h){function k(a,b){if(a){if(typeof a=="string"&&a!="any"&&(a=="null"?b!==null:typeof b!=a)&&!(b instanceof Array&&a=="array")&&(a!="integer"||b%1!==0))return[{property:g,message:typeof b+" value found, but a "+a+" is required"}];if(a instanceof Array){var c=[];for(var f=0;fb.maxItems&&j("There must be a maximum of "+b.maxItems+" in the array")}else b.properties&&d.concat(f(a,b.properties,g,b.additionalProperties));b.pattern&&typeof a=="string"&&!a.match(b.pattern)&&j("does not match the regex pattern "+b.pattern),b.maxLength&&typeof a=="string"&&a.length>b.maxLength&&j("may only be "+b.maxLength+" characters long"),b.minLength&&typeof a=="string"&&a.lengtha&&j("must have a minimum value of "+b.minimum),typeof b.maximum!==undefined&&typeof a==typeof b.maximum&&b.maximum=32&&b<127||b==10||b==13)return a.charAt(0);var c=b.toString(16).toUpperCase();while(c.length<4)c="0"+c;return"\\u"+c}).join("");return a}function h(){this.input=null}h.prototype={append:function(b){{if(b){b.log.entries.sort(function(b,c){var d=a.parseISO8601(b.startedDateTime),e=a.parseISO8601(c.startedDateTime);if(de)return 1;return 0});if(this.input){if(!b.log.pages){f.error("Import of additional data without a page is not yet supported.");return null}for(var c=0;c0?a[0]:null},getPageEntries:function(a){return h.getPageEntries(this.input,a)},getAllEntries:function(a){return this.input?this.input.log.entries:[]},getParentPage:function(a){return h.getParentPage(this.input,a)},importPage:function(a,b){var c=this.getUniquePageID(a.id),d=a.id;a.id=c,this.input.log.pages.push(a);for(var e=0;e0)&&h.length>0)return this.loadRemoteArchive(h,f,b,c);var j=a.getURLParameter("path");if(j)return this.loadLocalArchive(j,b,c)},loadExample:function(a,b){var c=document.location.href,d=c.indexOf("?");document.location=c.substr(0,d)+"?path="+a,e.setCookie("timeline",!0),e.setCookie("stats",!0)},loadLocalArchive:function(a,b,c){$.ajax({url:a,context:this,success:function(a){b(a)},error:function(a,b){c(a,b)}});return!0},loadRemoteArchive:function(a,b,c,d){if(!a.length)return!1;var e=a.shift();b||(b="onInputData"),$.ajax({url:e,context:this,dataType:"jsonp",jsonp:"callback",jsonpCallback:b,success:function(e){c&&c(e);if(a.length){var f=this;setTimeout(function(){f.loadRemoteArchive(a,b,c,d)},300)}},error:function(a,b){d&&d(a,b)}});return!0},load:function(a,b,c,d,e,f){function h(b,c){a.onLoadError&&a.onLoadError(b,c),f&&f.call(a,b,c)}function g(b){a.appendPreview&&a.appendPreview(b),e&&e.call(a,b)}return c?this.loadRemoteArchive([b],d,g,h):this.loadLocalArchive(b,g,h)}};return h}),define("nls/requestBody",{root:{RequestHeaders:"Request Headers",ResponseHeaders:"Response Headers",RequestCookies:"Request Cookies",ResponseCookies:"Response Cookies",URLParameters:"Params",Headers:"Headers",Post:"Post",Put:"Put",Cookies:"Cookies",Response:"Response",Cache:"Cache",HTML:"HTML",DataURL:"Data URL"}}),require.def("domplate/tabView",["domplate/domplate","core/lib","core/trace"],function(Domplate,Lib,Trace){with(Domplate){var TabViewTempl=domplate({tag:TABLE({"class":"tabView",cellpadding:0,cellspacing:0,_repObject:"$tabView"},TBODY(TR({"class":"tabViewRow"},TD({"class":"tabViewCol",valign:"top"},TAG("$tabList",{tabView:"$tabView"}))))),tabList:DIV({"class":"tabViewBody",onclick:"$onClickTab"},DIV({"class":"$tabView.id\\Bar tabBar"}),DIV({"class":"$tabView.id\\Bodies tabBodies"})),tabHeaderTag:A({"class":"$tab.id\\Tab tab",view:"$tab.id",_repObject:"$tab"},"$tab.label"),tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"}),hideTab:function(a){return!1},onClickTab:function(a){var b=Lib.fixEvent(a),c=this.getTabView(b.target);c.onClickTab(b)},getTabView:function(a){var b=Lib.getAncestorByClass(a,"tabView");return b.repObject}});function TabView(a){this.id=a,this.tabs=[],this.listeners=[],this.tabBarVisibility=!0}TabView.prototype={appendTab:function(a){this.tabs.push(a),a.tabView=this;return a},removeTab:function(a){for(var b in this.tabs){var c=this.tabs[b];if(c.id==a){this.tabs.splice(b,1);break}}},getTab:function(a){for(var b in this.tabs){var c=this.tabs[b];if(c.id==a)return c}},selectTabByName:function(a){var b=Lib.getElementByClass(this.element,a+"Tab");b&&this.selectTab(b)},showTabBar:function(a){this.element?a?this.element.removeAttribute("hideTabBar"):this.element.setAttribute("hideTabBar","true"):this.tabBarVisibility=a},addListener:function(a){this.listeners.push(a)},removeListener:function(a){Lib.remove(this.listeners,a)},onClickTab:function(a){var b=Lib.getAncestorByClass(a.target,"tab");b&&this.selectTab(b)},selectTab:function(a){if(Lib.hasClass(a,"tab")){if(Lib.hasClass(a,"selected")&&a._updated)return;var b=a.getAttribute("view");if(!b)return;var c=Lib.getAncestorByClass(a,"tabViewBody");c.selectedTab&&(c.selectedTab.removeAttribute("selected"),c.selectedBody.removeAttribute("selected"),Lib.removeClass(c.selectedTab,"selected"),Lib.removeClass(c.selectedBody,"selected"));var d=Lib.getElementByClass(c,"tab"+b+"Body");d||Trace.error("TabView.selectTab; Missing tab body",a),c.selectedTab=a,c.selectedBody=d,c.selectedTab.setAttribute("selected","true"),c.selectedBody.setAttribute("selected","true"),Lib.setClass(c.selectedBody,"selected"),Lib.setClass(c.selectedTab,"selected"),this.updateTabBody(c,b)}},updateTabBody:function(a,b){var c=a.selectedTab.repObject;if(!c._body._updated){c._body._updated=!0,c.bodyTag&&c.bodyTag.replace({tab:c},c._body),c&&c.onUpdateBody&&c.onUpdateBody(this,c._body);for(var d=0;dAbout...

dp.SyntaxHighlighter

Version: {V}

http://www.dreamprojections.com/syntaxhighlighter

©2004-2007 Alex Gorbatchev.
'},ClipboardSwf:null,Version:"1.5.1"}};a.SyntaxHighlighter=a.sh,a.sh.Toolbar.Commands={ExpandSource:{label:"+ expand source",check:function(a){return a.collapse},func:function(a,b){a.parentNode.removeChild(a),b.div.className=b.div.className.replace("collapsed","")}},ViewSource:{label:"view plain",func:function(b,c){var d=a.sh.Utils.FixForBlogger(c.originalCode).replace(/'+d+""),e.document.close()}},CopyToClipboard:{label:"copy to clipboard",check:function(){return window.clipboardData!=null||a.sh.ClipboardSwf!=null},func:function(b,c){var d=a.sh.Utils.FixForBlogger(c.originalCode).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&");if(window.clipboardData)window.clipboardData.setData("text",d);else if(a.sh.ClipboardSwf!=null){var e=c.flashCopier;e==null&&(e=document.createElement("div"),c.flashCopier=e,c.div.appendChild(e)),e.innerHTML=''}alert("The code is in your clipboard now")}},PrintSource:{label:"print",func:function(b,c){var d=document.createElement("IFRAME"),e=null;d.style.cssText="position:absolute;width:0px;height:0px;left:-500px;top:-500px;",document.body.appendChild(d),e=d.contentWindow.document,a.sh.Utils.CopyStyles(e,window.document),e.write('
'+c.div.innerHTML+"
"),e.close(),d.contentWindow.focus(),d.contentWindow.print(),alert("Printing..."),document.body.removeChild(d)}},About:{label:"?",func:function(b){var c=window.open("","_blank","dialog,width=300,height=150,scrollbars=0"),d=c.document;a.sh.Utils.CopyStyles(d,window.document),d.write(a.sh.Strings.AboutDialog.replace("{V}",a.sh.Version)),d.close(),c.focus()}}},a.sh.Toolbar.Create=function(b){var c=document.createElement("DIV");c.className="tools";for(var d in a.sh.Toolbar.Commands){var e=a.sh.Toolbar.Commands[d];if(e.check!=null&&!e.check(b))continue;c.innerHTML+='"+e.label+""}return c},a.sh.Toolbar.Command=function(b,c){var d=c;while(d!=null&&d.className.indexOf("dp-highlighter")==-1)d=d.parentNode;d!=null&&a.sh.Toolbar.Commands[b].func(c,d.highlighter)},a.sh.Utils.CopyStyles=function(a,b){var c=b.getElementsByTagName("link");for(var d=0;d')},a.sh.Utils.FixForBlogger=function(b){return a.sh.isBloggerMode==!0?b.replace(/|<br\s*\/?>/gi,"\n"):b},a.sh.RegexLib={MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"',"g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")},a.sh.Match=function(a,b,c){this.value=a,this.index=b,this.length=a.length,this.css=c},a.sh.Highlighter=function(){this.noGutter=!1,this.addControls=!0,this.collapse=!1,this.tabsToSpaces=!0,this.wrapColumn=80,this.showColumns=!0},a.sh.Highlighter.SortCallback=function(a,b){if(a.indexb.index)return 1;if(a.lengthb.length)return 1;return 0},a.sh.Highlighter.prototype.CreateElement=function(a){var b=document.createElement(a);b.highlighter=this;return b},a.sh.Highlighter.prototype.GetMatches=function(b,c){var d=0,e=null;while((e=b.exec(this.code))!=null)this.matches[this.matches.length]=new a.sh.Match(e[0],e.index,c)},a.sh.Highlighter.prototype.AddBit=function(a,b){if(a!=null&&a.length!=0){var c=this.CreateElement("SPAN");a=a.replace(/ /g," "),a=a.replace(/");if(b!=null)if(/br/gi.test(a)){var d=a.split(" 
");for(var e=0;ec.index&&a.index/gi,"\n"),c=b.split("\n");this.addControls==!0&&this.bar.appendChild(a.sh.Toolbar.Create(this));if(this.showColumns){var d=this.CreateElement("div"),e=this.CreateElement("div"),f=10,g=1;while(g<=150)g%f==0?(d.innerHTML+=g,g+=(g+"").length):(d.innerHTML+="·",g++);e.className="columns",e.appendChild(d),this.bar.appendChild(e)}for(var g=0,h=this.firstLine;g0;h++){if(c(d[h]).length==0)continue;var i=f.exec(d[h]);i!=null&&i.length>0&&(g=Math.min(i[0].length,g))}if(g>0)for(var h=0;h0&&c.appendTab(new HeadersTab(b)),b.request.queryString&&b.request.queryString.length&&c.appendTab(new ParamsTab(b)),b.request.postData&&c.appendTab(new SentDataTab(b,b.request.method)),b.response.content.text&&b.response.content.text.length>0&&c.appendTab(new ResponseTab(b)),this.showCache(b)&&c.appendTab(new CacheTab(b)),this.showHtml(b)&&c.appendTab(new HtmlTab(b)),this.showDataURL(b)&&c.appendTab(new DataURLTab(b));var d=c.render(a);c.tabs.length>0&&c.selectTabByName(c.tabs[0].id);return d},showCache:function(a){if(!a.cache)return!1;if(!a.cache.afterRequest)return!1;if(a.category=="image")return!1;return!0},showHtml:function(a){return a.response.content.mimeType=="text/html"||a.mimeType=="application/xhtml+xml"},showDataURL:function(a){return a.request.url.indexOf("data:")==0}});function HeadersTab(a){this.file=a}HeadersTab.prototype=domplate(TabView.Tab.prototype,{id:"Headers",label:Strings.Headers,bodyTag:TABLE({"class":"netInfoHeadersText netInfoText netInfoHeadersTable",cellpadding:0,cellspacing:0},TBODY(TR({"class":"netInfoResponseHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},Strings.ResponseHeaders))),TR({"class":"netInfoRequestHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},Strings.RequestHeaders))))),headerDataTag:FOR("param","$headers",TR(TD({"class":"netInfoParamName"},"$param.name"),TD({"class":"netInfoParamValue"},PRE("$param|getParamValue")))),getParamValue:function(a){return Lib.wrapText(a.value,!0)},onUpdateBody:function(a,b){this.file.response.headers&&this.insertHeaderRows(b,this.file.response.headers,"Headers","ResponseHeaders"),this.file.request.headers&&this.insertHeaderRows(b,this.file.request.headers,"Headers","RequestHeaders")},insertHeaderRows:function(a,b,c,d){var e=Lib.getElementByClass(a,"netInfo"+c+"Table"),f=Lib.getElementByClass(e,"netInfo"+d+"Title");b.length?(this.headerDataTag.insertRows({headers:b},f?f:a),Lib.removeClass(f,"collapsed")):Lib.setClass(f,"collapsed")}});function ResponseTab(a){this.file=a}ResponseTab.prototype=domplate(TabView.Tab.prototype,{id:"Response",label:Strings.Response,bodyTag:DIV({"class":"netInfoResponseText netInfoText"},PRE({"class":"javascript:nocontrols:nogutter:",name:"code"})),onUpdateBody:function(a,b){var c=Lib.getElementByClass(b,"netInfoResponseText");if(this.file.category=="image"){Lib.clearNode(c);var d=b.ownerDocument.createElement("img");d.src=this.file.href,c.appendChild(d,c)}else{Lib.clearNode(c.firstChild);var e=this.file.response.content.text,f=this.file.response.content.mimeType;f=="application/javascript"||f=="text/javascript"||f=="application/x-javascript"||f=="text/ecmascript"||f=="application/ecmascript"?(c.firstChild.innerHTML=e,dp.SyntaxHighlighter.HighlightAll(c.firstChild)):Lib.insertWrappedText(e,c.firstChild)}}});function ParamsTab(a){this.file=a}ParamsTab.prototype=domplate(HeadersTab.prototype,{id:"Params",label:Strings.URLParameters,bodyTag:TABLE({"class":"netInfoParamsText netInfoText netInfoParamsTable",cellpadding:0,cellspacing:0},TBODY()),onUpdateBody:function(a,b){if(this.file.request.queryString){var c=Lib.getElementByClass(b,"netInfoParamsText");this.insertHeaderRows(c,this.file.request.queryString,"Params")}}});function SentDataTab(a,b){b=b.charAt(0).toUpperCase()+b.slice(1).toLowerCase(),this.file=a,this.id=b,this.label=Strings[b]}SentDataTab.prototype=domplate(HeadersTab.prototype,{bodyTag:DIV({"class":"netInfo$tab.id\\Text netInfoText"},TABLE({"class":"netInfo$tab.id\\Table",cellpadding:0,cellspacing:0},TBODY())),onUpdateBody:function(a,b){var c=this.file.request.postData;if(c){var d=Lib.getElementByClass(b,"netInfo"+this.id+"Text");c.mimeType=="application/x-www-form-urlencoded"?this.insertHeaderRows(d,c.params,this.id):Lib.insertWrappedText(c.text,d)}}});function CookiesTab(a){this.file=a}CookiesTab.prototype=domplate(HeadersTab.prototype,{id:"Cookies",label:Strings.Cookies,bodyTag:DIV({"class":"netInfoCookiesText netInfoText"},TABLE({"class":"netInfoCookiesTable",cellpadding:0,cellspacing:0},TBODY(TR({"class":"netInfoResponseCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},Strings.ResponseCookies))),TR({"class":"netInfoRequestCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},Strings.RequestCookies)))))),onUpdateBody:function(a,b){if(file.response.cookies){var c=Lib.getElementByClass(b,"netInfoParamsText");this.insertHeaderRows(c,file.response.cookies,"Cookies","ResponseCookies")}if(file.request.cookies){var c=Lib.getElementByClass(b,"netInfoParamsText");this.insertHeaderRows(c,file.request.cookies,"Cookies","RequestCookies")}}});function CacheTab(a){this.file=a}CacheTab.prototype=domplate(HeadersTab.prototype,{id:"Cache",label:Strings.Cache,bodyTag:DIV({"class":"netInfoCacheText netInfoText"},TABLE({"class":"netInfoCacheTable",cellpadding:0,cellspacing:0},TBODY())),onUpdateBody:function(a,b){if(this.file.cache&&this.file.cache.afterRequest){var c=this.file.cache.afterRequest,d=[];for(var e in c)d.push({name:e,value:c[e]});this.insertHeaderRows(b,d,"Cache")}}});function HtmlTab(a){this.file=a}HtmlTab.prototype=domplate(HeadersTab.prototype,{id:"HTML",label:Strings.HTML,bodyTag:DIV({"class":"netInfoHtmlText netInfoText"},IFRAME({"class":"netInfoHtmlPreview",onload:"$onLoad"}),DIV({"class":"htmlPreviewResizer"})),onUpdateBody:function(a,b){this.preview=Lib.getElementByClass(b,"netInfoHtmlPreview");var c=parseInt(Cookies.getCookie("htmlPreviewHeight"));isNaN(c)||(this.preview.style.height=c+"px");var d=Lib.getElementByClass(b,"htmlPreviewResizer");this.resizer=new DragDrop.Tracker(d,{onDragStart:Lib.bind(this.onDragStart,this),onDragOver:Lib.bind(this.onDragOver,this),onDrop:Lib.bind(this.onDrop,this)})},onLoad:function(a){var b=Lib.fixEvent(a),c=Lib.getAncestorByClass(b.target,"tabHTMLBody").repObject;c.preview.contentWindow.document.body.innerHTML=c.file.response.content.text},onDragStart:function(a){var b=Lib.getBody(this.preview.ownerDocument);b.setAttribute("hResizing","true"),this.startHeight=this.preview.clientHeight},onDragOver:function(a,b){var c=this.startHeight+a.y;this.preview.style.height=c+"px",Cookies.setCookie("htmlPreviewHeight",c)},onDrop:function(a){var b=Lib.getBody(this.preview.ownerDocument);b.removeAttribute("hResizing")}});function DataURLTab(a){this.file=a}DataURLTab.prototype=domplate(HeadersTab.prototype,{id:"DataURL",label:Strings.DataURL,bodyTag:DIV({"class":"netInfoDataURLText netInfoText"}),onUpdateBody:function(a,b){var c=Lib.getElementByClass(b,"netInfoDataURLText"),d=this.file.request.url;if(d.indexOf("data:image")==0){var e=b.ownerDocument.createElement("img");e.src=d,c.appendChild(e)}else Lib.insertWrappedText(unescape(d),c)}});return RequestBody}}),require.def("domplate/infoTip",["domplate/domplate","core/lib","core/trace"],function(Domplate,Lib,Trace){with(Domplate){var InfoTip=Lib.extend({listeners:[],maxWidth:100,maxHeight:80,infoTipMargin:10,infoTipWindowPadding:25,tags:domplate({infoTipTag:DIV({"class":"infoTip"})}),initialize:function(){if(!$.browser.msie){var a=$("body");a.bind("mouseover",Lib.bind(this.onMouseMove,this)),a.bind("mouseout",Lib.bind(this.onMouseOut,this)),a.bind("mousemove",Lib.bind(this.onMouseMove,this));return this.infoTip=this.tags.infoTipTag.append({},Lib.getBody(document))}},showInfoTip:function(a,b,c,d,e,f){var g=Lib.getOverflowParent(b),h=c+(g?g.scrollLeft:0),i=Lib.dispatch2(this.listeners,"showInfoTip",[a,b,h,d,e,f]);if(i){var j=a.ownerDocument.documentElement,k=j.clientWidth,l=j.clientHeight;c+a.offsetWidth+this.infoTipMargin>k-this.infoTipWindowPadding?(a.style.left="auto",a.style.right=k-c+this.infoTipMargin+"px"):(a.style.left=c+this.infoTipMargin+"px",a.style.right="auto"),d+a.offsetHeight+this.infoTipMargin>l?(a.style.top=Math.max(0,l-(a.offsetHeight+this.infoTipMargin))+"px",a.style.bottom="auto"):(a.style.top=d+this.infoTipMargin+"px",a.style.bottom="auto"),a.setAttribute("active","true")}else this.hideInfoTip(a)},hideInfoTip:function(a){a&&a.removeAttribute("active")},onMouseOut:function(a){a.relatedTarget||this.hideInfoTip(this.infoTip)},onMouseMove:function(a){this.infoTip.setAttribute("multiline",!1);var b=a.clientX,c=a.clientY;this.showInfoTip(this.infoTip,a.target,b,c,a.rangeParent,a.rangeOffset)},populateTimingInfoTip:function(a,b){this.tags.colorTag.replace({rgbValue:b},a);return!0},addListener:function(a){this.listeners.push(a)},removeListener:function(a){Lib.remove(this.listeners,a)}});InfoTip.initialize();return InfoTip}}),require.def("domplate/popupMenu",["domplate/domplate","core/lib","core/trace"],function(Domplate,Lib,Trace){with(Domplate){var Controller={controllers:[],controllerContext:{label:"controller context"},initialize:function(a){this.controllers=[],this.controllerContext=a||this.controllerContext},shutdown:function(){this.removeControllers()},addController:function(){for(var a=0,b;b=arguments[a];a++){typeof b[0]=="string"&&(b[0]=$$(b[0],this.controllerContext));var c=b[2];b[2]=Lib.bind(c,this),b[3]=c,this.controllers.push(b),Lib.addEventListener.apply(this,b)}},removeController:function(){for(var a=0,b;b=arguments[a];a++)for(var c=0,d;d=this.controllers[c];c++)b[0]==d[0]&&b[1]==d[1]&&b[2]==d[3]&&Lib.removeEventListener.apply(this,d)},removeControllers:function(){for(var a=0,b;b=this.controllers[a];a++)Lib.removeEventListener.apply(this,b)}},menuItemProps={"class":"$item.className",type:"$item.type",value:"$item.value",_command:"$item.command"};Lib.isIE6&&(menuItemProps.href="javascript:void(0)");var MenuPlate=domplate({tag:DIV({"class":"popupMenu popupMenuShadow"},DIV({"class":"popupMenuContent popupMenuShadowContent"},FOR("item","$object.items|memberIterator",TAG("$item.tag",{item:"$item"})))),itemTag:A(menuItemProps,"$item.label"),checkBoxTag:A(Lib.extend(menuItemProps,{checked:"$item.checked"}),"$item.label"),radioButtonTag:A(Lib.extend(menuItemProps,{selected:"$item.selected"}),"$item.label"),groupTag:A(Lib.extend(menuItemProps,{child:"$item.child"}),"$item.label"),shortcutTag:A(menuItemProps,"$item.label",SPAN({"class":"popupMenuShortcutKey"},"$item.key")),separatorTag:SPAN({"class":"popupMenuSeparator"}),memberIterator:function(a){var b=[];for(var c=0,d=a.length;c0?a.response.status+" ":"";return b+a.response.statusText},getType:function(a){return a.response.content.mimeType},getDomain:function(a){return Lib.getPrettyDomain(a.request.url)},getSize:function(a){var b=a.response.bodySize,c=b&&b!=-1?b:a.response.content.size;return this.formatSize(c)},isExpandable:function(a){var b=a.response.headers.length>0,c=a.request.url.indexOf("data:")==0;return b||c},formatSize:function(a){return Lib.formatSize(a)},getElapsedTime:function(a){var b=Math.round(a.time*10)/10;return Lib.formatTime(b)},onClick:function(a){var b=Lib.fixEvent(a);if(Lib.isLeftClick(a)){var c=Lib.getAncestorByClass(b.target,"netRow");c&&(this.toggleHeadersRow(c),Lib.cancelEvent(a))}else Lib.isControlClick(a)&&window.open(a.target.innerText||a.target.textContent)},toggleHeadersRow:function(a){if(Lib.hasClass(a,"isExpandable")){var b=a.repObject;Lib.toggleClass(a,"opened");if(Lib.hasClass(a,"opened")){var c=this.netInfoTag.insertRows({},a)[0];c.repObject=b;var d=new RequestBody;d.render(c.firstChild,b)}else{var c=a.nextSibling,e=Lib.getElementByClass(c,"netInfoBody");a.parentNode.removeChild(c)}}},onOpenOptions:function(a){var b=Lib.fixEvent(a);Lib.cancelEvent(a);if(Lib.isLeftClick(a)){var c=b.target,d=Lib.getAncestorByClass(c,"netRow"),e=this.getMenuItems(d);if(!e.length)return;var f=new Menu({id:"requestContextMenu",items:e});f.showPopup(c)}},getMenuItems:function(a){var b=a.repObject,c=a.phase,d=c.files[0]==b&&this.phases[0]==c,e=[{label:Strings.menuBreakTimeline,type:"checkbox",disabled:d,checked:c.files[0]==b&&!d,command:Lib.bind(this.breakLayout,this,a)},"-",{label:Strings.menuOpenRequest,command:Lib.bind(this.openRequest,this,b)},{label:Strings.menuOpenResponse,disabled:!b.response.content.text,command:Lib.bind(this.openResponse,this,b)}];Lib.dispatch(this.listeners,"getMenuItems",[e,this.input,b]);return e},openRequest:function(a,b){window.open(b.request.url)},openResponse:function(a,b){var c=b.response.content.text,d=b.response.content.mimeType,e=b.response.content.encoding,f="data:"+(d?d:"")+";"+(e?e:"")+","+c;window.open(f)},breakLayout:function(a,b){var c=b.repObject,d=b.phase,e=d.files[0]==c;b.breakLayout=!e,b.setAttribute("breakLayout",b.breakLayout?"true":"false");var f=Lib.getAncestorByClass(b,"netTable"),g=HarModel.getParentPage(this.input,c);this.updateLayout(f,g)},updateLayout:function(a,b){var c=HarModel.getPageEntries(this.input,b);this.table=a;var d=this.table.firstChild,e=this.firstRow=d.firstChild.nextSibling;this.phases=[];var f=Cookies.getCookie("phaseInterval");f||(f=4e3);var g=null,h=b?Lib.parseISO8601(b.startedDateTime):null,i=b&&b.pageTimings?b.pageTimings.onLoad:-1;i>0&&(i+=h);for(var j=0;j=0&&(o=l>i&&l-m>=f&&l+k.time>=n+f),typeof e.breakLayout=="boolean"?!g||e.breakLayout?g=this.startPhase(k):g.addFile(k):!g||o?g=this.startPhase(k):g.addFile(k),this.phases[0]!=g&&e.setAttribute("breakLayout",g.files[0]==k?"true":"false");if(g.startTime==undefined||g.startTime>l)g.startTime=l;if(g.endTime==undefined||g.endTime0){var g=d+f-c.startTime,h=(g/this.phaseElapsed*100).toFixed(3);c.pageTimings[e].offset=h}}}},updateTimeline:function(a){var b=this.table.firstChild,c;for(var d=this.firstRow;d;d=d.nextSibling){var e=d.repObject;if(!e)continue;if(Lib.hasClass(d,"netInfoRow"))continue;c=this.calculateFileTimes(a,e,c),d.phase=e.phase,delete e.phase;var f=Lib.getElementByClass(d,"netTimelineBar"),g=f.children[0],h=g.nextSibling,i=h.nextSibling,j=i.nextSibling,k=j.nextSibling,l=k.nextSibling;g.style.left=i.style.left=h.style.left=j.style.left=k.style.left=l.style.left=this.barOffset+"%",g.style.width=this.barBlockingWidth+"%",h.style.width=this.barResolvingWidth+"%",i.style.width=this.barConnectingWidth+"%",j.style.width=this.barSendingWidth+"%",k.style.width=this.barWaitingWidth+"%",l.style.width=this.barReceivingWidth+"%";var m=Lib.getElementsByClass(f,"netPageTimingBar");for(var n=0;n0&&b.push({label:d.name,time:e,classes:d.classes,comment:d.description})}var f=a.pageTimings?a.pageTimings._timeStamps:[];f&&b.push.apply(b,f);var g=this.phases;for(var c=0;c=h.startTime)h.startTime>l&&(h.startTime=l),h.endTime0&&(o+=" (onload: "+Lib.formatTime(a.pageTimings.onLoad)+")"),n.innerHTML=o}},formatRequestCount:function(a){return a+" "+(a==1?Strings.request:Strings.requests)},summarizePhase:function(a){var b=0,c=0,d="all";d=="all"&&(d=null);var e=0,f=0,g=0;for(var h=0;hg&&(g=m)}}var n=g-f;return{cachedSize:b,totalSize:c,totalTime:n,fileCount:e}},showInfoTip:function(a,b,c,d){var e=Lib.getAncestorByClass(b,"netTable");if(e&&e.repObject==this){var f=Lib.getAncestorByClass(b,"netRow");if(f){if(Lib.getAncestorByClass(b,"netBar")){a.setAttribute("multiline",!0);var g=f.repObject.startedDateTime+"-nettime";this.infoTipURL=g;return this.populateTimeInfoTip(a,f)}if(Lib.hasClass(b,"netSizeLabel")){var g=f.repObject.startedDateTime+"-netsize";this.infoTipURL=g;return this.populateSizeInfoTip(a,f)}}}},populateTimeInfoTip:function(a,b){EntryTimeInfoTip.render(this,b,a);return!0},populateSizeInfoTip:function(a,b){EntrySizeInfoTip.render(this,b,a);return!0},render:function(a,b){var c=HarModel.getPageEntries(this.input,b);if(!c.length)return null;return this.append(a,b,c)},append:function(a,b,c){this.table||(this.table=this.tableTag.replace({requestList:this},a,this)),this.summaryRow||(this.summaryRow=this.summaryTag.insertRows({},this.table.firstChild)[0]);var d=this.table.firstChild,e=d.lastChild.previousSibling,f=this.fileTag.insertRows({files:c},e,this);this.updateLayout(this.table,b);return f[0]},addPageTiming:function(a){this.pageTimings.push(a)}});function Phase(a){this.files=[],this.pageTimings=[],this.addFile(a)}Phase.prototype={addFile:function(a){this.files.push(a),a.phase=this},getLastStartTime:function(){return this.files[this.files.length-1].startedDateTime}};var EntryTimeInfoTip=domplate({tableTag:TABLE({"class":"timeInfoTip"},TBODY()),timingsTag:FOR("time","$timings",TR({"class":"timeInfoTipRow",$collapsed:"$time|hideBar"},TD({"class":"$time|getBarClass timeInfoTipBar",$loaded:"$time.loaded",$fromCache:"$time.fromCache"}),TD({"class":"timeInfoTipCell startTime"},"$time.start|formatStartTime"),TD({"class":"timeInfoTipCell elapsedTime"},"$time.elapsed|formatTime"),TD("$time|getLabel"))),startTimeTag:TR(TD(),TD("$startTime.time|formatStartTime"),TD({"class":"timeInfoTipStartLabel",colspan:2},"$startTime|getLabel")),separatorTag:TR({},TD({"class":"timeInfoTipSeparator",colspan:4,height:"10px"},SPAN("$label"))),eventsTag:FOR("event","$events",TR({"class":"timeInfoTipEventRow"},TD({"class":"timeInfoTipBar",align:"center"},DIV({"class":"$event|getPageTimingClass timeInfoTipEventBar"})),TD("$event.start|formatStartTime"),TD({colspan:2},"$event|getTimingLabel"))),hideBar:function(a){return!a.elapsed&&a.bar=="request.phase.Blocking"},getBarClass:function(a){var b=a.bar.substr(a.bar.lastIndexOf(".")+1);return"net"+b+"Bar"},getPageTimingClass:function(a){return a.classes?a.classes:""},formatTime:function(a){return Lib.formatTime(a)},formatStartTime:function(a){var b=a>0,c=Lib.formatTime(Math.abs(a));if(!a)return c;return(b>0?"+":"-")+c},getLabel:function(a){return Strings[a.bar]},getTimingLabel:function(a){return a.bar},render:function(a,b,c){var d=a.input,e=b.repObject,f=HarModel.getParentPage(d,e),g=f?Lib.parseISO8601(f.startedDateTime):null,h=Lib.parseISO8601(e.startedDateTime),i=EntryTimeInfoTip.tableTag.replace({},c),j={};g?j.time=h-g:j.time=h-b.phase.startTime,j.bar="request.Started",this.startTimeTag.insertRows({startTime:j},i.firstChild),this.separatorTag.insertRows({label:Strings["request.phases.label"]},i.firstChild);var k=0,l=[],m=e.timings.blocked,n=e.timings.dns,o=e.timings.ssl,p=e.timings.connect,q=e.timings.send,r=e.timings.wait,s=e.timings.receive;m>=0&&l.push({bar:"request.phase.Blocking",elapsed:m,start:k}),n>=0&&l.push({bar:"request.phase.Resolving",elapsed:n,start:k+=m<0?0:m}),p>=0&&l.push({bar:"request.phase.Connecting",elapsed:p,start:k+=n<0?0:n}),q>=0&&l.push({bar:"request.phase.Sending",elapsed:q,start:k+=p<0?0:p}),r>=0&&l.push({bar:"request.phase.Waiting",elapsed:r,start:k+=q<0?0:q}),s>=0&&l.push({bar:"request.phase.Receiving",elapsed:s,start:k+=r<0?0:r,loaded:e.loaded,fromCache:e.fromCache}),this.timingsTag.insertRows({timings:l},i.firstChild);if(!f)return!0;var t=[];for(var u=0;u-1;e.push({label:Strings["column.label."+g],type:"checkbox",checked:h,command:Lib.bindFixed(this.onToggleColumn,this,g)}),h&&(c=f,d++)}d==1&&(e[c].disabled=!0),e.push("-"),e.push({label:Strings["action.label.Reset"],command:Lib.bindFixed(this.updateColumns,this)});return e},onToggleColumn:function(a){var b=RequestList.getVisibleColumns();Lib.remove(b,a)||b.push(a),this.updateColumns(b)},updateColumns:function(a){a||(a=RequestList.defaultColumns),RequestList.setVisibleColumns(a)},createRequestList:function(){var a=new RequestList(this.input);a.listeners=this.listeners;return a},append:function(a){var b=this.createRequestList();b.render(a,null);var c=this.input.log.pages;if(c&&c.length){var d=this.tableTag.append({input:this.input},a,this),e=Lib.getElementsByClass(d,"pageRow"),f=Lib.getElementsByClass(a,"pageTable");e.length==1&&f.length==1&&this.toggleRow(e[0]);var g=Lib.getURLParameter("expand");g&&this.expandAll(d)}},render:function(a){this.append(a)},addListener:function(a){this.listeners.push(a)},removeListener:function(a){Lib.remove(this.listeners,a)}}),PageList.prototype.pageTimings=[];return PageList}}),require.def("domplate/toolbar",["domplate/domplate","core/lib","core/trace","domplate/popupMenu"],function(Domplate,Lib,Trace,Menu){with(Domplate){var ToolbarTempl=domplate({tag:DIV({"class":"toolbar",onclick:"$onClick"}),buttonTag:SPAN({"class":"$button|getClassName toolbarButton",title:"$button.tooltiptext",$text:"$button|hasLabel",onclick:"$button|getCommand"},"$button|getLabel"),dropDownTag:SPAN({"class":"$button|getClassName toolbarButton dropDown",_repObject:"$button",title:"$button.tooltiptext",$text:"$button|hasLabel",onclick:"$onDropDown"},"$button|getLabel",SPAN({"class":"arrow"})),separatorTag:SPAN({"class":"toolbarSeparator",style:"color: gray;"},"|"),hasLabel:function(a){return a.label?!0:!1},getLabel:function(a){return a.label?a.label:""},getClassName:function(a){return a.className?a.className:""},getCommand:function(a){return a.command?a.command:function(){}},onClick:function(a){var b=$.event.fix(a||window.event);Lib.cancelEvent(b)},onDropDown:function(a){var b=$.event.fix(a||window.event),c=b.target,d=Lib.getAncestorByClass(c,"toolbarButton"),e=d.repObject.items,f=new Menu({id:"toolbarContextMenu",items:e});f.showPopup(d)}});function Toolbar(){this.buttons=[]}Toolbar.prototype={addButton:function(a){a.tooltiptext||(tooltiptext=""),this.buttons.push(a)},removeButton:function(a){for(var b=0;b0?Lib.setClass(a,"opened"):Lib.removeClass(a,"opened")})},render:function(a,b){return this.tag.append({object:b},a,this)}});return Menu}}),require.def("preview/validationError",["domplate/domplate","core/lib","core/trace","domplate/popupMenu"],function(Domplate,Lib,Trace,Menu){with(Domplate){var ValidationError=domplate({errorTable:TABLE({"class":"errorTable",cellpadding:3,cellspacing:0},TBODY(FOR("error","$errors",TR({"class":"errorRow",_repObject:"$error"},TD({"class":"errorProperty"},SPAN("$error.property")),TD({"class":"errorOptions",$hasTarget:"$error|hasTarget"},DIV({"class":"errorOptionsTarget",onclick:"$onOpenOptions"}," ")),TD(" "),TD({"class":"errorMessage"},SPAN("$error.message")))))),hasTarget:function(a){return a.input&&a.file},onOpenOptions:function(a){var b=Lib.fixEvent(a);Lib.cancelEvent(a);if(Lib.isLeftClick(a)){var c=b.target,d=Lib.getAncestorByClass(c,"errorRow"),e=d.repObject;if(!e||!e.input||!e.file)return;var f=this.getMenuItems(e.input,e.file);if(!f.length)return;var g=new Menu({id:"requestContextMenu",items:f});g.showPopup(c)}},getMenuItems:function(a,b){var c=[];Lib.dispatch(this.listeners,"getMenuItems",[c,a,b]);return c},listeners:[],addListener:function(a){this.listeners.push(a)},removeListener:function(a){Lib.remove(this.listeners,a)},appendError:function(a,b){a.errors&&this.errorTable.append(a,b)}});return ValidationError}}),require.def("harPreview",["preview/requestList","preview/pageList","preview/harModel","core/lib","core/trace","preview/menu","preview/validationError"],function(a,b,c,d,e,f,g){function h(){this.id="harPreview",this.model=new c}h.prototype={initialize:function(a){this.topMenu=new f,this.topMenu.render(a);var b=d.bind(this.appendPreview,this),e=d.bind(this.onError,this);c.Loader.run(b,e)},appendPreview:function(a){try{var f=!0,h=d.getURLParameter("validate");h=="false"&&(f=!1);var j=c.parse(a,f);this.model.append(j);var k=new b(j);k.render(i),d.fireEvent(i,"onPreviewHARLoaded")}catch(l){e.exception("HarPreview.appendPreview; EXCEPTION ",l),g.appendError(l,i)}},onError:function(a,b){e.log("HarPreview; Load error ",a,b)},loadHar:function(a,b){b=b||{};return c.Loader.load(this,a,b.jsonp,b.jsonpCallback,b.success,b.ajaxError)},setPreviewColumns:function(b,c){a.setVisibleColumns(b,c)}};var i=document.getElementById("content"),j=i.repObject=new h;d.fireEvent(i,"onPreviewPreInit"),j.initialize(i),d.fireEvent(i,"onPreviewInit"),e.log("HarPreview; initialized OK")})