-
Notifications
You must be signed in to change notification settings - Fork 51
/
perf-cascade.min.js
131 lines (130 loc) · 61.1 KB
/
perf-cascade.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*! github.com/micmro/PerfCascade Version:3.0.3 (12/11/2022) */
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).perfCascade=e()}(function(){return function r(s,i,o){function a(t,e){if(!i[t]){if(!s[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},s[t][0].call(n.exports,function(e){return a(s[t][1][e]||e)},n,n.exports,r,s,i,o)}return i[t].exports}for(var l="function"==typeof require&&require,e=0;e<o.length;e++)a(o[e]);return a}({1:[function(e,t,n){"use strict";function r(e,t,n){t in e.style?e.style[t]=n:console.warn(new Error("Trying to set non-existing style "+`${t} = ${n} on a <${e.tagName.toLowerCase()}>.`))}function s(e,t,n){t in e||console.warn(new Error("Trying to set non-existing attribute "+`${t} = ${n} on a <${e.tagName.toLowerCase()}>.`)),e.setAttributeNS("",t,n)}function i(t,n){Object.keys(n).forEach(e=>{r(t,e,n[e].toString())})}Object.defineProperty(n,"__esModule",{value:!0}),n.makeBodyEl=n.makeHtmlEl=n.safeSetAttributes=n.safeSetStyles=n.safeSetAttribute=n.safeSetStyle=n.forEachNodeList=n.getLastItemOfNodeList=n.removeChildren=n.getParentByClassName=n.removeClass=n.addClass=void 0,n.addClass=function(e,t){const n=e.classList;return n?t.split(" ").forEach(e=>n.add(e)):e.setAttribute("class",e.getAttribute("class")+" "+t),e},n.removeClass=function(e,t){const n=e.classList;return n?n.remove(t):e.setAttribute("class",(e.getAttribute("class")||"").replace(new RegExp("(\\s|^)"+t+"(\\s|$)","g"),"$2")),e},n.getParentByClassName=function(e,t){if("function"==typeof e.closest)return e.closest(`.${t}`);for(;e;){if(e.classList.contains(t))return e;e=e.parentElement}return null},n.removeChildren=function(e){for(;e.hasChildNodes();)e.removeChild(e.lastChild);return e},n.getLastItemOfNodeList=function(e){if(e&&0!==e.length)return e.item(e.length-1)},n.forEachNodeList=function(e,t){Array.prototype.forEach.call(e,t)},n.safeSetStyle=r,n.safeSetAttribute=s,n.safeSetStyles=i,n.safeSetAttributes=function(t,n){Object.keys(n).forEach(e=>{s(t,e,n[e].toString())})},n.makeHtmlEl=function(){const e=document.createElement("html");return e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/xmlns/"),e},n.makeBodyEl=function(e={},t=""){const n=document.createElement("body");return n.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),i(n,e),n.innerHTML=t,n}},{}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getHeaders=n.getHeader=n.hasHeader=void 0;const r=t=>e=>e.name.toLowerCase()===t;n.hasHeader=function(e,t){return t=r(t.toLowerCase()),e.some(t)};const s=!!Array.prototype.find;n.getHeader=function(e,t){t=r(t.toLowerCase());let n;return n=s?e.find(t):e.map(t).pop(),n?n.value:void 0},n.getHeaders=function(e,t){var n=r(t.toLowerCase());return e.filter(n).map(e=>[t,e.value])}},{}],3:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.audio=n.video=n.flash=n.font=n.error=n.warning=n.css=n.html=n.svg=n.image=n.javascript=n.other=n.plain=n.err5xx=n.err4xx=n.err3xx=n.noTls=void 0;const l=e("./svg"),s=(e,t,n,r,s,i)=>{const o=l.newSvg("",{x:e,y:t}),a=l.newG(`icon ${r}`,{transform:`scale(${s})`});return a.appendChild(i),a.appendChild(l.newTitle(n)),o.appendChild(a),o};let i;n.noTls=function(e,t,n,r=1){return void 0===i&&(i=l.newPath(`M18 6.216v2.77q0 .28-.206.486-.205.206-.486.206h-.693q-.28 0-.486-.206-.21-.205-.21
-.487v-2.77q0-1.145-.81-1.957-.813-.81-1.96-.81-1.146 0-1.957.81-.81.812-.81 1.958v2.077h1.037q.434
0 .737.303.302.303.302.736v6.23q0 .433-.305.736t-.737.303H1.038q-.433 0-.736-.3Q0 15.996 0
15.56V9.33q0-.433.303-.736t.735-.303h7.27V6.218q0-2 1.422-3.423 1.423-1.423 3.424-1.423 2
0 3.424 1.424Q18 4.214 18 6.216`)),s(e,t,n,"icon-no-tls",r,i.cloneNode(!1))};let o;n.err3xx=function(e,t,n,r=1){return void 0===o&&(o=l.newPath(`M17 2.333V7q0 .27-.198.47-.198.197-.47.197h-4.665q-.438 0-.615-.417-.177-.406.146-.72l1.437-1.436Q11.095
3.667 9 3.667q-1.083 0-2.068.422-.984.42-1.703 1.14-.72.715-1.14 1.7-.426.984-.426 2.07 0 1.08.422 2.065.42.984
1.14 1.703.718.72 1.702 1.14.984.422 2.067.422 1.24 0 2.344-.54 1.104-.543 1.864-1.533.073-.105.24-.126.146 0
.26.095l1.427 1.436q.095.084.1.214.006.13-.08.234-1.133 1.376-2.75 2.13Q10.793 17 9 17q-1.625
0-3.104-.635-1.48-.636-2.552-1.71-1.073-1.072-1.71-2.55Q1 10.625 1 9t.635-3.104q.636-1.48 1.71-2.552
1.072-1.073 2.55-1.71Q7.375 1 9 1q1.53 0 2.964.578 1.432.578 2.546
1.63l1.355-1.343q.302-.323.73-.146.405.173.405.61z`)),s(e,t,n,"icon-redirect",r,o.cloneNode(!1))},n.err4xx=function(e,t,n,r=1){return f(e,t,n,r)},n.err5xx=function(e,t,n,r=1){return f(e,t,n,r)};let a;n.plain=function(e,t,n,r=1){return void 0===a&&(a=l.newPath(`M15.247 4.393q.25.25.43.678.177.43.177.79v10.287q0
.357-.25.607t-.607.25h-12q-.357 0-.607-.25t-.25-.606V1.858q0-.358.25-.608T2.997 1h8q.357 0
.786.18.428.177.678.427zm-3.964-2.18V5.57h3.357q-.09-.256-.196-.364L11.65 2.41q-.108-.106-.367
-.196zm3.428 13.644V6.714H11q-.357 0-.607-.25t-.25-.607V2.143h-6.86v13.714H14.71zM5.57
8.143q0-.125.08-.205.08-.08.204-.08h6.286q.125 0 .205.08.08.08.08.205v.57q0 .126-.08.207-.08.08
-.205.08H5.854q-.125 0-.205-.08-.08-.08-.08-.206v-.57zm6.57 2q.125 0 .205.08.08.08.08.206V11q0
.125-.08.205-.08.08-.205.08H5.854q-.125 0-.205-.08-.08-.08-.08-.205v-.57q0-.126.08-.207.08-.08.2
-.08h6.286zm0 2.286q.125 0 .205.08.08.08.08.2v.572q0 .125-.08.205-.08.08-.205.08H5.854q-.125 0-.205
-.08-.08-.08-.08-.205v-.572q0-.124.08-.204.08-.08.2-.08h6.286z`)),s(e,t,n,"icon-plain",r,a.cloneNode(!1))};let c;n.other=function(e,t,n,r=1){return void 0===c&&(c=l.newPath(`M10.8 13.5v3q0 .2-.15.35-.15.15-.35.15h-3q-.2 0-.35-.15-.15-.15-.15-.35v-3q0-.2.15-.35.15
-.15.35-.15h3q.2 0 .35.15.15.15.15.35zM14.75 6q0 .675-.193 1.262-.193.588-.437.957-.244.365
-.688.74-.443.375-.718.543-.275.17-.763.444-.51.286-.852.81-.344.526-.344.84 0 .21-.15.405-.15.194
-.35.194h-3q-.186 0-.318-.23-.13-.234-.13-.47v-.564q0-1.037.812-1.956.812-.917 1.787-1.355.74-.336
1.05-.7.314-.362.314-.95 0-.524-.583-.924-.58-.4-1.343-.4-.814 0-1.35.362-.44.312-1.34 1.437-.16.2
-.386.2-.15 0-.313-.1L3.4 4.987q-.16-.124-.193-.312-.03-.188.07-.35Q5.277 1 9.077 1q1 0 2.01.387
1.01.388 1.825 1.038.812.65 1.325 1.594.51.94.51 1.98z`)),s(e,t,n,"icon-other",r,c.cloneNode(!1))};let d;n.javascript=function(e,t,n,r=1){return void 0===d&&(d=l.newPath(`M13.516 2.9c-2.766 0-4.463 1.522-4.463 3.536 0 1.733 1.295 2.82 3.256 3.52
1.413.49 1.973.926 1.973 1.644 0 .787-.647 1.296-1.873 1.296-1.137 0-2.26-.368-2.96-.736l-.54
2.19c.665.367 1.996.734 3.344.734 3.238 0 4.744-1.68 4.744-3.658
0-1.68-.966-2.767-3.05-3.537-1.54-.6-2.186-.93-2.186-1.68 0-.6.56-1.14 1.714-1.14
1.137 0 1.996.33 2.45.56l.596-2.138c-.7-.332-1.663-.596-3.01-.596zm-9.032.192v7.44c0
1.822-.702 2.33-1.822 2.33-.525 0-.997-.09-1.365-.212L1 14.805c.525.175 1.33.28 1.96.28
2.574 0 4.185-1.173 4.185-4.534V3.097h-2.66z`)),s(e,t,n,"icon-js",r,d.cloneNode(!1))};let u;function p(e,t,n,r=1){return void 0===u&&(u=l.newPath(`M6 6q0 .75-.525 1.275Q4.95 7.8 4.2 7.8q-.75 0-1.275-.525Q2.4 6.75 2.4
6q0-.75.525-1.275Q3.45 4.2 4.2 4.2q.75 0 1.275.525Q6 5.25 6 6zm9.6 3.6v4.2H2.4V12l3-3
1.5 1.5 4.8-4.8zm.9-6.6h-15q-.122 0-.21.09-.09.088-.09.21v11.4q0
.122.09.21.088.09.21.09h15q.122 0 .21-.09.09-.088.09-.21V3.3q0-.122-.09-.21Q16.623
3 16.5 3zm1.5.3v11.4q0 .62-.44 1.06-.44.44-1.06.44h-15q-.62 0-1.06-.44Q0 15.32 0
14.7V3.3q0-.62.44-1.06.44-.44 1.06-.44h15q.62 0 1.06.44.44.44.44 1.06z`)),s(e,t,n,"icon-image",r,u.cloneNode(!1))}n.image=p,n.svg=function(e,t,n,r=1){return p(e,t,n,r)};let h;n.html=function(e,t,n,r=1){return void 0===h&&(h=l.newPath(`M5.626 13.31l-.492.492q-.098.098-.226.098t-.226-.098L.098 9.22Q0 9.12 0
8.99q0-.127.098-.226L4.682 4.18q.098-.097.226-.097t.226.098l.492.49q.1.1.1.23t-.1.23L1.76
8.99l3.866 3.866q.1.098.1.226t-.1.226zM11.44 2.815l-3.67
12.7q-.04.127-.152.19-.113.065-.23.026l-.61-.162q-.13-.04-.193-.152-.064-.112-.024-.24l3.67-12.698q.04
-.128.157-.192.113-.064.23-.025l.61.167q.13.04.193.152.063.113.023.24zM17.9
9.22l-4.582 4.58q-.098.098-.226.098t-.226-.098l-.492-.492q-.1-.098-.1-.226t.1-.226L16.24
8.99l-3.867-3.865q-.1-.098-.1-.226t.1-.23l.492-.49q.098-.1.226-.1t.23.1l4.58 4.583q.1.1.1.226 0 .13-.1.23z`)),s(e,t,n,"icon-html",r,h.cloneNode(!1))};let m;n.css=function(e,t,n,r=1){return void 0===m&&(m=l.newPath(`M15.436.99q.625 0 1.095.416.47.415.47 1.04 0 .564-.4 1.35-2.97 5.624-4.16 6.724-.865.814
-1.946.814-1.127 0-1.935-.827-.81-.827-.81-1.962 0-1.144.822-1.895l5.705-5.175Q14.8.99
15.435.99zM7.31 10.232q.35.68.953 1.162.603.483 1.345.68l.01.634q.035 1.904-1.16 3.102-1.192
1.198-3.114 1.198-1.1 0-1.948-.416-.85-.415-1.364-1.14-.514-.723-.773-1.635Q1 12.905 1
11.85l.366.268q.304.224.555.398.25.175.53.327.277.15.41.15.368 0 .493-.33.224-.59.515-1.005.29
-.415.62-.68.332-.263.788-.424.455-.16.92-.228.465-.066 1.118-.094z`)),s(e,t,n,"icon-css",r,m.cloneNode(!1))};let g;function f(e,t,n,r=1){return void 0===g&&(g=l.newPath(`M6 6q0 .75-.525 1.275Q4.95 7.8 4.2 7.8q-.75 0-1.275-.525Q2.4 6.75 2.4
6q0-.75.525-1.275Q3.45 4.2 4.2 4.2q.75 0 1.275.525Q6 5.25 6 6zm9.6 3.6v4.2H2.4V12l3-3
1.5 1.5 4.8-4.8zm.9-6.6h-15q-.122 0-.21.09-.09.088-.09.21v11.4q0
.122.09.21.088.09.21.09h15q.122 0 .21-.09.09-.088.09-.21V3.3q0-.122-.09-.21Q16.623
3 16.5 3zm1.5.3v11.4q0 .62-.44 1.06-.44.44-1.06.44h-15q-.62 0-1.06-.44Q0 15.32 0
14.7V3.3q0-.62.44-1.06.44-.44 1.06-.44h15q.62 0 1.06.44.44.44.44 1.06z`)),s(e,t,n,"icon-warning",r,g.cloneNode(!1))}n.warning=f;let v;n.error=function(e,t,n,r=1){return void 0===v&&(v=l.newPath(`M9 1q2.177 0 4.016 1.073 1.838 1.073 2.91 2.91Q17 6.823 17 9q0 2.177-1.073 4.016-1.073
1.838-2.91 2.91Q11.177 17 9 17q-2.177 0-4.016-1.073-1.838-1.073-2.91-2.91Q1 11.177 1 9q0-2.177 1.073-4.016
1.073-1.838 2.91-2.91Q6.823 1 9 1zm1.333 12.99v-1.98q0-.145-.093-.244-.094-.1-.23-.1h-2q-.135 0-.24.105
-.103.106-.103.24v1.98q0 .136.104.24.106.104.24.104h2q.137 0 .23-.1.094-.098.094-.243zm-.02-3.584l.187
-6.468q0-.125-.104-.188-.104-.084-.25-.084H7.854q-.146 0-.25.084-.104.062-.104.188l.177 6.468q0
.104.104.183.106.076.25.076h1.93q.146 0 .245-.078.1-.08.11-.184z`)),s(e,t,n,"icon-no-gzip",r,v.cloneNode(!1))};let y;n.font=function(e,t,n,r=1){return void 0===y&&(y=l.newPath(`M7.97 5.754L6.338 10.08q.317 0 1.312.02.994.02 1.542.02.183 0 .548-.02-.836-2.432-1.77
-4.345zM1 16.38l.02-.76q.22-.068.538-.12.317-.053.548-.102.23-.048.476-.14.245-.09.428-.278.182
-.187.298-.485l2.28-5.923 2.69-6.962H9.51q.077.135.105.202l1.972 4.615q.317.75 1.02 2.476.7 1.726
1.095 2.64.144.327.558 1.39.413 1.062.692 1.62.192.432.336.547.183.145.847.284.663.14.807.197.058.37.058.55
0 .04-.005.13t-.005.128q-.605 0-1.827-.076-1.22-.08-1.836-.08-.73 0-2.067.07-1.337.067-1.712.076 0-.412.04
-.75l1.258-.27q.01 0 .12-.022l.15-.033q.038-.01.14-.044.1-.034.143-.06l.1-.08q.06-.048.082-.106.024-.056.024
-.133 0-.152-.298-.926t-.693-1.71q-.392-.93-.402-.96l-4.325-.02q-.25.56-.734 1.88-.487 1.32-.487 1.56 0
.213.136.362.134.15.418.235.285.087.467.13.185.044.55.08.366.04.395.04.01.183.01.558 0 .087-.02.26-.558
0-1.678-.095-1.12-.098-1.678-.098-.08 0-.26.04-.18.037-.208.037-.77.136-1.808.136Z`)),s(e,t,n,"icon-font",r,y.cloneNode(!1))};let b;n.flash=function(e,t,n,r=1){return void 0===b&&(b=l.newPath(`M13.724 4.738q.195.216.076.476L7.96 17.73q-.142.27-.456.27-.043 0-.15-.022-.185-.054-.277
-.205-.092-.15-.05-.325l2.132-8.74L4.765 9.8q-.044.01-.13.01-.195 0-.336-.118-.193-.162-.14-.422L6.337.346q.043
-.15.173-.25Q6.64 0 6.81 0h3.548q.206 0 .346.135.14.135.14.32 0 .086-.053.194L8.94 5.654l4.285
-1.06q.086-.02.13-.02.205 0 .367.16z`)),s(e,t,n,"icon-flash",r,b.cloneNode(!1))};let w;n.video=function(e,t,n,r=1){return void 0===w&&(w=l.newPath(`M17 4.107v9.714q0 .38-.348.53-.116.05-.223.05-.25 0-.41-.17l-3.6-3.6v1.48q0 1.067-.757 1.82-.754.756
-1.817.756H3.57q-1.06 0-1.816-.753Q1 13.17 1 12.106V5.82q0-1.06.754-1.816.755-.754 1.817-.754h6.29q1.07 0
1.82.754.76.755.76 1.817V7.3l3.597-3.59q.16-.17.4-.17.107 0 .22.045.35.153.35.528z`)),s(e,t,n,"icon-video",r,w.cloneNode(!1))};let C;n.audio=function(e,t,n,r=1){return void 0===C&&(C=l.newPath(`M8.385 3.756v10.46q0 .252-.183.434-.183.183-.433.183t-.44-.183l-3.2-3.202H1.61q-.25
0-.43-.183-.18-.182-.18-.432V7.14q0-.25.182-.432.182-.183.432-.183h2.52l3.202-3.202q.182-.183.432
-.183t.43.183q.182.183.182.433zm3.692 5.23q0 .73-.41 1.36-.407.63-1.08.9-.097.048-.24.048-.25 0
-.434-.178-.182-.177-.182-.437 0-.21.12-.35.12-.14.28-.24.16-.1.33-.22.166-.12.28-.34.117-.22.117
-.55 0-.33-.115-.55-.115-.224-.28-.344-.163-.12-.326-.22-.165-.1-.28-.24-.116-.14-.116-.34 0-.26.183
-.44t.43-.176q.146 0 .24.048.676.26 1.08.894.41.636.41 1.367zm2.46 0q0 1.472-.816 2.717t-2.16 1.813q
-.12.048-.24.048-.26 0-.44-.183-.18-.18-.18-.43 0-.37.378-.56.54-.28.73-.42.713-.52 1.11-1.302.4
-.783.4-1.667 0-.886-.4-1.67-.4-.783-1.11-1.303-.192-.145-.73-.424-.376-.192-.376-.567 0-.25.183
-.434.183-.18.433-.18.123 0 .25.047 1.344.567 2.16 1.812.82 1.244.82 2.716zm2.463 0q0 2.212
-1.22 4.063-1.222 1.85-3.25 2.72-.126.05-.25.05-.25 0-.434-.19-.183-.183-.183-.433 0-.346.375
-.568.068-.04.217-.1.15-.064.216-.1.45-.244.79-.494 1.19-.875 1.85-2.183.67-1.306.67-2.777 0
-1.47-.663-2.78-.664-1.304-1.846-2.18-.346-.25-.79-.49-.065-.035-.214-.1-.15-.06-.22-.1
-.375-.22-.375-.57 0-.25.183-.43.183-.182.433-.182.123 0 .25.047 2.027.876 3.25 2.727Q17 6.775 17 8.99Z`)),s(e,t,n,"icon-audio",r,C.cloneNode(!1))}},{"./svg":6}],4:[function(e,t,n){"use strict";function r(e,t){let n=0;if(e&&!(e.length<1))for(var r=e.length;n<r;){if(t(e[n],n))return n;n++}}Object.defineProperty(n,"__esModule",{value:!0}),n.isTabDown=n.isTabUp=n.pluralize=n.toCssClass=n.isInStatusCodeRange=n.roundNumber=n.resourceUrlFormatter=n.find=n.findIndex=n.contains=void 0,n.contains=function(e,t){return e.some(e=>e===t)},n.findIndex=r,n.find=function(e,t){if(void 0!==(t=r(e,t)))return e[t]},n.resourceUrlFormatter=function(e,t){if(e.length<t)return e.replace(/https?:\/\//,"");const n=(r=e,e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),{authority:(e=r.match(e)||[])[4],fragment:e[9],path:e[5],query:e[7],scheme:e[2]});var r;if((n.authority+n.path).length<t)return n.authority+n.path;e=Math.floor(t/2)-3,t=Math.floor(t/2)-5;const s=n.path.split("/");return n.authority.length>e?n.authority.substr(0,e)+"..."+s[s.length-1].substr(-t):n.authority+"..."+s[s.length-1].substr(-t)},n.roundNumber=function(e,t=2){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)},n.isInStatusCodeRange=function(e,t,n){return t<=e&&e<=n};const s=/[^a-z-]/g;n.toCssClass=function(e){return e.toLowerCase().replace(s,"")},n.pluralize=function(e,t){return e+(1<t?"s":"")},n.isTabUp=function(e){return 9===e.which&&e.shiftKey},n.isTabDown=function(e){return 9===e.which&&!e.shiftKey}},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateOptions=n.toInt=n.sanitizeAlphaNumeric=n.sanitizeUrlForLink=n.escapeHtml=n.formatBytes=n.formatDateLocalized=n.formatSeconds=n.formatMilliseconds=n.parsePositive=n.parseNonNegative=n.parseDate=n.parseNonEmpty=n.parseAndFormat=void 0;const r=e("./misc");function s(e,t){var n=e=>t(e)?e:void 0;if("string"!=typeof e)return n(e);e=parseInt(e,10);return isFinite(e)?n(e):void 0}n.parseAndFormat=function(e,t,n=function(e){{if(e.toString&&"function"==typeof e.toString)return e.toString();throw TypeError(`Can't convert type ${typeof e} to string`)}}){if(void 0!==e){e=t(e);if(void 0!==e)return n(e)}},n.parseNonEmpty=function(e){return 0<e.trim().length?e:void 0},n.parseDate=function(e){const t=new Date(e);if(!isNaN(t.getTime()))return t},n.parseNonNegative=function(e){if(null!=e)return s(e,e=>0<=e)},n.parsePositive=function(e){if(null!=e)return s(e,e=>0<e)},n.formatMilliseconds=function(e){return void 0!==e?`${(0,r.roundNumber)(e,3)} ms`:void 0};n.formatSeconds=function(e){if(void 0!==e){var t=`${(0,r.roundNumber)(e,3)} s`;return 86400<e?`${t} (~${(0,r.roundNumber)(e/86400,0)} days)`:3600<e?`${t} (~${(0,r.roundNumber)(e/3600,0)} hours)`:60<e?`${t} (~${(0,r.roundNumber)(e/60,0)} minutes)`:t}},n.formatDateLocalized=function(e){return void 0!==e?`${e.toUTCString()}<br/>(local time: ${e.toLocaleString()})`:void 0};n.formatBytes=function(e){if(void 0===e)return"";var t=`${e} bytes`;return 1048576<=e?`${t} (~${(0,r.roundNumber)(e/1048576,1)} MB)`:1024<=e?`${t} (~${(0,r.roundNumber)(e/1024,0)} kB)`:t};const i={'"':""","&":"&","'":"'","<":"<",">":">"},o=new RegExp(Object.keys(i).join("|"),"g");n.escapeHtml=function(e=""){if(null==e)return"";if("string"!=typeof e){if("function"!=typeof e.toString)throw TypeError("Invalid parameter");e=e.toString()}return e.replace(o,e=>i[e])};const a=new RegExp("[^-A-Za-z0-9+&@#/%?=~_|!:,.;()]","g");n.sanitizeUrlForLink=function(e){const t=e.replace(a,"_");return 0===t.indexOf("http://")||0===t.indexOf("https://")?t:(console.warn("skipped link, due to potentially unsafe url",e),"")};const l=new RegExp("[^a-zA-Z0-9]","g");function c(e){return"number"==typeof e?e:"string"==typeof e?parseInt(e,10):void 0}n.sanitizeAlphaNumeric=function(e){return e.toString().replace(l,"")},n.toInt=c,n.validateOptions=function(n){var e=e=>{var t=c(n[e]);if(void 0===t)throw TypeError(`option "${e}" needs to be a number`);n[e]=t},t=e=>{n[e]=!!n[e]};return e("leftColumnWidth"),e("rowHeight"),e("selectedPage"),t("showAlignmentHelpers"),t("showIndicatorIcons"),t("showMimeTypeIcon"),n}},{"./misc":4}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getNodeTextWidth=n.newPath=n.newTextEl=n.newTitle=n.newLine=n.newRect=n.newA=n.newForeignObject=n.newClipPath=n.newG=n.newSvg=void 0;const o=e("./dom"),a="http://www.w3.org/2000/svg";function r(e,{attributes:t={},css:n={},text:r="",className:s=""}={}){const i=document.createElementNS(a,e);return s&&(0,o.addClass)(i,s),r&&(i.textContent=r),(0,o.safeSetStyles)(i,n),(0,o.safeSetAttributes)(i,t),i}function s(e,t,n={}){return r("svg",{className:e,attributes:t,css:n})}n.newSvg=s,n.newG=function(e,t={},n={}){return r("g",{className:e,attributes:t,css:n})},n.newClipPath=function(e){return r("clipPath",{attributes:{id:e}})},n.newForeignObject=function(e,t="",n={}){return r("foreignObject",{attributes:e,className:t,css:n})},n.newA=function(e){return r("a",{className:e})},n.newRect=function(e,t="",n={}){return r("rect",{attributes:e,className:t,css:n})},n.newLine=function(e,t=""){return r("line",{className:t,attributes:e})},n.newTitle=function(e){const t=document.createElementNS(a,"title");return t.setAttribute("text",e),t},n.newTextEl=function(e,t={},n={}){return r("text",{text:e,attributes:t,css:n})},n.newPath=function(e){const t=document.createElementNS(a,"path");return t.setAttribute("d",e),t};const l=(()=>{let n,r;return()=>{var e,t;return void 0===n&&(e={className:"water-fall-chart temp",width:"9999px"},t={left:"0px",position:"absolute",top:"0px",visibility:"hidden","z-index":"99999"},n=s("water-fall-chart temp",e,t)),void 0===n.parentElement&&window.document.body.appendChild(n),clearTimeout(r),r=setTimeout(()=>{n.parentNode.removeChild(n)},500),n}})();n.getNodeTextWidth=function(e,t=!1){if(0===(e.textContent||"").length)return 0;const n=l();let r,s;t?(s=e.style.textShadow,r=e):(r=e.cloneNode(!0),r.setAttribute("x","0"),r.setAttribute("y","0")),r.style.textShadow="0",n.appendChild(r),window.document.body.appendChild(n);var i=r.getComputedTextLength();return t&&void 0!==s&&(e.style.textShadow=s),i}},{"./dom":1}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.makeLegend=void 0,n.makeLegend=function(){const e=document.createElement("ul");return e.className="resource-legend",e.innerHTML=`
<li class="legend-blocked" title="Time spent in a queue waiting for a network connection.">Blocked</li>
<li class="legend-dns" title="DNS resolution time.">DNS</li>
<li class="legend-connect" title="Time required to create TCP connection.">Connect</li>
<li class="legend-ssl" title="Time required for SSL/TLS negotiation.">SSL (TLS)</li>
<li class="legend-send" title="Time required to send HTTP request to the server.">Send</li>
<li class="legend-wait" title="Waiting for a response from the server.">Wait</li>
<li class="legend-receive"
title="Time required to read entire response from the server (or cache).">Receive</li>`,e}},{}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fromHar=n.makeLegend=void 0;const i=e("./helpers/parse"),o=e("./legend/legend"),a=e("./paging/paging"),r=e("./transformers/har"),l=e("./waterfall/svg-chart"),c={leftColumnWidth:25,legendHolder:void 0,onParsed:void 0,pageSelector:void 0,rowHeight:23,selectedPage:0,showAlignmentHelpers:!0,showIndicatorIcons:!0,showMimeTypeIcon:!0},s={showUserTiming:!1,showUserTimingEndMarker:!1};n.makeLegend=function(){return(0,o.makeLegend)()},n.fromHar=function(e,t={}){var n={...s,...t},n=r.transformDoc(e,n);return"function"==typeof t.onParsed&&t.onParsed(n),function(e,t={}){void 0!==t.leftColumnWith&&(console.warn("Depreciation Warning: The option 'leftColumnWith' has been fixed to 'leftColumnWidth', please update your code as this will get deprecated in the future"),t.leftColumnWidth=t.leftColumnWith);const r=(0,i.validateOptions)({...c,...t}),n=new a.default(e,r.selectedPage);let s=(0,l.createWaterfallSvg)(n.getSelectedPage(),r);return n.onPageUpdate((e,t)=>{const n=s.parentElement;t=(0,l.createWaterfallSvg)(t,r);n.replaceChild(t,s),s=t}),r.pageSelector&&n.initPagingSelectBox(r.pageSelector),r.legendHolder&&(r.legendHolder.innerHTML="",r.legendHolder.appendChild((0,o.makeLegend)())),s}(n,t)}},{"./helpers/parse":5,"./legend/legend":7,"./paging/paging":9,"./transformers/har":13,"./waterfall/svg-chart":27}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../helpers/dom");n.default=class{constructor(e,t=0){this.doc=e,this.selectedPageIndex=t,this.onPageUpdateCbs=[],t>=this.doc.pages.length&&(this.selectedPageIndex=this.doc.pages.length-1)}getPageCount(){return this.doc.pages.length}getSelectedPage(){return this.doc.pages[this.selectedPageIndex]}getSelectedPageIndex(){return this.selectedPageIndex}setSelectedPageIndex(e){if(this.selectedPageIndex!==e){if(e<0||e>=this.getPageCount())throw new Error("Page does not exist - Invalid pageIndex selected");this.selectedPageIndex=e;const t=this.doc.pages[this.selectedPageIndex];this.onPageUpdateCbs.forEach(e=>{e(this.selectedPageIndex,t)})}}onPageUpdate(e){if(1<this.getPageCount())return this.onPageUpdateCbs.push(e)}initPagingSelectBox(n){const t=this;this.getPageCount()<=1?n.style.display="none":((0,r.removeChildren)(n),this.doc.pages.forEach((e,t)=>{t=new Option(e.title,t.toString(),!1,t===this.selectedPageIndex);n.add(t)}),n.style.display="block",n.addEventListener("change",e=>{e=parseInt(e.target.value,10);t.setSelectedPageIndex(e)}))}}},{"../helpers/dom":1}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getKeys=void 0;const c=e("../helpers/har"),d=e("../helpers/parse"),u=e("./helpers"),p=(e,t)=>[e,(0,d.parseAndFormat)(t,d.parsePositive,d.formatBytes)],h=(e,t)=>[e,(0,d.parseAndFormat)(t,d.parsePositive)],m=e=>1<e.length&&void 0!==e[1]&&""!==e[1];n.getKeys=function(e,t,n,r){const s=e.request.headers,i=e.response.headers;var o,a,l=e=>[e.name,e.value];return{general:(o=e,a=n,[["Request Number",`#${t}`],["Started",new Date(o.startedDateTime).toLocaleString()+(0<a?" ("+(0,d.formatMilliseconds)(a)+" after page request started)":"")],["Duration",(0,d.formatMilliseconds)(o.time)],["Error/Status Code",o.response.status+" "+o.response.statusText],["Server IPAddress",o.serverIPAddress],["Connection",o.connection],["Browser Priority",o._priority||o._initialPriority],["Was pushed",(0,d.parseAndFormat)(o._was_pushed,d.parsePositive,()=>"yes")],["Initiator (Loaded by)",o._initiator],["Initiator Line",o._initiator_line],["Initiator Type",o._initiator_type],["Host",(0,c.getHeader)(o.request.headers,"Host")],["IP",o._ip_addr],["Client Port",(0,d.parseAndFormat)(o._client_port,d.parsePositive)],["Expires",o._expires],["Cache Time",(0,d.parseAndFormat)(o._cache_time,d.parsePositive,d.formatSeconds)],["CDN Provider",o._cdn_provider],["Render blocking",o._renderBlocking],["Is Largest Contentful Paint",o._isLCP?"yes":void 0],p("ObjectSize",o._objectSize),p("Bytes In (downloaded)",o._bytesIn),p("Bytes Out (uploaded)",o._bytesOut),p("JPEG Scan Count",o._jpeg_scan_count),p("Gzip Total",o._gzip_total),p("Gzip Save",o._gzip_save),p("Minify Total",o._minify_total),p("Minify Save",o._minify_save),p("Image Total",o._image_total),p("Image Save",o._image_save)].filter(m)),request:function(e){const t=e.request;var n=e=>(0,c.getHeaders)(t.headers,e);return(0,u.flattenKvTuple)([["Method",t.method],["HTTP Version",t.httpVersion],p("Bytes Out (uploaded)",e._bytesOut),p("Headers Size",t.headersSize),p("Body Size",t.bodySize),["Comment",(0,d.parseAndFormat)(t.comment,d.parseNonEmpty)],n("User-Agent"),n("Host"),n("Connection"),n("Accept"),n("Accept-Encoding"),n("Expect"),n("Forwarded"),n("If-Modified-Since"),n("If-Range"),n("If-Unmodified-Since"),h("Querystring parameters count",t.queryString.length),h("Cookies count",t.cookies.length)]).filter(m)}(e),requestHeaders:s.map(l).filter(m),response:function(e){var t=e.response;const n=t.content,r=t.headers;var s=(e,t=e)=>(0,c.getHeaders)(r,t),i=e=>{var t=(0,c.getHeader)(r,e);return[e,(0,d.parseAndFormat)(t,d.parseDate,d.formatDateLocalized)]},o=(0,c.getHeader)(r,"Content-Length");let a;n.size&&-1!==n.size&&o!==n.size.toString()&&(a=n.size);let l=(0,c.getHeader)(r,"Content-Type");return e._contentType&&e._contentType!==l&&(l=l+" | "+e._contentType),(0,u.flattenKvTuple)([["Status",t.status+" "+t.statusText],["HTTP Version",t.httpVersion],p("Bytes In (downloaded)",e._bytesIn),p("Headers Size",t.headersSize),p("Body Size",t.bodySize),["Content-Type",l],s("Cache-Control"),s("Content-Encoding"),i("Expires"),i("Last-Modified"),s("Pragma"),p("Content-Length",o),p("Content Size",a),p("Content Compression",n.compression),s("Connection"),s("ETag"),s("Accept-Patch"),["Age",(0,d.parseAndFormat)((0,c.getHeader)(r,"Age"),d.parseNonNegative,d.formatSeconds)],s("Allow"),s("Content-Disposition"),s("Location"),s("Strict-Transport-Security"),s("Trailer (for chunked transfer coding)","Trailer"),s("Transfer-Encoding"),s("Upgrade"),s("Vary"),s("Timing-Allow-Origin"),["Redirect URL",(0,d.parseAndFormat)(t.redirectURL,d.parseNonEmpty)],["Comment",(0,d.parseAndFormat)(t.comment,d.parseNonEmpty)]]).filter(m)}(e),responseHeaders:i.map(l).filter(m),timings:function(e,t,n){var r=e.timings,t="number"!=typeof t||"number"!=typeof n?void 0:n-t;let s=(e=e=>(0,d.parseAndFormat)(e,d.parseNonNegative,d.formatMilliseconds))(r.connect);return r.ssl&&0<r.ssl&&r.connect&&(s=`${s} (without TLS: ${e(r.connect-r.ssl)})`),[["Total",(0,d.formatMilliseconds)(t)],["Blocked",e(r.blocked)],["DNS",e(r.dns)],["Connect",s],["SSL (TLS)",e(r.ssl)],["Send",(0,d.formatMilliseconds)(r.send)],["Wait",(0,d.formatMilliseconds)(r.wait)],["Receive",(0,d.formatMilliseconds)(r.receive)]].filter(m)}(e,n,r)}}},{"../helpers/har":2,"../helpers/parse":5,"./helpers":14}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.collectIndicators=n.documentIsSecure=void 0;const o=e("../helpers/har"),a=e("../helpers/misc"),l=e("../helpers/parse");function c(e,t){var n=e.response.headers;return!(0,o.hasHeader)(n,"Content-Encoding")&&function(e,t){if(e.response.bodySize<1e3)return;if(a.contains(["html","css","javascript","svg","plain"],t))return 1;const n=e.response.content.mimeType;return!(!a.contains(["text"],n.split("/")[0])&&!a.contains(["application/vnd.ms-fontobject","application/x-font-opentype","application/x-font-truetype","application/x-font-ttf","application/xml","font/eot","font/opentype","font/otf","image/vnd.microsoft.icon"],n.split(";")[0]))}(e,t)}function d(e){return 0===e.request.url.indexOf("https://")}n.documentIsSecure=function(e){var t=e.filter(e=>!e.response.redirectURL)[0];return void 0===t?0<e.length&&d(e[0]):d(t)},n.collectIndicators=function(e,t,n,r){const s=[];var i;return void 0!==(i=e)._was_pushed&&null!==i._was_pushed&&1===(0,l.toInt)(i._was_pushed)&&s.push({description:"Response was pushed by the server using HTTP2 push.",displayType:"inline",icon:"push",id:"push",title:"Response was pushed by the server",type:"info"}),!n||d(e)||(n=e,0===t&&n.response.redirectURL)||s.push({description:"Insecure request, it should use HTTPS.",displayType:"icon",id:"noTls",title:"Insecure Connection",type:"error"}),function(e){if(e.request.method&&"get"===e.request.method.toLowerCase()&&204!==e.response.status&&a.isInStatusCodeRange(e.response.status,200,299)){e=e.response.headers;return!(0,o.hasHeader)(e,"Cache-Control")&&!(0,o.hasHeader)(e,"Expires")}}(e)&&s.push({description:"The response is not allow to be cached on the client. Consider setting 'Cache-Control' headers.",displayType:"icon",id:"noCache",title:"Response not cached",type:"error"}),c(e,r)&&s.push({description:"The response is not compressed. Consider enabling HTTP compression on your server.",displayType:"icon",id:"noGzip",title:"no gzip",type:"error"}),!e.response.content.mimeType&&a.isInStatusCodeRange(e.response.status,200,299)&&204!==e.response.status&&s.push({description:"Response doesn't contain a 'Content-Type' header.",displayType:"icon",id:"warning",title:"No MIME Type defined",type:"warning"}),s}},{"../helpers/har":2,"../helpers/misc":4,"../helpers/parse":5}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.makeTabs=void 0;const c=e("../helpers/misc"),d=e("../helpers/parse"),u=e("./extract-details-keys"),p=e("./helpers"),h=/\\n/g,m=/\n/g,g=/\\t/g;function f(e,t,n=""){return{content:t,tabClass:n,title:e}}function v(e,t,n=""){return{renderContent:t,tabClass:n,title:e}}n.makeTabs=function(e,t,n,r,s,i){const o=[];var a,l,s=(0,u.getKeys)(e,t,r,s);return o.push(function(e,t){var n=(0,p.makeDefinitionList)(e);if(0===t.length)return f("General",n);var r=`<h2>General</h2>\n<dl>${n}<dl>`;let s="";e=t.filter(e=>"error"===e.type).map(e=>[e.title,e.description]),n=t.filter(e=>"warning"===e.type).map(e=>[e.title,e.description]),t=t.filter(e=>"error"!==e.type&&"warning"!==e.type).map(e=>[e.title,e.description]);0<e.length&&(s+=`<h2 class="no-border">${(0,c.pluralize)("Error",e.length)}</h2>
<dl>${(0,p.makeDefinitionList)(e)}</dl>`);0<n.length&&(s+=`<h2 class="no-border">${(0,c.pluralize)("Warning",n.length)}</h2>
<dl>${(0,p.makeDefinitionList)(n)}</dl>`);0<t.length&&(s+=`<h2 class="no-border">Info</h2>
<dl>${(0,p.makeDefinitionList)(t)}</dl>`);return f("General",s+r)}(s.general,i)),o.push(function(e,t){t=`<dl>
${(0,p.makeDefinitionList)(e)}
</dl>
<h2>All Request Headers</h2>
<dl>
${(0,p.makeDefinitionList)(t)}
</dl>`;return f("Request",t)}(s.request,s.requestHeaders)),o.push(function(e,t){t=`<dl>
${(0,p.makeDefinitionList)(e)}
</dl>
<h2>All Response Headers</h2>
<dl>
${(0,p.makeDefinitionList)(t)}
</dl>`;return f("Response",t)}(s.response,s.responseHeaders)),o.push(f("Timings",(0,p.makeDefinitionList)(s.timings,!0))),o.push((a=e,v("Raw Data",()=>`
<button class="copy-tab-data">Copy Raw Data to Clipboard</button>
<pre><code>${(0,d.escapeHtml)(JSON.stringify(a,null,2))}</code></pre>
`,"raw-data rendered-data"))),"image"===n&&o.push((l=e,v("Preview",e=>`<img class="preview" style="max-height:${e-100}px"
data-src="${(0,d.sanitizeUrlForLink)(l.request.url)}" />`))),e.response.content&&e.response.content.mimeType&&0===e.response.content.mimeType.indexOf("text/")&&e.response.content.text&&o.push(function(e){const t=e.response.content.text||"",n=t.replace(h,"\n").replace(g,"\t"),r=t.match(m),s=r?r.length:1;return v(`Content (${s} Line${1<s?"s":""})`,()=>`
<button class="copy-tab-data">Copy Content to Clipboard</button>
<pre><code>${(0,d.escapeHtml)(n)}</code></pre>
`,"content rendered-data")}(e)),o.filter(e=>void 0!==e)}},{"../helpers/misc":4,"../helpers/parse":5,"./extract-details-keys":10,"./helpers":14}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.transformPage=n.transformDoc=void 0;const i=e("../helpers/misc"),d=e("../helpers/parse"),u=e("./har-heuristics"),p=e("./har-tabs"),h=e("./helpers");n.transformDoc=function(e,n){const r=void 0!==e.log?e.log:e,t=m(r);return{pages:t.map((e,t)=>s(r,t,n))}};const m=e=>{return e.pages&&0<e.pages.length?e.pages:[{id:"",pageTimings:{},startedDateTime:e.entries.reduce((e,t)=>{var n=Date.parse(t.startedDateTime);return Date.parse(e)<n?e:t.startedDateTime},e.entries[0].startedDateTime),title:"n/a"}]};function s(e,t=0,n){const r=void 0!==e.log?e.log:e,s=m(r),i=s[t];if(!i.startedDateTime)throw new TypeError(`Invalid HAR document: "log.pages[${t}].startedDateTime" is not set`);const o=new Date(i.startedDateTime).getTime();e=i.pageTimings;let a=0;const l=(0,u.documentIsSecure)(r.entries);t=r.entries.filter(e=>0!==e.request.url.indexOf("data:")&&0!==e.request.url.indexOf("javascript:")&&(1===s.length&&""===i.id||e.pageref===i.id)).map((e,t)=>{var n=new Date(e.startedDateTime).getTime()-o;return isNaN(n)?console.warn("Entry has no valid 'startedDateTime' time",e.request.url,e):a=Math.max(a,n+e.time),function(e,t,n,r){n=Math.round(n);var s=Math.round((0,d.toInt)(e._all_end)||n+e.time),i=(0,h.mimeToRequestType)(e.response.content.mimeType),o=(0,u.collectIndicators)(e,t,r,i),r=y(e,o);return(0,h.createWaterfallEntry)(e.request.url,n,s,f(n,e),r,(0,p.makeTabs)(e,t+1,i,n,s,o))}(e,t,n,l)});const c=g(e,i,n);return c.forEach(e=>{e.startTime>a&&(a=e.startTime)}),n.fixedLengthMs&&(a=n.fixedLengthMs),a+=100,{docIsTLS:l,durationMs:a,entries:t,marks:c,title:i.title}}n.transformPage=s;const g=(t,e,n)=>{if(void 0===t)return[];var r=(e,t)=>e.startTime-t.startTime;const s=Object.keys(t).filter(e=>"number"==typeof t[e]&&0<=t[e]).map(e=>({name:`${(0,d.escapeHtml)(e.replace(/^[_]/,""))} (${(0,i.roundNumber)(t[e],0)} ms)`,startTime:t[e]}));return(n.showUserTiming?o(e,n).concat(s):s).sort(r)},o=(s,i)=>{const t=i.showUserTimingEndMarker?e=>0===e.indexOf("_userTime."):e=>0===e.indexOf("_userTime.")&&0!==e.indexOf("_userTime.endTimer-");let e=t;if(Array.isArray(i.showUserTiming)){const n=i.showUserTiming;e=e=>t(e)&&0<=n.indexOf(e.replace(/^_userTime\./,""))}const o=/^_userTime\.((?:startTimer-)?(.+))$/;return Object.keys(s).filter(e).map(e=>{var t,n,r;return[,n,t]=o.exec(e)||[,void 0,void 0],(n=(0,d.escapeHtml)(n))!==(t=(0,d.escapeHtml)(t))&&s[`_userTime.endTimer-${t}`]?{duration:r=s[`_userTime.endTimer-${t}`]-s[e],name:`${i.showUserTimingEndMarker?n:t} (${s[e]} - ${s[e]+r} ms)`,startTime:s[e]}:{name:n,startTime:s[e]}})},f=(o,a)=>{const l=a.timings,c=a._chunks||[];return["blocked","dns","connect","send","wait","receive"].reduce((e,t)=>{var n=v(t,a,e,o);if(n.end&&n.start>=n.end)return e;if("connect"===t&&l.ssl&&-1!==l.ssl){var r=parseInt(`${a._ssl_start}`,10)||n.start,s=parseInt(`${a._ssl_end}`,10)||n.start+l.ssl,i=parseInt(`${a._ssl_start}`,10)?n.start:s;return e.concat([(0,h.createWaterfallEntryTiming)("ssl",Math.round(r),Math.round(s))]).concat([(0,h.createWaterfallEntryTiming)(t,Math.round(i),Math.round(n.end))])}return"receive"===t&&c&&0<c.length?e.concat([(0,h.createWaterfallEntryTiming)(t,Math.round(n.start),Math.round(n.end),c)]):e.concat([(0,h.createWaterfallEntryTiming)(t,Math.round(n.start),Math.round(n.end))])},[])},v=(e,t,n,r)=>{let s;switch(e){case"wait":s="ttfb";break;case"receive":s="download";break;default:s=e}var i=parseInt(`${t[`_${s}_start`]}`,10),o=parseInt(`${t[`_${s}_end`]}`,10),i=isNaN(i)?0<n.length?n[n.length-1].end:r:i,o=isNaN(o)?i+(t.timings[e]??0):o;return{end:Math.round(o),start:Math.round(i)}},y=(e,t)=>{var n=(0,h.mimeToRequestType)(e.response.content.mimeType),r=(0,d.toInt)(e.response.status)||0,s=e._renderBlocking||"",i=e._isLCP||!1;return{icon:(0,h.makeMimeTypeIcon)(r,e.response.statusText,n,e.response.redirectURL),indicators:t,requestType:n,rowClass:(0,h.makeRowCssClasses)(r,s,i),statusCode:r}}},{"../helpers/misc":4,"../helpers/parse":5,"./har-heuristics":11,"./har-tabs":12,"./helpers":14}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.flattenKvTuple=n.makeMimeTypeIcon=n.makeRowCssClasses=n.createWaterfallEntryTiming=n.createWaterfallEntry=n.mimeToRequestType=n.makeDefinitionList=void 0;const s=e("../helpers/misc"),i=e("../helpers/parse"),o=e("../waterfall/row/svg-indicators"),r=e=>(0,i.escapeHtml)(e).replace("<br/>","<br/>");n.makeDefinitionList=function(e,t=!1){return e.map(e=>`
<dt ${(e=>{return t?`class="${(0,s.toCssClass)(e)||"no-colour"}"`:""})(e[0])}>${r(e[0])}</dt>
<dd>${r(e[1])}</dd>
`).join("")},n.mimeToRequestType=function(e){if(void 0===e)return"other";let t=(e=e.split("/"))[1];switch(void 0!==t&&(t=-1<t.indexOf(";")?t.split(";")[0]:t),e[0]){case"image":return"svg+xml"===t?"svg":"image";case"font":return"font";case"video":return"video";case"audio":return"audio"}switch(t){case"xml":case"html":return"html";case"plain":return"plain";case"css":return"css";case"vnd.ms-fontobject":case"font-woff":case"font-woff2":case"x-font-truetype":case"x-font-opentype":case"x-font-woff":return"font";case"javascript":case"x-javascript":case"script":case"json":return"javascript";case"x-shockwave-flash":return"flash";default:return"other"}},n.createWaterfallEntry=function(e,t,n,r=[],s,i){return{end:n,responseDetails:s,segments:r,start:t,tabs:i,total:"number"!=typeof t||"number"!=typeof n?NaN:n-t,url:e}},n.createWaterfallEntryTiming=function(e,t,n,r){return{end:n,start:t,total:"number"!=typeof t||"number"!=typeof n?NaN:n-t,type:(0,i.sanitizeAlphaNumeric)(e),chunks:r}},n.makeRowCssClasses=function(e,t,n){const r=["row-item"];return(0,s.isInStatusCodeRange)(e,500,599)?r.push("status5xx"):(0,s.isInStatusCodeRange)(e,400,499)?r.push("status4xx"):304!==e&&(0,s.isInStatusCodeRange)(e,300,399)?r.push("status3xx"):0!==e&&void 0!==e||r.push("status0"),!0===n&&r.push("largestContentfulPaint"),"potentially_blocking"===t?r.push("potentiallyRenderBlocking"):"blocking"!==t&&"in_body_parser_blocking"!==t||r.push("renderBlocking"),r.join(" ")},n.makeMimeTypeIcon=function(e,t,n,r=""){if(r){r=encodeURI(r.split("?")[0]||"");return(0,o.makeIcon)("err3xx",`${e} response status: Redirect to ${(0,i.escapeHtml)(r)}...`)}return(0,s.isInStatusCodeRange)(e,400,499)?(0,o.makeIcon)("err4xx",`${e} response status: ${(0,i.escapeHtml)(t)}`):(0,s.isInStatusCodeRange)(e,500,599)?(0,o.makeIcon)("err5xx",`${e} response status: ${(0,i.escapeHtml)(t)}`):204===e?(0,o.makeIcon)("plain","No content"):(0,o.makeIcon)((0,i.sanitizeAlphaNumeric)(n),(0,i.escapeHtml)(n))};n.flattenKvTuple=e=>{const t=[];return e.forEach(e=>{void 0!==e&&0!==e.length&&(Array.isArray(e[0])?t.push(...e):t.push(e))}),t}},{"../helpers/misc":4,"../helpers/parse":5,"../waterfall/row/svg-indicators":20}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.timingTypeToCssClass=n.requestTypeToCssClass=void 0,n.requestTypeToCssClass=function(e){return"block-"+e},n.timingTypeToCssClass=function(e){return"block-"+e}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDetailsBody=void 0;const a=e("../../helpers/dom"),l=e("../../helpers/parse");n.createDetailsBody=function(e,r,t){const n=(0,a.makeHtmlEl)(),s=(0,a.makeBodyEl)();var i=t.tabs.map(e=>`<li><button class="tab-button">${e.title}</button></li>`).join("\n"),o=t.tabs.map(e=>{let t="tab";e.tabClass&&(t+=` ${e.tabClass}`);let n="";if(e.content)n=e.content;else{if("function"!=typeof e.renderContent)throw TypeError("Invalid Details Tab");n=e.renderContent(r),e.content=n}return`<div class="tab ${t}">${n}</div>`}).join("\n");return s.innerHTML=`
<div class="wrapper">
<header class="type-${t.responseDetails.requestType}">
<h3><strong>#${e}</strong> <a href="${(0,l.sanitizeUrlForLink)(t.url)}">
${(0,l.escapeHtml)(t.url)}
</a></h3>
<nav class="tab-nav">
<ul>
${i}
</ul>
</nav>
</header>
${o}
</div>
`,n.appendChild(s),n}},{"../../helpers/dom":1,"../../helpers/parse":5}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OverlayManager=void 0;const p=e("../../helpers/dom"),h=e("../../helpers/misc"),m=e("./svg-details-overlay");class g{constructor(e){this.context=e,this.openOverlays=[],this.realignRow=(e,t)=>{e.setAttribute("transform",`translate(0, ${t})`)}}getCombinedOverlayHeight(){return this.openOverlays.reduce((e,t)=>e+(t.height||0),0)}openOverlay(t,e,n,r,s){if(!this.openOverlays.some(e=>e.index===t)){const i=this;this.openOverlays.push({defaultY:e,entry:r,index:t,onClose:()=>{i.closeOverlay(t,n,s)},openTabIndex:0}),this.openOverlays=this.openOverlays.sort((e,t)=>e.index>t.index?1:-1),this.renderOverlays(n,s),this.context.pubSub.publishToOverlayChanges({changedIndex:t,combinedOverlayHeight:i.getCombinedOverlayHeight(),type:"open"})}}toggleOverlay(t,e,n,r,s){this.openOverlays.some(e=>e.index===t)?this.closeOverlay(t,n,s):this.openOverlay(t,e,n,r,s)}closeOverlay(r,e,t){this.openOverlays.splice(this.openOverlays.reduce((e,t,n)=>t.index===r?n:e,-1),1),this.renderOverlays(e,t),this.context.pubSub.publishToOverlayChanges({changedIndex:r,combinedOverlayHeight:this.getCombinedOverlayHeight(),type:"closed"})}renderOverlays(c,e){let d=0;const u=(e,t,n)=>{d+=n,e.actualY=t,e.height=n};e.forEach((e,t)=>{const n=(0,h.find)(this.openOverlays,e=>e.index===t),r=e.nextElementSibling,s=r.firstElementChild;if(this.realignRow(e,d),void 0!==n){if(s&&void 0!==n.actualY){const i=s.querySelector(".info-overlay-bg"),o=s.querySelector("foreignObject"),a=s.querySelector(".info-overlay-close-btn rect"),l=s.querySelector(".info-overlay-close-btn text");return u(n,n.defaultY+d,n.height),i.setAttribute("y",n.actualY.toString()),o.setAttribute("y",n.actualY.toString()),l.setAttribute("y",n.actualY.toString()),void a.setAttribute("y",n.actualY.toString())}((e,t)=>{var n=t.defaultY+d;const r=(0,m.createRowInfoOverlay)(t,n,c),s=r.querySelector("img.preview");s&&!s.src&&s.setAttribute("src",(s.attributes.getNamedItem("data-src")||{value:""}).value),r.querySelector("a").addEventListener("keydown",g.firstElKeypress),(0,p.getLastItemOfNodeList)(r.querySelectorAll("button")).addEventListener("keydown",g.lastElKeypress),e.appendChild(r),u(t,n,r.getBoundingClientRect().height)})(e.nextElementSibling,n)}else s&&null!==r&&(r.querySelector("a").removeEventListener("keydown",g.firstElKeypress),(0,p.getLastItemOfNodeList)(r.querySelectorAll("button")).removeEventListener("keydown",g.lastElKeypress),(0,p.removeChildren)(r))})}}(n.OverlayManager=g).showFullName=e=>{e.getElementsByClassName("row-fixed").item(0)?.dispatchEvent(new MouseEvent("mouseenter"))},g.firstElKeypress=e=>{!(0,h.isTabUp)(e)||(e=(0,p.getParentByClassName)(e.target,"row-overlay-holder"))&&e.previousElementSibling&&g.showFullName(e.previousElementSibling)},g.lastElKeypress=e=>{!(0,h.isTabDown)(e)||(e=(0,p.getParentByClassName)(e.target,"row-overlay-holder"))&&e.nextElementSibling&&g.showFullName(e.nextElementSibling)},n.default=g},{"../../helpers/dom":1,"../../helpers/misc":4,"./svg-details-overlay":19}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PubSub=void 0;class r{constructor(){this.subscribers=[]}subscribeToOverlayChanges(e){this.subscribers.push(e)}subscribeToSpecificOverlayChanges(t,n){this.subscribers.push(e=>{e.changedIndex===t&&n(e)})}publishToOverlayChanges(t){this.subscribers.forEach(e=>e(t))}}n.PubSub=r,n.default=r},{}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createRowInfoOverlay=void 0;const d=e("../../helpers/dom"),u=e("../../helpers/svg"),p=e("./html-details-body");const h=e=>{const t=e.target;if("button"===t.tagName.toLowerCase()&&t.classList.contains("copy-tab-data")){const n=document.createElement("textarea");n.value=t.nextElementSibling?t.nextElementSibling.innerText:"",document.body.appendChild(n),n.select(),n.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(n)}};n.createRowInfoOverlay=function(e,t,n){var r=e.index+1;const s=function(e,t){const n=u.newG("info-overlay-holder");return e=u.newRect({height:t,rx:2,ry:2,width:"100%",x:"0",y:e},"info-overlay-bg"),n.appendChild(e),n}(t,n),i=u.newForeignObject({height:n,width:"100%",x:"0",y:t}),o=(0,p.createDetailsBody)(r,n,e.entry),a=function(e){const t=u.newA("info-overlay-close-btn");return t.appendChild(u.newRect({height:23,width:23,x:"100%",y:e})),t.appendChild(u.newTextEl("✕",{dx:7,dy:16,x:"100%",y:e})),t.appendChild(u.newTitle("Close Overlay")),t}(t);a.addEventListener("click",()=>{e.onClose(e.index),o.removeEventListener("click",h)}),o.addEventListener("click",h);const l=()=>o.getElementsByClassName("tab-button"),c=n=>{e.openTabIndex=n,(0,d.forEachNodeList)(o.getElementsByClassName("tab"),(e,t)=>{e.style.display=n===t?"block":"none",l().item(t).classList.toggle("active",n===t)})};return(0,d.forEachNodeList)(l(),(e,t)=>{e.addEventListener("click",()=>c(t))}),c(e.openTabIndex),i.appendChild(o),s.appendChild(i),s.appendChild(a),s}},{"../../helpers/dom":1,"../../helpers/svg":6,"./html-details-body":16}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getIndicatorIcons=n.makeIcon=void 0;const a=e("../../helpers/misc");function l(e,t){return{type:e,title:t,width:20}}n.makeIcon=l,n.getIndicatorIcons=function(e){const t=e.responseDetails.indicators.filter(e=>"icon"===e.displayType);if(0===t.length)return[];const n=[];let r="";const s=t.filter(e=>"error"===e.type),i=t.filter(e=>"warning"===e.type),o=t.filter(e=>"error"!==e.type&&"warning"!==e.type);return 0<s.length&&(n.push((0,a.pluralize)("Error",s.length)+":\n "+s.map(e=>e.title).join("\n")),r="error"),0<i.length&&(n.push((0,a.pluralize)("Warning",i.length)+":\n"+i.map(e=>e.title).join("\n")),r=r||"warning"),0<o.length&&(n.push(`Info:\n${o.map(e=>e.title).join("\n")}`),r=r||1!==o.length?r||"info":o[0].icon||o[0].type),[l(r,n.join("\n"))]}},{"../../helpers/misc":4}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createRowBg=n.createNameRowBg=n.createBgStripe=n.appendRequestLabels=n.createRequestLabelFull=n.createRequestLabelClipped=n.createRequestNumberLabel=n.createRect=void 0;const o=e("../../helpers/dom"),c=e("../../helpers/misc"),d=e("../../helpers/svg"),u=e("../../transformers/styling-converters"),a=e("./svg-tooltip");function p(n,e){const t=d.newG("");var r=n.height-1,s=c.roundNumber(n.x/n.unit)+"%";const i=d.newRect({height:r,width:c.roundNumber(n.width/n.unit)+"%",x:s,y:n.y},e);if(t.appendChild(i),n.label){let e,t;i.addEventListener("mouseenter",()=>{t=t||(0,o.getParentByClassName)(i,"water-fall-chart").querySelector(".tooltip"),e=setTimeout(()=>{(e=null,a.onHoverInShowTooltip)(i,n,t)},100)}),i.addEventListener("mouseleave",()=>{e?clearTimeout(e):(0,a.onHoverOutShowTooltip)(i)})}return n.showOverlay&&n.hideOverlay&&(i.addEventListener("mouseenter",n.showOverlay(n)),i.addEventListener("mouseleave",n.hideOverlay(n))),t}function i(e,t,n,r){var s=c.resourceUrlFormatter(n,125);t=t+Math.round(r/2)+5;const i=d.newTextEl(s,{x:e,y:t});return i.appendChild(d.newTitle(n)),i.style.opacity=n.match(/js.map$/)?"0.5":"1",i}n.createRect=function(o,e){const t=e.segments;var n=p(o,`time-block ${o.cssClass}`);const a=d.newG("rect-holder");let l=o.x;return a.appendChild(n),t&&0<t.length&&(t.forEach(e=>{if(!isNaN(e.total)&&0<e.total&&"number"==typeof e.start){const s=(t=e,n=o,r=isNaN(t.total)?"":`<br/>total: ${Math.round(t.total)}ms`,{cssClass:(0,u.timingTypeToCssClass)(t.type),height:n.height-6,hideOverlay:n.hideOverlay,label:`<strong>${t.type}</strong><br/>`+`${Math.round(t.start)}ms - ${Math.round(t.end)}ms${r}`,showOverlay:n.showOverlay,unit:n.unit,width:t.total,x:t.start||.001,y:n.y}),i=p(s,`segment ${s.cssClass}`);l=Math.min(l,s.x),"receive"===e.type&&e.chunks&&0<e.chunks.length&&e.chunks.forEach(e=>{e=function(e,t,n){const r=d.newG("");var s=t.height-1,e=c.roundNumber(e.ts/t.unit)+"%",n=d.newRect({height:s,width:"1px",x:e,y:t.y},n,{pointerEvents:"none"});return r.appendChild(n),r}(e,s,`${s.cssClass}-chunk`);i.appendChild(e)}),a.appendChild(i)}var t,n,r}),c.find(e.responseDetails.indicators,e=>"push"===e.id)&&a.appendChild(function(e){var t=e.y+e.height/1.5,e=`${c.roundNumber(e.x/e.unit)}%`;const n=d.newG("http2-inidicator-holder");return n.appendChild(d.newTextEl("→",{transform:"translate(-5)",x:e,y:t},{fillOpacity:"0.6","text-anchor":"end"})),n.appendChild(d.newTitle("http2 Push")),n}(o)),a.appendChild(function(e,t,n){var r=e.y+e.height/1.5,s=`${Math.round(t)} ms`,t=(e.x+e.width)/e.unit+1;let i=d.newTextEl(s,{x:`${c.roundNumber(t)}%`,y:r});return 100<t+8*s.length/500*100&&(t=n/e.unit-1,i=d.newTextEl(s,{x:`${c.roundNumber(t)}%`,y:r},{textAnchor:"end"})),i}(o,e.total,l))),a},n.createRequestNumberLabel=function(e,t,n,r,s){return t+=Math.round(r/2)+5,e+=s,d.newTextEl(n,{x:e,y:t},{"text-anchor":"end"})},n.createRequestLabelClipped=function(e,t,n,r){const s=i(e,t,n,r);return s.style.clipPath="url(#titleClipPath)",s},n.createRequestLabelFull=function(e,t,n,r){n=i(e,t,n,r);const s=d.newG("full-label",{},{clipPath:"url(#titleFullClipPath)"});return s.appendChild(d.newRect({height:r-4,rx:5,ry:5,width:500,x:e-3,y:t+3},"label-full-bg")),s.appendChild(n),s};const l="function"==typeof window.requestAnimationFrame&&"function"==typeof window.cancelAnimationFrame;n.appendRequestLabels=function(e,t,n,r){const s=r.getElementsByTagName("rect")[0],i=r.getElementsByTagName("text")[0];r.style.display="none",r.style.visibility="hidden",e.appendChild(t),e.appendChild(n),e.appendChild(r);let o=!1,a;e.addEventListener("mouseenter",()=>{r.style.display="block",n.style.display="none",r.style.visibility="visible";var e=()=>{const e=i.getComputedTextLength()+10;s.setAttribute("width",e.toString()),o=!0,a=void 0};o||(l?a=window.requestAnimationFrame(e):e())}),e.addEventListener("mouseleave",()=>{n.style.display="block",r.style.display="none",r.style.visibility="hidden",l&&void 0!==a&&cancelAnimationFrame(a)})},n.createBgStripe=function(e,t,n){return n=n?"even":"odd",d.newRect({height:t,width:"100%",x:0,y:e},n)},n.createNameRowBg=function(e,t){const n=d.newG("row row-fixed");return n.appendChild(d.newRect({height:t,width:"100%",x:"0",y:e},"",{opacity:0})),n},n.createRowBg=function(e,t){const n=d.newG("row row-flex");return n.appendChild(d.newRect({height:t,width:"100%",x:"0",y:e},"",{opacity:0})),n}},{"../../helpers/dom":1,"../../helpers/misc":4,"../../helpers/svg":6,"../../transformers/styling-converters":15,"./svg-tooltip":23}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createRow=void 0;const b=e("../../helpers/icons"),w=e("../../helpers/misc"),C=e("../../helpers/svg"),x=e("./svg-indicators"),T=e("./svg-row-subcomponents"),q=C.newClipPath("titleClipPath");q.appendChild(C.newRect({height:"100%",width:"100%"}));const S=C.newClipPath("titleFullClipPath");S.appendChild(C.newRect({height:"100%",width:"100%"}));n.createRow=function(e,n,t,r,s,i,o){const a=s.y;var l=s.height,c=e.options.leftColumnWidth;const d=C.newA(i.responseDetails.rowClass||"");d.setAttribute("tabindex","0"),d.setAttribute("xlink:href","javascript:void(0)");const u=C.newSvg("left-fixed-holder",{width:`${c}%`,x:"0"}),p=C.newSvg("flex-scale-waterfall",{width:`${100-c}%`,x:`${c}%`});var h=T.createRect(s,i);const m=T.createNameRowBg(a,l),g=T.createRowBg(a,l);c=T.createBgStripe(a,l,n%2==0);let f=3+t;e.options.showMimeTypeIcon&&(s=i.responseDetails.icon,f-=s.width,m.appendChild(b[s.type](f,a+3,s.title))),e.options.showIndicatorIcons&&(0,x.getIndicatorIcons)(i).forEach(e=>{f-=e.width,m.appendChild(b[e.type](f,a+3,e.title))}),f=3+t,t=`${n+1}`,t=T.createRequestNumberLabel(f,a,t,l,r),f+=r+4,r=T.createRequestLabelClipped(f,a,(0,w.resourceUrlFormatter)(i.url,40),l),l=T.createRequestLabelFull(f,a,i.url,l),g.appendChild(h),T.appendRequestLabels(m,t,r,l),e.pubSub.subscribeToSpecificOverlayChanges(n,e=>{v="open"===e.type}),0<n&&e.pubSub.subscribeToSpecificOverlayChanges(n-1,e=>{y="open"===e.type});let v,y;return d.addEventListener("click",e=>{e.preventDefault(),o(e)}),d.addEventListener("keydown",e=>{const t=e;if(32===t.which||13===t.which)return t.preventDefault(),o(t);(0,w.isTabUp)(t)&&!y&&0<n?d.previousSibling&&d.previousSibling.previousSibling&&d.previousSibling.previousSibling.lastChild&&d.previousSibling.previousSibling.lastChild.lastChild&&d.previousSibling.previousSibling.lastChild.lastChild.dispatchEvent(new MouseEvent("mouseenter")):(0,w.isTabDown)(t)&&!v&&d.nextSibling&&d.nextSibling.nextSibling&&d.nextSibling.nextSibling.lastChild&&d.nextSibling.nextSibling.lastChild.lastChild&&d.nextSibling.nextSibling.lastChild.lastChild.dispatchEvent(new MouseEvent("mouseenter"))}),d.addEventListener("focusout",()=>{m.dispatchEvent(new MouseEvent("mouseleave"))}),p.appendChild(g),u.appendChild(q.cloneNode(!0)),u.appendChild(m),d.appendChild(S.cloneNode(!0)),d.appendChild(c),d.appendChild(p),d.appendChild(u),d}},{"../../helpers/icons":3,"../../helpers/misc":4,"../../helpers/svg":6,"./svg-indicators":20,"./svg-row-subcomponents":21}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.makeTooltip=n.onHoverOutShowTooltip=n.onHoverInShowTooltip=void 0;const p=e("../../helpers/dom"),s=e("../../helpers/svg"),h=/(?:translate)\(.+[, ]+(.+)\)/;n.onHoverInShowTooltip=(e,t,n)=>{const r=n.querySelector(".tooltip-payload"),s=(0,p.getParentByClassName)(e,"row-item");var i=((e="")=>{e=null===e?"":e;e=h.exec(e);return e&&2<=e.length?parseInt(e[1],10):0})(s.getAttribute("transform")),o=parseInt(e.getAttribute("y")||"",10),a=e.getAttribute("x")||"",l=parseFloat(a);let c=50;var d=e.width.baseVal.value||e.getBoundingClientRect().width,e=d/(t.width/t.unit),d=t.width/t.unit/d,e=50<l&&(95-l)*e<200;r.innerHTML=t.label||"",(0,p.addClass)(r,"no-anim"),n.style.display="block",r.style.opacity="0.01";const u=r.clientHeight+5;c=0<o+i-u?i-u:i+t.height+10,e?(l=l-(r.clientWidth+5)*d,d=parseInt(n.querySelector("body").style.left||"",10),d*=1/(.01*(100-d)),r.style.left=-d<l?`${l}%`:`${-d}%`):r.style.left=a,n.setAttribute("y",`${o+c}`),n.setAttribute("height",u.toString()),(0,p.removeClass)(r,"no-anim"),r.style.opacity="1";a=r.clientHeight+5-u;0!=a&&(n.setAttribute("height",(u+a).toString()),n.setAttribute("y",`${o+c-a}`))};n.onHoverOutShowTooltip=e=>{const t=(0,p.getParentByClassName)(e,"water-fall-chart"),n=t.querySelector(".tooltip"),r=n.querySelector(".tooltip-payload");n.style.display="none",n.setAttribute("height","250"),r.style.opacity="0"};n.makeTooltip=e=>{e=e.leftColumnWidth;const t=s.newSvg("tooltip-holder",{width:"100%",x:"0",y:"0"}),n=s.newForeignObject({width:"100%",x:"0",y:`${e}%`},"tooltip",{display:"none"}),r=(0,p.makeHtmlEl)();e=(0,p.makeBodyEl)({left:`${e}%`,width:`${100-e}%`},'<div class="tooltip-payload" style="max-width: 200px; opacity: 0;"></div>');return r.appendChild(e),n.appendChild(r),t.appendChild(n),t}},{"../../helpers/dom":1,"../../helpers/svg":6}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.makeHoverEvtListeners=n.createAlignmentLines=void 0;const r=e("../../helpers/dom"),s=e("../../helpers/svg");n.createAlignmentLines=function(e){return{endline:s.newLine({x1:"0",x2:"0",y1:"0",y2:e},"line-end"),startline:s.newLine({x1:"0",x2:"0",y1:"0",y2:e},"line-start")}},n.makeHoverEvtListeners=function(n){return{onMouseEnterPartial(){return e=>{var t=e.target;(0,r.addClass)(t,"active");e=t.x.baseVal.valueInSpecifiedUnits+t.width.baseVal.valueInSpecifiedUnits+"%",t=t.x.baseVal.valueInSpecifiedUnits+"%";n.endline.x1.baseVal.valueAsString=e,n.endline.x2.baseVal.valueAsString=e,n.startline.x1.baseVal.valueAsString=t,n.startline.x2.baseVal.valueAsString=t,(0,r.addClass)(n.endline,"active"),(0,r.addClass)(n.startline,"active")}},onMouseLeavePartial(){return e=>{e=e.target;(0,r.removeClass)(e,"active"),(0,r.removeClass)(n.endline,"active"),(0,r.removeClass)(n.startline,"active")}}}}},{"../../helpers/dom":1,"../../helpers/svg":6}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createTimeScale=void 0;const p=e("../../helpers/misc"),h=e("../../helpers/svg");n.createTimeScale=function(t,e){var n=h.newG("time-scale full-width"),r=e<2e4?200*Math.ceil(e/1e4):1e3,s=Number(1000n/BigInt(r)),i=e/1e3,o=Math.floor(e/r);for(let e=0;e<=o;e++){var a=e%s==0;((e,t,n,r,s)=>{const i=e.diagramHeight;var o=100/n;let a,l="sub-second-line",c;if(s){n=n-.2<r;l="second-line",c=(0,p.roundNumber)(o*r)+.5+"%";const u={};n&&(c=(0,p.roundNumber)(o*r)-.5+"%",u["text-anchor"]="end"),a=h.newTextEl(r+"s",{x:c,y:i},u)}c=(0,p.roundNumber)(o*r)+"%";const d=h.newLine({x1:c,x2:c,y1:0,y2:i},l);e.pubSub.subscribeToOverlayChanges(e=>{var t=e.combinedOverlayHeight,e=(i+t)/i;d.setAttribute("transform",`scale(1, ${e})`),s&&a.setAttribute("transform",`translate(0, ${t})`)}),t.appendChild(d),s&&t.appendChild(a)})(t,n,i,e/s,a)}return n}},{"../../helpers/misc":4,"../../helpers/svg":6}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createLineRect=n.createMarks=void 0;const y=e("../../helpers/dom"),b=e("../../helpers/misc"),w=e("../../helpers/svg");function C(e,t){const n=w.newG(`line-mark-holder line-marker-${(0,b.toCssClass)(t.name)}`);return n.appendChild(w.newTitle(t.name.replace(/^startTimer-/,""))),n.appendChild(w.newRect({height:e.diagramHeight,width:(t.duration||1)/e.unit+"%",x:(t.startTime||.001)/e.unit+"%",y:0},"line-mark")),n}n.createMarks=function(m,g){const f=m.diagramHeight,v=w.newG("marker-holder",{transform:"scale(1, 1)"});return g.forEach((e,t)=>{var n=(0,b.roundNumber)(e.startTime/m.unit);const r=w.newG("mark-holder type-"+e.name.toLowerCase().replace(/([0-9]+[ ]?ms)|\W/g,"")),s=w.newG("line-holder"),i=w.newG("line-label-holder"),o=w.newTextEl(e.name,{x:`${n}%`,y:f+25});o.setAttribute("writing-mode","tb");let a;e.x=n;const l=w.newLine({x1:n+"%",x2:n+"%",y1:0,y2:f});var c=g[t-1],d=g[t+1],t=void 0!==c?.x&&e.x-c.x<2.5,d=(0,b.roundNumber)((d?.startTime||0)/m.unit);d&&d-e.x<2.5&&100<=d+2.5&&!t?(o.setAttribute("x",`${d-2.5}%`),e.x=d-2.5):void 0!==c?.x&&t&&(o.setAttribute("x",`${c.x+2.5}%`),e.x=c.x+2.5);const u=w.newLine({x1:n+"%",x2:e.x+"%",y1:f,y2:f+23});s.appendChild(l),s.appendChild(u),e.duration&&(a=C(m,e),s.appendChild(a)),m.pubSub.subscribeToOverlayChanges(e=>{var t=e.combinedOverlayHeight,e=(f+t)/f;l.setAttribute("transform",`scale(1, ${e})`),i.setAttribute("transform",`translate(0, ${t})`),u.setAttribute("transform",`translate(0, ${t})`),a&&a.setAttribute("transform",`translate(0, ${t})`)});let p=!1,h=!1;o.addEventListener("mouseenter",()=>{p||(r.parentNode.appendChild(r),p=!0,"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame(()=>(0,y.addClass)(s,"active")):(0,y.addClass)(s,"active"))}),o.addEventListener("mouseleave",()=>{p=!1,h||(0,y.removeClass)(s,"active")}),o.addEventListener("click",()=>{h?(p=!1,y.removeClass)(s,"active"):p?p=!1:(0,y.addClass)(s,"active"),h=!h}),i.appendChild(o),r.appendChild(w.newTitle(e.name)),r.appendChild(s),r.appendChild(i),v.appendChild(r)}),v},n.createLineRect=C},{"../../helpers/dom":1,"../../helpers/misc":4,"../../helpers/svg":6}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createWaterfallSvg=void 0;const y=e("../helpers/svg"),b=e("../transformers/styling-converters"),w=e("./details-overlay/overlay-manager"),C=e("./details-overlay/pub-sub"),x=e("./row/svg-row"),T=e("./row/svg-tooltip"),q=e("./sub-components/svg-alignment-helper"),S=e("./sub-components/svg-general-components"),E=e("./sub-components/svg-marks");n.createWaterfallSvg=function(e,i){const t=e.entries.filter(e=>"number"==typeof e.start&&"number"==typeof e.total).sort((e,t)=>(e.start||0)-(t.start||0));var n,r,s=y.newG("overlays");const o=y.newG("rows-holder"),a=(r=e,n=t,r=r.durationMs/100,{...r={diagramHeight:(n.length+1)*i.rowHeight,options:i,pubSub:new C.PubSub,unit:r},overlayManager:new w.default(r)}),l=(n=e.marks,r=a.diagramHeight,n=n.reduce((e,t)=>{return Math.max(e,y.getNodeTextWidth(y.newTextEl(t.name,{x:0,y:0}),!0))},0),Math.floor(r+n+35)),c=y.newSvg("water-fall-chart",{height:l}),d=y.newSvg("scale-and-marks-holder",{width:`${100-i.leftColumnWidth}%`,x:`${i.leftColumnWidth}%`});let u,p;i.showAlignmentHelpers&&(u=y.newG("hover-overlays"),h=q.createAlignmentLines(a.diagramHeight),u.appendChild(h.startline),u.appendChild(h.endline),p=q.makeHoverEvtListeners(h)),d.appendChild(S.createTimeScale(a,e.durationMs)),d.appendChild(E.createMarks(a,e.marks));var h=t[0].responseDetails.icon.width;let m=0;i.showMimeTypeIcon&&(m+=1),i.showIndicatorIcons&&(e=t.map(e=>0<e.responseDetails.indicators.filter(e=>"icon"===e.displayType).length?1:0),m+=Math.max.apply(null,e));const g=m*h;h=function(e){var t=Math.floor(Math.log(e)/Math.LN10)+1;let n="";for(let e=0;e<t;e++)n+="0";return n}(t.length);const f=y.getNodeTextWidth(y.newTextEl(`${h}`),!0),v=[];return a.pubSub.subscribeToOverlayChanges(()=>{var e=l+a.overlayManager.getCombinedOverlayHeight();c.classList.toggle("closing",e<c.clientHeight),c.style.height=`${e}px`}),t.forEach(function(e,t){var n=e.total||1;const r=i.rowHeight*t;var s=e.start||.001;s={cssClass:(0,b.requestTypeToCssClass)(e.responseDetails.requestType),height:i.rowHeight,hideOverlay:i.showAlignmentHelpers?p.onMouseLeavePartial:void 0,label:`<strong>${e.url}</strong><br/>`+`${Math.round(e.start)}ms - ${Math.round(e.end)}ms<br/>`+`total: ${isNaN(e.total)?"n/a ":Math.round(e.total)}ms`,showOverlay:i.showAlignmentHelpers?p.onMouseEnterPartial:void 0,unit:a.unit,width:n,x:s,y:r},s=x.createRow(a,t,g,f,s,e,()=>{a.overlayManager.toggleOverlay(t,r+i.rowHeight,450,e,v)}),v.push(s),o.appendChild(s),o.appendChild(y.newG("row-overlay-holder"))}),i.showAlignmentHelpers&&void 0!==u&&d.appendChild(u),c.appendChild(d),c.appendChild(o),c.appendChild(s),c.appendChild((0,T.makeTooltip)(i)),c}},{"../helpers/svg":6,"../transformers/styling-converters":15,"./details-overlay/overlay-manager":17,"./details-overlay/pub-sub":18,"./row/svg-row":22,"./row/svg-tooltip":23,"./sub-components/svg-alignment-helper":24,"./sub-components/svg-general-components":25,"./sub-components/svg-marks":26}]},{},[8])(8)});