har 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.travis.yml +4 -3
  4. data/LICENSE +1 -1
  5. data/README.mdown +5 -1
  6. data/har.gemspec +1 -1
  7. data/lib/har/version.rb +1 -1
  8. data/lib/har/viewer/css/domTab.css +1 -1
  9. data/lib/har/viewer/css/domTree.css +1 -1
  10. data/lib/har/viewer/css/dragdrop.css +1 -0
  11. data/lib/har/viewer/css/harPreview.css +1 -1
  12. data/lib/har/viewer/css/harView.css +1 -1
  13. data/lib/har/viewer/css/harViewer.css +1 -1
  14. data/lib/har/viewer/css/images/menu/previewMenuHandle.png +0 -0
  15. data/lib/har/viewer/css/images/splitterh.png +0 -0
  16. data/lib/har/viewer/css/images/twisty-sprites.png +0 -0
  17. data/lib/har/viewer/css/infoTip.css +1 -1
  18. data/lib/har/viewer/css/pageList.css +1 -1
  19. data/lib/har/viewer/css/previewMenu.css +1 -0
  20. data/lib/har/viewer/css/previewTab.css +1 -1
  21. data/lib/har/viewer/css/requestBody.css +1 -1
  22. data/lib/har/viewer/css/requestList.css +1 -1
  23. data/lib/har/viewer/css/search.css +1 -0
  24. data/lib/har/viewer/css/tableView.css +1 -0
  25. data/lib/har/viewer/css/toolbar.css +1 -1
  26. data/lib/har/viewer/css/validationError.css +1 -0
  27. data/lib/har/viewer/css/xhrSpy.css +1 -1
  28. data/lib/har/viewer/examples/browser-blocking-time.har +2567 -0
  29. data/lib/har/viewer/examples/google.com.har +612 -0
  30. data/lib/har/viewer/examples/inline-scripts-block.har +1066 -0
  31. data/lib/har/viewer/examples/inline-scripts-block.harp +1065 -0
  32. data/lib/har/viewer/examples/softwareishard.com.har +5323 -0
  33. data/lib/har/viewer/examples/www.coupons.com-analytics-log.har +18253 -0
  34. data/lib/har/viewer/har.js +1 -0
  35. data/lib/har/viewer/index.html +5 -4
  36. data/lib/har/viewer/license.txt +30 -0
  37. data/lib/har/viewer/scripts/app.build.js +1 -0
  38. data/lib/har/viewer/scripts/core/cookies.js +1 -2
  39. data/lib/har/viewer/scripts/core/dragdrop.js +1 -0
  40. data/lib/har/viewer/scripts/core/lib.js +1 -23
  41. data/lib/har/viewer/scripts/core/trace.js +26 -26
  42. data/lib/har/viewer/scripts/domplate/domTree.js +1 -5
  43. data/lib/har/viewer/scripts/domplate/domplate.js +3 -1
  44. data/lib/har/viewer/scripts/domplate/infoTip.js +1 -4
  45. data/lib/har/viewer/scripts/domplate/popupMenu.js +1 -14
  46. data/lib/har/viewer/scripts/domplate/tabView.js +1 -6
  47. data/lib/har/viewer/scripts/domplate/tableView.js +1 -0
  48. data/lib/har/viewer/scripts/domplate/toolTip.js +1 -3
  49. data/lib/har/viewer/scripts/domplate/toolbar.js +1 -3
  50. data/lib/har/viewer/scripts/downloadify/js/downloadify.min.js +1 -6
  51. data/lib/har/viewer/scripts/downloadify/js/swfobject.js +1 -18
  52. data/lib/har/viewer/scripts/downloadify/src/downloadify.js +1 -6
  53. data/lib/har/viewer/scripts/excanvas/excanvas.js +1 -21
  54. data/lib/har/viewer/scripts/harPreview.js +1 -149
  55. data/lib/har/viewer/scripts/harViewer.js +1 -244
  56. data/lib/har/viewer/scripts/i18n.js +1 -0
  57. data/lib/har/viewer/scripts/jquery-plugins/jquery.json.js +1 -6
  58. data/lib/har/viewer/scripts/jquery.js +1 -0
  59. data/lib/har/viewer/scripts/json-query/JSONQuery.js +1 -0
  60. data/lib/har/viewer/scripts/nls/domTab.js +1 -0
  61. data/lib/har/viewer/scripts/nls/harModel.js +1 -0
  62. data/lib/har/viewer/scripts/nls/harViewer.js +1 -1
  63. data/lib/har/viewer/scripts/nls/homeTab.js +1 -1
  64. data/lib/har/viewer/scripts/nls/pageList.js +1 -0
  65. data/lib/har/viewer/scripts/nls/pageStats.js +1 -2
  66. data/lib/har/viewer/scripts/nls/pageTimeline.js +1 -1
  67. data/lib/har/viewer/scripts/nls/previewTab.js +1 -1
  68. data/lib/har/viewer/scripts/nls/requestBody.js +1 -1
  69. data/lib/har/viewer/scripts/nls/requestList.js +1 -2
  70. data/lib/har/viewer/scripts/nls/search.js +1 -0
  71. data/lib/har/viewer/scripts/nls/tableView.js +1 -0
  72. data/lib/har/viewer/scripts/preview/harModel.js +1 -7
  73. data/lib/har/viewer/scripts/preview/harSchema.js +9 -9
  74. data/lib/har/viewer/scripts/preview/jsonSchema.js +1 -7
  75. data/lib/har/viewer/scripts/preview/menu.js +1 -0
  76. data/lib/har/viewer/scripts/preview/pageList.js +1 -4
  77. data/lib/har/viewer/scripts/preview/ref.js +1 -5
  78. data/lib/har/viewer/scripts/preview/requestBody.js +1 -11
  79. data/lib/har/viewer/scripts/preview/requestList.js +1 -27
  80. data/lib/har/viewer/scripts/preview/validationError.js +1 -0
  81. data/lib/har/viewer/scripts/require.js +1 -0
  82. data/lib/har/viewer/scripts/syntax-highlighter/README.txt +9 -9
  83. data/lib/har/viewer/scripts/syntax-highlighter/shCore.js +1 -20
  84. data/lib/har/viewer/scripts/tabs/aboutTab.html +89 -93
  85. data/lib/har/viewer/scripts/tabs/aboutTab.js +1 -2
  86. data/lib/har/viewer/scripts/tabs/domTab.js +1 -1
  87. data/lib/har/viewer/scripts/tabs/homeTab.html +41 -34
  88. data/lib/har/viewer/scripts/tabs/homeTab.js +1 -5
  89. data/lib/har/viewer/scripts/tabs/pageStats.js +1 -14
  90. data/lib/har/viewer/scripts/tabs/pageTimeline.js +1 -10
  91. data/lib/har/viewer/scripts/tabs/previewTab.js +1 -6
  92. data/lib/har/viewer/scripts/tabs/schemaTab.js +1 -2
  93. data/lib/har/viewer/scripts/tabs/search.js +1 -0
  94. data/lib/har/viewer/scripts/text.js +1 -0
  95. data/spec/spec_helper.rb +2 -7
  96. metadata +55 -49
  97. data/lib/har/viewer/css/images/menu/Thumbs.db +0 -0
  98. data/lib/har/viewer/css/images/twistyClosed.png +0 -0
  99. data/lib/har/viewer/css/images/twistyOpen.png +0 -0
  100. data/lib/har/viewer/scripts/requireplugins-jquery-1.4.2.js +0 -204
  101. data/lib/har/viewer/scripts/xhr-spy/spy.js +0 -2
  102. data/lib/har/viewer/scripts/xhr-spy/spy.php +0 -13
  103. data/lib/har/viewer/scripts/xhr-spy/xhr.js +0 -6
  104. data/lib/har/viewer/scripts/xhr-spy/xhrSpyBookmarklet.js +0 -1
@@ -0,0 +1 @@
1
+ (function(){function d(a,b,c,d){d=d||!1,a.addEventListener?a.addEventListener(b,c,d):a.attachEvent("on"+b,c)}function c(){var b=[];if(document.getElementsByClassName)b=document.getElementsByClassName("har");else if(document.getElementsByTagName){var c=document.getElementsByTagName("div");for(var d=0;d<c.length;d++){var e=c[d].className;e&&e.match(a)&&b.push(c[d])}}var f=[];for(var d=0;d<b.length;d++)f.push(b[d]);return f}function b(b){var c=b.className.replace(a," ");b.className=c.replace(/^\s*|\s*$/g,"")}window.harInitialize=function(){var a=document.getElementById("har"),d=a.src.lastIndexOf("/"),e=a.src.substr(0,d+1),f=c();for(var g=0;g<f.length;g++){var h=f[g],i=h.getAttribute("data-har");if(!i)continue;var j=h.getAttribute("width"),k=h.getAttribute("height"),l=h.getAttribute("expand"),m=h.getAttribute("validate"),n="?"+(i.indexOf("http:")==0?"inputUrl":"path")+"="+i;l!="false"&&(n+="&expand="+(l?l:"true")),m=="false"&&(n+="&validate=false");var o=document.createElement("iframe");o.setAttribute("style","border: 1px solid lightgray;"),o.setAttribute("frameborder","0"),o.setAttribute("width",j?j:"100%"),o.setAttribute("height",k?k:"150px"),o.setAttribute("src",e+"preview.php"+n),h.appendChild(o),b(h)}};var a=new RegExp("(^|\\s)har(\\s|$)","g");harInitialize(),d(window,"load",harInitialize,!1)})()
@@ -1,13 +1,14 @@
1
1
  <!DOCTYPE html>
2
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
3
  <head>
4
- <title>HTTP Archive Viewer 2.0.5</title>
4
+ <title>HTTP Archive Viewer 2.0.16</title>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
6
  </head>
6
7
  <body class="harBody">
7
- <div id="content" version="2.0.5"></div>
8
+ <div id="content" version="2.0.16"></div>
8
9
  <!--[if IE]><script type="text/javascript" src="scripts/excanvas/excanvas.js"></script><![endif]-->
9
- <script src="scripts/requireplugins-jquery-1.4.2.js"></script>
10
- <script>require(["harViewer"]);</script>
10
+ <script src="scripts/jquery.js"></script>
11
+ <script data-main="scripts/harViewer" src="scripts/require.js"></script>
11
12
  <link rel="stylesheet" href="css/harViewer.css" type="text/css"/>
12
13
  </body>
13
14
  </html>
@@ -0,0 +1,30 @@
1
+ Software License Agreement (BSD License)
2
+
3
+ Copyright (c) 2007, Jan Odvarko
4
+ All rights reserved.
5
+
6
+ Redistribution and use of this software in source and binary forms, with or without modification,
7
+ are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above
10
+ copyright notice, this list of conditions and the
11
+ following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above
14
+ copyright notice, this list of conditions and the
15
+ following disclaimer in the documentation and/or other
16
+ materials provided with the distribution.
17
+
18
+ * Neither the name of Jan Odvarko. nor the names of its
19
+ contributors may be used to endorse or promote products
20
+ derived from this software without specific prior
21
+ written permission of Jan Odvarko.
22
+
23
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
24
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
25
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
26
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
29
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1 @@
1
+ {appDir:"../",baseUrl:"scripts/",dir:"../../webapp-build",optimizeCss:"standard",modules:[{name:"harViewer",include:["nls/harViewer","nls/homeTab","nls/pageStats","nls/previewTab","nls/requestBody","nls/requestList"],excludeShallow:["domplate/domplate","core/trace"]},{name:"harPreview",include:["nls/requestBody","nls/requestList"],excludeShallow:["domplate/domplate","core/trace"]}]}
@@ -1,2 +1 @@
1
- require.def("core/cookies",["core/lib"],function(f){return{getCookie:function(c){for(var b=document.cookie.split(";"),a=0;a<b.length;a++){var d=b[a].split("=");if(f.trim(d[0])==c)return d[1].length?unescape(f.trim(d[1])):null}},setCookie:function(c,b,a,d,g,h){var e=new Date;e.setTime(e.getTime());if(a)a=a*1E3*60*60*24;e=new Date(e.getTime()+a);document.cookie=c+"="+escape(b)+(a?";expires="+e.toGMTString():"")+(d?";path="+d:"")+(g?";domain="+g:"")+(h?";secure":"")},removeCookie:function(c,b,a){if(this.getCookie(c))document.cookie=
2
- c+"="+(b?";path="+b:"")+(a?";domain="+a:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}});
1
+ require.def("core/cookies",["core/lib"],function(a){var b={getCookie:function(b){var c=document.cookie.split(";");for(var d=0;d<c.length;d++){var e=c[d].split("=");if(a.trim(e[0])==b)return e[1].length?unescape(a.trim(e[1])):null}},setCookie:function(a,b,c,d,e,f){var g=new Date;g.setTime(g.getTime()),c&&(c=c*1e3*60*60*24);var h=new Date(g.getTime()+c);document.cookie=a+"="+escape(b)+(c?";expires="+h.toGMTString():"")+(d?";path="+d:"")+(e?";domain="+e:"")+(f?";secure":"")},removeCookie:function(a,b,c){this.getCookie(a)&&(document.cookie=a+"="+(b?";path="+b:"")+(c?";domain="+c:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT")},toggleCookie:function(a){var b=this.getBooleanCookie(a);this.setCookie(a,!b)},getBooleanCookie:function(a){var b=this.getCookie(a);return!b||b=="false"?!1:!0},setBooleanCookie:function(a,b){this.setCookie(a,b?"true":"false")}};return b})
@@ -0,0 +1 @@
1
+ require.def("core/dragdrop",["core/lib"],function(a){function d(a){return isNaN(window.scrollX)?new c(a.clientX+document.documentElement.scrollLeft+document.body.scrollLeft,a.clientY+document.documentElement.scrollTop+document.body.scrollTop):new c(a.clientX+window.scrollX,a.clientY+window.scrollY)}function c(a,b){this.x=a,this.y=b,this.Add=function(a){var b=new c(this.x,this.y);a!=null&&(isNaN(a.x)||(b.x+=a.x),isNaN(a.y)||(b.y+=a.y));return b},this.Subtract=function(a){var b=new c(this.x,this.y);a!=null&&(isNaN(a.x)||(b.x-=a.x),isNaN(a.y)||(b.y-=a.y));return b},this.Bound=function(a,b){var c=this.Max(a);return c.Min(b)},this.Check=function(){var a=new c(this.x,this.y);isNaN(a.x)&&(a.x=0),isNaN(a.y)&&(a.y=0);return a},this.Apply=function(a){typeof a=="string"&&(a=document.getElementById(a));a&&(isNaN(this.x)||(a.style.left=this.x+"px"),isNaN(this.y)||(a.style.top=this.y+"px"))}}function b(b,c){this.element=b,this.handle=b,this.callbacks=c,this.cursorStartPos=null,this.cursorLastPos=null,this.dragging=!1,this.onDragStart=a.bind(this.onDragStart,this),this.onDragOver=a.bind(this.onDragOver,this),this.onDrop=a.bind(this.onDrop,this),a.addEventListener(this.element,"mousedown",this.onDragStart,!1),this.active=!0}b.prototype={onDragStart:function(b){var c=a.fixEvent(b);this.dragging||(this.callbacks.onDragStart&&this.callbacks.onDragStart(this),this.dragging=!0,this.cursorStartPos=d(c),this.cursorLastPos=this.cursorStartPos,a.addEventListener(this.element.ownerDocument,"mousemove",this.onDragOver,!1),a.addEventListener(this.element.ownerDocument,"mouseup",this.onDrop,!1),a.cancelEvent(c))},onDragOver:function(b){if(this.dragging){var c=a.fixEvent(b);a.cancelEvent(c);var e=d(c),e=e.Subtract(this.cursorStartPos);if(this.cursorLastPos.x==e.x&&this.cursorLastPos.y==e.y)return;if(this.callbacks.onDragOver!=null){var f=this.callbacks.onDragOver(e,this);this.cursorLastPos=e}}},onDrop:function(b){if(this.dragging){var c=a.fixEvent(b);a.cancelEvent(c),this.dragStop()}},dragStop:function(){this.dragging&&(a.removeEventListener(this.element.ownerDocument,"mousemove",this.onDragOver,!1),a.removeEventListener(this.element.ownerDocument,"mouseup",this.onDrop,!1),this.cursorStartPos=null,this.cursorLastPos=null,this.callbacks.onDrop!=null&&this.callbacks.onDrop(this),this.dragging=!1)},destroy:function(){a.removeEventListener(this.element,"mousedown",this.onDragStart,!1),this.active=!1,this.dragging&&this.dragStop()}};var e={};e.Tracker=b;return e})
@@ -1,23 +1 @@
1
- require.def("core/lib",["core/trace"],function(l){var d={},j=navigator.userAgent.toLowerCase();d.isFirefox=/firefox/.test(j);d.isOpera=/opera/.test(j);d.isSafari=/webkit/.test(j);d.isIE=/msie/.test(j)&&!/opera/.test(j);d.isIE6=/msie 6/i.test(navigator.appVersion);d.browserVersion=(j.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1];d.isIElt8=d.isIE&&d.browserVersion-0<8;d.extend=function(a,b){var c={};d.append(c,a);d.append(c,b);return c};d.append=function(a,b){for(var c in b)a[c]=b[c];return a};
2
- d.bind=function(){var a=d.cloneArray(arguments),b=a.shift(),c=a.shift();return function(){return b.apply(c,d.arrayInsert(d.cloneArray(a),0,arguments))}};d.bindFixed=function(){var a=d.cloneArray(arguments),b=a.shift(),c=a.shift();return function(){return b.apply(c,a)}};d.dispatch=function(a,b,c){for(var e=0;a&&e<a.length;e++){var f=a[e];if(f[b])try{f[b].apply(f,c)}catch(g){l.exception(g)}}};d.dispatch2=function(a,b,c){for(var e=0;e<a.length;e++){var f=a[e];if(f[b])try{var g=f[b].apply(f,c);if(g)return g}catch(h){l.exception(h)}}};
3
- var m=Object.prototype.toString,o=/^\s*function(\s+[\w_$][\w\d_$]*)?\s*\(/;d.isArray=function(a){return m.call(a)==="[object Array]"};d.isFunction=function(a){if(!a)return false;return m.call(a)==="[object Function]"||d.isIE&&typeof a!="string"&&o.test(""+a)};d.isAncestor=function(a,b){for(a=a;a;a=a.parentNode)if(a==b)return true;return false};d.fixEvent=function(a){return $.event.fix(a||window.event)};d.fireEvent=function(a,b){if(document.createEvent){var c=document.createEvent("Events");c.initEvent(b,
4
- true,false);return!a.dispatchEvent(c)}};d.cancelEvent=function(a){a=d.fixEvent(a);a.stopPropagation();a.preventDefault()};d.addEventListener=function(a,b,c,e){e=e||false;a.addEventListener?a.addEventListener(b,c,e):a.attachEvent("on"+b,c)};d.removeEventListener=function(a,b,c,e){e=e||false;a.removeEventListener?a.removeEventListener(b,c,e):a.detachEvent("on"+b,c)};d.isLeftClick=function(a){return a.button==0&&d.noKeyModifiers(a)};d.noKeyModifiers=function(a){return!a.ctrlKey&&!a.shiftKey&&!a.altKey&&
5
- !a.metaKey};d.isControlClick=function(a){return a.button==0&&d.isControl(a)};d.isShiftClick=function(a){return a.button==0&&d.isShift(a)};d.isControl=function(a){return(a.metaKey||a.ctrlKey)&&!a.shiftKey&&!a.altKey};d.isAlt=function(a){return a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey};d.isAltClick=function(a){return a.button==0&&d.isAlt(a)};d.isControlShift=function(a){return(a.metaKey||a.ctrlKey)&&a.shiftKey&&!a.altKey};d.isShift=function(a){return a.shiftKey&&!a.metaKey&&!a.ctrlKey&&!a.altKey};
6
- d.inflateRect=function(a,b,c){return{top:a.top-c,left:a.left-b,height:a.height+2*c,width:a.width+2*b}};d.pointInRect=function(a,b,c){return c>=a.top&&c<=a.top+a.height&&b>=a.left&&b<=a.left+a.width};d.cloneArray=function(a,b){var c=[];if(b)for(var e=0;e<a.length;++e)c.push(b(a[e]));else for(e=0;e<a.length;++e)c.push(a[e]);return c};d.arrayInsert=function(a,b,c){for(var e=0;e<c.length;++e)a.splice(e+b,0,c[e]);return a};d.remove=function(a,b){for(var c=0;c<a.length;++c)if(a[c]==b){a.splice(c,1);break}};
7
- d.formatSize=function(a){var b=1;b=b>2?2:b;b=b<-1?-1:b;if(b==-1)return a+" B";b=Math.pow(10,b);return a==-1||a==undefined?"?":a==0?"0":a<1024?a+" B":a<1048576?Math.round(a/1024*b)/b+" KB":Math.round(a/1048576*b)/b+" MB"};d.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"};d.formatNumber=function(a){a+="";var b=a.split(".");a=b[0];b=b.length>1?"."+b[1]:"";for(var c=/(\d+)(\d{3})/;c.test(a);)a=a.replace(c,"$1,$2");return a+b};d.formatString=
8
- function(a){var b=d.cloneArray(arguments);a=b.shift();for(var c=0;c<b.length;c++){var e=b[c].toString();a=a.replace("%S",e)}return a};d.parseISO8601=function(a){return(a=d.fromISOString(a))?a.getTime():null};d.fromISOString=function(a){if(!a)return null;a=a.toString().match(new RegExp(/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/));if(!a)return null;var b=new Date;b.setUTCDate(1);b.setUTCFullYear(parseInt(a[1],10));b.setUTCMonth(parseInt(a[3],10)-
9
- 1);b.setUTCDate(parseInt(a[5],10));b.setUTCHours(parseInt(a[7],10));b.setUTCMinutes(parseInt(a[9],10));b.setUTCSeconds(parseInt(a[11],10));a[12]?b.setUTCMilliseconds(parseFloat(a[12])*1E3):b.setUTCMilliseconds(0);if(a[13]!="Z"){var c=a[15]*60+parseInt(a[17],10);c*=a[14]=="-"?-1:1;b.setTime(b.getTime()-c*60*1E3)}return b};d.getFileName=function(a){return d.splitURLBase(a).name};d.getFileExtension=function(a){if(!a)return null;var b=a.indexOf("?");if(b!=-1)a=a.substr(0,b);b=a.lastIndexOf(".");return a.substr(b+
10
- 1)};d.splitURLBase=function(a){if(d.isDataURL(a))return d.splitDataURL(a);return d.splitURLTrue(a)};d.isDataURL=function(a){return a&&a.substr(0,5)=="data:"};d.splitDataURL=function(a){var b=a.indexOf(":",3);if(b!=4)return false;var c=a.indexOf(",",b+1);if(c<b)return false;var e={encodedContent:a.substr(c+1)};a=a.substr(b+1,c).split(";");for(b=0;b<a.length;b++){c=a[b].split("=");if(c.length==2)e[c[0]]=c[1]}if(e.hasOwnProperty("fileName")){a=decodeURIComponent(e.fileName);a=d.splitURLTrue(a);if(e.hasOwnProperty("baseLineNumber")){e.path=
11
- a.path;e.line=e.baseLineNumber;a=decodeURIComponent(e.encodedContent.substr(0,200)).replace(/\s*$/,"");e.name="eval->"+a}else{e.name=a.name;e.path=a.path}}else{e.hasOwnProperty("path")||(e.path="data:");e.hasOwnProperty("name")||(e.name=decodeURIComponent(e.encodedContent.substr(0,200)).replace(/\s*$/,""))}return e};d.splitURLTrue=function(a){var b=/:\/{1,3}(.*?)\/([^\/]*?)\/?($|\?.*)/.exec(a);return b?b[2]?{path:b[1],name:b[2]+b[3]}:{path:b[1],name:b[1]}:{name:a,path:a}};d.getURLParameter=function(a){for(var b=
12
- window.location.search.substring(1).split("&"),c=0;c<b.length;c++){var e=b[c].split("=");if(e[0]==a)return unescape(e[1])}return null};d.getURLParameters=function(a){for(var b=[],c=window.location.search.substring(1).split("&"),e=0;e<c.length;e++){var f=c[e].split("=");f[0]==a&&b.push(unescape(f[1]))}return b};d.parseURLParams=function(a){var b=a?a.indexOf("?"):-1;if(b==-1)return[];a=a.substr(b+1);b=a.lastIndexOf("#");if(b!=-1)a=a.substr(0,b);if(!a)return[];return d.parseURLEncodedText(a)};d.parseURLEncodedText=
13
- function(a,b){function c(k){try{return decodeURIComponent(k)}catch(n){return decodeURIComponent(unescape(k))}}var e=[];if(a=="")return e;a=a.replace(/\+/g," ");a=a.split("&");for(var f=0;f<a.length;++f)try{var g=a[f].indexOf("=");if(g!=-1){var h=a[f].substring(0,g),i=a[f].substring(g+1);if(i.length>25E3&&!b)i=d.$STR("LargeData");e.push({name:c(h),value:c(i)})}else{h=a[f];e.push({name:c(h),value:""})}}catch(p){}e.sort(function(k,n){return k.name<=n.name?-1:1});return e};d.getBody=function(a){if(a.body)return a.body;
14
- if(a=a.getElementsByTagName("body")[0])return a;return null};d.getHead=function(a){return a.getElementsByTagName("head")[0]};d.getAncestorByClass=function(a,b){for(a=a;a;a=a.parentNode)if(d.hasClass(a,b))return a;return null};d.$=function(){return d.getElementByClass.apply(this,arguments)};d.getElementByClass=function(a){if(!a)return null;var b=d.cloneArray(arguments);b.splice(0,1);for(var c=a.firstChild;c;c=c.nextSibling){var e=d.cloneArray(b);e.unshift(c);if(d.hasClass.apply(this,e))return c;else if(e=
15
- d.getElementByClass.apply(this,e))return e}return null};d.getElementsByClass=function(a){function b(f,g,h){for(f=f.firstChild;f;f=f.nextSibling){var i=d.cloneArray(g);i.unshift(f);d.hasClass.apply(null,i)&&h.push(f);b(f,g,h)}}var c=[],e=d.cloneArray(arguments);e.shift();b(a,e,c);return c};d.getChildByClass=function(a){for(var b=1;b<arguments.length;++b){var c=arguments[b],e=a.firstChild;for(a=null;e;e=e.nextSibling)if(d.hasClass(e,c)){a=e;break}}return a};d.eraseNode=function(a){for(;a.lastChild;)a.removeChild(a.lastChild)};
16
- d.clearNode=function(a){a.innerHTML=""};d.hasClass=function(a,b){if(!a||a.nodeType!=1)return false;else{for(var c=1;c<arguments.length;++c){b=arguments[c];var e=a.className;if(!e||e.indexOf(b+" ")==-1)return false}return true}};d.setClass=function(a,b){if(a&&!d.hasClass(a,b))a.className+=" "+b+" "};d.removeClass=function(a,b){if(a&&a.className){var c=a.className.indexOf(b);if(c>=0){b=b.length;a.className=a.className.substr(0,c-1)+a.className.substr(c+b)}}};d.toggleClass=function(a,b){if(d.hasClass(a,
17
- b)){d.removeClass(a,b);return false}else{d.setClass(a,b);return true}};d.trim=function(a){return a.replace(/^\s*|\s*$/g,"")};d.wrapText=function(a,b){var c=/[^A-Za-z_$0-9'"-]/,e=[];a=d.splitLines(a);for(var f=0;f<a.length;++f){for(var g=a[f];g.length>100;){var h=c.exec(g.substr(100,100));h=100+(h?h.index:0);var i=g.substr(0,h);g=g.substr(h);b||e.push("<pre>");e.push(b?i:d.escapeHTML(i));b||e.push("</pre>")}b||e.push("<pre>");e.push(b?g:d.escapeHTML(g));b||e.push("</pre>")}return e.join(b?"\n":"")};
18
- d.insertWrappedText=function(a,b,c){b.innerHTML="<pre>"+d.wrapText(a,c)+"</pre>"};d.splitLines=function(a){var b=/\r\n|\r|\n/;if(a){if(a.split)return a.split(b)}else return[];return(a+"").split(b)};d.getPrettyDomain=function(a){return(a=/[^:]+:\/{1,3}(www\.)?([^\/]+)/.exec(a))?a[2]:""};d.escapeHTML=function(a){function b(c){switch(c){case "<":return"&lt;";case ">":return"&gt;";case "&":return"&amp;";case "'":return"&#39;";case '"':return"&quot;"}return"?"}return String(a).replace(/[<>&"']/g,b)};d.cropString=
19
- function(a,b){a+="";var c=b?b/2:50;return a.length>b?d.escapeNewLines(a.substr(0,c)+"..."+a.substr(a.length-c)):d.escapeNewLines(a)};d.escapeNewLines=function(a){return a.replace(/\r/g,"\\r").replace(/\n/g,"\\n")};d.cloneJSON=function(a){if(a==null||typeof a!="object")return a;try{var b=a.constructor();for(var c in a)b[c]=cloneJSON(a[c]);return b}catch(e){l.exception(a)}return null};d.getOverflowParent=function(a){for(a=a.parentNode;a;a=a.offsetParent)if(a.scrollHeight>a.offsetHeight)return a};d.getElementBox=
20
- function(a){var b={};if(a.getBoundingClientRect){a=a.getBoundingClientRect();var c=d.isIE?document.body.clientTop||document.documentElement.clientTop:0,e=d.getWindowScrollPosition();b.top=Math.round(a.top-c+e.top);b.left=Math.round(a.left-c+e.left);b.height=Math.round(a.bottom-a.top);b.width=Math.round(a.right-a.left)}else{c=d.getElementPosition(a);b.top=c.top;b.left=c.left;b.height=a.offsetHeight;b.width=a.offsetWidth}return b};d.getElementPosition=function(a){var b=0,c=0;do{b+=a.offsetLeft;c+=a.offsetTop}while(a=
21
- a.offsetParent);return{left:b,top:c}};d.getWindowSize=function(){var a=0,b=0,c;if(typeof window.innerWidth=="number"){a=window.innerWidth;b=window.innerHeight}else if((c=document.documentElement)&&(c.clientHeight||c.clientWidth)){a=c.clientWidth;b=c.clientHeight}else if((c=document.body)&&(c.clientHeight||c.clientWidth)){a=c.clientWidth;b=c.clientHeight}return{width:a,height:b}};d.getWindowScrollSize=function(){var a=0,b=0,c;if(!d.isIEQuiksMode&&(c=document.documentElement)&&(c.scrollHeight||c.scrollWidth)){a=
22
- c.scrollWidth;b=c.scrollHeight}if((c=document.body)&&(c.scrollHeight||c.scrollWidth)&&(c.scrollWidth>a||c.scrollHeight>b)){a=c.scrollWidth;b=c.scrollHeight}return{width:a,height:b}};d.getWindowScrollPosition=function(){var a=0,b=0,c;if(typeof window.pageYOffset=="number"){a=window.pageYOffset;b=window.pageXOffset}else if((c=document.body)&&(c.scrollTop||c.scrollLeft)){a=c.scrollTop;b=c.scrollLeft}else if((c=document.documentElement)&&(c.scrollTop||c.scrollLeft)){a=c.scrollTop;b=c.scrollLeft}return{top:a,
23
- left:b}};d.addStyleSheet=function(a,b){if(!a.getElementById(b)){var c=a.createElement("link");c.type="text/css";c.rel="stylesheet";c.href=b;c.setAttribute("id",b);d.getHead(a).appendChild(c)}};return d});
1
+ 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<b.length;e++){var f=b[e];if(f[c])try{f[c].apply(f,d)}catch(g){a.exception(g)}}},b.dispatch2=function(b,c,d){for(var e=0;e<b.length;e++){var f=b[e];if(f[c])try{var g=f[c].apply(f,d);if(g)return g}catch(h){a.exception(h)}}};var e=Object.prototype.toString,f=/^\s*function(\s+[\w_$][\w\d_$]*)?\s*\(/;b.isArray=function(a){return jQuery.isArray(a)},b.isFunction=function(a){if(!a)return!1;return e.call(a)==="[object Function]"||b.isIE&&typeof a!="string"&&f.test(""+a)},b.isAncestor=function(a,b){for(var c=a;c;c=c.parentNode)if(c==b)return!0;return!1},b.fixEvent=function(a){return jQuery.event.fix(a||window.event)},b.fireEvent=function(a,b){if(document.createEvent){var c=document.createEvent("Events");c.initEvent(b,!0,!1);return!a.dispatchEvent(c)}},b.cancelEvent=function(a){var c=b.fixEvent(a);c.stopPropagation(),c.preventDefault()},b.addEventListener=function(a,b,c,d){d=d||!1,a.addEventListener?a.addEventListener(b,c,d):a.attachEvent("on"+b,c)},b.removeEventListener=function(a,b,c,d){d=d||!1,a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent("on"+b,c)},b.isLeftClick=function(a){return a.button==0&&b.noKeyModifiers(a)},b.noKeyModifiers=function(a){return!a.ctrlKey&&!a.shiftKey&&!a.altKey&&!a.metaKey},b.isControlClick=function(a){return a.button==0&&b.isControl(a)},b.isShiftClick=function(a){return a.button==0&&b.isShift(a)},b.isControl=function(a){return(a.metaKey||a.ctrlKey)&&!a.shiftKey&&!a.altKey},b.isAlt=function(a){return a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey},b.isAltClick=function(a){return a.button==0&&b.isAlt(a)},b.isControlShift=function(a){return(a.metaKey||a.ctrlKey)&&a.shiftKey&&!a.altKey},b.isShift=function(a){return a.shiftKey&&!a.metaKey&&!a.ctrlKey&&!a.altKey},b.inflateRect=function(a,b,c){return{top:a.top-c,left:a.left-b,height:a.height+2*c,width:a.width+2*b}},b.pointInRect=function(a,b,c){return c>=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;d<a.length;++d)c.push(b(a[d]));else for(var d=0;d<a.length;++d)c.push(a[d]);return c},b.arrayInsert=function(a,b,c){for(var d=0;d<c.length;++d)a.splice(d+b,0,c[d]);return a},b.remove=function(a,b){for(var c=0;c<a.length;++c)if(a[c]==b){a.splice(c,1);return!0}return!1},b.formatSize=function(a){var b=1;b=b>2?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;d<c.length;d++){var e=c[d].toString();a=a.replace("%S",e)}return a},b.parseISO8601=function(a){var c=b.fromISOString(a);return c?c.getTime():null},b.fromISOString=function(a){if(!a)return null;var b=/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,c=new RegExp(b),d=a.toString().match(new RegExp(b));if(!d)return null;var e=new Date;e.setUTCDate(1),e.setUTCFullYear(parseInt(d[1],10)),e.setUTCMonth(parseInt(d[3],10)-1),e.setUTCDate(parseInt(d[5],10)),e.setUTCHours(parseInt(d[7],10)),e.setUTCMinutes(parseInt(d[9],10)),e.setUTCSeconds(parseInt(d[11],10)),d[12]?e.setUTCMilliseconds(parseFloat(d[12])*1e3):e.setUTCMilliseconds(0);if(d[13]!="Z"){var f=d[15]*60+parseInt(d[17],10);f*=d[14]=="-"?-1:1,e.setTime(e.getTime()-f*60*1e3)}return e},b.toISOString=function(a){function b(a,b){b||(b=2);var c=new String(a);while(c.length<b)c="0"+c;return c}var c=a.getUTCFullYear()+"-"+b(a.getMonth()+1)+"-"+b(a.getDate())+"T"+b(a.getHours())+":"+b(a.getMinutes())+":"+b(a.getSeconds())+"."+b(a.getMilliseconds(),3),d=a.getTimezoneOffset(),e=Math.floor(d/60),f=Math.floor(d%60),g=(d>0?"-":"+")+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<c)return!1;var e={encodedContent:a.substr(d+1)},f=a.substr(c+1,d),g=f.split(";");for(var h=0;h<g.length;h++){var i=g[h].split("=");i.length==2&&(e[i[0]]=i[1])}if(e.hasOwnProperty("fileName")){var j=decodeURIComponent(e.fileName),k=b.splitURLTrue(j);if(e.hasOwnProperty("baseLineNumber")){e.path=k.path,e.line=e.baseLineNumber;var l=decodeURIComponent(e.encodedContent.substr(0,200)).replace(/\s*$/,"");e.name="eval->"+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;d<c.length;d++){var e=c[d].split("=");if(e[0]==a)return unescape(e[1])}return null},b.getURLParameters=function(a){var b=[],c=window.location.search.substring(1),d=c.split("&");for(var e=0;e<d.length;e++){var f=d[e].split("=");f[0]==a&&b.push(unescape(f[1]))}return b},b.parseURLParams=function(a){var c=a?a.indexOf("?"):-1;if(c==-1)return[];var d=a.substr(c+1),e=d.lastIndexOf("#");e!=-1&&(d=d.substr(0,e));if(!d)return[];return b.parseURLEncodedText(d)},b.parseURLEncodedText=function(a,c){function f(a){try{return decodeURIComponent(a)}catch(b){return decodeURIComponent(unescape(a))}}var d=25e3,e=[];if(a=="")return e;a=a.replace(/\+/g," ");var g=a.split("&");for(var h=0;h<g.length;++h)try{var i=g[h].indexOf("=");if(i!=-1){var j=g[h].substring(0,i),k=g[h].substring(i+1);k.length>d&&!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<arguments.length;++c){var d=arguments[c],e=a.firstChild;a=null;for(;e;e=e.nextSibling)if(b.hasClass(e,d)){a=e;break}}return a},b.eraseNode=function(a){while(a.lastChild)a.removeChild(a.lastChild)},b.clearNode=function(a){a.innerHTML=""},b.hasClass=function(a,b){if(a&&a.nodeType==1){for(var c=1;c<arguments.length;++c){var b=arguments[c],d=a.className;if(!d||d.indexOf(b+" ")==-1)return!1}return!0}return!1},b.setClass=function(a,c){a&&!b.hasClass(a,c)&&(a.className+=" "+c+" ")},b.removeClass=function(a,b){if(a&&a.className){var c=a.className.indexOf(b);if(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;h<g.length;++h){var i=g[h];while(i.length>f){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("<pre>"),e.push(c?l:b.escapeHTML(l)),c||e.push("</pre>")}c||e.push("<pre>"),e.push(c?i:b.escapeHTML(i)),c||e.push("</pre>")}return e.join(c?"\n":"")},b.insertWrappedText=function(a,c,d){c.innerHTML="<pre>"+b.wrapText(a,d)+"</pre>"},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"&lt;";case">":return"&gt;";case"&":return"&amp;";case"'":return"&#39;";case'"':return"&quot;"}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})
@@ -1,26 +1,26 @@
1
- /* See license.txt for terms of usage */
2
-
3
- require.def("core/trace", [
4
- ],
5
-
6
- function() {
7
-
8
- //*************************************************************************************************
9
-
10
- var Trace = {
11
- log: function(){},
12
- error: function(){},
13
- exception: function(){},
14
- time: function(){},
15
- timeEnd: function(){}
16
- };
17
-
18
- if (typeof(console) == "undefined")
19
- return Trace;
20
-
21
-
22
- return Trace;
23
-
24
- //*************************************************************************************************
25
- });
26
-
1
+ /* See license.txt for terms of usage */
2
+
3
+ require.def("core/trace", [
4
+ ],
5
+
6
+ function() {
7
+
8
+ //*************************************************************************************************
9
+
10
+ var Trace = {
11
+ log: function(){},
12
+ error: function(){},
13
+ exception: function(){},
14
+ time: function(){},
15
+ timeEnd: function(){}
16
+ };
17
+
18
+ if (typeof(console) == "undefined")
19
+ return Trace;
20
+
21
+
22
+ return Trace;
23
+
24
+ //*************************************************************************************************
25
+ });
26
+
@@ -1,5 +1 @@
1
- require.def("domplate/domTree",["domplate/domplate","core/lib"],function(g,e){with(g){g=function(a){this.input=a};g.prototype=domplate({tag:TABLE({"class":"domTable",cellpadding:0,cellspacing:0,onclick:"$onClick"},TBODY(FOR("member","$object|memberIterator",TAG("$member|getRowTag",{member:"$member"})))),rowTag:TR({"class":"memberRow $member.open $member.type\\Row $member|hasChildren",$hasChildren:"$member|hasChildren",_repObject:"$member",level:"$member.level"},TD({"class":"memberLabelCell",style:"padding-left: $member.indent\\px"},
2
- SPAN({"class":"memberLabel $member.type\\Label"},"$member.name")),TD({"class":"memberValueCell"},TAG("$member.tag",{object:"$member.value"}))),valueTag:SPAN({"class":"objectTitle"},"$object|getTitle"),loop:FOR("member","$members",TAG("$member|getRowTag",{member:"$member"})),hasChildren:function(a){return a.hasChildren?"hasChildren":""},memberIterator:function(a){return this.getMembers(a)},getRowTag:function(){return this.rowTag},getTitle:function(a){if(jQuery.isArray(a))return"Array";a=h(a);var b=
3
- /\[object (.*?)\]/.exec(a);return b?b[1]:a},onClick:function(a){a=$.event.fix(a||window.event);if(e.isLeftClick(a)){var b=e.getAncestorByClass(a.target,"memberRow");e.getAncestorByClass(a.target,"memberLabel")&&e.hasClass(b,"hasChildren")&&this.toggleRow(b)}},toggleRow:function(a){var b=parseInt(a.getAttribute("level"));if(e.hasClass(a,"opened")){e.removeClass(a,"opened");for(var c=a.parentNode,d=a.nextSibling;d;d=a.nextSibling){if(parseInt(d.getAttribute("level"))<=b)break;c.removeChild(d)}}else{e.setClass(a,
4
- "opened");if(c=a.repObject)(b=this.getMembers(c.value,b+1))&&this.loop.insertRows({members:b},a)}},getMembers:function(a,b){b||(b=0);var c=[];for(var d in a){var f=a[d];typeof f!="function"&&c.push(this.createMember("dom",d,f,b))}return c},createMember:function(a,b,c,d){var f=typeof c;f=this.hasProperties(c)&&f=="object";return{name:b,value:c,type:a,rowClass:"memberRow-"+a,open:"",level:d,indent:d*16,hasChildren:f,tag:this.valueTag}},hasProperties:function(a){for(var b in a)return true;return false},
5
- append:function(a){a=this.tag.append({object:this.input},a);a.firstChild.firstChild&&this.toggleRow(a.firstChild.firstChild)}});var h=function(a){try{return a.toString()}catch(b){return""}};return g}});
1
+ require.def("domplate/domTree",["domplate/domplate","core/lib","core/trace"],function(Domplate,Lib,Trace){with(Domplate){function DomTree(a){this.input=a}DomTree.prototype=domplate({tag:TABLE({"class":"domTable",cellpadding:0,cellspacing:0,onclick:"$onClick"},TBODY(FOR("member","$object|memberIterator",TAG("$member|getRowTag",{member:"$member"})))),rowTag:TR({"class":"memberRow $member.open $member.type\\Row $member|hasChildren",$hasChildren:"$member|hasChildren",_repObject:"$member",level:"$member.level"},TD({"class":"memberLabelCell",style:"padding-left: $member.indent\\px"},SPAN({"class":"memberLabel $member.type\\Label"},"$member.name")),TD({"class":"memberValueCell"},TAG("$member.tag",{object:"$member|getValue"}))),loop:FOR("member","$members",TAG("$member|getRowTag",{member:"$member"})),hasChildren:function(a){return a.hasChildren?"hasChildren":""},memberIterator:function(a){return this.getMembers(a)},getValue:function(a){return a.value},getRowTag:function(a){return this.rowTag},onClick:function(a){var b=Lib.fixEvent(a);if(Lib.isLeftClick(b)){var c=Lib.getAncestorByClass(b.target,"memberRow"),d=Lib.getAncestorByClass(b.target,"memberLabel");d&&Lib.hasClass(c,"hasChildren")&&this.toggleRow(c)}},toggleRow:function(a,b){if(a){var c=parseInt(a.getAttribute("level"));if(b&&Lib.hasClass(a,"opened"))return;if(Lib.hasClass(a,"opened")){Lib.removeClass(a,"opened");var d=a.parentNode;for(var e=a.nextSibling;e;e=a.nextSibling){if(parseInt(e.getAttribute("level"))<=c)break;d.removeChild(e)}}else{Lib.setClass(a,"opened");var f=a.repObject;if(f){if(!f.hasChildren)return;var g=this.getMembers(f.value,c+1);g&&this.loop.insertRows({members:g},a)}}}},getMembers:function(a,b){b||(b=0);var c=[];for(var d in a){var e=a[d];typeof e!="function"&&c.push(this.createMember("dom",d,e,b))}return c},createMember:function(a,b,c,d){var e=typeof c,f=this.hasProperties(c)&&e=="object",g=DomTree.Reps.getRep(c);return{name:b,value:c,type:a,rowClass:"memberRow-"+a,open:"",level:d,indent:d*16,hasChildren:f,tag:g.tag}},hasProperties:function(a){if(typeof a=="string")return!1;try{for(var b in a)return!0}catch(c){}return!1},append:function(a){this.element=this.tag.append({object:this.input},a),this.element.repObject=this;var b=Lib.isArray(this.input)&&this.input.length>2,c=this.element.firstChild.firstChild;c&&!b&&this.toggleRow(c)},expandRow:function(a){var b=this.getRow(a);this.toggleRow(b,!0);return b},getRow:function(a){if(this.element){var b=Lib.getElementsByClass(this.element,"memberRow");for(var c=0;c<b.length;c++){var d=b[c];if(d.repObject.value==a)return d}return null}}});function safeToString(a){try{return a.toString()}catch(b){return""}}var OBJECTBOX=DIV({"class":"objectBox objectBox-$className"});DomTree.Reps={reps:[],registerRep:function(){this.reps.push.apply(this.reps,arguments)},getRep:function(a){var b=typeof a;b=="object"&&a instanceof String&&(b="string");for(var c=0;c<this.reps.length;++c){var d=this.reps[c];try{if(d.supportsObject(a,b))return d}catch(e){Trace.exception("domTree.getRep; ",e)}}return DomTree.Rep}},DomTree.Rep=domplate({tag:OBJECTBOX("$object|getTitle"),className:"object",getTitle:function(a){var b=safeToString(a),c=/\[object (.*?)\]/,d=c.exec(b);return d?d[1]:b},getTooltip:function(a){return null},supportsObject:function(a,b){return!1}}),DomTree.Reps.Null=domplate(DomTree.Rep,{tag:OBJECTBOX("null"),className:"null",supportsObject:function(a,b){return a==null}}),DomTree.Reps.Number=domplate(DomTree.Rep,{tag:OBJECTBOX("$object"),className:"number",supportsObject:function(a,b){return b=="boolean"||b=="number"}}),DomTree.Reps.String=domplate(DomTree.Rep,{tag:OBJECTBOX("$object"),className:"string",supportsObject:function(a,b){return b=="string"}}),DomTree.Reps.Arr=domplate(DomTree.Rep,{tag:OBJECTBOX("$object|getTitle"),className:"array",supportsObject:function(a,b){return Lib.isArray(a)},getTitle:function(a){return"Array ["+a.length+"]"}}),DomTree.Reps.Tree=domplate(DomTree.Rep,{tag:OBJECTBOX(TAG("$object|getTag",{object:"$object|getRoot"})),className:"tree",getTag:function(a){return Tree.tag},getRoot:function(a){return[a]},supportsObject:function(a,b){return b=="object"}});var Tree=domplate(DomTree.prototype,{createMember:function(a,b,c,d){var e=DomTree.prototype.createMember(a,b,c,d);d==0&&(e.name="",e.type="tableCell");return e}});DomTree.Reps.registerRep(DomTree.Reps.Null,DomTree.Reps.Number,DomTree.Reps.String,DomTree.Reps.Arr);return DomTree}})
@@ -9,7 +9,9 @@ var womb=null;var domplate=function()
9
9
  {var lastSubject;for(var i=0;i<arguments.length;++i)
10
10
  lastSubject=lastSubject?copyObject(lastSubject,arguments[i]):arguments[i];for(var name in lastSubject)
11
11
  {var val=lastSubject[name];if(isTag(val))
12
- val.tag.subject=lastSubject;}
12
+ {if(val.tag.subject)
13
+ {lastSubject[name]=val=copyObject({},val);val.tag=copyObject({},val.tag);}
14
+ val.tag.subject=lastSubject;}}
13
15
  return lastSubject;};domplate.context=function(context,fn)
14
16
  {var lastContext=domplate.lastContext;domplate.topContext=context;fn.apply(context);domplate.topContext=lastContext;};this.domplate=domplate;this.create=domplate;this.TAG=function()
15
17
  {var embed=new DomplateEmbed();return embed.merge(arguments);};this.FOR=function()
@@ -1,4 +1 @@
1
- require.def("domplate/infoTip",["domplate/domplate","core/lib","core/trace"],function(e,b){with(e){e=b.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",b.bind(this.onMouseMove,this));a.bind("mouseout",b.bind(this.onMouseOut,this));a.bind("mousemove",b.bind(this.onMouseMove,this));return this.infoTip=this.tags.infoTipTag.append({},
2
- b.getBody(document))}},showInfoTip:function(a,c,f,g,d,i){var h=b.getOverflowParent(c);if(b.dispatch2(this.listeners,"showInfoTip",[a,c,f+(h?h.scrollLeft:0),g,d,i])){d=a.ownerDocument.documentElement;c=d.clientWidth;d=d.clientHeight;if(f+a.offsetWidth+this.infoTipMargin>c-this.infoTipWindowPadding){a.style.left="auto";a.style.right=c-f+this.infoTipMargin+"px"}else{a.style.left=f+this.infoTipMargin+"px";a.style.right="auto"}a.style.top=g+a.offsetHeight+this.infoTipMargin>d?Math.max(0,d-(a.offsetHeight+
3
- this.infoTipMargin))+"px":g+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",false);this.showInfoTip(this.infoTip,a.target,a.clientX,a.clientY,a.rangeParent,a.rangeOffset)},populateTimingInfoTip:function(a,c){this.tags.colorTag.replace({rgbValue:c},a);return true},
4
- addListener:function(a){this.listeners.push(a)},removeListener:function(a){b.remove(this.listeners,a)}});e.initialize();return e}});
1
+ 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}})
@@ -1,14 +1 @@
1
- require.def("domplate/popupMenu",["domplate/domplate","core/lib","core/trace"],function(h,c){with(h){var k={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++){if(typeof b[0]=="string")b[0]=$$(b[0],this.controllerContext);var d=b[2];b[2]=c.bind(d,this);b[3]=d;this.controllers.push(b);c.addEventListener.apply(this,
2
- b)}},removeController:function(){for(var a=0,b;b=arguments[a];a++)for(var d=0,f;f=this.controllers[d];d++)b[0]==f[0]&&b[1]==f[1]&&b[2]==f[3]&&c.removeEventListener.apply(this,f)},removeControllers:function(){for(var a=0,b;b=this.controllers[a];a++)c.removeEventListener.apply(this,b)}};h={"class":"$item.className",type:"$item.type",value:"$item.value",_command:"$item.command"};if(c.isIE6)h.href="javascript:void(0)";var m=domplate({tag:DIV({"class":"popupMenu popupMenuShadow"},DIV({"class":"popupMenuContent popupMenuShadowContent"},
3
- FOR("item","$object.items|memberIterator",TAG("$item.tag",{item:"$item"})))),itemTag:A(h,"$item.label"),checkBoxTag:A(c.extend(h,{checked:"$item.checked"}),"$item.label"),radioButtonTag:A(c.extend(h,{selected:"$item.selected"}),"$item.label"),groupTag:A(c.extend(h,{child:"$item.child"}),"$item.label"),shortcutTag:A(h,"$item.label",SPAN({"class":"popupMenuShortcutKey"},"$item.key")),separatorTag:SPAN({"class":"popupMenuSeparator"}),memberIterator:function(a){for(var b=[],d=0,f=a.length;d<f;d++){var e=
4
- a[d];if(typeof e=="string"&&e.indexOf("-")==0)b.push({tag:this.separatorTag});else{e=c.extend(e,{});e.type=e.type||"";e.value=e.value||"";var i=e.type;e.tag=this.itemTag;var g=e.className||"";g+="popupMenuOption ";if(i=="checkbox"){g+="popupMenuCheckBox ";e.tag=this.checkBoxTag}else if(i=="radio"){g+="popupMenuRadioButton ";e.tag=this.radioButtonTag}else if(i=="group"){g+="popupMenuGroup ";e.tag=this.groupTag}else if(i=="shortcut"){g+="popupMenuShortcut ";e.tag=this.shortcutTag}if(e.checked)g+="popupMenuChecked ";
5
- else if(e.selected)g+="popupMenuRadioSelected ";if(e.disabled)g+="popupMenuDisabled ";e.className=g;e.label=e.label;b.push(e)}}return b}}),j=function(a){if(!a.element){if(a.getItems)a.items=a.getItems();var b=c.getBody(document);a.element=m.tag.append({object:a},b,m)}c.append(this,a);if(typeof this.element=="string"){this.id=this.element;this.element=$(this.id)}else if(this.id)this.element.id=this.id;this.elementStyle=this.element.style;this.isVisible=false;this.handleMouseDown=c.bind(this.handleMouseDown,
6
- this);this.handleMouseOver=c.bind(this.handleMouseOver,this);this.handleMouseOut=c.bind(this.handleMouseOut,this);this.handleWindowMouseDown=c.bind(this.handleWindowMouseDown,this)},l={};j.prototype=c.extend(k,{initialize:function(){k.initialize.call(this);this.addController([this.element,"mousedown",this.handleMouseDown],[this.element,"mouseover",this.handleMouseOver])},destroy:function(){this.hide();if(this.parentMenu)this.parentMenu.childMenu=null;this.element.parentNode.removeChild(this.element);
7
- this.parentTarget=this.parentMenu=this.elementStyle=this.element=null},shutdown:function(){k.shutdown.call(this)},showPopup:function(a){var b=c.isIE6?1:-4;a=c.getElementBox(a);var d={top:0,left:0};this.show(a.left+b-d.left,a.top+a.height-5-d.top)},show:function(a,b){this.initialize();if(!this.isVisible){a=a||0;b=b||0;if(this.parentMenu){var d=this.parentMenu.childMenu;d&&d!=this&&d.destroy();this.parentMenu.childMenu=this}else c.addEventListener(document,"mousedown",this.handleWindowMouseDown);this.elementStyle.display=
8
- "block";this.elementStyle.visibility="hidden";d=c.getWindowSize();a=Math.min(a,d.width-this.element.clientWidth-10);a=Math.max(a,0);b=Math.min(b,d.height-this.element.clientHeight-10);b=Math.max(b,0);this.elementStyle.left=a+"px";this.elementStyle.top=b+"px";this.elementStyle.visibility="visible";this.isVisible=true;c.isFunction(this.onShow)&&this.onShow.apply(this,arguments)}},hide:function(){this.clearHideTimeout();this.clearShowChildTimeout();if(this.isVisible){this.elementStyle.display="none";
9
- if(this.childMenu){this.childMenu.destroy();this.childMenu=null}this.parentTarget&&c.removeClass(this.parentTarget,"popupMenuGroupSelected");this.isVisible=false;this.shutdown();c.isFunction(this.onHide)&&this.onHide.apply(this,arguments)}},showChildMenu:function(a){var b=a.getAttribute("child"),d=this;a=a;this.showChildTimeout=window.setTimeout(function(){var f=c.getElementBox(a),e=l.hasOwnProperty(b)?l[b]:{element:$(b)};(new j(c.extend(e,{parentMenu:d,parentTarget:a}))).show(f.left+f.width+(c.isIE6?
10
- -1:-6),f.top-6);c.setClass(a,"popupMenuGroupSelected")},350)},clearHideTimeout:function(){if(this.hideTimeout){window.clearTimeout(this.hideTimeout);delete this.hideTimeout}},clearShowChildTimeout:function(){if(this.showChildTimeout){window.clearTimeout(this.showChildTimeout);this.showChildTimeout=null}},handleMouseDown:function(a){c.cancelEvent(a,true);for(var b=this;b.parentMenu;)b=b.parentMenu;a=a.target||a.srcElement;a=c.getAncestorByClass(a,"popupMenuOption");if(!a||c.hasClass(a,"popupMenuGroup"))return false;
11
- if(a&&!c.hasClass(a,"popupMenuDisabled")){var d=a.getAttribute("type");if(d=="checkbox"){a.getAttribute("checked");var f=a.getAttribute("value"),e=c.hasClass(a,"popupMenuChecked");if(e){c.removeClass(a,"popupMenuChecked");a.setAttribute("checked","")}else{c.setClass(a,"popupMenuChecked");a.setAttribute("checked","true")}c.isFunction(this.onCheck)&&this.onCheck.call(this,a,f,!e)}if(d=="radiobutton"){d=c.getElementsByClass(a.parentNode,"popupMenuRadioSelected");f=a.getAttribute("group");e=0;for(var i=
12
- d.length;e<i;e++){radio=d[e];if(radio.getAttribute("group")==f){c.removeClass(radio,"popupMenuRadioSelected");radio.setAttribute("selected","")}}c.setClass(a,"popupMenuRadioSelected");a.setAttribute("selected","true")}d=null;f=a.command;if(c.isFunction(f))d=f;else if(typeof f=="string")d=this[f];f=true;if(d)f=d.call(this,a)!==false;f&&b.hide()}return false},handleWindowMouseDown:function(a){a=a.target||a.srcElement;a=c.getAncestorByClass(a,"popupMenu");if(!a){c.removeEventListener(document,"mousedown",
13
- this.handleWindowMouseDown);this.destroy()}},handleMouseOver:function(a){this.clearHideTimeout();this.clearShowChildTimeout();a=a.target||a.srcElement;if(a=c.getAncestorByClass(a,"popupMenuOption")){var b=this.childMenu;if(b){c.removeClass(b.parentTarget,"popupMenuGroupSelected");if(b.parentTarget!=a&&b.isVisible){b.clearHideTimeout();b.hideTimeout=window.setTimeout(function(){b.destroy()},300)}}c.hasClass(a,"popupMenuGroup")&&this.showChildMenu(a)}}});c.append(j,{register:function(a){l[a.id]=a},
14
- check:function(a){c.setClass(a,"popupMenuChecked");a.setAttribute("checked","true")},uncheck:function(a){c.removeClass(a,"popupMenuChecked");a.setAttribute("checked","")},disable:function(a){c.setClass(a,"popupMenuDisabled")},enable:function(a){c.removeClass(a,"popupMenuDisabled")}});return j}});
1
+ 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;c<d;c++){var e=a[c];if(typeof e=="string"&&e.indexOf("-")==0){b.push({tag:this.separatorTag});continue}e=Lib.extend(e,{}),e.type=e.type||"",e.value=e.value||"";var f=e.type;e.tag=this.itemTag;var g=e.className||"";g+="popupMenuOption ",f=="checkbox"?(g+="popupMenuCheckBox ",e.tag=this.checkBoxTag):f=="radio"?(g+="popupMenuRadioButton ",e.tag=this.radioButtonTag):f=="group"?(g+="popupMenuGroup ",e.tag=this.groupTag):f=="shortcut"&&(g+="popupMenuShortcut ",e.tag=this.shortcutTag),e.checked?g+="popupMenuChecked ":e.selected&&(g+="popupMenuRadioSelected "),e.disabled&&(g+="popupMenuDisabled "),e.className=g,e.label=e.label,b.push(e)}return b}});function Menu(a){if(!a.element){a.getItems&&(a.items=a.getItems()),a.items[0]=="-"&&a.items.shift(),a.items[a.items.length-1]=="-"&&a.items.pop();var b=Lib.getBody(document);a.element=MenuPlate.tag.append({object:a},b,MenuPlate)}Lib.append(this,a),typeof this.element=="string"?(this.id=this.element,this.element=$(this.id)):this.id&&(this.element.id=this.id),this.elementStyle=this.element.style,this.isVisible=!1,this.handleMouseDown=Lib.bind(this.handleMouseDown,this),this.handleMouseOver=Lib.bind(this.handleMouseOver,this),this.handleMouseOut=Lib.bind(this.handleMouseOut,this),this.handleWindowMouseDown=Lib.bind(this.handleWindowMouseDown,this)}var menuMap={};Menu.prototype=Lib.extend(Controller,{initialize:function(){Controller.initialize.call(this),this.addController([this.element,"mousedown",this.handleMouseDown],[this.element,"mouseover",this.handleMouseOver])},destroy:function(){this.hide(),this.parentMenu&&(this.parentMenu.childMenu=null),this.element.parentNode.removeChild(this.element),this.element=null,this.elementStyle=null,this.parentMenu=null,this.parentTarget=null},shutdown:function(){Controller.shutdown.call(this)},showPopup:function(a){var b=Lib.isIE6?1:-4,c=Lib.getElementBox(a),d={top:0,left:0};this.show(c.left+b-d.left,c.top+c.height-5-d.top)},show:function(a,b){this.initialize();if(!this.isVisible){a=a||0,b=b||0;if(this.parentMenu){var c=this.parentMenu.childMenu;c&&c!=this&&c.destroy(),this.parentMenu.childMenu=this}else Lib.addEventListener(document,"mousedown",this.handleWindowMouseDown);this.elementStyle.display="block",this.elementStyle.visibility="hidden";var d=Lib.getWindowSize();a=Math.min(a,d.width-this.element.clientWidth-10),a=Math.max(a,0),b=Math.min(b,d.height-this.element.clientHeight-10),b=Math.max(b,0),this.elementStyle.left=a+"px",this.elementStyle.top=b+"px",this.elementStyle.visibility="visible",this.isVisible=!0,Lib.isFunction(this.onShow)&&this.onShow.apply(this,arguments)}},hide:function(){this.clearHideTimeout(),this.clearShowChildTimeout();this.isVisible&&(this.elementStyle.display="none",this.childMenu&&(this.childMenu.destroy(),this.childMenu=null),this.parentTarget&&Lib.removeClass(this.parentTarget,"popupMenuGroupSelected"),this.isVisible=!1,this.shutdown(),Lib.isFunction(this.onHide)&&this.onHide.apply(this,arguments))},showChildMenu:function(a){var b=a.getAttribute("child"),c=this,a=a;this.showChildTimeout=window.setTimeout(function(){var d=Lib.getElementBox(a),e=menuMap.hasOwnProperty(b)?menuMap[b]:{element:$(b)},f=new Menu(Lib.extend(e,{parentMenu:c,parentTarget:a})),g=Lib.isIE6?-1:-6;f.show(d.left+d.width+g,d.top-6),Lib.setClass(a,"popupMenuGroupSelected")},350)},clearHideTimeout:function(){this.hideTimeout&&(window.clearTimeout(this.hideTimeout),delete this.hideTimeout)},clearShowChildTimeout:function(){this.showChildTimeout&&(window.clearTimeout(this.showChildTimeout),this.showChildTimeout=null)},handleMouseDown:function(a){Lib.cancelEvent(a,!0);var b=this;while(b.parentMenu)b=b.parentMenu;var c=a.target||a.srcElement;c=Lib.getAncestorByClass(c,"popupMenuOption");if(!c||Lib.hasClass(c,"popupMenuGroup"))return!1;if(c&&!Lib.hasClass(c,"popupMenuDisabled")){var d=c.getAttribute("type");if(d=="checkbox"){var e=c.getAttribute("checked"),f=c.getAttribute("value"),g=Lib.hasClass(c,"popupMenuChecked");g?(Lib.removeClass(c,"popupMenuChecked"),c.setAttribute("checked","")):(Lib.setClass(c,"popupMenuChecked"),c.setAttribute("checked","true")),Lib.isFunction(this.onCheck)&&this.onCheck.call(this,c,f,!g)}if(d=="radiobutton"){var h=Lib.getElementsByClass(c.parentNode,"popupMenuRadioSelected"),i=c.getAttribute("group");for(var j=0,k=h.length;j<k;j++)radio=h[j],radio.getAttribute("group")==i&&(Lib.removeClass(radio,"popupMenuRadioSelected"),radio.setAttribute("selected",""));Lib.setClass(c,"popupMenuRadioSelected"),c.setAttribute("selected","true")}var l=null,m=c.command;Lib.isFunction(m)?l=m:typeof m=="string"&&(l=this[m]);var n=!0;l&&(n=l.call(this,c)!==!1),n&&b.hide()}return!1},handleWindowMouseDown:function(a){var b=a.target||a.srcElement;b=Lib.getAncestorByClass(b,"popupMenu"),b||(Lib.removeEventListener(document,"mousedown",this.handleWindowMouseDown),this.destroy())},handleMouseOver:function(a){this.clearHideTimeout(),this.clearShowChildTimeout();var b=a.target||a.srcElement;b=Lib.getAncestorByClass(b,"popupMenuOption");if(b){var c=this.childMenu;c&&(Lib.removeClass(c.parentTarget,"popupMenuGroupSelected"),c.parentTarget!=b&&c.isVisible&&(c.clearHideTimeout(),c.hideTimeout=window.setTimeout(function(){c.destroy()},300))),Lib.hasClass(b,"popupMenuGroup")&&this.showChildMenu(b)}}}),Lib.append(Menu,{register:function(a){menuMap[a.id]=a},check:function(a){Lib.setClass(a,"popupMenuChecked"),a.setAttribute("checked","true")},uncheck:function(a){Lib.removeClass(a,"popupMenuChecked"),a.setAttribute("checked","")},disable:function(a){Lib.setClass(a,"popupMenuDisabled")},enable:function(a){Lib.removeClass(a,"popupMenuDisabled")}});return Menu}})
@@ -1,6 +1 @@
1
- require.def("domplate/tabView",["domplate/domplate","core/lib","core/trace"],function(e,c,h){with(e){var f=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",
2
- _repObject:"$tab"},"$tab.label"),tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"}),hideTab:function(){return false},onClickTab:function(a){a=$.event.fix(a||window.event);this.getTabView(a.target).onClickTab(a)},getTabView:function(a){return c.getAncestorByClass(a,"tabView").repObject}});e=function(a){this.id=a;this.tabs=[];this.listeners=[]};e.prototype={appendTab:function(a){this.tabs.push(a);a.tabView=this;return a},getTab:function(a){return(a=c.getElementByClass(this.element,
3
- a+"Tab"))?a.repObject:null},selectTabByName:function(a){(a=c.getElementByClass(this.element,a+"Tab"))&&this.selectTab(a)},addListener:function(a){this.listeners.push(a)},removeListener:function(a){c.remove(this.listeners,a)},onClickTab:function(a){(a=c.getAncestorByClass(a.target,"tab"))&&this.selectTab(a)},selectTab:function(a){if(c.hasClass(a,"tab"))if(!c.hasClass(a,"selected")){var d=a.getAttribute("view");if(d){var b=c.getAncestorByClass(a,"tabViewBody");if(b.selectedTab){b.selectedTab.removeAttribute("selected");
4
- b.selectedBody.removeAttribute("selected");c.removeClass(b.selectedTab,"selected");c.removeClass(b.selectedBody,"selected")}var g=c.getElementByClass(b,"tab"+d+"Body");g||h.error("TabView.selectTab; Missing tab body",a);b.selectedTab=a;b.selectedBody=g;b.selectedTab.setAttribute("selected","true");b.selectedBody.setAttribute("selected","true");c.setClass(b.selectedBody,"selected");c.setClass(b.selectedTab,"selected");this.updateTabBody(b,d)}}},updateTabBody:function(a){a=a.selectedTab.repObject;if(!a._body._updated){a._body._updated=
5
- true;a.bodyTag&&a.bodyTag.replace({tab:a},a._body);a&&a.onUpdateBody&&a.onUpdateBody(this,a._body);for(var d=0;d<this.listeners.length;d++){var b=this.listeners[d];b.onUpdateBody&&b.onUpdateBody(this,a._body)}}},render:function(a){this.element=f.tag.replace({tabView:this},a,f);c.setClass(this.element,this.id);for(var d in this.tabs){var b=this.tabs[d],g=b.tabHeaderTag?b.tabHeaderTag:f.tabHeaderTag,i=b.tabBodyTag?b.tabBodyTag:f.tabBodyTag;try{b._header=g.append({tab:b},c.$(a,"tabBar"));b._body=i.append({tab:b},
6
- c.$(a,"tabBodies"))}catch(j){h.exception("TabView.appendTab; Exception ",j)}}return this.element}};e.Tab=function(){};e.Tab.prototype={invalidate:function(){this._updated=false},select:function(){this.tabView.selectTabByName(this.id)}};return e}});
1
+ 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;d<this.listeners.length;d++){var e=this.listeners[d];e.onUpdateBody&&e.onUpdateBody(this,c._body)}}},render:function(a){this.element=TabViewTempl.tag.replace({tabView:this},a,TabViewTempl),Lib.setClass(this.element,this.id),this.showTabBar(this.tabBarVisibility);for(var b in this.tabs){var c=this.tabs[b],d=c.tabHeaderTag?c.tabHeaderTag:TabViewTempl.tabHeaderTag,e=c.tabBodyTag?c.tabBodyTag:TabViewTempl.tabBodyTag;try{c._header=d.append({tab:c},Lib.$(a,"tabBar")),c._body=e.append({tab:c},Lib.$(a,"tabBodies"))}catch(f){Trace.exception("TabView.appendTab; Exception ",f)}}return this.element}},TabView.Tab=function(){},TabView.Tab.prototype={invalidate:function(){this._updated=!1},select:function(){this.tabView.selectTabByName(this.id)}};return TabView}})
@@ -0,0 +1 @@
1
+ require.def("domplate/tableView",["domplate/domplate","core/lib","i18n!nls/tableView","domplate/domTree","core/trace"],function(Domplate,Lib,Strings,DomTree,Trace){with(Domplate){var TableView=domplate({className:"table",tag:DIV({"class":"dataTableSizer",tabindex:"-1"},TABLE({"class":"dataTable",cellspacing:0,cellpadding:0,width:"100%",role:"grid"},THEAD({"class":"dataTableThead",role:"presentation"},TR({"class":"headerRow focusRow dataTableRow subFocusRow",role:"row",onclick:"$onClickHeader"},FOR("column","$object.columns",TH({"class":"headerCell a11yFocus",role:"columnheader",$alphaValue:"$column.alphaValue"},DIV({"class":"headerCellBox"},"$column.label"))))),TBODY({"class":"dataTableTbody",role:"presentation"},FOR("row","$object.data|getRows",TR({"class":"focusRow dataTableRow subFocusRow",role:"row"},FOR("column","$row|getColumns",TD({"class":"a11yFocus dataTableCell",role:"gridcell"},TAG("$column|getValueTag",{object:"$column"})))))))),getValueTag:function(a){var b=typeof a;if(b=="object")return DomTree.Reps.Tree.tag;var c=DomTree.Reps.getRep(a);return c.shortTag||c.tag},getRows:function(a){var b=this.getProps(a);if(!b.length)return[];return b},getColumns:function(a){if(typeof a!="object")return[a];var b=[];for(var c=0;c<this.columns.length;c++){var d=this.columns[c].property;if(d)if(typeof a[d]==="undefined"){var e=typeof d=="string"?d.split("."):[d],f=a;for(var g in e)f=f&&f[e[g]]||undefined}else f=a[d];else f=a;b.push(f)}return b},getProps:function(a){if(typeof a!="object")return[a];if(a.length)return Lib.cloneArray(a);var b=[];for(var c in a){var d=a[c];this.domFilter(d,c)&&b.push(d)}return b},onClickHeader:function(a){var b=Lib.getAncestorByClass(a.target,"dataTable"),c=Lib.getAncestorByClass(a.target,"headerCell");if(c){var d=!Lib.hasClass(c,"alphaValue"),e=0;for(c=c.previousSibling;c;c=c.previousSibling)++e;this.sort(b,e,d)}},sort:function(a,b,c){var d=Lib.getChildByClass(a,"dataTableTbody"),e=Lib.getChildByClass(a,"dataTableThead"),f=[];for(var g=d.childNodes[0];g;g=g.nextSibling){var h=g.childNodes[b],i=c?parseFloat(h.textContent):h.textContent;f.push({row:g,value:i})}f.sort(function(a,b){return a.value<b.value?-1:1});var j=e.firstChild,k=Lib.getChildByClass(j,"headerSorted");Lib.removeClass(k,"headerSorted"),k&&k.removeAttribute("aria-sort");var l=j.childNodes[b];Lib.setClass(l,"headerSorted");if(l.sorted&&l.sorted!=1){Lib.removeClass(l,"sortedAscending"),Lib.setClass(l,"sortedDescending"),l.setAttribute("aria-sort","descending"),l.sorted=1;for(var m=f.length-1;m>=0;--m)d.appendChild(f[m].row)}else{Lib.removeClass(l,"sortedDescending"),Lib.setClass(l,"sortedAscending"),l.setAttribute("aria-sort","ascending"),l.sorted=-1;for(var m=0;m<f.length;++m)d.appendChild(f[m].row)}},getHeaderColumns:function(a){var b;for(var c in a){b=a[c];break}if(typeof b!="object")return[{label:Strings.objectProperties}];var d=[];for(var c in b){var e=b[c];if(!this.domFilter(e,c))continue;d.push({property:c,label:c,alphaValue:typeof e!="number"})}return d},domFilter:function(a,b){return!0},render:function(a,b,c){if(b){var d=[];for(var e=0;c&&e<c.length;e++){var f=c[e],g=typeof f.property!="undefined"?f.property:f,h=typeof f.label!="undefined"?f.label:g;d.push({property:g,label:h,alphaValue:!0})}d.length||(d=this.getHeaderColumns(b));try{this.columns=d;var i={data:b,columns:d},j=this.tag.append({object:i,columns:d},a),k=Lib.getElementByClass(j,"dataTableTbody"),l=200;l>0&&k.clientHeight>l&&(k.style.height=l+"px")}catch(m){Trace.exception("tableView.render; EXCEPTION "+m,m)}finally{delete this.columns}}}});return TableView}})
@@ -1,3 +1 @@
1
- require.def("domplate/toolTip",["domplate/domplate","core/lib","core/trace"],function(d,a){with(d){var e=null;d=function(){this.element=null};d.prototype=domplate({tag:DIV({"class":"toolTip"},DIV()),show:function(c,b){e&&e.hide();this.target=c;this.addListeners();c=a.getBody(document);this.element=this.tag.append({options:b},c,this);b=a.getElementBox(this.target);this.element.style.top=b.top+b.height+"px";this.element.style.left=b.left+b.width+"px";this.element.style.display="block";e=this;return this.element},
2
- hide:function(){if(this.element){this.removeListeners();this.element.parentNode.removeChild(this.element);e=this.element=null}},addListeners:function(){this.onMouseEvent=a.bind(this.onMouseEvent,this);$(document).bind("mousemove mouseover mousedown click mouseout",this.onMouseEvent,true)},removeListeners:function(){$(document).unbind("mousemove mouseover mousedown click mouseout",this.onMouseEvent,this,true)},onMouseEvent:function(c){var b=a.fixEvent(c);if(!a.getAncestorByClass(b.target,"toolTip")){var g=
3
- c.clientX,h=c.clientY,f=a.getElementBox(this.element);if(c.type!="click"&&c.type!="mousedown")f=a.inflateRect(f,10,10);a.pointInRect(f,g,h)||a.isAncestor(b.target,this.target)||this.hide();a.cancelEvent(b)}}});return d}});
1
+ require.def("domplate/toolTip",["domplate/domplate","core/lib","core/trace"],function(Domplate,Lib,Trace){with(Domplate){var mouseEvents="mousemove mouseover mousedown click mouseout",currentToolTip=null;function ToolTip(){this.element=null}ToolTip.prototype=domplate({tag:DIV({"class":"toolTip"},DIV()),show:function(a,b){currentToolTip&&currentToolTip.hide(),this.target=a,this.addListeners();var c=Lib.getBody(document);this.element=this.tag.append({options:b},c,this);var d=Lib.getElementBox(this.target);this.element.style.top=d.top+d.height+"px",this.element.style.left=d.left+d.width+"px",this.element.style.display="block",currentToolTip=this;return this.element},hide:function(){this.element&&(this.removeListeners(),this.element.parentNode.removeChild(this.element),currentToolTip=this.element=null)},addListeners:function(){this.onMouseEvent=Lib.bind(this.onMouseEvent,this),$(document).bind(mouseEvents,this.onMouseEvent,!0)},removeListeners:function(){$(document).unbind(mouseEvents,this.onMouseEvent,this,!0)},onMouseEvent:function(a){var b=Lib.fixEvent(a),c=Lib.getAncestorByClass(b.target,"toolTip");if(!c){var d=a.clientX,e=a.clientY,f=Lib.getElementBox(this.element);a.type!="click"&&a.type!="mousedown"&&(f=Lib.inflateRect(f,10,10));if(Lib.pointInRect(f,d,e)){Lib.cancelEvent(b);return}if(Lib.isAncestor(b.target,this.target)){Lib.cancelEvent(b);return}this.hide(),Lib.cancelEvent(b)}}});return ToolTip}})
@@ -1,3 +1 @@
1
- require.def("domplate/toolbar",["domplate/domplate","core/lib","core/trace"],function(c,e){with(c){var d=domplate({tag:DIV({"class":"toolbar",onclick:"$onClick"}),buttonTag:SPAN({"class":"$button.className toolbarButton",title:"$button.tooltiptext",$text:"$button|hasLabel",onclick:"$button|getCommand"},"$button|getLabel"),separatorTag:SPAN({"class":"toolbarSeparator",style:"color: gray;"},"|"),hasLabel:function(a){return a.label?true:false},getLabel:function(a){return a.label?a.label:""},getCommand:function(a){return a.command?
2
- a.command:function(){}},onClick:function(a){a=$.event.fix(a||window.event);e.cancelEvent(a)}});c=function(){this.buttons=[]};c.prototype={addButton:function(a){a.tooltiptext||(tooltiptext="");this.buttons.push(a)},getButton:function(a){for(var b=0;b<this.buttons.length;b++)if(this.buttons[b].id==a)return this.buttons[b]},render:function(a){if(this.element)a=this.element.parentNode;this.element=d.tag.replace({},a);for(a=0;a<this.buttons.length;a++){var b=this.buttons[a];(b.tag?b.tag:d.buttonTag).append({button:b},
3
- this.element);a<this.buttons.length-1&&d.separatorTag.append({},this.element)}return this.element}};return c}});
1
+ 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;b<this.buttons.length;b++)if(this.buttons[b].id==a){this.buttons.splice(b,1);break}},addButtons:function(a){for(var b=0;b<a.length;b++)this.addButton(a[b])},getButton:function(a){for(var b=0;b<this.buttons.length;b++)if(this.buttons[b].id==a)return this.buttons[b]},render:function(a){if(this.buttons.length){this.element&&(a=this.element.parentNode),this.element=ToolbarTempl.tag.replace({},a);for(var b=0;b<this.buttons.length;b++){var c=this.buttons[b],d=c.items?ToolbarTempl.dropDownTag:ToolbarTempl.buttonTag,e=c.tag?c.tag:d,f=e.append({button:c},this.element);c.initialize&&c.initialize(f),b<this.buttons.length-1&&ToolbarTempl.separatorTag.append({},this.element)}return this.element}}};return Toolbar}})
@@ -1,6 +1 @@
1
- (function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(b){if(b=Downloadify.queue[b])return b.getData();return""},getFileNameForSave:function(b){if(b=Downloadify.queue[b])return b.getFilename();return""},saveComplete:function(b){(b=Downloadify.queue[b])&&b.complete();return true},saveCancel:function(b){(b=Downloadify.queue[b])&&b.cancel();return true},saveError:function(b){(b=Downloadify.queue[b])&&b.error();return true},addToQueue:function(b){Downloadify.queue[b.queue_name]=
2
- b},getUID:function(b){if(b.id=="")b.id="downloadify_"+Downloadify.uid++;return b.id}};Downloadify.create=function(b,c){b=typeof b=="string"?document.getElementById(b):b;return new Downloadify.Container(b,c)};Downloadify.Container=function(b,c){function d(){a.options=c;if(!a.options.append)a.el.innerHTML="";a.flashContainer=document.createElement("span");a.el.appendChild(a.flashContainer);a.queue_name=Downloadify.getUID(a.flashContainer);if(typeof a.options.filename==="function")a.filenameCallback=
3
- a.options.filename;else if(a.options.filename)a.filename=a.options.filename;if(typeof a.options.data==="function")a.dataCallback=a.options.data;else if(a.options.data)a.data=a.options.data;var e={queue_name:a.queue_name,width:a.options.width,height:a.options.height},f={allowScriptAccess:"always"},g={id:a.flashContainer.id,name:a.flashContainer.id};if(a.options.enabled===false)a.enabled=false;if(a.options.transparent===true)f.wmode="transparent";if(a.options.downloadImage)e.downloadImage=a.options.downloadImage;
4
- swfobject.embedSWF(a.options.swf,a.flashContainer.id,a.options.width,a.options.height,"10",null,e,f,g);Downloadify.addToQueue(a)}var a=this;a.el=b;a.enabled=true;a.dataCallback=null;a.filenameCallback=null;a.data=null;a.filename=null;a.enable=function(){document.getElementById(a.flashContainer.id).setEnabled(true);a.enabled=true};a.disable=function(){document.getElementById(a.flashContainer.id).setEnabled(false);a.enabled=false};a.getData=function(){if(!a.enabled)return"";return a.dataCallback?a.dataCallback():
5
- a.data?a.data:""};a.getFilename=function(){return a.filenameCallback?a.filenameCallback():a.filename?a.filename:""};a.complete=function(){typeof a.options.onComplete==="function"&&a.options.onComplete()};a.cancel=function(){typeof a.options.onCancel==="function"&&a.options.onCancel()};a.error=function(){typeof a.options.onError==="function"&&a.options.onError()};d()};Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:true,append:false}})();
6
- typeof jQuery!="undefined"&&function(b){b.fn.downloadify=function(c){return this.each(function(){c=b.extend({},Downloadify.defaultOptions,c);var d=Downloadify.create(this,c);b(this).data("Downloadify",d)})}}(jQuery);
1
+ (function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(a){if(a=Downloadify.queue[a])return a.getData();return""},getFileNameForSave:function(a){if(a=Downloadify.queue[a])return a.getFilename();return""},saveComplete:function(a){(a=Downloadify.queue[a])&&a.complete();return!0},saveCancel:function(a){(a=Downloadify.queue[a])&&a.cancel();return!0},saveError:function(a){(a=Downloadify.queue[a])&&a.error();return!0},addToQueue:function(a){Downloadify.queue[a.queue_name]=a},getUID:function(a){a.id==""&&(a.id="downloadify_"+Downloadify.uid++);return a.id}},Downloadify.create=function(a,b){a=typeof a=="string"?document.getElementById(a):a;return new Downloadify.Container(a,b)},Downloadify.Container=function(a,b){function d(){c.options=b,c.options.append||(c.el.innerHTML=""),c.flashContainer=document.createElement("span"),c.el.appendChild(c.flashContainer),c.queue_name=Downloadify.getUID(c.flashContainer),typeof c.options.filename==="function"?c.filenameCallback=c.options.filename:c.options.filename&&(c.filename=c.options.filename),typeof c.options.data==="function"?c.dataCallback=c.options.data:c.options.data&&(c.data=c.options.data);var a={queue_name:c.queue_name,width:c.options.width,height:c.options.height},d={allowScriptAccess:"always"},e={id:c.flashContainer.id,name:c.flashContainer.id};c.options.enabled===!1&&(c.enabled=!1),c.options.transparent===!0&&(d.wmode="transparent"),c.options.downloadImage&&(a.downloadImage=c.options.downloadImage),swfobject.embedSWF(c.options.swf,c.flashContainer.id,c.options.width,c.options.height,"10",null,a,d,e),Downloadify.addToQueue(c)}var c=this;c.el=a,c.enabled=!0,c.dataCallback=null,c.filenameCallback=null,c.data=null,c.filename=null,c.enable=function(){var a=document.getElementById(c.flashContainer.id);a.setEnabled(!0),c.enabled=!0},c.disable=function(){var a=document.getElementById(c.flashContainer.id);a.setEnabled(!1),c.enabled=!1},c.getData=function(){if(!c.enabled)return"";return c.dataCallback?c.dataCallback():c.data?c.data:""},c.getFilename=function(){return c.filenameCallback?c.filenameCallback():c.filename?c.filename:""},c.complete=function(){typeof c.options.onComplete==="function"&&c.options.onComplete()},c.cancel=function(){typeof c.options.onCancel==="function"&&c.options.onCancel()},c.error=function(){typeof c.options.onError==="function"&&c.options.onError()},d()},Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:!0,append:!1}})(),typeof jQuery!="undefined"&&function(a){a.fn.downloadify=function(c){return this.each(function(){c=a.extend({},Downloadify.defaultOptions,c);var d=Downloadify.create(this,c);a(this).data("Downloadify",d)})}}(jQuery)
@@ -1,18 +1 @@
1
- var swfobject=function(){function W(){if(A.readyState=="complete"){A.parentNode.removeChild(A);D()}}function D(){if(!E){if(e.ie&&e.win){var a=q("span");try{var b=h.getElementsByTagName("body")[0].appendChild(a);b.parentNode.removeChild(b)}catch(c){return}}E=true;if(F){clearInterval(F);F=null}a=G.length;for(b=0;b<a;b++)G[b]()}}function H(a){if(E)a();else G[G.length]=a}function P(a){if(typeof m.addEventListener!=l)m.addEventListener("load",a,false);else if(typeof h.addEventListener!=l)h.addEventListener("load",
2
- a,false);else if(typeof m.attachEvent!=l)I(m,"onload",a);else if(typeof m.onload=="function"){var b=m.onload;m.onload=function(){b();a()}}else m.onload=a}function X(){for(var a=r.length,b=0;b<a;b++){var c=r[b].id;if(e.pv[0]>0){var d=n(c);if(d){r[b].width=d.getAttribute("width")?d.getAttribute("width"):"0";r[b].height=d.getAttribute("height")?d.getAttribute("height"):"0";if(B(r[b].swfVersion)){e.webkit&&e.webkit<312&&Y(d);u(c,true)}else r[b].expressInstall&&!v&&B("6.0.65")&&(e.win||e.mac)?Q(r[b]):
3
- Z(d)}}else u(c,true)}}function Y(a){var b=a.getElementsByTagName(s)[0];if(b){var c=q("embed"),d=b.attributes;if(d)for(var f=d.length,i=0;i<f;i++)d[i].nodeName=="DATA"?c.setAttribute("src",d[i].nodeValue):c.setAttribute(d[i].nodeName,d[i].nodeValue);if(b=b.childNodes){d=b.length;for(f=0;f<d;f++)b[f].nodeType==1&&b[f].nodeName=="PARAM"&&c.setAttribute(b[f].getAttribute("name"),b[f].getAttribute("value"))}a.parentNode.replaceChild(c,a)}}function Q(a){v=true;var b=n(a.id);if(b){if(a.altContentId){var c=
4
- n(a.altContentId);if(c){w=c;J=a.altContentId}}else w=N(b);if(!/%$/.test(a.width)&&parseInt(a.width,10)<310)a.width="310";if(!/%$/.test(a.height)&&parseInt(a.height,10)<137)a.height="137";h.title=h.title.slice(0,47)+" - Flash Player Installation";c="MMredirectURL="+m.location+"&MMplayerType="+(e.ie&&e.win?"ActiveX":"PlugIn")+"&MMdoctitle="+h.title;var d=a.id;if(e.ie&&e.win&&b.readyState!=4){var f=q("div");d+="SWFObjectNew";f.setAttribute("id",d);b.parentNode.insertBefore(f,b);b.style.display="none";
5
- I(m,"onload",function(){b.parentNode.removeChild(b)})}O({data:a.expressInstall,id:R,width:a.width,height:a.height},{flashvars:c},d)}}function Z(a){if(e.ie&&e.win&&a.readyState!=4){var b=q("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(N(a),b);a.style.display="none";I(m,"onload",function(){a.parentNode.removeChild(a)})}else a.parentNode.replaceChild(N(a),a)}function N(a){var b=q("div");if(e.win&&e.ie)b.innerHTML=a.innerHTML;else if(a=a.getElementsByTagName(s)[0])if(a=a.childNodes)for(var c=
6
- a.length,d=0;d<c;d++)!(a[d].nodeType==1&&a[d].nodeName=="PARAM")&&a[d].nodeType!=8&&b.appendChild(a[d].cloneNode(true));return b}function O(a,b,c){var d,f=n(c);if(f){if(typeof a.id==l)a.id=c;if(e.ie&&e.win){var i="";for(var j in a)if(a[j]!=Object.prototype[j])if(j.toLowerCase()=="data")b.movie=a[j];else if(j.toLowerCase()=="styleclass")i+=' class="'+a[j]+'"';else if(j.toLowerCase()!="classid")i+=" "+j+'="'+a[j]+'"';j="";for(var g in b)if(b[g]!=Object.prototype[g])j+='<param name="'+g+'" value="'+
7
- b[g]+'" />';f.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+i+">"+j+"</object>";K[K.length]=a.id;d=n(a.id)}else if(e.webkit&&e.webkit<312){g=q("embed");g.setAttribute("type",L);for(i in a)if(a[i]!=Object.prototype[i])if(i.toLowerCase()=="data")g.setAttribute("src",a[i]);else if(i.toLowerCase()=="styleclass")g.setAttribute("class",a[i]);else i.toLowerCase()!="classid"&&g.setAttribute(i,a[i]);for(var o in b)b[o]!=Object.prototype[o]&&o.toLowerCase()!="movie"&&g.setAttribute(o,
8
- b[o]);f.parentNode.replaceChild(g,f);d=g}else{g=q(s);g.setAttribute("type",L);for(var k in a)if(a[k]!=Object.prototype[k])if(k.toLowerCase()=="styleclass")g.setAttribute("class",a[k]);else k.toLowerCase()!="classid"&&g.setAttribute(k,a[k]);for(var p in b)b[p]!=Object.prototype[p]&&p.toLowerCase()!="movie"&&$(g,p,b[p]);f.parentNode.replaceChild(g,f);d=g}}return d}function $(a,b,c){var d=q("param");d.setAttribute("name",b);d.setAttribute("value",c);a.appendChild(d)}function S(a){var b=n(a);if(b&&(b.nodeName==
9
- "OBJECT"||b.nodeName=="EMBED"))if(e.ie&&e.win)b.readyState==4?T(a):m.attachEvent("onload",function(){T(a)});else b.parentNode.removeChild(b)}function T(a){if(a=n(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}function n(a){var b=null;try{b=h.getElementById(a)}catch(c){}return b}function q(a){return h.createElement(a)}function I(a,b,c){a.attachEvent(b,c);x[x.length]=[a,b,c]}function B(a){var b=e.pv;a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||
10
- 0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?true:false}function U(a,b){if(!(e.ie&&e.mac)){var c=h.getElementsByTagName("head")[0],d=q("style");d.setAttribute("type","text/css");d.setAttribute("media","screen");!(e.ie&&e.win)&&typeof h.createTextNode!=l&&d.appendChild(h.createTextNode(a+" {"+b+"}"));c.appendChild(d);if(e.ie&&e.win&&typeof h.styleSheets!=l&&h.styleSheets.length>0){c=h.styleSheets[h.styleSheets.length-1];typeof c.addRule==s&&
11
- c.addRule(a,b)}}}function u(a,b){b=b?"visible":"hidden";if(E&&n(a))n(a).style.visibility=b;else U("#"+a,"visibility:"+b)}function V(a){return/[\\\"<>\.;]/.exec(a)!=null?encodeURIComponent(a):a}var l="undefined",s="object",L="application/x-shockwave-flash",R="SWFObjectExprInst",m=window,h=document,t=navigator,G=[],r=[],K=[],x=[],A,F=null,w=null,J=null,E=false,v=false,e=function(){var a=typeof h.getElementById!=l&&typeof h.getElementsByTagName!=l&&typeof h.createElement!=l,b=[0,0,0],c=null;if(typeof t.plugins!=
12
- l&&typeof t.plugins["Shockwave Flash"]==s){if((c=t.plugins["Shockwave Flash"].description)&&!(typeof t.mimeTypes!=l&&t.mimeTypes[L]&&!t.mimeTypes[L].enabledPlugin)){c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1");b[0]=parseInt(c.replace(/^(.*)\..*$/,"$1"),10);b[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10);b[2]=/r/.test(c)?parseInt(c.replace(/^.*r(.*)$/,"$1"),10):0}}else if(typeof m.ActiveXObject!=l){var d=null,f=false;try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(i){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
13
- b=[6,0,21];d.AllowScriptAccess="always"}catch(j){if(b[0]==6)f=true}if(!f)try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(g){}}if(!f&&d)try{if(c=d.GetVariable("$version")){c=c.split(" ")[1].split(",");b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}}catch(o){}}f=t.userAgent.toLowerCase();var k=t.platform.toLowerCase();c=/webkit/.test(f)?parseFloat(f.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;d=k?/win/.test(k):/win/.test(f);f=k?/mac/.test(k):/mac/.test(f);return{w3cdom:a,
14
- pv:b,webkit:c,ie:false,win:d,mac:f}}();(function(){if(e.w3cdom){H(X);if(e.ie&&e.win)try{h.write("<script id=__ie_ondomload defer=true src=//:><\/script>");(A=n("__ie_ondomload"))&&I(A,"onreadystatechange",W)}catch(a){}if(e.webkit&&typeof h.readyState!=l)F=setInterval(function(){/loaded|complete/.test(h.readyState)&&D()},10);typeof h.addEventListener!=l&&h.addEventListener("DOMContentLoaded",D,null);P(D)}})();(function(){e.ie&&e.win&&window.attachEvent("onunload",function(){for(var a=x.length,b=0;b<
15
- a;b++)x[b][0].detachEvent(x[b][1],x[b][2]);a=K.length;for(b=0;b<a;b++)S(K[b]);for(var c in e)e[c]=null;e=null;for(var d in swfobject)swfobject[d]=null;swfobject=null})})();return{registerObject:function(a,b,c){if(!(!e.w3cdom||!a||!b)){var d={};d.id=a;d.swfVersion=b;d.expressInstall=c?c:false;r[r.length]=d;u(a,false)}},getObjectById:function(a){var b=null;if(e.w3cdom)if(a=n(a)){var c=a.getElementsByTagName(s)[0];if(!c||c&&typeof a.SetVariable!=l)b=a;else if(typeof c.SetVariable!=l)b=c}return b},embedSWF:function(a,
16
- b,c,d,f,i,j,g,o){if(!(!e.w3cdom||!a||!b||!c||!d||!f)){c+="";d+="";if(B(f)){u(b,false);var k={};if(o&&typeof o===s)for(var p in o)if(o[p]!=Object.prototype[p])k[p]=o[p];k.data=a;k.width=c;k.height=d;var C={};if(g&&typeof g===s)for(var M in g)if(g[M]!=Object.prototype[M])C[M]=g[M];if(j&&typeof j===s)for(var y in j)if(j[y]!=Object.prototype[y])if(typeof C.flashvars!=l)C.flashvars+="&"+y+"="+j[y];else C.flashvars=y+"="+j[y];H(function(){O(k,C,b);k.id==b&&u(b,true)})}else if(i&&!v&&B("6.0.65")&&(e.win||
17
- e.mac)){v=true;u(b,false);H(function(){var z={};z.id=z.altContentId=b;z.width=c;z.height=d;z.expressInstall=i;Q(z)})}}},getFlashPlayerVersion:function(){return{major:e.pv[0],minor:e.pv[1],release:e.pv[2]}},hasFlashPlayerVersion:B,createSWF:function(a,b,c){if(e.w3cdom)return O(a,b,c)},removeSWF:function(a){e.w3cdom&&S(a)},createCSS:function(a,b){e.w3cdom&&U(a,b)},addDomLoadEvent:H,addLoadEvent:P,getQueryParamValue:function(a){var b=h.location.search||h.location.hash;if(a==null)return V(b);if(b){b=
18
- b.substring(1).split("&");for(var c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return V(b[c].substring(b[c].indexOf("=")+1))}return""},expressInstallCallback:function(){if(v&&w){var a=n(R);if(a){a.parentNode.replaceChild(w,a);if(J){u(J,true);if(e.ie&&e.win)w.style.display="block"}J=w=null;v=false}}}}}();
1
+ var swfobject=function(){function O(a){var b=/[\\\"<>\.;]/,c=b.exec(a)!=null;return c?encodeURIComponent(a):a}function N(a,b){var c=b?"visible":"hidden";r&&I(a)?I(a).style.visibility=c:M("#"+a,"visibility:"+c)}function M(c,d){if(!t.ie||!t.mac){var e=h.getElementsByTagName("head")[0],f=J("style");f.setAttribute("type","text/css"),f.setAttribute("media","screen"),(!t.ie||!t.win)&&typeof h.createTextNode!=a&&f.appendChild(h.createTextNode(c+" {"+d+"}")),e.appendChild(f);if(t.ie&&t.win&&typeof h.styleSheets!=a&&h.styleSheets.length>0){var g=h.styleSheets[h.styleSheets.length-1];typeof g.addRule==b&&g.addRule(c,d)}}}function L(a){var b=t.pv,c=a.split(".");c[0]=parseInt(c[0],10),c[1]=parseInt(c[1],10)||0,c[2]=parseInt(c[2],10)||0;return b[0]>c[0]||b[0]==c[0]&&b[1]>c[1]||b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]?!0:!1}function K(a,b,c){a.attachEvent(b,c),m[m.length]=[a,b,c]}function J(a){return h.createElement(a)}function I(a){var b=null;try{b=h.getElementById(a)}catch(c){}return b}function H(a){var b=I(a);if(b){for(var c in b)typeof b[c]=="function"&&(b[c]=null);b.parentNode.removeChild(b)}}function G(a){var b=I(a);b&&(b.nodeName=="OBJECT"||b.nodeName=="EMBED")&&(t.ie&&t.win?b.readyState==4?H(a):g.attachEvent("onload",function(){H(a)}):b.parentNode.removeChild(b))}function F(a,b,c){var d=J("param");d.setAttribute("name",b),d.setAttribute("value",c),a.appendChild(d)}function E(c,d,f){var g,h=I(f);if(h){typeof c.id==a&&(c.id=f);if(t.ie&&t.win){var i="";for(var j in c)c[j]!=Object.prototype[j]&&(j.toLowerCase()=="data"?d.movie=c[j]:j.toLowerCase()=="styleclass"?i+=' class="'+c[j]+'"':j.toLowerCase()!="classid"&&(i+=" "+j+'="'+c[j]+'"'));var k="";for(var m in d)d[m]!=Object.prototype[m]&&(k+='<param name="'+m+'" value="'+d[m]+'" />');h.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+i+">"+k+"</object>",l[l.length]=c.id,g=I(c.id)}else if(t.webkit&&t.webkit<312){var n=J("embed");n.setAttribute("type",e);for(var o in c)c[o]!=Object.prototype[o]&&(o.toLowerCase()=="data"?n.setAttribute("src",c[o]):o.toLowerCase()=="styleclass"?n.setAttribute("class",c[o]):o.toLowerCase()!="classid"&&n.setAttribute(o,c[o]));for(var p in d)d[p]!=Object.prototype[p]&&(p.toLowerCase()!="movie"&&n.setAttribute(p,d[p]));h.parentNode.replaceChild(n,h),g=n}else{var q=J(b);q.setAttribute("type",e);for(var r in c)c[r]!=Object.prototype[r]&&(r.toLowerCase()=="styleclass"?q.setAttribute("class",c[r]):r.toLowerCase()!="classid"&&q.setAttribute(r,c[r]));for(var s in d)d[s]!=Object.prototype[s]&&s.toLowerCase()!="movie"&&F(q,s,d[s]);h.parentNode.replaceChild(q,h),g=q}}return g}function D(a){var c=J("div");if(t.win&&t.ie)c.innerHTML=a.innerHTML;else{var d=a.getElementsByTagName(b)[0];if(d){var e=d.childNodes;if(e){var f=e.length;for(var g=0;g<f;g++)(e[g].nodeType!=1||e[g].nodeName!="PARAM")&&e[g].nodeType!=8&&c.appendChild(e[g].cloneNode(!0))}}}return c}function C(a){if(t.ie&&t.win&&a.readyState!=4){var b=J("div");a.parentNode.insertBefore(b,a),b.parentNode.replaceChild(D(a),b),a.style.display="none";var c=function(){a.parentNode.removeChild(a)};K(g,"onload",c)}else a.parentNode.replaceChild(D(a),a)}function B(a){s=!0;var b=I(a.id);if(b){if(a.altContentId){var c=I(a.altContentId);c&&(p=c,q=a.altContentId)}else p=D(b);!/%$/.test(a.width)&&parseInt(a.width,10)<310&&(a.width="310"),!/%$/.test(a.height)&&parseInt(a.height,10)<137&&(a.height="137"),h.title=h.title.slice(0,47)+" - Flash Player Installation";var d=t.ie&&t.win?"ActiveX":"PlugIn",e=h.title,i="MMredirectURL="+g.location+"&MMplayerType="+d+"&MMdoctitle="+e,j=a.id;if(t.ie&&t.win&&b.readyState!=4){var k=J("div");j+="SWFObjectNew",k.setAttribute("id",j),b.parentNode.insertBefore(k,b),b.style.display="none";var l=function(){b.parentNode.removeChild(b)};K(g,"onload",l)}E({data:a.expressInstall,id:f,width:a.width,height:a.height},{flashvars:i},j)}}function A(a){var c=a.getElementsByTagName(b)[0];if(c){var d=J("embed"),e=c.attributes;if(e){var f=e.length;for(var g=0;g<f;g++)e[g].nodeName=="DATA"?d.setAttribute("src",e[g].nodeValue):d.setAttribute(e[g].nodeName,e[g].nodeValue)}var h=c.childNodes;if(h){var i=h.length;for(var j=0;j<i;j++)h[j].nodeType==1&&h[j].nodeName=="PARAM"&&d.setAttribute(h[j].getAttribute("name"),h[j].getAttribute("value"))}a.parentNode.replaceChild(d,a)}}function z(){var a=k.length;for(var b=0;b<a;b++){var c=k[b].id;if(t.pv[0]>0){var d=I(c);d&&(k[b].width=d.getAttribute("width")?d.getAttribute("width"):"0",k[b].height=d.getAttribute("height")?d.getAttribute("height"):"0",L(k[b].swfVersion)?(t.webkit&&t.webkit<312&&A(d),N(c,!0)):k[b].expressInstall&&!s&&L("6.0.65")&&(t.win||t.mac)?B(k[b]):C(d))}else N(c,!0)}}function y(b){if(typeof g.addEventListener!=a)g.addEventListener("load",b,!1);else if(typeof h.addEventListener!=a)h.addEventListener("load",b,!1);else if(typeof g.attachEvent!=a)K(g,"onload",b);else if(typeof g.onload=="function"){var c=g.onload;g.onload=function(){c(),b()}}else g.onload=b}function x(a){r?a():j[j.length]=a}function w(){if(!r){if(t.ie&&t.win){var a=J("span");try{var b=h.getElementsByTagName("body")[0].appendChild(a);b.parentNode.removeChild(b)}catch(c){return}}r=!0,o&&(clearInterval(o),o=null);var d=j.length;for(var e=0;e<d;e++)j[e]()}}function v(){n.readyState=="complete"&&(n.parentNode.removeChild(n),w())}var a="undefined",b="object",c="Shockwave Flash",d="ShockwaveFlash.ShockwaveFlash",e="application/x-shockwave-flash",f="SWFObjectExprInst",g=window,h=document,i=navigator,j=[],k=[],l=[],m=[],n,o=null,p=null,q=null,r=!1,s=!1,t=function(){var f=typeof h.getElementById!=a&&typeof h.getElementsByTagName!=a&&typeof h.createElement!=a,j=[0,0,0],k=null;if(typeof i.plugins!=a&&typeof i.plugins[c]==b)k=i.plugins[c].description,k&&(typeof i.mimeTypes==a||!i.mimeTypes[e]||i.mimeTypes[e].enabledPlugin)&&(k=k.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),j[0]=parseInt(k.replace(/^(.*)\..*$/,"$1"),10),j[1]=parseInt(k.replace(/^.*\.(.*)\s.*$/,"$1"),10),j[2]=/r/.test(k)?parseInt(k.replace(/^.*r(.*)$/,"$1"),10):0);else if(typeof g.ActiveXObject!=a){var l=null,m=!1;try{l=new ActiveXObject(d+".7")}catch(n){try{l=new ActiveXObject(d+".6"),j=[6,0,21],l.AllowScriptAccess="always"}catch(n){j[0]==6&&(m=!0)}if(!m)try{l=new ActiveXObject(d)}catch(n){}}if(!m&&l)try{k=l.GetVariable("$version"),k&&(k=k.split(" ")[1].split(","),j=[parseInt(k[0],10),parseInt(k[1],10),parseInt(k[2],10)])}catch(n){}}var o=i.userAgent.toLowerCase(),p=i.platform.toLowerCase(),q=/webkit/.test(o)?parseFloat(o.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,r=!1,s=p?/win/.test(p):/win/.test(o),t=p?/mac/.test(p):/mac/.test(o);return{w3cdom:f,pv:j,webkit:q,ie:r,win:s,mac:t}}(),u=function(){if(t.w3cdom){x(z);if(t.ie&&t.win)try{h.write("<script id=__ie_ondomload defer=true src=//:></script>"),n=I("__ie_ondomload"),n&&K(n,"onreadystatechange",v)}catch(b){}t.webkit&&typeof h.readyState!=a&&(o=setInterval(function(){/loaded|complete/.test(h.readyState)&&w()},10)),typeof h.addEventListener!=a&&h.addEventListener("DOMContentLoaded",w,null),y(w)}}(),P=function(){t.ie&&t.win&&window.attachEvent("onunload",function(){var a=m.length;for(var b=0;b<a;b++)m[b][0].detachEvent(m[b][1],m[b][2]);var c=l.length;for(var d=0;d<c;d++)G(l[d]);for(var e in t)t[e]=null;t=null;for(var f in swfobject)swfobject[f]=null;swfobject=null})}();return{registerObject:function(a,b,c){if(t.w3cdom&&a&&b){var d={};d.id=a,d.swfVersion=b,d.expressInstall=c?c:!1,k[k.length]=d,N(a,!1)}},getObjectById:function(c){var d=null;if(t.w3cdom){var e=I(c);if(e){var f=e.getElementsByTagName(b)[0];!f||f&&typeof e.SetVariable!=a?d=e:typeof f.SetVariable!=a&&(d=f)}}return d},embedSWF:function(c,d,e,f,g,h,i,j,k){if(t.w3cdom&&c&&d&&e&&f&&g){e+="",f+="";if(L(g)){N(d,!1);var l={};if(k&&typeof k===b)for(var m in k)k[m]!=Object.prototype[m]&&(l[m]=k[m]);l.data=c,l.width=e,l.height=f;var n={};if(j&&typeof j===b)for(var o in j)j[o]!=Object.prototype[o]&&(n[o]=j[o]);if(i&&typeof i===b)for(var p in i)i[p]!=Object.prototype[p]&&(typeof n.flashvars!=a?n.flashvars+="&"+p+"="+i[p]:n.flashvars=p+"="+i[p]);x(function(){E(l,n,d),l.id==d&&N(d,!0)})}else h&&!s&&L("6.0.65")&&(t.win||t.mac)&&(s=!0,N(d,!1),x(function(){var a={};a.id=a.altContentId=d,a.width=e,a.height=f,a.expressInstall=h,B(a)}))}},getFlashPlayerVersion:function(){return{major:t.pv[0],minor:t.pv[1],release:t.pv[2]}},hasFlashPlayerVersion:L,createSWF:function(a,b,c){return t.w3cdom?E(a,b,c):undefined},removeSWF:function(a){t.w3cdom&&G(a)},createCSS:function(a,b){t.w3cdom&&M(a,b)},addDomLoadEvent:x,addLoadEvent:y,getQueryParamValue:function(a){var b=h.location.search||h.location.hash;if(a==null)return O(b);if(b){var c=b.substring(1).split("&");for(var d=0;d<c.length;d++)if(c[d].substring(0,c[d].indexOf("="))==a)return O(c[d].substring(c[d].indexOf("=")+1))}return""},expressInstallCallback:function(){if(s&&p){var a=I(f);a&&(a.parentNode.replaceChild(p,a),q&&(N(q,!0),t.ie&&t.win&&(p.style.display="block")),p=null,q=null,s=!1)}}}}()
@@ -1,6 +1 @@
1
- (function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(b){if(b=Downloadify.queue[b])return b.getData();return""},getFileNameForSave:function(b){if(b=Downloadify.queue[b])return b.getFilename();return""},saveComplete:function(b){(b=Downloadify.queue[b])&&b.complete();return true},saveCancel:function(b){(b=Downloadify.queue[b])&&b.cancel();return true},saveError:function(b){(b=Downloadify.queue[b])&&b.error();return true},addToQueue:function(b){Downloadify.queue[b.queue_name]=
2
- b},getUID:function(b){if(b.id=="")b.id="downloadify_"+Downloadify.uid++;return b.id}};Downloadify.create=function(b,c){b=typeof b=="string"?document.getElementById(b):b;return new Downloadify.Container(b,c)};Downloadify.Container=function(b,c){var a=this;a.el=b;a.enabled=true;a.dataCallback=null;a.filenameCallback=null;a.data=null;a.filename=null;a.enable=function(){document.getElementById(a.flashContainer.id).setEnabled(true);a.enabled=true};a.disable=function(){document.getElementById(a.flashContainer.id).setEnabled(false);
3
- a.enabled=false};a.getData=function(){if(!a.enabled)return"";return a.dataCallback?a.dataCallback():a.data?a.data:""};a.getFilename=function(){return a.filenameCallback?a.filenameCallback():a.filename?a.filename:""};a.complete=function(){typeof a.options.onComplete==="function"&&a.options.onComplete()};a.cancel=function(){typeof a.options.onCancel==="function"&&a.options.onCancel()};a.error=function(){typeof a.options.onError==="function"&&a.options.onError()};(function(){a.options=c;if(!a.options.append)a.el.innerHTML=
4
- "";a.flashContainer=document.createElement("span");a.el.appendChild(a.flashContainer);a.queue_name=Downloadify.getUID(a.flashContainer);if(typeof a.options.filename==="function")a.filenameCallback=a.options.filename;else if(a.options.filename)a.filename=a.options.filename;if(typeof a.options.data==="function")a.dataCallback=a.options.data;else if(a.options.data)a.data=a.options.data;var d={queue_name:a.queue_name,width:a.options.width,height:a.options.height},e={allowScriptAccess:"always"},f={id:a.flashContainer.id,
5
- name:a.flashContainer.id};if(a.options.enabled===false)a.enabled=false;if(a.options.transparent===true)e.wmode="transparent";if(a.options.downloadImage)d.downloadImage=a.options.downloadImage;swfobject.embedSWF(a.options.swf,a.flashContainer.id,a.options.width,a.options.height,"10",null,d,e,f);Downloadify.addToQueue(a)})()};Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:true,append:false}})();
6
- typeof jQuery!="undefined"&&function(b){b.fn.downloadify=function(c){return this.each(function(){c=b.extend({},Downloadify.defaultOptions,c);var a=Downloadify.create(this,c);b(this).data("Downloadify",a)})}}(jQuery);
1
+ (function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getData();return""},getFileNameForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getFilename();return""},saveComplete:function(a){var b=Downloadify.queue[a];b&&b.complete();return!0},saveCancel:function(a){var b=Downloadify.queue[a];b&&b.cancel();return!0},saveError:function(a){var b=Downloadify.queue[a];b&&b.error();return!0},addToQueue:function(a){Downloadify.queue[a.queue_name]=a},getUID:function(a){a.id==""&&(a.id="downloadify_"+Downloadify.uid++);return a.id}},Downloadify.create=function(a,b){var c=typeof a=="string"?document.getElementById(a):a;return new Downloadify.Container(c,b)},Downloadify.Container=function(a,b){var c=this;c.el=a,c.enabled=!0,c.dataCallback=null,c.filenameCallback=null,c.data=null,c.filename=null;var d=function(){c.options=b,c.options.append||(c.el.innerHTML=""),c.flashContainer=document.createElement("span"),c.el.appendChild(c.flashContainer),c.queue_name=Downloadify.getUID(c.flashContainer),typeof c.options.filename==="function"?c.filenameCallback=c.options.filename:c.options.filename&&(c.filename=c.options.filename),typeof c.options.data==="function"?c.dataCallback=c.options.data:c.options.data&&(c.data=c.options.data);var a={queue_name:c.queue_name,width:c.options.width,height:c.options.height},d={allowScriptAccess:"always"},e={id:c.flashContainer.id,name:c.flashContainer.id};c.options.enabled===!1&&(c.enabled=!1),c.options.transparent===!0&&(d.wmode="transparent"),c.options.downloadImage&&(a.downloadImage=c.options.downloadImage),swfobject.embedSWF(c.options.swf,c.flashContainer.id,c.options.width,c.options.height,"10",null,a,d,e),Downloadify.addToQueue(c)};c.enable=function(){var a=document.getElementById(c.flashContainer.id);a.setEnabled(!0),c.enabled=!0},c.disable=function(){var a=document.getElementById(c.flashContainer.id);a.setEnabled(!1),c.enabled=!1},c.getData=function(){if(!c.enabled)return"";return c.dataCallback?c.dataCallback():c.data?c.data:""},c.getFilename=function(){return c.filenameCallback?c.filenameCallback():c.filename?c.filename:""},c.complete=function(){typeof c.options.onComplete==="function"&&c.options.onComplete()},c.cancel=function(){typeof c.options.onCancel==="function"&&c.options.onCancel()},c.error=function(){typeof c.options.onError==="function"&&c.options.onError()},d()},Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:!0,append:!1}})(),typeof jQuery!="undefined"&&function(a){a.fn.downloadify=function(b){return this.each(function(){b=a.extend({},Downloadify.defaultOptions,b);var c=Downloadify.create(this,b);a(this).data("Downloadify",c)})}}(jQuery)
@@ -1,21 +1 @@
1
- document.createElement("canvas").getContext||function(){function K(){return this.context_||(this.context_=new z(this))}function L(a,b){var c=D.call(arguments,2);return function(){return a.apply(b,c.concat(D.call(arguments)))}}function M(a){var b=a.srcElement;switch(a.propertyName){case "width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case "height":b.style.height=b.attributes.height.nodeValue+"px";b.getContext().clearRect();break}}function N(a){a=a.srcElement;
2
- if(a.firstChild){a.firstChild.style.width=a.clientWidth+"px";a.firstChild.style.height=a.clientHeight+"px"}}function A(){return[[1,0,0],[0,1,0],[0,0,1]]}function s(a,b){for(var c=A(),d=0;d<3;d++)for(var e=0;e<3;e++){for(var h=0,g=0;g<3;g++)h+=a[d][g]*b[g][e];c[d][e]=h}return c}function E(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=
3
- a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function F(a){var b,c=1;a=String(a);if(a.substring(0,3)=="rgb"){b=a.indexOf("(",3);var d=a.indexOf(")",b+1);d=a.substring(b+1,d).split(",");b="#";for(var e=0;e<3;e++)b+=G[Number(d[e])];if(d.length==4&&a.substr(3,1)=="a")c=d[3]}else b=a;return{color:b,alpha:c}}function O(a){switch(a){case "butt":return"flat";case "round":return"round";case "square":default:return"square"}}
4
- function z(a){this.m_=A();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=k*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.element_=b;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function H(a,b,c,d){a.currentPath_.push({type:"bezierCurveTo",
5
- cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});a.currentX_=d.x;a.currentY_=d.y}function P(a){for(var b=0;b<3;b++)for(var c=0;c<2;c++)if(!isFinite(a[b][c])||isNaN(a[b][c]))return false;return true}function t(a,b,c){if(P(b)){a.m_=b;if(c)a.lineScale_=Q(R(b[0][0]*b[1][1]-b[0][1]*b[1][0]))}}function w(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function I(){}var n=Math,j=n.round,B=n.sin,C=n.cos,R=n.abs,Q=n.sqrt,k=10,r=k/2,D=Array.prototype.slice,J={init:function(a){if(/MSIE/.test(navigator.userAgent)&&
6
- !window.opera){a=a||document;a.createElement("canvas");a.attachEvent("onreadystatechange",L(this.init_,this,a))}},init_:function(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!a.styleSheets.ex_canvas_){var b=a.createStyleSheet();b.owningElement.id="ex_canvas_";b.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}a=
7
- a.getElementsByTagName("canvas");for(b=0;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=K;a.innerHTML="";a.attachEvent("onpropertychange",M);a.attachEvent("onresize",N);var b=a.attributes;if(b.width&&b.width.specified)a.style.width=b.width.nodeValue+"px";else a.width=a.clientWidth;if(b.height&&b.height.specified)a.style.height=b.height.nodeValue+"px";else a.height=a.clientHeight}return a}};J.init();for(var G=[],i=0;i<16;i++)for(var x=0;x<16;x++)G[i*16+
8
- x]=i.toString(16)+x.toString(16);i=z.prototype;i.clearRect=function(){this.element_.innerHTML=""};i.beginPath=function(){this.currentPath_=[]};i.moveTo=function(a,b){a=this.getCoords_(a,b);this.currentPath_.push({type:"moveTo",x:a.x,y:a.y});this.currentX_=a.x;this.currentY_=a.y};i.lineTo=function(a,b){a=this.getCoords_(a,b);this.currentPath_.push({type:"lineTo",x:a.x,y:a.y});this.currentX_=a.x;this.currentY_=a.y};i.bezierCurveTo=function(a,b,c,d,e,h){e=this.getCoords_(e,h);a=this.getCoords_(a,b);
9
- c=this.getCoords_(c,d);H(this,a,c,e)};i.quadraticCurveTo=function(a,b,c,d){a=this.getCoords_(a,b);c=this.getCoords_(c,d);d={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};H(this,d,{x:d.x+(c.x-this.currentX_)/3,y:d.y+(c.y-this.currentY_)/3},c)};i.arc=function(a,b,c,d,e,h){c*=k;var g=h?"at":"wa",f=a+C(d)*c-r,l=b+B(d)*c-r;d=a+C(e)*c-r;e=b+B(e)*c-r;if(f==d&&!h)f+=0.125;a=this.getCoords_(a,b);f=this.getCoords_(f,l);d=this.getCoords_(d,e);this.currentPath_.push({type:g,
10
- x:a.x,y:a.y,radius:c,xStart:f.x,yStart:f.y,xEnd:d.x,yEnd:d.y})};i.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()};i.strokeRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke();this.currentPath_=e};i.fillRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+
11
- c,b+d);this.lineTo(a,b+d);this.closePath();this.fill();this.currentPath_=e};i.createLinearGradient=function(a,b,c,d){var e=new w("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=d;return e};i.createRadialGradient=function(a,b,c,d,e,h){var g=new w("gradientradial");g.x0_=a;g.y0_=b;g.r0_=c;g.x1_=d;g.y1_=e;g.r1_=h;return g};i.drawImage=function(a){var b,c,d,e,h,g,f,l;d=a.runtimeStyle.width;e=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var o=a.width,p=a.height;a.runtimeStyle.width=
12
- d;a.runtimeStyle.height=e;if(arguments.length==3){b=arguments[1];c=arguments[2];h=g=0;f=d=o;l=e=p}else if(arguments.length==5){b=arguments[1];c=arguments[2];d=arguments[3];e=arguments[4];h=g=0;f=o;l=p}else if(arguments.length==9){h=arguments[1];g=arguments[2];f=arguments[3];l=arguments[4];b=arguments[5];c=arguments[6];d=arguments[7];e=arguments[8]}else throw Error("Invalid number of arguments");var m=this.getCoords_(b,c),q=[];q.push(" <g_vml_:group",' coordsize="',k*10,",",k*10,'"',' coordorigin="0,0"',
13
- ' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var u=[];u.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",j(m.x/k),",","Dy=",j(m.y/k),"");var v=this.getCoords_(b+d,c),y=this.getCoords_(b,c+e);b=this.getCoords_(b+d,c+e);m.x=n.max(m.x,v.x,y.x,b.x);m.y=n.max(m.y,v.y,y.y,b.y);q.push("padding:0 ",j(m.x/k),"px ",j(m.y/k),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",u.join(""),", sizingmethod='clip');")}else q.push("top:",
14
- j(m.y/k),"px;left:",j(m.x/k),"px;");q.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',k*d,"px;"," height:",k*e,'px;"',' cropleft="',h/o,'"',' croptop="',g/p,'"',' cropright="',(o-h-f)/o,'"',' cropbottom="',(p-g-l)/p,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",q.join(""))};i.stroke=function(a){var b=[],c=F(a?this.fillStyle:this.strokeStyle),d=c.color;c=c.alpha*this.globalAlpha;b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10,
15
- "px;height:",10,'px;"',' coordorigin="0 0" coordsize="',k*10," ",k*10,'"',' stroked="',!a,'"',' path="');for(var e={x:null,y:null},h={x:null,y:null},g=0;g<this.currentPath_.length;g++){var f=this.currentPath_[g];switch(f.type){case "moveTo":b.push(" m ",j(f.x),",",j(f.y));break;case "lineTo":b.push(" l ",j(f.x),",",j(f.y));break;case "close":b.push(" x ");f=null;break;case "bezierCurveTo":b.push(" c ",j(f.cp1x),",",j(f.cp1y),",",j(f.cp2x),",",j(f.cp2y),",",j(f.x),",",j(f.y));break;case "at":case "wa":b.push(" ",
16
- f.type," ",j(f.x-this.arcScaleX_*f.radius),",",j(f.y-this.arcScaleY_*f.radius)," ",j(f.x+this.arcScaleX_*f.radius),",",j(f.y+this.arcScaleY_*f.radius)," ",j(f.xStart),",",j(f.yStart)," ",j(f.xEnd),",",j(f.yEnd));break}if(f){if(e.x==null||f.x<e.x)e.x=f.x;if(h.x==null||f.x>h.x)h.x=f.x;if(e.y==null||f.y<e.y)e.y=f.y;if(h.y==null||f.y>h.y)h.y=f.y}}b.push(' ">');if(a)if(typeof this.fillStyle=="object"){d=this.fillStyle;f=0;a={x:0,y:0};c=0;var l=1;if(d.type_=="gradient"){f=d.x1_/this.arcScaleX_;e=d.y1_/
17
- this.arcScaleY_;g=this.getCoords_(d.x0_/this.arcScaleX_,d.y0_/this.arcScaleY_);f=this.getCoords_(f,e);f=Math.atan2(f.x-g.x,f.y-g.y)*180/Math.PI;if(f<0)f+=360;if(f<1.0E-6)f=0}else{g=this.getCoords_(d.x0_,d.y0_);c=h.x-e.x;l=h.y-e.y;a={x:(g.x-e.x)/c,y:(g.y-e.y)/l};c/=this.arcScaleX_*k;l/=this.arcScaleY_*k;g=n.max(c,l);c=2*d.r0_/g;l=2*d.r1_/g-c}e=d.colors_;e.sort(function(y,S){return y.offset-S.offset});h=e.length;var o=e[0].color,p=e[h-1].color,m=e[0].alpha*this.globalAlpha,q=e[h-1].alpha*this.globalAlpha,
18
- u=[];for(g=0;g<h;g++){var v=e[g];u.push(v.offset*l+c+" "+v.color)}b.push('<g_vml_:fill type="',d.type_,'"',' method="none" focus="100%"',' color="',o,'"',' color2="',p,'"',' colors="',u.join(","),'"',' opacity="',q,'"',' g_o_:opacity2="',m,'"',' angle="',f,'"',' focusposition="',a.x,",",a.y,'" />')}else b.push('<g_vml_:fill color="',d,'" opacity="',c,'" />');else{a=this.lineScale_*this.lineWidth;if(a<1)c*=a;b.push("<g_vml_:stroke",' opacity="',c,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',
19
- this.miterLimit,'"',' endcap="',O(this.lineCap),'"',' weight="',a,'px"',' color="',d,'" />')}b.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(a,b){var c=this.m_;return{x:k*(a*c[0][0]+b*c[1][0]+c[2][0])-r,y:k*(a*c[0][1]+b*c[1][1]+c[2][1])-r}};i.save=function(){var a={};E(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=s(A(),this.m_)};
20
- i.restore=function(){E(this.aStack_.pop(),this);this.m_=this.mStack_.pop()};i.translate=function(a,b){t(this,s([[1,0,0],[0,1,0],[a,b,1]],this.m_),false)};i.rotate=function(a){var b=C(a);a=B(a);t(this,s([[b,a,0],[-a,b,0],[0,0,1]],this.m_),false)};i.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;t(this,s([[a,0,0],[0,b,0],[0,0,1]],this.m_),true)};i.transform=function(a,b,c,d,e,h){t(this,s([[a,b,0],[c,d,0],[e,h,1]],this.m_),true)};i.setTransform=function(a,b,c,d,e,h){t(this,[[a,b,0],[c,d,0],
21
- [e,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new I};w.prototype.addColorStop=function(a,b){b=F(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};G_vmlCanvasManager=J;CanvasRenderingContext2D=z;CanvasGradient=w;CanvasPattern=I}();
1
+ document.createElement("canvas").getContext||function(){function C(){}function B(a){this.type_=a,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function A(a,b,c){if(z(b)){a.m_=b;if(c){var d=b[0][0]*b[1][1]-b[0][1]*b[1][0];a.lineScale_=f(e(d))}}}function z(a){for(var b=0;b<3;b++)for(var c=0;c<2;c++)if(!isFinite(a[b][c])||isNaN(a[b][c]))return!1;return!0}function y(a,b,c,d){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y}),a.currentX_=d.x,a.currentY_=d.y}function w(a){this.m_=r(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=g*1,this.globalAlpha=1,this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px",b.style.height=a.clientHeight+"px",b.style.overflow="hidden",b.style.position="absolute",a.appendChild(b),this.element_=b,this.arcScaleX_=1,this.arcScaleY_=1,this.lineScale_=1}function v(a){switch(a){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function u(a){var b,c=1;a=String(a);if(a.substring(0,3)=="rgb"){var d=a.indexOf("(",3),e=a.indexOf(")",d+1),f=a.substring(d+1,e).split(",");b="#";for(var g=0;g<3;g++)b+=o[Number(f[g])];f.length==4&&a.substr(3,1)=="a"&&(c=f[3])}else b=a;return{color:b,alpha:c}}function t(a,b){b.fillStyle=a.fillStyle,b.lineCap=a.lineCap,b.lineJoin=a.lineJoin,b.lineWidth=a.lineWidth,b.miterLimit=a.miterLimit,b.shadowBlur=a.shadowBlur,b.shadowColor=a.shadowColor,b.shadowOffsetX=a.shadowOffsetX,b.shadowOffsetY=a.shadowOffsetY,b.strokeStyle=a.strokeStyle,b.globalAlpha=a.globalAlpha,b.arcScaleX_=a.arcScaleX_,b.arcScaleY_=a.arcScaleY_,b.lineScale_=a.lineScale_}function s(a,b){var c=r();for(var d=0;d<3;d++)for(var e=0;e<3;e++){var f=0;for(var g=0;g<3;g++)f+=a[d][g]*b[g][e];c[d][e]=f}return c}function r(){return[[1,0,0],[0,1,0],[0,0,1]]}function n(a){var b=a.srcElement;b.firstChild&&(b.firstChild.style.width=b.clientWidth+"px",b.firstChild.style.height=b.clientHeight+"px")}function m(a){var b=a.srcElement;switch(a.propertyName){case"width":b.style.width=b.attributes.width.nodeValue+"px",b.getContext().clearRect();break;case"height":b.style.height=b.attributes.height.nodeValue+"px",b.getContext().clearRect()}}function k(a,b,c){var d=j.call(arguments,2);return function(){return a.apply(b,d.concat(j.call(arguments)))}}function i(){return this.context_||(this.context_=new w(this))}var a=Math,b=a.round,c=a.sin,d=a.cos,e=a.abs,f=a.sqrt,g=10,h=g/2,j=Array.prototype.slice,l={init:function(a){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var b=a||document;b.createElement("canvas"),b.attachEvent("onreadystatechange",k(this.init_,this,b))}},init_:function(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML"),a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!a.styleSheets.ex_canvas_){var b=a.createStyleSheet();b.owningElement.id="ex_canvas_",b.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=a.getElementsByTagName("canvas");for(var d=0;d<c.length;d++)this.initElement(c[d])},initElement:function(a){if(!a.getContext){a.getContext=i,a.innerHTML="",a.attachEvent("onpropertychange",m),a.attachEvent("onresize",n);var b=a.attributes;b.width&&b.width.specified?a.style.width=b.width.nodeValue+"px":a.width=a.clientWidth,b.height&&b.height.specified?a.style.height=b.height.nodeValue+"px":a.height=a.clientHeight}return a}};l.init();var o=[];for(var p=0;p<16;p++)for(var q=0;q<16;q++)o[p*16+q]=p.toString(16)+q.toString(16);var x=w.prototype;x.clearRect=function(){this.element_.innerHTML=""},x.beginPath=function(){this.currentPath_=[]},x.moveTo=function(a,b){var c=this.getCoords_(a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y}),this.currentX_=c.x,this.currentY_=c.y},x.lineTo=function(a,b){var c=this.getCoords_(a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y}),this.currentX_=c.x,this.currentY_=c.y},x.bezierCurveTo=function(a,b,c,d,e,f){var g=this.getCoords_(e,f),h=this.getCoords_(a,b),i=this.getCoords_(c,d);y(this,h,i,g)},x.quadraticCurveTo=function(a,b,c,d){var e=this.getCoords_(a,b),f=this.getCoords_(c,d),g={x:this.currentX_+2/3*(e.x-this.currentX_),y:this.currentY_+2/3*(e.y-this.currentY_)},h={x:g.x+(f.x-this.currentX_)/3,y:g.y+(f.y-this.currentY_)/3};y(this,g,h,f)},x.arc=function(a,b,e,f,i,j){e*=g;var k=j?"at":"wa",l=a+d(f)*e-h,m=b+c(f)*e-h,n=a+d(i)*e-h,o=b+c(i)*e-h;l==n&&!j&&(l+=.125);var p=this.getCoords_(a,b),q=this.getCoords_(l,m),r=this.getCoords_(n,o);this.currentPath_.push({type:k,x:p.x,y:p.y,radius:e,xStart:q.x,yStart:q.y,xEnd:r.x,yEnd:r.y})},x.rect=function(a,b,c,d){this.moveTo(a,b),this.lineTo(a+c,b),this.lineTo(a+c,b+d),this.lineTo(a,b+d),this.closePath()},x.strokeRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath(),this.moveTo(a,b),this.lineTo(a+c,b),this.lineTo(a+c,b+d),this.lineTo(a,b+d),this.closePath(),this.stroke(),this.currentPath_=e},x.fillRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath(),this.moveTo(a,b),this.lineTo(a+c,b),this.lineTo(a+c,b+d),this.lineTo(a,b+d),this.closePath(),this.fill(),this.currentPath_=e},x.createLinearGradient=function(a,b,c,d){var e=new B("gradient");e.x0_=a,e.y0_=b,e.x1_=c,e.y1_=d;return e},x.createRadialGradient=function(a,b,c,d,e,f){var g=new B("gradientradial");g.x0_=a,g.y0_=b,g.r0_=c,g.x1_=d,g.y1_=e,g.r1_=f;return g},x.drawImage=function(c,d){var e,f,h,i,j,k,l,m,n=c.runtimeStyle.width,o=c.runtimeStyle.height;c.runtimeStyle.width="auto",c.runtimeStyle.height="auto";var p=c.width,q=c.height;c.runtimeStyle.width=n,c.runtimeStyle.height=o;if(arguments.length==3)e=arguments[1],f=arguments[2],j=k=0,l=h=p,m=i=q;else if(arguments.length==5)e=arguments[1],f=arguments[2],h=arguments[3],i=arguments[4],j=k=0,l=p,m=q;else if(arguments.length==9)j=arguments[1],k=arguments[2],l=arguments[3],m=arguments[4],e=arguments[5],f=arguments[6],h=arguments[7],i=arguments[8];else throw Error("Invalid number of arguments");var r=this.getCoords_(e,f),s=l/2,t=m/2,u=[],v=10,w=10;u.push(" <g_vml_:group",' coordsize="',g*v,",",g*w,'"',' coordorigin="0,0"',' style="width:',v,"px;height:",w,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var x=[];x.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",b(r.x/g),",","Dy=",b(r.y/g),"");var y=r,z=this.getCoords_(e+h,f),A=this.getCoords_(e,f+i),B=this.getCoords_(e+h,f+i);y.x=a.max(y.x,z.x,A.x,B.x),y.y=a.max(y.y,z.y,A.y,B.y),u.push("padding:0 ",b(y.x/g),"px ",b(y.y/g),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",x.join(""),", sizingmethod='clip');")}else u.push("top:",b(r.y/g),"px;left:",b(r.x/g),"px;");u.push(' ">','<g_vml_:image src="',c.src,'"',' style="width:',g*h,"px;"," height:",g*i,'px;"',' cropleft="',j/p,'"',' croptop="',k/q,'"',' cropright="',(p-j-l)/p,'"',' cropbottom="',(q-k-m)/q,'"'," />","</g_vml_:group>"),this.element_.insertAdjacentHTML("BeforeEnd",u.join(""))},x.stroke=function(c){var d=[],e=!1,f=u(c?this.fillStyle:this.strokeStyle),h=f.color,i=f.alpha*this.globalAlpha,j=10,k=10;d.push("<g_vml_:shape",' filled="',!!c,'"',' style="position:absolute;width:',j,"px;height:",k,'px;"',' coordorigin="0 0" coordsize="',g*j," ",g*k,'"',' stroked="',!c,'"',' path="');var l=!1,m={x:null,y:null},n={x:null,y:null};for(var o=0;o<this.currentPath_.length;o++){var p=this.currentPath_[o],q;switch(p.type){case"moveTo":q=p,d.push(" m ",b(p.x),",",b(p.y));break;case"lineTo":d.push(" l ",b(p.x),",",b(p.y));break;case"close":d.push(" x "),p=null;break;case"bezierCurveTo":d.push(" c ",b(p.cp1x),",",b(p.cp1y),",",b(p.cp2x),",",b(p.cp2y),",",b(p.x),",",b(p.y));break;case"at":case"wa":d.push(" ",p.type," ",b(p.x-this.arcScaleX_*p.radius),",",b(p.y-this.arcScaleY_*p.radius)," ",b(p.x+this.arcScaleX_*p.radius),",",b(p.y+this.arcScaleY_*p.radius)," ",b(p.xStart),",",b(p.yStart)," ",b(p.xEnd),",",b(p.yEnd))}if(p){if(m.x==null||p.x<m.x)m.x=p.x;if(n.x==null||p.x>n.x)n.x=p.x;if(m.y==null||p.y<m.y)m.y=p.y;if(n.y==null||p.y>n.y)n.y=p.y}}d.push(' ">');if(c)if(typeof this.fillStyle=="object"){var s=this.fillStyle,t=0,w={x:0,y:0},x=0,y=1;if(s.type_=="gradient"){var z=s.x0_/this.arcScaleX_,A=s.y0_/this.arcScaleY_,B=s.x1_/this.arcScaleX_,C=s.y1_/this.arcScaleY_,D=this.getCoords_(z,A),E=this.getCoords_(B,C),F=E.x-D.x,G=E.y-D.y;t=Math.atan2(F,G)*180/Math.PI,t<0&&(t+=360),t<1e-6&&(t=0)}else{var D=this.getCoords_(s.x0_,s.y0_),H=n.x-m.x,I=n.y-m.y;w={x:(D.x-m.x)/H,y:(D.y-m.y)/I},H/=this.arcScaleX_*g,I/=this.arcScaleY_*g;var J=a.max(H,I);x=2*s.r0_/J,y=2*s.r1_/J-x}var K=s.colors_;K.sort(function(a,b){return a.offset-b.offset});var L=K.length,M=K[0].color,N=K[L-1].color,O=K[0].alpha*this.globalAlpha,P=K[L-1].alpha*this.globalAlpha,Q=[];for(var o=0;o<L;o++){var R=K[o];Q.push(R.offset*y+x+" "+R.color)}d.push('<g_vml_:fill type="',s.type_,'"',' method="none" focus="100%"',' color="',M,'"',' color2="',N,'"',' colors="',Q.join(","),'"',' opacity="',P,'"',' g_o_:opacity2="',O,'"',' angle="',t,'"',' focusposition="',w.x,",",w.y,'" />')}else d.push('<g_vml_:fill color="',h,'" opacity="',i,'" />');else{var r=this.lineScale_*this.lineWidth;r<1&&(i*=r),d.push("<g_vml_:stroke",' opacity="',i,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',v(this.lineCap),'"',' weight="',r,'px"',' color="',h,'" />')}d.push("</g_vml_:shape>"),this.element_.insertAdjacentHTML("beforeEnd",d.join(""))},x.fill=function(){this.stroke(!0)},x.closePath=function(){this.currentPath_.push({type:"close"})},x.getCoords_=function(a,b){var c=this.m_;return{x:g*(a*c[0][0]+b*c[1][0]+c[2][0])-h,y:g*(a*c[0][1]+b*c[1][1]+c[2][1])-h}},x.save=function(){var a={};t(this,a),this.aStack_.push(a),this.mStack_.push(this.m_),this.m_=s(r(),this.m_)},x.restore=function(){t(this.aStack_.pop(),this),this.m_=this.mStack_.pop()},x.translate=function(a,b){var c=[[1,0,0],[0,1,0],[a,b,1]];A(this,s(c,this.m_),!1)},x.rotate=function(a){var b=d(a),e=c(a),f=[[b,e,0],[-e,b,0],[0,0,1]];A(this,s(f,this.m_),!1)},x.scale=function(a,b){this.arcScaleX_*=a,this.arcScaleY_*=b;var c=[[a,0,0],[0,b,0],[0,0,1]];A(this,s(c,this.m_),!0)},x.transform=function(a,b,c,d,e,f){var g=[[a,b,0],[c,d,0],[e,f,1]];A(this,s(g,this.m_),!0)},x.setTransform=function(a,b,c,d,e,f){var g=[[a,b,0],[c,d,0],[e,f,1]];A(this,g,!0)},x.clip=function(){},x.arcTo=function(){},x.createPattern=function(){return new C},B.prototype.addColorStop=function(a,b){b=u(b),this.colors_.push({offset:a,color:b.color,alpha:b.alpha})},G_vmlCanvasManager=l,CanvasRenderingContext2D=w,CanvasGradient=B,CanvasPattern=C}()
@@ -1,149 +1 @@
1
- require.pause();
2
- require.def("preview/pageList",["domplate/domplate","core/lib","core/trace","preview/requestList"],function(n,b,h,m){with(n){n=function(j){this.input=j};n.prototype=domplate({tableTag:TABLE({"class":"pageTable",cellpadding:0,cellspacing:0,onclick:"$onClick",_repObject:"$input"},TBODY(TAG("$rowTag",{groups:"$input.log.pages"}))),rowTag:FOR("group","$groups",TR({"class":"pageRow",_repObject:"$group"},TD({"class":"groupName pageCol"},SPAN({"class":"pageName"},"$group|getPageTitle")))),bodyTag:TR({"class":"pageInfoRow",
3
- style:"height:auto;"},TD({"class":"pageInfoCol"})),getPageTitle:function(j){return b.cropString(j.title,100)},getPageID:function(j){return"["+j.id+"]"},onClick:function(j){var a=$.event.fix(j||window.event);if(b.isLeftClick(j))if(a=b.getAncestorByClass(a.target,"pageRow")){this.toggleRow(a);b.cancelEvent(j)}},toggleRow:function(j,a){if(!(b.hasClass(j,"opened")&&a)){b.toggleClass(j,"opened");if(b.hasClass(j,"opened")){a=this.bodyTag.insertRows({},j)[0];(new m(this.input)).render(a.firstChild,j.repObject)}else{a=
4
- j.nextSibling;j.parentNode.removeChild(a)}}},expandAll:function(j){for(j=j.firstChild.firstChild;j;){hasClass(j,"pageRow")&&this.toggleRow(j,true);j=j.nextSibling}},getPageRow:function(j){for(var a=b.getElementsByClass(this.element.parentNode,"pageRow"),c=0;c<a.length;c++){var e=a[c];if(e.repObject==j)return e}},togglePage:function(j){this.toggleRow(this.getPageRow(j))},expandPage:function(j){this.toggleRow(this.getPageRow(j),true)},collapsePage:function(j){j=this.getPageRow(j);b.hasClass(j,"opened")&&
5
- this.toggleRow(j)},append:function(j){(new m(this.input)).render(j,null);var a=this.input.log.pages;if(a&&a.length){j=this.tableTag.append({input:this.input},j,this);j.firstChild.childNodes.length==1&&j.parentNode.childNodes.length==1&&this.toggleRow(j.firstChild.firstChild)}},render:function(j){this.append(j)}});return n}});require.def("harPreview",["preview/pageList","preview/harModel"],function(n,b){b.Loader.run(function(h){h=b.parse(h,true);(new n(h)).render(document.getElementById("content"))})});
6
- require.def("core/lib",["core/trace"],function(n){var b={},h=navigator.userAgent.toLowerCase();b.isFirefox=/firefox/.test(h);b.isOpera=/opera/.test(h);b.isSafari=/webkit/.test(h);b.isIE=/msie/.test(h)&&!/opera/.test(h);b.isIE6=/msie 6/i.test(navigator.appVersion);b.browserVersion=(h.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1];b.isIElt8=b.isIE&&b.browserVersion-0<8;b.extend=function(a,c){var e={};b.append(e,a);b.append(e,c);return e};b.append=function(a,c){for(var e in c)a[e]=c[e];return a};
7
- b.bind=function(){var a=b.cloneArray(arguments),c=a.shift(),e=a.shift();return function(){return c.apply(e,b.arrayInsert(b.cloneArray(a),0,arguments))}};b.bindFixed=function(){var a=b.cloneArray(arguments),c=a.shift(),e=a.shift();return function(){return c.apply(e,a)}};b.dispatch=function(a,c,e){for(var f=0;a&&f<a.length;f++){var l=a[f];if(l[c])try{l[c].apply(l,e)}catch(k){n.exception(k)}}};b.dispatch2=function(a,c,e){for(var f=0;f<a.length;f++){var l=a[f];if(l[c])try{var k=l[c].apply(l,e);if(k)return k}catch(d){n.exception(d)}}};
8
- var m=Object.prototype.toString,j=/^\s*function(\s+[\w_$][\w\d_$]*)?\s*\(/;b.isArray=function(a){return m.call(a)==="[object Array]"};b.isFunction=function(a){if(!a)return false;return m.call(a)==="[object Function]"||b.isIE&&typeof a!="string"&&j.test(""+a)};b.isAncestor=function(a,c){for(a=a;a;a=a.parentNode)if(a==c)return true;return false};b.fixEvent=function(a){return $.event.fix(a||window.event)};b.fireEvent=function(a,c){if(document.createEvent){var e=document.createEvent("Events");e.initEvent(c,
9
- true,false);return!a.dispatchEvent(e)}};b.cancelEvent=function(a){a=b.fixEvent(a);a.stopPropagation();a.preventDefault()};b.addEventListener=function(a,c,e,f){f=f||false;a.addEventListener?a.addEventListener(c,e,f):a.attachEvent("on"+c,e)};b.removeEventListener=function(a,c,e,f){f=f||false;a.removeEventListener?a.removeEventListener(c,e,f):a.detachEvent("on"+c,e)};b.isLeftClick=function(a){return a.button==0&&b.noKeyModifiers(a)};b.noKeyModifiers=function(a){return!a.ctrlKey&&!a.shiftKey&&!a.altKey&&
10
- !a.metaKey};b.isControlClick=function(a){return a.button==0&&b.isControl(a)};b.isShiftClick=function(a){return a.button==0&&b.isShift(a)};b.isControl=function(a){return(a.metaKey||a.ctrlKey)&&!a.shiftKey&&!a.altKey};b.isAlt=function(a){return a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey};b.isAltClick=function(a){return a.button==0&&b.isAlt(a)};b.isControlShift=function(a){return(a.metaKey||a.ctrlKey)&&a.shiftKey&&!a.altKey};b.isShift=function(a){return a.shiftKey&&!a.metaKey&&!a.ctrlKey&&!a.altKey};
11
- b.inflateRect=function(a,c,e){return{top:a.top-e,left:a.left-c,height:a.height+2*e,width:a.width+2*c}};b.pointInRect=function(a,c,e){return e>=a.top&&e<=a.top+a.height&&c>=a.left&&c<=a.left+a.width};b.cloneArray=function(a,c){var e=[];if(c)for(var f=0;f<a.length;++f)e.push(c(a[f]));else for(f=0;f<a.length;++f)e.push(a[f]);return e};b.arrayInsert=function(a,c,e){for(var f=0;f<e.length;++f)a.splice(f+c,0,e[f]);return a};b.remove=function(a,c){for(var e=0;e<a.length;++e)if(a[e]==c){a.splice(e,1);break}};
12
- b.formatSize=function(a){var c=1;c=c>2?2:c;c=c<-1?-1:c;if(c==-1)return a+" B";c=Math.pow(10,c);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 c=a.split(".");a=c[0];c=c.length>1?"."+c[1]:"";for(var e=/(\d+)(\d{3})/;e.test(a);)a=a.replace(e,"$1,$2");return a+c};b.formatString=
13
- function(a){var c=b.cloneArray(arguments);a=c.shift();for(var e=0;e<c.length;e++){var f=c[e].toString();a=a.replace("%S",f)}return a};b.parseISO8601=function(a){return(a=b.fromISOString(a))?a.getTime():null};b.fromISOString=function(a){if(!a)return null;a=a.toString().match(new RegExp(/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/));if(!a)return null;var c=new Date;c.setUTCDate(1);c.setUTCFullYear(parseInt(a[1],10));c.setUTCMonth(parseInt(a[3],10)-
14
- 1);c.setUTCDate(parseInt(a[5],10));c.setUTCHours(parseInt(a[7],10));c.setUTCMinutes(parseInt(a[9],10));c.setUTCSeconds(parseInt(a[11],10));a[12]?c.setUTCMilliseconds(parseFloat(a[12])*1E3):c.setUTCMilliseconds(0);if(a[13]!="Z"){var e=a[15]*60+parseInt(a[17],10);e*=a[14]=="-"?-1:1;c.setTime(c.getTime()-e*60*1E3)}return c};b.getFileName=function(a){return b.splitURLBase(a).name};b.getFileExtension=function(a){if(!a)return null;var c=a.indexOf("?");if(c!=-1)a=a.substr(0,c);c=a.lastIndexOf(".");return a.substr(c+
15
- 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 false;var e=a.indexOf(",",c+1);if(e<c)return false;var f={encodedContent:a.substr(e+1)};a=a.substr(c+1,e).split(";");for(c=0;c<a.length;c++){e=a[c].split("=");if(e.length==2)f[e[0]]=e[1]}if(f.hasOwnProperty("fileName")){a=decodeURIComponent(f.fileName);a=b.splitURLTrue(a);if(f.hasOwnProperty("baseLineNumber")){f.path=
16
- a.path;f.line=f.baseLineNumber;a=decodeURIComponent(f.encodedContent.substr(0,200)).replace(/\s*$/,"");f.name="eval->"+a}else{f.name=a.name;f.path=a.path}}else{f.hasOwnProperty("path")||(f.path="data:");f.hasOwnProperty("name")||(f.name=decodeURIComponent(f.encodedContent.substr(0,200)).replace(/\s*$/,""))}return f};b.splitURLTrue=function(a){var c=/:\/{1,3}(.*?)\/([^\/]*?)\/?($|\?.*)/.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){for(var c=
17
- window.location.search.substring(1).split("&"),e=0;e<c.length;e++){var f=c[e].split("=");if(f[0]==a)return unescape(f[1])}return null};b.getURLParameters=function(a){for(var c=[],e=window.location.search.substring(1).split("&"),f=0;f<e.length;f++){var l=e[f].split("=");l[0]==a&&c.push(unescape(l[1]))}return c};b.parseURLParams=function(a){var c=a?a.indexOf("?"):-1;if(c==-1)return[];a=a.substr(c+1);c=a.lastIndexOf("#");if(c!=-1)a=a.substr(0,c);if(!a)return[];return b.parseURLEncodedText(a)};b.parseURLEncodedText=
18
- function(a,c){function e(p){try{return decodeURIComponent(p)}catch(q){return decodeURIComponent(unescape(p))}}var f=[];if(a=="")return f;a=a.replace(/\+/g," ");a=a.split("&");for(var l=0;l<a.length;++l)try{var k=a[l].indexOf("=");if(k!=-1){var d=a[l].substring(0,k),g=a[l].substring(k+1);if(g.length>25E3&&!c)g=b.$STR("LargeData");f.push({name:e(d),value:e(g)})}else{d=a[l];f.push({name:e(d),value:""})}}catch(o){}f.sort(function(p,q){return p.name<=q.name?-1:1});return f};b.getBody=function(a){if(a.body)return a.body;
19
- if(a=a.getElementsByTagName("body")[0])return a;return null};b.getHead=function(a){return a.getElementsByTagName("head")[0]};b.getAncestorByClass=function(a,c){for(a=a;a;a=a.parentNode)if(b.hasClass(a,c))return a;return null};b.$=function(){return b.getElementByClass.apply(this,arguments)};b.getElementByClass=function(a){if(!a)return null;var c=b.cloneArray(arguments);c.splice(0,1);for(var e=a.firstChild;e;e=e.nextSibling){var f=b.cloneArray(c);f.unshift(e);if(b.hasClass.apply(this,f))return e;else if(f=
20
- b.getElementByClass.apply(this,f))return f}return null};b.getElementsByClass=function(a){function c(l,k,d){for(l=l.firstChild;l;l=l.nextSibling){var g=b.cloneArray(k);g.unshift(l);b.hasClass.apply(null,g)&&d.push(l);c(l,k,d)}}var e=[],f=b.cloneArray(arguments);f.shift();c(a,f,e);return e};b.getChildByClass=function(a){for(var c=1;c<arguments.length;++c){var e=arguments[c],f=a.firstChild;for(a=null;f;f=f.nextSibling)if(b.hasClass(f,e)){a=f;break}}return a};b.eraseNode=function(a){for(;a.lastChild;)a.removeChild(a.lastChild)};
21
- b.clearNode=function(a){a.innerHTML=""};b.hasClass=function(a,c){if(!a||a.nodeType!=1)return false;else{for(var e=1;e<arguments.length;++e){c=arguments[e];var f=a.className;if(!f||f.indexOf(c+" ")==-1)return false}return true}};b.setClass=function(a,c){if(a&&!b.hasClass(a,c))a.className+=" "+c+" "};b.removeClass=function(a,c){if(a&&a.className){var e=a.className.indexOf(c);if(e>=0){c=c.length;a.className=a.className.substr(0,e-1)+a.className.substr(e+c)}}};b.toggleClass=function(a,c){if(b.hasClass(a,
22
- c)){b.removeClass(a,c);return false}else{b.setClass(a,c);return true}};b.trim=function(a){return a.replace(/^\s*|\s*$/g,"")};b.wrapText=function(a,c){var e=/[^A-Za-z_$0-9'"-]/,f=[];a=b.splitLines(a);for(var l=0;l<a.length;++l){for(var k=a[l];k.length>100;){var d=e.exec(k.substr(100,100));d=100+(d?d.index:0);var g=k.substr(0,d);k=k.substr(d);c||f.push("<pre>");f.push(c?g:b.escapeHTML(g));c||f.push("</pre>")}c||f.push("<pre>");f.push(c?k:b.escapeHTML(k));c||f.push("</pre>")}return f.join(c?"\n":"")};
23
- b.insertWrappedText=function(a,c,e){c.innerHTML="<pre>"+b.wrapText(a,e)+"</pre>"};b.splitLines=function(a){var c=/\r\n|\r|\n/;if(a){if(a.split)return a.split(c)}else return[];return(a+"").split(c)};b.getPrettyDomain=function(a){return(a=/[^:]+:\/{1,3}(www\.)?([^\/]+)/.exec(a))?a[2]:""};b.escapeHTML=function(a){function c(e){switch(e){case "<":return"&lt;";case ">":return"&gt;";case "&":return"&amp;";case "'":return"&#39;";case '"':return"&quot;"}return"?"}return String(a).replace(/[<>&"']/g,c)};b.cropString=
24
- function(a,c){a+="";var e=c?c/2:50;return a.length>c?b.escapeNewLines(a.substr(0,e)+"..."+a.substr(a.length-e)):b.escapeNewLines(a)};b.escapeNewLines=function(a){return a.replace(/\r/g,"\\r").replace(/\n/g,"\\n")};b.cloneJSON=function(a){if(a==null||typeof a!="object")return a;try{var c=a.constructor();for(var e in a)c[e]=cloneJSON(a[e]);return c}catch(f){n.exception(a)}return null};b.getOverflowParent=function(a){for(a=a.parentNode;a;a=a.offsetParent)if(a.scrollHeight>a.offsetHeight)return a};b.getElementBox=
25
- function(a){var c={};if(a.getBoundingClientRect){a=a.getBoundingClientRect();var e=b.isIE?document.body.clientTop||document.documentElement.clientTop:0,f=b.getWindowScrollPosition();c.top=Math.round(a.top-e+f.top);c.left=Math.round(a.left-e+f.left);c.height=Math.round(a.bottom-a.top);c.width=Math.round(a.right-a.left)}else{e=b.getElementPosition(a);c.top=e.top;c.left=e.left;c.height=a.offsetHeight;c.width=a.offsetWidth}return c};b.getElementPosition=function(a){var c=0,e=0;do{c+=a.offsetLeft;e+=a.offsetTop}while(a=
26
- a.offsetParent);return{left:c,top:e}};b.getWindowSize=function(){var a=0,c=0,e;if(typeof window.innerWidth=="number"){a=window.innerWidth;c=window.innerHeight}else if((e=document.documentElement)&&(e.clientHeight||e.clientWidth)){a=e.clientWidth;c=e.clientHeight}else if((e=document.body)&&(e.clientHeight||e.clientWidth)){a=e.clientWidth;c=e.clientHeight}return{width:a,height:c}};b.getWindowScrollSize=function(){var a=0,c=0,e;if(!b.isIEQuiksMode&&(e=document.documentElement)&&(e.scrollHeight||e.scrollWidth)){a=
27
- e.scrollWidth;c=e.scrollHeight}if((e=document.body)&&(e.scrollHeight||e.scrollWidth)&&(e.scrollWidth>a||e.scrollHeight>c)){a=e.scrollWidth;c=e.scrollHeight}return{width:a,height:c}};b.getWindowScrollPosition=function(){var a=0,c=0,e;if(typeof window.pageYOffset=="number"){a=window.pageYOffset;c=window.pageXOffset}else if((e=document.body)&&(e.scrollTop||e.scrollLeft)){a=e.scrollTop;c=e.scrollLeft}else if((e=document.documentElement)&&(e.scrollTop||e.scrollLeft)){a=e.scrollTop;c=e.scrollLeft}return{top:a,
28
- left:c}};b.addStyleSheet=function(a,c){if(!a.getElementById(c)){var e=a.createElement("link");e.type="text/css";e.rel="stylesheet";e.href=c;e.setAttribute("id",c);b.getHead(a).appendChild(e)}};return b});
29
- require.def("i18n!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","request.Started":"Started","request.phase.Resolving":"DNS Lookup","request.phase.Connecting":"Connecting","request.phase.Blocking":"Blocking",
30
- "request.phase.Sending":"Sending","request.phase.Waiting":"Waiting","request.phase.Receiving":"Receiving",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"}});
31
- require.def("preview/requestList",["domplate/domplate","core/lib","i18n!nls/requestList","preview/harModel","core/cookies","preview/requestBody","domplate/infoTip","domplate/popupMenu"],function(n,b,h,m,j,a,c,e){with(n){n=function(d){this.input=d;c.addListener(this)};n.prototype=domplate({tableTag:TABLE({"class":"netTable",cellpadding:0,cellspacing:0,onclick:"$onClick"},TBODY(TR(TD({width:"20%"}),TD({width:"10%"}),TD({width:"10%"}),TD({width:"10%"}),TD({width:"50%"}),TD({width:"15px"})))),fileTag:FOR("file",
32
- "$files",TR({"class":"netRow loaded",$hasHeaders:"$file|hasResponseHeaders",$responseError:"$file|isError",$fromCache:"$file|isFromCache"},TD({"class":"netHrefCol netCol"},DIV({"class":"netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getHref"),DIV({"class":"netFullHrefLabel netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getFullHref")),TD({"class":"netStatusCol netCol"},DIV({"class":"netStatusLabel netLabel"},"$file|getStatus")),TD({"class":"netDomainCol netCol"},
33
- DIV({"class":"netDomainLabel netLabel"},"$file|getDomain")),TD({"class":"netSizeCol netCol"},DIV({"class":"netSizeLabel netLabel"},"$file|getSize")),TD({"class":"netTimeCol netCol"},DIV({"class":"netTimelineBar"},"&nbsp;",DIV({"class":"netResolvingBar netBar",style:"left: $file.offset"}),DIV({"class":"netConnectingBar netBar",style:"left: $file.offset"}),DIV({"class":"netBlockingBar netBar",style:"left: $file.offset"}),DIV({"class":"netSendingBar netBar",style:"left: $file.offset"}),DIV({"class":"netWaitingBar netBar",
34
- style:"left: $file.offset"}),DIV({"class":"netContentLoadBar netBar",style:"left: $file.offset"}),DIV({"class":"netWindowLoadBar netBar",style:"left: $file.offset"}),DIV({"class":"netReceivingBar netBar",style:"left: $file.offset; width: $file.width"},SPAN({"class":"netTimeLabel"},"$file|getElapsedTime")))),TD({"class":"netOptionsCol netCol"},DIV({"class":"netOptionsLabel netLabel",onclick:"$onOpenOptions"})))),headTag:TR({"class":"netHeadRow"},TD({"class":"netHeadCol",colspan:6},DIV({"class":"netHeadLabel"},
35
- "$doc.rootFile.href"))),netInfoTag:TR({"class":"netInfoRow"},TD({"class":"netInfoCol",colspan:6})),summaryTag:TR({"class":"netRow netSummaryRow"},TD({"class":"netCol",colspan:3},DIV({"class":"netCountLabel netSummaryLabel"},"-")),TD({"class":"netTotalSizeCol netCol"},DIV({"class":"netTotalSizeLabel netSummaryLabel"},"0KB")),TD({"class":"netTotalTimeCol netCol"},DIV({"class":"",style:"width: 100%"},DIV({"class":"netCacheSizeLabel netSummaryLabel"},"(",SPAN("0KB"),SPAN(" "+h.fromCache),")"),DIV({"class":"netTimeBar"},
36
- SPAN({"class":"netTotalTimeLabel netSummaryLabel"},"0ms")))),TD({"class":"netCol"})),getIndent:function(){return 0},isError:function(d){d=Math.floor(d.response.status/100);return d==4||d==5},isFromCache:function(d){return d.cache&&d.cache.afterRequest},getHref:function(d){return d.request.method+" "+b.getFileName(this.getFullHref(d))},getFullHref:function(d){return d.request.url},getStatus:function(d){return(d.response.status>0?d.response.status+" ":"")+d.response.statusText},getDomain:function(d){return b.getPrettyDomain(d.request.url)},
37
- getSize:function(d){var g=d.response.bodySize;return this.formatSize(g&&g!=-1?g:d.response.content.size)},hasResponseHeaders:function(){return true},formatSize:function(d){return b.formatSize(d)},getElapsedTime:function(d){return b.formatTime(d.time)},onClick:function(d){var g=$.event.fix(d||window.event);if(b.isLeftClick(d))if(g=b.getAncestorByClass(g.target,"netRow")){this.toggleHeadersRow(g);b.cancelEvent(d)}},toggleHeadersRow:function(d){if(b.hasClass(d,"hasHeaders")){var g=d.repObject;b.toggleClass(d,
38
- "opened");if(b.hasClass(d,"opened")){var o=this.netInfoTag.insertRows({},d)[0];o.repObject=g;(new a).render(o.firstChild,g)}else{o=d.nextSibling;b.getElementByClass(o,"netInfoBody");d.parentNode.removeChild(o)}}},onOpenOptions:function(d){var g=$.event.fix(d||window.event);b.cancelEvent(d);if(b.isLeftClick(d)){d=g.target;g=this.getOptionsMenuItems(b.getAncestorByClass(d,"netRow"));(new e({id:"requestContextMenu",items:g})).showPopup(d)}},getOptionsMenuItems:function(d){var g=d.repObject;return[{label:h.menuBreakTimeline,
39
- type:"checkbox",disabled:false,checked:d.phase.files[0]==g,command:b.bind(this.breakLayout,this,d)},"-",{label:h.menuOpenRequest,command:b.bind(this.openRequest,this,g)},{label:h.menuOpenResponse,disabled:!g.response.content.text,command:b.bind(this.openResponse,this,g)}]},openRequest:function(d,g){window.open(g.request.url)},openResponse:function(d,g){d=g.response.content.mimeType;var o=g.response.content.encoding;window.open("data:"+(d?d:"")+";"+(o?o:"")+","+g.response.content.text)},breakLayout:function(d,
40
- g){d=g.repObject;g.breakLayout=g.phase.files[0]!=d;g=b.getAncestorByClass(g,"netTable");d=m.getParentPage(this.input,d);this.updateLayout(g,d)},updateLayout:function(d,g){var o=m.getPageEntries(this.input,g);this.table=d;d=this.firstRow=this.table.firstChild.firstChild.nextSibling;this.phases=[];var p=j.getCookie("phaseInterval");p||(p=1E3);var q=null,t=g?b.parseISO8601(g.startedDateTime):null,s=0,r=0;if(g&&g.pageTimings){r=g.pageTimings;s=r.onLoad>0?r.onLoad:0;r=r.onContentLoad>0?r.onContentLoad:
41
- 0}for(var v=0;v<o.length;v++){var u=o[v];if(b.hasClass(d,"netInfoRow"))d=d.nextSibling;d.repObject=u;t||(t=b.parseISO8601(u.startedDateTime));var x=b.parseISO8601(u.startedDateTime),w=q?b.parseISO8601(q.getLastStartTime()):0;w=x-w>=p&&x>t+s;if(typeof d.breakLayout=="boolean")if(!q||d.breakLayout)q=this.startPhase(u);else q.addFile(u);else if(!q||w)q=this.startPhase(u);else q.addFile(u);if(q.startTime==undefined||q.startTime>x)q.startTime=x;if(q.endTime==undefined||q.endTime<x+u.time)q.endTime=x+u.time;
42
- if(u.phase==this.phases[0]&&q.endTime<t+s)q.endTime=t+s;if(u.phase==this.phases[0]&&q.endTime<t+r)q.endTime=t+r;d=d.nextSibling}this.updateTimeline(g);this.updateSummaries(g)},startPhase:function(d){d=new f(d);this.phases.push(d);return d},calculateFileTimes:function(d,g,o){if(o!=g.phase){o=g.phase;this.phaseStartTime=o.startTime;this.phaseEndTime=o.endTime;this.phaseElapsed=this.phaseEndTime-o.startTime}var p=g.timings.dns<0?0:g.timings.dns,q=p+(g.timings.connect<0?0:g.timings.connect),t=q+(g.timings.blocked<
43
- 0?0:g.timings.blocked),s=t+(g.timings.send<0?0:g.timings.send),r=s+(g.timings.wait<0?0:g.timings.wait),v=r+(g.timings.receive<0?0:g.timings.receive);this.barOffset=((b.parseISO8601(g.startedDateTime)-this.phaseStartTime)/this.phaseElapsed*100).toFixed(3);this.barResolvingWidth=(p/this.phaseElapsed*100).toFixed(3);this.barConnectingWidth=(q/this.phaseElapsed*100).toFixed(3);this.barBlockingWidth=(t/this.phaseElapsed*100).toFixed(3);this.barSendingWidth=(s/this.phaseElapsed*100).toFixed(3);this.barWaitingWidth=
44
- (r/this.phaseElapsed*100).toFixed(3);this.barReceivingWidth=(v/this.phaseElapsed*100).toFixed(3);if(d){p=b.parseISO8601(d.startedDateTime);q=d.pageTimings.onContentLoad;if(g.phase==this.phases[0]&&q>0)this.contentLoadBarOffset=((p+q-o.startTime)/this.phaseElapsed*100).toFixed(3);d=d.pageTimings.onLoad;if(g.phase==this.phases[0]&&d>0)this.windowLoadBarOffset=((p+d-o.startTime)/this.phaseElapsed*100).toFixed(3)}return o},updateTimeline:function(d){for(var g,o=this.firstRow;o;o=o.nextSibling){var p=
45
- o.repObject;if(p)if(!b.hasClass(o,"netInfoRow")){g=this.calculateFileTimes(d,p,g);o.phase=p.phase;delete p.phase;p=b.getElementByClass(o,"netResolvingBar");var q=p.nextSibling,t=q.nextSibling,s=t.nextSibling,r=s.nextSibling,v=r.nextSibling,u=v.nextSibling,x=u.nextSibling;p.style.left=q.style.left=t.style.left=s.style.left=r.style.left=x.style.left=this.barOffset+"%";p.style.width=this.barResolvingWidth+"%";q.style.width=this.barConnectingWidth+"%";t.style.width=this.barBlockingWidth+"%";s.style.width=
46
- this.barSendingWidth+"%";r.style.width=this.barWaitingWidth+"%";x.style.width=this.barReceivingWidth+"%";if(this.contentLoadBarOffset){v.style.left=this.contentLoadBarOffset+"%";v.style.display="block";this.contentLoadBarOffset=null}if(this.windowLoadBarOffset){u.style.left=this.windowLoadBarOffset+"%";u.style.display="block";this.windowLoadBarOffset=null}}}},updateSummaries:function(d){for(var g=this.phases,o=0,p=0,q=0,t=0,s=0;s<g.length;++s){var r=g[s];r.invalidPhase=false;r=this.summarizePhase(r);
47
- o+=r.fileCount;p+=r.totalSize;q+=r.cachedSize;t+=r.totalTime}if(g=this.summaryRow){b.getElementByClass(g,"netCountLabel").firstChild.nodeValue=this.formatRequestCount(o);o=b.getElementByClass(g,"netTotalSizeLabel");o.setAttribute("totalSize",p);o.firstChild.nodeValue=b.formatSize(p);p=b.getElementByClass(g,"netCacheSizeLabel");p.setAttribute("collapsed",q==0);p.childNodes[1].firstChild.nodeValue=b.formatSize(q);q=b.getElementByClass(g,"netTotalTimeLabel");t=b.formatTime(t);if(d&&d.pageTimings.onLoad>
48
- 0)t+=" (onload: "+b.formatTime(d.pageTimings.onLoad)+")";q.innerHTML=t}},formatRequestCount:function(d){return d+" "+(d==1?h.request:h.requests)},summarizePhase:function(d){var g=0,o=0,p="all";if(p=="all")p=null;for(var q=0,t=0,s=0,r=0;r<d.files.length;r++){var v=d.files[r],u=b.parseISO8601(v.startedDateTime);if(!p||v.category==p){++q;var x=v.response.bodySize;x=x&&x!=-1?x:v.response.content.size;o+=x;if(v.response.status==304)g+=x;if(!t||u<t)t=u;v=u+v.time;if(v>s)s=v}}return{cachedSize:g,totalSize:o,
49
- totalTime:s-t,fileCount:q}},showInfoTip:function(d,g){var o=b.getAncestorByClass(g,"netRow");if(o)if(b.getAncestorByClass(g,"netBar")){d.setAttribute("multiline",true);this.infoTipURL=g=o.repObject.startedDateTime+"-nettime";return this.populateTimeInfoTip(d,o)}else if(b.hasClass(g,"netSizeLabel")){this.infoTipURL=g=o.repObject.startedDateTime+"-netsize";return this.populateSizeInfoTip(d,o)}},populateTimeInfoTip:function(d,g){l.render(this.input,g,d);return true},populateSizeInfoTip:function(d,g){k.render(this.input,
50
- g,d);return true},render:function(d,g){var o=m.getPageEntries(this.input,g);if(o.length){this.table=this.tableTag.replace({},d,this);this.summaryRow=this.summaryTag.insertRows({},this.table.firstChild)[0];this.fileTag.insertRows({files:o},this.table.firstChild.lastChild.previousSibling,this);this.updateLayout(this.table,g)}}});var f=function(d){this.files=[];this.addFile(d)};f.prototype={addFile:function(d){this.files.push(d);d.phase=this},getLastStartTime:function(){return this.files[this.files.length-
51
- 1].startedDateTime}};var l=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"),
52
- TD({colspan:2},"$startTime|getLabel")),separatorTag:TR(TD({colspan:4,height:"10px"})),eventsTag:FOR("event","$events",TR({"class":"timeInfoTipEventRow"},TD({"class":"timeInfoTipBar",align:"center"},DIV({"class":"$event|getBarClass timeInfoTipEventBar"})),TD("$event.start|formatStartTime"),TD({colspan:2},"$event|getLabel"))),hideBar:function(d){return!d.elapsed&&d.bar=="request.phase.Blocking"},getBarClass:function(d){return"net"+d.bar.substr(d.bar.lastIndexOf(".")+1)+"Bar"},formatTime:function(d){return b.formatTime(d)},
53
- formatStartTime:function(d){var g=d>0,o=b.formatTime(Math.abs(d));if(!d)return o;return(g>0?"+":"-")+o},getLabel:function(d){return h[d.bar]},render:function(d,g,o){var p=g.repObject;var q=(d=m.getParentPage(d,p))?b.parseISO8601(d.startedDateTime):null,t=b.parseISO8601(p.startedDateTime);o=l.tableTag.replace({},o);var s={};s.time=t-g.phase.startTime;s.bar="request.Started";this.startTimeTag.insertRows({startTime:s},o.firstChild);this.separatorTag.insertRows({},o.firstChild);g=0;s=[];var r=p.timings.dns,
54
- v=p.timings.connect,u=p.timings.blocked,x=p.timings.send,w=p.timings.wait,y=p.timings.receive;r>=0&&s.push({bar:"request.phase.Resolving",elapsed:r,start:g});if(v>=0)s.push({bar:"request.phase.Connecting",elapsed:v,start:g+=r<0?0:r});if(u>=0)s.push({bar:"request.phase.Blocking",elapsed:u,start:g+=v<0?0:v});if(x>=0)s.push({bar:"request.phase.Sending",elapsed:x,start:g+=u<0?0:u});if(w>=0)s.push({bar:"request.phase.Waiting",elapsed:w,start:g+=x<0?0:x});if(y>=0)s.push({bar:"request.phase.Receiving",elapsed:y,
55
- start:g+(w<0?0:w),loaded:p.loaded,fromCache:p.fromCache});this.timingsTag.insertRows({timings:s},o.firstChild);p=[];d&&d.pageTimings.onContentLoad>0&&p.push({bar:"ContentLoad",start:q+d.pageTimings.onContentLoad-t});d&&d.pageTimings.onLoad>0&&p.push({bar:"WindowLoad",start:q+d.pageTimings.onLoad-t});if(p.length){this.separatorTag.insertRows({},o.firstChild);this.eventsTag.insertRows({events:p},o.firstChild);return true}}}),k=domplate({tag:DIV({"class":"sizeInfoTip"},"$file|getSize"),zippedTag:DIV(DIV({"class":"sizeInfoTip"},
56
- "$file|getBodySize"),DIV({"class":"sizeInfoTip"},"$file|getContentSize")),getSize:function(d){d=d.response.bodySize;return b.formatString(h.tooltipSize,[b.formatSize(d),d.size<0?"?":b.formatNumber(d)])},getBodySize:function(d){d=d.response.bodySize;return b.formatString(h.tooltipZippedSize,[b.formatSize(d),d.size<0?"?":b.formatNumber(d)])},getContentSize:function(d){d=d.response.content.size;return b.formatString(h.tooltipUnzippedSize,[b.formatSize(d),d.size<0?"?":b.formatNumber(d)])},render:function(d,
57
- g,o){d=g.repObject;if(d.response.bodySize==d.response.content.size)return this.tag.replace({file:d},o);return this.zippedTag.replace({file:d},o)}});return n}});
58
- require.def("preview/jsonSchema",[],function(){return{validate:function(n,b){return this._validate(n,b,false)},checkPropertyChange:function(n,b,h){return this._validate(n,b,h||"property")},_validate:function(n,b,h){function m(c,e,f,l){function k(q){a.push({property:f,message:q})}function d(q,t){if(q){if(typeof q=="string"&&q!="any"&&(q=="null"?t!==null:typeof t!=q)&&!(t instanceof Array&&q=="array")&&!(q=="integer"&&t%1===0))return[{property:f,message:typeof t+" value found, but a "+q+" is required"}];
59
- if(q instanceof Array){for(var s=[],r=0;r<q.length;r++)if(!(s=d(q[r],t)).length)break;if(s.length)return s}else if(typeof q=="object"){s=a;a=[];m(t,q,f);q=a;a=s;return q}}return[]}var g;f+=f?typeof l=="number"?"["+l+"]":typeof l=="undefined"?"":"."+l:l;if((typeof e!="object"||e instanceof Array)&&(f||typeof e!="function")){if(typeof e=="function")c instanceof e||k("is not an instance of the class/constructor "+e.name);else e&&k("Invalid schema/property definition "+e);return null}h&&e.readonly&&k("is a readonly field, it can not be changed");
60
- e["extends"]&&m(c,e["extends"],f,l);if(c===undefined)e.optional||k("is missing and it is not optional");else{a=a.concat(d(e.type,c));e.disallow&&!d(e.disallow,c).length&&k(" disallowed value was matched");if(c!==null){if(c instanceof Array){if(e.items)if(e.items instanceof Array){l=0;for(g=c.length;l<g;l++)a.concat(m(c[l],e.items[l],f,l))}else{l=0;for(g=c.length;l<g;l++)a.concat(m(c[l],e.items,f,l))}e.minItems&&c.length<e.minItems&&k("There must be a minimum of "+e.minItems+" in the array");e.maxItems&&
61
- c.length>e.maxItems&&k("There must be a maximum of "+e.maxItems+" in the array")}else e.properties&&a.concat(j(c,e.properties,f,e.additionalProperties));e.pattern&&typeof c=="string"&&!c.match(e.pattern)&&k("does not match the regex pattern "+e.pattern);e.maxLength&&typeof c=="string"&&c.length>e.maxLength&&k("may only be "+e.maxLength+" characters long");e.minLength&&typeof c=="string"&&c.length<e.minLength&&k("must be at least "+e.minLength+" characters long");typeof e.minimum!==undefined&&typeof c==
62
- typeof e.minimum&&e.minimum>c&&k("must have a minimum value of "+e.minimum);typeof e.maximum!==undefined&&typeof c==typeof e.maximum&&e.maximum<c&&k("must have a maximum value of "+e.maximum);if(e["enum"]){l=e["enum"];g=l.length;for(var o,p=0;p<g;p++)if(l[p]===c){o=1;break}o||k("does not have a value in the enumeration "+l.join(", "))}typeof e.maxDecimal=="number"&&c.toString().match(new RegExp("\\.[0-9]{"+(e.maxDecimal+1)+",}"))&&k("may only have "+e.maxDecimal+" digits of decimal places")}}return null}
63
- function j(c,e,f,l){if(typeof e=="object"){if(typeof c!="object"||c instanceof Array)a.push({property:f,message:"an object is required"});for(var k in e)if(e.hasOwnProperty(k)&&!(k.charAt(0)=="_"&&k.charAt(1)=="_")){var d=c[k];m(d,e[k],f,k)}}for(k in c){c.hasOwnProperty(k)&&!(k.charAt(0)=="_"&&k.charAt(1)=="_")&&e&&!e[k]&&l===false&&a.push({property:f,message:typeof d+"The property "+k+" is not defined in the schema and the schema does not allow additional properties"});(d=e&&e[k]&&e[k].requires)&&
64
- !(d in c)&&a.push({property:f,message:"the presence of the property "+k+" requires that "+d+" also be present"});d=c[k];e&&typeof e=="object"&&!(k in e)&&m(d,l,f,k);if(!h&&d&&d.$schema)a=a.concat(m(d,d.$schema,f,k))}return a}var a=[];if(b)m(n,b,"",h||"");!h&&n&&n.$schema&&m(n,n.$schema,"","");return{valid:!a.length,errors:a}}}});
65
- require.def("preview/harModel",["core/lib","preview/jsonSchema","preview/ref","preview/harSchema","core/cookies","core/trace","jquery-plugins/jquery.json"],function(n,b,h,m,j,a){function c(){this.input=null}function e(){var f={};for(var l in this)if(l!="toJSON")f[l]=this[l];if(!this.text)return f;f.text=Array.map(this.text,function(k){var d=k.charCodeAt(0);if(d>=32&&d<127||d==10||d==13)return k.charAt(0);for(k=d.toString(16).toUpperCase();k.length<4;)k="0"+k;return"\\u"+k}).join("");return f}c.prototype=
66
- {append:function(f){if(f){if(this.input)if(f.log.pages)for(var l=0;l<f.log.pages.length;l++)this.importPage(f.log.pages[l],f.log.entries);else{a.error("Import of additional data without a page is not yet supported.");return null}else this.input=f;return this.input}else a.error("HarModel.append; Trying to append null input!")},getPages:function(){if(!this.input)return[];return this.input.log.pages?this.input.log.pages:[]},getFirstPage:function(){var f=this.getPages();return f.length>0?f[0]:null},getPageEntries:function(f){return c.getPageEntries(this.input,
67
- f)},getAllEntries:function(){return this.input?this.input.log.entries:[]},getParentPage:function(f){return c.getParentPage(this.input,f)},importPage:function(f,l){var k=this.getUniquePageID(f.id),d=f.id;f.id=k;this.input.log.pages.push(f);for(f=0;f<l.length;f++){var g=l[f];if(g.pageref==d){g.pageref=k;this.input.log.entries.push(g)}}},getUniquePageID:function(f){for(var l=this.input.log.pages,k={},d=0;d<l.length;d++)k[l[d].id]=true;if(!k[f])return f;for(l=1;;){d=f+l;if(!k[d])return d;l++}},toJSON:function(f){if(!f)f=
68
- this.input;if(!f)return"";f=this.input.log.entries;for(var l=0;l<f.length;l++){var k=f[l];if(k.response.content.text)k.response.content.toJSON=e}return $.jSONToString(this.input,null,"\t").replace(/\\\\u/g,"\\u")},getSize:function(f){if(!f)f=this.input;if(!f)return 0;return dojo.toJson(f,true).length}};c.parse=function(f,l){var k=f;try{if(typeof f==="string")k=jQuery.toJSON(f)}catch(d){console.exception("HarModel.parse; EXCEPTION",d);throw{errors:[{message:"Failed to parse JSON",property:"JSON evaluation"}]};
69
- }if(!l)return k;f=h.resolveJson(m);f=b.validate(k,f.logType);if(f.valid)return k;throw f;};c.getPageEntries=function(f,l){var k=[];f=f.log.entries;if(!f)return k;for(var d=0;d<f.length;d++){var g=f[d];!g.pageref&&!l&&k.push(g);l&&g.pageref==l.id&&k.push(g)}return k};c.getParentPage=function(f,l){f=f.log.pages;if(!f)return null;for(var k=0;k<f.length;k++)if(f[k].id==l.pageref)return f[k];return null};c.Loader={run:function(f,l){var k=n.getURLParameter("baseUrl");if(k&&k[k.length-1]!="/")k+="/";var d=
70
- n.getURLParameters("path"),g=n.getURLParameter("callback"),o=n.getURLParameter("inputUrl"),p=[];for(var q in d)p.push(k?k+d[q]:d[q]);o&&p.push(o);if((k||o)&&p.length>0)return this.loadRemoteArchive(p,g,f,l);if(k=n.getURLParameter("path"))return this.loadLocalArchive(k,f,l)},loadExample:function(f){var l=document.location.href,k=l.indexOf("?");document.location=l.substr(0,k)+"?path="+f;j.setCookie("timeline",true);j.setCookie("stats",true)},loadLocalArchive:function(f,l,k){$.ajax({url:f,context:this,
71
- success:function(d){l(d)},error:function(d,g){k(d,g)}});return true},loadRemoteArchive:function(f,l,k,d){if(!f.length)return false;var g=f.shift();l||(l="onInputData");$.ajax({url:g,context:this,dataType:"jsonp",jsonp:"callback",jsonpCallback:l,success:function(o){k(o);if(f.length){var p=this;setTimeout(function(){p.loadRemoteArchive(f,l,k,d)},300)}},error:function(o,p){d(o,p)}});return true}};return c});
72
- require.def("preview/ref",["core/lib"],function(n){return{resolveJson:function(b,h){function m(p,q,t,s,r){var v,u;t=j in p?p[j]:t;if(t!==undefined)t=(a+t).replace(d,"$2$3");r=r||p;if(t!==undefined){if(c)p.__id=t;if(h.schemas&&!(p instanceof Array)&&(u=t.match(/^(.+\/)[^\.\[]*$/)))s=h.schemas[u[1]];if(e[t]&&p instanceof Array==e[t]instanceof Array){r=e[t];delete r.$ref;v=true}else if(u=s&&s.prototype){o.prototype=u;r=new o}e[t]=r;if(f)f[t]=h.time}s=s&&s.properties;var x=p.length;for(var w in p){if(w==
73
- x)break;if(p.hasOwnProperty(w)){u=p[w];var y=s&&s[w];if(y&&y.format=="date-time"&&typeof u=="string")u=n.fromISOString(u);else if(typeof u=="object"&&u&&!(u instanceof Date))if(l=u.$ref){delete p[w];var z=l.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);if(l=z[1]=="$"||z[1]=="this"||z[1]==""?b:e[(a+z[1]).replace(d,"$2$3")])z[3]&&z[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(E,F,B,G,D){l=l&&l[B?B.replace(/[\"\'\\]/,""):D]});if(l)u=l;else if(q){u=m(u,false,u.$ref,
74
- y);u._loadObject=h.loader}else{var C;C||k.push(r);C=true}}else q||(u=m(u,k==p,t&&g(t,w),y,r!=p&&typeof r[w]=="object"&&r[w]));p[w]=u;if(r!=p&&!r.__isDirty){y=r[w];r[w]=u;v&&u!==y&&!r._loadObject&&!(u instanceof Date&&y instanceof Date&&u.getTime()==y.getTime())&&!(typeof u=="function"&&typeof y=="function"&&u.toString()==y.toString())&&e.onUpdate&&e.onUpdate(r,w,y,u)}}}if(v)for(w in r){if(!r.__isDirty&&r.hasOwnProperty(w)&&!p.hasOwnProperty(w)&&w!="__id"&&w!="__clientId"&&!(r instanceof Array&&isNaN(w))){e.onUpdate&&
75
- w!="_loadObject"&&w!="_idAttr"&&e.onUpdate(r,w,r[w],undefined);for(delete r[w];r instanceof Array&&r.length&&r[r.length-1]===undefined;)r.length--}}else e.onLoad&&e.onLoad(r);return r}h=h||{};var j=h.idAttribute||"id",a=h.idPrefix||"",c=h.assignAbsoluteIds,e=h.index||{},f=h.timeStamps,l,k=[],d=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,g=this._addProp,o=function(){};if(b&&typeof b=="object"){b=m(b,false,h.defaultId);m(k,false)}return b},_addProp:function(b,h){return b+(b.match(/#/)?b.length==
76
- 1?"":".":"#")+h}}});
77
- require.def("preview/harSchema",[],function(){function n(){}var b=/^(\d{4})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,h={pageType:{id:"pageType",description:"Exported web page",optional:true,properties:{startedDateTime:{type:"string",format:"date-time",pattern:b},id:{type:"string",unique:true},title:{type:"string"},pageTimings:{$ref:"pageTimingsType"},comment:{type:"string",optional:true}}}};b={entryType:{id:"entryType",description:"Request and Response related info",optional:true,
78
- properties:{pageref:{type:"string",optional:true},startedDateTime:{type:"string",format:"date-time",pattern:b},time:{type:"integer",min:0},request:{$ref:"requestType"},response:{$ref:"responseType"},cache:{$ref:"cacheType"},timings:{$ref:"timingsType"},serverIPAddress:{type:"string",optional:true},connection:{type:"string",optional:true},comment:{type:"string",optional:true}}}};n.prototype={registerType:function(){var j=function(a,c){for(name in c)if(c.hasOwnProperty(name)&&name!="prototype")a[name]=
79
- c[name]};for(i=0;i<arguments.length;i+=1)j(this,arguments[i])}};var m=new n;m.registerType({logType:{id:"logType",description:"HTTP Archive structure.",type:"object",properties:{log:{type:"object",properties:{version:{type:"string"},creator:{$ref:"creatorType"},browser:{$ref:"browserType"},pages:{type:"array",optional:true,items:{$ref:"pageType"}},entries:{type:"array",items:{$ref:"entryType"}},comment:{type:"string",optional:true}}}}}},{creatorType:{id:"creatorType",description:"Name and version info of the log creator app.",
80
- type:"object",properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string",optional:true}}}},{browserType:{id:"browserType",description:"Name and version info of used browser.",type:"object",optional:true,properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string",optional:true}}}},h,{pageTimingsType:{id:"pageTimingsType",description:"Timing info about page load",properties:{onContentLoad:{type:"number",optional:true,min:-1},onLoad:{type:"number",optional:true,
81
- min:-1},comment:{type:"string",optional:true}}}},b,{requestType:{id:"requestType",description:"Monitored request",properties:{method:{type:"string"},url:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookieType"}},headers:{type:"array",items:{$ref:"recordType"}},queryString:{type:"array",items:{$ref:"recordType"}},postData:{$ref:"postDataType"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string",optional:true}}}},{recordType:{id:"recordType",
82
- description:"Helper name-value pair structure.",properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string",optional:true}}}},{responseType:{id:"responseType",description:"Monitored Response.",properties:{status:{type:"integer"},statusText:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookieType"}},headers:{type:"array",items:{$ref:"recordType"}},content:{$ref:"contentType"},redirectURL:{type:"string"},headersSize:{type:"integer"},bodySize:{type:"integer"},
83
- comment:{type:"string",optional:true}}}},{postDataType:{id:"postDataType",description:"Posted data info.",optional:true,properties:{mimeType:{type:"string"},text:{type:"string",optional:true},params:{type:"array",optional:true,properties:{name:{type:"string"},value:{type:"string",optional:true},fileName:{type:"string",optional:true},contentType:{type:"string",optional:true},comment:{type:"string",optional:true}}},comment:{type:"string",optional:true}}}},{contentType:{id:"contentType",description:"Response content",
84
- properties:{size:{type:"integer"},compression:{type:"integer",optional:true},mimeType:{type:"string"},text:{type:"string",optional:true},encoding:{type:"string",optional:true},comment:{type:"string",optional:true}}}},{cacheType:{id:"cacheType",description:"Info about a response coming from the cache.",properties:{beforeRequest:{$ref:"cacheEntryType"},afterRequest:{$ref:"cacheEntryType"},comment:{type:"string",optional:true}}}},{cacheEntryType:{id:"cacheEntryType",optional:true,description:"Info about cache entry.",
85
- properties:{expires:{type:"string",optional:"true"},lastAccess:{type:"string"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string",optional:true}}}},{timingsType:{id:"timingsType",description:"Info about request-response timing.",properties:{dns:{type:"integer",min:-1},connect:{type:"integer",min:-1},blocked:{type:"integer",min:-1},send:{type:"integer",min:-1},wait:{type:"integer",min:-1},receive:{type:"integer",min:-1},ssl:{type:"integer",optional:true,min:-1},comment:{type:"string",
86
- optional:true}}}});return m});
87
- require.def("core/cookies",["core/lib"],function(n){return{getCookie:function(b){for(var h=document.cookie.split(";"),m=0;m<h.length;m++){var j=h[m].split("=");if(n.trim(j[0])==b)return j[1].length?unescape(n.trim(j[1])):null}},setCookie:function(b,h,m,j,a,c){var e=new Date;e.setTime(e.getTime());if(m)m=m*1E3*60*60*24;e=new Date(e.getTime()+m);document.cookie=b+"="+escape(h)+(m?";expires="+e.toGMTString():"")+(j?";path="+j:"")+(a?";domain="+a:"")+(c?";secure":"")},removeCookie:function(b,h,m){if(this.getCookie(b))document.cookie=
88
- b+"="+(h?";path="+h:"")+(m?";domain="+m:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}});require.def("i18n!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"}});
89
- require.def("preview/requestBody",["domplate/domplate","i18n!nls/requestBody","core/lib","domplate/tabView","syntax-highlighter/shCore"],function(n,b,h,m,j){with(n){n=function(){};n.prototype=domplate({render:function(d,g){var o=new m("requestBody");o.appendTab(new a(g));g.request.queryString&&g.request.queryString.length&&o.appendTab(new e(g));g.request.postData&&o.appendTab(new f(g,g.request.method));g.response.content.size>0&&o.appendTab(new c(g));this.showCache(g)&&o.appendTab(new l(g));this.showHtml(g)&&
90
- o.appendTab(new k(g));d=o.render(d);o.selectTabByName("Headers");return d},showCache:function(d){if(!d.cache)return false;if(!d.cache.afterRequest)return false;if(d.category=="image")return false;return true},showHtml:function(d){return d.response.content.mimeType=="text/html"||d.mimeType=="application/xhtml+xml"}});var a=function(d){this.file=d};a.prototype=domplate(m.Tab.prototype,{id:"Headers",label:b.Headers,bodyTag:TABLE({"class":"netInfoHeadersText netInfoText netInfoHeadersTable",cellpadding:0,
91
- cellspacing:0},TBODY(TR({"class":"netInfoResponseHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},b.ResponseHeaders))),TR({"class":"netInfoRequestHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},b.RequestHeaders))))),headerDataTag:FOR("param","$headers",TR(TD({"class":"netInfoParamName"},"$param.name"),TD({"class":"netInfoParamValue"},PRE("$param|getParamValue")))),getParamValue:function(d){return h.wrapText(d.value,true)},onUpdateBody:function(d,g){this.file.response.headers&&
92
- this.insertHeaderRows(g,this.file.response.headers,"Headers","ResponseHeaders");this.file.request.headers&&this.insertHeaderRows(g,this.file.request.headers,"Headers","RequestHeaders")},insertHeaderRows:function(d,g,o,p){o=h.getElementByClass(d,"netInfo"+o+"Table");p=h.getElementByClass(o,"netInfo"+p+"Title");if(g.length){this.headerDataTag.insertRows({headers:g},p?p:d);h.removeClass(p,"collapsed")}else h.setClass(p,"collapsed")}});var c=function(d){this.file=d};c.prototype=domplate(m.Tab.prototype,
93
- {id:"Response",label:b.Response,bodyTag:DIV({"class":"netInfoResponseText netInfoText"},PRE({"class":"javascript:nocontrols:nogutter:",name:"code"})),onUpdateBody:function(d,g){d=h.getElementByClass(g,"netInfoResponseText");if(this.file.category=="image"){h.clearNode(d);g=g.ownerDocument.createElement("img");g.src=this.file.href;d.appendChild(g,d)}else{h.clearNode(d.firstChild);g=this.file.response.content.text;var o=this.file.response.content.mimeType;if(o=="application/javascript"||o=="text/javascript"||
94
- o=="application/x-javascript"||o=="text/ecmascript"||o=="application/ecmascript"){d.firstChild.innerHTML=g;j.SyntaxHighlighter.HighlightAll(d.firstChild)}else h.insertWrappedText(g,d.firstChild)}}});var e=function(d){this.file=d};e.prototype=domplate(a.prototype,{id:"Params",label:b.URLParameters,bodyTag:TABLE({"class":"netInfoParamsText netInfoText netInfoParamsTable",cellpadding:0,cellspacing:0},TBODY()),onUpdateBody:function(d,g){this.file.request.queryString&&this.insertHeaderRows(h.getElementByClass(g,
95
- "netInfoParamsText"),this.file.request.queryString,"Params")}});var f=function(d,g){g=g.charAt(0).toUpperCase()+g.slice(1).toLowerCase();this.file=d;this.id=g;this.label=b[g]};f.prototype=domplate(a.prototype,{bodyTag:DIV({"class":"netInfo$tab.id\\Text netInfoText"},TABLE({"class":"netInfo$tab.id\\Table",cellpadding:0,cellspacing:0},TBODY())),onUpdateBody:function(d,g){if(d=this.file.request.postData){g=h.getElementByClass(g,"netInfo"+this.id+"Text");d.mimeType=="application/x-www-form-urlencoded"?
96
- this.insertHeaderRows(g,d.params,this.id):h.insertWrappedText(d.text,g)}}});(function(d){this.file=d}).prototype=domplate(a.prototype,{id:"Cookies",label:b.Cookies,bodyTag:DIV({"class":"netInfoCookiesText netInfoText"},TABLE({"class":"netInfoCookiesTable",cellpadding:0,cellspacing:0},TBODY(TR({"class":"netInfoResponseCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},b.ResponseCookies))),TR({"class":"netInfoRequestCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},b.RequestCookies)))))),
97
- onUpdateBody:function(d,g){if(file.response.cookies){d=h.getElementByClass(g,"netInfoParamsText");this.insertHeaderRows(d,file.response.cookies,"Cookies","ResponseCookies")}if(file.request.cookies){d=h.getElementByClass(g,"netInfoParamsText");this.insertHeaderRows(d,file.request.cookies,"Cookies","RequestCookies")}}});var l=function(d){this.file=d};l.prototype=domplate(a.prototype,{id:"Cache",label:b.Cache,bodyTag:DIV({"class":"netInfoCacheText netInfoText"},TABLE({"class":"netInfoCacheTable",cellpadding:0,
98
- cellspacing:0},TBODY())),onUpdateBody:function(d,g){if(this.file.cache&&this.file.cache.afterRequest){d=this.file.cache.afterRequest;var o=[];for(var p in d)o.push({name:p,value:d[p]});this.insertHeaderRows(g,o,"Cache")}}});var k=function(d){this.file=d};k.prototype=domplate(a.prototype,{id:"HTML",label:b.HTML,bodyTag:DIV({"class":"netInfoHtmlText netInfoText"},IFRAME({"class":"netInfoHtmlPreview"})),onUpdateBody:function(d,g){h.getElementByClass(g,"netInfoHtmlPreview").contentWindow.document.body.innerHTML=
99
- this.file.response.content.text}});return n}});
100
- require.def("domplate/tabView",["domplate/domplate","core/lib","core/trace"],function(n,b,h){with(n){var m=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",
101
- _repObject:"$tab"},"$tab.label"),tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"}),hideTab:function(){return false},onClickTab:function(j){j=$.event.fix(j||window.event);this.getTabView(j.target).onClickTab(j)},getTabView:function(j){return b.getAncestorByClass(j,"tabView").repObject}});n=function(j){this.id=j;this.tabs=[];this.listeners=[]};n.prototype={appendTab:function(j){this.tabs.push(j);j.tabView=this;return j},getTab:function(j){return(j=b.getElementByClass(this.element,
102
- j+"Tab"))?j.repObject:null},selectTabByName:function(j){(j=b.getElementByClass(this.element,j+"Tab"))&&this.selectTab(j)},addListener:function(j){this.listeners.push(j)},removeListener:function(j){b.remove(this.listeners,j)},onClickTab:function(j){(j=b.getAncestorByClass(j.target,"tab"))&&this.selectTab(j)},selectTab:function(j){if(b.hasClass(j,"tab"))if(!b.hasClass(j,"selected")){var a=j.getAttribute("view");if(a){var c=b.getAncestorByClass(j,"tabViewBody");if(c.selectedTab){c.selectedTab.removeAttribute("selected");
103
- c.selectedBody.removeAttribute("selected");b.removeClass(c.selectedTab,"selected");b.removeClass(c.selectedBody,"selected")}var e=b.getElementByClass(c,"tab"+a+"Body");e||h.error("TabView.selectTab; Missing tab body",j);c.selectedTab=j;c.selectedBody=e;c.selectedTab.setAttribute("selected","true");c.selectedBody.setAttribute("selected","true");b.setClass(c.selectedBody,"selected");b.setClass(c.selectedTab,"selected");this.updateTabBody(c,a)}}},updateTabBody:function(j){j=j.selectedTab.repObject;if(!j._body._updated){j._body._updated=
104
- true;j.bodyTag&&j.bodyTag.replace({tab:j},j._body);j&&j.onUpdateBody&&j.onUpdateBody(this,j._body);for(var a=0;a<this.listeners.length;a++){var c=this.listeners[a];c.onUpdateBody&&c.onUpdateBody(this,j._body)}}},render:function(j){this.element=m.tag.replace({tabView:this},j,m);b.setClass(this.element,this.id);for(var a in this.tabs){var c=this.tabs[a],e=c.tabHeaderTag?c.tabHeaderTag:m.tabHeaderTag,f=c.tabBodyTag?c.tabBodyTag:m.tabBodyTag;try{c._header=e.append({tab:c},b.$(j,"tabBar"));c._body=f.append({tab:c},
105
- b.$(j,"tabBodies"))}catch(l){h.exception("TabView.appendTab; Exception ",l)}}return this.element}};n.Tab=function(){};n.Tab.prototype={invalidate:function(){this._updated=false},select:function(){this.tabView.selectTabByName(this.id)}};return n}});
106
- require.def("syntax-highlighter/shCore",[],function(){var n={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:'<html><head><title>About...</title></head><body class="dp-about"><table cellspacing="0"><tr><td class="copy"><p class="title">dp.SyntaxHighlighter</div><div class="para">Version: {V}</p><p><a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/syntaxhighlighter</a></p>&copy;2004-2007 Alex Gorbatchev.</td></tr><tr><td class="footer"><input type="button" class="close" value="OK" onClick="window.close()"/></td></tr></table></body></html>'},ClipboardSwf:null,
107
- Version:"1.5.1"}};n.SyntaxHighlighter=n.sh;n.sh.Toolbar.Commands={ExpandSource:{label:"+ expand source",check:function(b){return b.collapse},func:function(b,h){b.parentNode.removeChild(b);h.div.className=h.div.className.replace("collapsed","")}},ViewSource:{label:"view plain",func:function(b,h){b=n.sh.Utils.FixForBlogger(h.originalCode).replace(/</g,"&lt;");h=window.open("","_blank","width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0");h.document.write('<textarea style="width:99%;height:99%">'+
108
- b+"</textarea>");h.document.close()}},CopyToClipboard:{label:"copy to clipboard",check:function(){return window.clipboardData!=null||n.sh.ClipboardSwf!=null},func:function(b,h){b=n.sh.Utils.FixForBlogger(h.originalCode).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");if(window.clipboardData)window.clipboardData.setData("text",b);else if(n.sh.ClipboardSwf!=null){var m=h.flashCopier;if(m==null){m=document.createElement("div");h.flashCopier=m;h.div.appendChild(m)}m.innerHTML='<embed src="'+
109
- n.sh.ClipboardSwf+'" FlashVars="clipboard='+encodeURIComponent(b)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>'}alert("The code is in your clipboard now")}},PrintSource:{label:"print",func:function(b,h){b=document.createElement("IFRAME");var m=null;b.style.cssText="position:absolute;width:0px;height:0px;left:-500px;top:-500px;";document.body.appendChild(b);m=b.contentWindow.document;n.sh.Utils.CopyStyles(m,window.document);m.write('<div class="'+h.div.className.replace("collapsed",
110
- "")+' printing">'+h.div.innerHTML+"</div>");m.close();b.contentWindow.focus();b.contentWindow.print();alert("Printing...");document.body.removeChild(b)}},About:{label:"?",func:function(){var b=window.open("","_blank","dialog,width=300,height=150,scrollbars=0"),h=b.document;n.sh.Utils.CopyStyles(h,window.document);h.write(n.sh.Strings.AboutDialog.replace("{V}",n.sh.Version));h.close();b.focus()}}};n.sh.Toolbar.Create=function(b){var h=document.createElement("DIV");h.className="tools";for(var m in n.sh.Toolbar.Commands){var j=
111
- n.sh.Toolbar.Commands[m];j.check!=null&&!j.check(b)||(h.innerHTML+='<a href="#" onclick="dp.sh.Toolbar.Command(\''+m+"',this);return false;\">"+j.label+"</a>")}return h};n.sh.Toolbar.Command=function(b,h){for(var m=h;m!=null&&m.className.indexOf("dp-highlighter")==-1;)m=m.parentNode;m!=null&&n.sh.Toolbar.Commands[b].func(h,m.highlighter)};n.sh.Utils.CopyStyles=function(b,h){h=h.getElementsByTagName("link");for(var m=0;m<h.length;m++)h[m].rel.toLowerCase()=="stylesheet"&&b.write('<link type="text/css" rel="stylesheet" href="'+
112
- h[m].href+'"></link>')};n.sh.Utils.FixForBlogger=function(b){return n.sh.isBloggerMode==true?b.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/gi,"\n"):b};n.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")};n.sh.Match=function(b,h,m){this.value=b;this.index=h;this.length=
113
- b.length;this.css=m};n.sh.Highlighter=function(){this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true};n.sh.Highlighter.SortCallback=function(b,h){if(b.index<h.index)return-1;else if(b.index>h.index)return 1;else if(b.length<h.length)return-1;else if(b.length>h.length)return 1;return 0};n.sh.Highlighter.prototype.CreateElement=function(b){b=document.createElement(b);b.highlighter=this;return b};n.sh.Highlighter.prototype.GetMatches=
114
- function(b,h){for(var m=null;(m=b.exec(this.code))!=null;)this.matches[this.matches.length]=new n.sh.Match(m[0],m.index,h)};n.sh.Highlighter.prototype.AddBit=function(b,h){if(!(b==null||b.length==0)){var m=this.CreateElement("SPAN");b=b.replace(/ /g,"&nbsp;");b=b.replace(/</g,"&lt;");b=b.replace(/\n/gm,"&nbsp;<br>");if(h!=null)if(/br/gi.test(b)){b=b.split("&nbsp;<br>");for(var j=0;j<b.length;j++){m=this.CreateElement("SPAN");m.className=h;m.innerHTML=b[j];this.div.appendChild(m);j+1<b.length&&this.div.appendChild(this.CreateElement("BR"))}}else{m.className=
115
- h;m.innerHTML=b;this.div.appendChild(m)}else{m.innerHTML=b;this.div.appendChild(m)}}};n.sh.Highlighter.prototype.IsInside=function(b){if(b==null||b.length==0)return false;for(var h=0;h<this.matches.length;h++){var m=this.matches[h];if(m!=null)if(b.index>m.index&&b.index<m.index+m.length)return true}return false};n.sh.Highlighter.prototype.ProcessRegexList=function(){for(var b=0;b<this.regexList.length;b++)this.GetMatches(this.regexList[b].regex,this.regexList[b].css)};n.sh.Highlighter.prototype.ProcessSmartTabs=
116
- function(b){function h(e,f,l){var k=e.substr(0,f);e=e.substr(f+1,e.length);f="";for(var d=0;d<l;d++)f+=" ";return k+f+e}function m(e,f){if(e.indexOf(a)==-1)return e;for(var l=0;(l=e.indexOf(a))!=-1;)e=h(e,l,f-l%f);return e}b=b.split("\n");for(var j="",a="\t",c=0;c<b.length;c++)j+=m(b[c],4)+"\n";return j};n.sh.Highlighter.prototype.SwitchToList=function(){var b=this.div.innerHTML.replace(/<(br)\/?>/gi,"\n").split("\n");this.addControls==true&&this.bar.appendChild(n.sh.Toolbar.Create(this));if(this.showColumns){for(var h=
117
- this.CreateElement("div"),m=this.CreateElement("div"),j=1;j<=150;)if(j%10==0){h.innerHTML+=j;j+=(j+"").length}else{h.innerHTML+="&middot;";j++}m.className="columns";m.appendChild(h);this.bar.appendChild(m)}j=0;for(h=this.firstLine;j<b.length-1;j++,h++){m=this.CreateElement("LI");var a=this.CreateElement("SPAN");m.className=j%2==0?"alt":"";a.innerHTML=b[j]+"&nbsp;";m.appendChild(a);this.ol.appendChild(m)}this.div.innerHTML=""};n.sh.Highlighter.prototype.Highlight=function(b){function h(f){return f.replace(/^\s*(.*?)[\s\n]*$/g,
118
- "$1")}function m(f){return f.replace(/\n*$/,"").replace(/^\n*/,"")}function j(f){f=n.sh.Utils.FixForBlogger(f).split("\n");for(var l=new RegExp("^\\s*","g"),k=1E3,d=0;d<f.length&&k>0;d++)if(h(f[d]).length!=0){var g=l.exec(f[d]);if(g!=null&&g.length>0)k=Math.min(g[0].length,k)}if(k>0)for(d=0;d<f.length;d++)f[d]=f[d].substr(k);return f.join("\n")}function a(f,l,k){return f.substr(l,k-l)}var c=0;if(b==null)b="";this.originalCode=b;this.code=m(j(b));this.div=this.CreateElement("DIV");this.bar=this.CreateElement("DIV");
119
- this.ol=this.CreateElement("OL");this.matches=[];this.div.className="dp-highlighter";this.div.highlighter=this;this.bar.className="bar";this.ol.start=this.firstLine;if(this.CssClass!=null)this.ol.className=this.CssClass;if(this.collapse)this.div.className+=" collapsed";if(this.noGutter)this.div.className+=" nogutter";if(this.tabsToSpaces==true)this.code=this.ProcessSmartTabs(this.code);this.ProcessRegexList();if(this.matches.length==0)this.AddBit(this.code,null);else{this.matches=this.matches.sort(n.sh.Highlighter.SortCallback);
120
- for(b=0;b<this.matches.length;b++)if(this.IsInside(this.matches[b]))this.matches[b]=null;for(b=0;b<this.matches.length;b++){var e=this.matches[b];if(!(e==null||e.length==0)){this.AddBit(a(this.code,c,e.index),null);this.AddBit(e.value,e.css);c=e.index+e.length}}this.AddBit(this.code.substr(c),null)}this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol)};n.sh.Highlighter.prototype.GetKeywords=function(b){return"\\b"+b.replace(/ /g,"\\b|\\b")+"\\b"};n.sh.BloggerMode=function(){n.sh.isBloggerMode=
121
- true};n.sh.HighlightAll=function(b,h,m,j,a,c){function e(){for(var v=arguments,u=0;u<v.length;u++)if(v[u]!=null){if(typeof v[u]=="string"&&v[u]!="")return v[u]+"";if(typeof v[u]=="object"&&v[u].value!="")return v[u].value+""}return null}function f(v,u){for(var x=0;x<u.length;x++)if(u[x]==v)return true;return false}function l(v,u,x){v=new RegExp("^"+v+"\\[(\\w+)\\]$","gi");for(var w=null,y=0;y<u.length;y++)if((w=v.exec(u[y]))!=null)return w[1];return x}function k(v,u,x){x=document.getElementsByTagName(x);
122
- for(var w=0;w<x.length;w++)x[w].getAttribute("name")==u&&v.push(x[w])}var d=[],g=null,o={};if(typeof b=="string"){k(d,b,"pre");k(d,b,"textarea")}else d.push(b);if(d.length!=0){for(var p in n.sh.Brushes){g=n.sh.Brushes[p].Aliases;if(g!=null)for(b=0;b<g.length;b++)o[g[b]]=p}for(b=0;b<d.length;b++){p=d[b];var q=e(p.attributes["class"],p.className,p.attributes.language,p.language);g="";if(q!=null){q=q.split(":");g=q[0].toLowerCase();if(o[g]!=null){g=new n.sh.Brushes[o[g]];p.style.display="none";g.noGutter=
123
- h==null?f("nogutter",q):!h;g.addControls=m==null?!f("nocontrols",q):m;g.collapse=j==null?f("collapse",q):j;g.showColumns=c==null?f("showcolumns",q):c;var t=document.getElementsByTagName("head")[0];if(g.Style&&t){var s=document.createElement("style");s.setAttribute("type","text/css");if(s.styleSheet)s.styleSheet.cssText=g.Style;else{var r=document.createTextNode(g.Style);s.appendChild(r)}t.appendChild(s)}g.firstLine=a==null?parseInt(l("firstline",q,1)):a;g.Highlight(p.innerHTML);g.source=p;p.parentNode.insertBefore(g.div,
124
- p)}}}}};n.sh.Brushes.JScript=function(){this.regexList=[{regex:n.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:n.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:n.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:n.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords("abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with"),
125
- "gm"),css:"keyword"}];this.CssClass="dp-c"};n.sh.Brushes.JScript.prototype=new n.sh.Highlighter;n.sh.Brushes.JScript.Aliases=["js","jscript","javascript"];return n});
126
- require.def("domplate/infoTip",["domplate/domplate","core/lib","core/trace"],function(n,b){with(n){n=b.extend({listeners:[],maxWidth:100,maxHeight:80,infoTipMargin:10,infoTipWindowPadding:25,tags:domplate({infoTipTag:DIV({"class":"infoTip"})}),initialize:function(){if(!$.browser.msie){var h=$("body");h.bind("mouseover",b.bind(this.onMouseMove,this));h.bind("mouseout",b.bind(this.onMouseOut,this));h.bind("mousemove",b.bind(this.onMouseMove,this));return this.infoTip=this.tags.infoTipTag.append({},
127
- b.getBody(document))}},showInfoTip:function(h,m,j,a,c,e){var f=b.getOverflowParent(m);if(b.dispatch2(this.listeners,"showInfoTip",[h,m,j+(f?f.scrollLeft:0),a,c,e])){c=h.ownerDocument.documentElement;m=c.clientWidth;c=c.clientHeight;if(j+h.offsetWidth+this.infoTipMargin>m-this.infoTipWindowPadding){h.style.left="auto";h.style.right=m-j+this.infoTipMargin+"px"}else{h.style.left=j+this.infoTipMargin+"px";h.style.right="auto"}h.style.top=a+h.offsetHeight+this.infoTipMargin>c?Math.max(0,c-(h.offsetHeight+
128
- this.infoTipMargin))+"px":a+this.infoTipMargin+"px";h.style.bottom="auto";h.setAttribute("active","true")}else this.hideInfoTip(h)},hideInfoTip:function(h){h&&h.removeAttribute("active")},onMouseOut:function(h){h.relatedTarget||this.hideInfoTip(this.infoTip)},onMouseMove:function(h){this.infoTip.setAttribute("multiline",false);this.showInfoTip(this.infoTip,h.target,h.clientX,h.clientY,h.rangeParent,h.rangeOffset)},populateTimingInfoTip:function(h,m){this.tags.colorTag.replace({rgbValue:m},h);return true},
129
- addListener:function(h){this.listeners.push(h)},removeListener:function(h){b.remove(this.listeners,h)}});n.initialize();return n}});
130
- require.def("domplate/popupMenu",["domplate/domplate","core/lib","core/trace"],function(n,b){with(n){var h={controllers:[],controllerContext:{label:"controller context"},initialize:function(c){this.controllers=[];this.controllerContext=c||this.controllerContext},shutdown:function(){this.removeControllers()},addController:function(){for(var c=0,e;e=arguments[c];c++){if(typeof e[0]=="string")e[0]=$$(e[0],this.controllerContext);var f=e[2];e[2]=b.bind(f,this);e[3]=f;this.controllers.push(e);b.addEventListener.apply(this,
131
- e)}},removeController:function(){for(var c=0,e;e=arguments[c];c++)for(var f=0,l;l=this.controllers[f];f++)e[0]==l[0]&&e[1]==l[1]&&e[2]==l[3]&&b.removeEventListener.apply(this,l)},removeControllers:function(){for(var c=0,e;e=this.controllers[c];c++)b.removeEventListener.apply(this,e)}};n={"class":"$item.className",type:"$item.type",value:"$item.value",_command:"$item.command"};if(b.isIE6)n.href="javascript:void(0)";var m=domplate({tag:DIV({"class":"popupMenu popupMenuShadow"},DIV({"class":"popupMenuContent popupMenuShadowContent"},
132
- FOR("item","$object.items|memberIterator",TAG("$item.tag",{item:"$item"})))),itemTag:A(n,"$item.label"),checkBoxTag:A(b.extend(n,{checked:"$item.checked"}),"$item.label"),radioButtonTag:A(b.extend(n,{selected:"$item.selected"}),"$item.label"),groupTag:A(b.extend(n,{child:"$item.child"}),"$item.label"),shortcutTag:A(n,"$item.label",SPAN({"class":"popupMenuShortcutKey"},"$item.key")),separatorTag:SPAN({"class":"popupMenuSeparator"}),memberIterator:function(c){for(var e=[],f=0,l=c.length;f<l;f++){var k=
133
- c[f];if(typeof k=="string"&&k.indexOf("-")==0)e.push({tag:this.separatorTag});else{k=b.extend(k,{});k.type=k.type||"";k.value=k.value||"";var d=k.type;k.tag=this.itemTag;var g=k.className||"";g+="popupMenuOption ";if(d=="checkbox"){g+="popupMenuCheckBox ";k.tag=this.checkBoxTag}else if(d=="radio"){g+="popupMenuRadioButton ";k.tag=this.radioButtonTag}else if(d=="group"){g+="popupMenuGroup ";k.tag=this.groupTag}else if(d=="shortcut"){g+="popupMenuShortcut ";k.tag=this.shortcutTag}if(k.checked)g+="popupMenuChecked ";
134
- else if(k.selected)g+="popupMenuRadioSelected ";if(k.disabled)g+="popupMenuDisabled ";k.className=g;k.label=k.label;e.push(k)}}return e}}),j=function(c){if(!c.element){if(c.getItems)c.items=c.getItems();var e=b.getBody(document);c.element=m.tag.append({object:c},e,m)}b.append(this,c);if(typeof this.element=="string"){this.id=this.element;this.element=$(this.id)}else if(this.id)this.element.id=this.id;this.elementStyle=this.element.style;this.isVisible=false;this.handleMouseDown=b.bind(this.handleMouseDown,
135
- this);this.handleMouseOver=b.bind(this.handleMouseOver,this);this.handleMouseOut=b.bind(this.handleMouseOut,this);this.handleWindowMouseDown=b.bind(this.handleWindowMouseDown,this)},a={};j.prototype=b.extend(h,{initialize:function(){h.initialize.call(this);this.addController([this.element,"mousedown",this.handleMouseDown],[this.element,"mouseover",this.handleMouseOver])},destroy:function(){this.hide();if(this.parentMenu)this.parentMenu.childMenu=null;this.element.parentNode.removeChild(this.element);
136
- this.parentTarget=this.parentMenu=this.elementStyle=this.element=null},shutdown:function(){h.shutdown.call(this)},showPopup:function(c){var e=b.isIE6?1:-4;c=b.getElementBox(c);var f={top:0,left:0};this.show(c.left+e-f.left,c.top+c.height-5-f.top)},show:function(c,e){this.initialize();if(!this.isVisible){c=c||0;e=e||0;if(this.parentMenu){var f=this.parentMenu.childMenu;f&&f!=this&&f.destroy();this.parentMenu.childMenu=this}else b.addEventListener(document,"mousedown",this.handleWindowMouseDown);this.elementStyle.display=
137
- "block";this.elementStyle.visibility="hidden";f=b.getWindowSize();c=Math.min(c,f.width-this.element.clientWidth-10);c=Math.max(c,0);e=Math.min(e,f.height-this.element.clientHeight-10);e=Math.max(e,0);this.elementStyle.left=c+"px";this.elementStyle.top=e+"px";this.elementStyle.visibility="visible";this.isVisible=true;b.isFunction(this.onShow)&&this.onShow.apply(this,arguments)}},hide:function(){this.clearHideTimeout();this.clearShowChildTimeout();if(this.isVisible){this.elementStyle.display="none";
138
- if(this.childMenu){this.childMenu.destroy();this.childMenu=null}this.parentTarget&&b.removeClass(this.parentTarget,"popupMenuGroupSelected");this.isVisible=false;this.shutdown();b.isFunction(this.onHide)&&this.onHide.apply(this,arguments)}},showChildMenu:function(c){var e=c.getAttribute("child"),f=this;c=c;this.showChildTimeout=window.setTimeout(function(){var l=b.getElementBox(c),k=a.hasOwnProperty(e)?a[e]:{element:$(e)};(new j(b.extend(k,{parentMenu:f,parentTarget:c}))).show(l.left+l.width+(b.isIE6?
139
- -1:-6),l.top-6);b.setClass(c,"popupMenuGroupSelected")},350)},clearHideTimeout:function(){if(this.hideTimeout){window.clearTimeout(this.hideTimeout);delete this.hideTimeout}},clearShowChildTimeout:function(){if(this.showChildTimeout){window.clearTimeout(this.showChildTimeout);this.showChildTimeout=null}},handleMouseDown:function(c){b.cancelEvent(c,true);for(var e=this;e.parentMenu;)e=e.parentMenu;c=c.target||c.srcElement;c=b.getAncestorByClass(c,"popupMenuOption");if(!c||b.hasClass(c,"popupMenuGroup"))return false;
140
- if(c&&!b.hasClass(c,"popupMenuDisabled")){var f=c.getAttribute("type");if(f=="checkbox"){c.getAttribute("checked");var l=c.getAttribute("value"),k=b.hasClass(c,"popupMenuChecked");if(k){b.removeClass(c,"popupMenuChecked");c.setAttribute("checked","")}else{b.setClass(c,"popupMenuChecked");c.setAttribute("checked","true")}b.isFunction(this.onCheck)&&this.onCheck.call(this,c,l,!k)}if(f=="radiobutton"){f=b.getElementsByClass(c.parentNode,"popupMenuRadioSelected");l=c.getAttribute("group");k=0;for(var d=
141
- f.length;k<d;k++){radio=f[k];if(radio.getAttribute("group")==l){b.removeClass(radio,"popupMenuRadioSelected");radio.setAttribute("selected","")}}b.setClass(c,"popupMenuRadioSelected");c.setAttribute("selected","true")}f=null;l=c.command;if(b.isFunction(l))f=l;else if(typeof l=="string")f=this[l];l=true;if(f)l=f.call(this,c)!==false;l&&e.hide()}return false},handleWindowMouseDown:function(c){c=c.target||c.srcElement;c=b.getAncestorByClass(c,"popupMenu");if(!c){b.removeEventListener(document,"mousedown",
142
- this.handleWindowMouseDown);this.destroy()}},handleMouseOver:function(c){this.clearHideTimeout();this.clearShowChildTimeout();c=c.target||c.srcElement;if(c=b.getAncestorByClass(c,"popupMenuOption")){var e=this.childMenu;if(e){b.removeClass(e.parentTarget,"popupMenuGroupSelected");if(e.parentTarget!=c&&e.isVisible){e.clearHideTimeout();e.hideTimeout=window.setTimeout(function(){e.destroy()},300)}}b.hasClass(c,"popupMenuGroup")&&this.showChildMenu(c)}}});b.append(j,{register:function(c){a[c.id]=c},
143
- check:function(c){b.setClass(c,"popupMenuChecked");c.setAttribute("checked","true")},uncheck:function(c){b.removeClass(c,"popupMenuChecked");c.setAttribute("checked","")},disable:function(c){b.setClass(c,"popupMenuDisabled")},enable:function(c){b.removeClass(c,"popupMenuDisabled")}});return j}});
144
- (function(n){if(!b)var b={};(function(){function h(d){return d<10?"0"+d:d}function m(d){c.lastIndex=0;return c.test(d)?'"'+d.replace(c,function(g){var o=l[g];return typeof o==="string"?o:"\\u"+("0000"+g.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+d+'"'}function j(d,g){var o,p,q=e,t,s=g[d];if(s&&typeof s==="object"&&typeof s.toJSON==="function")s=s.toJSON(d);if(typeof k==="function")s=k.call(g,d,s);switch(typeof s){case "string":return m(s);case "number":return isFinite(s)?String(s):"null";case "boolean":case "null":return String(s);
145
- case "object":if(!s)return"null";e+=f;t=[];if(Object.prototype.toString.apply(s)==="[object Array]"){p=s.length;for(d=0;d<p;d+=1)t[d]=j(d,s)||"null";g=t.length===0?"[]":e?"[\n"+e+t.join(",\n"+e)+"\n"+q+"]":"["+t.join(",")+"]";e=q;return g}if(k&&typeof k==="object"){p=k.length;for(d=0;d<p;d+=1){o=k[d];if(typeof o==="string")if(g=j(o,s))t.push(m(o)+(e?": ":":")+g)}}else for(o in s)if(Object.hasOwnProperty.call(s,o))if(g=j(o,s))t.push(m(o)+(e?": ":":")+g);g=t.length===0?"{}":e?"{\n"+e+t.join(",\n"+e)+
146
- "\n"+q+"}":"{"+t.join(",")+"}";e=q;return g}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+h(this.getUTCMonth()+1)+"-"+h(this.getUTCDate())+"T"+h(this.getUTCHours())+":"+h(this.getUTCMinutes())+":"+h(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var a=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
147
- c=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e,f,l={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;if(typeof b.stringify!=="function")b.stringify=function(d,g,o){var p;f=e="";if(typeof o==="number")for(p=0;p<o;p+=1)f+=" ";else if(typeof o==="string")f=o;if((k=g)&&typeof g!=="function"&&(typeof g!=="object"||typeof g.length!=="number"))throw new Error("JSON.stringify");return j("",
148
- {"":d})};if(typeof b.parse!=="function")b.parse=function(d,g){function o(p,q){var t,s,r=p[q];if(r&&typeof r==="object")for(t in r)if(Object.hasOwnProperty.call(r,t)){s=o(r,t);if(s!==undefined)r[t]=s;else delete r[t]}return g.call(p,q,r)}a.lastIndex=0;if(a.test(d))d=d.replace(a,function(p){return"\\u"+("0000"+p.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(d.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
149
- "]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){d=eval("("+d+")");return typeof g==="function"?o({"":d},""):d}throw new SyntaxError("JSON.parse");}})();n.toJSON=function(h,m){if(typeof m=="undefined")m=null;return b.parse(h,m)};n.jSONToString=function(h,m,j){if(typeof m=="undefined")m=null;if(typeof j=="undefined")j=null;return b.stringify(h,m,j)}})(jQuery);require.def("jquery-plugins/jquery.json",function(){});require.resume();
1
+ 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<b.length;e++){var f=b[e];if(f[c])try{f[c].apply(f,d)}catch(g){a.exception(g)}}},b.dispatch2=function(b,c,d){for(var e=0;e<b.length;e++){var f=b[e];if(f[c])try{var g=f[c].apply(f,d);if(g)return g}catch(h){a.exception(h)}}};var e=Object.prototype.toString,f=/^\s*function(\s+[\w_$][\w\d_$]*)?\s*\(/;b.isArray=function(a){return jQuery.isArray(a)},b.isFunction=function(a){if(!a)return!1;return e.call(a)==="[object Function]"||b.isIE&&typeof a!="string"&&f.test(""+a)},b.isAncestor=function(a,b){for(var c=a;c;c=c.parentNode)if(c==b)return!0;return!1},b.fixEvent=function(a){return jQuery.event.fix(a||window.event)},b.fireEvent=function(a,b){if(document.createEvent){var c=document.createEvent("Events");c.initEvent(b,!0,!1);return!a.dispatchEvent(c)}},b.cancelEvent=function(a){var c=b.fixEvent(a);c.stopPropagation(),c.preventDefault()},b.addEventListener=function(a,b,c,d){d=d||!1,a.addEventListener?a.addEventListener(b,c,d):a.attachEvent("on"+b,c)},b.removeEventListener=function(a,b,c,d){d=d||!1,a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent("on"+b,c)},b.isLeftClick=function(a){return a.button==0&&b.noKeyModifiers(a)},b.noKeyModifiers=function(a){return!a.ctrlKey&&!a.shiftKey&&!a.altKey&&!a.metaKey},b.isControlClick=function(a){return a.button==0&&b.isControl(a)},b.isShiftClick=function(a){return a.button==0&&b.isShift(a)},b.isControl=function(a){return(a.metaKey||a.ctrlKey)&&!a.shiftKey&&!a.altKey},b.isAlt=function(a){return a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey},b.isAltClick=function(a){return a.button==0&&b.isAlt(a)},b.isControlShift=function(a){return(a.metaKey||a.ctrlKey)&&a.shiftKey&&!a.altKey},b.isShift=function(a){return a.shiftKey&&!a.metaKey&&!a.ctrlKey&&!a.altKey},b.inflateRect=function(a,b,c){return{top:a.top-c,left:a.left-b,height:a.height+2*c,width:a.width+2*b}},b.pointInRect=function(a,b,c){return c>=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;d<a.length;++d)c.push(b(a[d]));else for(var d=0;d<a.length;++d)c.push(a[d]);return c},b.arrayInsert=function(a,b,c){for(var d=0;d<c.length;++d)a.splice(d+b,0,c[d]);return a},b.remove=function(a,b){for(var c=0;c<a.length;++c)if(a[c]==b){a.splice(c,1);return!0}return!1},b.formatSize=function(a){var b=1;b=b>2?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;d<c.length;d++){var e=c[d].toString();a=a.replace("%S",e)}return a},b.parseISO8601=function(a){var c=b.fromISOString(a);return c?c.getTime():null},b.fromISOString=function(a){if(!a)return null;var b=/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,c=new RegExp(b),d=a.toString().match(new RegExp(b));if(!d)return null;var e=new Date;e.setUTCDate(1),e.setUTCFullYear(parseInt(d[1],10)),e.setUTCMonth(parseInt(d[3],10)-1),e.setUTCDate(parseInt(d[5],10)),e.setUTCHours(parseInt(d[7],10)),e.setUTCMinutes(parseInt(d[9],10)),e.setUTCSeconds(parseInt(d[11],10)),d[12]?e.setUTCMilliseconds(parseFloat(d[12])*1e3):e.setUTCMilliseconds(0);if(d[13]!="Z"){var f=d[15]*60+parseInt(d[17],10);f*=d[14]=="-"?-1:1,e.setTime(e.getTime()-f*60*1e3)}return e},b.toISOString=function(a){function b(a,b){b||(b=2);var c=new String(a);while(c.length<b)c="0"+c;return c}var c=a.getUTCFullYear()+"-"+b(a.getMonth()+1)+"-"+b(a.getDate())+"T"+b(a.getHours())+":"+b(a.getMinutes())+":"+b(a.getSeconds())+"."+b(a.getMilliseconds(),3),d=a.getTimezoneOffset(),e=Math.floor(d/60),f=Math.floor(d%60),g=(d>0?"-":"+")+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<c)return!1;var e={encodedContent:a.substr(d+1)},f=a.substr(c+1,d),g=f.split(";");for(var h=0;h<g.length;h++){var i=g[h].split("=");i.length==2&&(e[i[0]]=i[1])}if(e.hasOwnProperty("fileName")){var j=decodeURIComponent(e.fileName),k=b.splitURLTrue(j);if(e.hasOwnProperty("baseLineNumber")){e.path=k.path,e.line=e.baseLineNumber;var l=decodeURIComponent(e.encodedContent.substr(0,200)).replace(/\s*$/,"");e.name="eval->"+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;d<c.length;d++){var e=c[d].split("=");if(e[0]==a)return unescape(e[1])}return null},b.getURLParameters=function(a){var b=[],c=window.location.search.substring(1),d=c.split("&");for(var e=0;e<d.length;e++){var f=d[e].split("=");f[0]==a&&b.push(unescape(f[1]))}return b},b.parseURLParams=function(a){var c=a?a.indexOf("?"):-1;if(c==-1)return[];var d=a.substr(c+1),e=d.lastIndexOf("#");e!=-1&&(d=d.substr(0,e));if(!d)return[];return b.parseURLEncodedText(d)},b.parseURLEncodedText=function(a,c){function f(a){try{return decodeURIComponent(a)}catch(b){return decodeURIComponent(unescape(a))}}var d=25e3,e=[];if(a=="")return e;a=a.replace(/\+/g," ");var g=a.split("&");for(var h=0;h<g.length;++h)try{var i=g[h].indexOf("=");if(i!=-1){var j=g[h].substring(0,i),k=g[h].substring(i+1);k.length>d&&!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<arguments.length;++c){var d=arguments[c],e=a.firstChild;a=null;for(;e;e=e.nextSibling)if(b.hasClass(e,d)){a=e;break}}return a},b.eraseNode=function(a){while(a.lastChild)a.removeChild(a.lastChild)},b.clearNode=function(a){a.innerHTML=""},b.hasClass=function(a,b){if(a&&a.nodeType==1){for(var c=1;c<arguments.length;++c){var b=arguments[c],d=a.className;if(!d||d.indexOf(b+" ")==-1)return!1}return!0}return!1},b.setClass=function(a,c){a&&!b.hasClass(a,c)&&(a.className+=" "+c+" ")},b.removeClass=function(a,b){if(a&&a.className){var c=a.className.indexOf(b);if(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;h<g.length;++h){var i=g[h];while(i.length>f){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("<pre>"),e.push(c?l:b.escapeHTML(l)),c||e.push("</pre>")}c||e.push("<pre>"),e.push(c?i:b.escapeHTML(i)),c||e.push("</pre>")}return e.join(c?"\n":"")},b.insertWrappedText=function(a,c,d){c.innerHTML="<pre>"+b.wrapText(a,d)+"</pre>"},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"&lt;";case">":return"&gt;";case"&":return"&amp;";case"'":return"&#39;";case'"':return"&quot;"}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;f<a.length;f++)if(!(c=k(a[f],b)).length)break;if(c.length)return c}else if(typeof a=="object"){var h=d;d=[],e(b,a,g);var i=d;d=h;return i}}return[]}function j(a){d.push({property:g,message:a})}var i;g+=g?typeof h=="number"?"["+h+"]":typeof h=="undefined"?"":"."+h:h;if((typeof b!="object"||b instanceof Array)&&(g||typeof b!="function")){typeof b=="function"?a instanceof b||j("is not an instance of the class/constructor "+b.name):b&&j("Invalid schema/property definition "+b);return null}c&&b.readonly&&j("is a readonly field, it can not be changed"),b["extends"]&&e(a,b["extends"],g,h);if(a===undefined)b.optional||j("is missing and it is not optional");else{d=d.concat(k(b.type,a)),b.disallow&&!k(b.disallow,a).length&&j(" disallowed value was matched");if(a!==null){if(a instanceof Array){if(b.items)if(b.items instanceof Array)for(h=0,i=a.length;h<i;h++)d.concat(e(a[h],b.items[h],g,h));else for(h=0,i=a.length;h<i;h++)d.concat(e(a[h],b.items,g,h));b.minItems&&a.length<b.minItems&&j("There must be a minimum of "+b.minItems+" in the array"),b.maxItems&&a.length>b.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.length<b.minLength&&j("must be at least "+b.minLength+" characters long"),typeof b.minimum!==undefined&&typeof a==typeof b.minimum&&b.minimum>a&&j("must have a minimum value of "+b.minimum),typeof b.maximum!==undefined&&typeof a==typeof b.maximum&&b.maximum<a&&j("must have a maximum value of "+b.maximum);if(b["enum"]){var l=b["enum"];i=l.length;var m;for(var n=0;n<i;n++)if(l[n]===a){m=1;break}m||j("does not have a value in the enumeration "+l.join(", "))}typeof b.maxDecimal=="number"&&a.toString().match(new RegExp("\\.[0-9]{"+(b.maxDecimal+1)+",}"))&&j("may only have "+b.maxDecimal+" digits of decimal places")}}return null}var d=[];b&&e(a,b,"",c||""),!c&&a&&a.$schema&&e(a,a.$schema,"","");return{valid:!d.length,errors:d}}};return a}),require.def("preview/ref",["core/lib"],function(a){var b={resolveJson:function(b,c){function n(o,p,q,r,s){var t,u,v=d in o?o[d]:q;v!==undefined&&(v=(e+v).replace(k,"$2$3"));var w=s||o;if(v!==undefined){f&&(o.__id=v),c.schemas&&!(o instanceof Array)&&(u=v.match(/^(.+\/)[^\.\[]*$/))&&(r=c.schemas[u[1]]);if(g[v]&&o instanceof Array==g[v]instanceof Array)w=g[v],delete w.$ref,t=!0;else{var x=r&&r.prototype;x&&(m.prototype=x,w=new m)}g[v]=w,h&&(h[v]=c.time)}var y=r&&r.properties,z=o.length;for(var A in o){if(A==z)break;if(o.hasOwnProperty(A)){u=o[A];var B=y&&y[A];if(B&&B.format=="date-time"&&typeof u=="string")u=a.fromISOString(u);else if(typeof u=="object"&&u&&!(u instanceof Date)){i=u.$ref;if(i){delete o[A];var C=i.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);if(i=C[1]=="$"||C[1]=="this"||C[1]==""?b:g[(e+C[1]).replace(k,"$2$3")])C[3]&&C[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(a,b,c,d,e){i=i&&i[c?c.replace(/[\"\'\\]/,""):e]});if(i)u=i;else if(p)u=n(u,!1,u.$ref,B),u._loadObject=c.loader;else{var D;D||j.push(w),D=!0}}else p||(u=n(u,j==o,v&&l(v,A),B,w!=o&&typeof w[A]=="object"&&w[A]))}o[A]=u;if(w!=o&&!w.__isDirty){var E=w[A];w[A]=u,t&&u!==E&&!w._loadObject&&!(u instanceof Date&&E instanceof Date&&u.getTime()==E.getTime())&&(typeof u!="function"||typeof E!="function"||u.toString()!=E.toString())&&g.onUpdate&&g.onUpdate(w,A,E,u)}}}if(t){for(A in w)if(!w.__isDirty&&w.hasOwnProperty(A)&&!o.hasOwnProperty(A)&&A!="__id"&&A!="__clientId"&&!(w instanceof Array&&isNaN(A))){g.onUpdate&&A!="_loadObject"&&A!="_idAttr"&&g.onUpdate(w,A,w[A],undefined),delete w[A];while(w instanceof Array&&w.length&&w[w.length-1]===undefined)w.length--}}else g.onLoad&&g.onLoad(w);return w}c=c||{};var d=c.idAttribute||"id",e=c.idPrefix||"",f=c.assignAbsoluteIds,g=c.index||{},h=c.timeStamps,i,j=[],k=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,l=this._addProp,m=function(){};b&&typeof b=="object"&&(b=n(b,!1,c.defaultId),n(j,!1));return b},_addProp:function(a,b){return a+(a.match(/#/)?a.length==1?"":".":"#")+b}};return b}),require.def("preview/harSchema",[],function(){function r(){}var a=/^(\d{4})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,b={logType:{id:"logType",description:"HTTP Archive structure.",type:"object",properties:{log:{type:"object",properties:{version:{type:"string"},creator:{$ref:"creatorType"},browser:{$ref:"browserType"},pages:{type:"array",optional:!0,items:{$ref:"pageType"}},entries:{type:"array",items:{$ref:"entryType"}},comment:{type:"string",optional:!0}}}}}},c={creatorType:{id:"creatorType",description:"Name and version info of the log creator app.",type:"object",properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string",optional:!0}}}},d={browserType:{id:"browserType",description:"Name and version info of used browser.",type:"object",optional:!0,properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string",optional:!0}}}},e={pageType:{id:"pageType",description:"Exported web page",optional:!0,properties:{startedDateTime:{type:"string",format:"date-time",pattern:a},id:{type:"string",unique:!0},title:{type:"string"},pageTimings:{$ref:"pageTimingsType"},comment:{type:"string",optional:!0}}}},f={pageTimingsType:{id:"pageTimingsType",description:"Timing info about page load",properties:{onContentLoad:{type:"number",optional:!0,min:-1},onLoad:{type:"number",optional:!0,min:-1},comment:{type:"string",optional:!0}}}},g={entryType:{id:"entryType",description:"Request and Response related info",optional:!0,properties:{pageref:{type:"string",optional:!0},startedDateTime:{type:"string",format:"date-time",pattern:a},time:{type:"number",min:0},request:{$ref:"requestType"},response:{$ref:"responseType"},cache:{$ref:"cacheType"},timings:{$ref:"timingsType"},serverIPAddress:{type:"string",optional:!0},connection:{type:"string",optional:!0},comment:{type:"string",optional:!0}}}},h={requestType:{id:"requestType",description:"Monitored request",properties:{method:{type:"string"},url:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookieType"}},headers:{type:"array",items:{$ref:"recordType"}},queryString:{type:"array",items:{$ref:"recordType"}},postData:{$ref:"postDataType"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string",optional:!0}}}},j={recordType:{id:"recordType",description:"Helper name-value pair structure.",properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string",optional:!0}}}},k={responseType:{id:"responseType",description:"Monitored Response.",properties:{status:{type:"integer"},statusText:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookieType"}},headers:{type:"array",items:{$ref:"recordType"}},content:{$ref:"contentType"},redirectURL:{type:"string"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string",optional:!0}}}},l={cookieType:{id:"cookieType",description:"Cookie description.",properties:{name:{type:"string"},value:{type:"string"},path:{type:"string",optional:!0},domain:{type:"string",optional:!0},expires:{type:"string",optional:!0},httpOnly:{type:"boolean",optional:!0},secure:{type:"boolean",optional:!0},comment:{type:"string",optional:!0}}}},m={postDataType:{id:"postDataType",description:"Posted data info.",optional:!0,properties:{mimeType:{type:"string"},text:{type:"string",optional:!0},params:{type:"array",optional:!0,properties:{name:{type:"string"},value:{type:"string",optional:!0},fileName:{type:"string",optional:!0},contentType:{type:"string",optional:!0},comment:{type:"string",optional:!0}}},comment:{type:"string",optional:!0}}}},n={contentType:{id:"contentType",description:"Response content",properties:{size:{type:"integer"},compression:{type:"integer",optional:!0},mimeType:{type:"string"},text:{type:"string",optional:!0},encoding:{type:"string",optional:!0},comment:{type:"string",optional:!0}}}},o={cacheType:{id:"cacheType",description:"Info about a response coming from the cache.",properties:{beforeRequest:{$ref:"cacheEntryType"},afterRequest:{$ref:"cacheEntryType"},comment:{type:"string",optional:!0}}}},p={cacheEntryType:{id:"cacheEntryType",optional:!0,description:"Info about cache entry.",properties:{expires:{type:"string",optional:"true"},lastAccess:{type:"string"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string",optional:!0}}}},q={timingsType:{id:"timingsType",description:"Info about request-response timing.",properties:{dns:{type:"number",optional:!0,min:-1},connect:{type:"number",optional:!0,min:-1},blocked:{type:"number",optional:!0,min:-1},send:{type:"number",min:-1},wait:{type:"number",min:-1},receive:{type:"number",min:-1},ssl:{type:"number",optional:!0,min:-1},comment:{type:"string",optional:!0}}}};r.prototype={registerType:function(){var a=function(a,b){for(var c in b)b.hasOwnProperty(c)&&c!="prototype"&&(a[c]=b[c])},b=this;for(i=0;i<arguments.length;i+=1)a(b,arguments[i])}};var s=new r;s.registerType(b,c,d,e,f,g,h,j,k,m,n,o,p,q);return s}),require.def("core/cookies",["core/lib"],function(a){var b={getCookie:function(b){var c=document.cookie.split(";");for(var d=0;d<c.length;d++){var e=c[d].split("=");if(a.trim(e[0])==b)return e[1].length?unescape(a.trim(e[1])):null}},setCookie:function(a,b,c,d,e,f){var g=new Date;g.setTime(g.getTime()),c&&(c=c*1e3*60*60*24);var h=new Date(g.getTime()+c);document.cookie=a+"="+escape(b)+(c?";expires="+h.toGMTString():"")+(d?";path="+d:"")+(e?";domain="+e:"")+(f?";secure":"")},removeCookie:function(a,b,c){this.getCookie(a)&&(document.cookie=a+"="+(b?";path="+b:"")+(c?";domain="+c:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT")},toggleCookie:function(a){var b=this.getBooleanCookie(a);this.setCookie(a,!b)},getBooleanCookie:function(a){var b=this.getCookie(a);return!b||b=="false"?!1:!0},setBooleanCookie:function(a,b){this.setCookie(a,b?"true":"false")}};return b}),function($){if(!JSON)var JSON={};(function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i==="object"&&typeof i.toJSON==="function"&&(i=i.toJSON(a)),typeof rep==="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep==="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d==="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b==="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}typeof Date.prototype.toJSON!=="function"&&(Date.prototype.toJSON=function(a){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!=="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c==="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c==="string"&&(indent=c);rep=b;if(b&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!=="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e==="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})})(),$.toJSON=function(a,b){typeof b=="undefined"&&(b=null);return JSON.parse(a,b)},$.jSONToString=function(a,b,c){typeof b=="undefined"&&(b=null),typeof c=="undefined"&&(c=null);return JSON.stringify(a,b,c)}}(jQuery),define("jquery-plugins/jquery.json",function(){}),define("nls/harModel",{root:{validationType:"HAR Validation",validationSumTimeError:"Sum of request timings doesn't correspond to the total value: %S (request.time: %S vs. sum: %S), request#: %S, parent page: %S",validationNegativeTimeError:"Negative time is not allowed: %S, request#: %S, parent page: %S"}}),require.def("preview/harModel",["core/lib","preview/jsonSchema","preview/ref","preview/harSchema","core/cookies","core/trace","i18n!nls/harModel","jquery-plugins/jquery.json"],function(a,b,c,d,e,f,g){function i(){var a={};for(var b in this)b!="toJSON"&&(a[b]=this[b]);if(!this.text)return a;a.text=Array.map(this.text,function(a){var b=a.charCodeAt(0);if(b>=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(d<e)return-1;if(d>e)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;c<b.log.pages.length;c++)this.importPage(b.log.pages[c],b.log.entries)}else this.input=a.cloneJSON(b);return this.input}f.error("HarModel.append; Trying to append null input!")}},getPages:function(){if(!this.input)return[];return this.input.log.pages?this.input.log.pages:[]},getFirstPage:function(){var a=this.getPages();return a.length>0?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;e<b.length;e++){var f=b[e];f.pageref==d&&(f.pageref=c,this.input.log.entries.push(f))}},getUniquePageID:function(a){var b=this.input.log.pages,c={};for(var d=0;d<b.length;d++)c[b[d].id]=!0;if(!c[a])return a;var e=1;while(!0){var f=a+e;if(!c[f])return f;e++}},toJSON:function(a){a||(a=this.input);if(!a)return"";var b=this.input.log.entries;for(var c=0;c<b.length;c++){var d=b[c];d.response.content.text&&(d.response.content.toJSON=i)}var e=$.jSONToString(this.input,null,"\t"),f=e.replace(/\\\\u/g,"\\u");return f},getSize:function(a){a||(a=this.input);if(!a)return 0;var b=dojo.toJson(a,!0);return b.length}},h.parse=function(a,e){var f=a;try{typeof a==="string"&&(f=jQuery.parseJSON(a))}catch(g){console.exception("HarModel.parse; EXCEPTION",g);throw{errors:[{message:"Failed to parse JSON",property:"JSON evaluation"}]}}if(!e)return f;var h=c.resolveJson(d),i=b.validate(f,h.logType);if(i.valid){this.validateRequestTimings(f);return f}throw i},h.getPageEntries=function(a,b){var c=[],d=a.log.entries;if(!d)return c;for(var e=0;e<d.length;e++){var f=d[e];!f.pageref&&!b&&c.push(f),b&&f.pageref==b.id&&c.push(f)}return c},h.getParentPage=function(a,b){var c=a.log.pages;if(!c)return null;for(var d=0;d<c.length;d++)if(c[d].id==b.pageref)return c[d];return null},h.validateRequestTimings=function(b){var c=[],d=b.log.entries;for(var e=0;e<d.length;e++){var f=d[e],h=f.timings;if(h.blocked<-1||h.connect<-1||h.dns<-1||h.receive<-1||h.send<-1||h.wait<-1){var i=a.formatString(g.validationNegativeTimeError,f.request.url,e,f.pageref);c.push({input:b,file:f,message:i,property:g.validationType})}}if(c.length)throw{errors:c,input:b}},h.Loader={run:function(b,c){var d=a.getURLParameter("baseUrl");d&&d[d.length-1]!="/"&&(d+="/");var e=a.getURLParameters("path"),f=a.getURLParameter("callback"),g=a.getURLParameters("inputUrl"),h=[];for(var i in e)h.push(d?d+e[i]:e[i]);for(var i in g)h.push(g[i]);if((d||g.length>0)&&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;d<this.listeners.length;d++){var e=this.listeners[d];e.onUpdateBody&&e.onUpdateBody(this,c._body)}}},render:function(a){this.element=TabViewTempl.tag.replace({tabView:this},a,TabViewTempl),Lib.setClass(this.element,this.id),this.showTabBar(this.tabBarVisibility);for(var b in this.tabs){var c=this.tabs[b],d=c.tabHeaderTag?c.tabHeaderTag:TabViewTempl.tabHeaderTag,e=c.tabBodyTag?c.tabBodyTag:TabViewTempl.tabBodyTag;try{c._header=d.append({tab:c},Lib.$(a,"tabBar")),c._body=e.append({tab:c},Lib.$(a,"tabBodies"))}catch(f){Trace.exception("TabView.appendTab; Exception ",f)}}return this.element}},TabView.Tab=function(){},TabView.Tab.prototype={invalidate:function(){this._updated=!1},select:function(){this.tabView.selectTabByName(this.id)}};return TabView}}),require.def("core/dragdrop",["core/lib"],function(a){function d(a){return isNaN(window.scrollX)?new c(a.clientX+document.documentElement.scrollLeft+document.body.scrollLeft,a.clientY+document.documentElement.scrollTop+document.body.scrollTop):new c(a.clientX+window.scrollX,a.clientY+window.scrollY)}function c(a,b){this.x=a,this.y=b,this.Add=function(a){var b=new c(this.x,this.y);a!=null&&(isNaN(a.x)||(b.x+=a.x),isNaN(a.y)||(b.y+=a.y));return b},this.Subtract=function(a){var b=new c(this.x,this.y);a!=null&&(isNaN(a.x)||(b.x-=a.x),isNaN(a.y)||(b.y-=a.y));return b},this.Bound=function(a,b){var c=this.Max(a);return c.Min(b)},this.Check=function(){var a=new c(this.x,this.y);isNaN(a.x)&&(a.x=0),isNaN(a.y)&&(a.y=0);return a},this.Apply=function(a){typeof a=="string"&&(a=document.getElementById(a));a&&(isNaN(this.x)||(a.style.left=this.x+"px"),isNaN(this.y)||(a.style.top=this.y+"px"))}}function b(b,c){this.element=b,this.handle=b,this.callbacks=c,this.cursorStartPos=null,this.cursorLastPos=null,this.dragging=!1,this.onDragStart=a.bind(this.onDragStart,this),this.onDragOver=a.bind(this.onDragOver,this),this.onDrop=a.bind(this.onDrop,this),a.addEventListener(this.element,"mousedown",this.onDragStart,!1),this.active=!0}b.prototype={onDragStart:function(b){var c=a.fixEvent(b);this.dragging||(this.callbacks.onDragStart&&this.callbacks.onDragStart(this),this.dragging=!0,this.cursorStartPos=d(c),this.cursorLastPos=this.cursorStartPos,a.addEventListener(this.element.ownerDocument,"mousemove",this.onDragOver,!1),a.addEventListener(this.element.ownerDocument,"mouseup",this.onDrop,!1),a.cancelEvent(c))},onDragOver:function(b){if(this.dragging){var c=a.fixEvent(b);a.cancelEvent(c);var e=d(c),e=e.Subtract(this.cursorStartPos);if(this.cursorLastPos.x==e.x&&this.cursorLastPos.y==e.y)return;if(this.callbacks.onDragOver!=null){var f=this.callbacks.onDragOver(e,this);this.cursorLastPos=e}}},onDrop:function(b){if(this.dragging){var c=a.fixEvent(b);a.cancelEvent(c),this.dragStop()}},dragStop:function(){this.dragging&&(a.removeEventListener(this.element.ownerDocument,"mousemove",this.onDragOver,!1),a.removeEventListener(this.element.ownerDocument,"mouseup",this.onDrop,!1),this.cursorStartPos=null,this.cursorLastPos=null,this.callbacks.onDrop!=null&&this.callbacks.onDrop(this),this.dragging=!1)},destroy:function(){a.removeEventListener(this.element,"mousedown",this.onDragStart,!1),this.active=!1,this.dragging&&this.dragStop()}};var e={};e.Tracker=b;return e}),require.def("syntax-highlighter/shCore",[],function(){var a={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:'<html><head><title>About...</title></head><body class="dp-about"><table cellspacing="0"><tr><td class="copy"><p class="title">dp.SyntaxHighlighter</div><div class="para">Version: {V}</p><p><a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/syntaxhighlighter</a></p>&copy;2004-2007 Alex Gorbatchev.</td></tr><tr><td class="footer"><input type="button" class="close" value="OK" onClick="window.close()"/></td></tr></table></body></html>'},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(/</g,"&lt;"),e=window.open("","_blank","width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0");e.document.write('<textarea style="width:99%;height:99%">'+d+"</textarea>"),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(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/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='<embed src="'+a.sh.ClipboardSwf+'" FlashVars="clipboard='+encodeURIComponent(d)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>'}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('<div class="'+c.div.className.replace("collapsed","")+' printing">'+c.div.innerHTML+"</div>"),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+='<a href="#" onclick="dp.sh.Toolbar.Command(\''+d+"',this);return false;\">"+e.label+"</a>"}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<c.length;d++)c[d].rel.toLowerCase()=="stylesheet"&&a.write('<link type="text/css" rel="stylesheet" href="'+c[d].href+'"></link>')},a.sh.Utils.FixForBlogger=function(b){return a.sh.isBloggerMode==!0?b.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/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.index<b.index)return-1;if(a.index>b.index)return 1;if(a.length<b.length)return-1;if(a.length>b.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,"&nbsp;"),a=a.replace(/</g,"&lt;"),a=a.replace(/\n/gm,"&nbsp;<br>");if(b!=null)if(/br/gi.test(a)){var d=a.split("&nbsp;<br>");for(var e=0;e<d.length;e++)c=this.CreateElement("SPAN"),c.className=b,c.innerHTML=d[e],this.div.appendChild(c),e+1<d.length&&this.div.appendChild(this.CreateElement("BR"))}else c.className=b,c.innerHTML=a,this.div.appendChild(c);else c.innerHTML=a,this.div.appendChild(c)}},a.sh.Highlighter.prototype.IsInside=function(a){if(a==null||a.length==0)return!1;for(var b=0;b<this.matches.length;b++){var c=this.matches[b];if(c==null)continue;if(a.index>c.index&&a.index<c.index+c.length)return!0}return!1},a.sh.Highlighter.prototype.ProcessRegexList=function(){for(var a=0;a<this.regexList.length;a++)this.GetMatches(this.regexList[a].regex,this.regexList[a].css)},a.sh.Highlighter.prototype.ProcessSmartTabs=function(a){function g(a,b){if(a.indexOf(e)==-1)return a;var c=0;while((c=a.indexOf(e))!=-1){var d=b-c%b;a=f(a,c,d)}return a}function f(a,b,c){var d=a.substr(0,b),e=a.substr(b+1,a.length),f="";for(var g=0;g<c;g++)f+=" ";return d+f+e}var b=a.split("\n"),c="",d=4,e="\t";for(var h=0;h<b.length;h++)c+=g(b[h],d)+"\n";return c},a.sh.Highlighter.prototype.SwitchToList=function(){var b=this.div.innerHTML.replace(/<(br)\/?>/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+="&middot;",g++);e.className="columns",e.appendChild(d),this.bar.appendChild(e)}for(var g=0,h=this.firstLine;g<c.length-1;g++,h++){var i=this.CreateElement("LI"),j=this.CreateElement("SPAN");i.className=g%2==0?"alt":"",j.innerHTML=c[g]+"&nbsp;",i.appendChild(j),this.ol.appendChild(i)}this.div.innerHTML=""},a.sh.Highlighter.prototype.Highlight=function(b){function f(a,b,c){return a.substr(b,c-b)}function e(b){var d=a.sh.Utils.FixForBlogger(b).split("\n"),e=[],f=new RegExp("^\\s*","g"),g=1e3;for(var h=0;h<d.length&&g>0;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;h<d.length;h++)d[h]=d[h].substr(g);return d.join("\n")}function d(a){return a.replace(/\n*$/,"").replace(/^\n*/,"")}function c(a){return a.replace(/^\s*(.*?)[\s\n]*$/g,"$1")}var g=0;b==null&&(b=""),this.originalCode=b,this.code=d(e(b)),this.div=this.CreateElement("DIV"),this.bar=this.CreateElement("DIV"),this.ol=this.CreateElement("OL"),this.matches=[],this.div.className="dp-highlighter",this.div.highlighter=this,this.bar.className="bar",this.ol.start=this.firstLine,this.CssClass!=null&&(this.ol.className=this.CssClass),this.collapse&&(this.div.className+=" collapsed"),this.noGutter&&(this.div.className+=" nogutter"),this.tabsToSpaces==!0&&(this.code=this.ProcessSmartTabs(this.code)),this.ProcessRegexList();if(this.matches.length==0)this.AddBit(this.code,null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol);else{this.matches=this.matches.sort(a.sh.Highlighter.SortCallback);for(var h=0;h<this.matches.length;h++)this.IsInside(this.matches[h])&&(this.matches[h]=null);for(var h=0;h<this.matches.length;h++){var i=this.matches[h];if(i==null||i.length==0)continue;this.AddBit(f(this.code,g,i.index),null),this.AddBit(i.value,i.css),g=i.index+i.length}this.AddBit(this.code.substr(g),null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol)}},a.sh.Highlighter.prototype.GetKeywords=function(a){return"\\b"+a.replace(/ /g,"\\b|\\b")+"\\b"},a.sh.BloggerMode=function(){a.sh.isBloggerMode=!0},a.sh.HighlightAll=function(b,c,d,e,f,g){function k(a,b,c){var d=document.getElementsByTagName(c);for(var e=0;e<d.length;e++)d[e].getAttribute("name")==b&&a.push(d[e])}function j(a,b,c){var d=new RegExp("^"+a+"\\[(\\w+)\\]$","gi"),e=null;for(var f=0;f<b.length;f++)if((e=d.exec(b[f]))!=null)return e[1];return c}function i(a,b){for(var c=0;c<b.length;c++)if(b[c]==a)return!0;return!1}function h(){var a=arguments;for(var b=0;b<a.length;b++){if(a[b]==null)continue;if(typeof a[b]=="string"&&a[b]!="")return a[b]+"";if(typeof a[b]=="object"&&a[b].value!="")return a[b].value+""}return null}var l=[],m=null,n={},o="innerHTML";typeof b=="string"?(k(l,b,"pre"),k(l,b,"textarea")):l.push(b);if(l.length!=0){for(var p in a.sh.Brushes){var q=a.sh.Brushes[p].Aliases;if(q==null)continue;for(var r=0;r<q.length;r++)n[q[r]]=p}for(var r=0;r<l.length;r++){var s=l[r],t=h(s.attributes["class"],s.className,s.attributes.language,s.language),u="";if(t==null)continue;t=t.split(":"),u=t[0].toLowerCase();if(n[u]==null)continue;m=new a.sh.Brushes[n[u]],s.style.display="none",m.noGutter=c==null?i("nogutter",t):!c,m.addControls=d==null?!i("nocontrols",t):d,m.collapse=e==null?i("collapse",t):e,m.showColumns=g==null?i("showcolumns",t):g;var v=document.getElementsByTagName("head")[0];if(m.Style&&v){var w=document.createElement("style");w.setAttribute("type","text/css");if(w.styleSheet)w.styleSheet.cssText=m.Style;else{var x=document.createTextNode(m.Style);w.appendChild(x)}v.appendChild(w)}m.firstLine=f==null?parseInt(j("firstline",t,1)):f,m.Highlight(s[o]),m.source=s,s.parentNode.insertBefore(m.div,s)}}},a.sh.Brushes.JScript=function(){var b="abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with";this.regexList=[{regex:a.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:a.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:a.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:a.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(b),"gm"),css:"keyword"}],this.CssClass="dp-c"},a.sh.Brushes.JScript.prototype=new a.sh.Highlighter,a.sh.Brushes.JScript.Aliases=["js","jscript","javascript"];return a}),require.def("preview/requestBody",["domplate/domplate","i18n!nls/requestBody","core/lib","core/cookies","domplate/tabView","core/dragdrop","syntax-highlighter/shCore"],function(Domplate,Strings,Lib,Cookies,TabView,DragDrop,dp){with(Domplate){function RequestBody(){}RequestBody.prototype=domplate({render:function(a,b){var c=new TabView("requestBody");b.response.headers.length>0&&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;c<d;c++){var e=a[c];if(typeof e=="string"&&e.indexOf("-")==0){b.push({tag:this.separatorTag});continue}e=Lib.extend(e,{}),e.type=e.type||"",e.value=e.value||"";var f=e.type;e.tag=this.itemTag;var g=e.className||"";g+="popupMenuOption ",f=="checkbox"?(g+="popupMenuCheckBox ",e.tag=this.checkBoxTag):f=="radio"?(g+="popupMenuRadioButton ",e.tag=this.radioButtonTag):f=="group"?(g+="popupMenuGroup ",e.tag=this.groupTag):f=="shortcut"&&(g+="popupMenuShortcut ",e.tag=this.shortcutTag),e.checked?g+="popupMenuChecked ":e.selected&&(g+="popupMenuRadioSelected "),e.disabled&&(g+="popupMenuDisabled "),e.className=g,e.label=e.label,b.push(e)}return b}});function Menu(a){if(!a.element){a.getItems&&(a.items=a.getItems()),a.items[0]=="-"&&a.items.shift(),a.items[a.items.length-1]=="-"&&a.items.pop();var b=Lib.getBody(document);a.element=MenuPlate.tag.append({object:a},b,MenuPlate)}Lib.append(this,a),typeof this.element=="string"?(this.id=this.element,this.element=$(this.id)):this.id&&(this.element.id=this.id),this.elementStyle=this.element.style,this.isVisible=!1,this.handleMouseDown=Lib.bind(this.handleMouseDown,this),this.handleMouseOver=Lib.bind(this.handleMouseOver,this),this.handleMouseOut=Lib.bind(this.handleMouseOut,this),this.handleWindowMouseDown=Lib.bind(this.handleWindowMouseDown,this)}var menuMap={};Menu.prototype=Lib.extend(Controller,{initialize:function(){Controller.initialize.call(this),this.addController([this.element,"mousedown",this.handleMouseDown],[this.element,"mouseover",this.handleMouseOver])},destroy:function(){this.hide(),this.parentMenu&&(this.parentMenu.childMenu=null),this.element.parentNode.removeChild(this.element),this.element=null,this.elementStyle=null,this.parentMenu=null,this.parentTarget=null},shutdown:function(){Controller.shutdown.call(this)},showPopup:function(a){var b=Lib.isIE6?1:-4,c=Lib.getElementBox(a),d={top:0,left:0};this.show(c.left+b-d.left,c.top+c.height-5-d.top)},show:function(a,b){this.initialize();if(!this.isVisible){a=a||0,b=b||0;if(this.parentMenu){var c=this.parentMenu.childMenu;c&&c!=this&&c.destroy(),this.parentMenu.childMenu=this}else Lib.addEventListener(document,"mousedown",this.handleWindowMouseDown);this.elementStyle.display="block",this.elementStyle.visibility="hidden";var d=Lib.getWindowSize();a=Math.min(a,d.width-this.element.clientWidth-10),a=Math.max(a,0),b=Math.min(b,d.height-this.element.clientHeight-10),b=Math.max(b,0),this.elementStyle.left=a+"px",this.elementStyle.top=b+"px",this.elementStyle.visibility="visible",this.isVisible=!0,Lib.isFunction(this.onShow)&&this.onShow.apply(this,arguments)}},hide:function(){this.clearHideTimeout(),this.clearShowChildTimeout();this.isVisible&&(this.elementStyle.display="none",this.childMenu&&(this.childMenu.destroy(),this.childMenu=null),this.parentTarget&&Lib.removeClass(this.parentTarget,"popupMenuGroupSelected"),this.isVisible=!1,this.shutdown(),Lib.isFunction(this.onHide)&&this.onHide.apply(this,arguments))},showChildMenu:function(a){var b=a.getAttribute("child"),c=this,a=a;this.showChildTimeout=window.setTimeout(function(){var d=Lib.getElementBox(a),e=menuMap.hasOwnProperty(b)?menuMap[b]:{element:$(b)},f=new Menu(Lib.extend(e,{parentMenu:c,parentTarget:a})),g=Lib.isIE6?-1:-6;f.show(d.left+d.width+g,d.top-6),Lib.setClass(a,"popupMenuGroupSelected")},350)},clearHideTimeout:function(){this.hideTimeout&&(window.clearTimeout(this.hideTimeout),delete this.hideTimeout)},clearShowChildTimeout:function(){this.showChildTimeout&&(window.clearTimeout(this.showChildTimeout),this.showChildTimeout=null)},handleMouseDown:function(a){Lib.cancelEvent(a,!0);var b=this;while(b.parentMenu)b=b.parentMenu;var c=a.target||a.srcElement;c=Lib.getAncestorByClass(c,"popupMenuOption");if(!c||Lib.hasClass(c,"popupMenuGroup"))return!1;if(c&&!Lib.hasClass(c,"popupMenuDisabled")){var d=c.getAttribute("type");if(d=="checkbox"){var e=c.getAttribute("checked"),f=c.getAttribute("value"),g=Lib.hasClass(c,"popupMenuChecked");g?(Lib.removeClass(c,"popupMenuChecked"),c.setAttribute("checked","")):(Lib.setClass(c,"popupMenuChecked"),c.setAttribute("checked","true")),Lib.isFunction(this.onCheck)&&this.onCheck.call(this,c,f,!g)}if(d=="radiobutton"){var h=Lib.getElementsByClass(c.parentNode,"popupMenuRadioSelected"),i=c.getAttribute("group");for(var j=0,k=h.length;j<k;j++)radio=h[j],radio.getAttribute("group")==i&&(Lib.removeClass(radio,"popupMenuRadioSelected"),radio.setAttribute("selected",""));Lib.setClass(c,"popupMenuRadioSelected"),c.setAttribute("selected","true")}var l=null,m=c.command;Lib.isFunction(m)?l=m:typeof m=="string"&&(l=this[m]);var n=!0;l&&(n=l.call(this,c)!==!1),n&&b.hide()}return!1},handleWindowMouseDown:function(a){var b=a.target||a.srcElement;b=Lib.getAncestorByClass(b,"popupMenu"),b||(Lib.removeEventListener(document,"mousedown",this.handleWindowMouseDown),this.destroy())},handleMouseOver:function(a){this.clearHideTimeout(),this.clearShowChildTimeout();var b=a.target||a.srcElement;b=Lib.getAncestorByClass(b,"popupMenuOption");if(b){var c=this.childMenu;c&&(Lib.removeClass(c.parentTarget,"popupMenuGroupSelected"),c.parentTarget!=b&&c.isVisible&&(c.clearHideTimeout(),c.hideTimeout=window.setTimeout(function(){c.destroy()},300))),Lib.hasClass(b,"popupMenuGroup")&&this.showChildMenu(b)}}}),Lib.append(Menu,{register:function(a){menuMap[a.id]=a},check:function(a){Lib.setClass(a,"popupMenuChecked"),a.setAttribute("checked","true")},uncheck:function(a){Lib.removeClass(a,"popupMenuChecked"),a.setAttribute("checked","")},disable:function(a){Lib.setClass(a,"popupMenuDisabled")},enable:function(a){Lib.removeClass(a,"popupMenuDisabled")}});return Menu}}),require.def("preview/requestList",["domplate/domplate","core/lib","i18n!nls/requestList","preview/harModel","core/cookies","preview/requestBody","domplate/infoTip","domplate/popupMenu"],function(Domplate,Lib,Strings,HarModel,Cookies,RequestBody,InfoTip,Menu){with(Domplate){function RequestList(a){this.input=a,this.pageTimings=[],this.addPageTiming({name:"onContentLoad",classes:"netContentLoadBar",description:Strings.ContentLoad}),this.addPageTiming({name:"onLoad",classes:"netWindowLoadBar",description:Strings.WindowLoad}),InfoTip.addListener(this)}RequestList.columns=["url","status","type","domain","size","timeline"],RequestList.defaultColumns=["url","status","size","timeline"],RequestList.getVisibleColumns=function(){var a=Cookies.getCookie("previewCols");if(a){a=a.replace(/\+/g," "),a=unescape(a);return a.split(" ")}if(!a){var b=document.getElementById("content");if(b){a=b.getAttribute("previewCols");if(a)return a.split(" ")}}return Lib.cloneArray(RequestList.defaultColumns)},RequestList.setVisibleColumns=function(a,b){a||(a=RequestList.getVisibleColumns()),a.join&&(a=a.join(" "));var c=document.getElementById("content");c&&c.setAttribute("previewCols",a),b||Cookies.setCookie("previewCols",a)},RequestList.setVisibleColumns(),RequestList.prototype=domplate({tableTag:TABLE({"class":"netTable",cellpadding:0,cellspacing:0,onclick:"$onClick",_repObject:"$requestList"},TBODY(TR({"class":"netSizerRow"},TD({"class":"netHrefCol netCol",width:"20%"}),TD({"class":"netStatusCol netCol",width:"7%"}),TD({"class":"netTypeCol netCol",width:"7%"}),TD({"class":"netDomainCol netCol",width:"7%"}),TD({"class":"netSizeCol netCol",width:"7%"}),TD({"class":"netTimeCol netCol",width:"100%"}),TD({"class":"netOptionsCol netCol",width:"15px"})))),fileTag:FOR("file","$files",TR({"class":"netRow loaded",$isExpandable:"$file|isExpandable",$responseError:"$file|isError",$responseRedirect:"$file|isRedirect",$fromCache:"$file|isFromCache"},TD({"class":"netHrefCol netCol"},DIV({"class":"netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getHref"),DIV({"class":"netFullHrefLabel netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getFullHref")),TD({"class":"netStatusCol netCol"},DIV({"class":"netStatusLabel netLabel"},"$file|getStatus")),TD({"class":"netTypeCol netCol"},DIV({"class":"netTypeLabel netLabel"},"$file|getType")),TD({"class":"netDomainCol netCol"},DIV({"class":"netDomainLabel netLabel"},"$file|getDomain")),TD({"class":"netSizeCol netCol"},DIV({"class":"netSizeLabel netLabel"},"$file|getSize")),TD({"class":"netTimeCol netCol"},DIV({"class":"netTimelineBar"},"&nbsp;",DIV({"class":"netBlockingBar netBar"}),DIV({"class":"netResolvingBar netBar"}),DIV({"class":"netConnectingBar netBar"}),DIV({"class":"netSendingBar netBar"}),DIV({"class":"netWaitingBar netBar"}),DIV({"class":"netReceivingBar netBar"},SPAN({"class":"netTimeLabel"},"$file|getElapsedTime")))),TD({"class":"netOptionsCol netCol"},DIV({"class":"netOptionsLabel netLabel",onclick:"$onOpenOptions"})))),headTag:TR({"class":"netHeadRow"},TD({"class":"netHeadCol",colspan:7},DIV({"class":"netHeadLabel"},"$doc.rootFile.href"))),netInfoTag:TR({"class":"netInfoRow"},TD({"class":"netInfoCol",colspan:7})),summaryTag:TR({"class":"netRow netSummaryRow"},TD({"class":"netHrefCol netCol"},DIV({"class":"netCountLabel netSummaryLabel"},"-")),TD({"class":"netStatusCol netCol"}),TD({"class":"netTypeCol netCol"}),TD({"class":"netDomainCol netCol"}),TD({"class":"netTotalSizeCol netSizeCol netCol"},DIV({"class":"netTotalSizeLabel netSummaryLabel"},"0KB")),TD({"class":"netTotalTimeCol netTimeCol netCol"},DIV({"class":"",style:"width: 100%"},DIV({"class":"netCacheSizeLabel netSummaryLabel"},"(",SPAN("0KB"),SPAN(" "+Strings.fromCache),")"),DIV({"class":"netTimeBar"},SPAN({"class":"netTotalTimeLabel netSummaryLabel"},"0ms")))),TD({"class":"netOptionsCol netCol"})),getIndent:function(a){return 0},isError:function(a){var b=Math.floor(a.response.status/100);return b==4||b==5},isRedirect:function(a){return!1},isFromCache:function(a){return a.cache&&a.cache.afterRequest},getHref:function(a){var b=Lib.getFileName(this.getFullHref(a));return unescape(a.request.method+" "+b)},getFullHref:function(a){return unescape(a.request.url)},getStatus:function(a){var b=a.response.status>0?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<c.length;j++){var k=c[j];Lib.hasClass(e,"netInfoRow")&&(e=e.nextSibling),e.repObject=k,h||(h=Lib.parseISO8601(k.startedDateTime));var l=Lib.parseISO8601(k.startedDateTime),m=g?Lib.parseISO8601(g.getLastStartTime()):0,n=g?g.endTime:0,o=!1;f>=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.endTime<l+k.time)g.endTime=l+k.time;e=e.nextSibling}this.updateTimeStamps(b),this.updateTimeline(b),this.updateSummaries(b)},startPhase:function(a){var b=new Phase(a);this.phases.push(b);return b},calculateFileTimes:function(a,b,c){c!=b.phase&&(c=b.phase,this.phaseStartTime=c.startTime,this.phaseEndTime=c.endTime,this.phaseElapsed=this.phaseEndTime-c.startTime);if(!b.timings)return c;var d=b.timings.blocked<0?0:b.timings.blocked,e=d+(b.timings.dns<0?0:b.timings.dns),f=e+(b.timings.connect<0?0:b.timings.connect),g=f+(b.timings.send<0?0:b.timings.send),h=g+(b.timings.wait<0?0:b.timings.wait),i=h+(b.timings.receive<0?0:b.timings.receive),j=b.time,k=Lib.parseISO8601(b.startedDateTime);this.barOffset=((k-this.phaseStartTime)/this.phaseElapsed*100).toFixed(3),this.barBlockingWidth=(d/this.phaseElapsed*100).toFixed(3),this.barResolvingWidth=(e/this.phaseElapsed*100).toFixed(3),this.barConnectingWidth=(f/this.phaseElapsed*100).toFixed(3),this.barSendingWidth=(g/this.phaseElapsed*100).toFixed(3),this.barWaitingWidth=(h/this.phaseElapsed*100).toFixed(3),this.barReceivingWidth=(i/this.phaseElapsed*100).toFixed(3),this.calculatePageTimings(a,b,c);return c},calculatePageTimings:function(a,b,c){if(a){var d=Lib.parseISO8601(a.startedDateTime);for(var e=0;e<c.pageTimings.length;e++){var f=c.pageTimings[e].time;if(f>0){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;n<m.length;n++)m[n].parentNode.removeChild(m[n]);for(var n=0;n<c.pageTimings.length;n++){var o=c.pageTimings[n];if(!o.offset)continue;var p=f.ownerDocument.createElement("DIV");f.appendChild(p),o.classes&&Lib.setClass(p,o.classes),Lib.setClass(p,"netPageTimingBar netBar"),p.style.left=o.offset+"%",p.style.display="block",o.offset=null}}},updateTimeStamps:function(a){if(a){var b=[];for(var c=0;a.pageTimings&&c<this.pageTimings.length;c++){var d=this.pageTimings[c],e=a.pageTimings[d.name];e>0&&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<g.length;c++){var h=g[c],i=g[c+1];for(var j=0;j<b.length;j++){var k=b[j],l=k.time;if(!l)continue;var m=Lib.parseISO8601(a.startedDateTime);l+=m;if(!i||l<i.startTime)if(c==0||l>=h.startTime)h.startTime>l&&(h.startTime=l),h.endTime<l&&(h.endTime=l),h.pageTimings.push({classes:k.classes?k.classes:"netTimeStampBar",name:k.label,description:k.comment,time:k.time})}}}},updateSummaries:function(a){var b=this.phases,c=0,d=0,e=0,f=0;for(var g=0;g<b.length;++g){var h=b[g];h.invalidPhase=!1;var i=this.summarizePhase(h);c+=i.fileCount,d+=i.totalSize,e+=i.cachedSize,f+=i.totalTime}var j=this.summaryRow;if(j){var k=Lib.getElementByClass(j,"netCountLabel");k.firstChild.nodeValue=this.formatRequestCount(c);var l=Lib.getElementByClass(j,"netTotalSizeLabel");l.setAttribute("totalSize",d),l.firstChild.nodeValue=Lib.formatSize(d);var m=Lib.getElementByClass(j,"netCacheSizeLabel");m.setAttribute("collapsed",e==0),m.childNodes[1].firstChild.nodeValue=Lib.formatSize(e);var n=Lib.getElementByClass(j,"netTotalTimeLabel"),o=Lib.formatTime(f);a&&a.pageTimings.onLoad>0&&(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;h<a.files.length;h++){var i=a.files[h],j=Lib.parseISO8601(i.startedDateTime);if(!d||i.category==d){++e;var k=i.response.bodySize,l=k&&k!=-1?k:i.response.content.size;c+=l,i.response.status==304&&(b+=l);if(!f||j<f)f=j;var m=j+i.time;m>g&&(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<b.phase.pageTimings.length;u++){var v=b.phase.pageTimings[u];t.push({bar:v.description?v.description:v.name,start:g+v.time-h,classes:v.classes,time:v.time})}t.length&&(t.sort(function(a,b){return a.time<b.time?-1:1}),this.separatorTag.insertRows({label:Strings["request.timings.label"]},i.firstChild),this.eventsTag.insertRows({events:t},i.firstChild));return!0}}),EntrySizeInfoTip=domplate({tag:DIV({"class":"sizeInfoTip"},"$file|getSize"),zippedTag:DIV(DIV({"class":"sizeInfoTip"},"$file|getBodySize"),DIV({"class":"sizeInfoTip"},"$file|getContentSize")),getSize:function(a){var b=a.response.bodySize;if(b<0)return Strings.unknownSize;return Lib.formatString(Strings.tooltipSize,Lib.formatSize(b),Lib.formatNumber(b))},getBodySize:function(a){var b=a.response.bodySize;if(b<0)return Strings.unknownSize;return Lib.formatString(Strings.tooltipZippedSize,Lib.formatSize(b),Lib.formatNumber(b))},getContentSize:function(a){var b=a.response.content.size;if(b<0)return Strings.unknownSize;return Lib.formatString(Strings.tooltipUnzippedSize,Lib.formatSize(b),Lib.formatNumber(b))},render:function(a,b,c){var d=a.input,e=b.repObject;if(e.response.bodySize==e.response.content.size)return this.tag.replace({file:e},c);return this.zippedTag.replace({file:e},c)}});return RequestList}}),define("nls/pageList",{root:{"column.label.url":"URL","column.label.status":"Status","column.label.type":"Type","column.label.domain":"Domain","column.label.size":"Size","column.label.timeline":"Timeline","action.label.Reset":"Reset"}}),require.def("preview/pageList",["domplate/domplate","core/lib","core/trace","core/cookies","preview/requestList","i18n!nls/pageList","domplate/popupMenu"],function(Domplate,Lib,Trace,Cookies,RequestList,Strings,Menu){with(Domplate){function PageList(a){this.input=a,this.listeners=[]}PageList.prototype=domplate({tableTag:TABLE({"class":"pageTable",cellpadding:0,cellspacing:0,onclick:"$onClick",_repObject:"$input"},TBODY(TAG("$rowTag",{groups:"$input.log.pages"}))),rowTag:FOR("group","$groups",TR({"class":"pageRow",_repObject:"$group"},TD({"class":"groupName pageCol",width:"1%"},SPAN({"class":"pageName"},"$group|getPageTitle")),TD({"class":"netOptionsCol netCol",width:"15px"},DIV({"class":"netOptionsLabel netLabel",onclick:"$onOpenOptions"})))),bodyTag:TR({"class":"pageInfoRow",style:"height:auto;"},TD({"class":"pageInfoCol",colspan:2})),getPageTitle:function(a){return Lib.cropString(a.title,100)},getPageID:function(a){return"["+a.id+"]"},onClick:function(a){var b=Lib.fixEvent(a);if(Lib.isLeftClick(a)){var c=Lib.getAncestorByClass(b.target,"pageRow");c&&(this.toggleRow(c),Lib.cancelEvent(a))}},toggleRow:function(a,b){var c=Lib.hasClass(a,"opened");if(!c||!b){Lib.toggleClass(a,"opened");if(Lib.hasClass(a,"opened")){var d=this.bodyTag.insertRows({},a)[0],e=this.createRequestList(),f=PageList.prototype.pageTimings;for(var g=0;g<f.length;g++)e.addPageTiming(f[g]);e.render(d.firstChild,a.repObject)}else{var d=a.nextSibling;a.parentNode.removeChild(d)}}},expandAll:function(a){var b=a.firstChild.firstChild;while(b)Lib.hasClass(b,"pageRow")&&this.toggleRow(b,!0),b=b.nextSibling},getPageRow:function(a){var b=this.element.parentNode,c=Lib.getElementsByClass(b,"pageRow");for(var d=0;d<c.length;d++){var e=c[d];if(e.repObject==a)return e}},togglePage:function(a){var b=this.getPageRow(a);this.toggleRow(b)},expandPage:function(a){var b=this.getPageRow(a);this.toggleRow(b,!0)},collapsePage:function(a){var b=this.getPageRow(a);Lib.hasClass(b,"opened")&&this.toggleRow(b)},onOpenOptions:function(a){var b=Lib.fixEvent(a);Lib.cancelEvent(a);if(Lib.isLeftClick(a)){var c=b.target,d=Lib.getAncestorByClass(c,"pageRow"),e=this.getMenuItems(d.repObject),f=new Menu({id:"requestContextMenu",items:e});f.showPopup(c)}},getMenuItems:function(a){var b=RequestList.getVisibleColumns().join(),c,d=0,e=[];for(var f=0;f<RequestList.columns.length;f++){var g=RequestList.columns[f],h=b.indexOf(g)>-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;b<this.buttons.length;b++)if(this.buttons[b].id==a){this.buttons.splice(b,1);break}},addButtons:function(a){for(var b=0;b<a.length;b++)this.addButton(a[b])},getButton:function(a){for(var b=0;b<this.buttons.length;b++)if(this.buttons[b].id==a)return this.buttons[b]},render:function(a){if(this.buttons.length){this.element&&(a=this.element.parentNode),this.element=ToolbarTempl.tag.replace({},a);for(var b=0;b<this.buttons.length;b++){var c=this.buttons[b],d=c.items?ToolbarTempl.dropDownTag:ToolbarTempl.buttonTag,e=c.tag?c.tag:d,f=e.append({button:c},this.element);c.initialize&&c.initialize(f),b<this.buttons.length-1&&ToolbarTempl.separatorTag.append({},this.element)}return this.element}}};return Toolbar}}),require.def("preview/menu",["domplate/domplate","core/lib","domplate/toolbar","core/trace"],function(Domplate,Lib,Toolbar,Trace){with(Domplate){function Menu(){}Menu.prototype={render:function(a){this.element=MenuPlate.render(a),this.toolbar=new Toolbar,this.toolbar.addButton({id:"credentials",label:"Powered by Jan Odvarko",tooltiptext:"http://www.softwareishard.com/blog/har-viewer/",command:Lib.bindFixed(this.onCredentials,this,!0)});var b=Lib.getElementByClass(this.element,"menuContent");this.toolbar.render(b),Lib.isWebkit&&(b.style.paddingTop="1px")},onCredentials:function(){window.open("http://www.softwareishard.com/blog/har-viewer/")},onFullPreview:function(){}};var MenuPlate=domplate({tag:DIV({"class":"menu",_repObject:"$object"},DIV({"class":"menuHandle",onmousemove:"$onMouseMove",onclick:"$onMouseClick"}),DIV({"class":"menuContent",style:"display: none"})),onMouseMove:function(a){var b=Lib.fixEvent(a);this.open(b.target)},onMouseClick:function(a){var b=Lib.fixEvent(a);this.toggle(b.target)},open:function(a){var b=Lib.getAncestorByClass(a,"menu"),c=Lib.getElementByClass(b,"menuContent");c.clientWidth<=0&&this.toggle(a)},toggle:function(a){var b=Lib.getAncestorByClass(a,"menu"),c=Lib.getElementByClass(b,"menuContent");$(c).animate({width:"toggle"},undefined,undefined,function(){var a=Lib.getElementByClass(b,"menuHandle");c.clientWidth>0?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"},"&nbsp;")),TD("&nbsp;"),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")})
@@ -1,244 +1 @@
1
- /*
2
- RequireJS i18n Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
- Available via the MIT, GPL or new BSD license.
4
- see: http://github.com/jrburke/requirejs for details
5
- RequireJS text Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
6
- Available via the MIT, GPL or new BSD license.
7
- see: http://github.com/jrburke/requirejs for details
8
- */
9
- (function(){function n(h,a){a=a.nlsWaiting;return a[h]||(a[h]=a[a.push({_name:h})-1])}function c(h,a,d,b){var e,l,m,f,k,o,p="root";l=d.split("-");m=[];f=n(h,b);for(e=l.length;e>-1;e--){k=e?l.slice(0,e).join("-"):"root";if(o=a[k]){if(d===b.config.locale&&!f._match)f._match=k;if(p==="root")p=k;f[k]=k;if(o===true){o=h.split("/");o.splice(-1,0,k);o=o.join("/");!b.specified[o]&&!(o in b.loaded)&&!b.defined[o]&&m.push(o)}}}if(p!==d)if(b.defined[p])b.defined[d]=b.defined[p];else f[d]=p;m.length&&b.defined.require(m)}
10
- var g=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,j={};require.plugin({prefix:"i18n",require:function(h,a,d,b){var e,l=b.defined[h];e=g.exec(h);if(e[5]){h=e[1]+e[5];a=n(h,b);a[e[4]]=e[4];a=b.nls[h];if(!a){b.defined.require([h]);a=b.nls[h]={}}a[e[4]]=d}else{if(a=b.nls[h])require.mixin(a,l);else a=b.nls[h]=l;b.nlsRootLoaded[h]=true;if(e=b.nlsToLoad[h]){delete b.nlsToLoad[h];for(d=0;d<e.length;d++)c(h,a,e[d],b)}c(h,a,b.config.locale,b)}},newContext:function(h){require.mixin(h,{nlsWaiting:[],nls:{},nlsRootLoaded:{},
11
- nlsToLoad:{}});if(!h.config.locale)h.config.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()},load:function(h,a){var d=require.s.contexts[a],b=g.exec(h),e=b[4];if(b[5]){h=b[1]+b[5];a=d.nls[h];if(d.nlsRootLoaded[h]&&a)c(h,a,e,d);else{(d.nlsToLoad[h]||(d.nlsToLoad[h]=[])).push(e);d.defined.require([h])}}else d.nlsRootLoaded[h]||require.load(h,a)},checkDeps:function(){},isWaiting:function(h){return!!h.nlsWaiting.length},orderDeps:function(h){var a,
12
- d,b,e,l,m,f,k,o,p,u,v,w=h.nlsWaiting,q;h.nlsWaiting=[];h.nlsToLoad={};for(a=0;e=w[a];a++){b=e._name;l=h.nls[b];u=null;m=b.split("/");o=m.slice(0,m.length-1).join("/");f=m[m.length-1];for(p in e)if(p!=="_name"&&!(p in j))if(p==="_match")u=e[p];else if(e[p]!==p)(q||(q={}))[p]=e[p];else{k={};m=p.split("-");for(d=m.length;d>0;d--){v=m.slice(0,d).join("-");v!=="root"&&l[v]&&require.mixin(k,l[v])}l.root&&require.mixin(k,l.root);h.defined[o+"/"+p+"/"+f]=k}h.defined[b]=h.defined[o+"/"+u+"/"+f];if(q)for(p in q)p in
13
- j||(h.defined[o+"/"+p+"/"+f]=h.defined[o+"/"+q[p]+"/"+f])}}})})();
14
- (function(){var n=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],c=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,g=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im;if(!require.textStrip)require.textStrip=function(j){if(j){j=j.replace(c,"");var h=j.match(g);if(h)j=h[1]}else j="";return j};if(!require.getXhr)require.getXhr=function(){var j,h,a;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(h=0;h<3;h++){a=n[h];try{j=new ActiveXObject(a)}catch(d){}if(j){n=[a];
15
- break}}if(!j)throw new Error("require.getXhr(): XMLHttpRequest not available");return j};if(!require.fetchText)require.fetchText=function(j,h){var a=require.getXhr();a.open("GET",j,true);a.onreadystatechange=function(){a.readyState===4&&h(a.responseText)};a.send(null)};require.plugin({prefix:"text",require:function(){},newContext:function(j){require.mixin(j,{text:{},textWaiting:[]})},load:function(j,h){var a=false,d=null,b,e=j.indexOf("."),l=j.substring(0,e),m=j.substring(e+1,j.length),f=require.s.contexts[h],
16
- k=f.textWaiting;e=m.indexOf("!");if(e!==-1){a=m.substring(e+1,m.length);m=m.substring(0,e);e=a.indexOf("!");if(e!==-1&&a.substring(0,e)==="strip"){d=a.substring(e+1,a.length);a="strip"}else if(a!=="strip"){d=a;a=null}}b=l+"!"+m;e=a?b+"!"+a:b;if(d!==null&&!f.text[b])f.defined[j]=f.text[b]=d;else if(!f.text[b]&&!f.textWaiting[b]&&!f.textWaiting[e]){k[e]||(k[e]=k[k.push({name:j,key:b,fullKey:e,strip:!!a})-1]);a=require.nameToUrl(l,"."+m,h);f.loaded[j]=false;require.fetchText(a,function(o){f.text[b]=
17
- o;f.loaded[j]=true;require.checkLoaded(h)})}},checkDeps:function(){},isWaiting:function(j){return!!j.textWaiting.length},orderDeps:function(j){var h,a,d,b=j.textWaiting;j.textWaiting=[];for(h=0;a=b[h];h++){d=j.text[a.key];j.defined[a.name]=a.strip?require.textStrip(d):d}}})})();require.pause();
18
- require.def("domplate/tabView",["domplate/domplate","core/lib","core/trace"],function(n,c,g){with(n){var j=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",
19
- _repObject:"$tab"},"$tab.label"),tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"}),hideTab:function(){return false},onClickTab:function(h){h=$.event.fix(h||window.event);this.getTabView(h.target).onClickTab(h)},getTabView:function(h){return c.getAncestorByClass(h,"tabView").repObject}});n=function(h){this.id=h;this.tabs=[];this.listeners=[]};n.prototype={appendTab:function(h){this.tabs.push(h);h.tabView=this;return h},getTab:function(h){return(h=c.getElementByClass(this.element,
20
- h+"Tab"))?h.repObject:null},selectTabByName:function(h){(h=c.getElementByClass(this.element,h+"Tab"))&&this.selectTab(h)},addListener:function(h){this.listeners.push(h)},removeListener:function(h){c.remove(this.listeners,h)},onClickTab:function(h){(h=c.getAncestorByClass(h.target,"tab"))&&this.selectTab(h)},selectTab:function(h){if(c.hasClass(h,"tab"))if(!c.hasClass(h,"selected")){var a=h.getAttribute("view");if(a){var d=c.getAncestorByClass(h,"tabViewBody");if(d.selectedTab){d.selectedTab.removeAttribute("selected");
21
- d.selectedBody.removeAttribute("selected");c.removeClass(d.selectedTab,"selected");c.removeClass(d.selectedBody,"selected")}var b=c.getElementByClass(d,"tab"+a+"Body");b||g.error("TabView.selectTab; Missing tab body",h);d.selectedTab=h;d.selectedBody=b;d.selectedTab.setAttribute("selected","true");d.selectedBody.setAttribute("selected","true");c.setClass(d.selectedBody,"selected");c.setClass(d.selectedTab,"selected");this.updateTabBody(d,a)}}},updateTabBody:function(h){h=h.selectedTab.repObject;if(!h._body._updated){h._body._updated=
22
- true;h.bodyTag&&h.bodyTag.replace({tab:h},h._body);h&&h.onUpdateBody&&h.onUpdateBody(this,h._body);for(var a=0;a<this.listeners.length;a++){var d=this.listeners[a];d.onUpdateBody&&d.onUpdateBody(this,h._body)}}},render:function(h){this.element=j.tag.replace({tabView:this},h,j);c.setClass(this.element,this.id);for(var a in this.tabs){var d=this.tabs[a],b=d.tabHeaderTag?d.tabHeaderTag:j.tabHeaderTag,e=d.tabBodyTag?d.tabBodyTag:j.tabBodyTag;try{d._header=b.append({tab:d},c.$(h,"tabBar"));d._body=e.append({tab:d},
23
- c.$(h,"tabBodies"))}catch(l){g.exception("TabView.appendTab; Exception ",l)}}return this.element}};n.Tab=function(){};n.Tab.prototype={invalidate:function(){this._updated=false},select:function(){this.tabView.selectTabByName(this.id)}};return n}});
24
- require.def("harViewer",["domplate/tabView","tabs/homeTab","tabs/aboutTab","tabs/previewTab","tabs/schemaTab","tabs/domTab","preview/harModel","i18n!nls/harViewer","core/lib","core/trace"],function(n,c,g,j,h,a,d,b,e,l){function m(f){this.id="harView";this.model=new d;this.homeTab=this.appendTab(new c);this.previewTab=this.appendTab(new j(this.model));this.domTab=this.appendTab(new a);this.aboutTab=this.appendTab(new g);this.schemaTab=this.appendTab(new h);this.initialize(f)}m.prototype=e.extend(new n,
25
- {initialize:function(f){this.version=f.getAttribute("version");this.harSpecURL="http://groups.google.com/group/http-archive-specification/web/har-1-2-spec";this.render(f);this.selectTabByName("Home");f=e.bind(this.appendPreview,this);var k=e.bind(this.onLoadError,this);d.Loader.run(f,k)&&this.homeTab.loadInProgress(true)},appendPreview:function(f){try{var k=$("#validate").attr("checked"),o=d.parse(f,k);this.model.append(o);this.previewTab.select();this.previewTab.append(o);this.domTab.append(o)}catch(p){l.exception("HarView.appendPreview; EXCEPTION ",
26
- p);p.errors&&this.previewTab.appendError(p)}this.previewTab.select();this.homeTab.loadInProgress(false)},onLoadError:function(f,k){this.homeTab.loadInProgress(true,f.statusText);l.error("harModule.loadRemoteArchive; ERROR ",f,k)}});n=document.getElementById("content");b=new m(n);e.fireEvent(n,"onViewerInit",[b]);l.log("HarViewer; initialized OK")});
27
- require.def("core/lib",["core/trace"],function(n){var c={},g=navigator.userAgent.toLowerCase();c.isFirefox=/firefox/.test(g);c.isOpera=/opera/.test(g);c.isSafari=/webkit/.test(g);c.isIE=/msie/.test(g)&&!/opera/.test(g);c.isIE6=/msie 6/i.test(navigator.appVersion);c.browserVersion=(g.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1];c.isIElt8=c.isIE&&c.browserVersion-0<8;c.extend=function(a,d){var b={};c.append(b,a);c.append(b,d);return b};c.append=function(a,d){for(var b in d)a[b]=d[b];return a};
28
- c.bind=function(){var a=c.cloneArray(arguments),d=a.shift(),b=a.shift();return function(){return d.apply(b,c.arrayInsert(c.cloneArray(a),0,arguments))}};c.bindFixed=function(){var a=c.cloneArray(arguments),d=a.shift(),b=a.shift();return function(){return d.apply(b,a)}};c.dispatch=function(a,d,b){for(var e=0;a&&e<a.length;e++){var l=a[e];if(l[d])try{l[d].apply(l,b)}catch(m){n.exception(m)}}};c.dispatch2=function(a,d,b){for(var e=0;e<a.length;e++){var l=a[e];if(l[d])try{var m=l[d].apply(l,b);if(m)return m}catch(f){n.exception(f)}}};
29
- var j=Object.prototype.toString,h=/^\s*function(\s+[\w_$][\w\d_$]*)?\s*\(/;c.isArray=function(a){return j.call(a)==="[object Array]"};c.isFunction=function(a){if(!a)return false;return j.call(a)==="[object Function]"||c.isIE&&typeof a!="string"&&h.test(""+a)};c.isAncestor=function(a,d){for(a=a;a;a=a.parentNode)if(a==d)return true;return false};c.fixEvent=function(a){return $.event.fix(a||window.event)};c.fireEvent=function(a,d){if(document.createEvent){var b=document.createEvent("Events");b.initEvent(d,
30
- true,false);return!a.dispatchEvent(b)}};c.cancelEvent=function(a){a=c.fixEvent(a);a.stopPropagation();a.preventDefault()};c.addEventListener=function(a,d,b,e){e=e||false;a.addEventListener?a.addEventListener(d,b,e):a.attachEvent("on"+d,b)};c.removeEventListener=function(a,d,b,e){e=e||false;a.removeEventListener?a.removeEventListener(d,b,e):a.detachEvent("on"+d,b)};c.isLeftClick=function(a){return a.button==0&&c.noKeyModifiers(a)};c.noKeyModifiers=function(a){return!a.ctrlKey&&!a.shiftKey&&!a.altKey&&
31
- !a.metaKey};c.isControlClick=function(a){return a.button==0&&c.isControl(a)};c.isShiftClick=function(a){return a.button==0&&c.isShift(a)};c.isControl=function(a){return(a.metaKey||a.ctrlKey)&&!a.shiftKey&&!a.altKey};c.isAlt=function(a){return a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey};c.isAltClick=function(a){return a.button==0&&c.isAlt(a)};c.isControlShift=function(a){return(a.metaKey||a.ctrlKey)&&a.shiftKey&&!a.altKey};c.isShift=function(a){return a.shiftKey&&!a.metaKey&&!a.ctrlKey&&!a.altKey};
32
- c.inflateRect=function(a,d,b){return{top:a.top-b,left:a.left-d,height:a.height+2*b,width:a.width+2*d}};c.pointInRect=function(a,d,b){return b>=a.top&&b<=a.top+a.height&&d>=a.left&&d<=a.left+a.width};c.cloneArray=function(a,d){var b=[];if(d)for(var e=0;e<a.length;++e)b.push(d(a[e]));else for(e=0;e<a.length;++e)b.push(a[e]);return b};c.arrayInsert=function(a,d,b){for(var e=0;e<b.length;++e)a.splice(e+d,0,b[e]);return a};c.remove=function(a,d){for(var b=0;b<a.length;++b)if(a[b]==d){a.splice(b,1);break}};
33
- c.formatSize=function(a){var d=1;d=d>2?2:d;d=d<-1?-1:d;if(d==-1)return a+" B";d=Math.pow(10,d);return a==-1||a==undefined?"?":a==0?"0":a<1024?a+" B":a<1048576?Math.round(a/1024*d)/d+" KB":Math.round(a/1048576*d)/d+" MB"};c.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"};c.formatNumber=function(a){a+="";var d=a.split(".");a=d[0];d=d.length>1?"."+d[1]:"";for(var b=/(\d+)(\d{3})/;b.test(a);)a=a.replace(b,"$1,$2");return a+d};c.formatString=
34
- function(a){var d=c.cloneArray(arguments);a=d.shift();for(var b=0;b<d.length;b++){var e=d[b].toString();a=a.replace("%S",e)}return a};c.parseISO8601=function(a){return(a=c.fromISOString(a))?a.getTime():null};c.fromISOString=function(a){if(!a)return null;a=a.toString().match(new RegExp(/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/));if(!a)return null;var d=new Date;d.setUTCDate(1);d.setUTCFullYear(parseInt(a[1],10));d.setUTCMonth(parseInt(a[3],10)-
35
- 1);d.setUTCDate(parseInt(a[5],10));d.setUTCHours(parseInt(a[7],10));d.setUTCMinutes(parseInt(a[9],10));d.setUTCSeconds(parseInt(a[11],10));a[12]?d.setUTCMilliseconds(parseFloat(a[12])*1E3):d.setUTCMilliseconds(0);if(a[13]!="Z"){var b=a[15]*60+parseInt(a[17],10);b*=a[14]=="-"?-1:1;d.setTime(d.getTime()-b*60*1E3)}return d};c.getFileName=function(a){return c.splitURLBase(a).name};c.getFileExtension=function(a){if(!a)return null;var d=a.indexOf("?");if(d!=-1)a=a.substr(0,d);d=a.lastIndexOf(".");return a.substr(d+
36
- 1)};c.splitURLBase=function(a){if(c.isDataURL(a))return c.splitDataURL(a);return c.splitURLTrue(a)};c.isDataURL=function(a){return a&&a.substr(0,5)=="data:"};c.splitDataURL=function(a){var d=a.indexOf(":",3);if(d!=4)return false;var b=a.indexOf(",",d+1);if(b<d)return false;var e={encodedContent:a.substr(b+1)};a=a.substr(d+1,b).split(";");for(d=0;d<a.length;d++){b=a[d].split("=");if(b.length==2)e[b[0]]=b[1]}if(e.hasOwnProperty("fileName")){a=decodeURIComponent(e.fileName);a=c.splitURLTrue(a);if(e.hasOwnProperty("baseLineNumber")){e.path=
37
- a.path;e.line=e.baseLineNumber;a=decodeURIComponent(e.encodedContent.substr(0,200)).replace(/\s*$/,"");e.name="eval->"+a}else{e.name=a.name;e.path=a.path}}else{e.hasOwnProperty("path")||(e.path="data:");e.hasOwnProperty("name")||(e.name=decodeURIComponent(e.encodedContent.substr(0,200)).replace(/\s*$/,""))}return e};c.splitURLTrue=function(a){var d=/:\/{1,3}(.*?)\/([^\/]*?)\/?($|\?.*)/.exec(a);return d?d[2]?{path:d[1],name:d[2]+d[3]}:{path:d[1],name:d[1]}:{name:a,path:a}};c.getURLParameter=function(a){for(var d=
38
- window.location.search.substring(1).split("&"),b=0;b<d.length;b++){var e=d[b].split("=");if(e[0]==a)return unescape(e[1])}return null};c.getURLParameters=function(a){for(var d=[],b=window.location.search.substring(1).split("&"),e=0;e<b.length;e++){var l=b[e].split("=");l[0]==a&&d.push(unescape(l[1]))}return d};c.parseURLParams=function(a){var d=a?a.indexOf("?"):-1;if(d==-1)return[];a=a.substr(d+1);d=a.lastIndexOf("#");if(d!=-1)a=a.substr(0,d);if(!a)return[];return c.parseURLEncodedText(a)};c.parseURLEncodedText=
39
- function(a,d){function b(p){try{return decodeURIComponent(p)}catch(u){return decodeURIComponent(unescape(p))}}var e=[];if(a=="")return e;a=a.replace(/\+/g," ");a=a.split("&");for(var l=0;l<a.length;++l)try{var m=a[l].indexOf("=");if(m!=-1){var f=a[l].substring(0,m),k=a[l].substring(m+1);if(k.length>25E3&&!d)k=c.$STR("LargeData");e.push({name:b(f),value:b(k)})}else{f=a[l];e.push({name:b(f),value:""})}}catch(o){}e.sort(function(p,u){return p.name<=u.name?-1:1});return e};c.getBody=function(a){if(a.body)return a.body;
40
- if(a=a.getElementsByTagName("body")[0])return a;return null};c.getHead=function(a){return a.getElementsByTagName("head")[0]};c.getAncestorByClass=function(a,d){for(a=a;a;a=a.parentNode)if(c.hasClass(a,d))return a;return null};c.$=function(){return c.getElementByClass.apply(this,arguments)};c.getElementByClass=function(a){if(!a)return null;var d=c.cloneArray(arguments);d.splice(0,1);for(var b=a.firstChild;b;b=b.nextSibling){var e=c.cloneArray(d);e.unshift(b);if(c.hasClass.apply(this,e))return b;else if(e=
41
- c.getElementByClass.apply(this,e))return e}return null};c.getElementsByClass=function(a){function d(l,m,f){for(l=l.firstChild;l;l=l.nextSibling){var k=c.cloneArray(m);k.unshift(l);c.hasClass.apply(null,k)&&f.push(l);d(l,m,f)}}var b=[],e=c.cloneArray(arguments);e.shift();d(a,e,b);return b};c.getChildByClass=function(a){for(var d=1;d<arguments.length;++d){var b=arguments[d],e=a.firstChild;for(a=null;e;e=e.nextSibling)if(c.hasClass(e,b)){a=e;break}}return a};c.eraseNode=function(a){for(;a.lastChild;)a.removeChild(a.lastChild)};
42
- c.clearNode=function(a){a.innerHTML=""};c.hasClass=function(a,d){if(!a||a.nodeType!=1)return false;else{for(var b=1;b<arguments.length;++b){d=arguments[b];var e=a.className;if(!e||e.indexOf(d+" ")==-1)return false}return true}};c.setClass=function(a,d){if(a&&!c.hasClass(a,d))a.className+=" "+d+" "};c.removeClass=function(a,d){if(a&&a.className){var b=a.className.indexOf(d);if(b>=0){d=d.length;a.className=a.className.substr(0,b-1)+a.className.substr(b+d)}}};c.toggleClass=function(a,d){if(c.hasClass(a,
43
- d)){c.removeClass(a,d);return false}else{c.setClass(a,d);return true}};c.trim=function(a){return a.replace(/^\s*|\s*$/g,"")};c.wrapText=function(a,d){var b=/[^A-Za-z_$0-9'"-]/,e=[];a=c.splitLines(a);for(var l=0;l<a.length;++l){for(var m=a[l];m.length>100;){var f=b.exec(m.substr(100,100));f=100+(f?f.index:0);var k=m.substr(0,f);m=m.substr(f);d||e.push("<pre>");e.push(d?k:c.escapeHTML(k));d||e.push("</pre>")}d||e.push("<pre>");e.push(d?m:c.escapeHTML(m));d||e.push("</pre>")}return e.join(d?"\n":"")};
44
- c.insertWrappedText=function(a,d,b){d.innerHTML="<pre>"+c.wrapText(a,b)+"</pre>"};c.splitLines=function(a){var d=/\r\n|\r|\n/;if(a){if(a.split)return a.split(d)}else return[];return(a+"").split(d)};c.getPrettyDomain=function(a){return(a=/[^:]+:\/{1,3}(www\.)?([^\/]+)/.exec(a))?a[2]:""};c.escapeHTML=function(a){function d(b){switch(b){case "<":return"&lt;";case ">":return"&gt;";case "&":return"&amp;";case "'":return"&#39;";case '"':return"&quot;"}return"?"}return String(a).replace(/[<>&"']/g,d)};c.cropString=
45
- function(a,d){a+="";var b=d?d/2:50;return a.length>d?c.escapeNewLines(a.substr(0,b)+"..."+a.substr(a.length-b)):c.escapeNewLines(a)};c.escapeNewLines=function(a){return a.replace(/\r/g,"\\r").replace(/\n/g,"\\n")};c.cloneJSON=function(a){if(a==null||typeof a!="object")return a;try{var d=a.constructor();for(var b in a)d[b]=cloneJSON(a[b]);return d}catch(e){n.exception(a)}return null};c.getOverflowParent=function(a){for(a=a.parentNode;a;a=a.offsetParent)if(a.scrollHeight>a.offsetHeight)return a};c.getElementBox=
46
- function(a){var d={};if(a.getBoundingClientRect){a=a.getBoundingClientRect();var b=c.isIE?document.body.clientTop||document.documentElement.clientTop:0,e=c.getWindowScrollPosition();d.top=Math.round(a.top-b+e.top);d.left=Math.round(a.left-b+e.left);d.height=Math.round(a.bottom-a.top);d.width=Math.round(a.right-a.left)}else{b=c.getElementPosition(a);d.top=b.top;d.left=b.left;d.height=a.offsetHeight;d.width=a.offsetWidth}return d};c.getElementPosition=function(a){var d=0,b=0;do{d+=a.offsetLeft;b+=a.offsetTop}while(a=
47
- a.offsetParent);return{left:d,top:b}};c.getWindowSize=function(){var a=0,d=0,b;if(typeof window.innerWidth=="number"){a=window.innerWidth;d=window.innerHeight}else if((b=document.documentElement)&&(b.clientHeight||b.clientWidth)){a=b.clientWidth;d=b.clientHeight}else if((b=document.body)&&(b.clientHeight||b.clientWidth)){a=b.clientWidth;d=b.clientHeight}return{width:a,height:d}};c.getWindowScrollSize=function(){var a=0,d=0,b;if(!c.isIEQuiksMode&&(b=document.documentElement)&&(b.scrollHeight||b.scrollWidth)){a=
48
- b.scrollWidth;d=b.scrollHeight}if((b=document.body)&&(b.scrollHeight||b.scrollWidth)&&(b.scrollWidth>a||b.scrollHeight>d)){a=b.scrollWidth;d=b.scrollHeight}return{width:a,height:d}};c.getWindowScrollPosition=function(){var a=0,d=0,b;if(typeof window.pageYOffset=="number"){a=window.pageYOffset;d=window.pageXOffset}else if((b=document.body)&&(b.scrollTop||b.scrollLeft)){a=b.scrollTop;d=b.scrollLeft}else if((b=document.documentElement)&&(b.scrollTop||b.scrollLeft)){a=b.scrollTop;d=b.scrollLeft}return{top:a,
49
- left:d}};c.addStyleSheet=function(a,d){if(!a.getElementById(d)){var b=a.createElement("link");b.type="text/css";b.rel="stylesheet";b.href=d;b.setAttribute("id",d);c.getHead(a).appendChild(b)}};return c});
50
- require.def("core/cookies",["core/lib"],function(n){return{getCookie:function(c){for(var g=document.cookie.split(";"),j=0;j<g.length;j++){var h=g[j].split("=");if(n.trim(h[0])==c)return h[1].length?unescape(n.trim(h[1])):null}},setCookie:function(c,g,j,h,a,d){var b=new Date;b.setTime(b.getTime());if(j)j=j*1E3*60*60*24;b=new Date(b.getTime()+j);document.cookie=c+"="+escape(g)+(j?";expires="+b.toGMTString():"")+(h?";path="+h:"")+(a?";domain="+a:"")+(d?";secure":"")},removeCookie:function(c,g,j){if(this.getCookie(c))document.cookie=
51
- c+"="+(g?";path="+g:"")+(j?";domain="+j:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}});
52
- require.def("tabs/homeTab",["domplate/domplate","domplate/tabView","core/lib","core/cookies","core/trace","i18n!nls/homeTab",'text!tabs/homeTab.html!<div>\r\n<ul style="padding-left: 20px; line-height: 20px; margin-top: 0px">\r\n<li>Paste <a href="@HAR_SPEC_URL@">HAR</a>\r\nlog into the text box below and\r\npress the <b>Preview</b> button.</li>\r\n<li>Or drop <span class="red">*.har</span> file(s) anywhere on the page (if your browser supports that).</li>\r\n</ul>\r\n<table cellpadding="0" cellspacing="4">\r\n <tr>\r\n <td><input type="checkbox" id="validate" checked="true"></input></td>\r\n <td style="vertical-align:middle;padding-bottom: 1px;">Validate data before processing?</td>\r\n </tr>\r\n</table>\r\n<textarea id="sourceEditor" class="sourceEditor" cols="80" rows="5"></textarea>\r\n<p><table cellpadding="0" cellspacing="0">\r\n <tr>\r\n <td><button id="appendPreview">Preview</button></td>\r\n </tr>\r\n</table></p>\r\n<br/>\r\n<h3>HAR Log Examples</h3>\r\n<ul style="line-height:20px;">\r\n<li><span id="example1" class="link example" path="examples/inline-scripts-block.har">\r\nInline scripts block</span> - Inline scripts block the page load.</li>\r\n<li><span id="example2" class="link example" path="examples/browser-blocking-time.har">\r\nBlocking time</span> - Impact of a limit of max number of parallel connections.</li>\r\n<li><span id="example3" class="link example" path="examples/softwareishard.com.har">\r\nBrowser cache</span> - Impact of the browser cache on page load (the same page loaded three times).</li>\r\n<li><span id="example4" class="link example" path="examples/google.com.har">\r\nSingle page</span> - Single page load (empty cache).</li>\r\n</ul>\r\n<br/>\r\n<p><i>This viewer supports HAR 1.2 (see the <span class="linkAbout link">About</span> tab).<br/></i></p>\r\n</div>\r\n',"preview/harModel"],
53
- function(n,c,g,j,h,a,d){with(n){n=function(){};n.prototype=g.extend(c.Tab.prototype,{id:"Home",label:a.homeTabLabel,bodyTag:DIV({"class":"homeBody"}),onUpdateBody:function(b,e){e=this.bodyTag.replace({},e);e.innerHTML=d.replace("@HAR_SPEC_URL@",b.harSpecURL,"g");$("#appendPreview").click(g.bindFixed(this.onAppendPreview,this));$(".linkAbout").click(g.bind(this.onAbout,this));b=$("#content");b.bind("dragenter",g.bind(g.cancelEvent,g));b.bind("dragover",g.bind(g.cancelEvent,g));b.bind("drop",g.bind(this.onDrop,
54
- this));this.validateNode=$("#validate");if(b=j.getCookie("validate"))this.validateNode.attr("checked",b=="false"?false:true);this.validateNode.change(g.bind(this.onValidationChange,this));$(".example").click(g.bind(this.onLoadExample,this))},onAppendPreview:function(b){b||(b=$("#sourceEditor").val());b&&this.tabView.appendPreview(b)},onAbout:function(){this.tabView.selectTabByName("About")},onValidationChange:function(){var b=this.validateNode.attr("checked");j.setCookie("validate",b)},onLoadExample:function(b){b=
55
- $.event.fix(b||window.event).target.getAttribute("path");var e=document.location.href,l=e.indexOf("?");document.location=e.substr(0,l)+"?path="+b;j.setCookie("timeline",true);j.setCookie("stats",true)},onDrop:function(b){var e=$.event.fix(b||window.event);g.cancelEvent(e);try{this.handleDrop(b.originalEvent.dataTransfer)}catch(l){h.exception("HomeTab.onDrop EXCEPTION",l)}},handleDrop:function(b){if(!b)return false;if(b=b.files)for(var e=0;e<b.length;e++)this.onAppendPreview(b[e].getAsText(""))},loadInProgress:function(b,
56
- e){$("#sourceEditor").val(b?e?e:a.loadingHar:"")}});return n}});require.def("i18n!nls/homeTab",{root:{homeTabLabel:"Home",loadingHar:"Loading..."}});
57
- require.def("preview/jsonSchema",[],function(){return{validate:function(n,c){return this._validate(n,c,false)},checkPropertyChange:function(n,c,g){return this._validate(n,c,g||"property")},_validate:function(n,c,g){function j(d,b,e,l){function m(u){a.push({property:e,message:u})}function f(u,v){if(u){if(typeof u=="string"&&u!="any"&&(u=="null"?v!==null:typeof v!=u)&&!(v instanceof Array&&u=="array")&&!(u=="integer"&&v%1===0))return[{property:e,message:typeof v+" value found, but a "+u+" is required"}];
58
- if(u instanceof Array){for(var w=[],q=0;q<u.length;q++)if(!(w=f(u[q],v)).length)break;if(w.length)return w}else if(typeof u=="object"){w=a;a=[];j(v,u,e);u=a;a=w;return u}}return[]}var k;e+=e?typeof l=="number"?"["+l+"]":typeof l=="undefined"?"":"."+l:l;if((typeof b!="object"||b instanceof Array)&&(e||typeof b!="function")){if(typeof b=="function")d instanceof b||m("is not an instance of the class/constructor "+b.name);else b&&m("Invalid schema/property definition "+b);return null}g&&b.readonly&&m("is a readonly field, it can not be changed");
59
- b["extends"]&&j(d,b["extends"],e,l);if(d===undefined)b.optional||m("is missing and it is not optional");else{a=a.concat(f(b.type,d));b.disallow&&!f(b.disallow,d).length&&m(" disallowed value was matched");if(d!==null){if(d instanceof Array){if(b.items)if(b.items instanceof Array){l=0;for(k=d.length;l<k;l++)a.concat(j(d[l],b.items[l],e,l))}else{l=0;for(k=d.length;l<k;l++)a.concat(j(d[l],b.items,e,l))}b.minItems&&d.length<b.minItems&&m("There must be a minimum of "+b.minItems+" in the array");b.maxItems&&
60
- d.length>b.maxItems&&m("There must be a maximum of "+b.maxItems+" in the array")}else b.properties&&a.concat(h(d,b.properties,e,b.additionalProperties));b.pattern&&typeof d=="string"&&!d.match(b.pattern)&&m("does not match the regex pattern "+b.pattern);b.maxLength&&typeof d=="string"&&d.length>b.maxLength&&m("may only be "+b.maxLength+" characters long");b.minLength&&typeof d=="string"&&d.length<b.minLength&&m("must be at least "+b.minLength+" characters long");typeof b.minimum!==undefined&&typeof d==
61
- typeof b.minimum&&b.minimum>d&&m("must have a minimum value of "+b.minimum);typeof b.maximum!==undefined&&typeof d==typeof b.maximum&&b.maximum<d&&m("must have a maximum value of "+b.maximum);if(b["enum"]){l=b["enum"];k=l.length;for(var o,p=0;p<k;p++)if(l[p]===d){o=1;break}o||m("does not have a value in the enumeration "+l.join(", "))}typeof b.maxDecimal=="number"&&d.toString().match(new RegExp("\\.[0-9]{"+(b.maxDecimal+1)+",}"))&&m("may only have "+b.maxDecimal+" digits of decimal places")}}return null}
62
- function h(d,b,e,l){if(typeof b=="object"){if(typeof d!="object"||d instanceof Array)a.push({property:e,message:"an object is required"});for(var m in b)if(b.hasOwnProperty(m)&&!(m.charAt(0)=="_"&&m.charAt(1)=="_")){var f=d[m];j(f,b[m],e,m)}}for(m in d){d.hasOwnProperty(m)&&!(m.charAt(0)=="_"&&m.charAt(1)=="_")&&b&&!b[m]&&l===false&&a.push({property:e,message:typeof f+"The property "+m+" is not defined in the schema and the schema does not allow additional properties"});(f=b&&b[m]&&b[m].requires)&&
63
- !(f in d)&&a.push({property:e,message:"the presence of the property "+m+" requires that "+f+" also be present"});f=d[m];b&&typeof b=="object"&&!(m in b)&&j(f,l,e,m);if(!g&&f&&f.$schema)a=a.concat(j(f,f.$schema,e,m))}return a}var a=[];if(c)j(n,c,"",g||"");!g&&n&&n.$schema&&j(n,n.$schema,"","");return{valid:!a.length,errors:a}}}});
64
- require.def("preview/harModel",["core/lib","preview/jsonSchema","preview/ref","preview/harSchema","core/cookies","core/trace","jquery-plugins/jquery.json"],function(n,c,g,j,h,a){function d(){this.input=null}function b(){var e={};for(var l in this)if(l!="toJSON")e[l]=this[l];if(!this.text)return e;e.text=Array.map(this.text,function(m){var f=m.charCodeAt(0);if(f>=32&&f<127||f==10||f==13)return m.charAt(0);for(m=f.toString(16).toUpperCase();m.length<4;)m="0"+m;return"\\u"+m}).join("");return e}d.prototype=
65
- {append:function(e){if(e){if(this.input)if(e.log.pages)for(var l=0;l<e.log.pages.length;l++)this.importPage(e.log.pages[l],e.log.entries);else{a.error("Import of additional data without a page is not yet supported.");return null}else this.input=e;return this.input}else a.error("HarModel.append; Trying to append null input!")},getPages:function(){if(!this.input)return[];return this.input.log.pages?this.input.log.pages:[]},getFirstPage:function(){var e=this.getPages();return e.length>0?e[0]:null},getPageEntries:function(e){return d.getPageEntries(this.input,
66
- e)},getAllEntries:function(){return this.input?this.input.log.entries:[]},getParentPage:function(e){return d.getParentPage(this.input,e)},importPage:function(e,l){var m=this.getUniquePageID(e.id),f=e.id;e.id=m;this.input.log.pages.push(e);for(e=0;e<l.length;e++){var k=l[e];if(k.pageref==f){k.pageref=m;this.input.log.entries.push(k)}}},getUniquePageID:function(e){for(var l=this.input.log.pages,m={},f=0;f<l.length;f++)m[l[f].id]=true;if(!m[e])return e;for(l=1;;){f=e+l;if(!m[f])return f;l++}},toJSON:function(e){if(!e)e=
67
- this.input;if(!e)return"";e=this.input.log.entries;for(var l=0;l<e.length;l++){var m=e[l];if(m.response.content.text)m.response.content.toJSON=b}return $.jSONToString(this.input,null,"\t").replace(/\\\\u/g,"\\u")},getSize:function(e){if(!e)e=this.input;if(!e)return 0;return dojo.toJson(e,true).length}};d.parse=function(e,l){var m=e;try{if(typeof e==="string")m=jQuery.toJSON(e)}catch(f){console.exception("HarModel.parse; EXCEPTION",f);throw{errors:[{message:"Failed to parse JSON",property:"JSON evaluation"}]};
68
- }if(!l)return m;e=g.resolveJson(j);e=c.validate(m,e.logType);if(e.valid)return m;throw e;};d.getPageEntries=function(e,l){var m=[];e=e.log.entries;if(!e)return m;for(var f=0;f<e.length;f++){var k=e[f];!k.pageref&&!l&&m.push(k);l&&k.pageref==l.id&&m.push(k)}return m};d.getParentPage=function(e,l){e=e.log.pages;if(!e)return null;for(var m=0;m<e.length;m++)if(e[m].id==l.pageref)return e[m];return null};d.Loader={run:function(e,l){var m=n.getURLParameter("baseUrl");if(m&&m[m.length-1]!="/")m+="/";var f=
69
- n.getURLParameters("path"),k=n.getURLParameter("callback"),o=n.getURLParameter("inputUrl"),p=[];for(var u in f)p.push(m?m+f[u]:f[u]);o&&p.push(o);if((m||o)&&p.length>0)return this.loadRemoteArchive(p,k,e,l);if(m=n.getURLParameter("path"))return this.loadLocalArchive(m,e,l)},loadExample:function(e){var l=document.location.href,m=l.indexOf("?");document.location=l.substr(0,m)+"?path="+e;h.setCookie("timeline",true);h.setCookie("stats",true)},loadLocalArchive:function(e,l,m){$.ajax({url:e,context:this,
70
- success:function(f){l(f)},error:function(f,k){m(f,k)}});return true},loadRemoteArchive:function(e,l,m,f){if(!e.length)return false;var k=e.shift();l||(l="onInputData");$.ajax({url:k,context:this,dataType:"jsonp",jsonp:"callback",jsonpCallback:l,success:function(o){m(o);if(e.length){var p=this;setTimeout(function(){p.loadRemoteArchive(e,l,m,f)},300)}},error:function(o,p){f(o,p)}});return true}};return d});
71
- require.def("preview/ref",["core/lib"],function(n){return{resolveJson:function(c,g){function j(p,u,v,w,q){var y,t;v=h in p?p[h]:v;if(v!==undefined)v=(a+v).replace(f,"$2$3");q=q||p;if(v!==undefined){if(d)p.__id=v;if(g.schemas&&!(p instanceof Array)&&(t=v.match(/^(.+\/)[^\.\[]*$/)))w=g.schemas[t[1]];if(b[v]&&p instanceof Array==b[v]instanceof Array){q=b[v];delete q.$ref;y=true}else if(t=w&&w.prototype){o.prototype=t;q=new o}b[v]=q;if(e)e[v]=g.time}w=w&&w.properties;var C=p.length;for(var x in p){if(x==
72
- C)break;if(p.hasOwnProperty(x)){t=p[x];var H=w&&w[x];if(H&&H.format=="date-time"&&typeof t=="string")t=n.fromISOString(t);else if(typeof t=="object"&&t&&!(t instanceof Date))if(l=t.$ref){delete p[x];var F=l.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);if(l=F[1]=="$"||F[1]=="this"||F[1]==""?c:b[(a+F[1]).replace(f,"$2$3")])F[3]&&F[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(P,V,M,W,Q){l=l&&l[M?M.replace(/[\"\'\\]/,""):Q]});if(l)t=l;else if(u){t=j(t,false,t.$ref,
73
- H);t._loadObject=g.loader}else{var E;E||m.push(q);E=true}}else u||(t=j(t,m==p,v&&k(v,x),H,q!=p&&typeof q[x]=="object"&&q[x]));p[x]=t;if(q!=p&&!q.__isDirty){H=q[x];q[x]=t;y&&t!==H&&!q._loadObject&&!(t instanceof Date&&H instanceof Date&&t.getTime()==H.getTime())&&!(typeof t=="function"&&typeof H=="function"&&t.toString()==H.toString())&&b.onUpdate&&b.onUpdate(q,x,H,t)}}}if(y)for(x in q){if(!q.__isDirty&&q.hasOwnProperty(x)&&!p.hasOwnProperty(x)&&x!="__id"&&x!="__clientId"&&!(q instanceof Array&&isNaN(x))){b.onUpdate&&
74
- x!="_loadObject"&&x!="_idAttr"&&b.onUpdate(q,x,q[x],undefined);for(delete q[x];q instanceof Array&&q.length&&q[q.length-1]===undefined;)q.length--}}else b.onLoad&&b.onLoad(q);return q}g=g||{};var h=g.idAttribute||"id",a=g.idPrefix||"",d=g.assignAbsoluteIds,b=g.index||{},e=g.timeStamps,l,m=[],f=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,k=this._addProp,o=function(){};if(c&&typeof c=="object"){c=j(c,false,g.defaultId);j(m,false)}return c},_addProp:function(c,g){return c+(c.match(/#/)?c.length==
75
- 1?"":".":"#")+g}}});
76
- require.def("preview/harSchema",[],function(){function n(){}var c=/^(\d{4})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,g={pageType:{id:"pageType",description:"Exported web page",optional:true,properties:{startedDateTime:{type:"string",format:"date-time",pattern:c},id:{type:"string",unique:true},title:{type:"string"},pageTimings:{$ref:"pageTimingsType"},comment:{type:"string",optional:true}}}};c={entryType:{id:"entryType",description:"Request and Response related info",optional:true,
77
- properties:{pageref:{type:"string",optional:true},startedDateTime:{type:"string",format:"date-time",pattern:c},time:{type:"integer",min:0},request:{$ref:"requestType"},response:{$ref:"responseType"},cache:{$ref:"cacheType"},timings:{$ref:"timingsType"},serverIPAddress:{type:"string",optional:true},connection:{type:"string",optional:true},comment:{type:"string",optional:true}}}};n.prototype={registerType:function(){var h=function(a,d){for(name in d)if(d.hasOwnProperty(name)&&name!="prototype")a[name]=
78
- d[name]};for(i=0;i<arguments.length;i+=1)h(this,arguments[i])}};var j=new n;j.registerType({logType:{id:"logType",description:"HTTP Archive structure.",type:"object",properties:{log:{type:"object",properties:{version:{type:"string"},creator:{$ref:"creatorType"},browser:{$ref:"browserType"},pages:{type:"array",optional:true,items:{$ref:"pageType"}},entries:{type:"array",items:{$ref:"entryType"}},comment:{type:"string",optional:true}}}}}},{creatorType:{id:"creatorType",description:"Name and version info of the log creator app.",
79
- type:"object",properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string",optional:true}}}},{browserType:{id:"browserType",description:"Name and version info of used browser.",type:"object",optional:true,properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string",optional:true}}}},g,{pageTimingsType:{id:"pageTimingsType",description:"Timing info about page load",properties:{onContentLoad:{type:"number",optional:true,min:-1},onLoad:{type:"number",optional:true,
80
- min:-1},comment:{type:"string",optional:true}}}},c,{requestType:{id:"requestType",description:"Monitored request",properties:{method:{type:"string"},url:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookieType"}},headers:{type:"array",items:{$ref:"recordType"}},queryString:{type:"array",items:{$ref:"recordType"}},postData:{$ref:"postDataType"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string",optional:true}}}},{recordType:{id:"recordType",
81
- description:"Helper name-value pair structure.",properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string",optional:true}}}},{responseType:{id:"responseType",description:"Monitored Response.",properties:{status:{type:"integer"},statusText:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookieType"}},headers:{type:"array",items:{$ref:"recordType"}},content:{$ref:"contentType"},redirectURL:{type:"string"},headersSize:{type:"integer"},bodySize:{type:"integer"},
82
- comment:{type:"string",optional:true}}}},{postDataType:{id:"postDataType",description:"Posted data info.",optional:true,properties:{mimeType:{type:"string"},text:{type:"string",optional:true},params:{type:"array",optional:true,properties:{name:{type:"string"},value:{type:"string",optional:true},fileName:{type:"string",optional:true},contentType:{type:"string",optional:true},comment:{type:"string",optional:true}}},comment:{type:"string",optional:true}}}},{contentType:{id:"contentType",description:"Response content",
83
- properties:{size:{type:"integer"},compression:{type:"integer",optional:true},mimeType:{type:"string"},text:{type:"string",optional:true},encoding:{type:"string",optional:true},comment:{type:"string",optional:true}}}},{cacheType:{id:"cacheType",description:"Info about a response coming from the cache.",properties:{beforeRequest:{$ref:"cacheEntryType"},afterRequest:{$ref:"cacheEntryType"},comment:{type:"string",optional:true}}}},{cacheEntryType:{id:"cacheEntryType",optional:true,description:"Info about cache entry.",
84
- properties:{expires:{type:"string",optional:"true"},lastAccess:{type:"string"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string",optional:true}}}},{timingsType:{id:"timingsType",description:"Info about request-response timing.",properties:{dns:{type:"integer",min:-1},connect:{type:"integer",min:-1},blocked:{type:"integer",min:-1},send:{type:"integer",min:-1},wait:{type:"integer",min:-1},receive:{type:"integer",min:-1},ssl:{type:"integer",optional:true,min:-1},comment:{type:"string",
85
- optional:true}}}});return j});require.def("i18n!nls/harViewer",{root:{aboutTabLabel:"About",schemaTabLabel:"Schema",domTabLabel:"HAR"}});
86
- require.def("tabs/aboutTab",["domplate/domplate","domplate/tabView","core/lib","i18n!nls/harViewer"],function(n,c,g,j){with(n){n=function(){};n.prototype={id:"About",label:j.aboutTabLabel,tabHeaderTag:A({"class":"$tab.id\\Tab tab",view:"$tab.id",_repObject:"$tab"},"$tab.label",SPAN("&nbsp;"),SPAN({"class":"version"},"$tab.tabView.version")),bodyTag:DIV({"class":"aboutBody"}),onUpdateBody:function(h,a){a=this.bodyTag.replace({},a);require(['text!tabs/AboutTab.html!<div>\r\n<h2>HTTP Archive Viewer @VERSION@</h2>\r\n<i>Author: Jan Odvarko, odvarko@gmail.com</i>\r\n<br/><br/>\r\n<table style="width:600px;">\r\n\r\n<tr><td>\r\n<p>The purpose of this online tool is to visualize\r\n<a href="@HAR_SPEC_URL@">\r\n HTTP Archive (HAR)</a>\r\nlog files (JSON) created by HTTP tracking tools. These files contain log of HTTP\r\nclient/server conversation and can be used for an additional analysis of e.g. \r\npage load performance.</p>\r\n\r\n<p>User interface of this tool is composed from the following tabs:</p>\r\n<ul>\r\n<li><b>Home</b> - Paste content of a log file into the text box in this tab.</li>\r\n<li><b>Preview</b> - Switch to this tab if you want to see visualised HTTP traffic.</li>\r\n<li><b>HAR</b> - Use this tab to see structure of the input JSON data as an expandable tree.</li>\r\n<li><b>Schema</b> - Explore format of the input log in this tab.</li>\r\n</ul>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<h3>Discussion Group</h3>\r\n<p>Feedback: <a href="http://groups.google.com/group/http-archive-specification">\r\n http://groups.google.com/group/http-archive-specification</a></p>\r\n<p>Report issue: <a href="http://code.google.com/p/harviewer/issues/list">\r\n http://code.google.com/p/harviewer/issues/list</a></p>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<h3>Create Logs using Firebug 1.5</h3>\r\nOne of the tools you can use to log data transfered over HTTP protocol\r\nis <b>Firebug</b>. To do this you have to also install Firebug extension\r\ncalled <b>NetExport.</b>\r\n\r\n<p>Recommended configurations:</p>\r\n<ul>\r\n <li><a href="http://getfirebug.com/releases/firebug/1.5/">\r\n Firebug 1.5</a> +\r\n <a href="http://getfirebug.com/releases/netexport/">NetExport 0.8</a>\r\n </li>\r\n</ul>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<h3>HTTP Archive Specification</h3>\r\n<p>Required\r\n<a href="@HAR_SPEC_URL@">\r\nstructure</a> of the input HTTP Archive file (*.har) is described using\r\n<a href="http://www.json.com/json-schema-proposal/">JSON Schema</a>.\r\nYou can explore the current schema definition within the <b>Shema</b>\r\ntab on this page.</p>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<h3>Request Timing Fields</h3>\r\n<p>Part of the HTTP log is also a timing info about network request executions.\r\nHere is a description of individual request/response phases:</p>\r\n<ul>\r\n<li><i>Blocking</i> - Time spent in a queue waiting for a network connection.</li>\r\n<li><i>DNS Lookup</i> - DNS resolution time. The time required to resolve a host name.</li>\r\n<li><i>Connecting</i> - Time required to create TCP connection.</li>\r\n<li><i>Sending</i> - Time required to send HTTP request to the server.</li>\r\n<li><i>Waiting</i> - Waiting for a response from the server.</li>\r\n<li><i>Receiving</i> - Time required to read entire response from the server (or cache).</li>\r\n</ul>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<h3>Online Log Files</h3>\r\n<p>HAR Viewer also support JSONP and so it\'s possible to load log files \r\nfrom differet domains. This allows to link your online logs and preview them\r\nautomaticaly within the viewer. See live\r\n<a href="?inputUrl=http://www.janodvarko.cz/har/viewer/examples/inline-scripts-block.harp">example</a>.\r\n</p>\r\n\r\n<p><i>1. The Content of a *.har file must be enclosed within a callback function:</i></p>\r\n<code>onInputData({ "log": { ... } })</code>\r\n\r\n<p><i>2. The link displaying a *.har file (using this viewer) must specify URL of\r\nthe file in <b>inputUrl</b> parameter:</i></p>\r\n<code>http://www.softwareishard.com/har/viewer/?inputUrl=http://www.example.com/netData.har</code>\r\n\r\n<p><i>3. A custom name of the callback function can be specified in a <b>callback</b> parameter\r\n(by default it\'s <b>onInputData</b>):</i></p>\r\n<code>http://www.softwareishard.com/har/viewer/?inputUrl=http://www.example.com/netData.har&amp;callback=onInputData</code>\r\n<br/><br/>\r\n</td></tr>\r\n\r\n</table>\r\n</div>\r\n'],
87
- function(d){d=d.replace("@VERSION@",h.version,"g");d=d.replace("@HAR_SPEC_URL@",h.harSpecURL,"g");a.innerHTML=d})}};return n}});
88
- require.def("i18n!nls/previewTab",{root:{previewTabLabel:"Preview",showTimelineButton:"Show Page Timeline",hideTimelineButton:"Hide Page Timeline",showTimelineTooltip:"Show/hide statistic preview for selected pages in the timeline.",showStatsButton:"Show Statistics",hideStatsButton:"Hide Statistics",showStatsTooltip:"Show/hide page timeline.",clearButton:"Clear",clearTooltip:"Remove all HAR logs from the viewer",downloadTooltip:"Download all current data in one HAR file.",downloadError:"Failed to save HAR data"}});
89
- require.def("tabs/previewTab",["domplate/domplate","domplate/tabView","core/lib","i18n!nls/previewTab","domplate/toolbar","tabs/pageTimeline","tabs/pageStats","preview/pageList","core/cookies","downloadify/js/swfobject","downloadify/src/downloadify"],function(n,c,g,j,h,a,d,b,e){with(n){n=function(l){this.model=l;this.toolbar=new h;this.timeline=new a;this.stats=new d(l,this.timeline);l=this.getToolbarButtons();for(var m=0;m<l.length;m++)this.toolbar.addButton(l[m])};n.prototype=g.extend(c.Tab.prototype,
90
- {id:"Preview",label:j.previewTabLabel,tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"},DIV({"class":"previewToolbar"}),DIV({"class":"previewTimeline"}),DIV({"class":"previewStats"}),DIV({"class":"previewList"})),errorTable:TABLE({"class":"errorTable",cellpadding:0,cellspacing:5},TBODY(FOR("error","$errors",TR({"class":"errorRow",_repObject:"$error"},TD({"class":"errorProperty"},SPAN("$error.property")),TD("&nbsp;"),TD({"class":"errorMessage"},SPAN("$error.message")))))),onUpdateBody:function(l,
91
- m){this.toolbar.render(g.$(m,"previewToolbar"));this.stats.render(g.$(m,"previewStats"));this.timeline.render(g.$(m,"previewTimeline"));(l=this.model.input)&&e.getCookie("timeline")=="true"&&this.onTimeline(false);l&&e.getCookie("stats")=="true"&&this.onStats(false);var f=this.model;$(".harDownloadButton").downloadify({filename:function(){return"netData.har"},data:function(){return f?f.toJSON():""},onComplete:function(){},onCancel:function(){},onError:function(){alert(j.downloadError)},swf:"scripts/downloadify/media/downloadify.swf",
92
- downloadImage:"css/images/download-sprites.png",width:16,height:16,transparent:true,append:false})},getToolbarButtons:function(){var l=[{id:"showTimeline",label:j.showTimelineButton,tooltiptext:j.showTimelineTooltip,command:g.bindFixed(this.onTimeline,this,true)},{id:"showStats",label:j.showStatsButton,tooltiptext:j.showStatsTooltip,command:g.bindFixed(this.onStats,this,true)},{label:j.clearButton,tooltiptext:j.clearTooltip,command:g.bindFixed(this.onClear,this)}];$.browser.mozilla&&l.push({tooltiptext:j.downloadTooltip,
93
- className:"harDownloadButton"});return l},onTimeline:function(l){this.timeline.toggle(l);l=this.toolbar.getButton("showTimeline");var m=this.timeline.isVisible();l.label=j[m?"hideTimelineButton":"showTimelineButton"];this.toolbar.render();e.setCookie("timeline",m)},onStats:function(l){this.stats.toggle(l);l=this.toolbar.getButton("showStats");var m=this.stats.isVisible();l.label=j[m?"hideStatsButton":"showStatsButton"];this.toolbar.render();e.setCookie("stats",m)},onClear:function(){var l=document.location.href,
94
- m=l.indexOf("?");document.location=l.substr(0,m)},append:function(l){(new b(l)).append(g.$(this._body,"previewList"));this.timeline.append(l)},appendError:function(l){l.errors&&this.errorTable.append(l,g.$(this._body,"previewList"))}});return n}});
95
- require.def("domplate/toolbar",["domplate/domplate","core/lib","core/trace"],function(n,c){with(n){var g=domplate({tag:DIV({"class":"toolbar",onclick:"$onClick"}),buttonTag:SPAN({"class":"$button.className toolbarButton",title:"$button.tooltiptext",$text:"$button|hasLabel",onclick:"$button|getCommand"},"$button|getLabel"),separatorTag:SPAN({"class":"toolbarSeparator",style:"color: gray;"},"|"),hasLabel:function(j){return j.label?true:false},getLabel:function(j){return j.label?j.label:""},getCommand:function(j){return j.command?
96
- j.command:function(){}},onClick:function(j){j=$.event.fix(j||window.event);c.cancelEvent(j)}});n=function(){this.buttons=[]};n.prototype={addButton:function(j){j.tooltiptext||(tooltiptext="");this.buttons.push(j)},getButton:function(j){for(var h=0;h<this.buttons.length;h++)if(this.buttons[h].id==j)return this.buttons[h]},render:function(j){if(this.element)j=this.element.parentNode;this.element=g.tag.replace({},j);for(j=0;j<this.buttons.length;j++){var h=this.buttons[j];(h.tag?h.tag:g.buttonTag).append({button:h},
97
- this.element);j<this.buttons.length-1&&g.separatorTag.append({},this.element)}return this.element}};return n}});require.def("i18n!nls/pageTimeline",{root:{pageLoad:"Page Load",request:"Request",requests:"Requests",pageBarTooltip:"Click to select and include in statistics preview."}});
98
- require.def("tabs/pageTimeline",["domplate/domplate","core/lib","core/trace","i18n!nls/pageTimeline","preview/harModel"],function(n,c,g,j,h){with(n){var a=function(){this.listeners=[];this.element=null;this.maxElapsedTime=-1;this.lastSelectedBar=null};a.prototype=domplate({graphCols:FOR("page","$input|getPages",TD({"class":"pageTimelineCol"},DIV({"class":"pageBar",_input:"$input",_page:"$page",title:j.pageBarTooltip,style:"height: $page|getHeight\\px",onmousemove:"$onMouseMove",onclick:"$onClick"}))),
99
- pageGraph:TABLE({"class":"pageTimelineTable",cellpadding:0,cellspacing:0},TBODY(TR({"class":"pageTimelineRow"},TAG("$graphCols",{input:"$input"})))),tag:DIV({"class":"pageTimelineBody",style:"height: auto; display: none"},TABLE({style:"margin: 7px;",cellpadding:0,cellspacing:0},TBODY(TR(TD(TAG("$pageGraph",{input:"$input"}))),TR(TD({"class":"pageDescContainer",colspan:2}))))),getHeight:function(b){var e=1;b=b.pageTimings.onLoad;if(b>0&&this.maxElapsedTime>0)e=Math.round(b/this.maxElapsedTime*100);
100
- return Math.max(1,e)},onClick:function(b){var e=$.event.fix(b||window.event);b=e.target;if(c.hasClass(b,"pageBar")){var l=c.isControlClick(e);e=c.isShiftClick(e);var m=c.getAncestorByClass(b,"pageTimelineRow");!l&&!e&&d.unselectAll(m,b);d.toggle(b);this.selectionChanged()}},onMouseMove:function(b){b=$.event.fix(b||window.event).target;if(c.hasClass(b,"pageBar"))if(this.highlightedPage!=b.page){this.highlightedPage=b.page;var e=c.getElementByClass(this.element,"pageDescContainer");a.Desc.render(e,
101
- b)}},getPages:function(b){return b.log.pages?b.log.pages:[]},getPageBar:function(b){if(this.element)for(var e=c.getElementByClass(this.element,"pageTimelineTable").firstChild.firstChild.firstChild;e;){if(e.firstChild.page==b)return e.firstChild;e=e.nextSibling}},recalcLayout:function(){for(var b=this.maxElapsedTime=0,e=c.getElementsByClass(this.element,"pageBar"),l=0;l<e.length;l++){var m=e[l].page.pageTimings.onLoad;if(m>0&&this.maxElapsedTime<m)this.maxElapsedTime=m}if(b!=this.maxElapsedTime)for(l=
102
- 0;l<e.length;l++)e[l].style.height=this.getHeight(e[l].page)+"px"},updateDesc:function(){if(this.isVisible())if(!this.highlightedPage){var b=c.getElementByClass(this.element,"pageBar");b&&c.fireEvent(b,"mousemove")}},addListener:function(b){this.listeners.push(b)},removeListener:function(b){remove(this.listeners,b)},selectionChanged:function(){var b=this.getSelection();c.dispatch(this.listeners,"onSelectionChange",[b])},removeSelection:function(){if(this.element){var b=c.getElementByClass(this.element,
103
- "pageTimelineRow");d.unselectAll(b);this.selectionChanged()}},getSelection:function(){if(!this.isVisible())return[];var b=c.getElementByClass(this.element,"pageTimelineRow");return d.getSelection(b)},show:function(b){if(!this.isVisible()){if(!b||$.browser.msie)this.element.style.display="block";else $(this.element).slideDown();c.setClass(this.element,"opened");this.updateDesc()}},hide:function(b){if(this.isVisible()){if(!b||$.browser.msie)this.element.style.display="none";else $(this.element).slideUp();
104
- c.removeClass(this.element,"opened");this.removeSelection()}},isVisible:function(){return c.hasClass(this.element,"opened")},toggle:function(b){this.isVisible()?this.hide(b):this.show(b)},render:function(b){this.element=this.tag.replace({input:{log:{pages:[]}}},b,this);this.recalcLayout();return this.element},append:function(b){if(this.element){var e=c.getElementByClass(this.element,"pageTimelineRow");this.graphCols.insertCols({input:b},e,this);this.recalcLayout();this.updateDesc()}}});a.Desc=domplate({tag:DIV({"class":"pageDescBox"},
105
- DIV({"class":"connector"}),DIV({"class":"desc"},SPAN({"class":"summary"},"$object|getSummary"),SPAN({"class":"time"},"$object.page|getTime"),SPAN({"class":"title"},"$object.page|getTitle"),PRE({"class":"comment"},"$object.page|getComment"))),getSummary:function(b){var e="",l=b.page.pageTimings.onLoad;if(l>0)e+=j.pageLoad+": "+c.formatTime(l)+", ";b=h.getPageEntries(b.input,b.page).length;e+=b+" "+(b==1?j.request:j.requests);return e},getTime:function(b){b=c.parseISO8601(b.startedDateTime);return(new Date(b)).toLocaleString()},
106
- getTitle:function(b){return b.title},getComment:function(b){return b.comment?b.comment:""},render:function(b,e){b=this.tag.replace({object:{input:e.input,page:e.page}},b);c.$(b,"connector").style.marginLeft=e.parentNode.offsetLeft+"px";return b}});var d={isSelected:function(b){return c.hasClass(b,"selected")},toggle:function(b){c.toggleClass(b,"selected")},select:function(b){this.isSelected(b)||c.setClass(b,"selected")},unselect:function(b){this.isSelected(b)&&c.removeClass(b,"selected")},getSelection:function(b){var e=
107
- [];b=c.getElementsByClass(b,"pageBar");for(var l=0;l<b.length;l++){var m=b[l];this.isSelected(m)&&e.push(m.page)}return e},unselectAll:function(b,e){b=c.getElementsByClass(b,"pageBar");for(var l=0;l<b.length;l++)e!=b[l]&&this.unselect(b[l])}};return a}});
108
- require.def("i18n!nls/pageStats",{root:{pieLabelDNS:"DNS",pieLabelSSL:"SSL/TLS",pieLabelConnect:"Connect",pieLabelBlocked:"Blocked",pieLabelSend:"Send",pieLabelWait:"Wait",pieLabelReceive:"Receive",pieLabelHTMLText:"HTML/Text",pieLabelJavaScript:"JavaScript",pieLabelCSS:"CSS",pieLabelImage:"Image",pieLabelFlash:"Flash",pieLabelOthers:"Others",pieLabelHeadersSent:"Headers Sent",pieLabelBodiesSent:"Bodies Sent",pieLabelHeadersReceived:"Headers Received",pieLabelBodiesReceived:"Bodies Received",pieLabelDownloaded:"Downloaded",
109
- pieLabelPartial:"Partial",pieLabelFromCache:"From Cache"}});
110
- require.def("tabs/pageStats",["domplate/domplate","core/lib","i18n!nls/pageStats","preview/harSchema","preview/harModel","core/cookies","domplate/infoTip","core/trace"],function(n,c,g,j,h,a,d){with(n){var b=function(){};b.prototype={data:[],title:"",getLabelTooltipText:function(q){return q.label+": "+c.formatSize(q.value)},cleanUp:function(){for(var q=0;q<this.data.length;q++){this.data[q].value=0;this.data[q].count=0}}};n=function(){};n.prototype=c.extend(b.prototype,{title:"Summary of request times.",
111
- data:[{value:0,label:g.pieLabelDNS,color:"rgb(119, 192, 203)"},{value:0,label:g.pieLabelSSL,color:"rgb(168, 196, 173)"},{value:0,label:g.pieLabelConnect,color:"rgb(179, 222, 93)"},{value:0,label:g.pieLabelBlocked,color:"rgb(228, 214, 193)"},{value:0,label:g.pieLabelSend,color:"rgb(224, 171, 157)"},{value:0,label:g.pieLabelWait,color:"rgb(163, 150, 190)"},{value:0,label:g.pieLabelReceive,color:"rgb(194, 194, 194)"}],getLabelTooltipText:function(q){return q.label+": "+c.formatTime(q.value)}});j=function(){};
112
- j.prototype=c.extend(b.prototype,{title:"Summary of content types.",data:[{value:0,label:g.pieLabelHTMLText,color:"rgb(174, 234, 218)"},{value:0,label:g.pieLabelJavaScript,color:"rgb(245, 230, 186)"},{value:0,label:g.pieLabelCSS,color:"rgb(212, 204, 219)"},{value:0,label:g.pieLabelImage,color:"rgb(220, 171, 181)"},{value:0,label:g.pieLabelFlash,color:"rgb(166, 156, 222)"},{value:0,label:g.pieLabelOthers,color:"rgb(229, 171, 255)"}],getLabelTooltipText:function(q){return q.count+"x "+q.label+": "+
113
- c.formatSize(q.value)}});h=function(){};h.prototype=c.extend(b.prototype,{title:"Summary of sent and received bodies & headers.",data:[{value:0,label:g.pieLabelHeadersSent,color:"rgb(247, 179, 227)"},{value:0,label:g.pieLabelBodiesSent,color:"rgb(226, 160, 241)"},{value:0,label:g.pieLabelHeadersReceived,color:"rgb(166, 232, 166)"},{value:0,label:g.pieLabelBodiesReceived,color:"rgb(168, 196, 173)"}]});a=function(){};a.prototype=c.extend(b.prototype,{title:"Comparison of downloaded data from the server and browser cache.",
114
- data:[{value:0,label:g.pieLabelDownloaded,color:"rgb(182, 182, 182)"},{value:0,label:g.pieLabelPartial,color:"rgb(218, 218, 218)"},{value:0,label:g.pieLabelFromCache,color:"rgb(239, 239, 239)"}],getLabelTooltipText:function(q){return q.count+"x "+q.label+": "+c.formatSize(q.value)}});var e=new n,l=new j,m=new h,f=new a,k={"text/javascript":1,"text/jscript":1,"application/javascript":1,"application/x-javascript":1,"text/js":1},o={"text/plain":1,"text/html":1},p={"text/css":1},u={"image/png":1,"image/jpeg":1},
115
- v={"application/x-shockwave-flash":1};g=function(q,y){this.model=q;this.timeline=y;this.timeline.addListener(this)};g.prototype=domplate({element:null,tag:DIV({"class":"pageStatsBody",style:"height: auto; display: none"}),update:function(q){if(this.isVisible()){this.cleanUp();q.length||q.push(null);for(var y=0;y<q.length;y++){var t=q[y];t=t?this.model.getPageEntries(t):this.model.getAllEntries();for(var C=0;C<t.length;C++){var x=t[C];e.data[0].value+=x.timings.dns;e.data[1].value+=x.timings.ssl?x.timings.ssl:
116
- -1;e.data[2].value+=x.timings.connect;e.data[3].value+=x.timings.blocked;e.data[4].value+=x.timings.send;e.data[5].value+=x.timings.wait;e.data[6].value+=x.timings.receive;if(x.timings.ssl>0)e.data[2].value-=x.timings.ssl;var H=x.response,F=H.bodySize>0?H.bodySize:0,E=H.content.mimeType;E=(E=E?E.match(/^([^;]+)/)[1]:null)?E:H.content.mimeType;if(o[E]){l.data[0].value+=F;l.data[0].count++}else if(k[E]){l.data[1].value+=F;l.data[1].count++}else if(p[E]){l.data[2].value+=F;l.data[2].count++}else if(u[E]){l.data[3].value+=
117
- F;l.data[3].count++}else if(v[E]){l.data[4].value+=F;l.data[4].count++}else{l.data[5].value+=F;l.data[5].count++}m.data[0].value+=x.request.headersSize>0?x.request.headersSize:0;m.data[1].value+=x.request.bodySize>0?x.request.bodySize:0;m.data[2].value+=x.response.headersSize>0?x.response.headersSize:0;m.data[3].value+=F;if(x.response.status==206){f.data[1].value+=F;f.data[1].count++}else if(x.response.status==304){f.data[2].value+=F;f.data[2].count++}else if(F>0){f.data[0].value+=F;f.data[0].count++}}}b.draw(c.$(this.timingPie,
118
- "pieGraph"),e);b.draw(c.$(this.contentPie,"pieGraph"),l);b.draw(c.$(this.trafficPie,"pieGraph"),m);b.draw(c.$(this.cachePie,"pieGraph"),f)}},cleanUp:function(){e.cleanUp();l.cleanUp();m.cleanUp();f.cleanUp()},showInfoTip:function(q,y,t,C){return b.showInfoTip(q,y,t,C)},onSelectionChange:function(q){this.update(q)},show:function(q){if(!this.isVisible()){d.addListener(this);c.setClass(this.element,"opened");if(!q||$.browser.msie)this.element.style.display="block";else $(this.element).slideDown();this.update(this.timeline.getSelection())}},
119
- hide:function(q){if(this.isVisible()){d.removeListener(this);c.removeClass(this.element,"opened");if(!q||$.browser.msie)this.element.style.display="none";else $(this.element).slideUp()}},isVisible:function(){return c.hasClass(this.element,"opened")},toggle:function(q){this.isVisible()?this.hide(q):this.show(q)},render:function(q){this.element=this.tag.replace({},q);this.timingPie=b.render(e,this.element);this.contentPie=b.render(l,this.element);this.trafficPie=b.render(m,this.element);this.cachePie=
120
- b.render(f,this.element);this.cachePie.style.borderRight=0;return this.element}});b=domplate({tag:TABLE({"class":"pagePieTable",cellpadding:0,cellspacing:0,_repObject:"$pie"},TBODY(TR(TD({"class":"pieBox",title:"$pie.title"}),TD(FOR("item","$pie.data",DIV({"class":"pieLabel",_repObject:"$item"},SPAN({"class":"box",style:"background-color: $item.color"},"&nbsp;"),SPAN({"class":"label"},"$item.label"))))))),render:function(q,y){q=this.tag.append({pie:q},y);y=c.$(q,"pieBox");var t=document.createElement("canvas");
121
- t.setAttribute("class","pieGraph ");t.setAttribute("height","100");t.setAttribute("width","100");y.appendChild(t);typeof G_vmlCanvasManager!="undefined"&&G_vmlCanvasManager.initElement(t);return q},draw:function(q,y){if(q&&q.getContext){var t=q.getContext("2d"),C=Math.min(q.width,q.height)/2,x=[q.width/2,q.height/2];t.clearRect(0,0,q.width,q.height);q=0;y=y.data;var H=0;for(var F in y)H+=y[F].value;if(H)for(F=0;F<y.length;F++){var E=y[F].value/H;t.beginPath();t.moveTo(x[0],x[1]);t.arc(x[0],x[1],C,
122
- Math.PI*(-0.5+2*q),Math.PI*(-0.5+2*(q+E)),false);t.lineTo(x[0],x[1]);t.closePath();t.fillStyle=y[F].color;t.fill();q+=E}else{t.beginPath();t.moveTo(x[0],x[1]);t.arc(x[0],x[1],C,0,Math.PI*2,false);t.closePath();t.fillStyle="rgb(229,236,238)";t.lineStyle="lightgray";t.fill()}}},showInfoTip:function(q,y){var t=c.getAncestorByClass(y,"pagePieTable");if(!t)return false;if(y=c.getAncestorByClass(y,"pieLabel")){w.render(t.repObject,y.repObject,q);return true}}});var w=domplate({tag:DIV({"class":"pieLabelInfoTip"},
123
- "$text"),getText:function(q){return q.label+": "+formatTime(q.value)},render:function(q,y,t){this.tag.replace({text:q.getLabelTooltipText(y)},t)}});return g}});
124
- require.def("domplate/infoTip",["domplate/domplate","core/lib","core/trace"],function(n,c){with(n){n=c.extend({listeners:[],maxWidth:100,maxHeight:80,infoTipMargin:10,infoTipWindowPadding:25,tags:domplate({infoTipTag:DIV({"class":"infoTip"})}),initialize:function(){if(!$.browser.msie){var g=$("body");g.bind("mouseover",c.bind(this.onMouseMove,this));g.bind("mouseout",c.bind(this.onMouseOut,this));g.bind("mousemove",c.bind(this.onMouseMove,this));return this.infoTip=this.tags.infoTipTag.append({},
125
- c.getBody(document))}},showInfoTip:function(g,j,h,a,d,b){var e=c.getOverflowParent(j);if(c.dispatch2(this.listeners,"showInfoTip",[g,j,h+(e?e.scrollLeft:0),a,d,b])){d=g.ownerDocument.documentElement;j=d.clientWidth;d=d.clientHeight;if(h+g.offsetWidth+this.infoTipMargin>j-this.infoTipWindowPadding){g.style.left="auto";g.style.right=j-h+this.infoTipMargin+"px"}else{g.style.left=h+this.infoTipMargin+"px";g.style.right="auto"}g.style.top=a+g.offsetHeight+this.infoTipMargin>d?Math.max(0,d-(g.offsetHeight+
126
- this.infoTipMargin))+"px":a+this.infoTipMargin+"px";g.style.bottom="auto";g.setAttribute("active","true")}else this.hideInfoTip(g)},hideInfoTip:function(g){g&&g.removeAttribute("active")},onMouseOut:function(g){g.relatedTarget||this.hideInfoTip(this.infoTip)},onMouseMove:function(g){this.infoTip.setAttribute("multiline",false);this.showInfoTip(this.infoTip,g.target,g.clientX,g.clientY,g.rangeParent,g.rangeOffset)},populateTimingInfoTip:function(g,j){this.tags.colorTag.replace({rgbValue:j},g);return true},
127
- addListener:function(g){this.listeners.push(g)},removeListener:function(g){c.remove(this.listeners,g)}});n.initialize();return n}});
128
- require.def("i18n!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","request.Started":"Started","request.phase.Resolving":"DNS Lookup","request.phase.Connecting":"Connecting","request.phase.Blocking":"Blocking",
129
- "request.phase.Sending":"Sending","request.phase.Waiting":"Waiting","request.phase.Receiving":"Receiving",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"}});
130
- require.def("preview/requestList",["domplate/domplate","core/lib","i18n!nls/requestList","preview/harModel","core/cookies","preview/requestBody","domplate/infoTip","domplate/popupMenu"],function(n,c,g,j,h,a,d,b){with(n){n=function(f){this.input=f;d.addListener(this)};n.prototype=domplate({tableTag:TABLE({"class":"netTable",cellpadding:0,cellspacing:0,onclick:"$onClick"},TBODY(TR(TD({width:"20%"}),TD({width:"10%"}),TD({width:"10%"}),TD({width:"10%"}),TD({width:"50%"}),TD({width:"15px"})))),fileTag:FOR("file",
131
- "$files",TR({"class":"netRow loaded",$hasHeaders:"$file|hasResponseHeaders",$responseError:"$file|isError",$fromCache:"$file|isFromCache"},TD({"class":"netHrefCol netCol"},DIV({"class":"netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getHref"),DIV({"class":"netFullHrefLabel netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getFullHref")),TD({"class":"netStatusCol netCol"},DIV({"class":"netStatusLabel netLabel"},"$file|getStatus")),TD({"class":"netDomainCol netCol"},
132
- DIV({"class":"netDomainLabel netLabel"},"$file|getDomain")),TD({"class":"netSizeCol netCol"},DIV({"class":"netSizeLabel netLabel"},"$file|getSize")),TD({"class":"netTimeCol netCol"},DIV({"class":"netTimelineBar"},"&nbsp;",DIV({"class":"netResolvingBar netBar",style:"left: $file.offset"}),DIV({"class":"netConnectingBar netBar",style:"left: $file.offset"}),DIV({"class":"netBlockingBar netBar",style:"left: $file.offset"}),DIV({"class":"netSendingBar netBar",style:"left: $file.offset"}),DIV({"class":"netWaitingBar netBar",
133
- style:"left: $file.offset"}),DIV({"class":"netContentLoadBar netBar",style:"left: $file.offset"}),DIV({"class":"netWindowLoadBar netBar",style:"left: $file.offset"}),DIV({"class":"netReceivingBar netBar",style:"left: $file.offset; width: $file.width"},SPAN({"class":"netTimeLabel"},"$file|getElapsedTime")))),TD({"class":"netOptionsCol netCol"},DIV({"class":"netOptionsLabel netLabel",onclick:"$onOpenOptions"})))),headTag:TR({"class":"netHeadRow"},TD({"class":"netHeadCol",colspan:6},DIV({"class":"netHeadLabel"},
134
- "$doc.rootFile.href"))),netInfoTag:TR({"class":"netInfoRow"},TD({"class":"netInfoCol",colspan:6})),summaryTag:TR({"class":"netRow netSummaryRow"},TD({"class":"netCol",colspan:3},DIV({"class":"netCountLabel netSummaryLabel"},"-")),TD({"class":"netTotalSizeCol netCol"},DIV({"class":"netTotalSizeLabel netSummaryLabel"},"0KB")),TD({"class":"netTotalTimeCol netCol"},DIV({"class":"",style:"width: 100%"},DIV({"class":"netCacheSizeLabel netSummaryLabel"},"(",SPAN("0KB"),SPAN(" "+g.fromCache),")"),DIV({"class":"netTimeBar"},
135
- SPAN({"class":"netTotalTimeLabel netSummaryLabel"},"0ms")))),TD({"class":"netCol"})),getIndent:function(){return 0},isError:function(f){f=Math.floor(f.response.status/100);return f==4||f==5},isFromCache:function(f){return f.cache&&f.cache.afterRequest},getHref:function(f){return f.request.method+" "+c.getFileName(this.getFullHref(f))},getFullHref:function(f){return f.request.url},getStatus:function(f){return(f.response.status>0?f.response.status+" ":"")+f.response.statusText},getDomain:function(f){return c.getPrettyDomain(f.request.url)},
136
- getSize:function(f){var k=f.response.bodySize;return this.formatSize(k&&k!=-1?k:f.response.content.size)},hasResponseHeaders:function(){return true},formatSize:function(f){return c.formatSize(f)},getElapsedTime:function(f){return c.formatTime(f.time)},onClick:function(f){var k=$.event.fix(f||window.event);if(c.isLeftClick(f))if(k=c.getAncestorByClass(k.target,"netRow")){this.toggleHeadersRow(k);c.cancelEvent(f)}},toggleHeadersRow:function(f){if(c.hasClass(f,"hasHeaders")){var k=f.repObject;c.toggleClass(f,
137
- "opened");if(c.hasClass(f,"opened")){var o=this.netInfoTag.insertRows({},f)[0];o.repObject=k;(new a).render(o.firstChild,k)}else{o=f.nextSibling;c.getElementByClass(o,"netInfoBody");f.parentNode.removeChild(o)}}},onOpenOptions:function(f){var k=$.event.fix(f||window.event);c.cancelEvent(f);if(c.isLeftClick(f)){f=k.target;k=this.getOptionsMenuItems(c.getAncestorByClass(f,"netRow"));(new b({id:"requestContextMenu",items:k})).showPopup(f)}},getOptionsMenuItems:function(f){var k=f.repObject;return[{label:g.menuBreakTimeline,
138
- type:"checkbox",disabled:false,checked:f.phase.files[0]==k,command:c.bind(this.breakLayout,this,f)},"-",{label:g.menuOpenRequest,command:c.bind(this.openRequest,this,k)},{label:g.menuOpenResponse,disabled:!k.response.content.text,command:c.bind(this.openResponse,this,k)}]},openRequest:function(f,k){window.open(k.request.url)},openResponse:function(f,k){f=k.response.content.mimeType;var o=k.response.content.encoding;window.open("data:"+(f?f:"")+";"+(o?o:"")+","+k.response.content.text)},breakLayout:function(f,
139
- k){f=k.repObject;k.breakLayout=k.phase.files[0]!=f;k=c.getAncestorByClass(k,"netTable");f=j.getParentPage(this.input,f);this.updateLayout(k,f)},updateLayout:function(f,k){var o=j.getPageEntries(this.input,k);this.table=f;f=this.firstRow=this.table.firstChild.firstChild.nextSibling;this.phases=[];var p=h.getCookie("phaseInterval");p||(p=1E3);var u=null,v=k?c.parseISO8601(k.startedDateTime):null,w=0,q=0;if(k&&k.pageTimings){q=k.pageTimings;w=q.onLoad>0?q.onLoad:0;q=q.onContentLoad>0?q.onContentLoad:
140
- 0}for(var y=0;y<o.length;y++){var t=o[y];if(c.hasClass(f,"netInfoRow"))f=f.nextSibling;f.repObject=t;v||(v=c.parseISO8601(t.startedDateTime));var C=c.parseISO8601(t.startedDateTime),x=u?c.parseISO8601(u.getLastStartTime()):0;x=C-x>=p&&C>v+w;if(typeof f.breakLayout=="boolean")if(!u||f.breakLayout)u=this.startPhase(t);else u.addFile(t);else if(!u||x)u=this.startPhase(t);else u.addFile(t);if(u.startTime==undefined||u.startTime>C)u.startTime=C;if(u.endTime==undefined||u.endTime<C+t.time)u.endTime=C+t.time;
141
- if(t.phase==this.phases[0]&&u.endTime<v+w)u.endTime=v+w;if(t.phase==this.phases[0]&&u.endTime<v+q)u.endTime=v+q;f=f.nextSibling}this.updateTimeline(k);this.updateSummaries(k)},startPhase:function(f){f=new e(f);this.phases.push(f);return f},calculateFileTimes:function(f,k,o){if(o!=k.phase){o=k.phase;this.phaseStartTime=o.startTime;this.phaseEndTime=o.endTime;this.phaseElapsed=this.phaseEndTime-o.startTime}var p=k.timings.dns<0?0:k.timings.dns,u=p+(k.timings.connect<0?0:k.timings.connect),v=u+(k.timings.blocked<
142
- 0?0:k.timings.blocked),w=v+(k.timings.send<0?0:k.timings.send),q=w+(k.timings.wait<0?0:k.timings.wait),y=q+(k.timings.receive<0?0:k.timings.receive);this.barOffset=((c.parseISO8601(k.startedDateTime)-this.phaseStartTime)/this.phaseElapsed*100).toFixed(3);this.barResolvingWidth=(p/this.phaseElapsed*100).toFixed(3);this.barConnectingWidth=(u/this.phaseElapsed*100).toFixed(3);this.barBlockingWidth=(v/this.phaseElapsed*100).toFixed(3);this.barSendingWidth=(w/this.phaseElapsed*100).toFixed(3);this.barWaitingWidth=
143
- (q/this.phaseElapsed*100).toFixed(3);this.barReceivingWidth=(y/this.phaseElapsed*100).toFixed(3);if(f){p=c.parseISO8601(f.startedDateTime);u=f.pageTimings.onContentLoad;if(k.phase==this.phases[0]&&u>0)this.contentLoadBarOffset=((p+u-o.startTime)/this.phaseElapsed*100).toFixed(3);f=f.pageTimings.onLoad;if(k.phase==this.phases[0]&&f>0)this.windowLoadBarOffset=((p+f-o.startTime)/this.phaseElapsed*100).toFixed(3)}return o},updateTimeline:function(f){for(var k,o=this.firstRow;o;o=o.nextSibling){var p=
144
- o.repObject;if(p)if(!c.hasClass(o,"netInfoRow")){k=this.calculateFileTimes(f,p,k);o.phase=p.phase;delete p.phase;p=c.getElementByClass(o,"netResolvingBar");var u=p.nextSibling,v=u.nextSibling,w=v.nextSibling,q=w.nextSibling,y=q.nextSibling,t=y.nextSibling,C=t.nextSibling;p.style.left=u.style.left=v.style.left=w.style.left=q.style.left=C.style.left=this.barOffset+"%";p.style.width=this.barResolvingWidth+"%";u.style.width=this.barConnectingWidth+"%";v.style.width=this.barBlockingWidth+"%";w.style.width=
145
- this.barSendingWidth+"%";q.style.width=this.barWaitingWidth+"%";C.style.width=this.barReceivingWidth+"%";if(this.contentLoadBarOffset){y.style.left=this.contentLoadBarOffset+"%";y.style.display="block";this.contentLoadBarOffset=null}if(this.windowLoadBarOffset){t.style.left=this.windowLoadBarOffset+"%";t.style.display="block";this.windowLoadBarOffset=null}}}},updateSummaries:function(f){for(var k=this.phases,o=0,p=0,u=0,v=0,w=0;w<k.length;++w){var q=k[w];q.invalidPhase=false;q=this.summarizePhase(q);
146
- o+=q.fileCount;p+=q.totalSize;u+=q.cachedSize;v+=q.totalTime}if(k=this.summaryRow){c.getElementByClass(k,"netCountLabel").firstChild.nodeValue=this.formatRequestCount(o);o=c.getElementByClass(k,"netTotalSizeLabel");o.setAttribute("totalSize",p);o.firstChild.nodeValue=c.formatSize(p);p=c.getElementByClass(k,"netCacheSizeLabel");p.setAttribute("collapsed",u==0);p.childNodes[1].firstChild.nodeValue=c.formatSize(u);u=c.getElementByClass(k,"netTotalTimeLabel");v=c.formatTime(v);if(f&&f.pageTimings.onLoad>
147
- 0)v+=" (onload: "+c.formatTime(f.pageTimings.onLoad)+")";u.innerHTML=v}},formatRequestCount:function(f){return f+" "+(f==1?g.request:g.requests)},summarizePhase:function(f){var k=0,o=0,p="all";if(p=="all")p=null;for(var u=0,v=0,w=0,q=0;q<f.files.length;q++){var y=f.files[q],t=c.parseISO8601(y.startedDateTime);if(!p||y.category==p){++u;var C=y.response.bodySize;C=C&&C!=-1?C:y.response.content.size;o+=C;if(y.response.status==304)k+=C;if(!v||t<v)v=t;y=t+y.time;if(y>w)w=y}}return{cachedSize:k,totalSize:o,
148
- totalTime:w-v,fileCount:u}},showInfoTip:function(f,k){var o=c.getAncestorByClass(k,"netRow");if(o)if(c.getAncestorByClass(k,"netBar")){f.setAttribute("multiline",true);this.infoTipURL=k=o.repObject.startedDateTime+"-nettime";return this.populateTimeInfoTip(f,o)}else if(c.hasClass(k,"netSizeLabel")){this.infoTipURL=k=o.repObject.startedDateTime+"-netsize";return this.populateSizeInfoTip(f,o)}},populateTimeInfoTip:function(f,k){l.render(this.input,k,f);return true},populateSizeInfoTip:function(f,k){m.render(this.input,
149
- k,f);return true},render:function(f,k){var o=j.getPageEntries(this.input,k);if(o.length){this.table=this.tableTag.replace({},f,this);this.summaryRow=this.summaryTag.insertRows({},this.table.firstChild)[0];this.fileTag.insertRows({files:o},this.table.firstChild.lastChild.previousSibling,this);this.updateLayout(this.table,k)}}});var e=function(f){this.files=[];this.addFile(f)};e.prototype={addFile:function(f){this.files.push(f);f.phase=this},getLastStartTime:function(){return this.files[this.files.length-
150
- 1].startedDateTime}};var l=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"),
151
- TD({colspan:2},"$startTime|getLabel")),separatorTag:TR(TD({colspan:4,height:"10px"})),eventsTag:FOR("event","$events",TR({"class":"timeInfoTipEventRow"},TD({"class":"timeInfoTipBar",align:"center"},DIV({"class":"$event|getBarClass timeInfoTipEventBar"})),TD("$event.start|formatStartTime"),TD({colspan:2},"$event|getLabel"))),hideBar:function(f){return!f.elapsed&&f.bar=="request.phase.Blocking"},getBarClass:function(f){return"net"+f.bar.substr(f.bar.lastIndexOf(".")+1)+"Bar"},formatTime:function(f){return c.formatTime(f)},
152
- formatStartTime:function(f){var k=f>0,o=c.formatTime(Math.abs(f));if(!f)return o;return(k>0?"+":"-")+o},getLabel:function(f){return g[f.bar]},render:function(f,k,o){var p=k.repObject;var u=(f=j.getParentPage(f,p))?c.parseISO8601(f.startedDateTime):null,v=c.parseISO8601(p.startedDateTime);o=l.tableTag.replace({},o);var w={};w.time=v-k.phase.startTime;w.bar="request.Started";this.startTimeTag.insertRows({startTime:w},o.firstChild);this.separatorTag.insertRows({},o.firstChild);k=0;w=[];var q=p.timings.dns,
153
- y=p.timings.connect,t=p.timings.blocked,C=p.timings.send,x=p.timings.wait,H=p.timings.receive;q>=0&&w.push({bar:"request.phase.Resolving",elapsed:q,start:k});if(y>=0)w.push({bar:"request.phase.Connecting",elapsed:y,start:k+=q<0?0:q});if(t>=0)w.push({bar:"request.phase.Blocking",elapsed:t,start:k+=y<0?0:y});if(C>=0)w.push({bar:"request.phase.Sending",elapsed:C,start:k+=t<0?0:t});if(x>=0)w.push({bar:"request.phase.Waiting",elapsed:x,start:k+=C<0?0:C});if(H>=0)w.push({bar:"request.phase.Receiving",elapsed:H,
154
- start:k+(x<0?0:x),loaded:p.loaded,fromCache:p.fromCache});this.timingsTag.insertRows({timings:w},o.firstChild);p=[];f&&f.pageTimings.onContentLoad>0&&p.push({bar:"ContentLoad",start:u+f.pageTimings.onContentLoad-v});f&&f.pageTimings.onLoad>0&&p.push({bar:"WindowLoad",start:u+f.pageTimings.onLoad-v});if(p.length){this.separatorTag.insertRows({},o.firstChild);this.eventsTag.insertRows({events:p},o.firstChild);return true}}}),m=domplate({tag:DIV({"class":"sizeInfoTip"},"$file|getSize"),zippedTag:DIV(DIV({"class":"sizeInfoTip"},
155
- "$file|getBodySize"),DIV({"class":"sizeInfoTip"},"$file|getContentSize")),getSize:function(f){f=f.response.bodySize;return c.formatString(g.tooltipSize,[c.formatSize(f),f.size<0?"?":c.formatNumber(f)])},getBodySize:function(f){f=f.response.bodySize;return c.formatString(g.tooltipZippedSize,[c.formatSize(f),f.size<0?"?":c.formatNumber(f)])},getContentSize:function(f){f=f.response.content.size;return c.formatString(g.tooltipUnzippedSize,[c.formatSize(f),f.size<0?"?":c.formatNumber(f)])},render:function(f,
156
- k,o){f=k.repObject;if(f.response.bodySize==f.response.content.size)return this.tag.replace({file:f},o);return this.zippedTag.replace({file:f},o)}});return n}});
157
- require.def("preview/pageList",["domplate/domplate","core/lib","core/trace","preview/requestList"],function(n,c,g,j){with(n){n=function(h){this.input=h};n.prototype=domplate({tableTag:TABLE({"class":"pageTable",cellpadding:0,cellspacing:0,onclick:"$onClick",_repObject:"$input"},TBODY(TAG("$rowTag",{groups:"$input.log.pages"}))),rowTag:FOR("group","$groups",TR({"class":"pageRow",_repObject:"$group"},TD({"class":"groupName pageCol"},SPAN({"class":"pageName"},"$group|getPageTitle")))),bodyTag:TR({"class":"pageInfoRow",
158
- style:"height:auto;"},TD({"class":"pageInfoCol"})),getPageTitle:function(h){return c.cropString(h.title,100)},getPageID:function(h){return"["+h.id+"]"},onClick:function(h){var a=$.event.fix(h||window.event);if(c.isLeftClick(h))if(a=c.getAncestorByClass(a.target,"pageRow")){this.toggleRow(a);c.cancelEvent(h)}},toggleRow:function(h,a){if(!(c.hasClass(h,"opened")&&a)){c.toggleClass(h,"opened");if(c.hasClass(h,"opened")){a=this.bodyTag.insertRows({},h)[0];(new j(this.input)).render(a.firstChild,h.repObject)}else{a=
159
- h.nextSibling;h.parentNode.removeChild(a)}}},expandAll:function(h){for(h=h.firstChild.firstChild;h;){hasClass(h,"pageRow")&&this.toggleRow(h,true);h=h.nextSibling}},getPageRow:function(h){for(var a=c.getElementsByClass(this.element.parentNode,"pageRow"),d=0;d<a.length;d++){var b=a[d];if(b.repObject==h)return b}},togglePage:function(h){this.toggleRow(this.getPageRow(h))},expandPage:function(h){this.toggleRow(this.getPageRow(h),true)},collapsePage:function(h){h=this.getPageRow(h);c.hasClass(h,"opened")&&
160
- this.toggleRow(h)},append:function(h){(new j(this.input)).render(h,null);var a=this.input.log.pages;if(a&&a.length){h=this.tableTag.append({input:this.input},h,this);h.firstChild.childNodes.length==1&&h.parentNode.childNodes.length==1&&this.toggleRow(h.firstChild.firstChild)}},render:function(h){this.append(h)}});return n}});
161
- require.def("i18n!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"}});
162
- require.def("preview/requestBody",["domplate/domplate","i18n!nls/requestBody","core/lib","domplate/tabView","syntax-highlighter/shCore"],function(n,c,g,j,h){with(n){n=function(){};n.prototype=domplate({render:function(f,k){var o=new j("requestBody");o.appendTab(new a(k));k.request.queryString&&k.request.queryString.length&&o.appendTab(new b(k));k.request.postData&&o.appendTab(new e(k,k.request.method));k.response.content.size>0&&o.appendTab(new d(k));this.showCache(k)&&o.appendTab(new l(k));this.showHtml(k)&&
163
- o.appendTab(new m(k));f=o.render(f);o.selectTabByName("Headers");return f},showCache:function(f){if(!f.cache)return false;if(!f.cache.afterRequest)return false;if(f.category=="image")return false;return true},showHtml:function(f){return f.response.content.mimeType=="text/html"||f.mimeType=="application/xhtml+xml"}});var a=function(f){this.file=f};a.prototype=domplate(j.Tab.prototype,{id:"Headers",label:c.Headers,bodyTag:TABLE({"class":"netInfoHeadersText netInfoText netInfoHeadersTable",cellpadding:0,
164
- cellspacing:0},TBODY(TR({"class":"netInfoResponseHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},c.ResponseHeaders))),TR({"class":"netInfoRequestHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},c.RequestHeaders))))),headerDataTag:FOR("param","$headers",TR(TD({"class":"netInfoParamName"},"$param.name"),TD({"class":"netInfoParamValue"},PRE("$param|getParamValue")))),getParamValue:function(f){return g.wrapText(f.value,true)},onUpdateBody:function(f,k){this.file.response.headers&&
165
- this.insertHeaderRows(k,this.file.response.headers,"Headers","ResponseHeaders");this.file.request.headers&&this.insertHeaderRows(k,this.file.request.headers,"Headers","RequestHeaders")},insertHeaderRows:function(f,k,o,p){o=g.getElementByClass(f,"netInfo"+o+"Table");p=g.getElementByClass(o,"netInfo"+p+"Title");if(k.length){this.headerDataTag.insertRows({headers:k},p?p:f);g.removeClass(p,"collapsed")}else g.setClass(p,"collapsed")}});var d=function(f){this.file=f};d.prototype=domplate(j.Tab.prototype,
166
- {id:"Response",label:c.Response,bodyTag:DIV({"class":"netInfoResponseText netInfoText"},PRE({"class":"javascript:nocontrols:nogutter:",name:"code"})),onUpdateBody:function(f,k){f=g.getElementByClass(k,"netInfoResponseText");if(this.file.category=="image"){g.clearNode(f);k=k.ownerDocument.createElement("img");k.src=this.file.href;f.appendChild(k,f)}else{g.clearNode(f.firstChild);k=this.file.response.content.text;var o=this.file.response.content.mimeType;if(o=="application/javascript"||o=="text/javascript"||
167
- o=="application/x-javascript"||o=="text/ecmascript"||o=="application/ecmascript"){f.firstChild.innerHTML=k;h.SyntaxHighlighter.HighlightAll(f.firstChild)}else g.insertWrappedText(k,f.firstChild)}}});var b=function(f){this.file=f};b.prototype=domplate(a.prototype,{id:"Params",label:c.URLParameters,bodyTag:TABLE({"class":"netInfoParamsText netInfoText netInfoParamsTable",cellpadding:0,cellspacing:0},TBODY()),onUpdateBody:function(f,k){this.file.request.queryString&&this.insertHeaderRows(g.getElementByClass(k,
168
- "netInfoParamsText"),this.file.request.queryString,"Params")}});var e=function(f,k){k=k.charAt(0).toUpperCase()+k.slice(1).toLowerCase();this.file=f;this.id=k;this.label=c[k]};e.prototype=domplate(a.prototype,{bodyTag:DIV({"class":"netInfo$tab.id\\Text netInfoText"},TABLE({"class":"netInfo$tab.id\\Table",cellpadding:0,cellspacing:0},TBODY())),onUpdateBody:function(f,k){if(f=this.file.request.postData){k=g.getElementByClass(k,"netInfo"+this.id+"Text");f.mimeType=="application/x-www-form-urlencoded"?
169
- this.insertHeaderRows(k,f.params,this.id):g.insertWrappedText(f.text,k)}}});(function(f){this.file=f}).prototype=domplate(a.prototype,{id:"Cookies",label:c.Cookies,bodyTag:DIV({"class":"netInfoCookiesText netInfoText"},TABLE({"class":"netInfoCookiesTable",cellpadding:0,cellspacing:0},TBODY(TR({"class":"netInfoResponseCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},c.ResponseCookies))),TR({"class":"netInfoRequestCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},c.RequestCookies)))))),
170
- onUpdateBody:function(f,k){if(file.response.cookies){f=g.getElementByClass(k,"netInfoParamsText");this.insertHeaderRows(f,file.response.cookies,"Cookies","ResponseCookies")}if(file.request.cookies){f=g.getElementByClass(k,"netInfoParamsText");this.insertHeaderRows(f,file.request.cookies,"Cookies","RequestCookies")}}});var l=function(f){this.file=f};l.prototype=domplate(a.prototype,{id:"Cache",label:c.Cache,bodyTag:DIV({"class":"netInfoCacheText netInfoText"},TABLE({"class":"netInfoCacheTable",cellpadding:0,
171
- cellspacing:0},TBODY())),onUpdateBody:function(f,k){if(this.file.cache&&this.file.cache.afterRequest){f=this.file.cache.afterRequest;var o=[];for(var p in f)o.push({name:p,value:f[p]});this.insertHeaderRows(k,o,"Cache")}}});var m=function(f){this.file=f};m.prototype=domplate(a.prototype,{id:"HTML",label:c.HTML,bodyTag:DIV({"class":"netInfoHtmlText netInfoText"},IFRAME({"class":"netInfoHtmlPreview"})),onUpdateBody:function(f,k){g.getElementByClass(k,"netInfoHtmlPreview").contentWindow.document.body.innerHTML=
172
- this.file.response.content.text}});return n}});
173
- require.def("syntax-highlighter/shCore",[],function(){var n={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:'<html><head><title>About...</title></head><body class="dp-about"><table cellspacing="0"><tr><td class="copy"><p class="title">dp.SyntaxHighlighter</div><div class="para">Version: {V}</p><p><a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/syntaxhighlighter</a></p>&copy;2004-2007 Alex Gorbatchev.</td></tr><tr><td class="footer"><input type="button" class="close" value="OK" onClick="window.close()"/></td></tr></table></body></html>'},ClipboardSwf:null,
174
- Version:"1.5.1"}};n.SyntaxHighlighter=n.sh;n.sh.Toolbar.Commands={ExpandSource:{label:"+ expand source",check:function(c){return c.collapse},func:function(c,g){c.parentNode.removeChild(c);g.div.className=g.div.className.replace("collapsed","")}},ViewSource:{label:"view plain",func:function(c,g){c=n.sh.Utils.FixForBlogger(g.originalCode).replace(/</g,"&lt;");g=window.open("","_blank","width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0");g.document.write('<textarea style="width:99%;height:99%">'+
175
- c+"</textarea>");g.document.close()}},CopyToClipboard:{label:"copy to clipboard",check:function(){return window.clipboardData!=null||n.sh.ClipboardSwf!=null},func:function(c,g){c=n.sh.Utils.FixForBlogger(g.originalCode).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");if(window.clipboardData)window.clipboardData.setData("text",c);else if(n.sh.ClipboardSwf!=null){var j=g.flashCopier;if(j==null){j=document.createElement("div");g.flashCopier=j;g.div.appendChild(j)}j.innerHTML='<embed src="'+
176
- n.sh.ClipboardSwf+'" FlashVars="clipboard='+encodeURIComponent(c)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>'}alert("The code is in your clipboard now")}},PrintSource:{label:"print",func:function(c,g){c=document.createElement("IFRAME");var j=null;c.style.cssText="position:absolute;width:0px;height:0px;left:-500px;top:-500px;";document.body.appendChild(c);j=c.contentWindow.document;n.sh.Utils.CopyStyles(j,window.document);j.write('<div class="'+g.div.className.replace("collapsed",
177
- "")+' printing">'+g.div.innerHTML+"</div>");j.close();c.contentWindow.focus();c.contentWindow.print();alert("Printing...");document.body.removeChild(c)}},About:{label:"?",func:function(){var c=window.open("","_blank","dialog,width=300,height=150,scrollbars=0"),g=c.document;n.sh.Utils.CopyStyles(g,window.document);g.write(n.sh.Strings.AboutDialog.replace("{V}",n.sh.Version));g.close();c.focus()}}};n.sh.Toolbar.Create=function(c){var g=document.createElement("DIV");g.className="tools";for(var j in n.sh.Toolbar.Commands){var h=
178
- n.sh.Toolbar.Commands[j];h.check!=null&&!h.check(c)||(g.innerHTML+='<a href="#" onclick="dp.sh.Toolbar.Command(\''+j+"',this);return false;\">"+h.label+"</a>")}return g};n.sh.Toolbar.Command=function(c,g){for(var j=g;j!=null&&j.className.indexOf("dp-highlighter")==-1;)j=j.parentNode;j!=null&&n.sh.Toolbar.Commands[c].func(g,j.highlighter)};n.sh.Utils.CopyStyles=function(c,g){g=g.getElementsByTagName("link");for(var j=0;j<g.length;j++)g[j].rel.toLowerCase()=="stylesheet"&&c.write('<link type="text/css" rel="stylesheet" href="'+
179
- g[j].href+'"></link>')};n.sh.Utils.FixForBlogger=function(c){return n.sh.isBloggerMode==true?c.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/gi,"\n"):c};n.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")};n.sh.Match=function(c,g,j){this.value=c;this.index=g;this.length=
180
- c.length;this.css=j};n.sh.Highlighter=function(){this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true};n.sh.Highlighter.SortCallback=function(c,g){if(c.index<g.index)return-1;else if(c.index>g.index)return 1;else if(c.length<g.length)return-1;else if(c.length>g.length)return 1;return 0};n.sh.Highlighter.prototype.CreateElement=function(c){c=document.createElement(c);c.highlighter=this;return c};n.sh.Highlighter.prototype.GetMatches=
181
- function(c,g){for(var j=null;(j=c.exec(this.code))!=null;)this.matches[this.matches.length]=new n.sh.Match(j[0],j.index,g)};n.sh.Highlighter.prototype.AddBit=function(c,g){if(!(c==null||c.length==0)){var j=this.CreateElement("SPAN");c=c.replace(/ /g,"&nbsp;");c=c.replace(/</g,"&lt;");c=c.replace(/\n/gm,"&nbsp;<br>");if(g!=null)if(/br/gi.test(c)){c=c.split("&nbsp;<br>");for(var h=0;h<c.length;h++){j=this.CreateElement("SPAN");j.className=g;j.innerHTML=c[h];this.div.appendChild(j);h+1<c.length&&this.div.appendChild(this.CreateElement("BR"))}}else{j.className=
182
- g;j.innerHTML=c;this.div.appendChild(j)}else{j.innerHTML=c;this.div.appendChild(j)}}};n.sh.Highlighter.prototype.IsInside=function(c){if(c==null||c.length==0)return false;for(var g=0;g<this.matches.length;g++){var j=this.matches[g];if(j!=null)if(c.index>j.index&&c.index<j.index+j.length)return true}return false};n.sh.Highlighter.prototype.ProcessRegexList=function(){for(var c=0;c<this.regexList.length;c++)this.GetMatches(this.regexList[c].regex,this.regexList[c].css)};n.sh.Highlighter.prototype.ProcessSmartTabs=
183
- function(c){function g(b,e,l){var m=b.substr(0,e);b=b.substr(e+1,b.length);e="";for(var f=0;f<l;f++)e+=" ";return m+e+b}function j(b,e){if(b.indexOf(a)==-1)return b;for(var l=0;(l=b.indexOf(a))!=-1;)b=g(b,l,e-l%e);return b}c=c.split("\n");for(var h="",a="\t",d=0;d<c.length;d++)h+=j(c[d],4)+"\n";return h};n.sh.Highlighter.prototype.SwitchToList=function(){var c=this.div.innerHTML.replace(/<(br)\/?>/gi,"\n").split("\n");this.addControls==true&&this.bar.appendChild(n.sh.Toolbar.Create(this));if(this.showColumns){for(var g=
184
- this.CreateElement("div"),j=this.CreateElement("div"),h=1;h<=150;)if(h%10==0){g.innerHTML+=h;h+=(h+"").length}else{g.innerHTML+="&middot;";h++}j.className="columns";j.appendChild(g);this.bar.appendChild(j)}h=0;for(g=this.firstLine;h<c.length-1;h++,g++){j=this.CreateElement("LI");var a=this.CreateElement("SPAN");j.className=h%2==0?"alt":"";a.innerHTML=c[h]+"&nbsp;";j.appendChild(a);this.ol.appendChild(j)}this.div.innerHTML=""};n.sh.Highlighter.prototype.Highlight=function(c){function g(e){return e.replace(/^\s*(.*?)[\s\n]*$/g,
185
- "$1")}function j(e){return e.replace(/\n*$/,"").replace(/^\n*/,"")}function h(e){e=n.sh.Utils.FixForBlogger(e).split("\n");for(var l=new RegExp("^\\s*","g"),m=1E3,f=0;f<e.length&&m>0;f++)if(g(e[f]).length!=0){var k=l.exec(e[f]);if(k!=null&&k.length>0)m=Math.min(k[0].length,m)}if(m>0)for(f=0;f<e.length;f++)e[f]=e[f].substr(m);return e.join("\n")}function a(e,l,m){return e.substr(l,m-l)}var d=0;if(c==null)c="";this.originalCode=c;this.code=j(h(c));this.div=this.CreateElement("DIV");this.bar=this.CreateElement("DIV");
186
- this.ol=this.CreateElement("OL");this.matches=[];this.div.className="dp-highlighter";this.div.highlighter=this;this.bar.className="bar";this.ol.start=this.firstLine;if(this.CssClass!=null)this.ol.className=this.CssClass;if(this.collapse)this.div.className+=" collapsed";if(this.noGutter)this.div.className+=" nogutter";if(this.tabsToSpaces==true)this.code=this.ProcessSmartTabs(this.code);this.ProcessRegexList();if(this.matches.length==0)this.AddBit(this.code,null);else{this.matches=this.matches.sort(n.sh.Highlighter.SortCallback);
187
- for(c=0;c<this.matches.length;c++)if(this.IsInside(this.matches[c]))this.matches[c]=null;for(c=0;c<this.matches.length;c++){var b=this.matches[c];if(!(b==null||b.length==0)){this.AddBit(a(this.code,d,b.index),null);this.AddBit(b.value,b.css);d=b.index+b.length}}this.AddBit(this.code.substr(d),null)}this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol)};n.sh.Highlighter.prototype.GetKeywords=function(c){return"\\b"+c.replace(/ /g,"\\b|\\b")+"\\b"};n.sh.BloggerMode=function(){n.sh.isBloggerMode=
188
- true};n.sh.HighlightAll=function(c,g,j,h,a,d){function b(){for(var y=arguments,t=0;t<y.length;t++)if(y[t]!=null){if(typeof y[t]=="string"&&y[t]!="")return y[t]+"";if(typeof y[t]=="object"&&y[t].value!="")return y[t].value+""}return null}function e(y,t){for(var C=0;C<t.length;C++)if(t[C]==y)return true;return false}function l(y,t,C){y=new RegExp("^"+y+"\\[(\\w+)\\]$","gi");for(var x=null,H=0;H<t.length;H++)if((x=y.exec(t[H]))!=null)return x[1];return C}function m(y,t,C){C=document.getElementsByTagName(C);
189
- for(var x=0;x<C.length;x++)C[x].getAttribute("name")==t&&y.push(C[x])}var f=[],k=null,o={};if(typeof c=="string"){m(f,c,"pre");m(f,c,"textarea")}else f.push(c);if(f.length!=0){for(var p in n.sh.Brushes){k=n.sh.Brushes[p].Aliases;if(k!=null)for(c=0;c<k.length;c++)o[k[c]]=p}for(c=0;c<f.length;c++){p=f[c];var u=b(p.attributes["class"],p.className,p.attributes.language,p.language);k="";if(u!=null){u=u.split(":");k=u[0].toLowerCase();if(o[k]!=null){k=new n.sh.Brushes[o[k]];p.style.display="none";k.noGutter=
190
- g==null?e("nogutter",u):!g;k.addControls=j==null?!e("nocontrols",u):j;k.collapse=h==null?e("collapse",u):h;k.showColumns=d==null?e("showcolumns",u):d;var v=document.getElementsByTagName("head")[0];if(k.Style&&v){var w=document.createElement("style");w.setAttribute("type","text/css");if(w.styleSheet)w.styleSheet.cssText=k.Style;else{var q=document.createTextNode(k.Style);w.appendChild(q)}v.appendChild(w)}k.firstLine=a==null?parseInt(l("firstline",u,1)):a;k.Highlight(p.innerHTML);k.source=p;p.parentNode.insertBefore(k.div,
191
- p)}}}}};n.sh.Brushes.JScript=function(){this.regexList=[{regex:n.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:n.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:n.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:n.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords("abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with"),
192
- "gm"),css:"keyword"}];this.CssClass="dp-c"};n.sh.Brushes.JScript.prototype=new n.sh.Highlighter;n.sh.Brushes.JScript.Aliases=["js","jscript","javascript"];return n});
193
- require.def("domplate/popupMenu",["domplate/domplate","core/lib","core/trace"],function(n,c){with(n){var g={controllers:[],controllerContext:{label:"controller context"},initialize:function(d){this.controllers=[];this.controllerContext=d||this.controllerContext},shutdown:function(){this.removeControllers()},addController:function(){for(var d=0,b;b=arguments[d];d++){if(typeof b[0]=="string")b[0]=$$(b[0],this.controllerContext);var e=b[2];b[2]=c.bind(e,this);b[3]=e;this.controllers.push(b);c.addEventListener.apply(this,
194
- b)}},removeController:function(){for(var d=0,b;b=arguments[d];d++)for(var e=0,l;l=this.controllers[e];e++)b[0]==l[0]&&b[1]==l[1]&&b[2]==l[3]&&c.removeEventListener.apply(this,l)},removeControllers:function(){for(var d=0,b;b=this.controllers[d];d++)c.removeEventListener.apply(this,b)}};n={"class":"$item.className",type:"$item.type",value:"$item.value",_command:"$item.command"};if(c.isIE6)n.href="javascript:void(0)";var j=domplate({tag:DIV({"class":"popupMenu popupMenuShadow"},DIV({"class":"popupMenuContent popupMenuShadowContent"},
195
- FOR("item","$object.items|memberIterator",TAG("$item.tag",{item:"$item"})))),itemTag:A(n,"$item.label"),checkBoxTag:A(c.extend(n,{checked:"$item.checked"}),"$item.label"),radioButtonTag:A(c.extend(n,{selected:"$item.selected"}),"$item.label"),groupTag:A(c.extend(n,{child:"$item.child"}),"$item.label"),shortcutTag:A(n,"$item.label",SPAN({"class":"popupMenuShortcutKey"},"$item.key")),separatorTag:SPAN({"class":"popupMenuSeparator"}),memberIterator:function(d){for(var b=[],e=0,l=d.length;e<l;e++){var m=
196
- d[e];if(typeof m=="string"&&m.indexOf("-")==0)b.push({tag:this.separatorTag});else{m=c.extend(m,{});m.type=m.type||"";m.value=m.value||"";var f=m.type;m.tag=this.itemTag;var k=m.className||"";k+="popupMenuOption ";if(f=="checkbox"){k+="popupMenuCheckBox ";m.tag=this.checkBoxTag}else if(f=="radio"){k+="popupMenuRadioButton ";m.tag=this.radioButtonTag}else if(f=="group"){k+="popupMenuGroup ";m.tag=this.groupTag}else if(f=="shortcut"){k+="popupMenuShortcut ";m.tag=this.shortcutTag}if(m.checked)k+="popupMenuChecked ";
197
- else if(m.selected)k+="popupMenuRadioSelected ";if(m.disabled)k+="popupMenuDisabled ";m.className=k;m.label=m.label;b.push(m)}}return b}}),h=function(d){if(!d.element){if(d.getItems)d.items=d.getItems();var b=c.getBody(document);d.element=j.tag.append({object:d},b,j)}c.append(this,d);if(typeof this.element=="string"){this.id=this.element;this.element=$(this.id)}else if(this.id)this.element.id=this.id;this.elementStyle=this.element.style;this.isVisible=false;this.handleMouseDown=c.bind(this.handleMouseDown,
198
- this);this.handleMouseOver=c.bind(this.handleMouseOver,this);this.handleMouseOut=c.bind(this.handleMouseOut,this);this.handleWindowMouseDown=c.bind(this.handleWindowMouseDown,this)},a={};h.prototype=c.extend(g,{initialize:function(){g.initialize.call(this);this.addController([this.element,"mousedown",this.handleMouseDown],[this.element,"mouseover",this.handleMouseOver])},destroy:function(){this.hide();if(this.parentMenu)this.parentMenu.childMenu=null;this.element.parentNode.removeChild(this.element);
199
- this.parentTarget=this.parentMenu=this.elementStyle=this.element=null},shutdown:function(){g.shutdown.call(this)},showPopup:function(d){var b=c.isIE6?1:-4;d=c.getElementBox(d);var e={top:0,left:0};this.show(d.left+b-e.left,d.top+d.height-5-e.top)},show:function(d,b){this.initialize();if(!this.isVisible){d=d||0;b=b||0;if(this.parentMenu){var e=this.parentMenu.childMenu;e&&e!=this&&e.destroy();this.parentMenu.childMenu=this}else c.addEventListener(document,"mousedown",this.handleWindowMouseDown);this.elementStyle.display=
200
- "block";this.elementStyle.visibility="hidden";e=c.getWindowSize();d=Math.min(d,e.width-this.element.clientWidth-10);d=Math.max(d,0);b=Math.min(b,e.height-this.element.clientHeight-10);b=Math.max(b,0);this.elementStyle.left=d+"px";this.elementStyle.top=b+"px";this.elementStyle.visibility="visible";this.isVisible=true;c.isFunction(this.onShow)&&this.onShow.apply(this,arguments)}},hide:function(){this.clearHideTimeout();this.clearShowChildTimeout();if(this.isVisible){this.elementStyle.display="none";
201
- if(this.childMenu){this.childMenu.destroy();this.childMenu=null}this.parentTarget&&c.removeClass(this.parentTarget,"popupMenuGroupSelected");this.isVisible=false;this.shutdown();c.isFunction(this.onHide)&&this.onHide.apply(this,arguments)}},showChildMenu:function(d){var b=d.getAttribute("child"),e=this;d=d;this.showChildTimeout=window.setTimeout(function(){var l=c.getElementBox(d),m=a.hasOwnProperty(b)?a[b]:{element:$(b)};(new h(c.extend(m,{parentMenu:e,parentTarget:d}))).show(l.left+l.width+(c.isIE6?
202
- -1:-6),l.top-6);c.setClass(d,"popupMenuGroupSelected")},350)},clearHideTimeout:function(){if(this.hideTimeout){window.clearTimeout(this.hideTimeout);delete this.hideTimeout}},clearShowChildTimeout:function(){if(this.showChildTimeout){window.clearTimeout(this.showChildTimeout);this.showChildTimeout=null}},handleMouseDown:function(d){c.cancelEvent(d,true);for(var b=this;b.parentMenu;)b=b.parentMenu;d=d.target||d.srcElement;d=c.getAncestorByClass(d,"popupMenuOption");if(!d||c.hasClass(d,"popupMenuGroup"))return false;
203
- if(d&&!c.hasClass(d,"popupMenuDisabled")){var e=d.getAttribute("type");if(e=="checkbox"){d.getAttribute("checked");var l=d.getAttribute("value"),m=c.hasClass(d,"popupMenuChecked");if(m){c.removeClass(d,"popupMenuChecked");d.setAttribute("checked","")}else{c.setClass(d,"popupMenuChecked");d.setAttribute("checked","true")}c.isFunction(this.onCheck)&&this.onCheck.call(this,d,l,!m)}if(e=="radiobutton"){e=c.getElementsByClass(d.parentNode,"popupMenuRadioSelected");l=d.getAttribute("group");m=0;for(var f=
204
- e.length;m<f;m++){radio=e[m];if(radio.getAttribute("group")==l){c.removeClass(radio,"popupMenuRadioSelected");radio.setAttribute("selected","")}}c.setClass(d,"popupMenuRadioSelected");d.setAttribute("selected","true")}e=null;l=d.command;if(c.isFunction(l))e=l;else if(typeof l=="string")e=this[l];l=true;if(e)l=e.call(this,d)!==false;l&&b.hide()}return false},handleWindowMouseDown:function(d){d=d.target||d.srcElement;d=c.getAncestorByClass(d,"popupMenu");if(!d){c.removeEventListener(document,"mousedown",
205
- this.handleWindowMouseDown);this.destroy()}},handleMouseOver:function(d){this.clearHideTimeout();this.clearShowChildTimeout();d=d.target||d.srcElement;if(d=c.getAncestorByClass(d,"popupMenuOption")){var b=this.childMenu;if(b){c.removeClass(b.parentTarget,"popupMenuGroupSelected");if(b.parentTarget!=d&&b.isVisible){b.clearHideTimeout();b.hideTimeout=window.setTimeout(function(){b.destroy()},300)}}c.hasClass(d,"popupMenuGroup")&&this.showChildMenu(d)}}});c.append(h,{register:function(d){a[d.id]=d},
206
- check:function(d){c.setClass(d,"popupMenuChecked");d.setAttribute("checked","true")},uncheck:function(d){c.removeClass(d,"popupMenuChecked");d.setAttribute("checked","")},disable:function(d){c.setClass(d,"popupMenuDisabled")},enable:function(d){c.removeClass(d,"popupMenuDisabled")}});return h}});
207
- require.def("tabs/schemaTab",["domplate/domplate","domplate/tabView","core/lib","i18n!nls/harViewer","syntax-highlighter/shCore","core/trace"],function(n,c,g,j,h,a){with(n){n=function(){};n.prototype={id:"Schema",label:j.schemaTabLabel,bodyTag:PRE({"class":"javascript:nocontrols:",name:"code"}),onUpdateBody:function(d,b){$.ajax({url:"scripts/preview/harSchema.js",context:this,success:function(e){var l=b.firstChild;l.innerHTML=e;h.SyntaxHighlighter.HighlightAll(l)},error:function(e){a.error("SchemaTab.onUpdateBody; ERROR ",
208
- e)}})}};return n}});
209
- require.def("domplate/domTree",["domplate/domplate","core/lib"],function(n,c){with(n){n=function(j){this.input=j};n.prototype=domplate({tag:TABLE({"class":"domTable",cellpadding:0,cellspacing:0,onclick:"$onClick"},TBODY(FOR("member","$object|memberIterator",TAG("$member|getRowTag",{member:"$member"})))),rowTag:TR({"class":"memberRow $member.open $member.type\\Row $member|hasChildren",$hasChildren:"$member|hasChildren",_repObject:"$member",level:"$member.level"},TD({"class":"memberLabelCell",style:"padding-left: $member.indent\\px"},
210
- SPAN({"class":"memberLabel $member.type\\Label"},"$member.name")),TD({"class":"memberValueCell"},TAG("$member.tag",{object:"$member.value"}))),valueTag:SPAN({"class":"objectTitle"},"$object|getTitle"),loop:FOR("member","$members",TAG("$member|getRowTag",{member:"$member"})),hasChildren:function(j){return j.hasChildren?"hasChildren":""},memberIterator:function(j){return this.getMembers(j)},getRowTag:function(){return this.rowTag},getTitle:function(j){if(jQuery.isArray(j))return"Array";j=g(j);var h=
211
- /\[object (.*?)\]/.exec(j);return h?h[1]:j},onClick:function(j){j=$.event.fix(j||window.event);if(c.isLeftClick(j)){var h=c.getAncestorByClass(j.target,"memberRow");c.getAncestorByClass(j.target,"memberLabel")&&c.hasClass(h,"hasChildren")&&this.toggleRow(h)}},toggleRow:function(j){var h=parseInt(j.getAttribute("level"));if(c.hasClass(j,"opened")){c.removeClass(j,"opened");for(var a=j.parentNode,d=j.nextSibling;d;d=j.nextSibling){if(parseInt(d.getAttribute("level"))<=h)break;a.removeChild(d)}}else{c.setClass(j,
212
- "opened");if(a=j.repObject)(h=this.getMembers(a.value,h+1))&&this.loop.insertRows({members:h},j)}},getMembers:function(j,h){h||(h=0);var a=[];for(var d in j){var b=j[d];typeof b!="function"&&a.push(this.createMember("dom",d,b,h))}return a},createMember:function(j,h,a,d){var b=typeof a;b=this.hasProperties(a)&&b=="object";return{name:h,value:a,type:j,rowClass:"memberRow-"+j,open:"",level:d,indent:d*16,hasChildren:b,tag:this.valueTag}},hasProperties:function(j){for(var h in j)return true;return false},
213
- append:function(j){j=this.tag.append({object:this.input},j);j.firstChild.firstChild&&this.toggleRow(j.firstChild.firstChild)}});var g=function(j){try{return j.toString()}catch(h){return""}};return n}});
214
- require.def("tabs/domTab",["domplate/domplate","domplate/tabView","core/lib","i18n!nls/harViewer","domplate/domTree"],function(n,c,g,j,h){with(n){n=function(){};n.prototype=g.extend(c.Tab.prototype,{id:"DOM",label:j.domTabLabel,separator:DIV({"class":"separator"}),onUpdateBody:function(){},append:function(a){(new h(a)).append(this._body);this.separator.append({},this._body)}});return n}});
215
- (function(n){if(!c)var c={};(function(){function g(f){return f<10?"0"+f:f}function j(f){d.lastIndex=0;return d.test(f)?'"'+f.replace(d,function(k){var o=l[k];return typeof o==="string"?o:"\\u"+("0000"+k.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}function h(f,k){var o,p,u=b,v,w=k[f];if(w&&typeof w==="object"&&typeof w.toJSON==="function")w=w.toJSON(f);if(typeof m==="function")w=m.call(k,f,w);switch(typeof w){case "string":return j(w);case "number":return isFinite(w)?String(w):"null";case "boolean":case "null":return String(w);
216
- case "object":if(!w)return"null";b+=e;v=[];if(Object.prototype.toString.apply(w)==="[object Array]"){p=w.length;for(f=0;f<p;f+=1)v[f]=h(f,w)||"null";k=v.length===0?"[]":b?"[\n"+b+v.join(",\n"+b)+"\n"+u+"]":"["+v.join(",")+"]";b=u;return k}if(m&&typeof m==="object"){p=m.length;for(f=0;f<p;f+=1){o=m[f];if(typeof o==="string")if(k=h(o,w))v.push(j(o)+(b?": ":":")+k)}}else for(o in w)if(Object.hasOwnProperty.call(w,o))if(k=h(o,w))v.push(j(o)+(b?": ":":")+k);k=v.length===0?"{}":b?"{\n"+b+v.join(",\n"+b)+
217
- "\n"+u+"}":"{"+v.join(",")+"}";b=u;return k}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+g(this.getUTCMonth()+1)+"-"+g(this.getUTCDate())+"T"+g(this.getUTCHours())+":"+g(this.getUTCMinutes())+":"+g(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var a=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
218
- d=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,b,e,l={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},m;if(typeof c.stringify!=="function")c.stringify=function(f,k,o){var p;e=b="";if(typeof o==="number")for(p=0;p<o;p+=1)e+=" ";else if(typeof o==="string")e=o;if((m=k)&&typeof k!=="function"&&(typeof k!=="object"||typeof k.length!=="number"))throw new Error("JSON.stringify");return h("",
219
- {"":f})};if(typeof c.parse!=="function")c.parse=function(f,k){function o(p,u){var v,w,q=p[u];if(q&&typeof q==="object")for(v in q)if(Object.hasOwnProperty.call(q,v)){w=o(q,v);if(w!==undefined)q[v]=w;else delete q[v]}return k.call(p,u,q)}a.lastIndex=0;if(a.test(f))f=f.replace(a,function(p){return"\\u"+("0000"+p.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(f.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
220
- "]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){f=eval("("+f+")");return typeof k==="function"?o({"":f},""):f}throw new SyntaxError("JSON.parse");}})();n.toJSON=function(g,j){if(typeof j=="undefined")j=null;return c.parse(g,j)};n.jSONToString=function(g,j,h){if(typeof j=="undefined")j=null;if(typeof h=="undefined")h=null;return c.stringify(g,j,h)}})(jQuery);require.def("jquery-plugins/jquery.json",function(){});
221
- var swfobject=function(){function n(){if(X.readyState=="complete"){X.parentNode.removeChild(X);c()}}function c(){if(!Z){if(D.ie&&D.win){var r=p("span");try{var s=E.getElementsByTagName("body")[0].appendChild(r);s.parentNode.removeChild(s)}catch(z){return}}Z=true;if(aa){clearInterval(aa);aa=null}r=V.length;for(s=0;s<r;s++)V[s]()}}function g(r){if(Z)r();else V[V.length]=r}function j(r){if(typeof F.addEventListener!=t)F.addEventListener("load",r,false);else if(typeof E.addEventListener!=t)E.addEventListener("load",
222
- r,false);else if(typeof F.attachEvent!=t)u(F,"onload",r);else if(typeof F.onload=="function"){var s=F.onload;F.onload=function(){s();r()}}else F.onload=r}function h(){for(var r=M.length,s=0;s<r;s++){var z=M[s].id;if(D.pv[0]>0){var B=o(z);if(B){M[s].width=B.getAttribute("width")?B.getAttribute("width"):"0";M[s].height=B.getAttribute("height")?B.getAttribute("height"):"0";if(v(M[s].swfVersion)){D.webkit&&D.webkit<312&&a(B);q(z,true)}else M[s].expressInstall&&!R&&v("6.0.65")&&(D.win||D.mac)?d(M[s]):
223
- b(B)}}else q(z,true)}}function a(r){var s=r.getElementsByTagName(C)[0];if(s){var z=p("embed"),B=s.attributes;if(B)for(var G=B.length,J=0;J<G;J++)B[J].nodeName=="DATA"?z.setAttribute("src",B[J].nodeValue):z.setAttribute(B[J].nodeName,B[J].nodeValue);if(s=s.childNodes){B=s.length;for(G=0;G<B;G++)s[G].nodeType==1&&s[G].nodeName=="PARAM"&&z.setAttribute(s[G].getAttribute("name"),s[G].getAttribute("value"))}r.parentNode.replaceChild(z,r)}}function d(r){R=true;var s=o(r.id);if(s){if(r.altContentId){var z=
224
- o(r.altContentId);if(z){S=z;ba=r.altContentId}}else S=e(s);if(!/%$/.test(r.width)&&parseInt(r.width,10)<310)r.width="310";if(!/%$/.test(r.height)&&parseInt(r.height,10)<137)r.height="137";E.title=E.title.slice(0,47)+" - Flash Player Installation";z="MMredirectURL="+F.location+"&MMplayerType="+(D.ie&&D.win?"ActiveX":"PlugIn")+"&MMdoctitle="+E.title;var B=r.id;if(D.ie&&D.win&&s.readyState!=4){var G=p("div");B+="SWFObjectNew";G.setAttribute("id",B);s.parentNode.insertBefore(G,s);s.style.display="none";
225
- u(F,"onload",function(){s.parentNode.removeChild(s)})}l({data:r.expressInstall,id:H,width:r.width,height:r.height},{flashvars:z},B)}}function b(r){if(D.ie&&D.win&&r.readyState!=4){var s=p("div");r.parentNode.insertBefore(s,r);s.parentNode.replaceChild(e(r),s);r.style.display="none";u(F,"onload",function(){r.parentNode.removeChild(r)})}else r.parentNode.replaceChild(e(r),r)}function e(r){var s=p("div");if(D.win&&D.ie)s.innerHTML=r.innerHTML;else if(r=r.getElementsByTagName(C)[0])if(r=r.childNodes)for(var z=
226
- r.length,B=0;B<z;B++)!(r[B].nodeType==1&&r[B].nodeName=="PARAM")&&r[B].nodeType!=8&&s.appendChild(r[B].cloneNode(true));return s}function l(r,s,z){var B,G=o(z);if(G){if(typeof r.id==t)r.id=z;if(D.ie&&D.win){var J="";for(var K in r)if(r[K]!=Object.prototype[K])if(K.toLowerCase()=="data")s.movie=r[K];else if(K.toLowerCase()=="styleclass")J+=' class="'+r[K]+'"';else if(K.toLowerCase()!="classid")J+=" "+K+'="'+r[K]+'"';K="";for(var I in s)if(s[I]!=Object.prototype[I])K+='<param name="'+I+'" value="'+
227
- s[I]+'" />';G.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+J+">"+K+"</object>";W[W.length]=r.id;B=o(r.id)}else if(D.webkit&&D.webkit<312){I=p("embed");I.setAttribute("type",x);for(J in r)if(r[J]!=Object.prototype[J])if(J.toLowerCase()=="data")I.setAttribute("src",r[J]);else if(J.toLowerCase()=="styleclass")I.setAttribute("class",r[J]);else J.toLowerCase()!="classid"&&I.setAttribute(J,r[J]);for(var N in s)s[N]!=Object.prototype[N]&&N.toLowerCase()!="movie"&&I.setAttribute(N,
228
- s[N]);G.parentNode.replaceChild(I,G);B=I}else{I=p(C);I.setAttribute("type",x);for(var L in r)if(r[L]!=Object.prototype[L])if(L.toLowerCase()=="styleclass")I.setAttribute("class",r[L]);else L.toLowerCase()!="classid"&&I.setAttribute(L,r[L]);for(var O in s)s[O]!=Object.prototype[O]&&O.toLowerCase()!="movie"&&m(I,O,s[O]);G.parentNode.replaceChild(I,G);B=I}}return B}function m(r,s,z){var B=p("param");B.setAttribute("name",s);B.setAttribute("value",z);r.appendChild(B)}function f(r){var s=o(r);if(s&&(s.nodeName==
229
- "OBJECT"||s.nodeName=="EMBED"))if(D.ie&&D.win)s.readyState==4?k(r):F.attachEvent("onload",function(){k(r)});else s.parentNode.removeChild(s)}function k(r){if(r=o(r)){for(var s in r)if(typeof r[s]=="function")r[s]=null;r.parentNode.removeChild(r)}}function o(r){var s=null;try{s=E.getElementById(r)}catch(z){}return s}function p(r){return E.createElement(r)}function u(r,s,z){r.attachEvent(s,z);Q[Q.length]=[r,s,z]}function v(r){var s=D.pv;r=r.split(".");r[0]=parseInt(r[0],10);r[1]=parseInt(r[1],10)||
230
- 0;r[2]=parseInt(r[2],10)||0;return s[0]>r[0]||s[0]==r[0]&&s[1]>r[1]||s[0]==r[0]&&s[1]==r[1]&&s[2]>=r[2]?true:false}function w(r,s){if(!(D.ie&&D.mac)){var z=E.getElementsByTagName("head")[0],B=p("style");B.setAttribute("type","text/css");B.setAttribute("media","screen");!(D.ie&&D.win)&&typeof E.createTextNode!=t&&B.appendChild(E.createTextNode(r+" {"+s+"}"));z.appendChild(B);if(D.ie&&D.win&&typeof E.styleSheets!=t&&E.styleSheets.length>0){z=E.styleSheets[E.styleSheets.length-1];typeof z.addRule==C&&
231
- z.addRule(r,s)}}}function q(r,s){s=s?"visible":"hidden";if(Z&&o(r))o(r).style.visibility=s;else w("#"+r,"visibility:"+s)}function y(r){return/[\\\"<>\.;]/.exec(r)!=null?encodeURIComponent(r):r}var t="undefined",C="object",x="application/x-shockwave-flash",H="SWFObjectExprInst",F=window,E=document,P=navigator,V=[],M=[],W=[],Q=[],X,aa=null,S=null,ba=null,Z=false,R=false,D=function(){var r=typeof E.getElementById!=t&&typeof E.getElementsByTagName!=t&&typeof E.createElement!=t,s=[0,0,0],z=null;if(typeof P.plugins!=
232
- t&&typeof P.plugins["Shockwave Flash"]==C){if((z=P.plugins["Shockwave Flash"].description)&&!(typeof P.mimeTypes!=t&&P.mimeTypes[x]&&!P.mimeTypes[x].enabledPlugin)){z=z.replace(/^.*\s+(\S+\s+\S+$)/,"$1");s[0]=parseInt(z.replace(/^(.*)\..*$/,"$1"),10);s[1]=parseInt(z.replace(/^.*\.(.*)\s.*$/,"$1"),10);s[2]=/r/.test(z)?parseInt(z.replace(/^.*r(.*)$/,"$1"),10):0}}else if(typeof F.ActiveXObject!=t){var B=null,G=false;try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(J){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
233
- s=[6,0,21];B.AllowScriptAccess="always"}catch(K){if(s[0]==6)G=true}if(!G)try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(I){}}if(!G&&B)try{if(z=B.GetVariable("$version")){z=z.split(" ")[1].split(",");s=[parseInt(z[0],10),parseInt(z[1],10),parseInt(z[2],10)]}}catch(N){}}G=P.userAgent.toLowerCase();var L=P.platform.toLowerCase();z=/webkit/.test(G)?parseFloat(G.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;B=L?/win/.test(L):/win/.test(G);G=L?/mac/.test(L):/mac/.test(G);return{w3cdom:r,
234
- pv:s,webkit:z,ie:false,win:B,mac:G}}();(function(){if(D.w3cdom){g(h);if(D.ie&&D.win)try{E.write("<script id=__ie_ondomload defer=true src=//:><\/script>");(X=o("__ie_ondomload"))&&u(X,"onreadystatechange",n)}catch(r){}if(D.webkit&&typeof E.readyState!=t)aa=setInterval(function(){/loaded|complete/.test(E.readyState)&&c()},10);typeof E.addEventListener!=t&&E.addEventListener("DOMContentLoaded",c,null);j(c)}})();(function(){D.ie&&D.win&&window.attachEvent("onunload",function(){for(var r=Q.length,s=0;s<
235
- r;s++)Q[s][0].detachEvent(Q[s][1],Q[s][2]);r=W.length;for(s=0;s<r;s++)f(W[s]);for(var z in D)D[z]=null;D=null;for(var B in swfobject)swfobject[B]=null;swfobject=null})})();return{registerObject:function(r,s,z){if(!(!D.w3cdom||!r||!s)){var B={};B.id=r;B.swfVersion=s;B.expressInstall=z?z:false;M[M.length]=B;q(r,false)}},getObjectById:function(r){var s=null;if(D.w3cdom)if(r=o(r)){var z=r.getElementsByTagName(C)[0];if(!z||z&&typeof r.SetVariable!=t)s=r;else if(typeof z.SetVariable!=t)s=z}return s},embedSWF:function(r,
236
- s,z,B,G,J,K,I,N){if(!(!D.w3cdom||!r||!s||!z||!B||!G)){z+="";B+="";if(v(G)){q(s,false);var L={};if(N&&typeof N===C)for(var O in N)if(N[O]!=Object.prototype[O])L[O]=N[O];L.data=r;L.width=z;L.height=B;var Y={};if(I&&typeof I===C)for(var ca in I)if(I[ca]!=Object.prototype[ca])Y[ca]=I[ca];if(K&&typeof K===C)for(var T in K)if(K[T]!=Object.prototype[T])if(typeof Y.flashvars!=t)Y.flashvars+="&"+T+"="+K[T];else Y.flashvars=T+"="+K[T];g(function(){l(L,Y,s);L.id==s&&q(s,true)})}else if(J&&!R&&v("6.0.65")&&(D.win||
237
- D.mac)){R=true;q(s,false);g(function(){var U={};U.id=U.altContentId=s;U.width=z;U.height=B;U.expressInstall=J;d(U)})}}},getFlashPlayerVersion:function(){return{major:D.pv[0],minor:D.pv[1],release:D.pv[2]}},hasFlashPlayerVersion:v,createSWF:function(r,s,z){if(D.w3cdom)return l(r,s,z)},removeSWF:function(r){D.w3cdom&&f(r)},createCSS:function(r,s){D.w3cdom&&w(r,s)},addDomLoadEvent:g,addLoadEvent:j,getQueryParamValue:function(r){var s=E.location.search||E.location.hash;if(r==null)return y(s);if(s){s=
238
- s.substring(1).split("&");for(var z=0;z<s.length;z++)if(s[z].substring(0,s[z].indexOf("="))==r)return y(s[z].substring(s[z].indexOf("=")+1))}return""},expressInstallCallback:function(){if(R&&S){var r=o(H);if(r){r.parentNode.replaceChild(S,r);if(ba){q(ba,true);if(D.ie&&D.win)S.style.display="block"}ba=S=null;R=false}}}}}();require.def("downloadify/js/swfobject",function(){});
239
- (function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(n){if(n=Downloadify.queue[n])return n.getData();return""},getFileNameForSave:function(n){if(n=Downloadify.queue[n])return n.getFilename();return""},saveComplete:function(n){(n=Downloadify.queue[n])&&n.complete();return true},saveCancel:function(n){(n=Downloadify.queue[n])&&n.cancel();return true},saveError:function(n){(n=Downloadify.queue[n])&&n.error();return true},addToQueue:function(n){Downloadify.queue[n.queue_name]=
240
- n},getUID:function(n){if(n.id=="")n.id="downloadify_"+Downloadify.uid++;return n.id}};Downloadify.create=function(n,c){n=typeof n=="string"?document.getElementById(n):n;return new Downloadify.Container(n,c)};Downloadify.Container=function(n,c){var g=this;g.el=n;g.enabled=true;g.dataCallback=null;g.filenameCallback=null;g.data=null;g.filename=null;g.enable=function(){document.getElementById(g.flashContainer.id).setEnabled(true);g.enabled=true};g.disable=function(){document.getElementById(g.flashContainer.id).setEnabled(false);
241
- g.enabled=false};g.getData=function(){if(!g.enabled)return"";return g.dataCallback?g.dataCallback():g.data?g.data:""};g.getFilename=function(){return g.filenameCallback?g.filenameCallback():g.filename?g.filename:""};g.complete=function(){typeof g.options.onComplete==="function"&&g.options.onComplete()};g.cancel=function(){typeof g.options.onCancel==="function"&&g.options.onCancel()};g.error=function(){typeof g.options.onError==="function"&&g.options.onError()};(function(){g.options=c;if(!g.options.append)g.el.innerHTML=
242
- "";g.flashContainer=document.createElement("span");g.el.appendChild(g.flashContainer);g.queue_name=Downloadify.getUID(g.flashContainer);if(typeof g.options.filename==="function")g.filenameCallback=g.options.filename;else if(g.options.filename)g.filename=g.options.filename;if(typeof g.options.data==="function")g.dataCallback=g.options.data;else if(g.options.data)g.data=g.options.data;var j={queue_name:g.queue_name,width:g.options.width,height:g.options.height},h={allowScriptAccess:"always"},a={id:g.flashContainer.id,
243
- name:g.flashContainer.id};if(g.options.enabled===false)g.enabled=false;if(g.options.transparent===true)h.wmode="transparent";if(g.options.downloadImage)j.downloadImage=g.options.downloadImage;swfobject.embedSWF(g.options.swf,g.flashContainer.id,g.options.width,g.options.height,"10",null,j,h,a);Downloadify.addToQueue(g)})()};Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:true,append:false}})();
244
- typeof jQuery!="undefined"&&function(n){n.fn.downloadify=function(c){return this.each(function(){c=n.extend({},Downloadify.defaultOptions,c);var g=Downloadify.create(this,c);n(this).data("Downloadify",g)})}}(jQuery);require.def("downloadify/src/downloadify",function(){});require.resume();
1
+ 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<b.length;e++){var f=b[e];if(f[c])try{f[c].apply(f,d)}catch(g){a.exception(g)}}},b.dispatch2=function(b,c,d){for(var e=0;e<b.length;e++){var f=b[e];if(f[c])try{var g=f[c].apply(f,d);if(g)return g}catch(h){a.exception(h)}}};var e=Object.prototype.toString,f=/^\s*function(\s+[\w_$][\w\d_$]*)?\s*\(/;b.isArray=function(a){return jQuery.isArray(a)},b.isFunction=function(a){if(!a)return!1;return e.call(a)==="[object Function]"||b.isIE&&typeof a!="string"&&f.test(""+a)},b.isAncestor=function(a,b){for(var c=a;c;c=c.parentNode)if(c==b)return!0;return!1},b.fixEvent=function(a){return jQuery.event.fix(a||window.event)},b.fireEvent=function(a,b){if(document.createEvent){var c=document.createEvent("Events");c.initEvent(b,!0,!1);return!a.dispatchEvent(c)}},b.cancelEvent=function(a){var c=b.fixEvent(a);c.stopPropagation(),c.preventDefault()},b.addEventListener=function(a,b,c,d){d=d||!1,a.addEventListener?a.addEventListener(b,c,d):a.attachEvent("on"+b,c)},b.removeEventListener=function(a,b,c,d){d=d||!1,a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent("on"+b,c)},b.isLeftClick=function(a){return a.button==0&&b.noKeyModifiers(a)},b.noKeyModifiers=function(a){return!a.ctrlKey&&!a.shiftKey&&!a.altKey&&!a.metaKey},b.isControlClick=function(a){return a.button==0&&b.isControl(a)},b.isShiftClick=function(a){return a.button==0&&b.isShift(a)},b.isControl=function(a){return(a.metaKey||a.ctrlKey)&&!a.shiftKey&&!a.altKey},b.isAlt=function(a){return a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey},b.isAltClick=function(a){return a.button==0&&b.isAlt(a)},b.isControlShift=function(a){return(a.metaKey||a.ctrlKey)&&a.shiftKey&&!a.altKey},b.isShift=function(a){return a.shiftKey&&!a.metaKey&&!a.ctrlKey&&!a.altKey},b.inflateRect=function(a,b,c){return{top:a.top-c,left:a.left-b,height:a.height+2*c,width:a.width+2*b}},b.pointInRect=function(a,b,c){return c>=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;d<a.length;++d)c.push(b(a[d]));else for(var d=0;d<a.length;++d)c.push(a[d]);return c},b.arrayInsert=function(a,b,c){for(var d=0;d<c.length;++d)a.splice(d+b,0,c[d]);return a},b.remove=function(a,b){for(var c=0;c<a.length;++c)if(a[c]==b){a.splice(c,1);return!0}return!1},b.formatSize=function(a){var b=1;b=b>2?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;d<c.length;d++){var e=c[d].toString();a=a.replace("%S",e)}return a},b.parseISO8601=function(a){var c=b.fromISOString(a);return c?c.getTime():null},b.fromISOString=function(a){if(!a)return null;var b=/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,c=new RegExp(b),d=a.toString().match(new RegExp(b));if(!d)return null;var e=new Date;e.setUTCDate(1),e.setUTCFullYear(parseInt(d[1],10)),e.setUTCMonth(parseInt(d[3],10)-1),e.setUTCDate(parseInt(d[5],10)),e.setUTCHours(parseInt(d[7],10)),e.setUTCMinutes(parseInt(d[9],10)),e.setUTCSeconds(parseInt(d[11],10)),d[12]?e.setUTCMilliseconds(parseFloat(d[12])*1e3):e.setUTCMilliseconds(0);if(d[13]!="Z"){var f=d[15]*60+parseInt(d[17],10);f*=d[14]=="-"?-1:1,e.setTime(e.getTime()-f*60*1e3)}return e},b.toISOString=function(a){function b(a,b){b||(b=2);var c=new String(a);while(c.length<b)c="0"+c;return c}var c=a.getUTCFullYear()+"-"+b(a.getMonth()+1)+"-"+b(a.getDate())+"T"+b(a.getHours())+":"+b(a.getMinutes())+":"+b(a.getSeconds())+"."+b(a.getMilliseconds(),3),d=a.getTimezoneOffset(),e=Math.floor(d/60),f=Math.floor(d%60),g=(d>0?"-":"+")+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<c)return!1;var e={encodedContent:a.substr(d+1)},f=a.substr(c+1,d),g=f.split(";");for(var h=0;h<g.length;h++){var i=g[h].split("=");i.length==2&&(e[i[0]]=i[1])}if(e.hasOwnProperty("fileName")){var j=decodeURIComponent(e.fileName),k=b.splitURLTrue(j);if(e.hasOwnProperty("baseLineNumber")){e.path=k.path,e.line=e.baseLineNumber;var l=decodeURIComponent(e.encodedContent.substr(0,200)).replace(/\s*$/,"");e.name="eval->"+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;d<c.length;d++){var e=c[d].split("=");if(e[0]==a)return unescape(e[1])}return null},b.getURLParameters=function(a){var b=[],c=window.location.search.substring(1),d=c.split("&");for(var e=0;e<d.length;e++){var f=d[e].split("=");f[0]==a&&b.push(unescape(f[1]))}return b},b.parseURLParams=function(a){var c=a?a.indexOf("?"):-1;if(c==-1)return[];var d=a.substr(c+1),e=d.lastIndexOf("#");e!=-1&&(d=d.substr(0,e));if(!d)return[];return b.parseURLEncodedText(d)},b.parseURLEncodedText=function(a,c){function f(a){try{return decodeURIComponent(a)}catch(b){return decodeURIComponent(unescape(a))}}var d=25e3,e=[];if(a=="")return e;a=a.replace(/\+/g," ");var g=a.split("&");for(var h=0;h<g.length;++h)try{var i=g[h].indexOf("=");if(i!=-1){var j=g[h].substring(0,i),k=g[h].substring(i+1);k.length>d&&!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<arguments.length;++c){var d=arguments[c],e=a.firstChild;a=null;for(;e;e=e.nextSibling)if(b.hasClass(e,d)){a=e;break}}return a},b.eraseNode=function(a){while(a.lastChild)a.removeChild(a.lastChild)},b.clearNode=function(a){a.innerHTML=""},b.hasClass=function(a,b){if(a&&a.nodeType==1){for(var c=1;c<arguments.length;++c){var b=arguments[c],d=a.className;if(!d||d.indexOf(b+" ")==-1)return!1}return!0}return!1},b.setClass=function(a,c){a&&!b.hasClass(a,c)&&(a.className+=" "+c+" ")},b.removeClass=function(a,b){if(a&&a.className){var c=a.className.indexOf(b);if(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;h<g.length;++h){var i=g[h];while(i.length>f){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("<pre>"),e.push(c?l:b.escapeHTML(l)),c||e.push("</pre>")}c||e.push("<pre>"),e.push(c?i:b.escapeHTML(i)),c||e.push("</pre>")}return e.join(c?"\n":"")},b.insertWrappedText=function(a,c,d){c.innerHTML="<pre>"+b.wrapText(a,d)+"</pre>"},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"&lt;";case">":return"&gt;";case"&":return"&amp;";case"'":return"&#39;";case'"':return"&quot;"}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}),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;d<this.listeners.length;d++){var e=this.listeners[d];e.onUpdateBody&&e.onUpdateBody(this,c._body)}}},render:function(a){this.element=TabViewTempl.tag.replace({tabView:this},a,TabViewTempl),Lib.setClass(this.element,this.id),this.showTabBar(this.tabBarVisibility);for(var b in this.tabs){var c=this.tabs[b],d=c.tabHeaderTag?c.tabHeaderTag:TabViewTempl.tabHeaderTag,e=c.tabBodyTag?c.tabBodyTag:TabViewTempl.tabBodyTag;try{c._header=d.append({tab:c},Lib.$(a,"tabBar")),c._body=e.append({tab:c},Lib.$(a,"tabBodies"))}catch(f){Trace.exception("TabView.appendTab; Exception ",f)}}return this.element}},TabView.Tab=function(){},TabView.Tab.prototype={invalidate:function(){this._updated=!1},select:function(){this.tabView.selectTabByName(this.id)}};return TabView}}),require.def("core/cookies",["core/lib"],function(a){var b={getCookie:function(b){var c=document.cookie.split(";");for(var d=0;d<c.length;d++){var e=c[d].split("=");if(a.trim(e[0])==b)return e[1].length?unescape(a.trim(e[1])):null}},setCookie:function(a,b,c,d,e,f){var g=new Date;g.setTime(g.getTime()),c&&(c=c*1e3*60*60*24);var h=new Date(g.getTime()+c);document.cookie=a+"="+escape(b)+(c?";expires="+h.toGMTString():"")+(d?";path="+d:"")+(e?";domain="+e:"")+(f?";secure":"")},removeCookie:function(a,b,c){this.getCookie(a)&&(document.cookie=a+"="+(b?";path="+b:"")+(c?";domain="+c:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT")},toggleCookie:function(a){var b=this.getBooleanCookie(a);this.setCookie(a,!b)},getBooleanCookie:function(a){var b=this.getCookie(a);return!b||b=="false"?!1:!0},setBooleanCookie:function(a,b){this.setCookie(a,b?"true":"false")}};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/homeTab",{root:{homeTabLabel:"Home",loadingHar:"Loading..."}}),function(){var a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],b=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,c=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,d=[];define("text",["require","exports","module"],function(){var e,f,g;typeof window!=="undefined"&&window.navigator&&window.document?f=function(a,b){var c=e.createXhr();c.open("GET",a,!0),c.onreadystatechange=function(a){c.readyState===4&&b(c.responseText)},c.send(null)}:typeof process!=="undefined"&&process.versions&&!!process.versions.node?(g=require.nodeRequire("fs"),f=function(a,b){b(g.readFileSync(a,"utf8"))}):typeof Packages!=="undefined"&&(f=function(a,b){var c="utf-8",d=new java.io.File(a),e=java.lang.System.getProperty("line.separator"),f=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(d),c)),g,h,i="";try{g=new java.lang.StringBuffer,h=f.readLine(),h&&h.length()&&h.charAt(0)===65279&&(h=h.substring(1)),g.append(h);while((h=f.readLine())!==null)g.append(e),g.append(h);i=String(g.toString())}finally{f.close()}b(i)}),e={version:"0.24.0",strip:function(a){if(a){a=a.replace(b,"");var d=a.match(c);d&&(a=d[1])}else a="";return a},jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},createXhr:function(){var b,c,d;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;for(c=0;c<3;c++){d=a[c];try{b=new ActiveXObject(d)}catch(e){}if(b){a=[d];break}}if(!b)throw new Error("require.getXhr(): XMLHttpRequest not available");return b},get:f,load:function(a,b,c,f){var g=!1,h,i=a.indexOf("."),j=a.substring(0,i),k=a.substring(i+1,a.length);i=k.indexOf("!"),i!==-1&&(g=k.substring(i+1,k.length),g=g==="strip",k=k.substring(0,i)),h=b.nameToUrl(j,"."+k),e.get(h,function(b){b=g?e.strip(b):b,f.isBuild&&f.inlineText&&(d[a]=b),c(b)})},write:function(a,b,c){if(b in d){var f=e.jsEscape(d[b]);c("define('"+a+"!"+b+"', function () { return '"+f+"';});\n")}}};return e})}(),define("text!tabs/homeTab.html",function(){return'<div>\r\n<ul style="padding-left: 20px; line-height: 20px; margin-top: 0px">\r\n<li>Paste <a href="@HAR_SPEC_URL@">HAR</a>\r\nlog into the text box below and\r\npress the <b>Preview</b> button.</li>\r\n<li>Or drop <span class="red">*.har</span> file(s) anywhere on the page (if your browser supports that).</li>\r\n</ul>\r\n<table cellpadding="0" cellspacing="4">\r\n <tr>\r\n <td><input type="checkbox" id="validate" checked="true"></input></td>\r\n <td style="vertical-align:middle;padding-bottom: 1px;">Validate data before processing?</td>\r\n </tr>\r\n</table>\r\n<textarea id="sourceEditor" class="sourceEditor" cols="80" rows="5"></textarea>\r\n<p><table cellpadding="0" cellspacing="0">\r\n <tr>\r\n <td><button id="appendPreview">Preview</button></td>\r\n </tr>\r\n</table></p>\r\n<br/>\r\n<h3>HAR Log Examples</h3>\r\n<ul style="line-height:20px;">\r\n<li><span id="example1" class="link example" path="examples/inline-scripts-block.har">\r\nInline scripts block</span> - Inline scripts block the page load.</li>\r\n<li><span id="example2" class="link example" path="examples/browser-blocking-time.har">\r\nBlocking time</span> - Impact of a limit of max number of parallel connections.</li>\r\n<li><span id="example3" class="link example" path="examples/softwareishard.com.har">\r\nBrowser cache</span> - Impact of the browser cache on page load (the same page loaded three times).</li>\r\n<li><span id="example4" class="link example" path="examples/google.com.har">\r\nSingle page</span> - Single page load (empty cache).</li>\r\n</ul>\r\n<h3>HAR Logs Online </h3>\r\n<i>You can also preview any HAR file (in JSONP format) that is available online by using\r\n<b>inputUrl</b> parameter<br/>\r\n(see more in the <span class="linkAbout link">About</span> tab):</i><br/>\r\n<p><code><a href="?inputUrl=http://www.janodvarko.cz/har/viewer/examples/inline-scripts-block.harp">\r\n http://www.softwareishard.com/har/viewer?inputUrl=http://www.janodvarko.cz/har/viewer/examples/inline-scripts-block.harp</a></code></p>\r\n\r\n<br/>\r\n<p><i>This viewer supports HAR 1.2 (see the <span class="linkAbout link">About</span> tab).<br/></i></p>\r\n</div>'}),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;f<a.length;f++)if(!(c=k(a[f],b)).length)break;if(c.length)return c}else if(typeof a=="object"){var h=d;d=[],e(b,a,g);var i=d;d=h;return i}}return[]}function j(a){d.push({property:g,message:a})}var i;g+=g?typeof h=="number"?"["+h+"]":typeof h=="undefined"?"":"."+h:h;if((typeof b!="object"||b instanceof Array)&&(g||typeof b!="function")){typeof b=="function"?a instanceof b||j("is not an instance of the class/constructor "+b.name):b&&j("Invalid schema/property definition "+b);return null}c&&b.readonly&&j("is a readonly field, it can not be changed"),b["extends"]&&e(a,b["extends"],g,h);if(a===undefined)b.optional||j("is missing and it is not optional");else{d=d.concat(k(b.type,a)),b.disallow&&!k(b.disallow,a).length&&j(" disallowed value was matched");if(a!==null){if(a instanceof Array){if(b.items)if(b.items instanceof Array)for(h=0,i=a.length;h<i;h++)d.concat(e(a[h],b.items[h],g,h));else for(h=0,i=a.length;h<i;h++)d.concat(e(a[h],b.items,g,h));b.minItems&&a.length<b.minItems&&j("There must be a minimum of "+b.minItems+" in the array"),b.maxItems&&a.length>b.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.length<b.minLength&&j("must be at least "+b.minLength+" characters long"),typeof b.minimum!==undefined&&typeof a==typeof b.minimum&&b.minimum>a&&j("must have a minimum value of "+b.minimum),typeof b.maximum!==undefined&&typeof a==typeof b.maximum&&b.maximum<a&&j("must have a maximum value of "+b.maximum);if(b["enum"]){var l=b["enum"];i=l.length;var m;for(var n=0;n<i;n++)if(l[n]===a){m=1;break}m||j("does not have a value in the enumeration "+l.join(", "))}typeof b.maxDecimal=="number"&&a.toString().match(new RegExp("\\.[0-9]{"+(b.maxDecimal+1)+",}"))&&j("may only have "+b.maxDecimal+" digits of decimal places")}}return null}var d=[];b&&e(a,b,"",c||""),!c&&a&&a.$schema&&e(a,a.$schema,"","");return{valid:!d.length,errors:d}}};return a}),require.def("preview/ref",["core/lib"],function(a){var b={resolveJson:function(b,c){function n(o,p,q,r,s){var t,u,v=d in o?o[d]:q;v!==undefined&&(v=(e+v).replace(k,"$2$3"));var w=s||o;if(v!==undefined){f&&(o.__id=v),c.schemas&&!(o instanceof Array)&&(u=v.match(/^(.+\/)[^\.\[]*$/))&&(r=c.schemas[u[1]]);if(g[v]&&o instanceof Array==g[v]instanceof Array)w=g[v],delete w.$ref,t=!0;else{var x=r&&r.prototype;x&&(m.prototype=x,w=new m)}g[v]=w,h&&(h[v]=c.time)}var y=r&&r.properties,z=o.length;for(var A in o){if(A==z)break;if(o.hasOwnProperty(A)){u=o[A];var B=y&&y[A];if(B&&B.format=="date-time"&&typeof u=="string")u=a.fromISOString(u);else if(typeof u=="object"&&u&&!(u instanceof Date)){i=u.$ref;if(i){delete o[A];var C=i.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);if(i=C[1]=="$"||C[1]=="this"||C[1]==""?b:g[(e+C[1]).replace(k,"$2$3")])C[3]&&C[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(a,b,c,d,e){i=i&&i[c?c.replace(/[\"\'\\]/,""):e]});if(i)u=i;else if(p)u=n(u,!1,u.$ref,B),u._loadObject=c.loader;else{var D;D||j.push(w),D=!0}}else p||(u=n(u,j==o,v&&l(v,A),B,w!=o&&typeof w[A]=="object"&&w[A]))}o[A]=u;if(w!=o&&!w.__isDirty){var E=w[A];w[A]=u,t&&u!==E&&!w._loadObject&&!(u instanceof Date&&E instanceof Date&&u.getTime()==E.getTime())&&(typeof u!="function"||typeof E!="function"||u.toString()!=E.toString())&&g.onUpdate&&g.onUpdate(w,A,E,u)}}}if(t){for(A in w)if(!w.__isDirty&&w.hasOwnProperty(A)&&!o.hasOwnProperty(A)&&A!="__id"&&A!="__clientId"&&!(w instanceof Array&&isNaN(A))){g.onUpdate&&A!="_loadObject"&&A!="_idAttr"&&g.onUpdate(w,A,w[A],undefined),delete w[A];while(w instanceof Array&&w.length&&w[w.length-1]===undefined)w.length--}}else g.onLoad&&g.onLoad(w);return w}c=c||{};var d=c.idAttribute||"id",e=c.idPrefix||"",f=c.assignAbsoluteIds,g=c.index||{},h=c.timeStamps,i,j=[],k=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,l=this._addProp,m=function(){};b&&typeof b=="object"&&(b=n(b,!1,c.defaultId),n(j,!1));return b},_addProp:function(a,b){return a+(a.match(/#/)?a.length==1?"":".":"#")+b}};return b}),require.def("preview/harSchema",[],function(){function r(){}var a=/^(\d{4})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,b={logType:{id:"logType",description:"HTTP Archive structure.",type:"object",properties:{log:{type:"object",properties:{version:{type:"string"},creator:{$ref:"creatorType"},browser:{$ref:"browserType"},pages:{type:"array",optional:!0,items:{$ref:"pageType"}},entries:{type:"array",items:{$ref:"entryType"}},comment:{type:"string",optional:!0}}}}}},c={creatorType:{id:"creatorType",description:"Name and version info of the log creator app.",type:"object",properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string",optional:!0}}}},d={browserType:{id:"browserType",description:"Name and version info of used browser.",type:"object",optional:!0,properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string",optional:!0}}}},e={pageType:{id:"pageType",description:"Exported web page",optional:!0,properties:{startedDateTime:{type:"string",format:"date-time",pattern:a},id:{type:"string",unique:!0},title:{type:"string"},pageTimings:{$ref:"pageTimingsType"},comment:{type:"string",optional:!0}}}},f={pageTimingsType:{id:"pageTimingsType",description:"Timing info about page load",properties:{onContentLoad:{type:"number",optional:!0,min:-1},onLoad:{type:"number",optional:!0,min:-1},comment:{type:"string",optional:!0}}}},g={entryType:{id:"entryType",description:"Request and Response related info",optional:!0,properties:{pageref:{type:"string",optional:!0},startedDateTime:{type:"string",format:"date-time",pattern:a},time:{type:"number",min:0},request:{$ref:"requestType"},response:{$ref:"responseType"},cache:{$ref:"cacheType"},timings:{$ref:"timingsType"},serverIPAddress:{type:"string",optional:!0},connection:{type:"string",optional:!0},comment:{type:"string",optional:!0}}}},h={requestType:{id:"requestType",description:"Monitored request",properties:{method:{type:"string"},url:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookieType"}},headers:{type:"array",items:{$ref:"recordType"}},queryString:{type:"array",items:{$ref:"recordType"}},postData:{$ref:"postDataType"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string",optional:!0}}}},j={recordType:{id:"recordType",description:"Helper name-value pair structure.",properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string",optional:!0}}}},k={responseType:{id:"responseType",description:"Monitored Response.",properties:{status:{type:"integer"},statusText:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookieType"}},headers:{type:"array",items:{$ref:"recordType"}},content:{$ref:"contentType"},redirectURL:{type:"string"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string",optional:!0}}}},l={cookieType:{id:"cookieType",description:"Cookie description.",properties:{name:{type:"string"},value:{type:"string"},path:{type:"string",optional:!0},domain:{type:"string",optional:!0},expires:{type:"string",optional:!0},httpOnly:{type:"boolean",optional:!0},secure:{type:"boolean",optional:!0},comment:{type:"string",optional:!0}}}},m={postDataType:{id:"postDataType",description:"Posted data info.",optional:!0,properties:{mimeType:{type:"string"},text:{type:"string",optional:!0},params:{type:"array",optional:!0,properties:{name:{type:"string"},value:{type:"string",optional:!0},fileName:{type:"string",optional:!0},contentType:{type:"string",optional:!0},comment:{type:"string",optional:!0}}},comment:{type:"string",optional:!0}}}},n={contentType:{id:"contentType",description:"Response content",properties:{size:{type:"integer"},compression:{type:"integer",optional:!0},mimeType:{type:"string"},text:{type:"string",optional:!0},encoding:{type:"string",optional:!0},comment:{type:"string",optional:!0}}}},o={cacheType:{id:"cacheType",description:"Info about a response coming from the cache.",properties:{beforeRequest:{$ref:"cacheEntryType"},afterRequest:{$ref:"cacheEntryType"},comment:{type:"string",optional:!0}}}},p={cacheEntryType:{id:"cacheEntryType",optional:!0,description:"Info about cache entry.",properties:{expires:{type:"string",optional:"true"},lastAccess:{type:"string"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string",optional:!0}}}},q={timingsType:{id:"timingsType",description:"Info about request-response timing.",properties:{dns:{type:"number",optional:!0,min:-1},connect:{type:"number",optional:!0,min:-1},blocked:{type:"number",optional:!0,min:-1},send:{type:"number",min:-1},wait:{type:"number",min:-1},receive:{type:"number",min:-1},ssl:{type:"number",optional:!0,min:-1},comment:{type:"string",optional:!0}}}};r.prototype={registerType:function(){var a=function(a,b){for(var c in b)b.hasOwnProperty(c)&&c!="prototype"&&(a[c]=b[c])},b=this;for(i=0;i<arguments.length;i+=1)a(b,arguments[i])}};var s=new r;s.registerType(b,c,d,e,f,g,h,j,k,m,n,o,p,q);return s}),function($){if(!JSON)var JSON={};(function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i==="object"&&typeof i.toJSON==="function"&&(i=i.toJSON(a)),typeof rep==="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep==="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d==="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b==="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}typeof Date.prototype.toJSON!=="function"&&(Date.prototype.toJSON=function(a){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!=="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c==="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c==="string"&&(indent=c);rep=b;if(b&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!=="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e==="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})})(),$.toJSON=function(a,b){typeof b=="undefined"&&(b=null);return JSON.parse(a,b)},$.jSONToString=function(a,b,c){typeof b=="undefined"&&(b=null),typeof c=="undefined"&&(c=null);return JSON.stringify(a,b,c)}}(jQuery),define("jquery-plugins/jquery.json",function(){}),define("nls/harModel",{root:{validationType:"HAR Validation",validationSumTimeError:"Sum of request timings doesn't correspond to the total value: %S (request.time: %S vs. sum: %S), request#: %S, parent page: %S",validationNegativeTimeError:"Negative time is not allowed: %S, request#: %S, parent page: %S"}}),require.def("preview/harModel",["core/lib","preview/jsonSchema","preview/ref","preview/harSchema","core/cookies","core/trace","i18n!nls/harModel","jquery-plugins/jquery.json"],function(a,b,c,d,e,f,g){function i(){var a={};for(var b in this)b!="toJSON"&&(a[b]=this[b]);if(!this.text)return a;a.text=Array.map(this.text,function(a){var b=a.charCodeAt(0);if(b>=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(d<e)return-1;if(d>e)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;c<b.log.pages.length;c++)this.importPage(b.log.pages[c],b.log.entries)}else this.input=a.cloneJSON(b);return this.input}f.error("HarModel.append; Trying to append null input!")}},getPages:function(){if(!this.input)return[];return this.input.log.pages?this.input.log.pages:[]},getFirstPage:function(){var a=this.getPages();return a.length>0?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;e<b.length;e++){var f=b[e];f.pageref==d&&(f.pageref=c,this.input.log.entries.push(f))}},getUniquePageID:function(a){var b=this.input.log.pages,c={};for(var d=0;d<b.length;d++)c[b[d].id]=!0;if(!c[a])return a;var e=1;while(!0){var f=a+e;if(!c[f])return f;e++}},toJSON:function(a){a||(a=this.input);if(!a)return"";var b=this.input.log.entries;for(var c=0;c<b.length;c++){var d=b[c];d.response.content.text&&(d.response.content.toJSON=i)}var e=$.jSONToString(this.input,null,"\t"),f=e.replace(/\\\\u/g,"\\u");return f},getSize:function(a){a||(a=this.input);if(!a)return 0;var b=dojo.toJson(a,!0);return b.length}},h.parse=function(a,e){var f=a;try{typeof a==="string"&&(f=jQuery.parseJSON(a))}catch(g){console.exception("HarModel.parse; EXCEPTION",g);throw{errors:[{message:"Failed to parse JSON",property:"JSON evaluation"}]}}if(!e)return f;var h=c.resolveJson(d),i=b.validate(f,h.logType);if(i.valid){this.validateRequestTimings(f);return f}throw i},h.getPageEntries=function(a,b){var c=[],d=a.log.entries;if(!d)return c;for(var e=0;e<d.length;e++){var f=d[e];!f.pageref&&!b&&c.push(f),b&&f.pageref==b.id&&c.push(f)}return c},h.getParentPage=function(a,b){var c=a.log.pages;if(!c)return null;for(var d=0;d<c.length;d++)if(c[d].id==b.pageref)return c[d];return null},h.validateRequestTimings=function(b){var c=[],d=b.log.entries;for(var e=0;e<d.length;e++){var f=d[e],h=f.timings;if(h.blocked<-1||h.connect<-1||h.dns<-1||h.receive<-1||h.send<-1||h.wait<-1){var i=a.formatString(g.validationNegativeTimeError,f.request.url,e,f.pageref);c.push({input:b,file:f,message:i,property:g.validationType})}}if(c.length)throw{errors:c,input:b}},h.Loader={run:function(b,c){var d=a.getURLParameter("baseUrl");d&&d[d.length-1]!="/"&&(d+="/");var e=a.getURLParameters("path"),f=a.getURLParameter("callback"),g=a.getURLParameters("inputUrl"),h=[];for(var i in e)h.push(d?d+e[i]:e[i]);for(var i in g)h.push(g[i]);if((d||g.length>0)&&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}),require.def("tabs/homeTab",["domplate/domplate","domplate/tabView","core/lib","core/cookies","core/trace","i18n!nls/homeTab","text!tabs/homeTab.html","preview/harModel"],function(Domplate,TabView,Lib,Cookies,Trace,Strings,HomeTabHtml,HarModel){with(Domplate){function HomeTab(){}HomeTab.prototype=Lib.extend(TabView.Tab.prototype,{id:"Home",label:Strings.homeTabLabel,bodyTag:DIV({"class":"homeBody"}),onUpdateBody:function(a,b){b=this.bodyTag.replace({},b),b.innerHTML=HomeTabHtml.replace("@HAR_SPEC_URL@",a.harSpecURL,"g"),$("#appendPreview").click(Lib.bindFixed(this.onAppendPreview,this)),$(".linkAbout").click(Lib.bind(this.onAbout,this));var c=$("#content");c.bind("dragenter",Lib.bind(Lib.cancelEvent,Lib)),c.bind("dragover",Lib.bind(Lib.cancelEvent,Lib)),c.bind("drop",Lib.bind(this.onDrop,this)),this.validateNode=$("#validate");var d=Cookies.getCookie("validate");d&&this.validateNode.attr("checked",d=="false"?!1:!0),this.validateNode.change(Lib.bind(this.onValidationChange,this)),$(".example").click(Lib.bind(this.onLoadExample,this))},onAppendPreview:function(a){a||(a=$("#sourceEditor").val()),a&&this.tabView.appendPreview(a)},onAbout:function(){this.tabView.selectTabByName("About")},onValidationChange:function(){var a=this.validateNode.attr("checked");Cookies.setCookie("validate",a)},onLoadExample:function(a){var b=Lib.fixEvent(a),c=b.target.getAttribute("path"),d=document.location.href,e=d.indexOf("?");document.location=d.substr(0,e)+"?path="+c,Cookies.setCookie("timeline",!0),Cookies.setCookie("stats",!0)},onDrop:function(a){var b=Lib.fixEvent(a);Lib.cancelEvent(b);try{this.handleDrop(a.originalEvent.dataTransfer)}catch(c){Trace.exception("HomeTab.onDrop EXCEPTION",c)}},handleDrop:function(a){if(!a)return!1;var b=a.files;if(b)for(var c=0;c<b.length;c++){var d=b[c],e=Lib.getFileExtension(d.name);if(e.toLowerCase()!="har")continue;var f=this,g=this.getFileReader(d,function(a){a&&f.onAppendPreview(a)});g()}},getFileReader:function(a,b){return function c(){if(typeof a.getAsText!="undefined")b(a.getAsText(""));else if(typeof FileReader!="undefined"){var c=new FileReader;c.onloadend=function(){b(c.result)},c.readAsText(a)}}},loadInProgress:function(a,b){$("#sourceEditor").val(a?b?b:Strings.loadingHar:"")}});return HomeTab}}),define("text!tabs/aboutTab.html",function(){return'<div>\r\n<h2>HTTP Archive Viewer @VERSION@</h2>\r\n<i>Author: Jan Odvarko, odvarko@gmail.com</i>\r\n<br/><br/>\r\n<table style="width:600px;">\r\n\r\n<tr><td>\r\n<p>The purpose of this online tool is to visualize\r\n<a href="@HAR_SPEC_URL@">\r\n HTTP Archive (HAR)</a>\r\nlog files created by HTTP tracking tools. These files contain log of HTTP\r\nclient/server conversation and can be used for an additional analysis of e.g. \r\npage load performance.</p>\r\n\r\n<p>User interface of this tool is composed from the following tabs:</p>\r\n<ul>\r\n<li><b>Home</b> - Paste content of a log file into the text box in this tab.</li>\r\n<li><b>Preview</b> - Switch to this tab if you want to see visualised HTTP traffic.</li>\r\n<li><b>HAR</b> - Use this tab to see structure of the input JSON data as an expandable tree.</li>\r\n<li><b>Schema</b> - Explore format of the input log in this tab.</li>\r\n</ul>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<h3>Links</h3>\r\n<p>Home Page (donate): <a href="http://www.softwareishard.com/blog/har-viewer/">\r\n http://www.softwareishard.com/blog/har-viewer/</a></p>\r\n<p>Feedback: <a href="http://groups.google.com/group/http-archive-specification">\r\n http://groups.google.com/group/http-archive-specification</a></p>\r\n<p>Report issue: <a href="http://code.google.com/p/harviewer/issues/list">\r\n http://code.google.com/p/harviewer/issues/list</a></p>\r\n<p>HAR Viewer Customization: <a href="http://code.google.com/p/harviewer/wiki/Customization">\r\n http://code.google.com/p/harviewer/wiki/Customization</a></p>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<h3>Create HARs using Firebug</h3>\r\nOne of the tools you can use to log data transfered over HTTP protocol\r\nis <a href="http://getfirebug.com/">Firebug</a>. To do this you have to also install Firebug\r\nextension called <a href="http://www.softwareishard.com/blog/netexport/">NetExport</a>.\r\n</td></tr>\r\n\r\n<tr><td>\r\n<h3>HTTP Archive Specification</h3>\r\n<p>Required\r\n<a href="@HAR_SPEC_URL@">\r\nstructure</a> of the input HTTP Archive file (*.har) is described using\r\n<a href="http://www.json.com/json-schema-proposal/">JSON Schema</a>.\r\nYou can explore the current schema definition within the <span class="linkSchema link">Schema</span>\r\ntab on this page.</p>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<h3>Request Timing Fields</h3>\r\n<p>Part of the HTTP log is also a timing info about network request executions.\r\nHere is a description of individual request/response phases:</p>\r\n<ul>\r\n<li><i>Blocking</i> - Time spent in a queue waiting for a network connection.</li>\r\n<li><i>DNS Lookup</i> - DNS resolution time. The time required to resolve a host name.</li>\r\n<li><i>Connecting</i> - Time required to create TCP connection.</li>\r\n<li><i>Sending</i> - Time required to send HTTP request to the server.</li>\r\n<li><i>Waiting</i> - Waiting for a response from the server.</li>\r\n<li><i>Receiving</i> - Time required to read entire response from the server (or cache).</li>\r\n</ul>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<h3>Online Log Files</h3>\r\n<p>HAR Viewer also supports JSONP and so, it\'s possible to load log files \r\nfrom different domains. This allows linking your online logs and preview them\r\nautomatically within the viewer. See live\r\n<a href="?inputUrl=http://www.janodvarko.cz/har/viewer/examples/inline-scripts-block.harp">example</a>.\r\n</p>\r\n\r\n<p><i>1. The Content of a *.har file must be enclosed within a callback function:</i></p>\r\n<code>onInputData({ "log": { ... } })</code>\r\n\r\n<p><i>2. The link displaying a *.har file (using this viewer) must specify URL of\r\nthe file in <b>inputUrl</b> parameter:</i></p>\r\n<code>http://www.softwareishard.com/har/viewer/?inputUrl=http://www.example.com/netData.har</code>\r\n\r\n<p><i>3. A custom name of the callback function can be specified in a <b>callback</b> parameter\r\n(by default it\'s <b>onInputData</b>):</i></p>\r\n<code>http://www.softwareishard.com/har/viewer/?inputUrl=http://www.example.com/netData.har&amp;callback=onInputData</code>\r\n<br/><br/>\r\n</td></tr>\r\n\r\n</table>\r\n</div>'}),define("nls/harViewer",{root:{aboutTabLabel:"About",schemaTabLabel:"Schema"}}),require.def("tabs/aboutTab",["domplate/domplate","domplate/tabView","core/lib","i18n!nls/harViewer"],function(Domplate,TabView,Lib,Strings){with(Domplate){function AboutTab(){}AboutTab.prototype={id:"About",label:Strings.aboutTabLabel,tabHeaderTag:A({"class":"$tab.id\\Tab tab",view:"$tab.id",_repObject:"$tab"},"$tab.label",SPAN("&nbsp;"),SPAN({"class":"version"},"$tab.tabView.version")),bodyTag:DIV({"class":"aboutBody"}),onUpdateBody:function(a,b){var c=this;b=this.bodyTag.replace({},b),require(["text!tabs/aboutTab.html"],function(d){d=d.replace("@VERSION@",a.version,"g"),d=d.replace("@HAR_SPEC_URL@",a.harSpecURL,"g"),b.innerHTML=d,$(".linkSchema").click(Lib.bind(c.onSchema,c))})},onSchema:function(){this.tabView.selectTabByName("Schema")}};return AboutTab}}),define("nls/previewTab",{root:{previewTabLabel:"Preview",showTimelineButton:"Show Page Timeline",hideTimelineButton:"Hide Page Timeline",showTimelineTooltip:"Show/hide statistic preview for selected pages in the timeline.",showStatsButton:"Show Statistics",hideStatsButton:"Hide Statistics",showStatsTooltip:"Show/hide page timeline.",clearButton:"Clear",clearTooltip:"Remove all HAR logs from the viewer",downloadTooltip:"Download all current data in one HAR file.",downloadError:"Failed to save HAR data",menuShowHARSource:"Show HAR Source"}}),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;c<d;c++){var e=a[c];if(typeof e=="string"&&e.indexOf("-")==0){b.push({tag:this.separatorTag});continue}e=Lib.extend(e,{}),e.type=e.type||"",e.value=e.value||"";var f=e.type;e.tag=this.itemTag;var g=e.className||"";g+="popupMenuOption ",f=="checkbox"?(g+="popupMenuCheckBox ",e.tag=this.checkBoxTag):f=="radio"?(g+="popupMenuRadioButton ",e.tag=this.radioButtonTag):f=="group"?(g+="popupMenuGroup ",e.tag=this.groupTag):f=="shortcut"&&(g+="popupMenuShortcut ",e.tag=this.shortcutTag),e.checked?g+="popupMenuChecked ":e.selected&&(g+="popupMenuRadioSelected "),e.disabled&&(g+="popupMenuDisabled "),e.className=g,e.label=e.label,b.push(e)}return b}});function Menu(a){if(!a.element){a.getItems&&(a.items=a.getItems()),a.items[0]=="-"&&a.items.shift(),a.items[a.items.length-1]=="-"&&a.items.pop();var b=Lib.getBody(document);a.element=MenuPlate.tag.append({object:a},b,MenuPlate)}Lib.append(this,a),typeof this.element=="string"?(this.id=this.element,this.element=$(this.id)):this.id&&(this.element.id=this.id),this.elementStyle=this.element.style,this.isVisible=!1,this.handleMouseDown=Lib.bind(this.handleMouseDown,this),this.handleMouseOver=Lib.bind(this.handleMouseOver,this),this.handleMouseOut=Lib.bind(this.handleMouseOut,this),this.handleWindowMouseDown=Lib.bind(this.handleWindowMouseDown,this)}var menuMap={};Menu.prototype=Lib.extend(Controller,{initialize:function(){Controller.initialize.call(this),this.addController([this.element,"mousedown",this.handleMouseDown],[this.element,"mouseover",this.handleMouseOver])},destroy:function(){this.hide(),this.parentMenu&&(this.parentMenu.childMenu=null),this.element.parentNode.removeChild(this.element),this.element=null,this.elementStyle=null,this.parentMenu=null,this.parentTarget=null},shutdown:function(){Controller.shutdown.call(this)},showPopup:function(a){var b=Lib.isIE6?1:-4,c=Lib.getElementBox(a),d={top:0,left:0};this.show(c.left+b-d.left,c.top+c.height-5-d.top)},show:function(a,b){this.initialize();if(!this.isVisible){a=a||0,b=b||0;if(this.parentMenu){var c=this.parentMenu.childMenu;c&&c!=this&&c.destroy(),this.parentMenu.childMenu=this}else Lib.addEventListener(document,"mousedown",this.handleWindowMouseDown);this.elementStyle.display="block",this.elementStyle.visibility="hidden";var d=Lib.getWindowSize();a=Math.min(a,d.width-this.element.clientWidth-10),a=Math.max(a,0),b=Math.min(b,d.height-this.element.clientHeight-10),b=Math.max(b,0),this.elementStyle.left=a+"px",this.elementStyle.top=b+"px",this.elementStyle.visibility="visible",this.isVisible=!0,Lib.isFunction(this.onShow)&&this.onShow.apply(this,arguments)}},hide:function(){this.clearHideTimeout(),this.clearShowChildTimeout();this.isVisible&&(this.elementStyle.display="none",this.childMenu&&(this.childMenu.destroy(),this.childMenu=null),this.parentTarget&&Lib.removeClass(this.parentTarget,"popupMenuGroupSelected"),this.isVisible=!1,this.shutdown(),Lib.isFunction(this.onHide)&&this.onHide.apply(this,arguments))},showChildMenu:function(a){var b=a.getAttribute("child"),c=this,a=a;this.showChildTimeout=window.setTimeout(function(){var d=Lib.getElementBox(a),e=menuMap.hasOwnProperty(b)?menuMap[b]:{element:$(b)},f=new Menu(Lib.extend(e,{parentMenu:c,parentTarget:a})),g=Lib.isIE6?-1:-6;f.show(d.left+d.width+g,d.top-6),Lib.setClass(a,"popupMenuGroupSelected")},350)},clearHideTimeout:function(){this.hideTimeout&&(window.clearTimeout(this.hideTimeout),delete this.hideTimeout)},clearShowChildTimeout:function(){this.showChildTimeout&&(window.clearTimeout(this.showChildTimeout),this.showChildTimeout=null)},handleMouseDown:function(a){Lib.cancelEvent(a,!0);var b=this;while(b.parentMenu)b=b.parentMenu;var c=a.target||a.srcElement;c=Lib.getAncestorByClass(c,"popupMenuOption");if(!c||Lib.hasClass(c,"popupMenuGroup"))return!1;if(c&&!Lib.hasClass(c,"popupMenuDisabled")){var d=c.getAttribute("type");if(d=="checkbox"){var e=c.getAttribute("checked"),f=c.getAttribute("value"),g=Lib.hasClass(c,"popupMenuChecked");g?(Lib.removeClass(c,"popupMenuChecked"),c.setAttribute("checked","")):(Lib.setClass(c,"popupMenuChecked"),c.setAttribute("checked","true")),Lib.isFunction(this.onCheck)&&this.onCheck.call(this,c,f,!g)}if(d=="radiobutton"){var h=Lib.getElementsByClass(c.parentNode,"popupMenuRadioSelected"),i=c.getAttribute("group");for(var j=0,k=h.length;j<k;j++)radio=h[j],radio.getAttribute("group")==i&&(Lib.removeClass(radio,"popupMenuRadioSelected"),radio.setAttribute("selected",""));Lib.setClass(c,"popupMenuRadioSelected"),c.setAttribute("selected","true")}var l=null,m=c.command;Lib.isFunction(m)?l=m:typeof m=="string"&&(l=this[m]);var n=!0;l&&(n=l.call(this,c)!==!1),n&&b.hide()}return!1},handleWindowMouseDown:function(a){var b=a.target||a.srcElement;b=Lib.getAncestorByClass(b,"popupMenu"),b||(Lib.removeEventListener(document,"mousedown",this.handleWindowMouseDown),this.destroy())},handleMouseOver:function(a){this.clearHideTimeout(),this.clearShowChildTimeout();var b=a.target||a.srcElement;b=Lib.getAncestorByClass(b,"popupMenuOption");if(b){var c=this.childMenu;c&&(Lib.removeClass(c.parentTarget,"popupMenuGroupSelected"),c.parentTarget!=b&&c.isVisible&&(c.clearHideTimeout(),c.hideTimeout=window.setTimeout(function(){c.destroy()},300))),Lib.hasClass(b,"popupMenuGroup")&&this.showChildMenu(b)}}}),Lib.append(Menu,{register:function(a){menuMap[a.id]=a},check:function(a){Lib.setClass(a,"popupMenuChecked"),a.setAttribute("checked","true")},uncheck:function(a){Lib.removeClass(a,"popupMenuChecked"),a.setAttribute("checked","")},disable:function(a){Lib.setClass(a,"popupMenuDisabled")},enable:function(a){Lib.removeClass(a,"popupMenuDisabled")}});return Menu}}),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;b<this.buttons.length;b++)if(this.buttons[b].id==a){this.buttons.splice(b,1);break}},addButtons:function(a){for(var b=0;b<a.length;b++)this.addButton(a[b])},getButton:function(a){for(var b=0;b<this.buttons.length;b++)if(this.buttons[b].id==a)return this.buttons[b]},render:function(a){if(this.buttons.length){this.element&&(a=this.element.parentNode),this.element=ToolbarTempl.tag.replace({},a);for(var b=0;b<this.buttons.length;b++){var c=this.buttons[b],d=c.items?ToolbarTempl.dropDownTag:ToolbarTempl.buttonTag,e=c.tag?c.tag:d,f=e.append({button:c},this.element);c.initialize&&c.initialize(f),b<this.buttons.length-1&&ToolbarTempl.separatorTag.append({},this.element)}return this.element}}};return Toolbar}}),define("nls/pageTimeline",{root:{pageLoad:"Page Load",request:"Request",requests:"Requests",pageBarTooltip:"Click to select and include in statistics preview."}}),require.def("tabs/pageTimeline",["domplate/domplate","core/lib","core/trace","i18n!nls/pageTimeline","preview/harModel"],function(Domplate,Lib,Trace,Strings,HarModel){with(Domplate){function Timeline(){this.listeners=[],this.element=null,this.maxElapsedTime=-1,this.lastSelectedBar=null}Timeline.prototype=domplate({graphCols:FOR("page","$input|getPages",TD({"class":"pageTimelineCol"},DIV({"class":"pageBar",_input:"$input",_page:"$page",title:Strings.pageBarTooltip,style:"height: $page|getHeight\\px",onmousemove:"$onMouseMove",onclick:"$onClick"}))),pageGraph:TABLE({"class":"pageTimelineTable",cellpadding:0,cellspacing:0},TBODY(TR({"class":"pageTimelineRow"},TAG("$graphCols",{input:"$input"})))),tag:DIV({"class":"pageTimelineBody",style:"height: auto; display: none"},TABLE({style:"margin: 7px;",cellpadding:0,cellspacing:0},TBODY(TR(TD(TAG("$pageGraph",{input:"$input"}))),TR(TD({"class":"pageDescContainer",colspan:2}))))),getHeight:function(a){var b=1,c=a.pageTimings.onLoad;c>0&&this.maxElapsedTime>0&&(b=Math.round(c/this.maxElapsedTime*100));return Math.max(1,b)},onClick:function(a){var b=Lib.fixEvent(a),c=b.target;if(Lib.hasClass(c,"pageBar")){var d=Lib.isControlClick(b),e=Lib.isShiftClick(b),f=Lib.getAncestorByClass(c,"pageTimelineRow");!d&&!e&&Selection.unselectAll(f,c),Selection.toggle(c),this.selectionChanged()}},onMouseMove:function(a){var b=Lib.fixEvent(a),c=b.target;if(Lib.hasClass(c,"pageBar")){if(this.highlightedPage==c.page)return;this.highlightedPage=c.page;var d=Lib.getElementByClass(this.element,"pageDescContainer");Timeline.Desc.render(d,c)}},getPages:function(a){return a.log.pages?a.log.pages:[]},getPageBar:function(a){if(this.element){var b=Lib.getElementByClass(this.element,"pageTimelineTable"),c=b.firstChild.firstChild.firstChild;while(c){if(c.firstChild.page==a)return c.firstChild;c=c.nextSibling}}},recalcLayout:function(){this.maxElapsedTime=0;var a=this.maxElapsedTime,b=Lib.getElementsByClass(this.element,"pageBar");for(var c=0;c<b.length;c++){var d=b[c].page,e=d.pageTimings.onLoad;e>0&&this.maxElapsedTime<e&&(this.maxElapsedTime=e)}if(a!=this.maxElapsedTime)for(var c=0;c<b.length;c++)b[c].style.height=this.getHeight(b[c].page)+"px"},updateDesc:function(){if(this.isVisible())if(!this.highlightedPage){var a=Lib.getElementByClass(this.element,"pageBar");a&&Lib.fireEvent(a,"mousemove")}},addListener:function(a){this.listeners.push(a)},removeListener:function(a){remove(this.listeners,a)},selectionChanged:function(){var a=this.getSelection();Lib.dispatch(this.listeners,"onSelectionChange",[a])},removeSelection:function(){if(this.element){var a=Lib.getElementByClass(this.element,"pageTimelineRow");Selection.unselectAll(a),this.selectionChanged()}},getSelection:function(){if(!this.isVisible())return[];var a=Lib.getElementByClass(this.element,"pageTimelineRow");return Selection.getSelection(a)},show:function(a){this.isVisible()||(!a||$.browser.msie?this.element.style.display="block":$(this.element).slideDown(),Lib.setClass(this.element,"opened"),this.updateDesc())},hide:function(a){this.isVisible()&&(!a||$.browser.msie?this.element.style.display="none":$(this.element).slideUp(),Lib.removeClass(this.element,"opened"),this.removeSelection())},isVisible:function(){return Lib.hasClass(this.element,"opened")},toggle:function(a){this.isVisible()?this.hide(a):this.show(a)},render:function(a){this.element=this.tag.replace({input:{log:{pages:[]}}},a,this),this.recalcLayout();return this.element},append:function(a,b){if(this.element){var c=Lib.getElementByClass(this.element,"pageTimelineRow");this.graphCols.insertCols({input:a},c,this),this.recalcLayout(),this.updateDesc()}}}),Timeline.Desc=domplate({tag:DIV({"class":"pageDescBox"},DIV({"class":"connector"}),DIV({"class":"desc"},SPAN({"class":"summary"},"$object|getSummary"),SPAN({"class":"time"},"$object.page|getTime"),SPAN({"class":"title"},"$object.page|getTitle"),PRE({"class":"comment"},"$object.page|getComment"))),getSummary:function(a){var b="",c=a.page.pageTimings.onLoad;c>0&&(b+=Strings.pageLoad+": "+Lib.formatTime(c)+", ");var d=HarModel.getPageEntries(a.input,a.page),e=d.length;b+=e+" "+(e==1?Strings.request:Strings.requests);return b},getTime:function(a){var b=Lib.parseISO8601(a.startedDateTime),c=new Date(b);return c.toLocaleString()},getTitle:function(a){return a.title},getComment:function(a){return a.comment?a.comment:""},render:function(a,b){var c={input:b.input,page:b.page},d=this.tag.replace({object:c},a),e=Lib.$(d,"connector");e.style.marginLeft=b.parentNode.offsetLeft+"px";return d}});var Selection={isSelected:function(a){return Lib.hasClass(a,"selected")},toggle:function(a){Lib.toggleClass(a,"selected")},select:function(a){this.isSelected(a)||Lib.setClass(a,"selected")},unselect:function(a){this.isSelected(a)&&Lib.removeClass(a,"selected")},getSelection:function(a){var b=[],c=Lib.getElementsByClass(a,"pageBar");for(var d=0;d<c.length;d++){var e=c[d];this.isSelected(e)&&b.push(e.page)}return b},unselectAll:function(a,b){var c=Lib.getElementsByClass(a,"pageBar");for(var d=0;d<c.length;d++)b!=c[d]&&this.unselect(c[d])}};return Timeline}}),define("nls/pageStats",{root:{pieLabelDNS:"DNS",pieLabelSSL:"SSL/TLS",pieLabelConnect:"Connect",pieLabelBlocked:"Blocked",pieLabelSend:"Send",pieLabelWait:"Wait",pieLabelReceive:"Receive",pieLabelHTMLText:"HTML/Text",pieLabelJavaScript:"JavaScript",pieLabelCSS:"CSS",pieLabelImage:"Image",pieLabelFlash:"Flash",pieLabelOthers:"Others",pieLabelHeadersSent:"Headers Sent",pieLabelBodiesSent:"Bodies Sent",pieLabelHeadersReceived:"Headers Received",pieLabelBodiesReceived:"Bodies Received",pieLabelDownloaded:"Downloaded",pieLabelPartial:"Partial",pieLabelFromCache:"From Cache"}}),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("tabs/pageStats",["domplate/domplate","core/lib","i18n!nls/pageStats","preview/harSchema","preview/harModel","core/cookies","domplate/infoTip","core/trace"],function(Domplate,Lib,Strings,HarSchema,HarModel,Cookies,InfoTip,Trace){with(Domplate){function Pie(){}Pie.prototype={data:[],title:"",getLabelTooltipText:function(a){return a.label+": "+Lib.formatSize(a.value)},cleanUp:function(){for(var a=0;a<this.data.length;a++)this.data[a].value=0,this.data[a].count=0}};function TimingPie(){}TimingPie.prototype=Lib.extend(Pie.prototype,{title:"Summary of request times.",data:[{value:0,label:Strings.pieLabelBlocked,color:"rgb(228, 214, 193)"},{value:0,label:Strings.pieLabelDNS,color:"rgb(119, 192, 203)"},{value:0,label:Strings.pieLabelSSL,color:"rgb(168, 196, 173)"},{value:0,label:Strings.pieLabelConnect,color:"rgb(179, 222, 93)"},{value:0,label:Strings.pieLabelSend,color:"rgb(224, 171, 157)"},{value:0,label:Strings.pieLabelWait,color:"rgb(163, 150, 190)"},{value:0,label:Strings.pieLabelReceive,color:"rgb(194, 194, 194)"}],getLabelTooltipText:function(a){return a.label+": "+Lib.formatTime(a.value)}});function ContentPie(){}ContentPie.prototype=Lib.extend(Pie.prototype,{title:"Summary of content types.",data:[{value:0,label:Strings.pieLabelHTMLText,color:"rgb(174, 234, 218)"},{value:0,label:Strings.pieLabelJavaScript,color:"rgb(245, 230, 186)"},{value:0,label:Strings.pieLabelCSS,color:"rgb(212, 204, 219)"},{value:0,label:Strings.pieLabelImage,color:"rgb(220, 171, 181)"},{value:0,label:Strings.pieLabelFlash,color:"rgb(166, 156, 222)"},{value:0,label:Strings.pieLabelOthers,color:"rgb(229, 171, 255)"}],getLabelTooltipText:function(a){return a.count+"x "+a.label+": "+Lib.formatSize(a.value)}});function TrafficPie(){}TrafficPie.prototype=Lib.extend(Pie.prototype,{title:"Summary of sent and received bodies & headers.",data:[{value:0,label:Strings.pieLabelHeadersSent,color:"rgb(247, 179, 227)"},{value:0,label:Strings.pieLabelBodiesSent,color:"rgb(226, 160, 241)"},{value:0,label:Strings.pieLabelHeadersReceived,color:"rgb(166, 232, 166)"},{value:0,label:Strings.pieLabelBodiesReceived,color:"rgb(168, 196, 173)"}]});function CachePie(){}CachePie.prototype=Lib.extend(Pie.prototype,{title:"Comparison of downloaded data from the server and browser cache.",data:[{value:0,label:Strings.pieLabelDownloaded,color:"rgb(182, 182, 182)"},{value:0,label:Strings.pieLabelPartial,color:"rgb(218, 218, 218)"},{value:0,label:Strings.pieLabelFromCache,color:"rgb(239, 239, 239)"}],getLabelTooltipText:function(a){return a.count+"x "+a.label+": "+Lib.formatSize(a.value)}});var timingPie=new TimingPie,contentPie=new ContentPie,trafficPie=new TrafficPie,cachePie=new CachePie,jsTypes={"text/javascript":1,"text/jscript":1,"application/javascript":1,"application/x-javascript":1,"text/js":1},htmlTypes={"text/plain":1,"text/html":1},cssTypes={"text/css":1},imageTypes={"image/png":1,"image/jpeg":1,"image/gif":1},flashTypes={"application/x-shockwave-flash":1},jsonTypes={"text/x-json":1,"text/x-js":1,"application/json":1,"application/x-js":1},xmlTypes={"application/xml":1,"application/xhtml+xml":1,"application/vnd.mozilla.xul+xml":1,"text/xml":1,"text/xul":1,"application/rdf+xml":1},unknownTypes={"text/xsl":1,"text/sgml":1,"text/rtf":1,"text/x-setext":1,"text/richtext":1,"text/tab-separated-values":1,"text/rdf":1,"text/xif":1,"text/ecmascript":1,"text/vnd.curl":1,"text/vbscript":1,"view-source":1,"view-fragment":1,"application/x-httpd-php":1,"application/ecmascript":1,"application/http-index-format":1};function Stats(a,b){this.model=a,this.timeline=b,this.timeline.addListener(this)}Stats.prototype=domplate({element:null,tag:DIV({"class":"pageStatsBody",style:"height: auto; display: none"}),update:function(a){if(this.isVisible()){this.cleanUp();var b=HarSchema.timingsType.properties;a.length||a.push(null);for(var c=0;c<a.length;c++){var d=a[c],e=d?this.model.getPageEntries(d):this.model.getAllEntries();for(var f=0;f<e.length;f++){var g=e[f];if(!g.timings)continue;timingPie.data[0].value+=g.timings.blocked,timingPie.data[1].value+=g.timings.dns,timingPie.data[2].value+=g.timings.ssl>0?g.timings.ssl:0,timingPie.data[3].value+=g.timings.connect,timingPie.data[4].value+=g.timings.send,timingPie.data[5].value+=g.timings.wait,timingPie.data[6].value+=g.timings.receive,g.timings.ssl>0&&(timingPie.data[3].value-=g.timings.ssl);var h=g.response,i=h.bodySize>0?h.bodySize:0,j=h.content.mimeType,k=j?j.match(/^([^;]+)/)[1]:null,j=k?k:h.content.mimeType;htmlTypes[j]?(contentPie.data[0].value+=i,contentPie.data[0].count++):jsTypes[j]?(contentPie.data[1].value+=i,contentPie.data[1].count++):cssTypes[j]?(contentPie.data[2].value+=i,contentPie.data[2].count++):imageTypes[j]?(contentPie.data[3].value+=i,contentPie.data[3].count++):flashTypes[j]?(contentPie.data[4].value+=i,contentPie.data[4].count++):(contentPie.data[5].value+=i,contentPie.data[5].count++),trafficPie.data[0].value+=g.request.headersSize>0?g.request.headersSize:0,trafficPie.data[1].value+=g.request.bodySize>0?g.request.bodySize:0,trafficPie.data[2].value+=g.response.headersSize>0?g.response.headersSize:0,trafficPie.data[3].value+=i,g.response.status==206?(cachePie.data[1].value+=i,cachePie.data[1].count++):g.response.status==304?(cachePie.data[2].value+=i,cachePie.data[2].count++):i>0&&(cachePie.data[0].value+=i,cachePie.data[0].count++)}}Pie.draw(Lib.$(this.timingPie,"pieGraph"),timingPie),Pie.draw(Lib.$(this.contentPie,"pieGraph"),contentPie),Pie.draw(Lib.$(this.trafficPie,"pieGraph"),trafficPie),Pie.draw(Lib.$(this.cachePie,"pieGraph"),cachePie)}},cleanUp:function(){timingPie.cleanUp(),contentPie.cleanUp(),trafficPie.cleanUp(),cachePie.cleanUp()},showInfoTip:function(a,b,c,d){return Pie.showInfoTip(a,b,c,d)},onSelectionChange:function(a){this.update(a)},show:function(a){if(!this.isVisible()){InfoTip.addListener(this),Lib.setClass(this.element,"opened"),!a||$.browser.msie?this.element.style.display="block":$(this.element).slideDown();var b=this.timeline.getSelection();this.update(b)}},hide:function(a){this.isVisible()&&(InfoTip.removeListener(this),Lib.removeClass(this.element,"opened"),!a||$.browser.msie?this.element.style.display="none":$(this.element).slideUp())},isVisible:function(){return Lib.hasClass(this.element,"opened")},toggle:function(a){this.isVisible()?this.hide(a):this.show(a)},render:function(a){this.element=this.tag.replace({},a),this.timingPie=Pie.render(timingPie,this.element),this.contentPie=Pie.render(contentPie,this.element),this.trafficPie=Pie.render(trafficPie,this.element),this.cachePie=Pie.render(cachePie,this.element),this.cachePie.style.borderRight=0;return this.element}});var Pie=domplate({tag:TABLE({"class":"pagePieTable",cellpadding:0,cellspacing:0,_repObject:"$pie"},TBODY(TR(TD({"class":"pieBox",title:"$pie.title"}),TD(FOR("item","$pie.data",DIV({"class":"pieLabel",_repObject:"$item"},SPAN({"class":"box",style:"background-color: $item.color"},"&nbsp;"),SPAN({"class":"label"},"$item.label"))))))),render:function(a,b){var c=this.tag.append({pie:a},b),d=Lib.$(c,"pieBox"),e=document.createElement("canvas");e.setAttribute("class","pieGraph "),e.setAttribute("height","100"),e.setAttribute("width","100"),d.appendChild(e),typeof G_vmlCanvasManager!="undefined"&&G_vmlCanvasManager.initElement(e);return c},draw:function(a,b){if(a&&a.getContext){var c=a.getContext("2d"),d=Math.min(a.width,a.height)/2,e=[a.width/2,a.height/2];c.clearRect(0,0,a.width,a.height);var f=0,g=b.data,h=0;for(var i in g)h+=g[i].value;if(!h){c.beginPath(),c.moveTo(e[0],e[1]),c.arc(e[0],e[1],d,0,Math.PI*2,!1),c.closePath(),c.fillStyle="rgb(229,236,238)",c.lineStyle="lightgray",c.fill();return}for(var i=0;i<g.length;i++){var j=g[i].value/h;c.beginPath(),c.moveTo(e[0],e[1]),c.arc(e[0],e[1],d,Math.PI*(-.5+2*f),Math.PI*(-.5+2*(f+j)),!1),c.lineTo(e[0],e[1]),c.closePath(),c.fillStyle=g[i].color,c.fill(),f+=j}}},showInfoTip:function(a,b,c,d){var e=Lib.getAncestorByClass(b,"pagePieTable");if(!e)return!1;var f=Lib.getAncestorByClass(b,"pieLabel");if(f){PieInfoTip.render(e.repObject,f.repObject,a);return!0}}}),PieInfoTip=domplate({tag:DIV({"class":"pieLabelInfoTip"},"$text"),getText:function(a){return a.label+": "+formatTime(a.value)},render:function(a,b,c){var d=a.getLabelTooltipText(b);this.tag.replace({text:d},c)}});return Stats}}),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"}}),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("core/dragdrop",["core/lib"],function(a){function d(a){return isNaN(window.scrollX)?new c(a.clientX+document.documentElement.scrollLeft+document.body.scrollLeft,a.clientY+document.documentElement.scrollTop+document.body.scrollTop):new c(a.clientX+window.scrollX,a.clientY+window.scrollY)}function c(a,b){this.x=a,this.y=b,this.Add=function(a){var b=new c(this.x,this.y);a!=null&&(isNaN(a.x)||(b.x+=a.x),isNaN(a.y)||(b.y+=a.y));return b},this.Subtract=function(a){var b=new c(this.x,this.y);a!=null&&(isNaN(a.x)||(b.x-=a.x),isNaN(a.y)||(b.y-=a.y));return b},this.Bound=function(a,b){var c=this.Max(a);return c.Min(b)},this.Check=function(){var a=new c(this.x,this.y);isNaN(a.x)&&(a.x=0),isNaN(a.y)&&(a.y=0);return a},this.Apply=function(a){typeof a=="string"&&(a=document.getElementById(a));a&&(isNaN(this.x)||(a.style.left=this.x+"px"),isNaN(this.y)||(a.style.top=this.y+"px"))}}function b(b,c){this.element=b,this.handle=b,this.callbacks=c,this.cursorStartPos=null,this.cursorLastPos=null,this.dragging=!1,this.onDragStart=a.bind(this.onDragStart,this),this.onDragOver=a.bind(this.onDragOver,this),this.onDrop=a.bind(this.onDrop,this),a.addEventListener(this.element,"mousedown",this.onDragStart,!1),this.active=!0}b.prototype={onDragStart:function(b){var c=a.fixEvent(b);this.dragging||(this.callbacks.onDragStart&&this.callbacks.onDragStart(this),this.dragging=!0,this.cursorStartPos=d(c),this.cursorLastPos=this.cursorStartPos,a.addEventListener(this.element.ownerDocument,"mousemove",this.onDragOver,!1),a.addEventListener(this.element.ownerDocument,"mouseup",this.onDrop,!1),a.cancelEvent(c))},onDragOver:function(b){if(this.dragging){var c=a.fixEvent(b);a.cancelEvent(c);var e=d(c),e=e.Subtract(this.cursorStartPos);if(this.cursorLastPos.x==e.x&&this.cursorLastPos.y==e.y)return;if(this.callbacks.onDragOver!=null){var f=this.callbacks.onDragOver(e,this);this.cursorLastPos=e}}},onDrop:function(b){if(this.dragging){var c=a.fixEvent(b);a.cancelEvent(c),this.dragStop()}},dragStop:function(){this.dragging&&(a.removeEventListener(this.element.ownerDocument,"mousemove",this.onDragOver,!1),a.removeEventListener(this.element.ownerDocument,"mouseup",this.onDrop,!1),this.cursorStartPos=null,this.cursorLastPos=null,this.callbacks.onDrop!=null&&this.callbacks.onDrop(this),this.dragging=!1)},destroy:function(){a.removeEventListener(this.element,"mousedown",this.onDragStart,!1),this.active=!1,this.dragging&&this.dragStop()}};var e={};e.Tracker=b;return e}),require.def("syntax-highlighter/shCore",[],function(){var a={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:'<html><head><title>About...</title></head><body class="dp-about"><table cellspacing="0"><tr><td class="copy"><p class="title">dp.SyntaxHighlighter</div><div class="para">Version: {V}</p><p><a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/syntaxhighlighter</a></p>&copy;2004-2007 Alex Gorbatchev.</td></tr><tr><td class="footer"><input type="button" class="close" value="OK" onClick="window.close()"/></td></tr></table></body></html>'},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(/</g,"&lt;"),e=window.open("","_blank","width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0");e.document.write('<textarea style="width:99%;height:99%">'+d+"</textarea>"),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(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/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='<embed src="'+a.sh.ClipboardSwf+'" FlashVars="clipboard='+encodeURIComponent(d)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>'}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('<div class="'+c.div.className.replace("collapsed","")+' printing">'+c.div.innerHTML+"</div>"),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+='<a href="#" onclick="dp.sh.Toolbar.Command(\''+d+"',this);return false;\">"+e.label+"</a>"}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<c.length;d++)c[d].rel.toLowerCase()=="stylesheet"&&a.write('<link type="text/css" rel="stylesheet" href="'+c[d].href+'"></link>')},a.sh.Utils.FixForBlogger=function(b){return a.sh.isBloggerMode==!0?b.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/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.index<b.index)return-1;if(a.index>b.index)return 1;if(a.length<b.length)return-1;if(a.length>b.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,"&nbsp;"),a=a.replace(/</g,"&lt;"),a=a.replace(/\n/gm,"&nbsp;<br>");if(b!=null)if(/br/gi.test(a)){var d=a.split("&nbsp;<br>");for(var e=0;e<d.length;e++)c=this.CreateElement("SPAN"),c.className=b,c.innerHTML=d[e],this.div.appendChild(c),e+1<d.length&&this.div.appendChild(this.CreateElement("BR"))}else c.className=b,c.innerHTML=a,this.div.appendChild(c);else c.innerHTML=a,this.div.appendChild(c)}},a.sh.Highlighter.prototype.IsInside=function(a){if(a==null||a.length==0)return!1;for(var b=0;b<this.matches.length;b++){var c=this.matches[b];if(c==null)continue;if(a.index>c.index&&a.index<c.index+c.length)return!0}return!1},a.sh.Highlighter.prototype.ProcessRegexList=function(){for(var a=0;a<this.regexList.length;a++)this.GetMatches(this.regexList[a].regex,this.regexList[a].css)},a.sh.Highlighter.prototype.ProcessSmartTabs=function(a){function g(a,b){if(a.indexOf(e)==-1)return a;var c=0;while((c=a.indexOf(e))!=-1){var d=b-c%b;a=f(a,c,d)}return a}function f(a,b,c){var d=a.substr(0,b),e=a.substr(b+1,a.length),f="";for(var g=0;g<c;g++)f+=" ";return d+f+e}var b=a.split("\n"),c="",d=4,e="\t";for(var h=0;h<b.length;h++)c+=g(b[h],d)+"\n";return c},a.sh.Highlighter.prototype.SwitchToList=function(){var b=this.div.innerHTML.replace(/<(br)\/?>/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+="&middot;",g++);e.className="columns",e.appendChild(d),this.bar.appendChild(e)}for(var g=0,h=this.firstLine;g<c.length-1;g++,h++){var i=this.CreateElement("LI"),j=this.CreateElement("SPAN");i.className=g%2==0?"alt":"",j.innerHTML=c[g]+"&nbsp;",i.appendChild(j),this.ol.appendChild(i)}this.div.innerHTML=""},a.sh.Highlighter.prototype.Highlight=function(b){function f(a,b,c){return a.substr(b,c-b)}function e(b){var d=a.sh.Utils.FixForBlogger(b).split("\n"),e=[],f=new RegExp("^\\s*","g"),g=1e3;for(var h=0;h<d.length&&g>0;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;h<d.length;h++)d[h]=d[h].substr(g);return d.join("\n")}function d(a){return a.replace(/\n*$/,"").replace(/^\n*/,"")}function c(a){return a.replace(/^\s*(.*?)[\s\n]*$/g,"$1")}var g=0;b==null&&(b=""),this.originalCode=b,this.code=d(e(b)),this.div=this.CreateElement("DIV"),this.bar=this.CreateElement("DIV"),this.ol=this.CreateElement("OL"),this.matches=[],this.div.className="dp-highlighter",this.div.highlighter=this,this.bar.className="bar",this.ol.start=this.firstLine,this.CssClass!=null&&(this.ol.className=this.CssClass),this.collapse&&(this.div.className+=" collapsed"),this.noGutter&&(this.div.className+=" nogutter"),this.tabsToSpaces==!0&&(this.code=this.ProcessSmartTabs(this.code)),this.ProcessRegexList();if(this.matches.length==0)this.AddBit(this.code,null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol);else{this.matches=this.matches.sort(a.sh.Highlighter.SortCallback);for(var h=0;h<this.matches.length;h++)this.IsInside(this.matches[h])&&(this.matches[h]=null);for(var h=0;h<this.matches.length;h++){var i=this.matches[h];if(i==null||i.length==0)continue;this.AddBit(f(this.code,g,i.index),null),this.AddBit(i.value,i.css),g=i.index+i.length}this.AddBit(this.code.substr(g),null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol)}},a.sh.Highlighter.prototype.GetKeywords=function(a){return"\\b"+a.replace(/ /g,"\\b|\\b")+"\\b"},a.sh.BloggerMode=function(){a.sh.isBloggerMode=!0},a.sh.HighlightAll=function(b,c,d,e,f,g){function k(a,b,c){var d=document.getElementsByTagName(c);for(var e=0;e<d.length;e++)d[e].getAttribute("name")==b&&a.push(d[e])}function j(a,b,c){var d=new RegExp("^"+a+"\\[(\\w+)\\]$","gi"),e=null;for(var f=0;f<b.length;f++)if((e=d.exec(b[f]))!=null)return e[1];return c}function i(a,b){for(var c=0;c<b.length;c++)if(b[c]==a)return!0;return!1}function h(){var a=arguments;for(var b=0;b<a.length;b++){if(a[b]==null)continue;if(typeof a[b]=="string"&&a[b]!="")return a[b]+"";if(typeof a[b]=="object"&&a[b].value!="")return a[b].value+""}return null}var l=[],m=null,n={},o="innerHTML";typeof b=="string"?(k(l,b,"pre"),k(l,b,"textarea")):l.push(b);if(l.length!=0){for(var p in a.sh.Brushes){var q=a.sh.Brushes[p].Aliases;if(q==null)continue;for(var r=0;r<q.length;r++)n[q[r]]=p}for(var r=0;r<l.length;r++){var s=l[r],t=h(s.attributes["class"],s.className,s.attributes.language,s.language),u="";if(t==null)continue;t=t.split(":"),u=t[0].toLowerCase();if(n[u]==null)continue;m=new a.sh.Brushes[n[u]],s.style.display="none",m.noGutter=c==null?i("nogutter",t):!c,m.addControls=d==null?!i("nocontrols",t):d,m.collapse=e==null?i("collapse",t):e,m.showColumns=g==null?i("showcolumns",t):g;var v=document.getElementsByTagName("head")[0];if(m.Style&&v){var w=document.createElement("style");w.setAttribute("type","text/css");if(w.styleSheet)w.styleSheet.cssText=m.Style;else{var x=document.createTextNode(m.Style);w.appendChild(x)}v.appendChild(w)}m.firstLine=f==null?parseInt(j("firstline",t,1)):f,m.Highlight(s[o]),m.source=s,s.parentNode.insertBefore(m.div,s)}}},a.sh.Brushes.JScript=function(){var b="abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with";this.regexList=[{regex:a.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:a.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:a.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:a.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(b),"gm"),css:"keyword"}],this.CssClass="dp-c"},a.sh.Brushes.JScript.prototype=new a.sh.Highlighter,a.sh.Brushes.JScript.Aliases=["js","jscript","javascript"];return a}),require.def("preview/requestBody",["domplate/domplate","i18n!nls/requestBody","core/lib","core/cookies","domplate/tabView","core/dragdrop","syntax-highlighter/shCore"],function(Domplate,Strings,Lib,Cookies,TabView,DragDrop,dp){with(Domplate){function RequestBody(){}RequestBody.prototype=domplate({render:function(a,b){var c=new TabView("requestBody");b.response.headers.length>0&&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("preview/requestList",["domplate/domplate","core/lib","i18n!nls/requestList","preview/harModel","core/cookies","preview/requestBody","domplate/infoTip","domplate/popupMenu"],function(Domplate,Lib,Strings,HarModel,Cookies,RequestBody,InfoTip,Menu){with(Domplate){function RequestList(a){this.input=a,this.pageTimings=[],this.addPageTiming({name:"onContentLoad",classes:"netContentLoadBar",description:Strings.ContentLoad}),this.addPageTiming({name:"onLoad",classes:"netWindowLoadBar",description:Strings.WindowLoad}),InfoTip.addListener(this)}RequestList.columns=["url","status","type","domain","size","timeline"],RequestList.defaultColumns=["url","status","size","timeline"],RequestList.getVisibleColumns=function(){var a=Cookies.getCookie("previewCols");if(a){a=a.replace(/\+/g," "),a=unescape(a);return a.split(" ")}if(!a){var b=document.getElementById("content");if(b){a=b.getAttribute("previewCols");if(a)return a.split(" ")}}return Lib.cloneArray(RequestList.defaultColumns)},RequestList.setVisibleColumns=function(a,b){a||(a=RequestList.getVisibleColumns()),a.join&&(a=a.join(" "));var c=document.getElementById("content");c&&c.setAttribute("previewCols",a),b||Cookies.setCookie("previewCols",a)},RequestList.setVisibleColumns(),RequestList.prototype=domplate({tableTag:TABLE({"class":"netTable",cellpadding:0,cellspacing:0,onclick:"$onClick",_repObject:"$requestList"},TBODY(TR({"class":"netSizerRow"},TD({"class":"netHrefCol netCol",width:"20%"}),TD({"class":"netStatusCol netCol",width:"7%"}),TD({"class":"netTypeCol netCol",width:"7%"}),TD({"class":"netDomainCol netCol",width:"7%"}),TD({"class":"netSizeCol netCol",width:"7%"}),TD({"class":"netTimeCol netCol",width:"100%"}),TD({"class":"netOptionsCol netCol",width:"15px"})))),fileTag:FOR("file","$files",TR({"class":"netRow loaded",$isExpandable:"$file|isExpandable",$responseError:"$file|isError",$responseRedirect:"$file|isRedirect",$fromCache:"$file|isFromCache"},TD({"class":"netHrefCol netCol"},DIV({"class":"netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getHref"),DIV({"class":"netFullHrefLabel netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getFullHref")),TD({"class":"netStatusCol netCol"},DIV({"class":"netStatusLabel netLabel"},"$file|getStatus")),TD({"class":"netTypeCol netCol"},DIV({"class":"netTypeLabel netLabel"},"$file|getType")),TD({"class":"netDomainCol netCol"},DIV({"class":"netDomainLabel netLabel"},"$file|getDomain")),TD({"class":"netSizeCol netCol"},DIV({"class":"netSizeLabel netLabel"},"$file|getSize")),TD({"class":"netTimeCol netCol"},DIV({"class":"netTimelineBar"},"&nbsp;",DIV({"class":"netBlockingBar netBar"}),DIV({"class":"netResolvingBar netBar"}),DIV({"class":"netConnectingBar netBar"}),DIV({"class":"netSendingBar netBar"}),DIV({"class":"netWaitingBar netBar"}),DIV({"class":"netReceivingBar netBar"},SPAN({"class":"netTimeLabel"},"$file|getElapsedTime")))),TD({"class":"netOptionsCol netCol"},DIV({"class":"netOptionsLabel netLabel",onclick:"$onOpenOptions"})))),headTag:TR({"class":"netHeadRow"},TD({"class":"netHeadCol",colspan:7},DIV({"class":"netHeadLabel"},"$doc.rootFile.href"))),netInfoTag:TR({"class":"netInfoRow"},TD({"class":"netInfoCol",colspan:7})),summaryTag:TR({"class":"netRow netSummaryRow"},TD({"class":"netHrefCol netCol"},DIV({"class":"netCountLabel netSummaryLabel"},"-")),TD({"class":"netStatusCol netCol"}),TD({"class":"netTypeCol netCol"}),TD({"class":"netDomainCol netCol"}),TD({"class":"netTotalSizeCol netSizeCol netCol"},DIV({"class":"netTotalSizeLabel netSummaryLabel"},"0KB")),TD({"class":"netTotalTimeCol netTimeCol netCol"},DIV({"class":"",style:"width: 100%"},DIV({"class":"netCacheSizeLabel netSummaryLabel"},"(",SPAN("0KB"),SPAN(" "+Strings.fromCache),")"),DIV({"class":"netTimeBar"},SPAN({"class":"netTotalTimeLabel netSummaryLabel"},"0ms")))),TD({"class":"netOptionsCol netCol"})),getIndent:function(a){return 0},isError:function(a){var b=Math.floor(a.response.status/100);return b==4||b==5},isRedirect:function(a){return!1},isFromCache:function(a){return a.cache&&a.cache.afterRequest},getHref:function(a){var b=Lib.getFileName(this.getFullHref(a));return unescape(a.request.method+" "+b)},getFullHref:function(a){return unescape(a.request.url)},getStatus:function(a){var b=a.response.status>0?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<c.length;j++){var k=c[j];Lib.hasClass(e,"netInfoRow")&&(e=e.nextSibling),e.repObject=k,h||(h=Lib.parseISO8601(k.startedDateTime));var l=Lib.parseISO8601(k.startedDateTime),m=g?Lib.parseISO8601(g.getLastStartTime()):0,n=g?g.endTime:0,o=!1;f>=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.endTime<l+k.time)g.endTime=l+k.time;e=e.nextSibling}this.updateTimeStamps(b),this.updateTimeline(b),this.updateSummaries(b)},startPhase:function(a){var b=new Phase(a);this.phases.push(b);return b},calculateFileTimes:function(a,b,c){c!=b.phase&&(c=b.phase,this.phaseStartTime=c.startTime,this.phaseEndTime=c.endTime,this.phaseElapsed=this.phaseEndTime-c.startTime);if(!b.timings)return c;var d=b.timings.blocked<0?0:b.timings.blocked,e=d+(b.timings.dns<0?0:b.timings.dns),f=e+(b.timings.connect<0?0:b.timings.connect),g=f+(b.timings.send<0?0:b.timings.send),h=g+(b.timings.wait<0?0:b.timings.wait),i=h+(b.timings.receive<0?0:b.timings.receive),j=b.time,k=Lib.parseISO8601(b.startedDateTime);this.barOffset=((k-this.phaseStartTime)/this.phaseElapsed*100).toFixed(3),this.barBlockingWidth=(d/this.phaseElapsed*100).toFixed(3),this.barResolvingWidth=(e/this.phaseElapsed*100).toFixed(3),this.barConnectingWidth=(f/this.phaseElapsed*100).toFixed(3),this.barSendingWidth=(g/this.phaseElapsed*100).toFixed(3),this.barWaitingWidth=(h/this.phaseElapsed*100).toFixed(3),this.barReceivingWidth=(i/this.phaseElapsed*100).toFixed(3),this.calculatePageTimings(a,b,c);return c},calculatePageTimings:function(a,b,c){if(a){var d=Lib.parseISO8601(a.startedDateTime);for(var e=0;e<c.pageTimings.length;e++){var f=c.pageTimings[e].time;if(f>0){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;n<m.length;n++)m[n].parentNode.removeChild(m[n]);for(var n=0;n<c.pageTimings.length;n++){var o=c.pageTimings[n];if(!o.offset)continue;var p=f.ownerDocument.createElement("DIV");f.appendChild(p),o.classes&&Lib.setClass(p,o.classes),Lib.setClass(p,"netPageTimingBar netBar"),p.style.left=o.offset+"%",p.style.display="block",o.offset=null}}},updateTimeStamps:function(a){if(a){var b=[];for(var c=0;a.pageTimings&&c<this.pageTimings.length;c++){var d=this.pageTimings[c],e=a.pageTimings[d.name];e>0&&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<g.length;c++){var h=g[c],i=g[c+1];for(var j=0;j<b.length;j++){var k=b[j],l=k.time;if(!l)continue;var m=Lib.parseISO8601(a.startedDateTime);l+=m;if(!i||l<i.startTime)if(c==0||l>=h.startTime)h.startTime>l&&(h.startTime=l),h.endTime<l&&(h.endTime=l),h.pageTimings.push({classes:k.classes?k.classes:"netTimeStampBar",name:k.label,description:k.comment,time:k.time})}}}},updateSummaries:function(a){var b=this.phases,c=0,d=0,e=0,f=0;for(var g=0;g<b.length;++g){var h=b[g];h.invalidPhase=!1;var i=this.summarizePhase(h);c+=i.fileCount,d+=i.totalSize,e+=i.cachedSize,f+=i.totalTime}var j=this.summaryRow;if(j){var k=Lib.getElementByClass(j,"netCountLabel");k.firstChild.nodeValue=this.formatRequestCount(c);var l=Lib.getElementByClass(j,"netTotalSizeLabel");l.setAttribute("totalSize",d),l.firstChild.nodeValue=Lib.formatSize(d);var m=Lib.getElementByClass(j,"netCacheSizeLabel");m.setAttribute("collapsed",e==0),m.childNodes[1].firstChild.nodeValue=Lib.formatSize(e);var n=Lib.getElementByClass(j,"netTotalTimeLabel"),o=Lib.formatTime(f);a&&a.pageTimings.onLoad>0&&(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;h<a.files.length;h++){var i=a.files[h],j=Lib.parseISO8601(i.startedDateTime);if(!d||i.category==d){++e;var k=i.response.bodySize,l=k&&k!=-1?k:i.response.content.size;c+=l,i.response.status==304&&(b+=l);if(!f||j<f)f=j;var m=j+i.time;m>g&&(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<b.phase.pageTimings.length;u++){var v=b.phase.pageTimings[u];t.push({bar:v.description?v.description:v.name,start:g+v.time-h,classes:v.classes,time:v.time})}t.length&&(t.sort(function(a,b){return a.time<b.time?-1:1}),this.separatorTag.insertRows({label:Strings["request.timings.label"]},i.firstChild),this.eventsTag.insertRows({events:t},i.firstChild));return!0}}),EntrySizeInfoTip=domplate({tag:DIV({"class":"sizeInfoTip"},"$file|getSize"),zippedTag:DIV(DIV({"class":"sizeInfoTip"},"$file|getBodySize"),DIV({"class":"sizeInfoTip"},"$file|getContentSize")),getSize:function(a){var b=a.response.bodySize;if(b<0)return Strings.unknownSize;return Lib.formatString(Strings.tooltipSize,Lib.formatSize(b),Lib.formatNumber(b))},getBodySize:function(a){var b=a.response.bodySize;if(b<0)return Strings.unknownSize;return Lib.formatString(Strings.tooltipZippedSize,Lib.formatSize(b),Lib.formatNumber(b))},getContentSize:function(a){var b=a.response.content.size;if(b<0)return Strings.unknownSize;return Lib.formatString(Strings.tooltipUnzippedSize,Lib.formatSize(b),Lib.formatNumber(b))},render:function(a,b,c){var d=a.input,e=b.repObject;if(e.response.bodySize==e.response.content.size)return this.tag.replace({file:e},c);return this.zippedTag.replace({file:e},c)}});return RequestList}}),define("nls/pageList",{root:{"column.label.url":"URL","column.label.status":"Status","column.label.type":"Type","column.label.domain":"Domain","column.label.size":"Size","column.label.timeline":"Timeline","action.label.Reset":"Reset"}}),require.def("preview/pageList",["domplate/domplate","core/lib","core/trace","core/cookies","preview/requestList","i18n!nls/pageList","domplate/popupMenu"],function(Domplate,Lib,Trace,Cookies,RequestList,Strings,Menu){with(Domplate){function PageList(a){this.input=a,this.listeners=[]}PageList.prototype=domplate({tableTag:TABLE({"class":"pageTable",cellpadding:0,cellspacing:0,onclick:"$onClick",_repObject:"$input"},TBODY(TAG("$rowTag",{groups:"$input.log.pages"}))),rowTag:FOR("group","$groups",TR({"class":"pageRow",_repObject:"$group"},TD({"class":"groupName pageCol",width:"1%"},SPAN({"class":"pageName"},"$group|getPageTitle")),TD({"class":"netOptionsCol netCol",width:"15px"},DIV({"class":"netOptionsLabel netLabel",onclick:"$onOpenOptions"})))),bodyTag:TR({"class":"pageInfoRow",style:"height:auto;"},TD({"class":"pageInfoCol",colspan:2})),getPageTitle:function(a){return Lib.cropString(a.title,100)},getPageID:function(a){return"["+a.id+"]"},onClick:function(a){var b=Lib.fixEvent(a);if(Lib.isLeftClick(a)){var c=Lib.getAncestorByClass(b.target,"pageRow");c&&(this.toggleRow(c),Lib.cancelEvent(a))}},toggleRow:function(a,b){var c=Lib.hasClass(a,"opened");if(!c||!b){Lib.toggleClass(a,"opened");if(Lib.hasClass(a,"opened")){var d=this.bodyTag.insertRows({},a)[0],e=this.createRequestList(),f=PageList.prototype.pageTimings;for(var g=0;g<f.length;g++)e.addPageTiming(f[g]);e.render(d.firstChild,a.repObject)}else{var d=a.nextSibling;a.parentNode.removeChild(d)}}},expandAll:function(a){var b=a.firstChild.firstChild;while(b)Lib.hasClass(b,"pageRow")&&this.toggleRow(b,!0),b=b.nextSibling},getPageRow:function(a){var b=this.element.parentNode,c=Lib.getElementsByClass(b,"pageRow");for(var d=0;d<c.length;d++){var e=c[d];if(e.repObject==a)return e}},togglePage:function(a){var b=this.getPageRow(a);this.toggleRow(b)},expandPage:function(a){var b=this.getPageRow(a);this.toggleRow(b,!0)},collapsePage:function(a){var b=this.getPageRow(a);Lib.hasClass(b,"opened")&&this.toggleRow(b)},onOpenOptions:function(a){var b=Lib.fixEvent(a);Lib.cancelEvent(a);if(Lib.isLeftClick(a)){var c=b.target,d=Lib.getAncestorByClass(c,"pageRow"),e=this.getMenuItems(d.repObject),f=new Menu({id:"requestContextMenu",items:e});f.showPopup(c)}},getMenuItems:function(a){var b=RequestList.getVisibleColumns().join(),c,d=0,e=[];for(var f=0;f<RequestList.columns.length;f++){var g=RequestList.columns[f],h=b.indexOf(g)>-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("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"},"&nbsp;")),TD("&nbsp;"),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}});var swfobject=function(){function O(a){var b=/[\\\"<>\.;]/,c=b.exec(a)!=null;return c?encodeURIComponent(a):a}function N(a,b){var c=b?"visible":"hidden";r&&I(a)?I(a).style.visibility=c:M("#"+a,"visibility:"+c)}function M(c,d){if(!t.ie||!t.mac){var e=h.getElementsByTagName("head")[0],f=J("style");f.setAttribute("type","text/css"),f.setAttribute("media","screen"),(!t.ie||!t.win)&&typeof h.createTextNode!=a&&f.appendChild(h.createTextNode(c+" {"+d+"}")),e.appendChild(f);if(t.ie&&t.win&&typeof h.styleSheets!=a&&h.styleSheets.length>0){var g=h.styleSheets[h.styleSheets.length-1];typeof g.addRule==b&&g.addRule(c,d)}}}function L(a){var b=t.pv,c=a.split(".");c[0]=parseInt(c[0],10),c[1]=parseInt(c[1],10)||0,c[2]=parseInt(c[2],10)||0;return b[0]>c[0]||b[0]==c[0]&&b[1]>c[1]||b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]?!0:!1}function K(a,b,c){a.attachEvent(b,c),m[m.length]=[a,b,c]}function J(a){return h.createElement(a)}function I(a){var b=null;try{b=h.getElementById(a)}catch(c){}return b}function H(a){var b=I(a);if(b){for(var c in b)typeof b[c]=="function"&&(b[c]=null);b.parentNode.removeChild(b)}}function G(a){var b=I(a);b&&(b.nodeName=="OBJECT"||b.nodeName=="EMBED")&&(t.ie&&t.win?b.readyState==4?H(a):g.attachEvent("onload",function(){H(a)}):b.parentNode.removeChild(b))}function F(a,b,c){var d=J("param");d.setAttribute("name",b),d.setAttribute("value",c),a.appendChild(d)}function E(c,d,f){var g,h=I(f);if(h){typeof c.id==a&&(c.id=f);if(t.ie&&t.win){var i="";for(var j in c)c[j]!=Object.prototype[j]&&(j.toLowerCase()=="data"?d.movie=c[j]:j.toLowerCase()=="styleclass"?i+=' class="'+c[j]+'"':j.toLowerCase()!="classid"&&(i+=" "+j+'="'+c[j]+'"'));var k="";for(var m in d)d[m]!=Object.prototype[m]&&(k+='<param name="'+m+'" value="'+d[m]+'" />');h.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+i+">"+k+"</object>",l[l.length]=c.id,g=I(c.id)}else if(t.webkit&&t.webkit<312){var n=J("embed");n.setAttribute("type",e);for(var o in c)c[o]!=Object.prototype[o]&&(o.toLowerCase()=="data"?n.setAttribute("src",c[o]):o.toLowerCase()=="styleclass"?n.setAttribute("class",c[o]):o.toLowerCase()!="classid"&&n.setAttribute(o,c[o]));for(var p in d)d[p]!=Object.prototype[p]&&(p.toLowerCase()!="movie"&&n.setAttribute(p,d[p]));h.parentNode.replaceChild(n,h),g=n}else{var q=J(b);q.setAttribute("type",e);for(var r in c)c[r]!=Object.prototype[r]&&(r.toLowerCase()=="styleclass"?q.setAttribute("class",c[r]):r.toLowerCase()!="classid"&&q.setAttribute(r,c[r]));for(var s in d)d[s]!=Object.prototype[s]&&s.toLowerCase()!="movie"&&F(q,s,d[s]);h.parentNode.replaceChild(q,h),g=q}}return g}function D(a){var c=J("div");if(t.win&&t.ie)c.innerHTML=a.innerHTML;else{var d=a.getElementsByTagName(b)[0];if(d){var e=d.childNodes;if(e){var f=e.length;for(var g=0;g<f;g++)(e[g].nodeType!=1||e[g].nodeName!="PARAM")&&e[g].nodeType!=8&&c.appendChild(e[g].cloneNode(!0))}}}return c}function C(a){if(t.ie&&t.win&&a.readyState!=4){var b=J("div");a.parentNode.insertBefore(b,a),b.parentNode.replaceChild(D(a),b),a.style.display="none";var c=function(){a.parentNode.removeChild(a)};K(g,"onload",c)}else a.parentNode.replaceChild(D(a),a)}function B(a){s=!0;var b=I(a.id);if(b){if(a.altContentId){var c=I(a.altContentId);c&&(p=c,q=a.altContentId)}else p=D(b);!/%$/.test(a.width)&&parseInt(a.width,10)<310&&(a.width="310"),!/%$/.test(a.height)&&parseInt(a.height,10)<137&&(a.height="137"),h.title=h.title.slice(0,47)+" - Flash Player Installation";var d=t.ie&&t.win?"ActiveX":"PlugIn",e=h.title,i="MMredirectURL="+g.location+"&MMplayerType="+d+"&MMdoctitle="+e,j=a.id;if(t.ie&&t.win&&b.readyState!=4){var k=J("div");j+="SWFObjectNew",k.setAttribute("id",j),b.parentNode.insertBefore(k,b),b.style.display="none";var l=function(){b.parentNode.removeChild(b)};K(g,"onload",l)}E({data:a.expressInstall,id:f,width:a.width,height:a.height},{flashvars:i},j)}}function A(a){var c=a.getElementsByTagName(b)[0];if(c){var d=J("embed"),e=c.attributes;if(e){var f=e.length;for(var g=0;g<f;g++)e[g].nodeName=="DATA"?d.setAttribute("src",e[g].nodeValue):d.setAttribute(e[g].nodeName,e[g].nodeValue)}var h=c.childNodes;if(h){var i=h.length;for(var j=0;j<i;j++)h[j].nodeType==1&&h[j].nodeName=="PARAM"&&d.setAttribute(h[j].getAttribute("name"),h[j].getAttribute("value"))}a.parentNode.replaceChild(d,a)}}function z(){var a=k.length;for(var b=0;b<a;b++){var c=k[b].id;if(t.pv[0]>0){var d=I(c);d&&(k[b].width=d.getAttribute("width")?d.getAttribute("width"):"0",k[b].height=d.getAttribute("height")?d.getAttribute("height"):"0",L(k[b].swfVersion)?(t.webkit&&t.webkit<312&&A(d),N(c,!0)):k[b].expressInstall&&!s&&L("6.0.65")&&(t.win||t.mac)?B(k[b]):C(d))}else N(c,!0)}}function y(b){if(typeof g.addEventListener!=a)g.addEventListener("load",b,!1);else if(typeof h.addEventListener!=a)h.addEventListener("load",b,!1);else if(typeof g.attachEvent!=a)K(g,"onload",b);else if(typeof g.onload=="function"){var c=g.onload;g.onload=function(){c(),b()}}else g.onload=b}function x(a){r?a():j[j.length]=a}function w(){if(!r){if(t.ie&&t.win){var a=J("span");try{var b=h.getElementsByTagName("body")[0].appendChild(a);b.parentNode.removeChild(b)}catch(c){return}}r=!0,o&&(clearInterval(o),o=null);var d=j.length;for(var e=0;e<d;e++)j[e]()}}function v(){n.readyState=="complete"&&(n.parentNode.removeChild(n),w())}var a="undefined",b="object",c="Shockwave Flash",d="ShockwaveFlash.ShockwaveFlash",e="application/x-shockwave-flash",f="SWFObjectExprInst",g=window,h=document,i=navigator,j=[],k=[],l=[],m=[],n,o=null,p=null,q=null,r=!1,s=!1,t=function(){var f=typeof h.getElementById!=a&&typeof h.getElementsByTagName!=a&&typeof h.createElement!=a,j=[0,0,0],k=null;if(typeof i.plugins!=a&&typeof i.plugins[c]==b)k=i.plugins[c].description,k&&(typeof i.mimeTypes==a||!i.mimeTypes[e]||i.mimeTypes[e].enabledPlugin)&&(k=k.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),j[0]=parseInt(k.replace(/^(.*)\..*$/,"$1"),10),j[1]=parseInt(k.replace(/^.*\.(.*)\s.*$/,"$1"),10),j[2]=/r/.test(k)?parseInt(k.replace(/^.*r(.*)$/,"$1"),10):0);else if(typeof g.ActiveXObject!=a){var l=null,m=!1;try{l=new ActiveXObject(d+".7")}catch(n){try{l=new ActiveXObject(d+".6"),j=[6,0,21],l.AllowScriptAccess="always"}catch(n){j[0]==6&&(m=!0)}if(!m)try{l=new ActiveXObject(d)}catch(n){}}if(!m&&l)try{k=l.GetVariable("$version"),k&&(k=k.split(" ")[1].split(","),j=[parseInt(k[0],10),parseInt(k[1],10),parseInt(k[2],10)])}catch(n){}}var o=i.userAgent.toLowerCase(),p=i.platform.toLowerCase(),q=/webkit/.test(o)?parseFloat(o.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,r=!1,s=p?/win/.test(p):/win/.test(o),t=p?/mac/.test(p):/mac/.test(o);return{w3cdom:f,pv:j,webkit:q,ie:r,win:s,mac:t}}(),u=function(){if(t.w3cdom){x(z);if(t.ie&&t.win)try{h.write("<script id=__ie_ondomload defer=true src=//:></script>"),n=I("__ie_ondomload"),n&&K(n,"onreadystatechange",v)}catch(b){}t.webkit&&typeof h.readyState!=a&&(o=setInterval(function(){/loaded|complete/.test(h.readyState)&&w()},10)),typeof h.addEventListener!=a&&h.addEventListener("DOMContentLoaded",w,null),y(w)}}(),P=function(){t.ie&&t.win&&window.attachEvent("onunload",function(){var a=m.length;for(var b=0;b<a;b++)m[b][0].detachEvent(m[b][1],m[b][2]);var c=l.length;for(var d=0;d<c;d++)G(l[d]);for(var e in t)t[e]=null;t=null;for(var f in swfobject)swfobject[f]=null;swfobject=null})}();return{registerObject:function(a,b,c){if(t.w3cdom&&a&&b){var d={};d.id=a,d.swfVersion=b,d.expressInstall=c?c:!1,k[k.length]=d,N(a,!1)}},getObjectById:function(c){var d=null;if(t.w3cdom){var e=I(c);if(e){var f=e.getElementsByTagName(b)[0];!f||f&&typeof e.SetVariable!=a?d=e:typeof f.SetVariable!=a&&(d=f)}}return d},embedSWF:function(c,d,e,f,g,h,i,j,k){if(t.w3cdom&&c&&d&&e&&f&&g){e+="",f+="";if(L(g)){N(d,!1);var l={};if(k&&typeof k===b)for(var m in k)k[m]!=Object.prototype[m]&&(l[m]=k[m]);l.data=c,l.width=e,l.height=f;var n={};if(j&&typeof j===b)for(var o in j)j[o]!=Object.prototype[o]&&(n[o]=j[o]);if(i&&typeof i===b)for(var p in i)i[p]!=Object.prototype[p]&&(typeof n.flashvars!=a?n.flashvars+="&"+p+"="+i[p]:n.flashvars=p+"="+i[p]);x(function(){E(l,n,d),l.id==d&&N(d,!0)})}else h&&!s&&L("6.0.65")&&(t.win||t.mac)&&(s=!0,N(d,!1),x(function(){var a={};a.id=a.altContentId=d,a.width=e,a.height=f,a.expressInstall=h,B(a)}))}},getFlashPlayerVersion:function(){return{major:t.pv[0],minor:t.pv[1],release:t.pv[2]}},hasFlashPlayerVersion:L,createSWF:function(a,b,c){return t.w3cdom?E(a,b,c):undefined},removeSWF:function(a){t.w3cdom&&G(a)},createCSS:function(a,b){t.w3cdom&&M(a,b)},addDomLoadEvent:x,addLoadEvent:y,getQueryParamValue:function(a){var b=h.location.search||h.location.hash;if(a==null)return O(b);if(b){var c=b.substring(1).split("&");for(var d=0;d<c.length;d++)if(c[d].substring(0,c[d].indexOf("="))==a)return O(c[d].substring(c[d].indexOf("=")+1))}return""},expressInstallCallback:function(){if(s&&p){var a=I(f);a&&(a.parentNode.replaceChild(p,a),q&&(N(q,!0),t.ie&&t.win&&(p.style.display="block")),p=null,q=null,s=!1)}}}}();define("downloadify/js/swfobject",function(){}),function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getData();return""},getFileNameForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getFilename();return""},saveComplete:function(a){var b=Downloadify.queue[a];b&&b.complete();return!0},saveCancel:function(a){var b=Downloadify.queue[a];b&&b.cancel();return!0},saveError:function(a){var b=Downloadify.queue[a];b&&b.error();return!0},addToQueue:function(a){Downloadify.queue[a.queue_name]=a},getUID:function(a){a.id==""&&(a.id="downloadify_"+Downloadify.uid++);return a.id}},Downloadify.create=function(a,b){var c=typeof a=="string"?document.getElementById(a):a;return new Downloadify.Container(c,b)},Downloadify.Container=function(a,b){var c=this;c.el=a,c.enabled=!0,c.dataCallback=null,c.filenameCallback=null,c.data=null,c.filename=null;var d=function(){c.options=b,c.options.append||(c.el.innerHTML=""),c.flashContainer=document.createElement("span"),c.el.appendChild(c.flashContainer),c.queue_name=Downloadify.getUID(c.flashContainer),typeof c.options.filename==="function"?c.filenameCallback=c.options.filename:c.options.filename&&(c.filename=c.options.filename),typeof c.options.data==="function"?c.dataCallback=c.options.data:c.options.data&&(c.data=c.options.data);var a={queue_name:c.queue_name,width:c.options.width,height:c.options.height},d={allowScriptAccess:"always"},e={id:c.flashContainer.id,name:c.flashContainer.id};c.options.enabled===!1&&(c.enabled=!1),c.options.transparent===!0&&(d.wmode="transparent"),c.options.downloadImage&&(a.downloadImage=c.options.downloadImage),swfobject.embedSWF(c.options.swf,c.flashContainer.id,c.options.width,c.options.height,"10",null,a,d,e),Downloadify.addToQueue(c)};c.enable=function(){var a=document.getElementById(c.flashContainer.id);a.setEnabled(!0),c.enabled=!0},c.disable=function(){var a=document.getElementById(c.flashContainer.id);a.setEnabled(!1),c.enabled=!1},c.getData=function(){if(!c.enabled)return"";return c.dataCallback?c.dataCallback():c.data?c.data:""},c.getFilename=function(){return c.filenameCallback?c.filenameCallback():c.filename?c.filename:""},c.complete=function(){typeof c.options.onComplete==="function"&&c.options.onComplete()},c.cancel=function(){typeof c.options.onCancel==="function"&&c.options.onCancel()},c.error=function(){typeof c.options.onError==="function"&&c.options.onError()},d()},Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:!0,append:!1}}(),typeof jQuery!="undefined"&&function(a){a.fn.downloadify=function(b){return this.each(function(){b=a.extend({},Downloadify.defaultOptions,b);var c=Downloadify.create(this,b);a(this).data("Downloadify",c)})}}(jQuery),define("downloadify/src/downloadify",function(){}),require.def("tabs/previewTab",["domplate/domplate","domplate/tabView","core/lib","i18n!nls/previewTab","domplate/toolbar","tabs/pageTimeline","tabs/pageStats","preview/pageList","core/cookies","preview/validationError","downloadify/js/swfobject","downloadify/src/downloadify"],function(Domplate,TabView,Lib,Strings,Toolbar,Timeline,Stats,PageList,Cookies,ValidationError){with(Domplate){function PreviewTab(a){this.model=a,this.toolbar=new Toolbar,this.timeline=new Timeline,this.stats=new Stats(a,this.timeline),this.toolbar.addButtons(this.getToolbarButtons()),ValidationError.addListener(this)}PreviewTab.prototype=Lib.extend(TabView.Tab.prototype,{id:"Preview",label:Strings.previewTabLabel,tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"},DIV({"class":"previewToolbar"}),DIV({"class":"previewTimeline"}),DIV({"class":"previewStats"}),DIV({"class":"previewList"})),onUpdateBody:function(a,b){this.toolbar.render(Lib.$(b,"previewToolbar")),this.stats.render(Lib.$(b,"previewStats")),this.timeline.render(Lib.$(b,"previewTimeline"));var c=this.model.input;c&&Cookies.getCookie("timeline")=="true"&&this.onTimeline(!1),c&&Cookies.getCookie("stats")=="true"&&this.onStats(!1),this.updateDownloadifyButton()},updateDownloadifyButton:function(){var a=this.model;$(".harDownloadButton").downloadify({filename:function(){return"netData.har"},data:function(){return a?a.toJSON():""},onComplete:function(){},onCancel:function(){},onError:function(){alert(Strings.downloadError)},swf:"scripts/downloadify/media/downloadify.swf",downloadImage:"css/images/download-sprites.png",width:16,height:16,transparent:!0,append:!1})},getToolbarButtons:function(){var a=[{id:"showTimeline",label:Strings.showTimelineButton,tooltiptext:Strings.showTimelineTooltip,command:Lib.bindFixed(this.onTimeline,this,!0)},{id:"showStats",label:Strings.showStatsButton,tooltiptext:Strings.showStatsTooltip,command:Lib.bindFixed(this.onStats,this,!0)},{id:"clear",label:Strings.clearButton,tooltiptext:Strings.clearTooltip,command:Lib.bindFixed(this.onClear,this)}];$.browser.mozilla&&a.push({id:"download",tooltiptext:Strings.downloadTooltip,className:"harDownloadButton"});return a},onTimeline:function(a){var b=this.toolbar.getButton("showTimeline");if(b){this.timeline.toggle(a);var c=this.timeline.isVisible();b.label=Strings[c?"hideTimelineButton":"showTimelineButton"],this.toolbar.render(),this.updateDownloadifyButton(),Cookies.setCookie("timeline",c)}},onStats:function(a){var b=this.toolbar.getButton("showStats");if(b){this.stats.toggle(a);var c=this.stats.isVisible();b.label=Strings[c?"hideStatsButton":"showStatsButton"],this.toolbar.render(),this.updateDownloadifyButton(),Cookies.setCookie("stats",c)}},onClear:function(){var a=document.location.href,b=a.indexOf("?");document.location=a.substr(0,b)},showStats:function(a){Cookies.setCookie("stats",a)},showTimeline:function(a){Cookies.setCookie("timeline",a)},append:function(a){var b=new PageList(a);b.append(Lib.$(this._body,"previewList")),this.timeline.append(a),b.addListener(this)},appendError:function(a){ValidationError.appendError(a,Lib.$(this._body,"previewList"))},addPageTiming:function(a){PageList.prototype.pageTimings.push(a)},getMenuItems:function(a,b,c){c&&(a.push("-"),a.push({label:Strings.menuShowHARSource,command:Lib.bind(this.showHARSource,this,b,c)}))},showHARSource:function(a,b,c){var d=this.tabView.getTab("DOM");d&&(d.select("DOM"),d.highlightFile(b,c))}});return PreviewTab}}),require.def("tabs/schemaTab",["domplate/domplate","domplate/tabView","core/lib","i18n!nls/harViewer","syntax-highlighter/shCore","core/trace"],function(Domplate,TabView,Lib,Strings,dp,Trace){with(Domplate){function SchemaTab(){}SchemaTab.prototype={id:"Schema",label:Strings.schemaTabLabel,bodyTag:PRE({"class":"javascript:nocontrols:",name:"code"}),onUpdateBody:function(a,b){$.ajax({url:"scripts/preview/harSchema.js",context:this,success:function(a){var c=b.firstChild;c.innerHTML=a,dp.SyntaxHighlighter.HighlightAll(c)},error:function(a,b){Trace.error("SchemaTab.onUpdateBody; ERROR ",a)}})}};return SchemaTab}}),define("nls/domTab",{root:{domTabLabel:"HAR",searchDisabledForIE:"You need Mozilla or WebKit based browser to search in HAR",searchOptionJsonQuery:"JSON Query",tableView:"Table View",searchResultsDefaultText:"JSON Query Results",searchPlaceholder:"Search",jsonQueryPlaceholder:"JSON Query",queryResultsTableView:"Table View"}}),define("nls/search",{root:{search:"Search",caseSensitive:"Case Sensitive"}}),require.def("tabs/search",["domplate/domplate","core/lib","i18n!nls/search","domplate/toolbar","domplate/popupMenu","core/cookies","core/dragdrop"],function(Domplate,Lib,Strings,Toolbar,Menu,Cookies,DragDrop){with(Domplate){var Search={},caseSensitiveOption="searchCaseSensitive";Search.Box=domplate({tag:SPAN({"class":"searchBox"},SPAN({"class":"toolbarSeparator resizer"},"&nbsp;"),SPAN({"class":"searchTextBox"},INPUT({"class":"searchInput",type:"text",placeholder:Strings.search,onkeydown:"$onKeyDown"}),SPAN({"class":"arrow",onclick:"$onOpenOptions"},"&nbsp;"))),onKeyDown:function(a){var b=$.event.fix(a||window.event),c=Lib.getAncestorByClass(b.target,"tabBody"),d=Lib.getElementByClass(c,"searchInput");setTimeout(Lib.bindFixed(this.search,this,c,b.keyCode,d.value))},initialize:function(a){var b=Lib.getElementByClass(a,"searchInput"),c=Lib.getElementByClass(a,"resizer");Search.Resizer.initialize(b,c)},search:function(a,b,c){var d=Lib.getElementByClass(a,"searchBox"),e=Lib.getElementByClass(a,"searchInput");e.removeAttribute("status");var f=e.value;if(f!=c||b==13){if(b!=13&&Lib.isWebkit)return;var g=a.repObject.onSearch(f,b);g||e.setAttribute("status","notfound")}},onOpenOptions:function(a){var b=Lib.fixEvent(a);Lib.cancelEvent(a);if(Lib.isLeftClick(a)){var c=b.target,d=this.getMenuItems(c),e=new Menu({id:"searchOptions",items:d});e.showPopup(c)}},getMenuItems:function(a){var b=Lib.getAncestorByClass(a,"tabBody"),c=b.repObject.getSearchOptions();c.push("-"),c.push({label:Strings.caseSensitive,checked:Cookies.getBooleanCookie(caseSensitiveOption),command:Lib.bindFixed(this.onOption,this,caseSensitiveOption)});return c},onOption:function(a){Cookies.toggleCookie(a);var b=Lib.getElementByClass(document.documentElement,"searchInput");b.removeAttribute("status")}}),Search.ObjectSearch=function(a,b,c,d){this.text=a,this.reverse=c,this.caseSensitive=d,this.stack=[],this.stack.push({object:b,propIndex:0,startOffset:-1}),this.matches=[]},Search.ObjectSearch.prototype={findNext:function(a){while(this.stack.length>0){var b=this.getCurrentScope(),c=this.find(b);if(c)return c}return!1},find:function(a){var b=0;for(var c in a.object){b++;if(a.propIndex>=b)continue;var d=a.object[c];if(!d)continue;a.propIndex=b;if(typeof d=="object"){this.stack.push({propIndex:0,object:d,startOffset:-1});return!1}var e=this.text,f=d+"";Cookies.getBooleanCookie(caseSensitiveOption)||(f=f.toLowerCase(),e=e.toLowerCase());var g=a.startOffset<0?0:a.startOffset,h=f.indexOf(e,g);if(h>=0){a.propIndex+=-1,a.startOffset=h+e.length,this.matches.push({value:d,startOffset:h});return!0}}this.stack.pop();return!1},getCurrentScope:function(){return this.stack[this.stack.length-1]},getCurrentMatch:function(){return this.matches[this.matches.length-1]},selectText:function(a){var b=this.getCurrentMatch();Lib.selectElementText(a,b.startOffset,b.startOffset+this.text.length)}},Search.Resizer=domplate({initialize:function(a,b){this.searchInput=a,this.tracker=new DragDrop.Tracker(b,{onDragStart:Lib.bind(this.onDragStart,this),onDragOver:Lib.bind(this.onDragOver,this),onDrop:Lib.bind(this.onDrop,this)})},onDragStart:function(a){var b=Lib.getBody(this.searchInput.ownerDocument);b.setAttribute("vResizing","true"),this.startWidth=this.searchInput.clientWidth-20},onDragOver:function(a,b){var c=this.startWidth-a.x,d=Lib.getAncestorByClass(this.searchInput,"toolbar");c<=d.clientWidth-40&&(this.searchInput.style.width=c+"px")},onDrop:function(a){var b=Lib.getBody(this.searchInput.ownerDocument);b.removeAttribute("vResizing")}});return Search}}),require.def("domplate/domTree",["domplate/domplate","core/lib","core/trace"],function(Domplate,Lib,Trace){with(Domplate){function DomTree(a){this.input=a}DomTree.prototype=domplate({tag:TABLE({"class":"domTable",cellpadding:0,cellspacing:0,onclick:"$onClick"},TBODY(FOR("member","$object|memberIterator",TAG("$member|getRowTag",{member:"$member"})))),rowTag:TR({"class":"memberRow $member.open $member.type\\Row $member|hasChildren",$hasChildren:"$member|hasChildren",_repObject:"$member",level:"$member.level"},TD({"class":"memberLabelCell",style:"padding-left: $member.indent\\px"},SPAN({"class":"memberLabel $member.type\\Label"},"$member.name")),TD({"class":"memberValueCell"},TAG("$member.tag",{object:"$member|getValue"}))),loop:FOR("member","$members",TAG("$member|getRowTag",{member:"$member"})),hasChildren:function(a){return a.hasChildren?"hasChildren":""},memberIterator:function(a){return this.getMembers(a)},getValue:function(a){return a.value},getRowTag:function(a){return this.rowTag},onClick:function(a){var b=Lib.fixEvent(a);if(Lib.isLeftClick(b)){var c=Lib.getAncestorByClass(b.target,"memberRow"),d=Lib.getAncestorByClass(b.target,"memberLabel");d&&Lib.hasClass(c,"hasChildren")&&this.toggleRow(c)}},toggleRow:function(a,b){if(a){var c=parseInt(a.getAttribute("level"));if(b&&Lib.hasClass(a,"opened"))return;if(Lib.hasClass(a,"opened")){Lib.removeClass(a,"opened");var d=a.parentNode;for(var e=a.nextSibling;e;e=a.nextSibling){if(parseInt(e.getAttribute("level"))<=c)break;d.removeChild(e)}}else{Lib.setClass(a,"opened");var f=a.repObject;if(f){if(!f.hasChildren)return;var g=this.getMembers(f.value,c+1);g&&this.loop.insertRows({members:g},a)}}}},getMembers:function(a,b){b||(b=0);var c=[];for(var d in a){var e=a[d];typeof e!="function"&&c.push(this.createMember("dom",d,e,b))}return c},createMember:function(a,b,c,d){var e=typeof c,f=this.hasProperties(c)&&e=="object",g=DomTree.Reps.getRep(c);return{name:b,value:c,type:a,rowClass:"memberRow-"+a,open:"",level:d,indent:d*16,hasChildren:f,tag:g.tag}},hasProperties:function(a){if(typeof a=="string")return!1;try{for(var b in a)return!0}catch(c){}return!1},append:function(a){this.element=this.tag.append({object:this.input},a),this.element.repObject=this;var b=Lib.isArray(this.input)&&this.input.length>2,c=this.element.firstChild.firstChild;c&&!b&&this.toggleRow(c)},expandRow:function(a){var b=this.getRow(a);this.toggleRow(b,!0);return b},getRow:function(a){if(this.element){var b=Lib.getElementsByClass(this.element,"memberRow");for(var c=0;c<b.length;c++){var d=b[c];if(d.repObject.value==a)return d}return null}}});function safeToString(a){try{return a.toString()}catch(b){return""}}var OBJECTBOX=DIV({"class":"objectBox objectBox-$className"});DomTree.Reps={reps:[],registerRep:function(){this.reps.push.apply(this.reps,arguments)},getRep:function(a){var b=typeof a;b=="object"&&a instanceof String&&(b="string");for(var c=0;c<this.reps.length;++c){var d=this.reps[c];try{if(d.supportsObject(a,b))return d}catch(e){Trace.exception("domTree.getRep; ",e)}}return DomTree.Rep}},DomTree.Rep=domplate({tag:OBJECTBOX("$object|getTitle"),className:"object",getTitle:function(a){var b=safeToString(a),c=/\[object (.*?)\]/,d=c.exec(b);return d?d[1]:b},getTooltip:function(a){return null},supportsObject:function(a,b){return!1}}),DomTree.Reps.Null=domplate(DomTree.Rep,{tag:OBJECTBOX("null"),className:"null",supportsObject:function(a,b){return a==null}}),DomTree.Reps.Number=domplate(DomTree.Rep,{tag:OBJECTBOX("$object"),className:"number",supportsObject:function(a,b){return b=="boolean"||b=="number"}}),DomTree.Reps.String=domplate(DomTree.Rep,{tag:OBJECTBOX("$object"),className:"string",supportsObject:function(a,b){return b=="string"}}),DomTree.Reps.Arr=domplate(DomTree.Rep,{tag:OBJECTBOX("$object|getTitle"),className:"array",supportsObject:function(a,b){return Lib.isArray(a)},getTitle:function(a){return"Array ["+a.length+"]"}}),DomTree.Reps.Tree=domplate(DomTree.Rep,{tag:OBJECTBOX(TAG("$object|getTag",{object:"$object|getRoot"})),className:"tree",getTag:function(a){return Tree.tag},getRoot:function(a){return[a]},supportsObject:function(a,b){return b=="object"}});var Tree=domplate(DomTree.prototype,{createMember:function(a,b,c,d){var e=DomTree.prototype.createMember(a,b,c,d);d==0&&(e.name="",e.type="tableCell");return e}});DomTree.Reps.registerRep(DomTree.Reps.Null,DomTree.Reps.Number,DomTree.Reps.String,DomTree.Reps.Arr);return DomTree}}),define("nls/tableView",{root:{objectProperties:"Object Properties"}}),require.def("domplate/tableView",["domplate/domplate","core/lib","i18n!nls/tableView","domplate/domTree","core/trace"],function(Domplate,Lib,Strings,DomTree,Trace){with(Domplate){var TableView=domplate({className:"table",tag:DIV({"class":"dataTableSizer",tabindex:"-1"},TABLE({"class":"dataTable",cellspacing:0,cellpadding:0,width:"100%",role:"grid"},THEAD({"class":"dataTableThead",role:"presentation"},TR({"class":"headerRow focusRow dataTableRow subFocusRow",role:"row",onclick:"$onClickHeader"},FOR("column","$object.columns",TH({"class":"headerCell a11yFocus",role:"columnheader",$alphaValue:"$column.alphaValue"},DIV({"class":"headerCellBox"},"$column.label"))))),TBODY({"class":"dataTableTbody",role:"presentation"},FOR("row","$object.data|getRows",TR({"class":"focusRow dataTableRow subFocusRow",role:"row"},FOR("column","$row|getColumns",TD({"class":"a11yFocus dataTableCell",role:"gridcell"},TAG("$column|getValueTag",{object:"$column"})))))))),getValueTag:function(a){var b=typeof a;if(b=="object")return DomTree.Reps.Tree.tag;var c=DomTree.Reps.getRep(a);return c.shortTag||c.tag},getRows:function(a){var b=this.getProps(a);if(!b.length)return[];return b},getColumns:function(a){if(typeof a!="object")return[a];var b=[];for(var c=0;c<this.columns.length;c++){var d=this.columns[c].property;if(d)if(typeof a[d]==="undefined"){var e=typeof d=="string"?d.split("."):[d],f=a;for(var g in e)f=f&&f[e[g]]||undefined}else f=a[d];else f=a;b.push(f)}return b},getProps:function(a){if(typeof a!="object")return[a];if(a.length)return Lib.cloneArray(a);var b=[];for(var c in a){var d=a[c];this.domFilter(d,c)&&b.push(d)}return b},onClickHeader:function(a){var b=Lib.getAncestorByClass(a.target,"dataTable"),c=Lib.getAncestorByClass(a.target,"headerCell");if(c){var d=!Lib.hasClass(c,"alphaValue"),e=0;for(c=c.previousSibling;c;c=c.previousSibling)++e;this.sort(b,e,d)}},sort:function(a,b,c){var d=Lib.getChildByClass(a,"dataTableTbody"),e=Lib.getChildByClass(a,"dataTableThead"),f=[];for(var g=d.childNodes[0];g;g=g.nextSibling){var h=g.childNodes[b],i=c?parseFloat(h.textContent):h.textContent;f.push({row:g,value:i})}f.sort(function(a,b){return a.value<b.value?-1:1});var j=e.firstChild,k=Lib.getChildByClass(j,"headerSorted");Lib.removeClass(k,"headerSorted"),k&&k.removeAttribute("aria-sort");var l=j.childNodes[b];Lib.setClass(l,"headerSorted");if(l.sorted&&l.sorted!=1){Lib.removeClass(l,"sortedAscending"),Lib.setClass(l,"sortedDescending"),l.setAttribute("aria-sort","descending"),l.sorted=1;for(var m=f.length-1;m>=0;--m)d.appendChild(f[m].row)}else{Lib.removeClass(l,"sortedDescending"),Lib.setClass(l,"sortedAscending"),l.setAttribute("aria-sort","ascending"),l.sorted=-1;for(var m=0;m<f.length;++m)d.appendChild(f[m].row)}},getHeaderColumns:function(a){var b;for(var c in a){b=a[c];break}if(typeof b!="object")return[{label:Strings.objectProperties}];var d=[];for(var c in b){var e=b[c];if(!this.domFilter(e,c))continue;d.push({property:c,label:c,alphaValue:typeof e!="number"})}return d},domFilter:function(a,b){return!0},render:function(a,b,c){if(b){var d=[];for(var e=0;c&&e<c.length;e++){var f=c[e],g=typeof f.property!="undefined"?f.property:f,h=typeof f.label!="undefined"?f.label:g;d.push({property:g,label:h,alphaValue:!0})}d.length||(d=this.getHeaderColumns(b));try{this.columns=d;var i={data:b,columns:d},j=this.tag.append({object:i,columns:d},a),k=Lib.getElementByClass(j,"dataTableTbody"),l=200;l>0&&k.clientHeight>l&&(k.style.height=l+"px")}catch(m){Trace.exception("tableView.render; EXCEPTION "+m,m)}finally{delete this.columns}}}});return TableView}}),function(){function distinctFilter(a,b){var c=[],d={};for(var e=0,f=a.length;e<f;++e){var g=a[e];b(g,e,a)&&(typeof g=="object"&&g?g.__included||(g.__included=!0,c.push(g)):d[g+typeof g]||(d[g+typeof g]=!0,c.push(g)))}for(e=0,f=c.length;e<f;++e)c[e]&&delete c[e].__included;return c}function expand(a,b){function d(a){b&&(b!==!0||a instanceof Array?a[b]&&c.push(a[b]):c.push(a));for(var e in a){var f=a[e];b?f&&typeof f=="object"&&d(f):c.push(f)}}var c=[];if(b instanceof Array){if(b.length==1)return a[b[0]];for(var e=0;e<b.length;e++)c.push(a[b[e]])}else d(a);return c}function slice(a,b,c,d){var e=a.length,f=[];c=c||e,b=b<0?Math.max(0,b+e):Math.min(e,b),c=c<0?Math.max(0,c+e):Math.min(e,c);for(var g=b;g<c;g+=d)f.push(a[g]);return f}function filter(a,b){var c=a.length;if(typeof b!="function")throw new TypeError;var d=[],e=arguments[2];for(var f=0;f<c;f++)if(f in a){var g=a[f];b.call(e,g,f,a)&&d.push(g)}return d}function map(a,b){var c=a.length;if(typeof b!="function")throw new TypeError;var d=Array(c),e=arguments[2];for(var f=0;f<c;f++)f in a&&(d[f]=b.call(e,a[f],f,a));return d}var JSONQuery=function(query,obj){function makeRegex(a,b,c,d,e){return str[e].match(/[\*\?]/)||d=="~"?"/^"+str[e].substring(1,str[e].length-1).replace(/\\([btnfr\\"'])|([^\w\*\?])/g,"\\$1$2").replace(/([\*\?])/g,".$1")+(d=="~"?"$/i":"$/")+".test("+b+")":a}function call(a){prefix=a+"("+prefix}tokens=[];var depth=0,str=[];query=query.replace(/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'|[\[\]]/g,function(a){depth+=a=="["?1:a=="]"?-1:0;return a=="]"&&depth>0?"`]":a.charAt(0)=='"'||a.charAt(0)=="'"?"`"+(str.push(a)-1):a});var prefix="";query.replace(/(\]|\)|push|pop|shift|splice|sort|reverse)\s*\(/,function(){throw new Error("Unsafe function call")}),query=query.replace(/([^=]=)([^=])/g,"$1=$2").replace(/@|(\.\s*)?[a-zA-Z\$_]+(\s*:)?/g,function(a){return a.charAt(0)=="."?a:a=="@"?"$obj":(a.match(/:|^(\$|Math|true|false|null)$/)?"":"$obj.")+a}).replace(/\.?\.?\[(`\]|[^\]])*\]|\?.*|\.\.([\w\$_]+)|\.\*/g,function(a,b,c){var d=a.match(/^\.?\.?(\[\s*\^?\?|\^?\?|\[\s*==)(.*?)\]?$/);if(d){var e="";a.match(/^\./)&&(call("expand"),e=",true)"),call(d[1].match(/\=/)?"map":d[1].match(/\^/)?"distinctFilter":"filter");return e+",function($obj){return "+d[2]+"})"}d=a.match(/^\[\s*([\/\\].*)\]/);if(d)return".concat().sort(function(a,b){"+d[1].replace(/\s*,?\s*([\/\\])\s*([^,\\\/]+)/g,function(a,b,c){return"var av= "+c.replace(/\$obj/,"a")+",bv= "+c.replace(/\$obj/,"b")+";if(av>bv||bv==null){return "+(b=="/"?1:-1)+";}\nif(bv>av||av==null){return "+(b=="/"?-1:1)+";}\n"})+"})";d=a.match(/^\[(-?[0-9]*):(-?[0-9]*):?(-?[0-9]*)\]/);if(d){call("slice");return","+(d[1]||0)+","+(d[2]||0)+","+(d[3]||1)+")"}if(a.match(/^\.\.|\.\*|\[\s*\*\s*\]|,/)){call("expand");return(a.charAt(1)=="."?",'"+c+"'":a.match(/,/)?","+a:"")+")"}return a}).replace(/(\$obj\s*(\.\s*[\w_$]+\s*)*)(==|~)\s*`([0-9]+)/g,makeRegex).replace(/`([0-9]+)\s*(==|~)\s*(\$obj(\s*\.\s*[\w_$]+)*)/g,function(a,b,c,d,e){return makeRegex(a,d,e,c,b)}),query=prefix+(query.charAt(0)=="$"?"":"$")+query.replace(/`([0-9]+|\])/g,function(a,b){return b=="]"?"]":str[b]});var executor=eval("1&&function($,$1,$2,$3,$4,$5,$6,$7,$8,$9){var $obj=$;return "+query+"}");for(var i=0;i<arguments.length-1;i++)arguments[i]=arguments[i+1];return obj?executor.apply(this,arguments):executor};typeof namespace=="function"?namespace("json::JSONQuery",JSONQuery):window.JSONQuery=JSONQuery}(),define("json-query/JSONQuery",function(){}),require.def("tabs/domTab",["domplate/domplate","domplate/tabView","core/lib","i18n!nls/domTab","domplate/toolbar","tabs/search","core/dragdrop","domplate/domTree","core/cookies","domplate/tableView","core/trace","json-query/JSONQuery"],function(Domplate,TabView,Lib,Strings,Toolbar,Search,DragDrop,DomTree,Cookies,TableView,Trace){with(Domplate){var jsonQueryOption="searchJsonQuery";function DomTab(){this.toolbar=new Toolbar,this.toolbar.addButtons(this.getToolbarButtons()),this.tableView=!1}DomTab.prototype=domplate(TabView.Tab.prototype,{id:"DOM",label:Strings.domTabLabel,separator:DIV({"class":"separator"}),tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"},DIV({"class":"domToolbar"}),DIV({"class":"domContent"})),domBox:TABLE({"class":"domBox",cellpadding:0,cellspacing:0},TBODY(TR(TD({"class":"content"},DIV({"class":"title"},"$title")),TD({"class":"splitter"}),TD({"class":"results"},DIV({"class":"resultsDefaultContent"},Strings.searchResultsDefaultText))))),queryResultsViewType:DIV({"class":"queryResultsViewType"},INPUT({"class":"type",type:"checkbox",onclick:"$onTableView"}),SPAN({"class":"label"},Strings.queryResultsTableView)),onUpdateBody:function(a,b){this.toolbar.render(Lib.$(b,"domToolbar"));if(Lib.isIE){var c=Lib.getElementByClass(b,"searchBox"),d=Lib.getElementByClass(c,"searchInput");d.setAttribute("disabled","true"),d.setAttribute("title",Strings.searchDisabledForIE);var e=Lib.getElementByClass(c,"arrow");e.setAttribute("disabled","true")}this.updateSearchResultsUI()},getToolbarButtons:function(){var a=[];a.push({id:"search",tag:Search.Box.tag,initialize:Search.Box.initialize});return a},createSearchObject:function(a){var b=Lib.getElementsByClass(this._body,"domTable");b=Lib.cloneArray(b);var c=b.map(function(a){return a.repObject.input});return new Search.ObjectSearch(a,c,!1,!1)},getSearchOptions:function(){var a=[];a.push({label:Strings.searchOptionJsonQuery,checked:Cookies.getBooleanCookie(jsonQueryOption),command:Lib.bindFixed(this.onOption,this,jsonQueryOption)});return a},onOption:function(a){Search.Box.onOption(a),this.updateSearchResultsUI()},updateSearchResultsUI:function(){var a=Cookies.getBooleanCookie(jsonQueryOption),b=Lib.getElementsByClass(this._body,"domBox");for(var c=0;c<b.length;c++){var d=b[c],e=Lib.getElementByClass(d,"results"),f=Lib.getElementByClass(d,"splitter");a?(Lib.setClass(e,"visible"),Lib.setClass(f,"visible")):(Lib.removeClass(e,"visible"),Lib.removeClass(f,"visible"))}var g=Lib.getElementByClass(this._body,"searchInput");if(g){var h=a?Strings.jsonQueryPlaceholder:Strings.searchPlaceholder;g.setAttribute("placeholder",h)}var g=Lib.getElementByClass(this._body,"searchInput")},onSearch:function(a,b){var c=Cookies.getBooleanCookie(jsonQueryOption);if(c)return this.evalJsonQuery(a,b);if(a.length<3)return!0;this.currSearch&&this.currSearch.text!=a&&(this.currSearch=null),this.currSearch||(this.currSearch=this.createSearchObject(a));if(this.currSearch.findNext(a)){var d=this.currSearch.stack[1].object,e=this.getDomTree(d);for(var f=0;f<this.currSearch.stack.length;f++)e.expandRow(this.currSearch.stack[f].object);var g=this.currSearch.getCurrentMatch(),h=e.getRow(g.value);if(h){var i=h.querySelector(".memberValueCell .objectBox");this.currSearch.selectText(i.firstChild),Lib.scrollIntoCenterView(i)}return!0}this.currSearch.matches.length>0&&(this.currSearch=this.createSearchObject(a));return!1},evalJsonQuery:function(a,b){if(b!=13)return!0;var c=Lib.getElementsByClass(this._body,"domBox");for(var d=0;d<c.length;d++){var e=c[d],f=Lib.getElementByClass(e,"domTable"),g=f.repObject.input,h=e.querySelector(".domBox .results");Lib.clearNode(h);try{var i=this.queryResultsViewType.append({},h);if(this.tableView){var j=Lib.getElementByClass(i,"type");j.setAttribute("checked","true")}var k=JSONQuery(a,g);h.repObject=k;if(this.tableView)TableView.render(h,k);else{var l=new DomTree(k);l.append(h)}}catch(m){Trace.exception(m)}}return!0},onTableView:function(a){var b=Lib.fixEvent(a),c=b.target,d=Lib.getAncestorByClass(c,"tabBody"),e=$(c).attr("checked");d.repObject.tableView=e;var f=Lib.getAncestorByClass(c,"results"),g=f.repObject,h=Lib.getElementByClass(f,"domTable");h&&h.parentNode.removeChild(h);var i=Lib.getElementByClass(f,"dataTableSizer");i&&i.parentNode.removeChild(i);if(e)TableView.render(f,g);else{var j=new DomTree(g);j.append(f)}},append:function(a){var b=Lib.$(this._body,"domContent"),c=[];for(var d=0;d<a.log.pages.length;d++){var e=a.log.pages[d];c.push(e.title)}var f=this.domBox.append({title:c.join(", ")},b),g=Lib.getElementByClass(f,"content"),h=Lib.getElementByClass(f,"splitter");this.splitter=new DragDrop.Tracker(h,{onDragStart:Lib.bind(this.onDragStart,this),onDragOver:Lib.bind(this.onDragOver,this),onDrop:Lib.bind(this.onDrop,this)}),this.updateSearchResultsUI();var i=new DomTree(a);i.append(g),this.separator.append({},b)},getDomTree:function(a){var b=Lib.getElementsByClass(this._body,"domTable");for(var c=0;c<b.length;c++){var d=b[c].repObject;if(d.input==a)return d}return null},highlightFile:function(a,b){var c=this.getDomTree(a);if(c){c.expandRow(a.log),c.expandRow(a.log.entries);var d=c.expandRow(b);d&&Lib.setClassTimed(d,"jumpHighlight");var e=Lib.$(this._body,"domContent");e.scrollTop=d.offsetTop}},onDragStart:function(a){var b=Lib.getBody(this._body.ownerDocument);b.setAttribute("vResizing","true");var c=Lib.getAncestorByClass(a.element,"domBox"),d=Lib.getElementByClass(c,"content");this.startWidth=d.clientWidth},onDragOver:function(a,b){var c=Lib.getAncestorByClass(b.element,"domBox"),d=Lib.getElementByClass(c,"content"),e=this.startWidth+a.x;d.style.width=e+"px"},onDrop:function(a){var b=Lib.getBody(this._body.ownerDocument);b.removeAttribute("vResizing")}});return DomTab}}),require.def("harViewer",["domplate/tabView","tabs/homeTab","tabs/aboutTab","tabs/previewTab","tabs/schemaTab","tabs/domTab","preview/harModel","i18n!nls/harViewer","preview/requestList","core/lib","core/trace"],function(a,b,c,d,e,f,g,h,i,j,k){function l(){this.id="harView",this.model=new g,this.appendTab(new b),this.appendTab(new d(this.model)),this.appendTab(new f),this.appendTab(new c),this.appendTab(new e)}l.prototype=j.extend(new a,{initialize:function(a){this.version=a.getAttribute("version"),this.harSpecURL="http://www.softwareishard.com/blog/har-12-spec/",this.render(a),this.selectTabByName("Home");var b=j.bind(this.appendPreview,this),c=j.bind(this.onLoadError,this);if(g.Loader.run(b,c)){var d=this.getTab("Home");d&&d.loadInProgress(!0)}},appendPreview:function(a){var b=this.getTab("Home"),c=this.getTab("Preview"),d=this.getTab("DOM");try{var e=$("#validate").attr("checked"),f=g.parse(a,e);this.model.append(f);if(c)try{c.select(),c.append(f)}catch(h){k.exception("HarView.appendPreview; EXCEPTION ",h),h.errors&&c&&c.appendError(h)}d&&d.append(f)}catch(h){k.exception("HarView.appendPreview; EXCEPTION ",h),h.errors&&c&&c.appendError(h),h.input&&d.append(h.input)}c.select(),b&&b.loadInProgress(!1),j.fireEvent(m,"onViewerHARLoaded")},onLoadError:function(a,b){var c=this.getTab("Home");c&&c.loadInProgress(!0,a.statusText),k.error("harModule.loadRemoteArchive; ERROR ",a,b)},loadHar:function(a,b){b=b||{};return g.Loader.load(this,a,b.jsonp,b.jsonpCallback,b.success,b.ajaxError)},setPreviewColumns:function(a,b){i.setVisibleColumns(a,b)}});var m=document.getElementById("content"),n=m.repObject=new l;j.fireEvent(m,"onViewerPreInit"),n.initialize(m),j.fireEvent(m,"onViewerInit"),k.log("HarViewer; initialized OK")})