diff --git a/apps/trace/app.js b/apps/trace/app.js index 946f4025..bd2ef892 100644 --- a/apps/trace/app.js +++ b/apps/trace/app.js @@ -1,6 +1,6 @@ async function main() { let speedscope_js = await utf8Decode( - getFile('speedscope/speedscope-432XE7GS.js') + getFile('speedscope/speedscope-Y2522XSH.js') ); speedscope_js = speedscope_js.replace(/alert\(`Cannot load.*?return/, ''); app.setDocument(` diff --git a/apps/trace/speedscope/LICENSE b/apps/trace/speedscope/LICENSE deleted file mode 100644 index baf3e9d9..00000000 --- a/apps/trace/speedscope/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Jamie Wong - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/apps/trace/speedscope/README b/apps/trace/speedscope/README deleted file mode 100644 index 4d897271..00000000 --- a/apps/trace/speedscope/README +++ /dev/null @@ -1,2 +0,0 @@ -This is a self-contained release of https://github.com/jlfwong/speedscope. -To use it, open index.html in Chrome or Firefox. diff --git a/apps/trace/speedscope/favicon-16x16-V2DMIAZS.js.map b/apps/trace/speedscope/favicon-16x16-V2DMIAZS.js.map new file mode 100644 index 00000000..98652118 --- /dev/null +++ b/apps/trace/speedscope/favicon-16x16-V2DMIAZS.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": [], + "sourcesContent": [], + "mappings": "", + "names": [] +} diff --git a/apps/trace/speedscope/favicon-32x32-THY3JDJL.js.map b/apps/trace/speedscope/favicon-32x32-THY3JDJL.js.map new file mode 100644 index 00000000..98652118 --- /dev/null +++ b/apps/trace/speedscope/favicon-32x32-THY3JDJL.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": [], + "sourcesContent": [], + "mappings": "", + "names": [] +} diff --git a/apps/trace/speedscope/favicon-M34RF7BI.js.map b/apps/trace/speedscope/favicon-M34RF7BI.js.map new file mode 100644 index 00000000..98652118 --- /dev/null +++ b/apps/trace/speedscope/favicon-M34RF7BI.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": [], + "sourcesContent": [], + "mappings": "", + "names": [] +} diff --git a/apps/trace/speedscope/file-format-schema.json b/apps/trace/speedscope/file-format-schema.json index 33209916..1888f1bd 100644 --- a/apps/trace/speedscope/file-format-schema.json +++ b/apps/trace/speedscope/file-format-schema.json @@ -12,9 +12,7 @@ "type": "number" }, "type": { - "enum": [ - "C" - ], + "const": "C", "title": "type", "type": "string" } @@ -29,8 +27,8 @@ }, "FileFormat.EventType": { "enum": [ - "C", - "O" + "O", + "C" ], "title": "FileFormat.EventType", "type": "string" @@ -64,9 +62,7 @@ "type": "number" }, "type": { - "enum": [ - "evented" - ], + "const": "evented", "title": "type", "type": "string" }, @@ -89,9 +85,7 @@ "FileFormat.File": { "properties": { "$schema": { - "enum": [ - "https://www.speedscope.app/file-format-schema.json" - ], + "const": "https://www.speedscope.app/file-format-schema.json", "title": "$schema", "type": "string" }, @@ -109,14 +103,7 @@ }, "profiles": { "items": { - "anyOf": [ - { - "$ref": "#/definitions/FileFormat.EventedProfile" - }, - { - "$ref": "#/definitions/FileFormat.SampledProfile" - } - ] + "$ref": "#/definitions/FileFormat.Profile" }, "title": "profiles", "type": "array" @@ -192,7 +179,8 @@ { "$ref": "#/definitions/FileFormat.SampledProfile" } - ] + ], + "title": "FileFormat.Profile" }, "FileFormat.ProfileType": { "enum": [ @@ -227,9 +215,7 @@ "type": "number" }, "type": { - "enum": [ - "sampled" - ], + "const": "sampled", "title": "type", "type": "string" }, @@ -298,9 +284,7 @@ "type": "number" }, "type": { - "enum": [ - "O" - ], + "const": "O", "title": "type", "type": "string" } diff --git a/apps/trace/speedscope/index.html b/apps/trace/speedscope/index.html index 6ef4b820..efd40c2e 100644 --- a/apps/trace/speedscope/index.html +++ b/apps/trace/speedscope/index.html @@ -11,7 +11,7 @@ - + diff --git a/apps/trace/speedscope/jfrview_bg-BLJXNNQB.wasm b/apps/trace/speedscope/jfrview_bg-BLJXNNQB.wasm new file mode 100644 index 00000000..38020784 Binary files /dev/null and b/apps/trace/speedscope/jfrview_bg-BLJXNNQB.wasm differ diff --git a/apps/trace/speedscope/release.txt b/apps/trace/speedscope/release.txt index 582bc96e..5cb3db8f 100644 --- a/apps/trace/speedscope/release.txt +++ b/apps/trace/speedscope/release.txt @@ -1,3 +1,3 @@ -speedscope@1.24.0 -Mon Oct 20 18:11:29 PDT 2025 -fc76932551754a442cd5c4f0afdba28032d14d8a +speedscope@1.25.0 +Wed Dec 3 07:18:39 PM EST 2025 +810efdf0a4868bb28f1300f4daacd0db6b8a95bd diff --git a/apps/trace/speedscope/speedscope-432XE7GS.js b/apps/trace/speedscope/speedscope-432XE7GS.js deleted file mode 100644 index 08c852bd..00000000 --- a/apps/trace/speedscope/speedscope-432XE7GS.js +++ /dev/null @@ -1,189 +0,0 @@ -"use strict";(()=>{var lf=Object.create;var Xo=Object.defineProperty;var Af=Object.getOwnPropertyDescriptor;var sf=Object.getOwnPropertyNames;var cf=Object.getPrototypeOf,_f=Object.prototype.hasOwnProperty;var le=(t,e)=>()=>(t&&(e=t(t=0)),e);var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),NA=(t,e)=>{for(var n in e)Xo(t,n,{get:e[n],enumerable:!0})},hf=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of sf(e))!_f.call(t,r)&&r!==n&&Xo(t,r,{get:()=>e[r],enumerable:!(a=Af(e,r))||a.enumerable});return t};var _e=(t,e,n)=>(n=t!=null?lf(cf(t)):{},hf(e||!t||!t.__esModule?Xo(n,"default",{value:t,enumerable:!0}):n,t));function ne(t){return t[t.length-1]||null}function Ne(t,e){function n(a,r){let o=e(a),i=e(r);return oi?1:0}t.sort(n)}function ke(t,e,n){return t.has(e)||t.set(e,n(e)),t.get(e)}function ca(t,e,n){return t.has(e)?t.get(e):n(e)}function Ze(t,e){if(!t.has(e))throw new Error(`Expected key ${e}`);return t.get(e)}function*PA(t,e){for(let n of t)yield e(n)}function OA(t,e){for(let n of t)e(n)}function an(t,e){return new Array(Math.max(e-t.length,0)+1).join("0")+t}function bt(t){let e=`${t.toFixed(0)}%`;return t===100?e="100%":t>99?e=">99%":t<.01?e="<0.01%":t<1?e=`${t.toFixed(2)}%`:t<10&&(e=`${t.toFixed(1)}%`),e}function mf(t){return t-Math.floor(t)}function _a(t){return 2*Math.abs(mf(t)-.5)-1}function GA(t,e,n,a,r=1){for(console.assert(!isNaN(r)&&!isNaN(a));;){if(e-t<=r)return[t,e];let o=(e+t)/2;n(o){let a;return e==null?(a=t(n),e={args:n,result:a},a):(Ir(e.args,n)||(e.args=n,e.result=t(n)),e.result)}}function Un(t){let e=null;return n=>{let a;return e==null?(a=t(n),e={args:n,result:a},a):(e.args===n||(e.args=n,e.result=t(n)),e.result)}}function If(t){let e=null;return()=>(e==null&&(e={result:t()}),e.result)}function VA(t){let e=yf();if(t.length%4!==0)throw new Error(`Invalid length for base64 encoded string. Expected length % 4 = 0, got length = ${t.length}`);let n=t.length/4,a;t.length>=4&&t.charAt(t.length-1)==="="?t.charAt(t.length-2)==="="?a=n*3-2:a=n*3-1:a=n*3;let r=new Uint8Array(a),o=0;for(let i=0;i>4,A!=="="&&(r[o++]=(_&15)<<4|f>>2),c!=="="&&(r[o++]=(f&7)<<6|m)}if(o!==a)throw new Error(`Expected to decode ${a} bytes, but only decoded ${o})`);return r}var wt,yf,W=le(()=>{"use strict";wt=class{constructor(){this.map=new Map}getOrInsert(e){let n=e.key,a=this.map.get(n);return a||(this.map.set(n,e),e)}forEach(e){this.map.forEach(e)}[Symbol.iterator](){return this.map.values()}};yf=If(()=>{let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Map;for(let n=0;n{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.default=Xf;var Wf=vn(),qf=$f(Wf);function $f(t){return t&&t.__esModule?t:{default:t}}var Zf=["-webkit-","-moz-",""];function Xf(t,e){if(typeof e=="string"&&!(0,qf.default)(e)&&e.indexOf("calc(")>-1)return Zf.map(function(n){return e.replace(/calc\(/g,n+"calc(")})}Ss.exports=Na.default});var Ds=S((ka,ks)=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.default=ap;var ep=vn(),tp=np(ep);function np(t){return t&&t.__esModule?t:{default:t}}var rp=["-webkit-",""];function ap(t,e){if(typeof e=="string"&&!(0,tp.default)(e)&&e.indexOf("cross-fade(")>-1)return rp.map(function(n){return e.replace(/cross-fade\(/g,n+"cross-fade(")})}ks.exports=ka.default});var Fs=S((Da,Rs)=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.default=lp;var op=["-webkit-","-moz-",""],ip={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function lp(t,e){if(t==="cursor"&&ip.hasOwnProperty(e))return op.map(function(n){return n+e})}Rs.exports=Da.default});var Ts=S((Ra,Ls)=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.default=hp;var Ap=vn(),sp=cp(Ap);function cp(t){return t&&t.__esModule?t:{default:t}}var _p=["-webkit-",""];function hp(t,e){if(typeof e=="string"&&!(0,sp.default)(e)&&e.indexOf("filter(")>-1)return _p.map(function(n){return e.replace(/filter\(/g,n+"filter(")})}Ls.exports=Ra.default});var Js=S((Fa,Ms)=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.default=gp;var Hs={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function gp(t,e){if(t==="display"&&Hs.hasOwnProperty(e))return Hs[e]}Ms.exports=Fa.default});var Ps=S((La,Ks)=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.default=up;var dp={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},Us={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function up(t,e,n){Us.hasOwnProperty(t)&&(n[Us[t]]=dp[e]||e)}Ks.exports=La.default});var zs=S((Ta,Gs)=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.default=pp;var fp={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},Os={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};function pp(t,e,n){t==="flexDirection"&&typeof e=="string"&&(e.indexOf("column")>-1?n.WebkitBoxOrient="vertical":n.WebkitBoxOrient="horizontal",e.indexOf("reverse")>-1?n.WebkitBoxDirection="reverse":n.WebkitBoxDirection="normal"),Os.hasOwnProperty(t)&&(n[Os[t]]=fp[e]||e)}Gs.exports=Ta.default});var Ys=S((Ha,Vs)=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.default=Ep;var Cp=vn(),mp=Ip(Cp);function Ip(t){return t&&t.__esModule?t:{default:t}}var yp=["-webkit-","-moz-",""],vp=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;function Ep(t,e){if(typeof e=="string"&&!(0,mp.default)(e)&&vp.test(e))return yp.map(function(n){return n+e})}Vs.exports=Ha.default});var qs=S((Ma,Ws)=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.default=bp;var Bp=vn(),jp=Qp(Bp);function Qp(t){return t&&t.__esModule?t:{default:t}}var wp=["-webkit-",""];function bp(t,e){if(typeof e=="string"&&!(0,jp.default)(e)&&e.indexOf("image-set(")>-1)return wp.map(function(n){return e.replace(/image-set\(/g,n+"image-set(")})}Ws.exports=Ma.default});var Zs=S((Ja,$s)=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.default=xp;function xp(t,e){if(t==="position"&&e==="sticky")return["-webkit-sticky","sticky"]}$s.exports=Ja.default});var ec=S((Ua,Xs)=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.default=Dp;var Sp=["-webkit-","-moz-",""],Np={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},kp={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function Dp(t,e){if(Np.hasOwnProperty(t)&&kp.hasOwnProperty(e))return Sp.map(function(n){return n+e})}Xs.exports=Ua.default});var nc=S((aj,tc)=>{"use strict";var Rp=/[A-Z]/g,Fp=/^ms-/,Bi={};function Lp(t){return t in Bi?Bi[t]:Bi[t]=t.replace(Rp,"-$&").toLowerCase().replace(Fp,"-ms-")}tc.exports=Lp});var ac=S((Ka,rc)=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.default=Jp;var Tp=nc(),Hp=Mp(Tp);function Mp(t){return t&&t.__esModule?t:{default:t}}function Jp(t){return(0,Hp.default)(t)}rc.exports=Ka.default});var ji=S((Pa,oc)=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.default=Up;function Up(t){return t.charAt(0).toUpperCase()+t.slice(1)}oc.exports=Pa.default});var Ac=S((Oa,lc)=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.default=qp;var Kp=ac(),Pp=Qi(Kp),Op=vn(),Gp=Qi(Op),zp=ji(),ic=Qi(zp);function Qi(t){return t&&t.__esModule?t:{default:t}}var Vp={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},Yp={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function Wp(t,e){if((0,Gp.default)(t))return t;for(var n=t.split(/,(?![^()]*(?:\([^()]*\))?\))/g),a=0,r=n.length;a-1&&s!=="order")for(var A=e[l],c=0,h=A.length;c-1)return o;var i=r.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(l){return!/-webkit-|-ms-/.test(l)}).join(",");return t.indexOf("Moz")>-1?i:(n["Webkit"+(0,ic.default)(t)]=o,n["Moz"+(0,ic.default)(t)]=i,r)}}lc.exports=Oa.default});var cc=S((oj,sc)=>{"use strict";function $p(t){for(var e=5381,n=t.length;n;)e=e*33^t.charCodeAt(--n);return e>>>0}sc.exports=$p});var hc=S((Ga,_c)=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.default=tC;var Zp=ji(),Xp=eC(Zp);function eC(t){return t&&t.__esModule?t:{default:t}}function tC(t,e,n){if(t.hasOwnProperty(e)){for(var a={},r=t[e],o=(0,Xp.default)(e),i=Object.keys(n),l=0;l{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.default=nC;function nC(t,e,n,a,r){for(var o=0,i=t.length;o{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.default=rC;function uc(t,e){t.indexOf(e)===-1&&t.push(e)}function rC(t,e){if(Array.isArray(e))for(var n=0,a=e.length;n{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.default=aC;function aC(t){return t instanceof Object&&!Array.isArray(t)}Cc.exports=Ya.default});var vc=S((qa,yc)=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.default=hC;var oC=hc(),iC=Wa(oC),lC=dc(),Ic=Wa(lC),AC=pc(),sC=Wa(AC),cC=mc(),_C=Wa(cC);function Wa(t){return t&&t.__esModule?t:{default:t}}function hC(t){var e=t.prefixMap,n=t.plugins;function a(r){for(var o in r){var i=r[o];if((0,_C.default)(i))r[o]=a(i);else if(Array.isArray(i)){for(var l=[],s=0,A=i.length;s0&&(r[o]=l)}else{var h=(0,Ic.default)(n,o,i,r,e);h&&(r[o]=h),r=(0,iC.default)(e,o,r)}}return r}return a}yc.exports=qa.default});var xc=S((ij,bc)=>{"use strict";bc.exports=wi;function wi(t){Nt.length||($a(),jc=!0),Nt[Nt.length]=t}var Nt=[],jc=!1,$a,St=0,gC=1024;function Ec(){for(;StgC){for(var e=0,n=Nt.length-St;e{"use strict";var Sc=xc(),Za=[],bi=[],uC=Sc.makeRequestCallFromTimer(fC);function fC(){if(bi.length)throw bi.shift()}kc.exports=xi;function xi(t){var e;Za.length?e=Za.pop():e=new Nc,e.task=t,Sc(e)}function Nc(){this.task=null}Nc.prototype.call=function(){try{this.task.call()}catch(t){xi.onerror?xi.onerror(t):(bi.push(t),uC())}finally{this.task=null,Za[Za.length]=this}}});var Vt,ee,ze,Me=le(()=>{"use strict";W();Vt=class{constructor(){this.unit="none"}format(e){return e.toLocaleString()}},ee=class{constructor(e){this.unit=e;e==="nanoseconds"?this.multiplier=1e-9:e==="microseconds"?this.multiplier=1e-6:e==="milliseconds"?this.multiplier=.001:this.multiplier=1}formatUnsigned(e){let n=e*this.multiplier;if(n/60>=1){let a=Math.floor(n/60),r=Math.floor(n-a*60).toString();return`${a}:${an(r,2)}`}return n/1>=1?`${n.toFixed(2)}s`:n/.001>=1?`${(n/.001).toFixed(2)}ms`:n/1e-6>=1?`${(n/1e-6).toFixed(2)}\xB5s`:`${(n/1e-9).toFixed(2)}ns`}format(e){return`${e<0?"-":""}${this.formatUnsigned(Math.abs(e))}`}},ze=class{constructor(){this.unit="bytes"}format(e){return e<1024?`${e.toFixed(0)} B`:(e/=1024,e<1024?`${e.toFixed(2)} KB`:(e/=1024,e<1024?`${e.toFixed(2)} MB`:(e/=1024,`${e.toFixed(2)} GB`)))}}});var s_=S((Fj,Ri)=>{"use strict";var A_=async function(t={}){var e,n=t,a,r,o=new Promise((M,J)=>{a=M,r=J});function i(){a(n)}function l(M){throw M}for(var s,A,c,h,_,f,m,u,g,p,I,y=new Uint8Array(123),B=25;B>=0;--B)y[48+B]=52+B,y[65+B]=B,y[97+B]=26+B;y[43]=62,y[47]=63;function E(M){for(var J,P,Qe=0,$e=0,Ue=M.length,ce=new Uint8Array((Ue*3>>2)-(M[Ue-2]=="=")-(M[Ue-1]=="="));Qe>4,ce[$e+1]=J<<4|P>>2,ce[$e+2]=P<<6|y[M.charCodeAt(Qe+3)];return ce}function b(){var M=I.buffer;s=new Int8Array(M),A=new Int16Array(M),h=new Uint8Array(M),_=new Uint16Array(M),c=new Int32Array(M),f=new Uint32Array(M),m=new Float32Array(M),u=new Float64Array(M),g=new BigInt64Array(M),p=new BigUint64Array(M)}var D=n.noExitRuntime||!0,T=M=>{l("OOM")},Q=M=>{var J=h.length;M>>>=0,T(M)},w=M=>{for(var J=0,P=0;P=55296&&Qe<=57343?(J+=4,++P):J+=3}return J},N=(M,J,P,Qe)=>{if(!(Qe>0))return 0;for(var $e=P,Ue=P+Qe-1,ce=0;ce=55296&&de<=57343){var la=M.charCodeAt(++ce);de=65536+((de&1023)<<10)|la&1023}if(de<=127){if(P>=Ue)break;J[P++]=de}else if(de<=2047){if(P+1>=Ue)break;J[P++]=192|de>>6,J[P++]=128|de&63}else if(de<=65535){if(P+2>=Ue)break;J[P++]=224|de>>12,J[P++]=128|de>>6&63,J[P++]=128|de&63}else{if(P+3>=Ue)break;J[P++]=240|de>>18,J[P++]=128|de>>12&63,J[P++]=128|de>>6&63,J[P++]=128|de&63}}return J[P]=0,P-$e},te=(M,J,P)=>N(M,h,J,P),rt=M=>xA(M),at=M=>{var J=w(M)+1,P=rt(J);return te(M,P,J),P},pt=typeof TextDecoder<"u"?new TextDecoder:void 0,rn=(M,J=0,P=NaN)=>{for(var Qe=J+P,$e=J;M[$e]&&!($e>=Qe);)++$e;if($e-J>16&&M.buffer&&pt)return pt.decode(M.subarray(J,$e));for(var Ue="";J<$e;){var ce=M[J++];if(!(ce&128)){Ue+=String.fromCharCode(ce);continue}var de=M[J++]&63;if((ce&224)==192){Ue+=String.fromCharCode((ce&31)<<6|de);continue}var la=M[J++]&63;if((ce&240)==224?ce=(ce&15)<<12|de<<6|la:ce=(ce&7)<<18|de<<12|la<<6|M[J++]&63,ce<65536)Ue+=String.fromCharCode(ce);else{var SA=ce-65536;Ue+=String.fromCharCode(55296|SA>>10,56320|SA&1023)}}return Ue},jt=(M,J)=>M?rn(h,M,J):"",Jt={a:Q};n.UTF8ToString=jt,n.stringToUTF8OnStack=at;function ia(M){M.c()}var fr,bA,xA,of={a:Jt};return n.wasm=E("AGFzbQEAAAABbRFgA39/fwBgAX8Bf2ACf38Bf2ACf38AYAN/f38Bf2ABfwBgBH9/f38AYAJ/fgBgBX9/f39/AGAGf3x/f39/AX9gAX8BfmACfn8Bf2AEf39/fwF/YAJ/fwF+YAAAYAd/f39/f39/AX9gAnx/AXwCBwEBYQFhAAEDYF8AAwMBAAgBAAEAAQEDAQIFAwoAAQUEAgELBgwDAAIBAwADAgENBwIBAgYHAgEDAQEBAgIFDgMCBgEFDwgQAQQGAQEGBAQAAgcCAQICAgEEAQICAgEBBQEAAQQDCQEAAAQFAXABBgYFBgEBggKCAgYIAX8BQaC4BAsHGQYBYgIAAWMANQFkAQABZQAVAWYAXQFnAFkJCwEAQQELBV9eXFtaDAEYCpD3A1+KOwEMfyMAQRBrIgwkAAJAAkACQCACRQ0AIAIoAgQiA0EBSg0AIAAoApwCIgVBgQhIDQELIABBATYCmAIMAQsgAiADQQFqNgIEIAAgBUEBajYCnAIgDCACNgIIIAwgACgCrAI2AgwgACAMQQhqNgKsAiABIQQgAiEB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NASACIANJDQALCyADQXxxIQACQCADQcAASQ0AIAIgAEFAaiIESw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBE0NAAsLIAAgAk0NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIABJDQALDAELIANBBEkEQCAAIQIMAQsgA0EEayIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsLpwEBBH8jAEEQayIEJAAgBCABNgIMIwBBoAFrIgIkACACQQhqIgVB0DFBkAH8CgAAIAIgADYCNCACIAA2AhwgAkH/////B0F+IABrIgMgA0H/////B0sbIgM2AjggAiAAIANqIgM2AiQgAiADNgIYIAVBgBIgAUEAQQAQPCAAQX5HBEAgAigCHCIAIAAgAigCGEZrQQA6AAALIAJBoAFqJAAgBEEQaiQAC7EBAQJ/AkACQCABRQ0AA0ACQAJAAkACQCABKAIAIgNBJ0wEQEEAIQICQCADDgkIBAQEBAIIBQUACyADQRhHDQMMBgtBACECAkAgA0Ezaw4CBwQACyADQcMAayICQRxLQQEgAnRB45mAgAFxRXINAQwFCyAAIAEQKSICRQ0EIAIoAgBBMEYNBQwECyADQShGDQMLIAAgASgCDBAjIgINAwsgASgCECIBDQALC0EAIQILIAILnwQBCH8CQAJAAkAgACgCDCIBLQAARQ0AIAAgAUEBajYCDCABLAAAIQUgAS0AAUUEQAwBCyAAIAFBAmo2AgwgASwAASEEAkAgBUH2AEcNACAEQTBrIgZBCUsNACAAEA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EL//wGDIgSnIglBgfgAa0H9D00EQCAFQgSGIANCPIiEIQIgCUGA+ABrrSEEAkAgA0L//////////w+DIgNCgYCAgICAgIAIWgRAIAJCAXwhAgwBCyADQoCAgICAgICACFINACACQgGDIAJ8IQILQgAgAiACQv////////8HViIBGyECIAGtIAR8DAELIAMgBYRQIARC//8BUnJFBEAgBUIEhiADQjyIhEKAgICAgICABIQhAkL/DwwBCyAJQf6HAUsEQEL/DwwBC0GA+ABBgfgAIARQIggbIgogCWsiAUHwAEoEQEIADAELIAMhAiAFIAVCgICAgICAwACEIAgbIgQhBgJAQYABIAFrIghBwABxBEAgAiAIQUBqrYYhBkIAIQIMAQsgCEUNACAGIAitIgWGIAJBwAAgCGutiIQhBiACIAWGIQILIAAgAjcDECAAIAY3AxgCQCABQcAAcQRAIAQgAUFAaq2IIQNCACEEDAELIAFFDQAgBEHAACABa62GIAMgAa0iAoiEIQMgBCACiCEECyAAIAM3AwAgACAENwMIIAApAwhCBIYgACkDACIDQjyIhCECAkAgCSAKRyAAKQMQIAApAxiEQgBSca0gA0L//////////w+DhCIDQoGAgICAgICACFoEQCACQgF8IQIMAQsgA0KAgICAgICAgAhSDQAgAkIBgyACfCECCyACQoCAgICAgIAIhSACIAJC/////////wdWIgEbIQIgAa0LIQMgAEEgaiQAIAdCgICAgICAgICAf4MgA0I0hoQgAoS/OQMAC7cXAxJ/AXwDfiMAQbAEayILJAAgC0EANgIsAkAgAb0iGUIAUwRAQQEhEEHKDCEUIAGaIgG9IRkMAQsgBEGAEHEEQEEBIRBBzQwhFAwBC0HQDEHLDCAEQQFxIhAbIRQgEEUhFwsCQCAZQoCAgICAgID4/wCDQoCAgICAgID4/wBRBEAgAEEgIAIgEEEDaiIGIARB//97cRAGIAAgFCAQEAUgAEGSD0HhEiAFQSBxIgMbQfsQQfcSIAMbIAEgAWIbQQMQBSAAQSAgAiAGIARBgMAAcxAGIAIgBiACIAZKGyENDAELIAtBEGohEQJAAkACQCABIAtBLGoQPSIBIAGg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CAAACwAAACAKAABGAAAAYggAAAwAAABpAAAA+AcAAAwAAADuCQAAMQAAAOoHAAANAAAAbwAAAN0HAAAMAAAAvAkAADEAAADPBwAADQAAAGQAAADBBwAADQAAAIkJAAAyAAAAsgcAAA4AAAABAAAAAgAAAAMAAAABAAAABAAAAAUAAABGCQAAZQkAAEIJAEHwLQtBGQALABkZGQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAAZAAoKGRkZAwoHAAEACQsYAAAJBgsAAAsABhkAAAAZGRkAQcEuCyEOAAAAAAAAAAAZAAsNGRkZAA0AAAIACQ4AAAAJAA4AAA4AQfsuCwEMAEGHLwsVEwAAAAATAAAAAAkMAAAAAAAMAAAMAEG1LwsBEABBwS8LFQ8AAAAEDwAAAAAJEAAAAAAAEAAAEABB7y8LARIAQfsvCx4RAAAAABEAAAAACRIAAAAAABIAABIAABoAAAAaGhoAQbIwCw4aAAAAGhoaAAAAAAAACQBB4zALARQAQe8wCxUXAAAAABcAAAAACRQAAAAAABQAABQAQZ0xCwEWAEGpMQsnFQAAAAAVAAAAAAkWAAAAAAAWAAAWAAAwMTIzNDU2Nzg5QUJDREVGAEH0MQsBBQBBnDILCP//////////AEHgMgsDIBwB"),WebAssembly.instantiate(n.wasm,of).then(M=>{var J=M.instance.exports;fr=J.e,bA=J.f,xA=J.g,I=J.b,b(),ia(J),i()}),n.wasm_demangle=function(M){let J=at(M),P=bA(J),Qe=jt(P);return P!=null&&fr(P),Qe},e=o,e};Ri.exports=A_;Ri.exports.default=A_});async function h_(){let t=await XC;return em(t.wasm_demangle)}function em(t){return e=>{let n=c_.get(e);return n!==void 0||(n=t(e),n=n===""?e:n,c_.set(e,n)),e=n,e}}var __,XC,c_,g_=le(()=>{"use strict";__=_e(s_()),XC=(0,__.default)().then(t=>t),c_=new Map});var Fi={};NA(Fi,{loadDemangling:()=>h_});var Li=le(()=>{"use strict";g_()});var ao,Ce,Vn,oo,ae,me,Re=le(()=>{"use strict";W();Me();ao=class{constructor(){this.selfWeight=0;this.totalWeight=0}getSelfWeight(){return this.selfWeight}getTotalWeight(){return this.totalWeight}addToTotalWeight(e){this.totalWeight+=e}addToSelfWeight(e){this.selfWeight+=e}overwriteWeightWith(e){this.selfWeight=e.selfWeight,this.totalWeight=e.totalWeight}},Ce=class t extends ao{constructor(e){super(),this.key=e.key,this.name=e.name,this.file=e.file,this.line=e.line,this.col=e.col}static{this.root=new t({key:"(speedscope root)",name:"(speedscope root)"})}static getOrInsert(e,n){return e.getOrInsert(new t(n))}},Vn=class extends ao{constructor(n,a){super();this.frame=n;this.parent=a;this.children=[];this.frozen=!1}isRoot(){return this.frame===Ce.root}isFrozen(){return this.frozen}freeze(){this.frozen=!0}},oo=class t{constructor(e=0){this.name="";this.frames=new wt;this.appendOrderCalltreeRoot=new Vn(Ce.root,null);this.groupedCalltreeRoot=new Vn(Ce.root,null);this.samples=[];this.weights=[];this.valueFormatter=new Vt;this.totalNonIdleWeight=null;this.totalWeight=e}getAppendOrderCalltreeRoot(){return this.appendOrderCalltreeRoot}getGroupedCalltreeRoot(){return this.groupedCalltreeRoot}shallowClone(){let e=new t(this.totalWeight);return Object.assign(e,this),e}formatValue(e){return this.valueFormatter.format(e)}setValueFormatter(e){this.valueFormatter=e}getWeightUnit(){return this.valueFormatter.unit}getName(){return this.name}setName(e){this.name=e}getTotalWeight(){return this.totalWeight}getTotalNonIdleWeight(){return this.totalNonIdleWeight===null&&(this.totalNonIdleWeight=this.groupedCalltreeRoot.children.reduce((e,n)=>e+n.getTotalWeight(),0)),this.totalNonIdleWeight}sortGroupedCallTree(){function e(n){n.children.sort((a,r)=>-(a.getTotalWeight()-r.getTotalWeight())),n.children.forEach(e)}e(this.groupedCalltreeRoot)}forEachCallGrouped(e,n){function a(r,o){r.frame!==Ce.root&&e(r,o);let i=0;r.children.forEach(function(l){a(l,o+i),i+=l.getTotalWeight()}),r.frame!==Ce.root&&n(r,o+r.getTotalWeight())}a(this.groupedCalltreeRoot,0)}forEachCall(e,n){let a=[],r=0,o=0;for(let i of this.samples){let l=null;for(l=i;l&&l.frame!=Ce.root&&a.indexOf(l)===-1;l=l.parent);for(;a.length>0&&ne(a)!=l;){let A=a.pop();n(A,r)}let s=[];for(let A=i;A&&A.frame!=Ce.root&&A!=l;A=A.parent)s.push(A);s.reverse();for(let A of s)e(A,r);a=a.concat(s),r+=this.weights[o++]}for(let i=a.length-1;i>=0;i--)n(a[i],r)}forEachFrame(e){this.frames.forEach(e)}getProfileWithRecursionFlattened(){let e=new me,n=[],a=new Set;function r(l,s){a.has(l.frame)?n.push(null):(a.add(l.frame),n.push(l),e.enterFrame(l.frame,s))}function o(l,s){let A=n.pop();A&&(a.delete(A.frame),e.leaveFrame(A.frame,s))}this.forEachCall(r,o);let i=e.build();return i.name=this.name,i.valueFormatter=this.valueFormatter,this.forEachFrame(l=>{i.frames.getOrInsert(l).overwriteWeightWith(l)}),i}getInvertedProfileForCallersOf(e){let n=Ce.getOrInsert(this.frames,e),a=new ae,r=[];function o(l){if(l.frame===n)r.push(l);else for(let s of l.children)o(s)}o(this.appendOrderCalltreeRoot);for(let l of r){let s=[];for(let A=l;A!=null&&A.frame!==Ce.root;A=A.parent)s.push(A.frame);a.appendSampleWithWeight(s,l.getTotalWeight())}let i=a.build();return i.name=this.name,i.valueFormatter=this.valueFormatter,i}getProfileForCalleesOf(e){let n=Ce.getOrInsert(this.frames,e),a=new ae;function r(l){let s=[];function A(c){s.push(c.frame),a.appendSampleWithWeight(s,c.getSelfWeight());for(let h of c.children)A(h);s.pop()}A(l)}function o(l){if(l.frame===n)r(l);else for(let s of l.children)o(s)}o(this.appendOrderCalltreeRoot);let i=a.build();return i.name=this.name,i.valueFormatter=this.valueFormatter,i}async demangle(){let e=null;for(let n of this.frames)(n.name.startsWith("__Z")||n.name.startsWith("_R")||n.name.startsWith("_Z"))&&(e||(e=await(await Promise.resolve().then(()=>(Li(),Fi))).loadDemangling()),n.name=e(n.name))}remapSymbols(e){for(let n of this.frames){let a=e(n);if(a==null)continue;let{name:r,file:o,line:i,col:l}=a;r!=null&&(n.name=r),o!=null&&(n.file=o),i!=null&&(n.line=i),l!=null&&(n.col=l)}}},ae=class extends oo{constructor(){super(...arguments);this.pendingSample=null}_appendSample(n,a,r){if(isNaN(a))throw new Error("invalid weight");let o=r?this.appendOrderCalltreeRoot:this.groupedCalltreeRoot,i=new Set;for(let l of n){let s=r?ne(o.children):o.children.find(A=>A.frame===l);if(s&&!s.isFrozen()&&s.frame==l)o=s;else{let A=o;o=new Vn(l,o),A.children.push(o)}o.addToTotalWeight(a),i.add(o.frame)}if(o.addToSelfWeight(a),r)for(let l of o.children)l.freeze();if(r){o.frame.addToSelfWeight(a);for(let l of i)l.addToTotalWeight(a);o===ne(this.samples)?this.weights[this.weights.length-1]+=a:(this.samples.push(o),this.weights.push(a))}}appendSampleWithWeight(n,a){if(a===0)return;if(a<0)throw new Error("Samples must have positive weights");let r=n.map(o=>Ce.getOrInsert(this.frames,o));this._appendSample(r,a,!0),this._appendSample(r,a,!1)}appendSampleWithTimestamp(n,a){if(this.pendingSample){if(a0?this.appendSampleWithWeight(this.pendingSample.stack,this.pendingSample.centralTimestamp-this.pendingSample.startTimestamp):(this.appendSampleWithWeight(this.pendingSample.stack,1),this.setValueFormatter(new Vt))),this.totalWeight=Math.max(this.totalWeight,this.weights.reduce((n,a)=>n+a,0)),this.sortGroupedCallTree(),this}},me=class extends oo{constructor(){super(...arguments);this.appendOrderStack=[this.appendOrderCalltreeRoot];this.groupedOrderStack=[this.groupedCalltreeRoot];this.framesInStack=new Map;this.stack=[];this.lastValue=0}addWeightsToFrames(n){let a=n-this.lastValue;for(let o of this.framesInStack.keys())o.addToTotalWeight(a);let r=ne(this.stack);r&&r.addToSelfWeight(a)}addWeightsToNodes(n,a){let r=n-this.lastValue;for(let i of a)i.addToTotalWeight(r);let o=ne(a);o&&o.addToSelfWeight(r)}_enterFrame(n,a,r){let o=r?this.appendOrderStack:this.groupedOrderStack;this.addWeightsToNodes(a,o);let i=ne(o);if(i){if(r){let A=a-this.lastValue;if(A>0)this.samples.push(i),this.weights.push(a-this.lastValue);else if(A<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${a}`)}let l=r?ne(i.children):i.children.find(A=>A.frame===n),s;l&&!l.isFrozen()&&l.frame==n?s=l:(s=new Vn(n,i),i.children.push(s)),o.push(s)}}enterFrame(n,a){let r=Ce.getOrInsert(this.frames,n);this.addWeightsToFrames(a),this._enterFrame(r,a,!0),this._enterFrame(r,a,!1),this.stack.push(r);let o=this.framesInStack.get(r)||0;this.framesInStack.set(r,o+1),this.lastValue=a,this.totalWeight=Math.max(this.totalWeight,this.lastValue)}_leaveFrame(n,a,r){let o=r?this.appendOrderStack:this.groupedOrderStack;if(this.addWeightsToNodes(a,o),r){let i=this.appendOrderStack.pop();if(i==null)throw new Error(`Trying to leave ${n.key} when stack is empty`);if(this.lastValue==null)throw new Error(`Trying to leave a ${n.key} before any have been entered`);if(i.freeze(),i.frame.key!==n.key)throw new Error(`Tried to leave frame "${n.name}" while frame "${i.frame.name}" was at the top at ${a}`);let l=a-this.lastValue;if(l>0)this.samples.push(i),this.weights.push(a-this.lastValue);else if(l<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${a}`)}else this.groupedOrderStack.pop()}leaveFrame(n,a){let r=Ce.getOrInsert(this.frames,n);this.addWeightsToFrames(a),this._leaveFrame(r,a,!0),this._leaveFrame(r,a,!1),this.stack.pop();let o=this.framesInStack.get(r);o!=null&&(o===1?this.framesInStack.delete(r):this.framesInStack.set(r,o-1),this.lastValue=a,this.totalWeight=Math.max(this.totalWeight,this.lastValue))}build(){if(this.appendOrderStack.length>1||this.groupedOrderStack.length>1)throw new Error("Tried to complete profile construction with a non-empty stack");return this.sortGroupedCallTree(),this}}});var Yt,d_=le(()=>{"use strict";(n=>{let t;(o=>(o.EVENTED="evented",o.SAMPLED="sampled"))(t=n.ProfileType||={});let e;(o=>(o.OPEN_FRAME="O",o.CLOSE_FRAME="C"))(e=n.EventType||={})})(Yt||={})});var Ti=S((Pj,tm)=>{tm.exports={name:"speedscope",version:"1.24.0",description:"",repository:"jlfwong/speedscope",main:"index.js",bin:{speedscope:"./bin/cli.mjs"},scripts:{deploy:"./scripts/deploy.sh",prepack:'./scripts/prepack.sh --outdir "$(pwd)/dist/release" --protocol file',prettier:"prettier --write 'src/**/*.ts' 'src/**/*.tsx'",lint:"eslint 'src/**/*.ts' 'src/**/*.tsx'",jest:"./scripts/test-setup.sh && jest --runInBand",coverage:"npm run jest -- --coverage",typecheck:"tsc --noEmit",test:"./scripts/ci.sh",serve:"tsx scripts/dev-server.ts"},files:["bin/cli.mjs","dist/release/**","!*.map"],browserslist:["last 2 Chrome versions","last 2 Firefox versions"],author:"",license:"MIT",devDependencies:{"@types/jest":"22.2.3","@types/jszip":"3.1.4","@types/node":"14.0.1","@types/pako":"1.0.0","@typescript-eslint/eslint-plugin":"6.16.0","@typescript-eslint/parser":"6.16.0",acorn:"7.2.0",aphrodite:"2.1.0",esbuild:"0.24.2",eslint:"8.0.0","eslint-plugin-prettier":"5.1.2","eslint-plugin-react-hooks":"4.6.0",jest:"24.3.0",jsverify:"0.8.3",jszip:"3.1.5",pako:"1.0.6",preact:"10.4.1",prettier:"3.1.1",protobufjs:"6.8.8","source-map":"0.6.1","ts-jest":"24.3.0",tsx:"4.19.2",typescript:"5.3.3","typescript-json-schema":"0.42.0","uglify-es":"3.2.2","uint8array-json-parser":"0.0.2"},jest:{transform:{"^.+\\.tsx?$":"ts-jest"},setupFilesAfterEnv:["./src/jest-setup.js"],testRegex:"\\.test\\.tsx?$",collectCoverageFrom:["**/*.{ts,tsx}","!**/*.d.{ts,tsx}"],moduleFileExtensions:["ts","tsx","js","jsx","json"]},dependencies:{open:"10.1.0"}}});function nm(t){let e=[],n=new Map;function a(o){let i=n.get(o);if(i==null){let l={name:o.name};o.file!=null&&(l.file=o.file),o.line!=null&&(l.line=o.line),o.col!=null&&(l.col=o.col),i=e.length,n.set(o,i),e.push(l)}return i}let r={exporter:`speedscope@${Ti().version}`,name:t.name,activeProfileIndex:t.indexToView,$schema:"https://www.speedscope.app/file-format-schema.json",shared:{frames:e},profiles:[]};for(let o of t.profiles)r.profiles.push(rm(o,a));return r}function rm(t,e){let n={type:Yt.ProfileType.EVENTED,name:t.getName(),unit:t.getWeightUnit(),startValue:0,endValue:t.getTotalWeight(),events:[]},a=(o,i)=>{n.events.push({type:Yt.EventType.OPEN_FRAME,frame:e(o.frame),at:i})},r=(o,i)=>{n.events.push({type:Yt.EventType.CLOSE_FRAME,frame:e(o.frame),at:i})};return t.forEachCall(a,r),n}function am(t,e){function n(o){let{name:i,unit:l}=t;switch(l){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":o.setValueFormatter(new ee(l));break;case"bytes":o.setValueFormatter(new ze);break;case"none":o.setValueFormatter(new Vt);break}o.setName(i)}function a(o){let{startValue:i,endValue:l,events:s}=o,A=new me(l-i);n(A);let c=e.map((h,_)=>({key:_,...h}));for(let h of s)switch(h.type){case Yt.EventType.OPEN_FRAME:{A.enterFrame(c[h.frame],h.at-i);break}case Yt.EventType.CLOSE_FRAME:{A.leaveFrame(c[h.frame],h.at-i);break}}return A.build()}function r(o){let{startValue:i,endValue:l,samples:s,weights:A}=o,c=new ae(l-i);n(c);let h=e.map((_,f)=>({key:f,..._}));if(s.length!==A.length)throw new Error(`Expected samples.length (${s.length}) to equal weights.length (${A.length})`);for(let _=0;_h[u]),m)}return c.build()}switch(t.type){case Yt.ProfileType.EVENTED:return a(t);case Yt.ProfileType.SAMPLED:return r(t)}}function Hi(t){return{name:t.name||t.profiles[0].name||"profile",indexToView:t.activeProfileIndex||0,profiles:t.profiles.map(e=>am(e,t.shared.frames))}}function u_(t){let e=nm(t),n=new Blob([JSON.stringify(e)],{type:"text/json"}),r=`${(e.name?e.name.split(".")[0]:"profile").replace(/\W+/g,"_")}.speedscope.json`;console.log("Saving",r);let o=document.createElement("a");o.download=r,o.href=window.URL.createObjectURL(n),o.dataset.downloadurl=["text/json",o.download,o.href].join(":"),document.body.appendChild(o),o.click(),document.body.removeChild(o)}var Mi=le(()=>{"use strict";Re();Me();d_()});var T_=S(Zi=>{var L_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Zi.encode=function(t){if(0<=t&&t{var H_=T_(),Xi=5,M_=1<>1;return e?-n:n}el.encode=function(e){var n="",a,r=km(e);do a=r&J_,r>>>=Xi,r>0&&(a|=U_),n+=H_.encode(a);while(r>0);return n};el.decode=function(e,n,a){var r=e.length,o=0,i=0,l,s;do{if(n>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(s=H_.decode(e.charCodeAt(n++)),s===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));l=!!(s&U_),s&=J_,o=o+(s<{function Rm(t,e,n){if(e in t)return t[e];if(arguments.length===3)return n;throw new Error('"'+e+'" is a required argument.')}Je.getArg=Rm;var K_=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Fm=/^data:.+\,.+$/;function Sr(t){var e=t.match(K_);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Je.urlParse=Sr;function $n(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Je.urlGenerate=$n;function nl(t){var e=t,n=Sr(t);if(n){if(!n.path)return t;e=n.path}for(var a=Je.isAbsolute(e),r=e.split(/\/+/),o,i=0,l=r.length-1;l>=0;l--)o=r[l],o==="."?r.splice(l,1):o===".."?i++:i>0&&(o===""?(r.splice(l+1,i),i=0):(r.splice(l,2),i--));return e=r.join("/"),e===""&&(e=a?"/":"."),n?(n.path=e,$n(n)):e}Je.normalize=nl;function P_(t,e){t===""&&(t="."),e===""&&(e=".");var n=Sr(e),a=Sr(t);if(a&&(t=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),$n(n);if(n||e.match(Fm))return e;if(a&&!a.host&&!a.path)return a.host=e,$n(a);var r=e.charAt(0)==="/"?e:nl(t.replace(/\/+$/,"")+"/"+e);return a?(a.path=r,$n(a)):r}Je.join=P_;Je.isAbsolute=function(t){return t.charAt(0)==="/"||K_.test(t)};function Lm(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var n=0;e.indexOf(t+"/")!==0;){var a=t.lastIndexOf("/");if(a<0||(t=t.slice(0,a),t.match(/^([^\/]+:\/)?\/*$/)))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}Je.relative=Lm;var O_=function(){var t=Object.create(null);return!("__proto__"in t)}();function G_(t){return t}function Tm(t){return z_(t)?"$"+t:t}Je.toSetString=O_?G_:Tm;function Hm(t){return z_(t)?t.slice(1):t}Je.fromSetString=O_?G_:Hm;function z_(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var n=e-10;n>=0;n--)if(t.charCodeAt(n)!==36)return!1;return!0}function Mm(t,e,n){var a=Zn(t.source,e.source);return a!==0||(a=t.originalLine-e.originalLine,a!==0)||(a=t.originalColumn-e.originalColumn,a!==0||n)||(a=t.generatedColumn-e.generatedColumn,a!==0)||(a=t.generatedLine-e.generatedLine,a!==0)?a:Zn(t.name,e.name)}Je.compareByOriginalPositions=Mm;function Jm(t,e,n){var a=t.generatedLine-e.generatedLine;return a!==0||(a=t.generatedColumn-e.generatedColumn,a!==0||n)||(a=Zn(t.source,e.source),a!==0)||(a=t.originalLine-e.originalLine,a!==0)||(a=t.originalColumn-e.originalColumn,a!==0)?a:Zn(t.name,e.name)}Je.compareByGeneratedPositionsDeflated=Jm;function Zn(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function Um(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=Zn(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Zn(t.name,e.name)}Je.compareByGeneratedPositionsInflated=Um;function Km(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Je.parseSourceMapInput=Km;function Pm(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var a=Sr(n);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var r=a.path.lastIndexOf("/");r>=0&&(a.path=a.path.substring(0,r+1))}e=P_($n(a),e)}return nl(e)}Je.computeSourceURL=Pm});var ol=S(V_=>{var rl=Xn(),al=Object.prototype.hasOwnProperty,jn=typeof Map<"u";function $t(){this._array=[],this._set=jn?new Map:Object.create(null)}$t.fromArray=function(e,n){for(var a=new $t,r=0,o=e.length;r=0)return n}else{var a=rl.toSetString(e);if(al.call(this._set,a))return this._set[a]}throw new Error('"'+e+'" is not in the set.')};$t.prototype.at=function(e){if(e>=0&&e{var Y_=Xn();function Om(t,e){var n=t.generatedLine,a=e.generatedLine,r=t.generatedColumn,o=e.generatedColumn;return a>n||a==n&&o>=r||Y_.compareByGeneratedPositionsInflated(t,e)<=0}function po(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}po.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};po.prototype.add=function(e){Om(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};po.prototype.toArray=function(){return this._sorted||(this._array.sort(Y_.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};W_.MappingList=po});var il=S($_=>{var Nr=tl(),Ie=Xn(),Co=ol().ArraySet,Gm=q_().MappingList;function st(t){t||(t={}),this._file=Ie.getArg(t,"file",null),this._sourceRoot=Ie.getArg(t,"sourceRoot",null),this._skipValidation=Ie.getArg(t,"skipValidation",!1),this._sources=new Co,this._names=new Co,this._mappings=new Gm,this._sourcesContents=null}st.prototype._version=3;st.fromSourceMap=function(e){var n=e.sourceRoot,a=new st({file:e.file,sourceRoot:n});return e.eachMapping(function(r){var o={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(o.source=r.source,n!=null&&(o.source=Ie.relative(n,o.source)),o.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(o.name=r.name)),a.addMapping(o)}),e.sources.forEach(function(r){var o=r;n!==null&&(o=Ie.relative(n,r)),a._sources.has(o)||a._sources.add(o);var i=e.sourceContentFor(r);i!=null&&a.setSourceContent(r,i)}),a};st.prototype.addMapping=function(e){var n=Ie.getArg(e,"generated"),a=Ie.getArg(e,"original",null),r=Ie.getArg(e,"source",null),o=Ie.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,a,r,o),r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:a!=null&&a.line,originalColumn:a!=null&&a.column,source:r,name:o})};st.prototype.setSourceContent=function(e,n){var a=e;this._sourceRoot!=null&&(a=Ie.relative(this._sourceRoot,a)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ie.toSetString(a)]=n):this._sourcesContents&&(delete this._sourcesContents[Ie.toSetString(a)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};st.prototype.applySourceMap=function(e,n,a){var r=n;if(n==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);r=e.file}var o=this._sourceRoot;o!=null&&(r=Ie.relative(o,r));var i=new Co,l=new Co;this._mappings.unsortedForEach(function(s){if(s.source===r&&s.originalLine!=null){var A=e.originalPositionFor({line:s.originalLine,column:s.originalColumn});A.source!=null&&(s.source=A.source,a!=null&&(s.source=Ie.join(a,s.source)),o!=null&&(s.source=Ie.relative(o,s.source)),s.originalLine=A.line,s.originalColumn=A.column,A.name!=null&&(s.name=A.name))}var c=s.source;c!=null&&!i.has(c)&&i.add(c);var h=s.name;h!=null&&!l.has(h)&&l.add(h)},this),this._sources=i,this._names=l,e.sources.forEach(function(s){var A=e.sourceContentFor(s);A!=null&&(a!=null&&(s=Ie.join(a,s)),o!=null&&(s=Ie.relative(o,s)),this.setSourceContent(s,A))},this)};st.prototype._validateMapping=function(e,n,a,r){if(n&&typeof n.line!="number"&&typeof n.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!a&&!r)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&a)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:a,original:n,name:r}))}};st.prototype._serializeMappings=function(){for(var e=0,n=1,a=0,r=0,o=0,i=0,l="",s,A,c,h,_=this._mappings.toArray(),f=0,m=_.length;f0){if(!Ie.compareByGeneratedPositionsInflated(A,_[f-1]))continue;s+=","}s+=Nr.encode(A.generatedColumn-e),e=A.generatedColumn,A.source!=null&&(h=this._sources.indexOf(A.source),s+=Nr.encode(h-i),i=h,s+=Nr.encode(A.originalLine-1-r),r=A.originalLine-1,s+=Nr.encode(A.originalColumn-a),a=A.originalColumn,A.name!=null&&(c=this._names.indexOf(A.name),s+=Nr.encode(c-o),o=c)),l+=s}return l};st.prototype._generateSourcesContent=function(e,n){return e.map(function(a){if(!this._sourcesContents)return null;n!=null&&(a=Ie.relative(n,a));var r=Ie.toSetString(a);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};st.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};st.prototype.toString=function(){return JSON.stringify(this.toJSON())};$_.SourceMapGenerator=st});var Z_=S(Qn=>{Qn.GREATEST_LOWER_BOUND=1;Qn.LEAST_UPPER_BOUND=2;function ll(t,e,n,a,r,o){var i=Math.floor((e-t)/2)+t,l=r(n,a[i],!0);return l===0?i:l>0?e-i>1?ll(i,e,n,a,r,o):o==Qn.LEAST_UPPER_BOUND?e1?ll(t,i,n,a,r,o):o==Qn.LEAST_UPPER_BOUND?i:t<0?-1:t}Qn.search=function(e,n,a,r){if(n.length===0)return-1;var o=ll(-1,n.length,e,n,a,r||Qn.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&a(n[o],n[o-1],!0)===0;)--o;return o}});var eh=S(X_=>{function Al(t,e,n){var a=t[e];t[e]=t[n],t[n]=a}function zm(t,e){return Math.round(t+Math.random()*(e-t))}function sl(t,e,n,a){if(n{var R=Xn(),cl=Z_(),er=ol().ArraySet,Vm=tl(),kr=eh().quickSort;function Ae(t,e){var n=t;return typeof t=="string"&&(n=R.parseSourceMapInput(t)),n.sections!=null?new mt(n,e):new Fe(n,e)}Ae.fromSourceMap=function(t,e){return Fe.fromSourceMap(t,e)};Ae.prototype._version=3;Ae.prototype.__generatedMappings=null;Object.defineProperty(Ae.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Ae.prototype.__originalMappings=null;Object.defineProperty(Ae.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Ae.prototype._charIsMappingSeparator=function(e,n){var a=e.charAt(n);return a===";"||a===","};Ae.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")};Ae.GENERATED_ORDER=1;Ae.ORIGINAL_ORDER=2;Ae.GREATEST_LOWER_BOUND=1;Ae.LEAST_UPPER_BOUND=2;Ae.prototype.eachMapping=function(e,n,a){var r=n||null,o=a||Ae.GENERATED_ORDER,i;switch(o){case Ae.GENERATED_ORDER:i=this._generatedMappings;break;case Ae.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var l=this.sourceRoot;i.map(function(s){var A=s.source===null?null:this._sources.at(s.source);return A=R.computeSourceURL(l,A,this._sourceMapURL),{source:A,generatedLine:s.generatedLine,generatedColumn:s.generatedColumn,originalLine:s.originalLine,originalColumn:s.originalColumn,name:s.name===null?null:this._names.at(s.name)}},this).forEach(e,r)};Ae.prototype.allGeneratedPositionsFor=function(e){var n=R.getArg(e,"line"),a={source:R.getArg(e,"source"),originalLine:n,originalColumn:R.getArg(e,"column",0)};if(a.source=this._findSourceIndex(a.source),a.source<0)return[];var r=[],o=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",R.compareByOriginalPositions,cl.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(e.column===void 0)for(var l=i.originalLine;i&&i.originalLine===l;)r.push({line:R.getArg(i,"generatedLine",null),column:R.getArg(i,"generatedColumn",null),lastColumn:R.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var s=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==s;)r.push({line:R.getArg(i,"generatedLine",null),column:R.getArg(i,"generatedColumn",null),lastColumn:R.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return r};mo.SourceMapConsumer=Ae;function Fe(t,e){var n=t;typeof t=="string"&&(n=R.parseSourceMapInput(t));var a=R.getArg(n,"version"),r=R.getArg(n,"sources"),o=R.getArg(n,"names",[]),i=R.getArg(n,"sourceRoot",null),l=R.getArg(n,"sourcesContent",null),s=R.getArg(n,"mappings"),A=R.getArg(n,"file",null);if(a!=this._version)throw new Error("Unsupported version: "+a);i&&(i=R.normalize(i)),r=r.map(String).map(R.normalize).map(function(c){return i&&R.isAbsolute(i)&&R.isAbsolute(c)?R.relative(i,c):c}),this._names=er.fromArray(o.map(String),!0),this._sources=er.fromArray(r,!0),this._absoluteSources=this._sources.toArray().map(function(c){return R.computeSourceURL(i,c,e)}),this.sourceRoot=i,this.sourcesContent=l,this._mappings=s,this._sourceMapURL=e,this.file=A}Fe.prototype=Object.create(Ae.prototype);Fe.prototype.consumer=Ae;Fe.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=R.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var n;for(n=0;n1&&(u.source=l+p[1],l+=p[1],u.originalLine=o+p[2],o=u.originalLine,u.originalLine+=1,u.originalColumn=i+p[3],i=u.originalColumn,p.length>4&&(u.name=s+p[4],s+=p[4])),m.push(u),typeof u.originalLine=="number"&&f.push(u)}kr(m,R.compareByGeneratedPositionsDeflated),this.__generatedMappings=m,kr(f,R.compareByOriginalPositions),this.__originalMappings=f};Fe.prototype._findMapping=function(e,n,a,r,o,i){if(e[a]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[a]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return cl.search(e,n,o,i)};Fe.prototype.computeColumnSpans=function(){for(var e=0;e=0){var r=this._generatedMappings[a];if(r.generatedLine===n.generatedLine){var o=R.getArg(r,"source",null);o!==null&&(o=this._sources.at(o),o=R.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var i=R.getArg(r,"name",null);return i!==null&&(i=this._names.at(i)),{source:o,line:R.getArg(r,"originalLine",null),column:R.getArg(r,"originalColumn",null),name:i}}}return{source:null,line:null,column:null,name:null}};Fe.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Fe.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var a=this._findSourceIndex(e);if(a>=0)return this.sourcesContent[a];var r=e;this.sourceRoot!=null&&(r=R.relative(this.sourceRoot,r));var o;if(this.sourceRoot!=null&&(o=R.urlParse(this.sourceRoot))){var i=r.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!o.path||o.path=="/")&&this._sources.has("/"+r))return this.sourcesContent[this._sources.indexOf("/"+r)]}if(n)return null;throw new Error('"'+r+'" is not in the SourceMap.')};Fe.prototype.generatedPositionFor=function(e){var n=R.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var a={source:n,originalLine:R.getArg(e,"line"),originalColumn:R.getArg(e,"column")},r=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",R.compareByOriginalPositions,R.getArg(e,"bias",Ae.GREATEST_LOWER_BOUND));if(r>=0){var o=this._originalMappings[r];if(o.source===a.source)return{line:R.getArg(o,"generatedLine",null),column:R.getArg(o,"generatedColumn",null),lastColumn:R.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};mo.BasicSourceMapConsumer=Fe;function mt(t,e){var n=t;typeof t=="string"&&(n=R.parseSourceMapInput(t));var a=R.getArg(n,"version"),r=R.getArg(n,"sections");if(a!=this._version)throw new Error("Unsupported version: "+a);this._sources=new er,this._names=new er;var o={line:-1,column:0};this._sections=r.map(function(i){if(i.url)throw new Error("Support for url field in sections not implemented.");var l=R.getArg(i,"offset"),s=R.getArg(l,"line"),A=R.getArg(l,"column");if(s{var Ym=il().SourceMapGenerator,Io=Xn(),Wm=/(\r?\n)/,qm=10,tr="$$$isSourceNode$$$";function et(t,e,n,a,r){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=n??null,this.name=r??null,this[tr]=!0,a!=null&&this.add(a)}et.fromStringWithSourceMap=function(e,n,a){var r=new et,o=e.split(Wm),i=0,l=function(){var _=m(),f=m()||"";return _+f;function m(){return i=0;n--)this.prepend(e[n]);else if(e[tr]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};et.prototype.walk=function(e){for(var n,a=0,r=this.children.length;a0){for(n=[],a=0;a{yo.SourceMapGenerator=il().SourceMapGenerator;yo.SourceMapConsumer=nh().SourceMapConsumer;yo.SourceNode=ah().SourceNode});function hI(t){let e=[];function n(a){e.push({id:a.id,callFrame:{columnNumber:0,functionName:a.functionName,lineNumber:a.lineNumber,scriptId:a.scriptId,url:a.url},hitCount:a.hitCount,children:a.children.map(r=>r.id)}),a.children.forEach(n)}return n(t),e}function gI(t,e){return t.map((n,a)=>{let r=a===0?e*1e6:t[a-1];return n-r})}function gh(t){return{samples:t.samples,startTime:t.startTime*1e6,endTime:t.endTime*1e6,nodes:hI(t.head),timeDeltas:gI(t.timestamps,t.startTime)}}var dh=le(()=>{"use strict"});function ul(t){if(!Array.isArray(t)||t.length<1)return!1;let e=t[0];return!(!("pid"in e&&"tid"in e&&"ph"in e&&"cat"in e)||!t.find(n=>n.name==="CpuProfile"||n.name==="Profile"||n.name==="ProfileChunk"))}function fh(t){return"traceEvents"in t?ul(t.traceEvents):!1}function Rr(t,e){let n=new Map,a=new Map,r=new Map;Ne(t,o=>o.ts);for(let o of t){if(o.name==="CpuProfile"){let i=`${o.pid}:${o.tid}`,l=o.id||i;n.set(l,o.args.data.cpuProfile),a.set(l,i)}if(o.name==="Profile"){let i=`${o.pid}:${o.tid}`;n.set(o.id||i,{startTime:0,endTime:0,nodes:[],samples:[],timeDeltas:[],...o.args.data}),o.id&&a.set(o.id,`${o.pid}:${o.tid}`)}if(o.name==="thread_name"&&r.set(`${o.pid}:${o.tid}`,o.args.name),o.name==="ProfileChunk"){let i=`${o.pid}:${o.tid}`,l=n.get(o.id||i);if(l){let s=o.args.data;s.cpuProfile&&(s.cpuProfile.nodes&&(l.nodes=l.nodes.concat(s.cpuProfile.nodes)),s.cpuProfile.samples&&(l.samples=l.samples.concat(s.cpuProfile.samples))),s.timeDeltas&&(l.timeDeltas=l.timeDeltas.concat(s.timeDeltas)),s.startTime!=null&&(l.startTime=s.startTime),s.endTime!=null&&(l.endTime=s.endTime)}else console.warn(`Ignoring ProfileChunk for undeclared Profile with id ${o.id||i}`)}}if(n.size>0){let o=[],i=0;return OA(n.keys(),l=>{let s=null,A=a.get(l);A&&(s=r.get(A)||null);let c=Eo(n.get(l));s&&n.size>1?(c.setName(`${e} - ${s}`),s==="CrRendererMain"&&(i=o.length)):c.setName(`${e}`),o.push(c)}),{name:e,indexToView:i,profiles:o}}else throw new Error("Could not find CPU profile in Timeline")}function dl(t){return ke(dI,t,e=>{let n=e.url,a=e.lineNumber;a!=null&&a++;let r=e.columnNumber;r!=null&&r++;let o=e.functionName||(n?`(anonymous ${n.split("/").pop()}:${a})`:"(anonymous)");return{key:`${o}:${n}:${a}:${r}`,name:o,file:n,line:a,col:r}})}function uI(t){let{functionName:e,url:n}=t;return n==="native dummy.js"?!0:e==="(root)"||e==="(idle)"}function uh(t){return t==="(garbage collector)"||t==="(program)"}function Eo(t){let e=new me(t.endTime-t.startTime),n=new Map;for(let A of t.nodes)n.set(A.id,A);for(let A of t.nodes)if(typeof A.parent=="number"&&(A.parent=n.get(A.parent)),!!A.children)for(let c of A.children){let h=n.get(c);h&&(h.parent=A)}let a=[],r=[],o=t.timeDeltas[0],i=o,l=NaN;for(let A=0;A0&&ne(s)!=f;){let u=s.pop(),g=dl(u.callFrame);e.leaveFrame(g,c)}let m=[];for(let u=_;u&&u!=f&&!uI(u.callFrame);u=uh(u.callFrame.functionName)?ne(s):u.parent||null)m.push(u);m.reverse();for(let u of m)e.enterFrame(dl(u.callFrame),c);s=s.concat(m)}for(let A=s.length-1;A>=0;A--)e.leaveFrame(dl(s[A].callFrame),ne(r));return e.setValueFormatter(new ee("microseconds")),e.build()}function ph(t){return Eo(gh(t))}var dI,Ch=le(()=>{"use strict";Re();W();Me();dh();dI=new Map});function fl(t){let{frames:e,mode:n,raw:a,raw_timestamp_deltas:r,interval:o}=t,i=new ae;i.setValueFormatter(new ee("microseconds"));let l=0,s=[];for(let A=0;A{"use strict";Re();Me()});var Zt=S(Pe=>{"use strict";var fI=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function pI(t,e){return Object.prototype.hasOwnProperty.call(t,e)}Pe.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(var a in n)pI(n,a)&&(t[a]=n[a])}}return t};Pe.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var CI={arraySet:function(t,e,n,a,r){if(e.subarray&&t.subarray){t.set(e.subarray(n,n+a),r);return}for(var o=0;o{"use strict";var II=Zt(),yI=4,Ih=0,yh=1,vI=2;function ar(t){for(var e=t.length;--e>=0;)t[e]=0}var EI=0,wh=1,BI=2,jI=3,QI=258,El=29,Jr=256,Lr=Jr+1+El,rr=30,Bl=19,bh=2*Lr+1,wn=15,pl=16,wI=7,jl=256,xh=16,Sh=17,Nh=18,yl=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Bo=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bI=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],kh=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],xI=512,Xt=new Array((Lr+2)*2);ar(Xt);var Fr=new Array(rr*2);ar(Fr);var Tr=new Array(xI);ar(Tr);var Hr=new Array(QI-jI+1);ar(Hr);var Ql=new Array(El);ar(Ql);var jo=new Array(rr);ar(jo);function Cl(t,e,n,a,r){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=a,this.max_length=r,this.has_stree=t&&t.length}var Dh,Rh,Fh;function ml(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function Lh(t){return t<256?Tr[t]:Tr[256+(t>>>7)]}function Mr(t,e){t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255}function Ve(t,e,n){t.bi_valid>pl-n?(t.bi_buf|=e<>pl-t.bi_valid,t.bi_valid+=n-pl):(t.bi_buf|=e<>>=1,n<<=1;while(--e>0);return n>>>1}function SI(t){t.bi_valid===16?(Mr(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)}function NI(t,e){var n=e.dyn_tree,a=e.max_code,r=e.stat_desc.static_tree,o=e.stat_desc.has_stree,i=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,s=e.stat_desc.max_length,A,c,h,_,f,m,u=0;for(_=0;_<=wn;_++)t.bl_count[_]=0;for(n[t.heap[t.heap_max]*2+1]=0,A=t.heap_max+1;As&&(_=s,u++),n[c*2+1]=_,!(c>a)&&(t.bl_count[_]++,f=0,c>=l&&(f=i[c-l]),m=n[c*2],t.opt_len+=m*(_+f),o&&(t.static_len+=m*(r[c*2+1]+f)));if(u!==0){do{for(_=s-1;t.bl_count[_]===0;)_--;t.bl_count[_]--,t.bl_count[_+1]+=2,t.bl_count[s]--,u-=2}while(u>0);for(_=s;_!==0;_--)for(c=t.bl_count[_];c!==0;)h=t.heap[--A],!(h>a)&&(n[h*2+1]!==_&&(t.opt_len+=(_-n[h*2+1])*n[h*2],n[h*2+1]=_),c--)}}function Hh(t,e,n){var a=new Array(wn+1),r=0,o,i;for(o=1;o<=wn;o++)a[o]=r=r+n[o-1]<<1;for(i=0;i<=e;i++){var l=t[i*2+1];l!==0&&(t[i*2]=Th(a[l]++,l))}}function kI(){var t,e,n,a,r,o=new Array(wn+1);for(n=0,a=0;a>=7;a8?Mr(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function DI(t,e,n,a){Jh(t),a&&(Mr(t,n),Mr(t,~n)),II.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}function vh(t,e,n,a){var r=e*2,o=n*2;return t[r]>1;i>=1;i--)Il(t,n,i);A=o;do i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Il(t,n,1),l=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=l,n[A*2]=n[i*2]+n[l*2],t.depth[A]=(t.depth[i]>=t.depth[l]?t.depth[i]:t.depth[l])+1,n[i*2+1]=n[l*2+1]=A,t.heap[1]=A++,Il(t,n,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],NI(t,e),Hh(n,s,t.bl_count)}function Bh(t,e,n){var a,r=-1,o,i=e[0*2+1],l=0,s=7,A=4;for(i===0&&(s=138,A=3),e[(n+1)*2+1]=65535,a=0;a<=n;a++)o=i,i=e[(a+1)*2+1],!(++l=3&&t.bl_tree[kh[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e}function FI(t,e,n,a){var r;for(Ve(t,e-257,5),Ve(t,n-1,5),Ve(t,a-4,4),r=0;r>>=1)if(e&1&&t.dyn_ltree[n*2]!==0)return Ih;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return yh;for(n=32;n0?(t.strm.data_type===vI&&(t.strm.data_type=LI(t)),vl(t,t.l_desc),vl(t,t.d_desc),i=RI(t),r=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=r&&(r=o)):r=o=n+5,n+4<=r&&e!==-1?Uh(t,e,n,a):t.strategy===yI||o===r?(Ve(t,(wh<<1)+(a?1:0),3),Eh(t,Xt,Fr)):(Ve(t,(BI<<1)+(a?1:0),3),FI(t,t.l_desc.max_code+1,t.d_desc.max_code+1,i+1),Eh(t,t.dyn_ltree,t.dyn_dtree)),Mh(t),a&&Jh(t)}function JI(t,e,n){return t.pending_buf[t.d_buf+t.last_lit*2]=e>>>8&255,t.pending_buf[t.d_buf+t.last_lit*2+1]=e&255,t.pending_buf[t.l_buf+t.last_lit]=n&255,t.last_lit++,e===0?t.dyn_ltree[n*2]++:(t.matches++,e--,t.dyn_ltree[(Hr[n]+Jr+1)*2]++,t.dyn_dtree[Lh(e)*2]++),t.last_lit===t.lit_bufsize-1}or._tr_init=TI;or._tr_stored_block=Uh;or._tr_flush_block=MI;or._tr_tally=JI;or._tr_align=HI});var wl=S((Ex,Ph)=>{"use strict";function UI(t,e,n,a){for(var r=t&65535|0,o=t>>>16&65535|0,i=0;n!==0;){i=n>2e3?2e3:n,n-=i;do r=r+e[a++]|0,o=o+r|0;while(--i);r%=65521,o%=65521}return r|o<<16|0}Ph.exports=UI});var bl=S((Bx,Oh)=>{"use strict";function KI(){for(var t,e=[],n=0;n<256;n++){t=n;for(var a=0;a<8;a++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e}var PI=KI();function OI(t,e,n,a){var r=PI,o=a+n;t^=-1;for(var i=a;i>>8^r[(t^e[i])&255];return t^-1}Oh.exports=OI});var Qo=S((jx,Gh)=>{"use strict";Gh.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var eg=S(Tt=>{"use strict";var Oe=Zt(),ct=Kh(),Wh=wl(),sn=bl(),GI=Qo(),Nn=0,zI=1,VI=3,dn=4,zh=5,Lt=0,Vh=1,_t=-2,YI=-3,xl=-5,WI=-1,qI=1,wo=2,$I=3,ZI=4,XI=0,ey=2,No=8,ty=9,ny=15,ry=8,ay=29,oy=256,Nl=oy+1+ay,iy=30,ly=19,Ay=2*Nl+1,sy=15,Y=3,hn=258,It=hn+Y+1,cy=32,ko=42,kl=69,bo=73,xo=91,So=103,bn=113,Kr=666,Be=1,Pr=2,xn=3,Ar=4,_y=3;function gn(t,e){return t.msg=GI[e],e}function Yh(t){return(t<<1)-(t>4?9:0)}function _n(t){for(var e=t.length;--e>=0;)t[e]=0}function cn(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),n!==0&&(Oe.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,e.pending===0&&(e.pending_out=0))}function Le(t,e){ct._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,cn(t.strm)}function $(t,e){t.pending_buf[t.pending++]=e}function Ur(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255}function hy(t,e,n,a){var r=t.avail_in;return r>a&&(r=a),r===0?0:(t.avail_in-=r,Oe.arraySet(e,t.input,t.next_in,r,n),t.state.wrap===1?t.adler=Wh(t.adler,e,r,n):t.state.wrap===2&&(t.adler=sn(t.adler,e,r,n)),t.next_in+=r,t.total_in+=r,r)}function qh(t,e){var n=t.max_chain_length,a=t.strstart,r,o,i=t.prev_length,l=t.nice_match,s=t.strstart>t.w_size-It?t.strstart-(t.w_size-It):0,A=t.window,c=t.w_mask,h=t.prev,_=t.strstart+hn,f=A[a+i-1],m=A[a+i];t.prev_length>=t.good_match&&(n>>=2),l>t.lookahead&&(l=t.lookahead);do if(r=e,!(A[r+i]!==m||A[r+i-1]!==f||A[r]!==A[a]||A[++r]!==A[a+1])){a+=2,r++;do;while(A[++a]===A[++r]&&A[++a]===A[++r]&&A[++a]===A[++r]&&A[++a]===A[++r]&&A[++a]===A[++r]&&A[++a]===A[++r]&&A[++a]===A[++r]&&A[++a]===A[++r]&&a<_);if(o=hn-(_-a),a=_-hn,o>i){if(t.match_start=e,i=o,o>=l)break;f=A[a+i-1],m=A[a+i]}}while((e=h[e&c])>s&&--n!==0);return i<=t.lookahead?i:t.lookahead}function Sn(t){var e=t.w_size,n,a,r,o,i;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-It)){Oe.arraySet(t.window,t.window,e,e,0),t.match_start-=e,t.strstart-=e,t.block_start-=e,a=t.hash_size,n=a;do r=t.head[--n],t.head[n]=r>=e?r-e:0;while(--a);a=e,n=a;do r=t.prev[--n],t.prev[n]=r>=e?r-e:0;while(--a);o+=e}if(t.strm.avail_in===0)break;if(a=hy(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=a,t.lookahead+t.insert>=Y)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Sn(t),t.lookahead===0&&e===Nn)return Be;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var a=t.block_start+n;if((t.strstart===0||t.strstart>=a)&&(t.lookahead=t.strstart-a,t.strstart=a,Le(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-It&&(Le(t,!1),t.strm.avail_out===0))return Be}return t.insert=0,e===dn?(Le(t,!0),t.strm.avail_out===0?xn:Ar):(t.strstart>t.block_start&&(Le(t,!1),t.strm.avail_out===0),Be)}function Sl(t,e){for(var n,a;;){if(t.lookahead=Y&&(t.ins_h=(t.ins_h<=Y)if(a=ct._tr_tally(t,t.strstart-t.match_start,t.match_length-Y),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=Y){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=Y&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=Y-1)),t.prev_length>=Y&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-Y,a=ct._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-Y),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=r&&(t.ins_h=(t.ins_h<=Y&&t.strstart>0&&(r=t.strstart-1,a=i[r],a===i[++r]&&a===i[++r]&&a===i[++r])){o=t.strstart+hn;do;while(a===i[++r]&&a===i[++r]&&a===i[++r]&&a===i[++r]&&a===i[++r]&&a===i[++r]&&a===i[++r]&&a===i[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=Y?(n=ct._tr_tally(t,1,t.match_length-Y),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=ct._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(Le(t,!1),t.strm.avail_out===0))return Be}return t.insert=0,e===dn?(Le(t,!0),t.strm.avail_out===0?xn:Ar):t.last_lit&&(Le(t,!1),t.strm.avail_out===0)?Be:Pr}function uy(t,e){for(var n;;){if(t.lookahead===0&&(Sn(t),t.lookahead===0)){if(e===Nn)return Be;break}if(t.match_length=0,n=ct._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(Le(t,!1),t.strm.avail_out===0))return Be}return t.insert=0,e===dn?(Le(t,!0),t.strm.avail_out===0?xn:Ar):t.last_lit&&(Le(t,!1),t.strm.avail_out===0)?Be:Pr}function Ft(t,e,n,a,r){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=a,this.func=r}var lr;lr=[new Ft(0,0,0,0,gy),new Ft(4,4,8,4,Sl),new Ft(4,5,16,8,Sl),new Ft(4,6,32,32,Sl),new Ft(4,4,16,16,ir),new Ft(8,16,32,32,ir),new Ft(8,16,128,128,ir),new Ft(8,32,128,256,ir),new Ft(32,128,258,1024,ir),new Ft(32,258,258,4096,ir)];function fy(t){t.window_size=2*t.w_size,_n(t.head),t.max_lazy_match=lr[t.level].max_lazy,t.good_match=lr[t.level].good_length,t.nice_match=lr[t.level].nice_length,t.max_chain_length=lr[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=Y-1,t.match_available=0,t.ins_h=0}function py(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=No,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Oe.Buf16(Ay*2),this.dyn_dtree=new Oe.Buf16((2*iy+1)*2),this.bl_tree=new Oe.Buf16((2*ly+1)*2),_n(this.dyn_ltree),_n(this.dyn_dtree),_n(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Oe.Buf16(sy+1),this.heap=new Oe.Buf16(2*Nl+1),_n(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Oe.Buf16(2*Nl+1),_n(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function $h(t){var e;return!t||!t.state?gn(t,_t):(t.total_in=t.total_out=0,t.data_type=ey,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ko:bn,t.adler=e.wrap===2?0:1,e.last_flush=Nn,ct._tr_init(e),Lt)}function Zh(t){var e=$h(t);return e===Lt&&fy(t.state),e}function Cy(t,e){return!t||!t.state||t.state.wrap!==2?_t:(t.state.gzhead=e,Lt)}function Xh(t,e,n,a,r,o){if(!t)return _t;var i=1;if(e===WI&&(e=6),a<0?(i=0,a=-a):a>15&&(i=2,a-=16),r<1||r>ty||n!==No||a<8||a>15||e<0||e>9||o<0||o>ZI)return gn(t,_t);a===8&&(a=9);var l=new py;return t.state=l,l.strm=t,l.wrap=i,l.gzhead=null,l.w_bits=a,l.w_size=1<zh||e<0)return t?gn(t,_t):_t;if(a=t.state,!t.output||!t.input&&t.avail_in!==0||a.status===Kr&&e!==dn)return gn(t,t.avail_out===0?xl:_t);if(a.strm=t,n=a.last_flush,a.last_flush=e,a.status===ko)if(a.wrap===2)t.adler=0,$(a,31),$(a,139),$(a,8),a.gzhead?($(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),$(a,a.gzhead.time&255),$(a,a.gzhead.time>>8&255),$(a,a.gzhead.time>>16&255),$(a,a.gzhead.time>>24&255),$(a,a.level===9?2:a.strategy>=wo||a.level<2?4:0),$(a,a.gzhead.os&255),a.gzhead.extra&&a.gzhead.extra.length&&($(a,a.gzhead.extra.length&255),$(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=sn(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=kl):($(a,0),$(a,0),$(a,0),$(a,0),$(a,0),$(a,a.level===9?2:a.strategy>=wo||a.level<2?4:0),$(a,_y),a.status=bn);else{var i=No+(a.w_bits-8<<4)<<8,l=-1;a.strategy>=wo||a.level<2?l=0:a.level<6?l=1:a.level===6?l=2:l=3,i|=l<<6,a.strstart!==0&&(i|=cy),i+=31-i%31,a.status=bn,Ur(a,i),a.strstart!==0&&(Ur(a,t.adler>>>16),Ur(a,t.adler&65535)),t.adler=1}if(a.status===kl)if(a.gzhead.extra){for(r=a.pending;a.gzindex<(a.gzhead.extra.length&65535)&&!(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(t.adler=sn(t.adler,a.pending_buf,a.pending-r,r)),cn(t),r=a.pending,a.pending===a.pending_buf_size));)$(a,a.gzhead.extra[a.gzindex]&255),a.gzindex++;a.gzhead.hcrc&&a.pending>r&&(t.adler=sn(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=bo)}else a.status=bo;if(a.status===bo)if(a.gzhead.name){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(t.adler=sn(t.adler,a.pending_buf,a.pending-r,r)),cn(t),r=a.pending,a.pending===a.pending_buf_size)){o=1;break}a.gzindexr&&(t.adler=sn(t.adler,a.pending_buf,a.pending-r,r)),o===0&&(a.gzindex=0,a.status=xo)}else a.status=xo;if(a.status===xo)if(a.gzhead.comment){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(t.adler=sn(t.adler,a.pending_buf,a.pending-r,r)),cn(t),r=a.pending,a.pending===a.pending_buf_size)){o=1;break}a.gzindexr&&(t.adler=sn(t.adler,a.pending_buf,a.pending-r,r)),o===0&&(a.status=So)}else a.status=So;if(a.status===So&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&cn(t),a.pending+2<=a.pending_buf_size&&($(a,t.adler&255),$(a,t.adler>>8&255),t.adler=0,a.status=bn)):a.status=bn),a.pending!==0){if(cn(t),t.avail_out===0)return a.last_flush=-1,Lt}else if(t.avail_in===0&&Yh(e)<=Yh(n)&&e!==dn)return gn(t,xl);if(a.status===Kr&&t.avail_in!==0)return gn(t,xl);if(t.avail_in!==0||a.lookahead!==0||e!==Nn&&a.status!==Kr){var s=a.strategy===wo?uy(a,e):a.strategy===$I?dy(a,e):lr[a.level].func(a,e);if((s===xn||s===Ar)&&(a.status=Kr),s===Be||s===xn)return t.avail_out===0&&(a.last_flush=-1),Lt;if(s===Pr&&(e===zI?ct._tr_align(a):e!==zh&&(ct._tr_stored_block(a,0,0,!1),e===VI&&(_n(a.head),a.lookahead===0&&(a.strstart=0,a.block_start=0,a.insert=0))),cn(t),t.avail_out===0))return a.last_flush=-1,Lt}return e!==dn?Lt:a.wrap<=0?Vh:(a.wrap===2?($(a,t.adler&255),$(a,t.adler>>8&255),$(a,t.adler>>16&255),$(a,t.adler>>24&255),$(a,t.total_in&255),$(a,t.total_in>>8&255),$(a,t.total_in>>16&255),$(a,t.total_in>>24&255)):(Ur(a,t.adler>>>16),Ur(a,t.adler&65535)),cn(t),a.wrap>0&&(a.wrap=-a.wrap),a.pending!==0?Lt:Vh)}function yy(t){var e;return!t||!t.state?_t:(e=t.state.status,e!==ko&&e!==kl&&e!==bo&&e!==xo&&e!==So&&e!==bn&&e!==Kr?gn(t,_t):(t.state=null,e===bn?gn(t,YI):Lt))}function vy(t,e){var n=e.length,a,r,o,i,l,s,A,c;if(!t||!t.state||(a=t.state,i=a.wrap,i===2||i===1&&a.status!==ko||a.lookahead))return _t;for(i===1&&(t.adler=Wh(t.adler,e,n,0)),a.wrap=0,n>=a.w_size&&(i===0&&(_n(a.head),a.strstart=0,a.block_start=0,a.insert=0),c=new Oe.Buf8(a.w_size),Oe.arraySet(c,e,n-a.w_size,a.w_size,0),e=c,n=a.w_size),l=t.avail_in,s=t.next_in,A=t.input,t.avail_in=n,t.next_in=0,t.input=e,Sn(a);a.lookahead>=Y;){r=a.strstart,o=a.lookahead-(Y-1);do a.ins_h=(a.ins_h<{"use strict";var Do=Zt(),tg=!0,ng=!0;try{String.fromCharCode.apply(null,[0])}catch{tg=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{ng=!1}var Or=new Do.Buf8(256);for(en=0;en<256;en++)Or[en]=en>=252?6:en>=248?5:en>=240?4:en>=224?3:en>=192?2:1;var en;Or[254]=Or[254]=1;sr.string2buf=function(t){var e,n,a,r,o,i=t.length,l=0;for(r=0;r>>6,e[o++]=128|n&63):n<65536?(e[o++]=224|n>>>12,e[o++]=128|n>>>6&63,e[o++]=128|n&63):(e[o++]=240|n>>>18,e[o++]=128|n>>>12&63,e[o++]=128|n>>>6&63,e[o++]=128|n&63);return e};function rg(t,e){if(e<65537&&(t.subarray&&ng||!t.subarray&&tg))return String.fromCharCode.apply(null,Do.shrinkBuf(t,e));for(var n="",a=0;a4){l[a++]=65533,n+=o-1;continue}for(r&=o===2?31:o===3?15:7;o>1&&n1){l[a++]=65533;continue}r<65536?l[a++]=r:(r-=65536,l[a++]=55296|r>>10&1023,l[a++]=56320|r&1023)}return rg(l,a)};sr.utf8border=function(t,e){var n;for(e=e||t.length,e>t.length&&(e=t.length),n=e-1;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+Or[t[n]]>e?n:e}});var Rl=S((bx,ag)=>{"use strict";function Ey(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}ag.exports=Ey});var Ag=S(Vr=>{"use strict";var Gr=eg(),zr=Zt(),Ll=Dl(),Tl=Qo(),By=Rl(),lg=Object.prototype.toString,jy=0,Fl=4,cr=0,og=1,ig=2,Qy=-1,wy=0,by=8;function kn(t){if(!(this instanceof kn))return new kn(t);this.options=zr.assign({level:Qy,method:by,chunkSize:16384,windowBits:15,memLevel:8,strategy:wy,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new By,this.strm.avail_out=0;var n=Gr.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==cr)throw new Error(Tl[n]);if(e.header&&Gr.deflateSetHeader(this.strm,e.header),e.dictionary){var a;if(typeof e.dictionary=="string"?a=Ll.string2buf(e.dictionary):lg.call(e.dictionary)==="[object ArrayBuffer]"?a=new Uint8Array(e.dictionary):a=e.dictionary,n=Gr.deflateSetDictionary(this.strm,a),n!==cr)throw new Error(Tl[n]);this._dict_set=!0}}kn.prototype.push=function(t,e){var n=this.strm,a=this.options.chunkSize,r,o;if(this.ended)return!1;o=e===~~e?e:e===!0?Fl:jy,typeof t=="string"?n.input=Ll.string2buf(t):lg.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new zr.Buf8(a),n.next_out=0,n.avail_out=a),r=Gr.deflate(n,o),r!==og&&r!==cr)return this.onEnd(r),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(o===Fl||o===ig))&&(this.options.to==="string"?this.onData(Ll.buf2binstring(zr.shrinkBuf(n.output,n.next_out))):this.onData(zr.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&r!==og);return o===Fl?(r=Gr.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===cr):(o===ig&&(this.onEnd(cr),n.avail_out=0),!0)};kn.prototype.onData=function(t){this.chunks.push(t)};kn.prototype.onEnd=function(t){t===cr&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=zr.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Hl(t,e){var n=new kn(e);if(n.push(t,!0),n.err)throw n.msg||Tl[n.err];return n.result}function xy(t,e){return e=e||{},e.raw=!0,Hl(t,e)}function Sy(t,e){return e=e||{},e.gzip=!0,Hl(t,e)}Vr.Deflate=kn;Vr.deflate=Hl;Vr.deflateRaw=xy;Vr.gzip=Sy});var cg=S((Sx,sg)=>{"use strict";var Ro=30,Ny=12;sg.exports=function(e,n){var a,r,o,i,l,s,A,c,h,_,f,m,u,g,p,I,y,B,E,b,D,T,Q,w,N;a=e.state,r=e.next_in,w=e.input,o=r+(e.avail_in-5),i=e.next_out,N=e.output,l=i-(n-e.avail_out),s=i+(e.avail_out-257),A=a.dmax,c=a.wsize,h=a.whave,_=a.wnext,f=a.window,m=a.hold,u=a.bits,g=a.lencode,p=a.distcode,I=(1<>>24,m>>>=E,u-=E,E=B>>>16&255,E===0)N[i++]=B&65535;else if(E&16){b=B&65535,E&=15,E&&(u>>=E,u-=E),u<15&&(m+=w[r++]<>>24,m>>>=E,u-=E,E=B>>>16&255,E&16){if(D=B&65535,E&=15,uA){e.msg="invalid distance too far back",a.mode=Ro;break e}if(m>>>=E,u-=E,E=i-l,D>E){if(E=D-E,E>h&&a.sane){e.msg="invalid distance too far back",a.mode=Ro;break e}if(T=0,Q=f,_===0){if(T+=c-E,E2;)N[i++]=Q[T++],N[i++]=Q[T++],N[i++]=Q[T++],b-=3;b&&(N[i++]=Q[T++],b>1&&(N[i++]=Q[T++]))}else{T=i-D;do N[i++]=N[T++],N[i++]=N[T++],N[i++]=N[T++],b-=3;while(b>2);b&&(N[i++]=N[T++],b>1&&(N[i++]=N[T++]))}}else if(E&64){e.msg="invalid distance code",a.mode=Ro;break e}else{B=p[(B&65535)+(m&(1<>3,r-=b,u-=b<<3,m&=(1<{"use strict";var _g=Zt(),_r=15,hg=852,gg=592,dg=0,Ml=1,ug=2,ky=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Dy=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Ry=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Fy=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];fg.exports=function(e,n,a,r,o,i,l,s){var A=s.bits,c=0,h=0,_=0,f=0,m=0,u=0,g=0,p=0,I=0,y=0,B,E,b,D,T,Q=null,w=0,N,te=new _g.Buf16(_r+1),rt=new _g.Buf16(_r+1),at=null,pt=0,rn,jt,Jt;for(c=0;c<=_r;c++)te[c]=0;for(h=0;h=1&&te[f]===0;f--);if(m>f&&(m=f),f===0)return o[i++]=1<<24|64<<16|0,o[i++]=1<<24|64<<16|0,s.bits=1,0;for(_=1;_0&&(e===dg||f!==1))return-1;for(rt[1]=0,c=1;c<_r;c++)rt[c+1]=rt[c]+te[c];for(h=0;hhg||e===ug&&I>gg)return 1;for(;;){rn=c-g,l[h]N?(jt=at[pt+l[h]],Jt=Q[w+l[h]]):(jt=96,Jt=0),B=1<>g)+E]=rn<<24|jt<<16|Jt|0;while(E!==0);for(B=1<>=1;if(B!==0?(y&=B-1,y+=B):y=0,h++,--te[c]===0){if(c===f)break;c=n[a+l[h]]}if(c>m&&(y&D)!==b){for(g===0&&(g=m),T+=_,u=c-g,p=1<hg||e===ug&&I>gg)return 1;b=y&D,o[b]=m<<24|u<<16|T-i|0}}return y!==0&&(o[T+y]=c-g<<24|64<<16|0),s.bits=m,0}});var Zg=S(yt=>{"use strict";var tt=Zt(),Gl=wl(),Ht=bl(),Ly=cg(),Yr=pg(),Ty=0,Pg=1,Og=2,Cg=4,Hy=5,Fo=6,Dn=0,My=1,Jy=2,ht=-2,Gg=-3,zl=-4,Uy=-5,mg=8,zg=1,Ig=2,yg=3,vg=4,Eg=5,Bg=6,jg=7,Qg=8,wg=9,bg=10,Ho=11,tn=12,Jl=13,xg=14,Ul=15,Sg=16,Ng=17,kg=18,Dg=19,Lo=20,To=21,Rg=22,Fg=23,Lg=24,Tg=25,Hg=26,Kl=27,Mg=28,Jg=29,se=30,Vl=31,Ky=32,Py=852,Oy=592,Gy=15,zy=Gy;function Ug(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function Vy(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new tt.Buf16(320),this.work=new tt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Vg(t){var e;return!t||!t.state?ht:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=zg,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new tt.Buf32(Py),e.distcode=e.distdyn=new tt.Buf32(Oy),e.sane=1,e.back=-1,Dn)}function Yg(t){var e;return!t||!t.state?ht:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,Vg(t))}function Wg(t,e){var n,a;return!t||!t.state||(a=t.state,e<0?(n=0,e=-e):(n=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?ht:(a.window!==null&&a.wbits!==e&&(a.window=null),a.wrap=n,a.wbits=e,Yg(t))}function qg(t,e){var n,a;return t?(a=new Vy,t.state=a,a.window=null,n=Wg(t,e),n!==Dn&&(t.state=null),n):ht}function Yy(t){return qg(t,zy)}var Kg=!0,Pl,Ol;function Wy(t){if(Kg){var e;for(Pl=new tt.Buf32(512),Ol=new tt.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Yr(Pg,t.lens,0,288,Pl,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Yr(Og,t.lens,0,32,Ol,0,t.work,{bits:5}),Kg=!1}t.lencode=Pl,t.lenbits=9,t.distcode=Ol,t.distbits=5}function $g(t,e,n,a){var r,o=t.state;return o.window===null&&(o.wsize=1<=o.wsize?(tt.arraySet(o.window,e,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>a&&(r=a),tt.arraySet(o.window,e,n-a,r,o.wnext),a-=r,a?(tt.arraySet(o.window,e,n-a,a,0),o.wnext=a,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=Ht(n.check,Q,2,0),A=0,c=0,n.mode=Ig;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((A&255)<<8)+(A>>8))%31){t.msg="incorrect header check",n.mode=se;break}if((A&15)!==mg){t.msg="unknown compression method",n.mode=se;break}if(A>>>=4,c-=4,D=(A&15)+8,n.wbits===0)n.wbits=D;else if(D>n.wbits){t.msg="invalid window size",n.mode=se;break}n.dmax=1<>8&1),n.flags&512&&(Q[0]=A&255,Q[1]=A>>>8&255,n.check=Ht(n.check,Q,2,0)),A=0,c=0,n.mode=yg;case yg:for(;c<32;){if(l===0)break e;l--,A+=a[o++]<>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,n.check=Ht(n.check,Q,4,0)),A=0,c=0,n.mode=vg;case vg:for(;c<16;){if(l===0)break e;l--,A+=a[o++]<>8),n.flags&512&&(Q[0]=A&255,Q[1]=A>>>8&255,n.check=Ht(n.check,Q,2,0)),A=0,c=0,n.mode=Eg;case Eg:if(n.flags&1024){for(;c<16;){if(l===0)break e;l--,A+=a[o++]<>>8&255,n.check=Ht(n.check,Q,2,0)),A=0,c=0}else n.head&&(n.head.extra=null);n.mode=Bg;case Bg:if(n.flags&1024&&(f=n.length,f>l&&(f=l),f&&(n.head&&(D=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),tt.arraySet(n.head.extra,a,o,f,D)),n.flags&512&&(n.check=Ht(n.check,a,f,o)),l-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=jg;case jg:if(n.flags&2048){if(l===0)break e;f=0;do D=a[o+f++],n.head&&D&&n.length<65536&&(n.head.name+=String.fromCharCode(D));while(D&&f>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=tn;break;case bg:for(;c<32;){if(l===0)break e;l--,A+=a[o++]<>>=c&7,c-=c&7,n.mode=Kl;break}for(;c<3;){if(l===0)break e;l--,A+=a[o++]<>>=1,c-=1,A&3){case 0:n.mode=xg;break;case 1:if(Wy(n),n.mode=Lo,e===Fo){A>>>=2,c-=2;break e}break;case 2:n.mode=Ng;break;case 3:t.msg="invalid block type",n.mode=se}A>>>=2,c-=2;break;case xg:for(A>>>=c&7,c-=c&7;c<32;){if(l===0)break e;l--,A+=a[o++]<>>16^65535)){t.msg="invalid stored block lengths",n.mode=se;break}if(n.length=A&65535,A=0,c=0,n.mode=Ul,e===Fo)break e;case Ul:n.mode=Sg;case Sg:if(f=n.length,f){if(f>l&&(f=l),f>s&&(f=s),f===0)break e;tt.arraySet(r,a,o,f,i),l-=f,o+=f,s-=f,i+=f,n.length-=f;break}n.mode=tn;break;case Ng:for(;c<14;){if(l===0)break e;l--,A+=a[o++]<>>=5,c-=5,n.ndist=(A&31)+1,A>>>=5,c-=5,n.ncode=(A&15)+4,A>>>=4,c-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=se;break}n.have=0,n.mode=kg;case kg:for(;n.have>>=3,c-=3}for(;n.have<19;)n.lens[te[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,w={bits:n.lenbits},T=Yr(Ty,n.lens,0,19,n.lencode,0,n.work,w),n.lenbits=w.bits,T){t.msg="invalid code lengths set",n.mode=se;break}n.have=0,n.mode=Dg;case Dg:for(;n.have>>24,I=g>>>16&255,y=g&65535,!(p<=c);){if(l===0)break e;l--,A+=a[o++]<>>=p,c-=p,n.lens[n.have++]=y;else{if(y===16){for(N=p+2;c>>=p,c-=p,n.have===0){t.msg="invalid bit length repeat",n.mode=se;break}D=n.lens[n.have-1],f=3+(A&3),A>>>=2,c-=2}else if(y===17){for(N=p+3;c>>=p,c-=p,D=0,f=3+(A&7),A>>>=3,c-=3}else{for(N=p+7;c>>=p,c-=p,D=0,f=11+(A&127),A>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=se;break}for(;f--;)n.lens[n.have++]=D}}if(n.mode===se)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=se;break}if(n.lenbits=9,w={bits:n.lenbits},T=Yr(Pg,n.lens,0,n.nlen,n.lencode,0,n.work,w),n.lenbits=w.bits,T){t.msg="invalid literal/lengths set",n.mode=se;break}if(n.distbits=6,n.distcode=n.distdyn,w={bits:n.distbits},T=Yr(Og,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,w),n.distbits=w.bits,T){t.msg="invalid distances set",n.mode=se;break}if(n.mode=Lo,e===Fo)break e;case Lo:n.mode=To;case To:if(l>=6&&s>=258){t.next_out=i,t.avail_out=s,t.next_in=o,t.avail_in=l,n.hold=A,n.bits=c,Ly(t,_),i=t.next_out,r=t.output,s=t.avail_out,o=t.next_in,a=t.input,l=t.avail_in,A=n.hold,c=n.bits,n.mode===tn&&(n.back=-1);break}for(n.back=0;g=n.lencode[A&(1<>>24,I=g>>>16&255,y=g&65535,!(p<=c);){if(l===0)break e;l--,A+=a[o++]<>B)],p=g>>>24,I=g>>>16&255,y=g&65535,!(B+p<=c);){if(l===0)break e;l--,A+=a[o++]<>>=B,c-=B,n.back+=B}if(A>>>=p,c-=p,n.back+=p,n.length=y,I===0){n.mode=Hg;break}if(I&32){n.back=-1,n.mode=tn;break}if(I&64){t.msg="invalid literal/length code",n.mode=se;break}n.extra=I&15,n.mode=Rg;case Rg:if(n.extra){for(N=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Fg;case Fg:for(;g=n.distcode[A&(1<>>24,I=g>>>16&255,y=g&65535,!(p<=c);){if(l===0)break e;l--,A+=a[o++]<>B)],p=g>>>24,I=g>>>16&255,y=g&65535,!(B+p<=c);){if(l===0)break e;l--,A+=a[o++]<>>=B,c-=B,n.back+=B}if(A>>>=p,c-=p,n.back+=p,I&64){t.msg="invalid distance code",n.mode=se;break}n.offset=y,n.extra=I&15,n.mode=Lg;case Lg:if(n.extra){for(N=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=se;break}n.mode=Tg;case Tg:if(s===0)break e;if(f=_-s,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=se;break}f>n.wnext?(f-=n.wnext,m=n.wsize-f):m=n.wnext-f,f>n.length&&(f=n.length),u=n.window}else u=r,m=i-n.offset,f=n.length;f>s&&(f=s),s-=f,n.length-=f;do r[i++]=u[m++];while(--f);n.length===0&&(n.mode=To);break;case Hg:if(s===0)break e;r[i++]=n.length,s--,n.mode=To;break;case Kl:if(n.wrap){for(;c<32;){if(l===0)break e;l--,A|=a[o++]<{"use strict";Xg.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var td=S((Rx,ed)=>{"use strict";function ev(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}ed.exports=ev});var ad=S($r=>{"use strict";var Wr=Zg(),qr=Zt(),Mo=Dl(),ye=Yl(),rd=Qo(),tv=Rl(),nv=td(),nd=Object.prototype.toString;function Rn(t){if(!(this instanceof Rn))return new Rn(t);this.options=qr.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new tv,this.strm.avail_out=0;var n=Wr.inflateInit2(this.strm,e.windowBits);if(n!==ye.Z_OK)throw new Error(rd[n]);this.header=new nv,Wr.inflateGetHeader(this.strm,this.header)}Rn.prototype.push=function(t,e){var n=this.strm,a=this.options.chunkSize,r=this.options.dictionary,o,i,l,s,A,c,h=!1;if(this.ended)return!1;i=e===~~e?e:e===!0?ye.Z_FINISH:ye.Z_NO_FLUSH,typeof t=="string"?n.input=Mo.binstring2buf(t):nd.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new qr.Buf8(a),n.next_out=0,n.avail_out=a),o=Wr.inflate(n,ye.Z_NO_FLUSH),o===ye.Z_NEED_DICT&&r&&(typeof r=="string"?c=Mo.string2buf(r):nd.call(r)==="[object ArrayBuffer]"?c=new Uint8Array(r):c=r,o=Wr.inflateSetDictionary(this.strm,c)),o===ye.Z_BUF_ERROR&&h===!0&&(o=ye.Z_OK,h=!1),o!==ye.Z_STREAM_END&&o!==ye.Z_OK)return this.onEnd(o),this.ended=!0,!1;n.next_out&&(n.avail_out===0||o===ye.Z_STREAM_END||n.avail_in===0&&(i===ye.Z_FINISH||i===ye.Z_SYNC_FLUSH))&&(this.options.to==="string"?(l=Mo.utf8border(n.output,n.next_out),s=n.next_out-l,A=Mo.buf2string(n.output,l),n.next_out=s,n.avail_out=a-s,s&&qr.arraySet(n.output,n.output,l,s,0),this.onData(A)):this.onData(qr.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(h=!0)}while((n.avail_in>0||n.avail_out===0)&&o!==ye.Z_STREAM_END);return o===ye.Z_STREAM_END&&(i=ye.Z_FINISH),i===ye.Z_FINISH?(o=Wr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===ye.Z_OK):(i===ye.Z_SYNC_FLUSH&&(this.onEnd(ye.Z_OK),n.avail_out=0),!0)};Rn.prototype.onData=function(t){this.chunks.push(t)};Rn.prototype.onEnd=function(t){t===ye.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=qr.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Wl(t,e){var n=new Rn(e);if(n.push(t,!0),n.err)throw n.msg||rd[n.err];return n.result}function rv(t,e){return e=e||{},e.raw=!0,Wl(t,e)}$r.Inflate=Rn;$r.inflate=Wl;$r.inflateRaw=rv;$r.ungzip=Wl});var ld=S((Lx,id)=>{"use strict";var av=Zt().assign,ov=Ag(),iv=ad(),lv=Yl(),od={};av(od,ov,iv,lv);id.exports=od});var Ad=S(Jo=>{(function(t){var e=String.fromCharCode;function n(a,r,o){for(var i=a[r],l=1,s=0,A=0;A=32&&i<=126?"Unexpected character "+e(i)+" in JSON at position "+r+" (line "+l+", column "+s+")":"Unexpected byte 0x"+i.toString(16)+" in JSON at position "+r+" (line "+l+", column "+s+")"))}t.JSON_parse=function(a){if(!(a instanceof Uint8Array))throw new Error("JSON input must be a Uint8Array");for(var r=[],o=[],i=[],l=a.length,s=null,A=0,c,h=0;h=l&&n(a,l),_=a[h++],_!==34;)if(_===92)switch(a[h++]){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+=` -`;break;case 114:f+="\r";break;case 116:f+=" ";break;case 117:{for(var u=0,g=0;g<4;g++)_=a[h++],u<<=4,_>=48&&_<=57?u|=_-48:_>=97&&_<=102?u|=_+-87:_>=65&&_<=70?u|=_+-55:n(a,--h);f+=e(u);break}default:n(a,--h);break}else if(_<=127)f+=e(_);else if((_&224)===192)f+=e((_&31)<<6|a[h++]&63);else if((_&240)===224)f+=e((_&15)<<12|(a[h++]&63)<<6|a[h++]&63);else if((_&248)==240){var p=(_&7)<<18|(a[h++]&63)<<12|(a[h++]&63)<<6|a[h++]&63;p>65535&&(p-=65536,f+=e(p>>10&1023|55296),p=56320|p&1023),f+=e(p)}f[0];break}case 91:{f=[],r.push(s),o.push(c),i.push(A),s=null,c=f,A=1;continue}case 123:{f={},r.push(s),o.push(c),i.push(A),s=null,c=f,A=2;continue}case 93:{A!==1&&n(a,--h),f=c,s=r.pop(),c=o.pop(),A=i.pop();break}case 125:{A!==2&&n(a,--h),f=c,s=r.pop(),c=o.pop(),A=i.pop();break}default:n(a,--h)}for(_=a[h];_<=32;)_=a[++h];switch(A){case 0:{if(h===l)return f;break}case 1:{if(c.push(f),_===44){h++;continue}if(_===93)continue;break}case 2:{if(s===null){if(s=f,_===58){h++;continue}}else{if(c[s]=f,s=null,_===44){h++;continue}if(_===125)continue}break}}break}}n(a,h)}})(Jo)});function _d(t){return t=t.trim(),t[0]==="["&&(t=t.replace(/,\s*$/,""),t[t.length-1]!=="]"&&(t+="]")),JSON.parse(t)}function Av(t){let e=0;for(let n=0;n0&&/\s/.exec(String.fromCharCode(t[n-1]));)n--;if(String.fromCharCode(t[n-1])===","&&n--,String.fromCharCode(t[n-1])!=="]"){let a=new Uint8Array(n+1);a.set(t.subarray(0,n)),a[n]=93,t=a}}return(0,cd.JSON_parse)(t)}var sd,cd,Uo,ql,$l,Ko,nn,Zl=le(()=>{"use strict";sd=_e(ld()),cd=_e(Ad()),Uo=1<<27;ql=class{constructor(e){this.chunks=[];let n=this.byteArray=new Uint8Array(e),a="utf-8";if(n.length>2&&(n[0]===255&&n[1]===254?a="utf-16le":n[0]===254&&n[1]===255&&(a="utf-16be")),typeof TextDecoder<"u"){let r=new TextDecoder(a);for(let o=0;o=Uo&&this.chunks.push("")}}splitLines(){let e=function*(){let n="";for(let a of this.chunks){let r=a.split(` -`);for(let o=0;o{try{return sd.inflate(new Uint8Array(a)).buffer}catch{return a}})}async name(){return await this.namePromise}async readAsArrayBuffer(){return await this.uncompressedData}async readAsText(){let e=await this.readAsArrayBuffer();return new ql(e)}static fromFile(e){let n=new Promise(a=>{let r=new FileReader;r.addEventListener("loadend",()=>{if(!(r.result instanceof ArrayBuffer))throw new Error("Expected reader.result to be an instance of ArrayBuffer");a(r.result)}),r.readAsArrayBuffer(e)});return new t(Promise.resolve(e.name),n)}static fromArrayBuffer(e,n){return new t(Promise.resolve(e),Promise.resolve(n))}}});function sv(t){let e=[...t.splitLines()].map(o=>o.split(" ")),n=e.shift();if(!n)return[];let a=new Map;for(let o=0;o0;){let i=a.pop();r=Math.max(r,i.endValue),e.leaveFrame(i,r)}return"Bytes Used"in n[0]?e.setValueFormatter(new ze):("Weight"in n[0]||"Running Time"in n[0])&&e.setValueFormatter(new ee("milliseconds")),e.build()}async function gd(t){let e={name:t.name,files:new Map,subdirectories:new Map},n=await new Promise((a,r)=>{t.createReader().readEntries(o=>{a(o)},r)});for(let a of n)if(a.isDirectory){let r=await gd(a);e.subdirectories.set(r.name,r)}else{let r=await new Promise((o,i)=>{a.file(o,i)});e.files.set(r.name,r)}return e}function Po(t){return nn.fromFile(t).readAsArrayBuffer()}function _v(t){return nn.fromFile(t).readAsText()}function hv(t,e){let n=Ze(t.subdirectories,"corespace"),a=Ze(n.subdirectories,`run${e}`);return Ze(a.subdirectories,"core")}async function gv(t){let e=Ze(t.subdirectories,"stores");for(let n of e.subdirectories.values()){let a=n.files.get("schema.xml");if(!a)continue;let r=await _v(a);if(!/name="time-profile"/.exec(r.firstChunk()))continue;let o=new Zr(await Po(Ze(n.files,"bulkstore")));o.readUint32(),o.readUint32(),o.readUint32();let i=o.readUint32(),l=o.readUint32();o.seek(i);let s=[];for(;;){let A=o.readUint48();if(A===0)break;let c=o.readUint32();o.skip(l-6-4-4);let h=o.readUint32();s.push({timestamp:A,threadID:c,backtraceID:h})}return s}throw new Error("Could not find sample list")}async function dv(t,e){let n=Ze(e.subdirectories,"uniquing"),a=Ze(n.subdirectories,"arrayUniquer"),r=Ze(a.files,"integeruniquer.index"),o=Ze(a.files,"integeruniquer.data"),i=new Zr(await Po(r)),l=new Zr(await Po(o));i.seek(32);let s=[];for(;i.hasMore();){let A=i.readUint32()+i.readUint32()*1048576;if(A===0)continue;l.seek(A);let c=l.readUint32(),h=[];for(;c--;)h.push(l.readUint64());s.push(h)}return s}async function uv(t){let e=Ze(t.files,"form.template"),n=Cv(await Po(e)),a=n["com.apple.xray.owner.template.version"],r=1;"com.apple.xray.owner.template"in n&&(r=n["com.apple.xray.owner.template"].get("_selectedRunNumber"));let o=n.$1;"stubInfoByUUID"in n&&(o=Array.from(n.stubInfoByUUID.keys())[0]);let i=n["com.apple.xray.run.data"],l=[];for(let s of i.runNumbers){let A=Ze(i.runData,s),c=Ze(A,"symbolsByPid"),h=new Map;for(let _ of c.values()){for(let f of _.symbols){if(!f)continue;let{sourcePath:m,symbolName:u,addressToLine:g}=f;for(let p of g.keys())ke(h,p,()=>{let I=u||`0x${an(p.toString(16),16)}`,y={key:`${m}:${I}`,name:I};return m&&(y.file=m),y})}l.push({number:s,addressToFrameMap:h})}}return{version:a,instrument:o,selectedRunNumber:r,runs:l}}async function dd(t){let e=await gd(t),{version:n,runs:a,instrument:r,selectedRunNumber:o}=await uv(e);if(r!=="com.apple.xray.instrument-type.coresampler2")throw new Error(`The only supported instrument from .trace import is "com.apple.xray.instrument-type.coresampler2". Got ${r}`);console.log("version: ",n),console.log("Importing time profile");let i=[],l=0;for(let s of a){let{addressToFrameMap:A,number:c}=s,h=await fv({fileName:t.name,tree:e,addressToFrameMap:A,runNumber:c});s.number===o&&(l=i.length+h.indexToView),i.push(...h.profiles)}return{name:t.name,indexToView:l,profiles:i}}async function fv(t){let{fileName:e,tree:n,addressToFrameMap:a,runNumber:r}=t,o=hv(n,r),i=await gv(o),l=await dv(i,o),s=new Map;for(let h of i)s.set(h.threadID,ca(s,h.threadID,()=>0)+1);let A=Array.from(s.entries());Ne(A,h=>-h[1]);let c=A.map(h=>h[0]);return{name:e,indexToView:0,profiles:c.map(h=>pv({threadID:h,fileName:e,arrays:l,addressToFrameMap:a,samples:i}))}}function pv(t){let{fileName:e,addressToFrameMap:n,arrays:a,threadID:r,samples:o}=t,i=new Map;o=o.filter(c=>c.threadID===r);let l=new ae(ne(o).timestamp);l.setName(`${e} - thread ${r}`);function s(c,h){let _=n.get(c);if(_)h.push(_);else if(c in a)for(let f of a[c])s(f,h);else{let f={key:c,name:`0x${an(c.toString(16),16)}`};n.set(c,f),h.push(f)}}let A=null;for(let c of o){let h=ke(i,c.backtraceID,_=>{let f=[];return s(_,f),f.reverse(),f});if(A===null&&(l.appendSampleWithWeight([],c.timestamp),A=c.timestamp),c.timestamp{switch(r){case"NSTextStorage":case"NSParagraphStyle":case"NSFont":return null;case"PFTSymbolData":{let i=Object.create(null);i.symbolName=o.$0,i.sourcePath=o.$1,i.addressToLine=new Map;for(let l=3;;l+=2){let s=o["$"+l],A=o["$"+(l+1)];if(s==null||A==null)break;i.addressToLine.set(s,A)}return i}case"PFTOwnerData":{let i=Object.create(null);return i.ownerName=o.$0,i.ownerPath=o.$1,i}case"PFTPersistentSymbols":{let i=Object.create(null),l=o.$4;i.threadNames=o.$3,i.symbols=[];for(let s=1;sn){if(t.$version!==1e5||t.$archiver!=="NSKeyedArchiver"||!Xl(t.$top)||!hd(t.$objects))throw new Error("Invalid keyed archive");t.$objects[0]==="$null"&&(t.$objects[0]=null);for(let a=0;a{if(a instanceof Xr)return t.$objects[a.index];if(hd(a))for(let r=0;ra){if(Xl(e)&&e.$class){let a=Iv(t,e.$class).$classname;switch(a){case"NSDecimalNumberPlaceholder":{let l=e["NS.length"],s=e["NS.exponent"],A=e["NS.mantissa.bo"],c=e["NS.negative"],h=new Uint16Array(new Uint8Array(e["NS.mantissa"]).buffer),_=0;for(let f=0;f>8|(m&255)<<8),_+=m*Math.pow(65536,f)}return _*=Math.pow(10,s),c?-_:_}case"NSData":case"NSMutableData":return e["NS.bytes"]||e["NS.data"];case"NSString":case"NSMutableString":return e["NS.string"]?e["NS.string"]:e["NS.bytes"]?mv(e["NS.bytes"]):(console.warn(`Unexpected ${a} format: `,e),null);case"NSArray":case"NSMutableArray":if("NS.objects"in e)return e["NS.objects"];let r=[];for(;;){let l="NS.object."+r.length;if(!(l in e))break;r.push(e[l])}return r;case"_NSKeyedCoderOldStyleArray":{let l=e["NS.count"],s=[];for(let A=0;A{"use strict";Re();W();Me();Zl();Zr=class{constructor(e){this.bytePos=0;this.view=new DataView(e)}seek(e){this.bytePos=e}skip(e){this.bytePos+=e}hasMore(){return this.bytePosthis.view.byteLength?0:this.view.getUint8(this.bytePos-1)}readUint32(){return this.bytePos+=4,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-4,!0)}readUint48(){return this.bytePos+=6,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-6,!0)+this.view.getUint16(this.bytePos-2,!0)*Math.pow(2,32)}readUint64(){return this.bytePos+=8,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-8,!0)+this.view.getUint32(this.bytePos-4,!0)*Math.pow(2,32)}};Xr=class{constructor(e){this.index=e}};eA=class{constructor(e){this.view=e;this.referenceSize=0;this.objects=[];this.offsetTable=[]}parseRoot(){let e=this.view.byteLength-32,n=this.view.getUint8(e+6);this.referenceSize=this.view.getUint8(e+7);let a=this.view.getUint32(e+12,!1),r=this.view.getUint32(e+20,!1),o=this.view.getUint32(e+28,!1);for(let i=0;i>4){case 0:return this.parseSingleton(e,a);case 1:return this.parseInteger(e,1<({key:i,name:i})),duration:parseInt(o,10)})}return e}function nA(t){let e=Bv(t),n=e.reduce((r,o)=>r+o.duration,0),a=new ae(n);if(e.length===0)return null;for(let r of e)a.appendSampleWithWeight(r.stack,r.duration);return a.build()}var fd=le(()=>{"use strict";Re()});function pd(t){let e=t.profile,n=e.threads.length===1?e.threads[0]:e.threads.filter(l=>l.name==="GeckoMain")[0],a=new Map;function r(l){let s=l[0],A=[];for(;s!=null;){let c=n.stackTable.data[s],[h,_]=c;A.push(_),s=h}return A.reverse(),A.map(c=>{let h=n.frameTable.data[c],_=n.stringTable[h[0]],f=/(.*)\s+\((.*?)(?::(\d+))?(?::(\d+))?\)$/.exec(_);return!f||f[2].startsWith("resource:")||f[2]==="self-hosted"||f[2].startsWith("self-hosted:")?null:ke(a,_,()=>({key:_,name:f[1],file:f[2],line:f[3]?parseInt(f[3]):void 0,col:f[4]?parseInt(f[4])+1:void 0}))}).filter(c=>c!=null)}let o=new me(t.duration),i=[];for(let l of n.samples.data){let s=r(l),A=l[1],c=-1;for(let h=0;hc;h--)o.leaveFrame(i[h],A);for(let h=c+1;h{"use strict";Re();W();Me()});function jv(t,e){if(!t||!t.type)return{key:"(unknown type)",name:"(unknown type)"};let n=t.name;switch(t.type){case"CPP":{let a=n.match(/[tT] ([^(<]*)/);a&&(n=`(c++) ${a[1]}`);break}case"SHARED_LIB":n="(LIB) "+n;break;case"JS":{let a=n.match(/([a-zA-Z0-9\._\-$]*) ([a-zA-Z0-9\.\-_\/$]*):(\d+):(\d+)/);if(a){let r=a[2],o=parseInt(a[3],10),i=parseInt(a[4],10),l=a[1].length>0?a[1]:r?`(anonymous ${r.split("/").pop()}:${o})`:"(anonymous)";return{key:n,name:l,file:r.length>0?r:"(unknown file)",line:o,col:i}}break}case"CODE":{switch(t.kind){case"LoadIC":case"StoreIC":case"KeyedStoreIC":case"KeyedLoadIC":case"LoadGlobalIC":case"Handler":n="(IC) "+n;break;case"BytecodeHandler":n="(bytecode) ~"+n;break;case"Stub":n="(stub) "+n;break;case"Builtin":n="(builtin) "+n;break;case"RegExp":n="(regexp) "+n;break}break}default:{n=`(${t.type}) ${n}`;break}}return{key:n,name:n}}function rA(t){let e=new ae,n=new Map;function a(o){return ke(n,o,i=>{let l=t.code[i];return jv(l,t)})}let r=0;Ne(t.ticks,o=>o.tm);for(let o of t.ticks){let i=[];for(let l=o.s.length-2;l>=0;l-=2){let s=o.s[l];if(s!==-1){if(s>t.code.length){i.push({key:s,name:`0x${s.toString(16)}`});continue}i.push(a(s))}}e.appendSampleWithWeight(i,o.tm-r),r=o.tm}return e.setValueFormatter(new ee("microseconds")),e.build()}var md=le(()=>{"use strict";Re();W();Me()});function*Qv(t){let e=[];for(let n of t.splitLines())n===""?(yield Id(e),e=[]):e.push(n);e.length>0&&(yield Id(e))}function Id(t){let e=t.filter(l=>!/^\s*#/.exec(l)),n={command:null,processID:null,threadID:null,time:null,eventType:"",stack:[]},a=e.shift();if(!a)return null;let r=/^(\S.+?)\s+(\d+)(?:\/?(\d+))?\s+/.exec(a);if(!r)return null;n.command=r[1],r[3]?(n.processID=parseInt(r[2],10),n.threadID=parseInt(r[3],10)):n.threadID=parseInt(r[2],10);let o=/\s+(\d+\.\d+):\s+/.exec(a);o&&(n.time=parseFloat(o[1]));let i=/(\S+):\s*$/.exec(a);i&&(n.eventType=i[1]);for(let l of e){let s=/^\s*(\w+)\s*(.+) \((\S*)\)/.exec(l);if(!s)continue;let[,A,c,h]=s;c=c.replace(/\+0x[\da-f]+$/,""),n.stack.push({address:`0x${A}`,symbolName:c,file:h})}return n.stack.reverse(),n}function aA(t){let e=new Map,n=null;for(let a of Qv(t)){if(a==null||n!=null&&n!=a.eventType||a.time==null)continue;n=a.eventType;let r=[];a.command&&r.push(a.command),a.processID&&r.push(`pid: ${a.processID}`),a.threadID&&r.push(`tid: ${a.threadID}`);let o=r.join(" ");ke(e,o,()=>{let s=new ae;return s.setName(o),s.setValueFormatter(new ee("seconds")),s}).appendSampleWithTimestamp(a.stack.map(({symbolName:s,file:A})=>({key:`${s} (${A})`,name:s==="[unknown]"?`??? (${A})`:s,file:A})),a.time)}return e.size===0?null:{name:e.size===1?Array.from(e.keys())[0]:"",indexToView:0,profiles:Array.from(PA(e.values(),a=>a.build()))}}var yd=le(()=>{"use strict";Re();W();Me()});function oA(t,e,n,a,r){if(t.ticks===0&&t.entries===0&&t.alloc===0&&t.children.length===0)return e;let o=e,i=a.get(t.id);n.enterFrame(i,o);for(let l of t.children)o=oA(l,o,n,a,r);return o+=r(t),n.leaveFrame(i,o),o}function vd(t){let e=new Map;for(let r of t.cost_centres){let o={key:r.id,name:`${r.module}.${r.label}`};r.src_loc.startsWith("<")||(o.file=r.src_loc),e.set(r.id,o)}let n=new me(t.total_ticks);oA(t.profile,0,n,e,r=>r.ticks),n.setValueFormatter(new ee("milliseconds")),n.setName(`${t.program} time`);let a=new me(t.total_ticks);return oA(t.profile,0,a,e,r=>r.alloc),a.setValueFormatter(new ze),a.setName(`${t.program} allocation`),{name:t.program,indexToView:0,profiles:[n.build(),a.build()]}}var Ed=le(()=>{"use strict";Re();Me()});function wv(t){return t.map(({name:e,url:n,line:a,column:r})=>({key:`${e}:${n}:${a}:${r}`,file:n,line:a,col:r,name:e||(n?`(anonymous ${n.split("/").pop()}:${a})`:"(anonymous)")})).reverse()}function iA(t){t.version!==1&&console.warn(`Unknown Safari profile version ${t.version}... Might be incompatible.`);let{recording:e}=t,{sampleStackTraces:n,sampleDurations:a}=e,r=n.length;if(r<1)return console.warn("Empty profile"),null;let o=n[r-1].timestamp-n[0].timestamp+a[0],i=new ae(o),l=Number.MAX_VALUE;return n.forEach((s,A)=>{let c=s.timestamp,h=a[A],f=c-h-l;f>.002&&i.appendSampleWithWeight([],f),i.appendSampleWithWeight(wv(s.stackFrames),h),l=c}),i.setValueFormatter(new ee("seconds")),i.setName(e.displayName),i.build()}var Bd=le(()=>{"use strict";Re();Me()});var Qd=S((jS,jd)=>{"use strict";jd.exports=bv;function bv(t,e){for(var n=new Array(arguments.length-1),a=0,r=2,o=!0;r{"use strict";var Oo=xd;Oo.length=function(e){var n=e.length;if(!n)return 0;for(var a=0;--n%4>1&&e.charAt(n)==="=";)++a;return Math.ceil(e.length*3)/4-a};var hr=new Array(64),bd=new Array(123);for(vt=0;vt<64;)bd[hr[vt]=vt<26?vt+65:vt<52?vt+71:vt<62?vt-4:vt-59|43]=vt++;var vt;Oo.encode=function(e,n,a){for(var r=null,o=[],i=0,l=0,s;n>2],s=(A&3)<<4,l=1;break;case 1:o[i++]=hr[s|A>>4],s=(A&15)<<2,l=2;break;case 2:o[i++]=hr[s|A>>6],o[i++]=hr[A&63],l=0;break}i>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),i=0)}return l&&(o[i++]=hr[s],o[i++]=61,l===1&&(o[i++]=61)),r?(i&&r.push(String.fromCharCode.apply(String,o.slice(0,i))),r.join("")):String.fromCharCode.apply(String,o.slice(0,i))};var wd="invalid encoding";Oo.decode=function(e,n,a){for(var r=a,o=0,i,l=0;l1)break;if((s=bd[s])===void 0)throw Error(wd);switch(o){case 0:i=s,o=1;break;case 1:n[a++]=i<<2|(s&48)>>4,i=s,o=2;break;case 2:n[a++]=(i&15)<<4|(s&60)>>2,i=s,o=3;break;case 3:n[a++]=(i&3)<<6|s,o=0;break}}if(o===1)throw Error(wd);return a-r};Oo.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var kd=S((wS,Nd)=>{"use strict";Nd.exports=Go;function Go(){this._listeners={}}Go.prototype.on=function(e,n,a){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:n,ctx:a||this}),this};Go.prototype.off=function(e,n){if(e===void 0)this._listeners={};else if(n===void 0)this._listeners[e]=[];else for(var a=this._listeners[e],r=0;r{"use strict";Hd.exports=Dd(Dd);function Dd(t){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),a=n[3]===128;function r(s,A,c){e[0]=s,A[c]=n[0],A[c+1]=n[1],A[c+2]=n[2],A[c+3]=n[3]}function o(s,A,c){e[0]=s,A[c]=n[3],A[c+1]=n[2],A[c+2]=n[1],A[c+3]=n[0]}t.writeFloatLE=a?r:o,t.writeFloatBE=a?o:r;function i(s,A){return n[0]=s[A],n[1]=s[A+1],n[2]=s[A+2],n[3]=s[A+3],e[0]}function l(s,A){return n[3]=s[A],n[2]=s[A+1],n[1]=s[A+2],n[0]=s[A+3],e[0]}t.readFloatLE=a?i:l,t.readFloatBE=a?l:i}():function(){function e(a,r,o,i){var l=r<0?1:0;if(l&&(r=-r),r===0)a(1/r>0?0:2147483648,o,i);else if(isNaN(r))a(2143289344,o,i);else if(r>34028234663852886e22)a((l<<31|2139095040)>>>0,o,i);else if(r<11754943508222875e-54)a((l<<31|Math.round(r/1401298464324817e-60))>>>0,o,i);else{var s=Math.floor(Math.log(r)/Math.LN2),A=Math.round(r*Math.pow(2,-s)*8388608)&8388607;a((l<<31|s+127<<23|A)>>>0,o,i)}}t.writeFloatLE=e.bind(null,Rd),t.writeFloatBE=e.bind(null,Fd);function n(a,r,o){var i=a(r,o),l=(i>>31)*2+1,s=i>>>23&255,A=i&8388607;return s===255?A?NaN:l*(1/0):s===0?l*1401298464324817e-60*A:l*Math.pow(2,s-150)*(A+8388608)}t.readFloatLE=n.bind(null,Ld),t.readFloatBE=n.bind(null,Td)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),a=n[7]===128;function r(s,A,c){e[0]=s,A[c]=n[0],A[c+1]=n[1],A[c+2]=n[2],A[c+3]=n[3],A[c+4]=n[4],A[c+5]=n[5],A[c+6]=n[6],A[c+7]=n[7]}function o(s,A,c){e[0]=s,A[c]=n[7],A[c+1]=n[6],A[c+2]=n[5],A[c+3]=n[4],A[c+4]=n[3],A[c+5]=n[2],A[c+6]=n[1],A[c+7]=n[0]}t.writeDoubleLE=a?r:o,t.writeDoubleBE=a?o:r;function i(s,A){return n[0]=s[A],n[1]=s[A+1],n[2]=s[A+2],n[3]=s[A+3],n[4]=s[A+4],n[5]=s[A+5],n[6]=s[A+6],n[7]=s[A+7],e[0]}function l(s,A){return n[7]=s[A],n[6]=s[A+1],n[5]=s[A+2],n[4]=s[A+3],n[3]=s[A+4],n[2]=s[A+5],n[1]=s[A+6],n[0]=s[A+7],e[0]}t.readDoubleLE=a?i:l,t.readDoubleBE=a?l:i}():function(){function e(a,r,o,i,l,s){var A=i<0?1:0;if(A&&(i=-i),i===0)a(0,l,s+r),a(1/i>0?0:2147483648,l,s+o);else if(isNaN(i))a(0,l,s+r),a(2146959360,l,s+o);else if(i>17976931348623157e292)a(0,l,s+r),a((A<<31|2146435072)>>>0,l,s+o);else{var c;if(i<22250738585072014e-324)c=i/5e-324,a(c>>>0,l,s+r),a((A<<31|c/4294967296)>>>0,l,s+o);else{var h=Math.floor(Math.log(i)/Math.LN2);h===1024&&(h=1023),c=i*Math.pow(2,-h),a(c*4503599627370496>>>0,l,s+r),a((A<<31|h+1023<<20|c*1048576&1048575)>>>0,l,s+o)}}}t.writeDoubleLE=e.bind(null,Rd,0,4),t.writeDoubleBE=e.bind(null,Fd,4,0);function n(a,r,o,i,l){var s=a(i,l+r),A=a(i,l+o),c=(A>>31)*2+1,h=A>>>20&2047,_=4294967296*(A&1048575)+s;return h===2047?_?NaN:c*(1/0):h===0?c*5e-324*_:c*Math.pow(2,h-1075)*(_+4503599627370496)}t.readDoubleLE=n.bind(null,Ld,0,4),t.readDoubleBE=n.bind(null,Td,4,0)}(),t}function Rd(t,e,n){e[n]=t&255,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function Fd(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=t&255}function Ld(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function Td(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}});var Jd=S((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}});var Kd=S(Ud=>{"use strict";var lA=Ud;lA.length=function(e){for(var n=0,a=0,r=0;r191&&s<224?i[l++]=(s&31)<<6|e[n++]&63:s>239&&s<365?(s=((s&7)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,i[l++]=55296+(s>>10),i[l++]=56320+(s&1023)):i[l++]=(s&15)<<12|(e[n++]&63)<<6|e[n++]&63,l>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),l=0);return o?(l&&o.push(String.fromCharCode.apply(String,i.slice(0,l))),o.join("")):String.fromCharCode.apply(String,i.slice(0,l))};lA.write=function(e,n,a){for(var r=a,o,i,l=0;l>6|192,n[a++]=o&63|128):(o&64512)===55296&&((i=e.charCodeAt(l+1))&64512)===56320?(o=65536+((o&1023)<<10)+(i&1023),++l,n[a++]=o>>18|240,n[a++]=o>>12&63|128,n[a++]=o>>6&63|128,n[a++]=o&63|128):(n[a++]=o>>12|224,n[a++]=o>>6&63|128,n[a++]=o&63|128);return a-r}});var Od=S((SS,Pd)=>{"use strict";Pd.exports=xv;function xv(t,e,n){var a=n||8192,r=a>>>1,o=null,i=a;return function(s){if(s<1||s>r)return t(s);i+s>a&&(o=t(a),i=0);var A=e.call(o,i,i+=s);return i&7&&(i=(i|7)+1),A}}});var zd=S((NS,Gd)=>{"use strict";Gd.exports=xe;var ea=fn();function xe(t,e){this.lo=t>>>0,this.hi=e>>>0}var Fn=xe.zero=new xe(0,0);Fn.toNumber=function(){return 0};Fn.zzEncode=Fn.zzDecode=function(){return this};Fn.length=function(){return 1};var Sv=xe.zeroHash="\0\0\0\0\0\0\0\0";xe.fromNumber=function(e){if(e===0)return Fn;var n=e<0;n&&(e=-e);var a=e>>>0,r=(e-a)/4294967296>>>0;return n&&(r=~r>>>0,a=~a>>>0,++a>4294967295&&(a=0,++r>4294967295&&(r=0))),new xe(a,r)};xe.from=function(e){if(typeof e=="number")return xe.fromNumber(e);if(ea.isString(e))if(ea.Long)e=ea.Long.fromString(e);else return xe.fromNumber(parseInt(e,10));return e.low||e.high?new xe(e.low>>>0,e.high>>>0):Fn};xe.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var n=~this.lo+1>>>0,a=~this.hi>>>0;return n||(a=a+1>>>0),-(n+a*4294967296)}return this.lo+this.hi*4294967296};xe.prototype.toLong=function(e){return ea.Long?new ea.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var un=String.prototype.charCodeAt;xe.fromHash=function(e){return e===Sv?Fn:new xe((un.call(e,0)|un.call(e,1)<<8|un.call(e,2)<<16|un.call(e,3)<<24)>>>0,(un.call(e,4)|un.call(e,5)<<8|un.call(e,6)<<16|un.call(e,7)<<24)>>>0)};xe.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};xe.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this};xe.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this};xe.prototype.length=function(){var e=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return a===0?n===0?e<16384?e<128?1:2:e<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:a<128?9:10}});var fn=S(AA=>{"use strict";var H=AA;H.asPromise=Qd();H.base64=Sd();H.EventEmitter=kd();H.float=Md();H.inquire=Jd();H.utf8=Kd();H.pool=Od();H.LongBits=zd();H.global=typeof window<"u"&&window||typeof global<"u"&&global||typeof self<"u"&&self||AA;H.emptyArray=Object.freeze?Object.freeze([]):[];H.emptyObject=Object.freeze?Object.freeze({}):{};H.isNode=!!(H.global.process&&H.global.process.versions&&H.global.process.versions.node);H.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};H.isString=function(e){return typeof e=="string"||e instanceof String};H.isObject=function(e){return e&&typeof e=="object"};H.isset=H.isSet=function(e,n){var a=e[n];return a!=null&&e.hasOwnProperty(n)?typeof a!="object"||(Array.isArray(a)?a.length:Object.keys(a).length)>0:!1};H.Buffer=function(){try{var t=H.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch{return null}}();H._Buffer_from=null;H._Buffer_allocUnsafe=null;H.newBuffer=function(e){return typeof e=="number"?H.Buffer?H._Buffer_allocUnsafe(e):new H.Array(e):H.Buffer?H._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};H.Array=typeof Uint8Array<"u"?Uint8Array:Array;H.Long=H.global.dcodeIO&&H.global.dcodeIO.Long||H.global.Long||H.inquire("long");H.key2Re=/^true|false|0|1$/;H.key32Re=/^-?(?:0|[1-9][0-9]*)$/;H.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;H.longToHash=function(e){return e?H.LongBits.from(e).toHash():H.LongBits.zeroHash};H.longFromHash=function(e,n){var a=H.LongBits.fromHash(e);return H.Long?H.Long.fromBits(a.lo,a.hi,n):a.toNumber(!!n)};function Vd(t,e,n){for(var a=Object.keys(e),r=0;r-1;--o)if(n[r[o]]===1&&this[r[o]]!==void 0&&this[r[o]]!==null)return r[o]}};H.oneOfSetter=function(e){return function(n){for(var a=0;a{"use strict";Zd.exports=Z;var gt=fn(),$d,zo=gt.LongBits,Wd=gt.base64,qd=gt.utf8;function ta(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function cA(){}function Nv(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function Z(){this.len=0,this.head=new ta(cA,0,0),this.tail=this.head,this.states=null}Z.create=gt.Buffer?function(){return(Z.create=function(){return new $d})()}:function(){return new Z};Z.alloc=function(e){return new gt.Array(e)};gt.Array!==Array&&(Z.alloc=gt.pool(Z.alloc,gt.Array.prototype.subarray));Z.prototype._push=function(e,n,a){return this.tail=this.tail.next=new ta(e,n,a),this.len+=n,this};function _A(t,e,n){e[n]=t&255}function kv(t,e,n){for(;t>127;)e[n++]=t&127|128,t>>>=7;e[n]=t}function hA(t,e){this.len=t,this.next=void 0,this.val=e}hA.prototype=Object.create(ta.prototype);hA.prototype.fn=kv;Z.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new hA((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};Z.prototype.int32=function(e){return e<0?this._push(gA,10,zo.fromNumber(e)):this.uint32(e)};Z.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function gA(t,e,n){for(;t.hi;)e[n++]=t.lo&127|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=t.lo&127|128,t.lo=t.lo>>>7;e[n++]=t.lo}Z.prototype.uint64=function(e){var n=zo.from(e);return this._push(gA,n.length(),n)};Z.prototype.int64=Z.prototype.uint64;Z.prototype.sint64=function(e){var n=zo.from(e).zzEncode();return this._push(gA,n.length(),n)};Z.prototype.bool=function(e){return this._push(_A,1,e?1:0)};function sA(t,e,n){e[n]=t&255,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}Z.prototype.fixed32=function(e){return this._push(sA,4,e>>>0)};Z.prototype.sfixed32=Z.prototype.fixed32;Z.prototype.fixed64=function(e){var n=zo.from(e);return this._push(sA,4,n.lo)._push(sA,4,n.hi)};Z.prototype.sfixed64=Z.prototype.fixed64;Z.prototype.float=function(e){return this._push(gt.float.writeFloatLE,4,e)};Z.prototype.double=function(e){return this._push(gt.float.writeDoubleLE,8,e)};var Dv=gt.Array.prototype.set?function(e,n,a){n.set(e,a)}:function(e,n,a){for(var r=0;r>>0;if(!n)return this._push(_A,1,0);if(gt.isString(e)){var a=Z.alloc(n=Wd.length(e));Wd.decode(e,a,0),e=a}return this.uint32(n)._push(Dv,n,e)};Z.prototype.string=function(e){var n=qd.length(e);return n?this.uint32(n)._push(qd.write,n,e):this._push(_A,1,0)};Z.prototype.fork=function(){return this.states=new Nv(this),this.head=this.tail=new ta(cA,0,0),this.len=0,this};Z.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new ta(cA,0,0),this.len=0),this};Z.prototype.ldelim=function(){var e=this.head,n=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=e.next,this.tail=n,this.len+=a),this};Z.prototype.finish=function(){for(var e=this.head.next,n=this.constructor.alloc(this.len),a=0;e;)e.fn(e.val,n,a),a+=e.len,e=e.next;return n};Z._configure=function(t){$d=t}});var tu=S((RS,eu)=>{"use strict";eu.exports=Ln;var Xd=dA();(Ln.prototype=Object.create(Xd.prototype)).constructor=Ln;var na=fn(),Vo=na.Buffer;function Ln(){Xd.call(this)}Ln.alloc=function(e){return(Ln.alloc=na._Buffer_allocUnsafe)(e)};var Rv=Vo&&Vo.prototype instanceof Uint8Array&&Vo.prototype.set.name==="set"?function(e,n,a){n.set(e,a)}:function(e,n,a){if(e.copy)e.copy(n,a,0,e.length);else for(var r=0;r>>0;return this.uint32(n),n&&this._push(Rv,n,e),this};function Fv(t,e,n){t.length<40?na.utf8.write(t,e,n):e.utf8Write(t,n)}Ln.prototype.string=function(e){var n=Vo.byteLength(e);return this.uint32(n),n&&this._push(Fv,n,e),this}});var fA=S((FS,iu)=>{"use strict";iu.exports=ve;var Mt=fn(),au,ou=Mt.LongBits,Lv=Mt.utf8;function Et(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function ve(t){this.buf=t,this.pos=0,this.len=t.length}var nu=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new ve(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new ve(e);throw Error("illegal buffer")};ve.create=Mt.Buffer?function(e){return(ve.create=function(a){return Mt.Buffer.isBuffer(a)?new au(a):nu(a)})(e)}:nu;ve.prototype._slice=Mt.Array.prototype.subarray||Mt.Array.prototype.slice;ve.prototype.uint32=function(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,Et(this,10);return e}}();ve.prototype.int32=function(){return this.uint32()|0};ve.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function uA(){var t=new ou(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(t.lo=(t.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(this.buf[this.pos]&127)<<28)>>>0,t.hi=(t.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return t;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw Et(this);if(t.lo=(t.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(this.buf[this.pos++]&127)<>>0,t}if(this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw Et(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}ve.prototype.bool=function(){return this.uint32()!==0};function Yo(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}ve.prototype.fixed32=function(){if(this.pos+4>this.len)throw Et(this,4);return Yo(this.buf,this.pos+=4)};ve.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Et(this,4);return Yo(this.buf,this.pos+=4)|0};function ru(){if(this.pos+8>this.len)throw Et(this,8);return new ou(Yo(this.buf,this.pos+=4),Yo(this.buf,this.pos+=4))}ve.prototype.float=function(){if(this.pos+4>this.len)throw Et(this,4);var e=Mt.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};ve.prototype.double=function(){if(this.pos+8>this.len)throw Et(this,4);var e=Mt.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};ve.prototype.bytes=function(){var e=this.uint32(),n=this.pos,a=this.pos+e;if(a>this.len)throw Et(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(n,a):n===a?new this.buf.constructor(0):this._slice.call(this.buf,n,a)};ve.prototype.string=function(){var e=this.bytes();return Lv.read(e,0,e.length)};ve.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw Et(this,e);this.pos+=e}else do if(this.pos>=this.len)throw Et(this);while(this.buf[this.pos++]&128);return this};ve.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(t=this.uint32()&7)!==4;)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this};ve._configure=function(t){au=t;var e=Mt.Long?"toLong":"toNumber";Mt.merge(ve.prototype,{int64:function(){return uA.call(this)[e](!1)},uint64:function(){return uA.call(this)[e](!0)},sint64:function(){return uA.call(this).zzDecode()[e](!1)},fixed64:function(){return ru.call(this)[e](!0)},sfixed64:function(){return ru.call(this)[e](!1)}})}});var cu=S((LS,su)=>{"use strict";su.exports=ra;var Au=fA();(ra.prototype=Object.create(Au.prototype)).constructor=ra;var lu=fn();function ra(t){Au.call(this,t)}lu.Buffer&&(ra.prototype._slice=lu.Buffer.prototype.slice);ra.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}});var hu=S((TS,_u)=>{"use strict";_u.exports=aa;var pA=fn();(aa.prototype=Object.create(pA.EventEmitter.prototype)).constructor=aa;function aa(t,e,n){if(typeof t!="function")throw TypeError("rpcImpl must be a function");pA.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!n}aa.prototype.rpcCall=function t(e,n,a,r,o){if(!r)throw TypeError("request must be specified");var i=this;if(!o)return pA.asPromise(t,i,e,n,a,r);if(!i.rpcImpl){setTimeout(function(){o(Error("already ended"))},0);return}try{return i.rpcImpl(e,n[i.requestDelimited?"encodeDelimited":"encode"](r).finish(),function(s,A){if(s)return i.emit("error",s,e),o(s);if(A===null){i.end(!0);return}if(!(A instanceof a))try{A=a[i.responseDelimited?"decodeDelimited":"decode"](A)}catch(c){return i.emit("error",c,e),o(c)}return i.emit("data",A,e),o(null,A)})}catch(l){i.emit("error",l,e),setTimeout(function(){o(l)},0);return}};aa.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var du=S(gu=>{"use strict";var Tv=gu;Tv.Service=hu()});var fu=S((MS,uu)=>{"use strict";uu.exports={}});var mu=S(Cu=>{"use strict";var Ye=Cu;Ye.build="minimal";Ye.Writer=dA();Ye.BufferWriter=tu();Ye.Reader=fA();Ye.BufferReader=cu();Ye.util=fn();Ye.rpc=du();Ye.roots=fu();Ye.configure=pu;function pu(){Ye.Reader._configure(Ye.BufferReader),Ye.util._configure()}Ye.Writer._configure(Ye.BufferWriter);pu()});var yu=S((US,Iu)=>{"use strict";Iu.exports=mu()});var Eu=S((KS,vu)=>{"use strict";var nt=yu(),X=nt.Reader,pn=nt.Writer,d=nt.util,k=nt.roots.default||(nt.roots.default={});k.perftools=function(){var t={};return t.profiles=function(){var e={};return e.Profile=function(){function n(a){if(this.sampleType=[],this.sample=[],this.mapping=[],this.location=[],this.function=[],this.stringTable=[],this.comment=[],a)for(var r=Object.keys(a),o=0;o>>3){case 1:l.sampleType&&l.sampleType.length||(l.sampleType=[]),l.sampleType.push(k.perftools.profiles.ValueType.decode(r,r.uint32()));break;case 2:l.sample&&l.sample.length||(l.sample=[]),l.sample.push(k.perftools.profiles.Sample.decode(r,r.uint32()));break;case 3:l.mapping&&l.mapping.length||(l.mapping=[]),l.mapping.push(k.perftools.profiles.Mapping.decode(r,r.uint32()));break;case 4:l.location&&l.location.length||(l.location=[]),l.location.push(k.perftools.profiles.Location.decode(r,r.uint32()));break;case 5:l.function&&l.function.length||(l.function=[]),l.function.push(k.perftools.profiles.Function.decode(r,r.uint32()));break;case 6:l.stringTable&&l.stringTable.length||(l.stringTable=[]),l.stringTable.push(r.string());break;case 7:l.dropFrames=r.int64();break;case 8:l.keepFrames=r.int64();break;case 9:l.timeNanos=r.int64();break;case 10:l.durationNanos=r.int64();break;case 11:l.periodType=k.perftools.profiles.ValueType.decode(r,r.uint32());break;case 12:l.period=r.int64();break;case 13:if(l.comment&&l.comment.length||(l.comment=[]),(s&7)===2)for(var A=r.uint32()+r.pos;r.pos>>0,r.dropFrames.high>>>0).toNumber())),r.keepFrames!=null&&(d.Long?(o.keepFrames=d.Long.fromValue(r.keepFrames)).unsigned=!1:typeof r.keepFrames=="string"?o.keepFrames=parseInt(r.keepFrames,10):typeof r.keepFrames=="number"?o.keepFrames=r.keepFrames:typeof r.keepFrames=="object"&&(o.keepFrames=new d.LongBits(r.keepFrames.low>>>0,r.keepFrames.high>>>0).toNumber())),r.timeNanos!=null&&(d.Long?(o.timeNanos=d.Long.fromValue(r.timeNanos)).unsigned=!1:typeof r.timeNanos=="string"?o.timeNanos=parseInt(r.timeNanos,10):typeof r.timeNanos=="number"?o.timeNanos=r.timeNanos:typeof r.timeNanos=="object"&&(o.timeNanos=new d.LongBits(r.timeNanos.low>>>0,r.timeNanos.high>>>0).toNumber())),r.durationNanos!=null&&(d.Long?(o.durationNanos=d.Long.fromValue(r.durationNanos)).unsigned=!1:typeof r.durationNanos=="string"?o.durationNanos=parseInt(r.durationNanos,10):typeof r.durationNanos=="number"?o.durationNanos=r.durationNanos:typeof r.durationNanos=="object"&&(o.durationNanos=new d.LongBits(r.durationNanos.low>>>0,r.durationNanos.high>>>0).toNumber())),r.periodType!=null){if(typeof r.periodType!="object")throw TypeError(".perftools.profiles.Profile.periodType: object expected");o.periodType=k.perftools.profiles.ValueType.fromObject(r.periodType)}if(r.period!=null&&(d.Long?(o.period=d.Long.fromValue(r.period)).unsigned=!1:typeof r.period=="string"?o.period=parseInt(r.period,10):typeof r.period=="number"?o.period=r.period:typeof r.period=="object"&&(o.period=new d.LongBits(r.period.low>>>0,r.period.high>>>0).toNumber())),r.comment){if(!Array.isArray(r.comment))throw TypeError(".perftools.profiles.Profile.comment: array expected");o.comment=[];for(var i=0;i>>0,r.comment[i].high>>>0).toNumber())}return r.defaultSampleType!=null&&(d.Long?(o.defaultSampleType=d.Long.fromValue(r.defaultSampleType)).unsigned=!1:typeof r.defaultSampleType=="string"?o.defaultSampleType=parseInt(r.defaultSampleType,10):typeof r.defaultSampleType=="number"?o.defaultSampleType=r.defaultSampleType:typeof r.defaultSampleType=="object"&&(o.defaultSampleType=new d.LongBits(r.defaultSampleType.low>>>0,r.defaultSampleType.high>>>0).toNumber())),o},n.toObject=function(r,o){o||(o={});var i={};if((o.arrays||o.defaults)&&(i.sampleType=[],i.sample=[],i.mapping=[],i.location=[],i.function=[],i.stringTable=[],i.comment=[]),o.defaults){if(d.Long){var l=new d.Long(0,0,!1);i.dropFrames=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.dropFrames=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.keepFrames=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.keepFrames=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.timeNanos=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.timeNanos=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.durationNanos=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.durationNanos=o.longs===String?"0":0;if(i.periodType=null,d.Long){var l=new d.Long(0,0,!1);i.period=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.period=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.defaultSampleType=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.defaultSampleType=o.longs===String?"0":0}if(r.sampleType&&r.sampleType.length){i.sampleType=[];for(var s=0;s>>0,r.dropFrames.high>>>0).toNumber():r.dropFrames),r.keepFrames!=null&&r.hasOwnProperty("keepFrames")&&(typeof r.keepFrames=="number"?i.keepFrames=o.longs===String?String(r.keepFrames):r.keepFrames:i.keepFrames=o.longs===String?d.Long.prototype.toString.call(r.keepFrames):o.longs===Number?new d.LongBits(r.keepFrames.low>>>0,r.keepFrames.high>>>0).toNumber():r.keepFrames),r.timeNanos!=null&&r.hasOwnProperty("timeNanos")&&(typeof r.timeNanos=="number"?i.timeNanos=o.longs===String?String(r.timeNanos):r.timeNanos:i.timeNanos=o.longs===String?d.Long.prototype.toString.call(r.timeNanos):o.longs===Number?new d.LongBits(r.timeNanos.low>>>0,r.timeNanos.high>>>0).toNumber():r.timeNanos),r.durationNanos!=null&&r.hasOwnProperty("durationNanos")&&(typeof r.durationNanos=="number"?i.durationNanos=o.longs===String?String(r.durationNanos):r.durationNanos:i.durationNanos=o.longs===String?d.Long.prototype.toString.call(r.durationNanos):o.longs===Number?new d.LongBits(r.durationNanos.low>>>0,r.durationNanos.high>>>0).toNumber():r.durationNanos),r.periodType!=null&&r.hasOwnProperty("periodType")&&(i.periodType=k.perftools.profiles.ValueType.toObject(r.periodType,o)),r.period!=null&&r.hasOwnProperty("period")&&(typeof r.period=="number"?i.period=o.longs===String?String(r.period):r.period:i.period=o.longs===String?d.Long.prototype.toString.call(r.period):o.longs===Number?new d.LongBits(r.period.low>>>0,r.period.high>>>0).toNumber():r.period),r.comment&&r.comment.length){i.comment=[];for(var s=0;s>>0,r.comment[s].high>>>0).toNumber():r.comment[s]}return r.defaultSampleType!=null&&r.hasOwnProperty("defaultSampleType")&&(typeof r.defaultSampleType=="number"?i.defaultSampleType=o.longs===String?String(r.defaultSampleType):r.defaultSampleType:i.defaultSampleType=o.longs===String?d.Long.prototype.toString.call(r.defaultSampleType):o.longs===Number?new d.LongBits(r.defaultSampleType.low>>>0,r.defaultSampleType.high>>>0).toNumber():r.defaultSampleType),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e.ValueType=function(){function n(a){if(a)for(var r=Object.keys(a),o=0;o>>3){case 1:l.type=r.int64();break;case 2:l.unit=r.int64();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.type!=null&&r.hasOwnProperty("type")&&!d.isInteger(r.type)&&!(r.type&&d.isInteger(r.type.low)&&d.isInteger(r.type.high))?"type: integer|Long expected":r.unit!=null&&r.hasOwnProperty("unit")&&!d.isInteger(r.unit)&&!(r.unit&&d.isInteger(r.unit.low)&&d.isInteger(r.unit.high))?"unit: integer|Long expected":null},n.fromObject=function(r){if(r instanceof k.perftools.profiles.ValueType)return r;var o=new k.perftools.profiles.ValueType;return r.type!=null&&(d.Long?(o.type=d.Long.fromValue(r.type)).unsigned=!1:typeof r.type=="string"?o.type=parseInt(r.type,10):typeof r.type=="number"?o.type=r.type:typeof r.type=="object"&&(o.type=new d.LongBits(r.type.low>>>0,r.type.high>>>0).toNumber())),r.unit!=null&&(d.Long?(o.unit=d.Long.fromValue(r.unit)).unsigned=!1:typeof r.unit=="string"?o.unit=parseInt(r.unit,10):typeof r.unit=="number"?o.unit=r.unit:typeof r.unit=="object"&&(o.unit=new d.LongBits(r.unit.low>>>0,r.unit.high>>>0).toNumber())),o},n.toObject=function(r,o){o||(o={});var i={};if(o.defaults){if(d.Long){var l=new d.Long(0,0,!1);i.type=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.type=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.unit=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.unit=o.longs===String?"0":0}return r.type!=null&&r.hasOwnProperty("type")&&(typeof r.type=="number"?i.type=o.longs===String?String(r.type):r.type:i.type=o.longs===String?d.Long.prototype.toString.call(r.type):o.longs===Number?new d.LongBits(r.type.low>>>0,r.type.high>>>0).toNumber():r.type),r.unit!=null&&r.hasOwnProperty("unit")&&(typeof r.unit=="number"?i.unit=o.longs===String?String(r.unit):r.unit:i.unit=o.longs===String?d.Long.prototype.toString.call(r.unit):o.longs===Number?new d.LongBits(r.unit.low>>>0,r.unit.high>>>0).toNumber():r.unit),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e.Sample=function(){function n(a){if(this.locationId=[],this.value=[],this.label=[],a)for(var r=Object.keys(a),o=0;o>>3){case 1:if(l.locationId&&l.locationId.length||(l.locationId=[]),(s&7)===2)for(var A=r.uint32()+r.pos;r.pos>>0,r.locationId[i].high>>>0).toNumber(!0))}if(r.value){if(!Array.isArray(r.value))throw TypeError(".perftools.profiles.Sample.value: array expected");o.value=[];for(var i=0;i>>0,r.value[i].high>>>0).toNumber())}if(r.label){if(!Array.isArray(r.label))throw TypeError(".perftools.profiles.Sample.label: array expected");o.label=[];for(var i=0;i>>0,r.locationId[l].high>>>0).toNumber(!0):r.locationId[l]}if(r.value&&r.value.length){i.value=[];for(var l=0;l>>0,r.value[l].high>>>0).toNumber():r.value[l]}if(r.label&&r.label.length){i.label=[];for(var l=0;l>>3){case 1:l.key=r.int64();break;case 2:l.str=r.int64();break;case 3:l.num=r.int64();break;case 4:l.numUnit=r.int64();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.key!=null&&r.hasOwnProperty("key")&&!d.isInteger(r.key)&&!(r.key&&d.isInteger(r.key.low)&&d.isInteger(r.key.high))?"key: integer|Long expected":r.str!=null&&r.hasOwnProperty("str")&&!d.isInteger(r.str)&&!(r.str&&d.isInteger(r.str.low)&&d.isInteger(r.str.high))?"str: integer|Long expected":r.num!=null&&r.hasOwnProperty("num")&&!d.isInteger(r.num)&&!(r.num&&d.isInteger(r.num.low)&&d.isInteger(r.num.high))?"num: integer|Long expected":r.numUnit!=null&&r.hasOwnProperty("numUnit")&&!d.isInteger(r.numUnit)&&!(r.numUnit&&d.isInteger(r.numUnit.low)&&d.isInteger(r.numUnit.high))?"numUnit: integer|Long expected":null},n.fromObject=function(r){if(r instanceof k.perftools.profiles.Label)return r;var o=new k.perftools.profiles.Label;return r.key!=null&&(d.Long?(o.key=d.Long.fromValue(r.key)).unsigned=!1:typeof r.key=="string"?o.key=parseInt(r.key,10):typeof r.key=="number"?o.key=r.key:typeof r.key=="object"&&(o.key=new d.LongBits(r.key.low>>>0,r.key.high>>>0).toNumber())),r.str!=null&&(d.Long?(o.str=d.Long.fromValue(r.str)).unsigned=!1:typeof r.str=="string"?o.str=parseInt(r.str,10):typeof r.str=="number"?o.str=r.str:typeof r.str=="object"&&(o.str=new d.LongBits(r.str.low>>>0,r.str.high>>>0).toNumber())),r.num!=null&&(d.Long?(o.num=d.Long.fromValue(r.num)).unsigned=!1:typeof r.num=="string"?o.num=parseInt(r.num,10):typeof r.num=="number"?o.num=r.num:typeof r.num=="object"&&(o.num=new d.LongBits(r.num.low>>>0,r.num.high>>>0).toNumber())),r.numUnit!=null&&(d.Long?(o.numUnit=d.Long.fromValue(r.numUnit)).unsigned=!1:typeof r.numUnit=="string"?o.numUnit=parseInt(r.numUnit,10):typeof r.numUnit=="number"?o.numUnit=r.numUnit:typeof r.numUnit=="object"&&(o.numUnit=new d.LongBits(r.numUnit.low>>>0,r.numUnit.high>>>0).toNumber())),o},n.toObject=function(r,o){o||(o={});var i={};if(o.defaults){if(d.Long){var l=new d.Long(0,0,!1);i.key=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.key=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.str=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.str=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.num=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.num=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.numUnit=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.numUnit=o.longs===String?"0":0}return r.key!=null&&r.hasOwnProperty("key")&&(typeof r.key=="number"?i.key=o.longs===String?String(r.key):r.key:i.key=o.longs===String?d.Long.prototype.toString.call(r.key):o.longs===Number?new d.LongBits(r.key.low>>>0,r.key.high>>>0).toNumber():r.key),r.str!=null&&r.hasOwnProperty("str")&&(typeof r.str=="number"?i.str=o.longs===String?String(r.str):r.str:i.str=o.longs===String?d.Long.prototype.toString.call(r.str):o.longs===Number?new d.LongBits(r.str.low>>>0,r.str.high>>>0).toNumber():r.str),r.num!=null&&r.hasOwnProperty("num")&&(typeof r.num=="number"?i.num=o.longs===String?String(r.num):r.num:i.num=o.longs===String?d.Long.prototype.toString.call(r.num):o.longs===Number?new d.LongBits(r.num.low>>>0,r.num.high>>>0).toNumber():r.num),r.numUnit!=null&&r.hasOwnProperty("numUnit")&&(typeof r.numUnit=="number"?i.numUnit=o.longs===String?String(r.numUnit):r.numUnit:i.numUnit=o.longs===String?d.Long.prototype.toString.call(r.numUnit):o.longs===Number?new d.LongBits(r.numUnit.low>>>0,r.numUnit.high>>>0).toNumber():r.numUnit),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e.Mapping=function(){function n(a){if(a)for(var r=Object.keys(a),o=0;o>>3){case 1:l.id=r.uint64();break;case 2:l.memoryStart=r.uint64();break;case 3:l.memoryLimit=r.uint64();break;case 4:l.fileOffset=r.uint64();break;case 5:l.filename=r.int64();break;case 6:l.buildId=r.int64();break;case 7:l.hasFunctions=r.bool();break;case 8:l.hasFilenames=r.bool();break;case 9:l.hasLineNumbers=r.bool();break;case 10:l.hasInlineFrames=r.bool();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.id!=null&&r.hasOwnProperty("id")&&!d.isInteger(r.id)&&!(r.id&&d.isInteger(r.id.low)&&d.isInteger(r.id.high))?"id: integer|Long expected":r.memoryStart!=null&&r.hasOwnProperty("memoryStart")&&!d.isInteger(r.memoryStart)&&!(r.memoryStart&&d.isInteger(r.memoryStart.low)&&d.isInteger(r.memoryStart.high))?"memoryStart: integer|Long expected":r.memoryLimit!=null&&r.hasOwnProperty("memoryLimit")&&!d.isInteger(r.memoryLimit)&&!(r.memoryLimit&&d.isInteger(r.memoryLimit.low)&&d.isInteger(r.memoryLimit.high))?"memoryLimit: integer|Long expected":r.fileOffset!=null&&r.hasOwnProperty("fileOffset")&&!d.isInteger(r.fileOffset)&&!(r.fileOffset&&d.isInteger(r.fileOffset.low)&&d.isInteger(r.fileOffset.high))?"fileOffset: integer|Long expected":r.filename!=null&&r.hasOwnProperty("filename")&&!d.isInteger(r.filename)&&!(r.filename&&d.isInteger(r.filename.low)&&d.isInteger(r.filename.high))?"filename: integer|Long expected":r.buildId!=null&&r.hasOwnProperty("buildId")&&!d.isInteger(r.buildId)&&!(r.buildId&&d.isInteger(r.buildId.low)&&d.isInteger(r.buildId.high))?"buildId: integer|Long expected":r.hasFunctions!=null&&r.hasOwnProperty("hasFunctions")&&typeof r.hasFunctions!="boolean"?"hasFunctions: boolean expected":r.hasFilenames!=null&&r.hasOwnProperty("hasFilenames")&&typeof r.hasFilenames!="boolean"?"hasFilenames: boolean expected":r.hasLineNumbers!=null&&r.hasOwnProperty("hasLineNumbers")&&typeof r.hasLineNumbers!="boolean"?"hasLineNumbers: boolean expected":r.hasInlineFrames!=null&&r.hasOwnProperty("hasInlineFrames")&&typeof r.hasInlineFrames!="boolean"?"hasInlineFrames: boolean expected":null},n.fromObject=function(r){if(r instanceof k.perftools.profiles.Mapping)return r;var o=new k.perftools.profiles.Mapping;return r.id!=null&&(d.Long?(o.id=d.Long.fromValue(r.id)).unsigned=!0:typeof r.id=="string"?o.id=parseInt(r.id,10):typeof r.id=="number"?o.id=r.id:typeof r.id=="object"&&(o.id=new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0))),r.memoryStart!=null&&(d.Long?(o.memoryStart=d.Long.fromValue(r.memoryStart)).unsigned=!0:typeof r.memoryStart=="string"?o.memoryStart=parseInt(r.memoryStart,10):typeof r.memoryStart=="number"?o.memoryStart=r.memoryStart:typeof r.memoryStart=="object"&&(o.memoryStart=new d.LongBits(r.memoryStart.low>>>0,r.memoryStart.high>>>0).toNumber(!0))),r.memoryLimit!=null&&(d.Long?(o.memoryLimit=d.Long.fromValue(r.memoryLimit)).unsigned=!0:typeof r.memoryLimit=="string"?o.memoryLimit=parseInt(r.memoryLimit,10):typeof r.memoryLimit=="number"?o.memoryLimit=r.memoryLimit:typeof r.memoryLimit=="object"&&(o.memoryLimit=new d.LongBits(r.memoryLimit.low>>>0,r.memoryLimit.high>>>0).toNumber(!0))),r.fileOffset!=null&&(d.Long?(o.fileOffset=d.Long.fromValue(r.fileOffset)).unsigned=!0:typeof r.fileOffset=="string"?o.fileOffset=parseInt(r.fileOffset,10):typeof r.fileOffset=="number"?o.fileOffset=r.fileOffset:typeof r.fileOffset=="object"&&(o.fileOffset=new d.LongBits(r.fileOffset.low>>>0,r.fileOffset.high>>>0).toNumber(!0))),r.filename!=null&&(d.Long?(o.filename=d.Long.fromValue(r.filename)).unsigned=!1:typeof r.filename=="string"?o.filename=parseInt(r.filename,10):typeof r.filename=="number"?o.filename=r.filename:typeof r.filename=="object"&&(o.filename=new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber())),r.buildId!=null&&(d.Long?(o.buildId=d.Long.fromValue(r.buildId)).unsigned=!1:typeof r.buildId=="string"?o.buildId=parseInt(r.buildId,10):typeof r.buildId=="number"?o.buildId=r.buildId:typeof r.buildId=="object"&&(o.buildId=new d.LongBits(r.buildId.low>>>0,r.buildId.high>>>0).toNumber())),r.hasFunctions!=null&&(o.hasFunctions=!!r.hasFunctions),r.hasFilenames!=null&&(o.hasFilenames=!!r.hasFilenames),r.hasLineNumbers!=null&&(o.hasLineNumbers=!!r.hasLineNumbers),r.hasInlineFrames!=null&&(o.hasInlineFrames=!!r.hasInlineFrames),o},n.toObject=function(r,o){o||(o={});var i={};if(o.defaults){if(d.Long){var l=new d.Long(0,0,!0);i.id=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.id=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!0);i.memoryStart=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.memoryStart=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!0);i.memoryLimit=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.memoryLimit=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!0);i.fileOffset=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.fileOffset=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.filename=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.filename=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.buildId=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.buildId=o.longs===String?"0":0;i.hasFunctions=!1,i.hasFilenames=!1,i.hasLineNumbers=!1,i.hasInlineFrames=!1}return r.id!=null&&r.hasOwnProperty("id")&&(typeof r.id=="number"?i.id=o.longs===String?String(r.id):r.id:i.id=o.longs===String?d.Long.prototype.toString.call(r.id):o.longs===Number?new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0):r.id),r.memoryStart!=null&&r.hasOwnProperty("memoryStart")&&(typeof r.memoryStart=="number"?i.memoryStart=o.longs===String?String(r.memoryStart):r.memoryStart:i.memoryStart=o.longs===String?d.Long.prototype.toString.call(r.memoryStart):o.longs===Number?new d.LongBits(r.memoryStart.low>>>0,r.memoryStart.high>>>0).toNumber(!0):r.memoryStart),r.memoryLimit!=null&&r.hasOwnProperty("memoryLimit")&&(typeof r.memoryLimit=="number"?i.memoryLimit=o.longs===String?String(r.memoryLimit):r.memoryLimit:i.memoryLimit=o.longs===String?d.Long.prototype.toString.call(r.memoryLimit):o.longs===Number?new d.LongBits(r.memoryLimit.low>>>0,r.memoryLimit.high>>>0).toNumber(!0):r.memoryLimit),r.fileOffset!=null&&r.hasOwnProperty("fileOffset")&&(typeof r.fileOffset=="number"?i.fileOffset=o.longs===String?String(r.fileOffset):r.fileOffset:i.fileOffset=o.longs===String?d.Long.prototype.toString.call(r.fileOffset):o.longs===Number?new d.LongBits(r.fileOffset.low>>>0,r.fileOffset.high>>>0).toNumber(!0):r.fileOffset),r.filename!=null&&r.hasOwnProperty("filename")&&(typeof r.filename=="number"?i.filename=o.longs===String?String(r.filename):r.filename:i.filename=o.longs===String?d.Long.prototype.toString.call(r.filename):o.longs===Number?new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber():r.filename),r.buildId!=null&&r.hasOwnProperty("buildId")&&(typeof r.buildId=="number"?i.buildId=o.longs===String?String(r.buildId):r.buildId:i.buildId=o.longs===String?d.Long.prototype.toString.call(r.buildId):o.longs===Number?new d.LongBits(r.buildId.low>>>0,r.buildId.high>>>0).toNumber():r.buildId),r.hasFunctions!=null&&r.hasOwnProperty("hasFunctions")&&(i.hasFunctions=r.hasFunctions),r.hasFilenames!=null&&r.hasOwnProperty("hasFilenames")&&(i.hasFilenames=r.hasFilenames),r.hasLineNumbers!=null&&r.hasOwnProperty("hasLineNumbers")&&(i.hasLineNumbers=r.hasLineNumbers),r.hasInlineFrames!=null&&r.hasOwnProperty("hasInlineFrames")&&(i.hasInlineFrames=r.hasInlineFrames),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e.Location=function(){function n(a){if(this.line=[],a)for(var r=Object.keys(a),o=0;o>>3){case 1:l.id=r.uint64();break;case 2:l.mappingId=r.uint64();break;case 3:l.address=r.uint64();break;case 4:l.line&&l.line.length||(l.line=[]),l.line.push(k.perftools.profiles.Line.decode(r,r.uint32()));break;case 5:l.isFolded=r.bool();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.id!=null&&r.hasOwnProperty("id")&&!d.isInteger(r.id)&&!(r.id&&d.isInteger(r.id.low)&&d.isInteger(r.id.high)))return"id: integer|Long expected";if(r.mappingId!=null&&r.hasOwnProperty("mappingId")&&!d.isInteger(r.mappingId)&&!(r.mappingId&&d.isInteger(r.mappingId.low)&&d.isInteger(r.mappingId.high)))return"mappingId: integer|Long expected";if(r.address!=null&&r.hasOwnProperty("address")&&!d.isInteger(r.address)&&!(r.address&&d.isInteger(r.address.low)&&d.isInteger(r.address.high)))return"address: integer|Long expected";if(r.line!=null&&r.hasOwnProperty("line")){if(!Array.isArray(r.line))return"line: array expected";for(var o=0;o>>0,r.id.high>>>0).toNumber(!0))),r.mappingId!=null&&(d.Long?(o.mappingId=d.Long.fromValue(r.mappingId)).unsigned=!0:typeof r.mappingId=="string"?o.mappingId=parseInt(r.mappingId,10):typeof r.mappingId=="number"?o.mappingId=r.mappingId:typeof r.mappingId=="object"&&(o.mappingId=new d.LongBits(r.mappingId.low>>>0,r.mappingId.high>>>0).toNumber(!0))),r.address!=null&&(d.Long?(o.address=d.Long.fromValue(r.address)).unsigned=!0:typeof r.address=="string"?o.address=parseInt(r.address,10):typeof r.address=="number"?o.address=r.address:typeof r.address=="object"&&(o.address=new d.LongBits(r.address.low>>>0,r.address.high>>>0).toNumber(!0))),r.line){if(!Array.isArray(r.line))throw TypeError(".perftools.profiles.Location.line: array expected");o.line=[];for(var i=0;i>>0,r.id.high>>>0).toNumber(!0):r.id),r.mappingId!=null&&r.hasOwnProperty("mappingId")&&(typeof r.mappingId=="number"?i.mappingId=o.longs===String?String(r.mappingId):r.mappingId:i.mappingId=o.longs===String?d.Long.prototype.toString.call(r.mappingId):o.longs===Number?new d.LongBits(r.mappingId.low>>>0,r.mappingId.high>>>0).toNumber(!0):r.mappingId),r.address!=null&&r.hasOwnProperty("address")&&(typeof r.address=="number"?i.address=o.longs===String?String(r.address):r.address:i.address=o.longs===String?d.Long.prototype.toString.call(r.address):o.longs===Number?new d.LongBits(r.address.low>>>0,r.address.high>>>0).toNumber(!0):r.address),r.line&&r.line.length){i.line=[];for(var s=0;s>>3){case 1:l.functionId=r.uint64();break;case 2:l.line=r.int64();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.functionId!=null&&r.hasOwnProperty("functionId")&&!d.isInteger(r.functionId)&&!(r.functionId&&d.isInteger(r.functionId.low)&&d.isInteger(r.functionId.high))?"functionId: integer|Long expected":r.line!=null&&r.hasOwnProperty("line")&&!d.isInteger(r.line)&&!(r.line&&d.isInteger(r.line.low)&&d.isInteger(r.line.high))?"line: integer|Long expected":null},n.fromObject=function(r){if(r instanceof k.perftools.profiles.Line)return r;var o=new k.perftools.profiles.Line;return r.functionId!=null&&(d.Long?(o.functionId=d.Long.fromValue(r.functionId)).unsigned=!0:typeof r.functionId=="string"?o.functionId=parseInt(r.functionId,10):typeof r.functionId=="number"?o.functionId=r.functionId:typeof r.functionId=="object"&&(o.functionId=new d.LongBits(r.functionId.low>>>0,r.functionId.high>>>0).toNumber(!0))),r.line!=null&&(d.Long?(o.line=d.Long.fromValue(r.line)).unsigned=!1:typeof r.line=="string"?o.line=parseInt(r.line,10):typeof r.line=="number"?o.line=r.line:typeof r.line=="object"&&(o.line=new d.LongBits(r.line.low>>>0,r.line.high>>>0).toNumber())),o},n.toObject=function(r,o){o||(o={});var i={};if(o.defaults){if(d.Long){var l=new d.Long(0,0,!0);i.functionId=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.functionId=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.line=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.line=o.longs===String?"0":0}return r.functionId!=null&&r.hasOwnProperty("functionId")&&(typeof r.functionId=="number"?i.functionId=o.longs===String?String(r.functionId):r.functionId:i.functionId=o.longs===String?d.Long.prototype.toString.call(r.functionId):o.longs===Number?new d.LongBits(r.functionId.low>>>0,r.functionId.high>>>0).toNumber(!0):r.functionId),r.line!=null&&r.hasOwnProperty("line")&&(typeof r.line=="number"?i.line=o.longs===String?String(r.line):r.line:i.line=o.longs===String?d.Long.prototype.toString.call(r.line):o.longs===Number?new d.LongBits(r.line.low>>>0,r.line.high>>>0).toNumber():r.line),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e.Function=function(){function n(a){if(a)for(var r=Object.keys(a),o=0;o>>3){case 1:l.id=r.uint64();break;case 2:l.name=r.int64();break;case 3:l.systemName=r.int64();break;case 4:l.filename=r.int64();break;case 5:l.startLine=r.int64();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.id!=null&&r.hasOwnProperty("id")&&!d.isInteger(r.id)&&!(r.id&&d.isInteger(r.id.low)&&d.isInteger(r.id.high))?"id: integer|Long expected":r.name!=null&&r.hasOwnProperty("name")&&!d.isInteger(r.name)&&!(r.name&&d.isInteger(r.name.low)&&d.isInteger(r.name.high))?"name: integer|Long expected":r.systemName!=null&&r.hasOwnProperty("systemName")&&!d.isInteger(r.systemName)&&!(r.systemName&&d.isInteger(r.systemName.low)&&d.isInteger(r.systemName.high))?"systemName: integer|Long expected":r.filename!=null&&r.hasOwnProperty("filename")&&!d.isInteger(r.filename)&&!(r.filename&&d.isInteger(r.filename.low)&&d.isInteger(r.filename.high))?"filename: integer|Long expected":r.startLine!=null&&r.hasOwnProperty("startLine")&&!d.isInteger(r.startLine)&&!(r.startLine&&d.isInteger(r.startLine.low)&&d.isInteger(r.startLine.high))?"startLine: integer|Long expected":null},n.fromObject=function(r){if(r instanceof k.perftools.profiles.Function)return r;var o=new k.perftools.profiles.Function;return r.id!=null&&(d.Long?(o.id=d.Long.fromValue(r.id)).unsigned=!0:typeof r.id=="string"?o.id=parseInt(r.id,10):typeof r.id=="number"?o.id=r.id:typeof r.id=="object"&&(o.id=new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0))),r.name!=null&&(d.Long?(o.name=d.Long.fromValue(r.name)).unsigned=!1:typeof r.name=="string"?o.name=parseInt(r.name,10):typeof r.name=="number"?o.name=r.name:typeof r.name=="object"&&(o.name=new d.LongBits(r.name.low>>>0,r.name.high>>>0).toNumber())),r.systemName!=null&&(d.Long?(o.systemName=d.Long.fromValue(r.systemName)).unsigned=!1:typeof r.systemName=="string"?o.systemName=parseInt(r.systemName,10):typeof r.systemName=="number"?o.systemName=r.systemName:typeof r.systemName=="object"&&(o.systemName=new d.LongBits(r.systemName.low>>>0,r.systemName.high>>>0).toNumber())),r.filename!=null&&(d.Long?(o.filename=d.Long.fromValue(r.filename)).unsigned=!1:typeof r.filename=="string"?o.filename=parseInt(r.filename,10):typeof r.filename=="number"?o.filename=r.filename:typeof r.filename=="object"&&(o.filename=new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber())),r.startLine!=null&&(d.Long?(o.startLine=d.Long.fromValue(r.startLine)).unsigned=!1:typeof r.startLine=="string"?o.startLine=parseInt(r.startLine,10):typeof r.startLine=="number"?o.startLine=r.startLine:typeof r.startLine=="object"&&(o.startLine=new d.LongBits(r.startLine.low>>>0,r.startLine.high>>>0).toNumber())),o},n.toObject=function(r,o){o||(o={});var i={};if(o.defaults){if(d.Long){var l=new d.Long(0,0,!0);i.id=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.id=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.name=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.name=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.systemName=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.systemName=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.filename=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.filename=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.startLine=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.startLine=o.longs===String?"0":0}return r.id!=null&&r.hasOwnProperty("id")&&(typeof r.id=="number"?i.id=o.longs===String?String(r.id):r.id:i.id=o.longs===String?d.Long.prototype.toString.call(r.id):o.longs===Number?new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0):r.id),r.name!=null&&r.hasOwnProperty("name")&&(typeof r.name=="number"?i.name=o.longs===String?String(r.name):r.name:i.name=o.longs===String?d.Long.prototype.toString.call(r.name):o.longs===Number?new d.LongBits(r.name.low>>>0,r.name.high>>>0).toNumber():r.name),r.systemName!=null&&r.hasOwnProperty("systemName")&&(typeof r.systemName=="number"?i.systemName=o.longs===String?String(r.systemName):r.systemName:i.systemName=o.longs===String?d.Long.prototype.toString.call(r.systemName):o.longs===Number?new d.LongBits(r.systemName.low>>>0,r.systemName.high>>>0).toNumber():r.systemName),r.filename!=null&&r.hasOwnProperty("filename")&&(typeof r.filename=="number"?i.filename=o.longs===String?String(r.filename):r.filename:i.filename=o.longs===String?d.Long.prototype.toString.call(r.filename):o.longs===Number?new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber():r.filename),r.startLine!=null&&r.hasOwnProperty("startLine")&&(typeof r.startLine=="number"?i.startLine=o.longs===String?String(r.startLine):r.startLine:i.startLine=o.longs===String?d.Long.prototype.toString.call(r.startLine):o.longs===Number?new d.LongBits(r.startLine.low>>>0,r.startLine.high>>>0).toNumber():r.startLine),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e}(),t}();vu.exports=k});var Ru=S((PS,Du)=>{Du.exports=oe;var dt=null;try{dt=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function oe(t,e,n){this.low=t|0,this.high=e|0,this.unsigned=!!n}oe.prototype.__isLong__;Object.defineProperty(oe.prototype,"__isLong__",{value:!0});function qe(t){return(t&&t.__isLong__)===!0}oe.isLong=qe;var Bu={},ju={};function Hn(t,e){var n,a,r;return e?(t>>>=0,(r=0<=t&&t<256)&&(a=ju[t],a)?a:(n=ie(t,(t|0)<0?-1:0,!0),r&&(ju[t]=n),n)):(t|=0,(r=-128<=t&&t<128)&&(a=Bu[t],a)?a:(n=ie(t,t<0?-1:0,!1),r&&(Bu[t]=n),n))}oe.fromInt=Hn;function ut(t,e){if(isNaN(t))return e?Tn:ft;if(e){if(t<0)return Tn;if(t>=xu)return ku}else{if(t<=-wu)return We;if(t+1>=wu)return Nu}return t<0?ut(-t,e).neg():ie(t%dr|0,t/dr|0,e)}oe.fromNumber=ut;function ie(t,e,n){return new oe(t,e,n)}oe.fromBits=ie;var Wo=Math.pow;function mA(t,e,n){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return ft;if(typeof e=="number"?(n=e,e=!1):e=!!e,n=n||10,n<2||360)throw Error("interior hyphen");if(a===0)return mA(t.substring(1),e,n).neg();for(var r=ut(Wo(n,8)),o=ft,i=0;i>>0:this.low};x.toNumber=function(){return this.unsigned?(this.high>>>0)*dr+(this.low>>>0):this.high*dr+(this.low>>>0)};x.toString=function(e){if(e=e||10,e<2||36>>0,c=A.toString(e);if(i=s,i.isZero())return c+l;for(;c.length<6;)c="0"+c;l=""+c+l}};x.getHighBits=function(){return this.high};x.getHighBitsUnsigned=function(){return this.high>>>0};x.getLowBits=function(){return this.low};x.getLowBitsUnsigned=function(){return this.low>>>0};x.getNumBitsAbs=function(){if(this.isNegative())return this.eq(We)?64:this.neg().getNumBitsAbs();for(var e=this.high!=0?this.high:this.low,n=31;n>0&&!(e&1<=0};x.isOdd=function(){return(this.low&1)===1};x.isEven=function(){return(this.low&1)===0};x.equals=function(e){return qe(e)||(e=Bt(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low};x.eq=x.equals;x.notEquals=function(e){return!this.eq(e)};x.neq=x.notEquals;x.ne=x.notEquals;x.lessThan=function(e){return this.comp(e)<0};x.lt=x.lessThan;x.lessThanOrEqual=function(e){return this.comp(e)<=0};x.lte=x.lessThanOrEqual;x.le=x.lessThanOrEqual;x.greaterThan=function(e){return this.comp(e)>0};x.gt=x.greaterThan;x.greaterThanOrEqual=function(e){return this.comp(e)>=0};x.gte=x.greaterThanOrEqual;x.ge=x.greaterThanOrEqual;x.compare=function(e){if(qe(e)||(e=Bt(e)),this.eq(e))return 0;var n=this.isNegative(),a=e.isNegative();return n&&!a?-1:!n&&a?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1};x.comp=x.compare;x.negate=function(){return!this.unsigned&&this.eq(We)?We:this.not().add(gr)};x.neg=x.negate;x.add=function(e){qe(e)||(e=Bt(e));var n=this.high>>>16,a=this.high&65535,r=this.low>>>16,o=this.low&65535,i=e.high>>>16,l=e.high&65535,s=e.low>>>16,A=e.low&65535,c=0,h=0,_=0,f=0;return f+=o+A,_+=f>>>16,f&=65535,_+=r+s,h+=_>>>16,_&=65535,h+=a+l,c+=h>>>16,h&=65535,c+=n+i,c&=65535,ie(_<<16|f,c<<16|h,this.unsigned)};x.subtract=function(e){return qe(e)||(e=Bt(e)),this.add(e.neg())};x.sub=x.subtract;x.multiply=function(e){if(this.isZero())return ft;if(qe(e)||(e=Bt(e)),dt){var n=dt.mul(this.low,this.high,e.low,e.high);return ie(n,dt.get_high(),this.unsigned)}if(e.isZero())return ft;if(this.eq(We))return e.isOdd()?We:ft;if(e.eq(We))return this.isOdd()?We:ft;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(bu)&&e.lt(bu))return ut(this.toNumber()*e.toNumber(),this.unsigned);var a=this.high>>>16,r=this.high&65535,o=this.low>>>16,i=this.low&65535,l=e.high>>>16,s=e.high&65535,A=e.low>>>16,c=e.low&65535,h=0,_=0,f=0,m=0;return m+=i*c,f+=m>>>16,m&=65535,f+=o*c,_+=f>>>16,f&=65535,f+=i*A,_+=f>>>16,f&=65535,_+=r*c,h+=_>>>16,_&=65535,_+=o*A,h+=_>>>16,_&=65535,_+=i*s,h+=_>>>16,_&=65535,h+=a*c+r*A+o*s+i*l,h&=65535,ie(f<<16|m,h<<16|_,this.unsigned)};x.mul=x.multiply;x.divide=function(e){if(qe(e)||(e=Bt(e)),e.isZero())throw Error("division by zero");if(dt){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?dt.div_u:dt.div_s)(this.low,this.high,e.low,e.high);return ie(n,dt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Tn:ft;var a,r,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return Tn;if(e.gt(this.shru(1)))return Su;o=Tn}else{if(this.eq(We)){if(e.eq(gr)||e.eq(CA))return We;if(e.eq(We))return gr;var i=this.shr(1);return a=i.div(e).shl(1),a.eq(ft)?e.isNegative()?gr:CA:(r=this.sub(e.mul(a)),o=a.add(r.div(e)),o)}else if(e.eq(We))return this.unsigned?Tn:ft;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=ft}for(r=this;r.gte(e);){a=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var l=Math.ceil(Math.log(a)/Math.LN2),s=l<=48?1:Wo(2,l-48),A=ut(a),c=A.mul(e);c.isNegative()||c.gt(r);)a-=s,A=ut(a,this.unsigned),c=A.mul(e);A.isZero()&&(A=gr),o=o.add(A),r=r.sub(c)}return o};x.div=x.divide;x.modulo=function(e){if(qe(e)||(e=Bt(e)),dt){var n=(this.unsigned?dt.rem_u:dt.rem_s)(this.low,this.high,e.low,e.high);return ie(n,dt.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))};x.mod=x.modulo;x.rem=x.modulo;x.not=function(){return ie(~this.low,~this.high,this.unsigned)};x.and=function(e){return qe(e)||(e=Bt(e)),ie(this.low&e.low,this.high&e.high,this.unsigned)};x.or=function(e){return qe(e)||(e=Bt(e)),ie(this.low|e.low,this.high|e.high,this.unsigned)};x.xor=function(e){return qe(e)||(e=Bt(e)),ie(this.low^e.low,this.high^e.high,this.unsigned)};x.shiftLeft=function(e){return qe(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?ie(this.low<>>32-e,this.unsigned):ie(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):ie(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};x.shr=x.shiftRight;x.shiftRightUnsigned=function(e){if(qe(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var a=this.low;return ie(a>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?ie(n,0,this.unsigned):ie(n>>>e-32,0,this.unsigned)};x.shru=x.shiftRightUnsigned;x.shr_u=x.shiftRightUnsigned;x.toSigned=function(){return this.unsigned?ie(this.low,this.high,!1):this};x.toUnsigned=function(){return this.unsigned?this:ie(this.low,this.high,!0)};x.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()};x.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};x.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]};oe.fromBytes=function(e,n,a){return a?oe.fromBytesLE(e,n):oe.fromBytesBE(e,n)};oe.fromBytesLE=function(e,n){return new oe(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)};oe.fromBytesBE=function(e,n){return new oe(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}});function Mv(t){let e=t.defaultSampleType,n=t.sampleType,a=n.length-1;if(!e||!+e)return a;let r=n.findIndex(o=>o.type===e);return r===-1?a:r}function Tu(t){if(t.byteLength===0)return null;let e;try{e=Fu.perftools.profiles.Profile.decode(new Uint8Array(t))}catch{return null}function n(_){return typeof _=="number"?_:_.low}function a(_){return e.stringTable[n(_)]||null}let r=new Map;function o(_){let{name:f,filename:m,startLine:u}=_,g=f!=null&&a(f)||"(unknown)",p=m!=null?a(m):null,I=u!=null?+u:null,B={key:`${g}:${p}:${I}`,name:g};return p!=null&&(B.file=p),I!=null&&(B.line=I),B}for(let _ of e.function)if(_.id){let f=o(_);f!=null&&r.set(n(_.id),f)}function i(_){let{line:f}=_;if(f==null)return null;let m=ne(f);if(m==null)return null;if(m.functionId){let u=r.get(n(m.functionId)),g=m.line instanceof Lu.default?m.line.toNumber():m.line;return g&&g>0&&u!=null&&(u.line=g),u||null}else return null}let l=new Map;for(let _ of e.location)if(_.id!=null){let f=i(_);f&&l.set(n(_.id),f)}let s=e.sampleType.map(_=>({type:_.type&&a(_.type)||"samples",unit:_.unit&&a(_.unit)||"count"})),A=Mv(e);if(A<0||A>=s.length)return null;let c=s[A],h=new ae;switch(c.unit){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":h.setValueFormatter(new ee(c.unit));break;case"bytes":h.setValueFormatter(new ze);break}for(let _ of e.sample){let f=_.locationId?_.locationId.map(u=>l.get(n(u))):[];if(f.reverse(),_.value==null||_.value.length<=A)return null;let m=_.value[A];h.appendSampleWithWeight(f.filter(u=>u!=null),+m)}return h.build()}var Fu,Lu,Hu=le(()=>{"use strict";Fu=_e(Eu());Re();W();Me();Lu=_e(Ru())});function Uv(t){return ke(Jv,t,e=>{let n=e.url,a=e.lineNumber,r=e.columnNumber,o=e.functionName||(n?`(anonymous ${n.split("/").pop()}:${a})`:"(anonymous)");return{key:`${o}:${n}:${a}:${r}`,name:o,file:n,line:a,col:r}})}function IA(t){let e=new Map,n=0,a=(s,A)=>{s.id=n++,e.set(s.id,s),A&&(s.parent=A.id),s.children.forEach(c=>a(c,s))};a(t.head);let r=s=>{if(s.children.length===0)return s.selfSize||0;let A=s.children.reduce((c,h)=>(c+=r(h),c),s.selfSize);return s.totalSize=A,A},o=r(t.head),i=[];for(let s of e.values()){let A=[];for(A.push(s);s.parent!==void 0;){let c=e.get(s.parent);if(c===void 0)break;A.unshift(c),s=c}i.push(A)}let l=new ae(o);for(let s of i){let A=s[s.length-1];l.appendSampleWithWeight(s.map(c=>Uv(c.callFrame)),A.selfSize)}return l.setValueFormatter(new ze),l.build()}var Jv,Mu=le(()=>{"use strict";Re();W();Me();Jv=new Map});function qo(t,e){return`${an(""+t,10)}:${an(""+e,10)}`}function Ju(t){let e=new Map;for(let n of t)ke(e,qo(Number(n.pid),Number(n.tid)),()=>[]).push(n);return e}function Pv(t,e){if(t.length===0&&e.length===0)throw new Error("This method should not be given both queues empty");if(e.length===0)return"B";if(t.length===0)return"E";let n=t[0],a=e[0],r=n.ts,o=a.ts;return r0){let i=Number.MAX_SAFE_INTEGER;for(let l of t)i=Math.min(i,l.ts);for(let l of t)l.ts-=i}let a=[];for(let i of t)switch(i.ph){case"B":{e.push(i);break}case"E":{n.push(i);break}case"X":{a.push(i);break}default:return i}function r(i){return i.dur??i.tdur??0}a.sort((i,l)=>{if(i.tsl.ts)return 1;let s=r(i),A=r(l);return s>A?-1:sl.ts?1:0}return e.sort(o),n.sort(o),[e,n]}function Gv(t){let e=[];for(let n of t)switch(n.ph){case"B":case"E":case"X":e.push(n)}return e}function Uu(t){let e=new Map;for(let n of t)n.ph==="M"&&n.name==="process_name"&&n.args&&n.args.name&&e.set(n.pid,n.args.name);return e}function Ku(t){let e=new Map;for(let n of t)n.ph==="M"&&n.name==="thread_name"&&n.args&&n.args.name&&e.set(qo(n.pid,n.tid),n.args.name);return e}function Pu(t){return`${t.name||"(unnamed)"}`}function vA(t){let e=Pu(t);return t.args&&(e+=` ${JSON.stringify(t.args)}`),e}function Mn(t,e="UNKNOWN"){if(e==="HERMES"){let a=`${t.name}:${t.args.url}:${t.args.line}:${t.args.column}`;return{name:Pu(t),key:a,file:t.args.url,line:t.args.line,col:t.args.column}}let n=vA(t);return{name:n,key:n}}function Ou(t,e,n,a){return t!=null&&e!=null?`${t} (pid ${n}), ${e} (tid ${a})`:t!=null?`${t} (pid ${n}, tid ${a})`:e!=null?`${e} (pid ${n}, tid ${a})`:`pid ${n}, tid ${a}`}function zv(t,e){let n=Uu(t),a=Ku(t),r=new Map;return e.forEach(o=>{if(o.length===0)return;let i=Number(o[0].pid),l=Number(o[0].tid),s=qo(i,l),A=n.get(i),c=a.get(s),h=Ou(A,c,i,l);r.set(s,h)}),r}function Vv(t,e){let n=Uu(t),a=Ku(t),r=new Map;return e.forEach(o=>{if(o.length===0)return;let{pid:i,tid:l}=o[0],s=qo(i,l),A=n.get(i),c=a.get(s),h=Ou(A,c,i,l);r.set(s,h)}),r}function Yv(t,e,n="UNKNOWN"){let[a,r]=Ov(t),o=new me;o.setValueFormatter(new ee("microseconds")),o.setName(e);let i=[],l=A=>{i.push(A),o.enterFrame(Mn(A,n),A.ts)},s=A=>{let c=ne(i);if(c==null){console.warn(`Tried to end frame "${Mn(A,n).key}", but the stack was empty. Doing nothing instead.`);return}let h=Mn(A,n),_=Mn(c,n);if(A.name!==c.name){console.warn(`ts=${A.ts}: Tried to end "${h.key}" when "${_.key}" was on the top of the stack. Doing nothing instead.`);return}h.key!==_.key&&console.warn(`ts=${A.ts}: Tried to end "${h.key}" when "${_.key}" was on the top of the stack. Ending ${_.key} instead.`),i.pop(),o.leaveFrame(_,A.ts)};for(;a.length>0||r.length>0;){let A=Pv(a,r);switch(A){case"B":{l(a.shift());break}case"E":{let h=ne(i);if(h!=null){let f=Mn(h,n),m=!1;for(let u=1;ur[0].ts)break;let p=Mn(g,n);if(f.key===p.key){let I=r[0];r[0]=r[u],r[u]=I,m=!0;break}}if(!m)for(let u=1;ur[0].ts)break;if(g.name===h.name){let p=r[0];r[0]=r[u],r[u]=p,m=!0;break}}}let _=r.shift();s(_);break}default:return A}}for(let A=i.length-1;A>=0;A--){let c=Mn(i[A],n);console.warn(`Frame "${c.key}" was still open at end of profile. Closing automatically.`),o.leaveFrame(c,o.getTotalWeight())}return o.build()}function Wv(t){let e=[],n=Number(t[0].ts);return t.forEach((a,r)=>{if(r===0)return;let o=Number(a.ts)-n;n=Number(a.ts),e.push(o)}),e.push(0),e}function qv({name:t,category:e}){return{key:`${t}:${e}`,name:t}}function $v(t,e){let n=[],a=e;for(;a;){let r=t[a];if(!r)throw new Error(`Could not find frame for id ${a}`);n.push(qv(r)),a=r.parent}return n.reverse()}function Zv(t,e,n){let a=new ae;a.setValueFormatter(new ee("microseconds")),a.setName(n);let r=Wv(e);return e.forEach((o,i)=>{let l=r[i],s=$v(t.stackFrames,o.sf);a.appendSampleWithWeight(s,l)}),a.build()}function yA(t,e="UNKNOWN"){let n=Gv(t),a=Ju(n),r=Vv(t,a),o=[];return r.forEach((i,l)=>{let s=a.get(l);if(!s)throw new Error(`Could not find events for key: ${s}`);o.push([l,Yv(s,i,e)])}),Ne(o,i=>i[0]),{name:"",indexToView:0,profiles:o.map(i=>i[1])}}function Xv(t){let e=Ju(t.samples),n=zv(t.traceEvents,e),a=[];return n.forEach((r,o)=>{let i=e.get(o);if(!i)throw new Error(`Could not find samples for key: ${i}`);i.length!==0&&a.push([o,Zv(t,i,r)])}),Ne(a,r=>r[0]),{name:"",indexToView:0,profiles:a.map(r=>r[1])}}function oa(t){if(!Array.isArray(t)||t.length===0)return!1;for(let e of t){if(!("ph"in e))return!1;switch(e.ph){case"B":case"E":case"X":if(!("ts"in e))return!1;case"M":break}}return!0}function eE(t){return t?Kv.every(e=>e in t):!1}function tE(t){return oa(t)?eE(t[0].args):!1}function Gu(t){return"traceEvents"in t?oa(t.traceEvents):!1}function nE(t){return"traceEvents"in t&&"stackFrames"in t&&"samples"in t&&oa(t.traceEvents)}function zu(t){return Gu(t)||oa(t)}function Vu(t){return nE(t)?Xv(t):Gu(t)?yA(t.traceEvents):tE(t)?yA(t,"HERMES"):oa(t)?yA(t):t}var Kv,Yu=le(()=>{"use strict";W();Re();Me();Kv=["line","column","name","category","url","params","allocatedCategory","allocatedName"]});function jA(t,e){return new BA(t,e).parse()}var EA,BA,Wu=le(()=>{"use strict";Re();W();Me();EA=class{constructor(e,n){this.fileName=e;this.fieldName=n;this.frameSet=new wt;this.totalWeights=new Map;this.childrenTotalWeights=new Map}getOrInsertFrame(e){return Ce.getOrInsert(this.frameSet,e)}addToTotalWeight(e,n){this.totalWeights.has(e)?this.totalWeights.set(e,this.totalWeights.get(e)+n):this.totalWeights.set(e,n)}addSelfWeight(e,n){this.addToTotalWeight(this.getOrInsertFrame(e),n)}addChildWithTotalWeight(e,n,a){let r=this.getOrInsertFrame(e),o=this.getOrInsertFrame(n),i=ke(this.childrenTotalWeights,r,l=>new Map);i.has(o)?i.set(o,i.get(o)+a):i.set(o,a),this.addToTotalWeight(r,a)}toProfile(){let e=new me,n=1;this.fieldName==="Time_(10ns)"?(e.setName(`${this.fileName} -- Time`),n=10,e.setValueFormatter(new ee("nanoseconds"))):this.fieldName=="Memory_(bytes)"?(e.setName(`${this.fileName} -- Memory`),e.setValueFormatter(new ze)):e.setName(`${this.fileName} -- ${this.fieldName}`);let a=0,r=new Set,o=0;for(let[s,A]of this.totalWeights)o=Math.max(o,A);let i=(s,A)=>{if(r.has(s)||A<1e-4*o)return;let c=ca(this.totalWeights,s,()=>0);if(c===0)return;let h=A;e.enterFrame(s,Math.round(a*n)),r.add(s);for(let[_,f]of this.childrenTotalWeights.get(s)||[]){let m=A*(f/c),u=a;i(_,m);let g=a-u;h-=g}r.delete(s),a+=h,e.leaveFrame(s,Math.round(a*n))},l=new Set(this.frameSet);for(let[s,A]of this.childrenTotalWeights)for(let[c,h]of A)l.delete(c);for(let s of l)i(s,this.totalWeights.get(s));return e.build()}},BA=class{constructor(e,n){this.importedFileName=n;this.callGraphs=null;this.eventsLine=null;this.filename=null;this.functionName=null;this.calleeFilename=null;this.calleeFunctionName=null;this.savedFileNames={};this.savedFunctionNames={};this.prevCostLineNumbers=[];this.lines=[...e.splitLines()],this.lineNum=0}parse(){for(;this.lineNume.toProfile())}:null}frameInfo(){let e=this.filename||"(unknown)",n=this.functionName||"(unknown)";return{key:`${e}:${n}`,name:n,file:e}}calleeFrameInfo(){let e=this.calleeFilename||this.filename||"(unknown)",n=this.calleeFunctionName||"(unknown)";return{key:`${e}:${n}`,name:n,file:e}}parseHeaderLine(e){let n=/^\s*(\w+):\s*(.*)+$/.exec(e);if(!n)return!1;if(n[1]!=="events")return!0;let a=n[2].split(" ");if(this.callGraphs!=null)throw new Error(`Duplicate "events: " lines specified. First was "${this.eventsLine}", now received "${e}" on ${this.lineNum}.`);return this.callGraphs=a.map(r=>new EA(this.importedFileName,r)),!0}parseAssignmentLine(e){let n=/^(\w+)=\s*(.*)$/.exec(e);if(!n)return!1;let a=n[1],r=n[2];switch(a){case"fe":case"fi":{this.parseNameWithCompression(r,this.savedFileNames);break}case"fl":{this.filename=this.parseNameWithCompression(r,this.savedFileNames);break}case"fn":{this.functionName=this.parseNameWithCompression(r,this.savedFunctionNames);break}case"cfi":case"cfl":{this.calleeFilename=this.parseNameWithCompression(r,this.savedFileNames);break}case"cfn":{this.calleeFunctionName=this.parseNameWithCompression(r,this.savedFunctionNames);break}case"calls":{this.parseCostLine(this.lines[this.lineNum++],"child"),this.calleeFilename=null,this.calleeFunctionName=null;break}case"cob":case"ob":break;default:console.log(`Ignoring assignment to unrecognized key "${e}" on line ${this.lineNum}`)}return!0}parseNameWithCompression(e,n){{let a=/^\((\d+)\)\s*(.+)$/.exec(e);if(a){let r=a[1],o=a[2];if(r in n)throw new Error(`Redefinition of name with id: ${r}. Original value was "${n[r]}". Tried to redefine as "${o}" on line ${this.lineNum}.`);return n[r]=o,o}}{let a=/^\((\d+)\)$/.exec(e);if(a){let r=a[1];if(!(r in n))throw new Error(`Tried to use name with id ${r} on line ${this.lineNum} before it was defined.`);return n[r]}}return e}parseCostLine(e,n){let a=e.split(/\s+/),r=[];for(let i=0;i!/^$|^Log closed$|log opened/.exec(p)),a=-1,r=g(n[0]);if(r===null)throw Error;a=r.at;let o=ne(n);if(o===null)throw Error;let i=g(o);if(i===null)throw Error;let l=i.at,s=new wt,A=[],c=0,h,_=-1;function f(p,I,y){function B(b,D){A.push(D),e.enterFrame(Ce.getOrInsert(s,{name:D,key:D}),b),c=b}_>-1&&(_=-1,h===y&&_>=c&&f(p,_,`QUEUE ${y}`));let E=`STACK ${p}`;[...A].reverse().find(b=>b.startsWith("STACK "))!==E&&(A.length===1&&m(c),B(I,E)),B(I,y)}function m(p){let I=A.pop();if(I===void 0)throw Error("Tried to leave frame when nothing was on stack.");e.leaveFrame(Ce.getOrInsert(s,{name:I,key:I}),p);let y=ne(A);y!==null&&y.startsWith("QUEUE ")&&(m(p),y=ne(A)),A.length>1&&y!==null&&y.startsWith("STACK ")&&m(p),c=p}function u(p,I,y){ne(A)===y?m(I):c===0?(console.log(`Tried to leave frame "${y}" which was never entered. Assuming it has been running since the start.`),f(p,0,y),m(I)):console.log(`Tried to leave frame "${y}" which was never entered. Other events have happened since the start, ignoring line.`)}function g(p){if(p===void 0)throw Error("Probably tried to import empty file.");let I=p.split(":");return I.length<3?null:a!==-1?{at:parseInt(I[0])-a,event:I[1],stackInt:parseInt(I[2]),name:I[5]}:{at:parseInt(I[0]),event:I[1],stackInt:parseInt(I[2]),name:I[5]}}for(n.forEach((p,I,y)=>{let B=g(p);if(B!==null){if(B.event==="PUSH"){f(B.stackInt,B.at,B.name),I+=1;let E=g(y[I]);for(;E!==null&&E.at===B.at;)E.name===B.name&&E.stackInt===B.stackInt&&E.event==="POP"?(u(E.stackInt,E.at,E.name),y.splice(I,1),E=null):(I+=1,I0;)m(l);return e.build()}var $u=le(()=>{"use strict";Re();W();Me()});function QA(t){let e=new ae,n=[],a,r="0",o=-1;for(let s of t.splitLines()){let A=/^( *)[\d.]+% \[(\d+)\]\s*(\S+)(?: @ (.*))?$/gm.exec(s);if(!A)continue;let c=A[1].length;if(c<=o){let _=n.slice(0,o+1).reverse(),f=parseInt(r,10);e.appendSampleWithWeight(_,f)}let h=A[3];a=A[4]||a,n[c]={key:h,name:h,file:a},r=A[2],o=c}if(o==-1)return null;let i=n.slice(0,o+1).reverse(),l=parseInt(r,10);return e.appendSampleWithWeight(i,l),e.build()}var Zu=le(()=>{"use strict";Re()});var Xu={};NA(Xu,{importFromFileSystemDirectoryEntry:()=>AE,importProfileGroupFromBase64:()=>aE,importProfileGroupFromText:()=>rE,importProfilesFromArrayBuffer:()=>iE,importProfilesFromFile:()=>oE});async function rE(t,e){return await $o(new Ko(t,e))}async function aE(t,e){return await $o(nn.fromArrayBuffer(t,VA(e).buffer))}async function oE(t){return $o(nn.fromFile(t))}async function iE(t,e){return $o(nn.fromArrayBuffer(t,e))}async function $o(t){let e=await t.name(),n=await lE(t);if(n){n.name||(n.name=e);for(let a of n.profiles)a&&!a.getName()&&a.setName(e);return n}return null}function je(t){return t?{name:t.getName(),indexToView:0,profiles:[t]}:null}async function lE(t){let e=await t.name(),n=await t.readAsArrayBuffer();{let o=Tu(n);if(o)return console.log("Importing as protobuf encoded pprof file"),je(o)}let a=await t.readAsText();if(e.endsWith(".speedscope.json"))return console.log("Importing as speedscope json file"),Hi(a.parseAsJSON());if(/Trace-\d{8}T\d{6}/.exec(e))return console.log("Importing as Chrome Timeline Object"),Rr(a.parseAsJSON().traceEvents,e);if(e.endsWith(".chrome.json")||/Profile-\d{8}T\d{6}/.exec(e))return console.log("Importing as Chrome Timeline"),Rr(a.parseAsJSON(),e);if(e.endsWith(".stackprof.json"))return console.log("Importing as stackprof profile"),je(fl(a.parseAsJSON()));if(e.endsWith(".instruments.txt"))return console.log("Importing as Instruments.app deep copy"),je(tA(a));if(e.endsWith(".linux-perf.txt"))return console.log("Importing as output of linux perf script"),aA(a);if(e.endsWith(".collapsedstack.txt"))return console.log("Importing as collapsed stack format"),je(nA(a));if(e.endsWith(".v8log.json"))return console.log("Importing as --prof-process v8 log"),je(rA(a.parseAsJSON()));if(e.endsWith(".heapprofile"))return console.log("Importing as Chrome Heap Profile"),je(IA(a.parseAsJSON()));if(e.endsWith("-recording.json"))return console.log("Importing as Safari profile"),je(iA(a.parseAsJSON()));if(e.startsWith("callgrind."))return console.log("Importing as Callgrind profile"),jA(a,e);if(e.endsWith(".pmcstat.graph"))return console.log("Importing as pmcstat callgraph format"),je(QA(a));let r;try{r=a.parseAsJSON()}catch{}if(r){if(r.$schema==="https://www.speedscope.app/file-format-schema.json")return console.log("Importing as speedscope json file"),Hi(r);if(r.systemHost&&r.systemHost.name=="Firefox")return console.log("Importing as Firefox profile"),je(pd(r));if(ul(r))return console.log("Importing as Chrome Timeline"),Rr(r,e);if(fh(r))return console.log("Importing as Chrome Timeline Object"),Rr(r.traceEvents,e);if("nodes"in r&&"samples"in r&&"timeDeltas"in r)return console.log("Importing as Chrome CPU Profile"),je(Eo(r));if(zu(r))return console.log("Importing as Trace Event Format profile"),Vu(r);if("head"in r&&"samples"in r&&"timestamps"in r)return console.log("Importing as Chrome CPU Profile (old format)"),je(ph(r));if("mode"in r&&"frames"in r&&"raw_timestamp_deltas"in r)return console.log("Importing as stackprof profile"),je(fl(r));if("code"in r&&"functions"in r&&"ticks"in r)return console.log("Importing as --prof-process v8 log"),je(rA(r));if("head"in r&&"selfSize"in r.head)return console.log("Importing as Chrome Heap Profile"),je(IA(r));if("rts_arguments"in r&&"initial_capabilities"in r)return console.log("Importing as Haskell GHC JSON Profile"),vd(r);if("recording"in r&&"sampleStackTraces"in r.recording)return console.log("Importing as Safari profile"),je(iA(r))}else{if(/^# callgrind format/.exec(a.firstChunk())||/^events:/m.exec(a.firstChunk())&&/^fn=/m.exec(a.firstChunk()))return console.log("Importing as Callgrind profile"),jA(a,e);if(/^[\w \t\(\)]*\tSymbol Name/.exec(a.firstChunk()))return console.log("Importing as Instruments.app deep copy"),je(tA(a));if(/^(Stack_|Script_|Obj_)\S+ log opened \(PC\)\n/.exec(a.firstChunk()))return console.log("Importing as Papyrus profile"),je(qu(a));let o=aA(a);if(o)return console.log("Importing from linux perf script output"),o;let i=nA(a);if(i)return console.log("Importing as collapsed stack format"),je(i);let l=QA(a);if(l)return console.log("Importing as pmcstat callgraph format"),je(l)}return null}async function AE(t){return dd(t)}var ef=le(()=>{"use strict";Ch();mh();ud();fd();Cd();Mi();md();yd();Ed();Bd();Zl();Hu();W();Mu();Yu();Wu();$u();Zu()});var tf=S((ON,sE)=>{sE.exports="./perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt"});var U,gf,pr,ti,FA,kA,LA,TA,Ut={},ni=[],df=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function Cn(t,e){for(var n in e)t[n]=e[n];return t}function HA(t){var e=t.parentNode;e&&e.removeChild(t)}function C(t,e,n){var a,r=arguments,o={};for(a in e)a!=="key"&&a!=="ref"&&(o[a]=e[a]);if(arguments.length>3)for(n=[n],a=3;a=this.capacity;)this.map.delete(this.list.pop().data);let r=this.list.prepend(new ii(e));this.map.set(e,{value:n,listNode:r})}getOrInsert(e,n){let a=this.get(e);return a==null&&(a=n(e),this.insert(e,a)),a}removeLRU(){let e=this.list.pop();if(!e)return null;let n=e.data,a=this.map.get(n).value;return this.map.delete(n),[n,a]}clear(){this.list=new ha,this.map=new Map}};function De(t,e,n){return tn?n:t}var v=class t{constructor(e,n){this.x=e;this.y=n}withX(e){return new t(e,this.y)}withY(e){return new t(this.x,e)}plus(e){return new t(this.x+e.x,this.y+e.y)}minus(e){return new t(this.x-e.x,this.y-e.y)}times(e){return new t(this.x*e,this.y*e)}timesPointwise(e){return new t(this.x*e.x,this.y*e.y)}dividedByPointwise(e){return new t(this.x/e.x,this.y/e.y)}dot(e){return this.x*e.x+this.y*e.y}equals(e){return this.x===e.x&&this.y===e.y}approxEquals(e,n=1e-9){return Math.abs(this.x-e.x)=0&&e<=31),t.TEXTURE0+e}var z;(f=>{class t{constructor(u=0,g=0,p=0,I=0){this.x=u;this.y=g;this.width=p;this.height=I}set(u,g,p,I){this.x=u,this.y=g,this.width=p,this.height=I}equals(u){return this.x===u.x&&this.y===u.y&&this.width===u.width&&this.height===u.height}}f.Rect=t;class e{constructor(u,g,p,I){this.redF=u;this.greenF=g;this.blueF=p;this.alphaF=I}equals(u){return this.redF===u.redF&&this.greenF===u.greenF&&this.blueF===u.blueF&&this.alphaF===u.alphaF}static{this.TRANSPARENT=new e(0,0,0,0)}}f.Color=e;let n;(w=>(w[w.ZERO=0]="ZERO",w[w.ONE=1]="ONE",w[w.SOURCE_COLOR=2]="SOURCE_COLOR",w[w.TARGET_COLOR=3]="TARGET_COLOR",w[w.INVERSE_SOURCE_COLOR=4]="INVERSE_SOURCE_COLOR",w[w.INVERSE_TARGET_COLOR=5]="INVERSE_TARGET_COLOR",w[w.SOURCE_ALPHA=6]="SOURCE_ALPHA",w[w.TARGET_ALPHA=7]="TARGET_ALPHA",w[w.INVERSE_SOURCE_ALPHA=8]="INVERSE_SOURCE_ALPHA",w[w.INVERSE_TARGET_ALPHA=9]="INVERSE_TARGET_ALPHA",w[w.CONSTANT=10]="CONSTANT",w[w.INVERSE_CONSTANT=11]="INVERSE_CONSTANT"))(n=f.BlendOperation||={});let a;(g=>(g[g.TRIANGLES=0]="TRIANGLES",g[g.TRIANGLE_STRIP=1]="TRIANGLE_STRIP"))(a=f.Primitive||={});class r{constructor(){this.resizeEventHandlers=new Set}setCopyBlendState(){this.setBlendState(1,0)}setAddBlendState(){this.setBlendState(1,1)}setPremultipliedBlendState(){this.setBlendState(1,8)}setUnpremultipliedBlendState(){this.setBlendState(6,8)}addAfterResizeEventHandler(u){this.resizeEventHandlers.add(u)}removeAfterResizeEventHandler(u){this.resizeEventHandlers.delete(u)}}f.Context=r;let o;(g=>(g[g.FLOAT=0]="FLOAT",g[g.BYTE=1]="BYTE"))(o=f.AttributeType||={});function i(m){return m==0?4:1}f.attributeByteLength=i;class l{constructor(u,g,p,I){this.name=u;this.type=g;this.count=p;this.byteOffset=I}}f.Attribute=l;class s{constructor(){this._attributes=[];this._stride=0}get attributes(){return this._attributes}get stride(){return this._stride}add(u,g,p){return this.attributes.push(new l(u,g,p,this.stride)),this._stride+=p*i(g),this}}f.VertexFormat=s;class A{uploadFloat32Array(u){this.upload(new Uint8Array(u.buffer),0)}uploadFloats(u){this.uploadFloat32Array(new Float32Array(u))}}f.VertexBuffer=A;let c;(g=>(g[g.NEAREST=0]="NEAREST",g[g.LINEAR=1]="LINEAR"))(c=f.PixelFilter||={});let h;(g=>(g[g.REPEAT=0]="REPEAT",g[g.CLAMP=1]="CLAMP"))(h=f.PixelWrap||={});class _{constructor(u,g,p){this.minFilter=u;this.magFilter=g;this.wrap=p}static{this.LINEAR_CLAMP=new _(1,1,1)}static{this.LINEAR_MIN_NEAREST_MAG_CLAMP=new _(1,0,1)}static{this.NEAREST_CLAMP=new _(0,0,1)}}f.TextureFormat=_})(z||={});var Ai;(f=>{class t extends z.Context{constructor(g=document.createElement("canvas")){super();this._attributeCount=0;this._blendOperations=0;this._contextResetHandlers=[];this._currentClearColor=z.Color.TRANSPARENT;this._currentRenderTarget=null;this._defaultViewport=new z.Rect;this._forceStateUpdate=!0;this._generation=1;this._height=0;this._oldBlendOperations=0;this._oldRenderTarget=null;this._oldViewport=new z.Rect;this._width=0;this.handleWebglContextRestored=()=>{this._attributeCount=0,this._currentClearColor=z.Color.TRANSPARENT,this._forceStateUpdate=!0,this._generation++;for(let g of this._contextResetHandlers)g()};this.ANGLE_instanced_arrays=null;this.ANGLE_instanced_arrays_generation=-1;let p=g.getContext("webgl",{alpha:!1,antialias:!1,depth:!1,preserveDrawingBuffer:!1,stencil:!1});if(p==null)throw new Error("Setup failure");this._gl=p;let I=g.style;g.width=0,g.height=0,I.width=I.height="0",g.addEventListener("webglcontextlost",y=>{y.preventDefault()}),g.addEventListener("webglcontextrestored",this.handleWebglContextRestored),this._blendOperationMap={0:this._gl.ZERO,1:this._gl.ONE,2:this._gl.SRC_COLOR,3:this._gl.DST_COLOR,4:this._gl.ONE_MINUS_SRC_COLOR,5:this._gl.ONE_MINUS_DST_COLOR,6:this._gl.SRC_ALPHA,7:this._gl.DST_ALPHA,8:this._gl.ONE_MINUS_SRC_ALPHA,9:this._gl.ONE_MINUS_DST_ALPHA,10:this._gl.CONSTANT_COLOR,11:this._gl.ONE_MINUS_CONSTANT_COLOR}}get widthInPixels(){return this._width}get heightInPixels(){return this._height}testContextLoss(){this.handleWebglContextRestored()}get gl(){return this._gl}get generation(){return this._generation}addContextResetHandler(g){vf(this._contextResetHandlers,g)}removeContextResetHandler(g){Ef(this._contextResetHandlers,g)}get currentRenderTarget(){return this._currentRenderTarget}beginFrame(){this.setRenderTarget(null)}endFrame(){}setBlendState(g,p){this._blendOperations=t._packBlendModes(g,p)}setViewport(g,p,I,y){(this._currentRenderTarget!=null?this._currentRenderTarget.viewport:this._defaultViewport).set(g,p,I,y)}get viewport(){return this._currentRenderTarget!=null?this._currentRenderTarget.viewport:this._defaultViewport}get renderTargetWidthInPixels(){return this._currentRenderTarget!=null?this._currentRenderTarget.viewport.width:this._width}get renderTargetHeightInPixels(){return this._currentRenderTarget!=null?this._currentRenderTarget.viewport.height:this._height}draw(g,p,I){this._updateRenderTargetAndViewport(),A.from(p).prepare(),c.from(I).prepare(),this._updateFormat(p.format),this._updateBlendState(),this._gl.drawArrays(g==0?this._gl.TRIANGLES:this._gl.TRIANGLE_STRIP,0,Math.floor(I.byteCount/p.format.stride)),this._forceStateUpdate=!1}resize(g,p,I,y){let B=this._gl.canvas,E=B.getBoundingClientRect();if(this._width===g&&this._height===p&&E.width===I&&E.height===y)return;let b=B.style;B.width=g,B.height=p,b.width=`${I}px`,b.height=`${y}px`,this.setViewport(0,0,g,p),this._width=g,this._height=p,this.resizeEventHandlers.forEach(D=>D())}clear(g){this._updateRenderTargetAndViewport(),this._updateBlendState(),g.equals(this._currentClearColor)||(this._gl.clearColor(g.redF,g.greenF,g.blueF,g.alphaF),this._currentClearColor=g),this._gl.clear(this._gl.COLOR_BUFFER_BIT)}setRenderTarget(g){this._currentRenderTarget=_.from(g)}createMaterial(g,p,I){let y=new A(this,g,p,I);return y.program,y}createVertexBuffer(g){return G(g>0&&g%4==0),new c(this,g)}createTexture(g,p,I,y){return new h(this,g,p,I,y)}createRenderTarget(g){return new _(this,h.from(g))}getANGLE_instanced_arrays(){if(this.ANGLE_instanced_arrays_generation!==this._generation&&(this.ANGLE_instanced_arrays=null),!this.ANGLE_instanced_arrays&&(this.ANGLE_instanced_arrays=this.gl.getExtension("ANGLE_instanced_arrays"),!this.ANGLE_instanced_arrays))throw new Error("Failed to get extension ANGLE_instanced_arrays");return this.ANGLE_instanced_arrays}_updateRenderTargetAndViewport(){let g=this._currentRenderTarget,p=g!=null?g.viewport:this._defaultViewport,I=this._gl;(this._forceStateUpdate||this._oldRenderTarget!=g)&&(I.bindFramebuffer(I.FRAMEBUFFER,g?g.framebuffer:null),this._oldRenderTarget=g),(this._forceStateUpdate||!this._oldViewport.equals(p))&&(I.viewport(p.x,this.renderTargetHeightInPixels-p.y-p.height,p.width,p.height),this._oldViewport.set(p.x,p.y,p.width,p.height))}_updateBlendState(){if(this._forceStateUpdate||this._oldBlendOperations!=this._blendOperations){let g=this._gl,p=this._blendOperations,I=this._oldBlendOperations,y=p&15,B=p>>4;G(y in this._blendOperationMap),G(B in this._blendOperationMap),p==t.COPY_BLEND_OPERATIONS?g.disable(g.BLEND):((this._forceStateUpdate||I==t.COPY_BLEND_OPERATIONS)&&g.enable(g.BLEND),g.blendFunc(this._blendOperationMap[y],this._blendOperationMap[B])),this._oldBlendOperations=p}}_updateFormat(g){let p=this._gl,I=g.attributes,y=I.length;for(let B=0;By;)this._attributeCount--,p.disableVertexAttribArray(this._attributeCount);this._attributeCount=y}getWebGLInfo(){let g=this.gl.getExtension("WEBGL_debug_renderer_info"),p=g?this.gl.getParameter(g.UNMASKED_RENDERER_WEBGL):null,I=g?this.gl.getParameter(g.UNMASKED_VENDOR_WEBGL):null,y=this.gl.getParameter(this.gl.VERSION);return{renderer:p,vendor:I,version:y}}static from(g){return G(g==null||g instanceof t),g}static _packBlendModes(g,p){return g|p<<4}static{this.COPY_BLEND_OPERATIONS=t._packBlendModes(1,0)}}f.Context=t;class e{constructor(u,g,p=0,I=null,y=!0){this._material=u;this._name=g;this._generation=p;this._location=I;this._isDirty=y}get location(){let u=t.from(this._material.context);if(this._generation!=u.generation&&(this._location=u.gl.getUniformLocation(this._material.program,this._name),this._generation=u.generation,!li)){let g=this._material.program,p=u.gl;for(let I=0,y=p.getProgramParameter(g,p.ACTIVE_UNIFORMS);I0&&this._texture.height>0?this._texture.texture:null)}}class A{constructor(u,g,p,I,y={},B=[],E=0,b=null){this._context=u;this._format=g;this._vertexSource=p;this._fragmentSource=I;this._uniformsMap=y;this._uniformsList=B;this._generation=E;this._program=b}get context(){return this._context}get format(){return this._format}get vertexSource(){return this._vertexSource}get fragmentSource(){return this._fragmentSource}setUniformFloat(u,g){let p=this._uniformsMap[u]||null;p==null&&(p=new n(this,u),this._uniformsMap[u]=p,this._uniformsList.push(p)),G(p instanceof n),p.set(g)}setUniformInt(u,g){let p=this._uniformsMap[u]||null;p==null&&(p=new a(this,u),this._uniformsMap[u]=p,this._uniformsList.push(p)),G(p instanceof a),p.set(g)}setUniformVec2(u,g,p){let I=this._uniformsMap[u]||null;I==null&&(I=new r(this,u),this._uniformsMap[u]=I,this._uniformsList.push(I)),G(I instanceof r),I.set(g,p)}setUniformVec3(u,g,p,I){let y=this._uniformsMap[u]||null;y==null&&(y=new o(this,u),this._uniformsMap[u]=y,this._uniformsList.push(y)),G(y instanceof o),y.set(g,p,I)}setUniformVec4(u,g,p,I,y){let B=this._uniformsMap[u]||null;B==null&&(B=new i(this,u),this._uniformsMap[u]=B,this._uniformsList.push(B)),G(B instanceof i),B.set(g,p,I,y)}setUniformMat3(u,g,p,I,y,B,E,b,D,T){let Q=this._uniformsMap[u]||null;Q==null&&(Q=new l(this,u),this._uniformsMap[u]=Q,this._uniformsList.push(Q)),G(Q instanceof l),Q.set(g,p,I,y,B,E,b,D,T)}setUniformSampler(u,g,p){let I=this._uniformsMap[u]||null;I==null&&(I=new s(this,u),this._uniformsMap[u]=I,this._uniformsList.push(I)),G(I instanceof s),I.set(g,p)}get program(){let u=this._context.gl;if(this._generation!=this._context.generation){this._program=u.createProgram(),this._compileShader(u,u.VERTEX_SHADER,this.vertexSource),this._compileShader(u,u.FRAGMENT_SHADER,this.fragmentSource);let g=this.format.attributes;for(let p=0;p=0),G(0<=g&&g+I<=this._byteCount),G(0<=p&&p+I<=this._byteCount),this._bytes&&g!=p&&I!=0&&(this._bytes.set(this._bytes.subarray(g,this._byteCount),p),this._growDirtyRegion(Math.min(g,p),Math.max(g,p)+I))}upload(g,p=0){G(0<=p&&p+g.length<=this._byteCount),G(this._bytes!=null),this._bytes.set(g,p),this._growDirtyRegion(p,p+g.length)}free(){this._buffer&&this._context.gl.deleteBuffer(this._buffer),this._generation=0}prepare(){let g=this._context.gl;this._generation!==this._context.generation&&(this._buffer=g.createBuffer(),this._generation=this._context.generation,this._isDirty=!0),g.bindBuffer(g.ARRAY_BUFFER,this._buffer),this._isDirty&&(g.bufferData(g.ARRAY_BUFFER,this._byteCount,g.DYNAMIC_DRAW),this._dirtyMin=this._totalMin,this._dirtyMax=this._totalMax,this._isDirty=!1),this._dirtyMin{let n=O.betweenRects(e.configSpaceSrcRect,e.physicalSpaceDstRect),a=new v(this.gl.viewport.width,this.gl.viewport.height);return O.withTranslation(new v(-1,1)).times(O.withScale(new v(2,-2).dividedByPointwise(a))).times(n)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(z.Primitive.TRIANGLES,this.material,e.batch.getBuffer())}};var ue=class t{constructor(e=0,n=0,a=0,r=1){this.r=e;this.g=n;this.b=a;this.a=r}static fromLumaChromaHue(e,n,a){let r=a/60,o=n*(1-Math.abs(r%2-1)),[i,l,s]=r<1?[n,o,0]:r<2?[o,n,0]:r<3?[0,n,o]:r<4?[0,o,n]:r<5?[o,0,n]:[n,0,o],A=e-(.3*i+.59*l+.11*s);return new t(De(i+A,0,1),De(l+A,0,1),De(s+A,0,1),1)}static fromCSSHex(e){if(e.length!==7||e[0]!=="#")throw new Error(`Invalid color input ${e}`);let n=parseInt(e.substr(1,2),16)/255,a=parseInt(e.substr(3,2),16)/255,r=parseInt(e.substr(5,2),16)/255;if(n<0||n>1||a<0||a>1||r<0||r>1)throw new Error(`Invalid color input ${e}`);return new t(n,a,r)}withAlpha(e){return new t(this.r,this.g,this.b,e)}toCSS(){return`rgba(${(255*this.r).toFixed()}, ${(255*this.g).toFixed()}, ${(255*this.b).toFixed()}, ${this.a.toFixed(2)})`}};var pa=class{constructor(e,n,a){this.gl=e;this.rectangleBatchRenderer=n;this.textureRenderer=a;this.texture=e.createTexture(z.TextureFormat.NEAREST_CLAMP,4096,4096),this.renderTarget=e.createRenderTarget(this.texture),this.rowCache=new ga(this.texture.height),this.clearLineBatch=new mn(e),this.clearLineBatch.addRect(F.unit,new ue(0,0,0,0)),e.addContextResetHandler(()=>{this.rowCache.clear()})}has(e){return this.rowCache.has(e)}getResolution(){return this.texture.width}getCapacity(){return this.texture.height}allocateLine(e){if(this.rowCache.getSize(){for(let a of e){let r=this.rowCache.get(a);if(r!=null)continue;r=this.allocateLine(a);let o=new F(new v(0,r),new v(this.texture.width,1));this.rectangleBatchRenderer.render({batch:this.clearLineBatch,configSpaceSrcRect:F.unit,physicalSpaceDstRect:o}),n(o,a)}})}renderViaAtlas(e,n){let a=this.rowCache.get(e);if(a==null)return!1;let r=new F(new v(0,a),new v(this.texture.width,1));return this.textureRenderer.render({texture:this.texture,srcRect:r,dstRect:n}),!0}};var wf=` - uniform mat3 uvTransform; - uniform mat3 positionTransform; - - attribute vec2 position; - attribute vec2 uv; - varying vec2 vUv; - - void main() { - vUv = (uvTransform * vec3(uv, 1)).xy; - gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1); - } -`,bf=` - precision mediump float; - - varying vec2 vUv; - uniform sampler2D texture; - - void main() { - gl_FragColor = texture2D(texture, vUv); - } -`,Ca=class{constructor(e){this.gl=e;let n=new z.VertexFormat;n.add("position",z.AttributeType.FLOAT,2),n.add("uv",z.AttributeType.FLOAT,2);let a=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],r=[];for(let o of a)r.push(o.pos[0]),r.push(o.pos[1]),r.push(o.uv[0]),r.push(o.uv[1]);this.buffer=e.createVertexBuffer(n.stride*a.length),this.buffer.upload(new Uint8Array(new Float32Array(r).buffer)),this.material=e.createMaterial(n,wf,bf)}render(e){this.material.setUniformSampler("texture",e.texture,0),xt(this.material,"uvTransform",(()=>{let{srcRect:n,texture:a}=e,o=O.withTranslation(new v(0,1)).times(O.withScale(new v(1,-1))).times(O.betweenRects(new F(v.zero,new v(a.width,a.height)),F.unit)).transformRect(n);return O.betweenRects(F.unit,o)})()),xt(this.material,"positionTransform",(()=>{let{dstRect:n}=e,{viewport:a}=this.gl,r=new v(a.width,a.height),i=O.withScale(new v(1,-1)).times(O.betweenRects(new F(v.zero,r),F.NDC)).transformRect(n);return O.betweenRects(F.NDC,i)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(z.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var ci=new z.VertexFormat;ci.add("position",z.AttributeType.FLOAT,2);var xf=` - attribute vec2 position; - - void main() { - gl_Position = vec4(position, 0, 1); - } -`,Sf=t=>{let{r:e,g:n,b:a}=ue.fromCSSHex(t.fgSecondaryColor),r=`${e.toFixed(1)}, ${n.toFixed(1)}, ${a.toFixed(1)}`;return` - precision mediump float; - - uniform mat3 configSpaceToPhysicalViewSpace; - uniform vec2 physicalSize; - uniform vec2 physicalOrigin; - uniform vec2 configSpaceViewportOrigin; - uniform vec2 configSpaceViewportSize; - uniform float framebufferHeight; - - void main() { - vec2 origin = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportOrigin, 1.0)).xy; - vec2 size = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportSize, 0.0)).xy; - - vec2 halfSize = physicalSize / 2.0; - - float borderWidth = 2.0; - - origin = floor(origin * halfSize) / halfSize + borderWidth * vec2(1.0, 1.0); - size = floor(size * halfSize) / halfSize - 2.0 * borderWidth * vec2(1.0, 1.0); - - vec2 coord = gl_FragCoord.xy; - coord.x = coord.x - physicalOrigin.x; - coord.y = framebufferHeight - coord.y - physicalOrigin.y; - vec2 clamped = clamp(coord, origin, origin + size); - vec2 gap = clamped - coord; - float maxdist = max(abs(gap.x), abs(gap.y)); - - // TOOD(jlfwong): Could probably optimize this to use mix somehow. - if (maxdist == 0.0) { - // Inside viewport rectangle - gl_FragColor = vec4(0, 0, 0, 0); - } else if (maxdist < borderWidth) { - // Inside viewport rectangle at border - gl_FragColor = vec4(${r}, 0.8); - } else { - // Outside viewport rectangle - gl_FragColor = vec4(${r}, 0.5); - } - } - `},ma=class{constructor(e,n){this.gl=e;let a=[[-1,1],[1,1],[-1,-1],[1,-1]],r=[];for(let o of a)r.push(o[0]),r.push(o[1]);this.buffer=e.createVertexBuffer(ci.stride*a.length),this.buffer.upload(new Uint8Array(new Float32Array(r).buffer)),this.material=e.createMaterial(ci,xf,Sf(n))}render(e){xt(this.material,"configSpaceToPhysicalViewSpace",e.configSpaceToPhysicalViewSpace),si(this.material,"configSpaceViewportOrigin",e.configSpaceViewportRect.origin),si(this.material,"configSpaceViewportSize",e.configSpaceViewportRect.size);let n=this.gl.viewport;this.material.setUniformVec2("physicalOrigin",n.x,n.y),this.material.setUniformVec2("physicalSize",n.width,n.height),this.material.setUniformFloat("framebufferHeight",this.gl.renderTargetHeightInPixels),this.gl.setBlendState(z.BlendOperation.SOURCE_ALPHA,z.BlendOperation.INVERSE_SOURCE_ALPHA),this.gl.draw(z.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var Ia=new z.VertexFormat;Ia.add("position",z.AttributeType.FLOAT,2);Ia.add("uv",z.AttributeType.FLOAT,2);var Nf=` - uniform mat3 uvTransform; - uniform mat3 positionTransform; - - attribute vec2 position; - attribute vec2 uv; - varying vec2 vUv; - - void main() { - vUv = (uvTransform * vec3(uv, 1)).xy; - gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1); - } -`,kf=t=>` - precision mediump float; - - uniform vec2 uvSpacePixelSize; - uniform float renderOutlines; - - varying vec2 vUv; - uniform sampler2D colorTexture; - - // https://en.wikipedia.org/wiki/HSL_and_HSV#From_luma/chroma/hue - vec3 hcl2rgb(float H, float C, float L) { - float hPrime = H / 60.0; - float X = C * (1.0 - abs(mod(hPrime, 2.0) - 1.0)); - vec3 RGB = - hPrime < 1.0 ? vec3(C, X, 0) : - hPrime < 2.0 ? vec3(X, C, 0) : - hPrime < 3.0 ? vec3(0, C, X) : - hPrime < 4.0 ? vec3(0, X, C) : - hPrime < 5.0 ? vec3(X, 0, C) : - vec3(C, 0, X); - - float m = L - dot(RGB, vec3(0.30, 0.59, 0.11)); - return RGB + vec3(m, m, m); - } - - float triangle(float x) { - return 2.0 * abs(fract(x) - 0.5) - 1.0; - } - - ${t} - - void main() { - vec4 here = texture2D(colorTexture, vUv); - - if (here.z == 0.0) { - // Background color - gl_FragColor = vec4(0, 0, 0, 0); - return; - } - - // Sample the 4 surrounding pixels in the depth texture to determine - // if we should draw a boundary here or not. - vec4 N = texture2D(colorTexture, vUv + vec2(0, uvSpacePixelSize.y)); - vec4 E = texture2D(colorTexture, vUv + vec2(uvSpacePixelSize.x, 0)); - vec4 S = texture2D(colorTexture, vUv + vec2(0, -uvSpacePixelSize.y)); - vec4 W = texture2D(colorTexture, vUv + vec2(-uvSpacePixelSize.x, 0)); - - // NOTE: For outline checks, we intentionally check both the right - // and the left to determine if we're an edge. If a rectangle is a single - // pixel wide, we don't want to render it as an outline, so this method - // of checking ensures that we don't outline single physical-space - // pixel width rectangles. - if ( - renderOutlines > 0.0 && - ( - here.y == N.y && here.y != S.y || // Top edge - here.y == S.y && here.y != N.y || // Bottom edge - here.x == E.x && here.x != W.x || // Left edge - here.x == W.x && here.x != E.x - ) - ) { - // We're on an edge! Draw transparent. - gl_FragColor = vec4(0, 0, 0, 0); - } else { - // Not on an edge. Draw the appropriate color. - gl_FragColor = vec4(colorForBucket(here.z), here.a); - } - } -`,ya=class{constructor(e,n){this.gl=e;let a=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],r=[];for(let o of a)r.push(o.pos[0]),r.push(o.pos[1]),r.push(o.uv[0]),r.push(o.uv[1]);this.buffer=e.createVertexBuffer(Ia.stride*a.length),this.buffer.uploadFloats(r),this.material=e.createMaterial(Ia,Nf,kf(n.colorForBucketGLSL))}render(e){let{srcRect:n,rectInfoTexture:a}=e,o=O.withTranslation(new v(0,1)).times(O.withScale(new v(1,-1))).times(O.betweenRects(new F(v.zero,new v(a.width,a.height)),F.unit)).transformRect(n),i=O.betweenRects(F.unit,o),{dstRect:l}=e,s=new v(this.gl.viewport.width,this.gl.viewport.height),c=O.withScale(new v(1,-1)).times(O.betweenRects(new F(v.zero,s),F.NDC)).transformRect(l),h=O.betweenRects(F.NDC,c),_=v.unit.dividedByPointwise(new v(e.rectInfoTexture.width,e.rectInfoTexture.height));this.material.setUniformSampler("colorTexture",e.rectInfoTexture,0),xt(this.material,"uvTransform",i),this.material.setUniformFloat("renderOutlines",e.renderOutlines?1:0),this.material.setUniformVec2("uvSpacePixelSize",_.x,_.y),xt(this.material,"positionTransform",h),this.gl.setUnpremultipliedBlendState(),this.gl.draw(z.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var va=class{constructor(e,n){this.animationFrameRequest=null;this.beforeFrameHandlers=new Set;this.onBeforeFrame=()=>{this.animationFrameRequest=null,this.gl.setViewport(0,0,this.gl.renderTargetWidthInPixels,this.gl.renderTargetHeightInPixels);let e=ue.fromCSSHex(this.theme.bgPrimaryColor);this.gl.clear(new z.Color(e.r,e.g,e.b,e.a));for(let n of this.beforeFrameHandlers)n()};this.gl=new Ai.Context(e),this.rectangleBatchRenderer=new ua(this.gl),this.textureRenderer=new Ca(this.gl),this.viewportRectangleRenderer=new ma(this.gl,n),this.flamechartColorPassRenderer=new ya(this.gl,n),this.theme=n,this.gl.addAfterResizeEventHandler(this.onBeforeFrame);let a=this.gl.getWebGLInfo();a&&console.log(`WebGL initialized. renderer: ${a.renderer}, vendor: ${a.vendor}, version: ${a.version}`),window.testContextLoss=()=>{this.gl.testContextLoss()}}addBeforeFrameHandler(e){this.beforeFrameHandlers.add(e)}removeBeforeFrameHandler(e){this.beforeFrameHandlers.delete(e)}requestFrame(){this.animationFrameRequest||(this.animationFrameRequest=requestAnimationFrame(this.onBeforeFrame))}setViewport(e,n){let{origin:a,size:r}=e,o=this.gl.viewport;this.gl.setViewport(a.x,a.y,r.x,r.y),n();let{x:i,y:l,width:s,height:A}=o;this.gl.setViewport(i,l,s,A)}renderBehind(e,n){let a=e.getBoundingClientRect(),r=new F(new v(a.left*window.devicePixelRatio,a.top*window.devicePixelRatio),new v(a.width*window.devicePixelRatio,a.height*window.devicePixelRatio));this.setViewport(r,n)}};var on=Un(t=>e=>t.get(e.key)||0),Kt=Ge(({theme:t,frameToColorBucket:e})=>{let n=on(e);return a=>{let r=n(a)/255;return t.colorForBucket(r).toCSS()}}),Pt=Ge(({theme:t,canvas:e})=>new va(e,t)),YA=Un(t=>new pa(t.gl,t.rectangleBatchRenderer,t.textureRenderer)),WA=Ge(({profile:t,flattenRecursion:e})=>e?t.getProfileWithRecursionFlattened():t),Ot=Un(t=>{let e=[];t.forEachFrame(o=>e.push(o));function n(o){return(o.file||"")+o.name}function a(o,i){return n(o)>n(i)?1:-1}e.sort(a);let r=new Map;for(let o=0;o=n.__.length&&n.__.push({}),n.__[t]}function Ke(t){return yr=1,ts(ns,t)}function ts(t,e,n){var a=vr(Kn++,2);return a.__c||(a.__c=it,a.__=[n?n(e):ns(void 0,e),function(r){var o=t(a.__[0],r);a.__[0]!==o&&(a.__[0]=o,a.__c.setState({}))}]),a.__}function Xe(t,e){var n=vr(Kn++,3);!U.__s&&ui(n.__H,e)&&(n.__=t,n.__H=e,it.__H.__h.push(n))}function di(t,e){var n=vr(Kn++,4);!U.__s&&ui(n.__H,e)&&(n.__=t,n.__H=e,it.__h.push(n))}function ln(t){return yr=5,re(function(){return{current:t}},[])}function re(t,e){var n=vr(Kn++,7);return ui(n.__H,e)?(n.__H=e,n.__h=t,n.__=t()):n.__}function K(t,e){return yr=8,re(function(){return t},e)}function lt(t){var e=it.context[t.__c],n=vr(Kn++,9);return n.__c=t,e?(n.__==null&&(n.__=!0,e.sub(it)),e.props.value):t.__}function Df(){_i.some(function(t){if(t.__P)try{t.__H.__h.forEach(hi),t.__H.__h.forEach(gi),t.__H.__h=[]}catch(e){return t.__H.__h=[],U.__e(e,t.__v),!0}}),_i=[]}function hi(t){t.t&&t.t()}function gi(t){var e=t.__();typeof e=="function"&&(t.t=e)}function ui(t,e){return!t||e.some(function(n,a){return n!==t[a]})}function ns(t,e){return typeof e=="function"?e(t):e}U.__r=function(t){$A&&$A(t),Kn=0,(it=t.__c).__H&&(it.__H.__h.forEach(hi),it.__H.__h.forEach(gi),it.__H.__h=[])},U.diffed=function(t){ZA&&ZA(t);var e=t.__c;if(e){var n=e.__H;n&&n.__h.length&&(_i.push(e)!==1&&qA===U.requestAnimationFrame||((qA=U.requestAnimationFrame)||function(a){var r,o=function(){clearTimeout(i),cancelAnimationFrame(r),setTimeout(a)},i=setTimeout(o,100);typeof window<"u"&&(r=requestAnimationFrame(o))})(Df))}},U.__c=function(t,e){e.some(function(n){try{n.__h.forEach(hi),n.__h=n.__h.filter(function(a){return!a.__||gi(a)})}catch(a){e.some(function(r){r.__h&&(r.__h=[])}),e=[],U.__e(a,n.__v)}}),XA&&XA(t,e)},U.unmount=function(t){es&&es(t);var e=t.__c;if(e){var n=e.__H;if(n)try{n.__.forEach(function(a){return a.t&&a.t()})}catch(a){U.__e(a,e.__v)}}};function cs(t,e){for(var n in e)t[n]=e[n];return t}function pi(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var a in e)if(a!=="__source"&&t[a]!==e[a])return!0;return!1}var fB=function(t){var e,n;function a(r){var o;return(o=t.call(this,r)||this).isPureReactComponent=!0,o}return n=t,(e=a).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,a.prototype.shouldComponentUpdate=function(r,o){return pi(this.props,r)||pi(this.state,o)},a}(Se);function fe(t,e){function n(r){var o=this.props.ref,i=o==r.ref;return!i&&o&&(o.call?o(null):o.current=null),e?!e(this.props,r)||!i:pi(this.props,r)}function a(r){return this.shouldComponentUpdate=n,C(t,cs({},r))}return a.prototype.isReactComponent=!0,a.displayName="Memo("+(t.displayName||t.name)+")",a.t=!0,a}var rs=U.__b;U.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),rs&&rs(t)};var Ff=U.__e;function _s(t){return t&&((t=cs({},t)).__c=null,t.__k=t.__k&&t.__k.map(_s)),t}function as(){this.__u=0,this.o=null,this.__b=null}function hs(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function Ea(){this.i=null,this.l=null}U.__e=function(t,e,n){if(t.then){for(var a,r=e;r=r.__;)if((a=r.__c)&&a.__c)return a.__c(t,e.__c)}Ff(t,e,n)},(as.prototype=new Se).__c=function(t,e){var n=this;n.o==null&&(n.o=[]),n.o.push(e);var a=hs(n.__v),r=!1,o=function(){r||(r=!0,a?a(i):i())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){o(),e.__c&&e.__c()};var i=function(){var l;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});l=n.o.pop();)l.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),t.then(o,o)},as.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=_s(this.__b),this.__b=null),[C(Se,null,e.u?null:t.children),e.u&&t.fallback]};var os=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]n()))}get(){return this.state}subscribe(e){this.observers.push(e)}unsubscribe(e){let n=this.observers.indexOf(e);n!==-1&&this.observers.splice(n,1)}};function q(t){let[e,n]=Ke(t.get());return di(()=>{n(t.get());function a(){n(t.get())}return t.subscribe(a),()=>{t.unsubscribe(a)}},[t]),e}function Tf(t){switch(t){case"time-ordered":return 0;case"left-heavy":return 1;case"sandwich":return 2;default:return null}}function gs(t=window.location.hash){try{if(!t.startsWith("#"))return{};let e=t.substr(1).split("&"),n={};for(let a of e){let[r,o]=a.split("=");if(o=decodeURIComponent(o),r==="profileURL")n.profileURL=o;else if(r==="title")n.title=o;else if(r==="localProfilePath")n.localProfilePath=o;else if(r==="view"){let i=Tf(o);i!==null?n.viewMode=i:console.error(`Ignoring invalid view specifier: ${o}`)}}return n}catch(e){return console.error("Error when loading hash fragment."),console.error(e),{}}}W();var Ba={hover:null,selectedNode:null,configSpaceViewportRect:F.empty,logicalSpaceViewportSize:v.zero},ja=class extends we{constructor(){super(...arguments);this.setProfileGroup=n=>{this.set({name:n.name,indexToView:n.indexToView,profiles:n.profiles.map(a=>({profile:a,chronoViewState:Ba,leftHeavyViewState:Ba,sandwichViewState:{callerCallee:null}}))})};this.setProfileIndexToView=n=>{this.state!=null&&(n=De(n,0,this.state.profiles.length-1),this.set({...this.state,indexToView:n}))};this.setSelectedFrame=n=>{this.state==null||this.getActiveProfile()==null||this.updateActiveSandwichViewState(r=>n==null?{callerCallee:null}:{callerCallee:{invertedCallerFlamegraph:Ba,calleeFlamegraph:Ba,selectedFrame:n}})}}set(n){let a=this.state;a!=null&&n!=null&&Ir(a,n)||super.set(n)}getActiveProfile(){return this.state==null?null:this.state.profiles[this.state?.indexToView]||null}updateActiveProfileState(n){if(this.state==null)return;let{indexToView:a,profiles:r}=this.state;this.set({...this.state,profiles:r.map((o,i)=>i!=a?o:n(o))})}updateActiveSandwichViewState(n){this.updateActiveProfileState(a=>({...a,sandwichViewState:n(a.sandwichViewState)}))}updateFlamechartState(n,a){switch(n){case"CHRONO":{this.updateActiveProfileState(r=>({...r,chronoViewState:a(r.chronoViewState)}));break}case"LEFT_HEAVY":{this.updateActiveProfileState(r=>({...r,leftHeavyViewState:a(r.leftHeavyViewState)}));break}case"SANDWICH_CALLEES":{this.updateActiveSandwichViewState(r=>({...r,callerCallee:r.callerCallee==null?null:{...r.callerCallee,calleeFlamegraph:a(r.callerCallee.calleeFlamegraph)}}));break}case"SANDWICH_INVERTED_CALLERS":{this.updateActiveSandwichViewState(r=>({...r,callerCallee:r.callerCallee==null?null:{...r.callerCallee,invertedCallerFlamegraph:a(r.callerCallee.invertedCallerFlamegraph)}}));break}}}setFlamechartHoveredNode(n,a){this.updateFlamechartState(n,r=>({...r,hover:a}))}setSelectedNode(n,a){this.updateFlamechartState(n,r=>({...r,selectedNode:a}))}setConfigSpaceViewportRect(n,a){this.updateFlamechartState(n,r=>({...r,configSpaceViewportRect:a}))}setLogicalSpaceViewportSize(n,a){this.updateFlamechartState(n,r=>({...r,logicalSpaceViewportSize:a}))}clearHoverNode(){this.setFlamechartHoveredNode("CHRONO",null),this.setFlamechartHoveredNode("LEFT_HEAVY",null),this.setFlamechartHoveredNode("SANDWICH_CALLEES",null),this.setFlamechartHoveredNode("SANDWICH_INVERTED_CALLERS",null)}};var Gt=new we(!1,"flattenRecursion"),Pn=new we(!1,"searchIsActive"),On=new we("","searchQueryAtom"),An=new we(0,"viewMode"),Te=new ja(null,"profileGroup");An.subscribe(()=>{Te.clearHoverNode()});var us=gs(),fs=new we(us,"hashParams"),In=new we(null,"glCanvas"),mi=new we(!1,"dragActive"),ds=window.location.protocol,Qa=ds==="http:"||ds==="https:",Hf=Qa&&us.profileURL!=null,Ii=new we(Hf,"loading"),yi=new we(!1,"error"),Er=new we(null,"minimapMousePosition");var Br=new we({field:1,direction:1},"tableSortMethod");function wa(){let t=q(Gt),e=q(Te);if(!e||e.indexToView>=e.profiles.length)return null;let n=e.indexToView,a=e.profiles[n];return{...e.profiles[e.indexToView],profile:WA({profile:a.profile,flattenRecursion:t}),index:e.indexToView}}var ba="speedscope-color-scheme";function Mf(){let t=window.localStorage&&window.localStorage[ba];return t==="DARK"?1:t==="LIGHT"?2:0}function Jf(){return matchMedia("(prefers-color-scheme: dark)")}function Uf(t){if(Jf().matches)switch(t){case 0:return 2;case 2:return 1;case 1:return 0}else switch(t){case 0:return 1;case 1:return 2;case 2:return 0}}var vi=class extends we{constructor(){super(...arguments);this.cycleToNextColorScheme=()=>{this.set(Uf(this.get()))}}},yn=new vi(Mf(),"colorScheme");yn.subscribe(()=>{let t=yn.get();switch(t){case 1:{window.localStorage[ba]="DARK";break}case 2:{window.localStorage[ba]="LIGHT";break}case 0:{delete window.localStorage[ba];break}default:return t}return t});W();W();var ps=.2,Cs=.1,ms=.2,Is=.1,Kf=t=>{let e=_a(30*t),n=360*(.9*t),a=ps+Cs*e,r=ms-Is*e;return ue.fromLumaChromaHue(r,a,n)},Pf=` - vec3 colorForBucket(float t) { - float x = triangle(30.0 * t); - float H = 360.0 * (0.9 * t); - float C = ${ps.toFixed(1)} + ${Cs.toFixed(1)} * x; - float L = ${ms.toFixed(1)} - ${Is.toFixed(1)} * x; - return hcl2rgb(H, C, L); - } -`,Ei={fgPrimaryColor:"#D0D0D0",fgSecondaryColor:"#666666",bgPrimaryColor:"#060606",bgSecondaryColor:"#0C0C0C",altFgPrimaryColor:"#D0D0D0",altFgSecondaryColor:"#666666",altBgPrimaryColor:"#000000",altBgSecondaryColor:"#0C0C0C",selectionPrimaryColor:"#00769B",selectionSecondaryColor:"#004E75",weightColor:"#0F8A42",searchMatchTextColor:"#0C0C0C",searchMatchPrimaryColor:"#A66F1C",searchMatchSecondaryColor:"#D6AE24",colorForBucket:Kf,colorForBucketGLSL:Pf};W();var ys=.25,vs=.2,Es=.8,Bs=.15,Of=t=>{let e=_a(30*t),n=360*(.9*t),a=ys+vs*e,r=Es-Bs*e;return ue.fromLumaChromaHue(r,a,n)},Gf=` - vec3 colorForBucket(float t) { - float x = triangle(30.0 * t); - float H = 360.0 * (0.9 * t); - float C = ${ys.toFixed(1)} + ${vs.toFixed(1)} * x; - float L = ${Es.toFixed(1)} - ${Bs.toFixed(1)} * x; - return hcl2rgb(H, C, L); - } -`,xa={fgPrimaryColor:"#000000",fgSecondaryColor:"#BDBDBD",bgPrimaryColor:"#FFFFFF",bgSecondaryColor:"#F6F6F6",altFgPrimaryColor:"#FFFFFF",altFgSecondaryColor:"#BDBDBD",altBgPrimaryColor:"#000000",altBgSecondaryColor:"#222222",selectionPrimaryColor:"#2F80ED",selectionSecondaryColor:"#8EB7ED",weightColor:"#6FCF97",searchMatchTextColor:"#000000",searchMatchPrimaryColor:"#FFAC02",searchMatchSecondaryColor:"#FEDC62",colorForBucket:Of,colorForBucketGLSL:Gf};var Qs=Qt(xa);function V(){return lt(Qs)}function pe(t){return Un(t)}function js(){return matchMedia("(prefers-color-scheme: dark)")}function ws(t){switch(t){case 0:return"System";case 1:return"Dark";case 2:return"Light"}}function zf(t,e){switch(t){case 0:return e?Ei:xa;case 1:return Ei;case 2:return xa}}function bs(t){let[e,n]=Ke(()=>js().matches),a=K(i=>{n(i.matches)},[n]);Xe(()=>{let i=js();return i.addEventListener("change",a),()=>{i.removeEventListener("change",a)}},[a]);let r=q(yn),o=zf(r,e);return C(Qs.Provider,{value:o,children:t.children})}var Tc=_e(Ns()),Hc=_e(Ds()),Mc=_e(Fs()),Jc=_e(Ts()),Uc=_e(Js()),Kc=_e(Ps()),Pc=_e(zs()),Oc=_e(Ys()),Gc=_e(qs()),zc=_e(Zs()),Vc=_e(ec()),Yc=_e(Ac()),Wc=_e(cc()),qc=_e(vc()),$c=_e(Dc()),L=["Webkit"],Si=["Moz"],he=["ms"],He=["Webkit","Moz"],be=["Webkit","ms"],jr=["Webkit","Moz","ms"],pC={plugins:[Tc.default,Hc.default,Mc.default,Jc.default,Uc.default,Kc.default,Pc.default,Oc.default,Gc.default,zc.default,Vc.default,Yc.default],prefixMap:{transform:be,transformOrigin:be,transformOriginX:be,transformOriginY:be,backfaceVisibility:L,perspective:L,perspectiveOrigin:L,transformStyle:L,transformOriginZ:L,animation:L,animationDelay:L,animationDirection:L,animationFillMode:L,animationDuration:L,animationIterationCount:L,animationName:L,animationPlayState:L,animationTimingFunction:L,appearance:He,userSelect:jr,fontKerning:L,textEmphasisPosition:L,textEmphasis:L,textEmphasisStyle:L,textEmphasisColor:L,boxDecorationBreak:L,clipPath:L,maskImage:L,maskMode:L,maskRepeat:L,maskPosition:L,maskClip:L,maskOrigin:L,maskSize:L,maskComposite:L,mask:L,maskBorderSource:L,maskBorderMode:L,maskBorderSlice:L,maskBorderWidth:L,maskBorderOutset:L,maskBorderRepeat:L,maskBorder:L,maskType:L,textDecorationStyle:He,textDecorationSkip:He,textDecorationLine:He,textDecorationColor:He,filter:L,fontFeatureSettings:He,breakAfter:jr,breakBefore:jr,breakInside:jr,columnCount:He,columnFill:He,columnGap:He,columnRule:He,columnRuleColor:He,columnRuleStyle:He,columnRuleWidth:He,columns:He,columnSpan:He,columnWidth:He,writingMode:be,flex:be,flexBasis:L,flexDirection:be,flexGrow:L,flexFlow:be,flexShrink:L,flexWrap:be,alignContent:L,alignItems:L,alignSelf:L,justifyContent:L,order:L,transitionDelay:L,transitionDuration:L,transitionProperty:L,transitionTimingFunction:L,backdropFilter:L,scrollSnapType:be,scrollSnapPointsX:be,scrollSnapPointsY:be,scrollSnapDestination:be,scrollSnapCoordinate:be,shapeImageThreshold:L,shapeImageMargin:L,shapeImageOutside:L,hyphens:jr,flowInto:be,flowFrom:be,regionFragment:be,boxSizing:Si,textAlignLast:Si,tabSize:Si,wrapFlow:he,wrapThrough:he,wrapMargin:he,touchAction:he,gridTemplateColumns:he,gridTemplateRows:he,gridTemplateAreas:he,gridTemplate:he,gridAutoColumns:he,gridAutoRows:he,gridAutoFlow:he,grid:he,gridRowStart:he,gridColumnStart:he,gridRowEnd:he,gridRow:he,gridColumn:he,gridColumnEnd:he,gridColumnGap:he,gridRowGap:he,gridArea:he,gridGap:he,textSizeAdjust:be,borderImage:L,borderImageOutset:L,borderImageRepeat:L,borderImageSlice:L,borderImageSource:L,borderImageWidth:L}},CC=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mC=function(){function t(e,n){for(var a=0;a"u"?"undefined":CC(a))==="object"){for(var l=this.elements.hasOwnProperty(n)?this.elements[n]:new t,s=Object.keys(a),A=0;A"u"?"undefined":Lc(e))==="object"?(e_(e.src,"@font-face",[e],!1),'"'+String(e.fontFamily)+'"'):e}return t}(),animationName:function(){function t(e,n){if(Array.isArray(e))return e.map(function(o){return t(o,n)}).join(",");if((typeof e>"u"?"undefined":Lc(e))==="object"){var a="keyframe_"+String(wC(e)),r="@keyframes "+a+"{";return e instanceof Ni?e.forEach(function(o,i){r+=ki(i,[o],n,Di,!1).join("")}):Object.keys(e).forEach(function(o){r+=ki(o,[e[o]],n,Di,!1).join("")}),r+="}",Xc(a,[r]),a}else return e}return t}()},Gn={},eo=[],zn=!1,Xc=function(e,n){var a;if(!Gn[e]){if(!zn){if(typeof document>"u")throw new Error("Cannot automatically buffer without a document");zn=!0,(0,$c.default)(JC)}(a=eo).push.apply(a,FC(n)),Gn[e]=!0}},e_=function(e,n,a,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];if(!Gn[e]){var i=ki(n,a,o,Di,r);Xc(e,i)}},TC=function(){eo=[],Gn={},zn=!1,At=null};var HC=function(){if(zn)throw new Error("Cannot buffer while already buffering");zn=!0},t_=function(){zn=!1;var e=eo;return eo=[],e},MC=function(){return t_().join("")},JC=function(){var e=t_();e.length>0&&LC(e)},UC=function(){return Object.keys(Gn)},KC=function(e){e.forEach(function(n){Gn[n]=!0})},PC=function t(e,n,a,r){for(var o=0;o0&&arguments[0]!==void 0?arguments[0]:[];KC(e)}return t}()},YC=typeof window<"u"?null:{renderStatic:function(){function t(e){TC(),HC();var n=e(),a=MC();return{html:n,css:{content:a,renderedClassNames:UC()}}}return t}()},WC=null;function r_(t,e){return{StyleSheet:Object.assign({},VC,{extend:function(){function n(a){var r=a.map(function(o){return o.selectorHandler}).filter(function(o){return o});return r_(t,e.concat(r))}return n}()}),StyleSheetServer:YC,StyleSheetTestUtils:WC,minify:function(){function n(a){n_=a?Qr:GC}return n}(),css:function(){function n(){for(var a=arguments.length,r=Array(a),o=0;o{let a=$C(n.name,this.searchQuery);this.matches.set(n,a.length===0?null:a)})),this.matches.get(e)||null}},no=class{constructor(e,n){this.flamechart=e;this.profileResults=n;this.matches=null}getResults(){if(this.matches==null){let e=[],n=new Map,a=(o,i)=>{let{node:l}=o;if(this.profileResults.getMatchForFrame(l.frame)){let s=new F(new v(o.start,i),new v(o.end-o.start,1));n.set(l,e.length),e.push({configSpaceBounds:s,node:l})}o.children.forEach(s=>{a(s,i+1)})},r=this.flamechart.getLayers();r.length>0&&r[0].forEach(o=>a(o,0)),this.matches={matches:e,indexForNode:n}}return this.matches}count(){return this.getResults().matches.length}indexOf(e){let n=this.getResults().indexForNode.get(e);return n===void 0?null:n}at(e){let n=this.getResults().matches;if(e<0||e>=n.length)throw new Error(`Index ${e} out of bounds in list of ${n.length} matches.`);return n[e]}};function a_(t){t.stopPropagation()}var En=Qt(null),o_=({children:t})=>{let e=wa(),n=e?e.profile:null,a=q(Pn),r=q(On),o=re(()=>!n||!a||r.length===0?null:new to(n,r),[a,r,n]);return C(En.Provider,{value:o},t)},ro=fe(({numResults:t,resultIndex:e,selectNext:n,selectPrev:a})=>{let r=V(),o=ZC(r),i=q(Pn),l=q(On),s=On.set,A=Pn.set,c=K(u=>{let g=u.target.value;s(g)},[s]),h=ln(null),_=K(()=>A(!1),[A]),f=K(u=>{u.shiftKey?a():n()},[a,n]),m=K(u=>{u.stopPropagation(),u.key==="Escape"&&A(!1),u.key==="Enter"&&f(u),u.key=="f"&&(u.metaKey||u.ctrlKey)&&(h.current&&h.current.select(),u.preventDefault())},[A,f]);return Xe(()=>{let u=g=>{g.key=="f"&&(g.metaKey||g.ctrlKey)&&(g.preventDefault(),h.current?h.current.select():(A(!0),requestAnimationFrame(()=>{h.current&&h.current.select()})))};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[A]),i?C("div",{className:j(o.searchView)},C("span",{className:j(o.icon)},"\u{1F50D}"),C("span",{className:j(o.inputContainer)},C("input",{className:j(o.input),value:l,onInput:c,onKeyDown:m,onKeyUp:a_,onKeyPress:a_,ref:h})),t!=null&&C(ot,null,C("span",{className:j(o.resultCount)},e==null?"?":e+1,"/",t),C("button",{className:j(o.icon,o.button),onClick:a},"\u2B05\uFE0F"),C("button",{className:j(o.icon,o.button),onClick:n},"\u27A1\uFE0F")),C("svg",{className:j(o.icon),onClick:_,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C("path",{d:"M4.99999 4.16217L11.6427 10.8048M11.6427 4.16217L4.99999 10.8048",stroke:r.altFgSecondaryColor}))):null}),ZC=pe(t=>ge.create({searchView:{position:"absolute",top:0,right:10,height:20,width:16*13,borderWidth:2,borderColor:t.altFgPrimaryColor,borderStyle:"solid",fontSize:10,boxSizing:"border-box",background:t.altBgSecondaryColor,color:t.altFgPrimaryColor,display:"flex",alignItems:"center"},inputContainer:{flexShrink:1,flexGrow:1,display:"flex"},input:{width:"100%",border:"none",background:"none",fontSize:10,lineHeight:"20px",color:t.altFgPrimaryColor,":focus":{border:"none",outline:"none"},"::selection":{color:t.altFgPrimaryColor,background:t.selectionPrimaryColor}},resultCount:{verticalAlign:"middle"},icon:{flexShrink:0,verticalAlign:"middle",height:"100%",margin:"0px 2px 0px 2px",fontSize:10},button:{display:"inline",background:"none",border:"none",padding:0,":focus":{outline:"none"}}}));function i_(t){return t.replace(/\\([a-fA-F0-9]{2})/g,(e,n)=>{let a=parseInt(n,16);return String.fromCharCode(a)})}function l_(t){let e=t.split(` -`);if(!e.length||(e[e.length-1]===""&&e.pop(),!e.length))return null;let n=new Map,a=/^(\d+):(.+)$/,r=/^([\$\w]+):([\$\w-]+)$/;for(let o of e){let i=a.exec(o);if(i){n.set(`wasm-function[${i[1]}]`,i_(i[2]));continue}let l=r.exec(o);if(l){n.set(l[1],i_(l[2]));continue}return null}return o=>n.has(o.name)?{name:n.get(o.name)}:null}Mi();W();var Wt=class{constructor(e){this.source=e;this.layers=[];this.totalWeight=0;this.minFrameWidth=1;let n=[],a=(o,i)=>{let l=ne(n),s={node:o,parent:l,children:[],start:i,end:i};l&&l.children.push(s),n.push(s)};this.minFrameWidth=1/0;let r=(o,i)=>{console.assert(n.length>0);let l=n.pop();if(l.end=i,l.end-l.start===0)return;let s=n.length;for(;this.layers.length<=s;)this.layers.push([]);this.layers[s].push(l),this.minFrameWidth=Math.min(this.minFrameWidth,l.end-l.start)};this.totalWeight=e.getTotalWeight(),e.forEachCall(a,r),isFinite(this.minFrameWidth)||(this.minFrameWidth=1)}getTotalWeight(){return this.totalWeight}getLayers(){return this.layers}getColorBucketForFrame(e){return this.source.getColorBucketForFrame(e)}getMinFrameWidth(){return this.minFrameWidth}formatValue(e){return this.source.formatValue(e)}getClampedViewportWidth(e){let n=this.getTotalWeight(),a=Math.pow(2,40),r=De(3*this.getMinFrameWidth(),n/a,n);return De(e,r,n)}getClampedConfigSpaceViewportRect({configSpaceViewportRect:e,renderInverted:n}){let a=new v(this.getTotalWeight(),this.getLayers().length),r=this.getClampedViewportWidth(e.size.x),o=e.size.withX(r),i=v.clamp(e.origin,new v(0,n?0:-1),v.max(v.zero,a.minus(o).plus(new v(0,1))));return new F(i,e.size.withX(r))}};W();var om=1e4,io=class{constructor(e,n,a){this.batch=e;this.bounds=n;this.numPrecedingRectanglesInRow=a;this.children=[]}getBatch(){return this.batch}getBounds(){return this.bounds}getRectCount(){return this.batch.getRectCount()}getChildren(){return this.children}getParity(){return this.numPrecedingRectanglesInRow%2}forEachLeafNodeWithinBounds(e,n){this.bounds.hasIntersectionWith(e)&&n(this)}},Ji=class{constructor(e){this.children=e;this.rectCount=0;if(e.length===0)throw new Error("Empty interior node");let n=1/0,a=-1/0,r=1/0,o=-1/0;for(let i of e){this.rectCount+=i.getRectCount();let l=i.getBounds();n=Math.min(n,l.left()),a=Math.max(a,l.right()),r=Math.min(r,l.top()),o=Math.max(o,l.bottom())}this.bounds=new F(new v(n,r),new v(a-n,o-r))}getBounds(){return this.bounds}getRectCount(){return this.rectCount}getChildren(){return this.children}forEachLeafNodeWithinBounds(e,n){if(this.bounds.hasIntersectionWith(e))for(let a of this.children)a.forEachLeafNodeWithinBounds(e,n)}},lo=class t{get key(){return`${this.stackDepth}_${this.index}_${this.zoomLevel}`}constructor(e){this.stackDepth=e.stackDepth,this.zoomLevel=e.zoomLevel,this.index=e.index}static getOrInsert(e,n){return e.getOrInsert(new t(n))}},Ao=class{constructor(e,n,a,r,o,i={inverted:!1}){this.gl=e;this.rowAtlas=n;this.flamechart=a;this.rectangleBatchRenderer=r;this.colorPassRenderer=o;this.options=i;this.layers=[];this.rectInfoTexture=null;this.rectInfoRenderTarget=null;this.atlasKeys=new wt;let l=a.getLayers().length;for(let s=0;s=om&&(A.push(new io(f,new F(new v(h,c),new v(_-h,1)),m)),h=1/0,_=-1/0,f=new mn(this.gl));let I=new F(new v(p.start,c),new v(p.end-p.start,1));h=Math.min(h,I.left()),_=Math.max(_,I.right());let y=new ue((1+g%255)/256,(1+s%255)/256,(1+this.flamechart.getColorBucketForFrame(p.node.frame))/256);f.addRect(I,y),m++}f.getRectCount()>0&&A.push(new io(f,new F(new v(h,c),new v(_-h,1)),m)),this.layers.push(new Ji(A))}}getRectInfoTexture(e,n){if(this.rectInfoTexture){let a=this.rectInfoTexture;(a.width!=e||a.height!=n)&&a.resize(e,n)}else this.rectInfoTexture=this.gl.createTexture(z.TextureFormat.NEAREST_CLAMP,e,n);return this.rectInfoTexture}getRectInfoRenderTarget(e,n){let a=this.getRectInfoTexture(e,n);return this.rectInfoRenderTarget&&this.rectInfoRenderTarget.texture!=a&&(this.rectInfoRenderTarget.texture.free(),this.rectInfoRenderTarget.setColor(a)),this.rectInfoRenderTarget||(this.rectInfoRenderTarget=this.gl.createRenderTarget(a)),this.rectInfoRenderTarget}free(){this.rectInfoRenderTarget&&this.rectInfoRenderTarget.free(),this.rectInfoTexture&&this.rectInfoTexture.free()}configSpaceBoundsForKey(e){let{stackDepth:n,zoomLevel:a,index:r}=e,i=this.flamechart.getTotalWeight()/Math.pow(2,a),l=this.flamechart.getLayers().length,s=this.options.inverted?l-1-n:n;return new F(new v(i*r,s),new v(i,1))}render(e){let{configSpaceSrcRect:n,physicalSpaceDstRect:a}=e,r=[],o=O.betweenRects(n,a);if(n.isEmpty())return;let i=0;for(;;){let y=lo.getOrInsert(this.atlasKeys,{stackDepth:0,zoomLevel:i,index:0}),B=this.configSpaceBoundsForKey(y);if(o.transformRect(B).width(){let E=this.configSpaceBoundsForKey(B);this.layers[B.stackDepth].forEachLeafNodeWithinBounds(E,b=>{this.rectangleBatchRenderer.render({batch:b.getBatch(),configSpaceSrcRect:E,physicalSpaceDstRect:y})})});let p=this.getRectInfoRenderTarget(a.width(),a.height());da(this.gl,p,()=>{this.gl.clear(new z.Color(0,0,0,0));let y=new F(v.zero,new v(this.gl.viewport.width,this.gl.viewport.height)),B=O.betweenRects(n,y);for(let E of u){let b=this.configSpaceBoundsForKey(E);this.rowAtlas.renderViaAtlas(E,B.transformRect(b))}for(let E of g){let b=this.configSpaceBoundsForKey(E),D=B.transformRect(b);this.layers[E.stackDepth].forEachLeafNodeWithinBounds(b,T=>{this.rectangleBatchRenderer.render({batch:T.getBatch(),configSpaceSrcRect:b,physicalSpaceDstRect:D})})}});let I=this.getRectInfoTexture(a.width(),a.height());this.colorPassRenderer.render({rectInfoTexture:I,srcRect:new F(v.zero,new v(I.width,I.height)),dstRect:a,renderOutlines:e.renderOutlines})}};W();W();var Dt=pe(t=>ge.create({hoverCount:{color:t.weightColor},fill:{width:"100%",height:"100%",position:"absolute",left:0,top:0},minimap:{height:100,borderBottom:`2px solid ${t.fgSecondaryColor}`},panZoomView:{flex:1},detailView:{display:"grid",height:150,overflow:"hidden",gridTemplateColumns:"120px 120px 1fr",gridTemplateRows:"repeat(4, 1fr)",borderTop:`2px solid ${t.fgSecondaryColor}`,fontSize:10,position:"absolute",background:t.bgPrimaryColor,width:"100vw",bottom:0},stackTraceViewPadding:{padding:5},stackTraceView:{height:150,lineHeight:`${12}px`,overflow:"auto","::-webkit-scrollbar":{background:t.bgPrimaryColor},"::-webkit-scrollbar-thumb":{background:t.fgSecondaryColor,borderRadius:20,border:`3px solid ${t.bgPrimaryColor}`,":hover":{background:t.fgPrimaryColor}}},stackLine:{whiteSpace:"nowrap"},stackFileLine:{color:t.fgSecondaryColor},statsTable:{display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:`repeat(3, ${20}px)`,gridGap:"1px 1px",textAlign:"center",paddingRight:1},statsTableHeader:{gridColumn:"1 / 3"},statsTableCell:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},thisInstanceCell:{background:t.selectionPrimaryColor,color:t.altFgPrimaryColor},allInstancesCell:{background:t.selectionSecondaryColor,color:t.altFgPrimaryColor},barDisplay:{position:"absolute",top:0,left:0,background:"rgba(0, 0, 0, 0.2)",width:"100%"}}));W();var Ki="\u2026",so=new Map,f_=-1;function qt(t,e){return window.devicePixelRatio!==f_&&(so.clear(),f_=window.devicePixelRatio),so.has(e)||so.set(e,t.measureText(e).width),so.get(e)}function Ui(t,e){if(t.length<=e)return{trimmedString:t,trimmedLength:t.length,prefixLength:t.length,suffixLength:0,originalString:t,originalLength:t.length};let n=Math.floor(e/2),a=e-n-1,r=t.substring(0,n),o=t.substring(t.length-a,t.length),i=r+Ki+o;return{trimmedString:i,trimmedLength:i.length,prefixLength:r.length,suffixLength:o.length,originalString:t,originalLength:t.length}}function C_(t,e,n){if(qt(t,e)<=n)return Ui(e,e.length);let[a]=GA(0,e.length,r=>qt(t,Ui(e,Math.floor(r)).trimmedString),n);return Ui(e,Math.floor(a))}function p_(t,e){return e{this.container=n||null};this.overlayCanvas=null;this.overlayCtx=null;this.onWindowResize=()=>{this.onBeforeFrame()};this.onBeforeFrame=()=>{this.maybeClearInteractionLock(),this.resizeOverlayCanvasIfNeeded(),this.renderRects(),this.renderOverlays()};this.renderCanvas=()=>{this.props.canvasContext.requestFrame()};this.frameHadWheelEvent=!1;this.framesWithoutWheelEvents=0;this.interactionLock=null;this.maybeClearInteractionLock=()=>{this.interactionLock&&(this.frameHadWheelEvent||(this.framesWithoutWheelEvents++,this.framesWithoutWheelEvents>=2&&(this.interactionLock=null,this.framesWithoutWheelEvents=0)),this.props.canvasContext.requestFrame()),this.frameHadWheelEvent=!1};this.onWheel=n=>{if(n.preventDefault(),this.frameHadWheelEvent=!0,(n.metaKey||n.ctrlKey)&&this.interactionLock!=="pan"){let r=1+n.deltaY/100;n.ctrlKey&&(r=1+n.deltaY/40),r=De(r,.1,10),this.zoom(r)}else this.interactionLock!=="zoom"&&this.pan(new v(n.deltaX,n.deltaY));this.renderCanvas()};this.dragStartConfigSpaceMouse=null;this.dragConfigSpaceViewportOffset=null;this.draggingMode=null;this.onMouseDown=n=>{let a=this.configSpaceMouse(n);a&&(this.props.configSpaceViewportRect.contains(a)?(this.draggingMode=1,this.dragConfigSpaceViewportOffset=a.minus(this.props.configSpaceViewportRect.origin)):this.draggingMode=0,this.dragStartConfigSpaceMouse=a,window.addEventListener("mousemove",this.onWindowMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.updateCursor(a))};this.onWindowMouseMove=n=>{if(!this.dragStartConfigSpaceMouse)return;let a=this.configSpaceMouse(n);if(a){if(this.updateCursor(a),a=new F(new v(0,0),this.configSpaceSize()).closestPointTo(a),this.draggingMode===0){let r=this.dragStartConfigSpaceMouse,o=a;if(!r||!o)return;let i=Math.min(r.x,o.x),s=Math.max(r.x,o.x)-i,A=this.props.configSpaceViewportRect.height();this.props.setConfigSpaceViewportRect(new F(new v(i,o.y-A/2),new v(s,A)))}else if(this.draggingMode===1){if(!this.dragConfigSpaceViewportOffset)return;let r=a.minus(this.dragConfigSpaceViewportOffset);this.props.setConfigSpaceViewportRect(this.props.configSpaceViewportRect.withOrigin(r))}}};this.updateCursor=n=>{this.draggingMode===1?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):this.draggingMode===0?document.body.style.cursor="col-resize":this.props.configSpaceViewportRect.contains(n)?(document.body.style.cursor="grab",document.body.style.cursor="-webkit-grab"):document.body.style.cursor="col-resize"};this.onMouseLeave=()=>{this.draggingMode==null&&(document.body.style.cursor="default"),Er.set(null)};this.onMouseMove=n=>{let a=this.configSpaceMouse(n);a&&(this.updateCursor(a),Er.set(a))};this.onWindowMouseUp=n=>{this.draggingMode=null,window.removeEventListener("mousemove",this.onWindowMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp);let a=this.configSpaceMouse(n);a&&this.updateCursor(a)};this.overlayCanvasRef=n=>{n?(this.overlayCanvas=n,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)}}physicalViewSize(){return new v(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}getStyle(){return Dt(this.props.theme)}minimapOrigin(){return new v(0,20*window.devicePixelRatio)}configSpaceSize(){return new v(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}configSpaceToPhysicalViewSpace(){let n=this.minimapOrigin();return O.betweenRects(new F(new v(0,0),this.configSpaceSize()),new F(n,this.physicalViewSize().minus(n)))}logicalToPhysicalViewSpace(){return O.withScale(new v(window.devicePixelRatio,window.devicePixelRatio))}windowToLogicalViewSpace(){if(!this.container)return new O;let n=this.container.getBoundingClientRect();return O.withTranslation(new v(-n.left,-n.top))}renderRects(){this.container&&(this.physicalViewSize().x<2||this.props.canvasContext.renderBehind(this.container,()=>{this.props.flamechartRenderer.render({configSpaceSrcRect:new F(new v(0,0),this.configSpaceSize()),physicalSpaceDstRect:new F(this.minimapOrigin(),this.physicalViewSize().minus(this.minimapOrigin())),renderOutlines:!1}),this.props.canvasContext.viewportRectangleRenderer.render({configSpaceViewportRect:this.props.configSpaceViewportRect,configSpaceToPhysicalViewSpace:this.configSpaceToPhysicalViewSpace()})}))}renderOverlays(){let n=this.overlayCtx;if(!n)return;let a=this.physicalViewSize();n.clearRect(0,0,a.x,a.y);let r=this.configSpaceToPhysicalViewSpace(),o=0,i=this.configSpaceSize().x,s=(this.configSpaceToPhysicalViewSpace().inverted()||new O).times(this.logicalToPhysicalViewSpace()).transformVector(new v(200,1)).x,A=20*window.devicePixelRatio,c=10*window.devicePixelRatio,h=(A-c)/2;n.font=`${c}px/${A}px "Source Code Pro", Courier, monospace`,n.textBaseline="top";let f=Math.pow(10,Math.floor(Math.log10(s)));s/f>5?f*=5:s/f>2&&(f*=2);let m=this.props.theme;{n.fillStyle=ue.fromCSSHex(m.bgPrimaryColor).withAlpha(.8).toCSS(),n.fillRect(0,0,a.x,A),n.textBaseline="top";for(let u=Math.ceil(o/f)*f;uge.create({stackChit:{position:"relative",top:-1,display:"inline-block",verticalAlign:"middle",marginRight:"0.5em",border:`1px solid ${t.fgSecondaryColor}`,width:8,height:8}}));function I_(t){let e=Dt(V()),n=t.formatter(t.selectedTotal),a=t.formatter(t.selectedSelf),r=100*t.selectedTotal/t.grandTotal,o=100*t.selectedSelf/t.grandTotal;return C("div",{className:j(e.statsTable)},C("div",{className:j(t.cellStyle,e.statsTableCell,e.statsTableHeader)},t.title),C("div",{className:j(t.cellStyle,e.statsTableCell)},"Total"),C("div",{className:j(t.cellStyle,e.statsTableCell)},"Self"),C("div",{className:j(t.cellStyle,e.statsTableCell)},n),C("div",{className:j(t.cellStyle,e.statsTableCell)},a),C("div",{className:j(t.cellStyle,e.statsTableCell)},bt(r),C("div",{className:j(e.barDisplay),style:{height:`${r}%`}})),C("div",{className:j(t.cellStyle,e.statsTableCell)},bt(o),C("div",{className:j(e.barDisplay),style:{height:`${o}%`}})))}function lm(t){let e=Dt(V()),n=[],a=t.node;for(;a&&!a.isRoot();a=a.parent){let r=[],{frame:o}=a;if(r.push(C(ho,{color:t.getFrameColor(o)})),n.length&&r.push(C("span",{className:j(e.stackFileLine)},"> ")),r.push(o.name),o.file){let i=o.file;o.line!=null&&(i+=`:${o.line}`,o.col!=null&&(i+=`:${o.col}`)),r.push(C("span",{className:j(e.stackFileLine)}," (",i,")"))}n.push(C("div",{className:j(e.stackLine)},r))}return C("div",{className:j(e.stackTraceView)},C("div",{className:j(e.stackTraceViewPadding)},n))}function y_(t){let e=Dt(V()),{flamechart:n,selectedNode:a}=t,{frame:r}=a;return C("div",{className:j(e.detailView)},C(I_,{title:"This Instance",cellStyle:e.thisInstanceCell,grandTotal:n.getTotalWeight(),selectedTotal:a.getTotalWeight(),selectedSelf:a.getSelfWeight(),formatter:n.formatValue.bind(n)}),C(I_,{title:"All Instances",cellStyle:e.allInstancesCell,grandTotal:n.getTotalWeight(),selectedTotal:r.getTotalWeight(),selectedSelf:r.getSelfWeight(),formatter:n.formatValue.bind(n)}),C(lm,{node:a,getFrameColor:t.getCSSColorForFrame}))}var br=class{constructor(){this.argsBatch=[]}text(e){this.argsBatch.push(e)}fill(e,n){if(this.argsBatch.length!==0){e.fillStyle=n;for(let a of this.argsBatch)e.fillText(a.text,a.x,a.y);this.argsBatch=[]}}},Bn=class{constructor(){this.argsBatch=[]}rect(e){this.argsBatch.push(e)}drawPath(e){e.beginPath();for(let n of this.argsBatch)e.rect(n.x,n.y,n.w,n.h);e.closePath(),this.argsBatch=[]}fill(e,n){this.argsBatch.length!==0&&(e.fillStyle=n,this.drawPath(e),e.fill())}stroke(e,n,a){this.argsBatch.length!==0&&(e.strokeStyle=n,e.lineWidth=a,this.drawPath(e),e.stroke())}};var Yn=class extends Se{constructor(){super(...arguments);this.container=null;this.containerRef=n=>{this.container=n||null};this.overlayCanvas=null;this.overlayCtx=null;this.hoveredLabel=null;this.overlayCanvasRef=n=>{n?(this.overlayCanvas=n,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)};this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT=20;this.onWindowResize=()=>{this.updateConfigSpaceViewport(),this.onBeforeFrame()};this.frameHadWheelEvent=!1;this.framesWithoutWheelEvents=0;this.interactionLock=null;this.maybeClearInteractionLock=()=>{this.interactionLock&&(this.frameHadWheelEvent||(this.framesWithoutWheelEvents++,this.framesWithoutWheelEvents>=2&&(this.interactionLock=null,this.framesWithoutWheelEvents=0)),this.props.canvasContext.requestFrame()),this.frameHadWheelEvent=!1};this.onBeforeFrame=()=>{this.resizeOverlayCanvasIfNeeded(),this.renderRects(),this.renderOverlays(),this.maybeClearInteractionLock()};this.renderCanvas=()=>{this.props.canvasContext.requestFrame()};this.lastDragPos=null;this.mouseDownPos=null;this.currentMousePos=null;this.onMouseDown=n=>{this.mouseDownPos=this.lastDragPos=new v(n.offsetX,n.offsetY),this.updateCursor(),window.addEventListener("mouseup",this.onWindowMouseUp)};this.onMouseDrag=n=>{if(!this.lastDragPos)return;let a=new v(n.offsetX,n.offsetY);this.pan(this.lastDragPos.minus(a)),this.lastDragPos=a,this.hoveredLabel&&this.props.onNodeHover(null)};this.onDblClick=n=>{if(this.hoveredLabel){let a=this.hoveredLabel.configSpaceBounds,r=new F(a.origin.minus(new v(0,1)),a.size.withY(this.props.configSpaceViewportRect.height()));this.props.setConfigSpaceViewportRect(r)}};this.onClick=n=>{let a=new v(n.offsetX,n.offsetY),r=this.mouseDownPos;this.mouseDownPos=null,!(r&&a.minus(r).length()>5)&&(this.hoveredLabel?(this.props.onNodeSelect(this.hoveredLabel.node),this.renderCanvas()):this.props.onNodeSelect(null))};this.onWindowMouseUp=n=>{this.lastDragPos=null,this.updateCursor(),window.removeEventListener("mouseup",this.onWindowMouseUp)};this.onMouseMove=n=>{if(this.currentMousePos=new v(n.offsetX,n.offsetY),this.updateCursor(),this.lastDragPos){n.preventDefault(),this.onMouseDrag(n);return}let a=new v(n.offsetX,n.offsetY),r=this.logicalToPhysicalViewSpace().transformPosition(a),o=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(r);if(!o)return;let i=(s,A=0)=>{let c=s.end-s.start,h=this.props.renderInverted?this.configSpaceSize().y-1-A:A,_=new F(new v(s.start,h),new v(c,1));if(o.x<_.left()||o.x>_.right())return null;_.contains(o)&&(this.hoveredLabel={configSpaceBounds:_,node:s.node});for(let f of s.children)i(f,A+1)};(()=>{this.hoveredLabel=null})();for(let s of this.props.flamechart.getLayers()[0]||[])i(s);this.hoveredLabel?this.props.onNodeHover({node:this.hoveredLabel.node,event:n}):this.props.onNodeHover(null),this.renderCanvas()};this.onMouseLeave=n=>{this.currentMousePos=null,this.hoveredLabel=null,this.props.onNodeHover(null),this.renderCanvas()};this.onWheel=n=>{n.preventDefault(),this.frameHadWheelEvent=!0;let a=n.metaKey||n.ctrlKey,r=n.deltaY,o=n.deltaX;if(n.deltaMode===n.DOM_DELTA_LINE&&(r*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT,o*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT),a&&this.interactionLock!=="pan"){let i=1+r/100;n.ctrlKey&&(i=1+r/40),i=De(i,.1,10),this.zoom(new v(n.offsetX,n.offsetY),i)}else this.interactionLock!=="zoom"&&this.pan(new v(o,r));this.renderCanvas()};this.onWindowKeyPress=n=>{if(!this.container)return;let{width:a,height:r}=this.container.getBoundingClientRect(),o=Er.get(),i,l=!0;if(o){let A=this.props.configSpaceViewportRect,c=o.x>=A.left()&&o.x<=A.right()&&o.y>=A.top()&&o.y<=A.bottom(),h=new v(o.x-A.width()/2,o.y-A.height()/2);this.props.setConfigSpaceViewportRect(A.withOrigin(h)),c||(l=!1),i=new v(a/2,r/2)}else i=this.currentMousePos||new v(a/2,r/2);let s=1;switch(n.key){case"=":case"+":s=.5;break;case"-":case"_":s=2;break}l&&requestAnimationFrame(()=>{this.zoom(i,s),n.preventDefault()}),!(n.ctrlKey||n.shiftKey||n.metaKey)&&(n.key==="0"?this.zoom(i,1e9):n.key==="ArrowRight"||n.code==="KeyD"?this.pan(new v(100,0)):n.key==="ArrowLeft"||n.code==="KeyA"?this.pan(new v(-100,0)):n.key==="ArrowUp"||n.code==="KeyW"?this.pan(new v(0,-100)):n.key==="ArrowDown"||n.code==="KeyS"?this.pan(new v(0,100)):n.key==="Escape"&&(this.props.onNodeSelect(null),this.renderCanvas()))}}getStyle(){return Dt(this.props.theme)}setConfigSpaceViewportRect(n){this.props.setConfigSpaceViewportRect(n)}configSpaceSize(){return new v(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}physicalViewSize(){return new v(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}physicalBounds(){if(this.props.renderInverted){let n=this.physicalViewSize().y,a=(this.configSpaceSize().y+1)*this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio;if(a{let D=E.end-E.start,T=this.props.renderInverted?this.configSpaceSize().y-1-b:b,Q=new F(new v(E.start,T),new v(D,1));if(!(Dthis.props.configSpaceViewportRect.right())&&!(Q.right()this.props.configSpaceViewportRect.bottom())return;if(Q.hasIntersectionWith(this.props.configSpaceViewportRect)){let w=a.transformRect(Q);if(w.left()<0&&(w=w.withOrigin(w.origin.withX(0)).withSize(w.size.withX(w.size.x+w.left()))),w.right()>i.x&&(w=w.withSize(w.size.withX(i.x-w.left()))),w.width()>l){let N=this.props.searchResults?.getMatchForFrame(E.node.frame),te=C_(n,E.node.frame.name,w.width()-2*A);if(N){let at=m_(te,N),pt=0,rn=w.left()+A,jt=(o-r)/2-2;for(let[Jt,ia]of at){rn+=qt(n,te.trimmedString.substring(pt,Jt));let fr=qt(n,te.trimmedString.substring(Jt,ia));_.rect({x:rn,y:w.top()+jt,w:fr,h:o-2*jt}),rn+=fr,pt=ia}}(this.props.searchResults!=null&&!N?h:c).text({text:te.trimmedString,x:w.left()+A,y:Math.round(w.bottom()-(o-r)/2)})}}for(let w of E.children)g(w,b+1)}},p=2*window.devicePixelRatio;n.strokeStyle=this.props.theme.selectionSecondaryColor;let I=(a.inverseTransformVector(new v(1,0))||new v(0,0)).x,y=(E,b=0)=>{if(!this.props.selectedNode&&this.props.searchResults==null)return;let D=E.end-E.start,T=this.props.renderInverted?this.configSpaceSize().y-1-b:b,Q=new F(new v(E.start,T),new v(D,1));if(!(Dthis.props.configSpaceViewportRect.right())&&!(Q.right()this.props.configSpaceViewportRect.bottom())){if(Q.hasIntersectionWith(this.props.configSpaceViewportRect)){if(this.props.searchResults?.getMatchForFrame(E.node.frame)){let w=a.transformRect(Q);u.rect({x:Math.round(w.left()+p/2),y:Math.round(w.top()+p/2),w:Math.round(Math.max(0,w.width()-p)),h:Math.round(Math.max(0,w.height()-p))})}if(this.props.selectedNode!=null&&E.node.frame===this.props.selectedNode.frame){let w=E.node===this.props.selectedNode?f:m,N=a.transformRect(Q);w.rect({x:Math.round(N.left()+1+p/2),y:Math.round(N.top()+1+p/2),w:Math.round(Math.max(0,N.width()-2-p)),h:Math.round(Math.max(0,N.height()-2-p))})}}for(let w of E.children)y(w,b+1)}};for(let E of this.props.flamechart.getLayers()[0]||[])y(E);for(let E of this.props.flamechart.getLayers()[0]||[])g(E);let B=this.props.theme;if(u.fill(n,B.searchMatchPrimaryColor),_.fill(n,B.searchMatchSecondaryColor),h.fill(n,B.fgSecondaryColor),c.fill(n,this.props.searchResults!=null?B.searchMatchTextColor:B.fgPrimaryColor),m.stroke(n,B.selectionSecondaryColor,p),f.stroke(n,B.selectionPrimaryColor,p),this.hoveredLabel){let E=B.fgPrimaryColor;this.props.selectedNode===this.hoveredLabel.node&&(E=B.selectionPrimaryColor),n.lineWidth=2*devicePixelRatio,n.strokeStyle=E;let b=a.transformRect(this.hoveredLabel.configSpaceBounds);n.strokeRect(Math.round(b.left()),Math.round(b.top()),Math.round(Math.max(0,b.width())),Math.round(Math.max(0,b.height())))}this.renderTimeIndicators()}renderTimeIndicators(){let n=this.overlayCtx;if(!n)return;let a=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio,r=this.physicalViewSize(),o=this.configSpaceToPhysicalViewSpace(),i=10*window.devicePixelRatio,l=(a-i)/2,s=this.props.configSpaceViewportRect.left(),A=this.props.configSpaceViewportRect.right(),h=(this.configSpaceToPhysicalViewSpace().inverted()||new O).times(this.logicalToPhysicalViewSpace()).transformVector(new v(200,1)).x,f=Math.pow(10,Math.floor(Math.log10(h)));h/f>5?f*=5:h/f>2&&(f*=2);let m=this.props.theme;{let u=this.props.renderInverted?r.y-a:0;n.fillStyle=ue.fromCSSHex(m.bgPrimaryColor).withAlpha(.8).toCSS(),n.fillRect(0,u,r.x,a),n.textBaseline="top";for(let g=Math.ceil(s/f)*f;g{this.props.flamechartRenderer.render({physicalSpaceDstRect:this.physicalBounds(),configSpaceSrcRect:this.props.configSpaceViewportRect,renderOutlines:!0})}))}pan(n){this.interactionLock="pan";let a=this.logicalToPhysicalViewSpace().transformVector(n),r=this.configSpaceToPhysicalViewSpace().inverseTransformVector(a);this.hoveredLabel&&this.props.onNodeHover(null),r&&this.props.transformViewport(O.withTranslation(r))}zoom(n,a){this.interactionLock="zoom";let r=this.logicalToPhysicalViewSpace().transformPosition(n),o=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(r);if(!o)return;let i=O.withTranslation(o.times(-1)).scaledBy(new v(a,1)).translatedBy(o);this.props.transformViewport(i)}updateCursor(){this.lastDragPos?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):document.body.style.cursor="default"}shouldComponentUpdate(){return!1}componentWillReceiveProps(n){this.props.flamechart!==n.flamechart?(this.hoveredLabel=null,this.renderCanvas()):this.props.searchResults!==n.searchResults?this.renderCanvas():this.props.selectedNode!==n.selectedNode?this.renderCanvas():this.props.configSpaceViewportRect!==n.configSpaceViewportRect?this.renderCanvas():this.props.canvasContext!==n.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),n.canvasContext&&(n.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),n.canvasContext.requestFrame()))}componentDidMount(){this.props.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keydown",this.onWindowKeyPress)}render(){let n=this.getStyle();return C("div",{className:j(n.panZoomView,Ee.vbox),onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onClick:this.onClick,onDblClick:this.onDblClick,onWheel:this.onWheel,ref:this.containerRef},C("canvas",{width:1,height:1,ref:this.overlayCanvasRef,className:j(n.fill)}))}};function uo(t){let e=sm(V()),{containerSize:n,offset:a}=t,r=n.x,o=n.y,i=7,l=K(s=>{if(!s)return;let A=s.getBoundingClientRect(),c=a.x+i;c+A.width>r-1&&(c=r-A.width-1,c<1&&(c=1)),s.style.left=`${c}px`;let h=a.y+i;h+A.height>o-1&&(h=a.y-A.height-1,h<1&&(h=1)),s.style.top=`${h}px`},[r,o,a.x,a.y]);return C("div",{className:j(e.hoverTip),ref:l},C("div",{className:j(e.hoverTipRow)},t.children))}var go=2,sm=pe(t=>ge.create({hoverTip:{position:"absolute",background:t.bgPrimaryColor,border:"1px solid black",maxWidth:900,paddingTop:go,paddingBottom:go,pointerEvents:"none",userSelect:"none",fontSize:10,fontFamily:'"Source Code Pro", Courier, monospace',zIndex:2},hoverTipRow:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflowX:"hidden",paddingLeft:go,paddingRight:go,maxWidth:900}}));var v_=Qt(null),Pi=({flamechart:t,selectedNode:e,setSelectedNode:n,configSpaceViewportRect:a,setConfigSpaceViewportRect:r,children:o})=>{let i=lt(En),l=re(()=>i==null?null:new no(t,i),[t,i]);return C(v_.Provider,{value:{results:l,flamechart:t,selectedNode:e,setSelectedNode:n,configSpaceViewportRect:a,setConfigSpaceViewportRect:r}},o)},E_=fe(()=>{let t=lt(v_),e=t==null?null:t.results,n=t==null?null:t.selectedNode,a=t==null?null:t.setSelectedNode,r=t==null?null:t.configSpaceViewportRect,o=t==null?null:t.setConfigSpaceViewportRect,i=t==null?null:t.flamechart,l=e==null?null:e.count(),s=re(()=>e==null||n==null?null:e.indexOf(n),[e,n]),A=K(_=>{if(!a||!i||!r||!o)return;let f=_.configSpaceBounds,m=new F(f.origin.minus(new v(0,1)),f.size.withY(r.height()));a(_.node),o(i.getClampedConfigSpaceViewportRect({configSpaceViewportRect:m}))},[r,o,a,i]),{selectPrev:c,selectNext:h}=re(()=>l==null||l===0||e==null?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{if(!e?.at||l==null||l===0)return;let _=s==null?l-1:s-1;_<0&&(_=l-1);let f=e.at(_);A(f)},selectNext:()=>{if(!e?.at||l==null||l===0)return;let _=s==null?0:s+1;_>=l&&(_=0);let f=e.at(_);A(f)}},[l,s,e,A]);return C(ro,{resultIndex:s,numResults:l,selectPrev:c,selectNext:h})});var Ct=class extends Se{};var xr=class extends Ct{constructor(){super(...arguments);this.setConfigSpaceViewportRect=n=>{let a=150/20,r=this.configSpaceSize(),o=this.props.flamechart.getClampedViewportWidth(n.size.x),i=n.size.withX(o),l=v.clamp(n.origin,new v(0,-1),v.max(v.zero,r.minus(i).plus(new v(0,a+1))));this.props.setConfigSpaceViewportRect(new F(l,n.size.withX(o)))};this.setLogicalSpaceViewportSize=n=>{this.props.setLogicalSpaceViewportSize(n)};this.transformViewport=n=>{let a=n.transformRect(this.props.configSpaceViewportRect);this.setConfigSpaceViewportRect(a)};this.onNodeHover=n=>{this.props.setNodeHover(n)};this.onNodeClick=n=>{this.props.setSelectedNode(n)};this.container=null;this.containerRef=n=>{this.container=n||null}}getStyle(){return Dt(this.props.theme)}configSpaceSize(){return new v(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}formatValue(n){let a=this.props.flamechart.getTotalWeight(),r=100*n/a,o=bt(r);return`${this.props.flamechart.formatValue(n)} (${o})`}renderTooltip(){if(!this.container)return null;let{hover:n}=this.props;if(!n)return null;let{width:a,height:r,left:o,top:i}=this.container.getBoundingClientRect(),l=new v(n.event.clientX-o,n.event.clientY-i),s=n.node.frame,A=this.getStyle();return C(uo,{containerSize:new v(a,r),offset:l},C("span",{className:j(A.hoverCount)},this.formatValue(n.node.getTotalWeight()))," ",s.name,s.file?C("div",null,s.file,":",s.line):void 0)}render(){let n=this.getStyle();return C("div",{className:j(n.fill,Ee.vbox),ref:this.containerRef},C(co,{theme:this.props.theme,configSpaceViewportRect:this.props.configSpaceViewportRect,transformViewport:this.transformViewport,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,canvasContext:this.props.canvasContext,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect}),C(En.Consumer,null,a=>C(ot,null,C(Yn,{theme:this.props.theme,canvasContext:this.props.canvasContext,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,renderInverted:!1,onNodeHover:this.onNodeHover,onNodeSelect:this.onNodeClick,selectedNode:this.props.selectedNode,transformViewport:this.transformViewport,configSpaceViewportRect:this.props.configSpaceViewportRect,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect,logicalSpaceViewportSize:this.props.logicalSpaceViewportSize,setLogicalSpaceViewportSize:this.setLogicalSpaceViewportSize,searchResults:a}),C(E_,null))),this.renderTooltip(),this.props.selectedNode&&C(y_,{flamechart:this.props.flamechart,getCSSColorForFrame:this.props.getCSSColorForFrame,selectedNode:this.props.selectedNode}))}};function Wn(t){return{setNodeHover:K(e=>{Te.setFlamechartHoveredNode(t,e)},[t]),setLogicalSpaceViewportSize:K(e=>{Te.setLogicalSpaceViewportSize(t,e)},[t]),setConfigSpaceViewportRect:K(e=>{Te.setConfigSpaceViewportRect(t,e)},[t]),setSelectedNode:K(e=>{Te.setSelectedNode(t,e)},[t])}}var cm=Ge(({profile:t,getColorBucketForFrame:e})=>new Wt({getTotalWeight:t.getTotalWeight.bind(t),forEachCall:t.forEachCall.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),qn=t=>Ge(({canvasContext:e,flamechart:n})=>new Ao(e.gl,YA(e),n,e.rectangleBatchRenderer,e.flamechartColorPassRenderer,t)),_m=qn(),j_=fe(t=>{let{activeProfileState:e,glCanvas:n}=t,{profile:a,chronoViewState:r}=e,o=V(),i=Pt({theme:o,canvas:n}),l=Ot(a),s=on(l),A=Kt({theme:o,frameToColorBucket:l}),c=cm({profile:a,getColorBucketForFrame:s}),h=_m({canvasContext:i,flamechart:c}),_=Wn("CHRONO");return C(Pi,{flamechart:c,selectedNode:r.selectedNode,setSelectedNode:_.setSelectedNode,configSpaceViewportRect:r.configSpaceViewportRect,setConfigSpaceViewportRect:_.setConfigSpaceViewportRect},C(xr,{theme:o,renderInverted:!1,flamechart:c,flamechartRenderer:h,canvasContext:i,getCSSColorForFrame:A,...r,..._}))}),hm=Ge(({profile:t,getColorBucketForFrame:e})=>new Wt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),gm=qn(),Q_=fe(t=>{let{activeProfileState:e,glCanvas:n}=t,{profile:a,leftHeavyViewState:r}=e,o=V(),i=Pt({theme:o,canvas:n}),l=Ot(a),s=on(l),A=Kt({theme:o,frameToColorBucket:l}),c=hm({profile:a,getColorBucketForFrame:s}),h=gm({canvasContext:i,flamechart:c}),_=Wn("LEFT_HEAVY");return C(Pi,{flamechart:c,selectedNode:r.selectedNode,setSelectedNode:_.setSelectedNode,configSpaceViewportRect:r.configSpaceViewportRect,setConfigSpaceViewportRect:_.setConfigSpaceViewportRect},C(xr,{theme:o,renderInverted:!1,flamechart:c,flamechartRenderer:h,canvasContext:i,getCSSColorForFrame:A,...r,..._}))});function b_(t,e){return pm(t,e)}var Oi=97,x_=122,S_=65,dm=90,um=48,fm=57;function w_(t){let e=t.charCodeAt(0);return Oi<=e&&e<=x_?1:S_<=e&&e<=dm?2:um<=e&&e<=fm?3:0}function Gi(t,e){if(t===e)return!0;let n=e.charCodeAt(0);return Oi<=n&&n<=x_?t.charCodeAt(0)===n-Oi+S_:!1}function pm(t,e){if(e.length==0)return{matchedRanges:[],score:0};let n=0,a=-1,r=-1,o=t.length,i=e.length;for(let l=0;l=a;l--){let s=t[l],A=e[n];if(Gi(s,A)&&(n--,n<0))return a=l,Em(t,e,a,r)}throw new Error("Implementation error. This must be a bug in fzfFuzzyMatchV1")}var zi=16,N_=-3,Vi=-1,Yi=zi/2,Cm=zi/2,mm=Yi+Vi,Im=-(N_+Vi),ym=2;function vm(t,e){return t===0&&e!==0?Yi:t===1&&e==2||t!==3&&e==3?mm:e===0?Cm:0}function Em(t,e,n,a){let r=0,o=0,i=!1,l=0,s=0,A=new Array(e.length),c=0;n>0&&(c=w_(t[n-1]));for(let _=n;_{i(),t(l)},[i,t,l]),_=K(p=>{e(l)},[e,l]),f=n.getName(),m=n.getTotalNonIdleWeight(),u=j(c.highlighted),g=re(()=>Bm(f,s,u),[f,s,u]);return C("tr",{ref:o,onMouseUp:h,onMouseEnter:_,title:f,className:j(c.profileRow,A%2===0&&c.profileRowEven,a&&c.profileRowSelected,r&&c.profileRowHovered)},C("td",{className:j(c.indexCell)},l+1),C("td",{className:j(c.nameCell)},g),C("td",{className:j(c.weightCell)},n.formatValue(m)))}function k_(t){t.stopPropagation()}function Qm(t,e,n){let a=[];for(let r=0;r{let i=r.profile.getName().toLowerCase(),l=o.profile.getName().toLowerCase();return n.direction==="ascending"?i.localeCompare(l):l.localeCompare(i)}):n.field==="weight"?Ne(a,r=>n.direction==="ascending"?r.profile.getTotalNonIdleWeight():-r.profile.getTotalNonIdleWeight()):n.field==="index"?Ne(a,r=>n.direction==="ascending"?r.indexInProfileGroup:-r.indexInProfileGroup):Ne(a,r=>-r.score),a}function R_({profiles:t,closeProfileSelect:e,indexToView:n,visible:a,setProfileIndexToView:r}){let o=qi(V()),[i,l]=Ke(""),[s,A]=Ke({field:"index",direction:"ascending"}),c=K(Q=>{let w=Q.target.value;l(w)},[l]),h=K(Q=>{Q&&(a?Q.select():Q.blur())},[a]),_=K((Q,w)=>{w.preventDefault(),w.stopPropagation(),s.field===Q?A({field:Q,direction:s.direction==="ascending"?"descending":"ascending"}):A({field:Q,direction:Q==="name"||Q==="index"?"ascending":"descending"})},[s,A]),f=re(()=>Qm(t,i,s),[t,i,s]),[m,u]=Ke(0),g=ln(null);Xe(()=>{a&&(u(null),g.current!==null&&g.current.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}))},[a]);let p=K(Q=>{Q.stopPropagation();let w=null;switch(Q.key){case"Enter":{m!=null&&(e(),r(m));break}case"Escape":{e();break}case"ArrowDown":{if(Q.preventDefault(),w=0,m!=null){let N=f.findIndex(te=>te.indexInProfileGroup===m);N!==-1&&(w=N+1)}break}case"ArrowUp":{if(Q.preventDefault(),w=f.length-1,m!=null){let N=f.findIndex(te=>te.indexInProfileGroup===m);N!==-1&&(w=N-1)}break}}if(w!=null&&w>=0&&w{f.length>0&&(u(f[0].indexInProfileGroup),y(!0))},[u,f]);let B=K(Q=>{I&&Q&&(Q.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}),y(!1))},[I,y]),E=K(Q=>{g.current=Q,B(Q)},[g,B]),b=K(Q=>_("name",Q),[_]),D=K(Q=>_("weight",Q),[_]),T=K(Q=>_("index",Q),[_]);return C("div",{className:j(o.profileSelectOuter)},C("div",{className:j(o.caret)}),C("div",{className:j(o.profileSelectBox)},C("div",{className:j(o.filterInputContainer)},C("input",{type:"text",className:j(o.filterInput),ref:h,placeholder:"Filter...",value:i,onInput:c,onKeyDown:p,onKeyUp:k_,onKeyPress:k_})),C("div",{className:j(o.profileSelectScrolling)},C("table",{className:j(o.tableView)},C("thead",{className:j(o.tableHeader)},C("tr",null,C("th",{className:j(o.indexHeaderCell),onClick:T},C(Wi,{activeDirection:s.field==="index"?s.direction:null}),"#"),C("th",{className:j(o.nameHeaderCell),onClick:b},C(Wi,{activeDirection:s.field==="name"?s.direction:null}),"Name"),C("th",{className:j(o.weightHeaderCell),onClick:D},C(Wi,{activeDirection:s.field==="weight"?s.direction:null}),"Total Weight"))),C("tbody",null,f.map(({profile:Q,matchedRanges:w,indexInProfileGroup:N},te)=>{let rt,at=N===n,pt=N===m;return at&&pt?rt=E:at?rt=g:pt&&(rt=B),C(jm,{key:te,setHoveredProfileIndex:u,indexInProfileGroup:N,indexInFilteredListView:te,hovered:N==m,selected:N===n,profile:Q,nodeRef:rt,matchedRanges:w,setProfileIndexToView:r,closeProfileSelect:e})}),f.length===0?C("tr",null,C("td",{colSpan:3,className:j(o.noResultsRow)},'No results match filter "',i,'"')):null)))))}var D_=10,qi=pe(t=>ge.create({filterInputContainer:{display:"flex",flexDirection:"column",padding:5,alignItems:"stretch"},filterInput:{color:t.altFgPrimaryColor,background:t.altBgSecondaryColor,borderRadius:5,padding:5,border:"none",":focus":{outline:"none"},"::selection":{color:t.altFgPrimaryColor,background:t.selectionPrimaryColor}},caret:{width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:"5px solid black"},highlighted:{background:t.selectionSecondaryColor},padding:{height:D_,background:t.altBgPrimaryColor},tableView:{width:"100%",fontSize:10,background:t.altBgPrimaryColor,borderCollapse:"collapse"},tableHeader:{borderBottom:`2px solid ${t.altBgSecondaryColor}`,textAlign:"left",color:t.altFgPrimaryColor,userSelect:"none"},indexHeaderCell:{cursor:"pointer",padding:"8px 10px",textAlign:"right",fontWeight:"bold",width:"20px"},nameHeaderCell:{cursor:"pointer",padding:"8px 10px",textAlign:"left",fontWeight:"bold"},weightHeaderCell:{cursor:"pointer",padding:"8px 10px",textAlign:"right",fontWeight:"bold",width:"150px"},sortIcon:{position:"relative",top:1,marginRight:4},profileRow:{height:18,background:t.altBgPrimaryColor,cursor:"pointer",":hover":{background:t.altBgSecondaryColor}},profileRowHovered:{background:t.altBgSecondaryColor},profileRowSelected:{background:t.selectionPrimaryColor,color:t.altFgPrimaryColor},profileRowEven:{background:t.altBgSecondaryColor},indexCell:{padding:"4px 10px",textAlign:"right",whiteSpace:"nowrap",width:"20px",fontFamily:"monospace",color:t.altFgSecondaryColor},nameCell:{padding:"4px 10px",textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"300px"},weightCell:{padding:"4px 10px",textAlign:"right",whiteSpace:"nowrap",width:"150px",fontFamily:"monospace"},noResultsRow:{padding:"20px",textAlign:"center",color:t.altFgSecondaryColor,fontStyle:"italic"},profileSelectScrolling:{maxHeight:`min(calc(100vh - ${20-2*D_}px), ${20*20}px)`,overflow:"auto","::-webkit-scrollbar":{background:t.altBgPrimaryColor},"::-webkit-scrollbar-thumb":{background:t.altFgSecondaryColor,borderRadius:20,border:`3px solid ${t.altBgPrimaryColor}`,":hover":{background:t.altBgPrimaryColor}}},profileSelectBox:{width:"100%",paddingBottom:10,background:t.altBgPrimaryColor,color:t.altFgPrimaryColor},profileSelectOuter:{width:"100%",maxWidth:600,margin:"0 auto",position:"relative",zIndex:1,alignItems:"center",display:"flex",flexDirection:"column"},profileIndex:{textAlign:"right",display:"inline-block",color:t.altFgSecondaryColor},profileIndexSelected:{color:t.altFgPrimaryColor}}));W();function $i(t,e){return K(()=>t(e),[t,e])}function bm(t){let e=fo(V()),n=$i(An.set,0),a=$i(An.set,1),r=$i(An.set,2);return t.activeProfileState?C("div",{className:j(e.toolbarLeft)},C("div",{className:j(e.toolbarTab,t.viewMode===0&&e.toolbarTabActive),onClick:n},C("span",{className:j(e.emoji)},"\u{1F570}"),"Time Order"),C("div",{className:j(e.toolbarTab,t.viewMode===1&&e.toolbarTabActive),onClick:a},C("span",{className:j(e.emoji)},"\u2B05\uFE0F"),"Left Heavy"),C("div",{className:j(e.toolbarTab,t.viewMode===2&&e.toolbarTabActive),onClick:r},C("span",{className:j(e.emoji)},"\u{1F96A}"),"Sandwich")):null}var xm=(()=>{let t=null;return e=>{let n=e?.profiles.map(a=>a.profile)||null;return(t===null||n!=null&&!Ir(t,n))&&(t=n),t}})();function Sm(t){let e=fo(V()),{activeProfileState:n,profileGroup:a}=t,r=xm(a),[o,i]=Ke(!1),l=K(()=>{i(!0)},[i]),s=K(()=>{i(!1)},[i]);return Xe(()=>{let A=c=>{c.key==="t"&&(c.preventDefault(),i(!0))};return window.addEventListener("keypress",A),()=>{window.removeEventListener("keypress",A)}},[i]),Xe(()=>{let A=c=>{c.key==="t"&&(c.preventDefault(),i(!0))};return window.addEventListener("keypress",A),()=>{window.removeEventListener("keypress",A)}},[i]),n&&a&&r?a.profiles.length===1?C(ot,null,n.profile.getName()):C("div",{className:j(e.toolbarCenter),onMouseLeave:s},C("span",{onMouseOver:l},n.profile.getName()," ",C("span",{className:j(e.toolbarProfileIndex)},"(",n.index+1,"/",a.profiles.length,")")),C("div",{style:{display:o?"block":"none"}},C(R_,{setProfileIndexToView:t.setProfileIndexToView,indexToView:a.indexToView,profiles:r,closeProfileSelect:s,visible:o}))):C(ot,null,"\u{1F52C}speedscope")}function Nm(t){let e=fo(V()),n=q(yn),a=C("div",{className:j(e.toolbarTab),onClick:t.saveFile},C("span",{className:j(e.emoji)},"\u2934\uFE0F"),"Export"),r=C("div",{className:j(e.toolbarTab),onClick:t.browseForFile},C("span",{className:j(e.emoji)},"\u2935\uFE0F"),"Import"),o=C("div",{className:j(e.toolbarTab),onClick:yn.cycleToNextColorScheme},C("span",{className:j(e.emoji)},"\u{1F3A8}"),C("span",{className:j(e.toolbarTabColorSchemeToggle)},ws(n))),i=C("div",{className:j(e.toolbarTab)},C("a",{href:"https://github.com/jlfwong/speedscope#usage",className:j(e.noLinkStyle),target:"_blank"},C("span",{className:j(e.emoji)},"\u2753"),"Help"));return C("div",{className:j(e.toolbarRight)},t.activeProfileState&&a,r,o,i)}function F_(t){let e=fo(V());return C("div",{className:j(e.toolbar)},C(bm,{...t}),C(Sm,{...t}),C(Nm,{...t}))}var fo=pe(t=>ge.create({toolbar:{height:20,flexShrink:0,background:t.altBgPrimaryColor,color:t.altFgPrimaryColor,textAlign:"center",fontFamily:'"Source Code Pro", Courier, monospace',fontSize:12,lineHeight:"18px",userSelect:"none"},toolbarLeft:{position:"absolute",height:20,overflow:"hidden",top:0,left:0,marginRight:2,textAlign:"left"},toolbarCenter:{paddingTop:1,height:20},toolbarRight:{height:20,overflow:"hidden",position:"absolute",top:0,right:0,marginRight:2,textAlign:"right"},toolbarProfileIndex:{color:t.altFgSecondaryColor},toolbarTab:{background:t.altBgSecondaryColor,marginTop:2,height:18,lineHeight:"18px",paddingLeft:2,paddingRight:8,display:"inline-block",marginLeft:2,transition:"all 0.07s ease-in",":hover":{background:t.selectionSecondaryColor}},toolbarTabActive:{background:t.selectionPrimaryColor,":hover":{background:t.selectionPrimaryColor}},toolbarTabColorSchemeToggle:{display:"inline-block",textAlign:"center",minWidth:"50px"},emoji:{display:"inline-block",verticalAlign:"middle",paddingTop:"0px",marginRight:"0.3em"},noLinkStyle:{textDecoration:"none",color:"inherit"}}));W();var $m=Promise.resolve().then(()=>_e(_l())),Zm=!1;async function oh(t,e){let n=await $m,a=null,r=null;try{r=JSON.parse(t),a=new n.default.SourceMapConsumer(r)}catch{return null}let o=[];a.eachMapping(function(l){o.push({...l,generatedColumn:l.generatedColumn+1,originalColumn:l.originalColumn+1})},{},n.default.SourceMapConsumer.GENERATED_ORDER);let i=e.replace(/\.[^/]*$/,"");return l=>{let s=!1;if((r?.file&&r?.file===l.file||("/"+l.file?.replace(/\.[^/]*$/,"")).endsWith("/"+i))&&(s=!0),!s||l.line==null||l.col==null)return null;let A=zA(o,_=>_.generatedLine>l.line?!0:_.generatedLine=l.col);if(A===-1)A=o.length-1;else{if(A===0)return null;A--}let c=o[A],h={};if(c.name!=null)h.name=c.name;else if(c.source!=null){let _=a?.sourceContentFor(c.source,!0);if(_){let m=_.split(` -`)[c.originalLine-1];if(m){let u=/\w+/.exec(m.substr(c.originalColumn-1));u&&(h.name=u[0])}}}switch(h.name){case"constructor":{h.name=l.name+" constructor";break}case"function":{h.name=l.name;break}case"const":case"export":{h.name=l.name;break}}return h.name&&l.name.includes(h.name)&&(h.name=l.name),c.source!=null&&(h.file=c.source,h.line=c.originalLine,h.col=c.originalColumn),Zm&&(console.groupCollapsed(`Remapping "${l.name}" -> "${h.name}"`),console.log("before",{...l}),console.log("item @ index",c),console.log("item @ index + 1",o[A+1]),console.log("after",h),console.groupEnd()),h}}W();var ih=({items:t,axis:e,renderItems:n,className:a,initialIndexInView:r})=>{let[o,i]=Ke(null),[l,s]=Ke(0),A=ln(null),c=e==="x"?"width":"height",h=e==="x"?"left":"top",_=e==="x"?"scrollLeft":"scrollTop",f=r?t.reduce((E,b,D)=>D{E?requestAnimationFrame(()=>{i(E.getBoundingClientRect()[c]),m.current!=null&&(E.scrollTo({[h]:m.current}),m.current=null)}):i(null),A.current=E},[i,c,h]),g=re(()=>{if(A.current==null||o==null||l==null)return null;let E=l-o/4,b=l+o+o/4,D=0,T=0,Q=0;for(;Q=E)break}let w=Q;for(;Q=b)break}let N=Math.min(Q,t.length-1);return{firstVisibleIndex:w,lastVisibleIndex:N,invisiblePrefixSize:T}},[o,l,t]),p=re(()=>t.reduce((E,b)=>E+b.size,0),[t]),I=K(()=>{A.current!=null&&s(A.current[_])},[_]);Xe(()=>{let E=()=>{A.current!=null&&i(A.current.getBoundingClientRect()[c])};return window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)}},[c]);let y=re(()=>g?n(g.firstVisibleIndex,g.lastVisibleIndex):null,[n,g]),B=re(()=>C("div",{style:{height:p}},C("div",{style:{transform:`translateY(${g?.invisiblePrefixSize||0}px)`}},y)),[g,y,p]);return C("div",{className:a,ref:u,onScroll:I},B)};function lh(t){let e=vo(V());return C("div",{className:j(e.hBarDisplay)},C("div",{className:j(e.hBarDisplayFilled),style:{width:`${t.perc}%`}}))}function hl(t){let e=V(),n=vo(e),{activeDirection:a}=t,r=a===0?e.fgPrimaryColor:e.fgSecondaryColor,o=a===1?e.fgPrimaryColor:e.fgSecondaryColor;return C("svg",{width:"8",height:"10",viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:j(n.sortIcon)},C("path",{d:"M0 4L4 0L8 4H0Z",fill:r}),C("path",{d:"M0 4L4 0L8 4H0Z",transform:"translate(0 10) scale(1 -1)",fill:o}))}function tI(t,e,n){let a=[],r=0;for(let o of e)a.push(t.slice(r,o[0])),a.push(C("span",{className:n},t.slice(o[0],o[1]))),r=o[1];return a.push(t.slice(r)),C("span",null,a)}var nI=({frame:t,matchedRanges:e,profile:n,index:a,selectedFrame:r,setSelectedFrame:o,getCSSColorForFrame:i})=>{let l=vo(V()),s=t.getTotalWeight(),A=t.getSelfWeight(),c=100*s/n.getTotalNonIdleWeight(),h=100*A/n.getTotalNonIdleWeight(),_=t===r;return C("tr",{key:`${a}`,onClick:o.bind(null,t),className:j(l.tableRow,a%2==0&&l.tableRowEven,_&&l.tableRowSelected)},C("td",{className:j(l.numericCell)},n.formatValue(s)," (",bt(c),")",C(lh,{perc:c})),C("td",{className:j(l.numericCell)},n.formatValue(A)," (",bt(h),")",C(lh,{perc:h})),C("td",{title:t.file,className:j(l.textCell)},C(ho,{color:i(t)}),e?tI(t.name,e,j(l.matched,_&&l.matchedSelected)):t.name))},rI=fe(({profile:t,sortMethod:e,setSortMethod:n,selectedFrame:a,setSelectedFrame:r,getCSSColorForFrame:o,searchQuery:i,searchIsActive:l})=>{let s=vo(V()),A=K((g,p)=>{if(p.preventDefault(),e.field==g)n({field:g,direction:e.direction===0?1:0});else switch(g){case 0:{n({field:g,direction:0});break}case 1:{n({field:g,direction:1});break}case 2:{n({field:g,direction:1});break}}},[e,n]),c=lt(Dr),h=K((g,p)=>{if(!c)return null;let I=[];for(let y=g;y<=p;y++){let B=c.rowList[y],E=c.getSearchMatchForFrame(B);I.push(nI({frame:B,matchedRanges:E??null,index:y,profile:t,selectedFrame:a,setSelectedFrame:r,getCSSColorForFrame:o}))}return I.length===0&&(l?I.push(C("tr",null,C("td",{className:j(s.emptyState)},'No symbol names match query "',i,'".'))):I.push(C("tr",null,C("td",{className:j(s.emptyState)},"No symbols found.")))),C("table",{className:j(s.tableView)},I)},[c,t,a,r,o,l,i,s.emptyState,s.tableView]),_=re(()=>c==null?[]:c.rowList.map(g=>({size:20})),[c]),f=K(g=>A(2,g),[A]),m=K(g=>A(1,g),[A]),u=K(g=>A(0,g),[A]);return C("div",{className:j(Ee.vbox,s.profileTableView)},C("table",{className:j(s.tableView)},C("thead",{className:j(s.tableHeader)},C("tr",null,C("th",{className:j(s.numericCell),onClick:f},C(hl,{activeDirection:e.field===2?e.direction:null}),"Total"),C("th",{className:j(s.numericCell),onClick:m},C(hl,{activeDirection:e.field===1?e.direction:null}),"Self"),C("th",{className:j(s.textCell),onClick:u},C(hl,{activeDirection:e.field===0?e.direction:null}),"Symbol Name")))),C(ih,{axis:"y",items:_,className:j(s.scrollView),renderItems:h,initialIndexInView:a==null?null:c?.getIndexForFrame(a)}))}),vo=pe(t=>ge.create({profileTableView:{background:t.bgPrimaryColor,height:"100%"},scrollView:{overflowY:"auto",overflowX:"hidden",flexGrow:1,"::-webkit-scrollbar":{background:t.bgPrimaryColor},"::-webkit-scrollbar-thumb":{background:t.fgSecondaryColor,borderRadius:20,border:`3px solid ${t.bgPrimaryColor}`,":hover":{background:t.fgPrimaryColor}}},tableView:{width:"100%",fontSize:10,background:t.bgPrimaryColor},tableHeader:{borderBottom:`2px solid ${t.bgSecondaryColor}`,textAlign:"left",color:t.fgPrimaryColor,userSelect:"none"},sortIcon:{position:"relative",top:1,marginRight:20/4},tableRow:{background:t.bgPrimaryColor,height:20},tableRowEven:{background:t.bgSecondaryColor},tableRowSelected:{background:t.selectionPrimaryColor,color:t.altFgPrimaryColor},numericCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",position:"relative",textAlign:"right",paddingRight:20,width:6*20,minWidth:6*20},textCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:"100%",maxWidth:0},hBarDisplay:{position:"absolute",background:ue.fromCSSHex(t.weightColor).withAlpha(.2).toCSS(),bottom:2,height:2,width:`calc(100% - ${2*20}px)`,right:20},hBarDisplayFilled:{height:"100%",position:"absolute",background:t.weightColor,right:0},matched:{borderBottom:`2px solid ${t.fgPrimaryColor}`},matchedSelected:{borderColor:t.altFgPrimaryColor},emptyState:{textAlign:"center",fontWeight:"bold"}})),Ah=fe(t=>{let{activeProfileState:e}=t,{profile:n,sandwichViewState:a}=e;if(!n)throw new Error("profile missing");let r=q(Br),o=V(),{callerCallee:i}=a,l=i?i.selectedFrame:null,s=Ot(n),A=Kt({theme:o,frameToColorBucket:s}),c=K(f=>{Te.setSelectedFrame(f)},[]),h=q(Pn),_=q(On);return C(rI,{profile:n,selectedFrame:l,getCSSColorForFrame:A,sortMethod:r,setSelectedFrame:c,setSortMethod:Br.set,searchIsActive:h,searchQuery:_})});W();W();var nr=class extends Ct{constructor(){super(...arguments);this.setConfigSpaceViewportRect=n=>{this.props.setConfigSpaceViewportRect(this.clampViewportToFlamegraph(n))};this.setLogicalSpaceViewportSize=n=>{this.props.setLogicalSpaceViewportSize(n)};this.transformViewport=n=>{this.setConfigSpaceViewportRect(n.transformRect(this.props.configSpaceViewportRect))};this.container=null;this.containerRef=n=>{this.container=n||null};this.setNodeHover=n=>{this.props.setNodeHover(n)}}clampViewportToFlamegraph(n){let{flamechart:a,renderInverted:r}=this.props;return a.getClampedConfigSpaceViewportRect({configSpaceViewportRect:n,renderInverted:r})}formatValue(n){let a=this.props.flamechart.getTotalWeight(),r=100*n/a,o=bt(r);return`${this.props.flamechart.formatValue(n)} (${o})`}renderTooltip(){if(!this.container)return null;let{hover:n}=this.props;if(!n)return null;let{width:a,height:r,left:o,top:i}=this.container.getBoundingClientRect(),l=new v(n.event.clientX-o,n.event.clientY-i),s=aI(this.props.theme),A=n.node.frame;return C(uo,{containerSize:new v(a,r),offset:l},C("span",{className:j(s.hoverCount)},this.formatValue(n.node.getTotalWeight()))," ",A.name,A.file?C("div",null,A.file,":",A.line):void 0)}render(){return C("div",{className:j(Ee.fillY,Ee.fillX,Ee.vbox),ref:this.containerRef},C(Yn,{theme:this.props.theme,selectedNode:null,onNodeHover:this.setNodeHover,onNodeSelect:Jn,configSpaceViewportRect:this.props.configSpaceViewportRect,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect,transformViewport:this.transformViewport,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,canvasContext:this.props.canvasContext,renderInverted:this.props.renderInverted,logicalSpaceViewportSize:this.props.logicalSpaceViewportSize,setLogicalSpaceViewportSize:this.setLogicalSpaceViewportSize,searchResults:null}),this.renderTooltip())}},aI=pe(t=>ge.create({hoverCount:{color:t.weightColor}}));var oI=Ge(({profile:t,frame:e,flattenRecursion:n})=>{let a=t.getInvertedProfileForCallersOf(e);return n?a.getProfileWithRecursionFlattened():a}),iI=Ge(({invertedCallerProfile:t,getColorBucketForFrame:e})=>new Wt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),lI=qn({inverted:!0}),sh=fe(t=>{let{activeProfileState:e}=t,{profile:n,sandwichViewState:a}=e,r=q(Gt),o=q(In),i=V();if(!n)throw new Error("profile missing");if(!o)throw new Error("glCanvas missing");let{callerCallee:l}=a;if(!l)throw new Error("callerCallee missing");let{selectedFrame:s}=l,A=Ot(n),c=on(A),h=Kt({theme:i,frameToColorBucket:A}),_=Pt({theme:i,canvas:o}),f=iI({invertedCallerProfile:oI({profile:n,frame:s,flattenRecursion:r}),getColorBucketForFrame:c}),m=lI({canvasContext:_,flamechart:f});return C(nr,{theme:i,renderInverted:!0,flamechart:f,flamechartRenderer:m,canvasContext:_,getCSSColorForFrame:h,...Wn("SANDWICH_INVERTED_CALLERS"),...l.invertedCallerFlamegraph,setSelectedNode:Jn})});W();var AI=Ge(({profile:t,frame:e,flattenRecursion:n})=>{let a=t.getProfileForCalleesOf(e);return n?a.getProfileWithRecursionFlattened():a}),sI=Ge(({calleeProfile:t,getColorBucketForFrame:e})=>new Wt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),cI=qn(),ch=fe(t=>{let{activeProfileState:e}=t,{profile:n,sandwichViewState:a}=e,r=q(Gt),o=q(In),i=V();if(!n)throw new Error("profile missing");if(!o)throw new Error("glCanvas missing");let{callerCallee:l}=a;if(!l)throw new Error("callerCallee missing");let{selectedFrame:s}=l,A=Ot(n),c=on(A),h=Kt({theme:i,frameToColorBucket:A}),_=Pt({theme:i,canvas:o}),f=sI({calleeProfile:AI({profile:n,frame:s,flattenRecursion:r}),getColorBucketForFrame:c}),m=cI({canvasContext:_,flamechart:f});return C(nr,{theme:i,renderInverted:!1,flamechart:f,flamechartRenderer:m,canvasContext:_,getCSSColorForFrame:h,...Wn("SANDWICH_CALLEES"),...l.calleeFlamegraph,setSelectedNode:Jn})});var _h=fe(()=>{let t=lt(Dr),e=t!=null?t.rowList:null,n=t?.selectedFrame!=null?t.getIndexForFrame(t.selectedFrame):null,a=e!=null?e.length:null,{selectPrev:r,selectNext:o}=re(()=>e==null||a==null||a===0||t==null?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{let i=n==null?a-1:n-1;i<0&&(i=a-1),t.setSelectedFrame(e[i])},selectNext:()=>{let i=n==null?0:n+1;i>=a&&(i=0),t.setSelectedFrame(e[i])}},[n,e,a,t]);return C(ro,{resultIndex:n,numResults:a,selectPrev:r,selectNext:o})});W();var gl=class extends Ct{constructor(){super(...arguments);this.setSelectedFrame=n=>{this.props.setSelectedFrame(n)};this.onWindowKeyPress=n=>{n.key==="Escape"&&this.setSelectedFrame(null)}}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyPress)}render(){let n=_I(this.props.theme),{selectedFrame:a}=this.props,r=null;return a&&(r=C("div",{className:j(Ee.fillY,n.callersAndCallees,Ee.vbox)},C("div",{className:j(Ee.hbox,n.panZoomViewWraper)},C("div",{className:j(n.flamechartLabelParent)},C("div",{className:j(n.flamechartLabel)},"Callers")),C(sh,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})),C("div",{className:j(n.divider)}),C("div",{className:j(Ee.hbox,n.panZoomViewWraper)},C("div",{className:j(n.flamechartLabelParent,n.flamechartLabelParentBottom)},C("div",{className:j(n.flamechartLabel,n.flamechartLabelBottom)},"Callees")),C(ch,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})))),C("div",{className:j(Ee.hbox,Ee.fillY)},C("div",{className:j(n.tableView)},C(Ah,{activeProfileState:this.props.activeProfileState}),C(_h,null)),r)}},_I=pe(t=>ge.create({tableView:{position:"relative",flex:1},panZoomViewWraper:{flex:1},flamechartLabelParent:{display:"flex",flexDirection:"column",justifyContent:"flex-end",alignItems:"flex-start",fontSize:12,width:12*1.2,borderRight:`1px solid ${t.fgSecondaryColor}`},flamechartLabelParentBottom:{justifyContent:"flex-start"},flamechartLabel:{transform:"rotate(-90deg)",transformOrigin:"50% 50% 0",width:12*1.2,flexShrink:1},flamechartLabelBottom:{transform:"rotate(-90deg)",display:"flex",justifyContent:"flex-end"},callersAndCallees:{flex:1,borderLeft:`2px solid ${t.fgSecondaryColor}`},divider:{height:2,background:t.fgSecondaryColor}})),Dr=Qt(null),hh=fe(t=>{let{activeProfileState:e,glCanvas:n}=t,{sandwichViewState:a,index:r}=e,{callerCallee:o}=a,i=V(),l=K(g=>{Te.setSelectedFrame(g)},[]),s=e.profile,A=q(Br),c=lt(En),h=o?o.selectedFrame:null,_=re(()=>{let g=[];switch(s.forEachFrame(p=>{c&&!c.getMatchForFrame(p)||g.push(p)}),A.field){case 0:{Ne(g,p=>p.name.toLowerCase());break}case 1:{Ne(g,p=>p.getSelfWeight());break}case 2:{Ne(g,p=>p.getTotalWeight());break}}return A.direction===1&&g.reverse(),g},[s,c,A]),f=re(()=>{let g=new Map;for(let p=0;p<_.length;p++)g.set(_[p],p);return p=>{let I=g.get(p);return I??null}},[_]),m=re(()=>g=>c==null?null:c.getMatchForFrame(g),[c]),u={rowList:_,selectedFrame:h,setSelectedFrame:l,getIndexForFrame:f,getSearchMatchForFrame:m};return C(Dr.Provider,{value:u},C(gl,{theme:i,activeProfileState:e,glCanvas:n,setSelectedFrame:l,selectedFrame:h,profileIndex:r}))});var ur=Promise.resolve().then(()=>(ef(),Xu));ur.then(()=>{});Promise.resolve().then(()=>(Li(),Fi)).then(()=>{});Promise.resolve().then(()=>_e(_l())).then(()=>{});async function nf(t,e){return(await ur).importProfileGroupFromText(t,e)}async function cE(t,e){return(await ur).importProfileGroupFromBase64(t,e)}async function _E(t,e){return(await ur).importProfilesFromArrayBuffer(t,e)}async function hE(t){return(await ur).importProfilesFromFile(t)}async function gE(t){return(await ur).importFromFileSystemDirectoryEntry(t)}var dE=tf();function uE(t){return t!=null&&t.isDirectory}var wA=class extends Ct{constructor(){super(...arguments);this.canvas=null;this.ref=n=>{n instanceof HTMLCanvasElement?this.canvas=n:this.canvas=null,this.props.setGLCanvas(this.canvas)};this.container=null;this.containerRef=n=>{n instanceof HTMLElement?this.container=n:this.container=null};this.maybeResize=()=>{if(!this.container||!this.props.canvasContext)return;let{width:n,height:a}=this.container.getBoundingClientRect(),r=n,o=a,i=n*window.devicePixelRatio,l=a*window.devicePixelRatio;this.props.canvasContext.gl.resize(i,l,r,o)};this.onWindowResize=()=>{this.props.canvasContext&&this.props.canvasContext.requestFrame()}}componentWillReceiveProps(n){this.props.canvasContext!==n.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),n.canvasContext&&(n.canvasContext.addBeforeFrameHandler(this.maybeResize),n.canvasContext.requestFrame()))}componentDidMount(){window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),window.removeEventListener("resize",this.onWindowResize)}render(){let n=rf(this.props.theme);return C("div",{ref:this.containerRef,className:j(n.glCanvasView)},C("canvas",{ref:this.ref,width:1,height:1}))}},Zo=class extends Ct{constructor(){super(...arguments);this.loadExample=()=>{this.loadProfile(async()=>{let n="perf-vertx-stacks-01-collapsed-all.txt",a=await fetch(dE).then(r=>r.text());return await nf(n,a)})};this.onDrop=n=>{if(this.props.setDragActive(!1),n.preventDefault(),!n.dataTransfer)return;let a=n.dataTransfer.items[0];if("webkitGetAsEntry"in a){let o=a.webkitGetAsEntry();if(o&&uE(o)&&o.name.endsWith(".trace")){console.log("Importing as Instruments.app .trace file");let i=o;this.loadProfile(async()=>await gE(i));return}}let r=n.dataTransfer.files.item(0);r&&this.loadFromFile(r)};this.onDragOver=n=>{this.props.setDragActive(!0),n.preventDefault()};this.onDragLeave=n=>{this.props.setDragActive(!1),n.preventDefault()};this.onWindowKeyPress=async n=>{if(n.key==="1")this.props.setViewMode(0);else if(n.key==="2")this.props.setViewMode(1);else if(n.key==="3")this.props.setViewMode(2);else if(n.key==="r"){let{flattenRecursion:a}=this.props;this.props.setFlattenRecursion(!a)}else if(n.key==="n"){let{activeProfileState:a}=this.props;a&&this.props.setProfileIndexToView(a.index+1)}else if(n.key==="p"){let{activeProfileState:a}=this.props;a&&this.props.setProfileIndexToView(a.index-1)}};this.saveFile=()=>{if(this.props.profileGroup){let{name:n,indexToView:a,profiles:r}=this.props.profileGroup,o={name:n,indexToView:a,profiles:r.map(i=>i.profile)};u_(o)}};this.browseForFile=()=>{let n=document.createElement("input");n.type="file",n.addEventListener("change",this.onFileSelect),n.click()};this.onWindowKeyDown=async n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)?(n.preventDefault(),this.saveFile()):n.key==="o"&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),this.browseForFile())};this.onDocumentPaste=n=>{if(document.activeElement!=null&&document.activeElement.nodeName==="INPUT")return;n.preventDefault(),n.stopPropagation();let a=n.clipboardData;if(!a)return;let r=a.getData("text");this.loadProfile(async()=>await nf("From Clipboard",r))};this.onFileSelect=n=>{let a=n.target.files.item(0);a&&this.loadFromFile(a)}}async loadProfile(n){if(this.props.setError(!1),this.props.setLoading(!0),await new Promise(r=>setTimeout(r,0)),!this.props.glCanvas)return;console.time("import");let a=null;try{a=await n()}catch(r){console.log("Failed to load format",r),this.props.setError(!0);return}if(a==null){alert("Unrecognized format! See documentation about supported formats."),this.props.setLoading(!1);return}else if(a.profiles.length===0){alert("Successfully imported profile, but it's empty!"),this.props.setLoading(!1);return}this.props.hashParams.title&&(a={...a,name:this.props.hashParams.title}),document.title=`${a.name} - speedscope`,this.props.hashParams.viewMode&&this.props.setViewMode(this.props.hashParams.viewMode);for(let r of a.profiles)await r.demangle();for(let r of a.profiles){let o=this.props.hashParams.title||r.getName();r.setName(o)}console.timeEnd("import"),this.props.setProfileGroup(a),this.props.setLoading(!1)}getStyle(){return rf(this.props.theme)}loadFromFile(n){this.loadProfile(async()=>{let a=await hE(n);if(a){for(let r of a.profiles)r.getName()||r.setName(n.name);return a}if(this.props.profileGroup&&this.props.activeProfileState){let r=new FileReader,o=new Promise(c=>{r.addEventListener("loadend",()=>{if(typeof r.result!="string")throw new Error("Expected reader.result to be a string");c(r.result)})});r.readAsText(n);let i=await o,l=null,s=l_(i);s&&(console.log("Importing as emscripten symbol map"),l=s);let A=await oh(i,n.name);if(!l&&A&&(console.log("Importing as JavaScript source map"),l=A),l!=null)return{name:this.props.profileGroup.name||"profile",indexToView:this.props.profileGroup.indexToView,profiles:this.props.profileGroup.profiles.map(c=>{let h=c.profile.shallowClone();return h.remapSymbols(l),h})}}return null})}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyDown),window.addEventListener("keypress",this.onWindowKeyPress),document.addEventListener("paste",this.onDocumentPaste),this.maybeLoadHashParamProfile()}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyDown),window.removeEventListener("keypress",this.onWindowKeyPress),document.removeEventListener("paste",this.onDocumentPaste)}async maybeLoadHashParamProfile(){let{profileURL:n}=this.props.hashParams;if(n){if(!Qa){alert(`Cannot load a profile URL when loading from "${window.location.protocol}" URL protocol`);return}this.loadProfile(async()=>{let a=await fetch(n),r=new URL(n,window.location.href).pathname;return r.includes("/")&&(r=r.slice(r.lastIndexOf("/")+1)),await _E(r,await a.arrayBuffer())})}else if(this.props.hashParams.localProfilePath){window.speedscope={loadFileFromBase64:(r,o)=>{this.loadProfile(()=>cE(r,o))}};let a=document.createElement("script");a.src=`file:///${this.props.hashParams.localProfilePath}`,document.head.appendChild(a)}}renderLanding(){let n=this.getStyle();return C("div",{className:j(n.landingContainer)},C("div",{className:j(n.landingMessage)},C("p",{className:j(n.landingP)},"\u{1F44B} Hi there! Welcome to \u{1F52C}speedscope, an interactive"," ",C("a",{className:j(n.link),href:"http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html"},"flamegraph")," ","visualizer. Use it to help you make your software faster."),Qa?C("p",{className:j(n.landingP)},"Drag and drop a profile file onto this window to get started, click the big blue button below to browse for a profile to explore, or"," ",C("a",{tabIndex:0,className:j(n.link),onClick:this.loadExample},"click here")," ","to load an example profile."):C("p",{className:j(n.landingP)},"Drag and drop a profile file onto this window to get started, or click the big blue button below to browse for a profile to explore."),C("div",{className:j(n.browseButtonContainer)},C("input",{type:"file",name:"file",id:"file",onChange:this.onFileSelect,className:j(n.hide)}),C("label",{for:"file",className:j(n.browseButton),tabIndex:0},"Browse")),C("p",{className:j(n.landingP)},"See the"," ",C("a",{className:j(n.link),href:"https://github.com/jlfwong/speedscope#usage",target:"_blank"},"documentation")," ","for information about supported file formats, keyboard shortcuts, and how to navigate around the profile."),C("p",{className:j(n.landingP)},"speedscope is open source. Please"," ",C("a",{className:j(n.link),target:"_blank",href:"https://github.com/jlfwong/speedscope/issues"},"report any issues on GitHub"),".")))}renderError(){let n=this.getStyle();return C("div",{className:j(n.error)},C("div",null,"\u{1F63F} Something went wrong."),C("div",null,"Check the JS console for more details."))}renderLoadingBar(){let n=this.getStyle();return C("div",{className:j(n.loading)})}renderContent(){let{viewMode:n,activeProfileState:a,error:r,loading:o,glCanvas:i}=this.props;if(r)return this.renderError();if(o)return this.renderLoadingBar();if(!a||!i)return this.renderLanding();switch(n){case 0:return C(j_,{activeProfileState:a,glCanvas:i});case 1:return C(Q_,{activeProfileState:a,glCanvas:i});case 2:return C(hh,{activeProfileState:a,glCanvas:i})}}render(){let n=this.getStyle();return C("div",{onDrop:this.onDrop,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,className:j(n.root,this.props.dragActive&&n.dragTargetRoot)},C(wA,{setGLCanvas:this.props.setGLCanvas,canvasContext:this.props.canvasContext,theme:this.props.theme}),C(F_,{saveFile:this.saveFile,browseForFile:this.browseForFile,...this.props}),C("div",{className:j(n.contentContainer)},this.renderContent()),this.props.dragActive&&C("div",{className:j(n.dragTarget)}))}},rf=pe(t=>ge.create({glCanvasView:{position:"absolute",width:"100vw",height:"100vh",zIndex:-1,pointerEvents:"none"},error:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},loading:{height:3,marginBottom:-3,background:t.selectionPrimaryColor,transformOrigin:"0% 50%",animationName:[{from:{transform:"scaleX(0)"},to:{transform:"scaleX(1)"}}],animationTimingFunction:"cubic-bezier(0, 1, 0, 1)",animationDuration:"30s"},root:{width:"100vw",height:"100vh",overflow:"hidden",display:"flex",flexDirection:"column",position:"relative",fontFamily:'"Source Code Pro", Courier, monospace',lineHeight:"20px",color:t.fgPrimaryColor},dragTargetRoot:{cursor:"copy"},dragTarget:{boxSizing:"border-box",position:"absolute",top:0,left:0,width:"100%",height:"100%",border:`5px dashed ${t.selectionPrimaryColor}`,pointerEvents:"none"},contentContainer:{position:"relative",display:"flex",overflow:"hidden",flexDirection:"column",flex:1},landingContainer:{display:"flex",alignItems:"center",justifyContent:"center",flex:1},landingMessage:{maxWidth:600},landingP:{marginBottom:16},hide:{display:"none"},browseButtonContainer:{display:"flex",alignItems:"center",justifyContent:"center"},browseButton:{marginBottom:16,height:72,flex:1,maxWidth:256,textAlign:"center",fontSize:36,lineHeight:"72px",background:t.selectionPrimaryColor,color:t.altFgPrimaryColor,transition:"all 0.07s ease-in",":hover":{background:t.selectionSecondaryColor}},link:{color:t.selectionPrimaryColor,cursor:"pointer",textDecoration:"none",transition:"all 0.07s ease-in",":hover":{color:t.selectionSecondaryColor}}}));var af=fe(()=>{let t=q(In),e=V(),n=re(()=>t?Pt({theme:e,canvas:t}):null,[e,t]);return C(o_,null,C(Zo,{activeProfileState:wa(),canvasContext:n,setGLCanvas:In.set,setLoading:Ii.set,setError:yi.set,setProfileGroup:Te.setProfileGroup,setDragActive:mi.set,setViewMode:An.set,setFlattenRecursion:Gt.set,setProfileIndexToView:Te.setProfileIndexToView,profileGroup:q(Te),theme:e,flattenRecursion:q(Gt),viewMode:q(An),hashParams:q(fs),glCanvas:t,dragActive:q(mi),loading:q(Ii),error:q(yi)}))});console.log(`speedscope v${Ti().version}`);oi(C(bs,null,C(af,null)),document.body,document.body.lastElementChild||void 0);})(); -//# sourceMappingURL=speedscope-432XE7GS.js.map diff --git a/apps/trace/speedscope/speedscope-GHPHNKXC.css.map b/apps/trace/speedscope/speedscope-GHPHNKXC.css.map new file mode 100644 index 00000000..7b4ddbc7 --- /dev/null +++ b/apps/trace/speedscope/speedscope-GHPHNKXC.css.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../assets/reset.css", "../../assets/source-code-pro.css"], + "sourcesContent": ["/* http://meyerweb.com/eric/tools/css/reset/\n v2.0 | 20110126\n License: none (public domain)\n*/\nhtml, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\nb, u, i, center,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td,\narticle, aside, canvas, details, embed,\nfigure, figcaption, footer, header, hgroup,\nmenu, nav, output, ruby, section, summary,\ntime, mark, audio, video {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-size: 100%;\n\tfont: inherit;\n\tvertical-align: baseline;\n}\n/* HTML5 display-role reset for older browsers */\narticle, aside, details, figcaption, figure,\nfooter, header, hgroup, menu, nav, section {\n\tdisplay: block;\n}\nbody {\n\tline-height: 1;\n}\nol, ul {\n\tlist-style: none;\n}\nblockquote, q {\n\tquotes: none;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\n\tcontent: '';\n\tcontent: none;\n}\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\n/* Prevent overscrolling */\n/* https://stackoverflow.com/a/17899813 */\nhtml {\n overflow: hidden;\n height: 100%;\n}\nbody {\n height: 100%;\n overflow: auto;\n}", "@font-face{\n\tfont-family: 'Source Code Pro';\n\tfont-weight: 400;\n\tfont-style: normal;\n\tfont-stretch: normal;\n\tsrc: url('./source-code-pro/SourceCodePro-Regular.ttf.woff2') format('woff2');\n}\n"], + "mappings": "AAIA,KAAM,KAAM,IAAK,KAAM,OAAQ,OAAQ,OACvC,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,EAAG,WAAY,IACvC,EAAG,KAAM,QAAS,QAAS,IAAK,KAAM,KACtC,IAAK,IAAK,GAAI,IAAK,IAAK,IAAK,EAAG,EAAG,KACnC,MAAO,OAAQ,OAAQ,IAAK,IAAK,GAAI,IACrC,EAAG,EAAG,EAAG,OACT,GAAI,GAAI,GAAI,GAAI,GAAI,GACpB,SAAU,KAAM,MAAO,OACvB,MAAO,QAAS,MAAO,MAAO,MAAO,GAAI,GAAI,GAC7C,QAAS,MAAO,OAAQ,QAAS,MACjC,OAAQ,WAAY,OAAQ,OAAQ,OACpC,KAAM,IAAK,OAAQ,KAAM,QAAS,QAClC,KAAM,KAAM,MAAO,MAhBnB,OAiBS,EAjBT,QAkBU,EACT,OAAQ,EACR,UAAW,KACX,KAAM,QACN,eAAgB,QACjB,CAEA,QAAS,MAAO,QAAS,WAAY,OACrC,OAAQ,OAAQ,OAAQ,KAAM,IAAK,QAClC,QAAS,KACV,CACA,KACC,YAAa,CACd,CACA,GAAI,GACH,WAAY,IACb,CACA,WAAY,EACX,OAAQ,IACT,CACA,UAAU,QAAS,UAAU,OAC7B,CAAC,QAAS,CAAC,OACV,QAAS,GACT,QAAS,IACV,CACA,MACC,gBAAiB,SACjB,eAAgB,CACjB,CAIA,KACI,SAAU,OACV,OAAQ,IACZ,CACA,KACI,OAAQ,KACR,SAAU,IACd,CCzDA,WACC,YAAa,gBACb,YAAa,IACb,WAAY,OACZ,aAAc,OACd,IAAK,kDAAyD,OAAO,QACtE", + "names": [] +} diff --git a/apps/trace/speedscope/speedscope-Y2522XSH.js b/apps/trace/speedscope/speedscope-Y2522XSH.js new file mode 100644 index 00000000..2211bbef --- /dev/null +++ b/apps/trace/speedscope/speedscope-Y2522XSH.js @@ -0,0 +1,189 @@ +"use strict";(()=>{var Tf=Object.create;var ho=Object.defineProperty;var Hf=Object.getOwnPropertyDescriptor;var Mf=Object.getOwnPropertyNames;var Kf=Object.getPrototypeOf,Jf=Object.prototype.hasOwnProperty;var re=(t,e)=>()=>(t&&(e=t(t=0)),e);var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$l=(t,e)=>{for(var n in e)ho(t,n,{get:e[n],enumerable:!0})},Pf=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Mf(e))!Jf.call(t,r)&&r!==n&&ho(t,r,{get:()=>e[r],enumerable:!(a=Hf(e,r))||a.enumerable});return t};var he=(t,e,n)=>(n=t!=null?Tf(Kf(t)):{},Pf(e||!t||!t.__esModule?ho(n,"default",{value:t,enumerable:!0}):n,t));function Ae(t){return t[t.length-1]||null}function Fe(t,e){function n(a,r){let A=e(a),o=e(r);return Ao?1:0}t.sort(n)}function De(t,e,n){return t.has(e)||t.set(e,n(e)),t.get(e)}function ja(t,e,n){return t.has(e)?t.get(e):n(e)}function et(t,e){if(!t.has(e))throw new Error(`Expected key ${e}`);return t.get(e)}function*os(t,e){for(let n of t)yield e(n)}function is(t,e){for(let n of t)e(n)}function ln(t,e){return new Array(Math.max(e-t.length,0)+1).join("0")+t}function xt(t){let e=`${t.toFixed(0)}%`;return t===100?e="100%":t>99?e=">99%":t<.01?e="<0.01%":t<1?e=`${t.toFixed(2)}%`:t<10&&(e=`${t.toFixed(1)}%`),e}function Vf(t){return t-Math.floor(t)}function va(t){return 2*Math.abs(Vf(t)-.5)-1}function ls(t,e,n,a,r=1){for(console.assert(!isNaN(r)&&!isNaN(a));;){if(e-t<=r)return[t,e];let A=(e+t)/2;n(A){let a;return e==null?(a=t(n),e={args:n,result:a},a):(Qr(e.args,n)||(e.args=n,e.result=t(n)),e.result)}}function qn(t){let e=null;return n=>{let a;return e==null?(a=t(n),e={args:n,result:a},a):(e.args===n||(e.args=n,e.result=t(n)),e.result)}}function Yf(t){let e=null;return()=>(e==null&&(e={result:t()}),e.result)}function cs(t){let e=Wf();if(t.length%4!==0)throw new Error(`Invalid length for base64 encoded string. Expected length % 4 = 0, got length = ${t.length}`);let n=t.length/4,a;t.length>=4&&t.charAt(t.length-1)==="="?t.charAt(t.length-2)==="="?a=n*3-2:a=n*3-1:a=n*3;let r=new Uint8Array(a),A=0;for(let o=0;o>4,s!=="="&&(r[A++]=(_&15)<<4|f>>2),c!=="="&&(r[A++]=(f&7)<<6|m)}if(A!==a)throw new Error(`Expected to decode ${a} bytes, but only decoded ${A})`);return r}var bt,Wf,V=re(()=>{"use strict";bt=class{constructor(){this.map=new Map}getOrInsert(e){let n=e.key,a=this.map.get(n);return a||(this.map.set(n,e),e)}forEach(e){this.map.forEach(e)}[Symbol.iterator](){return this.map.values()}};Wf=Yf(()=>{let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Map;for(let n=0;n{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.default=xp;var Bp=Bn(),Qp=wp(Bp);function wp(t){return t&&t.__esModule?t:{default:t}}var bp=["-webkit-","-moz-",""];function xp(t,e){if(typeof e=="string"&&!(0,Qp.default)(e)&&e.indexOf("calc(")>-1)return bp.map(function(n){return e.replace(/calc\(/g,n+"calc(")})}zs.exports=Ga.default});var Ys=k((Ua,Vs)=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.default=Dp;var kp=Bn(),Sp=Np(kp);function Np(t){return t&&t.__esModule?t:{default:t}}var Fp=["-webkit-",""];function Dp(t,e){if(typeof e=="string"&&!(0,Sp.default)(e)&&e.indexOf("cross-fade(")>-1)return Fp.map(function(n){return e.replace(/cross-fade\(/g,n+"cross-fade(")})}Vs.exports=Ua.default});var Zs=k((Oa,Ws)=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.default=Tp;var Rp=["-webkit-","-moz-",""],Lp={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function Tp(t,e){if(t==="cursor"&&Lp.hasOwnProperty(e))return Rp.map(function(n){return n+e})}Ws.exports=Oa.default});var ec=k((qa,Xs)=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.default=Pp;var Hp=Bn(),Mp=Kp(Hp);function Kp(t){return t&&t.__esModule?t:{default:t}}var Jp=["-webkit-",""];function Pp(t,e){if(typeof e=="string"&&!(0,Mp.default)(e)&&e.indexOf("filter(")>-1)return Jp.map(function(n){return e.replace(/filter\(/g,n+"filter(")})}Xs.exports=qa.default});var rc=k((za,nc)=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.default=Gp;var tc={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function Gp(t,e){if(t==="display"&&tc.hasOwnProperty(e))return tc[e]}nc.exports=za.default});var oc=k(($a,Ac)=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.default=Op;var Up={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},ac={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function Op(t,e,n){ac.hasOwnProperty(t)&&(n[ac[t]]=Up[e]||e)}Ac.exports=$a.default});var sc=k((Va,lc)=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.default=zp;var qp={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},ic={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};function zp(t,e,n){t==="flexDirection"&&typeof e=="string"&&(e.indexOf("column")>-1?n.WebkitBoxOrient="vertical":n.WebkitBoxOrient="horizontal",e.indexOf("reverse")>-1?n.WebkitBoxDirection="reverse":n.WebkitBoxDirection="normal"),ic.hasOwnProperty(t)&&(n[ic[t]]=qp[e]||e)}lc.exports=Va.default});var _c=k((Ya,cc)=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.default=Xp;var $p=Bn(),Vp=Yp($p);function Yp(t){return t&&t.__esModule?t:{default:t}}var Wp=["-webkit-","-moz-",""],Zp=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;function Xp(t,e){if(typeof e=="string"&&!(0,Vp.default)(e)&&Zp.test(e))return Wp.map(function(n){return n+e})}cc.exports=Ya.default});var gc=k((Wa,hc)=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.default=aC;var eC=Bn(),tC=nC(eC);function nC(t){return t&&t.__esModule?t:{default:t}}var rC=["-webkit-",""];function aC(t,e){if(typeof e=="string"&&!(0,tC.default)(e)&&e.indexOf("image-set(")>-1)return rC.map(function(n){return e.replace(/image-set\(/g,n+"image-set(")})}hc.exports=Wa.default});var uc=k((Za,dc)=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.default=AC;function AC(t,e){if(t==="position"&&e==="sticky")return["-webkit-sticky","sticky"]}dc.exports=Za.default});var pc=k((Xa,fc)=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.default=sC;var oC=["-webkit-","-moz-",""],iC={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},lC={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function sC(t,e){if(iC.hasOwnProperty(t)&&lC.hasOwnProperty(e))return oC.map(function(n){return n+e})}fc.exports=Xa.default});var mc=k((qB,Cc)=>{"use strict";var cC=/[A-Z]/g,_C=/^ms-/,To={};function hC(t){return t in To?To[t]:To[t]=t.replace(cC,"-$&").toLowerCase().replace(_C,"-ms-")}Cc.exports=hC});var jc=k((eA,Ic)=>{"use strict";Object.defineProperty(eA,"__esModule",{value:!0});eA.default=fC;var gC=mc(),dC=uC(gC);function uC(t){return t&&t.__esModule?t:{default:t}}function fC(t){return(0,dC.default)(t)}Ic.exports=eA.default});var Ho=k((tA,vc)=>{"use strict";Object.defineProperty(tA,"__esModule",{value:!0});tA.default=pC;function pC(t){return t.charAt(0).toUpperCase()+t.slice(1)}vc.exports=tA.default});var Bc=k((nA,Ec)=>{"use strict";Object.defineProperty(nA,"__esModule",{value:!0});nA.default=QC;var CC=jc(),mC=Mo(CC),IC=Bn(),jC=Mo(IC),vC=Ho(),yc=Mo(vC);function Mo(t){return t&&t.__esModule?t:{default:t}}var yC={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},EC={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function BC(t,e){if((0,jC.default)(t))return t;for(var n=t.split(/,(?![^()]*(?:\([^()]*\))?\))/g),a=0,r=n.length;a-1&&l!=="order")for(var s=e[i],c=0,h=s.length;c-1)return A;var o=r.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(i){return!/-webkit-|-ms-/.test(i)}).join(",");return t.indexOf("Moz")>-1?o:(n["Webkit"+(0,yc.default)(t)]=A,n["Moz"+(0,yc.default)(t)]=o,r)}}Ec.exports=nA.default});var wc=k((zB,Qc)=>{"use strict";function wC(t){for(var e=5381,n=t.length;n;)e=e*33^t.charCodeAt(--n);return e>>>0}Qc.exports=wC});var xc=k((rA,bc)=>{"use strict";Object.defineProperty(rA,"__esModule",{value:!0});rA.default=SC;var bC=Ho(),xC=kC(bC);function kC(t){return t&&t.__esModule?t:{default:t}}function SC(t,e,n){if(t.hasOwnProperty(e)){for(var a={},r=t[e],A=(0,xC.default)(e),o=Object.keys(n),i=0;i{"use strict";Object.defineProperty(aA,"__esModule",{value:!0});aA.default=NC;function NC(t,e,n,a,r){for(var A=0,o=t.length;A{"use strict";Object.defineProperty(AA,"__esModule",{value:!0});AA.default=FC;function Nc(t,e){t.indexOf(e)===-1&&t.push(e)}function FC(t,e){if(Array.isArray(e))for(var n=0,a=e.length;n{"use strict";Object.defineProperty(oA,"__esModule",{value:!0});oA.default=DC;function DC(t){return t instanceof Object&&!Array.isArray(t)}Rc.exports=oA.default});var Mc=k((lA,Hc)=>{"use strict";Object.defineProperty(lA,"__esModule",{value:!0});lA.default=PC;var RC=xc(),LC=iA(RC),TC=Sc(),Tc=iA(TC),HC=Dc(),MC=iA(HC),KC=Lc(),JC=iA(KC);function iA(t){return t&&t.__esModule?t:{default:t}}function PC(t){var e=t.prefixMap,n=t.plugins;function a(r){for(var A in r){var o=r[A];if((0,JC.default)(o))r[A]=a(o);else if(Array.isArray(o)){for(var i=[],l=0,s=o.length;l0&&(r[A]=i)}else{var h=(0,Tc.default)(n,A,o,r,e);h&&(r[A]=h),r=(0,LC.default)(e,A,r)}}return r}return a}Hc.exports=lA.default});var qc=k(($B,Oc)=>{"use strict";Oc.exports=Ko;function Ko(t){Nt.length||(sA(),Pc=!0),Nt[Nt.length]=t}var Nt=[],Pc=!1,sA,St=0,GC=1024;function Kc(){for(;StGC){for(var e=0,n=Nt.length-St;e{"use strict";var zc=qc(),cA=[],Jo=[],OC=zc.makeRequestCallFromTimer(qC);function qC(){if(Jo.length)throw Jo.shift()}Vc.exports=Po;function Po(t){var e;cA.length?e=cA.pop():e=new $c,e.task=t,zc(e)}function $c(){this.task=null}$c.prototype.call=function(){try{this.task.call()}catch(t){Po.onerror?Po.onerror(t):(Jo.push(t),OC())}finally{this.task=null,cA[cA.length]=this}}});var Vt,ee,$e,Ke=re(()=>{"use strict";V();Vt=class{constructor(){this.unit="none"}format(e){return e.toLocaleString()}},ee=class{constructor(e){this.unit=e;e==="nanoseconds"?this.multiplier=1e-9:e==="microseconds"?this.multiplier=1e-6:e==="milliseconds"?this.multiplier=.001:this.multiplier=1}formatUnsigned(e){let n=e*this.multiplier;if(n/60>=1){let a=Math.floor(n/60),r=Math.floor(n-a*60).toString();return`${a}:${ln(r,2)}`}return n/1>=1?`${n.toFixed(2)}s`:n/.001>=1?`${(n/.001).toFixed(2)}ms`:n/1e-6>=1?`${(n/1e-6).toFixed(2)}\xB5s`:`${(n/1e-9).toFixed(2)}ns`}format(e){return`${e<0?"-":""}${this.formatUnsigned(Math.abs(e))}`}},$e=class{constructor(){this.unit="bytes"}format(e){return e<1024?`${e.toFixed(0)} B`:(e/=1024,e<1024?`${e.toFixed(2)} KB`:(e/=1024,e<1024?`${e.toFixed(2)} MB`:(e/=1024,`${e.toFixed(2)} GB`)))}}});var Q_=k((yQ,zo)=>{"use strict";var B_=async function(t={}){var e,n=t,a,r,A=new Promise((M,K)=>{a=M,r=K});function o(){a(n)}function i(M){throw M}for(var l,s,c,h,_,f,m,u,g,p,I,j=new Uint8Array(123),E=25;E>=0;--E)j[48+E]=52+E,j[65+E]=E,j[97+E]=26+E;j[43]=62,j[47]=63;function y(M){for(var K,G,we=0,Xe=0,Pe=M.length,_e=new Uint8Array((Pe*3>>2)-(M[Pe-2]=="=")-(M[Pe-1]=="="));we>4,_e[Xe+1]=K<<4|G>>2,_e[Xe+2]=G<<6|j[M.charCodeAt(we+3)];return _e}function b(){var M=I.buffer;l=new Int8Array(M),s=new Int16Array(M),h=new Uint8Array(M),_=new Uint16Array(M),c=new Int32Array(M),f=new Uint32Array(M),m=new Float32Array(M),u=new Float64Array(M),g=new BigInt64Array(M),p=new BigUint64Array(M)}var F=n.noExitRuntime||!0,T=M=>{i("OOM")},Q=M=>{var K=h.length;M>>>=0,T(M)},w=M=>{for(var K=0,G=0;G=55296&&we<=57343?(K+=4,++G):K+=3}return K},S=(M,K,G,we)=>{if(!(we>0))return 0;for(var Xe=G,Pe=G+we-1,_e=0;_e=55296&&ue<=57343){var Ca=M.charCodeAt(++_e);ue=65536+((ue&1023)<<10)|Ca&1023}if(ue<=127){if(G>=Pe)break;K[G++]=ue}else if(ue<=2047){if(G+1>=Pe)break;K[G++]=192|ue>>6,K[G++]=128|ue&63}else if(ue<=65535){if(G+2>=Pe)break;K[G++]=224|ue>>12,K[G++]=128|ue>>6&63,K[G++]=128|ue&63}else{if(G+3>=Pe)break;K[G++]=240|ue>>18,K[G++]=128|ue>>12&63,K[G++]=128|ue>>6&63,K[G++]=128|ue&63}}return K[G]=0,G-Xe},te=(M,K,G)=>S(M,h,K,G),at=M=>ql(M),At=M=>{var K=w(M)+1,G=at(K);return te(M,G,K),G},Ct=typeof TextDecoder<"u"?new TextDecoder:void 0,on=(M,K=0,G=NaN)=>{for(var we=K+G,Xe=K;M[Xe]&&!(Xe>=we);)++Xe;if(Xe-K>16&&M.buffer&&Ct)return Ct.decode(M.subarray(K,Xe));for(var Pe="";K>10,56320|zl&1023)}}return Pe},Qt=(M,K)=>M?on(h,M,K):"",Pt={a:Q};n.UTF8ToString=Qt,n.stringToUTF8OnStack=At;function pa(M){M.c()}var vr,Ol,ql,Lf={a:Pt};return n.wasm=y("AGFzbQEAAAABbRFgA39/fwBgAX8Bf2ACf38Bf2ACf38AYAN/f38Bf2ABfwBgBH9/f38AYAJ/fgBgBX9/f39/AGAGf3x/f39/AX9gAX8BfmACfn8Bf2AEf39/fwF/YAJ/fwF+YAAAYAd/f39/f39/AX9gAnx/AXwCBwEBYQFhAAEDYF8AAwMBAAgBAAEAAQEDAQIFAwoAAQUEAgELBgwDAAIBAwADAgENBwIBAgYHAgEDAQEBAgIFDgMCBgEFDwgQAQQGAQEGBAQAAgcCAQICAgEEAQICAgEBBQEAAQQDCQEAAAQFAXABBgYFBgEBggKCAgYIAX8BQaC4BAsHGQYBYgIAAWMANQFkAQABZQAVAWYAXQFnAFkJCwEAQQELBV9eXFtaDAEYCpD3A1+KOwEMfyMAQRBrIgwkAAJAAkACQCACRQ0AIAIoAgQiA0EBSg0AIAAoApwCIgVBgQhIDQELIABBATYCmAIMAQsgAiADQQFqNgIEIAAgBUEBajYCnAIgDCACNgIIIAwgACgCrAI2AgwgACAMQQhqNgKsAiABIQQgAiEBQQAhAyMAQdAAayIHJAACQCAAKAKYAg0AAkACQAJAAkACQAJ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CUGA+ABrrSEEAkAgA0L//////////w+DIgNCgYCAgICAgIAIWgRAIAJCAXwhAgwBCyADQoCAgICAgICACFINACACQgGDIAJ8IQILQgAgAiACQv////////8HViIBGyECIAGtIAR8DAELIAMgBYRQIARC//8BUnJFBEAgBUIEhiADQjyIhEKAgICAgICABIQhAkL/DwwBCyAJQf6HAUsEQEL/DwwBC0GA+ABBgfgAIARQIggbIgogCWsiAUHwAEoEQEIADAELIAMhAiAFIAVCgICAgICAwACEIAgbIgQhBgJAQYABIAFrIghBwABxBEAgAiAIQUBqrYYhBkIAIQIMAQsgCEUNACAGIAitIgWGIAJBwAAgCGutiIQhBiACIAWGIQILIAAgAjcDECAAIAY3AxgCQCABQcAAcQRAIAQgAUFAaq2IIQNCACEEDAELIAFFDQAgBEHAACABa62GIAMgAa0iAoiEIQMgBCACiCEECyAAIAM3AwAgACAENwMIIAApAwhCBIYgACkDACIDQjyIhCECAkAgCSAKRyAAKQMQIAApAxiEQgBSca0gA0L//////////w+DhCIDQoGAgICAgICACFoEQCACQgF8IQIMAQsgA0KAgICAgICAgAhSDQAgAkIBgyACfCECCyACQoCAgICAgIAIhSACIAJC/////////wdWIgEbIQIgAa0LIQMgAEEgaiQAIAdCgICAgICAgICAf4MgA0I0hoQgAoS/OQMAC7cXAxJ/AXwDfiMAQbAEayILJAAgC0EANgIsAkAgAb0iGUIAUwRAQQEhEEHKDCEUIAGaIgG9IRkMAQsgBEGAEHEEQEEBIRBBzQwhFAwBC0HQDEHLDCAEQQFxIhAbIRQgEEUhFwsCQCAZQoCAgICAgID4/wCDQoCAgICAgID4/wBRBEAgAEEgIAIgEEEDaiIGIARB//97cRAGIAAgFCAQEAUgAEGSD0HhEiAFQSBxIgMbQfsQQfcSIAMbIAEgAWIbQQMQBSAAQSAgAiAGIARBgMAAcxAGIAIgBiACIAZKGyENDAELIAtBEGohEQJAAkACQCABIAtBLGoQPSIBIAGgIgFEAAAAAAAAAABiBEAgCyALKAIsIgZBAWs2AiwgBUEgci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QAAMQAAAOoHAAANAAAAbwAAAN0HAAAMAAAAvAkAADEAAADPBwAADQAAAGQAAADBBwAADQAAAIkJAAAyAAAAsgcAAA4AAAABAAAAAgAAAAMAAAABAAAABAAAAAUAAABGCQAAZQkAAEIJAEHwLQtBGQALABkZGQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAAZAAoKGRkZAwoHAAEACQsYAAAJBgsAAAsABhkAAAAZGRkAQcEuCyEOAAAAAAAAAAAZAAsNGRkZAA0AAAIACQ4AAAAJAA4AAA4AQfsuCwEMAEGHLwsVEwAAAAATAAAAAAkMAAAAAAAMAAAMAEG1LwsBEABBwS8LFQ8AAAAEDwAAAAAJEAAAAAAAEAAAEABB7y8LARIAQfsvCx4RAAAAABEAAAAACRIAAAAAABIAABIAABoAAAAaGhoAQbIwCw4aAAAAGhoaAAAAAAAACQBB4zALARQAQe8wCxUXAAAAABcAAAAACRQAAAAAABQAABQAQZ0xCwEWAEGpMQsnFQAAAAAVAAAAAAkWAAAAAAAWAAAWAAAwMTIzNDU2Nzg5QUJDREVGAEH0MQsBBQBBnDILCP//////////AEHgMgsDIBwB"),WebAssembly.instantiate(n.wasm,Lf).then(M=>{var K=M.instance.exports;vr=K.e,Ol=K.f,ql=K.g,I=K.b,b(),pa(K),o()}),n.wasm_demangle=function(M){let K=At(M),G=Ol(K),we=Qt(G);return G!=null&&vr(G),we},e=A,e};zo.exports=B_;zo.exports.default=B_});async function x_(){let t=await xm;return km(t.wasm_demangle)}function km(t){return e=>{let n=w_.get(e);return n!==void 0||(n=t(e),n=n===""?e:n,w_.set(e,n)),e=n,e}}var b_,xm,w_,k_=re(()=>{"use strict";b_=he(Q_()),xm=(0,b_.default)().then(t=>t),w_=new Map});var $o={};$l($o,{loadDemangling:()=>x_});var Vo=re(()=>{"use strict";k_()});var fA,me,Zn,pA,ae,Ie,ke=re(()=>{"use strict";V();Ke();fA=class{constructor(){this.selfWeight=0;this.totalWeight=0}getSelfWeight(){return this.selfWeight}getTotalWeight(){return this.totalWeight}addToTotalWeight(e){this.totalWeight+=e}addToSelfWeight(e){this.selfWeight+=e}overwriteWeightWith(e){this.selfWeight=e.selfWeight,this.totalWeight=e.totalWeight}},me=class t extends fA{constructor(e){super(),this.key=e.key,this.name=e.name,this.file=e.file,this.line=e.line,this.col=e.col}static{this.root=new t({key:"(speedscope root)",name:"(speedscope root)"})}static getOrInsert(e,n){return e.getOrInsert(new t(n))}},Zn=class extends fA{constructor(n,a){super();this.frame=n;this.parent=a;this.children=[];this.frozen=!1}isRoot(){return this.frame===me.root}isFrozen(){return this.frozen}freeze(){this.frozen=!0}},pA=class t{constructor(e=0){this.name="";this.frames=new bt;this.appendOrderCalltreeRoot=new Zn(me.root,null);this.groupedCalltreeRoot=new Zn(me.root,null);this.samples=[];this.weights=[];this.valueFormatter=new Vt;this.totalNonIdleWeight=null;this.totalWeight=e}getAppendOrderCalltreeRoot(){return this.appendOrderCalltreeRoot}getGroupedCalltreeRoot(){return this.groupedCalltreeRoot}shallowClone(){let e=new t(this.totalWeight);return Object.assign(e,this),e}formatValue(e){return this.valueFormatter.format(e)}setValueFormatter(e){this.valueFormatter=e}getWeightUnit(){return this.valueFormatter.unit}getName(){return this.name}setName(e){this.name=e}getTotalWeight(){return this.totalWeight}getTotalNonIdleWeight(){return this.totalNonIdleWeight===null&&(this.totalNonIdleWeight=this.groupedCalltreeRoot.children.reduce((e,n)=>e+n.getTotalWeight(),0)),this.totalNonIdleWeight}sortGroupedCallTree(){function e(n){n.children.sort((a,r)=>-(a.getTotalWeight()-r.getTotalWeight())),n.children.forEach(e)}e(this.groupedCalltreeRoot)}forEachCallGrouped(e,n){function a(r,A){r.frame!==me.root&&e(r,A);let o=0;r.children.forEach(function(i){a(i,A+o),o+=i.getTotalWeight()}),r.frame!==me.root&&n(r,A+r.getTotalWeight())}a(this.groupedCalltreeRoot,0)}forEachCall(e,n){let a=[],r=0,A=0;for(let o of this.samples){let i=null;for(i=o;i&&i.frame!=me.root&&a.indexOf(i)===-1;i=i.parent);for(;a.length>0&&Ae(a)!=i;){let s=a.pop();n(s,r)}let l=[];for(let s=o;s&&s.frame!=me.root&&s!=i;s=s.parent)l.push(s);l.reverse();for(let s of l)e(s,r);a=a.concat(l),r+=this.weights[A++]}for(let o=a.length-1;o>=0;o--)n(a[o],r)}forEachFrame(e){this.frames.forEach(e)}getProfileWithRecursionFlattened(){let e=new Ie,n=[],a=new Set;function r(i,l){a.has(i.frame)?n.push(null):(a.add(i.frame),n.push(i),e.enterFrame(i.frame,l))}function A(i,l){let s=n.pop();s&&(a.delete(s.frame),e.leaveFrame(s.frame,l))}this.forEachCall(r,A);let o=e.build();return o.name=this.name,o.valueFormatter=this.valueFormatter,this.forEachFrame(i=>{o.frames.getOrInsert(i).overwriteWeightWith(i)}),o}getInvertedProfileForCallersOf(e){let n=me.getOrInsert(this.frames,e),a=new ae,r=[];function A(i){if(i.frame===n)r.push(i);else for(let l of i.children)A(l)}A(this.appendOrderCalltreeRoot);for(let i of r){let l=[];for(let s=i;s!=null&&s.frame!==me.root;s=s.parent)l.push(s.frame);a.appendSampleWithWeight(l,i.getTotalWeight())}let o=a.build();return o.name=this.name,o.valueFormatter=this.valueFormatter,o}getProfileForCalleesOf(e){let n=me.getOrInsert(this.frames,e),a=new ae;function r(i){let l=[];function s(c){l.push(c.frame),a.appendSampleWithWeight(l,c.getSelfWeight());for(let h of c.children)s(h);l.pop()}s(i)}function A(i){if(i.frame===n)r(i);else for(let l of i.children)A(l)}A(this.appendOrderCalltreeRoot);let o=a.build();return o.name=this.name,o.valueFormatter=this.valueFormatter,o}async demangle(){let e=null;for(let n of this.frames)(n.name.startsWith("__Z")||n.name.startsWith("_R")||n.name.startsWith("_Z"))&&(e||(e=await(await Promise.resolve().then(()=>(Vo(),$o))).loadDemangling()),n.name=e(n.name))}remapSymbols(e){for(let n of this.frames){let a=e(n);if(a==null)continue;let{name:r,file:A,line:o,col:i}=a;r!=null&&(n.name=r),A!=null&&(n.file=A),o!=null&&(n.line=o),i!=null&&(n.col=i)}}},ae=class extends pA{constructor(){super(...arguments);this.pendingSample=null}_appendSample(n,a,r){if(isNaN(a))throw new Error("invalid weight");let A=r?this.appendOrderCalltreeRoot:this.groupedCalltreeRoot,o=new Set;for(let i of n){let l=r?Ae(A.children):A.children.find(s=>s.frame===i);if(l&&!l.isFrozen()&&l.frame==i)A=l;else{let s=A;A=new Zn(i,A),s.children.push(A)}A.addToTotalWeight(a),o.add(A.frame)}if(A.addToSelfWeight(a),r)for(let i of A.children)i.freeze();if(r){A.frame.addToSelfWeight(a);for(let i of o)i.addToTotalWeight(a);A===Ae(this.samples)?this.weights[this.weights.length-1]+=a:(this.samples.push(A),this.weights.push(a))}}appendSampleWithWeight(n,a){if(a===0)return;if(a<0)throw new Error("Samples must have positive weights");let r=n.map(A=>me.getOrInsert(this.frames,A));this._appendSample(r,a,!0),this._appendSample(r,a,!1)}appendSampleWithTimestamp(n,a){if(this.pendingSample){if(a0?this.appendSampleWithWeight(this.pendingSample.stack,this.pendingSample.centralTimestamp-this.pendingSample.startTimestamp):(this.appendSampleWithWeight(this.pendingSample.stack,1),this.setValueFormatter(new Vt))),this.totalWeight=Math.max(this.totalWeight,this.weights.reduce((n,a)=>n+a,0)),this.sortGroupedCallTree(),this}},Ie=class extends pA{constructor(){super(...arguments);this.appendOrderStack=[this.appendOrderCalltreeRoot];this.groupedOrderStack=[this.groupedCalltreeRoot];this.framesInStack=new Map;this.stack=[];this.lastValue=0}addWeightsToFrames(n){let a=n-this.lastValue;for(let A of this.framesInStack.keys())A.addToTotalWeight(a);let r=Ae(this.stack);r&&r.addToSelfWeight(a)}addWeightsToNodes(n,a){let r=n-this.lastValue;for(let o of a)o.addToTotalWeight(r);let A=Ae(a);A&&A.addToSelfWeight(r)}_enterFrame(n,a,r){let A=r?this.appendOrderStack:this.groupedOrderStack;this.addWeightsToNodes(a,A);let o=Ae(A);if(o){if(r){let s=a-this.lastValue;if(s>0)this.samples.push(o),this.weights.push(a-this.lastValue);else if(s<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${a}`)}let i=r?Ae(o.children):o.children.find(s=>s.frame===n),l;i&&!i.isFrozen()&&i.frame==n?l=i:(l=new Zn(n,o),o.children.push(l)),A.push(l)}}enterFrame(n,a){let r=me.getOrInsert(this.frames,n);this.addWeightsToFrames(a),this._enterFrame(r,a,!0),this._enterFrame(r,a,!1),this.stack.push(r);let A=this.framesInStack.get(r)||0;this.framesInStack.set(r,A+1),this.lastValue=a,this.totalWeight=Math.max(this.totalWeight,this.lastValue)}_leaveFrame(n,a,r){let A=r?this.appendOrderStack:this.groupedOrderStack;if(this.addWeightsToNodes(a,A),r){let o=this.appendOrderStack.pop();if(o==null)throw new Error(`Trying to leave ${n.key} when stack is empty`);if(this.lastValue==null)throw new Error(`Trying to leave a ${n.key} before any have been entered`);if(o.freeze(),o.frame.key!==n.key)throw new Error(`Tried to leave frame "${n.name}" while frame "${o.frame.name}" was at the top at ${a}`);let i=a-this.lastValue;if(i>0)this.samples.push(o),this.weights.push(a-this.lastValue);else if(i<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${a}`)}else this.groupedOrderStack.pop()}leaveFrame(n,a){let r=me.getOrInsert(this.frames,n);this.addWeightsToFrames(a),this._leaveFrame(r,a,!0),this._leaveFrame(r,a,!1),this.stack.pop();let A=this.framesInStack.get(r);A!=null&&(A===1?this.framesInStack.delete(r):this.framesInStack.set(r,A-1),this.lastValue=a,this.totalWeight=Math.max(this.totalWeight,this.lastValue))}build(){if(this.appendOrderStack.length>1||this.groupedOrderStack.length>1)throw new Error("Tried to complete profile construction with a non-empty stack");return this.sortGroupedCallTree(),this}}});var Yt,S_=re(()=>{"use strict";(n=>{let t;(A=>(A.EVENTED="evented",A.SAMPLED="sampled"))(t=n.ProfileType||={});let e;(A=>(A.OPEN_FRAME="O",A.CLOSE_FRAME="C"))(e=n.EventType||={})})(Yt||={})});var Yo=k((SQ,Sm)=>{Sm.exports={name:"speedscope",version:"1.25.0",description:"",repository:"jlfwong/speedscope",main:"index.js",bin:{speedscope:"./bin/cli.mjs"},scripts:{deploy:"./scripts/deploy.sh",prepack:'./scripts/prepack.sh --outdir "$(pwd)/dist/release" --protocol file',prettier:"prettier --write 'src/**/*.ts' 'src/**/*.tsx'",lint:"eslint 'src/**/*.ts' 'src/**/*.tsx'",jest:"./scripts/test-setup.sh && jest --runInBand",coverage:"npm run jest -- --coverage",typecheck:"tsc --noEmit",test:"./scripts/ci.sh",serve:"tsx scripts/dev-server.ts"},files:["bin/cli.mjs","dist/release/**","!*.map"],browserslist:["last 2 Chrome versions","last 2 Firefox versions"],author:"",license:"MIT",devDependencies:{"@types/jest":"22.2.3","@types/jszip":"3.1.4","@types/node":"14.0.1","@types/pako":"1.0.0","@typescript-eslint/eslint-plugin":"6.16.0","@typescript-eslint/parser":"6.16.0",acorn:"7.2.0",aphrodite:"2.1.0",esbuild:"0.27.0","esbuild-jest":"0.5.0",eslint:"8.0.0","eslint-plugin-prettier":"5.1.2","eslint-plugin-react-hooks":"4.6.0",jest:"30.2.0","jest-environment-jsdom":"29.7.0",jfrview:"0.2.0",jsverify:"0.8.3",jszip:"3.1.5",pako:"1.0.6",preact:"10.4.1",prettier:"3.1.1",protobufjs:"6.8.8","source-map":"0.6.1","ts-jest":"29.4.6",tsx:"4.19.2",typescript:"5.9.3","typescript-json-schema":"0.67.0","uglify-es":"3.2.2","uint8array-json-parser":"0.0.2"},jest:{testEnvironment:"jsdom",transform:{"^.+\\.tsx?$":"ts-jest","^.+\\.js$":"esbuild-jest"},transformIgnorePatterns:[],setupFilesAfterEnv:["./src/jest-setup.js"],moduleNameMapper:{"\\jfrview_bg.wasm$":"/src/import/java-flight-record.mock.ts"},testRegex:"\\.test\\.tsx?$",collectCoverageFrom:["**/*.{ts,tsx}","!**/*.d.{ts,tsx}"],moduleFileExtensions:["ts","tsx","js","jsx","json"]},dependencies:{open:"10.1.0"}}});function Nm(t){let e=[],n=new Map;function a(A){let o=n.get(A);if(o==null){let i={name:A.name};A.file!=null&&(i.file=A.file),A.line!=null&&(i.line=A.line),A.col!=null&&(i.col=A.col),o=e.length,n.set(A,o),e.push(i)}return o}let r={exporter:`speedscope@${Yo().version}`,name:t.name,activeProfileIndex:t.indexToView,$schema:"https://www.speedscope.app/file-format-schema.json",shared:{frames:e},profiles:[]};for(let A of t.profiles)r.profiles.push(Fm(A,a));return r}function Fm(t,e){let n={type:Yt.ProfileType.EVENTED,name:t.getName(),unit:t.getWeightUnit(),startValue:0,endValue:t.getTotalWeight(),events:[]},a=(A,o)=>{n.events.push({type:Yt.EventType.OPEN_FRAME,frame:e(A.frame),at:o})},r=(A,o)=>{n.events.push({type:Yt.EventType.CLOSE_FRAME,frame:e(A.frame),at:o})};return t.forEachCall(a,r),n}function Dm(t,e){function n(A){let{name:o,unit:i}=t;switch(i){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":A.setValueFormatter(new ee(i));break;case"bytes":A.setValueFormatter(new $e);break;case"none":A.setValueFormatter(new Vt);break}A.setName(o)}function a(A){let{startValue:o,endValue:i,events:l}=A,s=new Ie(i-o);n(s);let c=e.map((h,_)=>({key:_,...h}));for(let h of l)switch(h.type){case Yt.EventType.OPEN_FRAME:{s.enterFrame(c[h.frame],h.at-o);break}case Yt.EventType.CLOSE_FRAME:{s.leaveFrame(c[h.frame],h.at-o);break}}return s.build()}function r(A){let{startValue:o,endValue:i,samples:l,weights:s}=A,c=new ae(i-o);n(c);let h=e.map((_,f)=>({key:f,..._}));if(l.length!==s.length)throw new Error(`Expected samples.length (${l.length}) to equal weights.length (${s.length})`);for(let _=0;_h[u]),m)}return c.build()}switch(t.type){case Yt.ProfileType.EVENTED:return a(t);case Yt.ProfileType.SAMPLED:return r(t)}}function Wo(t){return{name:t.name||t.profiles[0].name||"profile",indexToView:t.activeProfileIndex||0,profiles:t.profiles.map(e=>Dm(e,t.shared.frames))}}function N_(t){let e=Nm(t),n=new Blob([JSON.stringify(e)],{type:"text/json"}),r=`${(e.name?e.name.split(".")[0]:"profile").replace(/\W+/g,"_")}.speedscope.json`;console.log("Saving",r);let A=document.createElement("a");A.download=r,A.href=window.URL.createObjectURL(n),A.dataset.downloadurl=["text/json",A.download,A.href].join(":"),document.body.appendChild(A),A.click(),document.body.removeChild(A)}var Zo=re(()=>{"use strict";ke();Ke();S_()});var eh=k(_i=>{var X_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");_i.encode=function(t){if(0<=t&&t{var th=eh(),hi=5,nh=1<>1;return e?-n:n}gi.encode=function(e){var n="",a,r=lI(e);do a=r&rh,r>>>=hi,r>0&&(a|=ah),n+=th.encode(a);while(r>0);return n};gi.decode=function(e,n,a){var r=e.length,A=0,o=0,i,l;do{if(n>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(l=th.decode(e.charCodeAt(n++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));i=!!(l&ah),l&=rh,A=A+(l<{function cI(t,e,n){if(e in t)return t[e];if(arguments.length===3)return n;throw new Error('"'+e+'" is a required argument.')}Je.getArg=cI;var Ah=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,_I=/^data:.+\,.+$/;function Lr(t){var e=t.match(Ah);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Je.urlParse=Lr;function nr(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Je.urlGenerate=nr;function ui(t){var e=t,n=Lr(t);if(n){if(!n.path)return t;e=n.path}for(var a=Je.isAbsolute(e),r=e.split(/\/+/),A,o=0,i=r.length-1;i>=0;i--)A=r[i],A==="."?r.splice(i,1):A===".."?o++:o>0&&(A===""?(r.splice(i+1,o),o=0):(r.splice(i,2),o--));return e=r.join("/"),e===""&&(e=a?"/":"."),n?(n.path=e,nr(n)):e}Je.normalize=ui;function oh(t,e){t===""&&(t="."),e===""&&(e=".");var n=Lr(e),a=Lr(t);if(a&&(t=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),nr(n);if(n||e.match(_I))return e;if(a&&!a.host&&!a.path)return a.host=e,nr(a);var r=e.charAt(0)==="/"?e:ui(t.replace(/\/+$/,"")+"/"+e);return a?(a.path=r,nr(a)):r}Je.join=oh;Je.isAbsolute=function(t){return t.charAt(0)==="/"||Ah.test(t)};function hI(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var n=0;e.indexOf(t+"/")!==0;){var a=t.lastIndexOf("/");if(a<0||(t=t.slice(0,a),t.match(/^([^\/]+:\/)?\/*$/)))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}Je.relative=hI;var ih=(function(){var t=Object.create(null);return!("__proto__"in t)})();function lh(t){return t}function gI(t){return sh(t)?"$"+t:t}Je.toSetString=ih?lh:gI;function dI(t){return sh(t)?t.slice(1):t}Je.fromSetString=ih?lh:dI;function sh(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var n=e-10;n>=0;n--)if(t.charCodeAt(n)!==36)return!1;return!0}function uI(t,e,n){var a=rr(t.source,e.source);return a!==0||(a=t.originalLine-e.originalLine,a!==0)||(a=t.originalColumn-e.originalColumn,a!==0||n)||(a=t.generatedColumn-e.generatedColumn,a!==0)||(a=t.generatedLine-e.generatedLine,a!==0)?a:rr(t.name,e.name)}Je.compareByOriginalPositions=uI;function fI(t,e,n){var a=t.generatedLine-e.generatedLine;return a!==0||(a=t.generatedColumn-e.generatedColumn,a!==0||n)||(a=rr(t.source,e.source),a!==0)||(a=t.originalLine-e.originalLine,a!==0)||(a=t.originalColumn-e.originalColumn,a!==0)?a:rr(t.name,e.name)}Je.compareByGeneratedPositionsDeflated=fI;function rr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function pI(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=rr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:rr(t.name,e.name)}Je.compareByGeneratedPositionsInflated=pI;function CI(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Je.parseSourceMapInput=CI;function mI(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var a=Lr(n);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var r=a.path.lastIndexOf("/");r>=0&&(a.path=a.path.substring(0,r+1))}e=oh(nr(a),e)}return ui(e)}Je.computeSourceURL=mI});var Ci=k(ch=>{var fi=ar(),pi=Object.prototype.hasOwnProperty,bn=typeof Map<"u";function Xt(){this._array=[],this._set=bn?new Map:Object.create(null)}Xt.fromArray=function(e,n){for(var a=new Xt,r=0,A=e.length;r=0)return n}else{var a=fi.toSetString(e);if(pi.call(this._set,a))return this._set[a]}throw new Error('"'+e+'" is not in the set.')};Xt.prototype.at=function(e){if(e>=0&&e{var _h=ar();function II(t,e){var n=t.generatedLine,a=e.generatedLine,r=t.generatedColumn,A=e.generatedColumn;return a>n||a==n&&A>=r||_h.compareByGeneratedPositionsInflated(t,e)<=0}function bA(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}bA.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};bA.prototype.add=function(e){II(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};bA.prototype.toArray=function(){return this._sorted||(this._array.sort(_h.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};hh.MappingList=bA});var mi=k(dh=>{var Tr=di(),je=ar(),xA=Ci().ArraySet,jI=gh().MappingList;function ct(t){t||(t={}),this._file=je.getArg(t,"file",null),this._sourceRoot=je.getArg(t,"sourceRoot",null),this._skipValidation=je.getArg(t,"skipValidation",!1),this._sources=new xA,this._names=new xA,this._mappings=new jI,this._sourcesContents=null}ct.prototype._version=3;ct.fromSourceMap=function(e){var n=e.sourceRoot,a=new ct({file:e.file,sourceRoot:n});return e.eachMapping(function(r){var A={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(A.source=r.source,n!=null&&(A.source=je.relative(n,A.source)),A.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(A.name=r.name)),a.addMapping(A)}),e.sources.forEach(function(r){var A=r;n!==null&&(A=je.relative(n,r)),a._sources.has(A)||a._sources.add(A);var o=e.sourceContentFor(r);o!=null&&a.setSourceContent(r,o)}),a};ct.prototype.addMapping=function(e){var n=je.getArg(e,"generated"),a=je.getArg(e,"original",null),r=je.getArg(e,"source",null),A=je.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,a,r,A),r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),A!=null&&(A=String(A),this._names.has(A)||this._names.add(A)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:a!=null&&a.line,originalColumn:a!=null&&a.column,source:r,name:A})};ct.prototype.setSourceContent=function(e,n){var a=e;this._sourceRoot!=null&&(a=je.relative(this._sourceRoot,a)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[je.toSetString(a)]=n):this._sourcesContents&&(delete this._sourcesContents[je.toSetString(a)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ct.prototype.applySourceMap=function(e,n,a){var r=n;if(n==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);r=e.file}var A=this._sourceRoot;A!=null&&(r=je.relative(A,r));var o=new xA,i=new xA;this._mappings.unsortedForEach(function(l){if(l.source===r&&l.originalLine!=null){var s=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});s.source!=null&&(l.source=s.source,a!=null&&(l.source=je.join(a,l.source)),A!=null&&(l.source=je.relative(A,l.source)),l.originalLine=s.line,l.originalColumn=s.column,s.name!=null&&(l.name=s.name))}var c=l.source;c!=null&&!o.has(c)&&o.add(c);var h=l.name;h!=null&&!i.has(h)&&i.add(h)},this),this._sources=o,this._names=i,e.sources.forEach(function(l){var s=e.sourceContentFor(l);s!=null&&(a!=null&&(l=je.join(a,l)),A!=null&&(l=je.relative(A,l)),this.setSourceContent(l,s))},this)};ct.prototype._validateMapping=function(e,n,a,r){if(n&&typeof n.line!="number"&&typeof n.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!a&&!r)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&a)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:a,original:n,name:r}))}};ct.prototype._serializeMappings=function(){for(var e=0,n=1,a=0,r=0,A=0,o=0,i="",l,s,c,h,_=this._mappings.toArray(),f=0,m=_.length;f0){if(!je.compareByGeneratedPositionsInflated(s,_[f-1]))continue;l+=","}l+=Tr.encode(s.generatedColumn-e),e=s.generatedColumn,s.source!=null&&(h=this._sources.indexOf(s.source),l+=Tr.encode(h-o),o=h,l+=Tr.encode(s.originalLine-1-r),r=s.originalLine-1,l+=Tr.encode(s.originalColumn-a),a=s.originalColumn,s.name!=null&&(c=this._names.indexOf(s.name),l+=Tr.encode(c-A),A=c)),i+=l}return i};ct.prototype._generateSourcesContent=function(e,n){return e.map(function(a){if(!this._sourcesContents)return null;n!=null&&(a=je.relative(n,a));var r=je.toSetString(a);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};ct.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};ct.prototype.toString=function(){return JSON.stringify(this.toJSON())};dh.SourceMapGenerator=ct});var uh=k(xn=>{xn.GREATEST_LOWER_BOUND=1;xn.LEAST_UPPER_BOUND=2;function Ii(t,e,n,a,r,A){var o=Math.floor((e-t)/2)+t,i=r(n,a[o],!0);return i===0?o:i>0?e-o>1?Ii(o,e,n,a,r,A):A==xn.LEAST_UPPER_BOUND?e1?Ii(t,o,n,a,r,A):A==xn.LEAST_UPPER_BOUND?o:t<0?-1:t}xn.search=function(e,n,a,r){if(n.length===0)return-1;var A=Ii(-1,n.length,e,n,a,r||xn.GREATEST_LOWER_BOUND);if(A<0)return-1;for(;A-1>=0&&a(n[A],n[A-1],!0)===0;)--A;return A}});var ph=k(fh=>{function ji(t,e,n){var a=t[e];t[e]=t[n],t[n]=a}function vI(t,e){return Math.round(t+Math.random()*(e-t))}function vi(t,e,n,a){if(n{var D=ar(),yi=uh(),Ar=Ci().ArraySet,yI=di(),Hr=ph().quickSort;function se(t,e){var n=t;return typeof t=="string"&&(n=D.parseSourceMapInput(t)),n.sections!=null?new It(n,e):new Le(n,e)}se.fromSourceMap=function(t,e){return Le.fromSourceMap(t,e)};se.prototype._version=3;se.prototype.__generatedMappings=null;Object.defineProperty(se.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});se.prototype.__originalMappings=null;Object.defineProperty(se.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});se.prototype._charIsMappingSeparator=function(e,n){var a=e.charAt(n);return a===";"||a===","};se.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")};se.GENERATED_ORDER=1;se.ORIGINAL_ORDER=2;se.GREATEST_LOWER_BOUND=1;se.LEAST_UPPER_BOUND=2;se.prototype.eachMapping=function(e,n,a){var r=n||null,A=a||se.GENERATED_ORDER,o;switch(A){case se.GENERATED_ORDER:o=this._generatedMappings;break;case se.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var i=this.sourceRoot;o.map(function(l){var s=l.source===null?null:this._sources.at(l.source);return s=D.computeSourceURL(i,s,this._sourceMapURL),{source:s,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(e,r)};se.prototype.allGeneratedPositionsFor=function(e){var n=D.getArg(e,"line"),a={source:D.getArg(e,"source"),originalLine:n,originalColumn:D.getArg(e,"column",0)};if(a.source=this._findSourceIndex(a.source),a.source<0)return[];var r=[],A=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",D.compareByOriginalPositions,yi.LEAST_UPPER_BOUND);if(A>=0){var o=this._originalMappings[A];if(e.column===void 0)for(var i=o.originalLine;o&&o.originalLine===i;)r.push({line:D.getArg(o,"generatedLine",null),column:D.getArg(o,"generatedColumn",null),lastColumn:D.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++A];else for(var l=o.originalColumn;o&&o.originalLine===n&&o.originalColumn==l;)r.push({line:D.getArg(o,"generatedLine",null),column:D.getArg(o,"generatedColumn",null),lastColumn:D.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++A]}return r};kA.SourceMapConsumer=se;function Le(t,e){var n=t;typeof t=="string"&&(n=D.parseSourceMapInput(t));var a=D.getArg(n,"version"),r=D.getArg(n,"sources"),A=D.getArg(n,"names",[]),o=D.getArg(n,"sourceRoot",null),i=D.getArg(n,"sourcesContent",null),l=D.getArg(n,"mappings"),s=D.getArg(n,"file",null);if(a!=this._version)throw new Error("Unsupported version: "+a);o&&(o=D.normalize(o)),r=r.map(String).map(D.normalize).map(function(c){return o&&D.isAbsolute(o)&&D.isAbsolute(c)?D.relative(o,c):c}),this._names=Ar.fromArray(A.map(String),!0),this._sources=Ar.fromArray(r,!0),this._absoluteSources=this._sources.toArray().map(function(c){return D.computeSourceURL(o,c,e)}),this.sourceRoot=o,this.sourcesContent=i,this._mappings=l,this._sourceMapURL=e,this.file=s}Le.prototype=Object.create(se.prototype);Le.prototype.consumer=se;Le.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=D.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var n;for(n=0;n1&&(u.source=i+p[1],i+=p[1],u.originalLine=A+p[2],A=u.originalLine,u.originalLine+=1,u.originalColumn=o+p[3],o=u.originalColumn,p.length>4&&(u.name=l+p[4],l+=p[4])),m.push(u),typeof u.originalLine=="number"&&f.push(u)}Hr(m,D.compareByGeneratedPositionsDeflated),this.__generatedMappings=m,Hr(f,D.compareByOriginalPositions),this.__originalMappings=f};Le.prototype._findMapping=function(e,n,a,r,A,o){if(e[a]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[a]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return yi.search(e,n,A,o)};Le.prototype.computeColumnSpans=function(){for(var e=0;e=0){var r=this._generatedMappings[a];if(r.generatedLine===n.generatedLine){var A=D.getArg(r,"source",null);A!==null&&(A=this._sources.at(A),A=D.computeSourceURL(this.sourceRoot,A,this._sourceMapURL));var o=D.getArg(r,"name",null);return o!==null&&(o=this._names.at(o)),{source:A,line:D.getArg(r,"originalLine",null),column:D.getArg(r,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};Le.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Le.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var a=this._findSourceIndex(e);if(a>=0)return this.sourcesContent[a];var r=e;this.sourceRoot!=null&&(r=D.relative(this.sourceRoot,r));var A;if(this.sourceRoot!=null&&(A=D.urlParse(this.sourceRoot))){var o=r.replace(/^file:\/\//,"");if(A.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!A.path||A.path=="/")&&this._sources.has("/"+r))return this.sourcesContent[this._sources.indexOf("/"+r)]}if(n)return null;throw new Error('"'+r+'" is not in the SourceMap.')};Le.prototype.generatedPositionFor=function(e){var n=D.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var a={source:n,originalLine:D.getArg(e,"line"),originalColumn:D.getArg(e,"column")},r=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",D.compareByOriginalPositions,D.getArg(e,"bias",se.GREATEST_LOWER_BOUND));if(r>=0){var A=this._originalMappings[r];if(A.source===a.source)return{line:D.getArg(A,"generatedLine",null),column:D.getArg(A,"generatedColumn",null),lastColumn:D.getArg(A,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};kA.BasicSourceMapConsumer=Le;function It(t,e){var n=t;typeof t=="string"&&(n=D.parseSourceMapInput(t));var a=D.getArg(n,"version"),r=D.getArg(n,"sections");if(a!=this._version)throw new Error("Unsupported version: "+a);this._sources=new Ar,this._names=new Ar;var A={line:-1,column:0};this._sections=r.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var i=D.getArg(o,"offset"),l=D.getArg(i,"line"),s=D.getArg(i,"column");if(l{var EI=mi().SourceMapGenerator,SA=ar(),BI=/(\r?\n)/,QI=10,or="$$$isSourceNode$$$";function tt(t,e,n,a,r){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=n??null,this.name=r??null,this[or]=!0,a!=null&&this.add(a)}tt.fromStringWithSourceMap=function(e,n,a){var r=new tt,A=e.split(BI),o=0,i=function(){var _=m(),f=m()||"";return _+f;function m(){return o=0;n--)this.prepend(e[n]);else if(e[or]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};tt.prototype.walk=function(e){for(var n,a=0,r=this.children.length;a0){for(n=[],a=0;a{NA.SourceMapGenerator=mi().SourceMapGenerator;NA.SourceMapConsumer=mh().SourceMapConsumer;NA.SourceNode=jh().SourceNode});function PI(t){let e=[];function n(a){e.push({id:a.id,callFrame:{columnNumber:0,functionName:a.functionName,lineNumber:a.lineNumber,scriptId:a.scriptId,url:a.url},hitCount:a.hitCount,children:a.children.map(r=>r.id)}),a.children.forEach(n)}return n(t),e}function GI(t,e){return t.map((n,a)=>{let r=a===0?e*1e6:t[a-1];return n-r})}function kh(t){return{samples:t.samples,startTime:t.startTime*1e6,endTime:t.endTime*1e6,nodes:PI(t.head),timeDeltas:GI(t.timestamps,t.startTime)}}var Sh=re(()=>{"use strict"});function bi(t){if(!Array.isArray(t)||t.length<1)return!1;let e=t[0];return!(!("pid"in e&&"tid"in e&&"ph"in e&&"cat"in e)||!t.find(n=>n.name==="CpuProfile"||n.name==="Profile"||n.name==="ProfileChunk"))}function Fh(t){return"traceEvents"in t?bi(t.traceEvents):!1}function Kr(t,e){let n=new Map,a=new Map,r=new Map;Fe(t,A=>A.ts);for(let A of t){if(A.name==="CpuProfile"){let o=`${A.pid}:${A.tid}`,i=A.id||o;if(A.args.data==null)continue;n.set(i,A.args.data.cpuProfile),a.set(i,o)}if(A.name==="Profile"){let o=`${A.pid}:${A.tid}`;n.set(A.id||o,{startTime:0,endTime:0,nodes:[],samples:[],timeDeltas:[],...A.args.data}),A.id&&a.set(A.id,`${A.pid}:${A.tid}`)}if(A.name==="thread_name"&&r.set(`${A.pid}:${A.tid}`,A.args.name),A.name==="ProfileChunk"){let o=`${A.pid}:${A.tid}`,i=n.get(A.id||o);if(i){let l=A.args.data;if(l==null)continue;l.cpuProfile&&(l.cpuProfile.nodes&&(i.nodes=i.nodes.concat(l.cpuProfile.nodes)),l.cpuProfile.samples&&(i.samples=i.samples.concat(l.cpuProfile.samples))),l.timeDeltas&&(i.timeDeltas=i.timeDeltas.concat(l.timeDeltas)),l.startTime!=null&&(i.startTime=l.startTime),l.endTime!=null&&(i.endTime=l.endTime)}else console.warn(`Ignoring ProfileChunk for undeclared Profile with id ${A.id||o}`)}}if(n.size>0){let A=[],o=0;return is(n.keys(),i=>{let l=null,s=a.get(i);s&&(l=r.get(s)||null);let c=DA(n.get(i));l&&n.size>1?(c.setName(`${e} - ${l}`),l==="CrRendererMain"&&(o=A.length)):c.setName(`${e}`),A.push(c)}),{name:e,indexToView:o,profiles:A}}else throw new Error("Could not find CPU profile in Timeline")}function wi(t){return De(UI,t,e=>{let n=e.url,a=e.lineNumber;a!=null&&a++;let r=e.columnNumber;r!=null&&r++;let A=e.functionName||(n?`(anonymous ${n.split("/").pop()}:${a})`:"(anonymous)");return{key:`${A}:${n}:${a}:${r}`,name:A,file:n,line:a,col:r}})}function OI(t){let{functionName:e,url:n}=t;return n==="native dummy.js"?!0:e==="(root)"||e==="(idle)"}function Nh(t){return t==="(garbage collector)"||t==="(program)"}function DA(t){let e=new Ie(t.endTime-t.startTime),n=new Map;for(let s of t.nodes)n.set(s.id,s);for(let s of t.nodes)if(typeof s.parent=="number"&&(s.parent=n.get(s.parent)),!!s.children)for(let c of s.children){let h=n.get(c);h&&(h.parent=s)}let a=[],r=[],A=t.timeDeltas[0],o=A,i=NaN;for(let s=0;s0&&Ae(l)!=f;){let u=l.pop(),g=wi(u.callFrame);e.leaveFrame(g,c)}let m=[];for(let u=_;u&&u!=f&&!OI(u.callFrame);u=Nh(u.callFrame.functionName)?Ae(l):u.parent||null)m.push(u);m.reverse();for(let u of m)e.enterFrame(wi(u.callFrame),c);l=l.concat(m)}for(let s=l.length-1;s>=0;s--)e.leaveFrame(wi(l[s].callFrame),Ae(r));return e.setValueFormatter(new ee("microseconds")),e.build()}function Dh(t){return DA(kh(t))}var UI,Rh=re(()=>{"use strict";ke();V();Ke();Sh();UI=new Map});function xi(t){let{frames:e,mode:n,raw:a,raw_timestamp_deltas:r,interval:A}=t,o=new ae;o.setValueFormatter(new ee("microseconds"));let i=0,l=[];for(let s=0;s{"use strict";ke();Ke()});var en=k(Oe=>{"use strict";var qI=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function zI(t,e){return Object.prototype.hasOwnProperty.call(t,e)}Oe.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(var a in n)zI(n,a)&&(t[a]=n[a])}}return t};Oe.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var $I={arraySet:function(t,e,n,a,r){if(e.subarray&&t.subarray){t.set(e.subarray(n,n+a),r);return}for(var A=0;A{"use strict";var YI=en(),WI=4,Th=0,Hh=1,ZI=2;function sr(t){for(var e=t.length;--e>=0;)t[e]=0}var XI=0,Uh=1,ej=2,tj=3,nj=258,Li=29,qr=256,Pr=qr+1+Li,lr=30,Ti=19,Oh=2*Pr+1,kn=15,ki=16,rj=7,Hi=256,qh=16,zh=17,$h=18,Di=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],RA=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],aj=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Vh=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Aj=512,tn=new Array((Pr+2)*2);sr(tn);var Jr=new Array(lr*2);sr(Jr);var Gr=new Array(Aj);sr(Gr);var Ur=new Array(nj-tj+1);sr(Ur);var Mi=new Array(Li);sr(Mi);var LA=new Array(lr);sr(LA);function Si(t,e,n,a,r){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=a,this.max_length=r,this.has_stree=t&&t.length}var Yh,Wh,Zh;function Ni(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function Xh(t){return t<256?Gr[t]:Gr[256+(t>>>7)]}function Or(t,e){t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255}function Ve(t,e,n){t.bi_valid>ki-n?(t.bi_buf|=e<>ki-t.bi_valid,t.bi_valid+=n-ki):(t.bi_buf|=e<>>=1,n<<=1;while(--e>0);return n>>>1}function oj(t){t.bi_valid===16?(Or(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)}function ij(t,e){var n=e.dyn_tree,a=e.max_code,r=e.stat_desc.static_tree,A=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,i=e.stat_desc.extra_base,l=e.stat_desc.max_length,s,c,h,_,f,m,u=0;for(_=0;_<=kn;_++)t.bl_count[_]=0;for(n[t.heap[t.heap_max]*2+1]=0,s=t.heap_max+1;sl&&(_=l,u++),n[c*2+1]=_,!(c>a)&&(t.bl_count[_]++,f=0,c>=i&&(f=o[c-i]),m=n[c*2],t.opt_len+=m*(_+f),A&&(t.static_len+=m*(r[c*2+1]+f)));if(u!==0){do{for(_=l-1;t.bl_count[_]===0;)_--;t.bl_count[_]--,t.bl_count[_+1]+=2,t.bl_count[l]--,u-=2}while(u>0);for(_=l;_!==0;_--)for(c=t.bl_count[_];c!==0;)h=t.heap[--s],!(h>a)&&(n[h*2+1]!==_&&(t.opt_len+=(_-n[h*2+1])*n[h*2],n[h*2+1]=_),c--)}}function tg(t,e,n){var a=new Array(kn+1),r=0,A,o;for(A=1;A<=kn;A++)a[A]=r=r+n[A-1]<<1;for(o=0;o<=e;o++){var i=t[o*2+1];i!==0&&(t[o*2]=eg(a[i]++,i))}}function lj(){var t,e,n,a,r,A=new Array(kn+1);for(n=0,a=0;a>=7;a8?Or(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function sj(t,e,n,a){rg(t),a&&(Or(t,n),Or(t,~n)),YI.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}function Mh(t,e,n,a){var r=e*2,A=n*2;return t[r]>1;o>=1;o--)Fi(t,n,o);s=A;do o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Fi(t,n,1),i=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=i,n[s*2]=n[o*2]+n[i*2],t.depth[s]=(t.depth[o]>=t.depth[i]?t.depth[o]:t.depth[i])+1,n[o*2+1]=n[i*2+1]=s,t.heap[1]=s++,Fi(t,n,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],ij(t,e),tg(n,l,t.bl_count)}function Jh(t,e,n){var a,r=-1,A,o=e[1],i=0,l=7,s=4;for(o===0&&(l=138,s=3),e[(n+1)*2+1]=65535,a=0;a<=n;a++)A=o,o=e[(a+1)*2+1],!(++i=3&&t.bl_tree[Vh[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e}function _j(t,e,n,a){var r;for(Ve(t,e-257,5),Ve(t,n-1,5),Ve(t,a-4,4),r=0;r>>=1)if(e&1&&t.dyn_ltree[n*2]!==0)return Th;if(t.dyn_ltree[18]!==0||t.dyn_ltree[20]!==0||t.dyn_ltree[26]!==0)return Hh;for(n=32;n0?(t.strm.data_type===ZI&&(t.strm.data_type=hj(t)),Ri(t,t.l_desc),Ri(t,t.d_desc),o=cj(t),r=t.opt_len+3+7>>>3,A=t.static_len+3+7>>>3,A<=r&&(r=A)):r=A=n+5,n+4<=r&&e!==-1?ag(t,e,n,a):t.strategy===WI||A===r?(Ve(t,(Uh<<1)+(a?1:0),3),Kh(t,tn,Jr)):(Ve(t,(ej<<1)+(a?1:0),3),_j(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),Kh(t,t.dyn_ltree,t.dyn_dtree)),ng(t),a&&rg(t)}function fj(t,e,n){return t.pending_buf[t.d_buf+t.last_lit*2]=e>>>8&255,t.pending_buf[t.d_buf+t.last_lit*2+1]=e&255,t.pending_buf[t.l_buf+t.last_lit]=n&255,t.last_lit++,e===0?t.dyn_ltree[n*2]++:(t.matches++,e--,t.dyn_ltree[(Ur[n]+qr+1)*2]++,t.dyn_dtree[Xh(e)*2]++),t.last_lit===t.lit_bufsize-1}cr._tr_init=gj;cr._tr_stored_block=ag;cr._tr_flush_block=uj;cr._tr_tally=fj;cr._tr_align=dj});var Ki=k((_k,og)=>{"use strict";function pj(t,e,n,a){for(var r=t&65535|0,A=t>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do r=r+e[a++]|0,A=A+r|0;while(--o);r%=65521,A%=65521}return r|A<<16|0}og.exports=pj});var Ji=k((hk,ig)=>{"use strict";function Cj(){for(var t,e=[],n=0;n<256;n++){t=n;for(var a=0;a<8;a++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e}var mj=Cj();function Ij(t,e,n,a){var r=mj,A=a+n;t^=-1;for(var o=a;o>>8^r[(t^e[o])&255];return t^-1}ig.exports=Ij});var TA=k((gk,lg)=>{"use strict";lg.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var pg=k(Ht=>{"use strict";var qe=en(),_t=Ag(),hg=Ki(),hn=Ji(),jj=TA(),Dn=0,vj=1,yj=3,pn=4,sg=5,Tt=0,cg=1,ht=-2,Ej=-3,Pi=-5,Bj=-1,Qj=1,HA=2,wj=3,bj=4,xj=0,kj=2,PA=8,Sj=9,Nj=15,Fj=8,Dj=29,Rj=256,Ui=Rj+1+Dj,Lj=30,Tj=19,Hj=2*Ui+1,Mj=15,$=3,un=258,jt=un+$+1,Kj=32,GA=42,Oi=69,MA=73,KA=91,JA=103,Sn=113,$r=666,Be=1,Vr=2,Nn=3,gr=4,Jj=3;function fn(t,e){return t.msg=jj[e],e}function _g(t){return(t<<1)-(t>4?9:0)}function dn(t){for(var e=t.length;--e>=0;)t[e]=0}function gn(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),n!==0&&(qe.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,e.pending===0&&(e.pending_out=0))}function Te(t,e){_t._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,gn(t.strm)}function W(t,e){t.pending_buf[t.pending++]=e}function zr(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255}function Pj(t,e,n,a){var r=t.avail_in;return r>a&&(r=a),r===0?0:(t.avail_in-=r,qe.arraySet(e,t.input,t.next_in,r,n),t.state.wrap===1?t.adler=hg(t.adler,e,r,n):t.state.wrap===2&&(t.adler=hn(t.adler,e,r,n)),t.next_in+=r,t.total_in+=r,r)}function gg(t,e){var n=t.max_chain_length,a=t.strstart,r,A,o=t.prev_length,i=t.nice_match,l=t.strstart>t.w_size-jt?t.strstart-(t.w_size-jt):0,s=t.window,c=t.w_mask,h=t.prev,_=t.strstart+un,f=s[a+o-1],m=s[a+o];t.prev_length>=t.good_match&&(n>>=2),i>t.lookahead&&(i=t.lookahead);do if(r=e,!(s[r+o]!==m||s[r+o-1]!==f||s[r]!==s[a]||s[++r]!==s[a+1])){a+=2,r++;do;while(s[++a]===s[++r]&&s[++a]===s[++r]&&s[++a]===s[++r]&&s[++a]===s[++r]&&s[++a]===s[++r]&&s[++a]===s[++r]&&s[++a]===s[++r]&&s[++a]===s[++r]&&a<_);if(A=un-(_-a),a=_-un,A>o){if(t.match_start=e,o=A,A>=i)break;f=s[a+o-1],m=s[a+o]}}while((e=h[e&c])>l&&--n!==0);return o<=t.lookahead?o:t.lookahead}function Fn(t){var e=t.w_size,n,a,r,A,o;do{if(A=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-jt)){qe.arraySet(t.window,t.window,e,e,0),t.match_start-=e,t.strstart-=e,t.block_start-=e,a=t.hash_size,n=a;do r=t.head[--n],t.head[n]=r>=e?r-e:0;while(--a);a=e,n=a;do r=t.prev[--n],t.prev[n]=r>=e?r-e:0;while(--a);A+=e}if(t.strm.avail_in===0)break;if(a=Pj(t.strm,t.window,t.strstart+t.lookahead,A),t.lookahead+=a,t.lookahead+t.insert>=$)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Fn(t),t.lookahead===0&&e===Dn)return Be;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var a=t.block_start+n;if((t.strstart===0||t.strstart>=a)&&(t.lookahead=t.strstart-a,t.strstart=a,Te(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-jt&&(Te(t,!1),t.strm.avail_out===0))return Be}return t.insert=0,e===pn?(Te(t,!0),t.strm.avail_out===0?Nn:gr):(t.strstart>t.block_start&&(Te(t,!1),t.strm.avail_out===0),Be)}function Gi(t,e){for(var n,a;;){if(t.lookahead=$&&(t.ins_h=(t.ins_h<=$)if(a=_t._tr_tally(t,t.strstart-t.match_start,t.match_length-$),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=$){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=$&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=$-1)),t.prev_length>=$&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-$,a=_t._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-$),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=r&&(t.ins_h=(t.ins_h<=$&&t.strstart>0&&(r=t.strstart-1,a=o[r],a===o[++r]&&a===o[++r]&&a===o[++r])){A=t.strstart+un;do;while(a===o[++r]&&a===o[++r]&&a===o[++r]&&a===o[++r]&&a===o[++r]&&a===o[++r]&&a===o[++r]&&a===o[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=$?(n=_t._tr_tally(t,1,t.match_length-$),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=_t._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(Te(t,!1),t.strm.avail_out===0))return Be}return t.insert=0,e===pn?(Te(t,!0),t.strm.avail_out===0?Nn:gr):t.last_lit&&(Te(t,!1),t.strm.avail_out===0)?Be:Vr}function Oj(t,e){for(var n;;){if(t.lookahead===0&&(Fn(t),t.lookahead===0)){if(e===Dn)return Be;break}if(t.match_length=0,n=_t._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(Te(t,!1),t.strm.avail_out===0))return Be}return t.insert=0,e===pn?(Te(t,!0),t.strm.avail_out===0?Nn:gr):t.last_lit&&(Te(t,!1),t.strm.avail_out===0)?Be:Vr}function Lt(t,e,n,a,r){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=a,this.func=r}var hr;hr=[new Lt(0,0,0,0,Gj),new Lt(4,4,8,4,Gi),new Lt(4,5,16,8,Gi),new Lt(4,6,32,32,Gi),new Lt(4,4,16,16,_r),new Lt(8,16,32,32,_r),new Lt(8,16,128,128,_r),new Lt(8,32,128,256,_r),new Lt(32,128,258,1024,_r),new Lt(32,258,258,4096,_r)];function qj(t){t.window_size=2*t.w_size,dn(t.head),t.max_lazy_match=hr[t.level].max_lazy,t.good_match=hr[t.level].good_length,t.nice_match=hr[t.level].nice_length,t.max_chain_length=hr[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=$-1,t.match_available=0,t.ins_h=0}function zj(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=PA,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new qe.Buf16(Hj*2),this.dyn_dtree=new qe.Buf16((2*Lj+1)*2),this.bl_tree=new qe.Buf16((2*Tj+1)*2),dn(this.dyn_ltree),dn(this.dyn_dtree),dn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new qe.Buf16(Mj+1),this.heap=new qe.Buf16(2*Ui+1),dn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new qe.Buf16(2*Ui+1),dn(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function dg(t){var e;return!t||!t.state?fn(t,ht):(t.total_in=t.total_out=0,t.data_type=kj,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?GA:Sn,t.adler=e.wrap===2?0:1,e.last_flush=Dn,_t._tr_init(e),Tt)}function ug(t){var e=dg(t);return e===Tt&&qj(t.state),e}function $j(t,e){return!t||!t.state||t.state.wrap!==2?ht:(t.state.gzhead=e,Tt)}function fg(t,e,n,a,r,A){if(!t)return ht;var o=1;if(e===Bj&&(e=6),a<0?(o=0,a=-a):a>15&&(o=2,a-=16),r<1||r>Sj||n!==PA||a<8||a>15||e<0||e>9||A<0||A>bj)return fn(t,ht);a===8&&(a=9);var i=new zj;return t.state=i,i.strm=t,i.wrap=o,i.gzhead=null,i.w_bits=a,i.w_size=1<sg||e<0)return t?fn(t,ht):ht;if(a=t.state,!t.output||!t.input&&t.avail_in!==0||a.status===$r&&e!==pn)return fn(t,t.avail_out===0?Pi:ht);if(a.strm=t,n=a.last_flush,a.last_flush=e,a.status===GA)if(a.wrap===2)t.adler=0,W(a,31),W(a,139),W(a,8),a.gzhead?(W(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),W(a,a.gzhead.time&255),W(a,a.gzhead.time>>8&255),W(a,a.gzhead.time>>16&255),W(a,a.gzhead.time>>24&255),W(a,a.level===9?2:a.strategy>=HA||a.level<2?4:0),W(a,a.gzhead.os&255),a.gzhead.extra&&a.gzhead.extra.length&&(W(a,a.gzhead.extra.length&255),W(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=hn(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=Oi):(W(a,0),W(a,0),W(a,0),W(a,0),W(a,0),W(a,a.level===9?2:a.strategy>=HA||a.level<2?4:0),W(a,Jj),a.status=Sn);else{var o=PA+(a.w_bits-8<<4)<<8,i=-1;a.strategy>=HA||a.level<2?i=0:a.level<6?i=1:a.level===6?i=2:i=3,o|=i<<6,a.strstart!==0&&(o|=Kj),o+=31-o%31,a.status=Sn,zr(a,o),a.strstart!==0&&(zr(a,t.adler>>>16),zr(a,t.adler&65535)),t.adler=1}if(a.status===Oi)if(a.gzhead.extra){for(r=a.pending;a.gzindex<(a.gzhead.extra.length&65535)&&!(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(t.adler=hn(t.adler,a.pending_buf,a.pending-r,r)),gn(t),r=a.pending,a.pending===a.pending_buf_size));)W(a,a.gzhead.extra[a.gzindex]&255),a.gzindex++;a.gzhead.hcrc&&a.pending>r&&(t.adler=hn(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=MA)}else a.status=MA;if(a.status===MA)if(a.gzhead.name){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(t.adler=hn(t.adler,a.pending_buf,a.pending-r,r)),gn(t),r=a.pending,a.pending===a.pending_buf_size)){A=1;break}a.gzindexr&&(t.adler=hn(t.adler,a.pending_buf,a.pending-r,r)),A===0&&(a.gzindex=0,a.status=KA)}else a.status=KA;if(a.status===KA)if(a.gzhead.comment){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(t.adler=hn(t.adler,a.pending_buf,a.pending-r,r)),gn(t),r=a.pending,a.pending===a.pending_buf_size)){A=1;break}a.gzindexr&&(t.adler=hn(t.adler,a.pending_buf,a.pending-r,r)),A===0&&(a.status=JA)}else a.status=JA;if(a.status===JA&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&gn(t),a.pending+2<=a.pending_buf_size&&(W(a,t.adler&255),W(a,t.adler>>8&255),t.adler=0,a.status=Sn)):a.status=Sn),a.pending!==0){if(gn(t),t.avail_out===0)return a.last_flush=-1,Tt}else if(t.avail_in===0&&_g(e)<=_g(n)&&e!==pn)return fn(t,Pi);if(a.status===$r&&t.avail_in!==0)return fn(t,Pi);if(t.avail_in!==0||a.lookahead!==0||e!==Dn&&a.status!==$r){var l=a.strategy===HA?Oj(a,e):a.strategy===wj?Uj(a,e):hr[a.level].func(a,e);if((l===Nn||l===gr)&&(a.status=$r),l===Be||l===Nn)return t.avail_out===0&&(a.last_flush=-1),Tt;if(l===Vr&&(e===vj?_t._tr_align(a):e!==sg&&(_t._tr_stored_block(a,0,0,!1),e===yj&&(dn(a.head),a.lookahead===0&&(a.strstart=0,a.block_start=0,a.insert=0))),gn(t),t.avail_out===0))return a.last_flush=-1,Tt}return e!==pn?Tt:a.wrap<=0?cg:(a.wrap===2?(W(a,t.adler&255),W(a,t.adler>>8&255),W(a,t.adler>>16&255),W(a,t.adler>>24&255),W(a,t.total_in&255),W(a,t.total_in>>8&255),W(a,t.total_in>>16&255),W(a,t.total_in>>24&255)):(zr(a,t.adler>>>16),zr(a,t.adler&65535)),gn(t),a.wrap>0&&(a.wrap=-a.wrap),a.pending!==0?Tt:cg)}function Wj(t){var e;return!t||!t.state?ht:(e=t.state.status,e!==GA&&e!==Oi&&e!==MA&&e!==KA&&e!==JA&&e!==Sn&&e!==$r?fn(t,ht):(t.state=null,e===Sn?fn(t,Ej):Tt))}function Zj(t,e){var n=e.length,a,r,A,o,i,l,s,c;if(!t||!t.state||(a=t.state,o=a.wrap,o===2||o===1&&a.status!==GA||a.lookahead))return ht;for(o===1&&(t.adler=hg(t.adler,e,n,0)),a.wrap=0,n>=a.w_size&&(o===0&&(dn(a.head),a.strstart=0,a.block_start=0,a.insert=0),c=new qe.Buf8(a.w_size),qe.arraySet(c,e,n-a.w_size,a.w_size,0),e=c,n=a.w_size),i=t.avail_in,l=t.next_in,s=t.input,t.avail_in=n,t.next_in=0,t.input=e,Fn(a);a.lookahead>=$;){r=a.strstart,A=a.lookahead-($-1);do a.ins_h=(a.ins_h<{"use strict";var UA=en(),Cg=!0,mg=!0;try{String.fromCharCode.apply(null,[0])}catch{Cg=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{mg=!1}var Yr=new UA.Buf8(256);for(nn=0;nn<256;nn++)Yr[nn]=nn>=252?6:nn>=248?5:nn>=240?4:nn>=224?3:nn>=192?2:1;var nn;Yr[254]=Yr[254]=1;dr.string2buf=function(t){var e,n,a,r,A,o=t.length,i=0;for(r=0;r>>6,e[A++]=128|n&63):n<65536?(e[A++]=224|n>>>12,e[A++]=128|n>>>6&63,e[A++]=128|n&63):(e[A++]=240|n>>>18,e[A++]=128|n>>>12&63,e[A++]=128|n>>>6&63,e[A++]=128|n&63);return e};function Ig(t,e){if(e<65537&&(t.subarray&&mg||!t.subarray&&Cg))return String.fromCharCode.apply(null,UA.shrinkBuf(t,e));for(var n="",a=0;a4){i[a++]=65533,n+=A-1;continue}for(r&=A===2?31:A===3?15:7;A>1&&n1){i[a++]=65533;continue}r<65536?i[a++]=r:(r-=65536,i[a++]=55296|r>>10&1023,i[a++]=56320|r&1023)}return Ig(i,a)};dr.utf8border=function(t,e){var n;for(e=e||t.length,e>t.length&&(e=t.length),n=e-1;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+Yr[t[n]]>e?n:e}});var zi=k((fk,jg)=>{"use strict";function Xj(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}jg.exports=Xj});var Bg=k(Xr=>{"use strict";var Wr=pg(),Zr=en(),Vi=qi(),Yi=TA(),ev=zi(),Eg=Object.prototype.toString,tv=0,$i=4,ur=0,vg=1,yg=2,nv=-1,rv=0,av=8;function Rn(t){if(!(this instanceof Rn))return new Rn(t);this.options=Zr.assign({level:nv,method:av,chunkSize:16384,windowBits:15,memLevel:8,strategy:rv,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ev,this.strm.avail_out=0;var n=Wr.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==ur)throw new Error(Yi[n]);if(e.header&&Wr.deflateSetHeader(this.strm,e.header),e.dictionary){var a;if(typeof e.dictionary=="string"?a=Vi.string2buf(e.dictionary):Eg.call(e.dictionary)==="[object ArrayBuffer]"?a=new Uint8Array(e.dictionary):a=e.dictionary,n=Wr.deflateSetDictionary(this.strm,a),n!==ur)throw new Error(Yi[n]);this._dict_set=!0}}Rn.prototype.push=function(t,e){var n=this.strm,a=this.options.chunkSize,r,A;if(this.ended)return!1;A=e===~~e?e:e===!0?$i:tv,typeof t=="string"?n.input=Vi.string2buf(t):Eg.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new Zr.Buf8(a),n.next_out=0,n.avail_out=a),r=Wr.deflate(n,A),r!==vg&&r!==ur)return this.onEnd(r),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(A===$i||A===yg))&&(this.options.to==="string"?this.onData(Vi.buf2binstring(Zr.shrinkBuf(n.output,n.next_out))):this.onData(Zr.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&r!==vg);return A===$i?(r=Wr.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===ur):(A===yg&&(this.onEnd(ur),n.avail_out=0),!0)};Rn.prototype.onData=function(t){this.chunks.push(t)};Rn.prototype.onEnd=function(t){t===ur&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Zr.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Wi(t,e){var n=new Rn(e);if(n.push(t,!0),n.err)throw n.msg||Yi[n.err];return n.result}function Av(t,e){return e=e||{},e.raw=!0,Wi(t,e)}function ov(t,e){return e=e||{},e.gzip=!0,Wi(t,e)}Xr.Deflate=Rn;Xr.deflate=Wi;Xr.deflateRaw=Av;Xr.gzip=ov});var wg=k((Ck,Qg)=>{"use strict";var OA=30,iv=12;Qg.exports=function(e,n){var a,r,A,o,i,l,s,c,h,_,f,m,u,g,p,I,j,E,y,b,F,T,Q,w,S;a=e.state,r=e.next_in,w=e.input,A=r+(e.avail_in-5),o=e.next_out,S=e.output,i=o-(n-e.avail_out),l=o+(e.avail_out-257),s=a.dmax,c=a.wsize,h=a.whave,_=a.wnext,f=a.window,m=a.hold,u=a.bits,g=a.lencode,p=a.distcode,I=(1<>>24,m>>>=y,u-=y,y=E>>>16&255,y===0)S[o++]=E&65535;else if(y&16){b=E&65535,y&=15,y&&(u>>=y,u-=y),u<15&&(m+=w[r++]<>>24,m>>>=y,u-=y,y=E>>>16&255,y&16){if(F=E&65535,y&=15,us){e.msg="invalid distance too far back",a.mode=OA;break e}if(m>>>=y,u-=y,y=o-i,F>y){if(y=F-y,y>h&&a.sane){e.msg="invalid distance too far back",a.mode=OA;break e}if(T=0,Q=f,_===0){if(T+=c-y,y2;)S[o++]=Q[T++],S[o++]=Q[T++],S[o++]=Q[T++],b-=3;b&&(S[o++]=Q[T++],b>1&&(S[o++]=Q[T++]))}else{T=o-F;do S[o++]=S[T++],S[o++]=S[T++],S[o++]=S[T++],b-=3;while(b>2);b&&(S[o++]=S[T++],b>1&&(S[o++]=S[T++]))}}else if((y&64)===0){E=p[(E&65535)+(m&(1<>3,r-=b,u-=b<<3,m&=(1<{"use strict";var bg=en(),fr=15,xg=852,kg=592,Sg=0,Zi=1,Ng=2,lv=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],sv=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],cv=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],_v=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Fg.exports=function(e,n,a,r,A,o,i,l){var s=l.bits,c=0,h=0,_=0,f=0,m=0,u=0,g=0,p=0,I=0,j=0,E,y,b,F,T,Q=null,w=0,S,te=new bg.Buf16(fr+1),at=new bg.Buf16(fr+1),At=null,Ct=0,on,Qt,Pt;for(c=0;c<=fr;c++)te[c]=0;for(h=0;h=1&&te[f]===0;f--);if(m>f&&(m=f),f===0)return A[o++]=1<<24|64<<16|0,A[o++]=1<<24|64<<16|0,l.bits=1,0;for(_=1;_0&&(e===Sg||f!==1))return-1;for(at[1]=0,c=1;cxg||e===Ng&&I>kg)return 1;for(;;){on=c-g,i[h]S?(Qt=At[Ct+i[h]],Pt=Q[w+i[h]]):(Qt=96,Pt=0),E=1<>g)+y]=on<<24|Qt<<16|Pt|0;while(y!==0);for(E=1<>=1;if(E!==0?(j&=E-1,j+=E):j=0,h++,--te[c]===0){if(c===f)break;c=n[a+i[h]]}if(c>m&&(j&F)!==b){for(g===0&&(g=m),T+=_,u=c-g,p=1<xg||e===Ng&&I>kg)return 1;b=j&F,A[b]=m<<24|u<<16|T-o|0}}return j!==0&&(A[T+j]=c-g<<24|64<<16|0),l.bits=m,0}});var ud=k(vt=>{"use strict";var nt=en(),al=Ki(),Mt=Ji(),hv=wg(),ea=Dg(),gv=0,od=1,id=2,Rg=4,dv=5,qA=6,Ln=0,uv=1,fv=2,gt=-2,ld=-3,Al=-4,pv=-5,Lg=8,sd=1,Tg=2,Hg=3,Mg=4,Kg=5,Jg=6,Pg=7,Gg=8,Ug=9,Og=10,VA=11,rn=12,Xi=13,qg=14,el=15,zg=16,$g=17,Vg=18,Yg=19,zA=20,$A=21,Wg=22,Zg=23,Xg=24,ed=25,td=26,tl=27,nd=28,rd=29,ce=30,ol=31,Cv=32,mv=852,Iv=592,jv=15,vv=jv;function ad(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function yv(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new nt.Buf16(320),this.work=new nt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function cd(t){var e;return!t||!t.state?gt:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=sd,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new nt.Buf32(mv),e.distcode=e.distdyn=new nt.Buf32(Iv),e.sane=1,e.back=-1,Ln)}function _d(t){var e;return!t||!t.state?gt:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,cd(t))}function hd(t,e){var n,a;return!t||!t.state||(a=t.state,e<0?(n=0,e=-e):(n=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?gt:(a.window!==null&&a.wbits!==e&&(a.window=null),a.wrap=n,a.wbits=e,_d(t))}function gd(t,e){var n,a;return t?(a=new yv,t.state=a,a.window=null,n=hd(t,e),n!==Ln&&(t.state=null),n):gt}function Ev(t){return gd(t,vv)}var Ad=!0,nl,rl;function Bv(t){if(Ad){var e;for(nl=new nt.Buf32(512),rl=new nt.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ea(od,t.lens,0,288,nl,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ea(id,t.lens,0,32,rl,0,t.work,{bits:5}),Ad=!1}t.lencode=nl,t.lenbits=9,t.distcode=rl,t.distbits=5}function dd(t,e,n,a){var r,A=t.state;return A.window===null&&(A.wsize=1<=A.wsize?(nt.arraySet(A.window,e,n-A.wsize,A.wsize,0),A.wnext=0,A.whave=A.wsize):(r=A.wsize-A.wnext,r>a&&(r=a),nt.arraySet(A.window,e,n-a,r,A.wnext),a-=r,a?(nt.arraySet(A.window,e,n-a,a,0),A.wnext=a,A.whave=A.wsize):(A.wnext+=r,A.wnext===A.wsize&&(A.wnext=0),A.whave>>8&255,n.check=Mt(n.check,Q,2,0),s=0,c=0,n.mode=Tg;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((s&255)<<8)+(s>>8))%31){t.msg="incorrect header check",n.mode=ce;break}if((s&15)!==Lg){t.msg="unknown compression method",n.mode=ce;break}if(s>>>=4,c-=4,F=(s&15)+8,n.wbits===0)n.wbits=F;else if(F>n.wbits){t.msg="invalid window size",n.mode=ce;break}n.dmax=1<>8&1),n.flags&512&&(Q[0]=s&255,Q[1]=s>>>8&255,n.check=Mt(n.check,Q,2,0)),s=0,c=0,n.mode=Hg;case Hg:for(;c<32;){if(i===0)break e;i--,s+=a[A++]<>>8&255,Q[2]=s>>>16&255,Q[3]=s>>>24&255,n.check=Mt(n.check,Q,4,0)),s=0,c=0,n.mode=Mg;case Mg:for(;c<16;){if(i===0)break e;i--,s+=a[A++]<>8),n.flags&512&&(Q[0]=s&255,Q[1]=s>>>8&255,n.check=Mt(n.check,Q,2,0)),s=0,c=0,n.mode=Kg;case Kg:if(n.flags&1024){for(;c<16;){if(i===0)break e;i--,s+=a[A++]<>>8&255,n.check=Mt(n.check,Q,2,0)),s=0,c=0}else n.head&&(n.head.extra=null);n.mode=Jg;case Jg:if(n.flags&1024&&(f=n.length,f>i&&(f=i),f&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),nt.arraySet(n.head.extra,a,A,f,F)),n.flags&512&&(n.check=Mt(n.check,a,f,A)),i-=f,A+=f,n.length-=f),n.length))break e;n.length=0,n.mode=Pg;case Pg:if(n.flags&2048){if(i===0)break e;f=0;do F=a[A+f++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F));while(F&&f>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=rn;break;case Og:for(;c<32;){if(i===0)break e;i--,s+=a[A++]<>>=c&7,c-=c&7,n.mode=tl;break}for(;c<3;){if(i===0)break e;i--,s+=a[A++]<>>=1,c-=1,s&3){case 0:n.mode=qg;break;case 1:if(Bv(n),n.mode=zA,e===qA){s>>>=2,c-=2;break e}break;case 2:n.mode=$g;break;case 3:t.msg="invalid block type",n.mode=ce}s>>>=2,c-=2;break;case qg:for(s>>>=c&7,c-=c&7;c<32;){if(i===0)break e;i--,s+=a[A++]<>>16^65535)){t.msg="invalid stored block lengths",n.mode=ce;break}if(n.length=s&65535,s=0,c=0,n.mode=el,e===qA)break e;case el:n.mode=zg;case zg:if(f=n.length,f){if(f>i&&(f=i),f>l&&(f=l),f===0)break e;nt.arraySet(r,a,A,f,o),i-=f,A+=f,l-=f,o+=f,n.length-=f;break}n.mode=rn;break;case $g:for(;c<14;){if(i===0)break e;i--,s+=a[A++]<>>=5,c-=5,n.ndist=(s&31)+1,s>>>=5,c-=5,n.ncode=(s&15)+4,s>>>=4,c-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=ce;break}n.have=0,n.mode=Vg;case Vg:for(;n.have>>=3,c-=3}for(;n.have<19;)n.lens[te[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,w={bits:n.lenbits},T=ea(gv,n.lens,0,19,n.lencode,0,n.work,w),n.lenbits=w.bits,T){t.msg="invalid code lengths set",n.mode=ce;break}n.have=0,n.mode=Yg;case Yg:for(;n.have>>24,I=g>>>16&255,j=g&65535,!(p<=c);){if(i===0)break e;i--,s+=a[A++]<>>=p,c-=p,n.lens[n.have++]=j;else{if(j===16){for(S=p+2;c>>=p,c-=p,n.have===0){t.msg="invalid bit length repeat",n.mode=ce;break}F=n.lens[n.have-1],f=3+(s&3),s>>>=2,c-=2}else if(j===17){for(S=p+3;c>>=p,c-=p,F=0,f=3+(s&7),s>>>=3,c-=3}else{for(S=p+7;c>>=p,c-=p,F=0,f=11+(s&127),s>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=ce;break}for(;f--;)n.lens[n.have++]=F}}if(n.mode===ce)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=ce;break}if(n.lenbits=9,w={bits:n.lenbits},T=ea(od,n.lens,0,n.nlen,n.lencode,0,n.work,w),n.lenbits=w.bits,T){t.msg="invalid literal/lengths set",n.mode=ce;break}if(n.distbits=6,n.distcode=n.distdyn,w={bits:n.distbits},T=ea(id,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,w),n.distbits=w.bits,T){t.msg="invalid distances set",n.mode=ce;break}if(n.mode=zA,e===qA)break e;case zA:n.mode=$A;case $A:if(i>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=A,t.avail_in=i,n.hold=s,n.bits=c,hv(t,_),o=t.next_out,r=t.output,l=t.avail_out,A=t.next_in,a=t.input,i=t.avail_in,s=n.hold,c=n.bits,n.mode===rn&&(n.back=-1);break}for(n.back=0;g=n.lencode[s&(1<>>24,I=g>>>16&255,j=g&65535,!(p<=c);){if(i===0)break e;i--,s+=a[A++]<>E)],p=g>>>24,I=g>>>16&255,j=g&65535,!(E+p<=c);){if(i===0)break e;i--,s+=a[A++]<>>=E,c-=E,n.back+=E}if(s>>>=p,c-=p,n.back+=p,n.length=j,I===0){n.mode=td;break}if(I&32){n.back=-1,n.mode=rn;break}if(I&64){t.msg="invalid literal/length code",n.mode=ce;break}n.extra=I&15,n.mode=Wg;case Wg:if(n.extra){for(S=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Zg;case Zg:for(;g=n.distcode[s&(1<>>24,I=g>>>16&255,j=g&65535,!(p<=c);){if(i===0)break e;i--,s+=a[A++]<>E)],p=g>>>24,I=g>>>16&255,j=g&65535,!(E+p<=c);){if(i===0)break e;i--,s+=a[A++]<>>=E,c-=E,n.back+=E}if(s>>>=p,c-=p,n.back+=p,I&64){t.msg="invalid distance code",n.mode=ce;break}n.offset=j,n.extra=I&15,n.mode=Xg;case Xg:if(n.extra){for(S=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=ce;break}n.mode=ed;case ed:if(l===0)break e;if(f=_-l,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=ce;break}f>n.wnext?(f-=n.wnext,m=n.wsize-f):m=n.wnext-f,f>n.length&&(f=n.length),u=n.window}else u=r,m=o-n.offset,f=n.length;f>l&&(f=l),l-=f,n.length-=f;do r[o++]=u[m++];while(--f);n.length===0&&(n.mode=$A);break;case td:if(l===0)break e;r[o++]=n.length,l--,n.mode=$A;break;case tl:if(n.wrap){for(;c<32;){if(i===0)break e;i--,s|=a[A++]<{"use strict";fd.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var Cd=k((vk,pd)=>{"use strict";function kv(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}pd.exports=kv});var jd=k(ra=>{"use strict";var ta=ud(),na=en(),YA=qi(),ve=il(),Id=TA(),Sv=zi(),Nv=Cd(),md=Object.prototype.toString;function Tn(t){if(!(this instanceof Tn))return new Tn(t);this.options=na.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Sv,this.strm.avail_out=0;var n=ta.inflateInit2(this.strm,e.windowBits);if(n!==ve.Z_OK)throw new Error(Id[n]);this.header=new Nv,ta.inflateGetHeader(this.strm,this.header)}Tn.prototype.push=function(t,e){var n=this.strm,a=this.options.chunkSize,r=this.options.dictionary,A,o,i,l,s,c,h=!1;if(this.ended)return!1;o=e===~~e?e:e===!0?ve.Z_FINISH:ve.Z_NO_FLUSH,typeof t=="string"?n.input=YA.binstring2buf(t):md.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new na.Buf8(a),n.next_out=0,n.avail_out=a),A=ta.inflate(n,ve.Z_NO_FLUSH),A===ve.Z_NEED_DICT&&r&&(typeof r=="string"?c=YA.string2buf(r):md.call(r)==="[object ArrayBuffer]"?c=new Uint8Array(r):c=r,A=ta.inflateSetDictionary(this.strm,c)),A===ve.Z_BUF_ERROR&&h===!0&&(A=ve.Z_OK,h=!1),A!==ve.Z_STREAM_END&&A!==ve.Z_OK)return this.onEnd(A),this.ended=!0,!1;n.next_out&&(n.avail_out===0||A===ve.Z_STREAM_END||n.avail_in===0&&(o===ve.Z_FINISH||o===ve.Z_SYNC_FLUSH))&&(this.options.to==="string"?(i=YA.utf8border(n.output,n.next_out),l=n.next_out-i,s=YA.buf2string(n.output,i),n.next_out=l,n.avail_out=a-l,l&&na.arraySet(n.output,n.output,i,l,0),this.onData(s)):this.onData(na.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(h=!0)}while((n.avail_in>0||n.avail_out===0)&&A!==ve.Z_STREAM_END);return A===ve.Z_STREAM_END&&(o=ve.Z_FINISH),o===ve.Z_FINISH?(A=ta.inflateEnd(this.strm),this.onEnd(A),this.ended=!0,A===ve.Z_OK):(o===ve.Z_SYNC_FLUSH&&(this.onEnd(ve.Z_OK),n.avail_out=0),!0)};Tn.prototype.onData=function(t){this.chunks.push(t)};Tn.prototype.onEnd=function(t){t===ve.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=na.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function ll(t,e){var n=new Tn(e);if(n.push(t,!0),n.err)throw n.msg||Id[n.err];return n.result}function Fv(t,e){return e=e||{},e.raw=!0,ll(t,e)}ra.Inflate=Tn;ra.inflate=ll;ra.inflateRaw=Fv;ra.ungzip=ll});var Ed=k((Ek,yd)=>{"use strict";var Dv=en().assign,Rv=Bg(),Lv=jd(),Tv=il(),vd={};Dv(vd,Rv,Lv,Tv);yd.exports=vd});var Bd=k(WA=>{(function(t){var e=String.fromCharCode;function n(a,r,A){for(var o=a[r],i=1,l=0,s=0;s=32&&o<=126?"Unexpected character "+e(o)+" in JSON at position "+r+" (line "+i+", column "+l+")":"Unexpected byte 0x"+o.toString(16)+" in JSON at position "+r+" (line "+i+", column "+l+")"))}t.JSON_parse=function(a){if(!(a instanceof Uint8Array))throw new Error("JSON input must be a Uint8Array");for(var r=[],A=[],o=[],i=a.length,l=null,s=0,c,h=0;h=i&&n(a,i),_=a[h++],_!==34;)if(_===92)switch(a[h++]){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+=` +`;break;case 114:f+="\r";break;case 116:f+=" ";break;case 117:{for(var u=0,g=0;g<4;g++)_=a[h++],u<<=4,_>=48&&_<=57?u|=_-48:_>=97&&_<=102?u|=_+-87:_>=65&&_<=70?u|=_+-55:n(a,--h);f+=e(u);break}default:n(a,--h);break}else if(_<=127)f+=e(_);else if((_&224)===192)f+=e((_&31)<<6|a[h++]&63);else if((_&240)===224)f+=e((_&15)<<12|(a[h++]&63)<<6|a[h++]&63);else if((_&248)==240){var p=(_&7)<<18|(a[h++]&63)<<12|(a[h++]&63)<<6|a[h++]&63;p>65535&&(p-=65536,f+=e(p>>10&1023|55296),p=56320|p&1023),f+=e(p)}f[0];break}case 91:{f=[],r.push(l),A.push(c),o.push(s),l=null,c=f,s=1;continue}case 123:{f={},r.push(l),A.push(c),o.push(s),l=null,c=f,s=2;continue}case 93:{s!==1&&n(a,--h),f=c,l=r.pop(),c=A.pop(),s=o.pop();break}case 125:{s!==2&&n(a,--h),f=c,l=r.pop(),c=A.pop(),s=o.pop();break}default:n(a,--h)}for(_=a[h];_<=32;)_=a[++h];switch(s){case 0:{if(h===i)return f;break}case 1:{if(c.push(f),_===44){h++;continue}if(_===93)continue;break}case 2:{if(l===null){if(l=f,_===58){h++;continue}}else{if(c[l]=f,l=null,_===44){h++;continue}if(_===125)continue}break}}break}}n(a,h)}})(WA)});function bd(t){return t=t.trim(),t[0]==="["&&(t=t.replace(/,\s*$/,""),t[t.length-1]!=="]"&&(t+="]")),JSON.parse(t)}function Hv(t){let e=0;for(let n=0;n0&&/\s/.exec(String.fromCharCode(t[n-1]));)n--;if(String.fromCharCode(t[n-1])===","&&n--,String.fromCharCode(t[n-1])!=="]"){let a=new Uint8Array(n+1);a.set(t.subarray(0,n)),a[n]=93,t=a}}return(0,wd.JSON_parse)(t)}var Qd,wd,ZA,sl,cl,XA,an,_l=re(()=>{"use strict";Qd=he(Ed()),wd=he(Bd()),ZA=1<<27;sl=class{constructor(e){this.chunks=[];let n=this.byteArray=new Uint8Array(e),a="utf-8";if(n.length>2&&(n[0]===255&&n[1]===254?a="utf-16le":n[0]===254&&n[1]===255&&(a="utf-16be")),typeof TextDecoder<"u"){let r=new TextDecoder(a);for(let A=0;A=ZA&&this.chunks.push("")}}splitLines(){let e=function*(){let n="";for(let a of this.chunks){let r=a.split(` +`);for(let A=0;A{try{return Qd.inflate(new Uint8Array(a)).buffer}catch{return a}})}async name(){return await this.namePromise}async readAsArrayBuffer(){return await this.uncompressedData}async readAsText(){let e=await this.readAsArrayBuffer();return new sl(e)}static fromFile(e){let n=new Promise(a=>{let r=new FileReader;r.addEventListener("loadend",()=>{if(!(r.result instanceof ArrayBuffer))throw new Error("Expected reader.result to be an instance of ArrayBuffer");a(r.result)}),r.readAsArrayBuffer(e)});return new t(Promise.resolve(e.name),n)}static fromArrayBuffer(e,n){return new t(Promise.resolve(e),Promise.resolve(n))}}});function Mv(t){let e=[...t.splitLines()].map(A=>A.split(" ")),n=e.shift();if(!n)return[];let a=new Map;for(let A=0;A0;){let o=a.pop();r=Math.max(r,o.endValue),e.leaveFrame(o,r)}return"Bytes Used"in n[0]?e.setValueFormatter(new $e):("Weight"in n[0]||"Running Time"in n[0])&&e.setValueFormatter(new ee("milliseconds")),e.build()}async function kd(t){let e={name:t.name,files:new Map,subdirectories:new Map},n=await new Promise((a,r)=>{t.createReader().readEntries(A=>{a(A)},r)});for(let a of n)if(a.isDirectory){let r=await kd(a);e.subdirectories.set(r.name,r)}else{let r=await new Promise((A,o)=>{a.file(A,o)});e.files.set(r.name,r)}return e}function eo(t){return an.fromFile(t).readAsArrayBuffer()}function Jv(t){return an.fromFile(t).readAsText()}function Pv(t,e){let n=et(t.subdirectories,"corespace"),a=et(n.subdirectories,`run${e}`);return et(a.subdirectories,"core")}async function Gv(t){let e=et(t.subdirectories,"stores");for(let n of e.subdirectories.values()){let a=n.files.get("schema.xml");if(!a)continue;let r=await Jv(a);if(!/name="time-profile"/.exec(r.firstChunk()))continue;let A=new aa(await eo(et(n.files,"bulkstore")));A.readUint32(),A.readUint32(),A.readUint32();let o=A.readUint32(),i=A.readUint32();A.seek(o);let l=[];for(;;){let s=A.readUint48();if(s===0)break;let c=A.readUint32();A.skip(i-6-4-4);let h=A.readUint32();l.push({timestamp:s,threadID:c,backtraceID:h})}return l}throw new Error("Could not find sample list")}async function Uv(t,e){let n=et(e.subdirectories,"uniquing"),a=et(n.subdirectories,"arrayUniquer"),r=et(a.files,"integeruniquer.index"),A=et(a.files,"integeruniquer.data"),o=new aa(await eo(r)),i=new aa(await eo(A));o.seek(32);let l=[];for(;o.hasMore();){let s=o.readUint32()+o.readUint32()*1048576;if(s===0)continue;i.seek(s);let c=i.readUint32(),h=[];for(;c--;)h.push(i.readUint64());l.push(h)}return l}async function Ov(t){let e=et(t.files,"form.template"),n=$v(await eo(e)),a=n["com.apple.xray.owner.template.version"],r=1;"com.apple.xray.owner.template"in n&&(r=n["com.apple.xray.owner.template"].get("_selectedRunNumber"));let A=n.$1;"stubInfoByUUID"in n&&(A=Array.from(n.stubInfoByUUID.keys())[0]);let o=n["com.apple.xray.run.data"],i=[];for(let l of o.runNumbers){let s=et(o.runData,l),c=et(s,"symbolsByPid"),h=new Map;for(let _ of c.values()){for(let f of _.symbols){if(!f)continue;let{sourcePath:m,symbolName:u,addressToLine:g}=f;for(let p of g.keys())De(h,p,()=>{let I=u||`0x${ln(p.toString(16),16)}`,j={key:`${m}:${I}`,name:I};return m&&(j.file=m),j})}i.push({number:l,addressToFrameMap:h})}}return{version:a,instrument:A,selectedRunNumber:r,runs:i}}async function Sd(t){let e=await kd(t),{version:n,runs:a,instrument:r,selectedRunNumber:A}=await Ov(e);if(r!=="com.apple.xray.instrument-type.coresampler2")throw new Error(`The only supported instrument from .trace import is "com.apple.xray.instrument-type.coresampler2". Got ${r}`);console.log("version: ",n),console.log("Importing time profile");let o=[],i=0;for(let l of a){let{addressToFrameMap:s,number:c}=l,h=await qv({fileName:t.name,tree:e,addressToFrameMap:s,runNumber:c});l.number===A&&(i=o.length+h.indexToView),o.push(...h.profiles)}return{name:t.name,indexToView:i,profiles:o}}async function qv(t){let{fileName:e,tree:n,addressToFrameMap:a,runNumber:r}=t,A=Pv(n,r),o=await Gv(A),i=await Uv(o,A),l=new Map;for(let h of o)l.set(h.threadID,ja(l,h.threadID,()=>0)+1);let s=Array.from(l.entries());Fe(s,h=>-h[1]);let c=s.map(h=>h[0]);return{name:e,indexToView:0,profiles:c.map(h=>zv({threadID:h,fileName:e,arrays:i,addressToFrameMap:a,samples:o}))}}function zv(t){let{fileName:e,addressToFrameMap:n,arrays:a,threadID:r,samples:A}=t,o=new Map;A=A.filter(c=>c.threadID===r);let i=new ae(Ae(A).timestamp);i.setName(`${e} - thread ${r}`);function l(c,h){let _=n.get(c);if(_)h.push(_);else if(c in a)for(let f of a[c])l(f,h);else{let f={key:c,name:`0x${ln(c.toString(16),16)}`};n.set(c,f),h.push(f)}}let s=null;for(let c of A){let h=De(o,c.backtraceID,_=>{let f=[];return l(_,f),f.reverse(),f});if(s===null&&(i.appendSampleWithWeight([],c.timestamp),s=c.timestamp),c.timestamp{switch(r){case"NSTextStorage":case"NSParagraphStyle":case"NSFont":return null;case"PFTSymbolData":{let o=Object.create(null);o.symbolName=A.$0,o.sourcePath=A.$1,o.addressToLine=new Map;for(let i=3;;i+=2){let l=A["$"+i],s=A["$"+(i+1)];if(l==null||s==null)break;o.addressToLine.set(l,s)}return o}case"PFTOwnerData":{let o=Object.create(null);return o.ownerName=A.$0,o.ownerPath=A.$1,o}case"PFTPersistentSymbols":{let o=Object.create(null),i=A.$4;o.threadNames=A.$3,o.symbols=[];for(let l=1;ln){if(t.$version!==1e5||t.$archiver!=="NSKeyedArchiver"||!hl(t.$top)||!xd(t.$objects))throw new Error("Invalid keyed archive");t.$objects[0]==="$null"&&(t.$objects[0]=null);for(let a=0;a{if(a instanceof Aa)return t.$objects[a.index];if(xd(a))for(let r=0;ra){if(hl(e)&&e.$class){let a=Yv(t,e.$class).$classname;switch(a){case"NSDecimalNumberPlaceholder":{let i=e["NS.length"],l=e["NS.exponent"],s=e["NS.mantissa.bo"],c=e["NS.negative"],h=new Uint16Array(new Uint8Array(e["NS.mantissa"]).buffer),_=0;for(let f=0;f>8|(m&255)<<8),_+=m*Math.pow(65536,f)}return _*=Math.pow(10,l),c?-_:_}case"NSData":case"NSMutableData":return e["NS.bytes"]||e["NS.data"];case"NSString":case"NSMutableString":return e["NS.string"]?e["NS.string"]:e["NS.bytes"]?Vv(e["NS.bytes"]):(console.warn(`Unexpected ${a} format: `,e),null);case"NSArray":case"NSMutableArray":if("NS.objects"in e)return e["NS.objects"];let r=[];for(;;){let i="NS.object."+r.length;if(!(i in e))break;r.push(e[i])}return r;case"_NSKeyedCoderOldStyleArray":{let i=e["NS.count"],l=[];for(let s=0;s{"use strict";ke();V();Ke();_l();aa=class{constructor(e){this.bytePos=0;this.view=new DataView(e)}seek(e){this.bytePos=e}skip(e){this.bytePos+=e}hasMore(){return this.bytePosthis.view.byteLength?0:this.view.getUint8(this.bytePos-1)}readUint32(){return this.bytePos+=4,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-4,!0)}readUint48(){return this.bytePos+=6,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-6,!0)+this.view.getUint16(this.bytePos-2,!0)*Math.pow(2,32)}readUint64(){return this.bytePos+=8,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-8,!0)+this.view.getUint32(this.bytePos-4,!0)*Math.pow(2,32)}};Aa=class{constructor(e){this.index=e}};gl=class{constructor(e){this.view=e;this.referenceSize=0;this.objects=[];this.offsetTable=[]}parseRoot(){let e=this.view.byteLength-32,n=this.view.getUint8(e+6);this.referenceSize=this.view.getUint8(e+7);let a=this.view.getUint32(e+12,!1),r=this.view.getUint32(e+20,!1),A=this.view.getUint32(e+28,!1);for(let o=0;o>4){case 0:return this.parseSingleton(e,a);case 1:return this.parseInteger(e,1<({key:o,name:o})),duration:parseInt(A,10)})}return e}function ul(t){let e=ey(t),n=e.reduce((r,A)=>r+A.duration,0),a=new ae(n);if(e.length===0)return null;for(let r of e)a.appendSampleWithWeight(r.stack,r.duration);return a.build()}var Fd=re(()=>{"use strict";ke()});function Dd(t){let e=t.profile,n=e.threads.length===1?e.threads[0]:e.threads.filter(i=>i.name==="GeckoMain")[0],a=new Map;function r(i){let l=i[0],s=[];for(;l!=null;){let c=n.stackTable.data[l],[h,_]=c;s.push(_),l=h}return s.reverse(),s.map(c=>{let h=n.frameTable.data[c],_=n.stringTable[h[0]],f=/(.*)\s+\((.*?)(?::(\d+))?(?::(\d+))?\)$/.exec(_);return!f||f[2].startsWith("resource:")||f[2]==="self-hosted"||f[2].startsWith("self-hosted:")?null:De(a,_,()=>({key:_,name:f[1],file:f[2],line:f[3]?parseInt(f[3]):void 0,col:f[4]?parseInt(f[4])+1:void 0}))}).filter(c=>c!=null)}let A=new Ie(t.duration),o=[];for(let i of n.samples.data){let l=r(i),s=i[1],c=-1;for(let h=0;hc;h--)A.leaveFrame(o[h],s);for(let h=c+1;h{"use strict";ke();V();Ke()});function ty(t,e){if(!t||!t.type)return{key:"(unknown type)",name:"(unknown type)"};let n=t.name;switch(t.type){case"CPP":{let a=n.match(/[tT] ([^(<]*)/);a&&(n=`(c++) ${a[1]}`);break}case"SHARED_LIB":n="(LIB) "+n;break;case"JS":{let a=n.match(/([a-zA-Z0-9\._\-$]*) ([a-zA-Z0-9\.\-_\/$]*):(\d+):(\d+)/);if(a){let r=a[2],A=parseInt(a[3],10),o=parseInt(a[4],10),i=a[1].length>0?a[1]:r?`(anonymous ${r.split("/").pop()}:${A})`:"(anonymous)";return{key:n,name:i,file:r.length>0?r:"(unknown file)",line:A,col:o}}break}case"CODE":{switch(t.kind){case"LoadIC":case"StoreIC":case"KeyedStoreIC":case"KeyedLoadIC":case"LoadGlobalIC":case"Handler":n="(IC) "+n;break;case"BytecodeHandler":n="(bytecode) ~"+n;break;case"Stub":n="(stub) "+n;break;case"Builtin":n="(builtin) "+n;break;case"RegExp":n="(regexp) "+n;break}break}default:{n=`(${t.type}) ${n}`;break}}return{key:n,name:n}}function fl(t){let e=new ae,n=new Map;function a(A){return De(n,A,o=>{let i=t.code[o];return ty(i,t)})}let r=0;Fe(t.ticks,A=>A.tm);for(let A of t.ticks){let o=[];for(let i=A.s.length-2;i>=0;i-=2){let l=A.s[i];if(l!==-1){if(l>t.code.length){o.push({key:l,name:`0x${l.toString(16)}`});continue}o.push(a(l))}}e.appendSampleWithWeight(o,A.tm-r),r=A.tm}return e.setValueFormatter(new ee("microseconds")),e.build()}var Ld=re(()=>{"use strict";ke();V();Ke()});function*ny(t){let e=[];for(let n of t.splitLines())n===""?(yield Td(e),e=[]):e.push(n);e.length>0&&(yield Td(e))}function Td(t){let e=t.filter(i=>!/^\s*#/.exec(i)),n={command:null,processID:null,threadID:null,time:null,eventType:"",stack:[]},a=e.shift();if(!a)return null;let r=/^(\S.+?)\s+(\d+)(?:\/?(\d+))?\s+/.exec(a);if(!r)return null;n.command=r[1],r[3]?(n.processID=parseInt(r[2],10),n.threadID=parseInt(r[3],10)):n.threadID=parseInt(r[2],10);let A=/\s+(\d+\.\d+):\s+/.exec(a);A&&(n.time=parseFloat(A[1]));let o=/(\S+):\s*$/.exec(a);o&&(n.eventType=o[1]);for(let i of e){let l=/^\s*(\w+)\s*(.+) \((\S*)\)/.exec(i);if(!l)continue;let[,s,c,h]=l;c=c.replace(/\+0x[\da-f]+$/,""),n.stack.push({address:`0x${s}`,symbolName:c,file:h})}return n.stack.reverse(),n}function pl(t){let e=new Map,n=null;for(let a of ny(t)){if(a==null||n!=null&&n!=a.eventType||a.time==null)continue;n=a.eventType;let r=[];a.command&&r.push(a.command),a.processID&&r.push(`pid: ${a.processID}`),a.threadID&&r.push(`tid: ${a.threadID}`);let A=r.join(" ");De(e,A,()=>{let l=new ae;return l.setName(A),l.setValueFormatter(new ee("seconds")),l}).appendSampleWithTimestamp(a.stack.map(({symbolName:l,file:s})=>({key:`${l} (${s})`,name:l==="[unknown]"?`??? (${s})`:l,file:s})),a.time)}return e.size===0?null:{name:e.size===1?Array.from(e.keys())[0]:"",indexToView:0,profiles:Array.from(os(e.values(),a=>a.build()))}}var Hd=re(()=>{"use strict";ke();V();Ke()});function Cl(t,e,n,a,r){if(t.ticks===0&&t.entries===0&&t.alloc===0&&t.children.length===0)return e;let A=e,o=a.get(t.id);n.enterFrame(o,A);for(let i of t.children)A=Cl(i,A,n,a,r);return A+=r(t),n.leaveFrame(o,A),A}function Md(t){let e=new Map;for(let r of t.cost_centres){let A={key:r.id,name:`${r.module}.${r.label}`};r.src_loc.startsWith("<")||(A.file=r.src_loc),e.set(r.id,A)}let n=new Ie(t.total_ticks);Cl(t.profile,0,n,e,r=>r.ticks),n.setValueFormatter(new ee("milliseconds")),n.setName(`${t.program} time`);let a=new Ie(t.total_ticks);return Cl(t.profile,0,a,e,r=>r.alloc),a.setValueFormatter(new $e),a.setName(`${t.program} allocation`),{name:t.program,indexToView:0,profiles:[n.build(),a.build()]}}var Kd=re(()=>{"use strict";ke();Ke()});function ry(t){return t.map(({name:e,url:n,line:a,column:r})=>({key:`${e}:${n}:${a}:${r}`,file:n,line:a,col:r,name:e||(n?`(anonymous ${n.split("/").pop()}:${a})`:"(anonymous)")})).reverse()}function ml(t){t.version!==1&&console.warn(`Unknown Safari profile version ${t.version}... Might be incompatible.`);let{recording:e}=t,{sampleStackTraces:n,sampleDurations:a}=e,r=n.length;if(r<1)return console.warn("Empty profile"),null;let A=n[r-1].timestamp-n[0].timestamp+a[0],o=new ae(A),i=Number.MAX_VALUE;return n.forEach((l,s)=>{let c=l.timestamp,h=a[s],f=c-h-i;f>.002&&o.appendSampleWithWeight([],f),o.appendSampleWithWeight(ry(l.stackFrames),h),i=c}),o.setValueFormatter(new ee("seconds")),o.setName(e.displayName),o.build()}var Jd=re(()=>{"use strict";ke();Ke()});var Gd=k((gS,Pd)=>{"use strict";Pd.exports=ay;function ay(t,e){for(var n=new Array(arguments.length-1),a=0,r=2,A=!0;r{"use strict";var to=qd;to.length=function(e){var n=e.length;if(!n)return 0;for(var a=0;--n%4>1&&e.charAt(n)==="=";)++a;return Math.ceil(e.length*3)/4-a};var pr=new Array(64),Od=new Array(123);for(yt=0;yt<64;)Od[pr[yt]=yt<26?yt+65:yt<52?yt+71:yt<62?yt-4:yt-59|43]=yt++;var yt;to.encode=function(e,n,a){for(var r=null,A=[],o=0,i=0,l;n>2],l=(s&3)<<4,i=1;break;case 1:A[o++]=pr[l|s>>4],l=(s&15)<<2,i=2;break;case 2:A[o++]=pr[l|s>>6],A[o++]=pr[s&63],i=0;break}o>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,A)),o=0)}return i&&(A[o++]=pr[l],A[o++]=61,i===1&&(A[o++]=61)),r?(o&&r.push(String.fromCharCode.apply(String,A.slice(0,o))),r.join("")):String.fromCharCode.apply(String,A.slice(0,o))};var Ud="invalid encoding";to.decode=function(e,n,a){for(var r=a,A=0,o,i=0;i1)break;if((l=Od[l])===void 0)throw Error(Ud);switch(A){case 0:o=l,A=1;break;case 1:n[a++]=o<<2|(l&48)>>4,o=l,A=2;break;case 2:n[a++]=(o&15)<<4|(l&60)>>2,o=l,A=3;break;case 3:n[a++]=(o&3)<<6|l,A=0;break}}if(A===1)throw Error(Ud);return a-r};to.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var Vd=k((uS,$d)=>{"use strict";$d.exports=no;function no(){this._listeners={}}no.prototype.on=function(e,n,a){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:n,ctx:a||this}),this};no.prototype.off=function(e,n){if(e===void 0)this._listeners={};else if(n===void 0)this._listeners[e]=[];else for(var a=this._listeners[e],r=0;r{"use strict";tu.exports=Yd(Yd);function Yd(t){return typeof Float32Array<"u"?(function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),a=n[3]===128;function r(l,s,c){e[0]=l,s[c]=n[0],s[c+1]=n[1],s[c+2]=n[2],s[c+3]=n[3]}function A(l,s,c){e[0]=l,s[c]=n[3],s[c+1]=n[2],s[c+2]=n[1],s[c+3]=n[0]}t.writeFloatLE=a?r:A,t.writeFloatBE=a?A:r;function o(l,s){return n[0]=l[s],n[1]=l[s+1],n[2]=l[s+2],n[3]=l[s+3],e[0]}function i(l,s){return n[3]=l[s],n[2]=l[s+1],n[1]=l[s+2],n[0]=l[s+3],e[0]}t.readFloatLE=a?o:i,t.readFloatBE=a?i:o})():(function(){function e(a,r,A,o){var i=r<0?1:0;if(i&&(r=-r),r===0)a(1/r>0?0:2147483648,A,o);else if(isNaN(r))a(2143289344,A,o);else if(r>34028234663852886e22)a((i<<31|2139095040)>>>0,A,o);else if(r<11754943508222875e-54)a((i<<31|Math.round(r/1401298464324817e-60))>>>0,A,o);else{var l=Math.floor(Math.log(r)/Math.LN2),s=Math.round(r*Math.pow(2,-l)*8388608)&8388607;a((i<<31|l+127<<23|s)>>>0,A,o)}}t.writeFloatLE=e.bind(null,Wd),t.writeFloatBE=e.bind(null,Zd);function n(a,r,A){var o=a(r,A),i=(o>>31)*2+1,l=o>>>23&255,s=o&8388607;return l===255?s?NaN:i*(1/0):l===0?i*1401298464324817e-60*s:i*Math.pow(2,l-150)*(s+8388608)}t.readFloatLE=n.bind(null,Xd),t.readFloatBE=n.bind(null,eu)})(),typeof Float64Array<"u"?(function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),a=n[7]===128;function r(l,s,c){e[0]=l,s[c]=n[0],s[c+1]=n[1],s[c+2]=n[2],s[c+3]=n[3],s[c+4]=n[4],s[c+5]=n[5],s[c+6]=n[6],s[c+7]=n[7]}function A(l,s,c){e[0]=l,s[c]=n[7],s[c+1]=n[6],s[c+2]=n[5],s[c+3]=n[4],s[c+4]=n[3],s[c+5]=n[2],s[c+6]=n[1],s[c+7]=n[0]}t.writeDoubleLE=a?r:A,t.writeDoubleBE=a?A:r;function o(l,s){return n[0]=l[s],n[1]=l[s+1],n[2]=l[s+2],n[3]=l[s+3],n[4]=l[s+4],n[5]=l[s+5],n[6]=l[s+6],n[7]=l[s+7],e[0]}function i(l,s){return n[7]=l[s],n[6]=l[s+1],n[5]=l[s+2],n[4]=l[s+3],n[3]=l[s+4],n[2]=l[s+5],n[1]=l[s+6],n[0]=l[s+7],e[0]}t.readDoubleLE=a?o:i,t.readDoubleBE=a?i:o})():(function(){function e(a,r,A,o,i,l){var s=o<0?1:0;if(s&&(o=-o),o===0)a(0,i,l+r),a(1/o>0?0:2147483648,i,l+A);else if(isNaN(o))a(0,i,l+r),a(2146959360,i,l+A);else if(o>17976931348623157e292)a(0,i,l+r),a((s<<31|2146435072)>>>0,i,l+A);else{var c;if(o<22250738585072014e-324)c=o/5e-324,a(c>>>0,i,l+r),a((s<<31|c/4294967296)>>>0,i,l+A);else{var h=Math.floor(Math.log(o)/Math.LN2);h===1024&&(h=1023),c=o*Math.pow(2,-h),a(c*4503599627370496>>>0,i,l+r),a((s<<31|h+1023<<20|c*1048576&1048575)>>>0,i,l+A)}}}t.writeDoubleLE=e.bind(null,Wd,0,4),t.writeDoubleBE=e.bind(null,Zd,4,0);function n(a,r,A,o,i){var l=a(o,i+r),s=a(o,i+A),c=(s>>31)*2+1,h=s>>>20&2047,_=4294967296*(s&1048575)+l;return h===2047?_?NaN:c*(1/0):h===0?c*5e-324*_:c*Math.pow(2,h-1075)*(_+4503599627370496)}t.readDoubleLE=n.bind(null,Xd,0,4),t.readDoubleBE=n.bind(null,eu,4,0)})(),t}function Wd(t,e,n){e[n]=t&255,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function Zd(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=t&255}function Xd(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function eu(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}});var ru=k((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}});var Au=k(au=>{"use strict";var Il=au;Il.length=function(e){for(var n=0,a=0,r=0;r191&&l<224?o[i++]=(l&31)<<6|e[n++]&63:l>239&&l<365?(l=((l&7)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,o[i++]=55296+(l>>10),o[i++]=56320+(l&1023)):o[i++]=(l&15)<<12|(e[n++]&63)<<6|e[n++]&63,i>8191&&((A||(A=[])).push(String.fromCharCode.apply(String,o)),i=0);return A?(i&&A.push(String.fromCharCode.apply(String,o.slice(0,i))),A.join("")):String.fromCharCode.apply(String,o.slice(0,i))};Il.write=function(e,n,a){for(var r=a,A,o,i=0;i>6|192,n[a++]=A&63|128):(A&64512)===55296&&((o=e.charCodeAt(i+1))&64512)===56320?(A=65536+((A&1023)<<10)+(o&1023),++i,n[a++]=A>>18|240,n[a++]=A>>12&63|128,n[a++]=A>>6&63|128,n[a++]=A&63|128):(n[a++]=A>>12|224,n[a++]=A>>6&63|128,n[a++]=A&63|128);return a-r}});var iu=k((CS,ou)=>{"use strict";ou.exports=Ay;function Ay(t,e,n){var a=n||8192,r=a>>>1,A=null,o=a;return function(l){if(l<1||l>r)return t(l);o+l>a&&(A=t(a),o=0);var s=e.call(A,o,o+=l);return o&7&&(o=(o|7)+1),s}}});var su=k((mS,lu)=>{"use strict";lu.exports=Se;var oa=mn();function Se(t,e){this.lo=t>>>0,this.hi=e>>>0}var Hn=Se.zero=new Se(0,0);Hn.toNumber=function(){return 0};Hn.zzEncode=Hn.zzDecode=function(){return this};Hn.length=function(){return 1};var oy=Se.zeroHash="\0\0\0\0\0\0\0\0";Se.fromNumber=function(e){if(e===0)return Hn;var n=e<0;n&&(e=-e);var a=e>>>0,r=(e-a)/4294967296>>>0;return n&&(r=~r>>>0,a=~a>>>0,++a>4294967295&&(a=0,++r>4294967295&&(r=0))),new Se(a,r)};Se.from=function(e){if(typeof e=="number")return Se.fromNumber(e);if(oa.isString(e))if(oa.Long)e=oa.Long.fromString(e);else return Se.fromNumber(parseInt(e,10));return e.low||e.high?new Se(e.low>>>0,e.high>>>0):Hn};Se.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var n=~this.lo+1>>>0,a=~this.hi>>>0;return n||(a=a+1>>>0),-(n+a*4294967296)}return this.lo+this.hi*4294967296};Se.prototype.toLong=function(e){return oa.Long?new oa.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var Cn=String.prototype.charCodeAt;Se.fromHash=function(e){return e===oy?Hn:new Se((Cn.call(e,0)|Cn.call(e,1)<<8|Cn.call(e,2)<<16|Cn.call(e,3)<<24)>>>0,(Cn.call(e,4)|Cn.call(e,5)<<8|Cn.call(e,6)<<16|Cn.call(e,7)<<24)>>>0)};Se.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};Se.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this};Se.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this};Se.prototype.length=function(){var e=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return a===0?n===0?e<16384?e<128?1:2:e<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:a<128?9:10}});var mn=k(jl=>{"use strict";var H=jl;H.asPromise=Gd();H.base64=zd();H.EventEmitter=Vd();H.float=nu();H.inquire=ru();H.utf8=Au();H.pool=iu();H.LongBits=su();H.global=typeof window<"u"&&window||typeof global<"u"&&global||typeof self<"u"&&self||jl;H.emptyArray=Object.freeze?Object.freeze([]):[];H.emptyObject=Object.freeze?Object.freeze({}):{};H.isNode=!!(H.global.process&&H.global.process.versions&&H.global.process.versions.node);H.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};H.isString=function(e){return typeof e=="string"||e instanceof String};H.isObject=function(e){return e&&typeof e=="object"};H.isset=H.isSet=function(e,n){var a=e[n];return a!=null&&e.hasOwnProperty(n)?typeof a!="object"||(Array.isArray(a)?a.length:Object.keys(a).length)>0:!1};H.Buffer=(function(){try{var t=H.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch{return null}})();H._Buffer_from=null;H._Buffer_allocUnsafe=null;H.newBuffer=function(e){return typeof e=="number"?H.Buffer?H._Buffer_allocUnsafe(e):new H.Array(e):H.Buffer?H._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};H.Array=typeof Uint8Array<"u"?Uint8Array:Array;H.Long=H.global.dcodeIO&&H.global.dcodeIO.Long||H.global.Long||H.inquire("long");H.key2Re=/^true|false|0|1$/;H.key32Re=/^-?(?:0|[1-9][0-9]*)$/;H.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;H.longToHash=function(e){return e?H.LongBits.from(e).toHash():H.LongBits.zeroHash};H.longFromHash=function(e,n){var a=H.LongBits.fromHash(e);return H.Long?H.Long.fromBits(a.lo,a.hi,n):a.toNumber(!!n)};function cu(t,e,n){for(var a=Object.keys(e),r=0;r-1;--A)if(n[r[A]]===1&&this[r[A]]!==void 0&&this[r[A]]!==null)return r[A]}};H.oneOfSetter=function(e){return function(n){for(var a=0;a{"use strict";uu.exports=Z;var dt=mn(),du,ro=dt.LongBits,hu=dt.base64,gu=dt.utf8;function ia(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function yl(){}function iy(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function Z(){this.len=0,this.head=new ia(yl,0,0),this.tail=this.head,this.states=null}Z.create=dt.Buffer?function(){return(Z.create=function(){return new du})()}:function(){return new Z};Z.alloc=function(e){return new dt.Array(e)};dt.Array!==Array&&(Z.alloc=dt.pool(Z.alloc,dt.Array.prototype.subarray));Z.prototype._push=function(e,n,a){return this.tail=this.tail.next=new ia(e,n,a),this.len+=n,this};function El(t,e,n){e[n]=t&255}function ly(t,e,n){for(;t>127;)e[n++]=t&127|128,t>>>=7;e[n]=t}function Bl(t,e){this.len=t,this.next=void 0,this.val=e}Bl.prototype=Object.create(ia.prototype);Bl.prototype.fn=ly;Z.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new Bl((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};Z.prototype.int32=function(e){return e<0?this._push(Ql,10,ro.fromNumber(e)):this.uint32(e)};Z.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function Ql(t,e,n){for(;t.hi;)e[n++]=t.lo&127|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=t.lo&127|128,t.lo=t.lo>>>7;e[n++]=t.lo}Z.prototype.uint64=function(e){var n=ro.from(e);return this._push(Ql,n.length(),n)};Z.prototype.int64=Z.prototype.uint64;Z.prototype.sint64=function(e){var n=ro.from(e).zzEncode();return this._push(Ql,n.length(),n)};Z.prototype.bool=function(e){return this._push(El,1,e?1:0)};function vl(t,e,n){e[n]=t&255,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}Z.prototype.fixed32=function(e){return this._push(vl,4,e>>>0)};Z.prototype.sfixed32=Z.prototype.fixed32;Z.prototype.fixed64=function(e){var n=ro.from(e);return this._push(vl,4,n.lo)._push(vl,4,n.hi)};Z.prototype.sfixed64=Z.prototype.fixed64;Z.prototype.float=function(e){return this._push(dt.float.writeFloatLE,4,e)};Z.prototype.double=function(e){return this._push(dt.float.writeDoubleLE,8,e)};var sy=dt.Array.prototype.set?function(e,n,a){n.set(e,a)}:function(e,n,a){for(var r=0;r>>0;if(!n)return this._push(El,1,0);if(dt.isString(e)){var a=Z.alloc(n=hu.length(e));hu.decode(e,a,0),e=a}return this.uint32(n)._push(sy,n,e)};Z.prototype.string=function(e){var n=gu.length(e);return n?this.uint32(n)._push(gu.write,n,e):this._push(El,1,0)};Z.prototype.fork=function(){return this.states=new iy(this),this.head=this.tail=new ia(yl,0,0),this.len=0,this};Z.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new ia(yl,0,0),this.len=0),this};Z.prototype.ldelim=function(){var e=this.head,n=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=e.next,this.tail=n,this.len+=a),this};Z.prototype.finish=function(){for(var e=this.head.next,n=this.constructor.alloc(this.len),a=0;e;)e.fn(e.val,n,a),a+=e.len,e=e.next;return n};Z._configure=function(t){du=t}});var Cu=k((vS,pu)=>{"use strict";pu.exports=Mn;var fu=wl();(Mn.prototype=Object.create(fu.prototype)).constructor=Mn;var la=mn(),ao=la.Buffer;function Mn(){fu.call(this)}Mn.alloc=function(e){return(Mn.alloc=la._Buffer_allocUnsafe)(e)};var cy=ao&&ao.prototype instanceof Uint8Array&&ao.prototype.set.name==="set"?function(e,n,a){n.set(e,a)}:function(e,n,a){if(e.copy)e.copy(n,a,0,e.length);else for(var r=0;r>>0;return this.uint32(n),n&&this._push(cy,n,e),this};function _y(t,e,n){t.length<40?la.utf8.write(t,e,n):e.utf8Write(t,n)}Mn.prototype.string=function(e){var n=ao.byteLength(e);return this.uint32(n),n&&this._push(_y,n,e),this}});var xl=k((yS,yu)=>{"use strict";yu.exports=ye;var Kt=mn(),ju,vu=Kt.LongBits,hy=Kt.utf8;function Et(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function ye(t){this.buf=t,this.pos=0,this.len=t.length}var mu=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new ye(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new ye(e);throw Error("illegal buffer")};ye.create=Kt.Buffer?function(e){return(ye.create=function(a){return Kt.Buffer.isBuffer(a)?new ju(a):mu(a)})(e)}:mu;ye.prototype._slice=Kt.Array.prototype.subarray||Kt.Array.prototype.slice;ye.prototype.uint32=(function(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,Et(this,10);return e}})();ye.prototype.int32=function(){return this.uint32()|0};ye.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function bl(){var t=new vu(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(t.lo=(t.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(this.buf[this.pos]&127)<<28)>>>0,t.hi=(t.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return t;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw Et(this);if(t.lo=(t.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(this.buf[this.pos++]&127)<>>0,t}if(this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw Et(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}ye.prototype.bool=function(){return this.uint32()!==0};function Ao(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}ye.prototype.fixed32=function(){if(this.pos+4>this.len)throw Et(this,4);return Ao(this.buf,this.pos+=4)};ye.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Et(this,4);return Ao(this.buf,this.pos+=4)|0};function Iu(){if(this.pos+8>this.len)throw Et(this,8);return new vu(Ao(this.buf,this.pos+=4),Ao(this.buf,this.pos+=4))}ye.prototype.float=function(){if(this.pos+4>this.len)throw Et(this,4);var e=Kt.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};ye.prototype.double=function(){if(this.pos+8>this.len)throw Et(this,4);var e=Kt.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};ye.prototype.bytes=function(){var e=this.uint32(),n=this.pos,a=this.pos+e;if(a>this.len)throw Et(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(n,a):n===a?new this.buf.constructor(0):this._slice.call(this.buf,n,a)};ye.prototype.string=function(){var e=this.bytes();return hy.read(e,0,e.length)};ye.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw Et(this,e);this.pos+=e}else do if(this.pos>=this.len)throw Et(this);while(this.buf[this.pos++]&128);return this};ye.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(t=this.uint32()&7)!==4;)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this};ye._configure=function(t){ju=t;var e=Kt.Long?"toLong":"toNumber";Kt.merge(ye.prototype,{int64:function(){return bl.call(this)[e](!1)},uint64:function(){return bl.call(this)[e](!0)},sint64:function(){return bl.call(this).zzDecode()[e](!1)},fixed64:function(){return Iu.call(this)[e](!0)},sfixed64:function(){return Iu.call(this)[e](!1)}})}});var wu=k((ES,Qu)=>{"use strict";Qu.exports=sa;var Bu=xl();(sa.prototype=Object.create(Bu.prototype)).constructor=sa;var Eu=mn();function sa(t){Bu.call(this,t)}Eu.Buffer&&(sa.prototype._slice=Eu.Buffer.prototype.slice);sa.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}});var xu=k((BS,bu)=>{"use strict";bu.exports=ca;var kl=mn();(ca.prototype=Object.create(kl.EventEmitter.prototype)).constructor=ca;function ca(t,e,n){if(typeof t!="function")throw TypeError("rpcImpl must be a function");kl.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!n}ca.prototype.rpcCall=function t(e,n,a,r,A){if(!r)throw TypeError("request must be specified");var o=this;if(!A)return kl.asPromise(t,o,e,n,a,r);if(!o.rpcImpl){setTimeout(function(){A(Error("already ended"))},0);return}try{return o.rpcImpl(e,n[o.requestDelimited?"encodeDelimited":"encode"](r).finish(),function(l,s){if(l)return o.emit("error",l,e),A(l);if(s===null){o.end(!0);return}if(!(s instanceof a))try{s=a[o.responseDelimited?"decodeDelimited":"decode"](s)}catch(c){return o.emit("error",c,e),A(c)}return o.emit("data",s,e),A(null,s)})}catch(i){o.emit("error",i,e),setTimeout(function(){A(i)},0);return}};ca.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var Su=k(ku=>{"use strict";var gy=ku;gy.Service=xu()});var Fu=k((wS,Nu)=>{"use strict";Nu.exports={}});var Lu=k(Ru=>{"use strict";var Ye=Ru;Ye.build="minimal";Ye.Writer=wl();Ye.BufferWriter=Cu();Ye.Reader=xl();Ye.BufferReader=wu();Ye.util=mn();Ye.rpc=Su();Ye.roots=Fu();Ye.configure=Du;function Du(){Ye.Reader._configure(Ye.BufferReader),Ye.util._configure()}Ye.Writer._configure(Ye.BufferWriter);Du()});var Hu=k((xS,Tu)=>{"use strict";Tu.exports=Lu()});var Ku=k((kS,Mu)=>{"use strict";var rt=Hu(),X=rt.Reader,In=rt.Writer,d=rt.util,N=rt.roots.default||(rt.roots.default={});N.perftools=(function(){var t={};return t.profiles=(function(){var e={};return e.Profile=(function(){function n(a){if(this.sampleType=[],this.sample=[],this.mapping=[],this.location=[],this.function=[],this.stringTable=[],this.comment=[],a)for(var r=Object.keys(a),A=0;A>>3){case 1:i.sampleType&&i.sampleType.length||(i.sampleType=[]),i.sampleType.push(N.perftools.profiles.ValueType.decode(r,r.uint32()));break;case 2:i.sample&&i.sample.length||(i.sample=[]),i.sample.push(N.perftools.profiles.Sample.decode(r,r.uint32()));break;case 3:i.mapping&&i.mapping.length||(i.mapping=[]),i.mapping.push(N.perftools.profiles.Mapping.decode(r,r.uint32()));break;case 4:i.location&&i.location.length||(i.location=[]),i.location.push(N.perftools.profiles.Location.decode(r,r.uint32()));break;case 5:i.function&&i.function.length||(i.function=[]),i.function.push(N.perftools.profiles.Function.decode(r,r.uint32()));break;case 6:i.stringTable&&i.stringTable.length||(i.stringTable=[]),i.stringTable.push(r.string());break;case 7:i.dropFrames=r.int64();break;case 8:i.keepFrames=r.int64();break;case 9:i.timeNanos=r.int64();break;case 10:i.durationNanos=r.int64();break;case 11:i.periodType=N.perftools.profiles.ValueType.decode(r,r.uint32());break;case 12:i.period=r.int64();break;case 13:if(i.comment&&i.comment.length||(i.comment=[]),(l&7)===2)for(var s=r.uint32()+r.pos;r.pos>>0,r.dropFrames.high>>>0).toNumber())),r.keepFrames!=null&&(d.Long?(A.keepFrames=d.Long.fromValue(r.keepFrames)).unsigned=!1:typeof r.keepFrames=="string"?A.keepFrames=parseInt(r.keepFrames,10):typeof r.keepFrames=="number"?A.keepFrames=r.keepFrames:typeof r.keepFrames=="object"&&(A.keepFrames=new d.LongBits(r.keepFrames.low>>>0,r.keepFrames.high>>>0).toNumber())),r.timeNanos!=null&&(d.Long?(A.timeNanos=d.Long.fromValue(r.timeNanos)).unsigned=!1:typeof r.timeNanos=="string"?A.timeNanos=parseInt(r.timeNanos,10):typeof r.timeNanos=="number"?A.timeNanos=r.timeNanos:typeof r.timeNanos=="object"&&(A.timeNanos=new d.LongBits(r.timeNanos.low>>>0,r.timeNanos.high>>>0).toNumber())),r.durationNanos!=null&&(d.Long?(A.durationNanos=d.Long.fromValue(r.durationNanos)).unsigned=!1:typeof r.durationNanos=="string"?A.durationNanos=parseInt(r.durationNanos,10):typeof r.durationNanos=="number"?A.durationNanos=r.durationNanos:typeof r.durationNanos=="object"&&(A.durationNanos=new d.LongBits(r.durationNanos.low>>>0,r.durationNanos.high>>>0).toNumber())),r.periodType!=null){if(typeof r.periodType!="object")throw TypeError(".perftools.profiles.Profile.periodType: object expected");A.periodType=N.perftools.profiles.ValueType.fromObject(r.periodType)}if(r.period!=null&&(d.Long?(A.period=d.Long.fromValue(r.period)).unsigned=!1:typeof r.period=="string"?A.period=parseInt(r.period,10):typeof r.period=="number"?A.period=r.period:typeof r.period=="object"&&(A.period=new d.LongBits(r.period.low>>>0,r.period.high>>>0).toNumber())),r.comment){if(!Array.isArray(r.comment))throw TypeError(".perftools.profiles.Profile.comment: array expected");A.comment=[];for(var o=0;o>>0,r.comment[o].high>>>0).toNumber())}return r.defaultSampleType!=null&&(d.Long?(A.defaultSampleType=d.Long.fromValue(r.defaultSampleType)).unsigned=!1:typeof r.defaultSampleType=="string"?A.defaultSampleType=parseInt(r.defaultSampleType,10):typeof r.defaultSampleType=="number"?A.defaultSampleType=r.defaultSampleType:typeof r.defaultSampleType=="object"&&(A.defaultSampleType=new d.LongBits(r.defaultSampleType.low>>>0,r.defaultSampleType.high>>>0).toNumber())),A},n.toObject=function(r,A){A||(A={});var o={};if((A.arrays||A.defaults)&&(o.sampleType=[],o.sample=[],o.mapping=[],o.location=[],o.function=[],o.stringTable=[],o.comment=[]),A.defaults){if(d.Long){var i=new d.Long(0,0,!1);o.dropFrames=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.dropFrames=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.keepFrames=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.keepFrames=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.timeNanos=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.timeNanos=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.durationNanos=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.durationNanos=A.longs===String?"0":0;if(o.periodType=null,d.Long){var i=new d.Long(0,0,!1);o.period=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.period=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.defaultSampleType=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.defaultSampleType=A.longs===String?"0":0}if(r.sampleType&&r.sampleType.length){o.sampleType=[];for(var l=0;l>>0,r.dropFrames.high>>>0).toNumber():r.dropFrames),r.keepFrames!=null&&r.hasOwnProperty("keepFrames")&&(typeof r.keepFrames=="number"?o.keepFrames=A.longs===String?String(r.keepFrames):r.keepFrames:o.keepFrames=A.longs===String?d.Long.prototype.toString.call(r.keepFrames):A.longs===Number?new d.LongBits(r.keepFrames.low>>>0,r.keepFrames.high>>>0).toNumber():r.keepFrames),r.timeNanos!=null&&r.hasOwnProperty("timeNanos")&&(typeof r.timeNanos=="number"?o.timeNanos=A.longs===String?String(r.timeNanos):r.timeNanos:o.timeNanos=A.longs===String?d.Long.prototype.toString.call(r.timeNanos):A.longs===Number?new d.LongBits(r.timeNanos.low>>>0,r.timeNanos.high>>>0).toNumber():r.timeNanos),r.durationNanos!=null&&r.hasOwnProperty("durationNanos")&&(typeof r.durationNanos=="number"?o.durationNanos=A.longs===String?String(r.durationNanos):r.durationNanos:o.durationNanos=A.longs===String?d.Long.prototype.toString.call(r.durationNanos):A.longs===Number?new d.LongBits(r.durationNanos.low>>>0,r.durationNanos.high>>>0).toNumber():r.durationNanos),r.periodType!=null&&r.hasOwnProperty("periodType")&&(o.periodType=N.perftools.profiles.ValueType.toObject(r.periodType,A)),r.period!=null&&r.hasOwnProperty("period")&&(typeof r.period=="number"?o.period=A.longs===String?String(r.period):r.period:o.period=A.longs===String?d.Long.prototype.toString.call(r.period):A.longs===Number?new d.LongBits(r.period.low>>>0,r.period.high>>>0).toNumber():r.period),r.comment&&r.comment.length){o.comment=[];for(var l=0;l>>0,r.comment[l].high>>>0).toNumber():r.comment[l]}return r.defaultSampleType!=null&&r.hasOwnProperty("defaultSampleType")&&(typeof r.defaultSampleType=="number"?o.defaultSampleType=A.longs===String?String(r.defaultSampleType):r.defaultSampleType:o.defaultSampleType=A.longs===String?d.Long.prototype.toString.call(r.defaultSampleType):A.longs===Number?new d.LongBits(r.defaultSampleType.low>>>0,r.defaultSampleType.high>>>0).toNumber():r.defaultSampleType),o},n.prototype.toJSON=function(){return this.constructor.toObject(this,rt.util.toJSONOptions)},n})(),e.ValueType=(function(){function n(a){if(a)for(var r=Object.keys(a),A=0;A>>3){case 1:i.type=r.int64();break;case 2:i.unit=r.int64();break;default:r.skipType(l&7);break}}return i},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.type!=null&&r.hasOwnProperty("type")&&!d.isInteger(r.type)&&!(r.type&&d.isInteger(r.type.low)&&d.isInteger(r.type.high))?"type: integer|Long expected":r.unit!=null&&r.hasOwnProperty("unit")&&!d.isInteger(r.unit)&&!(r.unit&&d.isInteger(r.unit.low)&&d.isInteger(r.unit.high))?"unit: integer|Long expected":null},n.fromObject=function(r){if(r instanceof N.perftools.profiles.ValueType)return r;var A=new N.perftools.profiles.ValueType;return r.type!=null&&(d.Long?(A.type=d.Long.fromValue(r.type)).unsigned=!1:typeof r.type=="string"?A.type=parseInt(r.type,10):typeof r.type=="number"?A.type=r.type:typeof r.type=="object"&&(A.type=new d.LongBits(r.type.low>>>0,r.type.high>>>0).toNumber())),r.unit!=null&&(d.Long?(A.unit=d.Long.fromValue(r.unit)).unsigned=!1:typeof r.unit=="string"?A.unit=parseInt(r.unit,10):typeof r.unit=="number"?A.unit=r.unit:typeof r.unit=="object"&&(A.unit=new d.LongBits(r.unit.low>>>0,r.unit.high>>>0).toNumber())),A},n.toObject=function(r,A){A||(A={});var o={};if(A.defaults){if(d.Long){var i=new d.Long(0,0,!1);o.type=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.type=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.unit=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.unit=A.longs===String?"0":0}return r.type!=null&&r.hasOwnProperty("type")&&(typeof r.type=="number"?o.type=A.longs===String?String(r.type):r.type:o.type=A.longs===String?d.Long.prototype.toString.call(r.type):A.longs===Number?new d.LongBits(r.type.low>>>0,r.type.high>>>0).toNumber():r.type),r.unit!=null&&r.hasOwnProperty("unit")&&(typeof r.unit=="number"?o.unit=A.longs===String?String(r.unit):r.unit:o.unit=A.longs===String?d.Long.prototype.toString.call(r.unit):A.longs===Number?new d.LongBits(r.unit.low>>>0,r.unit.high>>>0).toNumber():r.unit),o},n.prototype.toJSON=function(){return this.constructor.toObject(this,rt.util.toJSONOptions)},n})(),e.Sample=(function(){function n(a){if(this.locationId=[],this.value=[],this.label=[],a)for(var r=Object.keys(a),A=0;A>>3){case 1:if(i.locationId&&i.locationId.length||(i.locationId=[]),(l&7)===2)for(var s=r.uint32()+r.pos;r.pos>>0,r.locationId[o].high>>>0).toNumber(!0))}if(r.value){if(!Array.isArray(r.value))throw TypeError(".perftools.profiles.Sample.value: array expected");A.value=[];for(var o=0;o>>0,r.value[o].high>>>0).toNumber())}if(r.label){if(!Array.isArray(r.label))throw TypeError(".perftools.profiles.Sample.label: array expected");A.label=[];for(var o=0;o>>0,r.locationId[i].high>>>0).toNumber(!0):r.locationId[i]}if(r.value&&r.value.length){o.value=[];for(var i=0;i>>0,r.value[i].high>>>0).toNumber():r.value[i]}if(r.label&&r.label.length){o.label=[];for(var i=0;i>>3){case 1:i.key=r.int64();break;case 2:i.str=r.int64();break;case 3:i.num=r.int64();break;case 4:i.numUnit=r.int64();break;default:r.skipType(l&7);break}}return i},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.key!=null&&r.hasOwnProperty("key")&&!d.isInteger(r.key)&&!(r.key&&d.isInteger(r.key.low)&&d.isInteger(r.key.high))?"key: integer|Long expected":r.str!=null&&r.hasOwnProperty("str")&&!d.isInteger(r.str)&&!(r.str&&d.isInteger(r.str.low)&&d.isInteger(r.str.high))?"str: integer|Long expected":r.num!=null&&r.hasOwnProperty("num")&&!d.isInteger(r.num)&&!(r.num&&d.isInteger(r.num.low)&&d.isInteger(r.num.high))?"num: integer|Long expected":r.numUnit!=null&&r.hasOwnProperty("numUnit")&&!d.isInteger(r.numUnit)&&!(r.numUnit&&d.isInteger(r.numUnit.low)&&d.isInteger(r.numUnit.high))?"numUnit: integer|Long expected":null},n.fromObject=function(r){if(r instanceof N.perftools.profiles.Label)return r;var A=new N.perftools.profiles.Label;return r.key!=null&&(d.Long?(A.key=d.Long.fromValue(r.key)).unsigned=!1:typeof r.key=="string"?A.key=parseInt(r.key,10):typeof r.key=="number"?A.key=r.key:typeof r.key=="object"&&(A.key=new d.LongBits(r.key.low>>>0,r.key.high>>>0).toNumber())),r.str!=null&&(d.Long?(A.str=d.Long.fromValue(r.str)).unsigned=!1:typeof r.str=="string"?A.str=parseInt(r.str,10):typeof r.str=="number"?A.str=r.str:typeof r.str=="object"&&(A.str=new d.LongBits(r.str.low>>>0,r.str.high>>>0).toNumber())),r.num!=null&&(d.Long?(A.num=d.Long.fromValue(r.num)).unsigned=!1:typeof r.num=="string"?A.num=parseInt(r.num,10):typeof r.num=="number"?A.num=r.num:typeof r.num=="object"&&(A.num=new d.LongBits(r.num.low>>>0,r.num.high>>>0).toNumber())),r.numUnit!=null&&(d.Long?(A.numUnit=d.Long.fromValue(r.numUnit)).unsigned=!1:typeof r.numUnit=="string"?A.numUnit=parseInt(r.numUnit,10):typeof r.numUnit=="number"?A.numUnit=r.numUnit:typeof r.numUnit=="object"&&(A.numUnit=new d.LongBits(r.numUnit.low>>>0,r.numUnit.high>>>0).toNumber())),A},n.toObject=function(r,A){A||(A={});var o={};if(A.defaults){if(d.Long){var i=new d.Long(0,0,!1);o.key=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.key=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.str=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.str=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.num=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.num=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.numUnit=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.numUnit=A.longs===String?"0":0}return r.key!=null&&r.hasOwnProperty("key")&&(typeof r.key=="number"?o.key=A.longs===String?String(r.key):r.key:o.key=A.longs===String?d.Long.prototype.toString.call(r.key):A.longs===Number?new d.LongBits(r.key.low>>>0,r.key.high>>>0).toNumber():r.key),r.str!=null&&r.hasOwnProperty("str")&&(typeof r.str=="number"?o.str=A.longs===String?String(r.str):r.str:o.str=A.longs===String?d.Long.prototype.toString.call(r.str):A.longs===Number?new d.LongBits(r.str.low>>>0,r.str.high>>>0).toNumber():r.str),r.num!=null&&r.hasOwnProperty("num")&&(typeof r.num=="number"?o.num=A.longs===String?String(r.num):r.num:o.num=A.longs===String?d.Long.prototype.toString.call(r.num):A.longs===Number?new d.LongBits(r.num.low>>>0,r.num.high>>>0).toNumber():r.num),r.numUnit!=null&&r.hasOwnProperty("numUnit")&&(typeof r.numUnit=="number"?o.numUnit=A.longs===String?String(r.numUnit):r.numUnit:o.numUnit=A.longs===String?d.Long.prototype.toString.call(r.numUnit):A.longs===Number?new d.LongBits(r.numUnit.low>>>0,r.numUnit.high>>>0).toNumber():r.numUnit),o},n.prototype.toJSON=function(){return this.constructor.toObject(this,rt.util.toJSONOptions)},n})(),e.Mapping=(function(){function n(a){if(a)for(var r=Object.keys(a),A=0;A>>3){case 1:i.id=r.uint64();break;case 2:i.memoryStart=r.uint64();break;case 3:i.memoryLimit=r.uint64();break;case 4:i.fileOffset=r.uint64();break;case 5:i.filename=r.int64();break;case 6:i.buildId=r.int64();break;case 7:i.hasFunctions=r.bool();break;case 8:i.hasFilenames=r.bool();break;case 9:i.hasLineNumbers=r.bool();break;case 10:i.hasInlineFrames=r.bool();break;default:r.skipType(l&7);break}}return i},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.id!=null&&r.hasOwnProperty("id")&&!d.isInteger(r.id)&&!(r.id&&d.isInteger(r.id.low)&&d.isInteger(r.id.high))?"id: integer|Long expected":r.memoryStart!=null&&r.hasOwnProperty("memoryStart")&&!d.isInteger(r.memoryStart)&&!(r.memoryStart&&d.isInteger(r.memoryStart.low)&&d.isInteger(r.memoryStart.high))?"memoryStart: integer|Long expected":r.memoryLimit!=null&&r.hasOwnProperty("memoryLimit")&&!d.isInteger(r.memoryLimit)&&!(r.memoryLimit&&d.isInteger(r.memoryLimit.low)&&d.isInteger(r.memoryLimit.high))?"memoryLimit: integer|Long expected":r.fileOffset!=null&&r.hasOwnProperty("fileOffset")&&!d.isInteger(r.fileOffset)&&!(r.fileOffset&&d.isInteger(r.fileOffset.low)&&d.isInteger(r.fileOffset.high))?"fileOffset: integer|Long expected":r.filename!=null&&r.hasOwnProperty("filename")&&!d.isInteger(r.filename)&&!(r.filename&&d.isInteger(r.filename.low)&&d.isInteger(r.filename.high))?"filename: integer|Long expected":r.buildId!=null&&r.hasOwnProperty("buildId")&&!d.isInteger(r.buildId)&&!(r.buildId&&d.isInteger(r.buildId.low)&&d.isInteger(r.buildId.high))?"buildId: integer|Long expected":r.hasFunctions!=null&&r.hasOwnProperty("hasFunctions")&&typeof r.hasFunctions!="boolean"?"hasFunctions: boolean expected":r.hasFilenames!=null&&r.hasOwnProperty("hasFilenames")&&typeof r.hasFilenames!="boolean"?"hasFilenames: boolean expected":r.hasLineNumbers!=null&&r.hasOwnProperty("hasLineNumbers")&&typeof r.hasLineNumbers!="boolean"?"hasLineNumbers: boolean expected":r.hasInlineFrames!=null&&r.hasOwnProperty("hasInlineFrames")&&typeof r.hasInlineFrames!="boolean"?"hasInlineFrames: boolean expected":null},n.fromObject=function(r){if(r instanceof N.perftools.profiles.Mapping)return r;var A=new N.perftools.profiles.Mapping;return r.id!=null&&(d.Long?(A.id=d.Long.fromValue(r.id)).unsigned=!0:typeof r.id=="string"?A.id=parseInt(r.id,10):typeof r.id=="number"?A.id=r.id:typeof r.id=="object"&&(A.id=new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0))),r.memoryStart!=null&&(d.Long?(A.memoryStart=d.Long.fromValue(r.memoryStart)).unsigned=!0:typeof r.memoryStart=="string"?A.memoryStart=parseInt(r.memoryStart,10):typeof r.memoryStart=="number"?A.memoryStart=r.memoryStart:typeof r.memoryStart=="object"&&(A.memoryStart=new d.LongBits(r.memoryStart.low>>>0,r.memoryStart.high>>>0).toNumber(!0))),r.memoryLimit!=null&&(d.Long?(A.memoryLimit=d.Long.fromValue(r.memoryLimit)).unsigned=!0:typeof r.memoryLimit=="string"?A.memoryLimit=parseInt(r.memoryLimit,10):typeof r.memoryLimit=="number"?A.memoryLimit=r.memoryLimit:typeof r.memoryLimit=="object"&&(A.memoryLimit=new d.LongBits(r.memoryLimit.low>>>0,r.memoryLimit.high>>>0).toNumber(!0))),r.fileOffset!=null&&(d.Long?(A.fileOffset=d.Long.fromValue(r.fileOffset)).unsigned=!0:typeof r.fileOffset=="string"?A.fileOffset=parseInt(r.fileOffset,10):typeof r.fileOffset=="number"?A.fileOffset=r.fileOffset:typeof r.fileOffset=="object"&&(A.fileOffset=new d.LongBits(r.fileOffset.low>>>0,r.fileOffset.high>>>0).toNumber(!0))),r.filename!=null&&(d.Long?(A.filename=d.Long.fromValue(r.filename)).unsigned=!1:typeof r.filename=="string"?A.filename=parseInt(r.filename,10):typeof r.filename=="number"?A.filename=r.filename:typeof r.filename=="object"&&(A.filename=new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber())),r.buildId!=null&&(d.Long?(A.buildId=d.Long.fromValue(r.buildId)).unsigned=!1:typeof r.buildId=="string"?A.buildId=parseInt(r.buildId,10):typeof r.buildId=="number"?A.buildId=r.buildId:typeof r.buildId=="object"&&(A.buildId=new d.LongBits(r.buildId.low>>>0,r.buildId.high>>>0).toNumber())),r.hasFunctions!=null&&(A.hasFunctions=!!r.hasFunctions),r.hasFilenames!=null&&(A.hasFilenames=!!r.hasFilenames),r.hasLineNumbers!=null&&(A.hasLineNumbers=!!r.hasLineNumbers),r.hasInlineFrames!=null&&(A.hasInlineFrames=!!r.hasInlineFrames),A},n.toObject=function(r,A){A||(A={});var o={};if(A.defaults){if(d.Long){var i=new d.Long(0,0,!0);o.id=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.id=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!0);o.memoryStart=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.memoryStart=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!0);o.memoryLimit=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.memoryLimit=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!0);o.fileOffset=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.fileOffset=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.filename=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.filename=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.buildId=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.buildId=A.longs===String?"0":0;o.hasFunctions=!1,o.hasFilenames=!1,o.hasLineNumbers=!1,o.hasInlineFrames=!1}return r.id!=null&&r.hasOwnProperty("id")&&(typeof r.id=="number"?o.id=A.longs===String?String(r.id):r.id:o.id=A.longs===String?d.Long.prototype.toString.call(r.id):A.longs===Number?new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0):r.id),r.memoryStart!=null&&r.hasOwnProperty("memoryStart")&&(typeof r.memoryStart=="number"?o.memoryStart=A.longs===String?String(r.memoryStart):r.memoryStart:o.memoryStart=A.longs===String?d.Long.prototype.toString.call(r.memoryStart):A.longs===Number?new d.LongBits(r.memoryStart.low>>>0,r.memoryStart.high>>>0).toNumber(!0):r.memoryStart),r.memoryLimit!=null&&r.hasOwnProperty("memoryLimit")&&(typeof r.memoryLimit=="number"?o.memoryLimit=A.longs===String?String(r.memoryLimit):r.memoryLimit:o.memoryLimit=A.longs===String?d.Long.prototype.toString.call(r.memoryLimit):A.longs===Number?new d.LongBits(r.memoryLimit.low>>>0,r.memoryLimit.high>>>0).toNumber(!0):r.memoryLimit),r.fileOffset!=null&&r.hasOwnProperty("fileOffset")&&(typeof r.fileOffset=="number"?o.fileOffset=A.longs===String?String(r.fileOffset):r.fileOffset:o.fileOffset=A.longs===String?d.Long.prototype.toString.call(r.fileOffset):A.longs===Number?new d.LongBits(r.fileOffset.low>>>0,r.fileOffset.high>>>0).toNumber(!0):r.fileOffset),r.filename!=null&&r.hasOwnProperty("filename")&&(typeof r.filename=="number"?o.filename=A.longs===String?String(r.filename):r.filename:o.filename=A.longs===String?d.Long.prototype.toString.call(r.filename):A.longs===Number?new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber():r.filename),r.buildId!=null&&r.hasOwnProperty("buildId")&&(typeof r.buildId=="number"?o.buildId=A.longs===String?String(r.buildId):r.buildId:o.buildId=A.longs===String?d.Long.prototype.toString.call(r.buildId):A.longs===Number?new d.LongBits(r.buildId.low>>>0,r.buildId.high>>>0).toNumber():r.buildId),r.hasFunctions!=null&&r.hasOwnProperty("hasFunctions")&&(o.hasFunctions=r.hasFunctions),r.hasFilenames!=null&&r.hasOwnProperty("hasFilenames")&&(o.hasFilenames=r.hasFilenames),r.hasLineNumbers!=null&&r.hasOwnProperty("hasLineNumbers")&&(o.hasLineNumbers=r.hasLineNumbers),r.hasInlineFrames!=null&&r.hasOwnProperty("hasInlineFrames")&&(o.hasInlineFrames=r.hasInlineFrames),o},n.prototype.toJSON=function(){return this.constructor.toObject(this,rt.util.toJSONOptions)},n})(),e.Location=(function(){function n(a){if(this.line=[],a)for(var r=Object.keys(a),A=0;A>>3){case 1:i.id=r.uint64();break;case 2:i.mappingId=r.uint64();break;case 3:i.address=r.uint64();break;case 4:i.line&&i.line.length||(i.line=[]),i.line.push(N.perftools.profiles.Line.decode(r,r.uint32()));break;case 5:i.isFolded=r.bool();break;default:r.skipType(l&7);break}}return i},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.id!=null&&r.hasOwnProperty("id")&&!d.isInteger(r.id)&&!(r.id&&d.isInteger(r.id.low)&&d.isInteger(r.id.high)))return"id: integer|Long expected";if(r.mappingId!=null&&r.hasOwnProperty("mappingId")&&!d.isInteger(r.mappingId)&&!(r.mappingId&&d.isInteger(r.mappingId.low)&&d.isInteger(r.mappingId.high)))return"mappingId: integer|Long expected";if(r.address!=null&&r.hasOwnProperty("address")&&!d.isInteger(r.address)&&!(r.address&&d.isInteger(r.address.low)&&d.isInteger(r.address.high)))return"address: integer|Long expected";if(r.line!=null&&r.hasOwnProperty("line")){if(!Array.isArray(r.line))return"line: array expected";for(var A=0;A>>0,r.id.high>>>0).toNumber(!0))),r.mappingId!=null&&(d.Long?(A.mappingId=d.Long.fromValue(r.mappingId)).unsigned=!0:typeof r.mappingId=="string"?A.mappingId=parseInt(r.mappingId,10):typeof r.mappingId=="number"?A.mappingId=r.mappingId:typeof r.mappingId=="object"&&(A.mappingId=new d.LongBits(r.mappingId.low>>>0,r.mappingId.high>>>0).toNumber(!0))),r.address!=null&&(d.Long?(A.address=d.Long.fromValue(r.address)).unsigned=!0:typeof r.address=="string"?A.address=parseInt(r.address,10):typeof r.address=="number"?A.address=r.address:typeof r.address=="object"&&(A.address=new d.LongBits(r.address.low>>>0,r.address.high>>>0).toNumber(!0))),r.line){if(!Array.isArray(r.line))throw TypeError(".perftools.profiles.Location.line: array expected");A.line=[];for(var o=0;o>>0,r.id.high>>>0).toNumber(!0):r.id),r.mappingId!=null&&r.hasOwnProperty("mappingId")&&(typeof r.mappingId=="number"?o.mappingId=A.longs===String?String(r.mappingId):r.mappingId:o.mappingId=A.longs===String?d.Long.prototype.toString.call(r.mappingId):A.longs===Number?new d.LongBits(r.mappingId.low>>>0,r.mappingId.high>>>0).toNumber(!0):r.mappingId),r.address!=null&&r.hasOwnProperty("address")&&(typeof r.address=="number"?o.address=A.longs===String?String(r.address):r.address:o.address=A.longs===String?d.Long.prototype.toString.call(r.address):A.longs===Number?new d.LongBits(r.address.low>>>0,r.address.high>>>0).toNumber(!0):r.address),r.line&&r.line.length){o.line=[];for(var l=0;l>>3){case 1:i.functionId=r.uint64();break;case 2:i.line=r.int64();break;default:r.skipType(l&7);break}}return i},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.functionId!=null&&r.hasOwnProperty("functionId")&&!d.isInteger(r.functionId)&&!(r.functionId&&d.isInteger(r.functionId.low)&&d.isInteger(r.functionId.high))?"functionId: integer|Long expected":r.line!=null&&r.hasOwnProperty("line")&&!d.isInteger(r.line)&&!(r.line&&d.isInteger(r.line.low)&&d.isInteger(r.line.high))?"line: integer|Long expected":null},n.fromObject=function(r){if(r instanceof N.perftools.profiles.Line)return r;var A=new N.perftools.profiles.Line;return r.functionId!=null&&(d.Long?(A.functionId=d.Long.fromValue(r.functionId)).unsigned=!0:typeof r.functionId=="string"?A.functionId=parseInt(r.functionId,10):typeof r.functionId=="number"?A.functionId=r.functionId:typeof r.functionId=="object"&&(A.functionId=new d.LongBits(r.functionId.low>>>0,r.functionId.high>>>0).toNumber(!0))),r.line!=null&&(d.Long?(A.line=d.Long.fromValue(r.line)).unsigned=!1:typeof r.line=="string"?A.line=parseInt(r.line,10):typeof r.line=="number"?A.line=r.line:typeof r.line=="object"&&(A.line=new d.LongBits(r.line.low>>>0,r.line.high>>>0).toNumber())),A},n.toObject=function(r,A){A||(A={});var o={};if(A.defaults){if(d.Long){var i=new d.Long(0,0,!0);o.functionId=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.functionId=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.line=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.line=A.longs===String?"0":0}return r.functionId!=null&&r.hasOwnProperty("functionId")&&(typeof r.functionId=="number"?o.functionId=A.longs===String?String(r.functionId):r.functionId:o.functionId=A.longs===String?d.Long.prototype.toString.call(r.functionId):A.longs===Number?new d.LongBits(r.functionId.low>>>0,r.functionId.high>>>0).toNumber(!0):r.functionId),r.line!=null&&r.hasOwnProperty("line")&&(typeof r.line=="number"?o.line=A.longs===String?String(r.line):r.line:o.line=A.longs===String?d.Long.prototype.toString.call(r.line):A.longs===Number?new d.LongBits(r.line.low>>>0,r.line.high>>>0).toNumber():r.line),o},n.prototype.toJSON=function(){return this.constructor.toObject(this,rt.util.toJSONOptions)},n})(),e.Function=(function(){function n(a){if(a)for(var r=Object.keys(a),A=0;A>>3){case 1:i.id=r.uint64();break;case 2:i.name=r.int64();break;case 3:i.systemName=r.int64();break;case 4:i.filename=r.int64();break;case 5:i.startLine=r.int64();break;default:r.skipType(l&7);break}}return i},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.id!=null&&r.hasOwnProperty("id")&&!d.isInteger(r.id)&&!(r.id&&d.isInteger(r.id.low)&&d.isInteger(r.id.high))?"id: integer|Long expected":r.name!=null&&r.hasOwnProperty("name")&&!d.isInteger(r.name)&&!(r.name&&d.isInteger(r.name.low)&&d.isInteger(r.name.high))?"name: integer|Long expected":r.systemName!=null&&r.hasOwnProperty("systemName")&&!d.isInteger(r.systemName)&&!(r.systemName&&d.isInteger(r.systemName.low)&&d.isInteger(r.systemName.high))?"systemName: integer|Long expected":r.filename!=null&&r.hasOwnProperty("filename")&&!d.isInteger(r.filename)&&!(r.filename&&d.isInteger(r.filename.low)&&d.isInteger(r.filename.high))?"filename: integer|Long expected":r.startLine!=null&&r.hasOwnProperty("startLine")&&!d.isInteger(r.startLine)&&!(r.startLine&&d.isInteger(r.startLine.low)&&d.isInteger(r.startLine.high))?"startLine: integer|Long expected":null},n.fromObject=function(r){if(r instanceof N.perftools.profiles.Function)return r;var A=new N.perftools.profiles.Function;return r.id!=null&&(d.Long?(A.id=d.Long.fromValue(r.id)).unsigned=!0:typeof r.id=="string"?A.id=parseInt(r.id,10):typeof r.id=="number"?A.id=r.id:typeof r.id=="object"&&(A.id=new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0))),r.name!=null&&(d.Long?(A.name=d.Long.fromValue(r.name)).unsigned=!1:typeof r.name=="string"?A.name=parseInt(r.name,10):typeof r.name=="number"?A.name=r.name:typeof r.name=="object"&&(A.name=new d.LongBits(r.name.low>>>0,r.name.high>>>0).toNumber())),r.systemName!=null&&(d.Long?(A.systemName=d.Long.fromValue(r.systemName)).unsigned=!1:typeof r.systemName=="string"?A.systemName=parseInt(r.systemName,10):typeof r.systemName=="number"?A.systemName=r.systemName:typeof r.systemName=="object"&&(A.systemName=new d.LongBits(r.systemName.low>>>0,r.systemName.high>>>0).toNumber())),r.filename!=null&&(d.Long?(A.filename=d.Long.fromValue(r.filename)).unsigned=!1:typeof r.filename=="string"?A.filename=parseInt(r.filename,10):typeof r.filename=="number"?A.filename=r.filename:typeof r.filename=="object"&&(A.filename=new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber())),r.startLine!=null&&(d.Long?(A.startLine=d.Long.fromValue(r.startLine)).unsigned=!1:typeof r.startLine=="string"?A.startLine=parseInt(r.startLine,10):typeof r.startLine=="number"?A.startLine=r.startLine:typeof r.startLine=="object"&&(A.startLine=new d.LongBits(r.startLine.low>>>0,r.startLine.high>>>0).toNumber())),A},n.toObject=function(r,A){A||(A={});var o={};if(A.defaults){if(d.Long){var i=new d.Long(0,0,!0);o.id=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.id=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.name=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.name=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.systemName=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.systemName=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.filename=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.filename=A.longs===String?"0":0;if(d.Long){var i=new d.Long(0,0,!1);o.startLine=A.longs===String?i.toString():A.longs===Number?i.toNumber():i}else o.startLine=A.longs===String?"0":0}return r.id!=null&&r.hasOwnProperty("id")&&(typeof r.id=="number"?o.id=A.longs===String?String(r.id):r.id:o.id=A.longs===String?d.Long.prototype.toString.call(r.id):A.longs===Number?new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0):r.id),r.name!=null&&r.hasOwnProperty("name")&&(typeof r.name=="number"?o.name=A.longs===String?String(r.name):r.name:o.name=A.longs===String?d.Long.prototype.toString.call(r.name):A.longs===Number?new d.LongBits(r.name.low>>>0,r.name.high>>>0).toNumber():r.name),r.systemName!=null&&r.hasOwnProperty("systemName")&&(typeof r.systemName=="number"?o.systemName=A.longs===String?String(r.systemName):r.systemName:o.systemName=A.longs===String?d.Long.prototype.toString.call(r.systemName):A.longs===Number?new d.LongBits(r.systemName.low>>>0,r.systemName.high>>>0).toNumber():r.systemName),r.filename!=null&&r.hasOwnProperty("filename")&&(typeof r.filename=="number"?o.filename=A.longs===String?String(r.filename):r.filename:o.filename=A.longs===String?d.Long.prototype.toString.call(r.filename):A.longs===Number?new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber():r.filename),r.startLine!=null&&r.hasOwnProperty("startLine")&&(typeof r.startLine=="number"?o.startLine=A.longs===String?String(r.startLine):r.startLine:o.startLine=A.longs===String?d.Long.prototype.toString.call(r.startLine):A.longs===Number?new d.LongBits(r.startLine.low>>>0,r.startLine.high>>>0).toNumber():r.startLine),o},n.prototype.toJSON=function(){return this.constructor.toObject(this,rt.util.toJSONOptions)},n})(),e})(),t})();Mu.exports=N});var Wu=k((SS,Yu)=>{Yu.exports=ie;var ut=null;try{ut=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function ie(t,e,n){this.low=t|0,this.high=e|0,this.unsigned=!!n}ie.prototype.__isLong__;Object.defineProperty(ie.prototype,"__isLong__",{value:!0});function Ze(t){return(t&&t.__isLong__)===!0}ie.isLong=Ze;var Ju={},Pu={};function Jn(t,e){var n,a,r;return e?(t>>>=0,(r=0<=t&&t<256)&&(a=Pu[t],a)?a:(n=le(t,(t|0)<0?-1:0,!0),r&&(Pu[t]=n),n)):(t|=0,(r=-128<=t&&t<128)&&(a=Ju[t],a)?a:(n=le(t,t<0?-1:0,!1),r&&(Ju[t]=n),n))}ie.fromInt=Jn;function ft(t,e){if(isNaN(t))return e?Kn:pt;if(e){if(t<0)return Kn;if(t>=qu)return Vu}else{if(t<=-Uu)return We;if(t+1>=Uu)return $u}return t<0?ft(-t,e).neg():le(t%mr|0,t/mr|0,e)}ie.fromNumber=ft;function le(t,e,n){return new ie(t,e,n)}ie.fromBits=le;var oo=Math.pow;function Nl(t,e,n){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return pt;if(typeof e=="number"?(n=e,e=!1):e=!!e,n=n||10,n<2||360)throw Error("interior hyphen");if(a===0)return Nl(t.substring(1),e,n).neg();for(var r=ft(oo(n,8)),A=pt,o=0;o>>0:this.low};x.toNumber=function(){return this.unsigned?(this.high>>>0)*mr+(this.low>>>0):this.high*mr+(this.low>>>0)};x.toString=function(e){if(e=e||10,e<2||36>>0,c=s.toString(e);if(o=l,o.isZero())return c+i;for(;c.length<6;)c="0"+c;i=""+c+i}};x.getHighBits=function(){return this.high};x.getHighBitsUnsigned=function(){return this.high>>>0};x.getLowBits=function(){return this.low};x.getLowBitsUnsigned=function(){return this.low>>>0};x.getNumBitsAbs=function(){if(this.isNegative())return this.eq(We)?64:this.neg().getNumBitsAbs();for(var e=this.high!=0?this.high:this.low,n=31;n>0&&(e&1<=0};x.isOdd=function(){return(this.low&1)===1};x.isEven=function(){return(this.low&1)===0};x.equals=function(e){return Ze(e)||(e=Bt(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low};x.eq=x.equals;x.notEquals=function(e){return!this.eq(e)};x.neq=x.notEquals;x.ne=x.notEquals;x.lessThan=function(e){return this.comp(e)<0};x.lt=x.lessThan;x.lessThanOrEqual=function(e){return this.comp(e)<=0};x.lte=x.lessThanOrEqual;x.le=x.lessThanOrEqual;x.greaterThan=function(e){return this.comp(e)>0};x.gt=x.greaterThan;x.greaterThanOrEqual=function(e){return this.comp(e)>=0};x.gte=x.greaterThanOrEqual;x.ge=x.greaterThanOrEqual;x.compare=function(e){if(Ze(e)||(e=Bt(e)),this.eq(e))return 0;var n=this.isNegative(),a=e.isNegative();return n&&!a?-1:!n&&a?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1};x.comp=x.compare;x.negate=function(){return!this.unsigned&&this.eq(We)?We:this.not().add(Cr)};x.neg=x.negate;x.add=function(e){Ze(e)||(e=Bt(e));var n=this.high>>>16,a=this.high&65535,r=this.low>>>16,A=this.low&65535,o=e.high>>>16,i=e.high&65535,l=e.low>>>16,s=e.low&65535,c=0,h=0,_=0,f=0;return f+=A+s,_+=f>>>16,f&=65535,_+=r+l,h+=_>>>16,_&=65535,h+=a+i,c+=h>>>16,h&=65535,c+=n+o,c&=65535,le(_<<16|f,c<<16|h,this.unsigned)};x.subtract=function(e){return Ze(e)||(e=Bt(e)),this.add(e.neg())};x.sub=x.subtract;x.multiply=function(e){if(this.isZero())return pt;if(Ze(e)||(e=Bt(e)),ut){var n=ut.mul(this.low,this.high,e.low,e.high);return le(n,ut.get_high(),this.unsigned)}if(e.isZero())return pt;if(this.eq(We))return e.isOdd()?We:pt;if(e.eq(We))return this.isOdd()?We:pt;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(Ou)&&e.lt(Ou))return ft(this.toNumber()*e.toNumber(),this.unsigned);var a=this.high>>>16,r=this.high&65535,A=this.low>>>16,o=this.low&65535,i=e.high>>>16,l=e.high&65535,s=e.low>>>16,c=e.low&65535,h=0,_=0,f=0,m=0;return m+=o*c,f+=m>>>16,m&=65535,f+=A*c,_+=f>>>16,f&=65535,f+=o*s,_+=f>>>16,f&=65535,_+=r*c,h+=_>>>16,_&=65535,_+=A*s,h+=_>>>16,_&=65535,_+=o*l,h+=_>>>16,_&=65535,h+=a*c+r*s+A*l+o*i,h&=65535,le(f<<16|m,h<<16|_,this.unsigned)};x.mul=x.multiply;x.divide=function(e){if(Ze(e)||(e=Bt(e)),e.isZero())throw Error("division by zero");if(ut){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?ut.div_u:ut.div_s)(this.low,this.high,e.low,e.high);return le(n,ut.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Kn:pt;var a,r,A;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return Kn;if(e.gt(this.shru(1)))return zu;A=Kn}else{if(this.eq(We)){if(e.eq(Cr)||e.eq(Sl))return We;if(e.eq(We))return Cr;var o=this.shr(1);return a=o.div(e).shl(1),a.eq(pt)?e.isNegative()?Cr:Sl:(r=this.sub(e.mul(a)),A=a.add(r.div(e)),A)}else if(e.eq(We))return this.unsigned?Kn:pt;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();A=pt}for(r=this;r.gte(e);){a=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var i=Math.ceil(Math.log(a)/Math.LN2),l=i<=48?1:oo(2,i-48),s=ft(a),c=s.mul(e);c.isNegative()||c.gt(r);)a-=l,s=ft(a,this.unsigned),c=s.mul(e);s.isZero()&&(s=Cr),A=A.add(s),r=r.sub(c)}return A};x.div=x.divide;x.modulo=function(e){if(Ze(e)||(e=Bt(e)),ut){var n=(this.unsigned?ut.rem_u:ut.rem_s)(this.low,this.high,e.low,e.high);return le(n,ut.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))};x.mod=x.modulo;x.rem=x.modulo;x.not=function(){return le(~this.low,~this.high,this.unsigned)};x.and=function(e){return Ze(e)||(e=Bt(e)),le(this.low&e.low,this.high&e.high,this.unsigned)};x.or=function(e){return Ze(e)||(e=Bt(e)),le(this.low|e.low,this.high|e.high,this.unsigned)};x.xor=function(e){return Ze(e)||(e=Bt(e)),le(this.low^e.low,this.high^e.high,this.unsigned)};x.shiftLeft=function(e){return Ze(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?le(this.low<>>32-e,this.unsigned):le(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):le(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};x.shr=x.shiftRight;x.shiftRightUnsigned=function(e){if(Ze(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var a=this.low;return le(a>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?le(n,0,this.unsigned):le(n>>>e-32,0,this.unsigned)};x.shru=x.shiftRightUnsigned;x.shr_u=x.shiftRightUnsigned;x.toSigned=function(){return this.unsigned?le(this.low,this.high,!1):this};x.toUnsigned=function(){return this.unsigned?this:le(this.low,this.high,!0)};x.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()};x.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};x.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]};ie.fromBytes=function(e,n,a){return a?ie.fromBytesLE(e,n):ie.fromBytesBE(e,n)};ie.fromBytesLE=function(e,n){return new ie(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)};ie.fromBytesBE=function(e,n){return new ie(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}});function uy(t){let e=t.defaultSampleType,n=t.sampleType,a=n.length-1;if(!e||!+e)return a;let r=n.findIndex(A=>A.type===e);return r===-1?a:r}function ef(t){if(t.byteLength===0)return null;let e;try{e=Zu.perftools.profiles.Profile.decode(new Uint8Array(t))}catch{return null}function n(_){return typeof _=="number"?_:_.low}function a(_){return e.stringTable[n(_)]||null}let r=new Map;function A(_){let{name:f,filename:m,startLine:u}=_,g=f!=null&&a(f)||"(unknown)",p=m!=null?a(m):null,I=u!=null?+u:null,E={key:`${g}:${p}:${I}`,name:g};return p!=null&&(E.file=p),I!=null&&(E.line=I),E}for(let _ of e.function)if(_.id){let f=A(_);f!=null&&r.set(n(_.id),f)}function o(_){let{line:f}=_;if(f==null)return null;let m=Ae(f);if(m==null)return null;if(m.functionId){let u=r.get(n(m.functionId)),g=m.line instanceof Xu.default?m.line.toNumber():m.line;return g&&g>0&&u!=null&&(u.line=g),u||null}else return null}let i=new Map;for(let _ of e.location)if(_.id!=null){let f=o(_);f&&i.set(n(_.id),f)}let l=e.sampleType.map(_=>({type:_.type&&a(_.type)||"samples",unit:_.unit&&a(_.unit)||"count"})),s=uy(e);if(s<0||s>=l.length)return null;let c=l[s],h=new ae;switch(c.unit){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":h.setValueFormatter(new ee(c.unit));break;case"bytes":h.setValueFormatter(new $e);break}for(let _ of e.sample){let f=_.locationId?_.locationId.map(u=>i.get(n(u))):[];if(f.reverse(),_.value==null||_.value.length<=s)return null;let m=_.value[s];h.appendSampleWithWeight(f.filter(u=>u!=null),+m)}return h.build()}var Zu,Xu,tf=re(()=>{"use strict";Zu=he(Ku());ke();V();Ke();Xu=he(Wu())});function py(t){return De(fy,t,e=>{let n=e.url,a=e.lineNumber,r=e.columnNumber,A=e.functionName||(n?`(anonymous ${n.split("/").pop()}:${a})`:"(anonymous)");return{key:`${A}:${n}:${a}:${r}`,name:A,file:n,line:a,col:r}})}function Fl(t){let e=new Map,n=0,a=(l,s)=>{l.id=n++,e.set(l.id,l),s&&(l.parent=s.id),l.children.forEach(c=>a(c,l))};a(t.head);let r=l=>{if(l.children.length===0)return l.selfSize||0;let s=l.children.reduce((c,h)=>(c+=r(h),c),l.selfSize);return l.totalSize=s,s},A=r(t.head),o=[];for(let l of e.values()){let s=[];for(s.push(l);l.parent!==void 0;){let c=e.get(l.parent);if(c===void 0)break;s.unshift(c),l=c}o.push(s)}let i=new ae(A);for(let l of o){let s=l[l.length-1];i.appendSampleWithWeight(l.map(c=>py(c.callFrame)),s.selfSize)}return i.setValueFormatter(new $e),i.build()}var fy,nf=re(()=>{"use strict";ke();V();Ke();fy=new Map});function io(t,e){return`${ln(""+t,10)}:${ln(""+e,10)}`}function rf(t){let e=new Map;for(let n of t)De(e,io(Number(n.pid),Number(n.tid)),()=>[]).push(n);return e}function my(t,e){if(t.length===0&&e.length===0)throw new Error("This method should not be given both queues empty");if(e.length===0)return"B";if(t.length===0)return"E";let n=t[0],a=e[0],r=n.ts,A=a.ts;return r0){let o=Number.MAX_SAFE_INTEGER;for(let i of t)o=Math.min(o,i.ts);for(let i of t)i.ts-=o}let a=[];for(let o of t)switch(o.ph){case"B":{e.push(o);break}case"E":{n.push(o);break}case"X":{a.push(o);break}default:return o}function r(o){return o.dur??o.tdur??0}a.sort((o,i)=>{if(o.tsi.ts)return 1;let l=r(o),s=r(i);return l>s?-1:li.ts?1:0}return e.sort(A),n.sort(A),[e,n]}function jy(t){let e=[];for(let n of t)switch(n.ph){case"B":case"E":case"X":e.push(n)}return e}function af(t){let e=new Map;for(let n of t)n.ph==="M"&&n.name==="process_name"&&n.args&&n.args.name&&e.set(n.pid,n.args.name);return e}function Af(t){let e=new Map;for(let n of t)n.ph==="M"&&n.name==="thread_name"&&n.args&&n.args.name&&e.set(io(n.pid,n.tid),n.args.name);return e}function of(t){return`${t.name||"(unnamed)"}`}function Rl(t){let e=of(t);return t.args&&(e+=` ${JSON.stringify(t.args)}`),e}function Pn(t,e="UNKNOWN"){if(e==="HERMES"){let a=`${t.name}:${t.args.url}:${t.args.line}:${t.args.column}`;return{name:of(t),key:a,file:t.args.url,line:t.args.line,col:t.args.column}}let n=Rl(t);return{name:n,key:n}}function lf(t,e,n,a){return t!=null&&e!=null?`${t} (pid ${n}), ${e} (tid ${a})`:t!=null?`${t} (pid ${n}, tid ${a})`:e!=null?`${e} (pid ${n}, tid ${a})`:`pid ${n}, tid ${a}`}function vy(t,e){let n=af(t),a=Af(t),r=new Map;return e.forEach(A=>{if(A.length===0)return;let o=Number(A[0].pid),i=Number(A[0].tid),l=io(o,i),s=n.get(o),c=a.get(l),h=lf(s,c,o,i);r.set(l,h)}),r}function yy(t,e){let n=af(t),a=Af(t),r=new Map;return e.forEach(A=>{if(A.length===0)return;let{pid:o,tid:i}=A[0],l=io(o,i),s=n.get(o),c=a.get(l),h=lf(s,c,o,i);r.set(l,h)}),r}function Ey(t,e,n="UNKNOWN"){let[a,r]=Iy(t),A=new Ie;A.setValueFormatter(new ee("microseconds")),A.setName(e);let o=[],i=s=>{o.push(s),A.enterFrame(Pn(s,n),s.ts)},l=s=>{let c=Ae(o);if(c==null){console.warn(`Tried to end frame "${Pn(s,n).key}", but the stack was empty. Doing nothing instead.`);return}let h=Pn(s,n),_=Pn(c,n);if(s.name!==c.name){console.warn(`ts=${s.ts}: Tried to end "${h.key}" when "${_.key}" was on the top of the stack. Doing nothing instead.`);return}h.key!==_.key&&console.warn(`ts=${s.ts}: Tried to end "${h.key}" when "${_.key}" was on the top of the stack. Ending ${_.key} instead.`),o.pop(),A.leaveFrame(_,s.ts)};for(;a.length>0||r.length>0;){let s=my(a,r);switch(s){case"B":{i(a.shift());break}case"E":{let h=Ae(o);if(h!=null){let f=Pn(h,n),m=!1;for(let u=1;ur[0].ts)break;let p=Pn(g,n);if(f.key===p.key){let I=r[0];r[0]=r[u],r[u]=I,m=!0;break}}if(!m)for(let u=1;ur[0].ts)break;if(g.name===h.name){let p=r[0];r[0]=r[u],r[u]=p,m=!0;break}}}let _=r.shift();l(_);break}default:return s}}for(let s=o.length-1;s>=0;s--){let c=Pn(o[s],n);console.warn(`Frame "${c.key}" was still open at end of profile. Closing automatically.`),A.leaveFrame(c,A.getTotalWeight())}return A.build()}function By(t){let e=[],n=Number(t[0].ts);return t.forEach((a,r)=>{if(r===0)return;let A=Number(a.ts)-n;n=Number(a.ts),e.push(A)}),e.push(0),e}function Qy({name:t,category:e}){return{key:`${t}:${e}`,name:t}}function wy(t,e){let n=[],a=e;for(;a;){let r=t[a];if(!r)throw new Error(`Could not find frame for id ${a}`);n.push(Qy(r)),a=r.parent}return n.reverse()}function by(t,e,n){let a=new ae;a.setValueFormatter(new ee("microseconds")),a.setName(n);let r=By(e);return e.forEach((A,o)=>{let i=r[o],l=wy(t.stackFrames,A.sf);a.appendSampleWithWeight(l,i)}),a.build()}function Dl(t,e="UNKNOWN"){let n=jy(t),a=rf(n),r=yy(t,a),A=[];return r.forEach((o,i)=>{let l=a.get(i);if(!l)throw new Error(`Could not find events for key: ${l}`);A.push([i,Ey(l,o,e)])}),Fe(A,o=>o[0]),{name:"",indexToView:0,profiles:A.map(o=>o[1])}}function xy(t){let e=rf(t.samples),n=vy(t.traceEvents,e),a=[];return n.forEach((r,A)=>{let o=e.get(A);if(!o)throw new Error(`Could not find samples for key: ${o}`);o.length!==0&&a.push([A,by(t,o,r)])}),Fe(a,r=>r[0]),{name:"",indexToView:0,profiles:a.map(r=>r[1])}}function _a(t){if(!Array.isArray(t)||t.length===0)return!1;for(let e of t){if(!("ph"in e))return!1;switch(e.ph){case"B":case"E":case"X":if(!("ts"in e))return!1;case"M":break}}return!0}function ky(t){return t?Cy.every(e=>e in t):!1}function Sy(t){return _a(t)?ky(t[0].args):!1}function sf(t){return"traceEvents"in t?_a(t.traceEvents):!1}function Ny(t){return"traceEvents"in t&&"stackFrames"in t&&"samples"in t&&_a(t.traceEvents)}function cf(t){return sf(t)||_a(t)}function _f(t){return Ny(t)?xy(t):sf(t)?Dl(t.traceEvents):Sy(t)?Dl(t,"HERMES"):_a(t)?Dl(t):t}var Cy,hf=re(()=>{"use strict";V();ke();Ke();Cy=["line","column","name","category","url","params","allocatedCategory","allocatedName"]});function Hl(t,e){return new Tl(t,e).parse()}var Ll,Tl,gf=re(()=>{"use strict";ke();V();Ke();Ll=class{constructor(e,n){this.fileName=e;this.fieldName=n;this.frameSet=new bt;this.totalWeights=new Map;this.childrenTotalWeights=new Map}getOrInsertFrame(e){return me.getOrInsert(this.frameSet,e)}addToTotalWeight(e,n){this.totalWeights.has(e)?this.totalWeights.set(e,this.totalWeights.get(e)+n):this.totalWeights.set(e,n)}addSelfWeight(e,n){this.addToTotalWeight(this.getOrInsertFrame(e),n)}addChildWithTotalWeight(e,n,a){let r=this.getOrInsertFrame(e),A=this.getOrInsertFrame(n),o=De(this.childrenTotalWeights,r,i=>new Map);o.has(A)?o.set(A,o.get(A)+a):o.set(A,a),this.addToTotalWeight(r,a)}toProfile(){let e=new Ie,n=1;this.fieldName==="Time_(10ns)"?(e.setName(`${this.fileName} -- Time`),n=10,e.setValueFormatter(new ee("nanoseconds"))):this.fieldName=="Memory_(bytes)"?(e.setName(`${this.fileName} -- Memory`),e.setValueFormatter(new $e)):e.setName(`${this.fileName} -- ${this.fieldName}`);let a=0,r=new Set,A=0;for(let[l,s]of this.totalWeights)A=Math.max(A,s);let o=(l,s)=>{if(r.has(l)||s<1e-4*A)return;let c=ja(this.totalWeights,l,()=>0);if(c===0)return;let h=s;e.enterFrame(l,Math.round(a*n)),r.add(l);for(let[_,f]of this.childrenTotalWeights.get(l)||[]){let m=s*(f/c),u=a;o(_,m);let g=a-u;h-=g}r.delete(l),a+=h,e.leaveFrame(l,Math.round(a*n))},i=new Set(this.frameSet);for(let[l,s]of this.childrenTotalWeights)for(let[c,h]of s)i.delete(c);for(let l of i)o(l,this.totalWeights.get(l));return e.build()}},Tl=class{constructor(e,n){this.importedFileName=n;this.callGraphs=null;this.eventsLine=null;this.filename=null;this.functionName=null;this.calleeFilename=null;this.calleeFunctionName=null;this.savedFileNames={};this.savedFunctionNames={};this.prevCostLineNumbers=[];this.lines=[...e.splitLines()],this.lineNum=0}parse(){for(;this.lineNume.toProfile())}:null}frameInfo(){let e=this.filename||"(unknown)",n=this.functionName||"(unknown)";return{key:`${e}:${n}`,name:n,file:e}}calleeFrameInfo(){let e=this.calleeFilename||this.filename||"(unknown)",n=this.calleeFunctionName||"(unknown)";return{key:`${e}:${n}`,name:n,file:e}}parseHeaderLine(e){let n=/^\s*(\w+):\s*(.*)+$/.exec(e);if(!n)return!1;if(n[1]!=="events")return!0;let a=n[2].split(" ");if(this.callGraphs!=null)throw new Error(`Duplicate "events: " lines specified. First was "${this.eventsLine}", now received "${e}" on ${this.lineNum}.`);return this.callGraphs=a.map(r=>new Ll(this.importedFileName,r)),!0}parseAssignmentLine(e){let n=/^(\w+)=\s*(.*)$/.exec(e);if(!n)return!1;let a=n[1],r=n[2];switch(a){case"fe":case"fi":{this.parseNameWithCompression(r,this.savedFileNames);break}case"fl":{this.filename=this.parseNameWithCompression(r,this.savedFileNames);break}case"fn":{this.functionName=this.parseNameWithCompression(r,this.savedFunctionNames);break}case"cfi":case"cfl":{this.calleeFilename=this.parseNameWithCompression(r,this.savedFileNames);break}case"cfn":{this.calleeFunctionName=this.parseNameWithCompression(r,this.savedFunctionNames);break}case"calls":{this.parseCostLine(this.lines[this.lineNum++],"child"),this.calleeFilename=null,this.calleeFunctionName=null;break}case"cob":case"ob":break;default:console.log(`Ignoring assignment to unrecognized key "${e}" on line ${this.lineNum}`)}return!0}parseNameWithCompression(e,n){{let a=/^\((\d+)\)\s*(.+)$/.exec(e);if(a){let r=a[1],A=a[2];if(r in n)throw new Error(`Redefinition of name with id: ${r}. Original value was "${n[r]}". Tried to redefine as "${A}" on line ${this.lineNum}.`);return n[r]=A,A}}{let a=/^\((\d+)\)$/.exec(e);if(a){let r=a[1];if(!(r in n))throw new Error(`Tried to use name with id ${r} on line ${this.lineNum} before it was defined.`);return n[r]}}return e}parseCostLine(e,n){let a=e.split(/\s+/),r=[];for(let o=0;o!/^$|^Log closed$|log opened/.exec(p)),a=-1,r=g(n[0]);if(r===null)throw Error;a=r.at;let A=Ae(n);if(A===null)throw Error;let o=g(A);if(o===null)throw Error;let i=o.at,l=new bt,s=[],c=0,h,_=-1;function f(p,I,j){function E(b,F){s.push(F),e.enterFrame(me.getOrInsert(l,{name:F,key:F}),b),c=b}_>-1&&(_=-1,h===j&&_>=c&&f(p,_,`QUEUE ${j}`));let y=`STACK ${p}`;[...s].reverse().find(b=>b.startsWith("STACK "))!==y&&(s.length===1&&m(c),E(I,y)),E(I,j)}function m(p){let I=s.pop();if(I===void 0)throw Error("Tried to leave frame when nothing was on stack.");e.leaveFrame(me.getOrInsert(l,{name:I,key:I}),p);let j=Ae(s);j!==null&&j.startsWith("QUEUE ")&&(m(p),j=Ae(s)),s.length>1&&j!==null&&j.startsWith("STACK ")&&m(p),c=p}function u(p,I,j){Ae(s)===j?m(I):c===0?(console.log(`Tried to leave frame "${j}" which was never entered. Assuming it has been running since the start.`),f(p,0,j),m(I)):console.log(`Tried to leave frame "${j}" which was never entered. Other events have happened since the start, ignoring line.`)}function g(p){if(p===void 0)throw Error("Probably tried to import empty file.");let I=p.split(":");return I.length<3?null:a!==-1?{at:parseInt(I[0])-a,event:I[1],stackInt:parseInt(I[2]),name:I[5]}:{at:parseInt(I[0]),event:I[1],stackInt:parseInt(I[2]),name:I[5]}}for(n.forEach((p,I,j)=>{let E=g(p);if(E!==null){if(E.event==="PUSH"){f(E.stackInt,E.at,E.name),I+=1;let y=g(j[I]);for(;y!==null&&y.at===E.at;)y.name===E.name&&y.stackInt===E.stackInt&&y.event==="POP"?(u(y.stackInt,y.at,y.name),j.splice(I,1),y=null):(I+=1,I0;)m(i);return e.build()}var uf=re(()=>{"use strict";ke();V();Ke()});function Ml(t){let e=new ae,n=[],a,r="0",A=-1;for(let l of t.splitLines()){let s=/^( *)[\d.]+% \[(\d+)\]\s*(\S+)(?: @ (.*))?$/gm.exec(l);if(!s)continue;let c=s[1].length;if(c<=A){let _=n.slice(0,A+1).reverse(),f=parseInt(r,10);e.appendSampleWithWeight(_,f)}let h=s[3];a=s[4]||a,n[c]={key:h,name:h,file:a},r=s[2],A=c}if(A==-1)return null;let o=n.slice(0,A+1).reverse(),i=parseInt(r,10);return e.appendSampleWithWeight(o,i),e.build()}var ff=re(()=>{"use strict";ke()});function lo(t){da===An.length&&An.push(An.length+1);let e=da;return da=An[e],An[e]=t,e}function Fy(t){t<132||(An[t]=da,da=t)}function mf(t,e){t=t>>>0;let n=Jt(),a=[];for(let r=t;r>>0,Hy(t,e)}function ga(){return(ha===null||ha.byteLength===0)&&(ha=new Uint8Array(ne.memory.buffer)),ha}function If(t){return An[t]}function Dy(t,e){let n=e(t.length*1,1)>>>0;return ga().set(t,n/1),Un=t.length,n}function Ry(t,e){let n=e(t.length*4,4)>>>0,a=Jt();for(let r=0;r>>0;return ga().subarray(l,l+i.length).set(i),Un=i.length,l}let a=t.length,r=e(a,1)>>>0,A=ga(),o=0;for(;o127)break;A[r+o]=i}if(o!==a){o!==0&&(t=t.slice(o)),r=n(r,a,a=o+t.length*3,1)>>>0;let i=ga().subarray(r+o,r+a),l=ua.encodeInto(t,i);o+=l.written,r=n(r,a,o,1)>>>0}return Un=o,r}function Pl(t){let e=If(t);return Fy(t),e}function Hy(t,e){return Kl+=e,Kl>=Ty&&(so=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),so.decode(),Kl=e),so.decode(ga().subarray(t,t+e))}function jf(t,e){try{let i=ne.__wbindgen_add_to_stack_pointer(-16),l=Dy(t,ne.__wbindgen_export2),s=Un;ne.interpret_jfr(i,l,s,e);var n=Jt().getInt32(i+0,!0),a=Jt().getInt32(i+4,!0),r=Jt().getInt32(i+8,!0),A=Jt().getInt32(i+12,!0);if(A)throw Pl(r);var o=mf(n,a).slice();return ne.__wbindgen_export(n,a*4,4),o}finally{ne.__wbindgen_add_to_stack_pointer(16)}}async function Ky(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(a){if(t.ok&&My.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",a);else throw a}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function Jy(){let t={};return t.wbg={},t.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(e,n){throw new Error(Jl(e,n))},t.wbg.__wbg_frame_new=function(e){let n=Ir.__wrap(e);return lo(n)},t.wbg.__wbg_frame_unwrap=function(e){return Ir.__unwrap(If(e))},t.wbg.__wbg_methodsample_new=function(e){let n=fa.__wrap(e);return lo(n)},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let a=Jl(e,n);return lo(a)},t.wbg.__wbindgen_object_drop_ref=function(e){Pl(e)},t}function Py(t,e){return ne=t.exports,vf.__wbindgen_wasm_module=e,Gn=null,ha=null,ne}async function vf(t){if(ne!==void 0)return ne;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("jfrview_bg.wasm",Gy.url));let e=Jy();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:a}=await Ky(await t,e);return Py(n,a)}var Gy,ne,Gn,ha,An,da,so,Ty,Kl,ua,Un,pf,Cf,Ir,fa,My,yf,Ef=re(()=>{Gy={};Gn=null;ha=null;An=new Array(128).fill(void 0);An.push(void 0,null,!0,!1);da=An.length;so=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});so.decode();Ty=2146435072,Kl=0;ua=new TextEncoder;"encodeInto"in ua||(ua.encodeInto=function(t,e){let n=ua.encode(t);return e.set(n),{read:t.length,written:n.length}});Un=0,pf=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>ne.__wbg_frame_free(t>>>0,1)),Cf=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>ne.__wbg_methodsample_free(t>>>0,1)),Ir=class t{static __wrap(e){e=e>>>0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,pf.register(n,n.__wbg_ptr,n),n}static __unwrap(e){return e instanceof t?e.__destroy_into_raw():0}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,pf.unregister(this),e}free(){let e=this.__destroy_into_raw();ne.__wbg_frame_free(e,0)}get name(){let e,n;try{let A=ne.__wbindgen_add_to_stack_pointer(-16);ne.__wbg_get_frame_name(A,this.__wbg_ptr);var a=Jt().getInt32(A+0,!0),r=Jt().getInt32(A+4,!0);return e=a,n=r,Jl(a,r)}finally{ne.__wbindgen_add_to_stack_pointer(16),ne.__wbindgen_export(e,n,1)}}set name(e){let n=Ly(e,ne.__wbindgen_export2,ne.__wbindgen_export3),a=Un;ne.__wbg_set_frame_name(this.__wbg_ptr,n,a)}};Symbol.dispose&&(Ir.prototype[Symbol.dispose]=Ir.prototype.free);fa=class t{static __wrap(e){e=e>>>0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,Cf.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Cf.unregister(this),e}free(){let e=this.__destroy_into_raw();ne.__wbg_methodsample_free(e,0)}get frames(){try{let r=ne.__wbindgen_add_to_stack_pointer(-16);ne.__wbg_get_methodsample_frames(r,this.__wbg_ptr);var e=Jt().getInt32(r+0,!0),n=Jt().getInt32(r+4,!0),a=mf(e,n).slice();return ne.__wbindgen_export(e,n*4,4),a}finally{ne.__wbindgen_add_to_stack_pointer(16)}}set frames(e){let n=Ry(e,ne.__wbindgen_export2),a=Un;ne.__wbg_set_methodsample_frames(this.__wbg_ptr,n,a)}};Symbol.dispose&&(fa.prototype[Symbol.dispose]=fa.prototype.free);My=new Set(["basic","cors","default"]);yf=vf});var Qf,Bf=re(()=>{Qf="./jfrview_bg-BLJXNNQB.wasm"});async function Gl(t,e){await yf({module_or_path:Qf});let n=wf(e,!1),a=wf(e,!0);return{indexToView:0,name:t,profiles:[n,a]}}function bf(t){let e=t.slice(0,3),n=new Uint8Array(e);return n[0]===70&&n[1]===76&&n[2]===82}function wf(t,e){let n=jf(new Uint8Array(t),e),a=new ae(n.length);e?a.setName("With native calls"):a.setName("Without native calls");function r(A){return{name:A.name,key:A.name}}for(let A of n)a.appendSampleWithWeight(A.frames.map(r),1);return a.build()}var xf=re(()=>{"use strict";ke();Ef();Bf()});var kf={};$l(kf,{importFromFileSystemDirectoryEntry:()=>Yy,importProfileGroupFromBase64:()=>qy,importProfileGroupFromText:()=>Oy,importProfilesFromArrayBuffer:()=>$y,importProfilesFromFile:()=>zy});async function Oy(t,e){return await co(new XA(t,e))}async function qy(t,e){return await co(an.fromArrayBuffer(t,cs(e).buffer))}async function zy(t){return co(an.fromFile(t))}async function $y(t,e){return co(an.fromArrayBuffer(t,e))}async function co(t){let e=await t.name(),n=await Vy(t);if(n){n.name||(n.name=e);for(let a of n.profiles)a&&!a.getName()&&a.setName(e);return n}return null}function Qe(t){return t?{name:t.getName(),indexToView:0,profiles:[t]}:null}async function Vy(t){let e=await t.name(),n=await t.readAsArrayBuffer();{let A=ef(n);if(A)return console.log("Importing as protobuf encoded pprof file"),Qe(A)}let a=await t.readAsText();if(e.endsWith(".speedscope.json"))return console.log("Importing as speedscope json file"),Wo(a.parseAsJSON());if(/Trace-\d{8}T\d{6}/.exec(e))return console.log("Importing as Chrome Timeline Object"),Kr(a.parseAsJSON().traceEvents,e);if(e.endsWith(".chrome.json")||/Profile-\d{8}T\d{6}/.exec(e))return console.log("Importing as Chrome Timeline"),Kr(a.parseAsJSON(),e);if(e.endsWith(".stackprof.json"))return console.log("Importing as stackprof profile"),Qe(xi(a.parseAsJSON()));if(e.endsWith(".instruments.txt"))return console.log("Importing as Instruments.app deep copy"),Qe(dl(a));if(e.endsWith(".linux-perf.txt"))return console.log("Importing as output of linux perf script"),pl(a);if(e.endsWith(".collapsedstack.txt"))return console.log("Importing as collapsed stack format"),Qe(ul(a));if(e.endsWith(".v8log.json"))return console.log("Importing as --prof-process v8 log"),Qe(fl(a.parseAsJSON()));if(e.endsWith(".heapprofile"))return console.log("Importing as Chrome Heap Profile"),Qe(Fl(a.parseAsJSON()));if(e.endsWith("-recording.json"))return console.log("Importing as Safari profile"),Qe(ml(a.parseAsJSON()));if(e.startsWith("callgrind."))return console.log("Importing as Callgrind profile"),Hl(a,e);if(e.endsWith(".pmcstat.graph"))return console.log("Importing as pmcstat callgraph format"),Qe(Ml(a));if(e.endsWith(".jfr"))return console.log("Importing as Java Flight Recorder profile"),await Gl(e,n);let r;try{r=a.parseAsJSON()}catch{}if(r){if(r.$schema==="https://www.speedscope.app/file-format-schema.json")return console.log("Importing as speedscope json file"),Wo(r);if(r.systemHost&&r.systemHost.name=="Firefox")return console.log("Importing as Firefox profile"),Qe(Dd(r));if(bi(r))return console.log("Importing as Chrome Timeline"),Kr(r,e);if(Fh(r))return console.log("Importing as Chrome Timeline Object"),Kr(r.traceEvents,e);if("nodes"in r&&"samples"in r&&"timeDeltas"in r)return console.log("Importing as Chrome CPU Profile"),Qe(DA(r));if(cf(r))return console.log("Importing as Trace Event Format profile"),_f(r);if("head"in r&&"samples"in r&&"timestamps"in r)return console.log("Importing as Chrome CPU Profile (old format)"),Qe(Dh(r));if("mode"in r&&"frames"in r&&"raw_timestamp_deltas"in r)return console.log("Importing as stackprof profile"),Qe(xi(r));if("code"in r&&"functions"in r&&"ticks"in r)return console.log("Importing as --prof-process v8 log"),Qe(fl(r));if("head"in r&&"selfSize"in r.head)return console.log("Importing as Chrome Heap Profile"),Qe(Fl(r));if("rts_arguments"in r&&"initial_capabilities"in r)return console.log("Importing as Haskell GHC JSON Profile"),Md(r);if("recording"in r&&"sampleStackTraces"in r.recording)return console.log("Importing as Safari profile"),Qe(ml(r))}else{if(/^# callgrind format/.exec(a.firstChunk())||/^events:/m.exec(a.firstChunk())&&/^fn=/m.exec(a.firstChunk()))return console.log("Importing as Callgrind profile"),Hl(a,e);if(/^[\w \t\(\)]*\tSymbol Name/.exec(a.firstChunk()))return console.log("Importing as Instruments.app deep copy"),Qe(dl(a));if(/^(Stack_|Script_|Obj_)\S+ log opened \(PC\)\n/.exec(a.firstChunk()))return console.log("Importing as Papyrus profile"),Qe(df(a));if(bf(n))return console.log("Importing as Java Flight Recorder profile"),Gl(e,n);let A=pl(a);if(A)return console.log("Importing from linux perf script output"),A;let o=ul(a);if(o)return console.log("Importing as collapsed stack format"),Qe(o);let i=Ml(a);if(i)return console.log("Importing as pmcstat callgraph format"),Qe(i)}return null}async function Yy(t){return Sd(t)}var Sf=re(()=>{"use strict";Rh();Lh();Nd();Fd();Rd();Zo();Ld();Hd();Kd();Jd();_l();tf();V();nf();hf();gf();uf();ff();xf()});var Nf=k((GN,Wy)=>{Wy.exports="./perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt"});var J,Gf,yr,uo,Zl,Vl,Xl,es,Gt={},fo=[],Uf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function jn(t,e){for(var n in e)t[n]=e[n];return t}function ts(t){var e=t.parentNode;e&&e.removeChild(t)}function C(t,e,n){var a,r=arguments,A={};for(a in e)a!=="key"&&a!=="ref"&&(A[a]=e[a]);if(arguments.length>3)for(n=[n],a=3;a=this.capacity;)this.map.delete(this.list.pop().data);let r=this.list.prepend(new Io(e));this.map.set(e,{value:n,listNode:r})}getOrInsert(e,n){let a=this.get(e);return a==null&&(a=n(e),this.insert(e,a)),a}removeLRU(){let e=this.list.pop();if(!e)return null;let n=e.data,a=this.map.get(n).value;return this.map.delete(n),[n,a]}clear(){this.list=new ya,this.map=new Map}};function Re(t,e,n){return tn?n:t}var v=class t{constructor(e,n){this.x=e;this.y=n}withX(e){return new t(e,this.y)}withY(e){return new t(this.x,e)}plus(e){return new t(this.x+e.x,this.y+e.y)}minus(e){return new t(this.x-e.x,this.y-e.y)}times(e){return new t(this.x*e,this.y*e)}timesPointwise(e){return new t(this.x*e.x,this.y*e.y)}dividedByPointwise(e){return new t(this.x/e.x,this.y/e.y)}dot(e){return this.x*e.x+this.y*e.y}equals(e){return this.x===e.x&&this.y===e.y}approxEquals(e,n=1e-9){return Math.abs(this.x-e.x)=0&&e<=31),t.TEXTURE0+e}var q;(f=>{class t{constructor(u=0,g=0,p=0,I=0){this.x=u;this.y=g;this.width=p;this.height=I}set(u,g,p,I){this.x=u,this.y=g,this.width=p,this.height=I}equals(u){return this.x===u.x&&this.y===u.y&&this.width===u.width&&this.height===u.height}}f.Rect=t;class e{constructor(u,g,p,I){this.redF=u;this.greenF=g;this.blueF=p;this.alphaF=I}equals(u){return this.redF===u.redF&&this.greenF===u.greenF&&this.blueF===u.blueF&&this.alphaF===u.alphaF}static{this.TRANSPARENT=new e(0,0,0,0)}}f.Color=e;let n;(w=>(w[w.ZERO=0]="ZERO",w[w.ONE=1]="ONE",w[w.SOURCE_COLOR=2]="SOURCE_COLOR",w[w.TARGET_COLOR=3]="TARGET_COLOR",w[w.INVERSE_SOURCE_COLOR=4]="INVERSE_SOURCE_COLOR",w[w.INVERSE_TARGET_COLOR=5]="INVERSE_TARGET_COLOR",w[w.SOURCE_ALPHA=6]="SOURCE_ALPHA",w[w.TARGET_ALPHA=7]="TARGET_ALPHA",w[w.INVERSE_SOURCE_ALPHA=8]="INVERSE_SOURCE_ALPHA",w[w.INVERSE_TARGET_ALPHA=9]="INVERSE_TARGET_ALPHA",w[w.CONSTANT=10]="CONSTANT",w[w.INVERSE_CONSTANT=11]="INVERSE_CONSTANT"))(n=f.BlendOperation||={});let a;(g=>(g[g.TRIANGLES=0]="TRIANGLES",g[g.TRIANGLE_STRIP=1]="TRIANGLE_STRIP"))(a=f.Primitive||={});class r{constructor(){this.resizeEventHandlers=new Set}setCopyBlendState(){this.setBlendState(1,0)}setAddBlendState(){this.setBlendState(1,1)}setPremultipliedBlendState(){this.setBlendState(1,8)}setUnpremultipliedBlendState(){this.setBlendState(6,8)}addAfterResizeEventHandler(u){this.resizeEventHandlers.add(u)}removeAfterResizeEventHandler(u){this.resizeEventHandlers.delete(u)}}f.Context=r;let A;(g=>(g[g.FLOAT=0]="FLOAT",g[g.BYTE=1]="BYTE"))(A=f.AttributeType||={});function o(m){return m==0?4:1}f.attributeByteLength=o;class i{constructor(u,g,p,I){this.name=u;this.type=g;this.count=p;this.byteOffset=I}}f.Attribute=i;class l{constructor(){this._attributes=[];this._stride=0}get attributes(){return this._attributes}get stride(){return this._stride}add(u,g,p){return this.attributes.push(new i(u,g,p,this.stride)),this._stride+=p*o(g),this}}f.VertexFormat=l;class s{uploadFloat32Array(u){this.upload(new Uint8Array(u.buffer),0)}uploadFloats(u){this.uploadFloat32Array(new Float32Array(u))}}f.VertexBuffer=s;let c;(g=>(g[g.NEAREST=0]="NEAREST",g[g.LINEAR=1]="LINEAR"))(c=f.PixelFilter||={});let h;(g=>(g[g.REPEAT=0]="REPEAT",g[g.CLAMP=1]="CLAMP"))(h=f.PixelWrap||={});class _{constructor(u,g,p){this.minFilter=u;this.magFilter=g;this.wrap=p}static{this.LINEAR_CLAMP=new _(1,1,1)}static{this.LINEAR_MIN_NEAREST_MAG_CLAMP=new _(1,0,1)}static{this.NEAREST_CLAMP=new _(0,0,1)}}f.TextureFormat=_})(q||={});var vo;(f=>{class t extends q.Context{constructor(g=document.createElement("canvas")){super();this._attributeCount=0;this._blendOperations=0;this._contextResetHandlers=[];this._currentClearColor=q.Color.TRANSPARENT;this._currentRenderTarget=null;this._defaultViewport=new q.Rect;this._forceStateUpdate=!0;this._generation=1;this._height=0;this._oldBlendOperations=0;this._oldRenderTarget=null;this._oldViewport=new q.Rect;this._width=0;this.handleWebglContextRestored=()=>{this._attributeCount=0,this._currentClearColor=q.Color.TRANSPARENT,this._forceStateUpdate=!0,this._generation++;for(let g of this._contextResetHandlers)g()};this.ANGLE_instanced_arrays=null;this.ANGLE_instanced_arrays_generation=-1;let p=g.getContext("webgl",{alpha:!1,antialias:!1,depth:!1,preserveDrawingBuffer:!1,stencil:!1});if(p==null)throw new Error("Setup failure");this._gl=p;let I=g.style;g.width=0,g.height=0,I.width=I.height="0",g.addEventListener("webglcontextlost",j=>{j.preventDefault()}),g.addEventListener("webglcontextrestored",this.handleWebglContextRestored),this._blendOperationMap={0:this._gl.ZERO,1:this._gl.ONE,2:this._gl.SRC_COLOR,3:this._gl.DST_COLOR,4:this._gl.ONE_MINUS_SRC_COLOR,5:this._gl.ONE_MINUS_DST_COLOR,6:this._gl.SRC_ALPHA,7:this._gl.DST_ALPHA,8:this._gl.ONE_MINUS_SRC_ALPHA,9:this._gl.ONE_MINUS_DST_ALPHA,10:this._gl.CONSTANT_COLOR,11:this._gl.ONE_MINUS_CONSTANT_COLOR}}get widthInPixels(){return this._width}get heightInPixels(){return this._height}testContextLoss(){this.handleWebglContextRestored()}get gl(){return this._gl}get generation(){return this._generation}addContextResetHandler(g){Zf(this._contextResetHandlers,g)}removeContextResetHandler(g){Xf(this._contextResetHandlers,g)}get currentRenderTarget(){return this._currentRenderTarget}beginFrame(){this.setRenderTarget(null)}endFrame(){}setBlendState(g,p){this._blendOperations=t._packBlendModes(g,p)}setViewport(g,p,I,j){(this._currentRenderTarget!=null?this._currentRenderTarget.viewport:this._defaultViewport).set(g,p,I,j)}get viewport(){return this._currentRenderTarget!=null?this._currentRenderTarget.viewport:this._defaultViewport}get renderTargetWidthInPixels(){return this._currentRenderTarget!=null?this._currentRenderTarget.viewport.width:this._width}get renderTargetHeightInPixels(){return this._currentRenderTarget!=null?this._currentRenderTarget.viewport.height:this._height}draw(g,p,I){this._updateRenderTargetAndViewport(),s.from(p).prepare(),c.from(I).prepare(),this._updateFormat(p.format),this._updateBlendState(),this._gl.drawArrays(g==0?this._gl.TRIANGLES:this._gl.TRIANGLE_STRIP,0,Math.floor(I.byteCount/p.format.stride)),this._forceStateUpdate=!1}resize(g,p,I,j){let E=this._gl.canvas,y=E.getBoundingClientRect();if(this._width===g&&this._height===p&&Math.abs(y.width-I)<.02&&Math.abs(y.height-j)<.02)return;let b=E.style;E.width=g,E.height=p,b.width=`${I}px`,b.height=`${j}px`,this.setViewport(0,0,g,p),this._width=g,this._height=p,this.resizeEventHandlers.forEach(F=>F())}clear(g){this._updateRenderTargetAndViewport(),this._updateBlendState(),g.equals(this._currentClearColor)||(this._gl.clearColor(g.redF,g.greenF,g.blueF,g.alphaF),this._currentClearColor=g),this._gl.clear(this._gl.COLOR_BUFFER_BIT)}setRenderTarget(g){this._currentRenderTarget=_.from(g)}createMaterial(g,p,I){let j=new s(this,g,p,I);return j.program,j}createVertexBuffer(g){return O(g>0&&g%4==0),new c(this,g)}createTexture(g,p,I,j){return new h(this,g,p,I,j)}createRenderTarget(g){return new _(this,h.from(g))}getANGLE_instanced_arrays(){if(this.ANGLE_instanced_arrays_generation!==this._generation&&(this.ANGLE_instanced_arrays=null),!this.ANGLE_instanced_arrays&&(this.ANGLE_instanced_arrays=this.gl.getExtension("ANGLE_instanced_arrays"),!this.ANGLE_instanced_arrays))throw new Error("Failed to get extension ANGLE_instanced_arrays");return this.ANGLE_instanced_arrays}_updateRenderTargetAndViewport(){let g=this._currentRenderTarget,p=g!=null?g.viewport:this._defaultViewport,I=this._gl;(this._forceStateUpdate||this._oldRenderTarget!=g)&&(I.bindFramebuffer(I.FRAMEBUFFER,g?g.framebuffer:null),this._oldRenderTarget=g),(this._forceStateUpdate||!this._oldViewport.equals(p))&&(I.viewport(p.x,this.renderTargetHeightInPixels-p.y-p.height,p.width,p.height),this._oldViewport.set(p.x,p.y,p.width,p.height))}_updateBlendState(){if(this._forceStateUpdate||this._oldBlendOperations!=this._blendOperations){let g=this._gl,p=this._blendOperations,I=this._oldBlendOperations,j=p&15,E=p>>4;O(j in this._blendOperationMap),O(E in this._blendOperationMap),p==t.COPY_BLEND_OPERATIONS?g.disable(g.BLEND):((this._forceStateUpdate||I==t.COPY_BLEND_OPERATIONS)&&g.enable(g.BLEND),g.blendFunc(this._blendOperationMap[j],this._blendOperationMap[E])),this._oldBlendOperations=p}}_updateFormat(g){let p=this._gl,I=g.attributes,j=I.length;for(let E=0;Ej;)this._attributeCount--,p.disableVertexAttribArray(this._attributeCount);this._attributeCount=j}getWebGLInfo(){let g=this.gl.getExtension("WEBGL_debug_renderer_info"),p=g?this.gl.getParameter(g.UNMASKED_RENDERER_WEBGL):null,I=g?this.gl.getParameter(g.UNMASKED_VENDOR_WEBGL):null,j=this.gl.getParameter(this.gl.VERSION);return{renderer:p,vendor:I,version:j}}static from(g){return O(g==null||g instanceof t),g}static _packBlendModes(g,p){return g|p<<4}static{this.COPY_BLEND_OPERATIONS=t._packBlendModes(1,0)}}f.Context=t;class e{constructor(u,g,p=0,I=null,j=!0){this._material=u;this._name=g;this._generation=p;this._location=I;this._isDirty=j}get location(){let u=t.from(this._material.context);if(this._generation!=u.generation&&(this._location=u.gl.getUniformLocation(this._material.program,this._name),this._generation=u.generation,!jo)){let g=this._material.program,p=u.gl;for(let I=0,j=p.getProgramParameter(g,p.ACTIVE_UNIFORMS);I0&&this._texture.height>0?this._texture.texture:null)}}class s{constructor(u,g,p,I,j={},E=[],y=0,b=null){this._context=u;this._format=g;this._vertexSource=p;this._fragmentSource=I;this._uniformsMap=j;this._uniformsList=E;this._generation=y;this._program=b}get context(){return this._context}get format(){return this._format}get vertexSource(){return this._vertexSource}get fragmentSource(){return this._fragmentSource}setUniformFloat(u,g){let p=this._uniformsMap[u]||null;p==null&&(p=new n(this,u),this._uniformsMap[u]=p,this._uniformsList.push(p)),O(p instanceof n),p.set(g)}setUniformInt(u,g){let p=this._uniformsMap[u]||null;p==null&&(p=new a(this,u),this._uniformsMap[u]=p,this._uniformsList.push(p)),O(p instanceof a),p.set(g)}setUniformVec2(u,g,p){let I=this._uniformsMap[u]||null;I==null&&(I=new r(this,u),this._uniformsMap[u]=I,this._uniformsList.push(I)),O(I instanceof r),I.set(g,p)}setUniformVec3(u,g,p,I){let j=this._uniformsMap[u]||null;j==null&&(j=new A(this,u),this._uniformsMap[u]=j,this._uniformsList.push(j)),O(j instanceof A),j.set(g,p,I)}setUniformVec4(u,g,p,I,j){let E=this._uniformsMap[u]||null;E==null&&(E=new o(this,u),this._uniformsMap[u]=E,this._uniformsList.push(E)),O(E instanceof o),E.set(g,p,I,j)}setUniformMat3(u,g,p,I,j,E,y,b,F,T){let Q=this._uniformsMap[u]||null;Q==null&&(Q=new i(this,u),this._uniformsMap[u]=Q,this._uniformsList.push(Q)),O(Q instanceof i),Q.set(g,p,I,j,E,y,b,F,T)}setUniformSampler(u,g,p){let I=this._uniformsMap[u]||null;I==null&&(I=new l(this,u),this._uniformsMap[u]=I,this._uniformsList.push(I)),O(I instanceof l),I.set(g,p)}get program(){let u=this._context.gl;if(this._generation!=this._context.generation){this._program=u.createProgram(),this._compileShader(u,u.VERTEX_SHADER,this.vertexSource),this._compileShader(u,u.FRAGMENT_SHADER,this.fragmentSource);let g=this.format.attributes;for(let p=0;p=0),O(0<=g&&g+I<=this._byteCount),O(0<=p&&p+I<=this._byteCount),this._bytes&&g!=p&&I!=0&&(this._bytes.set(this._bytes.subarray(g,this._byteCount),p),this._growDirtyRegion(Math.min(g,p),Math.max(g,p)+I))}upload(g,p=0){O(0<=p&&p+g.length<=this._byteCount),O(this._bytes!=null),this._bytes.set(g,p),this._growDirtyRegion(p,p+g.length)}free(){this._buffer&&this._context.gl.deleteBuffer(this._buffer),this._generation=0}prepare(){let g=this._context.gl;this._generation!==this._context.generation&&(this._buffer=g.createBuffer(),this._generation=this._context.generation,this._isDirty=!0),g.bindBuffer(g.ARRAY_BUFFER,this._buffer),this._isDirty&&(g.bufferData(g.ARRAY_BUFFER,this._byteCount,g.DYNAMIC_DRAW),this._dirtyMin=this._totalMin,this._dirtyMax=this._totalMax,this._isDirty=!1),this._dirtyMin{let n=U.betweenRects(e.configSpaceSrcRect,e.physicalSpaceDstRect),a=new v(this.gl.viewport.width,this.gl.viewport.height);return U.withTranslation(new v(-1,1)).times(U.withScale(new v(2,-2).dividedByPointwise(a))).times(n)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(q.Primitive.TRIANGLES,this.material,e.batch.getBuffer())}};var fe=class t{constructor(e=0,n=0,a=0,r=1){this.r=e;this.g=n;this.b=a;this.a=r}static fromLumaChromaHue(e,n,a){let r=a/60,A=n*(1-Math.abs(r%2-1)),[o,i,l]=r<1?[n,A,0]:r<2?[A,n,0]:r<3?[0,n,A]:r<4?[0,A,n]:r<5?[A,0,n]:[n,0,A],s=e-(.3*o+.59*i+.11*l);return new t(Re(o+s,0,1),Re(i+s,0,1),Re(l+s,0,1),1)}static fromCSSHex(e){if(e.length!==7||e[0]!=="#")throw new Error(`Invalid color input ${e}`);let n=parseInt(e.substr(1,2),16)/255,a=parseInt(e.substr(3,2),16)/255,r=parseInt(e.substr(5,2),16)/255;if(n<0||n>1||a<0||a>1||r<0||r>1)throw new Error(`Invalid color input ${e}`);return new t(n,a,r)}withAlpha(e){return new t(this.r,this.g,this.b,e)}toCSS(){return`rgba(${(255*this.r).toFixed()}, ${(255*this.g).toFixed()}, ${(255*this.b).toFixed()}, ${this.a.toFixed(2)})`}};var ba=class{constructor(e,n,a){this.gl=e;this.rectangleBatchRenderer=n;this.textureRenderer=a;this.texture=e.createTexture(q.TextureFormat.NEAREST_CLAMP,4096,4096),this.renderTarget=e.createRenderTarget(this.texture),this.rowCache=new Ea(this.texture.height),this.clearLineBatch=new vn(e),this.clearLineBatch.addRect(R.unit,new fe(0,0,0,0)),e.addContextResetHandler(()=>{this.rowCache.clear()})}has(e){return this.rowCache.has(e)}getResolution(){return this.texture.width}getCapacity(){return this.texture.height}allocateLine(e){if(this.rowCache.getSize(){for(let a of e){let r=this.rowCache.get(a);if(r!=null)continue;r=this.allocateLine(a);let A=new R(new v(0,r),new v(this.texture.width,1));this.rectangleBatchRenderer.render({batch:this.clearLineBatch,configSpaceSrcRect:R.unit,physicalSpaceDstRect:A}),n(A,a)}})}renderViaAtlas(e,n){let a=this.rowCache.get(e);if(a==null)return!1;let r=new R(new v(0,a),new v(this.texture.width,1));return this.textureRenderer.render({texture:this.texture,srcRect:r,dstRect:n}),!0}};var rp=` + uniform mat3 uvTransform; + uniform mat3 positionTransform; + + attribute vec2 position; + attribute vec2 uv; + varying vec2 vUv; + + void main() { + vUv = (uvTransform * vec3(uv, 1)).xy; + gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1); + } +`,ap=` + precision mediump float; + + varying vec2 vUv; + uniform sampler2D texture; + + void main() { + gl_FragColor = texture2D(texture, vUv); + } +`,xa=class{constructor(e){this.gl=e;let n=new q.VertexFormat;n.add("position",q.AttributeType.FLOAT,2),n.add("uv",q.AttributeType.FLOAT,2);let a=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],r=[];for(let A of a)r.push(A.pos[0]),r.push(A.pos[1]),r.push(A.uv[0]),r.push(A.uv[1]);this.buffer=e.createVertexBuffer(n.stride*a.length),this.buffer.upload(new Uint8Array(new Float32Array(r).buffer)),this.material=e.createMaterial(n,rp,ap)}render(e){this.material.setUniformSampler("texture",e.texture,0),kt(this.material,"uvTransform",(()=>{let{srcRect:n,texture:a}=e,A=U.withTranslation(new v(0,1)).times(U.withScale(new v(1,-1))).times(U.betweenRects(new R(v.zero,new v(a.width,a.height)),R.unit)).transformRect(n);return U.betweenRects(R.unit,A)})()),kt(this.material,"positionTransform",(()=>{let{dstRect:n}=e,{viewport:a}=this.gl,r=new v(a.width,a.height),o=U.withScale(new v(1,-1)).times(U.betweenRects(new R(v.zero,r),R.NDC)).transformRect(n);return U.betweenRects(R.NDC,o)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(q.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var Eo=new q.VertexFormat;Eo.add("position",q.AttributeType.FLOAT,2);var Ap=` + attribute vec2 position; + + void main() { + gl_Position = vec4(position, 0, 1); + } +`,op=t=>{let{r:e,g:n,b:a}=fe.fromCSSHex(t.fgSecondaryColor),r=`${e.toFixed(1)}, ${n.toFixed(1)}, ${a.toFixed(1)}`;return` + precision mediump float; + + uniform mat3 configSpaceToPhysicalViewSpace; + uniform vec2 physicalSize; + uniform vec2 physicalOrigin; + uniform vec2 configSpaceViewportOrigin; + uniform vec2 configSpaceViewportSize; + uniform float framebufferHeight; + + void main() { + vec2 origin = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportOrigin, 1.0)).xy; + vec2 size = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportSize, 0.0)).xy; + + vec2 halfSize = physicalSize / 2.0; + + float borderWidth = 2.0; + + origin = floor(origin * halfSize) / halfSize + borderWidth * vec2(1.0, 1.0); + size = floor(size * halfSize) / halfSize - 2.0 * borderWidth * vec2(1.0, 1.0); + + vec2 coord = gl_FragCoord.xy; + coord.x = coord.x - physicalOrigin.x; + coord.y = framebufferHeight - coord.y - physicalOrigin.y; + vec2 clamped = clamp(coord, origin, origin + size); + vec2 gap = clamped - coord; + float maxdist = max(abs(gap.x), abs(gap.y)); + + // TOOD(jlfwong): Could probably optimize this to use mix somehow. + if (maxdist == 0.0) { + // Inside viewport rectangle + gl_FragColor = vec4(0, 0, 0, 0); + } else if (maxdist < borderWidth) { + // Inside viewport rectangle at border + gl_FragColor = vec4(${r}, 0.8); + } else { + // Outside viewport rectangle + gl_FragColor = vec4(${r}, 0.5); + } + } + `},ka=class{constructor(e,n){this.gl=e;let a=[[-1,1],[1,1],[-1,-1],[1,-1]],r=[];for(let A of a)r.push(A[0]),r.push(A[1]);this.buffer=e.createVertexBuffer(Eo.stride*a.length),this.buffer.upload(new Uint8Array(new Float32Array(r).buffer)),this.material=e.createMaterial(Eo,Ap,op(n))}render(e){kt(this.material,"configSpaceToPhysicalViewSpace",e.configSpaceToPhysicalViewSpace),yo(this.material,"configSpaceViewportOrigin",e.configSpaceViewportRect.origin),yo(this.material,"configSpaceViewportSize",e.configSpaceViewportRect.size);let n=this.gl.viewport;this.material.setUniformVec2("physicalOrigin",n.x,n.y),this.material.setUniformVec2("physicalSize",n.width,n.height),this.material.setUniformFloat("framebufferHeight",this.gl.renderTargetHeightInPixels),this.gl.setBlendState(q.BlendOperation.SOURCE_ALPHA,q.BlendOperation.INVERSE_SOURCE_ALPHA),this.gl.draw(q.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var Sa=new q.VertexFormat;Sa.add("position",q.AttributeType.FLOAT,2);Sa.add("uv",q.AttributeType.FLOAT,2);var ip=` + uniform mat3 uvTransform; + uniform mat3 positionTransform; + + attribute vec2 position; + attribute vec2 uv; + varying vec2 vUv; + + void main() { + vUv = (uvTransform * vec3(uv, 1)).xy; + gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1); + } +`,lp=t=>` + precision mediump float; + + uniform vec2 uvSpacePixelSize; + uniform float renderOutlines; + + varying vec2 vUv; + uniform sampler2D colorTexture; + + // https://en.wikipedia.org/wiki/HSL_and_HSV#From_luma/chroma/hue + vec3 hcl2rgb(float H, float C, float L) { + float hPrime = H / 60.0; + float X = C * (1.0 - abs(mod(hPrime, 2.0) - 1.0)); + vec3 RGB = + hPrime < 1.0 ? vec3(C, X, 0) : + hPrime < 2.0 ? vec3(X, C, 0) : + hPrime < 3.0 ? vec3(0, C, X) : + hPrime < 4.0 ? vec3(0, X, C) : + hPrime < 5.0 ? vec3(X, 0, C) : + vec3(C, 0, X); + + float m = L - dot(RGB, vec3(0.30, 0.59, 0.11)); + return RGB + vec3(m, m, m); + } + + float triangle(float x) { + return 2.0 * abs(fract(x) - 0.5) - 1.0; + } + + ${t} + + void main() { + vec4 here = texture2D(colorTexture, vUv); + + if (here.z == 0.0) { + // Background color + gl_FragColor = vec4(0, 0, 0, 0); + return; + } + + // Sample the 4 surrounding pixels in the depth texture to determine + // if we should draw a boundary here or not. + vec4 N = texture2D(colorTexture, vUv + vec2(0, uvSpacePixelSize.y)); + vec4 E = texture2D(colorTexture, vUv + vec2(uvSpacePixelSize.x, 0)); + vec4 S = texture2D(colorTexture, vUv + vec2(0, -uvSpacePixelSize.y)); + vec4 W = texture2D(colorTexture, vUv + vec2(-uvSpacePixelSize.x, 0)); + + // NOTE: For outline checks, we intentionally check both the right + // and the left to determine if we're an edge. If a rectangle is a single + // pixel wide, we don't want to render it as an outline, so this method + // of checking ensures that we don't outline single physical-space + // pixel width rectangles. + if ( + renderOutlines > 0.0 && + ( + here.y == N.y && here.y != S.y || // Top edge + here.y == S.y && here.y != N.y || // Bottom edge + here.x == E.x && here.x != W.x || // Left edge + here.x == W.x && here.x != E.x + ) + ) { + // We're on an edge! Draw transparent. + gl_FragColor = vec4(0, 0, 0, 0); + } else { + // Not on an edge. Draw the appropriate color. + gl_FragColor = vec4(colorForBucket(here.z), here.a); + } + } +`,Na=class{constructor(e,n){this.gl=e;let a=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],r=[];for(let A of a)r.push(A.pos[0]),r.push(A.pos[1]),r.push(A.uv[0]),r.push(A.uv[1]);this.buffer=e.createVertexBuffer(Sa.stride*a.length),this.buffer.uploadFloats(r),this.material=e.createMaterial(Sa,ip,lp(n.colorForBucketGLSL))}render(e){let{srcRect:n,rectInfoTexture:a}=e,A=U.withTranslation(new v(0,1)).times(U.withScale(new v(1,-1))).times(U.betweenRects(new R(v.zero,new v(a.width,a.height)),R.unit)).transformRect(n),o=U.betweenRects(R.unit,A),{dstRect:i}=e,l=new v(this.gl.viewport.width,this.gl.viewport.height),c=U.withScale(new v(1,-1)).times(U.betweenRects(new R(v.zero,l),R.NDC)).transformRect(i),h=U.betweenRects(R.NDC,c),_=v.unit.dividedByPointwise(new v(e.rectInfoTexture.width,e.rectInfoTexture.height));this.material.setUniformSampler("colorTexture",e.rectInfoTexture,0),kt(this.material,"uvTransform",o),this.material.setUniformFloat("renderOutlines",e.renderOutlines?1:0),this.material.setUniformVec2("uvSpacePixelSize",_.x,_.y),kt(this.material,"positionTransform",h),this.gl.setUnpremultipliedBlendState(),this.gl.draw(q.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var Fa=class{constructor(e,n){this.animationFrameRequest=null;this.beforeFrameHandlers=new Set;this.onBeforeFrame=()=>{this.animationFrameRequest=null,this.gl.setViewport(0,0,this.gl.renderTargetWidthInPixels,this.gl.renderTargetHeightInPixels);let e=fe.fromCSSHex(this.theme.bgPrimaryColor);this.gl.clear(new q.Color(e.r,e.g,e.b,e.a));for(let n of this.beforeFrameHandlers)n()};this.gl=new vo.Context(e),this.rectangleBatchRenderer=new Qa(this.gl),this.textureRenderer=new xa(this.gl),this.viewportRectangleRenderer=new ka(this.gl,n),this.flamechartColorPassRenderer=new Na(this.gl,n),this.theme=n,this.gl.addAfterResizeEventHandler(this.onBeforeFrame);let a=this.gl.getWebGLInfo();a&&console.log(`WebGL initialized. renderer: ${a.renderer}, vendor: ${a.vendor}, version: ${a.version}`),window.testContextLoss=()=>{this.gl.testContextLoss()}}addBeforeFrameHandler(e){this.beforeFrameHandlers.add(e)}removeBeforeFrameHandler(e){this.beforeFrameHandlers.delete(e)}requestFrame(){this.animationFrameRequest||(this.animationFrameRequest=requestAnimationFrame(this.onBeforeFrame))}setViewport(e,n){let{origin:a,size:r}=e,A=this.gl.viewport;this.gl.setViewport(a.x,a.y,r.x,r.y),n();let{x:o,y:i,width:l,height:s}=A;this.gl.setViewport(o,i,l,s)}renderBehind(e,n){let a=e.getBoundingClientRect(),r=new R(new v(a.left*window.devicePixelRatio,a.top*window.devicePixelRatio),new v(a.width*window.devicePixelRatio,a.height*window.devicePixelRatio));this.setViewport(r,n)}};var sn=qn(t=>e=>t.get(e.key)||0),Ut=ze(({theme:t,frameToColorBucket:e})=>{let n=sn(e);return a=>{let r=n(a)/255;return t.colorForBucket(r).toCSS()}}),Ot=ze(({theme:t,canvas:e})=>new Fa(e,t)),_s=qn(t=>new ba(t.gl,t.rectangleBatchRenderer,t.textureRenderer)),hs=ze(({profile:t,flattenRecursion:e})=>e?t.getProfileWithRecursionFlattened():t),qt=qn(t=>{let e=[];t.forEachFrame(A=>e.push(A));function n(A){return(A.file||"")+A.name}function a(A,o){return n(A)>n(o)?1:-1}e.sort(a);let r=new Map;for(let A=0;A=n.__.length&&n.__.push({}),n.__[t]}function Ge(t){return wr=1,Cs(ms,t)}function Cs(t,e,n){var a=br(zn++,2);return a.__c||(a.__c=it,a.__=[n?n(e):ms(void 0,e),function(r){var A=t(a.__[0],r);a.__[0]!==A&&(a.__[0]=A,a.__c.setState({}))}]),a.__}function Ue(t,e){var n=br(zn++,3);!J.__s&&xo(n.__H,e)&&(n.__=t,n.__H=e,it.__H.__h.push(n))}function bo(t,e){var n=br(zn++,4);!J.__s&&xo(n.__H,e)&&(n.__=t,n.__H=e,it.__h.push(n))}function cn(t){return wr=5,oe(function(){return{current:t}},[])}function oe(t,e){var n=br(zn++,7);return xo(n.__H,e)?(n.__H=e,n.__h=t,n.__=t()):n.__}function P(t,e){return wr=8,oe(function(){return t},e)}function lt(t){var e=it.context[t.__c],n=br(zn++,9);return n.__c=t,e?(n.__==null&&(n.__=!0,e.sub(it)),e.props.value):t.__}function sp(){Bo.some(function(t){if(t.__P)try{t.__H.__h.forEach(Qo),t.__H.__h.forEach(wo),t.__H.__h=[]}catch(e){return t.__H.__h=[],J.__e(e,t.__v),!0}}),Bo=[]}function Qo(t){t.t&&t.t()}function wo(t){var e=t.__();typeof e=="function"&&(t.t=e)}function xo(t,e){return!t||e.some(function(n,a){return n!==t[a]})}function ms(t,e){return typeof e=="function"?e(t):e}J.__r=function(t){ds&&ds(t),zn=0,(it=t.__c).__H&&(it.__H.__h.forEach(Qo),it.__H.__h.forEach(wo),it.__H.__h=[])},J.diffed=function(t){us&&us(t);var e=t.__c;if(e){var n=e.__H;n&&n.__h.length&&(Bo.push(e)!==1&&gs===J.requestAnimationFrame||((gs=J.requestAnimationFrame)||function(a){var r,A=function(){clearTimeout(o),cancelAnimationFrame(r),setTimeout(a)},o=setTimeout(A,100);typeof window<"u"&&(r=requestAnimationFrame(A))})(sp))}},J.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Qo),n.__h=n.__h.filter(function(a){return!a.__||wo(a)})}catch(a){e.some(function(r){r.__h&&(r.__h=[])}),e=[],J.__e(a,n.__v)}}),fs&&fs(t,e)},J.unmount=function(t){ps&&ps(t);var e=t.__c;if(e){var n=e.__H;if(n)try{n.__.forEach(function(a){return a.t&&a.t()})}catch(a){J.__e(a,e.__v)}}};function ws(t,e){for(var n in e)t[n]=e[n];return t}function So(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var a in e)if(a!=="__source"&&t[a]!==e[a])return!0;return!1}var aB=(function(t){var e,n;function a(r){var A;return(A=t.call(this,r)||this).isPureReactComponent=!0,A}return n=t,(e=a).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,a.prototype.shouldComponentUpdate=function(r,A){return So(this.props,r)||So(this.state,A)},a})(Ne);function pe(t,e){function n(r){var A=this.props.ref,o=A==r.ref;return!o&&A&&(A.call?A(null):A.current=null),e?!e(this.props,r)||!o:So(this.props,r)}function a(r){return this.shouldComponentUpdate=n,C(t,ws({},r))}return a.prototype.isReactComponent=!0,a.displayName="Memo("+(t.displayName||t.name)+")",a.t=!0,a}var Is=J.__b;J.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),Is&&Is(t)};var _p=J.__e;function bs(t){return t&&((t=ws({},t)).__c=null,t.__k=t.__k&&t.__k.map(bs)),t}function js(){this.__u=0,this.o=null,this.__b=null}function xs(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function Da(){this.i=null,this.l=null}J.__e=function(t,e,n){if(t.then){for(var a,r=e;r=r.__;)if((a=r.__c)&&a.__c)return a.__c(t,e.__c)}_p(t,e,n)},(js.prototype=new Ne).__c=function(t,e){var n=this;n.o==null&&(n.o=[]),n.o.push(e);var a=xs(n.__v),r=!1,A=function(){r||(r=!0,a?a(o):o())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){A(),e.__c&&e.__c()};var o=function(){var i;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});i=n.o.pop();)i.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),t.then(A,A)},js.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=bs(this.__b),this.__b=null),[C(Ne,null,e.u?null:t.children),e.u&&t.fallback]};var vs=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]n()))}get(){return this.state}subscribe(e){this.observers.push(e)}unsubscribe(e){let n=this.observers.indexOf(e);n!==-1&&this.observers.splice(n,1)}};function Y(t){let[e,n]=Ge(t.get());return bo(()=>{n(t.get());function a(){n(t.get())}return t.subscribe(a),()=>{t.unsubscribe(a)}},[t]),e}function gp(t){switch(t){case"time-ordered":return 0;case"left-heavy":return 1;case"sandwich":return 2;default:return null}}function ks(t=window.location.hash){try{if(!t.startsWith("#"))return{};let e=t.substr(1).split("&"),n={};for(let a of e){let[r,A]=a.split("=");if(A=decodeURIComponent(A),r==="profileURL")n.profileURL=A;else if(r==="title")n.title=A;else if(r==="localProfilePath")n.localProfilePath=A;else if(r==="view"){let o=gp(A);o!==null?n.viewMode=o:console.error(`Ignoring invalid view specifier: ${A}`)}}return n}catch(e){return console.error("Error when loading hash fragment."),console.error(e),{}}}V();var Ra={hover:null,selectedNode:null,configSpaceViewportRect:R.empty,logicalSpaceViewportSize:v.zero},La=class extends be{constructor(){super(...arguments);this.setProfileGroup=n=>{this.set({name:n.name,indexToView:n.indexToView,profiles:n.profiles.map(a=>({profile:a,chronoViewState:Ra,leftHeavyViewState:Ra,sandwichViewState:{callerCallee:null}}))})};this.setProfileIndexToView=n=>{this.state!=null&&(n=Re(n,0,this.state.profiles.length-1),this.set({...this.state,indexToView:n}))};this.setSelectedFrame=n=>{this.state==null||this.getActiveProfile()==null||this.updateActiveSandwichViewState(r=>n==null?{callerCallee:null}:{callerCallee:{invertedCallerFlamegraph:Ra,calleeFlamegraph:Ra,selectedFrame:n}})}}set(n){let a=this.state;a!=null&&n!=null&&Qr(a,n)||super.set(n)}getActiveProfile(){return this.state==null?null:this.state.profiles[this.state?.indexToView]||null}updateActiveProfileState(n){if(this.state==null)return;let{indexToView:a,profiles:r}=this.state;this.set({...this.state,profiles:r.map((A,o)=>o!=a?A:n(A))})}updateActiveSandwichViewState(n){this.updateActiveProfileState(a=>({...a,sandwichViewState:n(a.sandwichViewState)}))}updateFlamechartState(n,a){switch(n){case"CHRONO":{this.updateActiveProfileState(r=>({...r,chronoViewState:a(r.chronoViewState)}));break}case"LEFT_HEAVY":{this.updateActiveProfileState(r=>({...r,leftHeavyViewState:a(r.leftHeavyViewState)}));break}case"SANDWICH_CALLEES":{this.updateActiveSandwichViewState(r=>({...r,callerCallee:r.callerCallee==null?null:{...r.callerCallee,calleeFlamegraph:a(r.callerCallee.calleeFlamegraph)}}));break}case"SANDWICH_INVERTED_CALLERS":{this.updateActiveSandwichViewState(r=>({...r,callerCallee:r.callerCallee==null?null:{...r.callerCallee,invertedCallerFlamegraph:a(r.callerCallee.invertedCallerFlamegraph)}}));break}}}setFlamechartHoveredNode(n,a){this.updateFlamechartState(n,r=>({...r,hover:a}))}setSelectedNode(n,a){this.updateFlamechartState(n,r=>({...r,selectedNode:a}))}setConfigSpaceViewportRect(n,a){this.updateFlamechartState(n,r=>({...r,configSpaceViewportRect:a}))}setLogicalSpaceViewportSize(n,a){this.updateFlamechartState(n,r=>({...r,logicalSpaceViewportSize:a}))}clearHoverNode(){this.setFlamechartHoveredNode("CHRONO",null),this.setFlamechartHoveredNode("LEFT_HEAVY",null),this.setFlamechartHoveredNode("SANDWICH_CALLEES",null),this.setFlamechartHoveredNode("SANDWICH_INVERTED_CALLERS",null)}};var zt=new be(!1,"flattenRecursion"),$n=new be(!1,"searchIsActive"),Vn=new be("","searchQueryAtom"),_n=new be(0,"viewMode"),He=new La(null,"profileGroup");_n.subscribe(()=>{He.clearHoverNode()});var Ns=ks(),Fs=new be(Ns,"hashParams"),yn=new be(null,"glCanvas"),Fo=new be(!1,"dragActive"),Ss=window.location.protocol,Ta=Ss==="http:"||Ss==="https:",dp=Ta&&Ns.profileURL!=null,Do=new be(dp,"loading"),Ha=new be(!1,"error"),xr=new be(null,"minimapMousePosition");var kr=new be({field:1,direction:1},"tableSortMethod");function Ma(){let t=Y(zt),e=Y(He);if(!e||e.indexToView>=e.profiles.length)return null;let n=e.indexToView,a=e.profiles[n];return{...e.profiles[e.indexToView],profile:hs({profile:a.profile,flattenRecursion:t}),index:e.indexToView}}var Ka="speedscope-color-scheme";function up(){let t=window.localStorage&&window.localStorage[Ka];return t==="DARK"?1:t==="LIGHT"?2:0}function fp(){return matchMedia("(prefers-color-scheme: dark)")}function pp(t){if(fp().matches)switch(t){case 0:return 2;case 2:return 1;case 1:return 0}else switch(t){case 0:return 1;case 1:return 2;case 2:return 0}}var Ro=class extends be{constructor(){super(...arguments);this.cycleToNextColorScheme=()=>{this.set(pp(this.get()))}}},En=new Ro(up(),"colorScheme");En.subscribe(()=>{let t=En.get();switch(t){case 1:{window.localStorage[Ka]="DARK";break}case 2:{window.localStorage[Ka]="LIGHT";break}case 0:{delete window.localStorage[Ka];break}default:return t}return t});V();V();var Ds=.2,Rs=.1,Ls=.2,Ts=.1,Cp=t=>{let e=va(30*t),n=360*(.9*t),a=Ds+Rs*e,r=Ls-Ts*e;return fe.fromLumaChromaHue(r,a,n)},mp=` + vec3 colorForBucket(float t) { + float x = triangle(30.0 * t); + float H = 360.0 * (0.9 * t); + float C = ${Ds.toFixed(1)} + ${Rs.toFixed(1)} * x; + float L = ${Ls.toFixed(1)} - ${Ts.toFixed(1)} * x; + return hcl2rgb(H, C, L); + } +`,Lo={fgPrimaryColor:"#D0D0D0",fgSecondaryColor:"#666666",bgPrimaryColor:"#060606",bgSecondaryColor:"#0C0C0C",altFgPrimaryColor:"#D0D0D0",altFgSecondaryColor:"#666666",altBgPrimaryColor:"#000000",altBgSecondaryColor:"#0C0C0C",selectionPrimaryColor:"#00769B",selectionSecondaryColor:"#004E75",weightColor:"#0F8A42",searchMatchTextColor:"#0C0C0C",searchMatchPrimaryColor:"#A66F1C",searchMatchSecondaryColor:"#D6AE24",colorForBucket:Cp,colorForBucketGLSL:mp};V();var Hs=.25,Ms=.2,Ks=.8,Js=.15,Ip=t=>{let e=va(30*t),n=360*(.9*t),a=Hs+Ms*e,r=Ks-Js*e;return fe.fromLumaChromaHue(r,a,n)},jp=` + vec3 colorForBucket(float t) { + float x = triangle(30.0 * t); + float H = 360.0 * (0.9 * t); + float C = ${Hs.toFixed(1)} + ${Ms.toFixed(1)} * x; + float L = ${Ks.toFixed(1)} - ${Js.toFixed(1)} * x; + return hcl2rgb(H, C, L); + } +`,Ja={fgPrimaryColor:"#000000",fgSecondaryColor:"#BDBDBD",bgPrimaryColor:"#FFFFFF",bgSecondaryColor:"#F6F6F6",altFgPrimaryColor:"#FFFFFF",altFgSecondaryColor:"#BDBDBD",altBgPrimaryColor:"#000000",altBgSecondaryColor:"#222222",selectionPrimaryColor:"#2F80ED",selectionSecondaryColor:"#8EB7ED",weightColor:"#6FCF97",searchMatchTextColor:"#000000",searchMatchPrimaryColor:"#FFAC02",searchMatchSecondaryColor:"#FEDC62",colorForBucket:Ip,colorForBucketGLSL:jp};var Gs=wt(Ja);function z(){return lt(Gs)}function Ce(t){return qn(t)}function Ps(){return matchMedia("(prefers-color-scheme: dark)")}function Us(t){switch(t){case 0:return"System";case 1:return"Dark";case 2:return"Light"}}function vp(t,e){switch(t){case 0:return e?Lo:Ja;case 1:return Lo;case 2:return Ja}}function Os(t){let[e,n]=Ge(()=>Ps().matches),a=P(o=>{n(o.matches)},[n]);Ue(()=>{let o=Ps();return o.addEventListener("change",a),()=>{o.removeEventListener("change",a)}},[a]);let r=Y(En),A=vp(r,e);return C(Gs.Provider,{value:A,children:t.children})}var e_=he($s()),t_=he(Ys()),n_=he(Zs()),r_=he(ec()),a_=he(rc()),A_=he(oc()),o_=he(sc()),i_=he(_c()),l_=he(gc()),s_=he(uc()),c_=he(pc()),__=he(Bc()),h_=he(wc()),g_=he(Mc()),d_=he(Yc()),L=["Webkit"],Go=["Moz"],ge=["ms"],Me=["Webkit","Moz"],xe=["Webkit","ms"],Sr=["Webkit","Moz","ms"],zC={plugins:[e_.default,t_.default,n_.default,r_.default,a_.default,A_.default,o_.default,i_.default,l_.default,s_.default,c_.default,__.default],prefixMap:{transform:xe,transformOrigin:xe,transformOriginX:xe,transformOriginY:xe,backfaceVisibility:L,perspective:L,perspectiveOrigin:L,transformStyle:L,transformOriginZ:L,animation:L,animationDelay:L,animationDirection:L,animationFillMode:L,animationDuration:L,animationIterationCount:L,animationName:L,animationPlayState:L,animationTimingFunction:L,appearance:Me,userSelect:Sr,fontKerning:L,textEmphasisPosition:L,textEmphasis:L,textEmphasisStyle:L,textEmphasisColor:L,boxDecorationBreak:L,clipPath:L,maskImage:L,maskMode:L,maskRepeat:L,maskPosition:L,maskClip:L,maskOrigin:L,maskSize:L,maskComposite:L,mask:L,maskBorderSource:L,maskBorderMode:L,maskBorderSlice:L,maskBorderWidth:L,maskBorderOutset:L,maskBorderRepeat:L,maskBorder:L,maskType:L,textDecorationStyle:Me,textDecorationSkip:Me,textDecorationLine:Me,textDecorationColor:Me,filter:L,fontFeatureSettings:Me,breakAfter:Sr,breakBefore:Sr,breakInside:Sr,columnCount:Me,columnFill:Me,columnGap:Me,columnRule:Me,columnRuleColor:Me,columnRuleStyle:Me,columnRuleWidth:Me,columns:Me,columnSpan:Me,columnWidth:Me,writingMode:xe,flex:xe,flexBasis:L,flexDirection:xe,flexGrow:L,flexFlow:xe,flexShrink:L,flexWrap:xe,alignContent:L,alignItems:L,alignSelf:L,justifyContent:L,order:L,transitionDelay:L,transitionDuration:L,transitionProperty:L,transitionTimingFunction:L,backdropFilter:L,scrollSnapType:xe,scrollSnapPointsX:xe,scrollSnapPointsY:xe,scrollSnapDestination:xe,scrollSnapCoordinate:xe,shapeImageThreshold:L,shapeImageMargin:L,shapeImageOutside:L,hyphens:Sr,flowInto:xe,flowFrom:xe,regionFragment:xe,boxSizing:Go,textAlignLast:Go,tabSize:Go,wrapFlow:ge,wrapThrough:ge,wrapMargin:ge,touchAction:ge,gridTemplateColumns:ge,gridTemplateRows:ge,gridTemplateAreas:ge,gridTemplate:ge,gridAutoColumns:ge,gridAutoRows:ge,gridAutoFlow:ge,grid:ge,gridRowStart:ge,gridColumnStart:ge,gridRowEnd:ge,gridRow:ge,gridColumn:ge,gridColumnEnd:ge,gridColumnGap:ge,gridRowGap:ge,gridArea:ge,gridGap:ge,textSizeAdjust:xe,borderImage:L,borderImageOutset:L,borderImageRepeat:L,borderImageSlice:L,borderImageSource:L,borderImageWidth:L}},$C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},VC=(function(){function t(e,n){for(var a=0;a"u"?"undefined":$C(a))==="object"){for(var i=this.elements.hasOwnProperty(n)?this.elements[n]:new t,l=Object.keys(a),s=0;s"u"?"undefined":Xc(e))==="object"?(p_(e.src,"@font-face",[e],!1),'"'+String(e.fontFamily)+'"'):e}return t})(),animationName:(function(){function t(e,n){if(Array.isArray(e))return e.map(function(A){return t(A,n)}).join(",");if((typeof e>"u"?"undefined":Xc(e))==="object"){var a="keyframe_"+String(rm(e)),r="@keyframes "+a+"{";return e instanceof Uo?e.forEach(function(A,o){r+=Oo(o,[A],n,qo,!1).join("")}):Object.keys(e).forEach(function(A){r+=Oo(A,[e[A]],n,qo,!1).join("")}),r+="}",f_(a,[r]),a}else return e}return t})()},Yn={},hA=[],Wn=!1,f_=function(e,n){var a;if(!Yn[e]){if(!Wn){if(typeof document>"u")throw new Error("Cannot automatically buffer without a document");Wn=!0,(0,d_.default)(fm)}(a=hA).push.apply(a,_m(n)),Yn[e]=!0}},p_=function(e,n,a,r){var A=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];if(!Yn[e]){var o=Oo(n,a,A,qo,r);f_(e,o)}},gm=function(){hA=[],Yn={},Wn=!1,st=null};var dm=function(){if(Wn)throw new Error("Cannot buffer while already buffering");Wn=!0},C_=function(){Wn=!1;var e=hA;return hA=[],e},um=function(){return C_().join("")},fm=function(){var e=C_();e.length>0&&hm(e)},pm=function(){return Object.keys(Yn)},Cm=function(e){e.forEach(function(n){Yn[n]=!0})},mm=function t(e,n,a,r){for(var A=0;A0&&arguments[0]!==void 0?arguments[0]:[];Cm(e)}return t})()},Em=typeof window<"u"?null:{renderStatic:(function(){function t(e){gm(),dm();var n=e(),a=um();return{html:n,css:{content:a,renderedClassNames:pm()}}}return t})()},Bm=null;function I_(t,e){return{StyleSheet:Object.assign({},ym,{extend:(function(){function n(a){var r=a.map(function(A){return A.selectorHandler}).filter(function(A){return A});return I_(t,e.concat(r))}return n})()}),StyleSheetServer:Em,StyleSheetTestUtils:Bm,minify:(function(){function n(a){m_=a?Nr:jm}return n})(),css:(function(){function n(){for(var a=arguments.length,r=Array(a),A=0;A{let a=wm(n.name,this.searchQuery);this.matches.set(n,a.length===0?null:a)})),this.matches.get(e)||null}},dA=class{constructor(e,n){this.flamechart=e;this.profileResults=n;this.matches=null}getResults(){if(this.matches==null){let e=[],n=new Map,a=(A,o)=>{let{node:i}=A;if(this.profileResults.getMatchForFrame(i.frame)){let l=new R(new v(A.start,o),new v(A.end-A.start,1));n.set(i,e.length),e.push({configSpaceBounds:l,node:i})}A.children.forEach(l=>{a(l,o+1)})},r=this.flamechart.getLayers();r.length>0&&r[0].forEach(A=>a(A,0)),this.matches={matches:e,indexForNode:n}}return this.matches}count(){return this.getResults().matches.length}indexOf(e){let n=this.getResults().indexForNode.get(e);return n===void 0?null:n}at(e){let n=this.getResults().matches;if(e<0||e>=n.length)throw new Error(`Index ${e} out of bounds in list of ${n.length} matches.`);return n[e]}};function j_(t){t.stopPropagation()}var Qn=wt(null),v_=({children:t})=>{let e=Ma(),n=e?e.profile:null,a=Y($n),r=Y(Vn),A=oe(()=>!n||!a||r.length===0?null:new gA(n,r),[a,r,n]);return C(Qn.Provider,{value:A},t)},uA=pe(({numResults:t,resultIndex:e,selectNext:n,selectPrev:a})=>{let r=z(),A=bm(r),o=Y($n),i=Y(Vn),l=Vn.set,s=$n.set,c=P(u=>{let g=u.target.value;l(g)},[l]),h=cn(null),_=P(()=>s(!1),[s]),f=P(u=>{u.shiftKey?a():n()},[a,n]),m=P(u=>{u.stopPropagation(),u.key==="Escape"&&s(!1),u.key==="Enter"&&f(u),u.key=="f"&&(u.metaKey||u.ctrlKey)&&(h.current&&h.current.select(),u.preventDefault())},[s,f]);return Ue(()=>{let u=g=>{g.key=="f"&&(g.metaKey||g.ctrlKey)&&(g.preventDefault(),h.current?h.current.select():(s(!0),requestAnimationFrame(()=>{h.current&&h.current.select()})))};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[s]),o?C("div",{className:B(A.searchView)},C("span",{className:B(A.icon)},"\u{1F50D}"),C("span",{className:B(A.inputContainer)},C("input",{className:B(A.input),value:i,onInput:c,onKeyDown:m,onKeyUp:j_,onKeyPress:j_,ref:h})),t!=null&&C(ot,null,C("span",{className:B(A.resultCount)},e==null?"?":e+1,"/",t),C("button",{className:B(A.icon,A.button),onClick:a},"\u2B05\uFE0F"),C("button",{className:B(A.icon,A.button),onClick:n},"\u27A1\uFE0F")),C("svg",{className:B(A.icon),onClick:_,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C("path",{d:"M4.99999 4.16217L11.6427 10.8048M11.6427 4.16217L4.99999 10.8048",stroke:r.altFgSecondaryColor}))):null}),bm=Ce(t=>de.create({searchView:{position:"absolute",top:0,right:10,height:20,width:208,borderWidth:2,borderColor:t.altFgPrimaryColor,borderStyle:"solid",fontSize:10,boxSizing:"border-box",background:t.altBgSecondaryColor,color:t.altFgPrimaryColor,display:"flex",alignItems:"center"},inputContainer:{flexShrink:1,flexGrow:1,display:"flex"},input:{width:"100%",border:"none",background:"none",fontSize:10,lineHeight:"20px",color:t.altFgPrimaryColor,":focus":{border:"none",outline:"none"},"::selection":{color:t.altFgPrimaryColor,background:t.selectionPrimaryColor}},resultCount:{verticalAlign:"middle"},icon:{flexShrink:0,verticalAlign:"middle",height:"100%",margin:"0px 2px 0px 2px",fontSize:10},button:{display:"inline",background:"none",border:"none",padding:0,":focus":{outline:"none"}}}));function y_(t){return t.replace(/\\([a-fA-F0-9]{2})/g,(e,n)=>{let a=parseInt(n,16);return String.fromCharCode(a)})}function E_(t){let e=t.split(` +`);if(!e.length||(e[e.length-1]===""&&e.pop(),!e.length))return null;let n=new Map,a=/^(\d+):(.+)$/,r=/^([\$\w]+):([\$\w-]+)$/;for(let A of e){let o=a.exec(A);if(o){n.set(`wasm-function[${o[1]}]`,y_(o[2]));continue}let i=r.exec(A);if(i){n.set(i[1],y_(i[2]));continue}return null}return A=>n.has(A.name)?{name:n.get(A.name)}:null}Zo();V();var Wt=class{constructor(e){this.source=e;this.layers=[];this.totalWeight=0;this.minFrameWidth=1;let n=[],a=(A,o)=>{let i=Ae(n),l={node:A,parent:i,children:[],start:o,end:o};i&&i.children.push(l),n.push(l)};this.minFrameWidth=1/0;let r=(A,o)=>{console.assert(n.length>0);let i=n.pop();if(i.end=o,i.end-i.start===0)return;let l=n.length;for(;this.layers.length<=l;)this.layers.push([]);this.layers[l].push(i),this.minFrameWidth=Math.min(this.minFrameWidth,i.end-i.start)};this.totalWeight=e.getTotalWeight(),e.forEachCall(a,r),isFinite(this.minFrameWidth)||(this.minFrameWidth=1)}getTotalWeight(){return this.totalWeight}getLayers(){return this.layers}getColorBucketForFrame(e){return this.source.getColorBucketForFrame(e)}getMinFrameWidth(){return this.minFrameWidth}formatValue(e){return this.source.formatValue(e)}getClampedViewportWidth(e){let n=this.getTotalWeight(),a=Math.pow(2,40),r=Re(3*this.getMinFrameWidth(),n/a,n);return Re(e,r,n)}getClampedConfigSpaceViewportRect({configSpaceViewportRect:e,renderInverted:n}){let a=new v(this.getTotalWeight(),this.getLayers().length),r=this.getClampedViewportWidth(e.size.x),A=e.size.withX(r),o=v.clamp(e.origin,new v(0,n?0:-1),v.max(v.zero,a.minus(A).plus(new v(0,1))));return new R(o,e.size.withX(r))}};V();var Rm=1e4,CA=class{constructor(e,n,a){this.batch=e;this.bounds=n;this.numPrecedingRectanglesInRow=a;this.children=[]}getBatch(){return this.batch}getBounds(){return this.bounds}getRectCount(){return this.batch.getRectCount()}getChildren(){return this.children}getParity(){return this.numPrecedingRectanglesInRow%2}forEachLeafNodeWithinBounds(e,n){this.bounds.hasIntersectionWith(e)&&n(this)}},Xo=class{constructor(e){this.children=e;this.rectCount=0;if(e.length===0)throw new Error("Empty interior node");let n=1/0,a=-1/0,r=1/0,A=-1/0;for(let o of e){this.rectCount+=o.getRectCount();let i=o.getBounds();n=Math.min(n,i.left()),a=Math.max(a,i.right()),r=Math.min(r,i.top()),A=Math.max(A,i.bottom())}this.bounds=new R(new v(n,r),new v(a-n,A-r))}getBounds(){return this.bounds}getRectCount(){return this.rectCount}getChildren(){return this.children}forEachLeafNodeWithinBounds(e,n){if(this.bounds.hasIntersectionWith(e))for(let a of this.children)a.forEachLeafNodeWithinBounds(e,n)}},mA=class t{get key(){return`${this.stackDepth}_${this.index}_${this.zoomLevel}`}constructor(e){this.stackDepth=e.stackDepth,this.zoomLevel=e.zoomLevel,this.index=e.index}static getOrInsert(e,n){return e.getOrInsert(new t(n))}},IA=class{constructor(e,n,a,r,A,o={inverted:!1}){this.gl=e;this.rowAtlas=n;this.flamechart=a;this.rectangleBatchRenderer=r;this.colorPassRenderer=A;this.options=o;this.layers=[];this.rectInfoTexture=null;this.rectInfoRenderTarget=null;this.atlasKeys=new bt;let i=a.getLayers().length;for(let l=0;l=Rm&&(s.push(new CA(f,new R(new v(h,c),new v(_-h,1)),m)),h=1/0,_=-1/0,f=new vn(this.gl));let I=new R(new v(p.start,c),new v(p.end-p.start,1));h=Math.min(h,I.left()),_=Math.max(_,I.right());let j=new fe((1+g%255)/256,(1+l%255)/256,(1+this.flamechart.getColorBucketForFrame(p.node.frame))/256);f.addRect(I,j),m++}f.getRectCount()>0&&s.push(new CA(f,new R(new v(h,c),new v(_-h,1)),m)),this.layers.push(new Xo(s))}}getRectInfoTexture(e,n){if(this.rectInfoTexture){let a=this.rectInfoTexture;(a.width!=e||a.height!=n)&&a.resize(e,n)}else this.rectInfoTexture=this.gl.createTexture(q.TextureFormat.NEAREST_CLAMP,e,n);return this.rectInfoTexture}getRectInfoRenderTarget(e,n){let a=this.getRectInfoTexture(e,n);return this.rectInfoRenderTarget&&this.rectInfoRenderTarget.texture!=a&&(this.rectInfoRenderTarget.texture.free(),this.rectInfoRenderTarget.setColor(a)),this.rectInfoRenderTarget||(this.rectInfoRenderTarget=this.gl.createRenderTarget(a)),this.rectInfoRenderTarget}free(){this.rectInfoRenderTarget&&this.rectInfoRenderTarget.free(),this.rectInfoTexture&&this.rectInfoTexture.free()}configSpaceBoundsForKey(e){let{stackDepth:n,zoomLevel:a,index:r}=e,o=this.flamechart.getTotalWeight()/Math.pow(2,a),i=this.flamechart.getLayers().length,l=this.options.inverted?i-1-n:n;return new R(new v(o*r,l),new v(o,1))}render(e){let{configSpaceSrcRect:n,physicalSpaceDstRect:a}=e,r=[],A=U.betweenRects(n,a);if(n.isEmpty())return;let o=0;for(;;){let j=mA.getOrInsert(this.atlasKeys,{stackDepth:0,zoomLevel:o,index:0}),E=this.configSpaceBoundsForKey(j);if(A.transformRect(E).width(){let y=this.configSpaceBoundsForKey(E);this.layers[E.stackDepth].forEachLeafNodeWithinBounds(y,b=>{this.rectangleBatchRenderer.render({batch:b.getBatch(),configSpaceSrcRect:y,physicalSpaceDstRect:j})})});let p=this.getRectInfoRenderTarget(a.width(),a.height());Ba(this.gl,p,()=>{this.gl.clear(new q.Color(0,0,0,0));let j=new R(v.zero,new v(this.gl.viewport.width,this.gl.viewport.height)),E=U.betweenRects(n,j);for(let y of u){let b=this.configSpaceBoundsForKey(y);this.rowAtlas.renderViaAtlas(y,E.transformRect(b))}for(let y of g){let b=this.configSpaceBoundsForKey(y),F=E.transformRect(b);this.layers[y.stackDepth].forEachLeafNodeWithinBounds(b,T=>{this.rectangleBatchRenderer.render({batch:T.getBatch(),configSpaceSrcRect:b,physicalSpaceDstRect:F})})}});let I=this.getRectInfoTexture(a.width(),a.height());this.colorPassRenderer.render({rectInfoTexture:I,srcRect:new R(v.zero,new v(I.width,I.height)),dstRect:a,renderOutlines:e.renderOutlines})}};V();V();var Dt=Ce(t=>de.create({hoverCount:{color:t.weightColor},fill:{width:"100%",height:"100%",position:"absolute",left:0,top:0},minimap:{height:100,borderBottom:`2px solid ${t.fgSecondaryColor}`},panZoomView:{flex:1},detailView:{display:"grid",height:150,overflow:"hidden",gridTemplateColumns:"120px 120px 1fr",gridTemplateRows:"repeat(4, 1fr)",borderTop:`2px solid ${t.fgSecondaryColor}`,fontSize:10,position:"absolute",background:t.bgPrimaryColor,width:"100vw",bottom:0},stackTraceViewPadding:{padding:5},stackTraceView:{height:150,lineHeight:`${12}px`,overflow:"auto","::-webkit-scrollbar":{background:t.bgPrimaryColor},"::-webkit-scrollbar-thumb":{background:t.fgSecondaryColor,borderRadius:20,border:`3px solid ${t.bgPrimaryColor}`,":hover":{background:t.fgPrimaryColor}}},stackLine:{whiteSpace:"nowrap"},stackFileLine:{color:t.fgSecondaryColor},statsTable:{display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:`repeat(3, ${20}px)`,gridGap:"1px 1px",textAlign:"center",paddingRight:1},statsTableHeader:{gridColumn:"1 / 3"},statsTableCell:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},thisInstanceCell:{background:t.selectionPrimaryColor,color:t.altFgPrimaryColor},allInstancesCell:{background:t.selectionSecondaryColor,color:t.altFgPrimaryColor},barDisplay:{position:"absolute",top:0,left:0,background:"rgba(0, 0, 0, 0.2)",width:"100%"}}));V();var ti="\u2026",jA=new Map,F_=-1;function Zt(t,e){return window.devicePixelRatio!==F_&&(jA.clear(),F_=window.devicePixelRatio),jA.has(e)||jA.set(e,t.measureText(e).width),jA.get(e)}function ei(t,e){if(t.length<=e)return{trimmedString:t,trimmedLength:t.length,prefixLength:t.length,suffixLength:0,originalString:t,originalLength:t.length};let n=Math.floor(e/2),a=e-n-1,r=t.substring(0,n),A=t.substring(t.length-a,t.length),o=r+ti+A;return{trimmedString:o,trimmedLength:o.length,prefixLength:r.length,suffixLength:A.length,originalString:t,originalLength:t.length}}function R_(t,e,n){if(Zt(t,e)<=n)return ei(e,e.length);let[a]=ls(0,e.length,r=>Zt(t,ei(e,Math.floor(r)).trimmedString),n);return ei(e,Math.floor(a))}function D_(t,e){return e{this.container=n||null};this.overlayCanvas=null;this.overlayCtx=null;this.onWindowResize=()=>{this.onBeforeFrame()};this.onBeforeFrame=()=>{this.maybeClearInteractionLock(),this.resizeOverlayCanvasIfNeeded(),this.renderRects(),this.renderOverlays()};this.renderCanvas=()=>{this.props.canvasContext.requestFrame()};this.frameHadWheelEvent=!1;this.framesWithoutWheelEvents=0;this.interactionLock=null;this.maybeClearInteractionLock=()=>{this.interactionLock&&(this.frameHadWheelEvent||(this.framesWithoutWheelEvents++,this.framesWithoutWheelEvents>=2&&(this.interactionLock=null,this.framesWithoutWheelEvents=0)),this.props.canvasContext.requestFrame()),this.frameHadWheelEvent=!1};this.onWheel=n=>{if(n.preventDefault(),this.frameHadWheelEvent=!0,(n.metaKey||n.ctrlKey)&&this.interactionLock!=="pan"){let r=1+n.deltaY/100;n.ctrlKey&&(r=1+n.deltaY/40),r=Re(r,.1,10),this.zoom(r)}else this.interactionLock!=="zoom"&&this.pan(new v(n.deltaX,n.deltaY));this.renderCanvas()};this.dragStartConfigSpaceMouse=null;this.dragConfigSpaceViewportOffset=null;this.draggingMode=null;this.onMouseDown=n=>{let a=this.configSpaceMouse(n);a&&(this.props.configSpaceViewportRect.contains(a)?(this.draggingMode=1,this.dragConfigSpaceViewportOffset=a.minus(this.props.configSpaceViewportRect.origin)):this.draggingMode=0,this.dragStartConfigSpaceMouse=a,window.addEventListener("mousemove",this.onWindowMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.updateCursor(a))};this.onWindowMouseMove=n=>{if(!this.dragStartConfigSpaceMouse)return;let a=this.configSpaceMouse(n);if(a){if(this.updateCursor(a),a=new R(new v(0,0),this.configSpaceSize()).closestPointTo(a),this.draggingMode===0){let r=this.dragStartConfigSpaceMouse,A=a;if(!r||!A)return;let o=Math.min(r.x,A.x),l=Math.max(r.x,A.x)-o,s=this.props.configSpaceViewportRect.height();this.props.setConfigSpaceViewportRect(new R(new v(o,A.y-s/2),new v(l,s)))}else if(this.draggingMode===1){if(!this.dragConfigSpaceViewportOffset)return;let r=a.minus(this.dragConfigSpaceViewportOffset);this.props.setConfigSpaceViewportRect(this.props.configSpaceViewportRect.withOrigin(r))}}};this.updateCursor=n=>{this.draggingMode===1?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):this.draggingMode===0?document.body.style.cursor="col-resize":this.props.configSpaceViewportRect.contains(n)?(document.body.style.cursor="grab",document.body.style.cursor="-webkit-grab"):document.body.style.cursor="col-resize"};this.onMouseLeave=()=>{this.draggingMode==null&&(document.body.style.cursor="default"),xr.set(null)};this.onMouseMove=n=>{let a=this.configSpaceMouse(n);a&&(this.updateCursor(a),xr.set(a))};this.onWindowMouseUp=n=>{this.draggingMode=null,window.removeEventListener("mousemove",this.onWindowMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp);let a=this.configSpaceMouse(n);a&&this.updateCursor(a)};this.overlayCanvasRef=n=>{n?(this.overlayCanvas=n,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)}}physicalViewSize(){return new v(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}getStyle(){return Dt(this.props.theme)}minimapOrigin(){return new v(0,20*window.devicePixelRatio)}configSpaceSize(){return new v(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}configSpaceToPhysicalViewSpace(){let n=this.minimapOrigin();return U.betweenRects(new R(new v(0,0),this.configSpaceSize()),new R(n,this.physicalViewSize().minus(n)))}logicalToPhysicalViewSpace(){return U.withScale(new v(window.devicePixelRatio,window.devicePixelRatio))}windowToLogicalViewSpace(){if(!this.container)return new U;let n=this.container.getBoundingClientRect();return U.withTranslation(new v(-n.left,-n.top))}renderRects(){this.container&&(this.physicalViewSize().x<2||this.props.canvasContext.renderBehind(this.container,()=>{this.props.flamechartRenderer.render({configSpaceSrcRect:new R(new v(0,0),this.configSpaceSize()),physicalSpaceDstRect:new R(this.minimapOrigin(),this.physicalViewSize().minus(this.minimapOrigin())),renderOutlines:!1}),this.props.canvasContext.viewportRectangleRenderer.render({configSpaceViewportRect:this.props.configSpaceViewportRect,configSpaceToPhysicalViewSpace:this.configSpaceToPhysicalViewSpace()})}))}renderOverlays(){let n=this.overlayCtx;if(!n)return;let a=this.physicalViewSize();n.clearRect(0,0,a.x,a.y);let r=this.configSpaceToPhysicalViewSpace(),A=0,o=this.configSpaceSize().x,l=(this.configSpaceToPhysicalViewSpace().inverted()||new U).times(this.logicalToPhysicalViewSpace()).transformVector(new v(200,1)).x,s=20*window.devicePixelRatio,c=10*window.devicePixelRatio,h=(s-c)/2;n.font=`${c}px/${s}px "Source Code Pro", Courier, monospace`,n.textBaseline="top";let f=Math.pow(10,Math.floor(Math.log10(l)));l/f>5?f*=5:l/f>2&&(f*=2);let m=this.props.theme;{n.fillStyle=fe.fromCSSHex(m.bgPrimaryColor).withAlpha(.8).toCSS(),n.fillRect(0,0,a.x,s),n.textBaseline="top";for(let u=Math.ceil(A/f)*f;ude.create({stackChit:{position:"relative",top:-1,display:"inline-block",verticalAlign:"middle",marginRight:"0.5em",border:`1px solid ${t.fgSecondaryColor}`,width:8,height:8}}));function T_(t){let e=Dt(z()),n=t.formatter(t.selectedTotal),a=t.formatter(t.selectedSelf),r=100*t.selectedTotal/t.grandTotal,A=100*t.selectedSelf/t.grandTotal;return C("div",{className:B(e.statsTable)},C("div",{className:B(t.cellStyle,e.statsTableCell,e.statsTableHeader)},t.title),C("div",{className:B(t.cellStyle,e.statsTableCell)},"Total"),C("div",{className:B(t.cellStyle,e.statsTableCell)},"Self"),C("div",{className:B(t.cellStyle,e.statsTableCell)},n),C("div",{className:B(t.cellStyle,e.statsTableCell)},a),C("div",{className:B(t.cellStyle,e.statsTableCell)},xt(r),C("div",{className:B(e.barDisplay),style:{height:`${r}%`}})),C("div",{className:B(t.cellStyle,e.statsTableCell)},xt(A),C("div",{className:B(e.barDisplay),style:{height:`${A}%`}})))}function Tm(t){let e=Dt(z()),n=[],a=t.node;for(;a&&!a.isRoot();a=a.parent){let r=[],{frame:A}=a;if(r.push(C(EA,{color:t.getFrameColor(A)})),n.length&&r.push(C("span",{className:B(e.stackFileLine)},"> ")),r.push(A.name),A.file){let o=A.file;A.line!=null&&(o+=`:${A.line}`,A.col!=null&&(o+=`:${A.col}`)),r.push(C("span",{className:B(e.stackFileLine)}," (",o,")"))}n.push(C("div",{className:B(e.stackLine)},r))}return C("div",{className:B(e.stackTraceView)},C("div",{className:B(e.stackTraceViewPadding)},n))}function H_(t){let e=Dt(z()),{flamechart:n,selectedNode:a}=t,{frame:r}=a;return C("div",{className:B(e.detailView)},C(T_,{title:"This Instance",cellStyle:e.thisInstanceCell,grandTotal:n.getTotalWeight(),selectedTotal:a.getTotalWeight(),selectedSelf:a.getSelfWeight(),formatter:n.formatValue.bind(n)}),C(T_,{title:"All Instances",cellStyle:e.allInstancesCell,grandTotal:n.getTotalWeight(),selectedTotal:r.getTotalWeight(),selectedSelf:r.getSelfWeight(),formatter:n.formatValue.bind(n)}),C(Tm,{node:a,getFrameColor:t.getCSSColorForFrame}))}var Dr=class{constructor(){this.argsBatch=[]}text(e){this.argsBatch.push(e)}fill(e,n){if(this.argsBatch.length!==0){e.fillStyle=n;for(let a of this.argsBatch)e.fillText(a.text,a.x,a.y);this.argsBatch=[]}}},wn=class{constructor(){this.argsBatch=[]}rect(e){this.argsBatch.push(e)}drawPath(e){e.beginPath();for(let n of this.argsBatch)e.rect(n.x,n.y,n.w,n.h);e.closePath(),this.argsBatch=[]}fill(e,n){this.argsBatch.length!==0&&(e.fillStyle=n,this.drawPath(e),e.fill())}stroke(e,n,a){this.argsBatch.length!==0&&(e.strokeStyle=n,e.lineWidth=a,this.drawPath(e),e.stroke())}};var Xn=class extends Ne{constructor(){super(...arguments);this.container=null;this.containerRef=n=>{this.container=n||null};this.overlayCanvas=null;this.overlayCtx=null;this.hoveredLabel=null;this.overlayCanvasRef=n=>{n?(this.overlayCanvas=n,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)};this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT=20;this.onWindowResize=()=>{this.updateConfigSpaceViewport(),this.onBeforeFrame()};this.frameHadWheelEvent=!1;this.framesWithoutWheelEvents=0;this.interactionLock=null;this.maybeClearInteractionLock=()=>{this.interactionLock&&(this.frameHadWheelEvent||(this.framesWithoutWheelEvents++,this.framesWithoutWheelEvents>=2&&(this.interactionLock=null,this.framesWithoutWheelEvents=0)),this.props.canvasContext.requestFrame()),this.frameHadWheelEvent=!1};this.onBeforeFrame=()=>{this.resizeOverlayCanvasIfNeeded(),this.renderRects(),this.renderOverlays(),this.maybeClearInteractionLock()};this.renderCanvas=()=>{this.props.canvasContext.requestFrame()};this.lastDragPos=null;this.mouseDownPos=null;this.currentMousePos=null;this.onMouseDown=n=>{this.mouseDownPos=this.lastDragPos=new v(n.offsetX,n.offsetY),this.updateCursor(),window.addEventListener("mouseup",this.onWindowMouseUp)};this.onMouseDrag=n=>{if(!this.lastDragPos)return;let a=new v(n.offsetX,n.offsetY);this.pan(this.lastDragPos.minus(a)),this.lastDragPos=a,this.hoveredLabel&&this.props.onNodeHover(null)};this.onDblClick=n=>{if(this.hoveredLabel){let a=this.hoveredLabel.configSpaceBounds,r=new R(a.origin.minus(new v(0,1)),a.size.withY(this.props.configSpaceViewportRect.height()));this.props.setConfigSpaceViewportRect(r)}};this.onClick=n=>{let a=new v(n.offsetX,n.offsetY),r=this.mouseDownPos;this.mouseDownPos=null,!(r&&a.minus(r).length()>5)&&(this.hoveredLabel?(this.props.onNodeSelect(this.hoveredLabel.node),this.renderCanvas()):this.props.onNodeSelect(null))};this.onWindowMouseUp=n=>{this.lastDragPos=null,this.updateCursor(),window.removeEventListener("mouseup",this.onWindowMouseUp)};this.onMouseMove=n=>{if(this.currentMousePos=new v(n.offsetX,n.offsetY),this.updateCursor(),this.lastDragPos){n.preventDefault(),this.onMouseDrag(n);return}let a=new v(n.offsetX,n.offsetY),r=this.logicalToPhysicalViewSpace().transformPosition(a),A=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(r);if(!A)return;let o=(l,s=0)=>{let c=l.end-l.start,h=this.props.renderInverted?this.configSpaceSize().y-1-s:s,_=new R(new v(l.start,h),new v(c,1));if(A.x<_.left()||A.x>_.right())return null;_.contains(A)&&(this.hoveredLabel={configSpaceBounds:_,node:l.node});for(let f of l.children)o(f,s+1)};(()=>{this.hoveredLabel=null})();for(let l of this.props.flamechart.getLayers()[0]||[])o(l);this.hoveredLabel?this.props.onNodeHover({node:this.hoveredLabel.node,event:n}):this.props.onNodeHover(null),this.renderCanvas()};this.onMouseLeave=n=>{this.currentMousePos=null,this.hoveredLabel=null,this.props.onNodeHover(null),this.renderCanvas()};this.onWheel=n=>{n.preventDefault(),this.frameHadWheelEvent=!0;let a=n.metaKey||n.ctrlKey,r=n.deltaY,A=n.deltaX;if(n.deltaMode===n.DOM_DELTA_LINE&&(r*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT,A*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT),a&&this.interactionLock!=="pan"){let o=1+r/100;n.ctrlKey&&(o=1+r/40),o=Re(o,.1,10),this.zoom(new v(n.offsetX,n.offsetY),o)}else this.interactionLock!=="zoom"&&this.pan(new v(A,r));this.renderCanvas()};this.onWindowKeyPress=n=>{if(!this.container)return;let{width:a,height:r}=this.container.getBoundingClientRect(),A=xr.get(),o,i=!0;if(A){let s=this.props.configSpaceViewportRect,c=A.x>=s.left()&&A.x<=s.right()&&A.y>=s.top()&&A.y<=s.bottom(),h=new v(A.x-s.width()/2,A.y-s.height()/2);this.props.setConfigSpaceViewportRect(s.withOrigin(h)),c||(i=!1),o=new v(a/2,r/2)}else o=this.currentMousePos||new v(a/2,r/2);let l=1;switch(n.key){case"=":case"+":l=.5;break;case"-":case"_":l=2;break}i&&requestAnimationFrame(()=>{this.zoom(o,l),n.preventDefault()}),!(n.ctrlKey||n.shiftKey||n.metaKey)&&(n.key==="0"?this.zoom(o,1e9):n.key==="ArrowRight"||n.code==="KeyD"?this.pan(new v(100,0)):n.key==="ArrowLeft"||n.code==="KeyA"?this.pan(new v(-100,0)):n.key==="ArrowUp"||n.code==="KeyW"?this.pan(new v(0,-100)):n.key==="ArrowDown"||n.code==="KeyS"?this.pan(new v(0,100)):n.key==="Escape"&&(this.props.onNodeSelect(null),this.renderCanvas()))}}getStyle(){return Dt(this.props.theme)}setConfigSpaceViewportRect(n){this.props.setConfigSpaceViewportRect(n)}configSpaceSize(){return new v(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}physicalViewSize(){return new v(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}physicalBounds(){if(this.props.renderInverted){let n=this.physicalViewSize().y,a=(this.configSpaceSize().y+1)*this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio;if(a{let F=y.end-y.start,T=this.props.renderInverted?this.configSpaceSize().y-1-b:b,Q=new R(new v(y.start,T),new v(F,1));if(!(Fthis.props.configSpaceViewportRect.right())&&!(Q.right()this.props.configSpaceViewportRect.bottom())return;if(Q.hasIntersectionWith(this.props.configSpaceViewportRect)){let w=a.transformRect(Q);if(w.left()<0&&(w=w.withOrigin(w.origin.withX(0)).withSize(w.size.withX(w.size.x+w.left()))),w.right()>o.x&&(w=w.withSize(w.size.withX(o.x-w.left()))),w.width()>i){let S=this.props.searchResults?.getMatchForFrame(y.node.frame),te=R_(n,y.node.frame.name,w.width()-2*s);if(S){let At=L_(te,S),Ct=0,on=w.left()+s,Qt=(A-r)/2-2;for(let[Pt,pa]of At){on+=Zt(n,te.trimmedString.substring(Ct,Pt));let vr=Zt(n,te.trimmedString.substring(Pt,pa));_.rect({x:on,y:w.top()+Qt,w:vr,h:A-2*Qt}),on+=vr,Ct=pa}}(this.props.searchResults!=null&&!S?h:c).text({text:te.trimmedString,x:w.left()+s,y:Math.round(w.bottom()-(A-r)/2)})}}for(let w of y.children)g(w,b+1)}},p=2*window.devicePixelRatio;n.strokeStyle=this.props.theme.selectionSecondaryColor;let I=(a.inverseTransformVector(new v(1,0))||new v(0,0)).x,j=(y,b=0)=>{if(!this.props.selectedNode&&this.props.searchResults==null)return;let F=y.end-y.start,T=this.props.renderInverted?this.configSpaceSize().y-1-b:b,Q=new R(new v(y.start,T),new v(F,1));if(!(Fthis.props.configSpaceViewportRect.right())&&!(Q.right()this.props.configSpaceViewportRect.bottom())){if(Q.hasIntersectionWith(this.props.configSpaceViewportRect)){if(this.props.searchResults?.getMatchForFrame(y.node.frame)){let w=a.transformRect(Q);u.rect({x:Math.round(w.left()+p/2),y:Math.round(w.top()+p/2),w:Math.round(Math.max(0,w.width()-p)),h:Math.round(Math.max(0,w.height()-p))})}if(this.props.selectedNode!=null&&y.node.frame===this.props.selectedNode.frame){let w=y.node===this.props.selectedNode?f:m,S=a.transformRect(Q);w.rect({x:Math.round(S.left()+1+p/2),y:Math.round(S.top()+1+p/2),w:Math.round(Math.max(0,S.width()-2-p)),h:Math.round(Math.max(0,S.height()-2-p))})}}for(let w of y.children)j(w,b+1)}};for(let y of this.props.flamechart.getLayers()[0]||[])j(y);for(let y of this.props.flamechart.getLayers()[0]||[])g(y);let E=this.props.theme;if(u.fill(n,E.searchMatchPrimaryColor),_.fill(n,E.searchMatchSecondaryColor),h.fill(n,E.fgSecondaryColor),c.fill(n,this.props.searchResults!=null?E.searchMatchTextColor:E.fgPrimaryColor),m.stroke(n,E.selectionSecondaryColor,p),f.stroke(n,E.selectionPrimaryColor,p),this.hoveredLabel){let y=E.fgPrimaryColor;this.props.selectedNode===this.hoveredLabel.node&&(y=E.selectionPrimaryColor),n.lineWidth=2*devicePixelRatio,n.strokeStyle=y;let b=a.transformRect(this.hoveredLabel.configSpaceBounds);n.strokeRect(Math.round(b.left()),Math.round(b.top()),Math.round(Math.max(0,b.width())),Math.round(Math.max(0,b.height())))}this.renderTimeIndicators()}renderTimeIndicators(){let n=this.overlayCtx;if(!n)return;let a=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio,r=this.physicalViewSize(),A=this.configSpaceToPhysicalViewSpace(),o=10*window.devicePixelRatio,i=(a-o)/2,l=this.props.configSpaceViewportRect.left(),s=this.props.configSpaceViewportRect.right(),h=(this.configSpaceToPhysicalViewSpace().inverted()||new U).times(this.logicalToPhysicalViewSpace()).transformVector(new v(200,1)).x,f=Math.pow(10,Math.floor(Math.log10(h)));h/f>5?f*=5:h/f>2&&(f*=2);let m=this.props.theme;{let u=this.props.renderInverted?r.y-a:0;n.fillStyle=fe.fromCSSHex(m.bgPrimaryColor).withAlpha(.8).toCSS(),n.fillRect(0,u,r.x,a),n.textBaseline="top";for(let g=Math.ceil(l/f)*f;g{this.props.flamechartRenderer.render({physicalSpaceDstRect:this.physicalBounds(),configSpaceSrcRect:this.props.configSpaceViewportRect,renderOutlines:!0})}))}pan(n){this.interactionLock="pan";let a=this.logicalToPhysicalViewSpace().transformVector(n),r=this.configSpaceToPhysicalViewSpace().inverseTransformVector(a);this.hoveredLabel&&this.props.onNodeHover(null),r&&this.props.transformViewport(U.withTranslation(r))}zoom(n,a){this.interactionLock="zoom";let r=this.logicalToPhysicalViewSpace().transformPosition(n),A=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(r);if(!A)return;let o=U.withTranslation(A.times(-1)).scaledBy(new v(a,1)).translatedBy(A);this.props.transformViewport(o)}updateCursor(){this.lastDragPos?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):document.body.style.cursor="default"}shouldComponentUpdate(){return!1}componentWillReceiveProps(n){this.props.flamechart!==n.flamechart?(this.hoveredLabel=null,this.renderCanvas()):this.props.searchResults!==n.searchResults?this.renderCanvas():this.props.selectedNode!==n.selectedNode?this.renderCanvas():this.props.configSpaceViewportRect!==n.configSpaceViewportRect?this.renderCanvas():this.props.canvasContext!==n.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),n.canvasContext&&(n.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),n.canvasContext.requestFrame()))}componentDidMount(){this.props.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keydown",this.onWindowKeyPress)}render(){let n=this.getStyle();return C("div",{className:B(n.panZoomView,Ee.vbox),onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onClick:this.onClick,onDblClick:this.onDblClick,onWheel:this.onWheel,ref:this.containerRef},C("canvas",{width:1,height:1,ref:this.overlayCanvasRef,className:B(n.fill)}))}};function QA(t){let e=Mm(z()),{containerSize:n,offset:a}=t,r=n.x,A=n.y,o=7,i=P(l=>{if(!l)return;let s=l.getBoundingClientRect(),c=a.x+o;c+s.width>r-1&&(c=r-s.width-1,c<1&&(c=1)),l.style.left=`${c}px`;let h=a.y+o;h+s.height>A-1&&(h=a.y-s.height-1,h<1&&(h=1)),l.style.top=`${h}px`},[r,A,a.x,a.y]);return C("div",{className:B(e.hoverTip),ref:i},C("div",{className:B(e.hoverTipRow)},t.children))}var BA=2,Mm=Ce(t=>de.create({hoverTip:{position:"absolute",background:t.bgPrimaryColor,border:"1px solid black",maxWidth:900,paddingTop:BA,paddingBottom:BA,pointerEvents:"none",userSelect:"none",fontSize:10,fontFamily:'"Source Code Pro", Courier, monospace',zIndex:2},hoverTipRow:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflowX:"hidden",paddingLeft:BA,paddingRight:BA,maxWidth:900}}));var M_=wt(null),ni=({flamechart:t,selectedNode:e,setSelectedNode:n,configSpaceViewportRect:a,setConfigSpaceViewportRect:r,children:A})=>{let o=lt(Qn),i=oe(()=>o==null?null:new dA(t,o),[t,o]);return C(M_.Provider,{value:{results:i,flamechart:t,selectedNode:e,setSelectedNode:n,configSpaceViewportRect:a,setConfigSpaceViewportRect:r}},A)},K_=pe(()=>{let t=lt(M_),e=t==null?null:t.results,n=t==null?null:t.selectedNode,a=t==null?null:t.setSelectedNode,r=t==null?null:t.configSpaceViewportRect,A=t==null?null:t.setConfigSpaceViewportRect,o=t==null?null:t.flamechart,i=e==null?null:e.count(),l=oe(()=>e==null||n==null?null:e.indexOf(n),[e,n]),s=P(_=>{if(!a||!o||!r||!A)return;let f=_.configSpaceBounds,m=new R(f.origin.minus(new v(0,1)),f.size.withY(r.height()));a(_.node),A(o.getClampedConfigSpaceViewportRect({configSpaceViewportRect:m}))},[r,A,a,o]),{selectPrev:c,selectNext:h}=oe(()=>i==null||i===0||e==null?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{if(!e?.at||i==null||i===0)return;let _=l==null?i-1:l-1;_<0&&(_=i-1);let f=e.at(_);s(f)},selectNext:()=>{if(!e?.at||i==null||i===0)return;let _=l==null?0:l+1;_>=i&&(_=0);let f=e.at(_);s(f)}},[i,l,e,s]);return C(uA,{resultIndex:l,numResults:i,selectPrev:c,selectNext:h})});var mt=class extends Ne{};var Rr=class extends mt{constructor(){super(...arguments);this.setConfigSpaceViewportRect=n=>{let a=150/20,r=this.configSpaceSize(),A=this.props.flamechart.getClampedViewportWidth(n.size.x),o=n.size.withX(A),i=v.clamp(n.origin,new v(0,-1),v.max(v.zero,r.minus(o).plus(new v(0,a+1))));this.props.setConfigSpaceViewportRect(new R(i,n.size.withX(A)))};this.setLogicalSpaceViewportSize=n=>{this.props.setLogicalSpaceViewportSize(n)};this.transformViewport=n=>{let a=n.transformRect(this.props.configSpaceViewportRect);this.setConfigSpaceViewportRect(a)};this.onNodeHover=n=>{this.props.setNodeHover(n)};this.onNodeClick=n=>{this.props.setSelectedNode(n)};this.container=null;this.containerRef=n=>{this.container=n||null}}getStyle(){return Dt(this.props.theme)}configSpaceSize(){return new v(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}formatValue(n){let a=this.props.flamechart.getTotalWeight(),r=100*n/a,A=xt(r);return`${this.props.flamechart.formatValue(n)} (${A})`}renderTooltip(){if(!this.container)return null;let{hover:n}=this.props;if(!n)return null;let{width:a,height:r,left:A,top:o}=this.container.getBoundingClientRect(),i=new v(n.event.clientX-A,n.event.clientY-o),l=n.node.frame,s=this.getStyle();return C(QA,{containerSize:new v(a,r),offset:i},C("span",{className:B(s.hoverCount)},this.formatValue(n.node.getTotalWeight()))," ",l.name,l.file?C("div",null,l.file,":",l.line):void 0)}render(){let n=this.getStyle();return C("div",{className:B(n.fill,Ee.vbox),ref:this.containerRef},C(vA,{theme:this.props.theme,configSpaceViewportRect:this.props.configSpaceViewportRect,transformViewport:this.transformViewport,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,canvasContext:this.props.canvasContext,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect}),C(Qn.Consumer,null,a=>C(ot,null,C(Xn,{theme:this.props.theme,canvasContext:this.props.canvasContext,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,renderInverted:!1,onNodeHover:this.onNodeHover,onNodeSelect:this.onNodeClick,selectedNode:this.props.selectedNode,transformViewport:this.transformViewport,configSpaceViewportRect:this.props.configSpaceViewportRect,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect,logicalSpaceViewportSize:this.props.logicalSpaceViewportSize,setLogicalSpaceViewportSize:this.setLogicalSpaceViewportSize,searchResults:a}),C(K_,null))),this.renderTooltip(),this.props.selectedNode&&C(H_,{flamechart:this.props.flamechart,getCSSColorForFrame:this.props.getCSSColorForFrame,selectedNode:this.props.selectedNode}))}};function er(t){return{setNodeHover:P(e=>{He.setFlamechartHoveredNode(t,e)},[t]),setLogicalSpaceViewportSize:P(e=>{He.setLogicalSpaceViewportSize(t,e)},[t]),setConfigSpaceViewportRect:P(e=>{He.setConfigSpaceViewportRect(t,e)},[t]),setSelectedNode:P(e=>{He.setSelectedNode(t,e)},[t])}}var Km=ze(({profile:t,getColorBucketForFrame:e})=>new Wt({getTotalWeight:t.getTotalWeight.bind(t),forEachCall:t.forEachCall.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),tr=t=>ze(({canvasContext:e,flamechart:n})=>new IA(e.gl,_s(e),n,e.rectangleBatchRenderer,e.flamechartColorPassRenderer,t)),Jm=tr(),P_=pe(t=>{let{activeProfileState:e,glCanvas:n}=t,{profile:a,chronoViewState:r}=e,A=z(),o=Ot({theme:A,canvas:n}),i=qt(a),l=sn(i),s=Ut({theme:A,frameToColorBucket:i}),c=Km({profile:a,getColorBucketForFrame:l}),h=Jm({canvasContext:o,flamechart:c}),_=er("CHRONO");return C(ni,{flamechart:c,selectedNode:r.selectedNode,setSelectedNode:_.setSelectedNode,configSpaceViewportRect:r.configSpaceViewportRect,setConfigSpaceViewportRect:_.setConfigSpaceViewportRect},C(Rr,{theme:A,renderInverted:!1,flamechart:c,flamechartRenderer:h,canvasContext:o,getCSSColorForFrame:s,...r,..._}))}),Pm=ze(({profile:t,getColorBucketForFrame:e})=>new Wt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),Gm=tr(),G_=pe(t=>{let{activeProfileState:e,glCanvas:n}=t,{profile:a,leftHeavyViewState:r}=e,A=z(),o=Ot({theme:A,canvas:n}),i=qt(a),l=sn(i),s=Ut({theme:A,frameToColorBucket:i}),c=Pm({profile:a,getColorBucketForFrame:l}),h=Gm({canvasContext:o,flamechart:c}),_=er("LEFT_HEAVY");return C(ni,{flamechart:c,selectedNode:r.selectedNode,setSelectedNode:_.setSelectedNode,configSpaceViewportRect:r.configSpaceViewportRect,setConfigSpaceViewportRect:_.setConfigSpaceViewportRect},C(Rr,{theme:A,renderInverted:!1,flamechart:c,flamechartRenderer:h,canvasContext:o,getCSSColorForFrame:s,...r,..._}))});function O_(t,e){return zm(t,e)}var ri=97,q_=122,z_=65,Um=90,Om=48,qm=57;function U_(t){let e=t.charCodeAt(0);return ri<=e&&e<=q_?1:z_<=e&&e<=Um?2:Om<=e&&e<=qm?3:0}function ai(t,e){if(t===e)return!0;let n=e.charCodeAt(0);return ri<=n&&n<=q_?t.charCodeAt(0)===n-ri+z_:!1}function zm(t,e){if(e.length==0)return{matchedRanges:[],score:0};let n=0,a=-1,r=-1,A=t.length,o=e.length;for(let i=0;i=a;i--){let l=t[i],s=e[n];if(ai(l,s)&&(n--,n<0))return a=i,Xm(t,e,a,r)}throw new Error("Implementation error. This must be a bug in fzfFuzzyMatchV1")}var Ai=16,$_=-3,oi=-1,ii=Ai/2,$m=Ai/2,Vm=ii+oi,Ym=-($_+oi),Wm=2;function Zm(t,e){return t===0&&e!==0?ii:t===1&&e==2||t!==3&&e==3?Vm:e===0?$m:0}function Xm(t,e,n,a){let r=0,A=0,o=!1,i=0,l=0,s=new Array(e.length),c=0;n>0&&(c=U_(t[n-1]));for(let _=n;_{o(),t(i)},[o,t,i]),_=P(p=>{e(i)},[e,i]),f=n.getName(),m=n.getTotalNonIdleWeight(),u=B(c.highlighted),g=oe(()=>eI(f,l,u),[f,l,u]);return C("tr",{ref:A,onMouseUp:h,onMouseEnter:_,title:f,className:B(c.profileRow,s%2===0&&c.profileRowEven,a&&c.profileRowSelected,r&&c.profileRowHovered)},C("td",{className:B(c.indexCell)},i+1),C("td",{className:B(c.nameCell)},g),C("td",{className:B(c.weightCell)},n.formatValue(m)))}function V_(t){t.stopPropagation()}function nI(t,e,n){let a=[];for(let r=0;r{let o=r.profile.getName().toLowerCase(),i=A.profile.getName().toLowerCase();return n.direction==="ascending"?o.localeCompare(i):i.localeCompare(o)}):n.field==="weight"?Fe(a,r=>n.direction==="ascending"?r.profile.getTotalNonIdleWeight():-r.profile.getTotalNonIdleWeight()):n.field==="index"?Fe(a,r=>n.direction==="ascending"?r.indexInProfileGroup:-r.indexInProfileGroup):Fe(a,r=>-r.score),a}function W_({profiles:t,closeProfileSelect:e,indexToView:n,visible:a,setProfileIndexToView:r}){let A=si(z()),[o,i]=Ge(""),[l,s]=Ge({field:"index",direction:"ascending"}),c=P(Q=>{let w=Q.target.value;i(w)},[i]),h=P(Q=>{Q&&(a?Q.select():Q.blur())},[a]),_=P((Q,w)=>{w.preventDefault(),w.stopPropagation(),l.field===Q?s({field:Q,direction:l.direction==="ascending"?"descending":"ascending"}):s({field:Q,direction:Q==="name"||Q==="index"?"ascending":"descending"})},[l,s]),f=oe(()=>nI(t,o,l),[t,o,l]),[m,u]=Ge(0),g=cn(null);Ue(()=>{a&&(u(null),g.current!==null&&g.current.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}))},[a]);let p=P(Q=>{Q.stopPropagation();let w=null;switch(Q.key){case"Enter":{m!=null&&(e(),r(m));break}case"Escape":{e();break}case"ArrowDown":{if(Q.preventDefault(),w=0,m!=null){let S=f.findIndex(te=>te.indexInProfileGroup===m);S!==-1&&(w=S+1)}break}case"ArrowUp":{if(Q.preventDefault(),w=f.length-1,m!=null){let S=f.findIndex(te=>te.indexInProfileGroup===m);S!==-1&&(w=S-1)}break}}if(w!=null&&w>=0&&w{f.length>0&&(u(f[0].indexInProfileGroup),j(!0))},[u,f]);let E=P(Q=>{I&&Q&&(Q.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}),j(!1))},[I,j]),y=P(Q=>{g.current=Q,E(Q)},[g,E]),b=P(Q=>_("name",Q),[_]),F=P(Q=>_("weight",Q),[_]),T=P(Q=>_("index",Q),[_]);return C("div",{className:B(A.profileSelectOuter)},C("div",{className:B(A.caret)}),C("div",{className:B(A.profileSelectBox)},C("div",{className:B(A.filterInputContainer)},C("input",{type:"text",className:B(A.filterInput),ref:h,placeholder:"Filter...",value:o,onInput:c,onKeyDown:p,onKeyUp:V_,onKeyPress:V_})),C("div",{className:B(A.profileSelectScrolling)},C("table",{className:B(A.tableView)},C("thead",{className:B(A.tableHeader)},C("tr",null,C("th",{className:B(A.indexHeaderCell),onClick:T},C(li,{activeDirection:l.field==="index"?l.direction:null}),"#"),C("th",{className:B(A.nameHeaderCell),onClick:b},C(li,{activeDirection:l.field==="name"?l.direction:null}),"Name"),C("th",{className:B(A.weightHeaderCell),onClick:F},C(li,{activeDirection:l.field==="weight"?l.direction:null}),"Total Weight"))),C("tbody",null,f.map(({profile:Q,matchedRanges:w,indexInProfileGroup:S},te)=>{let at,At=S===n,Ct=S===m;return At&&Ct?at=y:At?at=g:Ct&&(at=E),C(tI,{key:te,setHoveredProfileIndex:u,indexInProfileGroup:S,indexInFilteredListView:te,hovered:S==m,selected:S===n,profile:Q,nodeRef:at,matchedRanges:w,setProfileIndexToView:r,closeProfileSelect:e})}),f.length===0?C("tr",null,C("td",{colSpan:3,className:B(A.noResultsRow)},'No results match filter "',o,'"')):null)))))}var Y_=10,si=Ce(t=>de.create({filterInputContainer:{display:"flex",flexDirection:"column",padding:5,alignItems:"stretch"},filterInput:{color:t.altFgPrimaryColor,background:t.altBgSecondaryColor,borderRadius:5,padding:5,border:"none",":focus":{outline:"none"},"::selection":{color:t.altFgPrimaryColor,background:t.selectionPrimaryColor}},caret:{width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:"5px solid black"},highlighted:{background:t.selectionSecondaryColor},padding:{height:Y_,background:t.altBgPrimaryColor},tableView:{width:"100%",fontSize:10,background:t.altBgPrimaryColor,borderCollapse:"collapse"},tableHeader:{borderBottom:`2px solid ${t.altBgSecondaryColor}`,textAlign:"left",color:t.altFgPrimaryColor,userSelect:"none"},indexHeaderCell:{cursor:"pointer",padding:"8px 10px",textAlign:"right",fontWeight:"bold",width:"20px"},nameHeaderCell:{cursor:"pointer",padding:"8px 10px",textAlign:"left",fontWeight:"bold"},weightHeaderCell:{cursor:"pointer",padding:"8px 10px",textAlign:"right",fontWeight:"bold",width:"150px"},sortIcon:{position:"relative",top:1,marginRight:4},profileRow:{height:18,background:t.altBgPrimaryColor,cursor:"pointer",":hover":{background:t.altBgSecondaryColor}},profileRowHovered:{background:t.altBgSecondaryColor},profileRowSelected:{background:t.selectionPrimaryColor,color:t.altFgPrimaryColor},profileRowEven:{background:t.altBgSecondaryColor},indexCell:{padding:"4px 10px",textAlign:"right",whiteSpace:"nowrap",width:"20px",fontFamily:"monospace",color:t.altFgSecondaryColor},nameCell:{padding:"4px 10px",textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"300px"},weightCell:{padding:"4px 10px",textAlign:"right",whiteSpace:"nowrap",width:"150px",fontFamily:"monospace"},noResultsRow:{padding:"20px",textAlign:"center",color:t.altFgSecondaryColor,fontStyle:"italic"},profileSelectScrolling:{maxHeight:`min(calc(100vh - ${20-2*Y_}px), ${400}px)`,overflow:"auto","::-webkit-scrollbar":{background:t.altBgPrimaryColor},"::-webkit-scrollbar-thumb":{background:t.altFgSecondaryColor,borderRadius:20,border:`3px solid ${t.altBgPrimaryColor}`,":hover":{background:t.altBgPrimaryColor}}},profileSelectBox:{width:"100%",paddingBottom:10,background:t.altBgPrimaryColor,color:t.altFgPrimaryColor},profileSelectOuter:{width:"100%",maxWidth:600,margin:"0 auto",position:"relative",zIndex:1,alignItems:"center",display:"flex",flexDirection:"column"},profileIndex:{textAlign:"right",display:"inline-block",color:t.altFgSecondaryColor},profileIndexSelected:{color:t.altFgPrimaryColor}}));V();function ci(t,e){return P(()=>t(e),[t,e])}function aI(t){let e=wA(z()),n=ci(_n.set,0),a=ci(_n.set,1),r=ci(_n.set,2);return t.activeProfileState?C("div",{className:B(e.toolbarLeft)},C("div",{className:B(e.toolbarTab,t.viewMode===0&&e.toolbarTabActive),onClick:n},C("span",{className:B(e.emoji)},"\u{1F570}"),"Time Order"),C("div",{className:B(e.toolbarTab,t.viewMode===1&&e.toolbarTabActive),onClick:a},C("span",{className:B(e.emoji)},"\u2B05\uFE0F"),"Left Heavy"),C("div",{className:B(e.toolbarTab,t.viewMode===2&&e.toolbarTabActive),onClick:r},C("span",{className:B(e.emoji)},"\u{1F96A}"),"Sandwich")):null}var AI=(()=>{let t=null;return e=>{let n=e?.profiles.map(a=>a.profile)||null;return(t===null||n!=null&&!Qr(t,n))&&(t=n),t}})();function oI(t){let e=wA(z()),{activeProfileState:n,profileGroup:a}=t,r=AI(a),[A,o]=Ge(!1),i=P(()=>{o(!0)},[o]),l=P(()=>{o(!1)},[o]);return Ue(()=>{let s=c=>{c.key==="t"&&(c.preventDefault(),o(!0))};return window.addEventListener("keypress",s),()=>{window.removeEventListener("keypress",s)}},[o]),Ue(()=>{let s=c=>{c.key==="t"&&(c.preventDefault(),o(!0))};return window.addEventListener("keypress",s),()=>{window.removeEventListener("keypress",s)}},[o]),n&&a&&r?a.profiles.length===1?C(ot,null,n.profile.getName()):C("div",{className:B(e.toolbarCenter),onMouseLeave:l},C("span",{onMouseOver:i},n.profile.getName()," ",C("span",{className:B(e.toolbarProfileIndex)},"(",n.index+1,"/",a.profiles.length,")")),C("div",{style:{display:A?"block":"none"}},C(W_,{setProfileIndexToView:t.setProfileIndexToView,indexToView:a.indexToView,profiles:r,closeProfileSelect:l,visible:A}))):C(ot,null,"\u{1F52C}speedscope")}function iI(t){let e=wA(z()),n=Y(En),a=C("div",{className:B(e.toolbarTab),onClick:t.saveFile},C("span",{className:B(e.emoji)},"\u2934\uFE0F"),"Export"),r=C("div",{className:B(e.toolbarTab),onClick:t.browseForFile},C("span",{className:B(e.emoji)},"\u2935\uFE0F"),"Import"),A=C("div",{className:B(e.toolbarTab),onClick:En.cycleToNextColorScheme},C("span",{className:B(e.emoji)},"\u{1F3A8}"),C("span",{className:B(e.toolbarTabColorSchemeToggle)},Us(n))),o=C("div",{className:B(e.toolbarTab)},C("a",{href:"https://github.com/jlfwong/speedscope#usage",className:B(e.noLinkStyle),target:"_blank"},C("span",{className:B(e.emoji)},"\u2753"),"Help"));return C("div",{className:B(e.toolbarRight)},t.activeProfileState&&a,r,A,o)}function Z_(t){let e=wA(z());return C("div",{className:B(e.toolbar)},C(aI,{...t}),C(oI,{...t}),C(iI,{...t}))}var wA=Ce(t=>de.create({toolbar:{height:20,flexShrink:0,background:t.altBgPrimaryColor,color:t.altFgPrimaryColor,textAlign:"center",fontFamily:'"Source Code Pro", Courier, monospace',fontSize:12,lineHeight:"18px",userSelect:"none"},toolbarLeft:{position:"absolute",height:20,overflow:"hidden",top:0,left:0,marginRight:2,textAlign:"left"},toolbarCenter:{paddingTop:1,height:20},toolbarRight:{height:20,overflow:"hidden",position:"absolute",top:0,right:0,marginRight:2,textAlign:"right"},toolbarProfileIndex:{color:t.altFgSecondaryColor},toolbarTab:{background:t.altBgSecondaryColor,marginTop:2,height:18,lineHeight:"18px",paddingLeft:2,paddingRight:8,display:"inline-block",marginLeft:2,transition:"all 0.07s ease-in",":hover":{background:t.selectionSecondaryColor}},toolbarTabActive:{background:t.selectionPrimaryColor,":hover":{background:t.selectionPrimaryColor}},toolbarTabColorSchemeToggle:{display:"inline-block",textAlign:"center",minWidth:"50px"},emoji:{display:"inline-block",verticalAlign:"middle",paddingTop:"0px",marginRight:"0.3em"},noLinkStyle:{textDecoration:"none",color:"inherit"}}));V();var wI=Promise.resolve().then(()=>he(Ei())),bI=!1;async function vh(t,e){let n=await wI,a=null,r=null;try{r=JSON.parse(t),a=new n.default.SourceMapConsumer(r)}catch{return null}let A=[];a.eachMapping(function(i){A.push({...i,generatedColumn:i.generatedColumn+1,originalColumn:i.originalColumn+1})},{},n.default.SourceMapConsumer.GENERATED_ORDER);let o=e.replace(/\.[^/]*$/,"");return i=>{let l=!1;if((r?.file&&r?.file===i.file||("/"+i.file?.replace(/\.[^/]*$/,"")).endsWith("/"+o))&&(l=!0),!l||i.line==null||i.col==null)return null;let s=ss(A,_=>_.generatedLine>i.line?!0:_.generatedLine=i.col);if(s===-1)s=A.length-1;else{if(s===0)return null;s--}let c=A[s],h={};if(c.name!=null)h.name=c.name;else if(c.source!=null){let _=a?.sourceContentFor(c.source,!0);if(_){let m=_.split(` +`)[c.originalLine-1];if(m){let u=/\w+/.exec(m.substr(c.originalColumn-1));u&&(h.name=u[0])}}}switch(h.name){case"constructor":{h.name=i.name+" constructor";break}case"function":{h.name=i.name;break}case"const":case"export":{h.name=i.name;break}}return h.name&&i.name.includes(h.name)&&(h.name=i.name),c.source!=null&&(h.file=c.source,h.line=c.originalLine,h.col=c.originalColumn),bI&&(console.groupCollapsed(`Remapping "${i.name}" -> "${h.name}"`),console.log("before",{...i}),console.log("item @ index",c),console.log("item @ index + 1",A[s+1]),console.log("after",h),console.groupEnd()),h}}V();var yh=({items:t,axis:e,renderItems:n,className:a,initialIndexInView:r})=>{let[A,o]=Ge(null),[i,l]=Ge(0),s=cn(null),c=e==="x"?"width":"height",h=e==="x"?"left":"top",_=e==="x"?"scrollLeft":"scrollTop",f=r?t.reduce((y,b,F)=>F{y?requestAnimationFrame(()=>{o(y.getBoundingClientRect()[c]),m.current!=null&&(y.scrollTo({[h]:m.current}),m.current=null)}):o(null),s.current=y},[o,c,h]),g=oe(()=>{if(s.current==null||A==null||i==null)return null;let y=i-A/4,b=i+A+A/4,F=0,T=0,Q=0;for(;Q=y)break}let w=Q;for(;Q=b)break}let S=Math.min(Q,t.length-1);return{firstVisibleIndex:w,lastVisibleIndex:S,invisiblePrefixSize:T}},[A,i,t]),p=oe(()=>t.reduce((y,b)=>y+b.size,0),[t]),I=P(()=>{s.current!=null&&l(s.current[_])},[_]);Ue(()=>{let y=()=>{s.current!=null&&o(s.current.getBoundingClientRect()[c])};return window.addEventListener("resize",y),()=>{window.removeEventListener("resize",y)}},[c]);let j=oe(()=>g?n(g.firstVisibleIndex,g.lastVisibleIndex):null,[n,g]),E=oe(()=>C("div",{style:{height:p}},C("div",{style:{transform:`translateY(${g?.invisiblePrefixSize||0}px)`}},j)),[g,j,p]);return C("div",{className:a,ref:u,onScroll:I},E)};function Eh(t){let e=FA(z());return C("div",{className:B(e.hBarDisplay)},C("div",{className:B(e.hBarDisplayFilled),style:{width:`${t.perc}%`}}))}function Bi(t){let e=z(),n=FA(e),{activeDirection:a}=t,r=a===0?e.fgPrimaryColor:e.fgSecondaryColor,A=a===1?e.fgPrimaryColor:e.fgSecondaryColor;return C("svg",{width:"8",height:"10",viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:B(n.sortIcon)},C("path",{d:"M0 4L4 0L8 4H0Z",fill:r}),C("path",{d:"M0 4L4 0L8 4H0Z",transform:"translate(0 10) scale(1 -1)",fill:A}))}function SI(t,e,n){let a=[],r=0;for(let A of e)a.push(t.slice(r,A[0])),a.push(C("span",{className:n},t.slice(A[0],A[1]))),r=A[1];return a.push(t.slice(r)),C("span",null,a)}var NI=({frame:t,matchedRanges:e,profile:n,index:a,selectedFrame:r,setSelectedFrame:A,getCSSColorForFrame:o})=>{let i=FA(z()),l=t.getTotalWeight(),s=t.getSelfWeight(),c=100*l/n.getTotalNonIdleWeight(),h=100*s/n.getTotalNonIdleWeight(),_=t===r;return C("tr",{key:`${a}`,onClick:A.bind(null,t),className:B(i.tableRow,a%2==0&&i.tableRowEven,_&&i.tableRowSelected)},C("td",{className:B(i.numericCell)},n.formatValue(l)," (",xt(c),")",C(Eh,{perc:c})),C("td",{className:B(i.numericCell)},n.formatValue(s)," (",xt(h),")",C(Eh,{perc:h})),C("td",{title:t.file,className:B(i.textCell)},C(EA,{color:o(t)}),e?SI(t.name,e,B(i.matched,_&&i.matchedSelected)):t.name))},FI=pe(({profile:t,sortMethod:e,setSortMethod:n,selectedFrame:a,setSelectedFrame:r,getCSSColorForFrame:A,searchQuery:o,searchIsActive:i})=>{let l=FA(z()),s=P((g,p)=>{if(p.preventDefault(),e.field==g)n({field:g,direction:e.direction===0?1:0});else switch(g){case 0:{n({field:g,direction:0});break}case 1:{n({field:g,direction:1});break}case 2:{n({field:g,direction:1});break}}},[e,n]),c=lt(Mr),h=P((g,p)=>{if(!c)return null;let I=[];for(let j=g;j<=p;j++){let E=c.rowList[j],y=c.getSearchMatchForFrame(E);I.push(NI({frame:E,matchedRanges:y??null,index:j,profile:t,selectedFrame:a,setSelectedFrame:r,getCSSColorForFrame:A}))}return I.length===0&&(i?I.push(C("tr",null,C("td",{className:B(l.emptyState)},'No symbol names match query "',o,'".'))):I.push(C("tr",null,C("td",{className:B(l.emptyState)},"No symbols found.")))),C("table",{className:B(l.tableView)},I)},[c,t,a,r,A,i,o,l.emptyState,l.tableView]),_=oe(()=>c==null?[]:c.rowList.map(g=>({size:20})),[c]),f=P(g=>s(2,g),[s]),m=P(g=>s(1,g),[s]),u=P(g=>s(0,g),[s]);return C("div",{className:B(Ee.vbox,l.profileTableView)},C("table",{className:B(l.tableView)},C("thead",{className:B(l.tableHeader)},C("tr",null,C("th",{className:B(l.numericCell),onClick:f},C(Bi,{activeDirection:e.field===2?e.direction:null}),"Total"),C("th",{className:B(l.numericCell),onClick:m},C(Bi,{activeDirection:e.field===1?e.direction:null}),"Self"),C("th",{className:B(l.textCell),onClick:u},C(Bi,{activeDirection:e.field===0?e.direction:null}),"Symbol Name")))),C(yh,{axis:"y",items:_,className:B(l.scrollView),renderItems:h,initialIndexInView:a==null?null:c?.getIndexForFrame(a)}))}),FA=Ce(t=>de.create({profileTableView:{background:t.bgPrimaryColor,height:"100%"},scrollView:{overflowY:"auto",overflowX:"hidden",flexGrow:1,"::-webkit-scrollbar":{background:t.bgPrimaryColor},"::-webkit-scrollbar-thumb":{background:t.fgSecondaryColor,borderRadius:20,border:`3px solid ${t.bgPrimaryColor}`,":hover":{background:t.fgPrimaryColor}}},tableView:{width:"100%",fontSize:10,background:t.bgPrimaryColor},tableHeader:{borderBottom:`2px solid ${t.bgSecondaryColor}`,textAlign:"left",color:t.fgPrimaryColor,userSelect:"none"},sortIcon:{position:"relative",top:1,marginRight:20/4},tableRow:{background:t.bgPrimaryColor,height:20},tableRowEven:{background:t.bgSecondaryColor},tableRowSelected:{background:t.selectionPrimaryColor,color:t.altFgPrimaryColor},numericCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",position:"relative",textAlign:"right",paddingRight:20,width:120,minWidth:120},textCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:"100%",maxWidth:0},hBarDisplay:{position:"absolute",background:fe.fromCSSHex(t.weightColor).withAlpha(.2).toCSS(),bottom:2,height:2,width:`calc(100% - ${40}px)`,right:20},hBarDisplayFilled:{height:"100%",position:"absolute",background:t.weightColor,right:0},matched:{borderBottom:`2px solid ${t.fgPrimaryColor}`},matchedSelected:{borderColor:t.altFgPrimaryColor},emptyState:{textAlign:"center",fontWeight:"bold"}})),Bh=pe(t=>{let{activeProfileState:e}=t,{profile:n,sandwichViewState:a}=e;if(!n)throw new Error("profile missing");let r=Y(kr),A=z(),{callerCallee:o}=a,i=o?o.selectedFrame:null,l=qt(n),s=Ut({theme:A,frameToColorBucket:l}),c=P(f=>{He.setSelectedFrame(f)},[]),h=Y($n),_=Y(Vn);return C(FI,{profile:n,selectedFrame:i,getCSSColorForFrame:s,sortMethod:r,setSelectedFrame:c,setSortMethod:kr.set,searchIsActive:h,searchQuery:_})});V();V();var ir=class extends mt{constructor(){super(...arguments);this.setConfigSpaceViewportRect=n=>{this.props.setConfigSpaceViewportRect(this.clampViewportToFlamegraph(n))};this.setLogicalSpaceViewportSize=n=>{this.props.setLogicalSpaceViewportSize(n)};this.transformViewport=n=>{this.setConfigSpaceViewportRect(n.transformRect(this.props.configSpaceViewportRect))};this.container=null;this.containerRef=n=>{this.container=n||null};this.setNodeHover=n=>{this.props.setNodeHover(n)}}clampViewportToFlamegraph(n){let{flamechart:a,renderInverted:r}=this.props;return a.getClampedConfigSpaceViewportRect({configSpaceViewportRect:n,renderInverted:r})}formatValue(n){let a=this.props.flamechart.getTotalWeight(),r=100*n/a,A=xt(r);return`${this.props.flamechart.formatValue(n)} (${A})`}renderTooltip(){if(!this.container)return null;let{hover:n}=this.props;if(!n)return null;let{width:a,height:r,left:A,top:o}=this.container.getBoundingClientRect(),i=new v(n.event.clientX-A,n.event.clientY-o),l=DI(this.props.theme),s=n.node.frame;return C(QA,{containerSize:new v(a,r),offset:i},C("span",{className:B(l.hoverCount)},this.formatValue(n.node.getTotalWeight()))," ",s.name,s.file?C("div",null,s.file,":",s.line):void 0)}render(){return C("div",{className:B(Ee.fillY,Ee.fillX,Ee.vbox),ref:this.containerRef},C(Xn,{theme:this.props.theme,selectedNode:null,onNodeHover:this.setNodeHover,onNodeSelect:On,configSpaceViewportRect:this.props.configSpaceViewportRect,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect,transformViewport:this.transformViewport,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,canvasContext:this.props.canvasContext,renderInverted:this.props.renderInverted,logicalSpaceViewportSize:this.props.logicalSpaceViewportSize,setLogicalSpaceViewportSize:this.setLogicalSpaceViewportSize,searchResults:null}),this.renderTooltip())}},DI=Ce(t=>de.create({hoverCount:{color:t.weightColor}}));var RI=ze(({profile:t,frame:e,flattenRecursion:n})=>{let a=t.getInvertedProfileForCallersOf(e);return n?a.getProfileWithRecursionFlattened():a}),LI=ze(({invertedCallerProfile:t,getColorBucketForFrame:e})=>new Wt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),TI=tr({inverted:!0}),Qh=pe(t=>{let{activeProfileState:e}=t,{profile:n,sandwichViewState:a}=e,r=Y(zt),A=Y(yn),o=z();if(!n)throw new Error("profile missing");if(!A)throw new Error("glCanvas missing");let{callerCallee:i}=a;if(!i)throw new Error("callerCallee missing");let{selectedFrame:l}=i,s=qt(n),c=sn(s),h=Ut({theme:o,frameToColorBucket:s}),_=Ot({theme:o,canvas:A}),f=LI({invertedCallerProfile:RI({profile:n,frame:l,flattenRecursion:r}),getColorBucketForFrame:c}),m=TI({canvasContext:_,flamechart:f});return C(ir,{theme:o,renderInverted:!0,flamechart:f,flamechartRenderer:m,canvasContext:_,getCSSColorForFrame:h,...er("SANDWICH_INVERTED_CALLERS"),...i.invertedCallerFlamegraph,setSelectedNode:On})});V();var HI=ze(({profile:t,frame:e,flattenRecursion:n})=>{let a=t.getProfileForCalleesOf(e);return n?a.getProfileWithRecursionFlattened():a}),MI=ze(({calleeProfile:t,getColorBucketForFrame:e})=>new Wt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),KI=tr(),wh=pe(t=>{let{activeProfileState:e}=t,{profile:n,sandwichViewState:a}=e,r=Y(zt),A=Y(yn),o=z();if(!n)throw new Error("profile missing");if(!A)throw new Error("glCanvas missing");let{callerCallee:i}=a;if(!i)throw new Error("callerCallee missing");let{selectedFrame:l}=i,s=qt(n),c=sn(s),h=Ut({theme:o,frameToColorBucket:s}),_=Ot({theme:o,canvas:A}),f=MI({calleeProfile:HI({profile:n,frame:l,flattenRecursion:r}),getColorBucketForFrame:c}),m=KI({canvasContext:_,flamechart:f});return C(ir,{theme:o,renderInverted:!1,flamechart:f,flamechartRenderer:m,canvasContext:_,getCSSColorForFrame:h,...er("SANDWICH_CALLEES"),...i.calleeFlamegraph,setSelectedNode:On})});var bh=pe(()=>{let t=lt(Mr),e=t!=null?t.rowList:null,n=t?.selectedFrame!=null?t.getIndexForFrame(t.selectedFrame):null,a=e!=null?e.length:null,{selectPrev:r,selectNext:A}=oe(()=>e==null||a==null||a===0||t==null?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{let o=n==null?a-1:n-1;o<0&&(o=a-1),t.setSelectedFrame(e[o])},selectNext:()=>{let o=n==null?0:n+1;o>=a&&(o=0),t.setSelectedFrame(e[o])}},[n,e,a,t]);return C(uA,{resultIndex:n,numResults:a,selectPrev:r,selectNext:A})});V();var Qi=class extends mt{constructor(){super(...arguments);this.setSelectedFrame=n=>{this.props.setSelectedFrame(n)};this.onWindowKeyPress=n=>{n.key==="Escape"&&this.setSelectedFrame(null)}}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyPress)}render(){let n=JI(this.props.theme),{selectedFrame:a}=this.props,r=null;return a&&(r=C("div",{className:B(Ee.fillY,n.callersAndCallees,Ee.vbox)},C("div",{className:B(Ee.hbox,n.panZoomViewWraper)},C("div",{className:B(n.flamechartLabelParent)},C("div",{className:B(n.flamechartLabel)},"Callers")),C(Qh,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})),C("div",{className:B(n.divider)}),C("div",{className:B(Ee.hbox,n.panZoomViewWraper)},C("div",{className:B(n.flamechartLabelParent,n.flamechartLabelParentBottom)},C("div",{className:B(n.flamechartLabel,n.flamechartLabelBottom)},"Callees")),C(wh,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})))),C("div",{className:B(Ee.hbox,Ee.fillY)},C("div",{className:B(n.tableView)},C(Bh,{activeProfileState:this.props.activeProfileState}),C(bh,null)),r)}},JI=Ce(t=>de.create({tableView:{position:"relative",flex:1},panZoomViewWraper:{flex:1},flamechartLabelParent:{display:"flex",flexDirection:"column",justifyContent:"flex-end",alignItems:"flex-start",fontSize:12,width:12*1.2,borderRight:`1px solid ${t.fgSecondaryColor}`},flamechartLabelParentBottom:{justifyContent:"flex-start"},flamechartLabel:{transform:"rotate(-90deg)",transformOrigin:"50% 50% 0",width:12*1.2,flexShrink:1},flamechartLabelBottom:{transform:"rotate(-90deg)",display:"flex",justifyContent:"flex-end"},callersAndCallees:{flex:1,borderLeft:`2px solid ${t.fgSecondaryColor}`},divider:{height:2,background:t.fgSecondaryColor}})),Mr=wt(null),xh=pe(t=>{let{activeProfileState:e,glCanvas:n}=t,{sandwichViewState:a,index:r}=e,{callerCallee:A}=a,o=z(),i=P(g=>{He.setSelectedFrame(g)},[]),l=e.profile,s=Y(kr),c=lt(Qn),h=A?A.selectedFrame:null,_=oe(()=>{let g=[];switch(l.forEachFrame(p=>{c&&!c.getMatchForFrame(p)||g.push(p)}),s.field){case 0:{Fe(g,p=>p.name.toLowerCase());break}case 1:{Fe(g,p=>p.getSelfWeight());break}case 2:{Fe(g,p=>p.getTotalWeight());break}}return s.direction===1&&g.reverse(),g},[l,c,s]),f=oe(()=>{let g=new Map;for(let p=0;p<_.length;p++)g.set(_[p],p);return p=>{let I=g.get(p);return I??null}},[_]),m=oe(()=>g=>c==null?null:c.getMatchForFrame(g),[c]),u={rowList:_,selectedFrame:h,setSelectedFrame:i,getIndexForFrame:f,getSearchMatchForFrame:m};return C(Mr.Provider,{value:u},C(Qi,{theme:o,activeProfileState:e,glCanvas:n,setSelectedFrame:i,selectedFrame:h,profileIndex:r}))});var jr=Promise.resolve().then(()=>(Sf(),kf));jr.then(()=>{});Promise.resolve().then(()=>(Vo(),$o)).then(()=>{});Promise.resolve().then(()=>he(Ei())).then(()=>{});async function Ff(t,e){return(await jr).importProfileGroupFromText(t,e)}async function Zy(t,e){return(await jr).importProfileGroupFromBase64(t,e)}async function Xy(t,e){return(await jr).importProfilesFromArrayBuffer(t,e)}async function eE(t){return(await jr).importProfilesFromFile(t)}async function tE(t){return(await jr).importFromFileSystemDirectoryEntry(t)}var nE=Nf();function rE(t){return t!=null&&t.isDirectory}var Ul=class extends mt{constructor(){super(...arguments);this.canvas=null;this.ref=n=>{n instanceof HTMLCanvasElement?this.canvas=n:this.canvas=null,this.props.setGLCanvas(this.canvas)};this.container=null;this.containerRef=n=>{n instanceof HTMLElement?this.container=n:this.container=null};this.maybeResize=()=>{if(!this.container||!this.props.canvasContext)return;let{width:n,height:a}=this.container.getBoundingClientRect(),r=n,A=a,o=n*window.devicePixelRatio,i=a*window.devicePixelRatio;this.props.canvasContext.gl.resize(o,i,r,A)};this.onWindowResize=()=>{this.props.canvasContext&&this.props.canvasContext.requestFrame()}}componentWillReceiveProps(n){this.props.canvasContext!==n.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),n.canvasContext&&(n.canvasContext.addBeforeFrameHandler(this.maybeResize),n.canvasContext.requestFrame()))}componentDidMount(){window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),window.removeEventListener("resize",this.onWindowResize)}render(){let n=Df(this.props.theme);return C("div",{ref:this.containerRef,className:B(n.glCanvasView)},C("canvas",{ref:this.ref,width:1,height:1}))}},_o=class extends mt{constructor(){super(...arguments);this.loadExample=()=>{this.loadProfile(async()=>{let n="perf-vertx-stacks-01-collapsed-all.txt",a=await fetch(nE).then(r=>r.text());return await Ff(n,a)})};this.onDrop=n=>{if(this.props.setDragActive(!1),n.preventDefault(),!n.dataTransfer)return;let a=n.dataTransfer.items[0];if("webkitGetAsEntry"in a){let A=a.webkitGetAsEntry();if(A&&rE(A)&&A.name.endsWith(".trace")){console.log("Importing as Instruments.app .trace file");let o=A;this.loadProfile(async()=>await tE(o));return}}let r=n.dataTransfer.files.item(0);r&&this.loadFromFile(r)};this.onDragOver=n=>{this.props.setDragActive(!0),n.preventDefault()};this.onDragLeave=n=>{this.props.setDragActive(!1),n.preventDefault()};this.onWindowKeyPress=async n=>{if(n.key==="1")this.props.setViewMode(0);else if(n.key==="2")this.props.setViewMode(1);else if(n.key==="3")this.props.setViewMode(2);else if(n.key==="r"){let{flattenRecursion:a}=this.props;this.props.setFlattenRecursion(!a)}else if(n.key==="n"){let{activeProfileState:a}=this.props;a&&this.props.setProfileIndexToView(a.index+1)}else if(n.key==="p"){let{activeProfileState:a}=this.props;a&&this.props.setProfileIndexToView(a.index-1)}};this.saveFile=()=>{if(this.props.profileGroup){let{name:n,indexToView:a,profiles:r}=this.props.profileGroup,A={name:n,indexToView:a,profiles:r.map(o=>o.profile)};N_(A)}};this.browseForFile=()=>{let n=document.createElement("input");n.type="file",n.addEventListener("change",this.onFileSelect),n.click()};this.onWindowKeyDown=async n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)?(n.preventDefault(),this.saveFile()):n.key==="o"&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),this.browseForFile())};this.onDocumentPaste=n=>{if(document.activeElement!=null&&document.activeElement.nodeName==="INPUT")return;n.preventDefault(),n.stopPropagation();let a=n.clipboardData;if(!a)return;let r=a.getData("text");this.loadProfile(async()=>await Ff("From Clipboard",r))};this.onFileSelect=n=>{let a=n.target.files.item(0);a&&this.loadFromFile(a)}}async loadProfile(n){if(this.props.setError(!1),this.props.setLoading(!0),await new Promise(r=>setTimeout(r,0)),!this.props.glCanvas)return;console.time("import");let a=null;try{a=await n()}catch(r){console.log("Failed to load format",r),this.props.setError(!0);return}if(a==null){alert("Unrecognized format! See documentation about supported formats."),this.props.setLoading(!1);return}else if(a.profiles.length===0){alert("Successfully imported profile, but it's empty!"),this.props.setLoading(!1);return}this.props.hashParams.title&&(a={...a,name:this.props.hashParams.title}),document.title=`${a.name} - speedscope`,this.props.hashParams.viewMode&&this.props.setViewMode(this.props.hashParams.viewMode);for(let r of a.profiles)await r.demangle();for(let r of a.profiles){let A=this.props.hashParams.title||r.getName();r.setName(A)}console.timeEnd("import"),this.props.setProfileGroup(a),this.props.setLoading(!1)}getStyle(){return Df(this.props.theme)}loadFromFile(n){this.loadProfile(async()=>{let a=await eE(n);if(a){for(let r of a.profiles)r.getName()||r.setName(n.name);return a}if(this.props.profileGroup&&this.props.activeProfileState){let r=new FileReader,A=new Promise(c=>{r.addEventListener("loadend",()=>{if(typeof r.result!="string")throw new Error("Expected reader.result to be a string");c(r.result)})});r.readAsText(n);let o=await A,i=null,l=E_(o);l&&(console.log("Importing as emscripten symbol map"),i=l);let s=await vh(o,n.name);if(!i&&s&&(console.log("Importing as JavaScript source map"),i=s),i!=null)return{name:this.props.profileGroup.name||"profile",indexToView:this.props.profileGroup.indexToView,profiles:this.props.profileGroup.profiles.map(c=>{let h=c.profile.shallowClone();return h.remapSymbols(i),h})}}return null})}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyDown),window.addEventListener("keypress",this.onWindowKeyPress),document.addEventListener("paste",this.onDocumentPaste),this.maybeLoadHashParamProfile()}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyDown),window.removeEventListener("keypress",this.onWindowKeyPress),document.removeEventListener("paste",this.onDocumentPaste)}async maybeLoadHashParamProfile(){let{profileURL:n}=this.props.hashParams;if(n){if(!Ta){alert(`Cannot load a profile URL when loading from "${window.location.protocol}" URL protocol`);return}this.loadProfile(async()=>{let a=await fetch(n),r=new URL(n,window.location.href).pathname;return r.includes("/")&&(r=r.slice(r.lastIndexOf("/")+1)),await Xy(r,await a.arrayBuffer())})}else if(this.props.hashParams.localProfilePath){window.speedscope={loadFileFromBase64:(r,A)=>{this.loadProfile(()=>Zy(r,A))}};let a=document.createElement("script");a.src=`file:///${this.props.hashParams.localProfilePath}`,document.head.appendChild(a)}}renderLanding(){let n=this.getStyle();return C("div",{className:B(n.landingContainer)},C("div",{className:B(n.landingMessage)},C("p",{className:B(n.landingP)},"\u{1F44B} Hi there! Welcome to \u{1F52C}speedscope, an interactive"," ",C("a",{className:B(n.link),href:"http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html"},"flamegraph")," ","visualizer. Use it to help you make your software faster."),Ta?C("p",{className:B(n.landingP)},"Drag and drop a profile file onto this window to get started, click the big blue button below to browse for a profile to explore, or"," ",C("a",{tabIndex:0,className:B(n.link),onClick:this.loadExample},"click here")," ","to load an example profile."):C("p",{className:B(n.landingP)},"Drag and drop a profile file onto this window to get started, or click the big blue button below to browse for a profile to explore."),C("div",{className:B(n.browseButtonContainer)},C("input",{type:"file",name:"file",id:"file",onChange:this.onFileSelect,className:B(n.hide)}),C("label",{for:"file",className:B(n.browseButton),tabIndex:0},"Browse")),C("p",{className:B(n.landingP)},"See the"," ",C("a",{className:B(n.link),href:"https://github.com/jlfwong/speedscope#usage",target:"_blank"},"documentation")," ","for information about supported file formats, keyboard shortcuts, and how to navigate around the profile."),C("p",{className:B(n.landingP)},"speedscope is open source. Please"," ",C("a",{className:B(n.link),target:"_blank",href:"https://github.com/jlfwong/speedscope/issues"},"report any issues on GitHub"),".")))}renderError(){let n=this.getStyle();return C("div",{className:B(n.error)},C("div",null,"\u{1F63F} Something went wrong."),C("div",null,"Check the JS console for more details."))}renderLoadingBar(){let n=this.getStyle();return C("div",{className:B(n.loading)})}renderContent(){let{viewMode:n,activeProfileState:a,error:r,loading:A,glCanvas:o}=this.props;if(r)return this.renderError();if(A)return this.renderLoadingBar();if(!a||!o)return this.renderLanding();switch(n){case 0:return C(P_,{activeProfileState:a,glCanvas:o});case 1:return C(G_,{activeProfileState:a,glCanvas:o});case 2:return C(xh,{activeProfileState:a,glCanvas:o})}}render(){let n=this.getStyle();return C("div",{onDrop:this.onDrop,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,className:B(n.root,this.props.dragActive&&n.dragTargetRoot)},C(Ul,{setGLCanvas:this.props.setGLCanvas,canvasContext:this.props.canvasContext,theme:this.props.theme}),C(Z_,{saveFile:this.saveFile,browseForFile:this.browseForFile,...this.props}),C("div",{className:B(n.contentContainer)},this.renderContent()),this.props.dragActive&&C("div",{className:B(n.dragTarget)}))}},Df=Ce(t=>de.create({glCanvasView:{position:"absolute",width:"100vw",height:"100vh",zIndex:-1,pointerEvents:"none"},error:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},loading:{height:3,marginBottom:-3,background:t.selectionPrimaryColor,transformOrigin:"0% 50%",animationName:[{from:{transform:"scaleX(0)"},to:{transform:"scaleX(1)"}}],animationTimingFunction:"cubic-bezier(0, 1, 0, 1)",animationDuration:"30s"},root:{width:"100vw",height:"100vh",overflow:"hidden",display:"flex",flexDirection:"column",position:"relative",fontFamily:'"Source Code Pro", Courier, monospace',lineHeight:"20px",color:t.fgPrimaryColor},dragTargetRoot:{cursor:"copy"},dragTarget:{boxSizing:"border-box",position:"absolute",top:0,left:0,width:"100%",height:"100%",border:`5px dashed ${t.selectionPrimaryColor}`,pointerEvents:"none"},contentContainer:{position:"relative",display:"flex",overflow:"hidden",flexDirection:"column",flex:1},landingContainer:{display:"flex",alignItems:"center",justifyContent:"center",flex:1},landingMessage:{maxWidth:600},landingP:{marginBottom:16},hide:{display:"none"},browseButtonContainer:{display:"flex",alignItems:"center",justifyContent:"center"},browseButton:{marginBottom:16,height:72,flex:1,maxWidth:256,textAlign:"center",fontSize:36,lineHeight:"72px",background:t.selectionPrimaryColor,color:t.altFgPrimaryColor,transition:"all 0.07s ease-in",":hover":{background:t.selectionSecondaryColor}},link:{color:t.selectionPrimaryColor,cursor:"pointer",textDecoration:"none",transition:"all 0.07s ease-in",":hover":{color:t.selectionSecondaryColor}}}));var Rf=pe(()=>{let t=Y(yn),e=z(),{canvasContext:n,error:a}=oe(()=>{if(!t)return{canvasContext:null,error:null};try{return{canvasContext:Ot({theme:e,canvas:t}),error:null}}catch(r){return console.error("Failed to create WebGL context:",r),{canvasContext:null,error:r}}},[e,t]);return Ue(()=>{a&&Ha.set(!0)},[a]),C(v_,null,C(_o,{activeProfileState:Ma(),canvasContext:n,setGLCanvas:yn.set,setLoading:Do.set,setError:Ha.set,setProfileGroup:He.setProfileGroup,setDragActive:Fo.set,setViewMode:_n.set,setFlattenRecursion:zt.set,setProfileIndexToView:He.setProfileIndexToView,profileGroup:Y(He),theme:e,flattenRecursion:Y(zt),viewMode:Y(_n),hashParams:Y(Fs),glCanvas:t,dragActive:Y(Fo),loading:Y(Do),error:Y(Ha)}))});console.log(`speedscope v${Yo().version}`);mo(C(Os,null,C(Rf,null)),document.body,document.body.lastElementChild||void 0);})(); +//# sourceMappingURL=speedscope-Y2522XSH.js.map diff --git a/apps/trace/speedscope/speedscope-Y2522XSH.js.map b/apps/trace/speedscope/speedscope-Y2522XSH.js.map new file mode 100644 index 00000000..26452262 --- /dev/null +++ b/apps/trace/speedscope/speedscope-Y2522XSH.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/lib/utils.ts", "../../node_modules/css-in-js-utils/lib/isPrefixedValue.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/calc.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/crossFade.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/cursor.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/filter.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/flex.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/flexboxIE.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/flexboxOld.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/gradient.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/imageSet.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/position.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/sizing.js", "../../node_modules/hyphenate-style-name/index.js", "../../node_modules/css-in-js-utils/lib/hyphenateProperty.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/utils/capitalizeString.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/plugins/transition.js", "../../node_modules/string-hash/index.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/utils/prefixProperty.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/utils/prefixValue.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/utils/addNewValuesOnly.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/utils/isObject.js", "../../node_modules/aphrodite/node_modules/inline-style-prefixer/static/createPrefixer.js", "../../node_modules/asap/browser-raw.js", "../../node_modules/asap/browser-asap.js", "../../src/lib/value-formatters.ts", "../../src/lib/demangle/demangle.wasm.js", "../../src/lib/demangle/demangle.ts", "../../src/lib/demangle/index.ts", "../../src/lib/profile.ts", "../../src/lib/file-format-spec.ts", "../../package.json", "../../src/lib/file-format.ts", "../../node_modules/source-map/lib/base64.js", "../../node_modules/source-map/lib/base64-vlq.js", "../../node_modules/source-map/lib/util.js", "../../node_modules/source-map/lib/array-set.js", "../../node_modules/source-map/lib/mapping-list.js", "../../node_modules/source-map/lib/source-map-generator.js", "../../node_modules/source-map/lib/binary-search.js", "../../node_modules/source-map/lib/quick-sort.js", "../../node_modules/source-map/lib/source-map-consumer.js", "../../node_modules/source-map/lib/source-node.js", "../../node_modules/source-map/source-map.js", "../../src/import/v8cpuFormatter.ts", "../../src/import/chrome.ts", "../../src/import/stackprof.ts", "../../node_modules/pako/lib/utils/common.js", "../../node_modules/pako/lib/zlib/trees.js", "../../node_modules/pako/lib/zlib/adler32.js", "../../node_modules/pako/lib/zlib/crc32.js", "../../node_modules/pako/lib/zlib/messages.js", "../../node_modules/pako/lib/zlib/deflate.js", "../../node_modules/pako/lib/utils/strings.js", "../../node_modules/pako/lib/zlib/zstream.js", "../../node_modules/pako/lib/deflate.js", "../../node_modules/pako/lib/zlib/inffast.js", "../../node_modules/pako/lib/zlib/inftrees.js", "../../node_modules/pako/lib/zlib/inflate.js", "../../node_modules/pako/lib/zlib/constants.js", "../../node_modules/pako/lib/zlib/gzheader.js", "../../node_modules/pako/lib/inflate.js", "../../node_modules/pako/index.js", "../../node_modules/uint8array-json-parser/uint8array-json-parser.js", "../../src/import/utils.ts", "../../src/import/instruments.ts", "../../src/import/bg-flamegraph.ts", "../../src/import/firefox.ts", "../../src/import/v8proflog.ts", "../../src/import/linux-tools-perf.ts", "../../src/import/haskell.ts", "../../src/import/safari.ts", "../../node_modules/@protobufjs/aspromise/index.js", "../../node_modules/@protobufjs/base64/index.js", "../../node_modules/@protobufjs/eventemitter/index.js", "../../node_modules/@protobufjs/float/index.js", "../../node_modules/@protobufjs/inquire/index.js", "../../node_modules/@protobufjs/utf8/index.js", "../../node_modules/@protobufjs/pool/index.js", "../../node_modules/protobufjs/src/util/longbits.js", "../../node_modules/protobufjs/src/util/minimal.js", "../../node_modules/protobufjs/src/writer.js", "../../node_modules/protobufjs/src/writer_buffer.js", "../../node_modules/protobufjs/src/reader.js", "../../node_modules/protobufjs/src/reader_buffer.js", "../../node_modules/protobufjs/src/rpc/service.js", "../../node_modules/protobufjs/src/rpc.js", "../../node_modules/protobufjs/src/roots.js", "../../node_modules/protobufjs/src/index-minimal.js", "../../node_modules/protobufjs/minimal.js", "../../src/import/profile.proto.js", "../../node_modules/long/src/long.js", "../../src/import/pprof.ts", "../../src/import/v8heapalloc.ts", "../../src/import/trace-event.ts", "../../src/import/callgrind.ts", "../../src/import/papyrus.ts", "../../src/import/pmcstat-callgraph.ts", "../../node_modules/jfrview/jfrview.js", "../../src/import/java-flight-recorder.ts", "../../src/import/index.ts", "../../node_modules/preact/src/constants.js", "../../node_modules/preact/src/options.js", "../../node_modules/preact/src/create-element.js", "../../node_modules/preact/src/component.js", "../../node_modules/preact/src/render.js", "../../node_modules/preact/src/create-context.js", "../../node_modules/preact/src/util.js", "../../node_modules/preact/src/diff/children.js", "../../node_modules/preact/src/diff/props.js", "../../node_modules/preact/src/diff/index.js", "../../node_modules/preact/src/clone-element.js", "../../node_modules/preact/src/diff/catch-error.js", "../../src/app-state/getters.ts", "../../src/lib/lru-cache.ts", "../../src/lib/math.ts", "../../src/gl/graphics.ts", "../../src/gl/utils.ts", "../../src/gl/rectangle-batch-renderer.ts", "../../src/lib/color.ts", "../../src/gl/row-atlas.ts", "../../src/gl/texture-renderer.ts", "../../src/gl/overlay-rectangle-renderer.ts", "../../src/gl/flamechart-color-pass-renderer.ts", "../../src/gl/canvas-context.ts", "../../node_modules/preact/hooks/src/index.js", "../../node_modules/preact/compat/src/util.js", "../../node_modules/preact/compat/src/PureComponent.js", "../../node_modules/preact/compat/src/memo.js", "../../node_modules/preact/compat/src/forwardRef.js", "../../node_modules/preact/compat/src/Children.js", "../../node_modules/preact/compat/src/suspense.js", "../../node_modules/preact/compat/src/suspense-list.js", "../../node_modules/preact/compat/src/portals.js", "../../node_modules/preact/compat/src/render.js", "../../node_modules/preact/compat/src/events.js", "../../node_modules/preact/compat/src/index.js", "../../src/lib/atom.ts", "../../src/lib/hash-params.ts", "../../src/app-state/profile-group.ts", "../../src/app-state/index.ts", "../../src/app-state/active-profile-state.ts", "../../src/app-state/color-scheme.ts", "../../src/views/themes/theme.tsx", "../../src/views/themes/dark-theme.ts", "../../src/views/themes/light-theme.ts", "../../node_modules/aphrodite/es/index.js", "../../src/views/style.ts", "../../src/lib/profile-search.ts", "../../src/views/search-view.tsx", "../../src/lib/emscripten.ts", "../../src/views/application.tsx", "../../src/lib/flamechart.ts", "../../src/gl/flamechart-renderer.ts", "../../src/views/flamechart-view-container.tsx", "../../src/views/flamechart-view.tsx", "../../src/views/flamechart-style.ts", "../../src/lib/text-utils.ts", "../../src/views/flamechart-minimap-view.tsx", "../../src/views/flamechart-detail-view.tsx", "../../src/views/color-chit.tsx", "../../src/lib/canvas-2d-batch-renderers.ts", "../../src/views/flamechart-pan-zoom-view.tsx", "../../src/views/hovertip.tsx", "../../src/views/flamechart-search-view.tsx", "../../src/lib/preact-helpers.tsx", "../../src/lib/fuzzy-find.ts", "../../src/views/profile-select.tsx", "../../src/views/toolbar.tsx", "../../src/lib/js-source-map.ts", "../../src/views/profile-table-view.tsx", "../../src/views/scrollable-list-view.tsx", "../../src/views/inverted-caller-flamegraph-view.tsx", "../../src/views/flamechart-wrapper.tsx", "../../src/views/callee-flamegraph-view.tsx", "../../src/views/sandwich-search-view.tsx", "../../src/views/sandwich-view.tsx", "../../src/views/application-container.tsx", "../../src/speedscope.tsx"], + "sourcesContent": ["export function lastOf(ts: T[]): T | null {\n return ts[ts.length - 1] || null\n}\n\nexport function sortBy(ts: T[], key: (t: T) => number | string): void {\n function comparator(a: T, b: T) {\n const keyA = key(a)\n const keyB = key(b)\n return keyA < keyB ? -1 : keyA > keyB ? 1 : 0\n }\n ts.sort(comparator)\n}\n\nexport function getOrInsert(map: Map, k: K, fallback: (k: K) => V): V {\n if (!map.has(k)) map.set(k, fallback(k))\n return map.get(k)!\n}\n\nexport function getOrElse(map: Map, k: K, fallback: (k: K) => V): V {\n if (!map.has(k)) return fallback(k)\n return map.get(k)!\n}\n\nexport function getOrThrow(map: Map, k: K): V {\n if (!map.has(k)) {\n throw new Error(`Expected key ${k}`)\n }\n return map.get(k)!\n}\n\n// Intended to be used to de-duplicate objects based on a key property. This\n// allows value comparisons to be done efficiently and for the returned objects\n// to be used intuitively in Map objects.\n//\n// Example usage:\n//\n// export class Frame {\n// private constructor(readonly file: string, readonly name: string) {}\n// get key() { return `${this.file}:${this.name}` }\n// static getOrInsert(set: KeyedSet, file: string, name: string) {\n// return set.getOrInsert(set, new Frame(file, name))\n// }\n// }\n//\nexport interface HasKey {\n readonly key: string | number\n}\nexport class KeyedSet implements Iterable {\n private map = new Map()\n\n getOrInsert(t: T): T {\n const key = t.key\n const existing = this.map.get(key)\n if (existing) return existing\n this.map.set(key, t)\n return t\n }\n forEach(fn: (t: T) => void) {\n this.map.forEach(fn)\n }\n [Symbol.iterator]() {\n return this.map.values()\n }\n}\n\nexport function* itMap(it: Iterable, f: (t: T) => U): Iterable {\n for (let t of it) {\n yield f(t)\n }\n}\n\nexport function itForEach(it: Iterable, f: (t: T) => void): void {\n for (let t of it) {\n f(t)\n }\n}\n\nexport function itReduce(it: Iterable, f: (a: U, b: T) => U, init: U): U {\n let accum: U = init\n for (let t of it) {\n accum = f(accum, t)\n }\n return accum\n}\n\nexport function zeroPad(s: string, width: number) {\n return new Array(Math.max(width - s.length, 0) + 1).join('0') + s\n}\n\nexport function formatPercent(percent: number) {\n let formattedPercent = `${percent.toFixed(0)}%`\n if (percent === 100) formattedPercent = '100%'\n else if (percent > 99) formattedPercent = '>99%'\n else if (percent < 0.01) formattedPercent = '<0.01%'\n else if (percent < 1) formattedPercent = `${percent.toFixed(2)}%`\n else if (percent < 10) formattedPercent = `${percent.toFixed(1)}%`\n return formattedPercent\n}\n\nexport function fract(x: number) {\n return x - Math.floor(x)\n}\n\nexport function triangle(x: number) {\n return 2.0 * Math.abs(fract(x) - 0.5) - 1.0\n}\n\nexport function findValueBisect(\n lo: number,\n hi: number,\n f: (val: number) => number,\n target: number,\n targetRangeSize = 1,\n): [number, number] {\n console.assert(!isNaN(targetRangeSize) && !isNaN(target))\n while (true) {\n if (hi - lo <= targetRangeSize) return [lo, hi]\n const mid = (hi + lo) / 2\n const val = f(mid)\n if (val < target) lo = mid\n else hi = mid\n }\n}\n\n// Similar to Array.prototype.findIndex, except uses a binary search.\n//\n// This assumes that the condition transitions exactly once from false to true\n// in the list, e.g. the following is a valid input:\n//\n// ls = [a, b, c, d]\n// ls.map(f) = [false, false, true, true]\n//\n// The following is an invalid input:\n//\n// ls = [a, b, c, d]\n// ls.map(f) = [false, true, false, true]\nexport function findIndexBisect(ls: T[], f: (val: T) => boolean): number {\n if (ls.length === 0) return -1\n\n let lo = 0\n let hi = ls.length - 1\n\n while (hi !== lo) {\n const mid = Math.floor((lo + hi) / 2)\n\n if (f(ls[mid])) {\n // The desired index is <= mid\n hi = mid\n } else {\n // The desired index is > mid\n lo = mid + 1\n }\n }\n\n return f(ls[hi]) ? hi : -1\n}\n\nexport function noop(...args: any[]) {}\n\nexport function objectsHaveShallowEquality(a: T, b: T): boolean {\n for (let key in a) {\n if (a[key] !== b[key]) return false\n }\n for (let key in b) {\n if (a[key] !== b[key]) return false\n }\n return true\n}\n\nexport function memoizeByShallowEquality(cb: (t: T) => U): (t: T) => U {\n let last: {args: T; result: U} | null = null\n return (args: T) => {\n let result: U\n if (last == null) {\n result = cb(args)\n last = {args, result}\n return result\n } else if (objectsHaveShallowEquality(last.args, args)) {\n return last.result\n } else {\n last.args = args\n last.result = cb(args)\n return last.result\n }\n }\n}\n\nexport function memoizeByReference(cb: (t: T) => U): (t: T) => U {\n let last: {args: T; result: U} | null = null\n return (args: T) => {\n let result: U\n if (last == null) {\n result = cb(args)\n last = {args, result}\n return result\n } else if (last.args === args) {\n return last.result\n } else {\n last.args = args\n last.result = cb(args)\n return last.result\n }\n }\n}\n\nexport function lazyStatic(cb: () => T): () => T {\n let last: {result: T} | null = null\n return () => {\n if (last == null) {\n last = {result: cb()}\n }\n return last.result\n }\n}\n\nconst base64lookupTable = lazyStatic((): Map => {\n const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n const ret = new Map()\n for (let i = 0; i < alphabet.length; i++) {\n ret.set(alphabet.charAt(i), i)\n }\n ret.set('=', -1)\n return ret\n})\n\n// NOTE: There are probably simpler solutions to this problem, but I have this written already, so\n// until we run into problems with this, let's just use this.\n//\n// See: https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem#The_Unicode_Problem\nexport function decodeBase64(encoded: string): Uint8Array {\n // Reference: https://www.rfc-editor.org/rfc/rfc4648.txt\n\n const lookupTable = base64lookupTable()\n\n // 3 byte groups are represented as sequneces of 4 characters.\n //\n // \"The encoding process represents 24-bit groups of input bits as output\n // strings of 4 encoded characters.\"\n //\n // \"Special processing is performed if fewer than 24 bits are available\n // at the end of the data being encoded. A full encoding quantum is\n // always completed at the end of a quantity. When fewer than 24 input\n // bits are available in an input group bits with value zero are added\n // (on the right) to form an integral number of 6-bit groups.\"\n\n if (encoded.length % 4 !== 0) {\n throw new Error(\n `Invalid length for base64 encoded string. Expected length % 4 = 0, got length = ${encoded.length}`,\n )\n }\n\n const quartetCount = encoded.length / 4\n let byteCount: number\n\n // Special processing is performed if fewer than 24 bits are available\n // at the end of the data being encoded. A full encoding quantum is\n // always completed at the end of a quantity. When fewer than 24 input\n // bits are available in an input group, bits with value zero are added\n // (on the right) to form an integral number of 6-bit groups. Padding\n // at the end of the data is performed using the '=' character. Since\n // all base 64 input is an integral number of octets, only the following\n // cases can arise:\n //\n // (1) The final quantum of encoding input is an integral multiple of 24\n // bits; here, the final unit of encoded output will be an integral\n // multiple of 4 characters with no \"=\" padding.\n //\n // (2) The final quantum of encoding input is exactly 8 bits; here, the\n // final unit of encoded output will be two characters followed by\n // two \"=\" padding characters.\n //\n // (3) The final quantum of encoding input is exactly 16 bits; here, the\n // final unit of encoded output will be three characters followed by\n // one \"=\" padding character.\n if (encoded.length >= 4) {\n if (encoded.charAt(encoded.length - 1) === '=') {\n if (encoded.charAt(encoded.length - 2) === '=') {\n // Case (2)\n byteCount = quartetCount * 3 - 2\n } else {\n // Case (3)\n byteCount = quartetCount * 3 - 1\n }\n } else {\n // Case (1)\n byteCount = quartetCount * 3\n }\n } else {\n // Case (1)\n byteCount = quartetCount * 3\n }\n\n const bytes = new Uint8Array(byteCount)\n let offset = 0\n\n for (let i = 0; i < quartetCount; i++) {\n const enc1 = encoded.charAt(i * 4 + 0)\n const enc2 = encoded.charAt(i * 4 + 1)\n const enc3 = encoded.charAt(i * 4 + 2)\n const enc4 = encoded.charAt(i * 4 + 3)\n\n const sextet1 = lookupTable.get(enc1)\n const sextet2 = lookupTable.get(enc2)\n const sextet3 = lookupTable.get(enc3)\n const sextet4 = lookupTable.get(enc4)\n\n if (sextet1 == null || sextet2 == null || sextet3 == null || sextet4 == null) {\n throw new Error(\n `Invalid quartet at indices ${i * 4} .. ${i * 4 + 3}: ${encoded.substring(\n i * 4,\n i * 4 + 3,\n )}`,\n )\n }\n\n bytes[offset++] = (sextet1 << 2) | (sextet2 >> 4)\n if (enc3 !== '=') {\n bytes[offset++] = ((sextet2 & 15) << 4) | (sextet3 >> 2)\n }\n if (enc4 !== '=') {\n bytes[offset++] = ((sextet3 & 7) << 6) | sextet4\n }\n }\n\n if (offset !== byteCount) {\n throw new Error(`Expected to decode ${byteCount} bytes, but only decoded ${offset})`)\n }\n\n return bytes\n}\n", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isPrefixedValue;\nvar regex = /-webkit-|-moz-|-ms-/;\n\nfunction isPrefixedValue(value) {\n return typeof value === 'string' && regex.test(value);\n}\nmodule.exports = exports['default'];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = calc;\n\nvar _isPrefixedValue = require(\"css-in-js-utils/lib/isPrefixedValue\");\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar prefixes = [\"-webkit-\", \"-moz-\", \"\"];\nfunction calc(property, value) {\n if (typeof value === \"string\" && !(0, _isPrefixedValue2.default)(value) && value.indexOf(\"calc(\") > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/calc\\(/g, prefix + \"calc(\");\n });\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = crossFade;\n\nvar _isPrefixedValue = require(\"css-in-js-utils/lib/isPrefixedValue\");\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#search=cross-fade\nvar prefixes = [\"-webkit-\", \"\"];\nfunction crossFade(property, value) {\n if (typeof value === \"string\" && !(0, _isPrefixedValue2.default)(value) && value.indexOf(\"cross-fade(\") > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/cross-fade\\(/g, prefix + \"cross-fade(\");\n });\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = cursor;\nvar prefixes = [\"-webkit-\", \"-moz-\", \"\"];\n\nvar values = {\n \"zoom-in\": true,\n \"zoom-out\": true,\n grab: true,\n grabbing: true\n};\n\nfunction cursor(property, value) {\n if (property === \"cursor\" && values.hasOwnProperty(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = filter;\n\nvar _isPrefixedValue = require(\"css-in-js-utils/lib/isPrefixedValue\");\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#feat=css-filter-function\nvar prefixes = [\"-webkit-\", \"\"];\nfunction filter(property, value) {\n if (typeof value === \"string\" && !(0, _isPrefixedValue2.default)(value) && value.indexOf(\"filter(\") > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/filter\\(/g, prefix + \"filter(\");\n });\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = flex;\nvar values = {\n flex: [\"-webkit-box\", \"-moz-box\", \"-ms-flexbox\", \"-webkit-flex\", \"flex\"],\n \"inline-flex\": [\"-webkit-inline-box\", \"-moz-inline-box\", \"-ms-inline-flexbox\", \"-webkit-inline-flex\", \"inline-flex\"]\n};\n\nfunction flex(property, value) {\n if (property === \"display\" && values.hasOwnProperty(value)) {\n return values[value];\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = flexboxIE;\nvar alternativeValues = {\n \"space-around\": \"distribute\",\n \"space-between\": \"justify\",\n \"flex-start\": \"start\",\n \"flex-end\": \"end\"\n};\nvar alternativeProps = {\n alignContent: \"msFlexLinePack\",\n alignSelf: \"msFlexItemAlign\",\n alignItems: \"msFlexAlign\",\n justifyContent: \"msFlexPack\",\n order: \"msFlexOrder\",\n flexGrow: \"msFlexPositive\",\n flexShrink: \"msFlexNegative\",\n flexBasis: \"msFlexPreferredSize\"\n};\n\nfunction flexboxIE(property, value, style) {\n if (alternativeProps.hasOwnProperty(property)) {\n style[alternativeProps[property]] = alternativeValues[value] || value;\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = flexboxOld;\nvar alternativeValues = {\n \"space-around\": \"justify\",\n \"space-between\": \"justify\",\n \"flex-start\": \"start\",\n \"flex-end\": \"end\",\n \"wrap-reverse\": \"multiple\",\n wrap: \"multiple\"\n};\n\nvar alternativeProps = {\n alignItems: \"WebkitBoxAlign\",\n justifyContent: \"WebkitBoxPack\",\n flexWrap: \"WebkitBoxLines\"\n};\n\nfunction flexboxOld(property, value, style) {\n if (property === \"flexDirection\" && typeof value === \"string\") {\n if (value.indexOf(\"column\") > -1) {\n style.WebkitBoxOrient = \"vertical\";\n } else {\n style.WebkitBoxOrient = \"horizontal\";\n }\n if (value.indexOf(\"reverse\") > -1) {\n style.WebkitBoxDirection = \"reverse\";\n } else {\n style.WebkitBoxDirection = \"normal\";\n }\n }\n if (alternativeProps.hasOwnProperty(property)) {\n style[alternativeProps[property]] = alternativeValues[value] || value;\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = gradient;\n\nvar _isPrefixedValue = require(\"css-in-js-utils/lib/isPrefixedValue\");\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar prefixes = [\"-webkit-\", \"-moz-\", \"\"];\n\nvar values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;\n\nfunction gradient(property, value) {\n if (typeof value === \"string\" && !(0, _isPrefixedValue2.default)(value) && values.test(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = imageSet;\n\nvar _isPrefixedValue = require(\"css-in-js-utils/lib/isPrefixedValue\");\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#feat=css-image-set\nvar prefixes = [\"-webkit-\", \"\"];\nfunction imageSet(property, value) {\n if (typeof value === \"string\" && !(0, _isPrefixedValue2.default)(value) && value.indexOf(\"image-set(\") > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/image-set\\(/g, prefix + \"image-set(\");\n });\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = position;\nfunction position(property, value) {\n if (property === \"position\" && value === \"sticky\") {\n return [\"-webkit-sticky\", \"sticky\"];\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = sizing;\nvar prefixes = [\"-webkit-\", \"-moz-\", \"\"];\n\nvar properties = {\n maxHeight: true,\n maxWidth: true,\n width: true,\n height: true,\n columnWidth: true,\n minWidth: true,\n minHeight: true\n};\nvar values = {\n \"min-content\": true,\n \"max-content\": true,\n \"fill-available\": true,\n \"fit-content\": true,\n \"contain-floats\": true\n};\n\nfunction sizing(property, value) {\n if (properties.hasOwnProperty(property) && values.hasOwnProperty(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}\nmodule.exports = exports[\"default\"];", "'use strict';\n\nvar uppercasePattern = /[A-Z]/g;\nvar msPattern = /^ms-/;\nvar cache = {};\n\nfunction hyphenateStyleName(string) {\n return string in cache\n ? cache[string]\n : cache[string] = string\n .replace(uppercasePattern, '-$&')\n .toLowerCase()\n .replace(msPattern, '-ms-');\n}\n\nmodule.exports = hyphenateStyleName;\n", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = hyphenateProperty;\n\nvar _hyphenateStyleName = require('hyphenate-style-name');\n\nvar _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction hyphenateProperty(property) {\n return (0, _hyphenateStyleName2.default)(property);\n}\nmodule.exports = exports['default'];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = capitalizeString;\nfunction capitalizeString(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n\nvar _hyphenateProperty = require(\"css-in-js-utils/lib/hyphenateProperty\");\n\nvar _hyphenateProperty2 = _interopRequireDefault(_hyphenateProperty);\n\nvar _isPrefixedValue = require(\"css-in-js-utils/lib/isPrefixedValue\");\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nvar _capitalizeString = require(\"../../utils/capitalizeString\");\n\nvar _capitalizeString2 = _interopRequireDefault(_capitalizeString);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar properties = {\n transition: true,\n transitionProperty: true,\n WebkitTransition: true,\n WebkitTransitionProperty: true,\n MozTransition: true,\n MozTransitionProperty: true\n};\n\n\nvar prefixMapping = {\n Webkit: \"-webkit-\",\n Moz: \"-moz-\",\n ms: \"-ms-\"\n};\n\nfunction prefixValue(value, propertyPrefixMap) {\n if ((0, _isPrefixedValue2.default)(value)) {\n return value;\n }\n\n // only split multi values, not cubic beziers\n var multipleValues = value.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g);\n\n for (var i = 0, len = multipleValues.length; i < len; ++i) {\n var singleValue = multipleValues[i];\n var values = [singleValue];\n for (var property in propertyPrefixMap) {\n var dashCaseProperty = (0, _hyphenateProperty2.default)(property);\n\n if (singleValue.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== \"order\") {\n var prefixes = propertyPrefixMap[property];\n for (var j = 0, pLen = prefixes.length; j < pLen; ++j) {\n // join all prefixes and create a new value\n values.unshift(singleValue.replace(dashCaseProperty, prefixMapping[prefixes[j]] + dashCaseProperty));\n }\n }\n }\n\n multipleValues[i] = values.join(\",\");\n }\n\n return multipleValues.join(\",\");\n}\n\nfunction transition(property, value, style, propertyPrefixMap) {\n // also check for already prefixed transitions\n if (typeof value === \"string\" && properties.hasOwnProperty(property)) {\n var outputValue = prefixValue(value, propertyPrefixMap);\n // if the property is already prefixed\n var webkitOutput = outputValue.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g).filter(function (val) {\n return !/-moz-|-ms-/.test(val);\n }).join(\",\");\n\n if (property.indexOf(\"Webkit\") > -1) {\n return webkitOutput;\n }\n\n var mozOutput = outputValue.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g).filter(function (val) {\n return !/-webkit-|-ms-/.test(val);\n }).join(\",\");\n\n if (property.indexOf(\"Moz\") > -1) {\n return mozOutput;\n }\n\n style[\"Webkit\" + (0, _capitalizeString2.default)(property)] = webkitOutput;\n style[\"Moz\" + (0, _capitalizeString2.default)(property)] = mozOutput;\n return outputValue;\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nfunction hash(str) {\n var hash = 5381,\n i = str.length;\n\n while(i) {\n hash = (hash * 33) ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return hash >>> 0;\n}\n\nmodule.exports = hash;\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = prefixProperty;\n\nvar _capitalizeString = require(\"./capitalizeString\");\n\nvar _capitalizeString2 = _interopRequireDefault(_capitalizeString);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction prefixProperty(prefixProperties, property, style) {\n if (prefixProperties.hasOwnProperty(property)) {\n var newStyle = {};\n var requiredPrefixes = prefixProperties[property];\n var capitalizedProperty = (0, _capitalizeString2.default)(property);\n var keys = Object.keys(style);\n for (var i = 0; i < keys.length; i++) {\n var styleProperty = keys[i];\n if (styleProperty === property) {\n for (var j = 0; j < requiredPrefixes.length; j++) {\n newStyle[requiredPrefixes[j] + capitalizedProperty] = style[property];\n }\n }\n newStyle[styleProperty] = style[styleProperty];\n }\n return newStyle;\n }\n return style;\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = prefixValue;\nfunction prefixValue(plugins, property, value, style, metaData) {\n for (var i = 0, len = plugins.length; i < len; ++i) {\n var processedValue = plugins[i](property, value, style, metaData);\n\n // we can stop processing if a value is returned\n // as all plugin criteria are unique\n if (processedValue) {\n return processedValue;\n }\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = addNewValuesOnly;\nfunction addIfNew(list, value) {\n if (list.indexOf(value) === -1) {\n list.push(value);\n }\n}\n\nfunction addNewValuesOnly(list, values) {\n if (Array.isArray(values)) {\n for (var i = 0, len = values.length; i < len; ++i) {\n addIfNew(list, values[i]);\n }\n } else {\n addIfNew(list, values);\n }\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isObject;\nfunction isObject(value) {\n return value instanceof Object && !Array.isArray(value);\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createPrefixer;\n\nvar _prefixProperty = require(\"../utils/prefixProperty\");\n\nvar _prefixProperty2 = _interopRequireDefault(_prefixProperty);\n\nvar _prefixValue = require(\"../utils/prefixValue\");\n\nvar _prefixValue2 = _interopRequireDefault(_prefixValue);\n\nvar _addNewValuesOnly = require(\"../utils/addNewValuesOnly\");\n\nvar _addNewValuesOnly2 = _interopRequireDefault(_addNewValuesOnly);\n\nvar _isObject = require(\"../utils/isObject\");\n\nvar _isObject2 = _interopRequireDefault(_isObject);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createPrefixer(_ref) {\n var prefixMap = _ref.prefixMap,\n plugins = _ref.plugins;\n\n function prefixAll(style) {\n for (var property in style) {\n var value = style[property];\n\n // handle nested objects\n if ((0, _isObject2.default)(value)) {\n style[property] = prefixAll(value);\n // handle array values\n } else if (Array.isArray(value)) {\n var combinedValue = [];\n\n for (var i = 0, len = value.length; i < len; ++i) {\n var processedValue = (0, _prefixValue2.default)(plugins, property, value[i], style, prefixMap);\n (0, _addNewValuesOnly2.default)(combinedValue, processedValue || value[i]);\n }\n\n // only modify the value if it was touched\n // by any plugin to prevent unnecessary mutations\n if (combinedValue.length > 0) {\n style[property] = combinedValue;\n }\n } else {\n var _processedValue = (0, _prefixValue2.default)(plugins, property, value, style, prefixMap);\n\n // only modify the value if it was touched\n // by any plugin to prevent unnecessary mutations\n if (_processedValue) {\n style[property] = _processedValue;\n }\n\n style = (0, _prefixProperty2.default)(prefixMap, property, style);\n }\n }\n\n return style;\n }\n\n return prefixAll;\n}\nmodule.exports = exports[\"default\"];", "\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js\u2019s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n", "\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n", "import {FileFormat} from './file-format-spec'\nimport {zeroPad} from './utils'\n\nexport interface ValueFormatter {\n unit: FileFormat.ValueUnit\n format(v: number): string\n}\n\nexport class RawValueFormatter implements ValueFormatter {\n unit: FileFormat.ValueUnit = 'none'\n format(v: number) {\n return v.toLocaleString()\n }\n}\n\nexport class TimeFormatter implements ValueFormatter {\n private multiplier: number\n\n constructor(public unit: 'nanoseconds' | 'microseconds' | 'milliseconds' | 'seconds') {\n if (unit === 'nanoseconds') this.multiplier = 1e-9\n else if (unit === 'microseconds') this.multiplier = 1e-6\n else if (unit === 'milliseconds') this.multiplier = 1e-3\n else this.multiplier = 1\n }\n\n formatUnsigned(v: number) {\n const s = v * this.multiplier\n\n if (s / 60 >= 1) {\n const minutes = Math.floor(s / 60)\n const seconds = Math.floor(s - minutes * 60).toString()\n return `${minutes}:${zeroPad(seconds, 2)}`\n }\n if (s / 1 >= 1) return `${s.toFixed(2)}s`\n if (s / 1e-3 >= 1) return `${(s / 1e-3).toFixed(2)}ms`\n if (s / 1e-6 >= 1) return `${(s / 1e-6).toFixed(2)}\u00B5s`\n else return `${(s / 1e-9).toFixed(2)}ns`\n }\n\n format(v: number) {\n return `${v < 0 ? '-' : ''}${this.formatUnsigned(Math.abs(v))}`\n }\n}\n\nexport class ByteFormatter implements ValueFormatter {\n unit: FileFormat.ValueUnit = 'bytes'\n\n format(v: number) {\n if (v < 1024) return `${v.toFixed(0)} B`\n v /= 1024\n if (v < 1024) return `${v.toFixed(2)} KB`\n v /= 1024\n if (v < 1024) return `${v.toFixed(2)} MB`\n v /= 1024\n return `${v.toFixed(2)} GB`\n }\n}\n", "var Module = \nasync function(moduleArg = {}) {\n var moduleRtn;\n\nvar Module=moduleArg;var readyPromiseResolve,readyPromiseReject;var readyPromise=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});function ready(){readyPromiseResolve(Module)}function abort(what){throw what}var HEAP8,HEAP16,HEAP32,HEAPU8,HEAPU16,HEAPU32,HEAPF32,HEAPF64,HEAP64,HEAPU64,wasmMemory;for(var base64ReverseLookup=new Uint8Array(123),i=25;i>=0;--i){base64ReverseLookup[48+i]=52+i;base64ReverseLookup[65+i]=i;base64ReverseLookup[97+i]=26+i}base64ReverseLookup[43]=62;base64ReverseLookup[47]=63;function base64Decode(b64){var b1,b2,i=0,j=0,bLength=b64.length,output=new Uint8Array((bLength*3>>2)-(b64[bLength-2]==\"=\")-(b64[bLength-1]==\"=\"));for(;i>4;output[j+1]=b1<<4|b2>>2;output[j+2]=b2<<6|base64ReverseLookup[b64.charCodeAt(i+3)]}return output}function updateMemoryViews(){var b=wasmMemory.buffer;HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);HEAPU8=new Uint8Array(b);HEAPU16=new Uint16Array(b);HEAP32=new Int32Array(b);HEAPU32=new Uint32Array(b);HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b);HEAP64=new BigInt64Array(b);HEAPU64=new BigUint64Array(b)}var noExitRuntime=Module[\"noExitRuntime\"]||true;var abortOnCannotGrowMemory=requestedSize=>{abort(\"OOM\")};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;abortOnCannotGrowMemory(requestedSize)};var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var UTF8Decoder=typeof TextDecoder!=\"undefined\"?new TextDecoder:undefined;var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead=NaN)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str=\"\";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\";var wasmImports={a:_emscripten_resize_heap};Module[\"UTF8ToString\"]=UTF8ToString;Module[\"stringToUTF8OnStack\"]=stringToUTF8OnStack;function initRuntime(wasmExports){wasmExports[\"c\"]()}var _free,_demangle,__emscripten_stack_alloc;var imports={a:wasmImports};Module[\"wasm\"]=base64Decode(\"AGFzbQEAAAABbRFgA39/fwBgAX8Bf2ACf38Bf2ACf38AYAN/f38Bf2ABfwBgBH9/f38AYAJ/fgBgBX9/f39/AGAGf3x/f39/AX9gAX8BfmACfn8Bf2AEf39/fwF/YAJ/fwF+YAAAYAd/f39/f39/AX9gAnx/AXwCBwEBYQFhAAEDYF8AAwMBAAgBAAEAAQEDAQIFAwoAAQUEAgELBgwDAAIBAwADAgENBwIBAgYHAgEDAQEBAgIFDgMCBgEFDwgQAQQGAQEGBAQAAgcCAQICAgEEAQICAgEBBQEAAQQDCQEAAAQFAXABBgYFBgEBggKCAgYIAX8BQaC4BAsHGQYBYgIAAWMANQFkAQABZQAVAWYAXQFnAFkJCwEAQQELBV9eXFtaDAEYCpD3A1+KOwEMfyMAQRBrIgwkAAJAAkACQCACRQ0AIAIoAgQiA0EBSg0AIAAoApwCIgVBgQhIDQELIABBATYCmAIMAQsgAiADQQFqNgIEIAAgBUEBajYCnAIgDCACNgIIIAwgACgCrAI2AgwgACAMQQhqNgKsAiABIQQgAiEBQQAhAyMAQdAAayIHJAACQCAAKAKYAg0AAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgASgCACIFDmAARkZFREMQQUA+PTw7Ojk4NzY1NDMyMTAtKysrLCwsL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AI2AhgMAQsgAUEZIANBAXZrQQAgA0EfRxt0IQMgAigCACECA0AgAiIEKAIEQXhxIAFGDQIgA0EddiECIANBAXQhAyAEIAJBBHFqIgcoAhAiAg0ACyAHIAA2AhAgACAENgIYCyAAIAA2AgwgACAANgIIDwsgBCgCCCIBIAA2AgwgBCAANgIIIABBADYCGCAAIAQ2AgwgACABNgIICwuXAgAgAEUEQEEADwsCfwJAIAAEfyABQf8ATQ0BAkBBgDQoAgAoAgBFBEAgAUGAf3FBgL8DRg0DDAELIAFB/w9NBEAgACABQT9xQYABcjoAASAAIAFBBnZBwAFyOgAAQQIMBAsgAUGAQHFBgMADRyABQYCwA09xRQRAIAAgAUE/cUGAAXI6AAIgACABQQx2QeABcjoAACAAIAFBBnZBP3FBgAFyOgABQQMMBAsgAUGAgARrQf//P00EQCAAIAFBP3FBgAFyOgADIAAgAUESdkHwAXI6AAAgACABQQZ2QT9xQYABcjoAAiAAIAFBDHZBP3FBgAFyOgABQQQMBAsLQeQyQRk2AgBBfwVBAQsMAQsgACABOgAAQQELC7wCAAJAAkACQAJAAkACQAJAAkACQAJAAkAgAUEJaw4SAAgJCggJAQIDBAoJCgoICQUGBwsgAiACKAIAIgFBBGo2AgAgACABKAIANgIADwsgAiACKAIAIgFBBGo2AgAgACABMgEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMwEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMAAANwMADwsgAiACKAIAIgFBBGo2AgAgACABMQAANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKwMAOQMADwsgACACIAMRAwALDwsgAiACKAIAIgFBBGo2AgAgACABNAIANwMADwsgAiACKAIAIgFBBGo2AgAgACABNQIANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKQMANwMAC28BBX8gACgCACIDLAAAQTBrIgFBCUsEQEEADwsDQEF/IQQgAkHMmbPmAE0EQEF/IAEgAkEKbCIFaiABIAVB/////wdzSxshBAsgACADQQFqIgU2AgAgAywAAS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AAoAhgNAEGUFUEEIAAoAgggACgCDBEAAAsDQAJAIAFQDQAgACgCFA0AIAAoAhgNAEGMHEECIAAoAgggACgCDBEAAAsgACAAKQMoQgF8NwMoIABCARAmIAFCAXwiASACUg0ACyAAKAIUDQAgACgCGA0AQfgbQQIgACgCCCAAKAIMEQAACwslAQF/IABB4QBrQf8BcSIAQRlNBH8gAEECdEGkHGooAgAFIAELC8oBAQN/AkAgACgCDA0AIAAoAggiBCAAKAIEayIDIAJJBEAgAiADayIDIARqIgUgA0kEQCAAQQE2AgwPCyAEQQQgBBshAwJAA0AgAyAFTw0BIANBAXQiAyAETw0ACyAAQQE2AgwPCyAAKAIAIAMQJyIERQRAIAAoAgAQFSAAQoCAgIAQNwIIIABCADcCAA8LIAAgAzYCCCAAIAQ2AgAgACgCDA0BCyACBEAgACgCACAAKAIEaiABIAL8CgAACyAAIAAoAgQgAmo2AgQLCxAAIwAgAGtBcHEiACQAIAALpgEBBX8gACgCVCIDKAIAIQUgAygCBCIEIAAoAhQgACgCHCIHayIGIAQgBkkbIgYEQCAFIAcgBhAhIAMgAygCACAGaiIFNgIAIAMgAygCBCAGayIENgIECyAEIAIgAiAESxsiBARAIAUgASAEECEgAyADKAIAIARqIgU2AgAgAyADKAIEIARrNgIECyAFQQA6AAAgACAAKAIsIgE2AhwgACABNgIUIAILnAUCBn4EfyABIAEoAgBBB2pBeHEiAUEQajYCACAAIAEpAwAhAyABKQMIIQcjAEEgayIAJAAgB0L///////8/gyEFAn4gB0IwiEL//wGDIgSnIglBgfgAa0H9D00EQCAFQgSGIANCPIiEIQIgCUGA+ABrrSEEAkAgA0L//////////w+DIgNCgYCAgICAgIAIWgRAIAJCAXwhAgwBCyADQoCAgICAgICACFINACACQgGDIAJ8IQILQgAgAiACQv////////8HViIBGyECIAGtIAR8DAELIAMgBYRQIARC//8BUnJFBEAgBUIEhiADQjyIhEKAgICAgICABIQhAkL/DwwBCyAJQf6HAUsEQEL/DwwBC0GA+ABBgfgAIARQIggbI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hkAAAAZGRkAQcEuCyEOAAAAAAAAAAAZAAsNGRkZAA0AAAIACQ4AAAAJAA4AAA4AQfsuCwEMAEGHLwsVEwAAAAATAAAAAAkMAAAAAAAMAAAMAEG1LwsBEABBwS8LFQ8AAAAEDwAAAAAJEAAAAAAAEAAAEABB7y8LARIAQfsvCx4RAAAAABEAAAAACRIAAAAAABIAABIAABoAAAAaGhoAQbIwCw4aAAAAGhoaAAAAAAAACQBB4zALARQAQe8wCxUXAAAAABcAAAAACRQAAAAAABQAABQAQZ0xCwEWAEGpMQsnFQAAAAAVAAAAAAkWAAAAAAAWAAAWAAAwMTIzNDU2Nzg5QUJDREVGAEH0MQsBBQBBnDILCP//////////AEHgMgsDIBwB\");WebAssembly.instantiate(Module[\"wasm\"],imports).then(output=>{var wasmExports=output.instance.exports;_free=wasmExports[\"e\"];_demangle=wasmExports[\"f\"];__emscripten_stack_alloc=wasmExports[\"g\"];wasmMemory=wasmExports[\"b\"];updateMemoryViews();initRuntime(wasmExports);ready()});Module[\"wasm_demangle\"]=function(mangled){const param_ptr=stringToUTF8OnStack(mangled);const result_ptr=_demangle(param_ptr);const result=UTF8ToString(result_ptr);if(result_ptr!==null&&result_ptr!==undefined){_free(result_ptr)}return result};moduleRtn=readyPromise;\n\n\n return moduleRtn;\n}\n;/**\n * DO NOT USE THIS FILE DIRECTLY.\n *\n * This file is only used as --extern-post-js of emcc.\n */\nmodule.exports = Module\nmodule.exports.default = Module\n", "import createWasmDemangleModule from './demangle.wasm'\n\nconst wasmDemangleModulePromise = createWasmDemangleModule().then(module => module)\n\nconst cache = new Map()\n\nexport async function loadDemangling(): Promise<(name: string) => string> {\n // This function converts a mangled C++ name such as \"__ZNK7Support6ColorFeqERKS0_\"\n // into a human-readable symbol (in this case \"Support::ColorF::==(Support::ColorF&)\")\n const wasmDemangleModule = await wasmDemangleModulePromise\n return cached(wasmDemangleModule.wasm_demangle)\n}\n\nfunction cached(demangle: (name: string) => string): (name: string) => string {\n return (name: string): string => {\n let result = cache.get(name)\n if (result !== undefined) {\n name = result\n } else {\n result = demangle(name)\n result = result === '' ? name : result\n cache.set(name, result)\n name = result\n }\n return name\n }\n}\n", "export {loadDemangling} from './demangle'\n", "import {lastOf, KeyedSet} from './utils'\nimport {ValueFormatter, RawValueFormatter} from './value-formatters'\nimport {FileFormat} from './file-format-spec'\n\nexport interface FrameInfo {\n key: string | number\n\n // Name of the frame. May be a method name, e.g.\n // \"ActiveRecord##to_hash\"\n name: string\n\n // File path of the code corresponding to this\n // call stack frame.\n file?: string\n\n // Line in the given file where this frame occurs, 1-based.\n line?: number\n\n // Column in the file, 1-based.\n col?: number\n}\n\nexport type SymbolRemapper = (\n frame: Frame,\n) => {name?: string; file?: string; line?: number; col?: number} | null\n\nexport class HasWeights {\n private selfWeight = 0\n private totalWeight = 0\n getSelfWeight() {\n return this.selfWeight\n }\n getTotalWeight() {\n return this.totalWeight\n }\n addToTotalWeight(delta: number) {\n this.totalWeight += delta\n }\n addToSelfWeight(delta: number) {\n this.selfWeight += delta\n }\n\n overwriteWeightWith(other: HasWeights) {\n this.selfWeight = other.selfWeight\n this.totalWeight = other.totalWeight\n }\n}\n\nexport class Frame extends HasWeights {\n key: string | number\n\n // Name of the frame. May be a method name, e.g.\n // \"ActiveRecord##to_hash\"\n name: string\n\n // File path of the code corresponding to this\n // call stack frame.\n file?: string\n\n // Line in the given file where this frame occurs\n line?: number\n\n // Column in the file\n col?: number\n\n private constructor(info: FrameInfo) {\n super()\n this.key = info.key\n this.name = info.name\n this.file = info.file\n this.line = info.line\n this.col = info.col\n }\n\n static root = new Frame({\n key: '(speedscope root)',\n name: '(speedscope root)',\n })\n\n static getOrInsert(set: KeyedSet, info: FrameInfo) {\n return set.getOrInsert(new Frame(info))\n }\n}\n\nexport class CallTreeNode extends HasWeights {\n children: CallTreeNode[] = []\n\n isRoot() {\n return this.frame === Frame.root\n }\n\n // If a node is \"frozen\", it means it should no longer be mutated.\n private frozen = false\n isFrozen() {\n return this.frozen\n }\n freeze() {\n this.frozen = true\n }\n\n constructor(\n readonly frame: Frame,\n readonly parent: CallTreeNode | null,\n ) {\n super()\n }\n}\n\nexport interface ProfileGroup {\n name: string\n indexToView: number\n profiles: Profile[]\n}\n\nexport class Profile {\n protected name: string = ''\n\n protected totalWeight: number\n\n protected frames = new KeyedSet()\n\n // Profiles store two call-trees.\n //\n // The \"append order\" call tree is the one in which nodes are ordered in\n // whatever order they were appended to their parent.\n //\n // The \"grouped\" call tree is one in which each node has at most one child per\n // frame. Nodes are ordered in decreasing order of weight\n protected appendOrderCalltreeRoot = new CallTreeNode(Frame.root, null)\n protected groupedCalltreeRoot = new CallTreeNode(Frame.root, null)\n\n public getAppendOrderCalltreeRoot() {\n return this.appendOrderCalltreeRoot\n }\n public getGroupedCalltreeRoot() {\n return this.groupedCalltreeRoot\n }\n\n // List of references to CallTreeNodes at the top of the\n // stack at the time of the sample.\n protected samples: CallTreeNode[] = []\n protected weights: number[] = []\n\n protected valueFormatter: ValueFormatter = new RawValueFormatter()\n\n constructor(totalWeight: number = 0) {\n this.totalWeight = totalWeight\n }\n\n shallowClone(): Profile {\n const profile = new Profile(this.totalWeight)\n Object.assign(profile, this)\n return profile\n }\n\n formatValue(v: number) {\n return this.valueFormatter.format(v)\n }\n setValueFormatter(f: ValueFormatter) {\n this.valueFormatter = f\n }\n getWeightUnit(): FileFormat.ValueUnit {\n return this.valueFormatter.unit\n }\n\n getName() {\n return this.name\n }\n setName(name: string) {\n this.name = name\n }\n\n getTotalWeight() {\n return this.totalWeight\n }\n\n private totalNonIdleWeight: number | null = null\n getTotalNonIdleWeight() {\n if (this.totalNonIdleWeight === null) {\n this.totalNonIdleWeight = this.groupedCalltreeRoot.children.reduce(\n (n, c) => n + c.getTotalWeight(),\n 0,\n )\n }\n return this.totalNonIdleWeight\n }\n\n // This is private because it should only be called in the ProfileBuilder\n // classes. Once a Profile instance has been constructed, it should be treated\n // as immutable.\n protected sortGroupedCallTree() {\n function visit(node: CallTreeNode) {\n node.children.sort((a, b) => -(a.getTotalWeight() - b.getTotalWeight()))\n node.children.forEach(visit)\n }\n visit(this.groupedCalltreeRoot)\n }\n\n forEachCallGrouped(\n openFrame: (node: CallTreeNode, value: number) => void,\n closeFrame: (node: CallTreeNode, value: number) => void,\n ) {\n function visit(node: CallTreeNode, start: number) {\n if (node.frame !== Frame.root) {\n openFrame(node, start)\n }\n\n let childTime = 0\n\n node.children.forEach(function (child) {\n visit(child, start + childTime)\n childTime += child.getTotalWeight()\n })\n\n if (node.frame !== Frame.root) {\n closeFrame(node, start + node.getTotalWeight())\n }\n }\n visit(this.groupedCalltreeRoot, 0)\n }\n\n forEachCall(\n openFrame: (node: CallTreeNode, value: number) => void,\n closeFrame: (node: CallTreeNode, value: number) => void,\n ) {\n let prevStack: CallTreeNode[] = []\n let value = 0\n\n let sampleIndex = 0\n for (let stackTop of this.samples) {\n // Find lowest common ancestor of the current stack and the previous one\n let lca: CallTreeNode | null = null\n\n // This is O(n^2), but n should be relatively small here (stack height),\n // so hopefully this isn't much of a problem\n for (\n lca = stackTop;\n lca && lca.frame != Frame.root && prevStack.indexOf(lca) === -1;\n lca = lca.parent\n ) {}\n\n // Close frames that are no longer open\n while (prevStack.length > 0 && lastOf(prevStack) != lca) {\n const node = prevStack.pop()!\n closeFrame(node, value)\n }\n\n // Open frames that are now becoming open\n const toOpen: CallTreeNode[] = []\n for (\n let node: CallTreeNode | null = stackTop;\n node && node.frame != Frame.root && node != lca;\n node = node.parent\n ) {\n toOpen.push(node)\n }\n toOpen.reverse()\n\n for (let node of toOpen) {\n openFrame(node, value)\n }\n\n prevStack = prevStack.concat(toOpen)\n value += this.weights[sampleIndex++]\n }\n\n // Close frames that are open at the end of the trace\n for (let i = prevStack.length - 1; i >= 0; i--) {\n closeFrame(prevStack[i], value)\n }\n }\n\n forEachFrame(fn: (frame: Frame) => void) {\n this.frames.forEach(fn)\n }\n\n getProfileWithRecursionFlattened(): Profile {\n const builder = new CallTreeProfileBuilder()\n\n const stack: (CallTreeNode | null)[] = []\n const framesInStack = new Set()\n\n function openFrame(node: CallTreeNode, value: number) {\n if (framesInStack.has(node.frame)) {\n stack.push(null)\n } else {\n framesInStack.add(node.frame)\n stack.push(node)\n builder.enterFrame(node.frame, value)\n }\n }\n function closeFrame(node: CallTreeNode, value: number) {\n const stackTop = stack.pop()\n if (stackTop) {\n framesInStack.delete(stackTop.frame)\n builder.leaveFrame(stackTop.frame, value)\n }\n }\n\n this.forEachCall(openFrame, closeFrame)\n\n const flattenedProfile = builder.build()\n flattenedProfile.name = this.name\n flattenedProfile.valueFormatter = this.valueFormatter\n\n // When constructing a profile with recursion flattened,\n // counter-intuitive things can happen to \"self time\" measurements\n // for functions.\n // For example, given the following list of stacks w/ weights:\n //\n // a 1\n // a;b;a 1\n // a;b;a;b;a 1\n // a;b;a 1\n //\n // The resulting profile with recursion flattened out will look like this:\n //\n // a 1\n // a;b 3\n //\n // Which is useful to view, but it's counter-intuitive to move self-time\n // for frames around, since analyzing the self-time of functions is an important\n // thing to be able to do accurately, and we don't want this to change when recursion\n // is flattened. To work around that, we'll just copy the weights directly from the\n // un-flattened profile.\n this.forEachFrame(f => {\n flattenedProfile.frames.getOrInsert(f).overwriteWeightWith(f)\n })\n\n return flattenedProfile\n }\n\n getInvertedProfileForCallersOf(focalFrameInfo: FrameInfo): Profile {\n const focalFrame = Frame.getOrInsert(this.frames, focalFrameInfo)\n const builder = new StackListProfileBuilder()\n\n // TODO(jlfwong): Could construct this at profile\n // construction time rather than on demand.\n const nodes: CallTreeNode[] = []\n\n function visit(node: CallTreeNode) {\n if (node.frame === focalFrame) {\n nodes.push(node)\n } else {\n for (let child of node.children) {\n visit(child)\n }\n }\n }\n\n visit(this.appendOrderCalltreeRoot)\n\n for (let node of nodes) {\n const stack: FrameInfo[] = []\n for (let n: CallTreeNode | null = node; n != null && n.frame !== Frame.root; n = n.parent) {\n stack.push(n.frame)\n }\n builder.appendSampleWithWeight(stack, node.getTotalWeight())\n }\n\n const ret = builder.build()\n ret.name = this.name\n ret.valueFormatter = this.valueFormatter\n return ret\n }\n\n getProfileForCalleesOf(focalFrameInfo: FrameInfo): Profile {\n const focalFrame = Frame.getOrInsert(this.frames, focalFrameInfo)\n const builder = new StackListProfileBuilder()\n\n function recordSubtree(focalFrameNode: CallTreeNode) {\n const stack: FrameInfo[] = []\n\n function visit(node: CallTreeNode) {\n stack.push(node.frame)\n builder.appendSampleWithWeight(stack, node.getSelfWeight())\n for (let child of node.children) {\n visit(child)\n }\n stack.pop()\n }\n\n visit(focalFrameNode)\n }\n\n function findCalls(node: CallTreeNode) {\n if (node.frame === focalFrame) {\n recordSubtree(node)\n } else {\n for (let child of node.children) {\n findCalls(child)\n }\n }\n }\n\n findCalls(this.appendOrderCalltreeRoot)\n\n const ret = builder.build()\n ret.name = this.name\n ret.valueFormatter = this.valueFormatter\n return ret\n }\n\n // Demangle symbols for readability\n async demangle() {\n let demangle: ((name: string) => string) | null = null\n\n for (let frame of this.frames) {\n // This function converts a mangled C++ and Rust name into a human-readable symbol.\n if (\n frame.name.startsWith('__Z') ||\n frame.name.startsWith('_R') ||\n frame.name.startsWith('_Z')\n ) {\n if (!demangle) {\n const demangleModule = await import('./demangle')\n demangle = await demangleModule.loadDemangling()\n }\n frame.name = demangle(frame.name)\n }\n }\n }\n\n remapSymbols(callback: SymbolRemapper) {\n for (let frame of this.frames) {\n const remapped = callback(frame)\n if (remapped == null) {\n continue\n }\n const {name, file, line, col} = remapped\n if (name != null) {\n frame.name = name\n }\n if (file != null) {\n frame.file = file\n }\n if (line != null) {\n frame.line = line\n }\n if (col != null) {\n frame.col = col\n }\n }\n }\n}\n\nexport class StackListProfileBuilder extends Profile {\n _appendSample(stack: Frame[], weight: number, useAppendOrder: boolean) {\n if (isNaN(weight)) throw new Error('invalid weight')\n let node = useAppendOrder ? this.appendOrderCalltreeRoot : this.groupedCalltreeRoot\n\n let framesInStack = new Set()\n\n for (let frame of stack) {\n const last = useAppendOrder\n ? lastOf(node.children)\n : node.children.find(c => c.frame === frame)\n if (last && !last.isFrozen() && last.frame == frame) {\n node = last\n } else {\n const parent = node\n node = new CallTreeNode(frame, node)\n parent.children.push(node)\n }\n node.addToTotalWeight(weight)\n\n // It's possible for the same frame to occur multiple\n // times in the same call stack due to either direct\n // or indirect recursion. We want to avoid counting that\n // frame multiple times for a single sample, we so just\n // track all of the unique frames that participated in\n // this call stack, then add to their weight at the end.\n framesInStack.add(node.frame)\n }\n node.addToSelfWeight(weight)\n\n if (useAppendOrder) {\n for (let child of node.children) {\n child.freeze()\n }\n }\n\n if (useAppendOrder) {\n node.frame.addToSelfWeight(weight)\n\n for (let frame of framesInStack) {\n frame.addToTotalWeight(weight)\n }\n\n if (node === lastOf(this.samples)) {\n this.weights[this.weights.length - 1] += weight\n } else {\n this.samples.push(node)\n this.weights.push(weight)\n }\n }\n }\n\n appendSampleWithWeight(stack: FrameInfo[], weight: number) {\n if (weight === 0) {\n // Samples with zero weight have no effect, so let's ignore them\n return\n }\n if (weight < 0) {\n throw new Error('Samples must have positive weights')\n }\n\n const frames = stack.map(fr => Frame.getOrInsert(this.frames, fr))\n this._appendSample(frames, weight, true)\n this._appendSample(frames, weight, false)\n }\n\n private pendingSample: {\n stack: FrameInfo[]\n startTimestamp: number\n centralTimestamp: number\n } | null = null\n appendSampleWithTimestamp(stack: FrameInfo[], timestamp: number) {\n if (this.pendingSample) {\n if (timestamp < this.pendingSample.centralTimestamp) {\n throw new Error('Timestamps received out of order')\n }\n const endTimestamp = (timestamp + this.pendingSample.centralTimestamp) / 2\n this.appendSampleWithWeight(\n this.pendingSample.stack,\n endTimestamp - this.pendingSample.startTimestamp,\n )\n this.pendingSample = {stack, startTimestamp: endTimestamp, centralTimestamp: timestamp}\n } else {\n this.pendingSample = {stack, startTimestamp: timestamp, centralTimestamp: timestamp}\n }\n }\n\n build(): Profile {\n if (this.pendingSample) {\n if (this.samples.length > 0) {\n this.appendSampleWithWeight(\n this.pendingSample.stack,\n this.pendingSample.centralTimestamp - this.pendingSample.startTimestamp,\n )\n } else {\n // There is only a single sample. In this case, units will be meaningless,\n // so we'll append with a weight of 1 and also clear any value formatter\n this.appendSampleWithWeight(this.pendingSample.stack, 1)\n this.setValueFormatter(new RawValueFormatter())\n }\n }\n this.totalWeight = Math.max(\n this.totalWeight,\n this.weights.reduce((a, b) => a + b, 0),\n )\n this.sortGroupedCallTree()\n return this\n }\n}\n\n// As an alternative API for importing profiles more efficiently, provide a\n// way to open & close frames directly without needing to construct tons of\n// arrays as intermediaries.\nexport class CallTreeProfileBuilder extends Profile {\n private appendOrderStack: CallTreeNode[] = [this.appendOrderCalltreeRoot]\n private groupedOrderStack: CallTreeNode[] = [this.groupedCalltreeRoot]\n private framesInStack = new Map()\n private stack: Frame[] = []\n\n private lastValue: number = 0\n private addWeightsToFrames(value: number) {\n const delta = value - this.lastValue\n for (let frame of this.framesInStack.keys()) {\n frame.addToTotalWeight(delta)\n }\n const stackTop = lastOf(this.stack)\n if (stackTop) {\n stackTop.addToSelfWeight(delta)\n }\n }\n private addWeightsToNodes(value: number, stack: CallTreeNode[]) {\n const delta = value - this.lastValue\n for (let node of stack) {\n node.addToTotalWeight(delta)\n }\n const stackTop = lastOf(stack)\n if (stackTop) {\n stackTop.addToSelfWeight(delta)\n }\n }\n\n private _enterFrame(frame: Frame, value: number, useAppendOrder: boolean) {\n let stack = useAppendOrder ? this.appendOrderStack : this.groupedOrderStack\n this.addWeightsToNodes(value, stack)\n\n let prevTop = lastOf(stack)\n\n if (prevTop) {\n if (useAppendOrder) {\n const delta = value - this.lastValue\n if (delta > 0) {\n this.samples.push(prevTop)\n this.weights.push(value - this.lastValue)\n } else if (delta < 0) {\n throw new Error(\n `Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${value}`,\n )\n }\n }\n\n const last = useAppendOrder\n ? lastOf(prevTop.children)\n : prevTop.children.find(c => c.frame === frame)\n let node: CallTreeNode\n if (last && !last.isFrozen() && last.frame == frame) {\n node = last\n } else {\n node = new CallTreeNode(frame, prevTop)\n prevTop.children.push(node)\n }\n stack.push(node)\n }\n }\n enterFrame(frameInfo: FrameInfo, value: number) {\n const frame = Frame.getOrInsert(this.frames, frameInfo)\n this.addWeightsToFrames(value)\n this._enterFrame(frame, value, true)\n this._enterFrame(frame, value, false)\n\n this.stack.push(frame)\n const frameCount = this.framesInStack.get(frame) || 0\n this.framesInStack.set(frame, frameCount + 1)\n this.lastValue = value\n this.totalWeight = Math.max(this.totalWeight, this.lastValue)\n }\n\n private _leaveFrame(frame: Frame, value: number, useAppendOrder: boolean) {\n let stack = useAppendOrder ? this.appendOrderStack : this.groupedOrderStack\n this.addWeightsToNodes(value, stack)\n\n if (useAppendOrder) {\n const leavingStackTop = this.appendOrderStack.pop()\n if (leavingStackTop == null) {\n throw new Error(`Trying to leave ${frame.key} when stack is empty`)\n }\n if (this.lastValue == null) {\n throw new Error(`Trying to leave a ${frame.key} before any have been entered`)\n }\n leavingStackTop.freeze()\n\n if (leavingStackTop.frame.key !== frame.key) {\n throw new Error(\n `Tried to leave frame \"${frame.name}\" while frame \"${leavingStackTop.frame.name}\" was at the top at ${value}`,\n )\n }\n\n const delta = value - this.lastValue\n if (delta > 0) {\n this.samples.push(leavingStackTop)\n this.weights.push(value - this.lastValue)\n } else if (delta < 0) {\n throw new Error(\n `Samples must be provided in increasing order of cumulative value. Last sample was ${this\n .lastValue!}, this sample was ${value}`,\n )\n }\n } else {\n this.groupedOrderStack.pop()\n }\n }\n\n leaveFrame(frameInfo: FrameInfo, value: number) {\n const frame = Frame.getOrInsert(this.frames, frameInfo)\n this.addWeightsToFrames(value)\n\n this._leaveFrame(frame, value, true)\n this._leaveFrame(frame, value, false)\n\n this.stack.pop()\n const frameCount = this.framesInStack.get(frame)\n if (frameCount == null) return\n if (frameCount === 1) {\n this.framesInStack.delete(frame)\n } else {\n this.framesInStack.set(frame, frameCount - 1)\n }\n this.lastValue = value\n\n this.totalWeight = Math.max(this.totalWeight, this.lastValue)\n }\n\n build(): Profile {\n // Each stack is expected to contain a single node which we initialize to be\n // the root node.\n if (this.appendOrderStack.length > 1 || this.groupedOrderStack.length > 1) {\n throw new Error('Tried to complete profile construction with a non-empty stack')\n }\n this.sortGroupedCallTree()\n return this\n }\n}\n", "// This file contains types which specify the speedscope file format.\n\nexport namespace FileFormat {\n export type Profile = EventedProfile | SampledProfile\n\n export interface File {\n $schema: 'https://www.speedscope.app/file-format-schema.json'\n\n // Data shared between profiles\n shared: {\n frames: Frame[]\n }\n\n // List of profile definitions\n profiles: Profile[]\n\n // The name of the contained profile group. If omitted, will use the name of\n // the file itself.\n // Added in 0.6.0\n name?: string\n\n // The index into the `profiles` array that should be displayed upon file\n // load. If omitted, will default to displaying the first profile in the\n // file.\n //\n // Added in 0.6.0\n activeProfileIndex?: number\n\n // The name of the the program which exported this profile. This isn't\n // consumed but can be helpful for debugging generated data by seeing what\n // was generating it! Recommended format is \"name@version\". e.g. when the\n // file was exported by speedscope v0.6.0 itself, it will be\n // \"speedscope@0.6.0\"\n //\n // Added in 0.6.0\n exporter?: string\n }\n\n export interface Frame {\n name: string\n file?: string\n line?: number\n col?: number\n }\n\n export enum ProfileType {\n EVENTED = 'evented',\n SAMPLED = 'sampled',\n }\n\n export interface IProfile {\n // Type of profile. This will future proof the file format to allow many\n // different kinds of profiles to be contained and each type to be part of\n // a discriminated union.\n type: ProfileType\n }\n\n export interface EventedProfile extends IProfile {\n type: ProfileType.EVENTED\n\n // Name of the profile. Typically a filename for the source of the profile.\n name: string\n\n // Unit which all value are specified using in the profile.\n unit: ValueUnit\n\n // The starting value of the profile. This will typically be a timestamp.\n // All event values will be displayed relative to this startValue.\n startValue: number\n\n // The final value of the profile. This will typically be a timestamp. This\n // must be greater than or equal to the startValue. This is useful in\n // situations where the recorded profile extends past the end of the recorded\n // events, which may happen if nothing was happening at the end of the\n // profile.\n endValue: number\n\n // List of events that occured as part of this profile.\n // The \"at\" field of every event must be in non-decreasing order.\n events: (OpenFrameEvent | CloseFrameEvent)[]\n }\n\n // List of indices into the frame array\n type SampledStack = number[]\n\n export interface SampledProfile extends IProfile {\n type: ProfileType.SAMPLED\n\n // Name of the profile. Typically a filename for the source of the profile.\n name: string\n\n // Unit which all value are specified using in the profile.\n unit: ValueUnit\n\n // The starting value of the profile. This will typically be a timestamp.\n // All event values will be displayed relative to this startValue.\n startValue: number\n\n // The final value of the profile. This will typically be a timestamp. This\n // must be greater than or equal to the startValue. This is useful in\n // situations where the recorded profile extends past the end of the recorded\n // events, which may happen if nothing was happening at the end of the\n // profile.\n endValue: number\n\n // List of stacks\n samples: SampledStack[]\n\n // The weight of the sample at the given index. Should have\n // the same length as the samples array.\n weights: number[]\n }\n\n export type ValueUnit =\n | 'none'\n | 'nanoseconds'\n | 'microseconds'\n | 'milliseconds'\n | 'seconds'\n | 'bytes'\n\n export enum EventType {\n OPEN_FRAME = 'O',\n CLOSE_FRAME = 'C',\n }\n\n interface IEvent {\n type: EventType\n at: number\n }\n\n // Indicates a stack frame opened. Every opened stack frame must have a\n // corresponding close frame event, and the ordering must be balanced.\n interface OpenFrameEvent extends IEvent {\n type: EventType.OPEN_FRAME\n // An index into the frames array in the shared data within the profile\n frame: number\n }\n\n interface CloseFrameEvent extends IEvent {\n type: EventType.CLOSE_FRAME\n // An index into the frames array in the shared data within the profile\n frame: number\n }\n}\n", "{\n \"name\": \"speedscope\",\n \"version\": \"1.25.0\",\n \"description\": \"\",\n \"repository\": \"jlfwong/speedscope\",\n \"main\": \"index.js\",\n \"bin\": {\n \"speedscope\": \"./bin/cli.mjs\"\n },\n \"scripts\": {\n \"deploy\": \"./scripts/deploy.sh\",\n \"prepack\": \"./scripts/prepack.sh --outdir \\\"$(pwd)/dist/release\\\" --protocol file\",\n \"prettier\": \"prettier --write 'src/**/*.ts' 'src/**/*.tsx'\",\n \"lint\": \"eslint 'src/**/*.ts' 'src/**/*.tsx'\",\n \"jest\": \"./scripts/test-setup.sh && jest --runInBand\",\n \"coverage\": \"npm run jest -- --coverage\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"./scripts/ci.sh\",\n \"serve\": \"tsx scripts/dev-server.ts\"\n },\n \"files\": [\n \"bin/cli.mjs\",\n \"dist/release/**\",\n \"!*.map\"\n ],\n \"browserslist\": [\n \"last 2 Chrome versions\",\n \"last 2 Firefox versions\"\n ],\n \"author\": \"\",\n \"license\": \"MIT\",\n \"devDependencies\": {\n \"@types/jest\": \"22.2.3\",\n \"@types/jszip\": \"3.1.4\",\n \"@types/node\": \"14.0.1\",\n \"@types/pako\": \"1.0.0\",\n \"@typescript-eslint/eslint-plugin\": \"6.16.0\",\n \"@typescript-eslint/parser\": \"6.16.0\",\n \"acorn\": \"7.2.0\",\n \"aphrodite\": \"2.1.0\",\n \"esbuild\": \"0.27.0\",\n \"esbuild-jest\": \"0.5.0\",\n \"eslint\": \"8.0.0\",\n \"eslint-plugin-prettier\": \"5.1.2\",\n \"eslint-plugin-react-hooks\": \"4.6.0\",\n \"jest\": \"30.2.0\",\n \"jest-environment-jsdom\": \"29.7.0\",\n \"jfrview\": \"0.2.0\",\n \"jsverify\": \"0.8.3\",\n \"jszip\": \"3.1.5\",\n \"pako\": \"1.0.6\",\n \"preact\": \"10.4.1\",\n \"prettier\": \"3.1.1\",\n \"protobufjs\": \"6.8.8\",\n \"source-map\": \"0.6.1\",\n \"ts-jest\": \"29.4.6\",\n \"tsx\": \"4.19.2\",\n \"typescript\": \"5.9.3\",\n \"typescript-json-schema\": \"0.67.0\",\n \"uglify-es\": \"3.2.2\",\n \"uint8array-json-parser\": \"0.0.2\"\n },\n \"jest\": {\n \"testEnvironment\": \"jsdom\",\n \"transform\": {\n \"^.+\\\\.tsx?$\": \"ts-jest\",\n \"^.+\\\\.js$\": \"esbuild-jest\"\n },\n \"transformIgnorePatterns\": [],\n \"setupFilesAfterEnv\": [\n \"./src/jest-setup.js\"\n ],\n \"moduleNameMapper\": {\n \"\\\\jfrview_bg.wasm$\": \"/src/import/java-flight-record.mock.ts\"\n },\n \"testRegex\": \"\\\\.test\\\\.tsx?$\",\n \"collectCoverageFrom\": [\n \"**/*.{ts,tsx}\",\n \"!**/*.d.{ts,tsx}\"\n ],\n \"moduleFileExtensions\": [\n \"ts\",\n \"tsx\",\n \"js\",\n \"jsx\",\n \"json\"\n ]\n },\n \"dependencies\": {\n \"open\": \"10.1.0\"\n }\n}\n", "import {\n Profile,\n CallTreeNode,\n Frame,\n CallTreeProfileBuilder,\n FrameInfo,\n StackListProfileBuilder,\n ProfileGroup,\n} from './profile'\nimport {TimeFormatter, ByteFormatter, RawValueFormatter} from './value-formatters'\nimport {FileFormat} from './file-format-spec'\n\nexport function exportProfileGroup(profileGroup: ProfileGroup): FileFormat.File {\n const frames: FileFormat.Frame[] = []\n\n const indexForFrame = new Map()\n function getIndexForFrame(frame: Frame): number {\n let index = indexForFrame.get(frame)\n if (index == null) {\n const serializedFrame: FileFormat.Frame = {\n name: frame.name,\n }\n if (frame.file != null) serializedFrame.file = frame.file\n if (frame.line != null) serializedFrame.line = frame.line\n if (frame.col != null) serializedFrame.col = frame.col\n index = frames.length\n indexForFrame.set(frame, index)\n frames.push(serializedFrame)\n }\n return index\n }\n\n const file: FileFormat.File = {\n exporter: `speedscope@${require('../../package.json').version}`,\n name: profileGroup.name,\n activeProfileIndex: profileGroup.indexToView,\n $schema: 'https://www.speedscope.app/file-format-schema.json',\n shared: {frames},\n profiles: [],\n }\n\n for (let profile of profileGroup.profiles) {\n file.profiles.push(exportProfile(profile, getIndexForFrame))\n }\n\n return file\n}\n\nfunction exportProfile(profile: Profile, getIndexForFrame: (frame: Frame) => number) {\n const eventedProfile: FileFormat.EventedProfile = {\n type: FileFormat.ProfileType.EVENTED,\n name: profile.getName(),\n unit: profile.getWeightUnit(),\n startValue: 0,\n endValue: profile.getTotalWeight(),\n events: [],\n }\n const openFrame = (node: CallTreeNode, value: number) => {\n eventedProfile.events.push({\n type: FileFormat.EventType.OPEN_FRAME,\n frame: getIndexForFrame(node.frame),\n at: value,\n })\n }\n const closeFrame = (node: CallTreeNode, value: number) => {\n eventedProfile.events.push({\n type: FileFormat.EventType.CLOSE_FRAME,\n frame: getIndexForFrame(node.frame),\n at: value,\n })\n }\n profile.forEachCall(openFrame, closeFrame)\n return eventedProfile\n}\n\nfunction importSpeedscopeProfile(\n serialized: FileFormat.Profile,\n frames: FileFormat.Frame[],\n): Profile {\n function setCommonProperties(p: Profile) {\n const {name, unit} = serialized\n\n switch (unit) {\n case 'nanoseconds':\n case 'microseconds':\n case 'milliseconds':\n case 'seconds':\n p.setValueFormatter(new TimeFormatter(unit))\n break\n\n case 'bytes':\n p.setValueFormatter(new ByteFormatter())\n break\n\n case 'none':\n p.setValueFormatter(new RawValueFormatter())\n break\n }\n p.setName(name)\n }\n\n function importEventedProfile(evented: FileFormat.EventedProfile) {\n const {startValue, endValue, events} = evented\n\n const profile = new CallTreeProfileBuilder(endValue - startValue)\n setCommonProperties(profile)\n\n const frameInfos: FrameInfo[] = frames.map((frame, i) => ({key: i, ...frame}))\n\n for (let ev of events) {\n switch (ev.type) {\n case FileFormat.EventType.OPEN_FRAME: {\n profile.enterFrame(frameInfos[ev.frame], ev.at - startValue)\n break\n }\n case FileFormat.EventType.CLOSE_FRAME: {\n profile.leaveFrame(frameInfos[ev.frame], ev.at - startValue)\n break\n }\n }\n }\n return profile.build()\n }\n\n function importSampledProfile(sampled: FileFormat.SampledProfile) {\n const {startValue, endValue, samples, weights} = sampled\n const profile = new StackListProfileBuilder(endValue - startValue)\n setCommonProperties(profile)\n\n const frameInfos: FrameInfo[] = frames.map((frame, i) => ({key: i, ...frame}))\n\n if (samples.length !== weights.length) {\n throw new Error(\n `Expected samples.length (${samples.length}) to equal weights.length (${weights.length})`,\n )\n }\n\n for (let i = 0; i < samples.length; i++) {\n const stack = samples[i]\n const weight = weights[i]\n profile.appendSampleWithWeight(\n stack.map(n => frameInfos[n]),\n weight,\n )\n }\n\n return profile.build()\n }\n\n switch (serialized.type) {\n case FileFormat.ProfileType.EVENTED:\n return importEventedProfile(serialized)\n case FileFormat.ProfileType.SAMPLED:\n return importSampledProfile(serialized)\n }\n}\n\nexport function importSpeedscopeProfiles(serialized: FileFormat.File): ProfileGroup {\n return {\n name: serialized.name || serialized.profiles[0].name || 'profile',\n indexToView: serialized.activeProfileIndex || 0,\n profiles: serialized.profiles.map(p => importSpeedscopeProfile(p, serialized.shared.frames)),\n }\n}\n\nexport function saveToFile(profileGroup: ProfileGroup): void {\n const file = exportProfileGroup(profileGroup)\n const blob = new Blob([JSON.stringify(file)], {type: 'text/json'})\n\n const nameWithoutExt = file.name ? file.name.split('.')[0]! : 'profile'\n const filename = `${nameWithoutExt.replace(/\\W+/g, '_')}.speedscope.json`\n\n console.log('Saving', filename)\n\n const a = document.createElement('a')\n a.download = filename\n a.href = window.URL.createObjectURL(blob)\n a.dataset.downloadurl = ['text/json', a.download, a.href].join(':')\n\n // For this to work in Firefox, the must be in the DOM\n document.body.appendChild(a)\n a.click()\n document.body.removeChild(a)\n}\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n sourceURL = sourceURL || '';\n\n if (sourceRoot) {\n // This follows what Chrome does.\n if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n sourceRoot += '/';\n }\n // The spec says:\n // Line 4: An optional source root, useful for relocating source\n // files on a server or removing repeated values in the\n // \u201Csources\u201D entry. This value is prepended to the individual\n // entries in the \u201Csource\u201D field.\n sourceURL = sourceRoot + sourceURL;\n }\n\n // Historically, SourceMapConsumer did not take the sourceMapURL as\n // a parameter. This mode is still somewhat supported, which is why\n // this code block is conditional. However, it's preferable to pass\n // the source map URL to SourceMapConsumer, so that this function\n // can implement the source URL resolution algorithm as outlined in\n // the spec. This block is basically the equivalent of:\n // new URL(sourceURL, sourceMapURL).toString()\n // ... except it avoids using URL, which wasn't available in the\n // older releases of node still supported by this library.\n //\n // The spec says:\n // If the sources are not absolute URLs after prepending of the\n // \u201CsourceRoot\u201D, the sources are resolved relative to the\n // SourceMap (like resolving script src in a html document).\n if (sourceMapURL) {\n var parsed = urlParse(sourceMapURL);\n if (!parsed) {\n throw new Error(\"sourceMapURL could not be parsed\");\n }\n if (parsed.path) {\n // Strip the last path component, but keep the \"/\".\n var index = parsed.path.lastIndexOf('/');\n if (index >= 0) {\n parsed.path = parsed.path.substring(0, index + 1);\n }\n }\n sourceURL = join(urlGenerate(parsed), sourceURL);\n }\n\n return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n needle.source = this._findSourceIndex(needle.source);\n if (needle.source < 0) {\n return [];\n }\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n if (sourceRoot) {\n sourceRoot = util.normalize(sourceRoot);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this._absoluteSources = this._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n });\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this._sourceMapURL = aSourceMapURL;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n if (this._sources.has(relativeSource)) {\n return this._sources.indexOf(relativeSource);\n }\n\n // Maybe aSource is an absolute URL as returned by |sources|. In\n // this case we can't simply undo the transform.\n var i;\n for (i = 0; i < this._absoluteSources.length; ++i) {\n if (this._absoluteSources[i] == aSource) {\n return i;\n }\n }\n\n return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n smc._sourceMapURL = aSourceMapURL;\n smc._absoluteSources = smc._sources.toArray().map(function (s) {\n return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n });\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._absoluteSources.slice();\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n var index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + relativeSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based. \n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = null;\n if (mapping.name) {\n name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex] || '';\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n", "/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n", "import {CPUProfile, CPUProfileNode} from './chrome'\n\n/**\n * This importer handles an old format used by the C++ API of V8. This format is still used by v8-profiler-node8.\n * There are two differences between the two formats:\n * - Nodes are a tree in the old format and a flat array in the new format\n * - Weights are timestamps in the old format and deltas in the new format.\n *\n * For more information, see https://github.com/hyj1991/v8-profiler-node8\n */\n\ninterface OldCPUProfileNode {\n functionName: string\n lineNumber: number\n scriptId: string\n url: string\n hitCount: number\n bailoutReason: string\n id: number\n children: OldCPUProfileNode[]\n}\n\nexport interface OldCPUProfile {\n startTime: number\n endTime: number\n head: OldCPUProfileNode\n samples: number[]\n timestamps: number[]\n}\n\nfunction treeToArray(root: OldCPUProfileNode): CPUProfileNode[] {\n const nodes: CPUProfileNode[] = []\n function visit(node: OldCPUProfileNode) {\n nodes.push({\n id: node.id,\n callFrame: {\n columnNumber: 0,\n functionName: node.functionName,\n lineNumber: node.lineNumber,\n scriptId: node.scriptId,\n url: node.url,\n },\n hitCount: node.hitCount,\n children: node.children.map(child => child.id),\n })\n node.children.forEach(visit)\n }\n visit(root)\n return nodes\n}\n\nfunction timestampsToDeltas(timestamps: number[], startTime: number): number[] {\n return timestamps.map((timestamp, index) => {\n const lastTimestamp = index === 0 ? startTime * 1000000 : timestamps[index - 1]\n return timestamp - lastTimestamp\n })\n}\n\n/**\n * Convert the old tree-based format to the new flat-array based format\n */\nexport function chromeTreeToNodes(content: OldCPUProfile): CPUProfile {\n // Note that both startTime and endTime are now in microseconds\n return {\n samples: content.samples,\n startTime: content.startTime * 1000000,\n endTime: content.endTime * 1000000,\n nodes: treeToArray(content.head),\n timeDeltas: timestampsToDeltas(content.timestamps, content.startTime),\n }\n}\n", "import {Profile, FrameInfo, CallTreeProfileBuilder, ProfileGroup} from '../lib/profile'\nimport {getOrInsert, lastOf, sortBy, itForEach} from '../lib/utils'\nimport {TimeFormatter} from '../lib/value-formatters'\nimport {chromeTreeToNodes, OldCPUProfile} from './v8cpuFormatter'\n\n// See: https://github.com/v8/v8/blob/master/src/inspector/js_protocol.json\n\ninterface TimelineEvent {\n pid: number\n tid: number\n ts: number\n ph: string\n cat: string\n name: string\n dur: number\n tdur: number\n tts: number\n args: {[key: string]: any}\n id?: string\n}\n\ninterface PositionTickInfo {\n line: number\n ticks: number\n}\n\ninterface CPUProfileCallFrame {\n columnNumber: number\n functionName: string\n lineNumber: number\n scriptId: string\n url: string\n}\n\nexport interface CPUProfileNode {\n callFrame: CPUProfileCallFrame\n hitCount: number\n id: number\n children?: number[]\n positionTicks?: PositionTickInfo[]\n parent?: CPUProfileNode\n}\n\nexport interface CPUProfile {\n startTime: number\n endTime: number\n nodes: CPUProfileNode[]\n samples: number[]\n timeDeltas: number[]\n}\n\nexport function isChromeTimeline(rawProfile: any): rawProfile is TimelineEvent[] {\n if (!Array.isArray(rawProfile)) return false\n if (rawProfile.length < 1) return false\n const first = rawProfile[0]\n if (!('pid' in first && 'tid' in first && 'ph' in first && 'cat' in first)) return false\n if (\n !rawProfile.find(\n e => e.name === 'CpuProfile' || e.name === 'Profile' || e.name === 'ProfileChunk',\n )\n )\n return false\n return true\n}\n\nexport function isChromeTimelineObject(\n rawProfile: any,\n): rawProfile is {traceEvents: TimelineEvent[]} {\n // Starting with Chrome 114, the timeline format output by devtools is an object\n if (!('traceEvents' in rawProfile)) return false\n return isChromeTimeline(rawProfile.traceEvents)\n}\n\nexport function importFromChromeTimeline(events: TimelineEvent[], fileName: string): ProfileGroup {\n // It seems like sometimes Chrome timeline files contain multiple CpuProfiles?\n // For now, choose the first one in the list.\n\n const cpuProfileByID = new Map()\n\n // Maps profile IDs (like \"0x3\") to pid/tid pairs formatted as `${pid}:${tid}`\n const pidTidById = new Map()\n\n // Maps pid/tid pairs to thread names\n const threadNameByPidTid = new Map()\n\n // The events aren't necessarily recorded in chronological order. Sort them so\n // that they are.\n sortBy(events, e => e.ts)\n\n for (let event of events) {\n if (event.name === 'CpuProfile') {\n const pidTid = `${event.pid}:${event.tid}`\n const id = event.id || pidTid\n\n if (event.args.data == null) {\n // Some Chrome profiles contain events where data is not defined\n continue\n }\n\n cpuProfileByID.set(id, event.args.data.cpuProfile as CPUProfile)\n pidTidById.set(id, pidTid)\n }\n\n if (event.name === 'Profile') {\n const pidTid = `${event.pid}:${event.tid}`\n cpuProfileByID.set(event.id || pidTid, {\n startTime: 0,\n endTime: 0,\n nodes: [],\n samples: [],\n timeDeltas: [],\n ...event.args.data,\n })\n\n if (event.id) {\n pidTidById.set(event.id, `${event.pid}:${event.tid}`)\n }\n }\n\n if (event.name === 'thread_name') {\n threadNameByPidTid.set(`${event.pid}:${event.tid}`, event.args.name)\n }\n\n if (event.name === 'ProfileChunk') {\n const pidTid = `${event.pid}:${event.tid}`\n const cpuProfile = cpuProfileByID.get(event.id || pidTid)\n if (cpuProfile) {\n const chunk = event.args.data\n if (chunk == null) {\n // Some Chrome profiles contain events where data is not defined\n continue\n }\n\n if (chunk.cpuProfile) {\n if (chunk.cpuProfile.nodes) {\n cpuProfile.nodes = cpuProfile.nodes.concat(chunk.cpuProfile.nodes)\n }\n if (chunk.cpuProfile.samples) {\n cpuProfile.samples = cpuProfile.samples.concat(chunk.cpuProfile.samples)\n }\n }\n if (chunk.timeDeltas) {\n cpuProfile.timeDeltas = cpuProfile.timeDeltas.concat(chunk.timeDeltas)\n }\n if (chunk.startTime != null) {\n cpuProfile.startTime = chunk.startTime\n }\n if (chunk.endTime != null) {\n cpuProfile.endTime = chunk.endTime\n }\n } else {\n console.warn(`Ignoring ProfileChunk for undeclared Profile with id ${event.id || pidTid}`)\n }\n }\n }\n\n if (cpuProfileByID.size > 0) {\n const profiles: Profile[] = []\n let indexToView = 0\n\n itForEach(cpuProfileByID.keys(), profileId => {\n let threadName: string | null = null\n let pidTid = pidTidById.get(profileId)\n if (pidTid) {\n threadName = threadNameByPidTid.get(pidTid) || null\n if (threadName) {\n }\n }\n const profile = importFromChromeCPUProfile(cpuProfileByID.get(profileId)!)\n if (threadName && cpuProfileByID.size > 1) {\n profile.setName(`${fileName} - ${threadName}`)\n if (threadName === 'CrRendererMain') {\n indexToView = profiles.length\n }\n } else {\n profile.setName(`${fileName}`)\n }\n profiles.push(profile)\n })\n\n return {name: fileName, indexToView, profiles}\n } else {\n throw new Error('Could not find CPU profile in Timeline')\n }\n}\n\nconst callFrameToFrameInfo = new Map()\nfunction frameInfoForCallFrame(callFrame: CPUProfileCallFrame) {\n return getOrInsert(callFrameToFrameInfo, callFrame, callFrame => {\n const file = callFrame.url\n\n // In Chrome profiles, line numbers & column numbers are both 0-indexed.\n //\n // We're going to normalize these to be 1-based to avoid needing to normalize\n // these at the presentation layer.\n let line = callFrame.lineNumber\n if (line != null) line++\n\n let col = callFrame.columnNumber\n if (col != null) col++\n\n const name =\n callFrame.functionName ||\n (file ? `(anonymous ${file.split('/').pop()}:${line})` : '(anonymous)')\n\n return {\n key: `${name}:${file}:${line}:${col}`,\n name,\n file,\n line,\n col,\n }\n })\n}\n\nfunction shouldIgnoreFunction(callFrame: CPUProfileCallFrame) {\n const {functionName, url} = callFrame\n if (url === 'native dummy.js') {\n // I'm not really sure what this is about, but this seems to be used\n // as a way of avoiding edge cases in V8's implementation.\n // See: https://github.com/v8/v8/blob/b8626ca4/tools/js2c.py#L419-L424\n return true\n }\n return functionName === '(root)' || functionName === '(idle)'\n}\n\nfunction shouldPlaceOnTopOfPreviousStack(functionName: string) {\n return functionName === '(garbage collector)' || functionName === '(program)'\n}\n\nexport function importFromChromeCPUProfile(chromeProfile: CPUProfile): Profile {\n const profile = new CallTreeProfileBuilder(chromeProfile.endTime - chromeProfile.startTime)\n\n const nodeById = new Map()\n for (let node of chromeProfile.nodes) {\n nodeById.set(node.id, node)\n }\n for (let node of chromeProfile.nodes) {\n if (typeof node.parent === 'number') {\n node.parent = nodeById.get(node.parent)\n }\n\n if (!node.children) continue\n for (let childId of node.children) {\n const child = nodeById.get(childId)\n if (!child) continue\n child.parent = node\n }\n }\n\n const samples: number[] = []\n const sampleTimes: number[] = []\n\n // The first delta is relative to the profile startTime.\n // Ref: https://github.com/v8/v8/blob/44bd8fd7/src/inspector/js_protocol.json#L1485\n let elapsed = chromeProfile.timeDeltas[0]\n\n // Prevents negative time deltas from causing bad data. See\n // https://github.com/jlfwong/speedscope/pull/305 for details.\n let lastValidElapsed = elapsed\n\n let lastNodeId = NaN\n\n // The chrome CPU profile format doesn't collapse identical samples. We'll do that\n // here to save a ton of work later doing mergers.\n for (let i = 0; i < chromeProfile.samples.length; i++) {\n const nodeId = chromeProfile.samples[i]\n if (nodeId != lastNodeId) {\n samples.push(nodeId)\n if (elapsed < lastValidElapsed) {\n sampleTimes.push(lastValidElapsed)\n } else {\n sampleTimes.push(elapsed)\n lastValidElapsed = elapsed\n }\n }\n\n if (i === chromeProfile.samples.length - 1) {\n if (!isNaN(lastNodeId)) {\n samples.push(lastNodeId)\n if (elapsed < lastValidElapsed) {\n sampleTimes.push(lastValidElapsed)\n } else {\n sampleTimes.push(elapsed)\n lastValidElapsed = elapsed\n }\n }\n } else {\n const timeDelta = chromeProfile.timeDeltas[i + 1]\n elapsed += timeDelta\n lastNodeId = nodeId\n }\n }\n\n let prevStack: CPUProfileNode[] = []\n\n for (let i = 0; i < samples.length; i++) {\n const value = sampleTimes[i]\n const nodeId = samples[i]\n let stackTop = nodeById.get(nodeId)\n if (!stackTop) continue\n\n // Find lowest common ancestor of the current stack and the previous one\n let lca: CPUProfileNode | null = null\n\n // This is O(n^2), but n should be relatively small here (stack height),\n // so hopefully this isn't much of a problem\n for (\n lca = stackTop;\n lca && prevStack.indexOf(lca) === -1;\n lca = shouldPlaceOnTopOfPreviousStack(lca.callFrame.functionName)\n ? lastOf(prevStack)\n : lca.parent || null\n ) {}\n\n // Close frames that are no longer open\n while (prevStack.length > 0 && lastOf(prevStack) != lca) {\n const closingNode = prevStack.pop()!\n const frame = frameInfoForCallFrame(closingNode.callFrame)\n profile.leaveFrame(frame, value)\n }\n\n // Open frames that are now becoming open\n const toOpen: CPUProfileNode[] = []\n for (\n let node: CPUProfileNode | null = stackTop;\n node && node != lca && !shouldIgnoreFunction(node.callFrame);\n // Place Chrome internal functions on top of the previous call stack\n node = shouldPlaceOnTopOfPreviousStack(node.callFrame.functionName)\n ? lastOf(prevStack)\n : node.parent || null\n ) {\n toOpen.push(node)\n }\n toOpen.reverse()\n\n for (let node of toOpen) {\n profile.enterFrame(frameInfoForCallFrame(node.callFrame), value)\n }\n\n prevStack = prevStack.concat(toOpen)\n }\n\n // Close frames that are open at the end of the trace\n for (let i = prevStack.length - 1; i >= 0; i--) {\n profile.leaveFrame(frameInfoForCallFrame(prevStack[i].callFrame), lastOf(sampleTimes)!)\n }\n\n profile.setValueFormatter(new TimeFormatter('microseconds'))\n return profile.build()\n}\n\nexport function importFromOldV8CPUProfile(content: OldCPUProfile): Profile {\n return importFromChromeCPUProfile(chromeTreeToNodes(content))\n}\n", "// https://github.com/tmm1/stackprof\n\nimport {Profile, FrameInfo, StackListProfileBuilder} from '../lib/profile'\nimport {RawValueFormatter, TimeFormatter} from '../lib/value-formatters'\n\ninterface StackprofFrame {\n name?: string\n file?: string\n line?: number\n}\n\nexport interface StackprofProfile {\n frames: {[number: string]: StackprofFrame}\n mode: string\n raw: number[]\n raw_timestamp_deltas: number[]\n samples: number\n interval: number\n}\n\nexport function importFromStackprof(stackprofProfile: StackprofProfile): Profile {\n const {frames, mode, raw, raw_timestamp_deltas, interval} = stackprofProfile\n const profile = new StackListProfileBuilder()\n profile.setValueFormatter(new TimeFormatter('microseconds')) // default to time format unless we're in object mode\n\n let sampleIndex = 0\n\n let prevStack: FrameInfo[] = []\n\n for (let i = 0; i < raw.length; ) {\n const stackHeight = raw[i++]\n\n let stack: FrameInfo[] = []\n for (let j = 0; j < stackHeight; j++) {\n const id = raw[i++]\n let frameName = frames[id].name\n if (frameName == null) {\n frameName = '(unknown)'\n }\n const frame = {\n key: id,\n ...frames[id],\n name: frameName,\n }\n stack.push(frame)\n }\n if (stack.length === 1 && stack[0].name === '(garbage collection)') {\n stack = prevStack.concat(stack)\n }\n const nSamples = raw[i++]\n\n switch (mode) {\n case 'object':\n profile.appendSampleWithWeight(stack, nSamples)\n profile.setValueFormatter(new RawValueFormatter())\n break\n case 'cpu':\n profile.appendSampleWithWeight(stack, nSamples * interval)\n break\n default:\n let sampleDuration = 0\n for (let j = 0; j < nSamples; j++) {\n sampleDuration += raw_timestamp_deltas[sampleIndex++]\n }\n profile.appendSampleWithWeight(stack, sampleDuration)\n }\n\n prevStack = stack\n }\n\n return profile.build()\n}\n", "'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n", "'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n", "'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n", "// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // use fallback for big arrays to avoid stack overflow\n if (len < 65537) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n", "'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n", "'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n", "'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n var dict;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n // Convert data if needed\n if (typeof dictionary === 'string') {\n dict = strings.string2buf(dictionary);\n } else if (toString.call(dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(dictionary);\n } else {\n dict = dictionary;\n }\n\n status = zlib_inflate.inflateSetDictionary(this.strm, dict);\n\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n", "// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n", "!function (exports) {\n var fromCharCode = String.fromCharCode;\n function throwSyntaxError(bytes, index, message) {\n var c = bytes[index];\n var line = 1;\n var column = 0;\n for (var i = 0; i < index; i++) {\n if (bytes[i] === 10 /* Newline */) {\n line++;\n column = 0;\n }\n else {\n column++;\n }\n }\n throw new SyntaxError(message ? message :\n index === bytes.length ? 'Unexpected end of input while parsing JSON' :\n c >= 0x20 && c <= 0x7E ? \"Unexpected character \" + fromCharCode(c) + \" in JSON at position \" + index + \" (line \" + line + \", column \" + column + \")\" :\n \"Unexpected byte 0x\" + c.toString(16) + \" in JSON at position \" + index + \" (line \" + line + \", column \" + column + \")\");\n }\n exports.JSON_parse = function (bytes) {\n if (!(bytes instanceof Uint8Array)) {\n throw new Error(\"JSON input must be a Uint8Array\");\n }\n var propertyStack = [];\n var objectStack = [];\n var stateStack = [];\n var length = bytes.length;\n var property = null;\n var state = 0 /* TopLevel */;\n var object;\n var i = 0;\n while (i < length) {\n var c = bytes[i++];\n // Skip whitespace\n if (c <= 32 /* Space */) {\n continue;\n }\n var value = void 0;\n // Validate state inside objects\n if (state === 2 /* Object */ && property === null && c !== 34 /* Quote */ && c !== 125 /* CloseBrace */) {\n throwSyntaxError(bytes, --i);\n }\n switch (c) {\n // True\n case 116 /* LowerT */: {\n if (bytes[i++] !== 114 /* LowerR */ || bytes[i++] !== 117 /* LowerU */ || bytes[i++] !== 101 /* LowerE */) {\n throwSyntaxError(bytes, --i);\n }\n value = true;\n break;\n }\n // False\n case 102 /* LowerF */: {\n if (bytes[i++] !== 97 /* LowerA */ || bytes[i++] !== 108 /* LowerL */ || bytes[i++] !== 115 /* LowerS */ || bytes[i++] !== 101 /* LowerE */) {\n throwSyntaxError(bytes, --i);\n }\n value = false;\n break;\n }\n // Null\n case 110 /* LowerN */: {\n if (bytes[i++] !== 117 /* LowerU */ || bytes[i++] !== 108 /* LowerL */ || bytes[i++] !== 108 /* LowerL */) {\n throwSyntaxError(bytes, --i);\n }\n value = null;\n break;\n }\n // Number begin\n case 45 /* Minus */:\n case 46 /* Dot */:\n case 48 /* Digit0 */:\n case 49 /* Digit1 */:\n case 50 /* Digit2 */:\n case 51 /* Digit3 */:\n case 52 /* Digit4 */:\n case 53 /* Digit5 */:\n case 54 /* Digit6 */:\n case 55 /* Digit7 */:\n case 56 /* Digit8 */:\n case 57 /* Digit9 */: {\n var index = i;\n value = fromCharCode(c);\n c = bytes[i];\n // Scan over the rest of the number\n while (true) {\n switch (c) {\n case 43 /* Plus */:\n case 45 /* Minus */:\n case 46 /* Dot */:\n case 48 /* Digit0 */:\n case 49 /* Digit1 */:\n case 50 /* Digit2 */:\n case 51 /* Digit3 */:\n case 52 /* Digit4 */:\n case 53 /* Digit5 */:\n case 54 /* Digit6 */:\n case 55 /* Digit7 */:\n case 56 /* Digit8 */:\n case 57 /* Digit9 */:\n case 101 /* LowerE */:\n case 69 /* UpperE */: {\n value += fromCharCode(c);\n c = bytes[++i];\n continue;\n }\n }\n // Number end\n break;\n }\n // Convert the string to a number\n value = +value;\n // Validate the number\n if (isNaN(value)) {\n throwSyntaxError(bytes, --index, 'Invalid number');\n }\n break;\n }\n // String begin\n case 34 /* Quote */: {\n value = '';\n while (true) {\n if (i >= length) {\n throwSyntaxError(bytes, length);\n }\n c = bytes[i++];\n // String end\n if (c === 34 /* Quote */) {\n break;\n }\n else if (c === 92 /* Backslash */) {\n switch (bytes[i++]) {\n // Normal escape sequence\n case 34 /* Quote */:\n value += '\\\"';\n break;\n case 47 /* Slash */:\n value += '\\/';\n break;\n case 92 /* Backslash */:\n value += '\\\\';\n break;\n case 98 /* LowerB */:\n value += '\\b';\n break;\n case 102 /* LowerF */:\n value += '\\f';\n break;\n case 110 /* LowerN */:\n value += '\\n';\n break;\n case 114 /* LowerR */:\n value += '\\r';\n break;\n case 116 /* LowerT */:\n value += '\\t';\n break;\n // Unicode escape sequence\n case 117 /* LowerU */: {\n var code = 0;\n for (var j = 0; j < 4; j++) {\n c = bytes[i++];\n code <<= 4;\n if (c >= 48 /* Digit0 */ && c <= 57 /* Digit9 */)\n code |= c - 48 /* Digit0 */;\n else if (c >= 97 /* LowerA */ && c <= 102 /* LowerF */)\n code |= c + (10 - 97 /* LowerA */);\n else if (c >= 65 /* UpperA */ && c <= 70 /* UpperF */)\n code |= c + (10 - 65 /* UpperA */);\n else\n throwSyntaxError(bytes, --i);\n }\n value += fromCharCode(code);\n break;\n }\n // Invalid escape sequence\n default:\n throwSyntaxError(bytes, --i);\n break;\n }\n }\n else if (c <= 0x7F) {\n value += fromCharCode(c);\n }\n else if ((c & 0xE0) === 0xC0) {\n value += fromCharCode(((c & 0x1F) << 6) | (bytes[i++] & 0x3F));\n }\n else if ((c & 0xF0) === 0xE0) {\n value += fromCharCode(((c & 0x0F) << 12) | ((bytes[i++] & 0x3F) << 6) | (bytes[i++] & 0x3F));\n }\n else if ((c & 0xF8) == 0xF0) {\n var codePoint = ((c & 0x07) << 18) | ((bytes[i++] & 0x3F) << 12) | ((bytes[i++] & 0x3F) << 6) | (bytes[i++] & 0x3F);\n if (codePoint > 0xFFFF) {\n codePoint -= 0x10000;\n value += fromCharCode(((codePoint >> 10) & 0x3FF) | 0xD800);\n codePoint = 0xDC00 | (codePoint & 0x3FF);\n }\n value += fromCharCode(codePoint);\n }\n }\n // Force V8's rope representation to be flattened to compact the string and avoid running out of memory\n value[0];\n break;\n }\n // Array begin\n case 91 /* OpenBracket */: {\n value = [];\n // Push the stack\n propertyStack.push(property);\n objectStack.push(object);\n stateStack.push(state);\n // Enter the array\n property = null;\n object = value;\n state = 1 /* Array */;\n continue;\n }\n // Object begin\n case 123 /* OpenBrace */: {\n value = {};\n // Push the stack\n propertyStack.push(property);\n objectStack.push(object);\n stateStack.push(state);\n // Enter the object\n property = null;\n object = value;\n state = 2 /* Object */;\n continue;\n }\n // Array end\n case 93 /* CloseBracket */: {\n if (state !== 1 /* Array */) {\n throwSyntaxError(bytes, --i);\n }\n // Leave the array\n value = object;\n // Pop the stack\n property = propertyStack.pop();\n object = objectStack.pop();\n state = stateStack.pop();\n break;\n }\n // Object end\n case 125 /* CloseBrace */: {\n if (state !== 2 /* Object */) {\n throwSyntaxError(bytes, --i);\n }\n // Leave the object\n value = object;\n // Pop the stack\n property = propertyStack.pop();\n object = objectStack.pop();\n state = stateStack.pop();\n break;\n }\n default: {\n throwSyntaxError(bytes, --i);\n }\n }\n c = bytes[i];\n // Skip whitespace\n while (c <= 32 /* Space */) {\n c = bytes[++i];\n }\n switch (state) {\n case 0 /* TopLevel */: {\n // Expect the end of the input\n if (i === length) {\n return value;\n }\n break;\n }\n case 1 /* Array */: {\n object.push(value);\n // Check for more values\n if (c === 44 /* Comma */) {\n i++;\n continue;\n }\n // Expect the end of the array\n if (c === 93 /* CloseBracket */) {\n continue;\n }\n break;\n }\n case 2 /* Object */: {\n // Property\n if (property === null) {\n property = value;\n // Expect a colon\n if (c === 58 /* Colon */) {\n i++;\n continue;\n }\n }\n else {\n object[property] = value;\n property = null;\n // Check for more values\n if (c === 44 /* Comma */) {\n i++;\n continue;\n }\n // Expect the end of the object\n if (c === 125 /* CloseBrace */) {\n continue;\n }\n }\n break;\n }\n }\n // It's an error if we get here\n break;\n }\n throwSyntaxError(bytes, i);\n };\n}(typeof exports !== 'undefined' ? exports : this);\n", "import * as pako from 'pako'\nimport {JSON_parse} from 'uint8array-json-parser'\n\nexport interface ProfileDataSource {\n name(): Promise\n readAsArrayBuffer(): Promise\n readAsText(): Promise\n}\n\nexport interface TextFileContent {\n splitLines(): Iterable\n firstChunk(): string\n parseAsJSON(): any\n}\n\n// V8 has a maximum string size. To support files whose contents exceeds that\n// size, we provide an alternate string interface for text backed by a\n// Uint8Array instead.\n//\n// We provide a simple splitLines() which returns simple strings under the\n// assumption that most extremely large text profiles will be broken into many\n// lines. This isn't true in the general case, but will be true for most common\n// large files.\n//\n// See: https://github.com/v8/v8/blob/8b663818fc311217c2cdaaab935f020578bfb7a8/src/objects/string.h#L479-L483\n//\n// At time of writing (2021/03/27), the maximum string length in V8 is\n// 32 bit systems: 2^28 - 16 = ~268M chars\n// 64 bit systems: 2^29 - 24 = ~537M chars\n//\n// https://source.chromium.org/chromium/chromium/src/+/main:v8/include/v8-primitive.h;drc=cb88fe94d9044d860cc75c89e1bc270ab4062702;l=125\n//\n// We'll be conservative and feed in 2^27 bytes at a time (~134M chars\n// assuming utf-8 encoding)\nlet TEXT_FILE_CHUNK_SIZE = 1 << 27\n\nexport async function withMockedFileChunkSizeForTests(chunkSize: number, cb: () => any) {\n const original = TEXT_FILE_CHUNK_SIZE\n TEXT_FILE_CHUNK_SIZE = chunkSize\n try {\n await cb()\n } finally {\n TEXT_FILE_CHUNK_SIZE = original\n }\n}\n\nfunction permissivelyParseJSONString(content: string) {\n // This code is similar to the code from here:\n // https://github.com/catapult-project/catapult/blob/27e047e0494df162022be6aa8a8862742a270232/tracing/tracing/extras/importer/trace_event_importer.html#L197-L208\n //\n // If the event data begins with a [, then we know it should end with a ]. The\n // reason we check for this is because some tracing implementations cannot\n // guarantee that a ']' gets written to the trace file. So, we are forgiving\n // and if this is obviously the case, we fix it up before throwing the string\n // at JSON.parse.\n content = content.trim()\n if (content[0] === '[') {\n content = content.replace(/,\\s*$/, '')\n if (content[content.length - 1] !== ']') {\n content += ']'\n }\n }\n return JSON.parse(content)\n}\n\nfunction permissivelyParseJSONUint8Array(byteArray: Uint8Array) {\n let indexOfFirstNonWhitespaceChar = 0\n for (let i = 0; i < byteArray.length; i++) {\n if (!/\\s/.exec(String.fromCharCode(byteArray[i]))) {\n indexOfFirstNonWhitespaceChar = i\n break\n }\n }\n if (\n byteArray[indexOfFirstNonWhitespaceChar] === '['.charCodeAt(0) &&\n byteArray[byteArray.length - 1] !== ']'.charCodeAt(0)\n ) {\n // Strip trailing whitespace from the end of the array\n let trimmedLength = byteArray.length\n while (trimmedLength > 0 && /\\s/.exec(String.fromCharCode(byteArray[trimmedLength - 1]))) {\n trimmedLength--\n }\n\n // Ignore trailing comma\n if (String.fromCharCode(byteArray[trimmedLength - 1]) === ',') {\n trimmedLength--\n }\n\n if (String.fromCharCode(byteArray[trimmedLength - 1]) !== ']') {\n // Clone the array, ignoring any whitespace & trailing comma, then append a ']'\n //\n // Note: We could save a tiny bit of space here by avoiding copying the\n // leading whitespace, but it's a trivial perf boost and it complicates\n // the code.\n const newByteArray = new Uint8Array(trimmedLength + 1)\n newByteArray.set(byteArray.subarray(0, trimmedLength))\n newByteArray[trimmedLength] = ']'.charCodeAt(0)\n byteArray = newByteArray\n }\n }\n return JSON_parse(byteArray)\n}\n\nexport class BufferBackedTextFileContent implements TextFileContent {\n private chunks: string[] = []\n private byteArray: Uint8Array\n\n constructor(buffer: ArrayBuffer) {\n const byteArray = (this.byteArray = new Uint8Array(buffer))\n\n let encoding: string = 'utf-8'\n if (byteArray.length > 2) {\n if (byteArray[0] === 0xff && byteArray[1] === 0xfe) {\n // UTF-16, Little Endian encoding\n encoding = 'utf-16le'\n } else if (byteArray[0] === 0xfe && byteArray[1] === 0xff) {\n // UTF-16, Big Endian encoding\n encoding = 'utf-16be'\n }\n }\n\n if (typeof TextDecoder !== 'undefined') {\n // If TextDecoder is available, we'll try to use it to decode the string.\n const decoder = new TextDecoder(encoding)\n\n for (let chunkNum = 0; chunkNum < buffer.byteLength / TEXT_FILE_CHUNK_SIZE; chunkNum++) {\n const offset = chunkNum * TEXT_FILE_CHUNK_SIZE\n const view = new Uint8Array(\n buffer,\n offset,\n Math.min(buffer.byteLength - offset, TEXT_FILE_CHUNK_SIZE),\n )\n const chunk = decoder.decode(view, {stream: true})\n this.chunks.push(chunk)\n }\n } else {\n // JavaScript strings are UTF-16 encoded, but we're reading data from disk\n // that we're going to blindly assume it's ASCII encoded. This codepath\n // only exists for older browser support.\n\n console.warn('This browser does not support TextDecoder. Decoding text as ASCII.')\n this.chunks.push('')\n for (let i = 0; i < byteArray.length; i++) {\n this.chunks[this.chunks.length - 1] += String.fromCharCode(byteArray[i])\n ;(this.chunks[this.chunks.length - 1] as any) | 0 // This forces the string to be flattened\n\n if (this.chunks[this.chunks.length - 1].length >= TEXT_FILE_CHUNK_SIZE) {\n this.chunks.push('')\n }\n }\n }\n }\n\n splitLines(): Iterable {\n const iterator = function* (this: BufferBackedTextFileContent) {\n let lineBuffer: string = ''\n for (let chunk of this.chunks) {\n const fragments = chunk.split('\\n')\n for (let i = 0; i < fragments.length; i++) {\n if (i === 0) lineBuffer += fragments[i]\n else {\n yield lineBuffer\n lineBuffer = fragments[i]\n }\n }\n }\n\n yield lineBuffer\n }\n\n return {\n [Symbol.iterator]: iterator.bind(this),\n }\n }\n\n firstChunk(): string {\n return this.chunks[0] || ''\n }\n\n parseAsJSON(): any {\n // We only use the Uint8Array version of JSON.parse when necessary, because\n // it's around 4x slower than native.\n if (this.chunks.length === 1) {\n return permissivelyParseJSONString(this.chunks[0])\n }\n return permissivelyParseJSONUint8Array(this.byteArray)\n }\n}\n\nexport class StringBackedTextFileContent implements TextFileContent {\n constructor(private s: string) {}\n\n splitLines(): string[] {\n return this.s.split('\\n')\n }\n\n firstChunk(): string {\n return this.s\n }\n\n parseAsJSON(): any {\n return permissivelyParseJSONString(this.s)\n }\n}\n\nexport class TextProfileDataSource implements ProfileDataSource {\n constructor(\n private fileName: string,\n private contents: string,\n ) {}\n async name() {\n return this.fileName\n }\n\n async readAsArrayBuffer() {\n return new ArrayBuffer(0)\n }\n\n async readAsText() {\n return new StringBackedTextFileContent(this.contents)\n }\n}\n\nexport class MaybeCompressedDataReader implements ProfileDataSource {\n private uncompressedData: Promise\n\n constructor(\n private namePromise: Promise,\n maybeCompressedDataPromise: Promise,\n ) {\n this.uncompressedData = maybeCompressedDataPromise.then(async (fileData: ArrayBuffer) => {\n try {\n const result = pako.inflate(new Uint8Array(fileData)).buffer as ArrayBuffer\n return result\n } catch (e) {\n return fileData\n }\n })\n }\n\n async name(): Promise {\n return await this.namePromise\n }\n\n async readAsArrayBuffer(): Promise {\n return await this.uncompressedData\n }\n\n async readAsText(): Promise {\n const buffer = await this.readAsArrayBuffer()\n return new BufferBackedTextFileContent(buffer)\n }\n\n static fromFile(file: File): MaybeCompressedDataReader {\n const maybeCompressedDataPromise: Promise = new Promise(resolve => {\n const reader = new FileReader()\n reader.addEventListener('loadend', () => {\n if (!(reader.result instanceof ArrayBuffer)) {\n throw new Error('Expected reader.result to be an instance of ArrayBuffer')\n }\n resolve(reader.result)\n })\n reader.readAsArrayBuffer(file)\n })\n\n return new MaybeCompressedDataReader(Promise.resolve(file.name), maybeCompressedDataPromise)\n }\n\n static fromArrayBuffer(name: string, buffer: ArrayBuffer): MaybeCompressedDataReader {\n return new MaybeCompressedDataReader(Promise.resolve(name), Promise.resolve(buffer))\n }\n}\n", "// This file contains methods to import data from OS X Instruments.app\n// https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/index.html\n\nimport {\n Profile,\n FrameInfo,\n CallTreeProfileBuilder,\n StackListProfileBuilder,\n ProfileGroup,\n} from '../lib/profile'\nimport {sortBy, getOrThrow, getOrInsert, lastOf, getOrElse, zeroPad} from '../lib/utils'\nimport {ByteFormatter, TimeFormatter} from '../lib/value-formatters'\nimport {MaybeCompressedDataReader, TextFileContent} from './utils'\n\nfunction parseTSV(contents: TextFileContent): T[] {\n const lines = [...contents.splitLines()].map(l => l.split('\\t'))\n\n const headerLine = lines.shift()\n if (!headerLine) return []\n\n const indexToField = new Map()\n for (let i = 0; i < headerLine.length; i++) {\n indexToField.set(i, headerLine[i])\n }\n\n const ret: T[] = []\n for (let line of lines) {\n const row = {} as T\n for (let i = 0; i < line.length; i++) {\n ;(row as any)[indexToField.get(i)!] = line[i]\n }\n ret.push(row)\n }\n return ret\n}\n\ninterface PastedTimeProfileRow {\n Weight?: string\n 'Source Path'?: string\n 'Symbol Name'?: string\n 'Symbol Names'?: string\n}\n\ninterface PastedAllocationsProfileRow {\n 'Bytes Used'?: string\n 'Source Path'?: string\n 'Symbol Name'?: string\n 'Symbol Names'?: string\n}\n\ninterface FrameInfoWithWeight extends FrameInfo {\n endValue: number\n}\n\nfunction getWeight(deepCopyRow: any): number {\n if ('Bytes Used' in deepCopyRow) {\n const bytesUsedString = deepCopyRow['Bytes Used']\n const parts = /\\s*(\\d+(?:[.]\\d+)?) (\\w+)\\s+(?:\\d+(?:[.]\\d+))%/.exec(bytesUsedString)\n if (!parts) return 0\n const value = parseInt(parts[1], 10)\n const units = parts[2]\n\n switch (units) {\n case 'Bytes':\n return value\n case 'KB':\n return 1024 * value\n case 'MB':\n return 1024 * 1024 * value\n case 'GB':\n return 1024 * 1024 * 1024 * value\n }\n throw new Error(`Unrecognized units ${units}`)\n }\n\n if ('Weight' in deepCopyRow || 'Running Time' in deepCopyRow) {\n const weightString = deepCopyRow['Weight'] || deepCopyRow['Running Time']\n const parts = /\\s*(\\d+(?:[.]\\d+)?) ?(\\w+)\\s+(?:\\d+(?:[.]\\d+))%/.exec(weightString)\n if (!parts) return 0\n const value = parseInt(parts[1], 10)\n const units = parts[2]\n\n switch (units) {\n case 'ms':\n return value\n case 's':\n return 1000 * value\n case 'min':\n return 60 * 1000 * value\n\n case 'cycles':\n return value\n case 'Kc':\n return 1000 * value\n case 'Mc':\n return 1000 * 1000 * value\n case 'Gc':\n return 1000 * 1000 * 1000 * value\n }\n throw new Error(`Unrecognized units ${units}`)\n }\n\n return -1\n}\n\n// Import from a deep copy made of a profile\nexport function importFromInstrumentsDeepCopy(contents: TextFileContent): Profile {\n const profile = new CallTreeProfileBuilder()\n const rows = parseTSV(contents)\n\n const stack: FrameInfoWithWeight[] = []\n let cumulativeValue: number = 0\n let leadingFirstRowSpaces: number = rows[0]['Symbol Names']\n ? rows[0]['Symbol Names'].lastIndexOf(' ') + 1\n : 0\n\n for (let row of rows) {\n const symbolName = row['Symbol Name'] || row['Symbol Names']?.slice(leadingFirstRowSpaces)\n if (!symbolName) continue\n const trimmedSymbolName = symbolName.trim()\n let stackDepth = symbolName.length - trimmedSymbolName.length\n\n if (stack.length - stackDepth < 0) {\n throw new Error('Invalid format')\n }\n\n let framesToLeave: FrameInfoWithWeight[] = []\n\n while (stackDepth < stack.length) {\n const stackTop = stack.pop()!\n framesToLeave.push(stackTop)\n }\n\n for (let frameToLeave of framesToLeave) {\n cumulativeValue = Math.max(cumulativeValue, frameToLeave.endValue)\n profile.leaveFrame(frameToLeave, cumulativeValue)\n }\n\n const newFrameInfo: FrameInfoWithWeight = {\n key: `${row['Source Path'] || ''}:${trimmedSymbolName}`,\n name: trimmedSymbolName,\n file: row['Source Path'],\n endValue: cumulativeValue + getWeight(row),\n }\n\n profile.enterFrame(newFrameInfo, cumulativeValue)\n stack.push(newFrameInfo)\n }\n\n while (stack.length > 0) {\n const frameToLeave = stack.pop()!\n cumulativeValue = Math.max(cumulativeValue, frameToLeave.endValue)\n profile.leaveFrame(frameToLeave, cumulativeValue)\n }\n\n if ('Bytes Used' in rows[0]) {\n profile.setValueFormatter(new ByteFormatter())\n } else if ('Weight' in rows[0] || 'Running Time' in rows[0]) {\n profile.setValueFormatter(new TimeFormatter('milliseconds'))\n }\n\n return profile.build()\n}\n\ninterface TraceDirectoryTree {\n name: string\n files: Map\n subdirectories: Map\n}\n\nasync function extractDirectoryTree(entry: FileSystemDirectoryEntry): Promise {\n const node: TraceDirectoryTree = {\n name: entry.name,\n files: new Map(),\n subdirectories: new Map(),\n }\n\n const children = await new Promise((resolve, reject) => {\n entry.createReader().readEntries((entries: any[]) => {\n resolve(entries)\n }, reject)\n })\n\n for (let child of children) {\n if (child.isDirectory) {\n const subtree = await extractDirectoryTree(child as FileSystemDirectoryEntry)\n node.subdirectories.set(subtree.name, subtree)\n } else {\n const file = await new Promise((resolve, reject) => {\n ;(child as FileSystemFileEntry).file(resolve, reject)\n })\n node.files.set(file.name, file)\n }\n }\n\n return node\n}\n\nfunction readAsArrayBuffer(file: File): Promise {\n return MaybeCompressedDataReader.fromFile(file).readAsArrayBuffer()\n}\n\nfunction readAsText(file: File): Promise {\n return MaybeCompressedDataReader.fromFile(file).readAsText()\n}\n\nfunction getCoreDirForRun(tree: TraceDirectoryTree, selectedRun: number): TraceDirectoryTree {\n const corespace = getOrThrow(tree.subdirectories, 'corespace')\n const corespaceRunDir = getOrThrow(corespace.subdirectories, `run${selectedRun}`)\n return getOrThrow(corespaceRunDir.subdirectories, 'core')\n}\n\nclass BinReader {\n private bytePos: number = 0\n private view: DataView\n constructor(buffer: ArrayBuffer) {\n this.view = new DataView(buffer)\n }\n seek(pos: number) {\n this.bytePos = pos\n }\n skip(byteCount: number) {\n this.bytePos += byteCount\n }\n hasMore() {\n return this.bytePos < this.view.byteLength\n }\n bytesLeft() {\n return this.view.byteLength - this.bytePos\n }\n readUint8() {\n this.bytePos++\n if (this.bytePos > this.view.byteLength) return 0\n return this.view.getUint8(this.bytePos - 1)\n }\n\n // Note: we intentionally use Math.pow here rather than bit shifts\n // because JavaScript doesn't have true 64 bit integers.\n readUint32() {\n this.bytePos += 4\n if (this.bytePos > this.view.byteLength) return 0\n return this.view.getUint32(this.bytePos - 4, true)\n }\n readUint48() {\n this.bytePos += 6\n if (this.bytePos > this.view.byteLength) return 0\n\n return (\n this.view.getUint32(this.bytePos - 6, true) +\n this.view.getUint16(this.bytePos - 2, true) * Math.pow(2, 32)\n )\n }\n readUint64() {\n this.bytePos += 8\n if (this.bytePos > this.view.byteLength) return 0\n return (\n this.view.getUint32(this.bytePos - 8, true) +\n this.view.getUint32(this.bytePos - 4, true) * Math.pow(2, 32)\n )\n }\n}\n\ninterface Sample {\n timestamp: number\n threadID: number\n backtraceID: number\n}\n\nasync function getRawSampleList(core: TraceDirectoryTree): Promise {\n const stores = getOrThrow(core.subdirectories, 'stores')\n for (let storedir of stores.subdirectories.values()) {\n const schemaFile = storedir.files.get('schema.xml')\n if (!schemaFile) continue\n const schema = await readAsText(schemaFile)\n if (!/name=\"time-profile\"/.exec(schema.firstChunk())) {\n continue\n }\n const bulkstore = new BinReader(\n await readAsArrayBuffer(getOrThrow(storedir.files, 'bulkstore')),\n )\n // Ignore the first 3 words\n bulkstore.readUint32()\n bulkstore.readUint32()\n bulkstore.readUint32()\n const headerSize = bulkstore.readUint32()\n const bytesPerEntry = bulkstore.readUint32()\n\n bulkstore.seek(headerSize)\n\n const samples: Sample[] = []\n while (true) {\n // Schema as of Instruments 8.3.3 is a 6 byte timestamp, followed by a bunch\n // of stuff we don't care about, followed by a 4 byte backtrace ID\n const timestamp = bulkstore.readUint48()\n if (timestamp === 0) break\n\n const threadID = bulkstore.readUint32()\n\n bulkstore.skip(bytesPerEntry - 6 - 4 - 4)\n const backtraceID = bulkstore.readUint32()\n samples.push({timestamp, threadID, backtraceID})\n }\n return samples\n }\n throw new Error('Could not find sample list')\n}\n\nasync function getIntegerArrays(samples: Sample[], core: TraceDirectoryTree): Promise {\n const uniquing = getOrThrow(core.subdirectories, 'uniquing')\n const arrayUniquer = getOrThrow(uniquing.subdirectories, 'arrayUniquer')\n const integeruniquerindex = getOrThrow(arrayUniquer.files, 'integeruniquer.index')\n const integeruniquerdata = getOrThrow(arrayUniquer.files, 'integeruniquer.data')\n\n // integeruniquer.index is a binary file containing an array of [byte offset, MB offset] pairs\n // that indicate where array data starts in the .data file\n\n // integeruniquer.data is a binary file containing an array of arrays of 64 bit integer.\n // The schema is a 32 byte header followed by a stream of arrays.\n // Each array consists of a 4 byte size N followed by N 8 byte little endian integers\n\n // This table contains the memory addresses of stack frames\n\n const indexreader = new BinReader(await readAsArrayBuffer(integeruniquerindex))\n const datareader = new BinReader(await readAsArrayBuffer(integeruniquerdata))\n\n // Header we don't care about\n indexreader.seek(32)\n\n let arrays: number[][] = []\n\n while (indexreader.hasMore()) {\n const byteOffset = indexreader.readUint32() + indexreader.readUint32() * (1024 * 1024)\n\n if (byteOffset === 0) {\n // The first entry in the index table seems to just indicate the offset of\n // the header into the data file\n continue\n }\n\n datareader.seek(byteOffset)\n\n let length = datareader.readUint32()\n let array: number[] = []\n\n while (length--) {\n array.push(datareader.readUint64())\n }\n arrays.push(array)\n }\n\n return arrays\n}\n\ninterface SymbolInfo {\n symbolName: string | null\n sourcePath: string | null\n addressToLine: Map\n}\n\ninterface FormTemplateRunData {\n number: number\n addressToFrameMap: Map\n}\n\ninterface FormTemplateData {\n version: number\n selectedRunNumber: number\n instrument: string\n runs: FormTemplateRunData[]\n}\n\nasync function readFormTemplate(tree: TraceDirectoryTree): Promise {\n const formTemplate = getOrThrow(tree.files, 'form.template')\n const archive = readInstrumentsKeyedArchive(await readAsArrayBuffer(formTemplate))\n\n const version = archive['com.apple.xray.owner.template.version']\n let selectedRunNumber = 1\n if ('com.apple.xray.owner.template' in archive) {\n selectedRunNumber = archive['com.apple.xray.owner.template'].get('_selectedRunNumber')\n }\n let instrument = archive['$1']\n if ('stubInfoByUUID' in archive) {\n instrument = Array.from(archive['stubInfoByUUID'].keys())[0]\n }\n const allRunData = archive['com.apple.xray.run.data']\n\n const runs: FormTemplateRunData[] = []\n for (let runNumber of allRunData.runNumbers) {\n const runData = getOrThrow>(allRunData.runData, runNumber)\n\n const symbolsByPid = getOrThrow>(\n runData,\n 'symbolsByPid',\n )\n\n const addressToFrameMap = new Map()\n\n // TODO(jlfwong): Deal with profiles with conflicting addresses?\n for (let symbols of symbolsByPid.values()) {\n for (let symbol of symbols.symbols) {\n if (!symbol) continue\n const {sourcePath, symbolName, addressToLine} = symbol\n for (let address of addressToLine.keys()) {\n getOrInsert(addressToFrameMap, address, () => {\n const name = symbolName || `0x${zeroPad(address.toString(16), 16)}`\n const frame: FrameInfo = {\n key: `${sourcePath}:${name}`,\n name: name,\n }\n if (sourcePath) {\n frame.file = sourcePath\n }\n return frame\n })\n }\n }\n\n runs.push({\n number: runNumber,\n addressToFrameMap,\n })\n }\n }\n\n return {\n version,\n instrument,\n selectedRunNumber,\n runs,\n }\n}\n\n// Import from a .trace file saved from Mac Instruments.app\nexport async function importFromInstrumentsTrace(\n entry: FileSystemDirectoryEntry,\n): Promise {\n const tree = await extractDirectoryTree(entry)\n\n const {version, runs, instrument, selectedRunNumber} = await readFormTemplate(tree)\n if (instrument !== 'com.apple.xray.instrument-type.coresampler2') {\n throw new Error(\n `The only supported instrument from .trace import is \"com.apple.xray.instrument-type.coresampler2\". Got ${instrument}`,\n )\n }\n console.log('version: ', version)\n console.log(`Importing time profile`)\n\n const profiles: Profile[] = []\n let indexToView = 0\n\n for (let run of runs) {\n const {addressToFrameMap, number} = run\n const group = await importRunFromInstrumentsTrace({\n fileName: entry.name,\n tree,\n addressToFrameMap,\n runNumber: number,\n })\n\n if (run.number === selectedRunNumber) {\n indexToView = profiles.length + group.indexToView\n }\n\n profiles.push(...group.profiles)\n }\n\n return {name: entry.name, indexToView, profiles}\n}\n\nexport async function importRunFromInstrumentsTrace(args: {\n fileName: string\n tree: TraceDirectoryTree\n addressToFrameMap: Map\n runNumber: number\n}): Promise {\n const {fileName, tree, addressToFrameMap, runNumber} = args\n const core = getCoreDirForRun(tree, runNumber)\n let samples = await getRawSampleList(core)\n const arrays = await getIntegerArrays(samples, core)\n\n // We'll try to guess which thread is the main thread by assuming\n // it's the one with the most samples.\n const sampleCountByThreadID = new Map()\n for (let sample of samples) {\n sampleCountByThreadID.set(\n sample.threadID,\n getOrElse(sampleCountByThreadID, sample.threadID, () => 0) + 1,\n )\n }\n const counts = Array.from(sampleCountByThreadID.entries())\n sortBy(counts, c => -c[1])\n const threadIDs = counts.map(c => c[0])\n\n return {\n name: fileName,\n indexToView: 0,\n profiles: threadIDs.map(threadID =>\n importThreadFromInstrumentsTrace({\n threadID,\n fileName,\n arrays,\n addressToFrameMap,\n samples,\n }),\n ),\n }\n}\n\nexport function importThreadFromInstrumentsTrace(args: {\n fileName: string\n addressToFrameMap: Map\n threadID: number\n arrays: number[][]\n samples: Sample[]\n}): Profile {\n let {fileName, addressToFrameMap, arrays, threadID, samples} = args\n\n const backtraceIDtoStack = new Map()\n samples = samples.filter(s => s.threadID === threadID)\n\n const profile = new StackListProfileBuilder(lastOf(samples)!.timestamp)\n profile.setName(`${fileName} - thread ${threadID}`)\n\n function appendRecursive(k: number, stack: FrameInfo[]) {\n const frame = addressToFrameMap.get(k)\n if (frame) {\n stack.push(frame)\n } else if (k in arrays) {\n for (let addr of arrays[k]) {\n appendRecursive(addr, stack)\n }\n } else {\n const rawAddressFrame: FrameInfo = {\n key: k,\n name: `0x${zeroPad(k.toString(16), 16)}`,\n }\n addressToFrameMap.set(k, rawAddressFrame)\n stack.push(rawAddressFrame)\n }\n }\n\n let lastTimestamp: null | number = null\n for (let sample of samples) {\n const stackForSample = getOrInsert(backtraceIDtoStack, sample.backtraceID, id => {\n const stack: FrameInfo[] = []\n appendRecursive(id, stack)\n stack.reverse()\n return stack\n })\n\n if (lastTimestamp === null) {\n // The first sample is sometimes fairly late in the profile for some reason.\n // We'll just say nothing was known to be on the stack in that time.\n profile.appendSampleWithWeight([], sample.timestamp)\n lastTimestamp = sample.timestamp\n }\n\n if (sample.timestamp < lastTimestamp) {\n throw new Error('Timestamps out of order!')\n }\n\n profile.appendSampleWithWeight(stackForSample, sample.timestamp - lastTimestamp)\n lastTimestamp = sample.timestamp\n }\n\n profile.setValueFormatter(new TimeFormatter('nanoseconds'))\n return profile.build()\n}\n\nexport function readInstrumentsKeyedArchive(buffer: ArrayBuffer): any {\n const byteArray = new Uint8Array(buffer)\n const parsedPlist = parseBinaryPlist(byteArray)\n const data = expandKeyedArchive(parsedPlist, ($classname, object) => {\n switch ($classname) {\n case 'NSTextStorage':\n case 'NSParagraphStyle':\n case 'NSFont':\n // Stuff that's irrelevant for constructing a flamegraph\n return null\n\n case 'PFTSymbolData': {\n const ret = Object.create(null)\n ret.symbolName = object.$0\n ret.sourcePath = object.$1\n ret.addressToLine = new Map()\n for (let i = 3; ; i += 2) {\n const address = object['$' + i]\n const line = object['$' + (i + 1)]\n if (address == null || line == null) {\n break\n }\n ret.addressToLine.set(address, line)\n }\n return ret\n }\n\n case 'PFTOwnerData': {\n const ret = Object.create(null)\n ret.ownerName = object.$0\n ret.ownerPath = object.$1\n return ret\n }\n\n case 'PFTPersistentSymbols': {\n const ret = Object.create(null)\n const symbolCount = object.$4\n\n ret.threadNames = object.$3\n ret.symbols = []\n for (let i = 1; i < symbolCount; i++) {\n ret.symbols.push(object['$' + (4 + i)])\n }\n return ret\n }\n\n case 'XRRunListData': {\n const ret = Object.create(null)\n ret.runNumbers = object.$0\n ret.runData = object.$1\n return ret\n }\n\n case 'XRIntKeyedDictionary': {\n const ret = new Map()\n const size = object.$0\n for (let i = 0; i < size; i++) {\n const key = object['$' + (1 + 2 * i)]\n const value = object['$' + (1 + (2 * i + 1))]\n ret.set(key, value)\n }\n return ret\n }\n\n case 'XRCore': {\n const ret = Object.create(null)\n ret.number = object.$0\n ret.name = object.$1\n return ret\n }\n }\n return object\n })\n return data\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport function decodeUTF8(bytes: Uint8Array): string {\n let text = String.fromCharCode.apply(String, Array.from(bytes))\n if (text.slice(-1) === '\\0') text = text.slice(0, -1) // Remove a single trailing null character if present\n return decodeURIComponent(escape(text))\n}\n\nfunction isArray(value: any): boolean {\n return value instanceof Array\n}\n\nfunction isDictionary(value: any): boolean {\n return value !== null && typeof value === 'object' && Object.getPrototypeOf(value) === null\n}\n\nfunction followUID(objects: any[], value: any): any {\n return value instanceof UID ? objects[value.index] : value\n}\n\nfunction expandKeyedArchive(\n root: any,\n interpretClass: ($classname: string, obj: any) => any = x => x,\n): any {\n // Sanity checks\n if (\n root.$version !== 100000 ||\n root.$archiver !== 'NSKeyedArchiver' ||\n !isDictionary(root.$top) ||\n !isArray(root.$objects)\n ) {\n throw new Error('Invalid keyed archive')\n }\n\n // Substitute NSNull\n if (root.$objects[0] === '$null') {\n root.$objects[0] = null\n }\n\n // Pattern-match Objective-C constructs\n for (let i = 0; i < root.$objects.length; i++) {\n root.$objects[i] = paternMatchObjectiveC(root.$objects, root.$objects[i], interpretClass)\n }\n\n // Reconstruct the DAG from the parse tree\n let visit = (object: any) => {\n if (object instanceof UID) {\n return root.$objects[object.index]\n } else if (isArray(object)) {\n for (let i = 0; i < object.length; i++) {\n object[i] = visit(object[i])\n }\n } else if (isDictionary(object)) {\n for (let key in object) {\n object[key] = visit(object[key])\n }\n } else if (object instanceof Map) {\n const clone = new Map(object)\n object.clear()\n for (let [k, v] of clone.entries()) {\n object.set(visit(k), visit(v))\n }\n }\n return object\n }\n for (let i = 0; i < root.$objects.length; i++) {\n visit(root.$objects[i])\n }\n return visit(root.$top)\n}\n\nfunction paternMatchObjectiveC(\n objects: any[],\n value: any,\n interpretClass: ($classname: string, obj: any) => any = x => x,\n): any {\n if (isDictionary(value) && value.$class) {\n let name = followUID(objects, value.$class).$classname\n switch (name) {\n case 'NSDecimalNumberPlaceholder': {\n let length: number = value['NS.length']\n let exponent: number = value['NS.exponent']\n let byteOrder: number = value['NS.mantissa.bo']\n let negative: boolean = value['NS.negative']\n let mantissa = new Uint16Array(new Uint8Array(value['NS.mantissa']).buffer)\n let decimal = 0\n\n for (let i = 0; i < length; i++) {\n let digit = mantissa[i]\n\n if (byteOrder !== 1) {\n // I assume this is how this works but I am unable to test it\n digit = ((digit & 0xff00) >> 8) | ((digit & 0x00ff) << 8)\n }\n\n decimal += digit * Math.pow(65536, i)\n }\n\n decimal *= Math.pow(10, exponent)\n return negative ? -decimal : decimal\n }\n\n // Replace NSData with a Uint8Array\n case 'NSData':\n case 'NSMutableData':\n return value['NS.bytes'] || value['NS.data']\n\n // Replace NSString with a string\n case 'NSString':\n case 'NSMutableString':\n if (value['NS.string']) return value['NS.string']\n if (value['NS.bytes']) return decodeUTF8(value['NS.bytes'])\n console.warn(`Unexpected ${name} format: `, value)\n return null\n\n // Replace NSArray with an Array\n case 'NSArray':\n case 'NSMutableArray':\n if ('NS.objects' in value) {\n return value['NS.objects']\n }\n let array: any[] = []\n while (true) {\n let object = 'NS.object.' + array.length\n if (!(object in value)) {\n break\n }\n array.push(value[object])\n }\n return array\n\n case '_NSKeyedCoderOldStyleArray': {\n const count = value['NS.count']\n\n // const size = value['NS.size']\n // Types are encoded as single printable characters.\n // See: https://github.com/apple/swift-corelibs-foundation/blob/76995e8d3d8c10f3f3ec344dace43426ab941d0e/Foundation/NSObjCRuntime.swift#L19\n // const type = String.fromCharCode(value['NS.type'])\n\n let array: any[] = []\n for (let i = 0; i < count; i++) {\n const element = value['$' + i]\n array.push(element)\n }\n return array\n }\n\n case 'NSDictionary':\n case 'NSMutableDictionary':\n let map = new Map()\n if ('NS.keys' in value && 'NS.objects' in value) {\n for (let i = 0; i < value['NS.keys'].length; i++) {\n map.set(value['NS.keys'][i], value['NS.objects'][i])\n }\n } else {\n while (true) {\n let key = 'NS.key.' + map.size\n let object = 'NS.object.' + map.size\n if (!(key in value) || !(object in value)) {\n break\n }\n map.set(value[key], value[object])\n }\n }\n return map\n\n default:\n const converted = interpretClass(name, value)\n if (converted !== value) return converted\n }\n }\n return value\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport class UID {\n constructor(public index: number) {}\n}\n\nfunction parseBinaryPlist(bytes: Uint8Array): any {\n let text = 'bplist00'\n for (let i = 0; i < 8; i++) {\n if (bytes[i] !== text.charCodeAt(i)) {\n throw new Error('File is not a binary plist')\n }\n }\n return new BinaryPlistParser(\n new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength),\n ).parseRoot()\n}\n\ninterface LengthAndOffset {\n length: number\n offset: number\n}\n\n// See http://opensource.apple.com/source/CF/CF-550/CFBinaryPList.c for details\nclass BinaryPlistParser {\n referenceSize = 0\n objects: number[] = []\n offsetTable: number[] = []\n\n constructor(public view: DataView) {}\n\n parseRoot(): any {\n let trailer = this.view.byteLength - 32\n let offsetSize = this.view.getUint8(trailer + 6)\n this.referenceSize = this.view.getUint8(trailer + 7)\n\n // Just use the last 32-bits of these 64-bit big-endian values\n let objectCount = this.view.getUint32(trailer + 12, false)\n let rootIndex = this.view.getUint32(trailer + 20, false)\n let tableOffset = this.view.getUint32(trailer + 28, false)\n\n // Parse all offsets before starting to parse objects\n for (let i = 0; i < objectCount; i++) {\n this.offsetTable.push(this.parseInteger(tableOffset, offsetSize))\n tableOffset += offsetSize\n }\n\n // Parse the root object assuming the graph is a tree\n return this.parseObject(this.offsetTable[rootIndex])\n }\n\n parseLengthAndOffset(offset: number, extra: number): LengthAndOffset {\n if (extra !== 0x0f) return {length: extra, offset: 0}\n let marker = this.view.getUint8(offset++)\n if ((marker & 0xf0) !== 0x10)\n throw new Error('Unexpected non-integer length at offset ' + offset)\n let size = 1 << (marker & 0x0f)\n return {length: this.parseInteger(offset, size), offset: size + 1}\n }\n\n parseSingleton(offset: number, extra: number): any {\n if (extra === 0) return null\n if (extra === 8) return false\n if (extra === 9) return true\n throw new Error('Unexpected extra value ' + extra + ' at offset ' + offset)\n }\n\n parseInteger(offset: number, size: number): number {\n if (size === 1) return this.view.getUint8(offset)\n if (size === 2) return this.view.getUint16(offset, false)\n if (size === 4) return this.view.getUint32(offset, false)\n\n if (size === 8) {\n return (\n Math.pow(2, 32 * 1) * this.view.getUint32(offset + 0, false) +\n Math.pow(2, 32 * 0) * this.view.getUint32(offset + 4, false)\n )\n }\n\n if (size === 16) {\n return (\n Math.pow(2, 32 * 3) * this.view.getUint32(offset + 0, false) +\n Math.pow(2, 32 * 2) * this.view.getUint32(offset + 4, false) +\n Math.pow(2, 32 * 1) * this.view.getUint32(offset + 8, false) +\n Math.pow(2, 32 * 0) * this.view.getUint32(offset + 12, false)\n )\n }\n\n throw new Error('Unexpected integer of size ' + size + ' at offset ' + offset)\n }\n\n parseFloat(offset: number, size: number): number {\n if (size === 4) return this.view.getFloat32(offset, false)\n if (size === 8) return this.view.getFloat64(offset, false)\n throw new Error('Unexpected float of size ' + size + ' at offset ' + offset)\n }\n\n parseDate(offset: number, size: number): Date {\n if (size !== 8) throw new Error('Unexpected date of size ' + size + ' at offset ' + offset)\n let seconds = this.view.getFloat64(offset, false)\n return new Date(978307200000 + seconds * 1000) // Starts from January 1st, 2001\n }\n\n parseData(offset: number, extra: number): Uint8Array {\n let both = this.parseLengthAndOffset(offset, extra)\n return new Uint8Array(this.view.buffer, offset + both.offset, both.length)\n }\n\n parseStringASCII(offset: number, extra: number): string {\n let both = this.parseLengthAndOffset(offset, extra)\n let text = ''\n offset += both.offset\n for (let i = 0; i < both.length; i++) {\n text += String.fromCharCode(this.view.getUint8(offset++))\n }\n return text\n }\n\n parseStringUTF16(offset: number, extra: number): string {\n let both = this.parseLengthAndOffset(offset, extra)\n let text = ''\n offset += both.offset\n for (let i = 0; i < both.length; i++) {\n text += String.fromCharCode(this.view.getUint16(offset, false))\n offset += 2\n }\n return text\n }\n\n parseUID(offset: number, size: number): UID {\n return new UID(this.parseInteger(offset, size))\n }\n\n parseArray(offset: number, extra: number): any[] {\n let both = this.parseLengthAndOffset(offset, extra)\n let array: any[] = []\n let size = this.referenceSize\n offset += both.offset\n for (let i = 0; i < both.length; i++) {\n array.push(this.parseObject(this.offsetTable[this.parseInteger(offset, size)]))\n offset += size\n }\n return array\n }\n\n parseDictionary(offset: number, extra: number): Object {\n let both = this.parseLengthAndOffset(offset, extra)\n let dictionary = Object.create(null)\n let size = this.referenceSize\n let nextKey = offset + both.offset\n let nextValue = nextKey + both.length * size\n for (let i = 0; i < both.length; i++) {\n let key = this.parseObject(this.offsetTable[this.parseInteger(nextKey, size)])\n let value = this.parseObject(this.offsetTable[this.parseInteger(nextValue, size)])\n if (typeof key !== 'string') throw new Error('Unexpected non-string key at offset ' + nextKey)\n dictionary[key] = value\n nextKey += size\n nextValue += size\n }\n return dictionary\n }\n\n parseObject(offset: number): any {\n let marker = this.view.getUint8(offset++)\n let extra = marker & 0x0f\n switch (marker >> 4) {\n case 0x0:\n return this.parseSingleton(offset, extra)\n case 0x1:\n return this.parseInteger(offset, 1 << extra)\n case 0x2:\n return this.parseFloat(offset, 1 << extra)\n case 0x3:\n return this.parseDate(offset, 1 << extra)\n case 0x4:\n return this.parseData(offset, extra)\n case 0x5:\n return this.parseStringASCII(offset, extra)\n case 0x6:\n return this.parseStringUTF16(offset, extra)\n case 0x8:\n return this.parseUID(offset, extra + 1)\n case 0xa:\n return this.parseArray(offset, extra)\n case 0xd:\n return this.parseDictionary(offset, extra)\n }\n throw new Error('Unexpected marker ' + marker + ' at offset ' + --offset)\n }\n}\n", "// https://github.com/brendangregg/FlameGraph#2-fold-stacks\n\nimport {Profile, FrameInfo, StackListProfileBuilder} from '../lib/profile'\nimport {TextFileContent} from './utils'\n\ninterface BGSample {\n stack: FrameInfo[]\n duration: number\n}\n\nfunction parseBGFoldedStacks(contents: TextFileContent): BGSample[] {\n const samples: BGSample[] = []\n for (const line of contents.splitLines()) {\n const match = /^(.*) (\\d+)$/gm.exec(line)\n if (!match) continue\n const stack = match[1]\n const n = match[2]\n\n samples.push({\n stack: stack.split(';').map(name => ({key: name, name: name})),\n duration: parseInt(n, 10),\n })\n }\n\n return samples\n}\n\nexport function importFromBGFlameGraph(contents: TextFileContent): Profile | null {\n const parsed = parseBGFoldedStacks(contents)\n const duration = parsed.reduce((prev: number, cur: BGSample) => prev + cur.duration, 0)\n const profile = new StackListProfileBuilder(duration)\n if (parsed.length === 0) {\n return null\n }\n for (let sample of parsed) {\n profile.appendSampleWithWeight(sample.stack, sample.duration)\n }\n return profile.build()\n}\n", "import {Profile, FrameInfo, CallTreeProfileBuilder} from '../lib/profile'\nimport {getOrInsert} from '../lib/utils'\nimport {TimeFormatter} from '../lib/value-formatters'\n\ninterface Allocations {\n frames: any[]\n sites: any[]\n sizes: any[]\n timestamps: any[]\n}\n\ninterface Configuration {\n allocationsMaxLogLength: number\n allocationsSampleProbability: number\n bufferSize: number\n sampleFrequency: number\n withAllocations: boolean\n withMarkers: boolean\n withMemory: boolean\n withTicks: boolean\n}\n\ninterface Lib {\n arch: string\n breakpadId: string\n debugName: string\n debugPath: string\n end: any\n name: string\n offset: number\n path: string\n start: any\n}\n\ninterface Meta {\n abi: string\n asyncstack: number\n debug: number\n gcpoison: number\n interval: number\n misc: string\n oscpu: string\n platform: string\n processType: number\n product: string\n shutdownTime?: any\n stackwalk: number\n startTime: number\n toolkit: string\n version: number\n}\n\ninterface PausedRange {\n endTime: number\n reason: string\n startTime: number\n}\n\ntype Frame = [number] | [number, number | null, number | null, number, number]\n\ninterface FrameTable {\n data: Frame[]\n /*\n schema: {\n location: 0\n implementation: 1\n optimizations: 2\n line: 3\n category: 4\n }\n */\n}\n\ninterface MarkerMeta {\n category: string\n interval: string\n type: string\n}\ntype Marker = [number, number] | [number, number, MarkerMeta]\n\ninterface Markers {\n data: Marker[]\n /*\n schema: {\n name: 0\n time: 1\n data: 2\n }\n */\n}\n\ntype Sample = [number, number, number] | [number, number, number, number, number]\n\ninterface Samples {\n data: Sample[]\n /*\n schema: {\n stack: 0\n time: 1\n responsiveness: 2\n rss: 3\n uss: 4\n }\n */\n}\n\nexport interface StackTable {\n data: [number | null, number][]\n /*\n schema: {\n prefix: 0\n frame: 1\n }\n */\n}\n\nexport interface Thread {\n frameTable: FrameTable\n markers: Markers\n name: string\n pid: number\n processType: string\n registerTime: number\n samples: Samples\n stackTable: StackTable\n stringTable: string[]\n tid: number\n unregisterTime?: any\n}\n\nexport interface FirefoxCPUProfile {\n libs: Lib[]\n meta: Meta\n pausedRanges: PausedRange[]\n processes: any[]\n threads: Thread[]\n}\n\nexport interface FirefoxProfile {\n allocations: Allocations\n configuration: Configuration\n duration: number\n fileType: string\n frames: any[]\n label: string\n markers: any[]\n memory: any[]\n profile: FirefoxCPUProfile\n ticks: any[]\n version: number\n}\n\nexport function importFromFirefox(firefoxProfile: FirefoxProfile): Profile {\n const cpuProfile = firefoxProfile.profile\n\n const thread =\n cpuProfile.threads.length === 1\n ? cpuProfile.threads[0]\n : cpuProfile.threads.filter(t => t.name === 'GeckoMain')[0]\n\n const frameKeyToFrameInfo = new Map()\n\n function extractStack(sample: Sample): FrameInfo[] {\n let stackFrameId: number | null = sample[0]\n const ret: number[] = []\n\n while (stackFrameId != null) {\n const nextStackFrame: [number | null, number] = thread.stackTable.data[stackFrameId]\n const [nextStackId, frameId] = nextStackFrame\n ret.push(frameId)\n stackFrameId = nextStackId\n }\n ret.reverse()\n return ret\n .map(f => {\n const frameData = thread.frameTable.data[f]\n const location = thread.stringTable[frameData[0]]\n\n const match = /(.*)\\s+\\((.*?)(?::(\\d+))?(?::(\\d+))?\\)$/.exec(location)\n\n if (!match) return null\n\n if (\n match[2].startsWith('resource:') ||\n match[2] === 'self-hosted' ||\n match[2].startsWith('self-hosted:')\n ) {\n // Ignore Firefox-internals stuff\n return null\n }\n\n return getOrInsert(frameKeyToFrameInfo, location, () => ({\n key: location,\n name: match[1]!,\n file: match[2]!,\n\n // In Firefox profiles, line numbers are 1-based, but columns are\n // 0-based. Let's normalize both to be 1-based.\n line: match[3] ? parseInt(match[3]) : undefined,\n col: match[4] ? parseInt(match[4]) + 1 : undefined,\n }))\n })\n .filter(f => f != null) as FrameInfo[]\n }\n\n const profile = new CallTreeProfileBuilder(firefoxProfile.duration)\n\n let prevStack: FrameInfo[] = []\n for (let sample of thread.samples.data) {\n const stack = extractStack(sample)\n const value = sample[1]\n\n // Find lowest common ancestor of the current stack and the previous one\n let lcaIndex = -1\n\n for (let i = 0; i < Math.min(stack.length, prevStack.length); i++) {\n if (prevStack[i] !== stack[i]) {\n break\n }\n lcaIndex = i\n }\n\n // Close frames that are no longer open\n for (let i = prevStack.length - 1; i > lcaIndex; i--) {\n profile.leaveFrame(prevStack[i], value)\n }\n\n for (let i = lcaIndex + 1; i < stack.length; i++) {\n profile.enterFrame(stack[i], value)\n }\n\n prevStack = stack\n }\n\n profile.setValueFormatter(new TimeFormatter('milliseconds'))\n return profile.build()\n}\n", "import {Profile, FrameInfo, StackListProfileBuilder} from '../lib/profile'\nimport {getOrInsert, sortBy} from '../lib/utils'\nimport {TimeFormatter} from '../lib/value-formatters'\n\n// This imports profiles generated by a combination of the following commands:\n//\n// node --prof /path/to/my/script.js\n// node --prof-process -preprocess -j isolate*.log > profile.v8log.json\n\n// References:\n// - https://github.com/nodejs/node/blob/7edd0a17af8d74dce7dd6c7554a8b8523f83efdc/lib/internal/v8_prof_processor.js#L5\n// - https://github.com/nodejs/node/blob/7edd0a17af8d74dce7dd6c7554a8b8523f83efdc/deps/v8/tools/tickprocessor.js\n// - https://github.com/nodejs/node/blob/2db2857c72c219e5ba1642a345e52cfdd8c44a66/deps/v8/tools/logreader.js#L147\n// - https://github.com/mapbox/flamebearer/blob/a8d4d5c0061ed439660783c613c43ab28b751219/index.js#L53\n\ninterface Code {\n name: string\n type: 'CODE' | 'CPP' | 'JS' | 'SHARED_LIB'\n timestamp?: number\n kind?:\n | 'Bultin'\n | 'BytecodeHandler'\n | 'Handler'\n | 'KeyedLoadIC'\n | 'KeyedStoreIC'\n | 'LoadGlobalIC'\n | 'LoadIC'\n | 'Opt'\n | 'StoreIC'\n | 'Stub'\n | 'Unopt'\n | 'Builtin'\n | 'RegExp'\n func?: number\n tm?: number\n}\n\ninterface Function {\n name: string\n codes: number[]\n}\n\ninterface Tick {\n // Timestamp\n tm: number\n\n // Virtual machine state?\n vm: number\n\n // stack\n s: number[]\n}\n\ninterface V8LogProfile {\n code: Code[]\n functions: Function[]\n ticks: Tick[]\n}\n\nfunction codeToFrameInfo(code: Code, v8log: V8LogProfile): FrameInfo {\n if (!code || !code.type) {\n return {\n key: '(unknown type)',\n name: '(unknown type)',\n }\n }\n\n let name = code.name\n switch (code.type) {\n case 'CPP': {\n const matches = name.match(/[tT] ([^(<]*)/)\n if (matches) name = `(c++) ${matches[1]}`\n break\n }\n\n case 'SHARED_LIB':\n name = '(LIB) ' + name\n break\n\n case 'JS': {\n const matches = name.match(/([a-zA-Z0-9\\._\\-$]*) ([a-zA-Z0-9\\.\\-_\\/$]*):(\\d+):(\\d+)/)\n if (matches) {\n const file = matches[2]\n const line = parseInt(matches[3], 10)\n const col = parseInt(matches[4], 10)\n const functionName =\n matches[1].length > 0\n ? matches[1]\n : file\n ? `(anonymous ${file.split('/').pop()}:${line})`\n : '(anonymous)'\n return {\n key: name,\n name: functionName,\n file: file.length > 0 ? file : '(unknown file)',\n line,\n col,\n }\n }\n break\n }\n\n case 'CODE': {\n switch (code.kind) {\n case 'LoadIC':\n case 'StoreIC':\n case 'KeyedStoreIC':\n case 'KeyedLoadIC':\n case 'LoadGlobalIC':\n case 'Handler':\n name = '(IC) ' + name\n break\n\n case 'BytecodeHandler':\n name = '(bytecode) ~' + name\n break\n case 'Stub':\n name = '(stub) ' + name\n break\n case 'Builtin':\n name = '(builtin) ' + name\n break\n case 'RegExp':\n name = '(regexp) ' + name\n break\n }\n break\n }\n\n default: {\n name = `(${code.type}) ${name}`\n break\n }\n }\n\n return {key: name, name}\n}\n\nexport function importFromV8ProfLog(v8log: V8LogProfile): Profile {\n const profile = new StackListProfileBuilder()\n\n const sToFrameInfo = new Map()\n function getFrameInfo(t: number) {\n return getOrInsert(sToFrameInfo, t, t => {\n const code = v8log.code[t]\n return codeToFrameInfo(code, v8log)\n })\n }\n\n let lastTm = 0\n\n sortBy(v8log.ticks, tick => tick.tm)\n\n for (let tick of v8log.ticks) {\n const stack: FrameInfo[] = []\n\n // tick.s holds the call stack at the time the sample was taken. The\n // structure is a little strange -- it seems to be capturing both the\n // JavaScript stack & the parallel C++ stack by interleaving the two.\n // Because the stacks might not be the same length, it looks like the\n // shorter stack is padded with indices of -1, so we'll just ignore those\n // stacks.\n //\n // If you change the start index to `let i = tick.s.length - 1` instead,\n // you'll see the C++ stack instead.\n //\n // Mostly the numbers in the stack seem to be indices into the `v8log.code`\n // array, but some of the numbers in the C++ stack seem to be raw memory\n // addresses.\n\n for (let i = tick.s.length - 2; i >= 0; i -= 2) {\n const id = tick.s[i]\n\n if (id === -1) continue\n if (id > v8log.code.length) {\n // Treat this like a memory address\n stack.push({\n key: id,\n name: `0x${id.toString(16)}`,\n })\n continue\n }\n stack.push(getFrameInfo(id))\n }\n profile.appendSampleWithWeight(stack, tick.tm - lastTm)\n lastTm = tick.tm\n }\n\n // Despite the code in the v8 processing library indicating that the\n // timestamps come from a variable called \"time_ns\", from making empirical\n // recordings, it really seems like these profiles are recording timestamps in\n // microseconds, not nanoseconds.\n // https://github.com/nodejs/node/blob/c39caa997c751473d0c8f50af8c6b14bcd389fa0/deps/v8/tools/profile.js#L1076\n profile.setValueFormatter(new TimeFormatter('microseconds'))\n\n return profile.build()\n}\n", "import {StackListProfileBuilder, ProfileGroup} from '../lib/profile'\nimport {itMap, getOrInsert} from '../lib/utils'\nimport {TimeFormatter} from '../lib/value-formatters'\nimport {TextFileContent} from './utils'\n\n// This imports the output of the \"perf script\" command on linux.\n//\n// Reference: https://github.com/torvalds/linux/blob/0fbc4aea/tools/perf/builtin-script.c#L1622\n// Reference: https://github.com/brendangregg/FlameGraph/blob/18c3dea/stackcollapse-perf.pl#L163\n\ninterface PerfStackFrame {\n address: string\n symbolName: string\n file: string\n}\n\ninterface PerfEvent {\n command: string | null\n processID: number | null\n threadID: number | null\n time: number | null\n eventType: string\n stack: PerfStackFrame[]\n}\n\nfunction* parseEvents(contents: TextFileContent): Generator {\n let buffer: string[] = []\n for (let line of contents.splitLines()) {\n if (line === '') {\n yield parseEvent(buffer)\n buffer = []\n } else buffer.push(line)\n }\n\n if (buffer.length > 0) yield parseEvent(buffer)\n}\n\n// rawEvent is splitted into lines\nfunction parseEvent(rawEvent: string[]): PerfEvent | null {\n const lines = rawEvent.filter(l => !/^\\s*#/.exec(l))\n\n const event: PerfEvent = {\n command: null,\n processID: null,\n threadID: null,\n time: null,\n eventType: '',\n stack: [],\n }\n\n const firstLine = lines.shift()\n if (!firstLine) return null\n\n // Note: command name may contain spaces, e.g.\n //\n // V8 WorkerThread 25607 4794564.109216: cycles:\n const eventStartMatch = /^(\\S.+?)\\s+(\\d+)(?:\\/?(\\d+))?\\s+/.exec(firstLine)\n if (!eventStartMatch) return null\n\n event.command = eventStartMatch[1]\n\n // default \"perf script\" output has TID but not PID\n if (eventStartMatch[3]) {\n event.processID = parseInt(eventStartMatch[2], 10)\n event.threadID = parseInt(eventStartMatch[3], 10)\n } else {\n event.threadID = parseInt(eventStartMatch[2], 10)\n }\n\n const timeMatch = /\\s+(\\d+\\.\\d+):\\s+/.exec(firstLine)\n if (timeMatch) {\n event.time = parseFloat(timeMatch[1])\n }\n\n const evName = /(\\S+):\\s*$/.exec(firstLine)\n if (evName) {\n event.eventType = evName[1]\n }\n\n for (let line of lines) {\n const lineMatch = /^\\s*(\\w+)\\s*(.+) \\((\\S*)\\)/.exec(line)\n if (!lineMatch) continue\n let [, address, symbolName, file] = lineMatch\n\n // Linux 4.8 included symbol offsets in perf script output by default, eg:\n // 7fffb84c9afc cpu_startup_entry+0x800047c022ec ([kernel.kallsyms])\n // strip these off:\n symbolName = symbolName.replace(/\\+0x[\\da-f]+$/, '')\n\n event.stack.push({address: `0x${address}`, symbolName, file})\n }\n event.stack.reverse()\n\n return event\n}\n\nexport function importFromLinuxPerf(contents: TextFileContent): ProfileGroup | null {\n const profiles = new Map()\n\n let eventType: string | null = null\n\n for (let event of parseEvents(contents)) {\n if (event == null) continue\n if (eventType != null && eventType != event.eventType) continue\n if (event.time == null) continue\n eventType = event.eventType\n\n let profileNameParts = []\n if (event.command) profileNameParts.push(event.command)\n if (event.processID) profileNameParts.push(`pid: ${event.processID}`)\n if (event.threadID) profileNameParts.push(`tid: ${event.threadID}`)\n const profileName = profileNameParts.join(' ')\n const builderState = getOrInsert(profiles, profileName, () => {\n const builder = new StackListProfileBuilder()\n builder.setName(profileName)\n builder.setValueFormatter(new TimeFormatter('seconds'))\n return builder\n })\n\n const builder = builderState\n\n builder.appendSampleWithTimestamp(\n event.stack.map(({symbolName, file}) => {\n return {\n key: `${symbolName} (${file})`,\n name: symbolName === '[unknown]' ? `??? (${file})` : symbolName,\n file: file,\n }\n }),\n event.time!,\n )\n }\n\n if (profiles.size === 0) {\n return null\n }\n\n return {\n name: profiles.size === 1 ? Array.from(profiles.keys())[0] : '',\n indexToView: 0,\n profiles: Array.from(itMap(profiles.values(), builder => builder.build())),\n }\n}\n", "import {ProfileGroup, FrameInfo, CallTreeProfileBuilder} from '../lib/profile'\nimport {TimeFormatter, ByteFormatter} from '../lib/value-formatters'\n\n// See https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.html#json-profile-format\n// for information on the GHC profiler JSON output format.\n\ninterface CostCentre {\n id: number\n label: string\n module: string\n src_loc: string\n is_caf: boolean\n}\n\ninterface ProfileTree {\n id: number\n entries: number\n alloc: number\n ticks: number\n children: ProfileTree[]\n}\n\ninterface HaskellProfile {\n program: string\n arguments: string[]\n rts_arguments: string[]\n end_time: string\n initial_capabilities: number\n total_time: number\n total_ticks: number\n tick_interval: number\n total_alloc: number\n cost_centres: CostCentre[]\n profile: ProfileTree\n}\n\n// The profiler already collapses recursion before output so using the JS stack here should be fine\nfunction addToProfile(\n tree: ProfileTree,\n startVal: number,\n profile: CallTreeProfileBuilder,\n infos: Map,\n attribute: (tree: ProfileTree) => number,\n): number {\n // If the expression never did anything we don't care about it\n if (tree.ticks === 0 && tree.entries === 0 && tree.alloc === 0 && tree.children.length === 0)\n return startVal\n\n let curVal = startVal\n let frameInfo = infos.get(tree.id)!\n\n profile.enterFrame(frameInfo, curVal)\n\n for (let child of tree.children) {\n curVal = addToProfile(child, curVal, profile, infos, attribute)\n }\n\n curVal += attribute(tree)\n\n profile.leaveFrame(frameInfo, curVal)\n\n return curVal\n}\n\nexport function importFromHaskell(haskellProfile: HaskellProfile): ProfileGroup {\n const idToFrameInfo = new Map()\n for (let centre of haskellProfile.cost_centres) {\n const frameInfo: FrameInfo = {\n key: centre.id,\n name: `${centre.module}.${centre.label}`,\n }\n\n // Ignore things like and \n if (!centre.src_loc.startsWith('<')) {\n // This also contains line and column information, but sometimes it contains ranges,\n // and in varying formats, so it's a better experience just to leave it as is\n frameInfo.file = centre.src_loc\n }\n\n idToFrameInfo.set(centre.id, frameInfo)\n }\n\n const timeProfile = new CallTreeProfileBuilder(haskellProfile.total_ticks)\n addToProfile(haskellProfile.profile, 0, timeProfile, idToFrameInfo, tree => tree.ticks)\n timeProfile.setValueFormatter(new TimeFormatter('milliseconds'))\n timeProfile.setName(`${haskellProfile.program} time`)\n\n const allocProfile = new CallTreeProfileBuilder(haskellProfile.total_ticks)\n addToProfile(haskellProfile.profile, 0, allocProfile, idToFrameInfo, tree => tree.alloc)\n allocProfile.setValueFormatter(new ByteFormatter())\n allocProfile.setName(`${haskellProfile.program} allocation`)\n\n return {\n name: haskellProfile.program,\n indexToView: 0,\n profiles: [timeProfile.build(), allocProfile.build()],\n }\n}\n", "import {Profile, FrameInfo, StackListProfileBuilder} from '../lib/profile'\nimport {TimeFormatter} from '../lib/value-formatters'\n\ninterface Record {\n type: string\n eventType?: string\n startTime?: number\n endTime?: number\n // timeline-record-type-cpu\n timestamp?: number\n usage?: number\n threads?: any[]\n // timeline-record-type-script\n details?: number | string | any\n extraDetails?: null | any\n // timeline-record-type-network\n archiveStartTime?: number\n entry?: any\n // timeline-record-type-layout\n quad?: number[]\n}\n\ninterface ExprLocation {\n line: number\n column: number\n}\n\ninterface StackFrame {\n sourceID: string\n name: string\n line: number\n column: number\n url: string\n expressionLocation?: ExprLocation\n}\n\ninterface Sample {\n timestamp: number\n stackFrames: StackFrame[]\n}\n\ninterface Recording {\n displayName: string\n startTime: number\n endTime: number\n discontinuities: any[]\n instrumentTypes: string[]\n records: Record[]\n markers: any[]\n memoryPressureEvents: any[]\n sampleStackTraces: Sample[]\n sampleDurations: number[]\n}\n\ninterface Overview {\n secondsPerPixel: number\n scrollStartTime: number\n selectionStartTime: number\n selectionDuration: number\n}\n\ninterface SafariProfile {\n version: number\n recording: Recording\n overview: Overview\n}\n\nfunction makeStack(frames: StackFrame[]): FrameInfo[] {\n return frames\n .map(({name, url, line, column}) => ({\n key: `${name}:${url}:${line}:${column}`,\n file: url,\n line,\n col: column,\n name: name || (url ? `(anonymous ${url.split('/').pop()}:${line})` : '(anonymous)'),\n }))\n .reverse()\n}\n\nexport function importFromSafari(contents: SafariProfile): Profile | null {\n if (contents.version !== 1) {\n console.warn(`Unknown Safari profile version ${contents.version}... Might be incompatible.`)\n }\n\n const {recording} = contents\n const {sampleStackTraces, sampleDurations} = recording\n\n const count = sampleStackTraces.length\n if (count < 1) {\n console.warn('Empty profile')\n return null\n }\n\n const profileDuration =\n sampleStackTraces[count - 1].timestamp - sampleStackTraces[0].timestamp + sampleDurations[0]\n const profile = new StackListProfileBuilder(profileDuration)\n\n let previousEndTime = Number.MAX_VALUE\n\n sampleStackTraces.forEach((sample, i) => {\n const endTime = sample.timestamp\n const duration = sampleDurations[i]\n const startTime = endTime - duration\n const idleDurationBefore = startTime - previousEndTime\n\n // FIXME: 2ms is a lot, but Safari's timestamps and durations don't line up very well and will create\n // phantom idle time\n if (idleDurationBefore > 0.002) {\n profile.appendSampleWithWeight([], idleDurationBefore)\n }\n\n profile.appendSampleWithWeight(makeStack(sample.stackFrames), duration)\n\n previousEndTime = endTime\n })\n\n profile.setValueFormatter(new TimeFormatter('seconds'))\n profile.setName(recording.displayName)\n return profile.build()\n}\n", "\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n", "\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n", "\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n", "\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n", "\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n", "\"use strict\";\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(\"../util/minimal\");\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low 32 bits, unsigned\r\n * @param {number} hi High 32 bits, unsigned\r\n */\r\nfunction LongBits(lo, hi) {\r\n\r\n // note that the casts below are theoretically unnecessary as of today, but older statically\r\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo >>> 0;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi >>> 0;\r\n}\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Zero hash.\r\n * @memberof util.LongBits\r\n * @type {string}\r\n */\r\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n if (sign)\r\n value = -value;\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (util.isString(value)) {\r\n /* istanbul ignore else */\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBits.prototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n var lo = ~this.lo + 1 >>> 0,\r\n hi = ~this.hi >>> 0;\r\n if (!lo)\r\n hi = hi + 1 >>> 0;\r\n return -(lo + hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBits.prototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n /* istanbul ignore next */\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n if (hash === zeroHash)\r\n return zero;\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBits.prototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBits.prototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBits.prototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBits.prototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n", "\"use strict\";\r\nvar util = exports;\r\n\r\n// used to return a Promise where callback is omitted\r\nutil.asPromise = require(\"@protobufjs/aspromise\");\r\n\r\n// converts to / from base64 encoded strings\r\nutil.base64 = require(\"@protobufjs/base64\");\r\n\r\n// base class of rpc.Service\r\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\r\n\r\n// float handling accross browsers\r\nutil.float = require(\"@protobufjs/float\");\r\n\r\n// requires modules optionally and hides the call from bundlers\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\n\r\n// converts to / from utf8 encoded strings\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\n\r\n// provides a node-like buffer pool in the browser\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n// utility to work with the low and high bits of a 64 bit value\r\nutil.LongBits = require(\"./longbits\");\r\n\r\n// global object reference\r\nutil.global = typeof window !== \"undefined\" && window\r\n || typeof global !== \"undefined\" && global\r\n || typeof self !== \"undefined\" && self\r\n || this; // eslint-disable-line no-invalid-this\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n * @const\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n * @const\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n * @const\r\n */\r\nutil.isNode = Boolean(util.global.process && util.global.process.versions && util.global.process.versions.node);\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Checks if a property on a message is considered to be present.\r\n * This is an alias of {@link util.isSet}.\r\n * @function\r\n * @param {Object} obj Plain object or message instance\r\n * @param {string} prop Property name\r\n * @returns {boolean} `true` if considered to be present, otherwise `false`\r\n */\r\nutil.isset =\r\n\r\n/**\r\n * Checks if a property on a message is considered to be present.\r\n * @param {Object} obj Plain object or message instance\r\n * @param {string} prop Property name\r\n * @returns {boolean} `true` if considered to be present, otherwise `false`\r\n */\r\nutil.isSet = function isSet(obj, prop) {\r\n var value = obj[prop];\r\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\r\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\r\n return false;\r\n};\r\n\r\n/**\r\n * Any compatible Buffer instance.\r\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\r\n * @interface Buffer\r\n * @extends Uint8Array\r\n */\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {Constructor}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\r\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\r\n } catch (e) {\r\n /* istanbul ignore next */\r\n return null;\r\n }\r\n})();\r\n\r\n// Internal alias of or polyfull for Buffer.from.\r\nutil._Buffer_from = null;\r\n\r\n// Internal alias of or polyfill for Buffer.allocUnsafe.\r\nutil._Buffer_allocUnsafe = null;\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\r\n * @returns {Uint8Array|Buffer} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(sizeOrArray) {\r\n /* istanbul ignore next */\r\n return typeof sizeOrArray === \"number\"\r\n ? util.Buffer\r\n ? util._Buffer_allocUnsafe(sizeOrArray)\r\n : new util.Array(sizeOrArray)\r\n : util.Buffer\r\n ? util._Buffer_from(sizeOrArray)\r\n : typeof Uint8Array === \"undefined\"\r\n ? sizeOrArray\r\n : new Uint8Array(sizeOrArray);\r\n};\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {Constructor}\r\n */\r\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\r\n * @interface Long\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {Constructor}\r\n */\r\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\r\n || /* istanbul ignore next */ util.global.Long\r\n || util.inquire(\"long\");\r\n\r\n/**\r\n * Regular expression used to verify 2 bit (`bool`) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key2Re = /^true|false|0|1$/;\r\n\r\n/**\r\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\r\n\r\n/**\r\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : util.LongBits.zeroHash;\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @memberof util\r\n * @param {Object.} dst Destination object\r\n * @param {Object.} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object.} Destination object\r\n */\r\nfunction merge(dst, src, ifNotSet) { // used by converters\r\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n return dst;\r\n}\r\n\r\nutil.merge = merge;\r\n\r\n/**\r\n * Converts the first character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) {\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a custom error constructor.\r\n * @memberof util\r\n * @param {string} name Error name\r\n * @returns {Constructor} Custom error constructor\r\n */\r\nfunction newError(name) {\r\n\r\n function CustomError(message, properties) {\r\n\r\n if (!(this instanceof CustomError))\r\n return new CustomError(message, properties);\r\n\r\n // Error.call(this, message);\r\n // ^ just returns a new error instance because the ctor can be called as a function\r\n\r\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\r\n\r\n /* istanbul ignore next */\r\n if (Error.captureStackTrace) // node\r\n Error.captureStackTrace(this, CustomError);\r\n else\r\n Object.defineProperty(this, \"stack\", { value: (new Error()).stack || \"\" });\r\n\r\n if (properties)\r\n merge(this, properties);\r\n }\r\n\r\n (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;\r\n\r\n Object.defineProperty(CustomError.prototype, \"name\", { get: function() { return name; } });\r\n\r\n CustomError.prototype.toString = function toString() {\r\n return this.name + \": \" + this.message;\r\n };\r\n\r\n return CustomError;\r\n}\r\n\r\nutil.newError = newError;\r\n\r\n/**\r\n * Constructs a new protocol error.\r\n * @classdesc Error subclass indicating a protocol specifc error.\r\n * @memberof util\r\n * @extends Error\r\n * @template T extends Message\r\n * @constructor\r\n * @param {string} message Error message\r\n * @param {Object.} [properties] Additional properties\r\n * @example\r\n * try {\r\n * MyMessage.decode(someBuffer); // throws if required fields are missing\r\n * } catch (e) {\r\n * if (e instanceof ProtocolError && e.instance)\r\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\r\n * }\r\n */\r\nutil.ProtocolError = newError(\"ProtocolError\");\r\n\r\n/**\r\n * So far decoded message instance.\r\n * @name util.ProtocolError#instance\r\n * @type {Message}\r\n */\r\n\r\n/**\r\n * A OneOf getter as returned by {@link util.oneOfGetter}.\r\n * @typedef OneOfGetter\r\n * @type {function}\r\n * @returns {string|undefined} Set field name, if any\r\n */\r\n\r\n/**\r\n * Builds a getter for a oneof's present field name.\r\n * @param {string[]} fieldNames Field names\r\n * @returns {OneOfGetter} Unbound getter\r\n */\r\nutil.oneOfGetter = function getOneOf(fieldNames) {\r\n var fieldMap = {};\r\n for (var i = 0; i < fieldNames.length; ++i)\r\n fieldMap[fieldNames[i]] = 1;\r\n\r\n /**\r\n * @returns {string|undefined} Set field name, if any\r\n * @this Object\r\n * @ignore\r\n */\r\n return function() { // eslint-disable-line consistent-return\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\r\n return keys[i];\r\n };\r\n};\r\n\r\n/**\r\n * A OneOf setter as returned by {@link util.oneOfSetter}.\r\n * @typedef OneOfSetter\r\n * @type {function}\r\n * @param {string|undefined} value Field name\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Builds a setter for a oneof's present field name.\r\n * @param {string[]} fieldNames Field names\r\n * @returns {OneOfSetter} Unbound setter\r\n */\r\nutil.oneOfSetter = function setOneOf(fieldNames) {\r\n\r\n /**\r\n * @param {string} name Field name\r\n * @returns {undefined}\r\n * @this Object\r\n * @ignore\r\n */\r\n return function(name) {\r\n for (var i = 0; i < fieldNames.length; ++i)\r\n if (fieldNames[i] !== name)\r\n delete this[fieldNames[i]];\r\n };\r\n};\r\n\r\n/**\r\n * Default conversion options used for {@link Message#toJSON} implementations.\r\n *\r\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\r\n *\r\n * - Longs become strings\r\n * - Enums become string keys\r\n * - Bytes become base64 encoded strings\r\n * - (Sub-)Messages become plain objects\r\n * - Maps become plain objects with all string keys\r\n * - Repeated fields become arrays\r\n * - NaN and Infinity for float and double fields become strings\r\n *\r\n * @type {IConversionOptions}\r\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\r\n */\r\nutil.toJSONOptions = {\r\n longs: String,\r\n enums: String,\r\n bytes: String,\r\n json: true\r\n};\r\n\r\n// Sets up buffer utility according to the environment (called in index-minimal)\r\nutil._configure = function() {\r\n var Buffer = util.Buffer;\r\n /* istanbul ignore if */\r\n if (!Buffer) {\r\n util._Buffer_from = util._Buffer_allocUnsafe = null;\r\n return;\r\n }\r\n // because node 4.x buffers are incompatible & immutable\r\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\r\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\r\n /* istanbul ignore next */\r\n function Buffer_from(value, encoding) {\r\n return new Buffer(value, encoding);\r\n };\r\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\r\n /* istanbul ignore next */\r\n function Buffer_allocUnsafe(size) {\r\n return new Buffer(size);\r\n };\r\n};\r\n", "\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\nvar BufferWriter; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n base64 = util.base64,\r\n utf8 = util.utf8;\r\n\r\n/**\r\n * Constructs a new writer operation instance.\r\n * @classdesc Scheduled writer operation.\r\n * @constructor\r\n * @param {function(*, Uint8Array, number)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {*} val Value to write\r\n * @ignore\r\n */\r\nfunction Op(fn, len, val) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {Writer.Op|undefined}\r\n */\r\n this.next = undefined;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val; // type varies\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state instance.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n\r\n /**\r\n * Next state.\r\n * @type {State|null}\r\n */\r\n this.next = writer.states;\r\n}\r\n\r\n/**\r\n * Constructs a new writer instance.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * Linked forked states.\r\n * @type {Object|null}\r\n */\r\n this.states = null;\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling operations with already prepared values.\r\n}\r\n\r\n/**\r\n * Creates a new writer.\r\n * @function\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = util.Buffer\r\n ? function create_buffer_setup() {\r\n return (Writer.create = function create_buffer() {\r\n return new BufferWriter();\r\n })();\r\n }\r\n /* istanbul ignore next */\r\n : function create_array() {\r\n return new Writer();\r\n };\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new util.Array(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\n/* istanbul ignore else */\r\nif (util.Array !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n * @private\r\n */\r\nWriter.prototype._push = function push(fn, len, val) {\r\n this.tail = this.tail.next = new Op(fn, len, val);\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(val, buf, pos) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\nfunction writeVarint32(val, buf, pos) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Constructs a new varint writer operation instance.\r\n * @classdesc Scheduled varint writer operation.\r\n * @extends Op\r\n * @constructor\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @ignore\r\n */\r\nfunction VarintOp(len, val) {\r\n this.len = len;\r\n this.next = undefined;\r\n this.val = val;\r\n}\r\n\r\nVarintOp.prototype = Object.create(Op.prototype);\r\nVarintOp.prototype.fn = writeVarint32;\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.uint32 = function write_uint32(value) {\r\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\r\n // uint32 is by far the most frequently used operation and benefits significantly from this.\r\n this.len += (this.tail = this.tail.next = new VarintOp(\r\n (value = value >>> 0)\r\n < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5,\r\n value)).len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this._push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.int64 = Writer.prototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this._push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.bool = function write_bool(value) {\r\n return this._push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.fixed32 = function write_fixed32(value) {\r\n return this._push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as fixed 32 bits.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as fixed 64 bits.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.float = function write_float(value) {\r\n return this._push(util.float.writeFloatLE, 4, value);\r\n};\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.double = function write_double(value) {\r\n return this._push(util.float.writeDoubleLE, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos); // also works for plain array values\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (!len)\r\n return this._push(writeByte, 1, 0);\r\n if (util.isString(value)) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return this.uint32(len)._push(writeBytes, len, value);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len)._push(utf8.write, len, value)\r\n : this._push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset().uint32(len);\r\n if (len) {\r\n this.tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriter.prototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n\r\nWriter._configure = function(BufferWriter_) {\r\n BufferWriter = BufferWriter_;\r\n};\r\n", "\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\n// extends Writer\r\nvar Writer = require(\"./writer\");\r\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\nvar Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Buffer} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = util._Buffer_allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n // also works for plain array values\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n if (val.copy) // Buffer values\r\n val.copy(buf, pos, 0, val.length);\r\n else for (var i = 0; i < val.length;) // plain array values\r\n buf[pos++] = val[i++];\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\r\n if (util.isString(value))\r\n value = util._Buffer_from(value, \"base64\");\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this._push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n util.utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriter.prototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this._push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @name BufferWriter#finish\r\n * @function\r\n * @returns {Buffer} Finished buffer\r\n */\r\n", "\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\nvar create_array = typeof Uint8Array !== \"undefined\"\r\n ? function create_typed_array(buffer) {\r\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\r\n return new Reader(buffer);\r\n throw Error(\"illegal buffer\");\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n if (Array.isArray(buffer))\r\n return new Reader(buffer);\r\n throw Error(\"illegal buffer\");\r\n };\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array|Buffer} buffer Buffer to read from\r\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n * @throws {Error} If `buffer` is not a valid buffer\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n return (Reader.create = function create_buffer(buffer) {\r\n return util.Buffer.isBuffer(buffer)\r\n ? new BufferReader(buffer)\r\n /* istanbul ignore next */\r\n : create_array(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : create_array;\r\n\r\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore if */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0, 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n i = 0;\r\n } else {\r\n for (; i < 3; ++i) {\r\n /* istanbul ignore if */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..3th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 4th\r\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (; i < 5; ++i) {\r\n /* istanbul ignore if */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n /* istanbul ignore next */\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReader.prototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as an unsigned 32 bit integer.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32_end(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads fixed 32 bits as a signed 32 bit integer.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.sfixed32 = function read_sfixed32() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32_end(this.buf, this.pos += 4) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long} Value read\r\n */\r\n\r\n/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.float = function read_float() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = util.float.readFloatLE(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.double = function read_double() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = util.float.readDoubleLE(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReader.prototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore if */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n if (Array.isArray(this.buf)) // plain array\r\n return this.buf.slice(start, end);\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReader.prototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReader.prototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore if */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore if */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReader.prototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n while ((wireType = this.uint32() & 7) !== 4) {\r\n this.skipType(wireType);\r\n }\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\r\n }\r\n return this;\r\n};\r\n\r\nReader._configure = function(BufferReader_) {\r\n BufferReader = BufferReader_;\r\n\r\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\r\n util.merge(Reader.prototype, {\r\n\r\n int64: function read_int64() {\r\n return readLongVarint.call(this)[fn](false);\r\n },\r\n\r\n uint64: function read_uint64() {\r\n return readLongVarint.call(this)[fn](true);\r\n },\r\n\r\n sint64: function read_sint64() {\r\n return readLongVarint.call(this).zzDecode()[fn](false);\r\n },\r\n\r\n fixed64: function read_fixed64() {\r\n return readFixed64.call(this)[fn](true);\r\n },\r\n\r\n sfixed64: function read_sfixed64() {\r\n return readFixed64.call(this)[fn](false);\r\n }\r\n\r\n });\r\n};\r\n", "\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\n// extends Reader\r\nvar Reader = require(\"./reader\");\r\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n\r\n /**\r\n * Read buffer.\r\n * @name BufferReader#buf\r\n * @type {Buffer}\r\n */\r\n}\r\n\r\n/* istanbul ignore else */\r\nif (util.Buffer)\r\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReader.prototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @name BufferReader#bytes\r\n * @function\r\n * @returns {Buffer} Value read\r\n */\r\n", "\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(\"../util/minimal\");\r\n\r\n// Extends EventEmitter\r\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\r\n\r\n/**\r\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\r\n *\r\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\r\n * @typedef rpc.ServiceMethodCallback\r\n * @template TRes extends Message\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {TRes} [response] Response message\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\r\n * @typedef rpc.ServiceMethod\r\n * @template TReq extends Message\r\n * @template TRes extends Message\r\n * @type {function}\r\n * @param {TReq|Properties} request Request message or plain object\r\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\r\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\r\n */\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @exports rpc.Service\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n */\r\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\r\n\r\n if (typeof rpcImpl !== \"function\")\r\n throw TypeError(\"rpcImpl must be a function\");\r\n\r\n util.EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {RPCImpl|null}\r\n */\r\n this.rpcImpl = rpcImpl;\r\n\r\n /**\r\n * Whether requests are length-delimited.\r\n * @type {boolean}\r\n */\r\n this.requestDelimited = Boolean(requestDelimited);\r\n\r\n /**\r\n * Whether responses are length-delimited.\r\n * @type {boolean}\r\n */\r\n this.responseDelimited = Boolean(responseDelimited);\r\n}\r\n\r\n/**\r\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\r\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\r\n * @param {Constructor} requestCtor Request constructor\r\n * @param {Constructor} responseCtor Response constructor\r\n * @param {TReq|Properties} request Request message or plain object\r\n * @param {rpc.ServiceMethodCallback} callback Service callback\r\n * @returns {undefined}\r\n * @template TReq extends Message\r\n * @template TRes extends Message\r\n */\r\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\r\n\r\n if (!request)\r\n throw TypeError(\"request must be specified\");\r\n\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\r\n\r\n if (!self.rpcImpl) {\r\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\r\n return undefined;\r\n }\r\n\r\n try {\r\n return self.rpcImpl(\r\n method,\r\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\r\n function rpcCallback(err, response) {\r\n\r\n if (err) {\r\n self.emit(\"error\", err, method);\r\n return callback(err);\r\n }\r\n\r\n if (response === null) {\r\n self.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n\r\n if (!(response instanceof responseCtor)) {\r\n try {\r\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\r\n } catch (err) {\r\n self.emit(\"error\", err, method);\r\n return callback(err);\r\n }\r\n }\r\n\r\n self.emit(\"data\", response, method);\r\n return callback(null, response);\r\n }\r\n );\r\n } catch (err) {\r\n self.emit(\"error\", err, method);\r\n setTimeout(function() { callback(err); }, 0);\r\n return undefined;\r\n }\r\n};\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nService.prototype.end = function end(endedByRPC) {\r\n if (this.rpcImpl) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.rpcImpl(null, null, null);\r\n this.rpcImpl = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n", "\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCImplCallback} callback Callback function\r\n * @returns {undefined}\r\n * @example\r\n * function rpcImpl(method, requestData, callback) {\r\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\r\n * throw Error(\"no such method\");\r\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\r\n * callback(err, responseData);\r\n * });\r\n * }\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCImplCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any, otherwise `null`\r\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\nrpc.Service = require(\"./rpc/service\");\r\n", "\"use strict\";\r\nmodule.exports = {};\r\n\r\n/**\r\n * Named roots.\r\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\r\n * Can also be used manually to make roots available accross modules.\r\n * @name roots\r\n * @type {Object.}\r\n * @example\r\n * // pbjs -r myroot -o compiled.js ...\r\n *\r\n * // in another module:\r\n * require(\"./compiled.js\");\r\n *\r\n * // in any subsequent module:\r\n * var root = protobuf.roots[\"myroot\"];\r\n */\r\n", "\"use strict\";\r\nvar protobuf = exports;\r\n\r\n/**\r\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\r\n * @name build\r\n * @type {string}\r\n * @const\r\n */\r\nprotobuf.build = \"minimal\";\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\n\r\n// Utility\r\nprotobuf.util = require(\"./util/minimal\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.roots = require(\"./roots\");\r\nprotobuf.configure = configure;\r\n\r\n/* istanbul ignore next */\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure(protobuf.BufferReader);\r\n protobuf.util._configure();\r\n}\r\n\r\n// Set up buffer utility according to the environment\r\nprotobuf.Writer._configure(protobuf.BufferWriter);\r\nconfigure();\r\n", "// minimal library entry point.\r\n\r\n\"use strict\";\r\nmodule.exports = require(\"./src/index-minimal\");\r\n", "// THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT MODIFY THIS FILE MANUALLY.\n//\n// To regenerate this file, run the following in the repository root:\n//\n// node node_modules/protobufjs/cli/bin/pbjs -t static-module -w commonjs -o src/import/profile.proto.js src/import/profile.proto\n//\n// Then prepend this comment to the result.\n/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/\n'use strict'\n\nvar $protobuf = require('protobufjs/minimal')\n\n// Common aliases\nvar $Reader = $protobuf.Reader,\n $Writer = $protobuf.Writer,\n $util = $protobuf.util\n\n// Exported root namespace\nvar $root = $protobuf.roots['default'] || ($protobuf.roots['default'] = {})\n\n$root.perftools = (function() {\n /**\n * Namespace perftools.\n * @exports perftools\n * @namespace\n */\n var perftools = {}\n\n perftools.profiles = (function() {\n /**\n * Namespace profiles.\n * @memberof perftools\n * @namespace\n */\n var profiles = {}\n\n profiles.Profile = (function() {\n /**\n * Properties of a Profile.\n * @memberof perftools.profiles\n * @interface IProfile\n * @property {Array.|null} [sampleType] Profile sampleType\n * @property {Array.|null} [sample] Profile sample\n * @property {Array.|null} [mapping] Profile mapping\n * @property {Array.|null} [location] Profile location\n * @property {Array.|null} [\"function\"] Profile function\n * @property {Array.|null} [stringTable] Profile stringTable\n * @property {number|Long|null} [dropFrames] Profile dropFrames\n * @property {number|Long|null} [keepFrames] Profile keepFrames\n * @property {number|Long|null} [timeNanos] Profile timeNanos\n * @property {number|Long|null} [durationNanos] Profile durationNanos\n * @property {perftools.profiles.IValueType|null} [periodType] Profile periodType\n * @property {number|Long|null} [period] Profile period\n * @property {Array.|null} [comment] Profile comment\n * @property {number|Long|null} [defaultSampleType] Profile defaultSampleType\n */\n\n /**\n * Constructs a new Profile.\n * @memberof perftools.profiles\n * @classdesc Represents a Profile.\n * @implements IProfile\n * @constructor\n * @param {perftools.profiles.IProfile=} [properties] Properties to set\n */\n function Profile(properties) {\n this.sampleType = []\n this.sample = []\n this.mapping = []\n this.location = []\n this['function'] = []\n this.stringTable = []\n this.comment = []\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]\n }\n\n /**\n * Profile sampleType.\n * @member {Array.} sampleType\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.sampleType = $util.emptyArray\n\n /**\n * Profile sample.\n * @member {Array.} sample\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.sample = $util.emptyArray\n\n /**\n * Profile mapping.\n * @member {Array.} mapping\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.mapping = $util.emptyArray\n\n /**\n * Profile location.\n * @member {Array.} location\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.location = $util.emptyArray\n\n /**\n * Profile function.\n * @member {Array.} function\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype['function'] = $util.emptyArray\n\n /**\n * Profile stringTable.\n * @member {Array.} stringTable\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.stringTable = $util.emptyArray\n\n /**\n * Profile dropFrames.\n * @member {number|Long} dropFrames\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.dropFrames = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Profile keepFrames.\n * @member {number|Long} keepFrames\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.keepFrames = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Profile timeNanos.\n * @member {number|Long} timeNanos\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.timeNanos = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Profile durationNanos.\n * @member {number|Long} durationNanos\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.durationNanos = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Profile periodType.\n * @member {perftools.profiles.IValueType|null|undefined} periodType\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.periodType = null\n\n /**\n * Profile period.\n * @member {number|Long} period\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.period = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Profile comment.\n * @member {Array.} comment\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.comment = $util.emptyArray\n\n /**\n * Profile defaultSampleType.\n * @member {number|Long} defaultSampleType\n * @memberof perftools.profiles.Profile\n * @instance\n */\n Profile.prototype.defaultSampleType = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Creates a new Profile instance using the specified properties.\n * @function create\n * @memberof perftools.profiles.Profile\n * @static\n * @param {perftools.profiles.IProfile=} [properties] Properties to set\n * @returns {perftools.profiles.Profile} Profile instance\n */\n Profile.create = function create(properties) {\n return new Profile(properties)\n }\n\n /**\n * Encodes the specified Profile message. Does not implicitly {@link perftools.profiles.Profile.verify|verify} messages.\n * @function encode\n * @memberof perftools.profiles.Profile\n * @static\n * @param {perftools.profiles.IProfile} message Profile message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Profile.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create()\n if (message.sampleType != null && message.sampleType.length)\n for (var i = 0; i < message.sampleType.length; ++i)\n $root.perftools.profiles.ValueType.encode(\n message.sampleType[i],\n writer.uint32(/* id 1, wireType 2 =*/ 10).fork(),\n ).ldelim()\n if (message.sample != null && message.sample.length)\n for (var i = 0; i < message.sample.length; ++i)\n $root.perftools.profiles.Sample.encode(\n message.sample[i],\n writer.uint32(/* id 2, wireType 2 =*/ 18).fork(),\n ).ldelim()\n if (message.mapping != null && message.mapping.length)\n for (var i = 0; i < message.mapping.length; ++i)\n $root.perftools.profiles.Mapping.encode(\n message.mapping[i],\n writer.uint32(/* id 3, wireType 2 =*/ 26).fork(),\n ).ldelim()\n if (message.location != null && message.location.length)\n for (var i = 0; i < message.location.length; ++i)\n $root.perftools.profiles.Location.encode(\n message.location[i],\n writer.uint32(/* id 4, wireType 2 =*/ 34).fork(),\n ).ldelim()\n if (message['function'] != null && message['function'].length)\n for (var i = 0; i < message['function'].length; ++i)\n $root.perftools.profiles.Function.encode(\n message['function'][i],\n writer.uint32(/* id 5, wireType 2 =*/ 42).fork(),\n ).ldelim()\n if (message.stringTable != null && message.stringTable.length)\n for (var i = 0; i < message.stringTable.length; ++i)\n writer.uint32(/* id 6, wireType 2 =*/ 50).string(message.stringTable[i])\n if (message.dropFrames != null && message.hasOwnProperty('dropFrames'))\n writer.uint32(/* id 7, wireType 0 =*/ 56).int64(message.dropFrames)\n if (message.keepFrames != null && message.hasOwnProperty('keepFrames'))\n writer.uint32(/* id 8, wireType 0 =*/ 64).int64(message.keepFrames)\n if (message.timeNanos != null && message.hasOwnProperty('timeNanos'))\n writer.uint32(/* id 9, wireType 0 =*/ 72).int64(message.timeNanos)\n if (message.durationNanos != null && message.hasOwnProperty('durationNanos'))\n writer.uint32(/* id 10, wireType 0 =*/ 80).int64(message.durationNanos)\n if (message.periodType != null && message.hasOwnProperty('periodType'))\n $root.perftools.profiles.ValueType.encode(\n message.periodType,\n writer.uint32(/* id 11, wireType 2 =*/ 90).fork(),\n ).ldelim()\n if (message.period != null && message.hasOwnProperty('period'))\n writer.uint32(/* id 12, wireType 0 =*/ 96).int64(message.period)\n if (message.comment != null && message.comment.length) {\n writer.uint32(/* id 13, wireType 2 =*/ 106).fork()\n for (var i = 0; i < message.comment.length; ++i) writer.int64(message.comment[i])\n writer.ldelim()\n }\n if (message.defaultSampleType != null && message.hasOwnProperty('defaultSampleType'))\n writer.uint32(/* id 14, wireType 0 =*/ 112).int64(message.defaultSampleType)\n return writer\n }\n\n /**\n * Encodes the specified Profile message, length delimited. Does not implicitly {@link perftools.profiles.Profile.verify|verify} messages.\n * @function encodeDelimited\n * @memberof perftools.profiles.Profile\n * @static\n * @param {perftools.profiles.IProfile} message Profile message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Profile.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim()\n }\n\n /**\n * Decodes a Profile message from the specified reader or buffer.\n * @function decode\n * @memberof perftools.profiles.Profile\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {perftools.profiles.Profile} Profile\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Profile.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader)\n var end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.perftools.profiles.Profile()\n while (reader.pos < end) {\n var tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n if (!(message.sampleType && message.sampleType.length)) message.sampleType = []\n message.sampleType.push(\n $root.perftools.profiles.ValueType.decode(reader, reader.uint32()),\n )\n break\n case 2:\n if (!(message.sample && message.sample.length)) message.sample = []\n message.sample.push($root.perftools.profiles.Sample.decode(reader, reader.uint32()))\n break\n case 3:\n if (!(message.mapping && message.mapping.length)) message.mapping = []\n message.mapping.push($root.perftools.profiles.Mapping.decode(reader, reader.uint32()))\n break\n case 4:\n if (!(message.location && message.location.length)) message.location = []\n message.location.push(\n $root.perftools.profiles.Location.decode(reader, reader.uint32()),\n )\n break\n case 5:\n if (!(message['function'] && message['function'].length)) message['function'] = []\n message['function'].push(\n $root.perftools.profiles.Function.decode(reader, reader.uint32()),\n )\n break\n case 6:\n if (!(message.stringTable && message.stringTable.length)) message.stringTable = []\n message.stringTable.push(reader.string())\n break\n case 7:\n message.dropFrames = reader.int64()\n break\n case 8:\n message.keepFrames = reader.int64()\n break\n case 9:\n message.timeNanos = reader.int64()\n break\n case 10:\n message.durationNanos = reader.int64()\n break\n case 11:\n message.periodType = $root.perftools.profiles.ValueType.decode(\n reader,\n reader.uint32(),\n )\n break\n case 12:\n message.period = reader.int64()\n break\n case 13:\n if (!(message.comment && message.comment.length)) message.comment = []\n if ((tag & 7) === 2) {\n var end2 = reader.uint32() + reader.pos\n while (reader.pos < end2) message.comment.push(reader.int64())\n } else message.comment.push(reader.int64())\n break\n case 14:\n message.defaultSampleType = reader.int64()\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n }\n\n /**\n * Decodes a Profile message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof perftools.profiles.Profile\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {perftools.profiles.Profile} Profile\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Profile.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader)\n return this.decode(reader, reader.uint32())\n }\n\n /**\n * Verifies a Profile message.\n * @function verify\n * @memberof perftools.profiles.Profile\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Profile.verify = function verify(message) {\n if (typeof message !== 'object' || message === null) return 'object expected'\n if (message.sampleType != null && message.hasOwnProperty('sampleType')) {\n if (!Array.isArray(message.sampleType)) return 'sampleType: array expected'\n for (var i = 0; i < message.sampleType.length; ++i) {\n var error = $root.perftools.profiles.ValueType.verify(message.sampleType[i])\n if (error) return 'sampleType.' + error\n }\n }\n if (message.sample != null && message.hasOwnProperty('sample')) {\n if (!Array.isArray(message.sample)) return 'sample: array expected'\n for (var i = 0; i < message.sample.length; ++i) {\n var error = $root.perftools.profiles.Sample.verify(message.sample[i])\n if (error) return 'sample.' + error\n }\n }\n if (message.mapping != null && message.hasOwnProperty('mapping')) {\n if (!Array.isArray(message.mapping)) return 'mapping: array expected'\n for (var i = 0; i < message.mapping.length; ++i) {\n var error = $root.perftools.profiles.Mapping.verify(message.mapping[i])\n if (error) return 'mapping.' + error\n }\n }\n if (message.location != null && message.hasOwnProperty('location')) {\n if (!Array.isArray(message.location)) return 'location: array expected'\n for (var i = 0; i < message.location.length; ++i) {\n var error = $root.perftools.profiles.Location.verify(message.location[i])\n if (error) return 'location.' + error\n }\n }\n if (message['function'] != null && message.hasOwnProperty('function')) {\n if (!Array.isArray(message['function'])) return 'function: array expected'\n for (var i = 0; i < message['function'].length; ++i) {\n var error = $root.perftools.profiles.Function.verify(message['function'][i])\n if (error) return 'function.' + error\n }\n }\n if (message.stringTable != null && message.hasOwnProperty('stringTable')) {\n if (!Array.isArray(message.stringTable)) return 'stringTable: array expected'\n for (var i = 0; i < message.stringTable.length; ++i)\n if (!$util.isString(message.stringTable[i])) return 'stringTable: string[] expected'\n }\n if (message.dropFrames != null && message.hasOwnProperty('dropFrames'))\n if (\n !$util.isInteger(message.dropFrames) &&\n !(\n message.dropFrames &&\n $util.isInteger(message.dropFrames.low) &&\n $util.isInteger(message.dropFrames.high)\n )\n )\n return 'dropFrames: integer|Long expected'\n if (message.keepFrames != null && message.hasOwnProperty('keepFrames'))\n if (\n !$util.isInteger(message.keepFrames) &&\n !(\n message.keepFrames &&\n $util.isInteger(message.keepFrames.low) &&\n $util.isInteger(message.keepFrames.high)\n )\n )\n return 'keepFrames: integer|Long expected'\n if (message.timeNanos != null && message.hasOwnProperty('timeNanos'))\n if (\n !$util.isInteger(message.timeNanos) &&\n !(\n message.timeNanos &&\n $util.isInteger(message.timeNanos.low) &&\n $util.isInteger(message.timeNanos.high)\n )\n )\n return 'timeNanos: integer|Long expected'\n if (message.durationNanos != null && message.hasOwnProperty('durationNanos'))\n if (\n !$util.isInteger(message.durationNanos) &&\n !(\n message.durationNanos &&\n $util.isInteger(message.durationNanos.low) &&\n $util.isInteger(message.durationNanos.high)\n )\n )\n return 'durationNanos: integer|Long expected'\n if (message.periodType != null && message.hasOwnProperty('periodType')) {\n var error = $root.perftools.profiles.ValueType.verify(message.periodType)\n if (error) return 'periodType.' + error\n }\n if (message.period != null && message.hasOwnProperty('period'))\n if (\n !$util.isInteger(message.period) &&\n !(\n message.period &&\n $util.isInteger(message.period.low) &&\n $util.isInteger(message.period.high)\n )\n )\n return 'period: integer|Long expected'\n if (message.comment != null && message.hasOwnProperty('comment')) {\n if (!Array.isArray(message.comment)) return 'comment: array expected'\n for (var i = 0; i < message.comment.length; ++i)\n if (\n !$util.isInteger(message.comment[i]) &&\n !(\n message.comment[i] &&\n $util.isInteger(message.comment[i].low) &&\n $util.isInteger(message.comment[i].high)\n )\n )\n return 'comment: integer|Long[] expected'\n }\n if (message.defaultSampleType != null && message.hasOwnProperty('defaultSampleType'))\n if (\n !$util.isInteger(message.defaultSampleType) &&\n !(\n message.defaultSampleType &&\n $util.isInteger(message.defaultSampleType.low) &&\n $util.isInteger(message.defaultSampleType.high)\n )\n )\n return 'defaultSampleType: integer|Long expected'\n return null\n }\n\n /**\n * Creates a Profile message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof perftools.profiles.Profile\n * @static\n * @param {Object.} object Plain object\n * @returns {perftools.profiles.Profile} Profile\n */\n Profile.fromObject = function fromObject(object) {\n if (object instanceof $root.perftools.profiles.Profile) return object\n var message = new $root.perftools.profiles.Profile()\n if (object.sampleType) {\n if (!Array.isArray(object.sampleType))\n throw TypeError('.perftools.profiles.Profile.sampleType: array expected')\n message.sampleType = []\n for (var i = 0; i < object.sampleType.length; ++i) {\n if (typeof object.sampleType[i] !== 'object')\n throw TypeError('.perftools.profiles.Profile.sampleType: object expected')\n message.sampleType[i] = $root.perftools.profiles.ValueType.fromObject(\n object.sampleType[i],\n )\n }\n }\n if (object.sample) {\n if (!Array.isArray(object.sample))\n throw TypeError('.perftools.profiles.Profile.sample: array expected')\n message.sample = []\n for (var i = 0; i < object.sample.length; ++i) {\n if (typeof object.sample[i] !== 'object')\n throw TypeError('.perftools.profiles.Profile.sample: object expected')\n message.sample[i] = $root.perftools.profiles.Sample.fromObject(object.sample[i])\n }\n }\n if (object.mapping) {\n if (!Array.isArray(object.mapping))\n throw TypeError('.perftools.profiles.Profile.mapping: array expected')\n message.mapping = []\n for (var i = 0; i < object.mapping.length; ++i) {\n if (typeof object.mapping[i] !== 'object')\n throw TypeError('.perftools.profiles.Profile.mapping: object expected')\n message.mapping[i] = $root.perftools.profiles.Mapping.fromObject(object.mapping[i])\n }\n }\n if (object.location) {\n if (!Array.isArray(object.location))\n throw TypeError('.perftools.profiles.Profile.location: array expected')\n message.location = []\n for (var i = 0; i < object.location.length; ++i) {\n if (typeof object.location[i] !== 'object')\n throw TypeError('.perftools.profiles.Profile.location: object expected')\n message.location[i] = $root.perftools.profiles.Location.fromObject(object.location[i])\n }\n }\n if (object['function']) {\n if (!Array.isArray(object['function']))\n throw TypeError('.perftools.profiles.Profile.function: array expected')\n message['function'] = []\n for (var i = 0; i < object['function'].length; ++i) {\n if (typeof object['function'][i] !== 'object')\n throw TypeError('.perftools.profiles.Profile.function: object expected')\n message['function'][i] = $root.perftools.profiles.Function.fromObject(\n object['function'][i],\n )\n }\n }\n if (object.stringTable) {\n if (!Array.isArray(object.stringTable))\n throw TypeError('.perftools.profiles.Profile.stringTable: array expected')\n message.stringTable = []\n for (var i = 0; i < object.stringTable.length; ++i)\n message.stringTable[i] = String(object.stringTable[i])\n }\n if (object.dropFrames != null)\n if ($util.Long)\n (message.dropFrames = $util.Long.fromValue(object.dropFrames)).unsigned = false\n else if (typeof object.dropFrames === 'string')\n message.dropFrames = parseInt(object.dropFrames, 10)\n else if (typeof object.dropFrames === 'number') message.dropFrames = object.dropFrames\n else if (typeof object.dropFrames === 'object')\n message.dropFrames = new $util.LongBits(\n object.dropFrames.low >>> 0,\n object.dropFrames.high >>> 0,\n ).toNumber()\n if (object.keepFrames != null)\n if ($util.Long)\n (message.keepFrames = $util.Long.fromValue(object.keepFrames)).unsigned = false\n else if (typeof object.keepFrames === 'string')\n message.keepFrames = parseInt(object.keepFrames, 10)\n else if (typeof object.keepFrames === 'number') message.keepFrames = object.keepFrames\n else if (typeof object.keepFrames === 'object')\n message.keepFrames = new $util.LongBits(\n object.keepFrames.low >>> 0,\n object.keepFrames.high >>> 0,\n ).toNumber()\n if (object.timeNanos != null)\n if ($util.Long)\n (message.timeNanos = $util.Long.fromValue(object.timeNanos)).unsigned = false\n else if (typeof object.timeNanos === 'string')\n message.timeNanos = parseInt(object.timeNanos, 10)\n else if (typeof object.timeNanos === 'number') message.timeNanos = object.timeNanos\n else if (typeof object.timeNanos === 'object')\n message.timeNanos = new $util.LongBits(\n object.timeNanos.low >>> 0,\n object.timeNanos.high >>> 0,\n ).toNumber()\n if (object.durationNanos != null)\n if ($util.Long)\n (message.durationNanos = $util.Long.fromValue(object.durationNanos)).unsigned = false\n else if (typeof object.durationNanos === 'string')\n message.durationNanos = parseInt(object.durationNanos, 10)\n else if (typeof object.durationNanos === 'number')\n message.durationNanos = object.durationNanos\n else if (typeof object.durationNanos === 'object')\n message.durationNanos = new $util.LongBits(\n object.durationNanos.low >>> 0,\n object.durationNanos.high >>> 0,\n ).toNumber()\n if (object.periodType != null) {\n if (typeof object.periodType !== 'object')\n throw TypeError('.perftools.profiles.Profile.periodType: object expected')\n message.periodType = $root.perftools.profiles.ValueType.fromObject(object.periodType)\n }\n if (object.period != null)\n if ($util.Long) (message.period = $util.Long.fromValue(object.period)).unsigned = false\n else if (typeof object.period === 'string') message.period = parseInt(object.period, 10)\n else if (typeof object.period === 'number') message.period = object.period\n else if (typeof object.period === 'object')\n message.period = new $util.LongBits(\n object.period.low >>> 0,\n object.period.high >>> 0,\n ).toNumber()\n if (object.comment) {\n if (!Array.isArray(object.comment))\n throw TypeError('.perftools.profiles.Profile.comment: array expected')\n message.comment = []\n for (var i = 0; i < object.comment.length; ++i)\n if ($util.Long)\n (message.comment[i] = $util.Long.fromValue(object.comment[i])).unsigned = false\n else if (typeof object.comment[i] === 'string')\n message.comment[i] = parseInt(object.comment[i], 10)\n else if (typeof object.comment[i] === 'number') message.comment[i] = object.comment[i]\n else if (typeof object.comment[i] === 'object')\n message.comment[i] = new $util.LongBits(\n object.comment[i].low >>> 0,\n object.comment[i].high >>> 0,\n ).toNumber()\n }\n if (object.defaultSampleType != null)\n if ($util.Long)\n (message.defaultSampleType = $util.Long.fromValue(\n object.defaultSampleType,\n )).unsigned = false\n else if (typeof object.defaultSampleType === 'string')\n message.defaultSampleType = parseInt(object.defaultSampleType, 10)\n else if (typeof object.defaultSampleType === 'number')\n message.defaultSampleType = object.defaultSampleType\n else if (typeof object.defaultSampleType === 'object')\n message.defaultSampleType = new $util.LongBits(\n object.defaultSampleType.low >>> 0,\n object.defaultSampleType.high >>> 0,\n ).toNumber()\n return message\n }\n\n /**\n * Creates a plain object from a Profile message. Also converts values to other types if specified.\n * @function toObject\n * @memberof perftools.profiles.Profile\n * @static\n * @param {perftools.profiles.Profile} message Profile\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Profile.toObject = function toObject(message, options) {\n if (!options) options = {}\n var object = {}\n if (options.arrays || options.defaults) {\n object.sampleType = []\n object.sample = []\n object.mapping = []\n object.location = []\n object['function'] = []\n object.stringTable = []\n object.comment = []\n }\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.dropFrames =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.dropFrames = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.keepFrames =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.keepFrames = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.timeNanos =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.timeNanos = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.durationNanos =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.durationNanos = options.longs === String ? '0' : 0\n object.periodType = null\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.period =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.period = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.defaultSampleType =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.defaultSampleType = options.longs === String ? '0' : 0\n }\n if (message.sampleType && message.sampleType.length) {\n object.sampleType = []\n for (var j = 0; j < message.sampleType.length; ++j)\n object.sampleType[j] = $root.perftools.profiles.ValueType.toObject(\n message.sampleType[j],\n options,\n )\n }\n if (message.sample && message.sample.length) {\n object.sample = []\n for (var j = 0; j < message.sample.length; ++j)\n object.sample[j] = $root.perftools.profiles.Sample.toObject(message.sample[j], options)\n }\n if (message.mapping && message.mapping.length) {\n object.mapping = []\n for (var j = 0; j < message.mapping.length; ++j)\n object.mapping[j] = $root.perftools.profiles.Mapping.toObject(\n message.mapping[j],\n options,\n )\n }\n if (message.location && message.location.length) {\n object.location = []\n for (var j = 0; j < message.location.length; ++j)\n object.location[j] = $root.perftools.profiles.Location.toObject(\n message.location[j],\n options,\n )\n }\n if (message['function'] && message['function'].length) {\n object['function'] = []\n for (var j = 0; j < message['function'].length; ++j)\n object['function'][j] = $root.perftools.profiles.Function.toObject(\n message['function'][j],\n options,\n )\n }\n if (message.stringTable && message.stringTable.length) {\n object.stringTable = []\n for (var j = 0; j < message.stringTable.length; ++j)\n object.stringTable[j] = message.stringTable[j]\n }\n if (message.dropFrames != null && message.hasOwnProperty('dropFrames'))\n if (typeof message.dropFrames === 'number')\n object.dropFrames =\n options.longs === String ? String(message.dropFrames) : message.dropFrames\n else\n object.dropFrames =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.dropFrames)\n : options.longs === Number\n ? new $util.LongBits(\n message.dropFrames.low >>> 0,\n message.dropFrames.high >>> 0,\n ).toNumber()\n : message.dropFrames\n if (message.keepFrames != null && message.hasOwnProperty('keepFrames'))\n if (typeof message.keepFrames === 'number')\n object.keepFrames =\n options.longs === String ? String(message.keepFrames) : message.keepFrames\n else\n object.keepFrames =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.keepFrames)\n : options.longs === Number\n ? new $util.LongBits(\n message.keepFrames.low >>> 0,\n message.keepFrames.high >>> 0,\n ).toNumber()\n : message.keepFrames\n if (message.timeNanos != null && message.hasOwnProperty('timeNanos'))\n if (typeof message.timeNanos === 'number')\n object.timeNanos =\n options.longs === String ? String(message.timeNanos) : message.timeNanos\n else\n object.timeNanos =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.timeNanos)\n : options.longs === Number\n ? new $util.LongBits(\n message.timeNanos.low >>> 0,\n message.timeNanos.high >>> 0,\n ).toNumber()\n : message.timeNanos\n if (message.durationNanos != null && message.hasOwnProperty('durationNanos'))\n if (typeof message.durationNanos === 'number')\n object.durationNanos =\n options.longs === String ? String(message.durationNanos) : message.durationNanos\n else\n object.durationNanos =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.durationNanos)\n : options.longs === Number\n ? new $util.LongBits(\n message.durationNanos.low >>> 0,\n message.durationNanos.high >>> 0,\n ).toNumber()\n : message.durationNanos\n if (message.periodType != null && message.hasOwnProperty('periodType'))\n object.periodType = $root.perftools.profiles.ValueType.toObject(\n message.periodType,\n options,\n )\n if (message.period != null && message.hasOwnProperty('period'))\n if (typeof message.period === 'number')\n object.period = options.longs === String ? String(message.period) : message.period\n else\n object.period =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.period)\n : options.longs === Number\n ? new $util.LongBits(\n message.period.low >>> 0,\n message.period.high >>> 0,\n ).toNumber()\n : message.period\n if (message.comment && message.comment.length) {\n object.comment = []\n for (var j = 0; j < message.comment.length; ++j)\n if (typeof message.comment[j] === 'number')\n object.comment[j] =\n options.longs === String ? String(message.comment[j]) : message.comment[j]\n else\n object.comment[j] =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.comment[j])\n : options.longs === Number\n ? new $util.LongBits(\n message.comment[j].low >>> 0,\n message.comment[j].high >>> 0,\n ).toNumber()\n : message.comment[j]\n }\n if (message.defaultSampleType != null && message.hasOwnProperty('defaultSampleType'))\n if (typeof message.defaultSampleType === 'number')\n object.defaultSampleType =\n options.longs === String\n ? String(message.defaultSampleType)\n : message.defaultSampleType\n else\n object.defaultSampleType =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.defaultSampleType)\n : options.longs === Number\n ? new $util.LongBits(\n message.defaultSampleType.low >>> 0,\n message.defaultSampleType.high >>> 0,\n ).toNumber()\n : message.defaultSampleType\n return object\n }\n\n /**\n * Converts this Profile to JSON.\n * @function toJSON\n * @memberof perftools.profiles.Profile\n * @instance\n * @returns {Object.} JSON object\n */\n Profile.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions)\n }\n\n return Profile\n })()\n\n profiles.ValueType = (function() {\n /**\n * Properties of a ValueType.\n * @memberof perftools.profiles\n * @interface IValueType\n * @property {number|Long|null} [type] ValueType type\n * @property {number|Long|null} [unit] ValueType unit\n */\n\n /**\n * Constructs a new ValueType.\n * @memberof perftools.profiles\n * @classdesc Represents a ValueType.\n * @implements IValueType\n * @constructor\n * @param {perftools.profiles.IValueType=} [properties] Properties to set\n */\n function ValueType(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]\n }\n\n /**\n * ValueType type.\n * @member {number|Long} type\n * @memberof perftools.profiles.ValueType\n * @instance\n */\n ValueType.prototype.type = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * ValueType unit.\n * @member {number|Long} unit\n * @memberof perftools.profiles.ValueType\n * @instance\n */\n ValueType.prototype.unit = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Creates a new ValueType instance using the specified properties.\n * @function create\n * @memberof perftools.profiles.ValueType\n * @static\n * @param {perftools.profiles.IValueType=} [properties] Properties to set\n * @returns {perftools.profiles.ValueType} ValueType instance\n */\n ValueType.create = function create(properties) {\n return new ValueType(properties)\n }\n\n /**\n * Encodes the specified ValueType message. Does not implicitly {@link perftools.profiles.ValueType.verify|verify} messages.\n * @function encode\n * @memberof perftools.profiles.ValueType\n * @static\n * @param {perftools.profiles.IValueType} message ValueType message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ValueType.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create()\n if (message.type != null && message.hasOwnProperty('type'))\n writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.type)\n if (message.unit != null && message.hasOwnProperty('unit'))\n writer.uint32(/* id 2, wireType 0 =*/ 16).int64(message.unit)\n return writer\n }\n\n /**\n * Encodes the specified ValueType message, length delimited. Does not implicitly {@link perftools.profiles.ValueType.verify|verify} messages.\n * @function encodeDelimited\n * @memberof perftools.profiles.ValueType\n * @static\n * @param {perftools.profiles.IValueType} message ValueType message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ValueType.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim()\n }\n\n /**\n * Decodes a ValueType message from the specified reader or buffer.\n * @function decode\n * @memberof perftools.profiles.ValueType\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {perftools.profiles.ValueType} ValueType\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ValueType.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader)\n var end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.perftools.profiles.ValueType()\n while (reader.pos < end) {\n var tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n message.type = reader.int64()\n break\n case 2:\n message.unit = reader.int64()\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n }\n\n /**\n * Decodes a ValueType message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof perftools.profiles.ValueType\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {perftools.profiles.ValueType} ValueType\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ValueType.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader)\n return this.decode(reader, reader.uint32())\n }\n\n /**\n * Verifies a ValueType message.\n * @function verify\n * @memberof perftools.profiles.ValueType\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ValueType.verify = function verify(message) {\n if (typeof message !== 'object' || message === null) return 'object expected'\n if (message.type != null && message.hasOwnProperty('type'))\n if (\n !$util.isInteger(message.type) &&\n !(\n message.type &&\n $util.isInteger(message.type.low) &&\n $util.isInteger(message.type.high)\n )\n )\n return 'type: integer|Long expected'\n if (message.unit != null && message.hasOwnProperty('unit'))\n if (\n !$util.isInteger(message.unit) &&\n !(\n message.unit &&\n $util.isInteger(message.unit.low) &&\n $util.isInteger(message.unit.high)\n )\n )\n return 'unit: integer|Long expected'\n return null\n }\n\n /**\n * Creates a ValueType message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof perftools.profiles.ValueType\n * @static\n * @param {Object.} object Plain object\n * @returns {perftools.profiles.ValueType} ValueType\n */\n ValueType.fromObject = function fromObject(object) {\n if (object instanceof $root.perftools.profiles.ValueType) return object\n var message = new $root.perftools.profiles.ValueType()\n if (object.type != null)\n if ($util.Long) (message.type = $util.Long.fromValue(object.type)).unsigned = false\n else if (typeof object.type === 'string') message.type = parseInt(object.type, 10)\n else if (typeof object.type === 'number') message.type = object.type\n else if (typeof object.type === 'object')\n message.type = new $util.LongBits(\n object.type.low >>> 0,\n object.type.high >>> 0,\n ).toNumber()\n if (object.unit != null)\n if ($util.Long) (message.unit = $util.Long.fromValue(object.unit)).unsigned = false\n else if (typeof object.unit === 'string') message.unit = parseInt(object.unit, 10)\n else if (typeof object.unit === 'number') message.unit = object.unit\n else if (typeof object.unit === 'object')\n message.unit = new $util.LongBits(\n object.unit.low >>> 0,\n object.unit.high >>> 0,\n ).toNumber()\n return message\n }\n\n /**\n * Creates a plain object from a ValueType message. Also converts values to other types if specified.\n * @function toObject\n * @memberof perftools.profiles.ValueType\n * @static\n * @param {perftools.profiles.ValueType} message ValueType\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ValueType.toObject = function toObject(message, options) {\n if (!options) options = {}\n var object = {}\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.type =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.type = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.unit =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.unit = options.longs === String ? '0' : 0\n }\n if (message.type != null && message.hasOwnProperty('type'))\n if (typeof message.type === 'number')\n object.type = options.longs === String ? String(message.type) : message.type\n else\n object.type =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.type)\n : options.longs === Number\n ? new $util.LongBits(message.type.low >>> 0, message.type.high >>> 0).toNumber()\n : message.type\n if (message.unit != null && message.hasOwnProperty('unit'))\n if (typeof message.unit === 'number')\n object.unit = options.longs === String ? String(message.unit) : message.unit\n else\n object.unit =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.unit)\n : options.longs === Number\n ? new $util.LongBits(message.unit.low >>> 0, message.unit.high >>> 0).toNumber()\n : message.unit\n return object\n }\n\n /**\n * Converts this ValueType to JSON.\n * @function toJSON\n * @memberof perftools.profiles.ValueType\n * @instance\n * @returns {Object.} JSON object\n */\n ValueType.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions)\n }\n\n return ValueType\n })()\n\n profiles.Sample = (function() {\n /**\n * Properties of a Sample.\n * @memberof perftools.profiles\n * @interface ISample\n * @property {Array.|null} [locationId] Sample locationId\n * @property {Array.|null} [value] Sample value\n * @property {Array.|null} [label] Sample label\n */\n\n /**\n * Constructs a new Sample.\n * @memberof perftools.profiles\n * @classdesc Represents a Sample.\n * @implements ISample\n * @constructor\n * @param {perftools.profiles.ISample=} [properties] Properties to set\n */\n function Sample(properties) {\n this.locationId = []\n this.value = []\n this.label = []\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]\n }\n\n /**\n * Sample locationId.\n * @member {Array.} locationId\n * @memberof perftools.profiles.Sample\n * @instance\n */\n Sample.prototype.locationId = $util.emptyArray\n\n /**\n * Sample value.\n * @member {Array.} value\n * @memberof perftools.profiles.Sample\n * @instance\n */\n Sample.prototype.value = $util.emptyArray\n\n /**\n * Sample label.\n * @member {Array.} label\n * @memberof perftools.profiles.Sample\n * @instance\n */\n Sample.prototype.label = $util.emptyArray\n\n /**\n * Creates a new Sample instance using the specified properties.\n * @function create\n * @memberof perftools.profiles.Sample\n * @static\n * @param {perftools.profiles.ISample=} [properties] Properties to set\n * @returns {perftools.profiles.Sample} Sample instance\n */\n Sample.create = function create(properties) {\n return new Sample(properties)\n }\n\n /**\n * Encodes the specified Sample message. Does not implicitly {@link perftools.profiles.Sample.verify|verify} messages.\n * @function encode\n * @memberof perftools.profiles.Sample\n * @static\n * @param {perftools.profiles.ISample} message Sample message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Sample.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create()\n if (message.locationId != null && message.locationId.length) {\n writer.uint32(/* id 1, wireType 2 =*/ 10).fork()\n for (var i = 0; i < message.locationId.length; ++i) writer.uint64(message.locationId[i])\n writer.ldelim()\n }\n if (message.value != null && message.value.length) {\n writer.uint32(/* id 2, wireType 2 =*/ 18).fork()\n for (var i = 0; i < message.value.length; ++i) writer.int64(message.value[i])\n writer.ldelim()\n }\n if (message.label != null && message.label.length)\n for (var i = 0; i < message.label.length; ++i)\n $root.perftools.profiles.Label.encode(\n message.label[i],\n writer.uint32(/* id 3, wireType 2 =*/ 26).fork(),\n ).ldelim()\n return writer\n }\n\n /**\n * Encodes the specified Sample message, length delimited. Does not implicitly {@link perftools.profiles.Sample.verify|verify} messages.\n * @function encodeDelimited\n * @memberof perftools.profiles.Sample\n * @static\n * @param {perftools.profiles.ISample} message Sample message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Sample.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim()\n }\n\n /**\n * Decodes a Sample message from the specified reader or buffer.\n * @function decode\n * @memberof perftools.profiles.Sample\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {perftools.profiles.Sample} Sample\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Sample.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader)\n var end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.perftools.profiles.Sample()\n while (reader.pos < end) {\n var tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n if (!(message.locationId && message.locationId.length)) message.locationId = []\n if ((tag & 7) === 2) {\n var end2 = reader.uint32() + reader.pos\n while (reader.pos < end2) message.locationId.push(reader.uint64())\n } else message.locationId.push(reader.uint64())\n break\n case 2:\n if (!(message.value && message.value.length)) message.value = []\n if ((tag & 7) === 2) {\n var end2 = reader.uint32() + reader.pos\n while (reader.pos < end2) message.value.push(reader.int64())\n } else message.value.push(reader.int64())\n break\n case 3:\n if (!(message.label && message.label.length)) message.label = []\n message.label.push($root.perftools.profiles.Label.decode(reader, reader.uint32()))\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n }\n\n /**\n * Decodes a Sample message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof perftools.profiles.Sample\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {perftools.profiles.Sample} Sample\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Sample.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader)\n return this.decode(reader, reader.uint32())\n }\n\n /**\n * Verifies a Sample message.\n * @function verify\n * @memberof perftools.profiles.Sample\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Sample.verify = function verify(message) {\n if (typeof message !== 'object' || message === null) return 'object expected'\n if (message.locationId != null && message.hasOwnProperty('locationId')) {\n if (!Array.isArray(message.locationId)) return 'locationId: array expected'\n for (var i = 0; i < message.locationId.length; ++i)\n if (\n !$util.isInteger(message.locationId[i]) &&\n !(\n message.locationId[i] &&\n $util.isInteger(message.locationId[i].low) &&\n $util.isInteger(message.locationId[i].high)\n )\n )\n return 'locationId: integer|Long[] expected'\n }\n if (message.value != null && message.hasOwnProperty('value')) {\n if (!Array.isArray(message.value)) return 'value: array expected'\n for (var i = 0; i < message.value.length; ++i)\n if (\n !$util.isInteger(message.value[i]) &&\n !(\n message.value[i] &&\n $util.isInteger(message.value[i].low) &&\n $util.isInteger(message.value[i].high)\n )\n )\n return 'value: integer|Long[] expected'\n }\n if (message.label != null && message.hasOwnProperty('label')) {\n if (!Array.isArray(message.label)) return 'label: array expected'\n for (var i = 0; i < message.label.length; ++i) {\n var error = $root.perftools.profiles.Label.verify(message.label[i])\n if (error) return 'label.' + error\n }\n }\n return null\n }\n\n /**\n * Creates a Sample message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof perftools.profiles.Sample\n * @static\n * @param {Object.} object Plain object\n * @returns {perftools.profiles.Sample} Sample\n */\n Sample.fromObject = function fromObject(object) {\n if (object instanceof $root.perftools.profiles.Sample) return object\n var message = new $root.perftools.profiles.Sample()\n if (object.locationId) {\n if (!Array.isArray(object.locationId))\n throw TypeError('.perftools.profiles.Sample.locationId: array expected')\n message.locationId = []\n for (var i = 0; i < object.locationId.length; ++i)\n if ($util.Long)\n (message.locationId[i] = $util.Long.fromValue(object.locationId[i])).unsigned = true\n else if (typeof object.locationId[i] === 'string')\n message.locationId[i] = parseInt(object.locationId[i], 10)\n else if (typeof object.locationId[i] === 'number')\n message.locationId[i] = object.locationId[i]\n else if (typeof object.locationId[i] === 'object')\n message.locationId[i] = new $util.LongBits(\n object.locationId[i].low >>> 0,\n object.locationId[i].high >>> 0,\n ).toNumber(true)\n }\n if (object.value) {\n if (!Array.isArray(object.value))\n throw TypeError('.perftools.profiles.Sample.value: array expected')\n message.value = []\n for (var i = 0; i < object.value.length; ++i)\n if ($util.Long)\n (message.value[i] = $util.Long.fromValue(object.value[i])).unsigned = false\n else if (typeof object.value[i] === 'string')\n message.value[i] = parseInt(object.value[i], 10)\n else if (typeof object.value[i] === 'number') message.value[i] = object.value[i]\n else if (typeof object.value[i] === 'object')\n message.value[i] = new $util.LongBits(\n object.value[i].low >>> 0,\n object.value[i].high >>> 0,\n ).toNumber()\n }\n if (object.label) {\n if (!Array.isArray(object.label))\n throw TypeError('.perftools.profiles.Sample.label: array expected')\n message.label = []\n for (var i = 0; i < object.label.length; ++i) {\n if (typeof object.label[i] !== 'object')\n throw TypeError('.perftools.profiles.Sample.label: object expected')\n message.label[i] = $root.perftools.profiles.Label.fromObject(object.label[i])\n }\n }\n return message\n }\n\n /**\n * Creates a plain object from a Sample message. Also converts values to other types if specified.\n * @function toObject\n * @memberof perftools.profiles.Sample\n * @static\n * @param {perftools.profiles.Sample} message Sample\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Sample.toObject = function toObject(message, options) {\n if (!options) options = {}\n var object = {}\n if (options.arrays || options.defaults) {\n object.locationId = []\n object.value = []\n object.label = []\n }\n if (message.locationId && message.locationId.length) {\n object.locationId = []\n for (var j = 0; j < message.locationId.length; ++j)\n if (typeof message.locationId[j] === 'number')\n object.locationId[j] =\n options.longs === String ? String(message.locationId[j]) : message.locationId[j]\n else\n object.locationId[j] =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.locationId[j])\n : options.longs === Number\n ? new $util.LongBits(\n message.locationId[j].low >>> 0,\n message.locationId[j].high >>> 0,\n ).toNumber(true)\n : message.locationId[j]\n }\n if (message.value && message.value.length) {\n object.value = []\n for (var j = 0; j < message.value.length; ++j)\n if (typeof message.value[j] === 'number')\n object.value[j] =\n options.longs === String ? String(message.value[j]) : message.value[j]\n else\n object.value[j] =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.value[j])\n : options.longs === Number\n ? new $util.LongBits(\n message.value[j].low >>> 0,\n message.value[j].high >>> 0,\n ).toNumber()\n : message.value[j]\n }\n if (message.label && message.label.length) {\n object.label = []\n for (var j = 0; j < message.label.length; ++j)\n object.label[j] = $root.perftools.profiles.Label.toObject(message.label[j], options)\n }\n return object\n }\n\n /**\n * Converts this Sample to JSON.\n * @function toJSON\n * @memberof perftools.profiles.Sample\n * @instance\n * @returns {Object.} JSON object\n */\n Sample.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions)\n }\n\n return Sample\n })()\n\n profiles.Label = (function() {\n /**\n * Properties of a Label.\n * @memberof perftools.profiles\n * @interface ILabel\n * @property {number|Long|null} [key] Label key\n * @property {number|Long|null} [str] Label str\n * @property {number|Long|null} [num] Label num\n * @property {number|Long|null} [numUnit] Label numUnit\n */\n\n /**\n * Constructs a new Label.\n * @memberof perftools.profiles\n * @classdesc Represents a Label.\n * @implements ILabel\n * @constructor\n * @param {perftools.profiles.ILabel=} [properties] Properties to set\n */\n function Label(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]\n }\n\n /**\n * Label key.\n * @member {number|Long} key\n * @memberof perftools.profiles.Label\n * @instance\n */\n Label.prototype.key = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Label str.\n * @member {number|Long} str\n * @memberof perftools.profiles.Label\n * @instance\n */\n Label.prototype.str = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Label num.\n * @member {number|Long} num\n * @memberof perftools.profiles.Label\n * @instance\n */\n Label.prototype.num = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Label numUnit.\n * @member {number|Long} numUnit\n * @memberof perftools.profiles.Label\n * @instance\n */\n Label.prototype.numUnit = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Creates a new Label instance using the specified properties.\n * @function create\n * @memberof perftools.profiles.Label\n * @static\n * @param {perftools.profiles.ILabel=} [properties] Properties to set\n * @returns {perftools.profiles.Label} Label instance\n */\n Label.create = function create(properties) {\n return new Label(properties)\n }\n\n /**\n * Encodes the specified Label message. Does not implicitly {@link perftools.profiles.Label.verify|verify} messages.\n * @function encode\n * @memberof perftools.profiles.Label\n * @static\n * @param {perftools.profiles.ILabel} message Label message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Label.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create()\n if (message.key != null && message.hasOwnProperty('key'))\n writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.key)\n if (message.str != null && message.hasOwnProperty('str'))\n writer.uint32(/* id 2, wireType 0 =*/ 16).int64(message.str)\n if (message.num != null && message.hasOwnProperty('num'))\n writer.uint32(/* id 3, wireType 0 =*/ 24).int64(message.num)\n if (message.numUnit != null && message.hasOwnProperty('numUnit'))\n writer.uint32(/* id 4, wireType 0 =*/ 32).int64(message.numUnit)\n return writer\n }\n\n /**\n * Encodes the specified Label message, length delimited. Does not implicitly {@link perftools.profiles.Label.verify|verify} messages.\n * @function encodeDelimited\n * @memberof perftools.profiles.Label\n * @static\n * @param {perftools.profiles.ILabel} message Label message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Label.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim()\n }\n\n /**\n * Decodes a Label message from the specified reader or buffer.\n * @function decode\n * @memberof perftools.profiles.Label\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {perftools.profiles.Label} Label\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Label.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader)\n var end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.perftools.profiles.Label()\n while (reader.pos < end) {\n var tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n message.key = reader.int64()\n break\n case 2:\n message.str = reader.int64()\n break\n case 3:\n message.num = reader.int64()\n break\n case 4:\n message.numUnit = reader.int64()\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n }\n\n /**\n * Decodes a Label message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof perftools.profiles.Label\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {perftools.profiles.Label} Label\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Label.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader)\n return this.decode(reader, reader.uint32())\n }\n\n /**\n * Verifies a Label message.\n * @function verify\n * @memberof perftools.profiles.Label\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Label.verify = function verify(message) {\n if (typeof message !== 'object' || message === null) return 'object expected'\n if (message.key != null && message.hasOwnProperty('key'))\n if (\n !$util.isInteger(message.key) &&\n !(message.key && $util.isInteger(message.key.low) && $util.isInteger(message.key.high))\n )\n return 'key: integer|Long expected'\n if (message.str != null && message.hasOwnProperty('str'))\n if (\n !$util.isInteger(message.str) &&\n !(message.str && $util.isInteger(message.str.low) && $util.isInteger(message.str.high))\n )\n return 'str: integer|Long expected'\n if (message.num != null && message.hasOwnProperty('num'))\n if (\n !$util.isInteger(message.num) &&\n !(message.num && $util.isInteger(message.num.low) && $util.isInteger(message.num.high))\n )\n return 'num: integer|Long expected'\n if (message.numUnit != null && message.hasOwnProperty('numUnit'))\n if (\n !$util.isInteger(message.numUnit) &&\n !(\n message.numUnit &&\n $util.isInteger(message.numUnit.low) &&\n $util.isInteger(message.numUnit.high)\n )\n )\n return 'numUnit: integer|Long expected'\n return null\n }\n\n /**\n * Creates a Label message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof perftools.profiles.Label\n * @static\n * @param {Object.} object Plain object\n * @returns {perftools.profiles.Label} Label\n */\n Label.fromObject = function fromObject(object) {\n if (object instanceof $root.perftools.profiles.Label) return object\n var message = new $root.perftools.profiles.Label()\n if (object.key != null)\n if ($util.Long) (message.key = $util.Long.fromValue(object.key)).unsigned = false\n else if (typeof object.key === 'string') message.key = parseInt(object.key, 10)\n else if (typeof object.key === 'number') message.key = object.key\n else if (typeof object.key === 'object')\n message.key = new $util.LongBits(object.key.low >>> 0, object.key.high >>> 0).toNumber()\n if (object.str != null)\n if ($util.Long) (message.str = $util.Long.fromValue(object.str)).unsigned = false\n else if (typeof object.str === 'string') message.str = parseInt(object.str, 10)\n else if (typeof object.str === 'number') message.str = object.str\n else if (typeof object.str === 'object')\n message.str = new $util.LongBits(object.str.low >>> 0, object.str.high >>> 0).toNumber()\n if (object.num != null)\n if ($util.Long) (message.num = $util.Long.fromValue(object.num)).unsigned = false\n else if (typeof object.num === 'string') message.num = parseInt(object.num, 10)\n else if (typeof object.num === 'number') message.num = object.num\n else if (typeof object.num === 'object')\n message.num = new $util.LongBits(object.num.low >>> 0, object.num.high >>> 0).toNumber()\n if (object.numUnit != null)\n if ($util.Long) (message.numUnit = $util.Long.fromValue(object.numUnit)).unsigned = false\n else if (typeof object.numUnit === 'string')\n message.numUnit = parseInt(object.numUnit, 10)\n else if (typeof object.numUnit === 'number') message.numUnit = object.numUnit\n else if (typeof object.numUnit === 'object')\n message.numUnit = new $util.LongBits(\n object.numUnit.low >>> 0,\n object.numUnit.high >>> 0,\n ).toNumber()\n return message\n }\n\n /**\n * Creates a plain object from a Label message. Also converts values to other types if specified.\n * @function toObject\n * @memberof perftools.profiles.Label\n * @static\n * @param {perftools.profiles.Label} message Label\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Label.toObject = function toObject(message, options) {\n if (!options) options = {}\n var object = {}\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.key =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.key = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.str =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.str = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.num =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.num = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.numUnit =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.numUnit = options.longs === String ? '0' : 0\n }\n if (message.key != null && message.hasOwnProperty('key'))\n if (typeof message.key === 'number')\n object.key = options.longs === String ? String(message.key) : message.key\n else\n object.key =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.key)\n : options.longs === Number\n ? new $util.LongBits(message.key.low >>> 0, message.key.high >>> 0).toNumber()\n : message.key\n if (message.str != null && message.hasOwnProperty('str'))\n if (typeof message.str === 'number')\n object.str = options.longs === String ? String(message.str) : message.str\n else\n object.str =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.str)\n : options.longs === Number\n ? new $util.LongBits(message.str.low >>> 0, message.str.high >>> 0).toNumber()\n : message.str\n if (message.num != null && message.hasOwnProperty('num'))\n if (typeof message.num === 'number')\n object.num = options.longs === String ? String(message.num) : message.num\n else\n object.num =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.num)\n : options.longs === Number\n ? new $util.LongBits(message.num.low >>> 0, message.num.high >>> 0).toNumber()\n : message.num\n if (message.numUnit != null && message.hasOwnProperty('numUnit'))\n if (typeof message.numUnit === 'number')\n object.numUnit = options.longs === String ? String(message.numUnit) : message.numUnit\n else\n object.numUnit =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.numUnit)\n : options.longs === Number\n ? new $util.LongBits(\n message.numUnit.low >>> 0,\n message.numUnit.high >>> 0,\n ).toNumber()\n : message.numUnit\n return object\n }\n\n /**\n * Converts this Label to JSON.\n * @function toJSON\n * @memberof perftools.profiles.Label\n * @instance\n * @returns {Object.} JSON object\n */\n Label.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions)\n }\n\n return Label\n })()\n\n profiles.Mapping = (function() {\n /**\n * Properties of a Mapping.\n * @memberof perftools.profiles\n * @interface IMapping\n * @property {number|Long|null} [id] Mapping id\n * @property {number|Long|null} [memoryStart] Mapping memoryStart\n * @property {number|Long|null} [memoryLimit] Mapping memoryLimit\n * @property {number|Long|null} [fileOffset] Mapping fileOffset\n * @property {number|Long|null} [filename] Mapping filename\n * @property {number|Long|null} [buildId] Mapping buildId\n * @property {boolean|null} [hasFunctions] Mapping hasFunctions\n * @property {boolean|null} [hasFilenames] Mapping hasFilenames\n * @property {boolean|null} [hasLineNumbers] Mapping hasLineNumbers\n * @property {boolean|null} [hasInlineFrames] Mapping hasInlineFrames\n */\n\n /**\n * Constructs a new Mapping.\n * @memberof perftools.profiles\n * @classdesc Represents a Mapping.\n * @implements IMapping\n * @constructor\n * @param {perftools.profiles.IMapping=} [properties] Properties to set\n */\n function Mapping(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]\n }\n\n /**\n * Mapping id.\n * @member {number|Long} id\n * @memberof perftools.profiles.Mapping\n * @instance\n */\n Mapping.prototype.id = $util.Long ? $util.Long.fromBits(0, 0, true) : 0\n\n /**\n * Mapping memoryStart.\n * @member {number|Long} memoryStart\n * @memberof perftools.profiles.Mapping\n * @instance\n */\n Mapping.prototype.memoryStart = $util.Long ? $util.Long.fromBits(0, 0, true) : 0\n\n /**\n * Mapping memoryLimit.\n * @member {number|Long} memoryLimit\n * @memberof perftools.profiles.Mapping\n * @instance\n */\n Mapping.prototype.memoryLimit = $util.Long ? $util.Long.fromBits(0, 0, true) : 0\n\n /**\n * Mapping fileOffset.\n * @member {number|Long} fileOffset\n * @memberof perftools.profiles.Mapping\n * @instance\n */\n Mapping.prototype.fileOffset = $util.Long ? $util.Long.fromBits(0, 0, true) : 0\n\n /**\n * Mapping filename.\n * @member {number|Long} filename\n * @memberof perftools.profiles.Mapping\n * @instance\n */\n Mapping.prototype.filename = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Mapping buildId.\n * @member {number|Long} buildId\n * @memberof perftools.profiles.Mapping\n * @instance\n */\n Mapping.prototype.buildId = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Mapping hasFunctions.\n * @member {boolean} hasFunctions\n * @memberof perftools.profiles.Mapping\n * @instance\n */\n Mapping.prototype.hasFunctions = false\n\n /**\n * Mapping hasFilenames.\n * @member {boolean} hasFilenames\n * @memberof perftools.profiles.Mapping\n * @instance\n */\n Mapping.prototype.hasFilenames = false\n\n /**\n * Mapping hasLineNumbers.\n * @member {boolean} hasLineNumbers\n * @memberof perftools.profiles.Mapping\n * @instance\n */\n Mapping.prototype.hasLineNumbers = false\n\n /**\n * Mapping hasInlineFrames.\n * @member {boolean} hasInlineFrames\n * @memberof perftools.profiles.Mapping\n * @instance\n */\n Mapping.prototype.hasInlineFrames = false\n\n /**\n * Creates a new Mapping instance using the specified properties.\n * @function create\n * @memberof perftools.profiles.Mapping\n * @static\n * @param {perftools.profiles.IMapping=} [properties] Properties to set\n * @returns {perftools.profiles.Mapping} Mapping instance\n */\n Mapping.create = function create(properties) {\n return new Mapping(properties)\n }\n\n /**\n * Encodes the specified Mapping message. Does not implicitly {@link perftools.profiles.Mapping.verify|verify} messages.\n * @function encode\n * @memberof perftools.profiles.Mapping\n * @static\n * @param {perftools.profiles.IMapping} message Mapping message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Mapping.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create()\n if (message.id != null && message.hasOwnProperty('id'))\n writer.uint32(/* id 1, wireType 0 =*/ 8).uint64(message.id)\n if (message.memoryStart != null && message.hasOwnProperty('memoryStart'))\n writer.uint32(/* id 2, wireType 0 =*/ 16).uint64(message.memoryStart)\n if (message.memoryLimit != null && message.hasOwnProperty('memoryLimit'))\n writer.uint32(/* id 3, wireType 0 =*/ 24).uint64(message.memoryLimit)\n if (message.fileOffset != null && message.hasOwnProperty('fileOffset'))\n writer.uint32(/* id 4, wireType 0 =*/ 32).uint64(message.fileOffset)\n if (message.filename != null && message.hasOwnProperty('filename'))\n writer.uint32(/* id 5, wireType 0 =*/ 40).int64(message.filename)\n if (message.buildId != null && message.hasOwnProperty('buildId'))\n writer.uint32(/* id 6, wireType 0 =*/ 48).int64(message.buildId)\n if (message.hasFunctions != null && message.hasOwnProperty('hasFunctions'))\n writer.uint32(/* id 7, wireType 0 =*/ 56).bool(message.hasFunctions)\n if (message.hasFilenames != null && message.hasOwnProperty('hasFilenames'))\n writer.uint32(/* id 8, wireType 0 =*/ 64).bool(message.hasFilenames)\n if (message.hasLineNumbers != null && message.hasOwnProperty('hasLineNumbers'))\n writer.uint32(/* id 9, wireType 0 =*/ 72).bool(message.hasLineNumbers)\n if (message.hasInlineFrames != null && message.hasOwnProperty('hasInlineFrames'))\n writer.uint32(/* id 10, wireType 0 =*/ 80).bool(message.hasInlineFrames)\n return writer\n }\n\n /**\n * Encodes the specified Mapping message, length delimited. Does not implicitly {@link perftools.profiles.Mapping.verify|verify} messages.\n * @function encodeDelimited\n * @memberof perftools.profiles.Mapping\n * @static\n * @param {perftools.profiles.IMapping} message Mapping message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Mapping.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim()\n }\n\n /**\n * Decodes a Mapping message from the specified reader or buffer.\n * @function decode\n * @memberof perftools.profiles.Mapping\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {perftools.profiles.Mapping} Mapping\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Mapping.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader)\n var end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.perftools.profiles.Mapping()\n while (reader.pos < end) {\n var tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n message.id = reader.uint64()\n break\n case 2:\n message.memoryStart = reader.uint64()\n break\n case 3:\n message.memoryLimit = reader.uint64()\n break\n case 4:\n message.fileOffset = reader.uint64()\n break\n case 5:\n message.filename = reader.int64()\n break\n case 6:\n message.buildId = reader.int64()\n break\n case 7:\n message.hasFunctions = reader.bool()\n break\n case 8:\n message.hasFilenames = reader.bool()\n break\n case 9:\n message.hasLineNumbers = reader.bool()\n break\n case 10:\n message.hasInlineFrames = reader.bool()\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n }\n\n /**\n * Decodes a Mapping message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof perftools.profiles.Mapping\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {perftools.profiles.Mapping} Mapping\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Mapping.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader)\n return this.decode(reader, reader.uint32())\n }\n\n /**\n * Verifies a Mapping message.\n * @function verify\n * @memberof perftools.profiles.Mapping\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Mapping.verify = function verify(message) {\n if (typeof message !== 'object' || message === null) return 'object expected'\n if (message.id != null && message.hasOwnProperty('id'))\n if (\n !$util.isInteger(message.id) &&\n !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))\n )\n return 'id: integer|Long expected'\n if (message.memoryStart != null && message.hasOwnProperty('memoryStart'))\n if (\n !$util.isInteger(message.memoryStart) &&\n !(\n message.memoryStart &&\n $util.isInteger(message.memoryStart.low) &&\n $util.isInteger(message.memoryStart.high)\n )\n )\n return 'memoryStart: integer|Long expected'\n if (message.memoryLimit != null && message.hasOwnProperty('memoryLimit'))\n if (\n !$util.isInteger(message.memoryLimit) &&\n !(\n message.memoryLimit &&\n $util.isInteger(message.memoryLimit.low) &&\n $util.isInteger(message.memoryLimit.high)\n )\n )\n return 'memoryLimit: integer|Long expected'\n if (message.fileOffset != null && message.hasOwnProperty('fileOffset'))\n if (\n !$util.isInteger(message.fileOffset) &&\n !(\n message.fileOffset &&\n $util.isInteger(message.fileOffset.low) &&\n $util.isInteger(message.fileOffset.high)\n )\n )\n return 'fileOffset: integer|Long expected'\n if (message.filename != null && message.hasOwnProperty('filename'))\n if (\n !$util.isInteger(message.filename) &&\n !(\n message.filename &&\n $util.isInteger(message.filename.low) &&\n $util.isInteger(message.filename.high)\n )\n )\n return 'filename: integer|Long expected'\n if (message.buildId != null && message.hasOwnProperty('buildId'))\n if (\n !$util.isInteger(message.buildId) &&\n !(\n message.buildId &&\n $util.isInteger(message.buildId.low) &&\n $util.isInteger(message.buildId.high)\n )\n )\n return 'buildId: integer|Long expected'\n if (message.hasFunctions != null && message.hasOwnProperty('hasFunctions'))\n if (typeof message.hasFunctions !== 'boolean') return 'hasFunctions: boolean expected'\n if (message.hasFilenames != null && message.hasOwnProperty('hasFilenames'))\n if (typeof message.hasFilenames !== 'boolean') return 'hasFilenames: boolean expected'\n if (message.hasLineNumbers != null && message.hasOwnProperty('hasLineNumbers'))\n if (typeof message.hasLineNumbers !== 'boolean') return 'hasLineNumbers: boolean expected'\n if (message.hasInlineFrames != null && message.hasOwnProperty('hasInlineFrames'))\n if (typeof message.hasInlineFrames !== 'boolean')\n return 'hasInlineFrames: boolean expected'\n return null\n }\n\n /**\n * Creates a Mapping message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof perftools.profiles.Mapping\n * @static\n * @param {Object.} object Plain object\n * @returns {perftools.profiles.Mapping} Mapping\n */\n Mapping.fromObject = function fromObject(object) {\n if (object instanceof $root.perftools.profiles.Mapping) return object\n var message = new $root.perftools.profiles.Mapping()\n if (object.id != null)\n if ($util.Long) (message.id = $util.Long.fromValue(object.id)).unsigned = true\n else if (typeof object.id === 'string') message.id = parseInt(object.id, 10)\n else if (typeof object.id === 'number') message.id = object.id\n else if (typeof object.id === 'object')\n message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(\n true,\n )\n if (object.memoryStart != null)\n if ($util.Long)\n (message.memoryStart = $util.Long.fromValue(object.memoryStart)).unsigned = true\n else if (typeof object.memoryStart === 'string')\n message.memoryStart = parseInt(object.memoryStart, 10)\n else if (typeof object.memoryStart === 'number') message.memoryStart = object.memoryStart\n else if (typeof object.memoryStart === 'object')\n message.memoryStart = new $util.LongBits(\n object.memoryStart.low >>> 0,\n object.memoryStart.high >>> 0,\n ).toNumber(true)\n if (object.memoryLimit != null)\n if ($util.Long)\n (message.memoryLimit = $util.Long.fromValue(object.memoryLimit)).unsigned = true\n else if (typeof object.memoryLimit === 'string')\n message.memoryLimit = parseInt(object.memoryLimit, 10)\n else if (typeof object.memoryLimit === 'number') message.memoryLimit = object.memoryLimit\n else if (typeof object.memoryLimit === 'object')\n message.memoryLimit = new $util.LongBits(\n object.memoryLimit.low >>> 0,\n object.memoryLimit.high >>> 0,\n ).toNumber(true)\n if (object.fileOffset != null)\n if ($util.Long)\n (message.fileOffset = $util.Long.fromValue(object.fileOffset)).unsigned = true\n else if (typeof object.fileOffset === 'string')\n message.fileOffset = parseInt(object.fileOffset, 10)\n else if (typeof object.fileOffset === 'number') message.fileOffset = object.fileOffset\n else if (typeof object.fileOffset === 'object')\n message.fileOffset = new $util.LongBits(\n object.fileOffset.low >>> 0,\n object.fileOffset.high >>> 0,\n ).toNumber(true)\n if (object.filename != null)\n if ($util.Long)\n (message.filename = $util.Long.fromValue(object.filename)).unsigned = false\n else if (typeof object.filename === 'string')\n message.filename = parseInt(object.filename, 10)\n else if (typeof object.filename === 'number') message.filename = object.filename\n else if (typeof object.filename === 'object')\n message.filename = new $util.LongBits(\n object.filename.low >>> 0,\n object.filename.high >>> 0,\n ).toNumber()\n if (object.buildId != null)\n if ($util.Long) (message.buildId = $util.Long.fromValue(object.buildId)).unsigned = false\n else if (typeof object.buildId === 'string')\n message.buildId = parseInt(object.buildId, 10)\n else if (typeof object.buildId === 'number') message.buildId = object.buildId\n else if (typeof object.buildId === 'object')\n message.buildId = new $util.LongBits(\n object.buildId.low >>> 0,\n object.buildId.high >>> 0,\n ).toNumber()\n if (object.hasFunctions != null) message.hasFunctions = Boolean(object.hasFunctions)\n if (object.hasFilenames != null) message.hasFilenames = Boolean(object.hasFilenames)\n if (object.hasLineNumbers != null) message.hasLineNumbers = Boolean(object.hasLineNumbers)\n if (object.hasInlineFrames != null)\n message.hasInlineFrames = Boolean(object.hasInlineFrames)\n return message\n }\n\n /**\n * Creates a plain object from a Mapping message. Also converts values to other types if specified.\n * @function toObject\n * @memberof perftools.profiles.Mapping\n * @static\n * @param {perftools.profiles.Mapping} message Mapping\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Mapping.toObject = function toObject(message, options) {\n if (!options) options = {}\n var object = {}\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, true)\n object.id =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.id = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, true)\n object.memoryStart =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.memoryStart = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, true)\n object.memoryLimit =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.memoryLimit = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, true)\n object.fileOffset =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.fileOffset = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.filename =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.filename = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.buildId =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.buildId = options.longs === String ? '0' : 0\n object.hasFunctions = false\n object.hasFilenames = false\n object.hasLineNumbers = false\n object.hasInlineFrames = false\n }\n if (message.id != null && message.hasOwnProperty('id'))\n if (typeof message.id === 'number')\n object.id = options.longs === String ? String(message.id) : message.id\n else\n object.id =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.id)\n : options.longs === Number\n ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true)\n : message.id\n if (message.memoryStart != null && message.hasOwnProperty('memoryStart'))\n if (typeof message.memoryStart === 'number')\n object.memoryStart =\n options.longs === String ? String(message.memoryStart) : message.memoryStart\n else\n object.memoryStart =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.memoryStart)\n : options.longs === Number\n ? new $util.LongBits(\n message.memoryStart.low >>> 0,\n message.memoryStart.high >>> 0,\n ).toNumber(true)\n : message.memoryStart\n if (message.memoryLimit != null && message.hasOwnProperty('memoryLimit'))\n if (typeof message.memoryLimit === 'number')\n object.memoryLimit =\n options.longs === String ? String(message.memoryLimit) : message.memoryLimit\n else\n object.memoryLimit =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.memoryLimit)\n : options.longs === Number\n ? new $util.LongBits(\n message.memoryLimit.low >>> 0,\n message.memoryLimit.high >>> 0,\n ).toNumber(true)\n : message.memoryLimit\n if (message.fileOffset != null && message.hasOwnProperty('fileOffset'))\n if (typeof message.fileOffset === 'number')\n object.fileOffset =\n options.longs === String ? String(message.fileOffset) : message.fileOffset\n else\n object.fileOffset =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.fileOffset)\n : options.longs === Number\n ? new $util.LongBits(\n message.fileOffset.low >>> 0,\n message.fileOffset.high >>> 0,\n ).toNumber(true)\n : message.fileOffset\n if (message.filename != null && message.hasOwnProperty('filename'))\n if (typeof message.filename === 'number')\n object.filename = options.longs === String ? String(message.filename) : message.filename\n else\n object.filename =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.filename)\n : options.longs === Number\n ? new $util.LongBits(\n message.filename.low >>> 0,\n message.filename.high >>> 0,\n ).toNumber()\n : message.filename\n if (message.buildId != null && message.hasOwnProperty('buildId'))\n if (typeof message.buildId === 'number')\n object.buildId = options.longs === String ? String(message.buildId) : message.buildId\n else\n object.buildId =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.buildId)\n : options.longs === Number\n ? new $util.LongBits(\n message.buildId.low >>> 0,\n message.buildId.high >>> 0,\n ).toNumber()\n : message.buildId\n if (message.hasFunctions != null && message.hasOwnProperty('hasFunctions'))\n object.hasFunctions = message.hasFunctions\n if (message.hasFilenames != null && message.hasOwnProperty('hasFilenames'))\n object.hasFilenames = message.hasFilenames\n if (message.hasLineNumbers != null && message.hasOwnProperty('hasLineNumbers'))\n object.hasLineNumbers = message.hasLineNumbers\n if (message.hasInlineFrames != null && message.hasOwnProperty('hasInlineFrames'))\n object.hasInlineFrames = message.hasInlineFrames\n return object\n }\n\n /**\n * Converts this Mapping to JSON.\n * @function toJSON\n * @memberof perftools.profiles.Mapping\n * @instance\n * @returns {Object.} JSON object\n */\n Mapping.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions)\n }\n\n return Mapping\n })()\n\n profiles.Location = (function() {\n /**\n * Properties of a Location.\n * @memberof perftools.profiles\n * @interface ILocation\n * @property {number|Long|null} [id] Location id\n * @property {number|Long|null} [mappingId] Location mappingId\n * @property {number|Long|null} [address] Location address\n * @property {Array.|null} [line] Location line\n * @property {boolean|null} [isFolded] Location isFolded\n */\n\n /**\n * Constructs a new Location.\n * @memberof perftools.profiles\n * @classdesc Represents a Location.\n * @implements ILocation\n * @constructor\n * @param {perftools.profiles.ILocation=} [properties] Properties to set\n */\n function Location(properties) {\n this.line = []\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]\n }\n\n /**\n * Location id.\n * @member {number|Long} id\n * @memberof perftools.profiles.Location\n * @instance\n */\n Location.prototype.id = $util.Long ? $util.Long.fromBits(0, 0, true) : 0\n\n /**\n * Location mappingId.\n * @member {number|Long} mappingId\n * @memberof perftools.profiles.Location\n * @instance\n */\n Location.prototype.mappingId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0\n\n /**\n * Location address.\n * @member {number|Long} address\n * @memberof perftools.profiles.Location\n * @instance\n */\n Location.prototype.address = $util.Long ? $util.Long.fromBits(0, 0, true) : 0\n\n /**\n * Location line.\n * @member {Array.} line\n * @memberof perftools.profiles.Location\n * @instance\n */\n Location.prototype.line = $util.emptyArray\n\n /**\n * Location isFolded.\n * @member {boolean} isFolded\n * @memberof perftools.profiles.Location\n * @instance\n */\n Location.prototype.isFolded = false\n\n /**\n * Creates a new Location instance using the specified properties.\n * @function create\n * @memberof perftools.profiles.Location\n * @static\n * @param {perftools.profiles.ILocation=} [properties] Properties to set\n * @returns {perftools.profiles.Location} Location instance\n */\n Location.create = function create(properties) {\n return new Location(properties)\n }\n\n /**\n * Encodes the specified Location message. Does not implicitly {@link perftools.profiles.Location.verify|verify} messages.\n * @function encode\n * @memberof perftools.profiles.Location\n * @static\n * @param {perftools.profiles.ILocation} message Location message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Location.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create()\n if (message.id != null && message.hasOwnProperty('id'))\n writer.uint32(/* id 1, wireType 0 =*/ 8).uint64(message.id)\n if (message.mappingId != null && message.hasOwnProperty('mappingId'))\n writer.uint32(/* id 2, wireType 0 =*/ 16).uint64(message.mappingId)\n if (message.address != null && message.hasOwnProperty('address'))\n writer.uint32(/* id 3, wireType 0 =*/ 24).uint64(message.address)\n if (message.line != null && message.line.length)\n for (var i = 0; i < message.line.length; ++i)\n $root.perftools.profiles.Line.encode(\n message.line[i],\n writer.uint32(/* id 4, wireType 2 =*/ 34).fork(),\n ).ldelim()\n if (message.isFolded != null && message.hasOwnProperty('isFolded'))\n writer.uint32(/* id 5, wireType 0 =*/ 40).bool(message.isFolded)\n return writer\n }\n\n /**\n * Encodes the specified Location message, length delimited. Does not implicitly {@link perftools.profiles.Location.verify|verify} messages.\n * @function encodeDelimited\n * @memberof perftools.profiles.Location\n * @static\n * @param {perftools.profiles.ILocation} message Location message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Location.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim()\n }\n\n /**\n * Decodes a Location message from the specified reader or buffer.\n * @function decode\n * @memberof perftools.profiles.Location\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {perftools.profiles.Location} Location\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Location.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader)\n var end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.perftools.profiles.Location()\n while (reader.pos < end) {\n var tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n message.id = reader.uint64()\n break\n case 2:\n message.mappingId = reader.uint64()\n break\n case 3:\n message.address = reader.uint64()\n break\n case 4:\n if (!(message.line && message.line.length)) message.line = []\n message.line.push($root.perftools.profiles.Line.decode(reader, reader.uint32()))\n break\n case 5:\n message.isFolded = reader.bool()\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n }\n\n /**\n * Decodes a Location message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof perftools.profiles.Location\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {perftools.profiles.Location} Location\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Location.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader)\n return this.decode(reader, reader.uint32())\n }\n\n /**\n * Verifies a Location message.\n * @function verify\n * @memberof perftools.profiles.Location\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Location.verify = function verify(message) {\n if (typeof message !== 'object' || message === null) return 'object expected'\n if (message.id != null && message.hasOwnProperty('id'))\n if (\n !$util.isInteger(message.id) &&\n !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))\n )\n return 'id: integer|Long expected'\n if (message.mappingId != null && message.hasOwnProperty('mappingId'))\n if (\n !$util.isInteger(message.mappingId) &&\n !(\n message.mappingId &&\n $util.isInteger(message.mappingId.low) &&\n $util.isInteger(message.mappingId.high)\n )\n )\n return 'mappingId: integer|Long expected'\n if (message.address != null && message.hasOwnProperty('address'))\n if (\n !$util.isInteger(message.address) &&\n !(\n message.address &&\n $util.isInteger(message.address.low) &&\n $util.isInteger(message.address.high)\n )\n )\n return 'address: integer|Long expected'\n if (message.line != null && message.hasOwnProperty('line')) {\n if (!Array.isArray(message.line)) return 'line: array expected'\n for (var i = 0; i < message.line.length; ++i) {\n var error = $root.perftools.profiles.Line.verify(message.line[i])\n if (error) return 'line.' + error\n }\n }\n if (message.isFolded != null && message.hasOwnProperty('isFolded'))\n if (typeof message.isFolded !== 'boolean') return 'isFolded: boolean expected'\n return null\n }\n\n /**\n * Creates a Location message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof perftools.profiles.Location\n * @static\n * @param {Object.} object Plain object\n * @returns {perftools.profiles.Location} Location\n */\n Location.fromObject = function fromObject(object) {\n if (object instanceof $root.perftools.profiles.Location) return object\n var message = new $root.perftools.profiles.Location()\n if (object.id != null)\n if ($util.Long) (message.id = $util.Long.fromValue(object.id)).unsigned = true\n else if (typeof object.id === 'string') message.id = parseInt(object.id, 10)\n else if (typeof object.id === 'number') message.id = object.id\n else if (typeof object.id === 'object')\n message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(\n true,\n )\n if (object.mappingId != null)\n if ($util.Long)\n (message.mappingId = $util.Long.fromValue(object.mappingId)).unsigned = true\n else if (typeof object.mappingId === 'string')\n message.mappingId = parseInt(object.mappingId, 10)\n else if (typeof object.mappingId === 'number') message.mappingId = object.mappingId\n else if (typeof object.mappingId === 'object')\n message.mappingId = new $util.LongBits(\n object.mappingId.low >>> 0,\n object.mappingId.high >>> 0,\n ).toNumber(true)\n if (object.address != null)\n if ($util.Long) (message.address = $util.Long.fromValue(object.address)).unsigned = true\n else if (typeof object.address === 'string')\n message.address = parseInt(object.address, 10)\n else if (typeof object.address === 'number') message.address = object.address\n else if (typeof object.address === 'object')\n message.address = new $util.LongBits(\n object.address.low >>> 0,\n object.address.high >>> 0,\n ).toNumber(true)\n if (object.line) {\n if (!Array.isArray(object.line))\n throw TypeError('.perftools.profiles.Location.line: array expected')\n message.line = []\n for (var i = 0; i < object.line.length; ++i) {\n if (typeof object.line[i] !== 'object')\n throw TypeError('.perftools.profiles.Location.line: object expected')\n message.line[i] = $root.perftools.profiles.Line.fromObject(object.line[i])\n }\n }\n if (object.isFolded != null) message.isFolded = Boolean(object.isFolded)\n return message\n }\n\n /**\n * Creates a plain object from a Location message. Also converts values to other types if specified.\n * @function toObject\n * @memberof perftools.profiles.Location\n * @static\n * @param {perftools.profiles.Location} message Location\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Location.toObject = function toObject(message, options) {\n if (!options) options = {}\n var object = {}\n if (options.arrays || options.defaults) object.line = []\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, true)\n object.id =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.id = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, true)\n object.mappingId =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.mappingId = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, true)\n object.address =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.address = options.longs === String ? '0' : 0\n object.isFolded = false\n }\n if (message.id != null && message.hasOwnProperty('id'))\n if (typeof message.id === 'number')\n object.id = options.longs === String ? String(message.id) : message.id\n else\n object.id =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.id)\n : options.longs === Number\n ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true)\n : message.id\n if (message.mappingId != null && message.hasOwnProperty('mappingId'))\n if (typeof message.mappingId === 'number')\n object.mappingId =\n options.longs === String ? String(message.mappingId) : message.mappingId\n else\n object.mappingId =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.mappingId)\n : options.longs === Number\n ? new $util.LongBits(\n message.mappingId.low >>> 0,\n message.mappingId.high >>> 0,\n ).toNumber(true)\n : message.mappingId\n if (message.address != null && message.hasOwnProperty('address'))\n if (typeof message.address === 'number')\n object.address = options.longs === String ? String(message.address) : message.address\n else\n object.address =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.address)\n : options.longs === Number\n ? new $util.LongBits(\n message.address.low >>> 0,\n message.address.high >>> 0,\n ).toNumber(true)\n : message.address\n if (message.line && message.line.length) {\n object.line = []\n for (var j = 0; j < message.line.length; ++j)\n object.line[j] = $root.perftools.profiles.Line.toObject(message.line[j], options)\n }\n if (message.isFolded != null && message.hasOwnProperty('isFolded'))\n object.isFolded = message.isFolded\n return object\n }\n\n /**\n * Converts this Location to JSON.\n * @function toJSON\n * @memberof perftools.profiles.Location\n * @instance\n * @returns {Object.} JSON object\n */\n Location.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions)\n }\n\n return Location\n })()\n\n profiles.Line = (function() {\n /**\n * Properties of a Line.\n * @memberof perftools.profiles\n * @interface ILine\n * @property {number|Long|null} [functionId] Line functionId\n * @property {number|Long|null} [line] Line line\n */\n\n /**\n * Constructs a new Line.\n * @memberof perftools.profiles\n * @classdesc Represents a Line.\n * @implements ILine\n * @constructor\n * @param {perftools.profiles.ILine=} [properties] Properties to set\n */\n function Line(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]\n }\n\n /**\n * Line functionId.\n * @member {number|Long} functionId\n * @memberof perftools.profiles.Line\n * @instance\n */\n Line.prototype.functionId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0\n\n /**\n * Line line.\n * @member {number|Long} line\n * @memberof perftools.profiles.Line\n * @instance\n */\n Line.prototype.line = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Creates a new Line instance using the specified properties.\n * @function create\n * @memberof perftools.profiles.Line\n * @static\n * @param {perftools.profiles.ILine=} [properties] Properties to set\n * @returns {perftools.profiles.Line} Line instance\n */\n Line.create = function create(properties) {\n return new Line(properties)\n }\n\n /**\n * Encodes the specified Line message. Does not implicitly {@link perftools.profiles.Line.verify|verify} messages.\n * @function encode\n * @memberof perftools.profiles.Line\n * @static\n * @param {perftools.profiles.ILine} message Line message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Line.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create()\n if (message.functionId != null && message.hasOwnProperty('functionId'))\n writer.uint32(/* id 1, wireType 0 =*/ 8).uint64(message.functionId)\n if (message.line != null && message.hasOwnProperty('line'))\n writer.uint32(/* id 2, wireType 0 =*/ 16).int64(message.line)\n return writer\n }\n\n /**\n * Encodes the specified Line message, length delimited. Does not implicitly {@link perftools.profiles.Line.verify|verify} messages.\n * @function encodeDelimited\n * @memberof perftools.profiles.Line\n * @static\n * @param {perftools.profiles.ILine} message Line message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Line.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim()\n }\n\n /**\n * Decodes a Line message from the specified reader or buffer.\n * @function decode\n * @memberof perftools.profiles.Line\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {perftools.profiles.Line} Line\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Line.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader)\n var end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.perftools.profiles.Line()\n while (reader.pos < end) {\n var tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n message.functionId = reader.uint64()\n break\n case 2:\n message.line = reader.int64()\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n }\n\n /**\n * Decodes a Line message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof perftools.profiles.Line\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {perftools.profiles.Line} Line\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Line.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader)\n return this.decode(reader, reader.uint32())\n }\n\n /**\n * Verifies a Line message.\n * @function verify\n * @memberof perftools.profiles.Line\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Line.verify = function verify(message) {\n if (typeof message !== 'object' || message === null) return 'object expected'\n if (message.functionId != null && message.hasOwnProperty('functionId'))\n if (\n !$util.isInteger(message.functionId) &&\n !(\n message.functionId &&\n $util.isInteger(message.functionId.low) &&\n $util.isInteger(message.functionId.high)\n )\n )\n return 'functionId: integer|Long expected'\n if (message.line != null && message.hasOwnProperty('line'))\n if (\n !$util.isInteger(message.line) &&\n !(\n message.line &&\n $util.isInteger(message.line.low) &&\n $util.isInteger(message.line.high)\n )\n )\n return 'line: integer|Long expected'\n return null\n }\n\n /**\n * Creates a Line message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof perftools.profiles.Line\n * @static\n * @param {Object.} object Plain object\n * @returns {perftools.profiles.Line} Line\n */\n Line.fromObject = function fromObject(object) {\n if (object instanceof $root.perftools.profiles.Line) return object\n var message = new $root.perftools.profiles.Line()\n if (object.functionId != null)\n if ($util.Long)\n (message.functionId = $util.Long.fromValue(object.functionId)).unsigned = true\n else if (typeof object.functionId === 'string')\n message.functionId = parseInt(object.functionId, 10)\n else if (typeof object.functionId === 'number') message.functionId = object.functionId\n else if (typeof object.functionId === 'object')\n message.functionId = new $util.LongBits(\n object.functionId.low >>> 0,\n object.functionId.high >>> 0,\n ).toNumber(true)\n if (object.line != null)\n if ($util.Long) (message.line = $util.Long.fromValue(object.line)).unsigned = false\n else if (typeof object.line === 'string') message.line = parseInt(object.line, 10)\n else if (typeof object.line === 'number') message.line = object.line\n else if (typeof object.line === 'object')\n message.line = new $util.LongBits(\n object.line.low >>> 0,\n object.line.high >>> 0,\n ).toNumber()\n return message\n }\n\n /**\n * Creates a plain object from a Line message. Also converts values to other types if specified.\n * @function toObject\n * @memberof perftools.profiles.Line\n * @static\n * @param {perftools.profiles.Line} message Line\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Line.toObject = function toObject(message, options) {\n if (!options) options = {}\n var object = {}\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, true)\n object.functionId =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.functionId = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.line =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.line = options.longs === String ? '0' : 0\n }\n if (message.functionId != null && message.hasOwnProperty('functionId'))\n if (typeof message.functionId === 'number')\n object.functionId =\n options.longs === String ? String(message.functionId) : message.functionId\n else\n object.functionId =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.functionId)\n : options.longs === Number\n ? new $util.LongBits(\n message.functionId.low >>> 0,\n message.functionId.high >>> 0,\n ).toNumber(true)\n : message.functionId\n if (message.line != null && message.hasOwnProperty('line'))\n if (typeof message.line === 'number')\n object.line = options.longs === String ? String(message.line) : message.line\n else\n object.line =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.line)\n : options.longs === Number\n ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber()\n : message.line\n return object\n }\n\n /**\n * Converts this Line to JSON.\n * @function toJSON\n * @memberof perftools.profiles.Line\n * @instance\n * @returns {Object.} JSON object\n */\n Line.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions)\n }\n\n return Line\n })()\n\n profiles.Function = (function() {\n /**\n * Properties of a Function.\n * @memberof perftools.profiles\n * @interface IFunction\n * @property {number|Long|null} [id] Function id\n * @property {number|Long|null} [name] Function name\n * @property {number|Long|null} [systemName] Function systemName\n * @property {number|Long|null} [filename] Function filename\n * @property {number|Long|null} [startLine] Function startLine\n */\n\n /**\n * Constructs a new Function.\n * @memberof perftools.profiles\n * @classdesc Represents a Function.\n * @implements IFunction\n * @constructor\n * @param {perftools.profiles.IFunction=} [properties] Properties to set\n */\n function Function(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]\n }\n\n /**\n * Function id.\n * @member {number|Long} id\n * @memberof perftools.profiles.Function\n * @instance\n */\n Function.prototype.id = $util.Long ? $util.Long.fromBits(0, 0, true) : 0\n\n /**\n * Function name.\n * @member {number|Long} name\n * @memberof perftools.profiles.Function\n * @instance\n */\n Function.prototype.name = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Function systemName.\n * @member {number|Long} systemName\n * @memberof perftools.profiles.Function\n * @instance\n */\n Function.prototype.systemName = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Function filename.\n * @member {number|Long} filename\n * @memberof perftools.profiles.Function\n * @instance\n */\n Function.prototype.filename = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Function startLine.\n * @member {number|Long} startLine\n * @memberof perftools.profiles.Function\n * @instance\n */\n Function.prototype.startLine = $util.Long ? $util.Long.fromBits(0, 0, false) : 0\n\n /**\n * Creates a new Function instance using the specified properties.\n * @function create\n * @memberof perftools.profiles.Function\n * @static\n * @param {perftools.profiles.IFunction=} [properties] Properties to set\n * @returns {perftools.profiles.Function} Function instance\n */\n Function.create = function create(properties) {\n return new Function(properties)\n }\n\n /**\n * Encodes the specified Function message. Does not implicitly {@link perftools.profiles.Function.verify|verify} messages.\n * @function encode\n * @memberof perftools.profiles.Function\n * @static\n * @param {perftools.profiles.IFunction} message Function message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Function.encode = function encode(message, writer) {\n if (!writer) writer = $Writer.create()\n if (message.id != null && message.hasOwnProperty('id'))\n writer.uint32(/* id 1, wireType 0 =*/ 8).uint64(message.id)\n if (message.name != null && message.hasOwnProperty('name'))\n writer.uint32(/* id 2, wireType 0 =*/ 16).int64(message.name)\n if (message.systemName != null && message.hasOwnProperty('systemName'))\n writer.uint32(/* id 3, wireType 0 =*/ 24).int64(message.systemName)\n if (message.filename != null && message.hasOwnProperty('filename'))\n writer.uint32(/* id 4, wireType 0 =*/ 32).int64(message.filename)\n if (message.startLine != null && message.hasOwnProperty('startLine'))\n writer.uint32(/* id 5, wireType 0 =*/ 40).int64(message.startLine)\n return writer\n }\n\n /**\n * Encodes the specified Function message, length delimited. Does not implicitly {@link perftools.profiles.Function.verify|verify} messages.\n * @function encodeDelimited\n * @memberof perftools.profiles.Function\n * @static\n * @param {perftools.profiles.IFunction} message Function message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Function.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim()\n }\n\n /**\n * Decodes a Function message from the specified reader or buffer.\n * @function decode\n * @memberof perftools.profiles.Function\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {perftools.profiles.Function} Function\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Function.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader)) reader = $Reader.create(reader)\n var end = length === undefined ? reader.len : reader.pos + length,\n message = new $root.perftools.profiles.Function()\n while (reader.pos < end) {\n var tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n message.id = reader.uint64()\n break\n case 2:\n message.name = reader.int64()\n break\n case 3:\n message.systemName = reader.int64()\n break\n case 4:\n message.filename = reader.int64()\n break\n case 5:\n message.startLine = reader.int64()\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n }\n\n /**\n * Decodes a Function message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof perftools.profiles.Function\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {perftools.profiles.Function} Function\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Function.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader)) reader = new $Reader(reader)\n return this.decode(reader, reader.uint32())\n }\n\n /**\n * Verifies a Function message.\n * @function verify\n * @memberof perftools.profiles.Function\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Function.verify = function verify(message) {\n if (typeof message !== 'object' || message === null) return 'object expected'\n if (message.id != null && message.hasOwnProperty('id'))\n if (\n !$util.isInteger(message.id) &&\n !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))\n )\n return 'id: integer|Long expected'\n if (message.name != null && message.hasOwnProperty('name'))\n if (\n !$util.isInteger(message.name) &&\n !(\n message.name &&\n $util.isInteger(message.name.low) &&\n $util.isInteger(message.name.high)\n )\n )\n return 'name: integer|Long expected'\n if (message.systemName != null && message.hasOwnProperty('systemName'))\n if (\n !$util.isInteger(message.systemName) &&\n !(\n message.systemName &&\n $util.isInteger(message.systemName.low) &&\n $util.isInteger(message.systemName.high)\n )\n )\n return 'systemName: integer|Long expected'\n if (message.filename != null && message.hasOwnProperty('filename'))\n if (\n !$util.isInteger(message.filename) &&\n !(\n message.filename &&\n $util.isInteger(message.filename.low) &&\n $util.isInteger(message.filename.high)\n )\n )\n return 'filename: integer|Long expected'\n if (message.startLine != null && message.hasOwnProperty('startLine'))\n if (\n !$util.isInteger(message.startLine) &&\n !(\n message.startLine &&\n $util.isInteger(message.startLine.low) &&\n $util.isInteger(message.startLine.high)\n )\n )\n return 'startLine: integer|Long expected'\n return null\n }\n\n /**\n * Creates a Function message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof perftools.profiles.Function\n * @static\n * @param {Object.} object Plain object\n * @returns {perftools.profiles.Function} Function\n */\n Function.fromObject = function fromObject(object) {\n if (object instanceof $root.perftools.profiles.Function) return object\n var message = new $root.perftools.profiles.Function()\n if (object.id != null)\n if ($util.Long) (message.id = $util.Long.fromValue(object.id)).unsigned = true\n else if (typeof object.id === 'string') message.id = parseInt(object.id, 10)\n else if (typeof object.id === 'number') message.id = object.id\n else if (typeof object.id === 'object')\n message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(\n true,\n )\n if (object.name != null)\n if ($util.Long) (message.name = $util.Long.fromValue(object.name)).unsigned = false\n else if (typeof object.name === 'string') message.name = parseInt(object.name, 10)\n else if (typeof object.name === 'number') message.name = object.name\n else if (typeof object.name === 'object')\n message.name = new $util.LongBits(\n object.name.low >>> 0,\n object.name.high >>> 0,\n ).toNumber()\n if (object.systemName != null)\n if ($util.Long)\n (message.systemName = $util.Long.fromValue(object.systemName)).unsigned = false\n else if (typeof object.systemName === 'string')\n message.systemName = parseInt(object.systemName, 10)\n else if (typeof object.systemName === 'number') message.systemName = object.systemName\n else if (typeof object.systemName === 'object')\n message.systemName = new $util.LongBits(\n object.systemName.low >>> 0,\n object.systemName.high >>> 0,\n ).toNumber()\n if (object.filename != null)\n if ($util.Long)\n (message.filename = $util.Long.fromValue(object.filename)).unsigned = false\n else if (typeof object.filename === 'string')\n message.filename = parseInt(object.filename, 10)\n else if (typeof object.filename === 'number') message.filename = object.filename\n else if (typeof object.filename === 'object')\n message.filename = new $util.LongBits(\n object.filename.low >>> 0,\n object.filename.high >>> 0,\n ).toNumber()\n if (object.startLine != null)\n if ($util.Long)\n (message.startLine = $util.Long.fromValue(object.startLine)).unsigned = false\n else if (typeof object.startLine === 'string')\n message.startLine = parseInt(object.startLine, 10)\n else if (typeof object.startLine === 'number') message.startLine = object.startLine\n else if (typeof object.startLine === 'object')\n message.startLine = new $util.LongBits(\n object.startLine.low >>> 0,\n object.startLine.high >>> 0,\n ).toNumber()\n return message\n }\n\n /**\n * Creates a plain object from a Function message. Also converts values to other types if specified.\n * @function toObject\n * @memberof perftools.profiles.Function\n * @static\n * @param {perftools.profiles.Function} message Function\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Function.toObject = function toObject(message, options) {\n if (!options) options = {}\n var object = {}\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, true)\n object.id =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.id = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.name =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.name = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.systemName =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.systemName = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.filename =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.filename = options.longs === String ? '0' : 0\n if ($util.Long) {\n var long = new $util.Long(0, 0, false)\n object.startLine =\n options.longs === String\n ? long.toString()\n : options.longs === Number\n ? long.toNumber()\n : long\n } else object.startLine = options.longs === String ? '0' : 0\n }\n if (message.id != null && message.hasOwnProperty('id'))\n if (typeof message.id === 'number')\n object.id = options.longs === String ? String(message.id) : message.id\n else\n object.id =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.id)\n : options.longs === Number\n ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true)\n : message.id\n if (message.name != null && message.hasOwnProperty('name'))\n if (typeof message.name === 'number')\n object.name = options.longs === String ? String(message.name) : message.name\n else\n object.name =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.name)\n : options.longs === Number\n ? new $util.LongBits(message.name.low >>> 0, message.name.high >>> 0).toNumber()\n : message.name\n if (message.systemName != null && message.hasOwnProperty('systemName'))\n if (typeof message.systemName === 'number')\n object.systemName =\n options.longs === String ? String(message.systemName) : message.systemName\n else\n object.systemName =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.systemName)\n : options.longs === Number\n ? new $util.LongBits(\n message.systemName.low >>> 0,\n message.systemName.high >>> 0,\n ).toNumber()\n : message.systemName\n if (message.filename != null && message.hasOwnProperty('filename'))\n if (typeof message.filename === 'number')\n object.filename = options.longs === String ? String(message.filename) : message.filename\n else\n object.filename =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.filename)\n : options.longs === Number\n ? new $util.LongBits(\n message.filename.low >>> 0,\n message.filename.high >>> 0,\n ).toNumber()\n : message.filename\n if (message.startLine != null && message.hasOwnProperty('startLine'))\n if (typeof message.startLine === 'number')\n object.startLine =\n options.longs === String ? String(message.startLine) : message.startLine\n else\n object.startLine =\n options.longs === String\n ? $util.Long.prototype.toString.call(message.startLine)\n : options.longs === Number\n ? new $util.LongBits(\n message.startLine.low >>> 0,\n message.startLine.high >>> 0,\n ).toNumber()\n : message.startLine\n return object\n }\n\n /**\n * Converts this Function to JSON.\n * @function toJSON\n * @memberof perftools.profiles.Function\n * @instance\n * @returns {Object.} JSON object\n */\n Function.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions)\n }\n\n return Function\n })()\n\n return profiles\n })()\n\n return perftools\n})()\n\nmodule.exports = $root\n", "module.exports = Long;\r\n\r\n/**\r\n * wasm optimizations, to do native i64 multiplication and divide\r\n */\r\nvar wasm = null;\r\n\r\ntry {\r\n wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([\r\n 0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11\r\n ])), {}).exports;\r\n} catch (e) {\r\n // no wasm support :(\r\n}\r\n\r\n/**\r\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\r\n * See the from* functions below for more convenient ways of constructing Longs.\r\n * @exports Long\r\n * @class A Long class for representing a 64 bit two's-complement integer value.\r\n * @param {number} low The low (signed) 32 bits of the long\r\n * @param {number} high The high (signed) 32 bits of the long\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @constructor\r\n */\r\nfunction Long(low, high, unsigned) {\r\n\r\n /**\r\n * The low 32 bits as a signed value.\r\n * @type {number}\r\n */\r\n this.low = low | 0;\r\n\r\n /**\r\n * The high 32 bits as a signed value.\r\n * @type {number}\r\n */\r\n this.high = high | 0;\r\n\r\n /**\r\n * Whether unsigned or not.\r\n * @type {boolean}\r\n */\r\n this.unsigned = !!unsigned;\r\n}\r\n\r\n// The internal representation of a long is the two given signed, 32-bit values.\r\n// We use 32-bit pieces because these are the size of integers on which\r\n// Javascript performs bit-operations. For operations like addition and\r\n// multiplication, we split each number into 16 bit pieces, which can easily be\r\n// multiplied within Javascript's floating-point representation without overflow\r\n// or change in sign.\r\n//\r\n// In the algorithms below, we frequently reduce the negative case to the\r\n// positive case by negating the input(s) and then post-processing the result.\r\n// Note that we must ALWAYS check specially whether those values are MIN_VALUE\r\n// (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\r\n// a positive number, it overflows back into a negative). Not handling this\r\n// case would often result in infinite recursion.\r\n//\r\n// Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\r\n// methods on which they depend.\r\n\r\n/**\r\n * An indicator used to reliably determine if an object is a Long or not.\r\n * @type {boolean}\r\n * @const\r\n * @private\r\n */\r\nLong.prototype.__isLong__;\r\n\r\nObject.defineProperty(Long.prototype, \"__isLong__\", { value: true });\r\n\r\n/**\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n * @inner\r\n */\r\nfunction isLong(obj) {\r\n return (obj && obj[\"__isLong__\"]) === true;\r\n}\r\n\r\n/**\r\n * Tests if the specified object is a Long.\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n */\r\nLong.isLong = isLong;\r\n\r\n/**\r\n * A cache of the Long representations of small integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\nvar INT_CACHE = {};\r\n\r\n/**\r\n * A cache of the Long representations of small unsigned integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\nvar UINT_CACHE = {};\r\n\r\n/**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromInt(value, unsigned) {\r\n var obj, cachedObj, cache;\r\n if (unsigned) {\r\n value >>>= 0;\r\n if (cache = (0 <= value && value < 256)) {\r\n cachedObj = UINT_CACHE[value];\r\n if (cachedObj)\r\n return cachedObj;\r\n }\r\n obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);\r\n if (cache)\r\n UINT_CACHE[value] = obj;\r\n return obj;\r\n } else {\r\n value |= 0;\r\n if (cache = (-128 <= value && value < 128)) {\r\n cachedObj = INT_CACHE[value];\r\n if (cachedObj)\r\n return cachedObj;\r\n }\r\n obj = fromBits(value, value < 0 ? -1 : 0, false);\r\n if (cache)\r\n INT_CACHE[value] = obj;\r\n return obj;\r\n }\r\n}\r\n\r\n/**\r\n * Returns a Long representing the given 32 bit integer value.\r\n * @function\r\n * @param {number} value The 32 bit integer in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromInt = fromInt;\r\n\r\n/**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromNumber(value, unsigned) {\r\n if (isNaN(value))\r\n return unsigned ? UZERO : ZERO;\r\n if (unsigned) {\r\n if (value < 0)\r\n return UZERO;\r\n if (value >= TWO_PWR_64_DBL)\r\n return MAX_UNSIGNED_VALUE;\r\n } else {\r\n if (value <= -TWO_PWR_63_DBL)\r\n return MIN_VALUE;\r\n if (value + 1 >= TWO_PWR_63_DBL)\r\n return MAX_VALUE;\r\n }\r\n if (value < 0)\r\n return fromNumber(-value, unsigned).neg();\r\n return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\r\n}\r\n\r\n/**\r\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\r\n * @function\r\n * @param {number} value The number in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromNumber = fromNumber;\r\n\r\n/**\r\n * @param {number} lowBits\r\n * @param {number} highBits\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromBits(lowBits, highBits, unsigned) {\r\n return new Long(lowBits, highBits, unsigned);\r\n}\r\n\r\n/**\r\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\r\n * assumed to use 32 bits.\r\n * @function\r\n * @param {number} lowBits The low 32 bits\r\n * @param {number} highBits The high 32 bits\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromBits = fromBits;\r\n\r\n/**\r\n * @function\r\n * @param {number} base\r\n * @param {number} exponent\r\n * @returns {number}\r\n * @inner\r\n */\r\nvar pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\r\n\r\n/**\r\n * @param {string} str\r\n * @param {(boolean|number)=} unsigned\r\n * @param {number=} radix\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromString(str, unsigned, radix) {\r\n if (str.length === 0)\r\n throw Error('empty string');\r\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\r\n return ZERO;\r\n if (typeof unsigned === 'number') {\r\n // For goog.math.long compatibility\r\n radix = unsigned,\r\n unsigned = false;\r\n } else {\r\n unsigned = !! unsigned;\r\n }\r\n radix = radix || 10;\r\n if (radix < 2 || 36 < radix)\r\n throw RangeError('radix');\r\n\r\n var p;\r\n if ((p = str.indexOf('-')) > 0)\r\n throw Error('interior hyphen');\r\n else if (p === 0) {\r\n return fromString(str.substring(1), unsigned, radix).neg();\r\n }\r\n\r\n // Do several (8) digits each time through the loop, so as to\r\n // minimize the calls to the very expensive emulated div.\r\n var radixToPower = fromNumber(pow_dbl(radix, 8));\r\n\r\n var result = ZERO;\r\n for (var i = 0; i < str.length; i += 8) {\r\n var size = Math.min(8, str.length - i),\r\n value = parseInt(str.substring(i, i + size), radix);\r\n if (size < 8) {\r\n var power = fromNumber(pow_dbl(radix, size));\r\n result = result.mul(power).add(fromNumber(value));\r\n } else {\r\n result = result.mul(radixToPower);\r\n result = result.add(fromNumber(value));\r\n }\r\n }\r\n result.unsigned = unsigned;\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns a Long representation of the given string, written using the specified radix.\r\n * @function\r\n * @param {string} str The textual representation of the Long\r\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed\r\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromString = fromString;\r\n\r\n/**\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromValue(val, unsigned) {\r\n if (typeof val === 'number')\r\n return fromNumber(val, unsigned);\r\n if (typeof val === 'string')\r\n return fromString(val, unsigned);\r\n // Throws for non-objects, converts non-instanceof Long:\r\n return fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);\r\n}\r\n\r\n/**\r\n * Converts the specified value to a Long using the appropriate from* function for its type.\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long}\r\n */\r\nLong.fromValue = fromValue;\r\n\r\n// NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\r\n// no runtime penalty for these.\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_16_DBL = 1 << 16;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_24_DBL = 1 << 24;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\r\n\r\n/**\r\n * @type {!Long}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar ZERO = fromInt(0);\r\n\r\n/**\r\n * Signed zero.\r\n * @type {!Long}\r\n */\r\nLong.ZERO = ZERO;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar UZERO = fromInt(0, true);\r\n\r\n/**\r\n * Unsigned zero.\r\n * @type {!Long}\r\n */\r\nLong.UZERO = UZERO;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar ONE = fromInt(1);\r\n\r\n/**\r\n * Signed one.\r\n * @type {!Long}\r\n */\r\nLong.ONE = ONE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar UONE = fromInt(1, true);\r\n\r\n/**\r\n * Unsigned one.\r\n * @type {!Long}\r\n */\r\nLong.UONE = UONE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar NEG_ONE = fromInt(-1);\r\n\r\n/**\r\n * Signed negative one.\r\n * @type {!Long}\r\n */\r\nLong.NEG_ONE = NEG_ONE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false);\r\n\r\n/**\r\n * Maximum signed value.\r\n * @type {!Long}\r\n */\r\nLong.MAX_VALUE = MAX_VALUE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true);\r\n\r\n/**\r\n * Maximum unsigned value.\r\n * @type {!Long}\r\n */\r\nLong.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar MIN_VALUE = fromBits(0, 0x80000000|0, false);\r\n\r\n/**\r\n * Minimum signed value.\r\n * @type {!Long}\r\n */\r\nLong.MIN_VALUE = MIN_VALUE;\r\n\r\n/**\r\n * @alias Long.prototype\r\n * @inner\r\n */\r\nvar LongPrototype = Long.prototype;\r\n\r\n/**\r\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\r\n * @returns {number}\r\n */\r\nLongPrototype.toInt = function toInt() {\r\n return this.unsigned ? this.low >>> 0 : this.low;\r\n};\r\n\r\n/**\r\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\r\n * @returns {number}\r\n */\r\nLongPrototype.toNumber = function toNumber() {\r\n if (this.unsigned)\r\n return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);\r\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\r\n};\r\n\r\n/**\r\n * Converts the Long to a string written in the specified radix.\r\n * @param {number=} radix Radix (2-36), defaults to 10\r\n * @returns {string}\r\n * @override\r\n * @throws {RangeError} If `radix` is out of range\r\n */\r\nLongPrototype.toString = function toString(radix) {\r\n radix = radix || 10;\r\n if (radix < 2 || 36 < radix)\r\n throw RangeError('radix');\r\n if (this.isZero())\r\n return '0';\r\n if (this.isNegative()) { // Unsigned Longs are never negative\r\n if (this.eq(MIN_VALUE)) {\r\n // We need to change the Long value before it can be negated, so we remove\r\n // the bottom-most digit in this base and then recurse to do the rest.\r\n var radixLong = fromNumber(radix),\r\n div = this.div(radixLong),\r\n rem1 = div.mul(radixLong).sub(this);\r\n return div.toString(radix) + rem1.toInt().toString(radix);\r\n } else\r\n return '-' + this.neg().toString(radix);\r\n }\r\n\r\n // Do several (6) digits each time through the loop, so as to\r\n // minimize the calls to the very expensive emulated div.\r\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\r\n rem = this;\r\n var result = '';\r\n while (true) {\r\n var remDiv = rem.div(radixToPower),\r\n intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\r\n digits = intval.toString(radix);\r\n rem = remDiv;\r\n if (rem.isZero())\r\n return digits + result;\r\n else {\r\n while (digits.length < 6)\r\n digits = '0' + digits;\r\n result = '' + digits + result;\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Gets the high 32 bits as a signed integer.\r\n * @returns {number} Signed high bits\r\n */\r\nLongPrototype.getHighBits = function getHighBits() {\r\n return this.high;\r\n};\r\n\r\n/**\r\n * Gets the high 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned high bits\r\n */\r\nLongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\r\n return this.high >>> 0;\r\n};\r\n\r\n/**\r\n * Gets the low 32 bits as a signed integer.\r\n * @returns {number} Signed low bits\r\n */\r\nLongPrototype.getLowBits = function getLowBits() {\r\n return this.low;\r\n};\r\n\r\n/**\r\n * Gets the low 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned low bits\r\n */\r\nLongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\r\n return this.low >>> 0;\r\n};\r\n\r\n/**\r\n * Gets the number of bits needed to represent the absolute value of this Long.\r\n * @returns {number}\r\n */\r\nLongPrototype.getNumBitsAbs = function getNumBitsAbs() {\r\n if (this.isNegative()) // Unsigned Longs are never negative\r\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\r\n var val = this.high != 0 ? this.high : this.low;\r\n for (var bit = 31; bit > 0; bit--)\r\n if ((val & (1 << bit)) != 0)\r\n break;\r\n return this.high != 0 ? bit + 33 : bit + 1;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals zero.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isZero = function isZero() {\r\n return this.high === 0 && this.low === 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.eqz = LongPrototype.isZero;\r\n\r\n/**\r\n * Tests if this Long's value is negative.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isNegative = function isNegative() {\r\n return !this.unsigned && this.high < 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is positive.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isPositive = function isPositive() {\r\n return this.unsigned || this.high >= 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is odd.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isOdd = function isOdd() {\r\n return (this.low & 1) === 1;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is even.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isEven = function isEven() {\r\n return (this.low & 1) === 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.equals = function equals(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)\r\n return false;\r\n return this.high === other.high && this.low === other.low;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.eq = LongPrototype.equals;\r\n\r\n/**\r\n * Tests if this Long's value differs from the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.notEquals = function notEquals(other) {\r\n return !this.eq(/* validates */ other);\r\n};\r\n\r\n/**\r\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.neq = LongPrototype.notEquals;\r\n\r\n/**\r\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.ne = LongPrototype.notEquals;\r\n\r\n/**\r\n * Tests if this Long's value is less than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lessThan = function lessThan(other) {\r\n return this.comp(/* validates */ other) < 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lt = LongPrototype.lessThan;\r\n\r\n/**\r\n * Tests if this Long's value is less than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\r\n return this.comp(/* validates */ other) <= 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lte = LongPrototype.lessThanOrEqual;\r\n\r\n/**\r\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.le = LongPrototype.lessThanOrEqual;\r\n\r\n/**\r\n * Tests if this Long's value is greater than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.greaterThan = function greaterThan(other) {\r\n return this.comp(/* validates */ other) > 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.gt = LongPrototype.greaterThan;\r\n\r\n/**\r\n * Tests if this Long's value is greater than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\r\n return this.comp(/* validates */ other) >= 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.gte = LongPrototype.greaterThanOrEqual;\r\n\r\n/**\r\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.ge = LongPrototype.greaterThanOrEqual;\r\n\r\n/**\r\n * Compares this Long's value with the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n * if the given one is greater\r\n */\r\nLongPrototype.compare = function compare(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n if (this.eq(other))\r\n return 0;\r\n var thisNeg = this.isNegative(),\r\n otherNeg = other.isNegative();\r\n if (thisNeg && !otherNeg)\r\n return -1;\r\n if (!thisNeg && otherNeg)\r\n return 1;\r\n // At this point the sign bits are the same\r\n if (!this.unsigned)\r\n return this.sub(other).isNegative() ? -1 : 1;\r\n // Both are positive if at least one is unsigned\r\n return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;\r\n};\r\n\r\n/**\r\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n * if the given one is greater\r\n */\r\nLongPrototype.comp = LongPrototype.compare;\r\n\r\n/**\r\n * Negates this Long's value.\r\n * @returns {!Long} Negated Long\r\n */\r\nLongPrototype.negate = function negate() {\r\n if (!this.unsigned && this.eq(MIN_VALUE))\r\n return MIN_VALUE;\r\n return this.not().add(ONE);\r\n};\r\n\r\n/**\r\n * Negates this Long's value. This is an alias of {@link Long#negate}.\r\n * @function\r\n * @returns {!Long} Negated Long\r\n */\r\nLongPrototype.neg = LongPrototype.negate;\r\n\r\n/**\r\n * Returns the sum of this and the specified Long.\r\n * @param {!Long|number|string} addend Addend\r\n * @returns {!Long} Sum\r\n */\r\nLongPrototype.add = function add(addend) {\r\n if (!isLong(addend))\r\n addend = fromValue(addend);\r\n\r\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\r\n\r\n var a48 = this.high >>> 16;\r\n var a32 = this.high & 0xFFFF;\r\n var a16 = this.low >>> 16;\r\n var a00 = this.low & 0xFFFF;\r\n\r\n var b48 = addend.high >>> 16;\r\n var b32 = addend.high & 0xFFFF;\r\n var b16 = addend.low >>> 16;\r\n var b00 = addend.low & 0xFFFF;\r\n\r\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n c00 += a00 + b00;\r\n c16 += c00 >>> 16;\r\n c00 &= 0xFFFF;\r\n c16 += a16 + b16;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c32 += a32 + b32;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c48 += a48 + b48;\r\n c48 &= 0xFFFF;\r\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the difference of this and the specified Long.\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\nLongPrototype.subtract = function subtract(subtrahend) {\r\n if (!isLong(subtrahend))\r\n subtrahend = fromValue(subtrahend);\r\n return this.add(subtrahend.neg());\r\n};\r\n\r\n/**\r\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\r\n * @function\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\nLongPrototype.sub = LongPrototype.subtract;\r\n\r\n/**\r\n * Returns the product of this and the specified Long.\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\nLongPrototype.multiply = function multiply(multiplier) {\r\n if (this.isZero())\r\n return ZERO;\r\n if (!isLong(multiplier))\r\n multiplier = fromValue(multiplier);\r\n\r\n // use wasm support if present\r\n if (wasm) {\r\n var low = wasm.mul(this.low,\r\n this.high,\r\n multiplier.low,\r\n multiplier.high);\r\n return fromBits(low, wasm.get_high(), this.unsigned);\r\n }\r\n\r\n if (multiplier.isZero())\r\n return ZERO;\r\n if (this.eq(MIN_VALUE))\r\n return multiplier.isOdd() ? MIN_VALUE : ZERO;\r\n if (multiplier.eq(MIN_VALUE))\r\n return this.isOdd() ? MIN_VALUE : ZERO;\r\n\r\n if (this.isNegative()) {\r\n if (multiplier.isNegative())\r\n return this.neg().mul(multiplier.neg());\r\n else\r\n return this.neg().mul(multiplier).neg();\r\n } else if (multiplier.isNegative())\r\n return this.mul(multiplier.neg()).neg();\r\n\r\n // If both longs are small, use float multiplication\r\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\r\n return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\r\n\r\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\r\n // We can skip products that would overflow.\r\n\r\n var a48 = this.high >>> 16;\r\n var a32 = this.high & 0xFFFF;\r\n var a16 = this.low >>> 16;\r\n var a00 = this.low & 0xFFFF;\r\n\r\n var b48 = multiplier.high >>> 16;\r\n var b32 = multiplier.high & 0xFFFF;\r\n var b16 = multiplier.low >>> 16;\r\n var b00 = multiplier.low & 0xFFFF;\r\n\r\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n c00 += a00 * b00;\r\n c16 += c00 >>> 16;\r\n c00 &= 0xFFFF;\r\n c16 += a16 * b00;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c16 += a00 * b16;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c32 += a32 * b00;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c32 += a16 * b16;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c32 += a00 * b32;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\r\n c48 &= 0xFFFF;\r\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\r\n * @function\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\nLongPrototype.mul = LongPrototype.multiply;\r\n\r\n/**\r\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\r\n * unsigned if this Long is unsigned.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\nLongPrototype.divide = function divide(divisor) {\r\n if (!isLong(divisor))\r\n divisor = fromValue(divisor);\r\n if (divisor.isZero())\r\n throw Error('division by zero');\r\n\r\n // use wasm support if present\r\n if (wasm) {\r\n // guard against signed division overflow: the largest\r\n // negative number / -1 would be 1 larger than the largest\r\n // positive number, due to two's complement.\r\n if (!this.unsigned &&\r\n this.high === -0x80000000 &&\r\n divisor.low === -1 && divisor.high === -1) {\r\n // be consistent with non-wasm code path\r\n return this;\r\n }\r\n var low = (this.unsigned ? wasm.div_u : wasm.div_s)(\r\n this.low,\r\n this.high,\r\n divisor.low,\r\n divisor.high\r\n );\r\n return fromBits(low, wasm.get_high(), this.unsigned);\r\n }\r\n\r\n if (this.isZero())\r\n return this.unsigned ? UZERO : ZERO;\r\n var approx, rem, res;\r\n if (!this.unsigned) {\r\n // This section is only relevant for signed longs and is derived from the\r\n // closure library as a whole.\r\n if (this.eq(MIN_VALUE)) {\r\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\r\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\r\n else if (divisor.eq(MIN_VALUE))\r\n return ONE;\r\n else {\r\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\r\n var halfThis = this.shr(1);\r\n approx = halfThis.div(divisor).shl(1);\r\n if (approx.eq(ZERO)) {\r\n return divisor.isNegative() ? ONE : NEG_ONE;\r\n } else {\r\n rem = this.sub(divisor.mul(approx));\r\n res = approx.add(rem.div(divisor));\r\n return res;\r\n }\r\n }\r\n } else if (divisor.eq(MIN_VALUE))\r\n return this.unsigned ? UZERO : ZERO;\r\n if (this.isNegative()) {\r\n if (divisor.isNegative())\r\n return this.neg().div(divisor.neg());\r\n return this.neg().div(divisor).neg();\r\n } else if (divisor.isNegative())\r\n return this.div(divisor.neg()).neg();\r\n res = ZERO;\r\n } else {\r\n // The algorithm below has not been made for unsigned longs. It's therefore\r\n // required to take special care of the MSB prior to running it.\r\n if (!divisor.unsigned)\r\n divisor = divisor.toUnsigned();\r\n if (divisor.gt(this))\r\n return UZERO;\r\n if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\r\n return UONE;\r\n res = UZERO;\r\n }\r\n\r\n // Repeat the following until the remainder is less than other: find a\r\n // floating-point that approximates remainder / other *from below*, add this\r\n // into the result, and subtract it from the remainder. It is critical that\r\n // the approximate value is less than or equal to the real value so that the\r\n // remainder never becomes negative.\r\n rem = this;\r\n while (rem.gte(divisor)) {\r\n // Approximate the result of division. This may be a little greater or\r\n // smaller than the actual value.\r\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\r\n\r\n // We will tweak the approximate result by changing it in the 48-th digit or\r\n // the smallest non-fractional digit, whichever is larger.\r\n var log2 = Math.ceil(Math.log(approx) / Math.LN2),\r\n delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),\r\n\r\n // Decrease the approximation until it is smaller than the remainder. Note\r\n // that if it is too large, the product overflows and is negative.\r\n approxRes = fromNumber(approx),\r\n approxRem = approxRes.mul(divisor);\r\n while (approxRem.isNegative() || approxRem.gt(rem)) {\r\n approx -= delta;\r\n approxRes = fromNumber(approx, this.unsigned);\r\n approxRem = approxRes.mul(divisor);\r\n }\r\n\r\n // We know the answer can't be zero... and actually, zero would cause\r\n // infinite recursion since we would make no progress.\r\n if (approxRes.isZero())\r\n approxRes = ONE;\r\n\r\n res = res.add(approxRes);\r\n rem = rem.sub(approxRem);\r\n }\r\n return res;\r\n};\r\n\r\n/**\r\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\nLongPrototype.div = LongPrototype.divide;\r\n\r\n/**\r\n * Returns this Long modulo the specified.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\nLongPrototype.modulo = function modulo(divisor) {\r\n if (!isLong(divisor))\r\n divisor = fromValue(divisor);\r\n\r\n // use wasm support if present\r\n if (wasm) {\r\n var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(\r\n this.low,\r\n this.high,\r\n divisor.low,\r\n divisor.high\r\n );\r\n return fromBits(low, wasm.get_high(), this.unsigned);\r\n }\r\n\r\n return this.sub(this.div(divisor).mul(divisor));\r\n};\r\n\r\n/**\r\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\nLongPrototype.mod = LongPrototype.modulo;\r\n\r\n/**\r\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\nLongPrototype.rem = LongPrototype.modulo;\r\n\r\n/**\r\n * Returns the bitwise NOT of this Long.\r\n * @returns {!Long}\r\n */\r\nLongPrototype.not = function not() {\r\n return fromBits(~this.low, ~this.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the bitwise AND of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\nLongPrototype.and = function and(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the bitwise OR of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\nLongPrototype.or = function or(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the bitwise XOR of this Long and the given one.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\nLongPrototype.xor = function xor(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns this Long with bits shifted to the left by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shiftLeft = function shiftLeft(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n if ((numBits &= 63) === 0)\r\n return this;\r\n else if (numBits < 32)\r\n return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);\r\n else\r\n return fromBits(0, this.low << (numBits - 32), this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shl = LongPrototype.shiftLeft;\r\n\r\n/**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shiftRight = function shiftRight(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n if ((numBits &= 63) === 0)\r\n return this;\r\n else if (numBits < 32)\r\n return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);\r\n else\r\n return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shr = LongPrototype.shiftRight;\r\n\r\n/**\r\n * Returns this Long with bits logically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n numBits &= 63;\r\n if (numBits === 0)\r\n return this;\r\n else {\r\n var high = this.high;\r\n if (numBits < 32) {\r\n var low = this.low;\r\n return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);\r\n } else if (numBits === 32)\r\n return fromBits(high, 0, this.unsigned);\r\n else\r\n return fromBits(high >>> (numBits - 32), 0, this.unsigned);\r\n }\r\n};\r\n\r\n/**\r\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shru = LongPrototype.shiftRightUnsigned;\r\n\r\n/**\r\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\r\n\r\n/**\r\n * Converts this Long to signed.\r\n * @returns {!Long} Signed long\r\n */\r\nLongPrototype.toSigned = function toSigned() {\r\n if (!this.unsigned)\r\n return this;\r\n return fromBits(this.low, this.high, false);\r\n};\r\n\r\n/**\r\n * Converts this Long to unsigned.\r\n * @returns {!Long} Unsigned long\r\n */\r\nLongPrototype.toUnsigned = function toUnsigned() {\r\n if (this.unsigned)\r\n return this;\r\n return fromBits(this.low, this.high, true);\r\n};\r\n\r\n/**\r\n * Converts this Long to its byte representation.\r\n * @param {boolean=} le Whether little or big endian, defaults to big endian\r\n * @returns {!Array.} Byte representation\r\n */\r\nLongPrototype.toBytes = function toBytes(le) {\r\n return le ? this.toBytesLE() : this.toBytesBE();\r\n};\r\n\r\n/**\r\n * Converts this Long to its little endian byte representation.\r\n * @returns {!Array.} Little endian byte representation\r\n */\r\nLongPrototype.toBytesLE = function toBytesLE() {\r\n var hi = this.high,\r\n lo = this.low;\r\n return [\r\n lo & 0xff,\r\n lo >>> 8 & 0xff,\r\n lo >>> 16 & 0xff,\r\n lo >>> 24 ,\r\n hi & 0xff,\r\n hi >>> 8 & 0xff,\r\n hi >>> 16 & 0xff,\r\n hi >>> 24\r\n ];\r\n};\r\n\r\n/**\r\n * Converts this Long to its big endian byte representation.\r\n * @returns {!Array.} Big endian byte representation\r\n */\r\nLongPrototype.toBytesBE = function toBytesBE() {\r\n var hi = this.high,\r\n lo = this.low;\r\n return [\r\n hi >>> 24 ,\r\n hi >>> 16 & 0xff,\r\n hi >>> 8 & 0xff,\r\n hi & 0xff,\r\n lo >>> 24 ,\r\n lo >>> 16 & 0xff,\r\n lo >>> 8 & 0xff,\r\n lo & 0xff\r\n ];\r\n};\r\n\r\n/**\r\n * Creates a Long from its byte representation.\r\n * @param {!Array.} bytes Byte representation\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @param {boolean=} le Whether little or big endian, defaults to big endian\r\n * @returns {Long} The corresponding Long value\r\n */\r\nLong.fromBytes = function fromBytes(bytes, unsigned, le) {\r\n return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);\r\n};\r\n\r\n/**\r\n * Creates a Long from its little endian byte representation.\r\n * @param {!Array.} bytes Little endian byte representation\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {Long} The corresponding Long value\r\n */\r\nLong.fromBytesLE = function fromBytesLE(bytes, unsigned) {\r\n return new Long(\r\n bytes[0] |\r\n bytes[1] << 8 |\r\n bytes[2] << 16 |\r\n bytes[3] << 24,\r\n bytes[4] |\r\n bytes[5] << 8 |\r\n bytes[6] << 16 |\r\n bytes[7] << 24,\r\n unsigned\r\n );\r\n};\r\n\r\n/**\r\n * Creates a Long from its big endian byte representation.\r\n * @param {!Array.} bytes Big endian byte representation\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {Long} The corresponding Long value\r\n */\r\nLong.fromBytesBE = function fromBytesBE(bytes, unsigned) {\r\n return new Long(\r\n bytes[4] << 24 |\r\n bytes[5] << 16 |\r\n bytes[6] << 8 |\r\n bytes[7],\r\n bytes[0] << 24 |\r\n bytes[1] << 16 |\r\n bytes[2] << 8 |\r\n bytes[3],\r\n unsigned\r\n );\r\n};\r\n", "import {perftools} from './profile.proto.js'\nimport {FrameInfo, StackListProfileBuilder, Profile} from '../lib/profile'\nimport {lastOf} from '../lib/utils'\nimport {TimeFormatter, ByteFormatter} from '../lib/value-formatters'\nimport Long from 'long'\n\ninterface SampleType {\n type: string\n unit: string\n}\n\n// Find the index of the SampleType which should be used as our default\nfunction getSampleTypeIndex(profile: perftools.profiles.Profile): number {\n const dflt = profile.defaultSampleType\n const sampleTypes = profile.sampleType\n const fallback = sampleTypes.length - 1\n\n // string_table[0] will always be empty-string, so we can assume dflt === 0 is just the proto\n // empty-value, and means no defaultSampleType was specified.\n if (!dflt || !+dflt) {\n return fallback\n }\n\n const idx = sampleTypes.findIndex(e => e.type === dflt)\n if (idx === -1) {\n return fallback\n }\n return idx\n}\n\nexport function importAsPprofProfile(rawProfile: ArrayBuffer): Profile | null {\n if (rawProfile.byteLength === 0) return null\n\n let protoProfile: perftools.profiles.Profile\n try {\n protoProfile = perftools.profiles.Profile.decode(new Uint8Array(rawProfile))\n } catch (e) {\n return null\n }\n\n function i32(n: number | Long): number {\n return typeof n === 'number' ? n : (n as Long).low\n }\n\n function stringVal(key: number | Long): string | null {\n return protoProfile.stringTable[i32(key)] || null\n }\n\n const frameInfoByFunctionID = new Map()\n\n function frameInfoForFunction(f: perftools.profiles.IFunction): FrameInfo | null {\n const {name, filename, startLine} = f\n\n const nameString = (name != null && stringVal(name)) || '(unknown)'\n const fileNameString = filename != null ? stringVal(filename) : null\n const line = startLine != null ? +startLine : null\n\n const key = `${nameString}:${fileNameString}:${line}`\n\n const frameInfo: FrameInfo = {\n key,\n name: nameString,\n }\n\n if (fileNameString != null) {\n frameInfo.file = fileNameString\n }\n\n if (line != null) {\n frameInfo.line = line\n }\n\n return frameInfo\n }\n\n for (let f of protoProfile.function) {\n if (f.id) {\n const frameInfo = frameInfoForFunction(f)\n if (frameInfo != null) {\n frameInfoByFunctionID.set(i32(f.id), frameInfo)\n }\n }\n }\n\n function frameInfoForLocation(location: perftools.profiles.ILocation): FrameInfo | null {\n const {line} = location\n if (line == null) return null\n\n // From a comment on profile.proto:\n //\n // Multiple line indicates this location has inlined functions,\n // where the last entry represents the caller into which the\n // preceding entries were inlined.\n //\n // E.g., if memcpy() is inlined into printf:\n // line[0].function_name == \"memcpy\"\n // line[1].function_name == \"printf\"\n //\n // Let's just take the last line then\n const lastLine = lastOf(line)\n if (lastLine == null) return null\n\n if (lastLine.functionId) {\n let funcFrame = frameInfoByFunctionID.get(i32(lastLine.functionId))\n const line = lastLine.line instanceof Long ? lastLine.line.toNumber() : lastLine.line\n if (line && line > 0 && funcFrame != null) {\n funcFrame.line = line\n }\n return funcFrame || null\n } else {\n return null\n }\n }\n\n const frameByLocationID = new Map()\n\n for (let l of protoProfile.location) {\n if (l.id != null) {\n const frameInfo = frameInfoForLocation(l)\n if (frameInfo) {\n frameByLocationID.set(i32(l.id), frameInfo)\n }\n }\n }\n\n const sampleTypes: SampleType[] = protoProfile.sampleType.map(type => ({\n type: (type.type && stringVal(type.type)) || 'samples',\n unit: (type.unit && stringVal(type.unit)) || 'count',\n }))\n\n const sampleTypeIndex = getSampleTypeIndex(protoProfile)\n\n if (sampleTypeIndex < 0 || sampleTypeIndex >= sampleTypes.length) {\n return null\n }\n\n const sampleType = sampleTypes[sampleTypeIndex]\n\n const profileBuilder = new StackListProfileBuilder()\n\n switch (sampleType.unit) {\n case 'nanoseconds':\n case 'microseconds':\n case 'milliseconds':\n case 'seconds':\n profileBuilder.setValueFormatter(new TimeFormatter(sampleType.unit))\n break\n\n case 'bytes':\n profileBuilder.setValueFormatter(new ByteFormatter())\n break\n }\n\n for (let s of protoProfile.sample) {\n const stack = s.locationId ? s.locationId.map(l => frameByLocationID.get(i32(l))) : []\n stack.reverse()\n\n if (s.value == null || s.value.length <= sampleTypeIndex) {\n return null\n }\n\n const value = s.value[sampleTypeIndex]\n profileBuilder.appendSampleWithWeight(stack.filter(f => f != null) as FrameInfo[], +value)\n }\n\n return profileBuilder.build()\n}\n", "import {Profile, FrameInfo, StackListProfileBuilder} from '../lib/profile'\nimport {getOrInsert} from '../lib/utils'\nimport {ByteFormatter} from '../lib/value-formatters'\n\n/**\n * The V8 Heap Allocation profile is a way to represent heap allocation for each\n * javascript function. The format is a simple tree where the weight of each node\n * represent the memory allocated by the function and all its callee.\n * You can find more information on how to get a profile there :\n * https://developers.google.com/web/tools/chrome-devtools/memory-problems/#allocation-profile\n * You need to scroll down to \"Investigate memory allocation by function\"\n *\n * Note that Node.JS can retrieve this kind of profile via the Inspector protocol.\n */\n\ninterface HeapProfileCallFrame {\n columnNumber: number\n functionName: string\n lineNumber: number\n scriptId: string\n url: string\n}\n\ninterface HeapProfileNode {\n callFrame: HeapProfileCallFrame\n selfSize: number\n children: HeapProfileNode[]\n id: number\n parent?: number\n totalSize: number\n}\n\ninterface HeapProfile {\n head: HeapProfileNode\n}\n\nconst callFrameToFrameInfo = new Map()\nfunction frameInfoForCallFrame(callFrame: HeapProfileCallFrame) {\n return getOrInsert(callFrameToFrameInfo, callFrame, callFrame => {\n const file = callFrame.url\n const line = callFrame.lineNumber\n const col = callFrame.columnNumber\n const name =\n callFrame.functionName ||\n (file ? `(anonymous ${file.split('/').pop()}:${line})` : '(anonymous)')\n return {\n key: `${name}:${file}:${line}:${col}`,\n name,\n file,\n line,\n col,\n }\n })\n}\n\nexport function importFromChromeHeapProfile(chromeProfile: HeapProfile): Profile {\n const nodeById = new Map()\n let currentId = 0\n const computeId = (node: HeapProfileNode, parent?: HeapProfileNode) => {\n node.id = currentId++\n nodeById.set(node.id, node)\n if (parent) {\n node.parent = parent.id\n }\n\n node.children.forEach(children => computeId(children, node))\n }\n computeId(chromeProfile.head)\n\n // Compute the total size\n const computeTotalSize = (node: HeapProfileNode): number => {\n if (node.children.length === 0) return node.selfSize || 0\n const totalChild = node.children.reduce((total: number, children) => {\n total += computeTotalSize(children)\n return total\n }, node.selfSize)\n node.totalSize = totalChild\n return totalChild\n }\n const total = computeTotalSize(chromeProfile.head)\n\n // Compute all stacks by taking each last node and going upward\n const stacks: HeapProfileNode[][] = []\n for (let currentNode of nodeById.values()) {\n let stack: HeapProfileNode[] = []\n stack.push(currentNode)\n // While we found a parent\n while (true) {\n if (currentNode.parent === undefined) break\n const parent = nodeById.get(currentNode.parent)\n if (parent === undefined) break\n // Push the parent at the beginning of the stack\n stack.unshift(parent)\n currentNode = parent\n }\n stacks.push(stack)\n }\n\n const profile = new StackListProfileBuilder(total)\n\n for (let stack of stacks) {\n const lastFrame = stack[stack.length - 1]\n profile.appendSampleWithWeight(\n stack.map(frame => frameInfoForCallFrame(frame.callFrame)),\n lastFrame.selfSize,\n )\n }\n\n profile.setValueFormatter(new ByteFormatter())\n return profile.build()\n}\n", "import {sortBy, zeroPad, getOrInsert, lastOf} from '../lib/utils'\nimport {\n ProfileGroup,\n CallTreeProfileBuilder,\n FrameInfo,\n Profile,\n StackListProfileBuilder,\n} from '../lib/profile'\nimport {TimeFormatter} from '../lib/value-formatters'\n\n// This file concerns import from the \"Trace Event Format\", authored by Google\n// and used for Google's own chrome://trace.\n//\n// The file format is extremely general, and we only support the parts of it\n// that logically map onto speedscope's visualization capabilities.\n// Specifically, we only support the \"B\", \"E\", and \"X\" event types. Everything\n// else is ignored. We do, however, support import of profiles that are\n// multi-process/multi-threaded. Each process is split into a separate profile.\n//\n// Note that Chrome Developer Tools uses this format as well, but all the\n// relevant data used in those profiles is stored in events with the name\n// \"CpuProfile\", \"Profile\", or \"ProfileChunk\". If we detect those, we prioritize\n// importing the profile as a Chrome Developer Tools profile. Otherwise,\n// we try to import it as a \"Trace Event Format\" file.\n//\n// Spec: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview\n\ninterface TraceEvent {\n // The process ID for the process that output this event.\n pid: number\n\n // The thread ID for the thread that output this event.\n tid: number\n\n // The event type. This is a single character which changes depending on the type of event being output. The valid values are listed in the table below. We will discuss each phase type below.\n ph: string\n\n // The tracing clock timestamp of the event. The timestamps are provided at microsecond granularity.\n ts: number\n\n // The thread clock timestamp of the event. The timestamps are provided at microsecond granularity.\n tts?: number\n\n // The name of the event, as displayed in Trace Viewer\n name?: string\n\n // The event categories. This is a comma separated list of categories for the event. The categories can be used to hide events in the Trace Viewer UI.\n cat?: string\n\n // Any arguments provided for the event. Some of the event types have required argument fields, otherwise, you can put any information you wish in here. The arguments are displayed in Trace Viewer when you view an event in the analysis section.\n args?: any\n\n // A fixed color name to associate with the event. If provided, cname must be one of the names listed in trace-viewer's base color scheme's reserved color names list\n cname?: string\n}\n\nenum ExporterSource {\n HERMES = 'HERMES',\n UNKNOWN = 'UNKNOWN',\n}\n\ninterface HermesTraceEventArgs {\n line: number | null\n column: number | null\n funcLine?: string | null\n funcColumn?: string | null\n name: string\n category: string\n parent?: number\n url: string | null\n params: string | null\n allocatedCategory: string\n allocatedName: string\n}\n\nconst requiredHermesArguments: Array = [\n 'line',\n 'column',\n 'name',\n 'category',\n 'url',\n 'params',\n 'allocatedCategory',\n 'allocatedName',\n]\n\ntype HermesTraceEvent = TraceEvent & {\n args: HermesTraceEventArgs\n}\n\ninterface BTraceEvent extends TraceEvent {\n ph: 'B'\n}\n\ninterface ETraceEvent extends TraceEvent {\n ph: 'E'\n}\n\ninterface XTraceEvent extends TraceEvent {\n ph: 'X'\n dur?: number\n tdur?: number\n}\n\n// The trace format supports a number of event types that we ignore.\ntype ImportableTraceEvent = BTraceEvent | ETraceEvent | XTraceEvent\n\ninterface StackFrame {\n line: string\n column: string\n funcLine: string\n funcColumn: string\n name: string\n category: string\n // A parent function may or may not exist\n parent?: number\n}\n\ninterface Sample {\n cpu: string\n name: string\n ts: string\n pid: number\n tid: string\n weight: string\n // Will refer to an element in the stackFrames object\n sf: number\n stackFrameData?: StackFrame\n}\n\ninterface TraceWithSamples {\n traceEvents: TraceEvent[]\n samples: Sample[]\n stackFrames: {[key: string]: StackFrame}\n}\n\ninterface TraceEventObject {\n traceEvents: TraceEvent[]\n}\n\ntype Trace = TraceEvent[] | TraceEventObject | TraceWithSamples\n\nfunction pidTidKey(pid: number, tid: number): string {\n // We zero-pad the PID and TID to make sorting them by pid/tid pair later easier.\n return `${zeroPad('' + pid, 10)}:${zeroPad('' + tid, 10)}`\n}\n\nfunction partitionByPidTid(\n events: T[],\n): Map {\n const map = new Map()\n\n for (let ev of events) {\n const list = getOrInsert(map, pidTidKey(Number(ev.pid), Number(ev.tid)), () => [])\n list.push(ev)\n }\n\n return map\n}\n\nfunction selectQueueToTakeFromNext(\n bEventQueue: BTraceEvent[],\n eEventQueue: ETraceEvent[],\n): 'B' | 'E' {\n if (bEventQueue.length === 0 && eEventQueue.length === 0) {\n throw new Error('This method should not be given both queues empty')\n }\n if (eEventQueue.length === 0) return 'B'\n if (bEventQueue.length === 0) return 'E'\n\n const bFront = bEventQueue[0]\n const eFront = eEventQueue[0]\n\n const bts = bFront.ts\n const ets = eFront.ts\n\n if (bts < ets) return 'B'\n if (ets < bts) return 'E'\n\n // If we got here, the 'B' event queue and the 'E' event queue have events at\n // the front with equal timestamps.\n\n // If the front of the 'E' queue matches the front of the 'B' queue by key,\n // then it means we have a zero duration event. Process the 'B' queue first\n // to ensure it opens before we try to close it.\n //\n // Otherwise, process the 'E' queue first.\n return getEventId(bFront) === getEventId(eFront) ? 'B' : 'E'\n}\n\nfunction convertToEventQueues(events: ImportableTraceEvent[]): [BTraceEvent[], ETraceEvent[]] {\n const beginEvents: BTraceEvent[] = []\n const endEvents: ETraceEvent[] = []\n\n // Rebase all of the timestamps on the lowest timestamp\n if (events.length > 0) {\n let firstTs = Number.MAX_SAFE_INTEGER\n for (let ev of events) {\n firstTs = Math.min(firstTs, ev.ts)\n }\n for (let ev of events) {\n ev.ts -= firstTs\n }\n }\n\n // Next, combine B, E, and X events into two timestamp ordered queues.\n const xEvents: XTraceEvent[] = []\n for (let ev of events) {\n switch (ev.ph) {\n case 'B': {\n beginEvents.push(ev)\n break\n }\n\n case 'E': {\n endEvents.push(ev)\n break\n }\n\n case 'X': {\n xEvents.push(ev)\n break\n }\n\n default: {\n const _exhaustiveCheck: never = ev\n return _exhaustiveCheck\n }\n }\n }\n\n function dur(x: XTraceEvent): number {\n return x.dur ?? x.tdur ?? 0\n }\n\n xEvents.sort((a, b) => {\n if (a.ts < b.ts) return -1\n if (a.ts > b.ts) return 1\n\n // Super weird special case: if we have two 'X' events with the same 'ts'\n // but different 'dur' the only valid interpretation is to put the one with\n // the longer 'dur' first, because you can't nest longer things in shorter\n // things.\n const aDur = dur(a)\n const bDur = dur(b)\n if (aDur > bDur) return -1\n if (aDur < bDur) return 1\n\n // Otherwise, retain the original order by relying upon a stable sort here.\n return 0\n })\n\n for (let x of xEvents) {\n const xDur = dur(x)\n beginEvents.push({...x, ph: 'B'} as BTraceEvent)\n endEvents.push({...x, ph: 'E', ts: x.ts + xDur} as ETraceEvent)\n }\n\n function compareTimestamps(a: TraceEvent, b: TraceEvent) {\n if (a.ts < b.ts) return -1\n if (a.ts > b.ts) return 1\n\n // Important: if the timestamps are the same, return zero. We're going to\n // rely upon a stable sort here.\n return 0\n }\n\n beginEvents.sort(compareTimestamps)\n endEvents.sort(compareTimestamps)\n\n return [beginEvents, endEvents]\n}\n\nfunction filterIgnoredEventTypes(events: TraceEvent[]): ImportableTraceEvent[] {\n const ret: ImportableTraceEvent[] = []\n for (let ev of events) {\n switch (ev.ph) {\n case 'B':\n case 'E':\n case 'X':\n ret.push(ev as ImportableTraceEvent)\n }\n }\n return ret\n}\n\nfunction getProcessNamesByPid(events: TraceEvent[]): Map {\n const processNamesByPid = new Map()\n for (let ev of events) {\n if (ev.ph === 'M' && ev.name === 'process_name' && ev.args && ev.args.name) {\n processNamesByPid.set(ev.pid, ev.args.name)\n }\n }\n return processNamesByPid\n}\n\nfunction getThreadNamesByPidTid(events: TraceEvent[]): Map {\n const threadNameByPidTid = new Map()\n\n for (let ev of events) {\n if (ev.ph === 'M' && ev.name === 'thread_name' && ev.args && ev.args.name) {\n threadNameByPidTid.set(pidTidKey(ev.pid, ev.tid), ev.args.name)\n }\n }\n return threadNameByPidTid\n}\n\nfunction getEventName(event: TraceEvent): string {\n return `${event.name || '(unnamed)'}`\n}\n\n/**\n * Attempt to construct a unique identifier for an event. Note that this\n * is different from the frame key, as in some cases we don't want to include\n * some arguments to allow from frame grouping (e.g. parent in the case of\n * hermes profiles)\n */\nfunction getEventId(event: TraceEvent): string {\n let key = getEventName(event)\n if (event.args) {\n key += ` ${JSON.stringify(event.args)}`\n }\n return key\n}\n\nfunction frameInfoForEvent(\n event: TraceEvent,\n exporterSource: ExporterSource = ExporterSource.UNKNOWN,\n): FrameInfo {\n // In Hermes profiles we have additional guaranteed metadata we can use to\n // more accurately populate profiles with info such as line + col number\n if (exporterSource === ExporterSource.HERMES) {\n const hermesFrameKey = `${event.name}:${event.args.url}:${event.args.line}:${event.args.column}`\n\n return {\n name: getEventName(event),\n key: hermesFrameKey,\n file: event.args.url,\n line: event.args.line,\n col: event.args.column,\n }\n }\n\n const key = getEventId(event)\n\n return {\n name: key,\n key: key,\n }\n}\n\nfunction getProfileName(\n processName: string | undefined,\n threadName: string | undefined,\n pid: number,\n tid: number,\n): string {\n if (processName != null && threadName != null) {\n return `${processName} (pid ${pid}), ${threadName} (tid ${tid})`\n } else if (processName != null) {\n return `${processName} (pid ${pid}, tid ${tid})`\n } else if (threadName != null) {\n return `${threadName} (pid ${pid}, tid ${tid})`\n } else {\n return `pid ${pid}, tid ${tid}`\n }\n}\n\nfunction getProfileNamesFromSamples(\n events: TraceEvent[],\n partitionedSamples: Map,\n): Map {\n const processNamesByPid = getProcessNamesByPid(events)\n const threadNamesByPidTid = getThreadNamesByPidTid(events)\n\n const profileNamesByPidTid = new Map()\n\n partitionedSamples.forEach(samples => {\n if (samples.length === 0) return\n\n const pid = Number(samples[0].pid)\n const tid = Number(samples[0].tid)\n\n const profileKey = pidTidKey(pid, tid)\n const processName = processNamesByPid.get(pid)\n const threadName = threadNamesByPidTid.get(profileKey)\n const profileName = getProfileName(processName, threadName, pid, tid)\n\n profileNamesByPidTid.set(profileKey, profileName)\n })\n\n return profileNamesByPidTid\n}\n\nfunction getProfileNamesFromTraceEvents(\n events: TraceEvent[],\n partitionedTraceEvents: Map,\n): Map {\n const processNamesByPid = getProcessNamesByPid(events)\n const threadNamesByPidTid = getThreadNamesByPidTid(events)\n\n const profileNamesByPidTid = new Map()\n\n partitionedTraceEvents.forEach(importableEvents => {\n if (importableEvents.length === 0) return\n\n const {pid, tid} = importableEvents[0]\n\n const profileKey = pidTidKey(pid, tid)\n const processName = processNamesByPid.get(pid)\n const threadName = threadNamesByPidTid.get(profileKey)\n const profileName = getProfileName(processName, threadName, pid, tid)\n\n profileNamesByPidTid.set(profileKey, profileName)\n })\n\n return profileNamesByPidTid\n}\n\nfunction eventListToProfile(\n importableEvents: ImportableTraceEvent[],\n name: string,\n exporterSource: ExporterSource = ExporterSource.UNKNOWN,\n): Profile {\n // The trace event format is hard to deal with because it specifically\n // allows events to be recorded out of order, *but* event ordering is still\n // important for events with the same timestamp. Because of this, rather\n // than thinking about the entire event stream as a single queue of events,\n // we're going to first construct two time-ordered lists of events:\n //\n // 1. ts ordered queue of 'B' events\n // 2. ts ordered queue of 'E' events\n //\n // We deal with 'X' events by converting them to one entry in the 'B' event\n // queue and one entry in the 'E' event queue.\n //\n // The high level goal is to deal with 'B' events in 'ts' order, breaking\n // ties by the order the events occurred in the file, and deal with 'E'\n // events in 'ts' order, breaking ties in whatever order causes the 'E'\n // events to match whatever is on the top of the stack.\n const [bEventQueue, eEventQueue] = convertToEventQueues(importableEvents)\n\n const profileBuilder = new CallTreeProfileBuilder()\n profileBuilder.setValueFormatter(new TimeFormatter('microseconds'))\n profileBuilder.setName(name)\n\n const frameStack: BTraceEvent[] = []\n const enterFrame = (b: BTraceEvent) => {\n frameStack.push(b)\n profileBuilder.enterFrame(frameInfoForEvent(b, exporterSource), b.ts)\n }\n\n const tryToLeaveFrame = (e: ETraceEvent) => {\n const b = lastOf(frameStack)\n\n if (b == null) {\n console.warn(\n `Tried to end frame \"${\n frameInfoForEvent(e, exporterSource).key\n }\", but the stack was empty. Doing nothing instead.`,\n )\n return\n }\n\n const eFrameInfo = frameInfoForEvent(e, exporterSource)\n const bFrameInfo = frameInfoForEvent(b, exporterSource)\n\n if (e.name !== b.name) {\n console.warn(\n `ts=${e.ts}: Tried to end \"${eFrameInfo.key}\" when \"${bFrameInfo.key}\" was on the top of the stack. Doing nothing instead.`,\n )\n return\n }\n\n if (eFrameInfo.key !== bFrameInfo.key) {\n console.warn(\n `ts=${e.ts}: Tried to end \"${eFrameInfo.key}\" when \"${bFrameInfo.key}\" was on the top of the stack. Ending ${bFrameInfo.key} instead.`,\n )\n }\n\n frameStack.pop()\n profileBuilder.leaveFrame(bFrameInfo, e.ts)\n }\n\n while (bEventQueue.length > 0 || eEventQueue.length > 0) {\n const queueName = selectQueueToTakeFromNext(bEventQueue, eEventQueue)\n switch (queueName) {\n case 'B': {\n enterFrame(bEventQueue.shift()!)\n break\n }\n case 'E': {\n // Before we take the first event in the 'E' queue, let's first see if\n // there are any e events that exactly match the top of the stack.\n // We'll prioritize first by key, then by name if we can't find a key\n // match.\n const stackTop = lastOf(frameStack)\n if (stackTop != null) {\n const bFrameInfo = frameInfoForEvent(stackTop, exporterSource)\n\n let swapped: boolean = false\n\n for (let i = 1; i < eEventQueue.length; i++) {\n const eEvent = eEventQueue[i]\n if (eEvent.ts > eEventQueue[0].ts) {\n // Only consider 'E' events with the same ts as the front of the queue.\n break\n }\n\n const eFrameInfo = frameInfoForEvent(eEvent, exporterSource)\n if (bFrameInfo.key === eFrameInfo.key) {\n // We have a match! Process this one first.\n const temp = eEventQueue[0]\n eEventQueue[0] = eEventQueue[i]\n eEventQueue[i] = temp\n swapped = true\n break\n }\n }\n\n if (!swapped) {\n // There was no key match, let's see if we can find a name match\n for (let i = 1; i < eEventQueue.length; i++) {\n const eEvent = eEventQueue[i]\n if (eEvent.ts > eEventQueue[0].ts) {\n // Only consider 'E' events with the same ts as the front of the queue.\n break\n }\n\n if (eEvent.name === stackTop.name) {\n // We have a match! Process this one first.\n const temp = eEventQueue[0]\n eEventQueue[0] = eEventQueue[i]\n eEventQueue[i] = temp\n swapped = true\n break\n }\n }\n }\n\n // If swapped is still false at this point, it means we're about to\n // pop a stack frame that doesn't even match by name. Bummer.\n }\n\n const e = eEventQueue.shift()!\n\n tryToLeaveFrame(e)\n break\n }\n\n default:\n const _exhaustiveCheck: never = queueName\n return _exhaustiveCheck\n }\n }\n\n for (let i = frameStack.length - 1; i >= 0; i--) {\n const frame = frameInfoForEvent(frameStack[i], exporterSource)\n console.warn(`Frame \"${frame.key}\" was still open at end of profile. Closing automatically.`)\n profileBuilder.leaveFrame(frame, profileBuilder.getTotalWeight())\n }\n\n return profileBuilder.build()\n}\n\n/**\n * Returns an array containing the time difference in microseconds between the current\n * sample and the next sample\n */\nfunction getTimeDeltasForSamples(samples: Sample[]): number[] {\n const timeDeltas: number[] = []\n let lastTimeStamp = Number(samples[0].ts)\n\n samples.forEach((sample: Sample, idx: number) => {\n if (idx === 0) return\n\n const timeDiff = Number(sample.ts) - lastTimeStamp\n lastTimeStamp = Number(sample.ts)\n timeDeltas.push(timeDiff)\n })\n\n timeDeltas.push(0)\n\n return timeDeltas\n}\n\n/**\n * The chrome json trace event spec only specifies name and category\n * as required stack frame properties\n *\n * https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#heading=h.b4y98p32171\n */\nfunction frameInfoForSampleFrame({name, category}: StackFrame): FrameInfo {\n return {\n key: `${name}:${category}`,\n name: name,\n }\n}\n\nfunction getActiveFramesForSample(\n stackFrames: {[key: string]: StackFrame},\n frameId: number,\n): FrameInfo[] {\n const frames = []\n let parent: number | undefined = frameId\n\n while (parent) {\n const frame: StackFrame = stackFrames[parent]\n\n if (!frame) {\n throw new Error(`Could not find frame for id ${parent}`)\n }\n\n frames.push(frameInfoForSampleFrame(frame))\n parent = frame.parent\n }\n\n return frames.reverse()\n}\n\nfunction sampleListToProfile(contents: TraceWithSamples, samples: Sample[], name: string): Profile {\n const profileBuilder = new StackListProfileBuilder()\n\n profileBuilder.setValueFormatter(new TimeFormatter('microseconds'))\n profileBuilder.setName(name)\n\n const timeDeltas = getTimeDeltasForSamples(samples)\n\n samples.forEach((sample, index) => {\n const timeDelta = timeDeltas[index]\n const activeFrames = getActiveFramesForSample(contents.stackFrames, sample.sf)\n\n profileBuilder.appendSampleWithWeight(activeFrames, timeDelta)\n })\n\n return profileBuilder.build()\n}\n\nfunction eventListToProfileGroup(\n events: TraceEvent[],\n exporterSource: ExporterSource = ExporterSource.UNKNOWN,\n): ProfileGroup {\n const importableEvents = filterIgnoredEventTypes(events)\n const partitionedTraceEvents = partitionByPidTid(importableEvents)\n const profileNamesByPidTid = getProfileNamesFromTraceEvents(events, partitionedTraceEvents)\n\n const profilePairs: [string, Profile][] = []\n\n profileNamesByPidTid.forEach((name, profileKey) => {\n const importableEventsForPidTid = partitionedTraceEvents.get(profileKey)\n\n if (!importableEventsForPidTid) {\n throw new Error(`Could not find events for key: ${importableEventsForPidTid}`)\n }\n\n profilePairs.push([\n profileKey,\n eventListToProfile(importableEventsForPidTid, name, exporterSource),\n ])\n })\n\n // For now, we just sort processes by pid & tid.\n // TODO: The standard specifies that metadata events with the name\n // \"process_sort_index\" and \"thread_sort_index\" can be used to influence the\n // order, but for simplicity we'll ignore that until someone complains :)\n sortBy(profilePairs, p => p[0])\n\n return {\n name: '',\n indexToView: 0,\n profiles: profilePairs.map(p => p[1]),\n }\n}\n\nfunction sampleListToProfileGroup(contents: TraceWithSamples): ProfileGroup {\n const partitionedSamples = partitionByPidTid(contents.samples)\n const profileNamesByPidTid = getProfileNamesFromSamples(contents.traceEvents, partitionedSamples)\n\n const profilePairs: [string, Profile][] = []\n\n profileNamesByPidTid.forEach((name, profileKey) => {\n const samplesForPidTid = partitionedSamples.get(profileKey)\n\n if (!samplesForPidTid) {\n throw new Error(`Could not find samples for key: ${samplesForPidTid}`)\n }\n\n if (samplesForPidTid.length === 0) {\n return\n }\n\n profilePairs.push([profileKey, sampleListToProfile(contents, samplesForPidTid, name)])\n })\n\n // For now, we just sort processes by pid & tid.\n // TODO: The standard specifies that metadata events with the name\n // \"process_sort_index\" and \"thread_sort_index\" can be used to influence the\n // order, but for simplicity we'll ignore that until someone complains :)\n sortBy(profilePairs, p => p[0])\n\n return {\n name: '',\n indexToView: 0,\n profiles: profilePairs.map(p => p[1]),\n }\n}\n\nfunction isTraceEventList(maybeEventList: any): maybeEventList is TraceEvent[] {\n if (!Array.isArray(maybeEventList)) return false\n if (maybeEventList.length === 0) return false\n\n // Both ph and ts should be provided for every event. In theory, many other\n // fields are mandatory, but without these fields, we won't usefully be able\n // to import the data, so we'll rely upon these.\n for (let el of maybeEventList) {\n if (!('ph' in el)) {\n return false\n }\n\n switch (el.ph) {\n case 'B':\n case 'E':\n case 'X':\n // All B, E, and X events must have a timestamp specified, otherwise we\n // won't be able to import correctly.\n if (!('ts' in el)) {\n return false\n }\n\n case 'M':\n // It's explicitly okay for \"M\" (metadata) events not to specify a \"ts\"\n // field, since usually there is no logical timestamp for them to have\n break\n }\n }\n\n return true\n}\n\nfunction isHermesTraceEvent(traceEventArgs: any): traceEventArgs is HermesTraceEventArgs {\n if (!traceEventArgs) {\n return false\n }\n\n return requiredHermesArguments.every(prop => prop in traceEventArgs)\n}\n\nfunction isHermesTraceEventList(maybeEventList: any): maybeEventList is HermesTraceEvent[] {\n if (!isTraceEventList(maybeEventList)) return false\n\n // We just check the first element to avoid iterating over all trace events,\n // and asumme that if the first one is formatted like a hermes profile then\n // all events will be\n return isHermesTraceEvent(maybeEventList[0].args)\n}\n\nfunction isTraceEventObject(maybeTraceEventObject: any): maybeTraceEventObject is TraceEventObject {\n if (!('traceEvents' in maybeTraceEventObject)) return false\n return isTraceEventList(maybeTraceEventObject['traceEvents'])\n}\n\nfunction isTraceEventWithSamples(\n maybeTraceEventObject: any,\n): maybeTraceEventObject is TraceWithSamples {\n return (\n 'traceEvents' in maybeTraceEventObject &&\n 'stackFrames' in maybeTraceEventObject &&\n 'samples' in maybeTraceEventObject &&\n isTraceEventList(maybeTraceEventObject['traceEvents'])\n )\n}\n\nexport function isTraceEventFormatted(rawProfile: any): rawProfile is Trace {\n // We're only going to support the JSON formatted profiles for now.\n // The spec also discusses support for data embedded in ftrace supported data: https://lwn.net/Articles/365835/.\n\n return isTraceEventObject(rawProfile) || isTraceEventList(rawProfile)\n}\n\nexport function importTraceEvents(rawProfile: Trace): ProfileGroup {\n if (isTraceEventWithSamples(rawProfile)) {\n return sampleListToProfileGroup(rawProfile)\n } else if (isTraceEventObject(rawProfile)) {\n return eventListToProfileGroup(rawProfile.traceEvents)\n } else if (isHermesTraceEventList(rawProfile)) {\n return eventListToProfileGroup(rawProfile, ExporterSource.HERMES)\n } else if (isTraceEventList(rawProfile)) {\n return eventListToProfileGroup(rawProfile)\n } else {\n const _exhaustiveCheck: never = rawProfile\n return _exhaustiveCheck\n }\n}\n", "// https://www.valgrind.org/docs/manual/cl-format.html\n//\n// Larger example files can be found by searching on github:\n// https://github.com/search?q=cfn%3D&type=code\n//\n// Converting callgrind files into flamegraphs is challenging because callgrind\n// formatted profiles contain call graphs with weighted nodes and edges, and\n// such a weighted call graph does not uniquely define a flamegraph.\n//\n// Consider a program that looks like this:\n//\n// // example.js\n// function backup(read) {\n// if (read) {\n// read()\n// } else {\n// write()\n// }\n// }\n//\n// function start() {\n// backup(true)\n// }\n//\n// function end() {\n// backup(false)\n// }\n//\n// start()\n// end()\n//\n// Profiling this program might result in a profile that looks like the\n// following flame graph defined in Brendan Gregg's plaintext format:\n//\n// start;backup;read 4\n// end;backup;write 4\n//\n// When we convert this execution into a call-graph, we get the following:\n//\n// +------------------+ +---------------+\n// | start (self: 0) | | end (self: 0) |\n// +------------------+ +---------------|\n// \\ /\n// (total: 4) \\ / (total: 4)\n// v v\n// +------------------+\n// | backup (self: 0) |\n// +------------------+\n// / \\\n// (total: 4) / \\ (total: 4)\n// v v\n// +----------------+ +-----------------+\n// | read (self: 4) | | write (self: 4) |\n// +----------------+ +-----------------+\n//\n// In the process of the conversion, we've lost information about the ratio of\n// time spent in read v.s. write in the start call v.s. the end call. The\n// following flame graph would yield the exact same call-graph, and therefore\n// the exact sample call-grind formatted profile:\n//\n// start;backup;read 3\n// start;backup;write 1\n// end;backup;read 1\n// end;backup;write 3\n//\n// This is unfortunate, since it means we can't produce a flamegraph that isn't\n// potentially lying about the what the actual execution behavior was. To\n// produce a flamegraph at all from the call graph representation, we have to\n// decide how much weight each sub-call should have. Given that we know the\n// total weight of each node, we'll make the incorrect assumption that every\n// invocation of a function will have the average distribution of costs among\n// the sub-function invocations. In the example given, this means we assume that\n// every invocation of backup() is assumed to spend half its time in read() and\n// half its time in write().\n//\n// So the flamegraph we'll produce from the given call-graph will actually be:\n//\n// start;backup;read 2\n// start;backup;write 2\n// end;backup;read 2\n// end;backup;write 2\n//\n// A particularly bad consequence is that the resulting flamegraph will suggest\n// that there was at some point a call stack that looked like\n// strat;backup;write, even though that never happened in the real program\n// execution.\n\nimport {CallTreeProfileBuilder, Frame, FrameInfo, Profile, ProfileGroup} from '../lib/profile'\nimport {getOrElse, getOrInsert, KeyedSet} from '../lib/utils'\nimport {ByteFormatter, TimeFormatter} from '../lib/value-formatters'\nimport {TextFileContent} from './utils'\n\nclass CallGraph {\n private frameSet = new KeyedSet()\n private totalWeights = new Map()\n private childrenTotalWeights = new Map>()\n\n constructor(\n private fileName: string,\n private fieldName: string,\n ) {}\n\n private getOrInsertFrame(info: FrameInfo): Frame {\n return Frame.getOrInsert(this.frameSet, info)\n }\n\n private addToTotalWeight(frame: Frame, weight: number) {\n if (!this.totalWeights.has(frame)) {\n this.totalWeights.set(frame, weight)\n } else {\n this.totalWeights.set(frame, this.totalWeights.get(frame)! + weight)\n }\n }\n\n addSelfWeight(frameInfo: FrameInfo, weight: number) {\n this.addToTotalWeight(this.getOrInsertFrame(frameInfo), weight)\n }\n\n addChildWithTotalWeight(parentInfo: FrameInfo, childInfo: FrameInfo, weight: number) {\n const parent = this.getOrInsertFrame(parentInfo)\n const child = this.getOrInsertFrame(childInfo)\n\n const childMap = getOrInsert(this.childrenTotalWeights, parent, k => new Map())\n\n if (!childMap.has(child)) {\n childMap.set(child, weight)\n } else {\n childMap.set(child, childMap.get(child) + weight)\n }\n\n this.addToTotalWeight(parent, weight)\n }\n\n toProfile(): Profile {\n const profile = new CallTreeProfileBuilder()\n\n let unitMultiplier = 1\n\n // These are common field names used by Xdebug. Let's give them special\n // treatment to more helpfully display units.\n if (this.fieldName === 'Time_(10ns)') {\n profile.setName(`${this.fileName} -- Time`)\n unitMultiplier = 10\n profile.setValueFormatter(new TimeFormatter('nanoseconds'))\n } else if (this.fieldName == 'Memory_(bytes)') {\n profile.setName(`${this.fileName} -- Memory`)\n profile.setValueFormatter(new ByteFormatter())\n } else {\n profile.setName(`${this.fileName} -- ${this.fieldName}`)\n }\n\n let totalCumulative = 0\n\n const currentStack = new Set()\n\n let maxWeight = 0\n for (let [_, totalWeight] of this.totalWeights) {\n maxWeight = Math.max(maxWeight, totalWeight)\n }\n\n const visit = (frame: Frame, subtreeTotalWeight: number) => {\n if (currentStack.has(frame)) {\n // Call-graphs are allowed to have cycles. Call-trees are not. In case\n // we run into a cycle, we'll just avoid recursing into the same subtree\n // more than once in a call stack. The result will be that the time\n // spent in the recursive call will instead be attributed as self time\n // in the parent.\n return\n }\n\n // We need to calculate how much weight to give to a particular node in\n // the call-tree based on information from the call-graph. A given node\n // from the call-graph might correspond to several nodes in the call-tree,\n // so we need to decide how to distribute the weight of the call-graph\n // node to the various call-tree nodes.\n //\n // We assume that the weighting is evenly distributed. If a call-tree node\n // X occurs with weights x1 and x2, and we know from the call-graph that\n // child Y of X has a total weight y, then we assume the child Y of X has\n // weight y*x1/(x1 + x2) for the first occurrence, and y*x2(y1 + x2) for\n // the second occurrence.\n //\n // This assumption is incorrectly (sometimes wildly so), but we need to\n // make *some* assumption, and this seems to me the sanest option.\n //\n // See the comment at the top of the file for an example where this\n // assumption can yield especially misleading results.\n\n if (subtreeTotalWeight < 1e-4 * maxWeight) {\n // This assumption about even distribution can cause us to generate a\n // call tree with dramatically more nodes than the call graph.\n //\n // Consider a function which is called 1000 times, where the result is\n // cached. The first invocation has a complex call tree and may take\n // 100ms. Let's say that this complex call tree has 250 nodes.\n //\n // Subsequent calls use the cached result, so take only 1ms, and have no\n // children in their call trees. So we have, in total, (1 + 250) + 999\n // nodes in the call-tree for a total of 1250 nodes.\n //\n // The information specific to each invocation is, however, lost in the\n // call-graph representation.\n //\n // Because of the even distribution assumption we make, this means that\n // the call-trees of each invocation will have the same shape. Each 1ms\n // call-tree will look identical to the 100ms call-tree, just\n // horizontally compacted. So instead of 1251 nodes, we have\n // 1000*250=250,000 nodes in the resulting call graph.\n //\n // To mitigate this explosion of the # of nodes, we ignore subtrees\n // whose weights are less than 0.01% of the heaviest node in the call\n // graph.\n return\n }\n\n const totalWeightForFrameInCallgraph = getOrElse(this.totalWeights, frame, () => 0)\n if (totalWeightForFrameInCallgraph === 0) {\n return\n }\n\n let selfWeightForNodeInCallTree = subtreeTotalWeight\n\n profile.enterFrame(frame, Math.round(totalCumulative * unitMultiplier))\n\n currentStack.add(frame)\n for (let [child, totalWeightAsChild] of this.childrenTotalWeights.get(frame) || []) {\n // To determine the weight of the child in the call tree, we look at the\n // weight of the child in the call graph relative to its parent.\n const childCallTreeWeight =\n subtreeTotalWeight * (totalWeightAsChild / totalWeightForFrameInCallgraph)\n\n let prevTotalCumulative = totalCumulative\n visit(child, childCallTreeWeight)\n\n // Even though we tried to add a child with total weight equal to\n // childCallTreeWeight, we might have failed for a variety of data\n // consistency reasons, or due to cycles.\n //\n // We want to avoid losing weight in the call tree by subtracting from\n // the self weight on the assumption it was added to the subtree, so we\n // only subtree from the self weight the amount that was *actually* used\n // by the subtree, rather than the amount we *intended* for it to use.\n const actualChildCallTreeWeight = totalCumulative - prevTotalCumulative\n selfWeightForNodeInCallTree -= actualChildCallTreeWeight\n }\n currentStack.delete(frame)\n\n totalCumulative += selfWeightForNodeInCallTree\n profile.leaveFrame(frame, Math.round(totalCumulative * unitMultiplier))\n }\n\n // It's surprisingly hard to figure out which nodes in the call graph\n // constitute the root nodes of call trees.\n //\n // Here are a few intuitive options, and reasons why they're not always\n // correct or good.\n //\n // ## 1. Find nodes in the call graph that have no callers\n //\n // This is probably right 99% of the time in practice, but since the\n // callgrind is totally general, it's totally valid to have a file\n // representing a profile for the following code:\n //\n // function a() {\n // b()\n // }\n // function b() {\n // }\n // a()\n // b()\n //\n // In this case, even though b has a caller, some of the real calltree for\n // an execution trace of the program will have b on the top of the stack.\n //\n // ## 2. Find nodes in the call graph that still have weight if you\n // subtract all of the weight caused by callers.\n //\n // The callgraph format, in theory, provides inclusive times for every\n // function call. That means if you have a function `alpha` with a total\n // weight of 20, and its only in-edge in the call-graph has weight of 10,\n // that should indicate that `alpha` exists both as the root-node of a\n // calltree, and as a node in some other call-tree.\n //\n // In theory, you should be able to figure out the weight of it as a root\n // node by subtracting the weights of all the in-edges. In practice, real\n // callgrind files are inconsistent in how they do accounting for in-edges\n // where you end up in weird situations where the weight of in-edges\n // *exceeds* the weight of nodes (where the weight of a node is its\n // self-weight plus the weight of all its out-edges).\n //\n // ## 3. Find the heaviest node in the call graph, build its call-tree, and\n // decrease the weights of other nodes in the call graph while you\n // build the call tree. After you've done this, repeat with the new\n // heaviest.\n //\n // I think this version is probably fully correct, but the performance is\n // awful. The naive-version is O(n^2) because you have to re-determine which\n // node is the heaviest after each time you finish building a call-tree. You\n // can't just sort, because the relative ordering also changes with the\n // construction of each call tree.\n //\n // There's probably a clever solution here which puts all of the nodes into\n // a min-heap and then deletes and re-inserts nodes as their weights change,\n // but reasoning about the performance of that is a big pain in the butt.\n //\n // Despite not always being correct, I'm opting for option (1).\n\n const rootNodes = new Set(this.frameSet)\n\n for (let [_, childMap] of this.childrenTotalWeights) {\n for (let [child, _] of childMap) {\n rootNodes.delete(child)\n }\n }\n\n for (let rootNode of rootNodes) {\n visit(rootNode, this.totalWeights.get(rootNode)!)\n }\n\n return profile.build()\n }\n}\n\n// In writing this, I initially tried to use the formal grammar described in\n// section 3.2 of https://www.valgrind.org/docs/manual/cl-format.html, but\n// stopped because most of the information isn't relevant for visualization, and\n// because there's inconsistency between the grammar and subsequence\n// descriptions.\n//\n// For example, the grammar for headers specifies all the valid header names,\n// but then the writing below that mentions there may be a \"totals\" or \"summary\"\n// header, which should be disallowed by the formal grammar.\n//\n// So, instead, I'm not going to bother with a formal parse. Since there are no\n// real recursive structures in this file format, that should be okay.\nclass CallgrindParser {\n private lines: string[]\n private lineNum: number\n\n private callGraphs: CallGraph[] | null = null\n private eventsLine: string | null = null\n\n private filename: string | null = null\n private functionName: string | null = null\n private calleeFilename: string | null = null\n private calleeFunctionName: string | null = null\n\n private savedFileNames: {[id: string]: string} = {}\n private savedFunctionNames: {[id: string]: string} = {}\n\n constructor(\n contents: TextFileContent,\n private importedFileName: string,\n ) {\n this.lines = [...contents.splitLines()]\n this.lineNum = 0\n }\n\n parse(): ProfileGroup | null {\n while (this.lineNum < this.lines.length) {\n const line = this.lines[this.lineNum++]\n\n if (/^\\s*#/.exec(line)) {\n // Line is a comment. Ignore it.\n continue\n }\n\n if (/^\\s*$/.exec(line)) {\n // Line is empty. Ignore it.\n continue\n }\n\n if (this.parseHeaderLine(line)) {\n continue\n }\n\n if (this.parseAssignmentLine(line)) {\n continue\n }\n\n if (this.parseCostLine(line, 'self')) {\n continue\n }\n\n throw new Error(`Unrecognized line \"${line}\" on line ${this.lineNum}`)\n }\n\n if (!this.callGraphs) {\n return null\n }\n return {\n name: this.importedFileName,\n indexToView: 0,\n profiles: this.callGraphs.map(cg => cg.toProfile()),\n }\n }\n\n private frameInfo(): FrameInfo {\n const file = this.filename || '(unknown)'\n const name = this.functionName || '(unknown)'\n const key = `${file}:${name}`\n return {key, name, file}\n }\n\n private calleeFrameInfo(): FrameInfo {\n const file = this.calleeFilename || this.filename || '(unknown)'\n const name = this.calleeFunctionName || '(unknown)'\n const key = `${file}:${name}`\n return {key, name, file}\n }\n\n private parseHeaderLine(line: string): boolean {\n const headerMatch = /^\\s*(\\w+):\\s*(.*)+$/.exec(line)\n if (!headerMatch) return false\n\n if (headerMatch[1] !== 'events') {\n // We don't care about other headers. Ignore this line.\n return true\n }\n\n // Line specifies the formatting of subsequent cost lines.\n const fields = headerMatch[2].split(' ')\n\n if (this.callGraphs != null) {\n throw new Error(\n `Duplicate \"events: \" lines specified. First was \"${this.eventsLine}\", now received \"${line}\" on ${this.lineNum}.`,\n )\n }\n\n this.callGraphs = fields.map(fieldName => {\n return new CallGraph(this.importedFileName, fieldName)\n })\n\n return true\n }\n\n private parseAssignmentLine(line: string): boolean {\n const assignmentMatch = /^(\\w+)=\\s*(.*)$/.exec(line)\n if (!assignmentMatch) return false\n\n const key = assignmentMatch[1]\n const value = assignmentMatch[2]\n\n switch (key) {\n case 'fe':\n case 'fi': {\n // fe/fi are used to indicate the source-file of a function definition\n // changed mid-definition. This is for inlined code, but doesn't\n // indicate that we've actually switched to referring to a different\n // function, so we mostly ignore it.\n //\n // We still need to do the parseNameWithCompression call in case a name\n // is defined and then referenced later on for name compression.\n this.parseNameWithCompression(value, this.savedFileNames)\n break\n }\n\n case 'fl': {\n this.filename = this.parseNameWithCompression(value, this.savedFileNames)\n break\n }\n\n case 'fn': {\n this.functionName = this.parseNameWithCompression(value, this.savedFunctionNames)\n break\n }\n\n case 'cfi':\n case 'cfl': {\n // NOTE: unlike the fe/fi distinction described above, cfi and cfl are\n // interchangeable.\n this.calleeFilename = this.parseNameWithCompression(value, this.savedFileNames)\n break\n }\n\n case 'cfn': {\n this.calleeFunctionName = this.parseNameWithCompression(value, this.savedFunctionNames)\n break\n }\n\n case 'calls': {\n // TODO(jlfwong): This is currently ignoring the number of calls being\n // made. Accounting for the number of calls might be unhelpful anyway,\n // since it'll just be copying the exact same frame over-and-over again,\n // but that might be better than ignoring it.\n this.parseCostLine(this.lines[this.lineNum++], 'child')\n\n // This isn't specified anywhere in the spec, but empirically the and\n // \"cfn\" scope should only persist for a single \"call\".\n //\n // This seems to be what KCacheGrind does too:\n //\n // https://github.com/KDE/kcachegrind/blob/ea4314db2785cb8f279fe884ee7f82445642b692/libcore/cachegrindloader.cpp#L1259\n this.calleeFilename = null\n this.calleeFunctionName = null\n break\n }\n\n case 'cob':\n case 'ob': {\n // We ignore these for now. They're valid lines, but we don't capture or\n // display information about them.\n break\n }\n\n default: {\n console.log(`Ignoring assignment to unrecognized key \"${line}\" on line ${this.lineNum}`)\n }\n }\n\n return true\n }\n\n private parseNameWithCompression(name: string, saved: {[id: string]: string}): string {\n {\n const nameDefinitionMatch = /^\\((\\d+)\\)\\s*(.+)$/.exec(name)\n\n if (nameDefinitionMatch) {\n const id = nameDefinitionMatch[1]\n const name = nameDefinitionMatch[2]\n if (id in saved) {\n throw new Error(\n `Redefinition of name with id: ${id}. Original value was \"${saved[id]}\". Tried to redefine as \"${name}\" on line ${this.lineNum}.`,\n )\n }\n\n saved[id] = name\n return name\n }\n }\n\n {\n const nameUseMatch = /^\\((\\d+)\\)$/.exec(name)\n if (nameUseMatch) {\n const id = nameUseMatch[1]\n if (!(id in saved)) {\n throw new Error(\n `Tried to use name with id ${id} on line ${this.lineNum} before it was defined.`,\n )\n }\n return saved[id]\n }\n }\n\n return name\n }\n\n private prevCostLineNumbers: number[] = []\n\n private parseCostLine(line: string, costType: 'self' | 'child'): boolean {\n // TODO(jlfwong): Allow hexadecimal encoding\n\n const parts = line.split(/\\s+/)\n const nums: number[] = []\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i]\n\n if (part.length === 0) {\n return false\n }\n\n if (part === '*' || part[0] === '-' || part[1] === '+') {\n // This handles \"Subposition compression\"\n // See: https://valgrind.org/docs/manual/cl-format.html#cl-format.overview.compression2\n if (this.prevCostLineNumbers.length <= i) {\n throw new Error(\n `Line ${this.lineNum} has a subposition on column ${i} but ` +\n `previous cost line has only ${this.prevCostLineNumbers.length} ` +\n `columns. Line contents: ${line}`,\n )\n }\n const prevCostForSubposition = this.prevCostLineNumbers[i]\n if (part === '*') {\n nums.push(prevCostForSubposition)\n } else {\n // This handles both the '-' and '+' cases\n const offset = parseInt(part)\n if (isNaN(offset)) {\n throw new Error(\n `Line ${this.lineNum} has a subposition on column ${i} but ` +\n `the offset is not a number. Line contents: ${line}`,\n )\n }\n nums.push(prevCostForSubposition + offset)\n }\n } else {\n const asNum = parseInt(part)\n if (isNaN(asNum)) {\n return false\n }\n nums.push(asNum)\n }\n }\n\n if (nums.length == 0) {\n return false\n }\n\n // TODO(jlfwong): Handle custom positions format w/ multiple parts\n const numPositionFields = 1\n\n // NOTE: We intentionally do not include the line number here because\n // callgrind uses the line number of the function invocation, not the\n // line number of the function definition, which conflicts with how\n // speedscope uses line numbers.\n //\n // const lineNum = nums[0]\n\n if (!this.callGraphs) {\n throw new Error(\n `Encountered a cost line on line ${this.lineNum} before event specification was provided.`,\n )\n }\n for (let i = 0; i < this.callGraphs.length; i++) {\n if (costType === 'self') {\n this.callGraphs[i].addSelfWeight(this.frameInfo(), nums[numPositionFields + i])\n } else if (costType === 'child') {\n this.callGraphs[i].addChildWithTotalWeight(\n this.frameInfo(),\n this.calleeFrameInfo(),\n nums[numPositionFields + i] || 0,\n )\n }\n }\n\n this.prevCostLineNumbers = nums\n return true\n }\n}\n\nexport function importFromCallgrind(\n contents: TextFileContent,\n importedFileName: string,\n): ProfileGroup | null {\n return new CallgrindParser(contents, importedFileName).parse()\n}\n", "// This importer is for Papyrus, a proprietary DSL written by Bethesda for Skyrim and FO4. It is used both for the base\n// games and for mods. You can find documentation (such as the language reference) here:\n// https://ck.uesp.net/wiki/Category:Papyrus\n//\n// For mod authors: you can find documentation on how to start profiling from the console here:\n// https://ck.uesp.net/wiki/StartPapyrusScriptProfile\n// and you can also start from your script:\n// https://ck.uesp.net/wiki/StartScriptProfiling_-_Debug\n// If you want to profile an entire mod, it is often helpful to use `StartFormProfile` on your \"main quest\". This will\n// then profile all scripts attached to that Form.\n//\n// Papyrus works with a queue system, because it is multithreaded, but only one thread can exist per script.\n// (And we can only profile one script at a time.) We parse most \"QUEUE_PUSH\" events, specifically those that come\n// directly before their corresponding \"PUSH\" event. Other \"QUEUE_PUSH\" (and all \"QUEUE_POP\") events come, as far as I\n// can tell, from Events and are thus asynchronous. They are ignored.\n//\n// Stack profiling also puts a \"START\" operation at the top and a \"STOP\" operation at the bottom of the file. These are\n// completely useless to us.\n//\n// Stack profiling also logs the Form a method is run on. For those that are not familiar with\n// Papyrus terminology, a \"Form\" is an instance of a type defined by a script. E.g. a quest is a form that extends\n// the \"Quest\" script, and thus it has certain methods, like \"CompleteQuest()\". This information would be useful\n// for Debugging, but for profiling, it would hinder meaningful output in left heavy mode.\n\nimport {CallTreeProfileBuilder, Frame, Profile} from '../lib/profile'\nimport {KeyedSet, lastOf} from '../lib/utils'\nimport {TimeFormatter} from '../lib/value-formatters'\nimport {TextFileContent} from './utils'\n\ntype ParsedLine = {\n at: number\n event: string\n stackInt: number\n name: string\n}\n\nexport function importFromPapyrus(papyrusProfile: TextFileContent): Profile {\n const profile = new CallTreeProfileBuilder()\n profile.setValueFormatter(new TimeFormatter('milliseconds'))\n\n const papyrusProfileLines = [...papyrusProfile.splitLines()].filter(\n line => !/^$|^Log closed$|log opened/.exec(line),\n )\n\n let startValue = -1\n const firstLineParsed = parseLine(papyrusProfileLines[0])\n if (firstLineParsed === null) throw Error\n startValue = firstLineParsed.at\n const lastLine = lastOf(papyrusProfileLines)\n if (lastLine === null) throw Error\n const lastLineParsed = parseLine(lastLine)\n if (lastLineParsed === null) throw Error\n const endValue = lastLineParsed.at\n\n const nameSet = new KeyedSet()\n const frameStack: string[] = []\n let lastEventAt = 0\n\n let lastQueueFrameName: string\n let lastQueueFrameAt: number = -1\n\n function enterFrame(stackInt: number, at: number, frameName: string) {\n function enterFrameHelper(at: number, frameName: string) {\n frameStack.push(frameName)\n profile.enterFrame(Frame.getOrInsert(nameSet, {name: frameName, key: frameName}), at)\n lastEventAt = at\n }\n // Check if the last event was \"QUEUE_PUSH\"\n if (lastQueueFrameAt > -1) {\n lastQueueFrameAt = -1\n // If the queue from last event matches our current frame,\n if (lastQueueFrameName === frameName && lastQueueFrameAt >= lastEventAt) {\n // first enter the queue frame at its earlier time\n enterFrame(stackInt, lastQueueFrameAt, `QUEUE ${frameName}`)\n }\n }\n const stackFrameStr = `STACK ${stackInt}`\n // If the uppermost STACK frame on the frameStack isn't stackFrameStr\n if (\n [...frameStack].reverse().find(frameName => frameName.startsWith('STACK ')) !== stackFrameStr\n ) {\n // If we're at the bottom of the frameStack, STACK frames are kept open as long as functions only run in that\n // specific stack and closed with the function's end if the next function runs on a different stack.\n if (frameStack.length === 1) leaveFrame(lastEventAt)\n enterFrameHelper(at, stackFrameStr)\n }\n enterFrameHelper(at, frameName)\n }\n\n function leaveFrame(at: number) {\n const frame = frameStack.pop()\n if (frame === undefined) throw Error('Tried to leave frame when nothing was on stack.')\n profile.leaveFrame(Frame.getOrInsert(nameSet, {name: frame, key: frame}), at)\n let topOfStack = lastOf(frameStack)\n // Technically, the frame is popped from queue once it is pushed onto the stack (once we have \"entered the frame\")\n // but since we want to visualize meaningfully, we count from QUEUE_PUSH to POP and prefix with \"QUEUE \".\n if (topOfStack !== null && topOfStack.startsWith('QUEUE ')) {\n leaveFrame(at)\n topOfStack = lastOf(frameStack)\n }\n if (frameStack.length > 1 && topOfStack !== null && topOfStack.startsWith('STACK ')) {\n leaveFrame(at)\n }\n lastEventAt = at\n }\n\n function tryToLeaveFrame(stackInt: number, at: number, frameName: string) {\n if (lastOf(frameStack) === frameName) {\n leaveFrame(at)\n } else {\n if (lastEventAt === 0) {\n console.log(\n `Tried to leave frame \"${frameName}\" which was never entered. Assuming it has been running since the start.`,\n )\n enterFrame(stackInt, 0, frameName)\n leaveFrame(at)\n } else {\n console.log(\n `Tried to leave frame \"${frameName}\" which was never entered. Other events have happened since the start, ignoring line.`,\n )\n }\n }\n }\n\n function parseLine(lineStr: string): ParsedLine | null {\n if (lineStr === undefined) throw Error('Probably tried to import empty file.')\n const lineArr = lineStr.split(':')\n if (lineArr.length < 3) return null\n if (startValue !== -1) {\n return {\n at: parseInt(lineArr[0]) - startValue,\n event: lineArr[1],\n stackInt: parseInt(lineArr[2]),\n name: lineArr[5],\n }\n } else {\n // When parsing the first line, we return an absolute `at` value to initialize `startValue`\n return {\n at: parseInt(lineArr[0]),\n event: lineArr[1],\n stackInt: parseInt(lineArr[2]),\n name: lineArr[5],\n }\n }\n }\n\n papyrusProfileLines.forEach((lineStr, i, papyrusProfileLines) => {\n const parsedLine = parseLine(lineStr)\n if (parsedLine === null) return // continue\n if (parsedLine.event === 'PUSH') {\n enterFrame(parsedLine.stackInt, parsedLine.at, parsedLine.name)\n i += 1\n let parsedNextLine = parseLine(papyrusProfileLines[i])\n // Search all future events in the current event for one that leaves the current frame. If it exists, leave now.\n // This way, we avoid speedscope choking on the possibly wrong order of events. The changed order is still\n // functionally correct, as the function took less than a millisecond to execute, which is measured as 0 (ms).\n while (parsedNextLine !== null && parsedNextLine.at === parsedLine.at) {\n if (\n parsedNextLine.name === parsedLine.name &&\n parsedNextLine.stackInt === parsedLine.stackInt &&\n parsedNextLine.event === 'POP'\n ) {\n tryToLeaveFrame(parsedNextLine.stackInt, parsedNextLine.at, parsedNextLine.name)\n // Delete the line that we successfully parsed and imported such that it is not processed twice\n papyrusProfileLines.splice(i, 1)\n parsedNextLine = null\n } else {\n i += 1\n if (i < papyrusProfileLines.length) parsedNextLine = parseLine(papyrusProfileLines[i])\n }\n }\n } else if (parsedLine.event === 'POP') {\n tryToLeaveFrame(parsedLine.stackInt, parsedLine.at, parsedLine.name)\n } else if (parsedLine.event === 'QUEUE_PUSH') {\n lastQueueFrameName = parsedLine.name.replace(/\\?/g, '')\n lastQueueFrameAt = parsedLine.at\n return\n }\n })\n\n // Close frames that are still open\n while (frameStack.length > 0) {\n leaveFrame(endValue)\n }\n\n return profile.build()\n}\n", "import {Profile, FrameInfo, StackListProfileBuilder} from '../lib/profile'\nimport {TextFileContent} from './utils'\n\nexport function importFromPMCStatCallGraph(contents: TextFileContent): Profile | null {\n const profile = new StackListProfileBuilder()\n const stack: FrameInfo[] = []\n let file: string | undefined\n let prevDuration = '0'\n let prevIndent = -1\n for (const line of contents.splitLines()) {\n const match = /^( *)[\\d.]+% \\[(\\d+)\\]\\s*(\\S+)(?: @ (.*))?$/gm.exec(line)\n if (!match) continue\n const indent = match[1].length\n if (indent <= prevIndent) {\n const frames = stack.slice(0, prevIndent + 1).reverse()\n const duration = parseInt(prevDuration, 10)\n profile.appendSampleWithWeight(frames, duration)\n }\n const name = match[3]\n file = match[4] || file\n stack[indent] = {key: name, name: name, file: file}\n prevDuration = match[2]\n prevIndent = indent\n }\n if (prevIndent == -1) return null\n const frames = stack.slice(0, prevIndent + 1).reverse()\n const duration = parseInt(prevDuration, 10)\n profile.appendSampleWithWeight(frames, duration)\n return profile.build()\n}\n", "let wasm;\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction getArrayJsValueFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n const mem = getDataViewMemory0();\n const result = [];\n for (let i = ptr; i < ptr + 4 * len; i += 4) {\n result.push(takeObject(mem.getUint32(i, true)));\n }\n return result;\n}\n\nlet cachedDataViewMemory0 = null;\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return decodeText(ptr, len);\n}\n\nlet cachedUint8ArrayMemory0 = null;\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap = new Array(128).fill(undefined);\nheap.push(undefined, null, true, false);\n\nlet heap_next = heap.length;\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8ArrayMemory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nfunction passArrayJsValueToWasm0(array, malloc) {\n const ptr = malloc(array.length * 4, 4) >>> 0;\n const mem = getDataViewMemory0();\n for (let i = 0; i < array.length; i++) {\n mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);\n }\n WASM_VECTOR_LEN = array.length;\n return ptr;\n}\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = cachedTextEncoder.encodeInto(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\ncachedTextDecoder.decode();\nconst MAX_SAFARI_DECODE_BYTES = 2146435072;\nlet numBytesDecoded = 0;\nfunction decodeText(ptr, len) {\n numBytesDecoded += len;\n if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {\n cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n cachedTextDecoder.decode();\n numBytesDecoded = len;\n }\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nconst cachedTextEncoder = new TextEncoder();\n\nif (!('encodeInto' in cachedTextEncoder)) {\n cachedTextEncoder.encodeInto = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n }\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst FrameFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_frame_free(ptr >>> 0, 1));\n\nconst MethodSampleFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_methodsample_free(ptr >>> 0, 1));\n\nexport class Frame {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Frame.prototype);\n obj.__wbg_ptr = ptr;\n FrameFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n static __unwrap(jsValue) {\n if (!(jsValue instanceof Frame)) {\n return 0;\n }\n return jsValue.__destroy_into_raw();\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FrameFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_frame_free(ptr, 0);\n }\n /**\n * @returns {string}\n */\n get name() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_frame_name(retptr, this.__wbg_ptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set name(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export2, wasm.__wbindgen_export3);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_frame_name(this.__wbg_ptr, ptr0, len0);\n }\n}\nif (Symbol.dispose) Frame.prototype[Symbol.dispose] = Frame.prototype.free;\n\n/**\n * A sample containing a method call.\n *\n * Contains the stacktrace at the point of sampling\n */\nexport class MethodSample {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(MethodSample.prototype);\n obj.__wbg_ptr = ptr;\n MethodSampleFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MethodSampleFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_methodsample_free(ptr, 0);\n }\n /**\n * @returns {Frame[]}\n */\n get frames() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_methodsample_frames(retptr, this.__wbg_ptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var v1 = getArrayJsValueFromWasm0(r0, r1).slice();\n wasm.__wbindgen_export(r0, r1 * 4, 4);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {Frame[]} arg0\n */\n set frames(arg0) {\n const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_export2);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_methodsample_frames(this.__wbg_ptr, ptr0, len0);\n }\n}\nif (Symbol.dispose) MethodSample.prototype[Symbol.dispose] = MethodSample.prototype.free;\n\n/**\n * Converts the content of a JFR file to a Vec of stacktraces.\n *\n * The stacktraces are sorted by execution order.\n *\n * You can specify `include_native` to also record JNI or other calls to native methods.\n * @param {Uint8Array} input\n * @param {boolean} include_native\n * @returns {MethodSample[]}\n */\nexport function interpret_jfr(input, include_native) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(input, wasm.__wbindgen_export2);\n const len0 = WASM_VECTOR_LEN;\n wasm.interpret_jfr(retptr, ptr0, len0, include_native);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);\n var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);\n if (r3) {\n throw takeObject(r2);\n }\n var v2 = getArrayJsValueFromWasm0(r0, r1).slice();\n wasm.__wbindgen_export(r0, r1 * 4, 4);\n return v2;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n}\n\nconst EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n } catch (e) {\n const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);\n\n if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbg_frame_new = function(arg0) {\n const ret = Frame.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_frame_unwrap = function(arg0) {\n const ret = Frame.__unwrap(getObject(arg0));\n return ret;\n };\n imports.wbg.__wbg_methodsample_new = function(arg0) {\n const ret = MethodSample.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {\n // Cast intrinsic for `Ref(String) -> Externref`.\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n\n return imports;\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedDataViewMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n\n\n\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n const instance = new WebAssembly.Instance(module, imports);\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('jfrview_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n", "import {FrameInfo, Profile, ProfileGroup, StackListProfileBuilder} from '../lib/profile'\nimport init, {Frame, interpret_jfr} from 'jfrview'\n// @ts-ignore\nimport wasm_data from 'jfrview/jfrview_bg.wasm'\n\nexport async function importFromJfr(fileName: string, data: ArrayBuffer): Promise {\n await init({module_or_path: wasm_data})\n const withoutNative = create_profile(data, false)\n const withNative = create_profile(data, true)\n\n return {\n indexToView: 0,\n name: fileName,\n profiles: [withoutNative, withNative],\n }\n}\n\nexport function isJfrRecording(buffer: ArrayBuffer) {\n const b = buffer.slice(0, 3)\n const bytes = new Uint8Array(b)\n return bytes[0] === 0x46 && bytes[1] === 0x4c && bytes[2] === 0x52\n}\n\nfunction create_profile(data: ArrayBuffer, includeNative: boolean): Profile {\n const result = interpret_jfr(new Uint8Array(data), includeNative)\n\n const builder = new StackListProfileBuilder(result.length)\n if (includeNative) {\n builder.setName('With native calls')\n } else {\n builder.setName('Without native calls')\n }\n\n function to_fi(input: Frame): FrameInfo {\n return {\n name: input.name,\n key: input.name,\n }\n }\n\n for (const sample of result) {\n builder.appendSampleWithWeight(sample.frames.map(to_fi), 1)\n }\n\n return builder.build()\n}\n", "import {Profile, ProfileGroup} from '../lib/profile'\n\nimport {\n importFromChromeCPUProfile,\n importFromChromeTimeline,\n isChromeTimeline,\n importFromOldV8CPUProfile,\n isChromeTimelineObject,\n} from './chrome'\nimport {importFromStackprof} from './stackprof'\nimport {importFromInstrumentsDeepCopy, importFromInstrumentsTrace} from './instruments'\nimport {importFromBGFlameGraph} from './bg-flamegraph'\nimport {importFromFirefox} from './firefox'\nimport {importSpeedscopeProfiles} from '../lib/file-format'\nimport {importFromV8ProfLog} from './v8proflog'\nimport {importFromLinuxPerf} from './linux-tools-perf'\nimport {importFromHaskell} from './haskell'\nimport {importFromSafari} from './safari'\nimport {ProfileDataSource, TextProfileDataSource, MaybeCompressedDataReader} from './utils'\nimport {importAsPprofProfile} from './pprof'\nimport {decodeBase64} from '../lib/utils'\nimport {importFromChromeHeapProfile} from './v8heapalloc'\nimport {isTraceEventFormatted, importTraceEvents} from './trace-event'\nimport {importFromCallgrind} from './callgrind'\nimport {importFromPapyrus} from './papyrus'\nimport {importFromPMCStatCallGraph} from './pmcstat-callgraph'\nimport {importFromJfr, isJfrRecording} from './java-flight-recorder'\n\nexport async function importProfileGroupFromText(\n fileName: string,\n contents: string,\n): Promise {\n return await importProfileGroup(new TextProfileDataSource(fileName, contents))\n}\n\nexport async function importProfileGroupFromBase64(\n fileName: string,\n b64contents: string,\n): Promise {\n return await importProfileGroup(\n MaybeCompressedDataReader.fromArrayBuffer(\n fileName,\n decodeBase64(b64contents).buffer as ArrayBuffer,\n ),\n )\n}\n\nexport async function importProfilesFromFile(file: File): Promise {\n return importProfileGroup(MaybeCompressedDataReader.fromFile(file))\n}\n\nexport async function importProfilesFromArrayBuffer(\n fileName: string,\n buffer: ArrayBuffer,\n): Promise {\n return importProfileGroup(MaybeCompressedDataReader.fromArrayBuffer(fileName, buffer))\n}\n\nasync function importProfileGroup(dataSource: ProfileDataSource): Promise {\n const fileName = await dataSource.name()\n\n const profileGroup = await _importProfileGroup(dataSource)\n if (profileGroup) {\n if (!profileGroup.name) {\n profileGroup.name = fileName\n }\n for (let profile of profileGroup.profiles) {\n if (profile && !profile.getName()) {\n profile.setName(fileName)\n }\n }\n return profileGroup\n }\n return null\n}\n\nfunction toGroup(profile: Profile | null): ProfileGroup | null {\n if (!profile) return null\n return {name: profile.getName(), indexToView: 0, profiles: [profile]}\n}\n\nasync function _importProfileGroup(dataSource: ProfileDataSource): Promise {\n const fileName = await dataSource.name()\n\n const buffer = await dataSource.readAsArrayBuffer()\n\n {\n const profile = importAsPprofProfile(buffer)\n if (profile) {\n console.log('Importing as protobuf encoded pprof file')\n return toGroup(profile)\n }\n }\n\n const contents = await dataSource.readAsText()\n\n // First pass: Check known file format names to infer the file type\n if (fileName.endsWith('.speedscope.json')) {\n console.log('Importing as speedscope json file')\n return importSpeedscopeProfiles(contents.parseAsJSON())\n } else if (/Trace-\\d{8}T\\d{6}/.exec(fileName)) {\n console.log('Importing as Chrome Timeline Object')\n return importFromChromeTimeline(contents.parseAsJSON().traceEvents, fileName)\n } else if (fileName.endsWith('.chrome.json') || /Profile-\\d{8}T\\d{6}/.exec(fileName)) {\n console.log('Importing as Chrome Timeline')\n return importFromChromeTimeline(contents.parseAsJSON(), fileName)\n } else if (fileName.endsWith('.stackprof.json')) {\n console.log('Importing as stackprof profile')\n return toGroup(importFromStackprof(contents.parseAsJSON()))\n } else if (fileName.endsWith('.instruments.txt')) {\n console.log('Importing as Instruments.app deep copy')\n return toGroup(importFromInstrumentsDeepCopy(contents))\n } else if (fileName.endsWith('.linux-perf.txt')) {\n console.log('Importing as output of linux perf script')\n return importFromLinuxPerf(contents)\n } else if (fileName.endsWith('.collapsedstack.txt')) {\n console.log('Importing as collapsed stack format')\n return toGroup(importFromBGFlameGraph(contents))\n } else if (fileName.endsWith('.v8log.json')) {\n console.log('Importing as --prof-process v8 log')\n return toGroup(importFromV8ProfLog(contents.parseAsJSON()))\n } else if (fileName.endsWith('.heapprofile')) {\n console.log('Importing as Chrome Heap Profile')\n return toGroup(importFromChromeHeapProfile(contents.parseAsJSON()))\n } else if (fileName.endsWith('-recording.json')) {\n console.log('Importing as Safari profile')\n return toGroup(importFromSafari(contents.parseAsJSON()))\n } else if (fileName.startsWith('callgrind.')) {\n console.log('Importing as Callgrind profile')\n return importFromCallgrind(contents, fileName)\n } else if (fileName.endsWith('.pmcstat.graph')) {\n console.log('Importing as pmcstat callgraph format')\n return toGroup(importFromPMCStatCallGraph(contents))\n } else if (fileName.endsWith('.jfr')) {\n console.log('Importing as Java Flight Recorder profile')\n return await importFromJfr(fileName, buffer)\n }\n\n // Second pass: Try to guess what file format it is based on structure\n let parsed: any\n try {\n parsed = contents.parseAsJSON()\n } catch (e) {}\n if (parsed) {\n if (parsed['$schema'] === 'https://www.speedscope.app/file-format-schema.json') {\n console.log('Importing as speedscope json file')\n return importSpeedscopeProfiles(parsed)\n } else if (parsed['systemHost'] && parsed['systemHost']['name'] == 'Firefox') {\n console.log('Importing as Firefox profile')\n return toGroup(importFromFirefox(parsed))\n } else if (isChromeTimeline(parsed)) {\n console.log('Importing as Chrome Timeline')\n return importFromChromeTimeline(parsed, fileName)\n } else if (isChromeTimelineObject(parsed)) {\n console.log('Importing as Chrome Timeline Object')\n return importFromChromeTimeline(parsed.traceEvents, fileName)\n } else if ('nodes' in parsed && 'samples' in parsed && 'timeDeltas' in parsed) {\n console.log('Importing as Chrome CPU Profile')\n return toGroup(importFromChromeCPUProfile(parsed))\n } else if (isTraceEventFormatted(parsed)) {\n console.log('Importing as Trace Event Format profile')\n return importTraceEvents(parsed)\n } else if ('head' in parsed && 'samples' in parsed && 'timestamps' in parsed) {\n console.log('Importing as Chrome CPU Profile (old format)')\n return toGroup(importFromOldV8CPUProfile(parsed))\n } else if ('mode' in parsed && 'frames' in parsed && 'raw_timestamp_deltas' in parsed) {\n console.log('Importing as stackprof profile')\n return toGroup(importFromStackprof(parsed))\n } else if ('code' in parsed && 'functions' in parsed && 'ticks' in parsed) {\n console.log('Importing as --prof-process v8 log')\n return toGroup(importFromV8ProfLog(parsed))\n } else if ('head' in parsed && 'selfSize' in parsed['head']) {\n console.log('Importing as Chrome Heap Profile')\n return toGroup(importFromChromeHeapProfile(parsed))\n } else if ('rts_arguments' in parsed && 'initial_capabilities' in parsed) {\n console.log('Importing as Haskell GHC JSON Profile')\n return importFromHaskell(parsed)\n } else if ('recording' in parsed && 'sampleStackTraces' in parsed.recording) {\n console.log('Importing as Safari profile')\n return toGroup(importFromSafari(parsed))\n }\n } else {\n // Format is not JSON\n\n // If the first line is \"# callgrind format\", it's probably in Callgrind\n // Profile Format.\n if (\n /^# callgrind format/.exec(contents.firstChunk()) ||\n (/^events:/m.exec(contents.firstChunk()) && /^fn=/m.exec(contents.firstChunk()))\n ) {\n console.log('Importing as Callgrind profile')\n return importFromCallgrind(contents, fileName)\n }\n\n // If the first line contains \"Symbol Name\", preceded by a tab, it's probably\n // a deep copy from OS X Instruments.app\n if (/^[\\w \\t\\(\\)]*\\tSymbol Name/.exec(contents.firstChunk())) {\n console.log('Importing as Instruments.app deep copy')\n return toGroup(importFromInstrumentsDeepCopy(contents))\n }\n\n if (/^(Stack_|Script_|Obj_)\\S+ log opened \\(PC\\)\\n/.exec(contents.firstChunk())) {\n console.log('Importing as Papyrus profile')\n return toGroup(importFromPapyrus(contents))\n }\n\n if (isJfrRecording(buffer)) {\n console.log('Importing as Java Flight Recorder profile')\n return importFromJfr(fileName, buffer)\n }\n\n const fromLinuxPerf = importFromLinuxPerf(contents)\n if (fromLinuxPerf) {\n console.log('Importing from linux perf script output')\n return fromLinuxPerf\n }\n\n const fromBGFlameGraph = importFromBGFlameGraph(contents)\n if (fromBGFlameGraph) {\n console.log('Importing as collapsed stack format')\n return toGroup(fromBGFlameGraph)\n }\n\n const fromPMCStatCallGraph = importFromPMCStatCallGraph(contents)\n if (fromPMCStatCallGraph) {\n console.log('Importing as pmcstat callgraph format')\n return toGroup(fromPMCStatCallGraph)\n }\n }\n\n // Unrecognized format\n return null\n}\n\nexport async function importFromFileSystemDirectoryEntry(entry: FileSystemDirectoryEntry) {\n return importFromInstrumentsTrace(entry)\n}\n", "export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n", "import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n", "import options from './options';\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\ti;\n\tfor (i in props) {\n\t\tif (i !== 'key' && i !== 'ref') normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 3) {\n\t\tchildren = [children];\n\t\t// https://github.com/preactjs/preact/issues/1916\n\t\tfor (i = 3; i < arguments.length; i++) {\n\t\t\tchildren.push(arguments[i]);\n\t\t}\n\t}\n\tif (children != null) {\n\t\tnormalizedProps.children = children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(\n\t\ttype,\n\t\tnormalizedProps,\n\t\tprops && props.key,\n\t\tprops && props.ref,\n\t\tnull\n\t);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: original\n\t};\n\n\tif (original == null) vnode._original = vnode;\n\tif (options.vnode) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn {};\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n", "import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\tupdate = update(s, this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = oldVNode;\n\n\t\tlet newDom = diff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tnull,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom\n\t\t);\n\t\tcommitRoot(commitQueue, vnode);\n\n\t\tif (newDom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\nlet rerenderCount = 0;\n\n/**\n * Asynchronously schedule a callback\n * @type {(cb: () => void) => void}\n */\n/* istanbul ignore next */\n// Note the following line isn't tree-shaken by rollup cuz of rollup/rollup#2566\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet queue;\n\twhile ((rerenderCount = rerenderQueue.length)) {\n\t\tqueue = rerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t\trerenderQueue = [];\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\tqueue.some(c => {\n\t\t\tif (c._dirty) renderComponent(c);\n\t\t});\n\t}\n}\n", "import { EMPTY_OBJ, EMPTY_ARR } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\n\nconst IS_HYDRATE = EMPTY_OBJ;\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./index').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n * @param {Element | Text} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we\n\t// are in hydration mode or not by passing `IS_HYDRATE` instead of a\n\t// DOM element.\n\tlet isHydrating = replaceNode === IS_HYDRATE;\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? null\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\tvnode = createElement(Fragment, null, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\t((isHydrating ? parentDom : replaceNode || parentDom)._children = vnode),\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.ownerSVGElement !== undefined,\n\t\treplaceNode && !isHydrating\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t? null\n\t\t\t: EMPTY_ARR.slice.call(parentDom.childNodes),\n\t\tcommitQueue,\n\t\treplaceNode || EMPTY_OBJ,\n\t\tisHydrating\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./index').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, IS_HYDRATE);\n}\n", "import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tconst ctx = {};\n\n\tconst context = {\n\t\t_id: '__cC' + i++,\n\t\t_defaultValue: defaultValue,\n\t\tConsumer(props, context) {\n\t\t\treturn props.children(context);\n\t\t},\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\tconst subs = [];\n\t\t\t\tthis.getChildContext = () => {\n\t\t\t\t\tctx[context._id] = this;\n\t\t\t\t\treturn ctx;\n\t\t\t\t};\n\n\t\t\t\tthis.shouldComponentUpdate = _props => {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc.context = _props.value;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\told && old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\tcontext.Consumer.contextType = context;\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\tcontext.Provider._contextRef = context;\n\n\treturn context;\n}\n", "/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n", "import { diff, unmount, applyRef } from './index';\nimport { createVNode } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { removeNode } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {Node | Text} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n */\nexport function diffChildren(\n\tparentDom,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet i, j, oldVNode, newDom, sibDom, firstChildDom, refs;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length;\n\n\t// Only in very specific places should this logic be invoked (top level `render` and `diffElementNodes`).\n\t// I'm using `EMPTY_OBJ` to signal when `diffChildren` is invoked in these situations. I can't use `null`\n\t// for this purpose, because `null` is a valid value for `oldDom` which can mean to skip to this logic\n\t// (e.g. if mounting a new tree in which the old DOM should be ignored (usually for Fragments).\n\tif (oldDom == EMPTY_OBJ) {\n\t\tif (excessDomChildren != null) {\n\t\t\toldDom = excessDomChildren[0];\n\t\t} else if (oldChildrenLength) {\n\t\t\toldDom = getDomSibling(oldParentVNode, 0);\n\t\t} else {\n\t\t\toldDom = null;\n\t\t}\n\t}\n\n\ti = 0;\n\tnewParentVNode._children = toChildArray(\n\t\tnewParentVNode._children,\n\t\tchildVNode => {\n\t\t\tif (childVNode != null) {\n\t\t\t\tchildVNode._parent = newParentVNode;\n\t\t\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t\t\t// Check if we find a corresponding element in oldChildren.\n\t\t\t\t// If found, delete the array item by setting to `undefined`.\n\t\t\t\t// We use `undefined`, as `null` is reserved for empty placeholders\n\t\t\t\t// (holes).\n\t\t\t\toldVNode = oldChildren[i];\n\n\t\t\t\tif (\n\t\t\t\t\toldVNode === null ||\n\t\t\t\t\t(oldVNode &&\n\t\t\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\t\t\tchildVNode.type === oldVNode.type)\n\t\t\t\t) {\n\t\t\t\t\toldChildren[i] = undefined;\n\t\t\t\t} else {\n\t\t\t\t\t// Either oldVNode === undefined or oldChildrenLength > 0,\n\t\t\t\t\t// so after this loop oldVNode == null or oldVNode is a valid value.\n\t\t\t\t\tfor (j = 0; j < oldChildrenLength; j++) {\n\t\t\t\t\t\toldVNode = oldChildren[j];\n\t\t\t\t\t\t// If childVNode is unkeyed, we only match similarly unkeyed nodes, otherwise we match by key.\n\t\t\t\t\t\t// We always match by type (in either case).\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\toldVNode &&\n\t\t\t\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\t\t\t\tchildVNode.type === oldVNode.type\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\toldChildren[j] = undefined;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\toldVNode = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\toldVNode = oldVNode || EMPTY_OBJ;\n\n\t\t\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\t\t\tnewDom = diff(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldVNode,\n\t\t\t\t\tglobalContext,\n\t\t\t\t\tisSvg,\n\t\t\t\t\texcessDomChildren,\n\t\t\t\t\tcommitQueue,\n\t\t\t\t\toldDom,\n\t\t\t\t\tisHydrating\n\t\t\t\t);\n\n\t\t\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\t\t\tif (!refs) refs = [];\n\t\t\t\t\tif (oldVNode.ref) refs.push(oldVNode.ref, null, childVNode);\n\t\t\t\t\trefs.push(j, childVNode._component || newDom, childVNode);\n\t\t\t\t}\n\n\t\t\t\t// Only proceed if the vnode has not been unmounted by `diff()` above.\n\t\t\t\tif (newDom != null) {\n\t\t\t\t\tif (firstChildDom == null) {\n\t\t\t\t\t\tfirstChildDom = newDom;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet nextDom;\n\t\t\t\t\tif (childVNode._nextDom !== undefined) {\n\t\t\t\t\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t\t\t\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t\t\t\t\t// of last DOM child of this child VNode\n\t\t\t\t\t\tnextDom = childVNode._nextDom;\n\n\t\t\t\t\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t\t\t\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t\t\t\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t\t\t\t\t// can clean up the property\n\t\t\t\t\t\tchildVNode._nextDom = undefined;\n\t\t\t\t\t} else if (\n\t\t\t\t\t\texcessDomChildren == oldVNode ||\n\t\t\t\t\t\tnewDom != oldDom ||\n\t\t\t\t\t\tnewDom.parentNode == null\n\t\t\t\t\t) {\n\t\t\t\t\t\t// NOTE: excessDomChildren==oldVNode above:\n\t\t\t\t\t\t// This is a compression of excessDomChildren==null && oldVNode==null!\n\t\t\t\t\t\t// The values only have the same type when `null`.\n\n\t\t\t\t\t\touter: if (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\t\t\t\t\t\tparentDom.appendChild(newDom);\n\t\t\t\t\t\t\tnextDom = null;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// `j import('../internal').VNode} [callback]\n * A function to invoke for each child before it is added to the flattened list.\n * @param {Array} [flattened] An flat array of children to modify\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, callback, flattened) {\n\tif (flattened == null) flattened = [];\n\n\tif (children == null || typeof children == 'boolean') {\n\t\tif (callback) flattened.push(callback(null));\n\t} else if (Array.isArray(children)) {\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\ttoChildArray(children[i], callback, flattened);\n\t\t}\n\t} else if (!callback) {\n\t\tflattened.push(children);\n\t} else if (typeof children == 'string' || typeof children == 'number') {\n\t\tflattened.push(callback(createVNode(null, children, null, null, children)));\n\t} else if (children._dom != null || children._component != null) {\n\t\tflattened.push(\n\t\t\tcallback(\n\t\t\t\tcreateVNode(\n\t\t\t\t\tchildren.type,\n\t\t\t\t\tchildren.props,\n\t\t\t\t\tchildren.key,\n\t\t\t\t\tnull,\n\t\t\t\t\tchildren._original\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t} else {\n\t\tflattened.push(callback(children));\n\t}\n\n\treturn flattened;\n}\n", "import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value);\n\t} else if (\n\t\ttypeof value == 'number' &&\n\t\tIS_NON_DIMENSIONAL.test(key) === false\n\t) {\n\t\tstyle[key] = value + 'px';\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else {\n\t\tstyle[key] = value;\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet s, useCapture, nameLower;\n\n\tif (isSvg) {\n\t\tif (name === 'className') {\n\t\t\tname = 'class';\n\t\t}\n\t} else if (name === 'class') {\n\t\tname = 'className';\n\t}\n\n\tif (name === 'style') {\n\t\ts = dom.style;\n\n\t\tif (typeof value == 'string') {\n\t\t\ts.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\ts.cssText = '';\n\t\t\t\toldValue = null;\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (let i in oldValue) {\n\t\t\t\t\tif (!(value && i in value)) {\n\t\t\t\t\t\tsetStyle(s, i, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (let i in value) {\n\t\t\t\t\tif (!oldValue || value[i] !== oldValue[i]) {\n\t\t\t\t\t\tsetStyle(s, i, value[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/Capture$/, ''));\n\t\tnameLower = name.toLowerCase();\n\t\tname = (nameLower in dom ? nameLower : name).slice(2);\n\n\t\tif (value) {\n\t\t\tif (!oldValue) dom.addEventListener(name, eventProxy, useCapture);\n\t\t\t(dom._listeners || (dom._listeners = {}))[name] = value;\n\t\t} else {\n\t\t\tdom.removeEventListener(name, eventProxy, useCapture);\n\t\t}\n\t} else if (\n\t\tname !== 'list' &&\n\t\tname !== 'tagName' &&\n\t\t// HTMLButtonElement.form and HTMLInputElement.form are read-only but can be set using\n\t\t// setAttribute\n\t\tname !== 'form' &&\n\t\tname !== 'type' &&\n\t\tname !== 'size' &&\n\t\t!isSvg &&\n\t\tname in dom\n\t) {\n\t\tdom[name] = value == null ? '' : value;\n\t} else if (typeof value != 'function' && name !== 'dangerouslySetInnerHTML') {\n\t\tif (name !== (name = name.replace(/^xlink:?/, ''))) {\n\t\t\tif (value == null || value === false) {\n\t\t\t\tdom.removeAttributeNS(\n\t\t\t\t\t'http://www.w3.org/1999/xlink',\n\t\t\t\t\tname.toLowerCase()\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tdom.setAttributeNS(\n\t\t\t\t\t'http://www.w3.org/1999/xlink',\n\t\t\t\t\tname.toLowerCase(),\n\t\t\t\t\tvalue\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (\n\t\t\tvalue == null ||\n\t\t\t(value === false &&\n\t\t\t\t// ARIA-attributes have a different notion of boolean values.\n\t\t\t\t// The value `false` is different from the attribute not\n\t\t\t\t// existing on the DOM, so we can't remove it. For non-boolean\n\t\t\t\t// ARIA-attributes we could treat false as a removal, but the\n\t\t\t\t// amount of exceptions would cost us too many bytes. On top of\n\t\t\t\t// that other VDOM frameworks also always stringify `false`.\n\t\t\t\t!/^ar/.test(name))\n\t\t) {\n\t\t\tdom.removeAttribute(name);\n\t\t} else {\n\t\t\tdom.setAttribute(name, value);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\tthis._listeners[e.type](options.event ? options.event(e) : e);\n}\n", "import { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { Component } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, removeNode } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {Element | Text} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} [isHydrating] Whether or not we are in hydration\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\ttry {\n\t\touter: if (typeof newType == 'function') {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\t(newVNode._original === oldVNode._original && !c._processingException)\n\t\t\t\t) {\n\t\t\t\t\tc.props = newProps;\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) c._dirty = false;\n\t\t\t\t\tc._vnode = newVNode;\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (tmp = 0; tmp < newVNode._children.length; tmp++) {\n\t\t\t\t\t\tif (newVNode._children[tmp]) {\n\t\t\t\t\t\t\tnewVNode._children[tmp]._parent = newVNode;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc.state = c._nextState;\n\n\t\t\tif ((tmp = options._render)) tmp(newVNode);\n\n\t\t\tc._dirty = false;\n\t\t\tc._vnode = newVNode;\n\t\t\tc._parentDom = parentDom;\n\n\t\t\ttmp = c.render(c.props, c.state, c.context);\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type == Fragment && tmp.key == null;\n\t\t\tnewVNode._children = isTopLevelFragment\n\t\t\t\t? tmp.props.children\n\t\t\t\t: Array.isArray(tmp)\n\t\t\t\t? tmp\n\t\t\t\t: [tmp];\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\n\t\t\tc._force = false;\n\t\t} else if (\n\t\t\texcessDomChildren == null &&\n\t\t\tnewVNode._original === oldVNode._original\n\t\t) {\n\t\t\tnewVNode._children = oldVNode._children;\n\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t} else {\n\t\t\tnewVNode._dom = diffElementNodes(\n\t\t\t\toldVNode._dom,\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\tisHydrating\n\t\t\t);\n\t\t}\n\n\t\tif ((tmp = options.diffed)) tmp(newVNode);\n\t} catch (e) {\n\t\tnewVNode._original = null;\n\t\toptions._catchError(e, newVNode, oldVNode);\n\t}\n\n\treturn newVNode._dom;\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root) {\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating\n) {\n\tlet i;\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvg = newVNode.type === 'svg' || isSvg;\n\n\tif (excessDomChildren != null) {\n\t\tfor (i = 0; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild != null &&\n\t\t\t\t((newVNode.type === null\n\t\t\t\t\t? child.nodeType === 3\n\t\t\t\t\t: child.localName === newVNode.type) ||\n\t\t\t\t\tdom == child)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (newVNode.type === null) {\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tdom = isSvg\n\t\t\t? document.createElementNS('http://www.w3.org/2000/svg', newVNode.type)\n\t\t\t: document.createElement(\n\t\t\t\t\tnewVNode.type,\n\t\t\t\t\tnewProps.is && { is: newProps.is }\n\t\t\t );\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (newVNode.type === null) {\n\t\tif (oldProps !== newProps && dom.data != newProps) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\tif (excessDomChildren != null) {\n\t\t\texcessDomChildren = EMPTY_ARR.slice.call(dom.childNodes);\n\t\t}\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\tif (oldProps === EMPTY_OBJ) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (let i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (!newHtml || !oldHtml || newHtml.__html != oldHtml.__html) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\tnewVNode._children = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tnewVNode.type === 'foreignObject' ? false : isSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\tEMPTY_OBJ,\n\t\t\t\tisHydrating\n\t\t\t);\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\ti !== dom.value\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'value', i, oldProps.value, false);\n\t\t\t}\n\t\t\tif (\n\t\t\t\t'checked' in newProps &&\n\t\t\t\t(i = newProps.checked) !== undefined &&\n\t\t\t\ti !== dom.checked\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'checked', i, oldProps.checked, false);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} ref\n * @param {any} value\n * @param {import('../internal').VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') ref(value);\n\t\telse ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {import('../internal').VNode} vnode The virtual node to unmount\n * @param {import('../internal').VNode} parentVNode The parent of the VNode that\n * initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current === vnode._dom) applyRef(r, null, parentVNode);\n\t}\n\n\tlet dom;\n\tif (!skipRemove && typeof vnode.type != 'function') {\n\t\tskipRemove = (dom = vnode._dom) != null;\n\t}\n\n\t// Must be set to `undefined` to properly clean up `_nextDom`\n\t// for which `null` is a valid value. See comment in `create-element.js`\n\tvnode._dom = vnode._nextDom = undefined;\n\n\tif ((r = vnode._component) != null) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = null;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) unmount(r[i], parentVNode, skipRemove);\n\t\t}\n\t}\n\n\tif (dom != null) removeNode(dom);\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n", "import { assign } from './util';\nimport { EMPTY_ARR } from './constants';\nimport { createVNode } from './create-element';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array} rest Any additional arguments will be used as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props) {\n\tprops = assign(assign({}, vnode.props), props);\n\tif (arguments.length > 2) props.children = EMPTY_ARR.slice.call(arguments, 2);\n\tlet normalizedProps = {};\n\tfor (const i in props) {\n\t\tif (i !== 'key' && i !== 'ref') normalizedProps[i] = props[i];\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tprops.key || vnode.key,\n\t\tprops.ref || vnode.ref,\n\t\tnull\n\t);\n}\n", "import { enqueueRender } from '../component';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw\n * the error that was caught (except for unmounting when this parameter\n * is the highest parent that was being unmounted)\n */\nexport function _catchError(error, vnode) {\n\t/** @type {import('../internal').Component} */\n\tlet component, hasCaught;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tif (\n\t\t\t\t\tcomponent.constructor &&\n\t\t\t\t\tcomponent.constructor.getDerivedStateFromError != null\n\t\t\t\t) {\n\t\t\t\t\thasCaught = true;\n\t\t\t\t\tcomponent.setState(\n\t\t\t\t\t\tcomponent.constructor.getDerivedStateFromError(error)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != null) {\n\t\t\t\t\thasCaught = true;\n\t\t\t\t\tcomponent.componentDidCatch(error);\n\t\t\t\t}\n\n\t\t\t\tif (hasCaught)\n\t\t\t\t\treturn enqueueRender((component._pendingError = component));\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n", "import {Frame, Profile} from '../lib/profile'\nimport {memoizeByReference, memoizeByShallowEquality} from '../lib/utils'\nimport {RowAtlas} from '../gl/row-atlas'\nimport {CanvasContext} from '../gl/canvas-context'\nimport {FlamechartRowAtlasKey} from '../gl/flamechart-renderer'\nimport {Theme} from '../views/themes/theme'\n\nexport const createGetColorBucketForFrame = memoizeByReference(\n (frameToColorBucket: Map) => {\n return (frame: Frame): number => {\n return frameToColorBucket.get(frame.key) || 0\n }\n },\n)\n\nexport const createGetCSSColorForFrame = memoizeByShallowEquality(\n ({\n theme,\n frameToColorBucket,\n }: {\n theme: Theme\n frameToColorBucket: Map\n }) => {\n const getColorBucketForFrame = createGetColorBucketForFrame(frameToColorBucket)\n return (frame: Frame): string => {\n const t = getColorBucketForFrame(frame) / 255\n return theme.colorForBucket(t).toCSS()\n }\n },\n)\n\nexport const getCanvasContext = memoizeByShallowEquality(\n ({theme, canvas}: {theme: Theme; canvas: HTMLCanvasElement}) => {\n return new CanvasContext(canvas, theme)\n },\n)\n\nexport const getRowAtlas = memoizeByReference((canvasContext: CanvasContext) => {\n return new RowAtlas(\n canvasContext.gl,\n canvasContext.rectangleBatchRenderer,\n canvasContext.textureRenderer,\n )\n})\n\nexport const getProfileToView = memoizeByShallowEquality(\n ({profile, flattenRecursion}: {profile: Profile; flattenRecursion: boolean}): Profile => {\n return flattenRecursion ? profile.getProfileWithRecursionFlattened() : profile\n },\n)\nexport const getFrameToColorBucket = memoizeByReference(\n (profile: Profile): Map => {\n const frames: Frame[] = []\n profile.forEachFrame(f => frames.push(f))\n function key(f: Frame) {\n return (f.file || '') + f.name\n }\n function compare(a: Frame, b: Frame) {\n return key(a) > key(b) ? 1 : -1\n }\n frames.sort(compare)\n const frameToColorBucket = new Map()\n for (let i = 0; i < frames.length; i++) {\n frameToColorBucket.set(frames[i].key, Math.floor((255 * i) / frames.length))\n }\n\n return frameToColorBucket\n },\n)\n", "class ListNode {\n prev: ListNode | null = null\n next: ListNode | null = null\n constructor(readonly data: V) {}\n}\n\nexport class List {\n private head: ListNode | null = null\n private tail: ListNode | null = null\n private size: number = 0\n constructor() {}\n\n getHead(): ListNode | null {\n return this.head\n }\n getTail(): ListNode | null {\n return this.tail\n }\n getSize(): number {\n return this.size\n }\n\n append(node: ListNode): void {\n if (!this.tail) {\n this.head = this.tail = node\n } else {\n this.tail.next = node\n node.prev = this.tail\n this.tail = node\n }\n this.size++\n }\n\n prepend(node: ListNode): ListNode {\n if (!this.head) {\n this.head = this.tail = node\n } else {\n this.head.prev = node\n node.next = this.head\n this.head = node\n }\n this.size++\n return node\n }\n\n pop(): ListNode | null {\n if (!this.tail) {\n return null\n } else {\n const ret = this.tail\n if (ret.prev) {\n this.tail = ret.prev\n this.tail.next = null\n } else {\n this.head = this.tail = null\n }\n this.size--\n ret.prev = null\n return ret\n }\n }\n\n dequeue(): ListNode | null {\n if (!this.head) {\n return null\n } else {\n const ret = this.head\n if (ret.next) {\n this.head = ret.next\n this.head.prev = null\n } else {\n this.head = this.tail = null\n }\n this.size--\n ret.next = null\n return ret\n }\n }\n\n remove(node: ListNode): void {\n if (node.prev == null) {\n this.dequeue()\n } else if (node.next == null) {\n this.pop()\n } else {\n // Neither first nor last, should be safe to just link\n // neighbours.\n node.next.prev = node.prev\n node.prev.next = node.next\n node.next = null\n node.prev = null\n this.size--\n }\n }\n}\n\ninterface LRUCacheNode {\n value: V\n listNode: ListNode\n}\n\nexport class LRUCache {\n private list = new List()\n private map = new Map>()\n\n constructor(private capacity: number) {}\n\n has(key: K): boolean {\n return this.map.has(key)\n }\n\n get(key: K): V | null {\n const node = this.map.get(key)\n if (!node) {\n return null\n }\n // Bring node to the front of the list\n this.list.remove(node.listNode)\n this.list.prepend(node.listNode)\n\n return node ? node.value : null\n }\n\n getSize() {\n return this.list.getSize()\n }\n\n getCapacity() {\n return this.capacity\n }\n\n insert(key: K, value: V) {\n const node = this.map.get(key)\n if (node) {\n this.list.remove(node.listNode)\n }\n // Evict old entries when out of capacity\n while (this.list.getSize() >= this.capacity) {\n this.map.delete(this.list.pop()!.data)\n }\n const listNode = this.list.prepend(new ListNode(key))\n this.map.set(key, {value, listNode})\n }\n\n getOrInsert(key: K, f: (key: K) => V): V {\n let value = this.get(key)\n if (value == null) {\n value = f(key)\n this.insert(key, value)\n }\n return value\n }\n\n removeLRU(): [K, V] | null {\n const oldest = this.list.pop()\n if (!oldest) return null\n const key = oldest.data\n const value = this.map.get(key)!.value\n this.map.delete(key)\n return [key, value]\n }\n\n clear() {\n this.list = new List()\n this.map = new Map>()\n }\n}\n", "export function clamp(x: number, minVal: number, maxVal: number) {\n if (x < minVal) return minVal\n if (x > maxVal) return maxVal\n return x\n}\n\nexport class Vec2 {\n constructor(\n readonly x: number,\n readonly y: number,\n ) {}\n withX(x: number) {\n return new Vec2(x, this.y)\n }\n withY(y: number) {\n return new Vec2(this.x, y)\n }\n\n plus(other: Vec2) {\n return new Vec2(this.x + other.x, this.y + other.y)\n }\n minus(other: Vec2) {\n return new Vec2(this.x - other.x, this.y - other.y)\n }\n times(scalar: number) {\n return new Vec2(this.x * scalar, this.y * scalar)\n }\n timesPointwise(other: Vec2) {\n return new Vec2(this.x * other.x, this.y * other.y)\n }\n dividedByPointwise(other: Vec2) {\n return new Vec2(this.x / other.x, this.y / other.y)\n }\n dot(other: Vec2) {\n return this.x * other.x + this.y * other.y\n }\n equals(other: Vec2) {\n return this.x === other.x && this.y === other.y\n }\n approxEquals(other: Vec2, epsilon = 1e-9) {\n return Math.abs(this.x - other.x) < epsilon && Math.abs(this.y - other.y) < epsilon\n }\n\n length2() {\n return this.dot(this)\n }\n length() {\n return Math.sqrt(this.length2())\n }\n abs() {\n return new Vec2(Math.abs(this.x), Math.abs(this.y))\n }\n\n static min(a: Vec2, b: Vec2) {\n return new Vec2(Math.min(a.x, b.x), Math.min(a.y, b.y))\n }\n\n static max(a: Vec2, b: Vec2) {\n return new Vec2(Math.max(a.x, b.x), Math.max(a.y, b.y))\n }\n\n static clamp(v: Vec2, min: Vec2, max: Vec2) {\n return new Vec2(clamp(v.x, min.x, max.x), clamp(v.y, min.y, max.y))\n }\n\n static zero = new Vec2(0, 0)\n static unit = new Vec2(1, 1)\n\n flatten(): [number, number] {\n return [this.x, this.y]\n }\n}\n\nexport class AffineTransform {\n constructor(\n readonly m00 = 1,\n readonly m01 = 0,\n readonly m02 = 0,\n readonly m10 = 0,\n readonly m11 = 1,\n readonly m12 = 0,\n ) {}\n\n withScale(s: Vec2) {\n let {m00, m01, m02, m10, m11, m12} = this\n m00 = s.x\n m11 = s.y\n return new AffineTransform(m00, m01, m02, m10, m11, m12)\n }\n static withScale(s: Vec2) {\n return new AffineTransform().withScale(s)\n }\n scaledBy(s: Vec2) {\n return AffineTransform.withScale(s).times(this)\n }\n getScale() {\n return new Vec2(this.m00, this.m11)\n }\n\n withTranslation(t: Vec2) {\n let {m00, m01, m02, m10, m11, m12} = this\n m02 = t.x\n m12 = t.y\n return new AffineTransform(m00, m01, m02, m10, m11, m12)\n }\n static withTranslation(t: Vec2) {\n return new AffineTransform().withTranslation(t)\n }\n getTranslation() {\n return new Vec2(this.m02, this.m12)\n }\n translatedBy(t: Vec2) {\n return AffineTransform.withTranslation(t).times(this)\n }\n\n static betweenRects(from: Rect, to: Rect) {\n return AffineTransform.withTranslation(from.origin.times(-1))\n .scaledBy(new Vec2(to.size.x / from.size.x, to.size.y / from.size.y))\n .translatedBy(to.origin)\n }\n\n times(other: AffineTransform) {\n const m00 = this.m00 * other.m00 + this.m01 * other.m10\n const m01 = this.m00 * other.m01 + this.m01 * other.m11\n const m02 = this.m00 * other.m02 + this.m01 * other.m12 + this.m02\n\n const m10 = this.m10 * other.m00 + this.m11 * other.m10\n const m11 = this.m10 * other.m01 + this.m11 * other.m11\n const m12 = this.m10 * other.m02 + this.m11 * other.m12 + this.m12\n return new AffineTransform(m00, m01, m02, m10, m11, m12)\n }\n\n equals(other: AffineTransform) {\n return (\n this.m00 == other.m00 &&\n this.m01 == other.m01 &&\n this.m02 == other.m02 &&\n this.m10 == other.m10 &&\n this.m11 == other.m11 &&\n this.m12 == other.m12\n )\n }\n\n approxEquals(other: AffineTransform, epsilon = 1e-9) {\n return (\n Math.abs(this.m00 - other.m00) < epsilon &&\n Math.abs(this.m01 - other.m01) < epsilon &&\n Math.abs(this.m02 - other.m02) < epsilon &&\n Math.abs(this.m10 - other.m10) < epsilon &&\n Math.abs(this.m11 - other.m11) < epsilon &&\n Math.abs(this.m12 - other.m12) < epsilon\n )\n }\n\n timesScalar(s: number) {\n const {m00, m01, m02, m10, m11, m12} = this\n return new AffineTransform(s * m00, s * m01, s * m02, s * m10, s * m11, s * m12)\n }\n\n det() {\n const {m00, m01, m02, m10, m11, m12} = this\n const m20 = 0\n const m21 = 0\n const m22 = 1\n\n return (\n m00 * (m11 * m22 - m12 * m21) - m01 * (m10 * m22 - m12 * m20) + m02 * (m10 * m21 - m11 * m20)\n )\n }\n\n adj() {\n const {m00, m01, m02, m10, m11, m12} = this\n const m20 = 0\n const m21 = 0\n const m22 = 1\n\n // Adjugate matrix (a) is the transpose of the\n // cofactor matrix (c).\n //\n // 00 01 02\n // 10 11 12\n // 20 21 22\n\n const a00 = /* c00 = */ +(m11 * m22 - m12 * m21)\n const a01 = /* c10 = */ -(m01 * m22 - m02 * m21)\n const a02 = /* c20 = */ +(m01 * m12 - m02 * m11)\n const a10 = /* c01 = */ -(m10 * m22 - m12 * m20)\n const a11 = /* c11 = */ +(m00 * m22 - m02 * m20)\n const a12 = /* c21 = */ -(m00 * m12 - m02 * m10)\n\n return new AffineTransform(a00, a01, a02, a10, a11, a12)\n }\n\n inverted(): AffineTransform | null {\n const det = this.det()\n if (det === 0) return null\n const adj = this.adj()\n return adj.timesScalar(1 / det)\n }\n\n transformVector(v: Vec2) {\n return new Vec2(v.x * this.m00 + v.y * this.m01, v.x * this.m10 + v.y * this.m11)\n }\n\n inverseTransformVector(v: Vec2): Vec2 | null {\n const inv = this.inverted()\n if (!inv) return null\n return inv.transformVector(v)\n }\n\n transformPosition(v: Vec2) {\n return new Vec2(\n v.x * this.m00 + v.y * this.m01 + this.m02,\n v.x * this.m10 + v.y * this.m11 + this.m12,\n )\n }\n\n inverseTransformPosition(v: Vec2): Vec2 | null {\n const inv = this.inverted()\n if (!inv) return null\n return inv.transformPosition(v)\n }\n\n transformRect(r: Rect) {\n const size = this.transformVector(r.size)\n const origin = this.transformPosition(r.origin)\n\n if (size.x < 0 && size.y < 0) {\n return new Rect(origin.plus(size), size.abs())\n } else if (size.x < 0) {\n return new Rect(origin.withX(origin.x + size.x), size.abs())\n } else if (size.y < 0) {\n return new Rect(origin.withY(origin.y + size.y), size.abs())\n }\n\n return new Rect(origin, size)\n }\n\n inverseTransformRect(r: Rect): Rect | null {\n const inv = this.inverted()\n if (!inv) return null\n return inv.transformRect(r)\n }\n\n flatten(): [number, number, number, number, number, number, number, number, number] {\n // Flatten into GLSL format\n // prettier-ignore\n return [\n this.m00, this.m10, 0,\n this.m01, this.m11, 0,\n this.m02, this.m12, 1,\n ]\n }\n}\n\nexport class Rect {\n constructor(\n readonly origin: Vec2,\n readonly size: Vec2,\n ) {}\n\n isEmpty() {\n return this.width() == 0 || this.height() == 0\n }\n\n width() {\n return this.size.x\n }\n height() {\n return this.size.y\n }\n\n left() {\n return this.origin.x\n }\n right() {\n return this.left() + this.width()\n }\n top() {\n return this.origin.y\n }\n bottom() {\n return this.top() + this.height()\n }\n\n topLeft() {\n return this.origin\n }\n topRight() {\n return this.origin.plus(new Vec2(this.width(), 0))\n }\n\n bottomRight() {\n return this.origin.plus(this.size)\n }\n bottomLeft() {\n return this.origin.plus(new Vec2(0, this.height()))\n }\n\n withOrigin(origin: Vec2) {\n return new Rect(origin, this.size)\n }\n withSize(size: Vec2) {\n return new Rect(this.origin, size)\n }\n\n closestPointTo(p: Vec2) {\n return new Vec2(clamp(p.x, this.left(), this.right()), clamp(p.y, this.top(), this.bottom()))\n }\n\n distanceFrom(p: Vec2) {\n return p.minus(this.closestPointTo(p)).length()\n }\n\n contains(p: Vec2) {\n return this.distanceFrom(p) === 0\n }\n\n hasIntersectionWith(other: Rect) {\n const top = Math.max(this.top(), other.top())\n const bottom = Math.max(top, Math.min(this.bottom(), other.bottom()))\n if (bottom - top === 0) return false\n\n const left = Math.max(this.left(), other.left())\n const right = Math.max(left, Math.min(this.right(), other.right()))\n if (right - left === 0) return false\n return true\n }\n\n intersectWith(other: Rect): Rect {\n const topLeft = Vec2.max(this.topLeft(), other.topLeft())\n const bottomRight = Vec2.max(topLeft, Vec2.min(this.bottomRight(), other.bottomRight()))\n\n return new Rect(topLeft, bottomRight.minus(topLeft))\n }\n\n equals(other: Rect) {\n return this.origin.equals(other.origin) && this.size.equals(other.size)\n }\n\n approxEquals(other: Rect) {\n return this.origin.approxEquals(other.origin) && this.size.approxEquals(other.size)\n }\n\n area() {\n return this.size.x * this.size.y\n }\n\n static empty = new Rect(Vec2.zero, Vec2.zero)\n static unit = new Rect(Vec2.zero, Vec2.unit)\n static NDC = new Rect(new Vec2(-1, -1), new Vec2(2, 2))\n}\n", "// This is a port of the GPU APIs from https://github.com/evanw/sky from Skew to\n// TypeScript.\n//\n// The MIT License (MIT)\n// Original work Copyright (c) 2016 Evan Wallace\n// Modified work Copyright (c) 2018 Jamie Wong\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n// NOTE: This file intentionally has no dependencies.\n\n// Dependencies & polyfills for import from skew\nconst RELEASE =\n typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'production'\n\nfunction assert(condition: boolean) {\n if (!RELEASE) {\n if (!condition) throw new Error('Assertion failed.')\n }\n}\n\nfunction appendOne(ts: T[], t: T): void {\n if (ts.indexOf(t) === -1) ts.push(t)\n}\n\nfunction removeOne(ts: T[], t: T): void {\n const index = ts.indexOf(t)\n if (index !== -1) ts.splice(index, 1)\n}\n\nfunction TEXTURE_N(gl: WebGLRenderingContext, index: number) {\n assert(index >= 0 && index <= 31)\n return (gl.TEXTURE0 + index) as GLenum\n}\n\nexport namespace Graphics {\n export class Rect {\n constructor(\n public x: number = 0,\n public y: number = 0,\n public width: number = 0,\n public height: number = 0,\n ) {}\n\n set(x: number, y: number, width: number, height: number) {\n this.x = x\n this.y = y\n this.width = width\n this.height = height\n }\n\n equals(other: Rect) {\n return (\n this.x === other.x &&\n this.y === other.y &&\n this.width === other.width &&\n this.height === other.height\n )\n }\n }\n\n export class Color {\n constructor(\n public redF: number,\n public greenF: number,\n public blueF: number,\n public alphaF: number,\n ) {}\n\n equals(other: Color): boolean {\n return (\n this.redF === other.redF &&\n this.greenF === other.greenF &&\n this.blueF === other.blueF &&\n this.alphaF === other.alphaF\n )\n }\n\n static TRANSPARENT = new Color(0, 0, 0, 0)\n }\n\n // Converted from https://github.com/evanw/sky/blob/c72de77/src/graphics/context.sk\n export enum BlendOperation {\n ZERO = 0,\n ONE = 1,\n\n SOURCE_COLOR = 2,\n TARGET_COLOR = 3,\n INVERSE_SOURCE_COLOR = 4,\n INVERSE_TARGET_COLOR = 5,\n\n SOURCE_ALPHA = 6,\n TARGET_ALPHA = 7,\n INVERSE_SOURCE_ALPHA = 8,\n INVERSE_TARGET_ALPHA = 9,\n\n CONSTANT = 10,\n INVERSE_CONSTANT = 11,\n }\n\n export enum Primitive {\n TRIANGLES,\n TRIANGLE_STRIP,\n }\n\n export abstract class Context {\n abstract addContextResetHandler(callback: () => void): void\n abstract beginFrame(): void\n abstract clear(color: Color): void\n\n abstract createMaterial(\n format: VertexFormat,\n vertexSource: string,\n fragmentSource: string,\n ): Material\n abstract createTexture(\n format: TextureFormat,\n width: number,\n height: number,\n pixels?: Uint8Array,\n ): Texture\n abstract createRenderTarget(texture: Texture): RenderTarget\n abstract createVertexBuffer(byteCount: number): VertexBuffer\n abstract currentRenderTarget: RenderTarget | null\n abstract draw(primitive: Primitive, material: Material, vertices: VertexBuffer): void\n abstract endFrame(): void\n abstract removeContextResetHandler(callback: () => void): void\n abstract resize(\n widthInPixels: number,\n heightInPixels: number,\n widthInAppUnits: number,\n heightInAppUnits: number,\n ): void\n abstract setRenderTarget(renderTarget: RenderTarget | null): void\n abstract setViewport(x: number, y: number, width: number, height: number): void\n abstract viewport: Rect\n abstract widthInPixels: number\n abstract heightInPixels: number\n\n abstract renderTargetHeightInPixels: number\n abstract renderTargetWidthInPixels: number\n\n abstract setBlendState(source: BlendOperation, target: BlendOperation): void\n setCopyBlendState() {\n this.setBlendState(BlendOperation.ONE, BlendOperation.ZERO)\n }\n setAddBlendState() {\n this.setBlendState(BlendOperation.ONE, BlendOperation.ONE)\n }\n setPremultipliedBlendState() {\n this.setBlendState(BlendOperation.ONE, BlendOperation.INVERSE_SOURCE_ALPHA)\n }\n setUnpremultipliedBlendState() {\n this.setBlendState(BlendOperation.SOURCE_ALPHA, BlendOperation.INVERSE_SOURCE_ALPHA)\n }\n\n protected resizeEventHandlers = new Set<() => void>()\n addAfterResizeEventHandler(callback: () => void): void {\n this.resizeEventHandlers.add(callback)\n }\n removeAfterResizeEventHandler(callback: () => void): void {\n this.resizeEventHandlers.delete(callback)\n }\n }\n\n export interface Material {\n context: Context\n format: VertexFormat\n fragmentSource: string\n vertexSource: string\n setUniformFloat(name: string, x: number): void\n setUniformInt(name: string, x: number): void\n setUniformVec2(name: string, x: number, y: number): void\n setUniformVec3(name: string, x: number, y: number, z: number): void\n setUniformVec4(name: string, x: number, y: number, z: number, w: number): void\n setUniformMat3(\n name: string,\n m00: number,\n m01: number,\n m02: number,\n m10: number,\n m11: number,\n m12: number,\n m20: number,\n m21: number,\n m22: number,\n ): void\n setUniformSampler(name: string, texture: Texture, index: number): void\n }\n\n export enum AttributeType {\n FLOAT,\n BYTE,\n }\n\n export function attributeByteLength(type: AttributeType) {\n return type == AttributeType.FLOAT ? 4 : 1\n }\n\n export class Attribute {\n constructor(\n readonly name: string,\n readonly type: AttributeType,\n readonly count: number,\n readonly byteOffset: number,\n ) {}\n }\n\n export class VertexFormat {\n private _attributes: Attribute[] = []\n private _stride = 0\n\n get attributes() {\n return this._attributes\n }\n get stride() {\n return this._stride\n }\n\n add(name: string, type: AttributeType, count: number): VertexFormat {\n this.attributes.push(new Attribute(name, type, count, this.stride))\n this._stride += count * attributeByteLength(type)\n return this\n }\n }\n\n export abstract class VertexBuffer {\n abstract byteCount: number\n abstract context: Context\n abstract move(sourceByteOffset: number, targetByteOffset: number, byteCount: number): void\n abstract upload(bytes: Uint8Array, byteOffset?: number): void\n uploadFloat32Array(floats: Float32Array) {\n this.upload(new Uint8Array(floats.buffer), 0)\n }\n uploadFloats(floats: number[]) {\n this.uploadFloat32Array(new Float32Array(floats))\n }\n abstract free(): void\n }\n\n export enum PixelFilter {\n NEAREST,\n LINEAR,\n }\n\n export enum PixelWrap {\n REPEAT,\n CLAMP,\n }\n\n export class TextureFormat {\n constructor(\n readonly minFilter: PixelFilter,\n readonly magFilter: PixelFilter,\n readonly wrap: PixelWrap,\n ) {}\n\n static LINEAR_CLAMP = new TextureFormat(PixelFilter.LINEAR, PixelFilter.LINEAR, PixelWrap.CLAMP)\n static LINEAR_MIN_NEAREST_MAG_CLAMP = new TextureFormat(\n PixelFilter.LINEAR,\n PixelFilter.NEAREST,\n PixelWrap.CLAMP,\n )\n static NEAREST_CLAMP = new TextureFormat(\n PixelFilter.NEAREST,\n PixelFilter.NEAREST,\n PixelWrap.CLAMP,\n )\n }\n\n export interface Texture {\n context: Context\n format: TextureFormat\n width: number\n height: number\n resize(width: number, height: number, pixels?: Uint8Array): void\n setFormat(format: TextureFormat): void\n free(): void\n }\n\n export interface RenderTarget {\n context: Context\n texture: Texture\n setColor(texture: Texture): void\n free(): void\n }\n}\n\n// Converted from https://github.com/evanw/sky/blob/c72de77/src/browser/context.sk\nexport namespace WebGL {\n export class Context extends Graphics.Context {\n private _attributeCount = 0\n private _blendOperationMap: {[key: number]: GLenum}\n private _blendOperations = 0\n private _contextResetHandlers: (() => void)[] = []\n private _currentClearColor = Graphics.Color.TRANSPARENT\n private _currentRenderTarget: RenderTarget | null = null\n private _defaultViewport = new Graphics.Rect()\n private _forceStateUpdate = true\n private _generation = 1\n private _gl: WebGLRenderingContext\n private _height = 0\n private _oldBlendOperations = 0\n private _oldRenderTarget: RenderTarget | null = null\n private _oldViewport = new Graphics.Rect()\n private _width = 0\n\n get widthInPixels() {\n return this._width\n }\n get heightInPixels() {\n return this._height\n }\n\n constructor(canvas: HTMLCanvasElement = document.createElement('canvas')) {\n super()\n let gl = canvas.getContext('webgl', {\n alpha: false,\n antialias: false,\n depth: false,\n preserveDrawingBuffer: false,\n stencil: false,\n })\n\n if (gl == null) {\n throw new Error('Setup failure')\n }\n\n this._gl = gl\n let style = canvas.style\n canvas.width = 0\n canvas.height = 0\n style.width = style.height = '0'\n\n canvas.addEventListener('webglcontextlost', (e: Event) => {\n e.preventDefault()\n })\n\n canvas.addEventListener('webglcontextrestored', this.handleWebglContextRestored)\n\n // Using maps makes these compact in release\n this._blendOperationMap = {\n [Graphics.BlendOperation.ZERO]: this._gl.ZERO,\n [Graphics.BlendOperation.ONE]: this._gl.ONE,\n\n [Graphics.BlendOperation.SOURCE_COLOR]: this._gl.SRC_COLOR,\n [Graphics.BlendOperation.TARGET_COLOR]: this._gl.DST_COLOR,\n [Graphics.BlendOperation.INVERSE_SOURCE_COLOR]: this._gl.ONE_MINUS_SRC_COLOR,\n [Graphics.BlendOperation.INVERSE_TARGET_COLOR]: this._gl.ONE_MINUS_DST_COLOR,\n\n [Graphics.BlendOperation.SOURCE_ALPHA]: this._gl.SRC_ALPHA,\n [Graphics.BlendOperation.TARGET_ALPHA]: this._gl.DST_ALPHA,\n [Graphics.BlendOperation.INVERSE_SOURCE_ALPHA]: this._gl.ONE_MINUS_SRC_ALPHA,\n [Graphics.BlendOperation.INVERSE_TARGET_ALPHA]: this._gl.ONE_MINUS_DST_ALPHA,\n\n [Graphics.BlendOperation.CONSTANT]: this._gl.CONSTANT_COLOR,\n [Graphics.BlendOperation.INVERSE_CONSTANT]: this._gl.ONE_MINUS_CONSTANT_COLOR,\n }\n }\n\n private handleWebglContextRestored = () => {\n this._attributeCount = 0\n this._currentClearColor = Graphics.Color.TRANSPARENT\n this._forceStateUpdate = true\n this._generation++\n for (let handler of this._contextResetHandlers) {\n handler()\n }\n }\n\n public testContextLoss() {\n this.handleWebglContextRestored()\n }\n\n get gl() {\n return this._gl\n }\n get generation() {\n return this._generation\n }\n addContextResetHandler(callback: () => void) {\n appendOne(this._contextResetHandlers, callback)\n }\n removeContextResetHandler(callback: () => void) {\n removeOne(this._contextResetHandlers, callback)\n }\n\n get currentRenderTarget() {\n return this._currentRenderTarget\n }\n\n beginFrame() {\n this.setRenderTarget(null)\n }\n\n endFrame() {}\n\n setBlendState(source: Graphics.BlendOperation, target: Graphics.BlendOperation) {\n this._blendOperations = Context._packBlendModes(source, target)\n }\n\n setViewport(x: number, y: number, width: number, height: number) {\n ;(this._currentRenderTarget != null\n ? this._currentRenderTarget.viewport\n : this._defaultViewport\n ).set(x, y, width, height)\n }\n\n get viewport() {\n return this._currentRenderTarget != null\n ? this._currentRenderTarget.viewport\n : this._defaultViewport\n }\n\n get renderTargetWidthInPixels() {\n return this._currentRenderTarget != null\n ? this._currentRenderTarget.viewport.width\n : this._width\n }\n\n get renderTargetHeightInPixels() {\n return this._currentRenderTarget != null\n ? this._currentRenderTarget.viewport.height\n : this._height\n }\n\n draw(\n primitive: Graphics.Primitive,\n material: Graphics.Material,\n vertices: Graphics.VertexBuffer,\n ) {\n // Update the texture set before preparing the material so uniform samplers can check for that they use different textures\n this._updateRenderTargetAndViewport()\n Material.from(material).prepare()\n\n // Update the vertex buffer before updating the format so attributes can bind correctly\n VertexBuffer.from(vertices).prepare()\n this._updateFormat(material.format)\n\n // Draw now that everything is ready\n this._updateBlendState()\n\n this._gl.drawArrays(\n primitive == Graphics.Primitive.TRIANGLES ? this._gl.TRIANGLES : this._gl.TRIANGLE_STRIP,\n 0,\n Math.floor(vertices.byteCount / material.format.stride),\n )\n\n // Forced state updates are done once after a context loss\n this._forceStateUpdate = false\n }\n\n resize(\n widthInPixels: number,\n heightInPixels: number,\n widthInAppUnits: number,\n heightInAppUnits: number,\n ) {\n let canvas = this._gl.canvas as HTMLCanvasElement\n const bounds = canvas.getBoundingClientRect()\n\n if (\n this._width === widthInPixels &&\n this._height === heightInPixels &&\n // Compare floats with margin error\n Math.abs(bounds.width - widthInAppUnits) < 0.02 &&\n Math.abs(bounds.height - heightInAppUnits) < 0.02\n ) {\n // Nothing to do here!\n return\n }\n\n let style = canvas.style\n canvas.width = widthInPixels\n canvas.height = heightInPixels\n style.width = `${widthInAppUnits}px`\n style.height = `${heightInAppUnits}px`\n this.setViewport(0, 0, widthInPixels, heightInPixels)\n this._width = widthInPixels\n this._height = heightInPixels\n\n this.resizeEventHandlers.forEach(cb => cb())\n }\n\n clear(color: Graphics.Color) {\n this._updateRenderTargetAndViewport()\n this._updateBlendState()\n\n if (!color.equals(this._currentClearColor)) {\n this._gl.clearColor(color.redF, color.greenF, color.blueF, color.alphaF)\n this._currentClearColor = color\n }\n\n this._gl.clear(this._gl.COLOR_BUFFER_BIT)\n }\n\n setRenderTarget(renderTarget: Graphics.RenderTarget | null) {\n this._currentRenderTarget = RenderTarget.from(renderTarget)\n }\n\n createMaterial(\n format: Graphics.VertexFormat,\n vertexSource: string,\n fragmentSource: string,\n ): Graphics.Material {\n let material = new Material(this, format, vertexSource, fragmentSource)\n\n // Compiling shaders is really expensive so we want to get that started\n // as early as possible. In Chrome and possibly other browsers, shader\n // compilation can happen asynchronously as long as you don't call\n // useProgram().\n //\n // https://plus.google.com/+BrandonJonesToji/posts/4ERHkicC5Ny\n //\n material.program\n\n return material\n }\n\n createVertexBuffer(byteCount: number): Graphics.VertexBuffer {\n assert(byteCount > 0 && byteCount % 4 == 0)\n return new VertexBuffer(this, byteCount)\n }\n\n createTexture(\n format: Graphics.TextureFormat,\n width: number,\n height: number,\n pixels?: Uint8Array,\n ): Graphics.Texture {\n return new Texture(this, format, width, height, pixels)\n }\n\n createRenderTarget(texture: Graphics.Texture): Graphics.RenderTarget {\n return new RenderTarget(this, Texture.from(texture))\n }\n\n private ANGLE_instanced_arrays: ANGLE_instanced_arrays | null = null\n private ANGLE_instanced_arrays_generation: number = -1\n getANGLE_instanced_arrays(): ANGLE_instanced_arrays {\n if (this.ANGLE_instanced_arrays_generation !== this._generation) {\n this.ANGLE_instanced_arrays = null\n }\n if (!this.ANGLE_instanced_arrays) {\n this.ANGLE_instanced_arrays = this.gl.getExtension('ANGLE_instanced_arrays')\n if (!this.ANGLE_instanced_arrays) {\n throw new Error('Failed to get extension ANGLE_instanced_arrays')\n }\n }\n return this.ANGLE_instanced_arrays!\n }\n\n _updateRenderTargetAndViewport() {\n let renderTarget = this._currentRenderTarget\n let viewport = renderTarget != null ? renderTarget.viewport : this._defaultViewport\n let gl = this._gl\n\n if (this._forceStateUpdate || this._oldRenderTarget != renderTarget) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget ? renderTarget.framebuffer : null)\n this._oldRenderTarget = renderTarget\n }\n\n if (this._forceStateUpdate || !this._oldViewport.equals(viewport)) {\n gl.viewport(\n viewport.x,\n this.renderTargetHeightInPixels - viewport.y - viewport.height,\n viewport.width,\n viewport.height,\n )\n this._oldViewport.set(viewport.x, viewport.y, viewport.width, viewport.height)\n }\n }\n\n _updateBlendState() {\n if (this._forceStateUpdate || this._oldBlendOperations != this._blendOperations) {\n let gl = this._gl\n let operations = this._blendOperations\n let oldOperations = this._oldBlendOperations\n let source = (operations & 0xf) as Graphics.BlendOperation\n let target = (operations >> 4) as Graphics.BlendOperation\n\n assert(source in this._blendOperationMap)\n assert(target in this._blendOperationMap)\n\n // Special-case the blend mode that just writes over the target buffer\n if (operations == Context.COPY_BLEND_OPERATIONS) {\n gl.disable(gl.BLEND)\n } else {\n if (this._forceStateUpdate || oldOperations == Context.COPY_BLEND_OPERATIONS) {\n gl.enable(gl.BLEND)\n }\n\n // Otherwise, use actual blending\n gl.blendFunc(this._blendOperationMap[source], this._blendOperationMap[target])\n }\n\n this._oldBlendOperations = operations\n }\n }\n\n _updateFormat(format: Graphics.VertexFormat) {\n // Update the attributes\n let gl = this._gl\n let attributes = format.attributes\n let count = attributes.length\n for (let i = 0; i < count; i++) {\n let attribute = attributes[i]\n let isByte = attribute.type == Graphics.AttributeType.BYTE\n gl.vertexAttribPointer(\n i,\n attribute.count,\n isByte ? gl.UNSIGNED_BYTE : gl.FLOAT,\n isByte,\n format.stride,\n attribute.byteOffset,\n )\n }\n\n // Update the attribute count\n while (this._attributeCount < count) {\n gl.enableVertexAttribArray(this._attributeCount)\n this._attributeCount++\n }\n while (this._attributeCount > count) {\n this._attributeCount--\n gl.disableVertexAttribArray(this._attributeCount)\n }\n this._attributeCount = count\n }\n\n getWebGLInfo(): {renderer: string | null; vendor: string | null; version: string | null} {\n const ext = this.gl.getExtension('WEBGL_debug_renderer_info')\n const renderer = ext ? this.gl.getParameter(ext.UNMASKED_RENDERER_WEBGL) : null\n const vendor = ext ? this.gl.getParameter(ext.UNMASKED_VENDOR_WEBGL) : null\n const version = this.gl.getParameter(this.gl.VERSION)\n return {renderer, vendor, version}\n }\n\n static from(context: Graphics.Context): Context {\n assert(context == null || context instanceof Context)\n return context as Context\n }\n\n static _packBlendModes(\n source: Graphics.BlendOperation,\n target: Graphics.BlendOperation,\n ): number {\n return source | (target << 4)\n }\n\n static COPY_BLEND_OPERATIONS = Context._packBlendModes(\n Graphics.BlendOperation.ONE,\n Graphics.BlendOperation.ZERO,\n )\n }\n\n abstract class Uniform {\n constructor(\n protected readonly _material: Material,\n protected readonly _name: string,\n protected _generation = 0,\n protected _location: WebGLUniformLocation | null = null,\n protected _isDirty = true,\n ) {}\n\n // Upload this uniform if it's dirty\n abstract prepare(): void\n\n get location(): WebGLUniformLocation {\n let context = Context.from(this._material.context)\n if (this._generation != context.generation) {\n this._location = context.gl.getUniformLocation(this._material.program, this._name)\n this._generation = context.generation\n\n // Validate the shader against this uniform\n if (!RELEASE) {\n let program = this._material.program\n let gl = context.gl\n for (let i = 0, ii = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS); i < ii; i++) {\n let info = gl.getActiveUniform(program, i)\n if (info && info.name == this._name) {\n assert(info.size == 1)\n switch (info.type) {\n case gl.FLOAT: {\n assert(this instanceof UniformFloat)\n break\n }\n case gl.FLOAT_MAT3: {\n assert(this instanceof UniformMat3)\n break\n }\n case gl.FLOAT_VEC2: {\n assert(this instanceof UniformVec2)\n break\n }\n case gl.FLOAT_VEC3: {\n assert(this instanceof UniformVec3)\n break\n }\n case gl.FLOAT_VEC4: {\n assert(this instanceof UniformVec4)\n break\n }\n case gl.INT: {\n assert(this instanceof UniformInt)\n break\n }\n case gl.SAMPLER_2D: {\n assert(this instanceof UniformSampler)\n break\n }\n default:\n assert(false)\n }\n }\n }\n }\n }\n if (!this._location) {\n throw new Error('Failed to get uniform location')\n }\n return this._location\n }\n }\n\n class UniformFloat extends Uniform {\n private _x = 0.0\n\n set(x: number) {\n if (x != this._x) {\n this._x = x\n this._isDirty = true\n }\n }\n\n prepare() {\n let context = Context.from(this._material.context)\n if (this._generation != context.generation || this._isDirty) {\n context.gl.uniform1f(this.location, this._x)\n this._isDirty = false\n }\n }\n }\n\n class UniformInt extends Uniform {\n private _x = 0\n\n set(x: number) {\n if (x != this._x) {\n this._x = x\n this._isDirty = true\n }\n }\n\n prepare() {\n let context = Context.from(this._material.context)\n if (this._generation != context.generation || this._isDirty) {\n context.gl.uniform1i(this.location, this._x)\n this._isDirty = false\n }\n }\n }\n\n class UniformVec2 extends Uniform {\n private _x = 0.0\n private _y = 0.0\n\n set(x: number, y: number) {\n if (x != this._x || y != this._y) {\n this._x = x\n this._y = y\n this._isDirty = true\n }\n }\n\n prepare() {\n let context = Context.from(this._material.context)\n if (this._generation != context.generation || this._isDirty) {\n context.gl.uniform2f(this.location, this._x, this._y)\n this._isDirty = false\n }\n }\n }\n\n class UniformVec3 extends Uniform {\n private _x = 0.0\n private _y = 0.0\n private _z = 0.0\n\n set(x: number, y: number, z: number) {\n if (x != this._x || y != this._y || z != this._z) {\n this._x = x\n this._y = y\n this._z = z\n this._isDirty = true\n }\n }\n\n prepare() {\n let context = Context.from(this._material.context)\n if (this._generation != context.generation || this._isDirty) {\n context.gl.uniform3f(this.location, this._x, this._y, this._z)\n this._isDirty = false\n }\n }\n }\n\n class UniformVec4 extends Uniform {\n private _x = 0.0\n private _y = 0.0\n private _z = 0.0\n private _w = 0.0\n\n set(x: number, y: number, z: number, w: number) {\n if (x != this._x || y != this._y || z != this._z || w != this._w) {\n this._x = x\n this._y = y\n this._z = z\n this._w = w\n this._isDirty = true\n }\n }\n\n prepare() {\n let context = Context.from(this._material.context)\n if (this._generation != context.generation || this._isDirty) {\n context.gl.uniform4f(this.location, this._x, this._y, this._z, this._w)\n this._isDirty = false\n }\n }\n }\n\n class UniformMat3 extends Uniform {\n private _values = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]\n\n set(\n m00: number,\n m01: number,\n m02: number,\n m10: number,\n m11: number,\n m12: number,\n m20: number,\n m21: number,\n m22: number,\n ) {\n // These values are deliberately transposed because WebGL requires the \"transpose\" argument of uniformMatrix() to be false\n UniformMat3._cachedValues[0] = m00\n UniformMat3._cachedValues[1] = m10\n UniformMat3._cachedValues[2] = m20\n UniformMat3._cachedValues[3] = m01\n UniformMat3._cachedValues[4] = m11\n UniformMat3._cachedValues[5] = m21\n UniformMat3._cachedValues[6] = m02\n UniformMat3._cachedValues[7] = m12\n UniformMat3._cachedValues[8] = m22\n\n for (let i = 0; i < 9; i++) {\n if (UniformMat3._cachedValues[i] != this._values[i]) {\n let swap = this._values\n this._values = UniformMat3._cachedValues\n UniformMat3._cachedValues = swap\n this._isDirty = true\n break\n }\n }\n }\n\n prepare() {\n let context = Context.from(this._material.context)\n if (this._generation != context.generation || this._isDirty) {\n context.gl.uniformMatrix3fv(this.location, false, this._values)\n this._isDirty = false\n }\n }\n\n // Statically allocate this to avoid allocations\n static _cachedValues = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]\n }\n\n class UniformSampler extends Uniform {\n private _texture: Texture | null = null\n private _index = -1\n\n set(texture: Graphics.Texture, index: number) {\n if (this._texture != texture || this._index != index) {\n this._texture = Texture.from(texture)\n this._index = index\n this._isDirty = true\n }\n }\n\n prepare() {\n let context = Context.from(this._material.context)\n let gl = context.gl\n assert(\n this._texture == null ||\n context.currentRenderTarget == null ||\n this._texture != context.currentRenderTarget.texture,\n )\n if (this._generation != context.generation || this._isDirty) {\n gl.uniform1i(this.location, this._index)\n this._isDirty = false\n }\n gl.activeTexture(TEXTURE_N(gl, this._index))\n gl.bindTexture(\n gl.TEXTURE_2D,\n this._texture != null && this._texture.width > 0 && this._texture.height > 0\n ? this._texture.texture\n : null,\n )\n }\n }\n\n class Material implements Graphics.Material {\n constructor(\n private readonly _context: Context,\n private readonly _format: Graphics.VertexFormat,\n private readonly _vertexSource: string,\n private readonly _fragmentSource: string,\n private readonly _uniformsMap: {[key: string]: Uniform} = {},\n private readonly _uniformsList: Uniform[] = [],\n private _generation = 0,\n private _program: WebGLProgram | null = null,\n ) {}\n\n get context() {\n return this._context\n }\n get format() {\n return this._format\n }\n get vertexSource() {\n return this._vertexSource\n }\n get fragmentSource() {\n return this._fragmentSource\n }\n\n setUniformFloat(name: string, x: number) {\n let uniform = this._uniformsMap[name] || null\n if (uniform == null) {\n uniform = new UniformFloat(this, name)\n this._uniformsMap[name] = uniform\n this._uniformsList.push(uniform)\n }\n assert(uniform instanceof UniformFloat)\n ;(uniform as UniformFloat).set(x)\n }\n\n setUniformInt(name: string, x: number) {\n let uniform = this._uniformsMap[name] || null\n if (uniform == null) {\n uniform = new UniformInt(this, name)\n this._uniformsMap[name] = uniform\n this._uniformsList.push(uniform)\n }\n assert(uniform instanceof UniformInt)\n ;(uniform as UniformInt).set(x)\n }\n\n setUniformVec2(name: string, x: number, y: number) {\n let uniform = this._uniformsMap[name] || null\n if (uniform == null) {\n uniform = new UniformVec2(this, name)\n this._uniformsMap[name] = uniform\n this._uniformsList.push(uniform)\n }\n assert(uniform instanceof UniformVec2)\n ;(uniform as UniformVec2).set(x, y)\n }\n\n setUniformVec3(name: string, x: number, y: number, z: number) {\n let uniform = this._uniformsMap[name] || null\n if (uniform == null) {\n uniform = new UniformVec3(this, name)\n this._uniformsMap[name] = uniform\n this._uniformsList.push(uniform)\n }\n assert(uniform instanceof UniformVec3)\n ;(uniform as UniformVec3).set(x, y, z)\n }\n\n setUniformVec4(name: string, x: number, y: number, z: number, w: number) {\n let uniform = this._uniformsMap[name] || null\n if (uniform == null) {\n uniform = new UniformVec4(this, name)\n this._uniformsMap[name] = uniform\n this._uniformsList.push(uniform)\n }\n assert(uniform instanceof UniformVec4)\n ;(uniform as UniformVec4).set(x, y, z, w)\n }\n\n setUniformMat3(\n name: string,\n m00: number,\n m01: number,\n m02: number,\n m10: number,\n m11: number,\n m12: number,\n m20: number,\n m21: number,\n m22: number,\n ) {\n let uniform = this._uniformsMap[name] || null\n if (uniform == null) {\n uniform = new UniformMat3(this, name)\n this._uniformsMap[name] = uniform\n this._uniformsList.push(uniform)\n }\n assert(uniform instanceof UniformMat3)\n ;(uniform as UniformMat3).set(m00, m01, m02, m10, m11, m12, m20, m21, m22)\n }\n\n setUniformSampler(name: string, texture: Graphics.Texture, index: number) {\n let uniform = this._uniformsMap[name] || null\n if (uniform == null) {\n uniform = new UniformSampler(this, name)\n this._uniformsMap[name] = uniform\n this._uniformsList.push(uniform)\n }\n assert(uniform instanceof UniformSampler)\n ;(uniform as UniformSampler).set(texture, index)\n }\n\n get program(): WebGLProgram {\n let gl = this._context.gl\n if (this._generation != this._context.generation) {\n this._program = gl.createProgram()!\n this._compileShader(gl, gl.VERTEX_SHADER, this.vertexSource)\n this._compileShader(gl, gl.FRAGMENT_SHADER, this.fragmentSource)\n let attributes = this.format.attributes\n for (let i = 0; i < attributes.length; i++) {\n gl.bindAttribLocation(this._program, i, attributes[i].name)\n }\n gl.linkProgram(this._program)\n if (!gl.getProgramParameter(this._program, gl.LINK_STATUS)) {\n throw new Error(`${gl.getProgramInfoLog(this._program)}`)\n }\n this._generation = this._context.generation\n\n // Validate this shader against the format\n if (!RELEASE) {\n for (let attribute of attributes) {\n for (\n let i = 0, ii = gl.getProgramParameter(this.program, gl.ACTIVE_ATTRIBUTES);\n i < ii;\n i++\n ) {\n let info = gl.getActiveAttrib(this.program, i)\n if (info && info.name == attribute.name) {\n assert(info.size == 1)\n switch (attribute.count) {\n case 1: {\n assert(info.type == gl.FLOAT)\n break\n }\n case 2: {\n assert(info.type == gl.FLOAT_VEC2)\n break\n }\n case 3: {\n assert(info.type == gl.FLOAT_VEC3)\n break\n }\n case 4: {\n assert(info.type == gl.FLOAT_VEC4)\n break\n }\n default: {\n assert(false)\n }\n }\n }\n }\n }\n }\n }\n return this._program!\n }\n\n prepare(): void {\n this._context.gl.useProgram(this.program)\n for (let uniform of this._uniformsList) {\n uniform.prepare()\n }\n }\n\n _compileShader(gl: WebGLRenderingContext, type: GLenum, source: string) {\n let shader = gl.createShader(type)\n if (!shader) {\n throw new Error('Failed to create shader')\n }\n gl.shaderSource(shader, source)\n gl.compileShader(shader)\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n throw new Error(`${gl.getShaderInfoLog(shader)}`)\n }\n if (!this._program) {\n throw new Error('Tried to attach shader before program was created')\n }\n gl.attachShader(this._program, shader)\n }\n\n static from(material: Graphics.Material): Material {\n assert(material == null || material instanceof Material)\n return material as Material\n }\n }\n\n class VertexBuffer extends Graphics.VertexBuffer {\n private readonly _context: Context\n private _generation = 0\n private _buffer: WebGLBuffer | null = null\n private _bytes: Uint8Array | null = null\n private _isDirty = true\n private _dirtyMin = VertexBuffer.INT_MAX\n private _dirtyMax = 0\n private _totalMin = VertexBuffer.INT_MAX\n private _totalMax = 0\n private _byteCount = 0\n\n constructor(context: Context, byteCount: number) {\n super()\n this._context = context\n this._byteCount = byteCount\n this._bytes = new Uint8Array(byteCount)\n }\n\n get context() {\n return this._context\n }\n get byteCount() {\n return this._byteCount\n }\n\n move(sourceByteOffset: number, targetByteOffset: number, byteCount: number) {\n assert(byteCount >= 0)\n assert(0 <= sourceByteOffset && sourceByteOffset + byteCount <= this._byteCount)\n assert(0 <= targetByteOffset && targetByteOffset + byteCount <= this._byteCount)\n\n if (this._bytes && sourceByteOffset != targetByteOffset && byteCount != 0) {\n this._bytes.set(this._bytes.subarray(sourceByteOffset, this._byteCount), targetByteOffset)\n this._growDirtyRegion(\n Math.min(sourceByteOffset, targetByteOffset),\n Math.max(sourceByteOffset, targetByteOffset) + byteCount,\n )\n }\n }\n\n upload(bytes: Uint8Array, byteOffset: number = 0) {\n assert(0 <= byteOffset && byteOffset + bytes.length <= this._byteCount)\n assert(this._bytes != null)\n this._bytes!.set(bytes, byteOffset)\n this._growDirtyRegion(byteOffset, byteOffset + bytes.length)\n }\n\n free() {\n if (this._buffer) {\n this._context.gl.deleteBuffer(this._buffer)\n }\n\n // Reset the generation to force this to be re-uploaded if it's used again\n // in the future.\n this._generation = 0\n }\n\n prepare(): void {\n let gl = this._context.gl\n\n if (this._generation !== this._context.generation) {\n this._buffer = gl.createBuffer()\n this._generation = this._context.generation\n this._isDirty = true\n }\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this._buffer)\n\n if (this._isDirty) {\n gl.bufferData(gl.ARRAY_BUFFER, this._byteCount, gl.DYNAMIC_DRAW)\n this._dirtyMin = this._totalMin\n this._dirtyMax = this._totalMax\n this._isDirty = false\n }\n\n if (this._dirtyMin < this._dirtyMax) {\n gl.bufferSubData(\n gl.ARRAY_BUFFER,\n this._dirtyMin,\n this._bytes!.subarray(this._dirtyMin, this._dirtyMax),\n )\n this._dirtyMin = VertexBuffer.INT_MAX\n this._dirtyMax = 0\n }\n }\n\n _growDirtyRegion(min: number, max: number) {\n this._dirtyMin = Math.min(this._dirtyMin, min)\n this._dirtyMax = Math.max(this._dirtyMax, max)\n this._totalMin = Math.min(this._totalMin, min)\n this._totalMax = Math.max(this._totalMax, max)\n }\n\n static INT_MAX = 0x7fffffff\n\n static from(buffer: Graphics.VertexBuffer): VertexBuffer {\n assert(buffer == null || buffer instanceof VertexBuffer)\n return buffer as VertexBuffer\n }\n }\n\n class Texture implements Graphics.Texture {\n constructor(\n private readonly _context: Context,\n private _format: Graphics.TextureFormat,\n private _width: number,\n private _height: number,\n private _pixels: Uint8Array | null = null,\n private _texture: WebGLTexture | null = null,\n private _generation = 0,\n private _isFormatDirty = true,\n private _isContentDirty = true,\n ) {}\n\n get context() {\n return this._context\n }\n get format() {\n return this._format\n }\n get width() {\n return this._width\n }\n get height() {\n return this._height\n }\n\n resize(width: number, height: number, pixels: Uint8Array | null = null) {\n this._width = width\n this._height = height\n this._pixels = pixels\n this._isContentDirty = true\n }\n\n setFormat(format: Graphics.TextureFormat) {\n if (this._format != format) {\n this._format = format\n this._isFormatDirty = true\n }\n }\n\n get texture(): WebGLTexture {\n let gl = this._context.gl\n\n // Create\n if (this._generation != this._context.generation) {\n this._texture = gl.createTexture()\n this._generation = this._context.generation\n this._isFormatDirty = true\n this._isContentDirty = true\n }\n\n // Format\n if (this._isFormatDirty) {\n gl.bindTexture(gl.TEXTURE_2D, this._texture)\n gl.texParameteri(\n gl.TEXTURE_2D,\n gl.TEXTURE_MAG_FILTER,\n this.format.magFilter == Graphics.PixelFilter.NEAREST ? gl.NEAREST : gl.LINEAR,\n )\n gl.texParameteri(\n gl.TEXTURE_2D,\n gl.TEXTURE_MIN_FILTER,\n this.format.minFilter == Graphics.PixelFilter.NEAREST ? gl.NEAREST : gl.LINEAR,\n )\n gl.texParameteri(\n gl.TEXTURE_2D,\n gl.TEXTURE_WRAP_S,\n this.format.wrap == Graphics.PixelWrap.REPEAT ? gl.REPEAT : gl.CLAMP_TO_EDGE,\n )\n gl.texParameteri(\n gl.TEXTURE_2D,\n gl.TEXTURE_WRAP_T,\n this.format.wrap == Graphics.PixelWrap.REPEAT ? gl.REPEAT : gl.CLAMP_TO_EDGE,\n )\n this._isFormatDirty = false\n }\n\n if (this._isContentDirty) {\n gl.bindTexture(gl.TEXTURE_2D, this._texture)\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n this._width,\n this._height,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n this._pixels,\n )\n this._isContentDirty = false\n }\n\n return this._texture!\n }\n\n free() {\n if (this.texture) {\n this._context.gl.deleteTexture(this.texture)\n this._generation = 0\n }\n }\n\n static from(texture: Graphics.Texture): Texture {\n assert(texture == null || texture instanceof Texture)\n return texture as Texture\n }\n }\n\n class RenderTarget implements Graphics.RenderTarget {\n constructor(\n private _context: Context,\n private _texture: Texture,\n private _framebuffer: WebGLFramebuffer | null = null,\n private _generation = 0,\n private _isDirty = true,\n private _viewport = new Graphics.Rect(),\n ) {}\n\n get context() {\n return this._context\n }\n get texture() {\n return this._texture\n }\n get viewport() {\n return this._viewport\n }\n setColor(texture: Graphics.Texture) {\n if (this._texture != texture) {\n this._texture = Texture.from(texture)\n this._isDirty = true\n }\n }\n\n get framebuffer(): WebGLFramebuffer {\n let gl = this._context.gl\n let texture = this._texture.texture\n\n // Create\n if (this._generation != this._context.generation) {\n this._framebuffer = gl.createFramebuffer()\n this._generation = this._context.generation\n this._isDirty = true\n }\n\n // Update\n if (this._isDirty) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, this._framebuffer)\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0)\n assert(gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE)\n this._isDirty = false\n }\n\n return this._framebuffer!\n }\n\n free() {\n if (this._framebuffer) {\n this._context.gl.deleteFramebuffer(this._framebuffer)\n this._generation = 0\n }\n }\n\n static from(renderTarget: Graphics.RenderTarget | null): RenderTarget | null {\n assert(renderTarget == null || renderTarget instanceof RenderTarget)\n return renderTarget as RenderTarget | null\n }\n }\n}\n", "import {Graphics} from './graphics'\nimport {AffineTransform, Vec2} from '../lib/math'\n\nexport function setUniformAffineTransform(\n material: Graphics.Material,\n name: string,\n transform: AffineTransform,\n) {\n let {m00, m01, m02, m10, m11, m12} = transform\n material.setUniformMat3(name, m00, m01, m02, m10, m11, m12, 0, 0, 1)\n}\nexport function setUniformVec2(material: Graphics.Material, name: string, vec: Vec2) {\n material.setUniformVec2(name, vec.x, vec.y)\n}\n\nexport function renderInto(gl: Graphics.Context, target: Graphics.RenderTarget, cb: () => void) {\n gl.setRenderTarget(target)\n gl.setViewport(0, 0, target.texture.width, target.texture.height)\n cb()\n gl.setRenderTarget(null)\n}\n", "import {Rect, Vec2, AffineTransform} from '../lib/math'\nimport {Color} from '../lib/color'\nimport {Graphics} from './graphics'\nimport {setUniformAffineTransform} from './utils'\n\nconst vertexFormat = new Graphics.VertexFormat()\nvertexFormat.add('configSpacePos', Graphics.AttributeType.FLOAT, 2)\nvertexFormat.add('color', Graphics.AttributeType.FLOAT, 3)\n\nconst vert = `\n uniform mat3 configSpaceToNDC;\n\n attribute vec2 configSpacePos;\n attribute vec3 color;\n varying vec3 vColor;\n\n void main() {\n vColor = color;\n vec2 position = (configSpaceToNDC * vec3(configSpacePos, 1)).xy;\n gl_Position = vec4(position, 1, 1);\n }\n`\n\nconst frag = `\n precision mediump float;\n varying vec3 vColor;\n\n void main() {\n gl_FragColor = vec4(vColor.rgb, 1);\n }\n`\n\nexport class RectangleBatch {\n private rects: Rect[] = []\n private colors: Color[] = []\n constructor(private gl: Graphics.Context) {}\n\n getRectCount() {\n return this.rects.length\n }\n\n private buffer: Graphics.VertexBuffer | null = null\n getBuffer(): Graphics.VertexBuffer {\n if (this.buffer) {\n return this.buffer\n }\n\n const corners = [\n [0, 0],\n [1, 0],\n [0, 1],\n [1, 0],\n [0, 1],\n [1, 1],\n ]\n\n const bytes = new Uint8Array(vertexFormat.stride * corners.length * this.rects.length)\n const floats = new Float32Array(bytes.buffer)\n let idx = 0\n\n for (let i = 0; i < this.rects.length; i++) {\n const rect = this.rects[i]\n const color = this.colors[i]\n\n // TODO(jlfwong): In the conversion from regl to graphics.ts, I lost the\n // ability to do instanced drawing. This is a pretty significant hit to\n // the performance here since I need 6x the memory to allocate these\n // things. Adding instanced drawing to graphics.ts is non-trivial, so I'm\n // just going to try this for now.\n for (let corner of corners) {\n floats[idx++] = rect.origin.x + corner[0] * rect.size.x\n floats[idx++] = rect.origin.y + corner[1] * rect.size.y\n\n floats[idx++] = color.r\n floats[idx++] = color.g\n floats[idx++] = color.b\n }\n }\n\n if (idx !== floats.length) {\n throw new Error(\"Buffer expected to be full but wasn't\")\n }\n\n this.buffer = this.gl.createVertexBuffer(bytes.length)\n this.buffer.upload(bytes)\n return this.buffer\n }\n\n addRect(rect: Rect, color: Color) {\n this.rects.push(rect)\n this.colors.push(color)\n\n if (this.buffer) {\n this.buffer.free()\n this.buffer = null\n }\n }\n\n free() {\n if (this.buffer) {\n this.buffer.free()\n this.buffer = null\n }\n }\n}\n\nexport interface RectangleBatchRendererProps {\n batch: RectangleBatch\n configSpaceSrcRect: Rect\n physicalSpaceDstRect: Rect\n}\n\nexport class RectangleBatchRenderer {\n material: Graphics.Material\n constructor(private gl: Graphics.Context) {\n this.material = gl.createMaterial(vertexFormat, vert, frag)\n }\n\n render(props: RectangleBatchRendererProps) {\n setUniformAffineTransform(\n this.material,\n 'configSpaceToNDC',\n (() => {\n const configToPhysical = AffineTransform.betweenRects(\n props.configSpaceSrcRect,\n props.physicalSpaceDstRect,\n )\n\n const viewportSize = new Vec2(this.gl.viewport.width, this.gl.viewport.height)\n\n const physicalToNDC = AffineTransform.withTranslation(new Vec2(-1, 1)).times(\n AffineTransform.withScale(new Vec2(2, -2).dividedByPointwise(viewportSize)),\n )\n\n return physicalToNDC.times(configToPhysical)\n })(),\n )\n\n this.gl.setUnpremultipliedBlendState()\n this.gl.draw(Graphics.Primitive.TRIANGLES, this.material, props.batch.getBuffer())\n }\n}\n", "import {clamp} from './math'\n\nexport class Color {\n constructor(\n readonly r: number = 0,\n readonly g: number = 0,\n readonly b: number = 0,\n readonly a: number = 1,\n ) {}\n\n static fromLumaChromaHue(L: number, C: number, H: number) {\n // 0 <= L <= 1\n // 0 <= C <= 1\n // 0 <= H <= 360\n // https://en.wikipedia.org/wiki/HSL_and_HSV#From_luma/chroma/hue\n\n const hPrime = H / 60\n const X = C * (1 - Math.abs((hPrime % 2) - 1))\n const [R1, G1, B1] =\n hPrime < 1\n ? [C, X, 0]\n : hPrime < 2\n ? [X, C, 0]\n : hPrime < 3\n ? [0, C, X]\n : hPrime < 4\n ? [0, X, C]\n : hPrime < 5\n ? [X, 0, C]\n : [C, 0, X]\n\n const m = L - (0.3 * R1 + 0.59 * G1 + 0.11 * B1)\n\n return new Color(clamp(R1 + m, 0, 1), clamp(G1 + m, 0, 1), clamp(B1 + m, 0, 1), 1.0)\n }\n\n static fromCSSHex(hex: string) {\n if (hex.length !== 7 || hex[0] !== '#') {\n throw new Error(`Invalid color input ${hex}`)\n }\n const r = parseInt(hex.substr(1, 2), 16) / 255\n const g = parseInt(hex.substr(3, 2), 16) / 255\n const b = parseInt(hex.substr(5, 2), 16) / 255\n if (r < 0 || r > 1 || g < 0 || g > 1 || b < 0 || b > 1) {\n throw new Error(`Invalid color input ${hex}`)\n }\n return new Color(r, g, b)\n }\n\n withAlpha(a: number): Color {\n return new Color(this.r, this.g, this.b, a)\n }\n\n toCSS(): string {\n return `rgba(${(255 * this.r).toFixed()}, ${(255 * this.g).toFixed()}, ${(\n 255 * this.b\n ).toFixed()}, ${this.a.toFixed(2)})`\n }\n}\n", "import {LRUCache} from '../lib/lru-cache'\nimport {RectangleBatch, RectangleBatchRenderer} from './rectangle-batch-renderer'\nimport {Rect, Vec2} from '../lib/math'\nimport {Color} from '../lib/color'\nimport {Graphics} from './graphics'\nimport {TextureRenderer} from './texture-renderer'\nimport {renderInto} from './utils'\n\nexport class RowAtlas {\n private texture: Graphics.Texture\n private renderTarget: Graphics.RenderTarget\n private rowCache: LRUCache\n private clearLineBatch: RectangleBatch\n\n constructor(\n private gl: Graphics.Context,\n private rectangleBatchRenderer: RectangleBatchRenderer,\n private textureRenderer: TextureRenderer,\n ) {\n this.texture = gl.createTexture(Graphics.TextureFormat.NEAREST_CLAMP, 4096, 4096)\n this.renderTarget = gl.createRenderTarget(this.texture)\n this.rowCache = new LRUCache(this.texture.height)\n this.clearLineBatch = new RectangleBatch(gl)\n this.clearLineBatch.addRect(Rect.unit, new Color(0, 0, 0, 0))\n\n // All of the cached data is stored GPU-side, and we don't retain a copy of\n // it client-side. This means when we get a context loss event, the data is\n // totally gone. So let's clear our CPU-side cache to reflect that fact.\n gl.addContextResetHandler(() => {\n this.rowCache.clear()\n })\n }\n\n has(key: K) {\n return this.rowCache.has(key)\n }\n getResolution() {\n return this.texture.width\n }\n getCapacity() {\n return this.texture.height\n }\n\n private allocateLine(key: K): number {\n if (this.rowCache.getSize() < this.rowCache.getCapacity()) {\n // Not in cache, but cache isn't full\n const row = this.rowCache.getSize()\n this.rowCache.insert(key, row)\n return row\n } else {\n // Not in cache, and cache is full. Evict something.\n const [, row] = this.rowCache.removeLRU()!\n this.rowCache.insert(key, row)\n return row\n }\n }\n\n writeToAtlasIfNeeded(keys: K[], render: (textureDstRect: Rect, key: K) => void) {\n renderInto(this.gl, this.renderTarget, () => {\n for (let key of keys) {\n let row = this.rowCache.get(key)\n if (row != null) {\n // Already cached!\n continue\n }\n // Not cached -- we'll have to actually render\n row = this.allocateLine(key)\n\n const textureRect = new Rect(new Vec2(0, row), new Vec2(this.texture.width, 1))\n this.rectangleBatchRenderer.render({\n batch: this.clearLineBatch,\n configSpaceSrcRect: Rect.unit,\n physicalSpaceDstRect: textureRect,\n })\n render(textureRect, key)\n }\n })\n }\n\n renderViaAtlas(key: K, dstRect: Rect): boolean {\n let row = this.rowCache.get(key)\n if (row == null) {\n return false\n }\n\n const textureRect = new Rect(new Vec2(0, row), new Vec2(this.texture.width, 1))\n\n // At this point, we have the row in cache, and we can\n // paint directly from it into the framebuffer.\n this.textureRenderer.render({\n texture: this.texture,\n srcRect: textureRect,\n dstRect: dstRect,\n })\n return true\n }\n}\n", "import {Vec2, Rect, AffineTransform} from '../lib/math'\nimport {Graphics} from './graphics'\nimport {setUniformAffineTransform} from './utils'\n\nexport interface TextureRendererProps {\n texture: Graphics.Texture\n srcRect: Rect\n dstRect: Rect\n}\n\nconst vert = `\n uniform mat3 uvTransform;\n uniform mat3 positionTransform;\n\n attribute vec2 position;\n attribute vec2 uv;\n varying vec2 vUv;\n\n void main() {\n vUv = (uvTransform * vec3(uv, 1)).xy;\n gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1);\n }\n`\n\nconst frag = `\n precision mediump float;\n\n varying vec2 vUv;\n uniform sampler2D texture;\n\n void main() {\n gl_FragColor = texture2D(texture, vUv);\n }\n`\n\nexport interface TextureRendererProps {\n texture: Graphics.Texture\n srcRect: Rect\n dstRect: Rect\n}\n\nexport class TextureRenderer {\n private buffer: Graphics.VertexBuffer\n private material: Graphics.Material\n\n constructor(private gl: Graphics.Context) {\n const vertexFormat = new Graphics.VertexFormat()\n vertexFormat.add('position', Graphics.AttributeType.FLOAT, 2)\n vertexFormat.add('uv', Graphics.AttributeType.FLOAT, 2)\n\n const vertices = [\n {pos: [-1, 1], uv: [0, 1]},\n {pos: [1, 1], uv: [1, 1]},\n {pos: [-1, -1], uv: [0, 0]},\n {pos: [1, -1], uv: [1, 0]},\n ]\n const floats: number[] = []\n for (let v of vertices) {\n floats.push(v.pos[0])\n floats.push(v.pos[1])\n floats.push(v.uv[0])\n floats.push(v.uv[1])\n }\n\n this.buffer = gl.createVertexBuffer(vertexFormat.stride * vertices.length)\n this.buffer.upload(new Uint8Array(new Float32Array(floats).buffer))\n this.material = gl.createMaterial(vertexFormat, vert, frag)\n }\n\n render(props: TextureRendererProps) {\n this.material.setUniformSampler('texture', props.texture, 0)\n setUniformAffineTransform(\n this.material,\n 'uvTransform',\n (() => {\n const {srcRect, texture} = props\n const physicalToUV = AffineTransform.withTranslation(new Vec2(0, 1))\n .times(AffineTransform.withScale(new Vec2(1, -1)))\n .times(\n AffineTransform.betweenRects(\n new Rect(Vec2.zero, new Vec2(texture.width, texture.height)),\n Rect.unit,\n ),\n )\n const uvRect = physicalToUV.transformRect(srcRect)\n return AffineTransform.betweenRects(Rect.unit, uvRect)\n })(),\n )\n setUniformAffineTransform(\n this.material,\n 'positionTransform',\n (() => {\n const {dstRect} = props\n\n const {viewport} = this.gl\n const viewportSize = new Vec2(viewport.width, viewport.height)\n\n const physicalToNDC = AffineTransform.withScale(new Vec2(1, -1)).times(\n AffineTransform.betweenRects(new Rect(Vec2.zero, viewportSize), Rect.NDC),\n )\n const ndcRect = physicalToNDC.transformRect(dstRect)\n return AffineTransform.betweenRects(Rect.NDC, ndcRect)\n })(),\n )\n\n this.gl.setUnpremultipliedBlendState()\n this.gl.draw(Graphics.Primitive.TRIANGLE_STRIP, this.material, this.buffer)\n }\n}\n", "import {Color} from '../lib/color'\nimport {AffineTransform, Rect} from '../lib/math'\nimport {Theme} from '../views/themes/theme'\nimport {Graphics} from './graphics'\nimport {setUniformAffineTransform, setUniformVec2} from './utils'\n\nexport interface ViewportRectangleRendererProps {\n configSpaceToPhysicalViewSpace: AffineTransform\n configSpaceViewportRect: Rect\n}\n\nconst vertexFormat = new Graphics.VertexFormat()\nvertexFormat.add('position', Graphics.AttributeType.FLOAT, 2)\n\nconst vert = `\n attribute vec2 position;\n\n void main() {\n gl_Position = vec4(position, 0, 1);\n }\n`\n\nconst frag = (theme: Theme) => {\n const {r, g, b} = Color.fromCSSHex(theme.fgSecondaryColor)\n const rgb = `${r.toFixed(1)}, ${g.toFixed(1)}, ${b.toFixed(1)}`\n return `\n precision mediump float;\n\n uniform mat3 configSpaceToPhysicalViewSpace;\n uniform vec2 physicalSize;\n uniform vec2 physicalOrigin;\n uniform vec2 configSpaceViewportOrigin;\n uniform vec2 configSpaceViewportSize;\n uniform float framebufferHeight;\n\n void main() {\n vec2 origin = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportOrigin, 1.0)).xy;\n vec2 size = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportSize, 0.0)).xy;\n\n vec2 halfSize = physicalSize / 2.0;\n\n float borderWidth = 2.0;\n\n origin = floor(origin * halfSize) / halfSize + borderWidth * vec2(1.0, 1.0);\n size = floor(size * halfSize) / halfSize - 2.0 * borderWidth * vec2(1.0, 1.0);\n\n vec2 coord = gl_FragCoord.xy;\n coord.x = coord.x - physicalOrigin.x;\n coord.y = framebufferHeight - coord.y - physicalOrigin.y;\n vec2 clamped = clamp(coord, origin, origin + size);\n vec2 gap = clamped - coord;\n float maxdist = max(abs(gap.x), abs(gap.y));\n\n // TOOD(jlfwong): Could probably optimize this to use mix somehow.\n if (maxdist == 0.0) {\n // Inside viewport rectangle\n gl_FragColor = vec4(0, 0, 0, 0);\n } else if (maxdist < borderWidth) {\n // Inside viewport rectangle at border\n gl_FragColor = vec4(${rgb}, 0.8);\n } else {\n // Outside viewport rectangle\n gl_FragColor = vec4(${rgb}, 0.5);\n }\n }\n `\n}\n\nexport class ViewportRectangleRenderer {\n private material: Graphics.Material\n private buffer: Graphics.VertexBuffer\n\n constructor(\n private gl: Graphics.Context,\n theme: Theme,\n ) {\n const vertices = [\n [-1, 1],\n [1, 1],\n [-1, -1],\n [1, -1],\n ]\n const floats: number[] = []\n for (let v of vertices) {\n floats.push(v[0])\n floats.push(v[1])\n }\n this.buffer = gl.createVertexBuffer(vertexFormat.stride * vertices.length)\n this.buffer.upload(new Uint8Array(new Float32Array(floats).buffer))\n this.material = gl.createMaterial(vertexFormat, vert, frag(theme))\n }\n\n render(props: ViewportRectangleRendererProps) {\n setUniformAffineTransform(\n this.material,\n 'configSpaceToPhysicalViewSpace',\n props.configSpaceToPhysicalViewSpace,\n )\n\n // TODO(jlfwong): Pack these into a Vec4 instead\n setUniformVec2(this.material, 'configSpaceViewportOrigin', props.configSpaceViewportRect.origin)\n setUniformVec2(this.material, 'configSpaceViewportSize', props.configSpaceViewportRect.size)\n // TODO(jlfwong): Pack these into a Vec4 instead\n\n const viewport = this.gl.viewport\n this.material.setUniformVec2('physicalOrigin', viewport.x, viewport.y)\n this.material.setUniformVec2('physicalSize', viewport.width, viewport.height)\n\n this.material.setUniformFloat('framebufferHeight', this.gl.renderTargetHeightInPixels)\n\n this.gl.setBlendState(\n Graphics.BlendOperation.SOURCE_ALPHA,\n Graphics.BlendOperation.INVERSE_SOURCE_ALPHA,\n )\n this.gl.draw(Graphics.Primitive.TRIANGLE_STRIP, this.material, this.buffer)\n }\n}\n", "import {Vec2, Rect, AffineTransform} from '../lib/math'\nimport {Theme} from '../views/themes/theme'\nimport {Graphics} from './graphics'\nimport {setUniformAffineTransform} from './utils'\n\nconst vertexFormat = new Graphics.VertexFormat()\nvertexFormat.add('position', Graphics.AttributeType.FLOAT, 2)\nvertexFormat.add('uv', Graphics.AttributeType.FLOAT, 2)\n\nconst vert = `\n uniform mat3 uvTransform;\n uniform mat3 positionTransform;\n\n attribute vec2 position;\n attribute vec2 uv;\n varying vec2 vUv;\n\n void main() {\n vUv = (uvTransform * vec3(uv, 1)).xy;\n gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1);\n }\n`\n\nconst frag = (colorForBucket: string) => `\n precision mediump float;\n\n uniform vec2 uvSpacePixelSize;\n uniform float renderOutlines;\n\n varying vec2 vUv;\n uniform sampler2D colorTexture;\n\n // https://en.wikipedia.org/wiki/HSL_and_HSV#From_luma/chroma/hue\n vec3 hcl2rgb(float H, float C, float L) {\n float hPrime = H / 60.0;\n float X = C * (1.0 - abs(mod(hPrime, 2.0) - 1.0));\n vec3 RGB =\n hPrime < 1.0 ? vec3(C, X, 0) :\n hPrime < 2.0 ? vec3(X, C, 0) :\n hPrime < 3.0 ? vec3(0, C, X) :\n hPrime < 4.0 ? vec3(0, X, C) :\n hPrime < 5.0 ? vec3(X, 0, C) :\n vec3(C, 0, X);\n\n float m = L - dot(RGB, vec3(0.30, 0.59, 0.11));\n return RGB + vec3(m, m, m);\n }\n\n float triangle(float x) {\n return 2.0 * abs(fract(x) - 0.5) - 1.0;\n }\n\n ${colorForBucket}\n\n void main() {\n vec4 here = texture2D(colorTexture, vUv);\n\n if (here.z == 0.0) {\n // Background color\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n\n // Sample the 4 surrounding pixels in the depth texture to determine\n // if we should draw a boundary here or not.\n vec4 N = texture2D(colorTexture, vUv + vec2(0, uvSpacePixelSize.y));\n vec4 E = texture2D(colorTexture, vUv + vec2(uvSpacePixelSize.x, 0));\n vec4 S = texture2D(colorTexture, vUv + vec2(0, -uvSpacePixelSize.y));\n vec4 W = texture2D(colorTexture, vUv + vec2(-uvSpacePixelSize.x, 0));\n\n // NOTE: For outline checks, we intentionally check both the right\n // and the left to determine if we're an edge. If a rectangle is a single\n // pixel wide, we don't want to render it as an outline, so this method\n // of checking ensures that we don't outline single physical-space\n // pixel width rectangles.\n if (\n renderOutlines > 0.0 &&\n (\n here.y == N.y && here.y != S.y || // Top edge\n here.y == S.y && here.y != N.y || // Bottom edge\n here.x == E.x && here.x != W.x || // Left edge\n here.x == W.x && here.x != E.x\n )\n ) {\n // We're on an edge! Draw transparent.\n gl_FragColor = vec4(0, 0, 0, 0);\n } else {\n // Not on an edge. Draw the appropriate color.\n gl_FragColor = vec4(colorForBucket(here.z), here.a);\n }\n }\n`\n\nexport interface FlamechartColorPassRenderProps {\n rectInfoTexture: Graphics.Texture\n renderOutlines: boolean\n srcRect: Rect\n dstRect: Rect\n}\n\nexport class FlamechartColorPassRenderer {\n private material: Graphics.Material\n private buffer: Graphics.VertexBuffer\n\n constructor(\n private gl: Graphics.Context,\n theme: Theme,\n ) {\n const vertices = [\n {pos: [-1, 1], uv: [0, 1]},\n {pos: [1, 1], uv: [1, 1]},\n {pos: [-1, -1], uv: [0, 0]},\n {pos: [1, -1], uv: [1, 0]},\n ]\n const floats: number[] = []\n for (let v of vertices) {\n floats.push(v.pos[0])\n floats.push(v.pos[1])\n floats.push(v.uv[0])\n floats.push(v.uv[1])\n }\n\n this.buffer = gl.createVertexBuffer(vertexFormat.stride * vertices.length)\n this.buffer.uploadFloats(floats)\n this.material = gl.createMaterial(vertexFormat, vert, frag(theme.colorForBucketGLSL))\n }\n\n render(props: FlamechartColorPassRenderProps) {\n const {srcRect, rectInfoTexture} = props\n const physicalToUV = AffineTransform.withTranslation(new Vec2(0, 1))\n .times(AffineTransform.withScale(new Vec2(1, -1)))\n .times(\n AffineTransform.betweenRects(\n new Rect(Vec2.zero, new Vec2(rectInfoTexture.width, rectInfoTexture.height)),\n Rect.unit,\n ),\n )\n const uvRect = physicalToUV.transformRect(srcRect)\n const uvTransform = AffineTransform.betweenRects(Rect.unit, uvRect)\n\n const {dstRect} = props\n const viewportSize = new Vec2(this.gl.viewport.width, this.gl.viewport.height)\n\n const physicalToNDC = AffineTransform.withScale(new Vec2(1, -1)).times(\n AffineTransform.betweenRects(new Rect(Vec2.zero, viewportSize), Rect.NDC),\n )\n const ndcRect = physicalToNDC.transformRect(dstRect)\n const positionTransform = AffineTransform.betweenRects(Rect.NDC, ndcRect)\n\n const uvSpacePixelSize = Vec2.unit.dividedByPointwise(\n new Vec2(props.rectInfoTexture.width, props.rectInfoTexture.height),\n )\n\n this.material.setUniformSampler('colorTexture', props.rectInfoTexture, 0)\n setUniformAffineTransform(this.material, 'uvTransform', uvTransform)\n this.material.setUniformFloat('renderOutlines', props.renderOutlines ? 1.0 : 0.0)\n this.material.setUniformVec2('uvSpacePixelSize', uvSpacePixelSize.x, uvSpacePixelSize.y)\n setUniformAffineTransform(this.material, 'positionTransform', positionTransform)\n\n this.gl.setUnpremultipliedBlendState()\n this.gl.draw(Graphics.Primitive.TRIANGLE_STRIP, this.material, this.buffer)\n }\n}\n", "import {Graphics, WebGL} from './graphics'\nimport {RectangleBatchRenderer} from './rectangle-batch-renderer'\nimport {TextureRenderer} from './texture-renderer'\nimport {Rect, Vec2} from '../lib/math'\nimport {ViewportRectangleRenderer} from './overlay-rectangle-renderer'\nimport {FlamechartColorPassRenderer} from './flamechart-color-pass-renderer'\nimport {Color} from '../lib/color'\nimport {Theme} from '../views/themes/theme'\n\ntype FrameCallback = () => void\n\nexport class CanvasContext {\n public readonly gl: WebGL.Context\n public readonly rectangleBatchRenderer: RectangleBatchRenderer\n public readonly textureRenderer: TextureRenderer\n public readonly viewportRectangleRenderer: ViewportRectangleRenderer\n public readonly flamechartColorPassRenderer: FlamechartColorPassRenderer\n public readonly theme: Theme\n\n constructor(canvas: HTMLCanvasElement, theme: Theme) {\n this.gl = new WebGL.Context(canvas)\n this.rectangleBatchRenderer = new RectangleBatchRenderer(this.gl)\n this.textureRenderer = new TextureRenderer(this.gl)\n this.viewportRectangleRenderer = new ViewportRectangleRenderer(this.gl, theme)\n this.flamechartColorPassRenderer = new FlamechartColorPassRenderer(this.gl, theme)\n this.theme = theme\n\n // Whenever the canvas is resized, draw immediately. This prevents\n // flickering during resizing.\n this.gl.addAfterResizeEventHandler(this.onBeforeFrame)\n\n const webGLInfo = this.gl.getWebGLInfo()\n if (webGLInfo) {\n console.log(\n `WebGL initialized. renderer: ${webGLInfo.renderer}, vendor: ${webGLInfo.vendor}, version: ${webGLInfo.version}`,\n )\n }\n ;(window as any)['testContextLoss'] = () => {\n this.gl.testContextLoss()\n }\n }\n\n private animationFrameRequest: number | null = null\n private beforeFrameHandlers = new Set()\n addBeforeFrameHandler(callback: FrameCallback) {\n this.beforeFrameHandlers.add(callback)\n }\n removeBeforeFrameHandler(callback: FrameCallback) {\n this.beforeFrameHandlers.delete(callback)\n }\n requestFrame() {\n if (!this.animationFrameRequest) {\n this.animationFrameRequest = requestAnimationFrame(this.onBeforeFrame)\n }\n }\n private onBeforeFrame = () => {\n this.animationFrameRequest = null\n this.gl.setViewport(0, 0, this.gl.renderTargetWidthInPixels, this.gl.renderTargetHeightInPixels)\n const color = Color.fromCSSHex(this.theme.bgPrimaryColor)\n this.gl.clear(new Graphics.Color(color.r, color.g, color.b, color.a))\n\n for (const handler of this.beforeFrameHandlers) {\n handler()\n }\n }\n\n setViewport(physicalBounds: Rect, cb: () => void): void {\n const {origin, size} = physicalBounds\n let viewportBefore = this.gl.viewport\n this.gl.setViewport(origin.x, origin.y, size.x, size.y)\n\n cb()\n\n let {x, y, width, height} = viewportBefore\n this.gl.setViewport(x, y, width, height)\n }\n\n renderBehind(el: Element, cb: () => void) {\n const bounds = el.getBoundingClientRect()\n const physicalBounds = new Rect(\n new Vec2(bounds.left * window.devicePixelRatio, bounds.top * window.devicePixelRatio),\n new Vec2(bounds.width * window.devicePixelRatio, bounds.height * window.devicePixelRatio),\n )\n\n this.setViewport(physicalBounds, cb)\n }\n}\n", "import { options } from 'preact';\n\n/** @type {number} */\nlet currentIndex;\n\n/** @type {import('./internal').Component} */\nlet currentComponent;\n\n/** @type {number} */\nlet currentHook = 0;\n\n/** @type {Array} */\nlet afterPaintEffects = [];\n\nlet oldBeforeRender = options._render;\nlet oldAfterDiff = options.diffed;\nlet oldCommit = options._commit;\nlet oldBeforeUnmount = options.unmount;\n\nconst RAF_TIMEOUT = 100;\nlet prevRaf;\n\noptions._render = vnode => {\n\tif (oldBeforeRender) oldBeforeRender(vnode);\n\n\tcurrentComponent = vnode._component;\n\tcurrentIndex = 0;\n\n\tif (currentComponent.__hooks) {\n\t\tcurrentComponent.__hooks._pendingEffects.forEach(invokeCleanup);\n\t\tcurrentComponent.__hooks._pendingEffects.forEach(invokeEffect);\n\t\tcurrentComponent.__hooks._pendingEffects = [];\n\t}\n};\n\noptions.diffed = vnode => {\n\tif (oldAfterDiff) oldAfterDiff(vnode);\n\n\tconst c = vnode._component;\n\tif (!c) return;\n\n\tconst hooks = c.__hooks;\n\tif (hooks) {\n\t\tif (hooks._pendingEffects.length) {\n\t\t\tafterPaint(afterPaintEffects.push(c));\n\t\t}\n\t}\n};\n\noptions._commit = (vnode, commitQueue) => {\n\tcommitQueue.some(component => {\n\t\ttry {\n\t\t\tcomponent._renderCallbacks.forEach(invokeCleanup);\n\t\t\tcomponent._renderCallbacks = component._renderCallbacks.filter(cb =>\n\t\t\t\tcb._value ? invokeEffect(cb) : true\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tcommitQueue.some(c => {\n\t\t\t\tif (c._renderCallbacks) c._renderCallbacks = [];\n\t\t\t});\n\t\t\tcommitQueue = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t});\n\n\tif (oldCommit) oldCommit(vnode, commitQueue);\n};\n\noptions.unmount = vnode => {\n\tif (oldBeforeUnmount) oldBeforeUnmount(vnode);\n\n\tconst c = vnode._component;\n\tif (!c) return;\n\n\tconst hooks = c.__hooks;\n\tif (hooks) {\n\t\ttry {\n\t\t\thooks._list.forEach(hook => hook._cleanup && hook._cleanup());\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t}\n};\n\n/**\n * Get a hook's state from the currentComponent\n * @param {number} index The index of the hook to get\n * @param {number} type The index of the hook to get\n * @returns {import('./internal').HookState}\n */\nfunction getHookState(index, type) {\n\tif (options._hook) {\n\t\toptions._hook(currentComponent, index, currentHook || type);\n\t}\n\tcurrentHook = 0;\n\n\t// Largely inspired by:\n\t// * https://github.com/michael-klein/funcy.js/blob/f6be73468e6ec46b0ff5aa3cc4c9baf72a29025a/src/hooks/core_hooks.mjs\n\t// * https://github.com/michael-klein/funcy.js/blob/650beaa58c43c33a74820a3c98b3c7079cf2e333/src/renderer.mjs\n\t// Other implementations to look at:\n\t// * https://codesandbox.io/s/mnox05qp8\n\tconst hooks =\n\t\tcurrentComponent.__hooks ||\n\t\t(currentComponent.__hooks = {\n\t\t\t_list: [],\n\t\t\t_pendingEffects: []\n\t\t});\n\n\tif (index >= hooks._list.length) {\n\t\thooks._list.push({});\n\t}\n\treturn hooks._list[index];\n}\n\n/**\n * @param {import('./index').StateUpdater} initialState\n */\nexport function useState(initialState) {\n\tcurrentHook = 1;\n\treturn useReducer(invokeOrReturn, initialState);\n}\n\n/**\n * @param {import('./index').Reducer} reducer\n * @param {import('./index').StateUpdater} initialState\n * @param {(initialState: any) => void} [init]\n * @returns {[ any, (state: any) => void ]}\n */\nexport function useReducer(reducer, initialState, init) {\n\t/** @type {import('./internal').ReducerHookState} */\n\tconst hookState = getHookState(currentIndex++, 2);\n\tif (!hookState._component) {\n\t\thookState._component = currentComponent;\n\n\t\thookState._value = [\n\t\t\t!init ? invokeOrReturn(undefined, initialState) : init(initialState),\n\n\t\t\taction => {\n\t\t\t\tconst nextValue = reducer(hookState._value[0], action);\n\t\t\t\tif (hookState._value[0] !== nextValue) {\n\t\t\t\t\thookState._value[0] = nextValue;\n\t\t\t\t\thookState._component.setState({});\n\t\t\t\t}\n\t\t\t}\n\t\t];\n\t}\n\n\treturn hookState._value;\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 3);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._args = args;\n\n\t\tcurrentComponent.__hooks._pendingEffects.push(state);\n\t}\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useLayoutEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 4);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._args = args;\n\n\t\tcurrentComponent._renderCallbacks.push(state);\n\t}\n}\n\nexport function useRef(initialValue) {\n\tcurrentHook = 5;\n\treturn useMemo(() => ({ current: initialValue }), []);\n}\n\n/**\n * @param {object} ref\n * @param {() => object} createHandle\n * @param {any[]} args\n */\nexport function useImperativeHandle(ref, createHandle, args) {\n\tcurrentHook = 6;\n\tuseLayoutEffect(\n\t\t() => {\n\t\t\tif (typeof ref == 'function') ref(createHandle());\n\t\t\telse if (ref) ref.current = createHandle();\n\t\t},\n\t\targs == null ? args : args.concat(ref)\n\t);\n}\n\n/**\n * @param {() => any} factory\n * @param {any[]} args\n */\nexport function useMemo(factory, args) {\n\t/** @type {import('./internal').MemoHookState} */\n\tconst state = getHookState(currentIndex++, 7);\n\tif (argsChanged(state._args, args)) {\n\t\tstate._args = args;\n\t\tstate._factory = factory;\n\t\treturn (state._value = factory());\n\t}\n\n\treturn state._value;\n}\n\n/**\n * @param {() => void} callback\n * @param {any[]} args\n */\nexport function useCallback(callback, args) {\n\tcurrentHook = 8;\n\treturn useMemo(() => callback, args);\n}\n\n/**\n * @param {import('./internal').PreactContext} context\n */\nexport function useContext(context) {\n\tconst provider = currentComponent.context[context._id];\n\t// We could skip this call here, but than we'd not call\n\t// `options._hook`. We need to do that in order to make\n\t// the devtools aware of this hook.\n\tconst state = getHookState(currentIndex++, 9);\n\t// The devtools needs access to the context object to\n\t// be able to pull of the default value when no provider\n\t// is present in the tree.\n\tstate._context = context;\n\tif (!provider) return context._defaultValue;\n\t// This is probably not safe to convert to \"!\"\n\tif (state._value == null) {\n\t\tstate._value = true;\n\t\tprovider.sub(currentComponent);\n\t}\n\treturn provider.props.value;\n}\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {(value: T, cb?: (value: T) => string | number) => void}\n */\nexport function useDebugValue(value, formatter) {\n\tif (options.useDebugValue) {\n\t\toptions.useDebugValue(formatter ? formatter(value) : value);\n\t}\n}\n\nexport function useErrorBoundary(cb) {\n\tconst state = getHookState(currentIndex++, 10);\n\tconst errState = useState();\n\tstate._value = cb;\n\tif (!currentComponent.componentDidCatch) {\n\t\tcurrentComponent.componentDidCatch = err => {\n\t\t\tif (state._value) state._value(err);\n\t\t\terrState[1](err);\n\t\t};\n\t}\n\treturn [\n\t\terrState[0],\n\t\t() => {\n\t\t\terrState[1](undefined);\n\t\t}\n\t];\n}\n\n/**\n * After paint effects consumer.\n */\nfunction flushAfterPaintEffects() {\n\tafterPaintEffects.some(component => {\n\t\tif (component._parentDom) {\n\t\t\ttry {\n\t\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeCleanup);\n\t\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeEffect);\n\t\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t\t} catch (e) {\n\t\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t\t\toptions._catchError(e, component._vnode);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t});\n\tafterPaintEffects = [];\n}\n\n/**\n * Schedule a callback to be invoked after the browser has a chance to paint a new frame.\n * Do this by combining requestAnimationFrame (rAF) + setTimeout to invoke a callback after\n * the next browser frame.\n *\n * Also, schedule a timeout in parallel to the the rAF to ensure the callback is invoked\n * even if RAF doesn't fire (for example if the browser tab is not visible)\n *\n * @param {() => void} callback\n */\nfunction afterNextFrame(callback) {\n\tconst done = () => {\n\t\tclearTimeout(timeout);\n\t\tcancelAnimationFrame(raf);\n\t\tsetTimeout(callback);\n\t};\n\tconst timeout = setTimeout(done, RAF_TIMEOUT);\n\n\tlet raf;\n\tif (typeof window != 'undefined') {\n\t\traf = requestAnimationFrame(done);\n\t}\n}\n\n// Note: if someone used options.debounceRendering = requestAnimationFrame,\n// then effects will ALWAYS run on the NEXT frame instead of the current one, incurring a ~16ms delay.\n// Perhaps this is not such a big deal.\n/**\n * Schedule afterPaintEffects flush after the browser paints\n * @param {number} newQueueLength\n */\nfunction afterPaint(newQueueLength) {\n\tif (newQueueLength === 1 || prevRaf !== options.requestAnimationFrame) {\n\t\tprevRaf = options.requestAnimationFrame;\n\t\t(prevRaf || afterNextFrame)(flushAfterPaintEffects);\n\t}\n}\n\n/**\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeCleanup(hook) {\n\tif (hook._cleanup) hook._cleanup();\n}\n\n/**\n * Invoke a Hook's effect\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeEffect(hook) {\n\tconst result = hook._value();\n\tif (typeof result == 'function') hook._cleanup = result;\n}\n\n/**\n * @param {any[]} oldArgs\n * @param {any[]} newArgs\n */\nfunction argsChanged(oldArgs, newArgs) {\n\treturn !oldArgs || newArgs.some((arg, index) => arg !== oldArgs[index]);\n}\n\nfunction invokeOrReturn(arg, f) {\n\treturn typeof f == 'function' ? f(arg) : f;\n}\n", "/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;\n\treturn false;\n}\n", "import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport class PureComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\t// Some third-party libraries check if this property is present\n\t\tthis.isPureReactComponent = true;\n\t}\n\n\tshouldComponentUpdate(props, state) {\n\t\treturn (\n\t\t\tshallowDiffers(this.props, props) || shallowDiffers(this.state, state)\n\t\t);\n\t}\n}\n", "import { createElement } from 'preact';\nimport { shallowDiffers, assign } from './util';\n\n/**\n * Memoize a component, so that it only updates when the props actually have\n * changed. This was previously known as `React.pure`.\n * @param {import('./internal').FunctionalComponent} c functional component\n * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function\n * @returns {import('./internal').FunctionalComponent}\n */\nexport function memo(c, comparer) {\n\tfunction shouldUpdate(nextProps) {\n\t\tlet ref = this.props.ref;\n\t\tlet updateRef = ref == nextProps.ref;\n\t\tif (!updateRef && ref) {\n\t\t\tref.call ? ref(null) : (ref.current = null);\n\t\t}\n\n\t\tif (!comparer) {\n\t\t\treturn shallowDiffers(this.props, nextProps);\n\t\t}\n\n\t\treturn !comparer(this.props, nextProps) || !updateRef;\n\t}\n\n\tfunction Memoed(props) {\n\t\tthis.shouldComponentUpdate = shouldUpdate;\n\t\treturn createElement(c, assign({}, props));\n\t}\n\tMemoed.prototype.isReactComponent = true;\n\tMemoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';\n\tMemoed._forwarded = true;\n\treturn Memoed;\n}\n", "import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionalComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref);\n\t}\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n", "import { toChildArray } from 'preact';\n\nconst mapFn = (children, fn) => {\n\tif (!children) return null;\n\treturn toChildArray(children).reduce(\n\t\t(acc, value, index) => acc.concat(fn(value, index)),\n\t\t[]\n\t);\n};\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nexport const Children = {\n\tmap: mapFn,\n\tforEach: mapFn,\n\tcount(children) {\n\t\treturn children ? toChildArray(children).length : 0;\n\t},\n\tonly(children) {\n\t\tchildren = toChildArray(children);\n\t\tif (children.length !== 1) {\n\t\t\tthrow new Error('Children.only() expects only one child.');\n\t\t}\n\t\treturn children[0];\n\t},\n\ttoArray: toChildArray\n};\n", "import { Component, createElement, options } from 'preact';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function(error, newVNode, oldVNode) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode._component);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode);\n};\n\nfunction detachedClone(vnode) {\n\tif (vnode) {\n\t\tvnode = assign({}, vnode);\n\t\tvnode._component = null;\n\t\tvnode._children = vnode._children && vnode._children.map(detachedClone);\n\t}\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @param {Promise} promise The thrown promise\n * @param {Component} suspendingComponent The suspending component\n */\nSuspense.prototype._childDidSuspend = function(promise, suspendingComponent) {\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved) return;\n\n\t\tresolved = true;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._suspendedComponentWillUnmount =\n\t\tsuspendingComponent.componentWillUnmount;\n\tsuspendingComponent.componentWillUnmount = () => {\n\t\tonResolved();\n\n\t\tif (suspendingComponent._suspendedComponentWillUnmount) {\n\t\t\tsuspendingComponent._suspendedComponentWillUnmount();\n\t\t}\n\t};\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\tc._vnode._children[0] = c.state._suspended;\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\tif (!c._pendingSuspensionCount++) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.render = function(props, state) {\n\tif (this._detachOnNextRender) {\n\t\tthis._vnode._children[0] = detachedClone(this._detachOnNextRender);\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\treturn [\n\t\tcreateElement(Component, null, state._suspended ? null : props.children),\n\t\tstate._suspended && props.fallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('../src/internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\tlet component = vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component;\n\tlet error;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!component) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn createElement(component, props);\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n", "import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function(child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function(props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate = SuspenseList.prototype.componentDidMount = function() {\n\t// Iterate through all children after mounting for two reasons:\n\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t// The nodes can now be completely consumed from the linked list.\n\t// 2. Handle nodes that might have gotten resolved between render and\n\t// componentDidMount.\n\tconst list = this;\n\tlist._map.forEach((node, child) => {\n\t\tresolve(list, child, node);\n\t});\n};\n", "import { createElement, hydrate, render, _unmount } from 'preact';\n\nclass ContextProvider {\n\tgetChildContext() {\n\t\treturn this.props.context;\n\t}\n\trender(props) {\n\t\treturn props.children;\n\t}\n}\n\n/**\n * Portal component\n * @param {object | null | undefined} props\n */\nfunction Portal(props) {\n\tlet _this = this;\n\tlet container = props.container;\n\tlet wrap = createElement(\n\t\tContextProvider,\n\t\t{ context: _this.context },\n\t\tprops.vnode\n\t);\n\n\t// When we change container we should clear our old container and\n\t// indicate a new mount.\n\tif (_this._container && _this._container !== container) {\n\t\tif (_this._temp.parentNode) _this._container.removeChild(_this._temp);\n\t\t_unmount(_this._wrap);\n\t\t_this._hasMounted = false;\n\t}\n\n\t// When props.vnode is undefined/false/null we are dealing with some kind of\n\t// conditional vnode. This should not trigger a render.\n\tif (props.vnode) {\n\t\tif (!_this._hasMounted) {\n\t\t\t// Create a placeholder that we can use to insert into.\n\t\t\t_this._temp = document.createTextNode('');\n\t\t\t// Hydrate existing nodes to keep the dom intact, when rendering\n\t\t\t// wrap into the container.\n\t\t\thydrate('', container);\n\t\t\t// Append to the container (this matches React's behavior)\n\t\t\tcontainer.appendChild(_this._temp);\n\t\t\t// At this point we have mounted and should set our container.\n\t\t\t_this._hasMounted = true;\n\t\t\t_this._container = container;\n\t\t\t// Render our wrapping element into temp.\n\t\t\trender(wrap, container, _this._temp);\n\t\t\t_this._children = _this._temp._children;\n\t\t} else {\n\t\t\t// When we have mounted and the vnode is present it means the\n\t\t\t// props have changed or a parent is triggering a rerender.\n\t\t\t// This implies we only need to call render. But we need to keep\n\t\t\t// the old tree around, otherwise will treat the vnodes as new and\n\t\t\t// will wrongly call `componentDidMount` on them\n\t\t\tcontainer._children = _this._children;\n\t\t\trender(wrap, container);\n\t\t\t_this._children = container._children;\n\t\t}\n\t}\n\t// When we come from a conditional render, on a mounted\n\t// portal we should clear the DOM.\n\telse if (_this._hasMounted) {\n\t\tif (_this._temp.parentNode) _this._container.removeChild(_this._temp);\n\t\t_unmount(_this._wrap);\n\t}\n\t// Set the wrapping element for future unmounting.\n\t_this._wrap = wrap;\n\n\t_this.componentWillUnmount = () => {\n\t\tif (_this._temp.parentNode) _this._container.removeChild(_this._temp);\n\t\t_unmount(_this._wrap);\n\t};\n\n\treturn null;\n}\n\n/**\n * Create a `Portal` to continue rendering the vnode tree at a different DOM node\n * @param {import('./internal').VNode} vnode The vnode to render\n * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.\n */\nexport function createPortal(vnode, container) {\n\treturn createElement(Portal, { vnode, container });\n}\n", "import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\nimport { applyEventNormalization } from './events';\n\nconst CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = {};\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nexport function render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children == null) {\n\t\twhile (parent.firstChild) {\n\t\t\tparent.removeChild(parent.firstChild);\n\t\t}\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\te.persist = () => {};\n\tlet stoppedPropagating = false,\n\t\tdefaultPrevented = false;\n\n\tconst origStopPropagation = e.stopPropagation;\n\te.stopPropagation = () => {\n\t\torigStopPropagation.call(e);\n\t\tstoppedPropagating = true;\n\t};\n\n\tconst origPreventDefault = e.preventDefault;\n\te.preventDefault = () => {\n\t\torigPreventDefault.call(e);\n\t\tdefaultPrevented = true;\n\t};\n\n\te.isPropagationStopped = () => stoppedPropagating;\n\te.isDefaultPrevented = () => defaultPrevented;\n\treturn (e.nativeEvent = e);\n};\n\n// Patch in `UNSAFE_*` lifecycle hooks\nfunction setSafeDescriptor(proto, key) {\n\tif (proto['UNSAFE_' + key] && !proto[key]) {\n\t\tObject.defineProperty(proto, key, {\n\t\t\tconfigurable: false,\n\t\t\tget() {\n\t\t\t\treturn this['UNSAFE_' + key];\n\t\t\t},\n\t\t\t// This `set` is only used if a user sets a lifecycle like cWU\n\t\t\t// after setting a lifecycle like UNSAFE_cWU. I doubt anyone\n\t\t\t// actually does this in practice so not testing it\n\t\t\t/* istanbul ignore next */\n\t\t\tset(v) {\n\t\t\t\tthis['UNSAFE_' + key] = v;\n\t\t\t}\n\t\t});\n\t}\n}\n\nlet classNameDescriptor = {\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tlet type = vnode.type;\n\tlet props = vnode.props;\n\n\tif (type) {\n\t\t// Alias `class` prop to `className` if available\n\t\tif (props.class != props.className) {\n\t\t\tclassNameDescriptor.enumerable = 'className' in props;\n\t\t\tif (props.className != null) props.class = props.className;\n\t\t\tObject.defineProperty(props, 'className', classNameDescriptor);\n\t\t}\n\n\t\t// Apply DOM VNode compat\n\t\tif (typeof type != 'function') {\n\t\t\t// Apply defaultValue to value\n\t\t\tif (props.defaultValue && props.value !== undefined) {\n\t\t\t\tif (!props.value && props.value !== 0) {\n\t\t\t\t\tprops.value = props.defaultValue;\n\t\t\t\t}\n\t\t\t\tdelete props.defaultValue;\n\t\t\t}\n\n\t\t\t// Add support for array select values: