diff --git a/deps/speedscope/SourceCodePro-Regular.ttf.f546cbe0.woff2 b/deps/speedscope/SourceCodePro-Regular.ttf-ILST5JV6.woff2 similarity index 100% rename from deps/speedscope/SourceCodePro-Regular.ttf.f546cbe0.woff2 rename to deps/speedscope/SourceCodePro-Regular.ttf-ILST5JV6.woff2 diff --git a/deps/speedscope/demangle-cpp.1768f4cc.js b/deps/speedscope/demangle-cpp.1768f4cc.js deleted file mode 100644 index 282dbd04..00000000 --- a/deps/speedscope/demangle-cpp.1768f4cc.js +++ /dev/null @@ -1,4 +0,0 @@ -parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c0&&$e.streams[2].object.output("\\n".charCodeAt(0)),$e.streams[3]&&$e.streams[3].object.output.buffer.length>0&&$e.streams[3].object.output("\\n".charCodeAt(0)))}},Je=Ja;Ve.unshift({func:function(){$e.ignorePermissions=!1,$e.init.initialized||$e.init()}}),Be.push({func:function(){$e.quit()}}),Ya(0),ae.buf=_(12,"void*",we),Module.callMain=function(r){function a(){for(var r=0;r<3;r++)i.push(0)}var e=r.length+1,i=[_(p("/bin/this.program"),"i8",we)];a();for(var v=0;v>2]=0|He.__str,Se[ri+4>>2]=0|He.__str1,Se[ri+16>>2]=0|He.__str2,Se[ri+20>>2]=0|He.__str3,Se[ri+32>>2]=0|He.__str4,Se[ri+36>>2]=0|He.__str5,Se[ri+48>>2]=0|He.__str6,Se[ri+52>>2]=0|He.__str7,Se[ri+64>>2]=0|He.__str8,Se[ri+68>>2]=0|He.__str7,Se[ri+80>>2]=0|He.__str9,Se[ri+84>>2]=0|He.__str10,Se[ri+96>>2]=0|He.__str11,Se[ri+100>>2]=0|He.__str12,Se[ri+112>>2]=0|He.__str13,Se[ri+116>>2]=0|He.__str14,Se[ri+128>>2]=0|He.__str15,Se[ri+132>>2]=0|He.__str16,Se[ri+144>>2]=0|He.__str17,Se[ri+148>>2]=0|He.__str18,Se[ri+160>>2]=0|He.__str19,Se[ri+164>>2]=0|He.__str20,Se[ri+176>>2]=0|He.__str21,Se[ri+180>>2]=0|He.__str22,Se[ri+192>>2]=0|He.__str23,Se[ri+196>>2]=0|He.__str24,Se[ri+208>>2]=0|He.__str25,Se[ri+212>>2]=0|He.__str26,Se[ri+224>>2]=0|He.__str27,Se[ri+228>>2]=0|He.__str28,Se[ri+240>>2]=0|He.__str29,Se[ri+244>>2]=0|He.__str30,Se[ri+256>>2]=0|He.__str31,Se[ri+260>>2]=0|He.__str32,Se[ri+272>>2]=0|He.__str33,Se[ri+276>>2]=0|He.__str34,Se[ri+288>>2]=0|He.__str35,Se[ri+292>>2]=0|He.__str36,Se[ri+304>>2]=0|He.__str37,Se[ri+308>>2]=0|He.__str38,Se[ri+320>>2]=0|He.__str39,Se[ri+324>>2]=0|He.__str40,Se[ri+336>>2]=0|He.__str41,Se[ri+340>>2]=0|He.__str42,Se[ri+352>>2]=0|He.__str43,Se[ri+356>>2]=0|He.__str44,Se[ri+368>>2]=0|He.__str45,Se[ri+372>>2]=0|He.__str46,Se[ri+384>>2]=0|He.__str47,Se[ri+388>>2]=0|He.__str48,Se[ri+400>>2]=0|He.__str49,Se[ri+404>>2]=0|He.__str119289,Se[ri+416>>2]=0|He.__str51,Se[ri+420>>2]=0|He.__str20,Se[ri+432>>2]=0|He.__str52,Se[ri+436>>2]=0|He.__str53,Se[ri+448>>2]=0|He.__str54,Se[ri+452>>2]=0|He.__str55,Se[ri+464>>2]=0|He.__str56,Se[ri+468>>2]=0|He.__str57,Se[ri+480>>2]=0|He.__str58,Se[ri+484>>2]=0|He.__str119289,Se[ri+496>>2]=0|He.__str59,Se[ri+500>>2]=0|He.__str60,Se[ri+512>>2]=0|He.__str61,Se[ri+516>>2]=0|He.__str62,Se[ri+528>>2]=0|He.__str63,Se[ri+532>>2]=0|He.__str64,Se[ri+544>>2]=0|He.__str65,Se[ri+548>>2]=0|He.__str66,Se[ri+560>>2]=0|He.__str67,Se[ri+564>>2]=0|He.__str68,Se[ri+576>>2]=0|He.__str69,Se[ri+580>>2]=0|He.__str70,Se[ri+592>>2]=0|He.__str71,Se[ri+596>>2]=0|He.__str72,Se[ri+608>>2]=0|He.__str73,Se[ri+612>>2]=0|He.__str74,Se[ri+624>>2]=0|He.__str75,Se[ri+628>>2]=0|He.__str76,Se[ri+640>>2]=0|He.__str77,Se[ri+644>>2]=0|He.__str72,Se[ri+656>>2]=0|He.__str78,Se[ri+660>>2]=0|He.__str79,Se[ri+672>>2]=0|He.__str80,Se[ri+676>>2]=0|He.__str81,Se[ri+688>>2]=0|He.__str82,Se[ri+692>>2]=0|He.__str83,Se[ri+704>>2]=0|He.__str84,Se[ri+708>>2]=0|He.__str85,Se[ri+720>>2]=0|He.__str86,Se[ri+724>>2]=0|He.__str87,Se[ri+736>>2]=0|He.__str88,Se[ri+740>>2]=0|He.__str89,Se[ri+752>>2]=0|He.__str90,Se[ri+756>>2]=0|He.__str91,Se[ri+768>>2]=0|He.__str92,Se[ri+772>>2]=0|He.__str91,Se[ai>>2]=0|He.__str145315,Se[ai+8>>2]=0|He.__str145315,Se[ai+20>>2]=0|He.__str167337,Se[ai+28>>2]=0|He.__str95,Se[ai+40>>2]=0|He.__str146316,Se[ai+48>>2]=0|He.__str97,Se[ai+60>>2]=0|He.__str155325,Se[ai+68>>2]=0|He.__str155325,Se[ai+80>>2]=0|He.__str156326,Se[ai+88>>2]=0|He.__str156326,Se[ai+100>>2]=0|He.__str154324,Se[ai+108>>2]=0|He.__str154324,Se[ai+120>>2]=0|He.__str101,Se[ai+128>>2]=0|He.__str101,Se[ai+140>>2]=0|He.__str147317,Se[ai+148>>2]=0|He.__str147317,Se[ai+160>>2]=0|He.__str150320,Se[ai+168>>2]=0|He.__str150320,Se[ai+180>>2]=0|He.__str151321,Se[ai+188>>2]=0|He.__str105,Se[ai+220>>2]=0|He.__str152322,Se[ai+228>>2]=0|He.__str152322,Se[ai+240>>2]=0|He.__str153323,Se[ai+248>>2]=0|He.__str153323,Se[ai+260>>2]=0|He.__str165335,Se[ai+268>>2]=0|He.__str165335,Se[ai+280>>2]=0|He.__str166336,Se[ai+288>>2]=0|He.__str166336,Se[ai+360>>2]=0|He.__str148318,Se[ai+368>>2]=0|He.__str148318,Se[ai+380>>2]=0|He.__str149319,Se[ai+388>>2]=0|He.__str149319,Se[ai+420>>2]=0|He.__str84254,Se[ai+428>>2]=0|He.__str84254,Se[ai+440>>2]=0|He.__str168338,Se[ai+448>>2]=0|He.__str146316,Se[ai+460>>2]=0|He.__str114,Se[ai+468>>2]=0|He.__str152322,Se[ai+480>>2]=0|He.__str115,Se[ai+488>>2]=0|He.__str115,Se[ai+500>>2]=0|He.__str110280,Se[ai+508>>2]=0|He.__str110280,Se[ei+4>>2]=0|He.__str152,Se[ei+12>>2]=0|He.__str152,Se[ei+32>>2]=0|He.__str153,Se[ei+40>>2]=0|He.__str153,Se[ei+48>>2]=0|He.__str154,Se[ei+60>>2]=0|He.__str155,Se[ei+68>>2]=0|He.__str155,Se[ei+76>>2]=0|He.__str156,Se[ei+88>>2]=0|He.__str157,Se[ei+96>>2]=0|He.__str158,Se[ei+104>>2]=0|He.__str156,Se[ei+116>>2]=0|He.__str159,Se[ei+124>>2]=0|He.__str160,Se[ei+132>>2]=0|He.__str161,Se[ei+144>>2]=0|He.__str162,Se[ei+152>>2]=0|He.__str163,Se[ei+160>>2]=0|He.__str164,Se[ei+172>>2]=0|He.__str165,Se[ei+180>>2]=0|He.__str166,Se[ei+188>>2]=0|He.__str167,Se[si+4>>2]=bi,Se[ni+4>>2]=ki,oi=_([2,0,0,0,0],["i8*",0,0,0,0],we),Se[bi>>2]=oi+8|0,Se[bi+4>>2]=0|He.__ZTSSt9bad_alloc,Se[bi+8>>2]=li,Se[ki>>2]=oi+8|0,Se[ki+4>>2]=0|He.__ZTSSt20bad_array_new_length,Se[ki+8>>2]=bi,ui=16,ci=6,hi=18,di=6,wi=6,pe=[0,0,Jr,0,va,0,ya,0,ga,0,wa,0,Sa,0,pa,0,Ea,0,ma,0],Module.FUNCTION_TABLE=pe,Module.run=ee,Module.preRun&&Module.preRun(),0==Ke){ee()}Module.postRun&&Module.postRun(),Module.___cxa_demangle=G;var pi=v("__cxa_demangle","string",["string","string","number","number"]);return function(r){return pi(r,"",1,0)}}();\n'; -},{}]},{},["bS28"], null) -//# sourceMappingURL=demangle-cpp.1768f4cc.js.map \ No newline at end of file diff --git a/deps/speedscope/favicon-16x16-V2DMIAZS.js b/deps/speedscope/favicon-16x16-V2DMIAZS.js new file mode 100644 index 00000000..d6f6e875 --- /dev/null +++ b/deps/speedscope/favicon-16x16-V2DMIAZS.js @@ -0,0 +1,2 @@ +(()=>{var D="./favicon-16x16-VSI62OPJ.png";})(); +//# sourceMappingURL=favicon-16x16-V2DMIAZS.js.map diff --git a/deps/speedscope/favicon-16x16.f74b3187.png b/deps/speedscope/favicon-16x16-VSI62OPJ.png similarity index 100% rename from deps/speedscope/favicon-16x16.f74b3187.png rename to deps/speedscope/favicon-16x16-VSI62OPJ.png diff --git a/deps/speedscope/favicon-32x32.bc503437.png b/deps/speedscope/favicon-32x32-3EB2YCUY.png similarity index 100% rename from deps/speedscope/favicon-32x32.bc503437.png rename to deps/speedscope/favicon-32x32-3EB2YCUY.png diff --git a/deps/speedscope/favicon-32x32-THY3JDJL.js b/deps/speedscope/favicon-32x32-THY3JDJL.js new file mode 100644 index 00000000..01b9946a --- /dev/null +++ b/deps/speedscope/favicon-32x32-THY3JDJL.js @@ -0,0 +1,2 @@ +(()=>{var T="./favicon-32x32-3EB2YCUY.png";})(); +//# sourceMappingURL=favicon-32x32-THY3JDJL.js.map diff --git a/deps/speedscope/favicon-FOKUP5Y5.ico b/deps/speedscope/favicon-FOKUP5Y5.ico new file mode 100644 index 00000000..7b0a4ee3 Binary files /dev/null and b/deps/speedscope/favicon-FOKUP5Y5.ico differ diff --git a/deps/speedscope/favicon-M34RF7BI.js b/deps/speedscope/favicon-M34RF7BI.js new file mode 100644 index 00000000..0ac69754 --- /dev/null +++ b/deps/speedscope/favicon-M34RF7BI.js @@ -0,0 +1,2 @@ +(()=>{var m="./favicon-FOKUP5Y5.ico";})(); +//# sourceMappingURL=favicon-M34RF7BI.js.map diff --git a/deps/speedscope/import.bcbb2033.js b/deps/speedscope/import.bcbb2033.js deleted file mode 100644 index 1dc0e5f6..00000000 --- a/deps/speedscope/import.bcbb2033.js +++ /dev/null @@ -1,123 +0,0 @@ -parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;ce.id)}),r.children.forEach(e)}(e),t}function t(e,t){return e.map((r,n)=>{return r-(0===n?1e6*t:e[n-1])})}function r(r){return{samples:r.samples,startTime:1e6*r.startTime,endTime:1e6*r.endTime,nodes:e(r.head),timeDeltas:t(r.timestamps,r.startTime)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.chromeTreeToNodes=r; -},{}],"kWV1":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isChromeTimeline=i,exports.isChromeTimelineObject=o,exports.importFromChromeTimeline=l,exports.importFromChromeCPUProfile=c,exports.importFromOldV8CPUProfile=f;var e=require("../lib/profile"),t=require("../lib/utils"),n=require("../lib/value-formatters"),r=require("./v8cpuFormatter");function i(e){if(!Array.isArray(e))return!1;if(e.length<1)return!1;const t=e[0];return"pid"in t&&"tid"in t&&"ph"in t&&"cat"in t&&!!e.find(e=>"CpuProfile"===e.name||"Profile"===e.name||"ProfileChunk"===e.name)}function o(e){return"traceEvents"in e&&i(e.traceEvents)}function l(e,n){const r=new Map,i=new Map,o=new Map;(0,t.sortBy)(e,e=>e.ts);for(let t of e){if("CpuProfile"===t.name){const e=`${t.pid}:${t.tid}`,n=t.id||e;r.set(n,t.args.data.cpuProfile),i.set(n,e)}if("Profile"===t.name){const e=`${t.pid}:${t.tid}`;r.set(t.id||e,Object.assign({startTime:0,endTime:0,nodes:[],samples:[],timeDeltas:[]},t.args.data)),t.id&&i.set(t.id,`${t.pid}:${t.tid}`)}if("thread_name"===t.name&&o.set(`${t.pid}:${t.tid}`,t.args.name),"ProfileChunk"===t.name){const e=`${t.pid}:${t.tid}`,n=r.get(t.id||e);if(n){const e=t.args.data;e.cpuProfile&&(e.cpuProfile.nodes&&(n.nodes=n.nodes.concat(e.cpuProfile.nodes)),e.cpuProfile.samples&&(n.samples=n.samples.concat(e.cpuProfile.samples))),e.timeDeltas&&(n.timeDeltas=n.timeDeltas.concat(e.timeDeltas)),null!=e.startTime&&(n.startTime=e.startTime),null!=e.endTime&&(n.endTime=e.endTime)}else console.warn(`Ignoring ProfileChunk for undeclared Profile with id ${t.id||e}`)}}if(r.size>0){const e=[];let l=0;return(0,t.itForEach)(r.keys(),t=>{let s=null,a=i.get(t);a&&(s=o.get(a)||null);const m=c(r.get(t));s&&r.size>1?(m.setName(`${n} - ${s}`),"CrRendererMain"===s&&(l=e.length)):m.setName(`${n}`),e.push(m)}),{name:n,indexToView:l,profiles:e}}throw new Error("Could not find CPU profile in Timeline")}const s=new Map;function a(e){return(0,t.getOrInsert)(s,e,e=>{const t=e.url;let n=e.lineNumber;null!=n&&n++;let r=e.columnNumber;null!=r&&r++;const i=e.functionName||(t?`(anonymous ${t.split("/").pop()}:${n})`:"(anonymous)");return{key:`${i}:${t}:${n}:${r}`,name:i,file:t,line:n,col:r}})}function m(e){const{functionName:t,url:n}=e;return"native dummy.js"===n||("(root)"===t||"(idle)"===t)}function u(e){return"(garbage collector)"===e||"(program)"===e}function c(r){const i=new e.CallTreeProfileBuilder(r.endTime-r.startTime),o=new Map;for(let e of r.nodes)o.set(e.id,e);for(let e of r.nodes)if("number"==typeof e.parent&&(e.parent=o.get(e.parent)),e.children)for(let t of e.children){const n=o.get(t);n&&(n.parent=e)}const l=[],s=[];let c=r.timeDeltas[0],f=c,p=NaN;for(let e=0;e0&&(0,t.lastOf)(d)!=f;){const e=a(d.pop().callFrame);i.leaveFrame(e,n)}const p=[];for(let e=c;e&&e!=f&&!m(e.callFrame);e=u(e.callFrame.functionName)?(0,t.lastOf)(d):e.parent||null)p.push(e);p.reverse();for(let e of p)i.enterFrame(a(e.callFrame),n);d=d.concat(p)}for(let e=d.length-1;e>=0;e--)i.leaveFrame(a(d[e].callFrame),(0,t.lastOf)(s));return i.setValueFormatter(new n.TimeFormatter("microseconds")),i.build()}function f(e){return c((0,r.chromeTreeToNodes)(e))} -},{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4","./v8cpuFormatter":"y1V0"}],"I37H":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromStackprof=a;var e=require("../lib/profile"),t=require("../lib/value-formatters");function a(a){const{frames:r,mode:l,raw:o,raw_timestamp_deltas:n,interval:i}=a,s=new e.StackListProfileBuilder;s.setValueFormatter(new t.TimeFormatter("microseconds"));let c=0,m=[];for(let e=0;e=0;)e[t]=0}var i=0,l=1,d=2,f=3,o=258,b=29,s=256,u=s+1+b,c=30,p=19,h=2*u+1,v=15,y=16,x=7,g=256,m=16,w=17,A=18,k=[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],q=[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],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],j=512,B=new Array(2*(u+2));a(B);var C=new Array(2*c);a(C);var D=new Array(j);a(D);var E=new Array(o-f+1);a(E);var F=new Array(b);a(F);var G,H,I,J=new Array(c);function K(e,t,n,_,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=_,this.max_length=r,this.has_stree=e&&e.length}function L(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function M(e){return e<256?D[e]:D[256+(e>>>7)]}function N(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function O(e,t,n){e.bi_valid>y-n?(e.bi_buf|=t<>y-e.bi_valid,e.bi_valid+=n-y):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function R(e){16===e.bi_valid?(N(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function T(e,t){var n,_,r,a,i,l,d=t.dyn_tree,f=t.max_code,o=t.stat_desc.static_tree,b=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,c=t.stat_desc.max_length,p=0;for(a=0;a<=v;a++)e.bl_count[a]=0;for(d[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;nc&&(a=c,p++),d[2*_+1]=a,_>f||(e.bl_count[a]++,i=0,_>=u&&(i=s[_-u]),l=d[2*_],e.opt_len+=l*(a+i),b&&(e.static_len+=l*(o[2*_+1]+i)));if(0!==p){do{for(a=c-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[c]--,p-=2}while(p>0);for(a=c;0!==a;a--)for(_=e.bl_count[a];0!==_;)(r=e.heap[--n])>f||(d[2*r+1]!==a&&(e.opt_len+=(a-d[2*r+1])*d[2*r],d[2*r+1]=a),_--)}}function U(e,t,n){var _,r,a=new Array(v+1),i=0;for(_=1;_<=v;_++)a[_]=i=i+n[_-1]<<1;for(r=0;r<=t;r++){var l=e[2*r+1];0!==l&&(e[2*r]=Q(a[l]++,l))}}function V(){var e,t,n,_,r,a=new Array(v+1);for(n=0,_=0;_>=7;_8?N(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Y(t,n,_,r){X(t),r&&(N(t,_),N(t,~_)),e.arraySet(t.pending_buf,t.window,n,_,t.pending),t.pending+=_}function Z(e,t,n,_){var r=2*t,a=2*n;return e[r]>1;n>=1;n--)$(e,a,n);r=d;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],$(e,a,1),_=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=_,a[2*r]=a[2*n]+a[2*_],e.depth[r]=(e.depth[n]>=e.depth[_]?e.depth[n]:e.depth[_])+1,a[2*n+1]=a[2*_+1]=r,e.heap[1]=r++,$(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],T(e,t),U(a,f,e.bl_count)}function ne(e,t,n){var _,r,a=-1,i=t[1],l=0,d=7,f=4;for(0===i&&(d=138,f=3),t[2*(n+1)+1]=65535,_=0;_<=n;_++)r=i,i=t[2*(_+1)+1],++l=3&&0===e.bl_tree[2*S[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function ae(e,t,n,_){var r;for(O(e,t-257,5),O(e,n-1,5),O(e,_-4,4),r=0;r<_;r++)O(e,e.bl_tree[2*S[r]+1],3);_e(e,e.dyn_ltree,t-1),_e(e,e.dyn_dtree,n-1)}function ie(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return n;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return _;for(t=32;t0?(e.strm.data_type===r&&(e.strm.data_type=ie(e)),te(e,e.l_desc),te(e,e.d_desc),o=re(e),i=e.opt_len+3+7>>>3,(f=e.static_len+3+7>>>3)<=i&&(i=f)):i=f=_+5,_+4<=i&&-1!==n?fe(e,n,_,a):e.strategy===t||f===i?(O(e,(l<<1)+(a?1:0),3),ee(e,B,C)):(O(e,(d<<1)+(a?1:0),3),ae(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ee(e,e.dyn_ltree,e.dyn_dtree)),W(e),a&&X(e)}function se(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(E[n]+s+1)]++,e.dyn_dtree[2*M(t)]++),e.last_lit===e.lit_bufsize-1}exports._tr_init=de,exports._tr_stored_block=fe,exports._tr_flush_block=be,exports._tr_tally=se,exports._tr_align=oe; -},{"../utils/common":"tbG5"}],"uxo6":[function(require,module,exports) { -"use strict";function e(e,r,o,t){for(var u=65535&e|0,i=e>>>16&65535|0,n=0;0!==o;){o-=n=o>2e3?2e3:o;do{i=i+(u=u+r[t++]|0)|0}while(--n);u%=65521,i%=65521}return u|i<<16|0}module.exports=e; -},{}],"X4kj":[function(require,module,exports) { -"use strict";function r(){for(var r,o=[],t=0;t<256;t++){r=t;for(var n=0;n<8;n++)r=1&r?3988292384^r>>>1:r>>>1;o[t]=r}return o}var o=r();function t(r,t,n,u){var a=o,e=u+n;r^=-1;for(var f=u;f>>8^a[255&(r^t[f])];return-1^r}module.exports=t; -},{}],"gMAY":[function(require,module,exports) { -"use strict";module.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"}; -},{}],"BLBk":[function(require,module,exports) { -"use strict";var t,a=require("../utils/common"),e=require("./trees"),s=require("./adler32"),i=require("./crc32"),r=require("./messages"),n=0,h=1,l=3,_=4,d=5,o=0,u=1,g=-2,f=-3,c=-5,p=-1,m=1,w=2,v=3,k=4,z=0,b=2,x=8,y=9,B=15,S=8,q=29,I=256,A=I+1+q,C=30,R=19,j=2*A+1,D=15,E=3,H=258,K=H+E+1,N=32,F=42,G=69,J=73,L=91,M=103,O=113,P=666,Q=1,T=2,U=3,V=4,W=3;function X(t,a){return t.msg=r[a],a}function Y(t){return(t<<1)-(t>4?9:0)}function Z(t){for(var a=t.length;--a>=0;)t[a]=0}function $(t){var e=t.state,s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(a.arraySet(t.output,e.pending_buf,e.pending_out,s,t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))}function tt(t,a){e._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,a),t.block_start=t.strstart,$(t.strm)}function at(t,a){t.pending_buf[t.pending++]=a}function et(t,a){t.pending_buf[t.pending++]=a>>>8&255,t.pending_buf[t.pending++]=255&a}function st(t,e,r,n){var h=t.avail_in;return h>n&&(h=n),0===h?0:(t.avail_in-=h,a.arraySet(e,t.input,t.next_in,h,r),1===t.state.wrap?t.adler=s(t.adler,e,h,r):2===t.state.wrap&&(t.adler=i(t.adler,e,h,r)),t.next_in+=h,t.total_in+=h,h)}function it(t,a){var e,s,i=t.max_chain_length,r=t.strstart,n=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-K?t.strstart-(t.w_size-K):0,_=t.window,d=t.w_mask,o=t.prev,u=t.strstart+H,g=_[r+n-1],f=_[r+n];t.prev_length>=t.good_match&&(i>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(e=a)+n]===f&&_[e+n-1]===g&&_[e]===_[r]&&_[++e]===_[r+1]){r+=2,e++;do{}while(_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&rn){if(t.match_start=a,n=s,s>=h)break;g=_[r+n-1],f=_[r+n]}}}while((a=o[a&d])>l&&0!=--i);return n<=t.lookahead?n:t.lookahead}function rt(t){var e,s,i,r,n,h=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=h+(h-K)){a.arraySet(t.window,t.window,h,h,0),t.match_start-=h,t.strstart-=h,t.block_start-=h,e=s=t.hash_size;do{i=t.head[--e],t.head[e]=i>=h?i-h:0}while(--s);e=s=h;do{i=t.prev[--e],t.prev[e]=i>=h?i-h:0}while(--s);r+=h}if(0===t.strm.avail_in)break;if(s=st(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=s,t.lookahead+t.insert>=E)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(e=t.pending_buf_size-5);;){if(t.lookahead<=1){if(rt(t),0===t.lookahead&&a===n)return Q;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var s=t.block_start+e;if((0===t.strstart||t.strstart>=s)&&(t.lookahead=t.strstart-s,t.strstart=s,tt(t,!1),0===t.strm.avail_out))return Q;if(t.strstart-t.block_start>=t.w_size-K&&(tt(t,!1),0===t.strm.avail_out))return Q}return t.insert=0,a===_?(tt(t,!0),0===t.strm.avail_out?U:V):(t.strstart>t.block_start&&(tt(t,!1),t.strm.avail_out),Q)}function ht(t,a){for(var s,i;;){if(t.lookahead=E&&(t.ins_h=(t.ins_h<=E)if(i=e._tr_tally(t,t.strstart-t.match_start,t.match_length-E),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=E){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=E&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=E-1)),t.prev_length>=E&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-E,i=e._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-E),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<=E&&t.strstart>0&&(i=l[r=t.strstart-1])===l[++r]&&i===l[++r]&&i===l[++r]){h=t.strstart+H;do{}while(i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=E?(s=e._tr_tally(t,1,t.match_length-E),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=e._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(tt(t,!1),0===t.strm.avail_out))return Q}return t.insert=0,a===_?(tt(t,!0),0===t.strm.avail_out?U:V):t.last_lit&&(tt(t,!1),0===t.strm.avail_out)?Q:T}function dt(t,a){for(var s;;){if(0===t.lookahead&&(rt(t),0===t.lookahead)){if(a===n)return Q;break}if(t.match_length=0,s=e._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(tt(t,!1),0===t.strm.avail_out))return Q}return t.insert=0,a===_?(tt(t,!0),0===t.strm.avail_out?U:V):t.last_lit&&(tt(t,!1),0===t.strm.avail_out)?Q:T}function ot(t,a,e,s,i){this.good_length=t,this.max_lazy=a,this.nice_length=e,this.max_chain=s,this.func=i}function ut(a){a.window_size=2*a.w_size,Z(a.head),a.max_lazy_match=t[a.level].max_lazy,a.good_match=t[a.level].good_length,a.nice_match=t[a.level].nice_length,a.max_chain_length=t[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=E-1,a.match_available=0,a.ins_h=0}function gt(){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=x,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 a.Buf16(2*j),this.dyn_dtree=new a.Buf16(2*(2*C+1)),this.bl_tree=new a.Buf16(2*(2*R+1)),Z(this.dyn_ltree),Z(this.dyn_dtree),Z(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(D+1),this.heap=new a.Buf16(2*A+1),Z(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*A+1),Z(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 ft(t){var a;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=b,(a=t.state).pending=0,a.pending_out=0,a.wrap<0&&(a.wrap=-a.wrap),a.status=a.wrap?F:O,t.adler=2===a.wrap?0:1,a.last_flush=n,e._tr_init(a),o):X(t,g)}function ct(t){var a=ft(t);return a===o&&ut(t.state),a}function pt(t,a){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=a,o):g}function mt(t,e,s,i,r,n){if(!t)return g;var h=1;if(e===p&&(e=6),i<0?(h=0,i=-i):i>15&&(h=2,i-=16),r<1||r>y||s!==x||i<8||i>15||e<0||e>9||n<0||n>k)return X(t,g);8===i&&(i=9);var l=new gt;return t.state=l,l.strm=t,l.wrap=h,l.gzhead=null,l.w_bits=i,l.w_size=1<d||s<0)return a?X(a,g):g;if(f=a.state,!a.output||!a.input&&0!==a.avail_in||f.status===P&&s!==_)return X(a,0===a.avail_out?c:g);if(f.strm=a,r=f.last_flush,f.last_flush=s,f.status===F)if(2===f.wrap)a.adler=0,at(f,31),at(f,139),at(f,8),f.gzhead?(at(f,(f.gzhead.text?1:0)+(f.gzhead.hcrc?2:0)+(f.gzhead.extra?4:0)+(f.gzhead.name?8:0)+(f.gzhead.comment?16:0)),at(f,255&f.gzhead.time),at(f,f.gzhead.time>>8&255),at(f,f.gzhead.time>>16&255),at(f,f.gzhead.time>>24&255),at(f,9===f.level?2:f.strategy>=w||f.level<2?4:0),at(f,255&f.gzhead.os),f.gzhead.extra&&f.gzhead.extra.length&&(at(f,255&f.gzhead.extra.length),at(f,f.gzhead.extra.length>>8&255)),f.gzhead.hcrc&&(a.adler=i(a.adler,f.pending_buf,f.pending,0)),f.gzindex=0,f.status=G):(at(f,0),at(f,0),at(f,0),at(f,0),at(f,0),at(f,9===f.level?2:f.strategy>=w||f.level<2?4:0),at(f,W),f.status=O);else{var k=x+(f.w_bits-8<<4)<<8;k|=(f.strategy>=w||f.level<2?0:f.level<6?1:6===f.level?2:3)<<6,0!==f.strstart&&(k|=N),k+=31-k%31,f.status=O,et(f,k),0!==f.strstart&&(et(f,a.adler>>>16),et(f,65535&a.adler)),a.adler=1}if(f.status===G)if(f.gzhead.extra){for(p=f.pending;f.gzindex<(65535&f.gzhead.extra.length)&&(f.pending!==f.pending_buf_size||(f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),$(a),p=f.pending,f.pending!==f.pending_buf_size));)at(f,255&f.gzhead.extra[f.gzindex]),f.gzindex++;f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),f.gzindex===f.gzhead.extra.length&&(f.gzindex=0,f.status=J)}else f.status=J;if(f.status===J)if(f.gzhead.name){p=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),$(a),p=f.pending,f.pending===f.pending_buf_size)){m=1;break}m=f.gzindexp&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),0===m&&(f.gzindex=0,f.status=L)}else f.status=L;if(f.status===L)if(f.gzhead.comment){p=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),$(a),p=f.pending,f.pending===f.pending_buf_size)){m=1;break}m=f.gzindexp&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),0===m&&(f.status=M)}else f.status=M;if(f.status===M&&(f.gzhead.hcrc?(f.pending+2>f.pending_buf_size&&$(a),f.pending+2<=f.pending_buf_size&&(at(f,255&a.adler),at(f,a.adler>>8&255),a.adler=0,f.status=O)):f.status=O),0!==f.pending){if($(a),0===a.avail_out)return f.last_flush=-1,o}else if(0===a.avail_in&&Y(s)<=Y(r)&&s!==_)return X(a,c);if(f.status===P&&0!==a.avail_in)return X(a,c);if(0!==a.avail_in||0!==f.lookahead||s!==n&&f.status!==P){var z=f.strategy===w?dt(f,s):f.strategy===v?_t(f,s):t[f.level].func(f,s);if(z!==U&&z!==V||(f.status=P),z===Q||z===U)return 0===a.avail_out&&(f.last_flush=-1),o;if(z===T&&(s===h?e._tr_align(f):s!==d&&(e._tr_stored_block(f,0,0,!1),s===l&&(Z(f.head),0===f.lookahead&&(f.strstart=0,f.block_start=0,f.insert=0))),$(a),0===a.avail_out))return f.last_flush=-1,o}return s!==_?o:f.wrap<=0?u:(2===f.wrap?(at(f,255&a.adler),at(f,a.adler>>8&255),at(f,a.adler>>16&255),at(f,a.adler>>24&255),at(f,255&a.total_in),at(f,a.total_in>>8&255),at(f,a.total_in>>16&255),at(f,a.total_in>>24&255)):(et(f,a.adler>>>16),et(f,65535&a.adler)),$(a),f.wrap>0&&(f.wrap=-f.wrap),0!==f.pending?o:u)}function kt(t){var a;return t&&t.state?(a=t.state.status)!==F&&a!==G&&a!==J&&a!==L&&a!==M&&a!==O&&a!==P?X(t,g):(t.state=null,a===O?X(t,f):o):g}function zt(t,e){var i,r,n,h,l,_,d,u,f=e.length;if(!t||!t.state)return g;if(2===(h=(i=t.state).wrap)||1===h&&i.status!==F||i.lookahead)return g;for(1===h&&(t.adler=s(t.adler,e,f,0)),i.wrap=0,f>=i.w_size&&(0===h&&(Z(i.head),i.strstart=0,i.block_start=0,i.insert=0),u=new a.Buf8(i.w_size),a.arraySet(u,e,f-i.w_size,i.w_size,0),e=u,f=i.w_size),l=t.avail_in,_=t.next_in,d=t.input,t.avail_in=f,t.next_in=0,t.input=e,rt(i);i.lookahead>=E;){r=i.strstart,n=i.lookahead-(E-1);do{i.ins_h=(i.ins_h<=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function f(e,o){if(o<65537&&(e.subarray&&t||!e.subarray&&n))return String.fromCharCode.apply(null,r.shrinkBuf(e,o));for(var f="",u=0;u>>6,t[u++]=128|63&e):e<65536?(t[u++]=224|e>>>12,t[u++]=128|e>>>6&63,t[u++]=128|63&e):(t[u++]=240|e>>>18,t[u++]=128|e>>>12&63,t[u++]=128|e>>>6&63,t[u++]=128|63&e);return t},exports.buf2binstring=function(r){return f(r,r.length)},exports.binstring2buf=function(n){for(var t=new r.Buf8(n.length),e=0,o=t.length;e4)h[o++]=65533,t+=a-1;else{for(u&=2===a?31:3===a?15:7;a>1&&t1?h[o++]=65533:u<65536?h[o++]=u:(u-=65536,h[o++]=55296|u>>10&1023,h[o++]=56320|1023&u)}return f(h,o)},exports.utf8border=function(r,n){var t;for((n=n||r.length)>r.length&&(n=r.length),t=n-1;t>=0&&128==(192&r[t]);)t--;return t<0?n:0===t?n:t+e[r[t]]>n?t:n}; -},{"./common":"tbG5"}],"bdtv":[function(require,module,exports) { -"use strict";function t(){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}module.exports=t; -},{}],"nFS2":[function(require,module,exports) { -"use strict";var t=require("./zlib/deflate"),i=require("./utils/common"),e=require("./utils/strings"),n=require("./zlib/messages"),r=require("./zlib/zstream"),s=Object.prototype.toString,o=0,a=4,u=0,h=1,d=2,l=-1,f=0,p=8;function w(o){if(!(this instanceof w))return new w(o);this.options=i.assign({level:l,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},o||{});var a=this.options;a.raw&&a.windowBits>0?a.windowBits=-a.windowBits:a.gzip&&a.windowBits>0&&a.windowBits<16&&(a.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new r,this.strm.avail_out=0;var h=t.deflateInit2(this.strm,a.level,a.method,a.windowBits,a.memLevel,a.strategy);if(h!==u)throw new Error(n[h]);if(a.header&&t.deflateSetHeader(this.strm,a.header),a.dictionary){var d;if(d="string"==typeof a.dictionary?e.string2buf(a.dictionary):"[object ArrayBuffer]"===s.call(a.dictionary)?new Uint8Array(a.dictionary):a.dictionary,(h=t.deflateSetDictionary(this.strm,d))!==u)throw new Error(n[h]);this._dict_set=!0}}function c(t,i){var e=new w(i);if(e.push(t,!0),e.err)throw e.msg||n[e.err];return e.result}function m(t,i){return(i=i||{}).raw=!0,c(t,i)}function g(t,i){return(i=i||{}).gzip=!0,c(t,i)}w.prototype.push=function(n,r){var l,f,p=this.strm,w=this.options.chunkSize;if(this.ended)return!1;f=r===~~r?r:!0===r?a:o,"string"==typeof n?p.input=e.string2buf(n):"[object ArrayBuffer]"===s.call(n)?p.input=new Uint8Array(n):p.input=n,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(w),p.next_out=0,p.avail_out=w),(l=t.deflate(p,f))!==h&&l!==u)return this.onEnd(l),this.ended=!0,!1;0!==p.avail_out&&(0!==p.avail_in||f!==a&&f!==d)||("string"===this.options.to?this.onData(e.buf2binstring(i.shrinkBuf(p.output,p.next_out))):this.onData(i.shrinkBuf(p.output,p.next_out)))}while((p.avail_in>0||0===p.avail_out)&&l!==h);return f===a?(l=t.deflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===u):f!==d||(this.onEnd(u),p.avail_out=0,!0)},w.prototype.onData=function(t){this.chunks.push(t)},w.prototype.onEnd=function(t){t===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},exports.Deflate=w,exports.deflate=c,exports.deflateRaw=m,exports.gzip=g; -},{"./zlib/deflate":"BLBk","./utils/common":"tbG5","./utils/strings":"Q3ZD","./zlib/messages":"gMAY","./zlib/zstream":"bdtv"}],"LP5M":[function(require,module,exports) { -"use strict";var i=30,e=12;module.exports=function(o,a){var t,d,n,l,s,f,r,b,c,u,v,m,w,h,k,_,x,g,p,z,j,q,y,A,B;t=o.state,d=o.next_in,A=o.input,n=d+(o.avail_in-5),l=o.next_out,B=o.output,s=l-(a-o.avail_out),f=l+(o.avail_out-257),r=t.dmax,b=t.wsize,c=t.whave,u=t.wnext,v=t.window,m=t.hold,w=t.bits,h=t.lencode,k=t.distcode,_=(1<>>=p=g>>>24,w-=p,0===(p=g>>>16&255))B[l++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=h[(65535&g)+(m&(1<>>=p,w-=p),w<15&&(m+=A[d++]<>>=p=g>>>24,w-=p,!(16&(p=g>>>16&255))){if(0==(64&p)){g=k[(65535&g)+(m&(1<r){o.msg="invalid distance too far back",t.mode=i;break i}if(m>>>=p,w-=p,j>(p=l-s)){if((p=j-p)>c&&t.sane){o.msg="invalid distance too far back",t.mode=i;break i}if(q=0,y=v,0===u){if(q+=b-p,p2;)B[l++]=y[q++],B[l++]=y[q++],B[l++]=y[q++],z-=3;z&&(B[l++]=y[q++],z>1&&(B[l++]=y[q++]))}else{q=l-j;do{B[l++]=B[q++],B[l++]=B[q++],B[l++]=B[q++],z-=3}while(z>2);z&&(B[l++]=B[q++],z>1&&(B[l++]=B[q++]))}break}}break}}while(d>3,m&=(1<<(w-=z<<3))-1,o.next_in=d,o.next_out=l,o.avail_in=d=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return d[v++]=20971520,d[v++]=20971520,h.bits=1,0;for(F=1;F0&&(a===e||1!==G))return-1;for(Q[1]=0,D=1;Di||a===t&&L>o)return 1;for(;;){y=D-J,B[E]j?(z=R[S+B[E]],A=N[O+B[E]]):(z=96,A=0),k=1<>J)+(p-=k)]=y<<24|z<<16|A|0}while(0!==p);for(k=1<>=1;if(0!==k?(M&=k-1,M+=k):M=0,E++,0==--P[D]){if(D===G)break;D=c[m+B[E]]}if(D>H&&(M&x)!==q){for(0===J&&(J=H),g+=F,K=1<<(I=D-J);I+Ji||a===t&&L>o)return 1;d[q=M&x]=H<<24|I<<16|g-v|0}}return 0!==M&&(d[g+M]=D-J<<24|64<<16|0),h.bits=H,0}; -},{"../utils/common":"tbG5"}],"GIDK":[function(require,module,exports) { -"use strict";var e=require("../utils/common"),a=require("./adler32"),t=require("./crc32"),i=require("./inffast"),s=require("./inftrees"),n=0,r=1,o=2,d=4,l=5,f=6,c=0,h=1,k=2,b=-2,m=-3,w=-4,u=-5,g=8,v=1,x=2,p=3,_=4,y=5,z=6,B=7,S=8,q=9,C=10,I=11,R=12,j=13,A=14,D=15,E=16,G=17,H=18,K=19,N=20,F=21,J=22,L=23,M=24,O=25,P=26,Q=27,T=28,U=29,V=30,W=31,X=32,Y=852,Z=592,$=15,ee=$;function ae(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function te(){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 e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ie(a){var t;return a&&a.state?(t=a.state,a.total_in=a.total_out=t.total=0,a.msg="",t.wrap&&(a.adler=1&t.wrap),t.mode=v,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new e.Buf32(Y),t.distcode=t.distdyn=new e.Buf32(Z),t.sane=1,t.back=-1,c):b}function se(e){var a;return e&&e.state?((a=e.state).wsize=0,a.whave=0,a.wnext=0,ie(e)):b}function ne(e,a){var t,i;return e&&e.state?(i=e.state,a<0?(t=0,a=-a):(t=1+(a>>4),a<48&&(a&=15)),a&&(a<8||a>15)?b:(null!==i.window&&i.wbits!==a&&(i.window=null),i.wrap=t,i.wbits=a,se(e))):b}function re(e,a){var t,i;return e?(i=new te,e.state=i,i.window=null,(t=ne(e,a))!==c&&(e.state=null),t):b}function oe(e){return re(e,ee)}var de,le,fe=!0;function ce(a){if(fe){var t;for(de=new e.Buf32(512),le=new e.Buf32(32),t=0;t<144;)a.lens[t++]=8;for(;t<256;)a.lens[t++]=9;for(;t<280;)a.lens[t++]=7;for(;t<288;)a.lens[t++]=8;for(s(r,a.lens,0,288,de,0,a.work,{bits:9}),t=0;t<32;)a.lens[t++]=5;s(o,a.lens,0,32,le,0,a.work,{bits:5}),fe=!1}a.lencode=de,a.lenbits=9,a.distcode=le,a.distbits=5}function he(a,t,i,s){var n,r=a.state;return null===r.window&&(r.wsize=1<=r.wsize?(e.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):((n=r.wsize-r.wnext)>s&&(n=s),e.arraySet(r.window,t,i-s,n,r.wnext),(s-=n)?(e.arraySet(r.window,t,i-s,s,0),r.wnext=s,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,$.check=t($.check,qe,2,0),oe=0,de=0,$.mode=x;break}if($.flags=0,$.head&&($.head.done=!1),!(1&$.wrap)||(((255&oe)<<8)+(oe>>8))%31){Y.msg="incorrect header check",$.mode=V;break}if((15&oe)!==g){Y.msg="unknown compression method",$.mode=V;break}if(de-=4,_e=8+(15&(oe>>>=4)),0===$.wbits)$.wbits=_e;else if(_e>$.wbits){Y.msg="invalid window size",$.mode=V;break}$.dmax=1<<_e,Y.adler=$.check=1,$.mode=512&oe?C:R,oe=0,de=0;break;case x:for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<>8&1),512&$.flags&&(qe[0]=255&oe,qe[1]=oe>>>8&255,$.check=t($.check,qe,2,0)),oe=0,de=0,$.mode=p;case p:for(;de<32;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>8&255,qe[2]=oe>>>16&255,qe[3]=oe>>>24&255,$.check=t($.check,qe,4,0)),oe=0,de=0,$.mode=_;case _:for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<>8),512&$.flags&&(qe[0]=255&oe,qe[1]=oe>>>8&255,$.check=t($.check,qe,2,0)),oe=0,de=0,$.mode=y;case y:if(1024&$.flags){for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>8&255,$.check=t($.check,qe,2,0)),oe=0,de=0}else $.head&&($.head.extra=null);$.mode=z;case z:if(1024&$.flags&&((ke=$.length)>ne&&(ke=ne),ke&&($.head&&(_e=$.head.extra_len-$.length,$.head.extra||($.head.extra=new Array($.head.extra_len)),e.arraySet($.head.extra,ee,ie,ke,_e)),512&$.flags&&($.check=t($.check,ee,ke,ie)),ne-=ke,ie+=ke,$.length-=ke),$.length))break e;$.length=0,$.mode=B;case B:if(2048&$.flags){if(0===ne)break e;ke=0;do{_e=ee[ie+ke++],$.head&&_e&&$.length<65536&&($.head.name+=String.fromCharCode(_e))}while(_e&&ke>9&1,$.head.done=!0),Y.adler=$.check=0,$.mode=R;break;case C:for(;de<32;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=7&de,de-=7&de,$.mode=Q;break}for(;de<3;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=1)){case 0:$.mode=A;break;case 1:if(ce($),$.mode=N,Z===f){oe>>>=2,de-=2;break e}break;case 2:$.mode=G;break;case 3:Y.msg="invalid block type",$.mode=V}oe>>>=2,de-=2;break;case A:for(oe>>>=7&de,de-=7&de;de<32;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>16^65535)){Y.msg="invalid stored block lengths",$.mode=V;break}if($.length=65535&oe,oe=0,de=0,$.mode=D,Z===f)break e;case D:$.mode=E;case E:if(ke=$.length){if(ke>ne&&(ke=ne),ke>re&&(ke=re),0===ke)break e;e.arraySet(te,ee,ie,ke,se),ne-=ke,ie+=ke,re-=ke,se+=ke,$.length-=ke;break}$.mode=R;break;case G:for(;de<14;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=5,de-=5,$.ndist=1+(31&oe),oe>>>=5,de-=5,$.ncode=4+(15&oe),oe>>>=4,de-=4,$.nlen>286||$.ndist>30){Y.msg="too many length or distance symbols",$.mode=V;break}$.have=0,$.mode=H;case H:for(;$.have<$.ncode;){for(;de<3;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=3,de-=3}for(;$.have<19;)$.lens[Ce[$.have++]]=0;if($.lencode=$.lendyn,$.lenbits=7,ze={bits:$.lenbits},ye=s(n,$.lens,0,19,$.lencode,0,$.work,ze),$.lenbits=ze.bits,ye){Y.msg="invalid code lengths set",$.mode=V;break}$.have=0,$.mode=K;case K:for(;$.have<$.nlen+$.ndist;){for(;ue=(Se=$.lencode[oe&(1<<$.lenbits)-1])>>>16&255,ge=65535&Se,!((we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=we,de-=we,$.lens[$.have++]=ge;else{if(16===ge){for(Be=we+2;de>>=we,de-=we,0===$.have){Y.msg="invalid bit length repeat",$.mode=V;break}_e=$.lens[$.have-1],ke=3+(3&oe),oe>>>=2,de-=2}else if(17===ge){for(Be=we+3;de>>=we)),oe>>>=3,de-=3}else{for(Be=we+7;de>>=we)),oe>>>=7,de-=7}if($.have+ke>$.nlen+$.ndist){Y.msg="invalid bit length repeat",$.mode=V;break}for(;ke--;)$.lens[$.have++]=_e}}if($.mode===V)break;if(0===$.lens[256]){Y.msg="invalid code -- missing end-of-block",$.mode=V;break}if($.lenbits=9,ze={bits:$.lenbits},ye=s(r,$.lens,0,$.nlen,$.lencode,0,$.work,ze),$.lenbits=ze.bits,ye){Y.msg="invalid literal/lengths set",$.mode=V;break}if($.distbits=6,$.distcode=$.distdyn,ze={bits:$.distbits},ye=s(o,$.lens,$.nlen,$.ndist,$.distcode,0,$.work,ze),$.distbits=ze.bits,ye){Y.msg="invalid distances set",$.mode=V;break}if($.mode=N,Z===f)break e;case N:$.mode=F;case F:if(ne>=6&&re>=258){Y.next_out=se,Y.avail_out=re,Y.next_in=ie,Y.avail_in=ne,$.hold=oe,$.bits=de,i(Y,fe),se=Y.next_out,te=Y.output,re=Y.avail_out,ie=Y.next_in,ee=Y.input,ne=Y.avail_in,oe=$.hold,de=$.bits,$.mode===R&&($.back=-1);break}for($.back=0;ue=(Se=$.lencode[oe&(1<<$.lenbits)-1])>>>16&255,ge=65535&Se,!((we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>ve)])>>>16&255,ge=65535&Se,!(ve+(we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=ve,de-=ve,$.back+=ve}if(oe>>>=we,de-=we,$.back+=we,$.length=ge,0===ue){$.mode=P;break}if(32&ue){$.back=-1,$.mode=R;break}if(64&ue){Y.msg="invalid literal/length code",$.mode=V;break}$.extra=15&ue,$.mode=J;case J:if($.extra){for(Be=$.extra;de>>=$.extra,de-=$.extra,$.back+=$.extra}$.was=$.length,$.mode=L;case L:for(;ue=(Se=$.distcode[oe&(1<<$.distbits)-1])>>>16&255,ge=65535&Se,!((we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>ve)])>>>16&255,ge=65535&Se,!(ve+(we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=ve,de-=ve,$.back+=ve}if(oe>>>=we,de-=we,$.back+=we,64&ue){Y.msg="invalid distance code",$.mode=V;break}$.offset=ge,$.extra=15&ue,$.mode=M;case M:if($.extra){for(Be=$.extra;de>>=$.extra,de-=$.extra,$.back+=$.extra}if($.offset>$.dmax){Y.msg="invalid distance too far back",$.mode=V;break}$.mode=O;case O:if(0===re)break e;if(ke=fe-re,$.offset>ke){if((ke=$.offset-ke)>$.whave&&$.sane){Y.msg="invalid distance too far back",$.mode=V;break}ke>$.wnext?(ke-=$.wnext,be=$.wsize-ke):be=$.wnext-ke,ke>$.length&&(ke=$.length),me=$.window}else me=te,be=se-$.offset,ke=$.length;ke>re&&(ke=re),re-=ke,$.length-=ke;do{te[se++]=me[be++]}while(--ke);0===$.length&&($.mode=F);break;case P:if(0===re)break e;te[se++]=$.length,re--,$.mode=F;break;case Q:if($.wrap){for(;de<32;){if(0===ne)break e;ne--,oe|=ee[ie++]<=0&&u.windowBits<16&&(u.windowBits=-u.windowBits,0===u.windowBits&&(u.windowBits=-15)),!(u.windowBits>=0&&u.windowBits<16)||n&&n.windowBits||(u.windowBits+=32),u.windowBits>15&&u.windowBits<48&&0==(15&u.windowBits)&&(u.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new e,this.strm.avail_out=0;var h=t.inflateInit2(this.strm,u.windowBits);if(h!==s.Z_OK)throw new Error(r[h]);this.header=new o,t.inflateGetHeader(this.strm,this.header)}function h(t,i){var n=new a(i);if(n.push(t,!0),n.err)throw n.msg||r[n.err];return n.result}function _(t,i){return(i=i||{}).raw=!0,h(t,i)}a.prototype.push=function(r,e){var o,a,h,_,w,l,d=this.strm,f=this.options.chunkSize,p=this.options.dictionary,c=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof r?d.input=n.binstring2buf(r):"[object ArrayBuffer]"===u.call(r)?d.input=new Uint8Array(r):d.input=r,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(f),d.next_out=0,d.avail_out=f),(o=t.inflate(d,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(l="string"==typeof p?n.string2buf(p):"[object ArrayBuffer]"===u.call(p)?new Uint8Array(p):p,o=t.inflateSetDictionary(this.strm,l)),o===s.Z_BUF_ERROR&&!0===c&&(o=s.Z_OK,c=!1),o!==s.Z_STREAM_END&&o!==s.Z_OK)return this.onEnd(o),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&o!==s.Z_STREAM_END&&(0!==d.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(h=n.utf8border(d.output,d.next_out),_=d.next_out-h,w=n.buf2string(d.output,h),d.next_out=_,d.avail_out=f-_,_&&i.arraySet(d.output,d.output,h,_,0),this.onData(w)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(c=!0)}while((d.avail_in>0||0===d.avail_out)&&o!==s.Z_STREAM_END);return o===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(o=t.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),d.avail_out=0,!0)},a.prototype.onData=function(t){this.chunks.push(t)},a.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},exports.Inflate=a,exports.inflate=h,exports.inflateRaw=_,exports.ungzip=h; -},{"./zlib/inflate":"GIDK","./utils/common":"tbG5","./utils/strings":"Q3ZD","./zlib/constants":"xUUw","./zlib/messages":"gMAY","./zlib/zstream":"bdtv","./zlib/gzheader":"WIli"}],"f4vO":[function(require,module,exports) { -"use strict";var e=require("./lib/utils/common").assign,i=require("./lib/deflate"),r=require("./lib/inflate"),l=require("./lib/zlib/constants"),s={};e(s,i,r,l),module.exports=s; -},{"./lib/utils/common":"tbG5","./lib/deflate":"nFS2","./lib/inflate":"faQk","./lib/zlib/constants":"xUUw"}],"DstG":[function(require,module,exports) { -!function(e){var a=String.fromCharCode;function s(e,s,c){for(var n=e[s],r=1,i=0,t=0;t=32&&n<=126?"Unexpected character "+a(n)+" in JSON at position "+s+" (line "+r+", column "+i+")":"Unexpected byte 0x"+n.toString(16)+" in JSON at position "+s+" (line "+r+", column "+i+")"))}e.JSON_parse=function(e){if(!(e instanceof Uint8Array))throw new Error("JSON input must be a Uint8Array");for(var c,n=[],r=[],i=[],t=e.length,o=null,u=0,f=0;f=t&&s(e,t),34!==(p=e[f++]);)if(92===p)switch(e[f++]){case 34:l+='"';break;case 47:l+="/";break;case 92:l+="\\";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+="\n";break;case 114:l+="\r";break;case 116:l+="\t";break;case 117:for(var k=0,h=0;h<4;h++)k<<=4,(p=e[f++])>=48&&p<=57?k|=p-48:p>=97&&p<=102?k|=p+-87:p>=65&&p<=70?k|=p+-55:s(e,--f);l+=a(k);break;default:s(e,--f)}else if(p<=127)l+=a(p);else if(192==(224&p))l+=a((31&p)<<6|63&e[f++]);else if(224==(240&p))l+=a((15&p)<<12|(63&e[f++])<<6|63&e[f++]);else if(240==(248&p)){var d=(7&p)<<18|(63&e[f++])<<12|(63&e[f++])<<6|63&e[f++];d>65535&&(l+=a((d-=65536)>>10&1023|55296),d=56320|1023&d),l+=a(d)}l[0];break;case 91:l=[],n.push(o),r.push(c),i.push(u),o=null,c=l,u=1;continue;case 123:l={},n.push(o),r.push(c),i.push(u),o=null,c=l,u=2;continue;case 93:1!==u&&s(e,--f),l=c,o=n.pop(),c=r.pop(),u=i.pop();break;case 125:2!==u&&s(e,--f),l=c,o=n.pop(),c=r.pop(),u=i.pop();break;default:s(e,--f)}for(p=e[f];p<=32;)p=e[++f];switch(u){case 0:if(f===t)return l;break;case 1:if(c.push(l),44===p){f++;continue}if(93===p)continue;break;case 2:if(null===o){if(o=l,58===p){f++;continue}}else{if(c[o]=l,o=null,44===p){f++;continue}if(125===p)continue}}break}}s(e,f)}}("undefined"!=typeof exports?exports:this); -},{}],"QTYz":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withMockedFileChunkSizeForTests=o,exports.MaybeCompressedDataReader=exports.TextProfileDataSource=exports.StringBackedTextFileContent=exports.BufferBackedTextFileContent=void 0;var e=n(require("pako")),t=require("uint8array-json-parser");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=r();if(t&&t.has(e))return t.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}var s=function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{a(n.next(e))}catch(t){i(t)}}function u(e){try{a(n.throw(e))}catch(t){i(t)}}function a(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(o,u)}a((n=n.apply(e,t||[])).next())})};let i=1<<27;function o(e,t){return s(this,void 0,void 0,function*(){const r=i;i=e;try{yield t()}finally{i=r}})}function u(e){return"["===(e=e.trim())[0]&&"]"!==(e=e.replace(/,\s*$/,""))[e.length-1]&&(e+="]"),JSON.parse(e)}function a(e){let r=0;for(let t=0;t0&&/\s/.exec(String.fromCharCode(e[t-1]));)t--;if(","===String.fromCharCode(e[t-1])&&t--,"]"!==String.fromCharCode(e[t-1])){const r=new Uint8Array(t+1);r.set(e.subarray(0,t)),r[t]="]".charCodeAt(0),e=r}}return(0,t.JSON_parse)(e)}class c{constructor(e){this.chunks=[];const t=this.byteArray=new Uint8Array(e);let r="utf-8";if(t.length>2&&(255===t[0]&&254===t[1]?r="utf-16le":254===t[0]&&255===t[1]&&(r="utf-16be")),"undefined"!=typeof TextDecoder){const t=new TextDecoder(r);for(let r=0;r=i&&this.chunks.push("")}}splitLines(){return{[Symbol.iterator]:function*(){let e="";for(let t of this.chunks){const r=t.split("\n");for(let t=0;ts(this,void 0,void 0,function*(){try{return e.inflate(new Uint8Array(t)).buffer}catch(r){return t}}))}name(){return s(this,void 0,void 0,function*(){return yield this.namePromise})}readAsArrayBuffer(){return s(this,void 0,void 0,function*(){return yield this.uncompressedData})}readAsText(){return s(this,void 0,void 0,function*(){const e=yield this.readAsArrayBuffer();return new c(e)})}static fromFile(e){const t=new Promise(t=>{const r=new FileReader;r.addEventListener("loadend",()=>{if(!(r.result instanceof ArrayBuffer))throw new Error("Expected reader.result to be an instance of ArrayBuffer");t(r.result)}),r.readAsArrayBuffer(e)});return new l(Promise.resolve(e.name),t)}static fromArrayBuffer(e,t){return new l(Promise.resolve(e),Promise.resolve(t))}}exports.MaybeCompressedDataReader=l; -},{"pako":"f4vO","uint8array-json-parser":"DstG"}],"G28U":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromInstrumentsDeepCopy=a,exports.importFromInstrumentsTrace=w,exports.importRunFromInstrumentsTrace=g,exports.importThreadFromInstrumentsTrace=b,exports.readInstrumentsKeyedArchive=y,exports.decodeUTF8=v,exports.UID=void 0;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters"),n=require("./utils"),s=function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(o,a)}c((n=n.apply(e,t||[])).next())})};function i(e){const t=[...e.splitLines()].map(e=>e.split("\t")),r=t.shift();if(!r)return[];const n=new Map;for(let i=0;i0;){const e=c.pop();l=Math.max(l,e.endValue),s.leaveFrame(e,l)}return"Bytes Used"in a[0]?s.setValueFormatter(new r.ByteFormatter):("Weight"in a[0]||"Running Time"in a[0])&&s.setValueFormatter(new r.TimeFormatter("milliseconds")),s.build()}function c(e){return s(this,void 0,void 0,function*(){const t={name:e.name,files:new Map,subdirectories:new Map},r=yield new Promise((t,r)=>{e.createReader().readEntries(e=>{t(e)},r)});for(let e of r)if(e.isDirectory){const r=yield c(e);t.subdirectories.set(r.name,r)}else{const r=yield new Promise((t,r)=>{e.file(t,r)});t.files.set(r.name,r)}return t})}function l(e){return n.MaybeCompressedDataReader.fromFile(e).readAsArrayBuffer()}function u(e){return n.MaybeCompressedDataReader.fromFile(e).readAsText()}function f(e,r){const n=(0,t.getOrThrow)(e.subdirectories,"corespace"),s=(0,t.getOrThrow)(n.subdirectories,`run${r}`);return(0,t.getOrThrow)(s.subdirectories,"core")}class h{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)}}function p(e){return s(this,void 0,void 0,function*(){const r=(0,t.getOrThrow)(e.subdirectories,"stores");for(let e of r.subdirectories.values()){const r=e.files.get("schema.xml");if(!r)continue;const n=yield u(r);if(!/name="time-profile"/.exec(n.firstChunk()))continue;const s=new h(yield l((0,t.getOrThrow)(e.files,"bulkstore")));s.readUint32(),s.readUint32(),s.readUint32();const i=s.readUint32(),o=s.readUint32();s.seek(i);const a=[];for(;;){const e=s.readUint48();if(0===e)break;const t=s.readUint32();s.skip(o-6-4-4);const r=s.readUint32();a.push({timestamp:e,threadID:t,backtraceID:r})}return a}throw new Error("Could not find sample list")})}function d(e,r){return s(this,void 0,void 0,function*(){const e=(0,t.getOrThrow)(r.subdirectories,"uniquing"),n=(0,t.getOrThrow)(e.subdirectories,"arrayUniquer"),s=(0,t.getOrThrow)(n.files,"integeruniquer.index"),i=(0,t.getOrThrow)(n.files,"integeruniquer.data"),o=new h(yield l(s)),a=new h(yield l(i));o.seek(32);let c=[];for(;o.hasMore();){const e=o.readUint32()+1048576*o.readUint32();if(0===e)continue;a.seek(e);let t=a.readUint32(),r=[];for(;t--;)r.push(a.readUint64());c.push(r)}return c})}function m(e){return s(this,void 0,void 0,function*(){const r=(0,t.getOrThrow)(e.files,"form.template"),n=y(yield l(r)),s=n["com.apple.xray.owner.template.version"];let i=1;"com.apple.xray.owner.template"in n&&(i=n["com.apple.xray.owner.template"].get("_selectedRunNumber"));let o=n.$1;"stubInfoByUUID"in n&&(o=Array.from(n.stubInfoByUUID.keys())[0]);const a=n["com.apple.xray.run.data"],c=[];for(let e of a.runNumbers){const r=(0,t.getOrThrow)(a.runData,e),n=(0,t.getOrThrow)(r,"symbolsByPid"),s=new Map;for(let i of n.values()){for(let e of i.symbols){if(!e)continue;const{sourcePath:r,symbolName:n,addressToLine:i}=e;for(let e of i.keys())(0,t.getOrInsert)(s,e,()=>{const s=n||`0x${(0,t.zeroPad)(e.toString(16),16)}`,i={key:`${r}:${s}`,name:s};return r&&(i.file=r),i})}c.push({number:e,addressToFrameMap:s})}}return{version:s,instrument:o,selectedRunNumber:i,runs:c}})}function w(e){return s(this,void 0,void 0,function*(){const t=yield c(e),{version:r,runs:n,instrument:s,selectedRunNumber:i}=yield m(t);if("com.apple.xray.instrument-type.coresampler2"!==s)throw new Error(`The only supported instrument from .trace import is "com.apple.xray.instrument-type.coresampler2". Got ${s}`);console.log("version: ",r),console.log("Importing time profile");const o=[];let a=0;for(let c of n){const{addressToFrameMap:r,number:n}=c,s=yield g({fileName:e.name,tree:t,addressToFrameMap:r,runNumber:n});c.number===i&&(a=o.length+s.indexToView),o.push(...s.profiles)}return{name:e.name,indexToView:a,profiles:o}})}function g(e){return s(this,void 0,void 0,function*(){const{fileName:r,tree:n,addressToFrameMap:s,runNumber:i}=e,o=f(n,i);let a=yield p(o);const c=yield d(a,o),l=new Map;for(let e of a)l.set(e.threadID,(0,t.getOrElse)(l,e.threadID,()=>0)+1);const u=Array.from(l.entries());(0,t.sortBy)(u,e=>-e[1]);const h=u.map(e=>e[0]);return{name:r,indexToView:0,profiles:h.map(e=>b({threadID:e,fileName:r,arrays:c,addressToFrameMap:s,samples:a}))}})}function b(n){let{fileName:s,addressToFrameMap:i,arrays:o,threadID:a,samples:c}=n;const l=new Map;c=c.filter(e=>e.threadID===a);const u=new e.StackListProfileBuilder((0,t.lastOf)(c).timestamp);function f(e,r){const n=i.get(e);if(n)r.push(n);else if(e in o)for(let t of o[e])f(t,r);else{const n={key:e,name:`0x${(0,t.zeroPad)(e.toString(16),16)}`};i.set(e,n),r.push(n)}}u.setName(`${s} - thread ${a}`);let h=null;for(let e of c){const r=(0,t.getOrInsert)(l,e.backtraceID,e=>{const t=[];return f(e,t),t.reverse(),t});if(null===h&&(u.appendSampleWithWeight([],e.timestamp),h=e.timestamp),e.timestamp{switch(e){case"NSTextStorage":case"NSParagraphStyle":case"NSFont":return null;case"PFTSymbolData":{const e=Object.create(null);e.symbolName=t.$0,e.sourcePath=t.$1,e.addressToLine=new Map;for(let r=3;;r+=2){const n=t["$"+r],s=t["$"+(r+1)];if(null==n||null==s)break;e.addressToLine.set(n,s)}return e}case"PFTOwnerData":{const e=Object.create(null);return e.ownerName=t.$0,e.ownerPath=t.$1,e}case"PFTPersistentSymbols":{const e=Object.create(null),r=t.$4;e.threadNames=t.$3,e.symbols=[];for(let n=1;ne)){if(1e5!==e.$version||"NSKeyedArchiver"!==e.$archiver||!U(e.$top)||!S(e.$objects))throw new Error("Invalid keyed archive");"$null"===e.$objects[0]&&(e.$objects[0]=null);for(let n=0;n{if(t instanceof x)return e.$objects[t.index];if(S(t))for(let e=0;ee)){if(U(t)&&t.$class){let n=N(e,t.$class).$classname;switch(n){case"NSDecimalNumberPlaceholder":{let e=t["NS.length"],r=t["NS.exponent"],n=t["NS.mantissa.bo"],s=t["NS.negative"],i=new Uint16Array(new Uint8Array(t["NS.mantissa"]).buffer),o=0;for(let t=0;t>8|(255&e)<<8),o+=e*Math.pow(65536,t)}return o*=Math.pow(10,r),s?-o:o}case"NSData":case"NSMutableData":return t["NS.bytes"]||t["NS.data"];case"NSString":case"NSMutableString":return t["NS.string"]?t["NS.string"]:t["NS.bytes"]?v(t["NS.bytes"]):(console.warn(`Unexpected ${n} format: `,t),null);case"NSArray":case"NSMutableArray":if("NS.objects"in t)return t["NS.objects"];let e=[];for(;;){let r="NS.object."+e.length;if(!(r in t))break;e.push(t[r])}return e;case"_NSKeyedCoderOldStyleArray":{const e=t["NS.count"];let r=[];for(let n=0;n>4){case 0:return this.parseSingleton(e,r);case 1:return this.parseInteger(e,1<({key:e,name:e})),duration:parseInt(i,10)})}return t}function r(r){const n=t(r),i=n.reduce((e,t)=>e+t.duration,0),o=new e.StackListProfileBuilder(i);if(0===n.length)return null;for(let e of n)o.appendSampleWithWeight(e.stack,e.duration);return o.build()} -},{"../lib/profile":"YG8z"}],"uNW1":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromFirefox=l;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters");function l(l){const n=l.profile,s=1===n.threads.length?n.threads[0]:n.threads.filter(e=>"GeckoMain"===e.name)[0],a=new Map;function o(e){let r=e[0];const l=[];for(;null!=r;){const e=s.stackTable.data[r],[t,n]=e;l.push(n),r=t}return l.reverse(),l.map(e=>{const r=s.frameTable.data[e],l=s.stringTable[r[0]],n=/(.*)\s+\((.*?)(?::(\d+))?(?::(\d+))?\)$/.exec(l);return n?n[2].startsWith("resource:")||"self-hosted"===n[2]||n[2].startsWith("self-hosted:")?null:(0,t.getOrInsert)(a,l,()=>({key:l,name:n[1],file:n[2],line:n[3]?parseInt(n[3]):void 0,col:n[4]?parseInt(n[4])+1:void 0})):null}).filter(e=>null!=e)}const i=new e.CallTreeProfileBuilder(l.duration);let u=[];for(let e of s.samples.data){const t=o(e),r=e[1];let l=-1;for(let e=0;el;e--)i.leaveFrame(u[e],r);for(let e=l+1;e0?e[1]:t?`(anonymous ${t.split("/").pop()}:${a})`:"(anonymous)",file:t.length>0?t:"(unknown file)",line:a,col:n}}break}case"CODE":switch(e.kind){case"LoadIC":case"StoreIC":case"KeyedStoreIC":case"KeyedLoadIC":case"LoadGlobalIC":case"Handler":r="(IC) "+r;break;case"BytecodeHandler":r="(bytecode) ~"+r;break;case"Stub":r="(stub) "+r;break;case"Builtin":r="(builtin) "+r;break;case"RegExp":r="(regexp) "+r}break;default:r=`(${e.type}) ${r}`}return{key:r,name:r}}function n(n){const o=new e.StackListProfileBuilder,s=new Map;let c=0;(0,t.sortBy)(n.ticks,e=>e.tm);for(let e of n.ticks){const r=[];for(let o=e.s.length-2;o>=0;o-=2){const c=e.s[o];-1!==c&&(c>n.code.length?r.push({key:c,name:`0x${c.toString(16)}`}):r.push((i=c,(0,t.getOrInsert)(s,i,e=>a(n.code[e],n)))))}o.appendSampleWithWeight(r,e.tm-c),c=e.tm}var i;return o.setValueFormatter(new r.TimeFormatter("microseconds")),o.build()} -},{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"f2sa":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromLinuxPerf=l;var e=require("../lib/profile"),t=require("../lib/utils"),n=require("../lib/value-formatters");function*r(e){let t=[];for(let n of e.splitLines())""===n?(yield s(t),t=[]):t.push(n);t.length>0&&(yield s(t))}function s(e){const t=e.filter(e=>!/^\s*#/.exec(e)),n={command:null,processID:null,threadID:null,time:null,eventType:"",stack:[]},r=t.shift();if(!r)return null;const s=/^(\S.+?)\s+(\d+)(?:\/?(\d+))?\s+/.exec(r);if(!s)return null;n.command=s[1],s[3]?(n.processID=parseInt(s[2],10),n.threadID=parseInt(s[3],10)):n.threadID=parseInt(s[2],10);const l=/\s+(\d+\.\d+):\s+/.exec(r);l&&(n.time=parseFloat(l[1]));const i=/(\S+):\s*$/.exec(r);i&&(n.eventType=i[1]);for(let o of t){const e=/^\s*(\w+)\s*(.+) \((\S*)\)/.exec(o);if(!e)continue;let[,t,r,s]=e;r=r.replace(/\+0x[\da-f]+$/,""),n.stack.push({address:`0x${t}`,symbolName:r,file:s})}return n.stack.reverse(),n}function l(s){const l=new Map;let i=null;for(let o of r(s)){if(null==o)continue;if(null!=i&&i!=o.eventType)continue;if(null==o.time)continue;i=o.eventType;let r=[];o.command&&r.push(o.command),o.processID&&r.push(`pid: ${o.processID}`),o.threadID&&r.push(`tid: ${o.threadID}`);const s=r.join(" ");(0,t.getOrInsert)(l,s,()=>{const t=new e.StackListProfileBuilder;return t.setName(s),t.setValueFormatter(new n.TimeFormatter("seconds")),t}).appendSampleWithTimestamp(o.stack.map(({symbolName:e,file:t})=>({key:`${e} (${t})`,name:"[unknown]"===e?`??? (${t})`:e,file:t})),o.time)}return 0===l.size?null:{name:1===l.size?Array.from(l.keys())[0]:"",indexToView:0,profiles:Array.from((0,t.itMap)(l.values(),e=>e.build()))}} -},{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"jm73":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromHaskell=l;var e=require("../lib/profile"),r=require("../lib/value-formatters");function t(e,r,l,o,i){if(0===e.ticks&&0===e.entries&&0===e.alloc&&0===e.children.length)return r;let a=r,s=o.get(e.id);l.enterFrame(s,a);for(let n of e.children)a=t(n,a,l,o,i);return a+=i(e),l.leaveFrame(s,a),a}function l(l){const o=new Map;for(let e of l.cost_centres){const r={key:e.id,name:`${e.module}.${e.label}`};e.src_loc.startsWith("<")||(r.file=e.src_loc),o.set(e.id,r)}const i=new e.CallTreeProfileBuilder(l.total_ticks);t(l.profile,0,i,o,e=>e.ticks),i.setValueFormatter(new r.TimeFormatter("milliseconds")),i.setName(`${l.program} time`);const a=new e.CallTreeProfileBuilder(l.total_ticks);return t(l.profile,0,a,o,e=>e.alloc),a.setValueFormatter(new r.ByteFormatter),a.setName(`${l.program} allocation`),{name:l.program,indexToView:0,profiles:[i.build(),a.build()]}} -},{"../lib/profile":"YG8z","../lib/value-formatters":"LsM4"}],"jP3w":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromSafari=i;var e=require("../lib/profile"),r=require("../lib/value-formatters");function t(e){return e.map(({name:e,url:r,line:t,column:i})=>({key:`${e}:${r}:${t}:${i}`,file:r,line:t,col:i,name:e||(r?`(anonymous ${r.split("/").pop()}:${t})`:"(anonymous)")})).reverse()}function i(i){1!==i.version&&console.warn(`Unknown Safari profile version ${i.version}... Might be incompatible.`);const{recording:n}=i,{sampleStackTraces:a,sampleDurations:o}=n,s=a.length;if(s<1)return console.warn("Empty profile"),null;const l=a[s-1].timestamp-a[0].timestamp+o[0],m=new e.StackListProfileBuilder(l);let p=Number.MAX_VALUE;return a.forEach((e,r)=>{const i=e.timestamp,n=o[r],a=i-n-p;a>.002&&m.appendSampleWithWeight([],a),m.appendSampleWithWeight(t(e.stackFrames),n),p=i}),m.setValueFormatter(new r.TimeFormatter("seconds")),m.setName(n.displayName),m.build()} -},{"../lib/profile":"YG8z","../lib/value-formatters":"LsM4"}],"oU4k":[function(require,module,exports) { -"use strict";function n(n,e){for(var r=new Array(arguments.length-1),t=0,l=2,o=!0;l1&&"="===r.charAt(e);)++a;return Math.ceil(3*r.length)/4-a};for(var e=new Array(64),a=new Array(123),t=0;t<64;)a[e[t]=t<26?t+65:t<52?t+71:t<62?t-4:t-59|43]=t++;r.encode=function(r,a,t){for(var n,i=null,o=[],c=0,s=0;a>2],n=(3&h)<<4,s=1;break;case 1:o[c++]=e[n|h>>4],n=(15&h)<<2,s=2;break;case 2:o[c++]=e[n|h>>6],o[c++]=e[63&h],s=0}c>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),c=0)}return s&&(o[c++]=e[n],o[c++]=61,1===s&&(o[c++]=61)),i?(c&&i.push(String.fromCharCode.apply(String,o.slice(0,c))),i.join("")):String.fromCharCode.apply(String,o.slice(0,c))};var n="invalid encoding";r.decode=function(r,e,t){for(var i,o=t,c=0,s=0;s1)break;if(void 0===(h=a[h]))throw Error(n);switch(c){case 0:i=h,c=1;break;case 1:e[t++]=i<<2|(48&h)>>4,i=h,c=2;break;case 2:e[t++]=(15&i)<<4|(60&h)>>2,i=h,c=3;break;case 3:e[t++]=(3&i)<<6|h,c=0}}if(1===c)throw Error(n);return t-o},r.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}; -},{}],"wJQW":[function(require,module,exports) { -"use strict";function t(){this._listeners={}}module.exports=t,t.prototype.on=function(t,s,e){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:s,ctx:e||this}),this},t.prototype.off=function(t,s){if(void 0===t)this._listeners={};else if(void 0===s)this._listeners[t]=[];else for(var e=this._listeners[t],i=0;i0?0:2147483648,t,r);else if(isNaN(e))n(2143289344,t,r);else if(e>3.4028234663852886e38)n((o<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)n((o<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var u=Math.floor(Math.log(e)/Math.LN2);n((o<<31|u+127<<23|8388607&Math.round(e*Math.pow(2,-u)*8388608))>>>0,t,r)}}function i(n,e,t){var r=n(e,t),o=2*(r>>31)+1,u=r>>>23&255,i=8388607&r;return 255===u?i?NaN:o*(1/0):0===u?1.401298464324817e-45*o*i:o*Math.pow(2,u-150)*(i+8388608)}n.writeFloatLE=u.bind(null,e),n.writeFloatBE=u.bind(null,t),n.readFloatLE=i.bind(null,r),n.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),r=128===t[7];function o(n,r,o){e[0]=n,r[o]=t[0],r[o+1]=t[1],r[o+2]=t[2],r[o+3]=t[3],r[o+4]=t[4],r[o+5]=t[5],r[o+6]=t[6],r[o+7]=t[7]}function u(n,r,o){e[0]=n,r[o]=t[7],r[o+1]=t[6],r[o+2]=t[5],r[o+3]=t[4],r[o+4]=t[3],r[o+5]=t[2],r[o+6]=t[1],r[o+7]=t[0]}function i(n,r){return t[0]=n[r],t[1]=n[r+1],t[2]=n[r+2],t[3]=n[r+3],t[4]=n[r+4],t[5]=n[r+5],t[6]=n[r+6],t[7]=n[r+7],e[0]}function a(n,r){return t[7]=n[r],t[6]=n[r+1],t[5]=n[r+2],t[4]=n[r+3],t[3]=n[r+4],t[2]=n[r+5],t[1]=n[r+6],t[0]=n[r+7],e[0]}n.writeDoubleLE=r?o:u,n.writeDoubleBE=r?u:o,n.readDoubleLE=r?i:a,n.readDoubleBE=r?a:i}():function(){function u(n,e,t,r,o,u){var i=r<0?1:0;if(i&&(r=-r),0===r)n(0,o,u+e),n(1/r>0?0:2147483648,o,u+t);else if(isNaN(r))n(0,o,u+e),n(2146959360,o,u+t);else if(r>1.7976931348623157e308)n(0,o,u+e),n((i<<31|2146435072)>>>0,o,u+t);else{var a;if(r<2.2250738585072014e-308)n((a=r/5e-324)>>>0,o,u+e),n((i<<31|a/4294967296)>>>0,o,u+t);else{var l=Math.floor(Math.log(r)/Math.LN2);1024===l&&(l=1023),n(4503599627370496*(a=r*Math.pow(2,-l))>>>0,o,u+e),n((i<<31|l+1023<<20|1048576*a&1048575)>>>0,o,u+t)}}}function i(n,e,t,r,o){var u=n(r,o+e),i=n(r,o+t),a=2*(i>>31)+1,l=i>>>20&2047,f=4294967296*(1048575&i)+u;return 2047===l?f?NaN:a*(1/0):0===l?5e-324*a*f:a*Math.pow(2,l-1075)*(f+4503599627370496)}n.writeDoubleLE=u.bind(null,e,0,4),n.writeDoubleBE=u.bind(null,t,4,0),n.readDoubleLE=i.bind(null,r,0,4),n.readDoubleBE=i.bind(null,o,4,0)}(),n}function e(n,e,t){e[t]=255&n,e[t+1]=n>>>8&255,e[t+2]=n>>>16&255,e[t+3]=n>>>24}function t(n,e,t){e[t]=n>>>24,e[t+1]=n>>>16&255,e[t+2]=n>>>8&255,e[t+3]=255&n}function r(n,e){return(n[e]|n[e+1]<<8|n[e+2]<<16|n[e+3]<<24)>>>0}function o(n,e){return(n[e]<<24|n[e+1]<<16|n[e+2]<<8|n[e+3])>>>0}module.exports=n(n); -},{}],"XRF3":[function(require,module,exports) { -"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire; -},{}],"nie5":[function(require,module,exports) { -"use strict";var r=exports;r.length=function(r){for(var t=0,n=0,e=0;e191&&e<224?a[i++]=(31&e)<<6|63&r[t++]:e>239&&e<365?(e=((7&e)<<18|(63&r[t++])<<12|(63&r[t++])<<6|63&r[t++])-65536,a[i++]=55296+(e>>10),a[i++]=56320+(1023&e)):a[i++]=(15&e)<<12|(63&r[t++])<<6|63&r[t++],i>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),i=0);return o?(i&&o.push(String.fromCharCode.apply(String,a.slice(0,i))),o.join("")):String.fromCharCode.apply(String,a.slice(0,i))},r.write=function(r,t,n){for(var e,o,a=n,i=0;i>6|192,t[n++]=63&e|128):55296==(64512&e)&&56320==(64512&(o=r.charCodeAt(i+1)))?(e=65536+((1023&e)<<10)+(1023&o),++i,t[n++]=e>>18|240,t[n++]=e>>12&63|128,t[n++]=e>>6&63|128,t[n++]=63&e|128):(t[n++]=e>>12|224,t[n++]=e>>6&63|128,t[n++]=63&e|128);return n-a}; -},{}],"YX4y":[function(require,module,exports) { -"use strict";function r(r,n,t){var u=t||8192,e=u>>>1,l=null,c=u;return function(t){if(t<1||t>e)return r(t);c+t>u&&(l=r(u),c=0);var i=n.call(l,c,c+=t);return 7&c&&(c=1+(7|c)),i}}module.exports=r; -},{}],"Ty7D":[function(require,module,exports) { -"use strict";module.exports=i;var t=require("../util/minimal");function i(t,i){this.lo=t>>>0,this.hi=i>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var r=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return o;var r=t<0;r&&(t=-t);var h=t>>>0,n=(t-h)/4294967296>>>0;return r&&(n=~n>>>0,h=~h>>>0,++h>4294967295&&(h=0,++n>4294967295&&(n=0))),new i(h,n)},i.from=function(r){if("number"==typeof r)return i.fromNumber(r);if(t.isString(r)){if(!t.Long)return i.fromNumber(parseInt(r,10));r=t.Long.fromString(r)}return r.low||r.high?new i(r.low>>>0,r.high>>>0):o},i.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var i=1+~this.lo>>>0,o=~this.hi>>>0;return i||(o=o+1>>>0),-(i+4294967296*o)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(i){return t.Long?new t.Long(0|this.lo,0|this.hi,Boolean(i)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(i)}};var h=String.prototype.charCodeAt;i.fromHash=function(t){return t===r?o:new i((h.call(t,0)|h.call(t,1)<<8|h.call(t,2)<<16|h.call(t,3)<<24)>>>0,(h.call(t,4)|h.call(t,5)<<8|h.call(t,6)<<16|h.call(t,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},i.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},i.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return 0===o?0===i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:o<128?9:10}; -},{"../util/minimal":"KgKa"}],"yh9p":[function(require,module,exports) { -"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;au?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63; -},{}],"JgNJ":[function(require,module,exports) { -exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; -},{}],"REa7":[function(require,module,exports) { -var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}; -},{}],"dskh":[function(require,module,exports) { - -var global = arguments[3]; -var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;of&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;ci)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;nn)&&(e=n);for(var i="",o=r;oe)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t} -},{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"REa7","buffer":"dskh"}],"KgKa":[function(require,module,exports) { -var global = arguments[3]; -var Buffer = require("buffer").Buffer; -var e=arguments[3],r=require("buffer").Buffer,t=exports;function n(e,r,t){for(var n=Object.keys(r),o=0;o0)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(r){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var n=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(n.lo,n.hi,r):n.toNumber(Boolean(r))},t.merge=n,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=o,t.ProtocolError=o("ProtocolError"),t.oneOfGetter=function(e){for(var r={},t=0;t-1;--t)if(1===r[e[t]]&&void 0!==this[e[t]]&&null!==this[e[t]])return e[t]}},t.oneOfSetter=function(e){return function(r){for(var t=0;t127;)i[n++]=127&t|128,t>>>=7;i[n]=t}function a(t,i){this.len=t,this.next=void 0,this.val=i}function f(t,i,n){for(;t.hi;)i[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)i[n++]=127&t.lo|128,t.lo=t.lo>>>7;i[n++]=t.lo}function c(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}u.create=i.Buffer?function(){return(u.create=function(){return new t})()}:function(){return new u},u.alloc=function(t){return new i.Array(t)},i.Array!==Array&&(u.alloc=i.pool(u.alloc,i.Array.prototype.subarray)),u.prototype._push=function(t,i,n){return this.tail=this.tail.next=new r(t,i,n),this.len+=i,this},a.prototype=Object.create(r.prototype),a.prototype.fn=p,u.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new a((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},u.prototype.int32=function(t){return t<0?this._push(f,10,n.fromNumber(t)):this.uint32(t)},u.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},u.prototype.uint64=function(t){var i=n.from(t);return this._push(f,i.length(),i)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(t){var i=n.from(t).zzEncode();return this._push(f,i.length(),i)},u.prototype.bool=function(t){return this._push(l,1,t?1:0)},u.prototype.fixed32=function(t){return this._push(c,4,t>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(t){var i=n.from(t);return this._push(c,4,i.lo)._push(c,4,i.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(t){return this._push(i.float.writeFloatLE,4,t)},u.prototype.double=function(t){return this._push(i.float.writeDoubleLE,8,t)};var y=i.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var e=0;e>>0;if(!n)return this._push(l,1,0);if(i.isString(t)){var o=u.alloc(n=e.length(t));e.decode(t,o,0),t=o}return this.uint32(n)._push(y,n,t)},u.prototype.string=function(t){var i=o.length(t);return i?this.uint32(i)._push(o.write,i,t):this._push(l,1,0)},u.prototype.fork=function(){return this.states=new h(this),this.head=this.tail=new r(s,0,0),this.len=0,this},u.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 r(s,0,0),this.len=0),this},u.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},u.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},u._configure=function(i){t=i}; -},{"./util/minimal":"KgKa"}],"BjCp":[function(require,module,exports) { - -"use strict";module.exports=n;var t=require("./writer");(n.prototype=Object.create(t.prototype)).constructor=n;var e=require("./util/minimal"),r=e.Buffer;function n(){t.call(this)}n.alloc=function(t){return(n.alloc=e._Buffer_allocUnsafe)(t)};var i=r&&r.prototype instanceof Uint8Array&&"set"===r.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n>>0;return this.uint32(r),r&&this._push(i,r,t),this},n.prototype.string=function(t){var e=r.byteLength(t);return this.uint32(e),e&&this._push(o,e,t),this}; -},{"./writer":"DEsF","./util/minimal":"KgKa"}],"z4LV":[function(require,module,exports) { -"use strict";module.exports=h;var t,i=require("./util/minimal"),s=i.LongBits,r=i.utf8;function o(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length}var n="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function e(){var t=new s(0,0),i=0;if(!(this.len-this.pos>4)){for(;i<3;++i){if(this.pos>=this.len)throw o(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,this.len-this.pos>4){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw o(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function u(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw o(this,8);return new s(u(this.buf,this.pos+=4),u(this.buf,this.pos+=4))}h.create=i.Buffer?function(s){return(h.create=function(s){return i.Buffer.isBuffer(s)?new t(s):n(s)})(s)}:n,h.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,h.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return t}}(),h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){return 0!==this.uint32()},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return u(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|u(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var t=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var t=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),i=this.pos,s=this.pos+t;if(s>this.len)throw o(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,s):i===s?new this.buf.constructor(0):this._slice.call(this.buf,i,s)},h.prototype.string=function(){var t=this.bytes();return r.read(t,0,t.length)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw o(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw o(this)}while(128&this.buf[this.pos++]);return this},h.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(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h._configure=function(s){t=s;var r=i.Long?"toLong":"toNumber";i.merge(h.prototype,{int64:function(){return e.call(this)[r](!1)},uint64:function(){return e.call(this)[r](!0)},sint64:function(){return e.call(this).zzDecode()[r](!1)},fixed64:function(){return f.call(this)[r](!0)},sfixed64:function(){return f.call(this)[r](!1)}})}; -},{"./util/minimal":"KgKa"}],"Rkr2":[function(require,module,exports) { -"use strict";module.exports=r;var t=require("./reader");(r.prototype=Object.create(t.prototype)).constructor=r;var e=require("./util/minimal");function r(e){t.call(this,e)}e.Buffer&&(r.prototype._slice=e.Buffer.prototype.slice),r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}; -},{"./reader":"z4LV","./util/minimal":"KgKa"}],"eoks":[function(require,module,exports) { -"use strict";module.exports=t;var e=require("../util/minimal");function t(t,r,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(r),this.responseDelimited=Boolean(i)}(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t,t.prototype.rpcCall=function t(r,i,n,o,l){if(!o)throw TypeError("request must be specified");var u=this;if(!l)return e.asPromise(t,u,r,i,n,o);if(u.rpcImpl)try{return u.rpcImpl(r,i[u.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,t){if(e)return u.emit("error",e,r),l(e);if(null!==t){if(!(t instanceof n))try{t=n[u.responseDelimited?"decodeDelimited":"decode"](t)}catch(e){return u.emit("error",e,r),l(e)}return u.emit("data",t,r),l(null,t)}u.end(!0)})}catch(c){return u.emit("error",c,r),void setTimeout(function(){l(c)},0)}else setTimeout(function(){l(Error("already ended"))},0)},t.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}; -},{"../util/minimal":"KgKa"}],"ay75":[function(require,module,exports) { -"use strict";var e=exports;e.Service=require("./rpc/service"); -},{"./rpc/service":"eoks"}],"Nr0F":[function(require,module,exports) { -"use strict";module.exports={}; -},{}],"qETn":[function(require,module,exports) { -"use strict";var r=exports;function e(){r.Reader._configure(r.BufferReader),r.util._configure()}r.build="minimal",r.Writer=require("./writer"),r.BufferWriter=require("./writer_buffer"),r.Reader=require("./reader"),r.BufferReader=require("./reader_buffer"),r.util=require("./util/minimal"),r.rpc=require("./rpc"),r.roots=require("./roots"),r.configure=e,r.Writer._configure(r.BufferWriter),e(); -},{"./writer":"DEsF","./writer_buffer":"BjCp","./reader":"z4LV","./reader_buffer":"Rkr2","./util/minimal":"KgKa","./rpc":"ay75","./roots":"Nr0F"}],"Myh2":[function(require,module,exports) { -"use strict";module.exports=require("./src/index-minimal"); -},{"./src/index-minimal":"qETn"}],"YdJi":[function(require,module,exports) { -"use strict";var e=require("protobufjs/minimal"),n=e.Reader,t=e.Writer,o=e.util,r=e.roots.default||(e.roots.default={});r.perftools=function(){var i,l={};return l.profiles=((i={}).Profile=function(){function i(e){if(this.sampleType=[],this.sample=[],this.mapping=[],this.location=[],this.function=[],this.stringTable=[],this.comment=[],e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.sampleType&&i.sampleType.length||(i.sampleType=[]),i.sampleType.push(r.perftools.profiles.ValueType.decode(e,e.uint32()));break;case 2:i.sample&&i.sample.length||(i.sample=[]),i.sample.push(r.perftools.profiles.Sample.decode(e,e.uint32()));break;case 3:i.mapping&&i.mapping.length||(i.mapping=[]),i.mapping.push(r.perftools.profiles.Mapping.decode(e,e.uint32()));break;case 4:i.location&&i.location.length||(i.location=[]),i.location.push(r.perftools.profiles.Location.decode(e,e.uint32()));break;case 5:i.function&&i.function.length||(i.function=[]),i.function.push(r.perftools.profiles.Function.decode(e,e.uint32()));break;case 6:i.stringTable&&i.stringTable.length||(i.stringTable=[]),i.stringTable.push(e.string());break;case 7:i.dropFrames=e.int64();break;case 8:i.keepFrames=e.int64();break;case 9:i.timeNanos=e.int64();break;case 10:i.durationNanos=e.int64();break;case 11:i.periodType=r.perftools.profiles.ValueType.decode(e,e.uint32());break;case 12:i.period=e.int64();break;case 13:if(i.comment&&i.comment.length||(i.comment=[]),2==(7&l))for(var s=e.uint32()+e.pos;e.pos>>0,e.dropFrames.high>>>0).toNumber())),null!=e.keepFrames&&(o.Long?(n.keepFrames=o.Long.fromValue(e.keepFrames)).unsigned=!1:"string"==typeof e.keepFrames?n.keepFrames=parseInt(e.keepFrames,10):"number"==typeof e.keepFrames?n.keepFrames=e.keepFrames:"object"==typeof e.keepFrames&&(n.keepFrames=new o.LongBits(e.keepFrames.low>>>0,e.keepFrames.high>>>0).toNumber())),null!=e.timeNanos&&(o.Long?(n.timeNanos=o.Long.fromValue(e.timeNanos)).unsigned=!1:"string"==typeof e.timeNanos?n.timeNanos=parseInt(e.timeNanos,10):"number"==typeof e.timeNanos?n.timeNanos=e.timeNanos:"object"==typeof e.timeNanos&&(n.timeNanos=new o.LongBits(e.timeNanos.low>>>0,e.timeNanos.high>>>0).toNumber())),null!=e.durationNanos&&(o.Long?(n.durationNanos=o.Long.fromValue(e.durationNanos)).unsigned=!1:"string"==typeof e.durationNanos?n.durationNanos=parseInt(e.durationNanos,10):"number"==typeof e.durationNanos?n.durationNanos=e.durationNanos:"object"==typeof e.durationNanos&&(n.durationNanos=new o.LongBits(e.durationNanos.low>>>0,e.durationNanos.high>>>0).toNumber())),null!=e.periodType){if("object"!=typeof e.periodType)throw TypeError(".perftools.profiles.Profile.periodType: object expected");n.periodType=r.perftools.profiles.ValueType.fromObject(e.periodType)}if(null!=e.period&&(o.Long?(n.period=o.Long.fromValue(e.period)).unsigned=!1:"string"==typeof e.period?n.period=parseInt(e.period,10):"number"==typeof e.period?n.period=e.period:"object"==typeof e.period&&(n.period=new o.LongBits(e.period.low>>>0,e.period.high>>>0).toNumber())),e.comment){if(!Array.isArray(e.comment))throw TypeError(".perftools.profiles.Profile.comment: array expected");for(n.comment=[],t=0;t>>0,e.comment[t].high>>>0).toNumber())}return null!=e.defaultSampleType&&(o.Long?(n.defaultSampleType=o.Long.fromValue(e.defaultSampleType)).unsigned=!1:"string"==typeof e.defaultSampleType?n.defaultSampleType=parseInt(e.defaultSampleType,10):"number"==typeof e.defaultSampleType?n.defaultSampleType=e.defaultSampleType:"object"==typeof e.defaultSampleType&&(n.defaultSampleType=new o.LongBits(e.defaultSampleType.low>>>0,e.defaultSampleType.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if((n.arrays||n.defaults)&&(t.sampleType=[],t.sample=[],t.mapping=[],t.location=[],t.function=[],t.stringTable=[],t.comment=[]),n.defaults){if(o.Long){var i=new o.Long(0,0,!1);t.dropFrames=n.longs===String?i.toString():n.longs===Number?i.toNumber():i}else t.dropFrames=n.longs===String?"0":0;o.Long?(i=new o.Long(0,0,!1),t.keepFrames=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.keepFrames=n.longs===String?"0":0,o.Long?(i=new o.Long(0,0,!1),t.timeNanos=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.timeNanos=n.longs===String?"0":0,o.Long?(i=new o.Long(0,0,!1),t.durationNanos=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.durationNanos=n.longs===String?"0":0,t.periodType=null,o.Long?(i=new o.Long(0,0,!1),t.period=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.period=n.longs===String?"0":0,o.Long?(i=new o.Long(0,0,!1),t.defaultSampleType=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.defaultSampleType=n.longs===String?"0":0}if(e.sampleType&&e.sampleType.length){t.sampleType=[];for(var l=0;l>>0,e.dropFrames.high>>>0).toNumber():e.dropFrames),null!=e.keepFrames&&e.hasOwnProperty("keepFrames")&&("number"==typeof e.keepFrames?t.keepFrames=n.longs===String?String(e.keepFrames):e.keepFrames:t.keepFrames=n.longs===String?o.Long.prototype.toString.call(e.keepFrames):n.longs===Number?new o.LongBits(e.keepFrames.low>>>0,e.keepFrames.high>>>0).toNumber():e.keepFrames),null!=e.timeNanos&&e.hasOwnProperty("timeNanos")&&("number"==typeof e.timeNanos?t.timeNanos=n.longs===String?String(e.timeNanos):e.timeNanos:t.timeNanos=n.longs===String?o.Long.prototype.toString.call(e.timeNanos):n.longs===Number?new o.LongBits(e.timeNanos.low>>>0,e.timeNanos.high>>>0).toNumber():e.timeNanos),null!=e.durationNanos&&e.hasOwnProperty("durationNanos")&&("number"==typeof e.durationNanos?t.durationNanos=n.longs===String?String(e.durationNanos):e.durationNanos:t.durationNanos=n.longs===String?o.Long.prototype.toString.call(e.durationNanos):n.longs===Number?new o.LongBits(e.durationNanos.low>>>0,e.durationNanos.high>>>0).toNumber():e.durationNanos),null!=e.periodType&&e.hasOwnProperty("periodType")&&(t.periodType=r.perftools.profiles.ValueType.toObject(e.periodType,n)),null!=e.period&&e.hasOwnProperty("period")&&("number"==typeof e.period?t.period=n.longs===String?String(e.period):e.period:t.period=n.longs===String?o.Long.prototype.toString.call(e.period):n.longs===Number?new o.LongBits(e.period.low>>>0,e.period.high>>>0).toNumber():e.period),e.comment&&e.comment.length)for(t.comment=[],l=0;l>>0,e.comment[l].high>>>0).toNumber():e.comment[l];return null!=e.defaultSampleType&&e.hasOwnProperty("defaultSampleType")&&("number"==typeof e.defaultSampleType?t.defaultSampleType=n.longs===String?String(e.defaultSampleType):e.defaultSampleType:t.defaultSampleType=n.longs===String?o.Long.prototype.toString.call(e.defaultSampleType):n.longs===Number?new o.LongBits(e.defaultSampleType.low>>>0,e.defaultSampleType.high>>>0).toNumber():e.defaultSampleType),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.ValueType=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.type=e.int64();break;case 2:i.unit=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!(o.isInteger(e.type)||e.type&&o.isInteger(e.type.low)&&o.isInteger(e.type.high))?"type: integer|Long expected":null!=e.unit&&e.hasOwnProperty("unit")&&!(o.isInteger(e.unit)||e.unit&&o.isInteger(e.unit.low)&&o.isInteger(e.unit.high))?"unit: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.ValueType)return e;var n=new r.perftools.profiles.ValueType;return null!=e.type&&(o.Long?(n.type=o.Long.fromValue(e.type)).unsigned=!1:"string"==typeof e.type?n.type=parseInt(e.type,10):"number"==typeof e.type?n.type=e.type:"object"==typeof e.type&&(n.type=new o.LongBits(e.type.low>>>0,e.type.high>>>0).toNumber())),null!=e.unit&&(o.Long?(n.unit=o.Long.fromValue(e.unit)).unsigned=!1:"string"==typeof e.unit?n.unit=parseInt(e.unit,10):"number"==typeof e.unit?n.unit=e.unit:"object"==typeof e.unit&&(n.unit=new o.LongBits(e.unit.low>>>0,e.unit.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!1);t.type=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.type=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.unit=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.unit=n.longs===String?"0":0}return null!=e.type&&e.hasOwnProperty("type")&&("number"==typeof e.type?t.type=n.longs===String?String(e.type):e.type:t.type=n.longs===String?o.Long.prototype.toString.call(e.type):n.longs===Number?new o.LongBits(e.type.low>>>0,e.type.high>>>0).toNumber():e.type),null!=e.unit&&e.hasOwnProperty("unit")&&("number"==typeof e.unit?t.unit=n.longs===String?String(e.unit):e.unit:t.unit=n.longs===String?o.Long.prototype.toString.call(e.unit):n.longs===Number?new o.LongBits(e.unit.low>>>0,e.unit.high>>>0).toNumber():e.unit),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Sample=function(){function i(e){if(this.locationId=[],this.value=[],this.label=[],e)for(var n=Object.keys(e),t=0;t>>3){case 1:if(i.locationId&&i.locationId.length||(i.locationId=[]),2==(7&l))for(var s=e.uint32()+e.pos;e.pos>>0,e.locationId[t].high>>>0).toNumber(!0))}if(e.value){if(!Array.isArray(e.value))throw TypeError(".perftools.profiles.Sample.value: array expected");for(n.value=[],t=0;t>>0,e.value[t].high>>>0).toNumber())}if(e.label){if(!Array.isArray(e.label))throw TypeError(".perftools.profiles.Sample.label: array expected");for(n.label=[],t=0;t>>0,e.locationId[i].high>>>0).toNumber(!0):e.locationId[i]}if(e.value&&e.value.length)for(t.value=[],i=0;i>>0,e.value[i].high>>>0).toNumber():e.value[i];if(e.label&&e.label.length)for(t.label=[],i=0;i>>3){case 1:i.key=e.int64();break;case 2:i.str=e.int64();break;case 3:i.num=e.int64();break;case 4:i.numUnit=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!(o.isInteger(e.key)||e.key&&o.isInteger(e.key.low)&&o.isInteger(e.key.high))?"key: integer|Long expected":null!=e.str&&e.hasOwnProperty("str")&&!(o.isInteger(e.str)||e.str&&o.isInteger(e.str.low)&&o.isInteger(e.str.high))?"str: integer|Long expected":null!=e.num&&e.hasOwnProperty("num")&&!(o.isInteger(e.num)||e.num&&o.isInteger(e.num.low)&&o.isInteger(e.num.high))?"num: integer|Long expected":null!=e.numUnit&&e.hasOwnProperty("numUnit")&&!(o.isInteger(e.numUnit)||e.numUnit&&o.isInteger(e.numUnit.low)&&o.isInteger(e.numUnit.high))?"numUnit: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Label)return e;var n=new r.perftools.profiles.Label;return null!=e.key&&(o.Long?(n.key=o.Long.fromValue(e.key)).unsigned=!1:"string"==typeof e.key?n.key=parseInt(e.key,10):"number"==typeof e.key?n.key=e.key:"object"==typeof e.key&&(n.key=new o.LongBits(e.key.low>>>0,e.key.high>>>0).toNumber())),null!=e.str&&(o.Long?(n.str=o.Long.fromValue(e.str)).unsigned=!1:"string"==typeof e.str?n.str=parseInt(e.str,10):"number"==typeof e.str?n.str=e.str:"object"==typeof e.str&&(n.str=new o.LongBits(e.str.low>>>0,e.str.high>>>0).toNumber())),null!=e.num&&(o.Long?(n.num=o.Long.fromValue(e.num)).unsigned=!1:"string"==typeof e.num?n.num=parseInt(e.num,10):"number"==typeof e.num?n.num=e.num:"object"==typeof e.num&&(n.num=new o.LongBits(e.num.low>>>0,e.num.high>>>0).toNumber())),null!=e.numUnit&&(o.Long?(n.numUnit=o.Long.fromValue(e.numUnit)).unsigned=!1:"string"==typeof e.numUnit?n.numUnit=parseInt(e.numUnit,10):"number"==typeof e.numUnit?n.numUnit=e.numUnit:"object"==typeof e.numUnit&&(n.numUnit=new o.LongBits(e.numUnit.low>>>0,e.numUnit.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!1);t.key=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.key=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.str=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.str=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.num=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.num=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.numUnit=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.numUnit=n.longs===String?"0":0}return null!=e.key&&e.hasOwnProperty("key")&&("number"==typeof e.key?t.key=n.longs===String?String(e.key):e.key:t.key=n.longs===String?o.Long.prototype.toString.call(e.key):n.longs===Number?new o.LongBits(e.key.low>>>0,e.key.high>>>0).toNumber():e.key),null!=e.str&&e.hasOwnProperty("str")&&("number"==typeof e.str?t.str=n.longs===String?String(e.str):e.str:t.str=n.longs===String?o.Long.prototype.toString.call(e.str):n.longs===Number?new o.LongBits(e.str.low>>>0,e.str.high>>>0).toNumber():e.str),null!=e.num&&e.hasOwnProperty("num")&&("number"==typeof e.num?t.num=n.longs===String?String(e.num):e.num:t.num=n.longs===String?o.Long.prototype.toString.call(e.num):n.longs===Number?new o.LongBits(e.num.low>>>0,e.num.high>>>0).toNumber():e.num),null!=e.numUnit&&e.hasOwnProperty("numUnit")&&("number"==typeof e.numUnit?t.numUnit=n.longs===String?String(e.numUnit):e.numUnit:t.numUnit=n.longs===String?o.Long.prototype.toString.call(e.numUnit):n.longs===Number?new o.LongBits(e.numUnit.low>>>0,e.numUnit.high>>>0).toNumber():e.numUnit),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Mapping=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.id=e.uint64();break;case 2:i.memoryStart=e.uint64();break;case 3:i.memoryLimit=e.uint64();break;case 4:i.fileOffset=e.uint64();break;case 5:i.filename=e.int64();break;case 6:i.buildId=e.int64();break;case 7:i.hasFunctions=e.bool();break;case 8:i.hasFilenames=e.bool();break;case 9:i.hasLineNumbers=e.bool();break;case 10:i.hasInlineFrames=e.bool();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!(o.isInteger(e.id)||e.id&&o.isInteger(e.id.low)&&o.isInteger(e.id.high))?"id: integer|Long expected":null!=e.memoryStart&&e.hasOwnProperty("memoryStart")&&!(o.isInteger(e.memoryStart)||e.memoryStart&&o.isInteger(e.memoryStart.low)&&o.isInteger(e.memoryStart.high))?"memoryStart: integer|Long expected":null!=e.memoryLimit&&e.hasOwnProperty("memoryLimit")&&!(o.isInteger(e.memoryLimit)||e.memoryLimit&&o.isInteger(e.memoryLimit.low)&&o.isInteger(e.memoryLimit.high))?"memoryLimit: integer|Long expected":null!=e.fileOffset&&e.hasOwnProperty("fileOffset")&&!(o.isInteger(e.fileOffset)||e.fileOffset&&o.isInteger(e.fileOffset.low)&&o.isInteger(e.fileOffset.high))?"fileOffset: integer|Long expected":null!=e.filename&&e.hasOwnProperty("filename")&&!(o.isInteger(e.filename)||e.filename&&o.isInteger(e.filename.low)&&o.isInteger(e.filename.high))?"filename: integer|Long expected":null!=e.buildId&&e.hasOwnProperty("buildId")&&!(o.isInteger(e.buildId)||e.buildId&&o.isInteger(e.buildId.low)&&o.isInteger(e.buildId.high))?"buildId: integer|Long expected":null!=e.hasFunctions&&e.hasOwnProperty("hasFunctions")&&"boolean"!=typeof e.hasFunctions?"hasFunctions: boolean expected":null!=e.hasFilenames&&e.hasOwnProperty("hasFilenames")&&"boolean"!=typeof e.hasFilenames?"hasFilenames: boolean expected":null!=e.hasLineNumbers&&e.hasOwnProperty("hasLineNumbers")&&"boolean"!=typeof e.hasLineNumbers?"hasLineNumbers: boolean expected":null!=e.hasInlineFrames&&e.hasOwnProperty("hasInlineFrames")&&"boolean"!=typeof e.hasInlineFrames?"hasInlineFrames: boolean expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Mapping)return e;var n=new r.perftools.profiles.Mapping;return null!=e.id&&(o.Long?(n.id=o.Long.fromValue(e.id)).unsigned=!0:"string"==typeof e.id?n.id=parseInt(e.id,10):"number"==typeof e.id?n.id=e.id:"object"==typeof e.id&&(n.id=new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0))),null!=e.memoryStart&&(o.Long?(n.memoryStart=o.Long.fromValue(e.memoryStart)).unsigned=!0:"string"==typeof e.memoryStart?n.memoryStart=parseInt(e.memoryStart,10):"number"==typeof e.memoryStart?n.memoryStart=e.memoryStart:"object"==typeof e.memoryStart&&(n.memoryStart=new o.LongBits(e.memoryStart.low>>>0,e.memoryStart.high>>>0).toNumber(!0))),null!=e.memoryLimit&&(o.Long?(n.memoryLimit=o.Long.fromValue(e.memoryLimit)).unsigned=!0:"string"==typeof e.memoryLimit?n.memoryLimit=parseInt(e.memoryLimit,10):"number"==typeof e.memoryLimit?n.memoryLimit=e.memoryLimit:"object"==typeof e.memoryLimit&&(n.memoryLimit=new o.LongBits(e.memoryLimit.low>>>0,e.memoryLimit.high>>>0).toNumber(!0))),null!=e.fileOffset&&(o.Long?(n.fileOffset=o.Long.fromValue(e.fileOffset)).unsigned=!0:"string"==typeof e.fileOffset?n.fileOffset=parseInt(e.fileOffset,10):"number"==typeof e.fileOffset?n.fileOffset=e.fileOffset:"object"==typeof e.fileOffset&&(n.fileOffset=new o.LongBits(e.fileOffset.low>>>0,e.fileOffset.high>>>0).toNumber(!0))),null!=e.filename&&(o.Long?(n.filename=o.Long.fromValue(e.filename)).unsigned=!1:"string"==typeof e.filename?n.filename=parseInt(e.filename,10):"number"==typeof e.filename?n.filename=e.filename:"object"==typeof e.filename&&(n.filename=new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber())),null!=e.buildId&&(o.Long?(n.buildId=o.Long.fromValue(e.buildId)).unsigned=!1:"string"==typeof e.buildId?n.buildId=parseInt(e.buildId,10):"number"==typeof e.buildId?n.buildId=e.buildId:"object"==typeof e.buildId&&(n.buildId=new o.LongBits(e.buildId.low>>>0,e.buildId.high>>>0).toNumber())),null!=e.hasFunctions&&(n.hasFunctions=Boolean(e.hasFunctions)),null!=e.hasFilenames&&(n.hasFilenames=Boolean(e.hasFilenames)),null!=e.hasLineNumbers&&(n.hasLineNumbers=Boolean(e.hasLineNumbers)),null!=e.hasInlineFrames&&(n.hasInlineFrames=Boolean(e.hasInlineFrames)),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!0);t.id=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.id=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!0),t.memoryStart=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.memoryStart=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!0),t.memoryLimit=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.memoryLimit=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!0),t.fileOffset=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.fileOffset=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.filename=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.filename=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.buildId=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.buildId=n.longs===String?"0":0,t.hasFunctions=!1,t.hasFilenames=!1,t.hasLineNumbers=!1,t.hasInlineFrames=!1}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?t.id=n.longs===String?String(e.id):e.id:t.id=n.longs===String?o.Long.prototype.toString.call(e.id):n.longs===Number?new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.memoryStart&&e.hasOwnProperty("memoryStart")&&("number"==typeof e.memoryStart?t.memoryStart=n.longs===String?String(e.memoryStart):e.memoryStart:t.memoryStart=n.longs===String?o.Long.prototype.toString.call(e.memoryStart):n.longs===Number?new o.LongBits(e.memoryStart.low>>>0,e.memoryStart.high>>>0).toNumber(!0):e.memoryStart),null!=e.memoryLimit&&e.hasOwnProperty("memoryLimit")&&("number"==typeof e.memoryLimit?t.memoryLimit=n.longs===String?String(e.memoryLimit):e.memoryLimit:t.memoryLimit=n.longs===String?o.Long.prototype.toString.call(e.memoryLimit):n.longs===Number?new o.LongBits(e.memoryLimit.low>>>0,e.memoryLimit.high>>>0).toNumber(!0):e.memoryLimit),null!=e.fileOffset&&e.hasOwnProperty("fileOffset")&&("number"==typeof e.fileOffset?t.fileOffset=n.longs===String?String(e.fileOffset):e.fileOffset:t.fileOffset=n.longs===String?o.Long.prototype.toString.call(e.fileOffset):n.longs===Number?new o.LongBits(e.fileOffset.low>>>0,e.fileOffset.high>>>0).toNumber(!0):e.fileOffset),null!=e.filename&&e.hasOwnProperty("filename")&&("number"==typeof e.filename?t.filename=n.longs===String?String(e.filename):e.filename:t.filename=n.longs===String?o.Long.prototype.toString.call(e.filename):n.longs===Number?new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber():e.filename),null!=e.buildId&&e.hasOwnProperty("buildId")&&("number"==typeof e.buildId?t.buildId=n.longs===String?String(e.buildId):e.buildId:t.buildId=n.longs===String?o.Long.prototype.toString.call(e.buildId):n.longs===Number?new o.LongBits(e.buildId.low>>>0,e.buildId.high>>>0).toNumber():e.buildId),null!=e.hasFunctions&&e.hasOwnProperty("hasFunctions")&&(t.hasFunctions=e.hasFunctions),null!=e.hasFilenames&&e.hasOwnProperty("hasFilenames")&&(t.hasFilenames=e.hasFilenames),null!=e.hasLineNumbers&&e.hasOwnProperty("hasLineNumbers")&&(t.hasLineNumbers=e.hasLineNumbers),null!=e.hasInlineFrames&&e.hasOwnProperty("hasInlineFrames")&&(t.hasInlineFrames=e.hasInlineFrames),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Location=function(){function i(e){if(this.line=[],e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.id=e.uint64();break;case 2:i.mappingId=e.uint64();break;case 3:i.address=e.uint64();break;case 4:i.line&&i.line.length||(i.line=[]),i.line.push(r.perftools.profiles.Line.decode(e,e.uint32()));break;case 5:i.isFolded=e.bool();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!(o.isInteger(e.id)||e.id&&o.isInteger(e.id.low)&&o.isInteger(e.id.high)))return"id: integer|Long expected";if(null!=e.mappingId&&e.hasOwnProperty("mappingId")&&!(o.isInteger(e.mappingId)||e.mappingId&&o.isInteger(e.mappingId.low)&&o.isInteger(e.mappingId.high)))return"mappingId: integer|Long expected";if(null!=e.address&&e.hasOwnProperty("address")&&!(o.isInteger(e.address)||e.address&&o.isInteger(e.address.low)&&o.isInteger(e.address.high)))return"address: integer|Long expected";if(null!=e.line&&e.hasOwnProperty("line")){if(!Array.isArray(e.line))return"line: array expected";for(var n=0;n>>0,e.id.high>>>0).toNumber(!0))),null!=e.mappingId&&(o.Long?(n.mappingId=o.Long.fromValue(e.mappingId)).unsigned=!0:"string"==typeof e.mappingId?n.mappingId=parseInt(e.mappingId,10):"number"==typeof e.mappingId?n.mappingId=e.mappingId:"object"==typeof e.mappingId&&(n.mappingId=new o.LongBits(e.mappingId.low>>>0,e.mappingId.high>>>0).toNumber(!0))),null!=e.address&&(o.Long?(n.address=o.Long.fromValue(e.address)).unsigned=!0:"string"==typeof e.address?n.address=parseInt(e.address,10):"number"==typeof e.address?n.address=e.address:"object"==typeof e.address&&(n.address=new o.LongBits(e.address.low>>>0,e.address.high>>>0).toNumber(!0))),e.line){if(!Array.isArray(e.line))throw TypeError(".perftools.profiles.Location.line: array expected");n.line=[];for(var t=0;t>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.mappingId&&e.hasOwnProperty("mappingId")&&("number"==typeof e.mappingId?t.mappingId=n.longs===String?String(e.mappingId):e.mappingId:t.mappingId=n.longs===String?o.Long.prototype.toString.call(e.mappingId):n.longs===Number?new o.LongBits(e.mappingId.low>>>0,e.mappingId.high>>>0).toNumber(!0):e.mappingId),null!=e.address&&e.hasOwnProperty("address")&&("number"==typeof e.address?t.address=n.longs===String?String(e.address):e.address:t.address=n.longs===String?o.Long.prototype.toString.call(e.address):n.longs===Number?new o.LongBits(e.address.low>>>0,e.address.high>>>0).toNumber(!0):e.address),e.line&&e.line.length){t.line=[];for(var l=0;l>>3){case 1:i.functionId=e.uint64();break;case 2:i.line=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.functionId&&e.hasOwnProperty("functionId")&&!(o.isInteger(e.functionId)||e.functionId&&o.isInteger(e.functionId.low)&&o.isInteger(e.functionId.high))?"functionId: integer|Long expected":null!=e.line&&e.hasOwnProperty("line")&&!(o.isInteger(e.line)||e.line&&o.isInteger(e.line.low)&&o.isInteger(e.line.high))?"line: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Line)return e;var n=new r.perftools.profiles.Line;return null!=e.functionId&&(o.Long?(n.functionId=o.Long.fromValue(e.functionId)).unsigned=!0:"string"==typeof e.functionId?n.functionId=parseInt(e.functionId,10):"number"==typeof e.functionId?n.functionId=e.functionId:"object"==typeof e.functionId&&(n.functionId=new o.LongBits(e.functionId.low>>>0,e.functionId.high>>>0).toNumber(!0))),null!=e.line&&(o.Long?(n.line=o.Long.fromValue(e.line)).unsigned=!1:"string"==typeof e.line?n.line=parseInt(e.line,10):"number"==typeof e.line?n.line=e.line:"object"==typeof e.line&&(n.line=new o.LongBits(e.line.low>>>0,e.line.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!0);t.functionId=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.functionId=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.line=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.line=n.longs===String?"0":0}return null!=e.functionId&&e.hasOwnProperty("functionId")&&("number"==typeof e.functionId?t.functionId=n.longs===String?String(e.functionId):e.functionId:t.functionId=n.longs===String?o.Long.prototype.toString.call(e.functionId):n.longs===Number?new o.LongBits(e.functionId.low>>>0,e.functionId.high>>>0).toNumber(!0):e.functionId),null!=e.line&&e.hasOwnProperty("line")&&("number"==typeof e.line?t.line=n.longs===String?String(e.line):e.line:t.line=n.longs===String?o.Long.prototype.toString.call(e.line):n.longs===Number?new o.LongBits(e.line.low>>>0,e.line.high>>>0).toNumber():e.line),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Function=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.id=e.uint64();break;case 2:i.name=e.int64();break;case 3:i.systemName=e.int64();break;case 4:i.filename=e.int64();break;case 5:i.startLine=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!(o.isInteger(e.id)||e.id&&o.isInteger(e.id.low)&&o.isInteger(e.id.high))?"id: integer|Long expected":null!=e.name&&e.hasOwnProperty("name")&&!(o.isInteger(e.name)||e.name&&o.isInteger(e.name.low)&&o.isInteger(e.name.high))?"name: integer|Long expected":null!=e.systemName&&e.hasOwnProperty("systemName")&&!(o.isInteger(e.systemName)||e.systemName&&o.isInteger(e.systemName.low)&&o.isInteger(e.systemName.high))?"systemName: integer|Long expected":null!=e.filename&&e.hasOwnProperty("filename")&&!(o.isInteger(e.filename)||e.filename&&o.isInteger(e.filename.low)&&o.isInteger(e.filename.high))?"filename: integer|Long expected":null!=e.startLine&&e.hasOwnProperty("startLine")&&!(o.isInteger(e.startLine)||e.startLine&&o.isInteger(e.startLine.low)&&o.isInteger(e.startLine.high))?"startLine: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Function)return e;var n=new r.perftools.profiles.Function;return null!=e.id&&(o.Long?(n.id=o.Long.fromValue(e.id)).unsigned=!0:"string"==typeof e.id?n.id=parseInt(e.id,10):"number"==typeof e.id?n.id=e.id:"object"==typeof e.id&&(n.id=new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0))),null!=e.name&&(o.Long?(n.name=o.Long.fromValue(e.name)).unsigned=!1:"string"==typeof e.name?n.name=parseInt(e.name,10):"number"==typeof e.name?n.name=e.name:"object"==typeof e.name&&(n.name=new o.LongBits(e.name.low>>>0,e.name.high>>>0).toNumber())),null!=e.systemName&&(o.Long?(n.systemName=o.Long.fromValue(e.systemName)).unsigned=!1:"string"==typeof e.systemName?n.systemName=parseInt(e.systemName,10):"number"==typeof e.systemName?n.systemName=e.systemName:"object"==typeof e.systemName&&(n.systemName=new o.LongBits(e.systemName.low>>>0,e.systemName.high>>>0).toNumber())),null!=e.filename&&(o.Long?(n.filename=o.Long.fromValue(e.filename)).unsigned=!1:"string"==typeof e.filename?n.filename=parseInt(e.filename,10):"number"==typeof e.filename?n.filename=e.filename:"object"==typeof e.filename&&(n.filename=new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber())),null!=e.startLine&&(o.Long?(n.startLine=o.Long.fromValue(e.startLine)).unsigned=!1:"string"==typeof e.startLine?n.startLine=parseInt(e.startLine,10):"number"==typeof e.startLine?n.startLine=e.startLine:"object"==typeof e.startLine&&(n.startLine=new o.LongBits(e.startLine.low>>>0,e.startLine.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!0);t.id=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.id=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.name=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.name=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.systemName=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.systemName=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.filename=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.filename=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.startLine=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.startLine=n.longs===String?"0":0}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?t.id=n.longs===String?String(e.id):e.id:t.id=n.longs===String?o.Long.prototype.toString.call(e.id):n.longs===Number?new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.name&&e.hasOwnProperty("name")&&("number"==typeof e.name?t.name=n.longs===String?String(e.name):e.name:t.name=n.longs===String?o.Long.prototype.toString.call(e.name):n.longs===Number?new o.LongBits(e.name.low>>>0,e.name.high>>>0).toNumber():e.name),null!=e.systemName&&e.hasOwnProperty("systemName")&&("number"==typeof e.systemName?t.systemName=n.longs===String?String(e.systemName):e.systemName:t.systemName=n.longs===String?o.Long.prototype.toString.call(e.systemName):n.longs===Number?new o.LongBits(e.systemName.low>>>0,e.systemName.high>>>0).toNumber():e.systemName),null!=e.filename&&e.hasOwnProperty("filename")&&("number"==typeof e.filename?t.filename=n.longs===String?String(e.filename):e.filename:t.filename=n.longs===String?o.Long.prototype.toString.call(e.filename):n.longs===Number?new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber():e.filename),null!=e.startLine&&e.hasOwnProperty("startLine")&&("number"==typeof e.startLine?t.startLine=n.longs===String?String(e.startLine):e.startLine:t.startLine=n.longs===String?o.Long.prototype.toString.call(e.startLine):n.longs===Number?new o.LongBits(e.startLine.low>>>0,e.startLine.high>>>0).toNumber():e.startLine),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i),l}(),module.exports=r; -},{"protobufjs/minimal":"Myh2"}],"YvD4":[function(require,module,exports) { -module.exports=t;var i=null;try{i=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(L){}function t(i,t,n){this.low=0|i,this.high=0|t,this.unsigned=!!n}function n(i){return!0===(i&&i.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0}),t.isLong=n;var h={},s={};function e(i,t){var n,e,r;return t?(r=0<=(i>>>=0)&&i<256)&&(e=s[i])?e:(n=u(i,(0|i)<0?-1:0,!0),r&&(s[i]=n),n):(r=-128<=(i|=0)&&i<128)&&(e=h[i])?e:(n=u(i,i<0?-1:0,!1),r&&(h[i]=n),n)}function r(i,t){if(isNaN(i))return t?N:m;if(t){if(i<0)return N;if(i>=c)return p}else{if(i<=-w)return _;if(i+1>=w)return q}return i<0?r(-i,t).neg():u(i%d|0,i/d|0,t)}function u(i,n,h){return new t(i,n,h)}t.fromInt=e,t.fromNumber=r,t.fromBits=u;var o=Math.pow;function g(i,t,n){if(0===i.length)throw Error("empty string");if("NaN"===i||"Infinity"===i||"+Infinity"===i||"-Infinity"===i)return m;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||360)throw Error("interior hyphen");if(0===h)return g(i.substring(1),t,n).neg();for(var s=r(o(n,8)),e=m,u=0;u>>0:this.low},B.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},B.toString=function(i){if((i=i||10)<2||36>>0).toString(i);if((e=g).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},B.getHighBits=function(){return this.high},B.getHighBitsUnsigned=function(){return this.high>>>0},B.getLowBits=function(){return this.low},B.getLowBitsUnsigned=function(){return this.low>>>0},B.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();for(var i=0!=this.high?this.high:this.low,t=31;t>0&&0==(i&1<=0},B.isOdd=function(){return 1==(1&this.low)},B.isEven=function(){return 0==(1&this.low)},B.equals=function(i){return n(i)||(i=f(i)),(this.unsigned===i.unsigned||this.high>>>31!=1||i.high>>>31!=1)&&(this.high===i.high&&this.low===i.low)},B.eq=B.equals,B.notEquals=function(i){return!this.eq(i)},B.neq=B.notEquals,B.ne=B.notEquals,B.lessThan=function(i){return this.comp(i)<0},B.lt=B.lessThan,B.lessThanOrEqual=function(i){return this.comp(i)<=0},B.lte=B.lessThanOrEqual,B.le=B.lessThanOrEqual,B.greaterThan=function(i){return this.comp(i)>0},B.gt=B.greaterThan,B.greaterThanOrEqual=function(i){return this.comp(i)>=0},B.gte=B.greaterThanOrEqual,B.ge=B.greaterThanOrEqual,B.compare=function(i){if(n(i)||(i=f(i)),this.eq(i))return 0;var t=this.isNegative(),h=i.isNegative();return t&&!h?-1:!t&&h?1:this.unsigned?i.high>>>0>this.high>>>0||i.high===this.high&&i.low>>>0>this.low>>>0?-1:1:this.sub(i).isNegative()?-1:1},B.comp=B.compare,B.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(E)},B.neg=B.negate,B.add=function(i){n(i)||(i=f(i));var t=this.high>>>16,h=65535&this.high,s=this.low>>>16,e=65535&this.low,r=i.high>>>16,o=65535&i.high,g=i.low>>>16,l=0,a=0,d=0,c=0;return d+=(c+=e+(65535&i.low))>>>16,a+=(d+=s+g)>>>16,l+=(a+=h+o)>>>16,l+=t+r,u((d&=65535)<<16|(c&=65535),(l&=65535)<<16|(a&=65535),this.unsigned)},B.subtract=function(i){return n(i)||(i=f(i)),this.add(i.neg())},B.sub=B.subtract,B.multiply=function(t){if(this.isZero())return m;if(n(t)||(t=f(t)),i)return u(i.mul(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned);if(t.isZero())return m;if(this.eq(_))return t.isOdd()?_:m;if(t.eq(_))return this.isOdd()?_:m;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(v)&&t.lt(v))return r(this.toNumber()*t.toNumber(),this.unsigned);var h=this.high>>>16,s=65535&this.high,e=this.low>>>16,o=65535&this.low,g=t.high>>>16,l=65535&t.high,a=t.low>>>16,d=65535&t.low,c=0,w=0,N=0,E=0;return N+=(E+=o*d)>>>16,w+=(N+=e*d)>>>16,N&=65535,w+=(N+=o*a)>>>16,c+=(w+=s*d)>>>16,w&=65535,c+=(w+=e*a)>>>16,w&=65535,c+=(w+=o*l)>>>16,c+=h*d+s*a+e*l+o*g,u((N&=65535)<<16|(E&=65535),(c&=65535)<<16|(w&=65535),this.unsigned)},B.mul=B.multiply,B.divide=function(t){if(n(t)||(t=f(t)),t.isZero())throw Error("division by zero");var h,s,e;if(i)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?u((this.unsigned?i.div_u:i.div_s)(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?N:m;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return N;if(t.gt(this.shru(1)))return y;e=N}else{if(this.eq(_))return t.eq(E)||t.eq(b)?_:t.eq(_)?E:(h=this.shr(1).div(t).shl(1)).eq(m)?t.isNegative()?E:b:(s=this.sub(t.mul(h)),e=h.add(s.div(t)));if(t.eq(_))return this.unsigned?N:m;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=m}for(s=this;s.gte(t);){h=Math.max(1,Math.floor(s.toNumber()/t.toNumber()));for(var g=Math.ceil(Math.log(h)/Math.LN2),l=g<=48?1:o(2,g-48),a=r(h),d=a.mul(t);d.isNegative()||d.gt(s);)d=(a=r(h-=l,this.unsigned)).mul(t);a.isZero()&&(a=E),e=e.add(a),s=s.sub(d)}return e},B.div=B.divide,B.modulo=function(t){return n(t)||(t=f(t)),i?u((this.unsigned?i.rem_u:i.rem_s)(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},B.mod=B.modulo,B.rem=B.modulo,B.not=function(){return u(~this.low,~this.high,this.unsigned)},B.and=function(i){return n(i)||(i=f(i)),u(this.low&i.low,this.high&i.high,this.unsigned)},B.or=function(i){return n(i)||(i=f(i)),u(this.low|i.low,this.high|i.high,this.unsigned)},B.xor=function(i){return n(i)||(i=f(i)),u(this.low^i.low,this.high^i.high,this.unsigned)},B.shiftLeft=function(i){return n(i)&&(i=i.toInt()),0==(i&=63)?this:i<32?u(this.low<>>32-i,this.unsigned):u(0,this.low<>>i|this.high<<32-i,this.high>>i,this.unsigned):u(this.high>>i-32,this.high>=0?0:-1,this.unsigned)},B.shr=B.shiftRight,B.shiftRightUnsigned=function(i){if(n(i)&&(i=i.toInt()),0===(i&=63))return this;var t=this.high;return i<32?u(this.low>>>i|t<<32-i,t>>>i,this.unsigned):u(32===i?t:t>>>i-32,0,this.unsigned)},B.shru=B.shiftRightUnsigned,B.shr_u=B.shiftRightUnsigned,B.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},B.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},B.toBytes=function(i){return i?this.toBytesLE():this.toBytesBE()},B.toBytesLE=function(){var i=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&i,i>>>8&255,i>>>16&255,i>>>24]},B.toBytesBE=function(){var i=this.high,t=this.low;return[i>>>24,i>>>16&255,i>>>8&255,255&i,t>>>24,t>>>16&255,t>>>8&255,255&t]},t.fromBytes=function(i,n,h){return h?t.fromBytesLE(i,n):t.fromBytesBE(i,n)},t.fromBytesLE=function(i,n){return new t(i[0]|i[1]<<8|i[2]<<16|i[3]<<24,i[4]|i[5]<<8|i[6]<<16|i[7]<<24,n)},t.fromBytesBE=function(i,n){return new t(i[4]<<24|i[5]<<16|i[6]<<8|i[7],i[0]<<24|i[1]<<16|i[2]<<8|i[3],n)}; -},{}],"VmHy":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importAsPprofProfile=o;var e=require("./profile.proto.js"),n=require("../lib/profile"),t=require("../lib/utils"),l=require("../lib/value-formatters"),r=u(require("long"));function u(e){return e&&e.__esModule?e:{default:e}}function i(e){const n=e.defaultSampleType,t=e.sampleType,l=t.length-1;if(!n||!+n)return l;const r=t.findIndex(e=>e.type===n);return-1===r?l:r}function o(u){if(0===u.byteLength)return null;let o;try{o=e.perftools.profiles.Profile.decode(new Uint8Array(u))}catch(w){return null}function s(e){return"number"==typeof e?e:e.low}function a(e){return o.stringTable[s(e)]||null}const c=new Map;function f(e){const{name:n,filename:t,startLine:l}=e,r=null!=n&&a(n)||"(unknown)",u=null!=t?a(t):null,i=null!=l?+l:null,o={key:`${r}:${u}:${i}`,name:r};return null!=u&&(o.file=u),null!=i&&(o.line=i),o}for(let e of o.function)if(e.id){const n=f(e);null!=n&&c.set(s(e.id),n)}function p(e){const{line:n}=e;if(null==n)return null;const l=(0,t.lastOf)(n);if(null==l)return null;if(l.functionId){let e=c.get(s(l.functionId));const n=l.line instanceof r.default?l.line.toNumber():l.line;return n&&n>0&&null!=e&&(e.line=n),e||null}return null}const d=new Map;for(let e of o.location)if(null!=e.id){const n=p(e);n&&d.set(s(e.id),n)}const m=o.sampleType.map(e=>({type:e.type&&a(e.type)||"samples",unit:e.unit&&a(e.unit)||"count"})),y=i(o);if(y<0||y>=m.length)return null;const b=m[y],g=new n.StackListProfileBuilder;switch(b.unit){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":g.setValueFormatter(new l.TimeFormatter(b.unit));break;case"bytes":g.setValueFormatter(new l.ByteFormatter)}for(let e of o.sample){const n=e.locationId?e.locationId.map(e=>d.get(s(e))):[];if(n.reverse(),null==e.value||e.value.length<=y)return null;const t=e.value[y];g.appendSampleWithWeight(n.filter(e=>null!=e),+t)}return g.build()} -},{"./profile.proto.js":"YdJi","../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4","long":"YvD4"}],"bNW7":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromChromeHeapProfile=i;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters");const n=new Map;function o(e){return(0,t.getOrInsert)(n,e,e=>{const t=e.url,r=e.lineNumber,n=e.columnNumber,o=e.functionName||(t?`(anonymous ${t.split("/").pop()}:${r})`:"(anonymous)");return{key:`${o}:${t}:${r}:${n}`,name:o,file:t,line:r,col:n}})}function i(t){const n=new Map;let i=0;const l=(e,t)=>{e.id=i++,n.set(e.id,e),t&&(e.parent=t.id),e.children.forEach(t=>l(t,e))};l(t.head);const s=e=>{if(0===e.children.length)return e.selfSize||0;const t=e.children.reduce((e,t)=>e+=s(t),e.selfSize);return e.totalSize=t,t},u=s(t.head),a=[];for(let e of n.values()){let t=[];for(t.push(e);void 0!==e.parent;){const r=n.get(e.parent);if(void 0===r)break;t.unshift(r),e=r}a.push(t)}const c=new e.StackListProfileBuilder(u);for(let e of a){const t=e[e.length-1];c.appendSampleWithWeight(e.map(e=>o(e.callFrame)),t.selfSize)}return c.setValueFormatter(new r.ByteFormatter),c.build()} -},{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"KFvE":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isTraceEventFormatted=S,exports.importTraceEvents=W;var e,t=require("../lib/utils"),n=require("../lib/profile"),r=require("../lib/value-formatters");!function(e){e.HERMES="HERMES",e.UNKNOWN="UNKNOWN"}(e||(e={}));const s=["line","column","name","category","url","params","allocatedCategory","allocatedName"];function o(e,n){return`${(0,t.zeroPad)(""+e,10)}:${(0,t.zeroPad)(""+n,10)}`}function i(e){const n=new Map;for(let r of e){(0,t.getOrInsert)(n,o(Number(r.pid),Number(r.tid)),()=>[]).push(r)}return n}function a(e,t){if(0===e.length&&0===t.length)throw new Error("This method should not be given both queues empty");if(0===t.length)return"B";if(0===e.length)return"E";const n=e[0],r=t[0],s=n.ts,o=r.ts;return s0){let t=Number.MAX_SAFE_INTEGER;for(let n of e)t=Math.min(t,n.ts);for(let n of e)n.ts-=t}const r=[];for(let i of e)switch(i.ph){case"B":t.push(i);break;case"E":n.push(i);break;case"X":r.push(i);break;default:return i}function s(e){var t,n;return null!==(n=null!==(t=e.dur)&&void 0!==t?t:e.tdur)&&void 0!==n?n:0}r.sort((e,t)=>{if(e.tst.ts)return 1;const n=s(e),r=s(t);return n>r?-1:nt.ts?1:0}return t.sort(o),n.sort(o),[t,n]}function c(e){const t=[];for(let n of e)switch(n.ph){case"B":case"E":case"X":t.push(n)}return t}function f(e){const t=new Map;for(let n of e)"M"===n.ph&&"process_name"===n.name&&n.args&&n.args.name&&t.set(n.pid,n.args.name);return t}function l(e){const t=new Map;for(let n of e)"M"===n.ph&&"thread_name"===n.name&&n.args&&n.args.name&&t.set(o(n.pid,n.tid),n.args.name);return t}function h(e){return`${e.name||"(unnamed)"}`}function m(e){let t=h(e);return e.args&&(t+=` ${JSON.stringify(e.args)}`),t}function d(t,n=e.UNKNOWN){if(n===e.HERMES){const e=`${t.name}:${t.args.url}:${t.args.line}:${t.args.column}`;return{name:h(t),key:e,file:t.args.url,line:t.args.line,col:t.args.column}}const r=m(t);return{name:r,key:r}}function p(e,t,n,r){return null!=e&&null!=t?`${e} (pid ${n}), ${t} (tid ${r})`:null!=e?`${e} (pid ${n}, tid ${r})`:null!=t?`${t} (pid ${n}, tid ${r})`:`pid ${n}, tid ${r}`}function g(e,t){const n=f(e),r=l(e),s=new Map;return t.forEach(e=>{if(0===e.length)return;const t=Number(e[0].pid),i=Number(e[0].tid),a=o(t,i),u=p(n.get(t),r.get(a),t,i);s.set(a,u)}),s}function E(e,t){const n=f(e),r=l(e),s=new Map;return t.forEach(e=>{if(0===e.length)return;const{pid:t,tid:i}=e[0],a=o(t,i),u=p(n.get(t),r.get(a),t,i);s.set(a,u)}),s}function $(s,o,i=e.UNKNOWN){const[c,f]=u(s),l=new n.CallTreeProfileBuilder;l.setValueFormatter(new r.TimeFormatter("microseconds")),l.setName(o);const h=[],m=e=>{const n=(0,t.lastOf)(h);if(null==n)return void console.warn(`Tried to end frame "${d(e,i).key}", but the stack was empty. Doing nothing instead.`);const r=d(e,i),s=d(n,i);e.name===n.name?(r.key!==s.key&&console.warn(`ts=${e.ts}: Tried to end "${r.key}" when "${s.key}" was on the top of the stack. Ending ${s.key} instead.`),h.pop(),l.leaveFrame(s,e.ts)):console.warn(`ts=${e.ts}: Tried to end "${r.key}" when "${s.key}" was on the top of the stack. Doing nothing instead.`)};for(;c.length>0||f.length>0;){const e=a(c,f);switch(e){case"B":p=c.shift(),h.push(p),l.enterFrame(d(p,i),p.ts);break;case"E":{const e=(0,t.lastOf)(h);if(null!=e){const t=d(e,i);let n=!1;for(let e=1;ef[0].ts)break;const s=d(r,i);if(t.key===s.key){const t=f[0];f[0]=f[e],f[e]=t,n=!0;break}}if(!n)for(let r=1;rf[0].ts)break;if(t.name===e.name){const e=f[0];f[0]=f[r],f[r]=e,n=!0;break}}}m(f.shift());break}default:return e}}var p;for(let e=h.length-1;e>=0;e--){const t=d(h[e],i);console.warn(`Frame "${t.key}" was still open at end of profile. Closing automatically.`),l.leaveFrame(t,l.getTotalWeight())}return l.build()}function w(e){const t=[];let n=Number(e[0].ts);return e.forEach((e,r)=>{if(0===r)return;const s=Number(e.ts)-n;n=Number(e.ts),t.push(s)}),t.push(0),t}function k({name:e,category:t}){return{key:`${e}:${t}`,name:e}}function b(e,t){const n=[];let r=t;for(;r;){const t=e[r];if(!t)throw new Error(`Could not find frame for id ${r}`);n.push(k(t)),r=t.parent}return n.reverse()}function y(e,t,s){const o=new n.StackListProfileBuilder;o.setValueFormatter(new r.TimeFormatter("microseconds")),o.setName(s);const i=w(t);return t.forEach((t,n)=>{const r=i[n],s=b(e.stackFrames,t.sf);o.appendSampleWithWeight(s,r)}),o.build()}function N(n,r=e.UNKNOWN){const s=i(c(n)),o=E(n,s),a=[];return o.forEach((e,t)=>{const n=s.get(t);if(!n)throw new Error(`Could not find events for key: ${n}`);a.push([t,$(n,e,r)])}),(0,t.sortBy)(a,e=>e[0]),{name:"",indexToView:0,profiles:a.map(e=>e[1])}}function v(e){const n=i(e.samples),r=g(e.traceEvents,n),s=[];return r.forEach((t,r)=>{const o=n.get(r);if(!o)throw new Error(`Could not find samples for key: ${o}`);0!==o.length&&s.push([r,y(e,o,t)])}),(0,t.sortBy)(s,e=>e[0]),{name:"",indexToView:0,profiles:s.map(e=>e[1])}}function M(e){if(!Array.isArray(e))return!1;if(0===e.length)return!1;for(let t of e){if(!("ph"in t))return!1;switch(t.ph){case"B":case"E":case"X":if(!("ts"in t))return!1}}return!0}function O(e){return!!e&&s.every(t=>t in e)}function T(e){return!!M(e)&&O(e[0].args)}function B(e){return"traceEvents"in e&&M(e.traceEvents)}function F(e){return"traceEvents"in e&&"stackFrames"in e&&"samples"in e&&M(e.traceEvents)}function S(e){return B(e)||M(e)}function W(t){if(F(t))return v(t);if(B(t))return N(t.traceEvents);if(T(t))return N(t,e.HERMES);if(M(t))return N(t);return t} -},{"../lib/utils":"ucYa","../lib/profile":"YG8z","../lib/value-formatters":"LsM4"}],"TZYa":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromCallgrind=r;var e=require("../lib/profile"),t=require("../lib/utils"),i=require("../lib/value-formatters");class s{constructor(e,i){this.fileName=e,this.fieldName=i,this.frameSet=new t.KeyedSet,this.totalWeights=new Map,this.childrenTotalWeights=new Map}getOrInsertFrame(t){return e.Frame.getOrInsert(this.frameSet,t)}addToTotalWeight(e,t){this.totalWeights.has(e)?this.totalWeights.set(e,this.totalWeights.get(e)+t):this.totalWeights.set(e,t)}addSelfWeight(e,t){this.addToTotalWeight(this.getOrInsertFrame(e),t)}addChildWithTotalWeight(e,i,s){const n=this.getOrInsertFrame(e),r=this.getOrInsertFrame(i),a=(0,t.getOrInsert)(this.childrenTotalWeights,n,e=>new Map);a.has(r)?a.set(r,a.get(r)+s):a.set(r,s),this.addToTotalWeight(n,s)}toProfile(){const s=new e.CallTreeProfileBuilder;let n=1;"Time_(10ns)"===this.fieldName?(s.setName(`${this.fileName} -- Time`),n=10,s.setValueFormatter(new i.TimeFormatter("nanoseconds"))):"Memory_(bytes)"==this.fieldName?(s.setName(`${this.fileName} -- Memory`),s.setValueFormatter(new i.ByteFormatter)):s.setName(`${this.fileName} -- ${this.fieldName}`);let r=0;const a=new Set;let l=0;for(let[e,t]of this.totalWeights)l=Math.max(l,t);const o=(e,i)=>{if(a.has(e))return;if(i<1e-4*l)return;const h=(0,t.getOrElse)(this.totalWeights,e,()=>0);if(0===h)return;let m=i;s.enterFrame(e,Math.round(r*n)),a.add(e);for(let[t,s]of this.childrenTotalWeights.get(e)||[]){let e=r;o(t,i*(s/h)),m-=r-e}a.delete(e),r+=m,s.leaveFrame(e,Math.round(r*n))},h=new Set(this.frameSet);for(let[e,t]of this.childrenTotalWeights)for(let[i,s]of t)h.delete(i);for(let e of h)o(e,this.totalWeights.get(e));return s.build()}}class n{constructor(e,t){this.importedFileName=t,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(){const e=this.filename||"(unknown)",t=this.functionName||"(unknown)";return{key:`${e}:${t}`,name:t,file:e}}calleeFrameInfo(){const e=this.calleeFilename||this.filename||"(unknown)",t=this.calleeFunctionName||"(unknown)";return{key:`${e}:${t}`,name:t,file:e}}parseHeaderLine(e){const t=/^\s*(\w+):\s*(.*)+$/.exec(e);if(!t)return!1;if("events"!==t[1])return!0;const i=t[2].split(" ");if(null!=this.callGraphs)throw new Error(`Duplicate "events: " lines specified. First was "${this.eventsLine}", now received "${e}" on ${this.lineNum}.`);return this.callGraphs=i.map(e=>new s(this.importedFileName,e)),!0}parseAssignmentLine(e){const t=/^(\w+)=\s*(.*)$/.exec(e);if(!t)return!1;const i=t[1],s=t[2];switch(i){case"fe":case"fi":this.parseNameWithCompression(s,this.savedFileNames);break;case"fl":this.filename=this.parseNameWithCompression(s,this.savedFileNames);break;case"fn":this.functionName=this.parseNameWithCompression(s,this.savedFunctionNames);break;case"cfi":case"cfl":this.calleeFilename=this.parseNameWithCompression(s,this.savedFileNames);break;case"cfn":this.calleeFunctionName=this.parseNameWithCompression(s,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,t){{const i=/^\((\d+)\)\s*(.+)$/.exec(e);if(i){const e=i[1],s=i[2];if(e in t)throw new Error(`Redefinition of name with id: ${e}. Original value was "${t[e]}". Tried to redefine as "${s}" on line ${this.lineNum}.`);return t[e]=s,s}}{const i=/^\((\d+)\)$/.exec(e);if(i){const e=i[1];if(!(e in t))throw new Error(`Tried to use name with id ${e} on line ${this.lineNum} before it was defined.`);return t[e]}}return e}parseCostLine(e,t){const i=e.split(/\s+/),s=[];for(let n=0;n!/^$|^Log closed$|log opened/.exec(e));let s=-1;const o=I(l[0]);if(null===o)throw Error;s=o.at;const i=(0,t.lastOf)(l);if(null===i)throw Error;const c=I(i);if(null===c)throw Error;const u=c.at,f=new t.KeyedSet,h=[];let m,p=0,v=-1;function d(t,n,r){function l(t,n){h.push(n),a.enterFrame(e.Frame.getOrInsert(f,{name:n,key:n}),t),p=t}v>-1&&(v=-1,m===r&&v>=p&&d(t,v,`QUEUE ${r}`));const s=`STACK ${t}`;[...h].reverse().find(e=>e.startsWith("STACK "))!==s&&(1===h.length&&g(p),l(n,s)),l(n,r)}function g(n){const r=h.pop();if(void 0===r)throw Error("Tried to leave frame when nothing was on stack.");a.leaveFrame(e.Frame.getOrInsert(f,{name:r,key:r}),n);let l=(0,t.lastOf)(h);null!==l&&l.startsWith("QUEUE ")&&(g(n),l=(0,t.lastOf)(h)),h.length>1&&null!==l&&l.startsWith("STACK ")&&g(n),p=n}function w(e,n,r){(0,t.lastOf)(h)===r?g(n):0===p?(console.log(`Tried to leave frame "${r}" which was never entered. Assuming it has been running since the start.`),d(e,0,r),g(n)):console.log(`Tried to leave frame "${r}" which was never entered. Other events have happened since the start, ignoring line.`)}function I(e){if(void 0===e)throw Error("Probably tried to import empty file.");const t=e.split(":");return t.length<3?null:-1!==s?{at:parseInt(t[0])-s,event:t[1],stackInt:parseInt(t[2]),name:t[5]}:{at:parseInt(t[0]),event:t[1],stackInt:parseInt(t[2]),name:t[5]}}for(l.forEach((e,t,n)=>{const r=I(e);if(null!==r)if("PUSH"===r.event){d(r.stackInt,r.at,r.name);let e=I(n[t+=1]);for(;null!==e&&e.at===r.at;)e.name===r.name&&e.stackInt===r.stackInt&&"POP"===e.event?(w(e.stackInt,e.at,e.name),n.splice(t,1),e=null):(t+=1)0;)g(u);return a.build()} -},{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"uRa7":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importProfileGroupFromText=C,exports.importProfileGroupFromBase64=I,exports.importProfilesFromFile=x,exports.importProfilesFromArrayBuffer=y,exports.importFromFileSystemDirectoryEntry=T;var r=require("./chrome"),e=require("./stackprof"),o=require("./instruments"),i=require("./bg-flamegraph"),t=require("./firefox"),n=require("../lib/file-format"),s=require("./v8proflog"),l=require("./linux-tools-perf"),m=require("./haskell"),p=require("./safari"),a=require("./utils"),f=require("./pprof"),c=require("../lib/utils"),u=require("./v8heapalloc"),d=require("./trace-event"),g=require("./callgrind"),h=require("./papyrus"),F=function(r,e,o,i){return new(o||(o=Promise))(function(t,n){function s(r){try{m(i.next(r))}catch(e){n(e)}}function l(r){try{m(i.throw(r))}catch(e){n(e)}}function m(r){var e;r.done?t(r.value):(e=r.value,e instanceof o?e:new o(function(r){r(e)})).then(s,l)}m((i=i.apply(r,e||[])).next())})};function C(r,e){return F(this,void 0,void 0,function*(){return yield P(new a.TextProfileDataSource(r,e))})}function I(r,e){return F(this,void 0,void 0,function*(){return yield P(a.MaybeCompressedDataReader.fromArrayBuffer(r,(0,c.decodeBase64)(e).buffer))})}function x(r){return F(this,void 0,void 0,function*(){return P(a.MaybeCompressedDataReader.fromFile(r))})}function y(r,e){return F(this,void 0,void 0,function*(){return P(a.MaybeCompressedDataReader.fromArrayBuffer(r,e))})}function P(r){return F(this,void 0,void 0,function*(){const e=yield r.name(),o=yield S(r);if(o){o.name||(o.name=e);for(let r of o.profiles)r&&!r.getName()&&r.setName(e);return o}return null})}function v(r){return r?{name:r.getName(),indexToView:0,profiles:[r]}:null}function S(a){return F(this,void 0,void 0,function*(){const c=yield a.name(),F=yield a.readAsArrayBuffer();{const r=(0,f.importAsPprofProfile)(F);if(r)return console.log("Importing as protobuf encoded pprof file"),v(r)}const C=yield a.readAsText();if(c.endsWith(".speedscope.json"))return console.log("Importing as speedscope json file"),(0,n.importSpeedscopeProfiles)(C.parseAsJSON());if(/Trace-\d{8}T\d{6}/.exec(c))return console.log("Importing as Chrome Timeline Object"),(0,r.importFromChromeTimeline)(C.parseAsJSON().traceEvents,c);if(c.endsWith(".chrome.json")||/Profile-\d{8}T\d{6}/.exec(c))return console.log("Importing as Chrome Timeline"),(0,r.importFromChromeTimeline)(C.parseAsJSON(),c);if(c.endsWith(".stackprof.json"))return console.log("Importing as stackprof profile"),v((0,e.importFromStackprof)(C.parseAsJSON()));if(c.endsWith(".instruments.txt"))return console.log("Importing as Instruments.app deep copy"),v((0,o.importFromInstrumentsDeepCopy)(C));if(c.endsWith(".linux-perf.txt"))return console.log("Importing as output of linux perf script"),(0,l.importFromLinuxPerf)(C);if(c.endsWith(".collapsedstack.txt"))return console.log("Importing as collapsed stack format"),v((0,i.importFromBGFlameGraph)(C));if(c.endsWith(".v8log.json"))return console.log("Importing as --prof-process v8 log"),v((0,s.importFromV8ProfLog)(C.parseAsJSON()));if(c.endsWith(".heapprofile"))return console.log("Importing as Chrome Heap Profile"),v((0,u.importFromChromeHeapProfile)(C.parseAsJSON()));if(c.endsWith("-recording.json"))return console.log("Importing as Safari profile"),v((0,p.importFromSafari)(C.parseAsJSON()));if(c.startsWith("callgrind."))return console.log("Importing as Callgrind profile"),(0,g.importFromCallgrind)(C,c);let I;try{I=C.parseAsJSON()}catch(x){}if(I){if("https://www.speedscope.app/file-format-schema.json"===I.$schema)return console.log("Importing as speedscope json file"),(0,n.importSpeedscopeProfiles)(I);if(I.systemHost&&"Firefox"==I.systemHost.name)return console.log("Importing as Firefox profile"),v((0,t.importFromFirefox)(I));if((0,r.isChromeTimeline)(I))return console.log("Importing as Chrome Timeline"),(0,r.importFromChromeTimeline)(I,c);if((0,r.isChromeTimelineObject)(I))return console.log("Importing as Chrome Timeline Object"),(0,r.importFromChromeTimeline)(I.traceEvents,c);if("nodes"in I&&"samples"in I&&"timeDeltas"in I)return console.log("Importing as Chrome CPU Profile"),v((0,r.importFromChromeCPUProfile)(I));if((0,d.isTraceEventFormatted)(I))return console.log("Importing as Trace Event Format profile"),(0,d.importTraceEvents)(I);if("head"in I&&"samples"in I&&"timestamps"in I)return console.log("Importing as Chrome CPU Profile (old format)"),v((0,r.importFromOldV8CPUProfile)(I));if("mode"in I&&"frames"in I&&"raw_timestamp_deltas"in I)return console.log("Importing as stackprof profile"),v((0,e.importFromStackprof)(I));if("code"in I&&"functions"in I&&"ticks"in I)return console.log("Importing as --prof-process v8 log"),v((0,s.importFromV8ProfLog)(I));if("head"in I&&"selfSize"in I.head)return console.log("Importing as Chrome Heap Profile"),v((0,u.importFromChromeHeapProfile)(I));if("rts_arguments"in I&&"initial_capabilities"in I)return console.log("Importing as Haskell GHC JSON Profile"),(0,m.importFromHaskell)(I);if("recording"in I&&"sampleStackTraces"in I.recording)return console.log("Importing as Safari profile"),v((0,p.importFromSafari)(I))}else{if(/^# callgrind format/.exec(C.firstChunk())||/^events:/m.exec(C.firstChunk())&&/^fn=/m.exec(C.firstChunk()))return console.log("Importing as Callgrind profile"),(0,g.importFromCallgrind)(C,c);if(/^[\w \t\(\)]*\tSymbol Name/.exec(C.firstChunk()))return console.log("Importing as Instruments.app deep copy"),v((0,o.importFromInstrumentsDeepCopy)(C));if(/^(Stack_|Script_|Obj_)\S+ log opened \(PC\)\n/.exec(C.firstChunk()))return console.log("Importing as Papyrus profile"),v((0,h.importFromPapyrus)(C));const r=(0,l.importFromLinuxPerf)(C);if(r)return console.log("Importing from linux perf script output"),r;const e=(0,i.importFromBGFlameGraph)(C);if(e)return console.log("Importing as collapsed stack format"),v(e)}return null})}function T(r){return F(this,void 0,void 0,function*(){return(0,o.importFromInstrumentsTrace)(r)})} -},{"./chrome":"kWV1","./stackprof":"I37H","./instruments":"G28U","./bg-flamegraph":"flbo","./firefox":"uNW1","../lib/file-format":"Xzb6","./v8proflog":"QV03","./linux-tools-perf":"f2sa","./haskell":"jm73","./safari":"jP3w","./utils":"QTYz","./pprof":"VmHy","../lib/utils":"ucYa","./v8heapalloc":"bNW7","./trace-event":"KFvE","./callgrind":"TZYa","./papyrus":"duFC"}]},{},[], null) -//# sourceMappingURL=import.bcbb2033.js.map \ No newline at end of file diff --git a/deps/speedscope/index.html b/deps/speedscope/index.html index 1c9cc7ba..304842d7 100644 --- a/deps/speedscope/index.html +++ b/deps/speedscope/index.html @@ -1,2 +1,19 @@ -speedscope - \ No newline at end of file + + + + + + + speedscope + + + + + + + + + + + + diff --git a/deps/speedscope/perf-vertx-stacks-01-collapsed-all.2681da68.txt b/deps/speedscope/perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt similarity index 100% rename from deps/speedscope/perf-vertx-stacks-01-collapsed-all.2681da68.txt rename to deps/speedscope/perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt diff --git a/deps/speedscope/release.txt b/deps/speedscope/release.txt index dcb0b614..f5f89340 100644 --- a/deps/speedscope/release.txt +++ b/deps/speedscope/release.txt @@ -1,3 +1,3 @@ -speedscope@1.21.0 -Sat Nov 16 22:13:27 PST 2024 -d36c3a54424063a8df7bc67a7b824a223d73861b +speedscope@1.21.2 +Wed Jan 15 14:56:30 PST 2025 +c04a148518425e8334e24542bb8ec34e299d9e07 diff --git a/deps/speedscope/reset.8c46b7a1.css b/deps/speedscope/reset.8c46b7a1.css deleted file mode 100644 index d88db9c0..00000000 --- a/deps/speedscope/reset.8c46b7a1.css +++ /dev/null @@ -1,2 +0,0 @@ -a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{overflow:hidden}body,html{height:100%}body{overflow:auto} -/*# sourceMappingURL=reset.8c46b7a1.css.map */ \ No newline at end of file diff --git a/deps/speedscope/source-code-pro.52b1676f.css b/deps/speedscope/source-code-pro.52b1676f.css deleted file mode 100644 index ecda3335..00000000 --- a/deps/speedscope/source-code-pro.52b1676f.css +++ /dev/null @@ -1,2 +0,0 @@ -@font-face{font-family:Source Code Pro;font-weight:400;font-style:normal;font-stretch:normal;src:url(SourceCodePro-Regular.ttf.f546cbe0.woff2) format("woff2")} -/*# sourceMappingURL=source-code-pro.52b1676f.css.map */ \ No newline at end of file diff --git a/deps/speedscope/source-map.438fa06b.js b/deps/speedscope/source-map.438fa06b.js deleted file mode 100644 index 2ea3f37a..00000000 --- a/deps/speedscope/source-map.438fa06b.js +++ /dev/null @@ -1,24 +0,0 @@ -parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c>1;return 1==(1&e)?-r:r}exports.encode=function(n){var d,a="",c=i(n);do{d=c&o,(c>>>=r)>0&&(d|=t),a+=e.encode(d)}while(c>0);return a},exports.decode=function(n,i,a){var c,u,h=n.length,s=0,v=0;do{if(i>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(u=e.decode(n.charCodeAt(i++))))throw new Error("Invalid base64 digit: "+n.charAt(i-1));c=!!(u&t),s+=(u&=o)<=0;s--)"."===(a=u[s])?u.splice(s,1):".."===a?c++:c>0&&(""===a?(u.splice(s+1,c),c=0):(u.splice(s,2),c--));return""===(r=u.join("/"))&&(r=i?"/":"."),n?(n.path=r,o(n)):r}function i(e,r){""===e&&(e="."),""===r&&(r=".");var i=t(r),u=t(e);if(u&&(e=u.path||"/"),i&&!i.scheme)return u&&(i.scheme=u.scheme),o(i);if(i||r.match(n))return r;if(u&&!u.host&&!u.path)return u.host=r,o(u);var c="/"===r.charAt(0)?r:a(e.replace(/\/+$/,"")+"/"+r);return u?(u.path=c,o(u)):c}function u(e,r){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==r.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return r;if((e=e.slice(0,t)).match(/^([^\/]+:\/)?\/*$/))return r;++n}return Array(n+1).join("../")+r.substr(e.length+1)}exports.urlParse=t,exports.urlGenerate=o,exports.normalize=a,exports.join=i,exports.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},exports.relative=u;var c=!("__proto__"in Object.create(null));function s(e){return e}function l(e){return p(e)?"$"+e:e}function h(e){return p(e)?e.slice(1):e}function p(e){if(!e)return!1;var r=e.length;if(r<9)return!1;if(95!==e.charCodeAt(r-1)||95!==e.charCodeAt(r-2)||111!==e.charCodeAt(r-3)||116!==e.charCodeAt(r-4)||111!==e.charCodeAt(r-5)||114!==e.charCodeAt(r-6)||112!==e.charCodeAt(r-7)||95!==e.charCodeAt(r-8)||95!==e.charCodeAt(r-9))return!1;for(var n=r-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function f(e,r,n){var t=d(e.source,r.source);return 0!==t?t:0!==(t=e.originalLine-r.originalLine)?t:0!==(t=e.originalColumn-r.originalColumn)||n?t:0!==(t=e.generatedColumn-r.generatedColumn)?t:0!==(t=e.generatedLine-r.generatedLine)?t:d(e.name,r.name)}function g(e,r,n){var t=e.generatedLine-r.generatedLine;return 0!==t?t:0!==(t=e.generatedColumn-r.generatedColumn)||n?t:0!==(t=d(e.source,r.source))?t:0!==(t=e.originalLine-r.originalLine)?t:0!==(t=e.originalColumn-r.originalColumn)?t:d(e.name,r.name)}function d(e,r){return e===r?0:null===e?1:null===r?-1:e>r?1:-1}function m(e,r){var n=e.generatedLine-r.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-r.generatedColumn)?n:0!==(n=d(e.source,r.source))?n:0!==(n=e.originalLine-r.originalLine)?n:0!==(n=e.originalColumn-r.originalColumn)?n:d(e.name,r.name)}function C(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}function v(e,r,n){if(r=r||"",e&&("/"!==e[e.length-1]&&"/"!==r[0]&&(e+="/"),r=e+r),n){var u=t(n);if(!u)throw new Error("sourceMapURL could not be parsed");if(u.path){var c=u.path.lastIndexOf("/");c>=0&&(u.path=u.path.substring(0,c+1))}r=i(o(u),r)}return a(r)}exports.toSetString=c?s:l,exports.fromSetString=c?s:h,exports.compareByOriginalPositions=f,exports.compareByGeneratedPositionsDeflated=g,exports.compareByGeneratedPositionsInflated=m,exports.parseSourceMapInput=C,exports.computeSourceURL=v; -},{}],"dghU":[function(require,module,exports) { -var t=require("./util"),e=Object.prototype.hasOwnProperty,r="undefined"!=typeof Map;function n(){this._array=[],this._set=r?new Map:Object.create(null)}n.fromArray=function(t,e){for(var r=new n,i=0,s=t.length;i=0)return i}else{var s=t.toSetString(n);if(e.call(this._set,s))return this._set[s]}throw new Error('"'+n+'" is not in the set.')},n.prototype.at=function(t){if(t>=0&&ta||n==a&&s>=o||t.compareByGeneratedPositionsInflated(e,r)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e)},r.prototype.add=function(t){e(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},exports.MappingList=r; -},{"./util":"XUQW"}],"Wwhl":[function(require,module,exports) { -var e=require("./base64-vlq"),n=require("./util"),o=require("./array-set").ArraySet,t=require("./mapping-list").MappingList;function r(e){e||(e={}),this._file=n.getArg(e,"file",null),this._sourceRoot=n.getArg(e,"sourceRoot",null),this._skipValidation=n.getArg(e,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new t,this._sourcesContents=null}r.prototype._version=3,r.fromSourceMap=function(e){var o=e.sourceRoot,t=new r({file:e.file,sourceRoot:o});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=o&&(r.source=n.relative(o,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),t.addMapping(r)}),e.sources.forEach(function(r){var i=r;null!==o&&(i=n.relative(o,r)),t._sources.has(i)||t._sources.add(i);var s=e.sourceContentFor(r);null!=s&&t.setSourceContent(r,s)}),t},r.prototype.addMapping=function(e){var o=n.getArg(e,"generated"),t=n.getArg(e,"original",null),r=n.getArg(e,"source",null),i=n.getArg(e,"name",null);this._skipValidation||this._validateMapping(o,t,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:o.line,generatedColumn:o.column,originalLine:null!=t&&t.line,originalColumn:null!=t&&t.column,source:r,name:i})},r.prototype.setSourceContent=function(e,o){var t=e;null!=this._sourceRoot&&(t=n.relative(this._sourceRoot,t)),null!=o?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(t)]=o):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(t)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,t,r){var i=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=e.file}var s=this._sourceRoot;null!=s&&(i=n.relative(s,i));var l=new o,u=new o;this._mappings.unsortedForEach(function(o){if(o.source===i&&null!=o.originalLine){var t=e.originalPositionFor({line:o.originalLine,column:o.originalColumn});null!=t.source&&(o.source=t.source,null!=r&&(o.source=n.join(r,o.source)),null!=s&&(o.source=n.relative(s,o.source)),o.originalLine=t.line,o.originalColumn=t.column,null!=t.name&&(o.name=t.name))}var a=o.source;null==a||l.has(a)||l.add(a);var c=o.name;null==c||u.has(c)||u.add(c)},this),this._sources=l,this._names=u,e.sources.forEach(function(o){var t=e.sourceContentFor(o);null!=t&&(null!=r&&(o=n.join(r,o)),null!=s&&(o=n.relative(s,o)),this.setSourceContent(o,t))},this)},r.prototype._validateMapping=function(e,n,o,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)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||o||t)&&!(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&&o))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:o,original:n,name:t}))},r.prototype._serializeMappings=function(){for(var o,t,r,i,s=0,l=1,u=0,a=0,c=0,p=0,g="",h=this._mappings.toArray(),m=0,f=h.length;m0){if(!n.compareByGeneratedPositionsInflated(t,h[m-1]))continue;o+=","}o+=e.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),o+=e.encode(i-p),p=i,o+=e.encode(t.originalLine-1-a),a=t.originalLine-1,o+=e.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),o+=e.encode(r-c),c=r)),g+=o}return g},r.prototype._generateSourcesContent=function(e,o){return e.map(function(e){if(!this._sourcesContents)return null;null!=o&&(e=n.relative(o,e));var t=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},exports.SourceMapGenerator=r; -},{"./base64-vlq":"iWlY","./util":"XUQW","./array-set":"dghU","./mapping-list":"AUTm"}],"rdpJ":[function(require,module,exports) { -function r(t,e,E,n,o,_){var U=Math.floor((e-t)/2)+t,s=o(E,n[U],!0);return 0===s?U:s>0?e-U>1?r(U,e,E,n,o,_):_==exports.LEAST_UPPER_BOUND?e1?r(t,U,E,n,o,_):_==exports.LEAST_UPPER_BOUND?U:t<0?-1:t}exports.GREATEST_LOWER_BOUND=1,exports.LEAST_UPPER_BOUND=2,exports.search=function(t,e,E,n){if(0===e.length)return-1;var o=r(-1,e.length,t,e,E,n||exports.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===E(e[o],e[o-1],!0);)--o;return o}; -},{}],"lFls":[function(require,module,exports) { -function n(n,r,t){var o=n[r];n[r]=n[t],n[t]=o}function r(n,r){return Math.round(n+Math.random()*(r-n))}function t(o,a,u,f){if(u=0){var a=this._originalMappings[s];if(void 0===r.column)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:e.getArg(a,"generatedLine",null),column:e.getArg(a,"generatedColumn",null),lastColumn:e.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var l=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==l;)i.push({line:e.getArg(a,"generatedLine",null),column:e.getArg(a,"generatedColumn",null),lastColumn:e.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i},exports.SourceMapConsumer=i,s.prototype=Object.create(i.prototype),s.prototype.consumer=i,s.prototype._findSourceIndex=function(n){var r,t=n;if(null!=this.sourceRoot&&(t=e.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);for(r=0;r1&&(i.source=f+u[1],f+=u[1],i.originalLine=h+u[2],h=i.originalLine,i.originalLine+=1,i.originalColumn=m+u[3],m=i.originalColumn,u.length>4&&(i.name=_+u[4],_+=u[4])),y.push(i),"number"==typeof i.originalLine&&v.push(i)}o(y,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,o(v,e.compareByOriginalPositions),this.__originalMappings=v},s.prototype._findMapping=function(e,r,t,o,i,s){if(e[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[t]);if(e[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[o]);return n.search(e,r,i,s)},s.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[t];if(o.generatedLine===r.generatedLine){var s=e.getArg(o,"source",null);null!==s&&(s=this._sources.at(s),s=e.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var a=e.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:e.getArg(o,"originalLine",null),column:e.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},s.prototype.sourceContentFor=function(n,r){if(!this.sourcesContent)return null;var t=this._findSourceIndex(n);if(t>=0)return this.sourcesContent[t];var o,i=n;if(null!=this.sourceRoot&&(i=e.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=e.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(n){var r=e.getArg(n,"source");if((r=this._findSourceIndex(r))<0)return{line:null,column:null,lastColumn:null};var t={source:r,originalLine:e.getArg(n,"line"),originalColumn:e.getArg(n,"column")},o=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(n,"bias",i.GREATEST_LOWER_BOUND));if(o>=0){var s=this._originalMappings[o];if(s.source===t.source)return{line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},exports.BasicSourceMapConsumer=s,u.prototype=Object.create(i.prototype),u.prototype.constructor=i,u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){for(var e=[],n=0;n=0;e--)this.prepend(n[e]);else{if(!n[o]&&"string"!=typeof n)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);this.children.unshift(n)}return this},i.prototype.walk=function(n){for(var e,r=0,t=this.children.length;r0){for(e=[],r=0;r{var P0=Object.create;var Di=Object.defineProperty;var D0=Object.getOwnPropertyDescriptor;var z0=Object.getOwnPropertyNames;var V0=Object.getPrototypeOf,J0=Object.prototype.hasOwnProperty;var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ps=(t,e)=>{for(var r in e)Di(t,r,{get:e[r],enumerable:!0})},U0=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of z0(e))!J0.call(t,n)&&n!==r&&Di(t,n,{get:()=>e[n],enumerable:!(a=D0(e,n))||a.enumerable});return t};var se=(t,e,r)=>(r=t!=null?P0(V0(t)):{},U0(e||!t||!t.__esModule?Di(r,"default",{value:t,enumerable:!0}):r,t));function Z(t){return t[t.length-1]||null}function Ie(t,e){function r(a,n){let i=e(a),o=e(n);return io?1:0}t.sort(r)}function Ce(t,e,r){return t.has(e)||t.set(e,r(e)),t.get(e)}function Zn(t,e,r){return t.has(e)?t.get(e):r(e)}function Ue(t,e){if(!t.has(e))throw new Error(`Expected key ${e}`);return t.get(e)}function*As(t,e){for(let r of t)yield e(r)}function Ns(t,e){for(let r of t)e(r)}function Ut(t,e){return new Array(Math.max(e-t.length,0)+1).join("0")+t}function vt(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 Y0(t){return t-Math.floor(t)}function Qn(t){return 2*Math.abs(Y0(t)-.5)-1}function Es(t,e,r,a,n=1){for(console.assert(!isNaN(n)&&!isNaN(a));;){if(e-t<=n)return[t,e];let i=(e+t)/2;r(i){let a;return e==null?(a=t(r),e={args:r,result:a},a):(hn(e.args,r)||(e.args=r,e.result=t(r)),e.result)}}function Tr(t){let e=null;return r=>{let a;return e==null?(a=t(r),e={args:r,result:a},a):(e.args===r||(e.args=r,e.result=t(r)),e.result)}}function Z0(t){let e=null;return()=>(e==null&&(e={result:t()}),e.result)}function Hs(t){let e=Q0();if(t.length%4!==0)throw new Error(`Invalid length for base64 encoded string. Expected length % 4 = 0, got length = ${t.length}`);let r=t.length/4,a;t.length>=4&&t.charAt(t.length-1)==="="?t.charAt(t.length-2)==="="?a=r*3-2:a=r*3-1:a=r*3;let n=new Uint8Array(a),i=0;for(let o=0;o>4,s!=="="&&(n[i++]=(f&15)<<4|v>>2),c!=="="&&(n[i++]=(v&7)<<6|b)}if(i!==a)throw new Error(`Expected to decode ${a} bytes, but only decoded ${i})`);return n}var pt,Q0,$=ie(()=>{"use strict";pt=class{constructor(){this.map=new Map}getOrInsert(e){let r=e.key,a=this.map.get(r);return a||(this.map.set(r,e),e)}forEach(e){this.map.forEach(e)}[Symbol.iterator](){return this.map.values()}};Q0=Z0(()=>{let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Map;for(let r=0;r{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.default=Hp;var Ap=_r(),Np=Ep(Ap);function Ep(t){return t&&t.__esModule?t:{default:t}}var Tp=["-webkit-","-moz-",""];function Hp(t,e){if(typeof e=="string"&&!(0,Np.default)(e)&&e.indexOf("calc(")>-1)return Tp.map(function(r){return e.replace(/calc\(/g,r+"calc(")})}d_.exports=ya.default});var m_=E((ba,v_)=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.default=Mp;var Rp=_r(),Lp=Ip(Rp);function Ip(t){return t&&t.__esModule?t:{default:t}}var Fp=["-webkit-",""];function Mp(t,e){if(typeof e=="string"&&!(0,Lp.default)(e)&&e.indexOf("cross-fade(")>-1)return Fp.map(function(r){return e.replace(/cross-fade\(/g,r+"cross-fade(")})}v_.exports=ba.default});var y_=E((Sa,g_)=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.default=Pp;var Op=["-webkit-","-moz-",""],Bp={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function Pp(t,e){if(t==="cursor"&&Bp.hasOwnProperty(e))return Op.map(function(r){return r+e})}g_.exports=Sa.default});var S_=E((ja,b_)=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.default=Up;var Dp=_r(),zp=Vp(Dp);function Vp(t){return t&&t.__esModule?t:{default:t}}var Jp=["-webkit-",""];function Up(t,e){if(typeof e=="string"&&!(0,zp.default)(e)&&e.indexOf("filter(")>-1)return Jp.map(function(r){return e.replace(/filter\(/g,r+"filter(")})}b_.exports=ja.default});var w_=E((Ca,C_)=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.default=Kp;var j_={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 Kp(t,e){if(t==="display"&&j_.hasOwnProperty(e))return j_[e]}C_.exports=Ca.default});var A_=E((wa,k_)=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.default=Wp;var $p={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},x_={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function Wp(t,e,r){x_.hasOwnProperty(t)&&(r[x_[t]]=$p[e]||e)}k_.exports=wa.default});var T_=E((xa,E_)=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.default=qp;var Gp={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},N_={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};function qp(t,e,r){t==="flexDirection"&&typeof e=="string"&&(e.indexOf("column")>-1?r.WebkitBoxOrient="vertical":r.WebkitBoxOrient="horizontal",e.indexOf("reverse")>-1?r.WebkitBoxDirection="reverse":r.WebkitBoxDirection="normal"),N_.hasOwnProperty(t)&&(r[N_[t]]=Gp[e]||e)}E_.exports=xa.default});var R_=E((ka,H_)=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.default=tv;var Xp=_r(),Yp=Zp(Xp);function Zp(t){return t&&t.__esModule?t:{default:t}}var Qp=["-webkit-","-moz-",""],ev=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;function tv(t,e){if(typeof e=="string"&&!(0,Yp.default)(e)&&ev.test(e))return Qp.map(function(r){return r+e})}H_.exports=ka.default});var I_=E((Aa,L_)=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.default=ov;var rv=_r(),nv=av(rv);function av(t){return t&&t.__esModule?t:{default:t}}var iv=["-webkit-",""];function ov(t,e){if(typeof e=="string"&&!(0,nv.default)(e)&&e.indexOf("image-set(")>-1)return iv.map(function(r){return e.replace(/image-set\(/g,r+"image-set(")})}L_.exports=Aa.default});var M_=E((Na,F_)=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.default=lv;function lv(t,e){if(t==="position"&&e==="sticky")return["-webkit-sticky","sticky"]}F_.exports=Na.default});var B_=E((Ea,O_)=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.default=hv;var sv=["-webkit-","-moz-",""],_v={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},cv={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function hv(t,e){if(_v.hasOwnProperty(t)&&cv.hasOwnProperty(e))return sv.map(function(r){return r+e})}O_.exports=Ea.default});var D_=E((OS,P_)=>{"use strict";var fv=/[A-Z]/g,uv=/^ms-/,ho={};function dv(t){return t in ho?ho[t]:ho[t]=t.replace(fv,"-$&").toLowerCase().replace(uv,"-ms-")}P_.exports=dv});var V_=E((Ta,z_)=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.default=gv;var pv=D_(),vv=mv(pv);function mv(t){return t&&t.__esModule?t:{default:t}}function gv(t){return(0,vv.default)(t)}z_.exports=Ta.default});var fo=E((Ha,J_)=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.default=yv;function yv(t){return t.charAt(0).toUpperCase()+t.slice(1)}J_.exports=Ha.default});var $_=E((Ra,K_)=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.default=Nv;var bv=V_(),Sv=uo(bv),jv=_r(),Cv=uo(jv),wv=fo(),U_=uo(wv);function uo(t){return t&&t.__esModule?t:{default:t}}var xv={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},kv={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function Av(t,e){if((0,Cv.default)(t))return t;for(var r=t.split(/,(?![^()]*(?:\([^()]*\))?\))/g),a=0,n=r.length;a-1&&_!=="order")for(var s=e[l],c=0,h=s.length;c-1)return i;var o=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(l){return!/-webkit-|-ms-/.test(l)}).join(",");return t.indexOf("Moz")>-1?o:(r["Webkit"+(0,U_.default)(t)]=i,r["Moz"+(0,U_.default)(t)]=o,n)}}K_.exports=Ra.default});var G_=E((BS,W_)=>{"use strict";function Ev(t){for(var e=5381,r=t.length;r;)e=e*33^t.charCodeAt(--r);return e>>>0}W_.exports=Ev});var X_=E((La,q_)=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.default=Lv;var Tv=fo(),Hv=Rv(Tv);function Rv(t){return t&&t.__esModule?t:{default:t}}function Lv(t,e,r){if(t.hasOwnProperty(e)){for(var a={},n=t[e],i=(0,Hv.default)(e),o=Object.keys(r),l=0;l{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.default=Iv;function Iv(t,e,r,a,n){for(var i=0,o=t.length;i{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.default=Fv;function Q_(t,e){t.indexOf(e)===-1&&t.push(e)}function Fv(t,e){if(Array.isArray(e))for(var r=0,a=e.length;r{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.default=Mv;function Mv(t){return t instanceof Object&&!Array.isArray(t)}rc.exports=Ma.default});var oc=E((Ba,ic)=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.default=Uv;var Ov=X_(),Bv=Oa(Ov),Pv=Z_(),ac=Oa(Pv),Dv=tc(),zv=Oa(Dv),Vv=nc(),Jv=Oa(Vv);function Oa(t){return t&&t.__esModule?t:{default:t}}function Uv(t){var e=t.prefixMap,r=t.plugins;function a(n){for(var i in n){var o=n[i];if((0,Jv.default)(o))n[i]=a(o);else if(Array.isArray(o)){for(var l=[],_=0,s=o.length;_0&&(n[i]=l)}else{var h=(0,ac.default)(r,i,o,n,e);h&&(n[i]=h),n=(0,Bv.default)(e,i,n)}}return n}return a}ic.exports=Ba.default});var uc=E((PS,fc)=>{"use strict";fc.exports=po;function po(t){yt.length||(Pa(),_c=!0),yt[yt.length]=t}var yt=[],_c=!1,Pa,gt=0,Kv=1024;function lc(){for(;gtKv){for(var e=0,r=yt.length-gt;e{"use strict";var dc=uc(),Da=[],vo=[],Wv=dc.makeRequestCallFromTimer(Gv);function Gv(){if(vo.length)throw vo.shift()}vc.exports=mo;function mo(t){var e;Da.length?e=Da.pop():e=new pc,e.task=t,dc(e)}function pc(){this.task=null}pc.prototype.call=function(){try{this.task.call()}catch(t){mo.onerror?mo.onerror(t):(vo.push(t),Wv())}finally{this.task=null,Da[Da.length]=this}}});var It,Y,Pe,He=ie(()=>{"use strict";$();It=class{constructor(){this.unit="none"}format(e){return e.toLocaleString()}},Y=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 r=e*this.multiplier;if(r/60>=1){let a=Math.floor(r/60),n=Math.floor(r-a*60).toString();return`${a}:${Ut(n,2)}`}return r/1>=1?`${r.toFixed(2)}s`:r/.001>=1?`${(r/.001).toFixed(2)}ms`:r/1e-6>=1?`${(r/1e-6).toFixed(2)}\xB5s`:`${(r/1e-9).toFixed(2)}ns`}format(e){return`${e<0?"-":""}${this.formatUnsigned(Math.abs(e))}`}},Pe=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 Co={};ps(Co,{demangleCpp:()=>Hm});function Hm(t){if(t.startsWith("__Z")){let e=$c.get(t);e!==void 0||(jo||(jo=new Function("exports",Rm)()),e=jo(t.slice(1)),e=e==="(null)"?t:e,$c.set(t,e)),t=e}return t}var jo,$c,Rm,wo=ie(()=>{"use strict";$c=new Map;Rm=` +return function(){function r(r){eval.call(null,r)}function a(r){throw print(r+":\\n"+(new Error).stack),ke=!0,"Assertion: "+r}function e(r,e){r||a("Assertion failed: "+e)}function i(r,a,i,v){function t(r,a){if("string"==a){var e=Oe;return le.stackAlloc(r.length+1),A(r,e),e}return r}function f(r,a){return"string"==a?s(r):r}try{func=ce.Module["_"+r]}catch(r){}e(func,"Cannot call unknown function "+r+" (perhaps LLVM optimizations or closure removed it?)");var _=0,n=v?v.map(function(r){return t(r,i[_++])}):[];return f(func.apply(null,n),a)}function v(r,a,e){return function(){return i(r,a,e,Array.prototype.slice.call(arguments))}}function t(r,e,i,v){switch(i=i||"i8","*"===i[i.length-1]&&(i="i32"),i){case"i1":Ae[r]=e;break;case"i8":Ae[r]=e;break;case"i16":ye[r>>1]=e;break;case"i32":Se[r>>2]=e;break;case"i64":Se[r>>2]=e;break;case"float":Ce[r>>2]=e;break;case"double":ze[0]=e,Se[r>>2]=xe[0],Se[r+4>>2]=xe[1];break;default:a("invalid type for setValue: "+i)}}function f(r,e,i){switch(e=e||"i8","*"===e[e.length-1]&&(e="i32"),e){case"i1":return Ae[r];case"i8":return Ae[r];case"i16":return ye[r>>1];case"i32":return Se[r>>2];case"i64":return Se[r>>2];case"float":return Ce[r>>2];case"double":return xe[0]=Se[r>>2],xe[1]=Se[r+4>>2],ze[0];default:a("invalid type for setValue: "+e)}return null}function _(r,a,e){var i,v;"number"==typeof r?(i=!0,v=r):(i=!1,v=r.length);var f="string"==typeof a?a:null,_=[Jr,le.stackAlloc,le.staticAlloc][void 0===e?we:e](Math.max(v,f?1:a.length));if(i)return Fa(_,0,v),_;for(var s,n=0;n>12<<12}function l(){for(;Le<=Ie;)Le=o(2*Le);var r=Ae,a=new ArrayBuffer(Le);Ae=new Int8Array(a),ye=new Int16Array(a),Se=new Int32Array(a),ge=new Uint8Array(a),me=new Uint16Array(a),Me=new Uint32Array(a),Ce=new Float32Array(a),Re=new Float64Array(a),Ae.set(r)}function b(r){for(;r.length>0;){var a=r.shift(),e=a.func;"number"==typeof e&&(e=pe[e]),e(void 0===a.arg?null:a.arg)}}function k(){b(Ve)}function u(){b(Be),be.print()}function c(r,a){return Array.prototype.slice.call(Ae.subarray(r,r+a))}function h(r,a){for(var e=new Uint8Array(a),i=0;i255&&(v&=255),e.push(v),i+=1}return a||e.push(0),e}function E(r){for(var a=[],e=0;e255&&(i&=255),a.push(String.fromCharCode(i))}return a.join("")}function A(r,a,e){for(var i=0;i255&&(v&=255),Ae[a+i]=v,i+=1}e||(Ae[a+i]=0)}function g(r,a,e,i){return r>=0?r:a<=32?2*Math.abs(1<=v&&(a<=32||r>v)&&(r=-2*v+r),r}function m(r,a,e){if(0==(0|r)|0==(0|a)|0==(0|e))var i=0;else{Se[r>>2]=0,Se[r+4>>2]=a,Se[r+8>>2]=e;var i=1}var i;return i}function S(r,a,e){if(0==(0|r)|(0|a)<0|0==(0|e))var i=0;else{Se[r>>2]=41,Se[r+4>>2]=a,Se[r+8>>2]=e;var i=1}var i;return i}function M(r,a,e){if(0==(0|r)|0==(0|e))var i=0;else{Se[r>>2]=6,Se[r+4>>2]=a,Se[r+8>>2]=e;var i=1}var i;return i}function C(r,a,e){if(0==(0|r)|0==(0|e))var i=0;else{Se[r>>2]=7,Se[r+4>>2]=a,Se[r+8>>2]=e;var i=1}var i;return i}function R(r,a){var e,i=0==(0|a);do if(i)var v=0;else{var e=(r+32|0)>>2,t=Se[e];if((0|t)>=(0|Se[r+36>>2])){var v=0;break}var f=(t<<2)+Se[r+28>>2]|0;Se[f>>2]=a;var _=Se[e]+1|0;Se[e]=_;var v=1}while(0);var v;return v}function T(r,a){var e,e=(r+12|0)>>2,i=Se[e],v=i+1|0;Se[e]=v;var t=Ae[i]<<24>>24==95;do if(t){var f=i+2|0;if(Se[e]=f,Ae[v]<<24>>24!=90){var _=0;break}var s=O(r,a),_=s}else var _=0;while(0);var _;return _}function O(r,a){var e=r+12|0,i=Ae[Se[e>>2]];r:do if(i<<24>>24==71||i<<24>>24==84)var v=Tr(r),t=v;else{var f=Ar(r),_=0==(0|f)|0==(0|a);do if(!_){if(0!=(1&Se[r+8>>2]|0))break;var s=Me[f>>2],n=(s-25|0)>>>0<3;a:do if(n)for(var o=f;;){var o,l=Me[o+4>>2],b=Me[l>>2];if((b-25|0)>>>0>=3){var k=l,u=b;break a}var o=l}else var k=f,u=s;while(0);var u,k;if(2!=(0|u)){var t=k;break r}var c=k+8|0,h=Me[c>>2],d=(Se[h>>2]-25|0)>>>0<3;a:do if(d)for(var w=h;;){var w,p=Me[w+4>>2];if((Se[p>>2]-25|0)>>>0>=3){var E=p;break a}var w=p}else var E=h;while(0);var E;Se[c>>2]=E;var t=k;break r}while(0);var A=Ae[Se[e>>2]];if(A<<24>>24==0||A<<24>>24==69){var t=f;break}var g=Or(f),y=Sr(r,g),m=D(r,3,f,y),t=m}while(0);var t;return t}function N(r){var a,e,i=Oe;Oe+=4;var v=i,e=v>>2,a=(r+12|0)>>2,t=Me[a],f=Ae[t],_=f<<24>>24;r:do if(f<<24>>24==114||f<<24>>24==86||f<<24>>24==75){var s=I(r,v,0);if(0==(0|s)){var n=0;break}var o=N(r);Se[s>>2]=o;var l=Se[e],b=R(r,l);if(0==(0|b)){var n=0;break}var n=Se[e]}else{do{if(97==(0|_)||98==(0|_)||99==(0|_)||100==(0|_)||101==(0|_)||102==(0|_)||103==(0|_)||104==(0|_)||105==(0|_)||106==(0|_)||108==(0|_)||109==(0|_)||110==(0|_)||111==(0|_)||115==(0|_)||116==(0|_)||118==(0|_)||119==(0|_)||120==(0|_)||121==(0|_)||122==(0|_)){var k=ai+20*(_-97)|0,u=P(r,k);Se[e]=u;var c=r+48|0,h=Se[c>>2]+Se[Se[u+4>>2]+4>>2]|0;Se[c>>2]=h;var d=Se[a]+1|0;Se[a]=d;var n=u;break r}if(117==(0|_)){Se[a]=t+1|0;var w=L(r),p=D(r,34,w,0);Se[e]=p;var E=p}else if(70==(0|_)){var A=F(r);Se[e]=A;var E=A}else if(48==(0|_)||49==(0|_)||50==(0|_)||51==(0|_)||52==(0|_)||53==(0|_)||54==(0|_)||55==(0|_)||56==(0|_)||57==(0|_)||78==(0|_)||90==(0|_)){var g=X(r);Se[e]=g;var E=g}else if(65==(0|_)){var y=j(r);Se[e]=y;var E=y}else if(77==(0|_)){var m=U(r);Se[e]=m;var E=m}else if(84==(0|_)){var S=x(r);if(Se[e]=S,Ae[Se[a]]<<24>>24!=73){var E=S;break}var M=R(r,S);if(0==(0|M)){var n=0;break r}var C=Se[e],T=z(r),O=D(r,4,C,T);Se[e]=O;var E=O}else if(83==(0|_)){var B=ge[t+1|0];if((B-48&255&255)<10|B<<24>>24==95|(B-65&255&255)<26){var H=V(r,0);if(Se[e]=H,Ae[Se[a]]<<24>>24!=73){var n=H;break r}var K=z(r),Y=D(r,4,H,K);Se[e]=Y;var E=Y}else{var G=X(r);if(Se[e]=G,0==(0|G)){var E=0;break}if(21==(0|Se[G>>2])){var n=G;break r}var E=G}}else if(80==(0|_)){Se[a]=t+1|0;var W=N(r),Z=D(r,29,W,0);Se[e]=Z;var E=Z}else if(82==(0|_)){Se[a]=t+1|0;var Q=N(r),q=D(r,30,Q,0);Se[e]=q;var E=q}else if(67==(0|_)){Se[a]=t+1|0;var $=N(r),J=D(r,31,$,0);Se[e]=J;var E=J}else if(71==(0|_)){Se[a]=t+1|0;var rr=N(r),ar=D(r,32,rr,0);Se[e]=ar;var E=ar}else{if(85!=(0|_)){var n=0;break r}Se[a]=t+1|0;var er=L(r);Se[e]=er;var ir=N(r),vr=Se[e],tr=D(r,28,ir,vr);Se[e]=tr;var E=tr}}while(0);var E,fr=R(r,E);if(0==(0|fr)){var n=0;break}var n=Se[e]}while(0);var n;return Oe=i,n}function I(r,a,e){for(var i,v=r+12|0,t=0!=(0|e),f=t?25:22,i=(r+48|0)>>2,_=t?26:23,s=t?27:24,n=a;;){var n,o=Se[v>>2],l=Ae[o];if(l<<24>>24!=114&&l<<24>>24!=86&&l<<24>>24!=75){var b=n;break}var k=o+1|0;if(Se[v>>2]=k,l<<24>>24==114){var u=Se[i]+9|0;Se[i]=u;var c=f}else if(l<<24>>24==86){var h=Se[i]+9|0;Se[i]=h;var c=_}else{var d=Se[i]+6|0;Se[i]=d;var c=s}var c,w=D(r,c,0,0);if(Se[n>>2]=w,0==(0|w)){var b=0;break}var n=w+4|0}var b;return b}function P(r,a){var e=0==(0|a);do if(e)var i=0;else{var v=J(r);if(0==(0|v)){var i=0;break}Se[v>>2]=33,Se[v+4>>2]=a;var i=v}while(0);var i;return i}function D(r,a,e,i){var v,t;do{if(1==(0|a)||2==(0|a)||3==(0|a)||4==(0|a)||10==(0|a)||28==(0|a)||37==(0|a)||43==(0|a)||44==(0|a)||45==(0|a)||46==(0|a)||47==(0|a)||48==(0|a)||49==(0|a)||50==(0|a)){if(0==(0|e)|0==(0|i)){var f=0;t=7;break}t=5;break}if(8==(0|a)||9==(0|a)||11==(0|a)||12==(0|a)||13==(0|a)||14==(0|a)||15==(0|a)||16==(0|a)||17==(0|a)||18==(0|a)||19==(0|a)||20==(0|a)||29==(0|a)||30==(0|a)||31==(0|a)||32==(0|a)||34==(0|a)||38==(0|a)||39==(0|a)||42==(0|a)){if(0==(0|e)){var f=0;t=7;break}t=5;break}if(36==(0|a)){if(0==(0|i)){var f=0;t=7;break}t=5;break}if(35==(0|a)||22==(0|a)||23==(0|a)||24==(0|a)||25==(0|a)||26==(0|a)||27==(0|a))t=5;else{var f=0;t=7}}while(0);do if(5==t){var _=J(r),v=_>>2;if(0==(0|_)){var f=0;break}Se[v]=a,Se[v+1]=e,Se[v+2]=i;var f=_}while(0);var f;return f}function L(r){var a=sr(r);if((0|a)<1)var e=0;else{var i=Rr(r,a);Se[r+44>>2]=i;var e=i}var e;return e}function F(r){var a,a=(r+12|0)>>2,e=Se[a],i=e+1|0;if(Se[a]=i,Ae[e]<<24>>24==70){if(Ae[i]<<24>>24==89){var v=e+2|0;Se[a]=v}var t=Sr(r,1),f=Se[a],_=f+1|0;Se[a]=_;var s=Ae[f]<<24>>24==69?t:0,n=s}else var n=0;var n;return n}function X(r){var a=Ar(r);return a}function j(r){var a,a=(r+12|0)>>2,e=Se[a],i=e+1|0;Se[a]=i;var v=Ae[e]<<24>>24==65;do if(v){var t=Ae[i];if(t<<24>>24==95)var f=0;else if((t-48&255&255)<10){for(var _=i;;){var _,s=_+1|0;if(Se[a]=s,(Ae[s]-48&255&255)>=10)break;var _=s}var n=s-i|0,o=lr(r,i,n);if(0==(0|o)){var l=0;break}var f=o}else{var b=nr(r);if(0==(0|b)){var l=0;break}var f=b}var f,k=Se[a],u=k+1|0;if(Se[a]=u,Ae[k]<<24>>24!=95){var l=0;break}var c=N(r),h=D(r,36,f,c),l=h}else var l=0;while(0);var l;return l}function U(r){var a=Oe;Oe+=4;var e=a,i=r+12|0,v=Se[i>>2],t=v+1|0;Se[i>>2]=t;var f=Ae[v]<<24>>24==77;r:do if(f){var _=N(r),s=I(r,e,1);if(0==(0|s)){var n=0;break}var o=N(r);Se[s>>2]=o;var l=(0|s)==(0|e);do if(!l){if(35==(0|Se[o>>2]))break;var b=Se[e>>2],k=R(r,b);if(0==(0|k)){var n=0;break r}}while(0);var u=Se[e>>2],c=D(r,37,_,u),n=c}else var n=0;while(0);var n;return Oe=a,n}function x(r){var a,a=(r+12|0)>>2,e=Se[a],i=e+1|0;Se[a]=i;var v=Ae[e]<<24>>24==84;do if(v){if(Ae[i]<<24>>24==95)var t=0,f=i;else{var _=sr(r);if((0|_)<0){var s=0;break}var t=_+1|0,f=Se[a]}var f,t;if(Se[a]=f+1|0,Ae[f]<<24>>24!=95){var s=0;break}var n=r+40|0,o=Se[n>>2]+1|0;Se[n>>2]=o;var l=Er(r,t),s=l}else var s=0;while(0);var s;return s}function z(r){var a,e=Oe;Oe+=4;var i=e,v=r+44|0,t=Se[v>>2],a=(r+12|0)>>2,f=Se[a],_=f+1|0;Se[a]=_;var s=Ae[f]<<24>>24==73;r:do if(s){Se[i>>2]=0;for(var n=i;;){var n,o=_r(r);if(0==(0|o)){var l=0;break r}var b=D(r,39,o,0);if(Se[n>>2]=b,0==(0|b)){var l=0;break r}var k=Se[a];if(Ae[k]<<24>>24==69)break;var n=b+8|0}var u=k+1|0;Se[a]=u,Se[v>>2]=t;var l=Se[i>>2]}else var l=0;while(0);var l;return Oe=e,l}function V(r,a){var e,e=(r+12|0)>>2,i=Se[e],v=i+1|0;Se[e]=v;var t=Ae[i]<<24>>24==83;r:do if(t){var f=i+2|0;Se[e]=f;var _=ge[v];if(_<<24>>24==95)var s=0;else{if(!((_-48&255&255)<10|(_-65&255&255)<26)){var n=8&Se[r+8>>2],o=n>>>3,l=0!=(0|n)|0==(0|a);do if(l)var b=o;else{if((Ae[f]-67&255&255)>=2){var b=o;break}var b=1}while(0);for(var b,k=0|ei;;){var k;if(k>>>0>=(ei+196|0)>>>0){var u=0;break r}if(_<<24>>24==Ae[0|k]<<24>>24)break;var k=k+28|0}var c=Se[k+20>>2];if(0!=(0|c)){var h=Se[k+24>>2],d=fr(r,c,h);Se[r+44>>2]=d}if(0==(0|b))var w=k+8|0,p=k+4|0;else var w=k+16|0,p=k+12|0;var p,w,E=Se[w>>2],A=Se[p>>2],g=r+48|0,y=Se[g>>2]+E|0;Se[g>>2]=y;var m=fr(r,A,E),u=m;break}for(var S=_,M=0,C=f;;){var C,M,S;if((S-48&255&255)<10)var R=36*M-48|0;else{if((S-65&255&255)>=26){var u=0;break r}var R=36*M-55|0}var R,T=(S<<24>>24)+R|0;if((0|T)<0){var u=0;break r}var O=C+1|0;Se[e]=O;var N=ge[C];if(N<<24>>24==95)break;var S=N,M=T,C=O}var s=T+1|0}var s;if((0|s)>=(0|Se[r+32>>2])){var u=0;break}var I=r+40|0,P=Se[I>>2]+1|0;Se[I>>2]=P;var u=Se[Se[r+28>>2]+(s<<2)>>2]}else var u=0;while(0);var u;return u}function B(r,a,e,i){var v,t,f,_,s=Oe;Oe+=28;var n,o=s,_=o>>2;Se[_]=r;var l=e+1|0,f=(o+12|0)>>2;Se[f]=l;var b=Jr(l),t=(o+4|0)>>2;if(Se[t]=b,0==(0|b))var k=0,u=1;else{var v=(o+8|0)>>2;Se[v]=0,Se[_+4]=0,Se[_+5]=0;var c=o+24|0;Se[c>>2]=0,H(o,a);var h=Me[t],d=0==(0|h);do{if(!d){var w=Me[v];if(w>>>0>=Me[f]>>>0){n=5;break}Se[v]=w+1|0,Ae[h+w|0]=0,n=6;break}n=5}while(0);5==n&&Y(o,0);var p=Se[t],E=0==(0|p)?Se[c>>2]:Se[f],k=p,u=E}var u,k;return Se[i>>2]=u,Oe=s,k}function H(r,a){var e,i,v,t,f,_,s,n,o,l,b,k,u,c,h,d,w,p,E,A,g,y,m,S,M,C,R,T,O,N,I,P,D,L,F,X,j,U,x,z,V,B,K,G,W,J,vr,tr,fr,_r,sr,nr,or,lr,br,kr,ur,cr,hr,dr,wr,pr=a>>2,Er=r>>2,Ar=Oe;Oe+=184;var gr,yr=Ar,wr=yr>>2,mr=Ar+64,dr=mr>>2,Sr=Ar+72,Mr=Ar+88,Cr=Ar+104,hr=Cr>>2,Rr=Ar+168,Tr=0==(0|a);r:do if(Tr)Z(r);else{var cr=(r+4|0)>>2,Or=Me[cr];if(0==(0|Or))break;var Nr=0|a,Ir=Me[Nr>>2];a:do{if(0==(0|Ir)){if(0!=(4&Se[Er]|0)){var Pr=Se[pr+1],Dr=Se[pr+2];q(r,Pr,Dr);break r}var ur=(r+8|0)>>2,Lr=Me[ur],Fr=a+8|0,Xr=Me[Fr>>2];if((Xr+Lr|0)>>>0>Me[Er+3]>>>0){var jr=Se[pr+1];Q(r,jr,Xr);break r}var Ur=Or+Lr|0,xr=Se[pr+1];Pa(Ur,xr,Xr,1);var zr=Se[ur]+Se[Fr>>2]|0;Se[ur]=zr;break r}if(1==(0|Ir)||2==(0|Ir)){var Vr=Se[pr+1];H(r,Vr);var Br=0==(4&Se[Er]|0),Hr=Me[cr],Kr=0!=(0|Hr);e:do if(Br){do if(Kr){var kr=(r+8|0)>>2,Yr=Me[kr];if((Yr+2|0)>>>0>Me[Er+3]>>>0)break;var Gr=Hr+Yr|0;oe=14906,Ae[Gr]=255&oe,oe>>=8,Ae[Gr+1]=255&oe;var Wr=Se[kr]+2|0;Se[kr]=Wr;break e}while(0);Q(r,0|He.__str120,2)}else{do if(Kr){var Zr=r+8|0,Qr=Me[Zr>>2];if(Qr>>>0>=Me[Er+3]>>>0)break;Se[Zr>>2]=Qr+1|0,Ae[Hr+Qr|0]=46;break e}while(0);Y(r,46)}while(0);var qr=Se[pr+2];H(r,qr);break r}if(3==(0|Ir)){for(var br=(r+20|0)>>2,$r=Me[br],lr=(r+16|0)>>2,Jr=a,ra=0,aa=$r;;){var aa,ra,Jr,ea=Me[Jr+4>>2];if(0==(0|ea)){var ia=ra,va=0;gr=33;break}if(ra>>>0>3){Z(r);break r}var ta=(ra<<4)+yr|0;Se[ta>>2]=aa,Se[br]=ta,Se[((ra<<4)+4>>2)+wr]=ea,Se[((ra<<4)+8>>2)+wr]=0;var fa=Me[lr];Se[((ra<<4)+12>>2)+wr]=fa;var _a=ra+1|0,sa=0|ea,na=Me[sa>>2];if((na-25|0)>>>0>=3){gr=25;break}var Jr=ea,ra=_a,aa=ta}e:do if(25==gr){if(4==(0|na)){Se[dr]=fa,Se[lr]=mr,Se[dr+1]=ea;var oa=Se[sa>>2],la=mr}else var oa=na,la=fa;var la,oa;if(2!=(0|oa)){var ia=_a,va=sa;break}for(var ba=_a,ka=ea+8|0;;){var ka,ba,ua=Me[ka>>2];if((Se[ua>>2]-25|0)>>>0>=3){var ia=ba,va=sa;break e}if(ba>>>0>3)break;var ca=(ba<<4)+yr|0,ha=ba-1|0,da=(ha<<4)+yr|0,or=ca>>2,nr=da>>2;Se[or]=Se[nr],Se[or+1]=Se[nr+1],Se[or+2]=Se[nr+2],Se[or+3]=Se[nr+3],Se[ca>>2]=da,Se[br]=ca,Se[((ha<<4)+4>>2)+wr]=ua,Se[((ha<<4)+8>>2)+wr]=0,Se[((ha<<4)+12>>2)+wr]=la;var ba=ba+1|0,ka=ua+4|0}Z(r);break r}while(0);var va,ia,wa=Se[pr+2];if(H(r,wa),4==(0|Se[va>>2])){var pa=Se[dr];Se[lr]=pa}var Ea=0==(0|ia);e:do if(!Ea)for(var Aa=r+8|0,ga=r+12|0,ya=ia;;){var ya,ma=ya-1|0;if(0==(0|Se[((ma<<4)+8>>2)+wr])){var Sa=Me[cr],Ma=0==(0|Sa);do{if(!Ma){var Ca=Me[Aa>>2];if(Ca>>>0>=Me[ga>>2]>>>0){gr=41;break}Se[Aa>>2]=Ca+1|0,Ae[Sa+Ca|0]=32,gr=42;break}gr=41}while(0);41==gr&&Y(r,32);var Ra=Se[((ma<<4)+4>>2)+wr];$(r,Ra)}if(0==(0|ma))break e;var ya=ma}while(0);Se[br]=$r;break r}if(4==(0|Ir)){var sr=(r+20|0)>>2,Ta=Se[sr];Se[sr]=0;var Oa=Se[pr+1];H(r,Oa);var Na=Me[cr],Ia=0==(0|Na);do{if(!Ia){var _r=(r+8|0)>>2,Da=Me[_r],La=0==(0|Da);do if(!La){if(Ae[Na+(Da-1)|0]<<24>>24!=60)break;Da>>>0>>0?(Se[_r]=Da+1|0,Ae[Na+Da|0]=32):Y(r,32)}while(0);var Fa=Me[cr];if(0==(0|Fa)){gr=54;break}var Xa=Me[_r];if(Xa>>>0>=Me[Er+3]>>>0){gr=54;break}Se[_r]=Xa+1|0,Ae[Fa+Xa|0]=60,gr=55;break}gr=54}while(0);54==gr&&Y(r,60);var ja=Se[pr+2];H(r,ja);var Ua=Me[cr],xa=0==(0|Ua);do{if(!xa){var fr=(r+8|0)>>2,za=Me[fr],Va=0==(0|za);do if(!Va){if(Ae[Ua+(za-1)|0]<<24>>24!=62)break;za>>>0>>0?(Se[fr]=za+1|0,Ae[Ua+za|0]=32):Y(r,32)}while(0);var Ba=Me[cr];if(0==(0|Ba)){gr=64;break}var Ha=Me[fr];if(Ha>>>0>=Me[Er+3]>>>0){gr=64;break}Se[fr]=Ha+1|0,Ae[Ba+Ha|0]=62,gr=65;break}gr=64}while(0);64==gr&&Y(r,62),Se[sr]=Ta;break r}if(5==(0|Ir)){var tr=(r+16|0)>>2,Ka=Me[tr];if(0==(0|Ka)){Z(r);break r}for(var Ya=Se[pr+1],Ga=Se[Ka+4>>2];;){var Ga,Ya,Wa=Se[Ga+8>>2];if(0==(0|Wa))break;if(39!=(0|Se[Wa>>2])){Z(r);break r}if((0|Ya)<1){if(0!=(0|Ya))break;var Za=Se[Ka>>2];Se[tr]=Za;var Qa=Se[Wa+4>>2];H(r,Qa),Se[tr]=Ka;break r}var Ya=Ya-1|0,Ga=Wa}Z(r);break r}if(6==(0|Ir)){var qa=Se[pr+2];H(r,qa);break r}if(7==(0|Ir)){var $a=r+8|0,Ja=Me[$a>>2];Ja>>>0>>0?(Se[$a>>2]=Ja+1|0,Ae[Or+Ja|0]=126):Y(r,126);var re=Se[pr+2];H(r,re);break r}if(8==(0|Ir)){var vr=(r+8|0)>>2,ae=Me[vr];if((ae+11|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str121,11);else{for(var ee=Or+ae|0,ie=0|He.__str121,ve=ee,te=ie+11;ie>2,se=Me[J];if((se+8|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str122,8);else{var ne=Or+se|0,le=0|ne;oe=542397526,Ae[le]=255&oe,oe>>=8,Ae[le+1]=255&oe,oe>>=8,Ae[le+2]=255&oe,oe>>=8,Ae[le+3]=255&oe;var be=ne+4|0;oe=544370534,Ae[be]=255&oe,oe>>=8,Ae[be+1]=255&oe,oe>>=8,Ae[be+2]=255&oe,oe>>=8,Ae[be+3]=255&oe;var ke=Se[J]+8|0;Se[J]=ke}var ue=Se[pr+1];H(r,ue);break r}if(10==(0|Ir)){var W=(r+8|0)>>2,ce=Me[W],he=r+12|0;if((ce+24|0)>>>0>Me[he>>2]>>>0)Q(r,0|He.__str123,24);else{var de=Or+ce|0;Pa(de,0|He.__str123,24,1);var we=Se[W]+24|0;Se[W]=we}var pe=Se[pr+1];H(r,pe);var Ee=Me[cr],ge=0==(0|Ee);do{if(!ge){var ye=Me[W];if((ye+4|0)>>>0>Me[he>>2]>>>0){gr=96;break}var me=Ee+ye|0;oe=762210605,Ae[me]=255&oe,oe>>=8,Ae[me+1]=255&oe,oe>>=8,Ae[me+2]=255&oe,oe>>=8,Ae[me+3]=255&oe;var Ce=Se[W]+4|0;Se[W]=Ce,gr=97;break}gr=96}while(0);96==gr&&Q(r,0|He.__str124,4);var Re=Se[pr+2];H(r,Re);break r}if(11==(0|Ir)){var G=(r+8|0)>>2,Te=Me[G];if((Te+13|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str125,13);else{for(var Ne=Or+Te|0,ie=0|He.__str125,ve=Ne,te=ie+13;ie>2,De=Me[K];if((De+18|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str126,18);else{for(var Le=Or+De|0,ie=0|He.__str126,ve=Le,te=ie+18;ie>2,je=Me[B];if((je+16|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str127,16);else{for(var Ue=Or+je|0,ie=0|He.__str127,ve=Ue,te=ie+16;ie>2,Ve=Me[V];if((Ve+21|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str128,21);else{var Be=Or+Ve|0;Pa(Be,0|He.__str128,21,1);var Ke=Se[V]+21|0;Se[V]=Ke}var Ye=Se[pr+1];H(r,Ye);break r}if(15==(0|Ir)){var z=(r+8|0)>>2,Ge=Me[z];if((Ge+17|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str129,17);else{for(var We=Or+Ge|0,ie=0|He.__str129,ve=We,te=ie+17;ie>2,qe=Me[x];if((qe+26|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str130,26);else{var $e=Or+qe|0;Pa($e,0|He.__str130,26,1);var Je=Se[x]+26|0;Se[x]=Je}var ri=Se[pr+1];H(r,ri);break r}if(17==(0|Ir)){var U=(r+8|0)>>2,ai=Me[U];if((ai+15|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str131,15);else{for(var ei=Or+ai|0,ie=0|He.__str131,ve=ei,te=ie+15;ie>2,ti=Me[j];if((ti+19|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str132,19);else{for(var fi=Or+ti|0,ie=0|He.__str132,ve=fi,te=ie+19;ie>2,ni=Me[X];if((ni+24|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str133,24);else{var oi=Or+ni|0;Pa(oi,0|He.__str133,24,1);var li=Se[X]+24|0;Se[X]=li}var bi=Se[pr+1];H(r,bi);break r}if(20==(0|Ir)){var F=(r+8|0)>>2,ki=Me[F];if((ki+17|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str134,17);else{for(var ui=Or+ki|0,ie=0|He.__str134,ve=ui,te=ie+17;ie>2,di=Me[L],wi=a+8|0,pi=Me[wi>>2];if((pi+di|0)>>>0>Me[Er+3]>>>0){var Ei=Se[pr+1];Q(r,Ei,pi);break r}var Ai=Or+di|0,gi=Se[pr+1];Pa(Ai,gi,pi,1);var yi=Se[L]+Se[wi>>2]|0;Se[L]=yi;break r}if(22==(0|Ir)||23==(0|Ir)||24==(0|Ir)){for(var mi=r+20|0;;){var mi,Si=Me[mi>>2];if(0==(0|Si))break a;if(0==(0|Se[Si+8>>2])){var Mi=Me[Se[Si+4>>2]>>2];if((Mi-22|0)>>>0>=3)break a;if((0|Mi)==(0|Ir))break}var mi=0|Si}var Ci=Se[pr+1];H(r,Ci);break r}if(25!=(0|Ir)&&26!=(0|Ir)&&27!=(0|Ir)&&28!=(0|Ir)&&29!=(0|Ir)&&30!=(0|Ir)&&31!=(0|Ir)&&32!=(0|Ir)){if(33==(0|Ir)){var D=(r+8|0)>>2,Ri=Me[D],P=(a+4|0)>>2,I=Me[P]>>2;if(0==(4&Se[Er]|0)){var Ti=Me[I+1];if((Ti+Ri|0)>>>0>Me[Er+3]>>>0){var Oi=Se[I];Q(r,Oi,Ti);break r}var Ni=Or+Ri|0,Ii=Se[I];Pa(Ni,Ii,Ti,1);var Pi=Se[D]+Se[Se[P]+4>>2]|0;Se[D]=Pi;break r}var Di=Me[I+3];if((Di+Ri|0)>>>0>Me[Er+3]>>>0){var Li=Se[I+2];Q(r,Li,Di);break r}var Fi=Or+Ri|0,Xi=Se[I+2];Pa(Fi,Xi,Di,1);var ji=Se[D]+Se[Se[P]+12>>2]|0;Se[D]=ji;break r}if(34==(0|Ir)){var Ui=Se[pr+1];H(r,Ui);break r}if(35==(0|Ir)){var N=(0|r)>>2;if(0!=(32&Se[N]|0)){var xi=Se[Er+5];rr(r,a,xi)}var zi=a+4|0,Vi=0==(0|Se[zi>>2]);e:do if(!Vi){var O=(r+20|0)>>2,Bi=Se[O],Hi=0|Mr;Se[Hi>>2]=Bi,Se[O]=Mr,Se[Mr+4>>2]=a;var Ki=Mr+8|0;Se[Ki>>2]=0;var Yi=Se[Er+4];Se[Mr+12>>2]=Yi;var Gi=Se[zi>>2];H(r,Gi);var Wi=Se[Hi>>2];if(Se[O]=Wi,0!=(0|Se[Ki>>2]))break r;if(0!=(32&Se[N]|0))break;var Zi=Me[cr],Qi=0==(0|Zi);do if(!Qi){var qi=r+8|0,$i=Me[qi>>2];if($i>>>0>=Me[Er+3]>>>0)break;Se[qi>>2]=$i+1|0,Ae[Zi+$i|0]=32;break e}while(0);Y(r,32)}while(0);if(0!=(32&Se[N]|0))break r;var Ji=Se[Er+5];rr(r,a,Ji);break r}if(36==(0|Ir)){var T=(r+20|0)>>2,rv=Me[T],av=0|Cr;Se[hr]=rv,Se[T]=av,Se[hr+1]=a;var ev=Cr+8|0;Se[ev>>2]=0;var iv=Se[Er+4];Se[hr+3]=iv;for(var vv=rv,tv=1;;){var tv,vv;if(0==(0|vv))break;if((Se[Se[vv+4>>2]>>2]-22|0)>>>0>=3)break;var fv=vv+8|0;if(0==(0|Se[fv>>2])){if(tv>>>0>3){Z(r);break r}var _v=(tv<<4)+Cr|0,R=_v>>2,C=vv>>2;Se[R]=Se[C],Se[R+1]=Se[C+1],Se[R+2]=Se[C+2],Se[R+3]=Se[C+3];var sv=Se[T];Se[_v>>2]=sv,Se[T]=_v,Se[fv>>2]=1;var nv=tv+1|0}else var nv=tv;var nv,vv=Se[vv>>2],tv=nv}var ov=Se[pr+2];if(H(r,ov),Se[T]=rv,0!=(0|Se[ev>>2]))break r;if(tv>>>0>1){for(var lv=tv;;){var lv,bv=lv-1|0,kv=Se[((bv<<4)+4>>2)+hr];if($(r,kv),bv>>>0<=1)break;var lv=bv}var uv=Se[T]}else var uv=rv;var uv;ar(r,a,uv);break r}if(37==(0|Ir)){var M=(r+20|0)>>2,cv=Se[M],hv=0|Rr;Se[hv>>2]=cv,Se[M]=Rr,Se[Rr+4>>2]=a;var dv=Rr+8|0;Se[dv>>2]=0;var wv=Se[Er+4];Se[Rr+12>>2]=wv;var pv=a+4|0,Ev=Se[pr+2];H(r,Ev);var Av=0==(0|Se[dv>>2]);e:do if(Av){var gv=Me[cr],yv=0==(0|gv);do{if(!yv){var mv=r+8|0,Sv=Me[mv>>2];if(Sv>>>0>=Me[Er+3]>>>0){gr=187;break}Se[mv>>2]=Sv+1|0,Ae[gv+Sv|0]=32,gr=188;break}gr=187}while(0);187==gr&&Y(r,32);var Mv=Se[pv>>2];H(r,Mv);var Cv=Me[cr],Rv=0==(0|Cv);do if(!Rv){var S=(r+8|0)>>2,Tv=Me[S];if((Tv+3|0)>>>0>Me[Er+3]>>>0)break;var Ov=Cv+Tv|0;Ae[Ov]=Ae[0|He.__str135],Ae[Ov+1]=Ae[(0|He.__str135)+1],Ae[Ov+2]=Ae[(0|He.__str135)+2];var Nv=Se[S]+3|0;Se[S]=Nv;break e}while(0);Q(r,0|He.__str135,3)}while(0);var Iv=Se[hv>>2];Se[M]=Iv;break r}if(38==(0|Ir)||39==(0|Ir)){var Pv=Se[pr+1];H(r,Pv);var Dv=a+8|0;if(0==(0|Se[Dv>>2]))break r;var Lv=Me[cr],Fv=0==(0|Lv);do{if(!Fv){var m=(r+8|0)>>2,Xv=Me[m];if((Xv+2|0)>>>0>Me[Er+3]>>>0){gr=197;break}var jv=Lv+Xv|0;oe=8236,Ae[jv]=255&oe,oe>>=8,Ae[jv+1]=255&oe;var Uv=Se[m]+2|0;Se[m]=Uv,gr=198;break}gr=197}while(0);197==gr&&Q(r,0|He.__str136,2);var xv=Se[Dv>>2];H(r,xv);break r}if(40==(0|Ir)){var y=(r+8|0)>>2,zv=Me[y],g=(r+12|0)>>2;if((zv+8|0)>>>0>Me[g]>>>0)Q(r,0|He.__str137,8);else{var Vv=Or+zv|0,le=0|Vv;oe=1919250543,Ae[le]=255&oe,oe>>=8,Ae[le+1]=255&oe,oe>>=8,Ae[le+2]=255&oe,oe>>=8,Ae[le+3]=255&oe;var be=Vv+4|0;oe=1919906913,Ae[be]=255&oe,oe>>=8,Ae[be+1]=255&oe,oe>>=8,Ae[be+2]=255&oe,oe>>=8,Ae[be+3]=255&oe;var Bv=Se[y]+8|0;Se[y]=Bv}var A=(a+4|0)>>2,Hv=(Ae[Se[Se[A]+4>>2]]-97&255&255)<26;e:do if(Hv){var Kv=Me[cr],Yv=0==(0|Kv);do if(!Yv){var Gv=Me[y];if(Gv>>>0>=Me[g]>>>0)break;Se[y]=Gv+1|0,Ae[Kv+Gv|0]=32;break e}while(0);Y(r,32)}while(0);var Wv=Me[cr],Zv=0==(0|Wv);do{if(!Zv){var Qv=Me[y],qv=Me[A],$v=Me[qv+8>>2];if(($v+Qv|0)>>>0>Me[g]>>>0){var Jv=qv,rt=$v;break}var at=Wv+Qv|0,et=Se[qv+4>>2];Pa(at,et,$v,1);var it=Se[y]+Se[Se[A]+8>>2]|0;Se[y]=it;break r}var vt=Me[A],Jv=vt,rt=Se[vt+8>>2]}while(0);var rt,Jv,tt=Se[Jv+4>>2];Q(r,tt,rt);break r}if(41==(0|Ir)){var E=(r+8|0)>>2,ft=Me[E];if((ft+9|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str10180,9);else{for(var _t=Or+ft|0,ie=0|He.__str10180,ve=_t,te=ie+9;ie>2,ot=Me[p];if((ot+9|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str10180,9);else{for(var lt=Or+ot|0,ie=0|He.__str10180,ve=lt,te=ie+9;ie>2],ct=42==(0|Se[ut>>2]);e:do if(ct){var w=(r+8|0)>>2,ht=Me[w],dt=r+12|0;ht>>>0>2]>>>0?(Se[w]=ht+1|0,Ae[Or+ht|0]=40):Y(r,40);var wt=Se[kt>>2];er(r,wt);var pt=Me[cr],Et=0==(0|pt);do if(!Et){var At=Me[w];if(At>>>0>=Me[dt>>2]>>>0)break;Se[w]=At+1|0,Ae[pt+At|0]=41;break e}while(0);Y(r,41)}else ir(r,ut);while(0);var gt=Me[cr],yt=0==(0|gt);do{if(!yt){var mt=r+8|0,St=Me[mt>>2];if(St>>>0>=Me[Er+3]>>>0){gr=232;break}Se[mt>>2]=St+1|0,Ae[gt+St|0]=40,gr=233;break}gr=232}while(0);232==gr&&Y(r,40);var Mt=Se[pr+2];H(r,Mt);var Ct=Me[cr],Rt=0==(0|Ct);do if(!Rt){var Tt=r+8|0,Ot=Me[Tt>>2];if(Ot>>>0>=Me[Er+3]>>>0)break;Se[Tt>>2]=Ot+1|0,Ae[Ct+Ot|0]=41;break r}while(0);Y(r,41);break r}if(44==(0|Ir)){var d=(a+8|0)>>2;if(45==(0|Se[Se[d]>>2])){var h=(a+4|0)>>2,Nt=Se[h],It=40==(0|Se[Nt>>2]);do if(It){var Pt=Se[Nt+4>>2];if(1!=(0|Se[Pt+8>>2]))break;if(Ae[Se[Pt+4>>2]]<<24>>24!=62)break;var Dt=r+8|0,Lt=Me[Dt>>2];Lt>>>0>>0?(Se[Dt>>2]=Lt+1|0,Ae[Or+Lt|0]=40):Y(r,40)}while(0);var Ft=Me[cr],Xt=0==(0|Ft);do{if(!Xt){var jt=r+8|0,Ut=Me[jt>>2];if(Ut>>>0>=Me[Er+3]>>>0){gr=248;break}Se[jt>>2]=Ut+1|0,Ae[Ft+Ut|0]=40,gr=249;break}gr=248}while(0);248==gr&&Y(r,40);var xt=Se[Se[d]+4>>2];H(r,xt);var zt=Me[cr],Vt=0==(0|zt);do{if(!Vt){var c=(r+8|0)>>2,Bt=Me[c];if((Bt+2|0)>>>0>Me[Er+3]>>>0){gr=252;break}var Ht=zt+Bt|0;oe=8233,Ae[Ht]=255&oe,oe>>=8,Ae[Ht+1]=255&oe;var Kt=Se[c]+2|0;Se[c]=Kt,gr=253;break}gr=252}while(0);252==gr&&Q(r,0|He.__str139,2);var Yt=Se[h];ir(r,Yt);var Gt=Me[cr],Wt=0==(0|Gt);do{if(!Wt){var u=(r+8|0)>>2,Zt=Me[u];if((Zt+2|0)>>>0>Me[Er+3]>>>0){gr=256;break}var Qt=Gt+Zt|0;oe=10272,Ae[Qt]=255&oe,oe>>=8,Ae[Qt+1]=255&oe;var qt=Se[u]+2|0;Se[u]=qt,gr=257;break}gr=256}while(0);256==gr&&Q(r,0|He.__str140,2);var $t=Se[Se[d]+8>>2];H(r,$t);var Jt=Me[cr],rf=0==(0|Jt);do{if(!rf){var af=r+8|0,ef=Me[af>>2];if(ef>>>0>=Me[Er+3]>>>0){gr=260;break}Se[af>>2]=ef+1|0,Ae[Jt+ef|0]=41,gr=261;break}gr=260}while(0);260==gr&&Y(r,41);var vf=Se[h];if(40!=(0|Se[vf>>2]))break r;var tf=Se[vf+4>>2];if(1!=(0|Se[tf+8>>2]))break r;if(Ae[Se[tf+4>>2]]<<24>>24!=62)break r;var ff=Me[cr],_f=0==(0|ff);do if(!_f){var sf=r+8|0,nf=Me[sf>>2];if(nf>>>0>=Me[Er+3]>>>0)break;Se[sf>>2]=nf+1|0,Ae[ff+nf|0]=41;break r}while(0);Y(r,41);break r}Z(r);break r}if(45==(0|Ir)){Z(r);break r}if(46==(0|Ir)){var of=a+4|0,k=(a+8|0)>>2,lf=Se[k],bf=47==(0|Se[lf>>2]);do if(bf){if(48!=(0|Se[Se[lf+8>>2]>>2]))break;var b=(r+8|0)>>2,kf=Me[b],l=(r+12|0)>>2;kf>>>0>>0?(Se[b]=kf+1|0,Ae[Or+kf|0]=40):Y(r,40);var uf=Se[Se[k]+4>>2];H(r,uf);var cf=Me[cr],hf=0==(0|cf);do{if(!hf){var df=Me[b];if((df+2|0)>>>0>Me[l]>>>0){gr=278;break}var wf=cf+df|0;oe=8233,Ae[wf]=255&oe,oe>>=8,Ae[wf+1]=255&oe;var pf=Se[b]+2|0;Se[b]=pf,gr=279;break}gr=278}while(0);278==gr&&Q(r,0|He.__str139,2);var Ef=Se[of>>2];ir(r,Ef);var Af=Me[cr],gf=0==(0|Af);do{if(!gf){var yf=Me[b];if((yf+2|0)>>>0>Me[l]>>>0){gr=282;break}var mf=Af+yf|0;oe=10272,Ae[mf]=255&oe,oe>>=8,Ae[mf+1]=255&oe;var Sf=Se[b]+2|0;Se[b]=Sf,gr=283;break}gr=282}while(0);282==gr&&Q(r,0|He.__str140,2);var Mf=Se[Se[Se[k]+8>>2]+4>>2];H(r,Mf);var Cf=Me[cr],Rf=0==(0|Cf);do{if(!Rf){var Tf=Me[b];if((Tf+5|0)>>>0>Me[l]>>>0){gr=286;break}var Of=Cf+Tf|0;Ae[Of]=Ae[0|He.__str141],Ae[Of+1]=Ae[(0|He.__str141)+1],Ae[Of+2]=Ae[(0|He.__str141)+2],Ae[Of+3]=Ae[(0|He.__str141)+3],Ae[Of+4]=Ae[(0|He.__str141)+4];var Nf=Se[b]+5|0;Se[b]=Nf,gr=287;break}gr=286}while(0);286==gr&&Q(r,0|He.__str141,5);var If=Se[Se[Se[k]+8>>2]+8>>2];H(r,If);var Pf=Me[cr],Df=0==(0|Pf);do if(!Df){var Lf=Me[b];if(Lf>>>0>=Me[l]>>>0)break;Se[b]=Lf+1|0,Ae[Pf+Lf|0]=41;break r}while(0);Y(r,41);break r}while(0);Z(r);break r}if(47==(0|Ir)||48==(0|Ir)){Z(r);break r}if(49==(0|Ir)||50==(0|Ir)){var Ff=a+4|0,Xf=Se[Ff>>2],jf=33==(0|Se[Xf>>2]);do{if(jf){var Uf=Me[Se[Xf+4>>2]+16>>2];if(1==(0|Uf)||2==(0|Uf)||3==(0|Uf)||4==(0|Uf)||5==(0|Uf)||6==(0|Uf)){var xf=a+8|0;if(0!=(0|Se[Se[xf>>2]>>2])){var zf=Uf;break}if(50==(0|Ir)){var Vf=r+8|0,Bf=Me[Vf>>2];Bf>>>0>>0?(Se[Vf>>2]=Bf+1|0,Ae[Or+Bf|0]=45):Y(r,45)}var Hf=Se[xf>>2];if(H(r,Hf),2==(0|Uf)){var Kf=Me[cr],Yf=0==(0|Kf);do if(!Yf){var Gf=r+8|0,Wf=Me[Gf>>2];if(Wf>>>0>=Me[Er+3]>>>0)break;Se[Gf>>2]=Wf+1|0,Ae[Kf+Wf|0]=117;break r}while(0);Y(r,117);break r}if(3==(0|Uf)){var Zf=Me[cr],Qf=0==(0|Zf);do if(!Qf){var qf=r+8|0,$f=Me[qf>>2];if($f>>>0>=Me[Er+3]>>>0)break;Se[qf>>2]=$f+1|0,Ae[Zf+$f|0]=108;break r}while(0);Y(r,108);break r}if(4==(0|Uf)){var Jf=Me[cr],r_=0==(0|Jf);do if(!r_){var o=(r+8|0)>>2,a_=Me[o];if((a_+2|0)>>>0>Me[Er+3]>>>0)break;var e_=Jf+a_|0;oe=27765,Ae[e_]=255&oe,oe>>=8,Ae[e_+1]=255&oe;var i_=Se[o]+2|0;Se[o]=i_;break r}while(0);Q(r,0|He.__str142,2);break r}if(5==(0|Uf)){var v_=Me[cr],t_=0==(0|v_);do if(!t_){var n=(r+8|0)>>2,f_=Me[n];if((f_+2|0)>>>0>Me[Er+3]>>>0)break;var __=v_+f_|0;oe=27756,Ae[__]=255&oe,oe>>=8,Ae[__+1]=255&oe;var s_=Se[n]+2|0;Se[n]=s_;break r}while(0);Q(r,0|He.__str143,2);break r}if(6==(0|Uf)){var n_=Me[cr],o_=0==(0|n_);do if(!o_){var s=(r+8|0)>>2,l_=Me[s];if((l_+3|0)>>>0>Me[Er+3]>>>0)break;var b_=n_+l_|0;Ae[b_]=Ae[0|He.__str144],Ae[b_+1]=Ae[(0|He.__str144)+1],Ae[b_+2]=Ae[(0|He.__str144)+2];var k_=Se[s]+3|0;Se[s]=k_;break r}while(0);Q(r,0|He.__str144,3);break r}break r}if(7==(0|Uf)){var _=Se[pr+2]>>2;if(0!=(0|Se[_])){var zf=7;break}if(!(1==(0|Se[_+2])&49==(0|Ir))){var zf=Uf;break}var u_=Ae[Se[_+1]]<<24>>24;if(48==(0|u_)){var f=(r+8|0)>>2,c_=Me[f];if((c_+5|0)>>>0>Me[Er+3]>>>0){Q(r,0|He.__str145,5);break r}var h_=Or+c_|0;Ae[h_]=Ae[0|He.__str145],Ae[h_+1]=Ae[(0|He.__str145)+1],Ae[h_+2]=Ae[(0|He.__str145)+2],Ae[h_+3]=Ae[(0|He.__str145)+3],Ae[h_+4]=Ae[(0|He.__str145)+4];var d_=Se[f]+5|0;Se[f]=d_;break r}if(49==(0|u_)){var t=(r+8|0)>>2,w_=Me[t];if((w_+4|0)>>>0>Me[Er+3]>>>0){Q(r,0|He.__str146,4);break r}var p_=Or+w_|0;oe=1702195828,Ae[p_]=255&oe,oe>>=8,Ae[p_+1]=255&oe,oe>>=8,Ae[p_+2]=255&oe,oe>>=8,Ae[p_+3]=255&oe;var E_=Se[t]+4|0;Se[t]=E_;break r}var zf=Uf;break}var zf=Uf;break}var zf=0}while(0);var zf,v=(r+8|0)>>2,A_=Me[v],i=(r+12|0)>>2;A_>>>0>>0?(Se[v]=A_+1|0,Ae[Or+A_|0]=40):Y(r,40);var g_=Se[Ff>>2];H(r,g_);var y_=Me[cr],m_=0==(0|y_);do{if(!m_){var S_=Me[v];if(S_>>>0>=Me[i]>>>0){gr=335;break}Se[v]=S_+1|0,Ae[y_+S_|0]=41,gr=336;break}gr=335}while(0);335==gr&&Y(r,41);var M_=50==(0|Se[Nr>>2]);e:do if(M_){var C_=Me[cr],R_=0==(0|C_);do if(!R_){var T_=Me[v];if(T_>>>0>=Me[i]>>>0)break;Se[v]=T_+1|0,Ae[C_+T_|0]=45;break e}while(0);Y(r,45)}while(0);if(8==(0|zf)){var O_=Me[cr],N_=0==(0|O_);do{if(!N_){var I_=Me[v];if(I_>>>0>=Me[i]>>>0){gr=345;break}Se[v]=I_+1|0,Ae[O_+I_|0]=91,gr=346;break}gr=345}while(0);345==gr&&Y(r,91);var P_=Se[pr+2];H(r,P_);var D_=Me[cr],L_=0==(0|D_);do if(!L_){var F_=Me[v];if(F_>>>0>=Me[i]>>>0)break;Se[v]=F_+1|0,Ae[D_+F_|0]=93;break r}while(0);Y(r,93);break r}var X_=Se[pr+2];H(r,X_);break r}Z(r);break r}}while(0);var e=(r+20|0)>>2,j_=Se[e],U_=0|Sr;Se[U_>>2]=j_,Se[e]=Sr,Se[Sr+4>>2]=a;var x_=Sr+8|0;Se[x_>>2]=0;var z_=Se[Er+4];Se[Sr+12>>2]=z_;var V_=Se[pr+1];H(r,V_),0==(0|Se[x_>>2])&&$(r,a);var B_=Se[U_>>2];Se[e]=B_}while(0);Oe=Ar}function K(r,a,e,i){var v=i>>2;Se[v]=r,Se[v+1]=r+e|0,Se[v+2]=a,Se[v+3]=r,Se[v+6]=e<<1,Se[v+5]=0,Se[v+9]=e,Se[v+8]=0,Se[v+10]=0,Se[v+11]=0,Se[v+12]=0}function Y(r,a){var e,i=r+4|0,v=Me[i>>2],t=0==(0|v);do if(!t){var e=(r+8|0)>>2,f=Me[e];if(f>>>0>2]>>>0)var _=v,s=f;else{tr(r,1);var n=Me[i>>2];if(0==(0|n))break;var _=n,s=Se[e]}var s,_;Ae[_+s|0]=255&a;var o=Se[e]+1|0;Se[e]=o}while(0)}function G(r,a,e,i){var v,t=i>>2,f=Oe;Oe+=4;var _=f,v=_>>2,s=0==(0|r);do if(s){if(0==(0|i)){var n=0;break}Se[t]=-3;var n=0}else{var o=0==(0|e);if(0!=(0|a)&o){if(0==(0|i)){var n=0;break}Se[t]=-3;var n=0}else{var l=W(r,_);if(0==(0|l)){if(0==(0|i)){var n=0;break}if(1==(0|Se[v])){Se[t]=-1;var n=0}else{Se[t]=-2;var n=0}}else{var b=0==(0|a);do if(b){if(o){var k=l;break}var u=Se[v];Se[e>>2]=u;var k=l}else{var c=Ca(l);if(c>>>0>2]>>>0){Ra(a,l);va(l);var k=a}else{va(a);var h=Se[v];Se[e>>2]=h;var k=l}}while(0);var k;if(0==(0|i)){var n=k;break}Se[t]=0;var n=k}}}while(0);var n;return Oe=f,n}function W(r,a){var e,i=Oe;Oe+=52;var v,t=i,e=t>>2;Se[a>>2]=0;var f=Ca(r),_=Ae[r]<<24>>24==95;do{if(_){if(Ae[r+1|0]<<24>>24==90){var s=0;v=13;break}v=3;break}v=3}while(0);do if(3==v){var n=Na(r,0|He.__str117,8);if(0!=(0|n)){var s=1;v=13;break}var o=Ae[r+8|0];if(o<<24>>24!=46&&o<<24>>24!=95&&o<<24>>24!=36){var s=1;v=13;break}var l=r+9|0,b=Ae[l];if(b<<24>>24!=68&&b<<24>>24!=73){ +var s=1;v=13;break}if(Ae[r+10|0]<<24>>24!=95){var s=1;v=13;break}var k=f+29|0,u=Jr(k);if(0==(0|u)){Se[a>>2]=1;var c=0;v=19;break}Ae[l]<<24>>24==73?Pa(u,0|He.__str118,30,1):Pa(u,0|He.__str119,29,1);var h=r+11|0,c=(Ia(u,h),u);v=19;break}while(0);if(13==v){var s;K(r,17,f,t);var d=Se[e+6],w=Ta(),p=Oe;Oe+=12*d,Oe=Oe+3>>2<<2;var E=Oe;if(Oe+=4*Se[e+9],Oe=Oe+3>>2<<2,Se[e+4]=p,Se[e+7]=E,s)var A=N(t),g=A;else var y=T(t,1),g=y;var g,m=Ae[Se[e+3]]<<24>>24==0?g:0,S=Se[e+12]+f+10*Se[e+10]|0;if(0==(0|m))var M=0;else var C=S/8+S|0,R=B(17,m,C,a),M=R;var M;Oa(w);var c=M}var c;return Oe=i,c}function Z(r){var a=r+4|0,e=Se[a>>2];va(e),Se[a>>2]=0}function Q(r,a,e){var i,v=r+4|0,t=Me[v>>2],f=0==(0|t);do if(!f){var i=(r+8|0)>>2,_=Me[i];if((_+e|0)>>>0>Me[r+12>>2]>>>0){tr(r,e);var s=Me[v>>2];if(0==(0|s))break;var n=s,o=Se[i]}else var n=t,o=_;var o,n;Pa(n+o|0,a,e,1);var l=Se[i]+e|0;Se[i]=l}while(0)}function q(r,a,e){var i,v,t=a+e|0,f=(0|e)>0;r:do if(f)for(var _=t,s=r+4|0,i=(r+8|0)>>2,n=r+12|0,o=a;;){var o,l=(_-o|0)>3;a:do{if(l){if(Ae[o]<<24>>24!=95){v=21;break}if(Ae[o+1|0]<<24>>24!=95){v=21;break}if(Ae[o+2|0]<<24>>24!=85){v=21;break}for(var b=o+3|0,k=0;;){var k,b;if(b>>>0>=t>>>0){v=21;break a}var u=ge[b],c=u<<24>>24;if((u-48&255&255)<10)var h=c-48|0;else if((u-65&255&255)<6)var h=c-55|0;else{if((u-97&255&255)>=6)break;var h=c-87|0}var h,b=b+1|0,k=(k<<4)+h|0}if(!(u<<24>>24==95&k>>>0<256)){v=21;break}var d=Me[s>>2],w=0==(0|d);do if(!w){var p=Me[i];if(p>>>0>=Me[n>>2]>>>0)break;Se[i]=p+1|0,Ae[d+p|0]=255&k;var E=b;v=25;break a}while(0);Y(r,k);var E=b;v=25;break}v=21}while(0);a:do if(21==v){var A=Me[s>>2],g=0==(0|A);do if(!g){var y=Me[i];if(y>>>0>=Me[n>>2]>>>0)break;var m=Ae[o];Se[i]=y+1|0,Ae[A+y|0]=m;var E=o;break a}while(0);var S=Ae[o]<<24>>24;Y(r,S);var E=o}while(0);var E,M=E+1|0;if(M>>>0>=t>>>0)break r;var o=M}while(0)}function $(r,a){var e,i,v,t,f,_,s,n=r>>2,o=Se[a>>2];r:do if(22==(0|o)||25==(0|o)){var l=Me[n+1],b=0==(0|l);do if(!b){var _=(r+8|0)>>2,k=Me[_];if((k+9|0)>>>0>Me[n+3]>>>0)break;for(var u=l+k|0,c=0|He.__str147,h=u,d=c+9;c>2,A=Me[f];if((A+9|0)>>>0>Me[n+3]>>>0)break;for(var g=p+A|0,c=0|He.__str148,h=g,d=c+9;c>2,M=Me[t];if((M+6|0)>>>0>Me[n+3]>>>0)break;var C=m+M|0;Ae[C]=Ae[0|He.__str149],Ae[C+1]=Ae[(0|He.__str149)+1],Ae[C+2]=Ae[(0|He.__str149)+2],Ae[C+3]=Ae[(0|He.__str149)+3],Ae[C+4]=Ae[(0|He.__str149)+4],Ae[C+5]=Ae[(0|He.__str149)+5];var R=Se[t]+6|0;Se[t]=R;break r}while(0);Q(r,0|He.__str149,6)}else if(28==(0|o)){var T=Me[n+1],O=0==(0|T);do{if(!O){var N=r+8|0,I=Me[N>>2];if(I>>>0>=Me[n+3]>>>0){s=17;break}Se[N>>2]=I+1|0,Ae[T+I|0]=32,s=18;break}s=17}while(0);17==s&&Y(r,32);var P=Se[a+8>>2];H(r,P)}else if(29==(0|o)){if(0!=(4&Se[n]|0))break;var D=Me[n+1],L=0==(0|D);do if(!L){var F=r+8|0,X=Me[F>>2];if(X>>>0>=Me[n+3]>>>0)break;Se[F>>2]=X+1|0,Ae[D+X|0]=42;break r}while(0);Y(r,42)}else if(30==(0|o)){var j=Me[n+1],U=0==(0|j);do if(!U){var x=r+8|0,z=Me[x>>2];if(z>>>0>=Me[n+3]>>>0)break;Se[x>>2]=z+1|0,Ae[j+z|0]=38;break r}while(0);Y(r,38)}else if(31==(0|o)){var V=Me[n+1],B=0==(0|V);do if(!B){var v=(r+8|0)>>2,K=Me[v];if((K+8|0)>>>0>Me[n+3]>>>0)break;var G=V+K|0,W=0|G;oe=1886220131,Ae[W]=255&oe,oe>>=8,Ae[W+1]=255&oe,oe>>=8,Ae[W+2]=255&oe,oe>>=8,Ae[W+3]=255&oe;var Z=G+4|0;oe=544761196,Ae[Z]=255&oe,oe>>=8,Ae[Z+1]=255&oe,oe>>=8,Ae[Z+2]=255&oe,oe>>=8,Ae[Z+3]=255&oe;var q=Se[v]+8|0;Se[v]=q;break r}while(0);Q(r,0|He.__str150,8)}else if(32==(0|o)){var $=Me[n+1],J=0==(0|$);do if(!J){var i=(r+8|0)>>2,rr=Me[i];if((rr+10|0)>>>0>Me[n+3]>>>0)break;for(var ar=$+rr|0,c=0|He.__str151,h=ar,d=c+10;c>2],tr=0==(0|vr);do{if(!tr){var fr=r+8|0,_r=Me[fr>>2];if(0!=(0|_r)&&Ae[vr+(_r-1)|0]<<24>>24==40){s=42;break}if(_r>>>0>=Me[n+3]>>>0){s=41;break}Se[fr>>2]=_r+1|0,Ae[vr+_r|0]=32,s=42;break}s=41}while(0);41==s&&Y(r,32);var sr=Se[a+4>>2];H(r,sr);var nr=Me[ir>>2],or=0==(0|nr);do if(!or){var e=(r+8|0)>>2,lr=Me[e];if((lr+3|0)>>>0>Me[n+3]>>>0)break;var br=nr+lr|0;Ae[br]=Ae[0|He.__str135],Ae[br+1]=Ae[(0|He.__str135)+1],Ae[br+2]=Ae[(0|He.__str135)+2];var kr=Se[e]+3|0;Se[e]=kr;break r}while(0);Q(r,0|He.__str135,3)}else if(3==(0|o)){var ur=Se[a+4>>2];H(r,ur)}else H(r,a);while(0)}function J(r){var a=r+20|0,e=Se[a>>2];if((0|e)<(0|Se[r+24>>2])){var i=Se[r+16>>2]+12*e|0,v=e+1|0;Se[a>>2]=v;var t=i}else var t=0;var t;return t}function rr(r,a,e){var i,v,t,f,_=r>>2,s=e,t=s>>2,n=0;r:for(;;){var n,s,o=0==(0|s);do if(!o){if(0!=(0|Se[t+2]))break;var l=Se[Se[t+1]>>2];if(29==(0|l)||30==(0|l)){f=9;break r}if(22==(0|l)||23==(0|l)||24==(0|l)||28==(0|l)||31==(0|l)||32==(0|l)||37==(0|l)){var b=Se[_+1];f=12;break r}var s=Se[t],t=s>>2,n=1;continue r}while(0);if(0!=(0|Se[a+4>>2])&0==(0|n)){f=9;break}var k=0,u=r+4|0,v=u>>2;f=22;break}do if(9==f){var c=Se[_+1];if(0==(0|c)){f=17;break}var h=Se[_+2];if(0==(0|h)){var d=c;f=13;break}var w=Ae[c+(h-1)|0];if(w<<24>>24==40||w<<24>>24==42){f=18;break}var b=c;f=12;break}while(0);do if(12==f){var b;if(0==(0|b)){f=17;break}var d=b;f=13;break}while(0);do if(13==f){var d,p=r+8|0,E=Me[p>>2];if(0!=(0|E)&&Ae[d+(E-1)|0]<<24>>24==32){f=18;break}if(E>>>0>=Me[_+3]>>>0){f=17;break}Se[p>>2]=E+1|0,Ae[d+E|0]=32,f=18;break}while(0);do if(17==f){Y(r,32),f=18;break}while(0);r:do if(18==f){var A=r+4|0,g=Me[A>>2],y=0==(0|g);do if(!y){var m=r+8|0,S=Me[m>>2];if(S>>>0>=Me[_+3]>>>0)break;Se[m>>2]=S+1|0,Ae[g+S|0]=40;var k=1,u=A,v=u>>2;break r}while(0);Y(r,40);var k=1,u=A,v=u>>2}while(0);var u,k,i=(r+20|0)>>2,M=Se[i];Se[i]=0,vr(r,e,0);r:do if(k){var C=Me[v],R=0==(0|C);do if(!R){var T=r+8|0,O=Me[T>>2];if(O>>>0>=Me[_+3]>>>0)break;Se[T>>2]=O+1|0,Ae[C+O|0]=41;break r}while(0);Y(r,41)}while(0);var N=Me[v],I=0==(0|N);do{if(!I){var P=r+8|0,D=Me[P>>2];if(D>>>0>=Me[_+3]>>>0){f=30;break}Se[P>>2]=D+1|0,Ae[N+D|0]=40,f=31;break}f=30}while(0);30==f&&Y(r,40);var L=Se[a+8>>2];0!=(0|L)&&H(r,L);var F=Me[v],X=0==(0|F);do{if(!X){var j=r+8|0,U=Me[j>>2];if(U>>>0>=Me[_+3]>>>0){f=36;break}Se[j>>2]=U+1|0,Ae[F+U|0]=41,f=37;break}f=36}while(0);36==f&&Y(r,41),vr(r,e,1),Se[i]=M}function ar(r,a,e){var i,v,t,f=r>>2,_=0==(0|e);do{if(!_){var s=e,v=s>>2;r:for(;;){var s;if(0==(0|s)){var n=1;t=14;break}if(0==(0|Se[v+2])){var o=36==(0|Se[Se[v+1]>>2]),l=1&o^1;if(o){var n=l;t=14;break}var b=r+4|0,k=Me[b>>2],u=0==(0|k);do{if(!u){var i=(r+8|0)>>2,c=Me[i];if((c+2|0)>>>0>Me[f+3]>>>0){t=9;break}var h=k+c|0;oe=10272,Ae[h]=255&oe,oe>>=8,Ae[h+1]=255&oe;var d=Se[i]+2|0;Se[i]=d,vr(r,e,0),t=10;break}t=9}while(0);9==t&&(Q(r,0|He.__str140,2),vr(r,e,0));var w=Me[b>>2],p=0==(0|w);do if(!p){var E=r+8|0,A=Me[E>>2];if(A>>>0>=Me[f+3]>>>0)break;Se[E>>2]=A+1|0,Ae[w+A|0]=41;var g=l;t=15;break r}while(0);Y(r,41);var g=l;t=15;break}var s=Se[v],v=s>>2}if(14==t){var n;vr(r,e,0);var g=n}var g;if(0!=(0|g)){t=17;break}var y=r+4|0;t=21;break}t=17}while(0);r:do if(17==t){var m=r+4|0,S=Me[m>>2],M=0==(0|S);do if(!M){var C=r+8|0,R=Me[C>>2];if(R>>>0>=Me[f+3]>>>0)break;Se[C>>2]=R+1|0,Ae[S+R|0]=32;var y=m;break r}while(0);Y(r,32);var y=m}while(0);var y,T=Me[y>>2],O=0==(0|T);do{if(!O){var N=r+8|0,I=Me[N>>2];if(I>>>0>=Me[f+3]>>>0){t=24;break}Se[N>>2]=I+1|0,Ae[T+I|0]=91,t=25;break}t=24}while(0);24==t&&Y(r,91);var P=Se[a+4>>2];0!=(0|P)&&H(r,P);var D=Me[y>>2],L=0==(0|D);do{if(!L){var F=r+8|0,X=Me[F>>2];if(X>>>0>=Me[f+3]>>>0){t=30;break}Se[F>>2]=X+1|0,Ae[D+X|0]=93,t=31;break}t=30}while(0);30==t&&Y(r,93)}function er(r,a){var e,i,v,t,f,_,s=Oe;Oe+=8;var n,o=s,_=(a+4|0)>>2,l=Se[_];if(4==(0|Se[l>>2])){var f=(r+20|0)>>2,b=Se[f];Se[f]=0;var t=(r+16|0)>>2,k=Se[t],u=0|o;Se[u>>2]=k,Se[t]=o;var c=Se[_];Se[o+4>>2]=c;var h=Se[c+4>>2];H(r,h);var d=Se[u>>2];Se[t]=d;var v=(r+4|0)>>2,w=Me[v],p=0==(0|w);do{if(!p){var i=(r+8|0)>>2,E=Me[i],A=0==(0|E);do if(!A){if(Ae[w+(E-1)|0]<<24>>24!=60)break;E>>>0>2]>>>0?(Se[i]=E+1|0,Ae[w+E|0]=32):Y(r,32)}while(0);var g=Me[v];if(0==(0|g)){n=12;break}var y=Me[i];if(y>>>0>=Me[r+12>>2]>>>0){n=12;break}Se[i]=y+1|0,Ae[g+y|0]=60,n=13;break}n=12}while(0);12==n&&Y(r,60);var m=Se[Se[_]+8>>2];H(r,m);var S=Me[v],M=0==(0|S);do{if(!M){var e=(r+8|0)>>2,C=Me[e],R=0==(0|C);do if(!R){if(Ae[S+(C-1)|0]<<24>>24!=62)break;C>>>0>2]>>>0?(Se[e]=C+1|0,Ae[S+C|0]=32):Y(r,32)}while(0);var T=Me[v];if(0==(0|T)){n=22;break}var O=Me[e];if(O>>>0>=Me[r+12>>2]>>>0){n=22;break}Se[e]=O+1|0,Ae[T+O|0]=62,n=23;break}n=22}while(0);22==n&&Y(r,62),Se[f]=b}else H(r,l);Oe=s}function ir(r,a){var e,i=40==(0|Se[a>>2]);r:do if(i){var v=Me[r+4>>2],t=0==(0|v);do{if(!t){var e=(r+8|0)>>2,f=Me[e],_=a+4|0,s=Me[_>>2],n=Me[s+8>>2];if((n+f|0)>>>0>Me[r+12>>2]>>>0){var o=s,l=n;break}var b=v+f|0,k=Se[s+4>>2];Pa(b,k,n,1);var u=Se[e]+Se[Se[_>>2]+8>>2]|0;Se[e]=u;break r}var c=Me[a+4>>2],o=c,l=Se[c+8>>2]}while(0);var l,o,h=Se[o+4>>2];Q(r,h,l)}else H(r,a);while(0)}function vr(r,a,e){var i,v,t,f,_,f=(r+4|0)>>2,s=0==(0|e),t=(r+16|0)>>2;r:do if(s)for(var n=a;;){var n;if(0==(0|n)){_=29;break r}if(0==(0|Se[f])){_=29;break r}var o=n+8|0,l=0==(0|Se[o>>2]);do if(l){var b=n+4|0;if((Se[Se[b>>2]>>2]-25|0)>>>0<3)break;Se[o>>2]=1;var k=Me[t],u=Se[n+12>>2];Se[t]=u;var c=Me[b>>2],h=Se[c>>2];if(35==(0|h)){var d=n,w=k,p=c;_=14;break r}if(36==(0|h)){var E=n,A=k,g=c;_=15;break r}if(2==(0|h)){var y=k,m=b;_=16;break r}$(r,c),Se[t]=k}while(0);var n=Se[n>>2]}else for(var S=a;;){var S;if(0==(0|S)){_=29;break r}if(0==(0|Se[f])){_=29;break r}var M=S+8|0;if(0==(0|Se[M>>2])){Se[M>>2]=1;var C=Me[t],R=Se[S+12>>2];Se[t]=R;var T=S+4|0,O=Me[T>>2],N=Se[O>>2];if(35==(0|N)){var d=S,w=C,p=O;_=14;break r}if(36==(0|N)){var E=S,A=C,g=O;_=15;break r}if(2==(0|N)){var y=C,m=T;_=16;break r}$(r,O),Se[t]=C}var S=Se[S>>2]}while(0);if(14==_){var p,w,d,I=Se[d>>2];rr(r,p,I),Se[t]=w}else if(15==_){var g,A,E,P=Se[E>>2];ar(r,g,P),Se[t]=A}else if(16==_){var m,y,v=(r+20|0)>>2,D=Se[v];Se[v]=0;var L=Se[Se[m>>2]+4>>2];H(r,L),Se[v]=D;var F=0==(4&Se[r>>2]|0),X=Me[f],j=0!=(0|X);r:do if(F){do if(j){var i=(r+8|0)>>2,U=Me[i];if((U+2|0)>>>0>Me[r+12>>2]>>>0)break;var x=X+U|0;oe=14906,Ae[x]=255&oe,oe>>=8,Ae[x+1]=255&oe;var z=Se[i]+2|0;Se[i]=z;break r}while(0);Q(r,0|He.__str120,2)}else{do if(j){var V=r+8|0,B=Me[V>>2];if(B>>>0>=Me[r+12>>2]>>>0)break;Se[V>>2]=B+1|0,Ae[X+B|0]=46;break r}while(0);Y(r,46)}while(0);var K=Me[Se[m>>2]+8>>2],G=(Se[K>>2]-25|0)>>>0<3;r:do if(G)for(var W=K;;){var W,Z=Me[W+4>>2];if((Se[Z>>2]-25|0)>>>0>=3){var q=Z;break r}var W=Z}else var q=K;while(0);var q;H(r,q),Se[t]=y}}function tr(r,a){var e,e=(r+4|0)>>2,i=Se[e],v=0==(0|i);r:do if(!v){for(var t=Se[r+8>>2]+a|0,f=r+12|0,_=Se[f>>2],s=i;;){var s,_;if(t>>>0<=_>>>0)break r;var n=_<<1,o=fa(s,n);if(0==(0|o))break;Se[e]=o,Se[f>>2]=n;var _=n,s=o}var l=Se[e];va(l),Se[e]=0,Se[r+24>>2]=1}while(0)}function fr(r,a,e){var i,v=J(r),i=v>>2;return 0!=(0|v)&&(Se[i]=21,Se[i+1]=a,Se[i+2]=e),v}function _r(r){var a,a=(r+12|0)>>2,e=Se[a],i=Ae[e]<<24>>24;if(88==(0|i)){var v=e+1|0;Se[a]=v;var t=nr(r),f=Se[a],_=f+1|0;Se[a]=_;var s=Ae[f]<<24>>24==69?t:0,n=s}else if(76==(0|i))var o=or(r),n=o;else var l=N(r),n=l;var n;return n}function sr(r){var a,a=(r+12|0)>>2,e=Se[a],i=Ae[e];if(i<<24>>24==110){var v=e+1|0;Se[a]=v;var t=1,f=Ae[v],_=v}else var t=0,f=i,_=e;var _,f,t,s=(f-48&255&255)<10;r:do if(s)for(var n=f,o=0,l=_;;){var l,o,n,b=(n<<24>>24)-48+10*o|0,k=l+1|0;Se[a]=k;var u=ge[k];if((u-48&255&255)>=10){var c=b;break r}var n=u,o=b,l=k}else var c=0;while(0);var c,h=0==(0|t)?c:0|-c;return h}function nr(r){var a,e,a=(r+12|0)>>2,i=Se[a],v=Ae[i];do{if(v<<24>>24==76){var t=or(r),f=t;e=21;break}if(v<<24>>24==84){var _=x(r),f=_;e=21;break}if(v<<24>>24==115){if(Ae[i+1|0]<<24>>24!=114){e=8;break}var s=i+2|0;Se[a]=s;var n=N(r),o=br(r);if(Ae[Se[a]]<<24>>24==73){var l=z(r),b=D(r,4,o,l),k=D(r,1,n,b),f=k;e=21;break}var u=D(r,1,n,o),f=u;e=21;break}e=8}while(0);r:do if(8==e){var c=kr(r);if(0==(0|c)){var f=0;break}var h=0|c,d=Se[h>>2],w=40==(0|d);do{if(w){var p=c+4|0,E=r+48|0,A=Se[Se[p>>2]+8>>2]-2+Se[E>>2]|0;Se[E>>2]=A;var g=Se[h>>2];if(40!=(0|g)){var y=g;e=13;break}var m=Se[p>>2],S=Se[m>>2],M=Da(S,0|He.__str90);if(0!=(0|M)){var C=m;e=15;break}var R=N(r),T=D(r,43,c,R),f=T;break r}var y=d;e=13}while(0);do if(13==e){var y;if(40==(0|y)){var C=Se[c+4>>2];e=15;break}if(41==(0|y)){var O=c+4|0;e=17;break}if(42==(0|y)){e=18;break}var f=0;break r}while(0);do if(15==e){var C,O=C+12|0;e=17;break}while(0);do if(17==e){var O,I=Se[O>>2];if(1==(0|I))break;if(2==(0|I)){var P=nr(r),L=nr(r),F=D(r,45,P,L),X=D(r,44,c,F);return X}if(3==(0|I)){var j=nr(r),U=nr(r),V=nr(r),B=D(r,48,U,V),H=D(r,47,j,B),K=D(r,46,c,H);return K}var f=0;break r}while(0);var Y=nr(r),G=D(r,43,c,Y);return G}while(0);var f;return f}function or(r){var a,a=(r+12|0)>>2,e=Se[a],i=e+1|0;Se[a]=i;var v=Ae[e]<<24>>24==76;r:do if(v){if(Ae[i]<<24>>24==95)var t=T(r,0),f=t;else{var _=N(r);if(0==(0|_)){var s=0;break}var n=33==(0|Se[_>>2]);do if(n){var o=Se[_+4>>2];if(0==(0|Se[o+16>>2]))break;var l=r+48|0,b=Se[l>>2]-Se[o+4>>2]|0;Se[l>>2]=b}while(0);var k=Se[a];if(Ae[k]<<24>>24==110){var u=k+1|0;Se[a]=u;var c=50,h=u}else var c=49,h=k;for(var h,c,d=h;;){var d,w=Ae[d];if(w<<24>>24==69)break;if(w<<24>>24==0){var s=0;break r}var p=d+1|0;Se[a]=p;var d=p}var E=lr(r,h,d-h|0),A=D(r,c,_,E),f=A}var f,g=Se[a],y=g+1|0;Se[a]=y;var m=Ae[g]<<24>>24==69?f:0,s=m}else var s=0;while(0);var s;return s}function lr(r,a,e){var i=J(r),v=m(i,a,e),t=0==(0|v)?0:i;return t}function br(r){var a=r+12|0,e=Me[a>>2],i=ge[e],v=(i-48&255&255)<10;do if(v)var t=L(r),f=t;else if((i-97&255&255)<26){var _=kr(r);if(0==(0|_)){var f=0;break}if(40!=(0|Se[_>>2])){var f=_;break}var s=r+48|0,n=Se[Se[_+4>>2]+8>>2]+Se[s>>2]+7|0;Se[s>>2]=n;var f=_}else if(i<<24>>24==67||i<<24>>24==68)var o=hr(r),f=o;else{if(i<<24>>24!=76){var f=0;break}Se[a>>2]=e+1|0;var l=L(r);if(0==(0|l)){var f=0;break}var b=dr(r),k=0==(0|b)?0:l,f=k}while(0);var f;return f}function kr(r){var a,e,a=(r+12|0)>>2,i=Se[a],v=i+1|0;Se[a]=v;var t=ge[i],f=i+2|0;Se[a]=f;var _=ge[v];do{if(t<<24>>24==118){if((_-48&255&255)>=10){var s=49,n=0;e=6;break}var o=(_<<24>>24)-48|0,l=L(r),b=ur(r,o,l),k=b;e=14;break}if(t<<24>>24==99){if(_<<24>>24!=118){var s=49,n=0;e=6;break}var u=N(r),c=D(r,42,u,0),k=c;e=14;break}var s=49,n=0;e=6}while(0);r:do if(6==e){for(;;){var n,s,h=(s-n)/2+n|0,d=(h<<4)+ri|0,w=Se[d>>2],p=Ae[w],E=t<<24>>24==p<<24>>24;if(E&&_<<24>>24==Ae[w+1|0]<<24>>24)break;var A=t<<24>>24>24;do if(A)var g=h,y=n;else{if(E&&_<<24>>24>24){var g=h,y=n;break}var g=s,y=h+1|0}while(0);var y,g;if((0|y)==(0|g)){var k=0;break r}var s=g,n=y}var m=cr(r,d),k=m}while(0);var k;return k}function ur(r,a,e){var i=J(r),v=S(i,a,e),t=0==(0|v)?0:i;return t}function cr(r,a){var e=J(r);return 0!=(0|e)&&(Se[e>>2]=40,Se[e+4>>2]=a),e}function hr(r){var a,e,i=Se[r+44>>2],e=i>>2,v=0==(0|i);do if(!v){var t=Se[e];if(0==(0|t)){var f=r+48|0,_=Se[f>>2]+Se[e+2]|0;Se[f>>2]=_}else{if(21!=(0|t))break;var s=r+48|0,n=Se[s>>2]+Se[e+2]|0;Se[s>>2]=n}}while(0);var a=(r+12|0)>>2,o=Se[a],l=o+1|0;Se[a]=l;var b=Ae[o]<<24>>24;do if(67==(0|b)){var k=o+2|0;Se[a]=k;var u=Ae[l]<<24>>24;if(49==(0|u))var c=1;else if(50==(0|u))var c=2;else{if(51!=(0|u)){var h=0;break}var c=3}var c,d=wr(r,c,i),h=d}else if(68==(0|b)){var w=o+2|0;Se[a]=w;var p=Ae[l]<<24>>24;if(48==(0|p))var E=1;else if(49==(0|p))var E=2;else{if(50!=(0|p)){var h=0;break}var E=3}var E,A=pr(r,E,i),h=A}else var h=0;while(0);var h;return h}function dr(r){var a=r+12|0,e=Se[a>>2];if(Ae[e]<<24>>24==95){var i=e+1|0;Se[a>>2]=i;var v=sr(r),t=v>>>31^1}else var t=1;var t;return t}function wr(r,a,e){var i=J(r),v=M(i,a,e),t=0==(0|v)?0:i;return t}function pr(r,a,e){var i=J(r),v=C(i,a,e),t=0==(0|v)?0:i;return t}function Er(r,a){var e=J(r);return 0!=(0|e)&&(Se[e>>2]=5,Se[e+4>>2]=a),e}function Ar(r){var a,a=(r+12|0)>>2,e=Se[a],i=Ae[e]<<24>>24;do if(78==(0|i))var v=gr(r),t=v;else if(90==(0|i))var f=yr(r),t=f;else if(76==(0|i))var _=br(r),t=_;else if(83==(0|i)){if(Ae[e+1|0]<<24>>24==116){var s=e+2|0;Se[a]=s;var n=lr(r,0|He.__str152,3),o=br(r),l=D(r,1,n,o),b=r+48|0,k=Se[b>>2]+3|0;Se[b>>2]=k;var u=0,c=l}else var h=V(r,0),u=1,c=h;var c,u;if(Ae[Se[a]]<<24>>24!=73){var t=c;break}if(0==(0|u)){var d=R(r,c);if(0==(0|d)){var t=0;break}}var w=z(r),p=D(r,4,c,w),t=p}else{var E=br(r);if(Ae[Se[a]]<<24>>24!=73){var t=E;break}var A=R(r,E);if(0==(0|A)){var t=0;break}var g=z(r),y=D(r,4,E,g),t=y}while(0);var t;return t}function gr(r){var a,e=Oe;Oe+=4;var i=e,a=(r+12|0)>>2,v=Se[a],t=v+1|0;Se[a]=t;var f=Ae[v]<<24>>24==78;do if(f){var _=I(r,i,1);if(0==(0|_)){var s=0;break}var n=mr(r);if(Se[_>>2]=n,0==(0|n)){var s=0;break}var o=Se[a],l=o+1|0;if(Se[a]=l,Ae[o]<<24>>24!=69){var s=0;break}var s=Se[i>>2]}else var s=0;while(0);var s;return Oe=e,s}function yr(r){var a,a=(r+12|0)>>2,e=Se[a],i=e+1|0;Se[a]=i;var v=Ae[e]<<24>>24==90;do if(v){var t=O(r,0),f=Se[a],_=f+1|0;if(Se[a]=_,Ae[f]<<24>>24!=69){var s=0;break}if(Ae[_]<<24>>24==115){var n=f+2|0;Se[a]=n;var o=dr(r);if(0==(0|o)){var s=0;break}var l=lr(r,0|He.__str168,14),b=D(r,2,t,l),s=b}else{var k=Ar(r),u=dr(r);if(0==(0|u)){var s=0;break}var c=D(r,2,t,k),s=c}}else var s=0;while(0);var s;return s}function mr(r){var a,e=r+12|0,i=0;r:for(;;){var i,v=ge[Se[e>>2]];if(v<<24>>24==0){var t=0;break}var f=(v-48&255&255)<10|(v-97&255&255)<26;do{if(!f){if(v<<24>>24==76||v<<24>>24==68||v<<24>>24==67){a=5;break}if(v<<24>>24==83){var _=V(r,1),s=_;a=10;break}if(v<<24>>24==73){if(0==(0|i)){var t=0;break r}var n=z(r),o=4,l=n;a=11;break}if(v<<24>>24==84){var b=x(r),s=b;a=10;break}if(v<<24>>24==69){var t=i;break r}var t=0;break r}a=5}while(0);do if(5==a){var k=br(r),s=k;a=10;break}while(0);do if(10==a){var s;if(0==(0|i)){var u=s;a=12;break}var o=1,l=s;a=11;break}while(0);if(11==a)var l,o,c=D(r,o,i,l),u=c;var u;if(v<<24>>24!=83)if(Ae[Se[e>>2]]<<24>>24!=69){var h=R(r,u);if(0==(0|h)){var t=0;break}var i=u}else var i=u;else var i=u}var t;return t}function Sr(r,a){var e,i,v=Oe;Oe+=4;var t=v,i=t>>2,e=(r+12|0)>>2,f=Se[e];if(Ae[f]<<24>>24==74){var _=f+1|0;Se[e]=_;var s=1}else var s=a;var s;Se[i]=0;var n=s,o=0,l=t;r:for(;;)for(var l,o,n,b=n,k=o;;){var k,b,u=Ae[Se[e]];if(u<<24>>24==0||u<<24>>24==69){var c=Se[i];if(0==(0|c)){var h=0;break r}var d=0==(0|Se[c+8>>2]);do if(d){var w=Se[c+4>>2];if(33!=(0|Se[w>>2])){var p=c;break}var E=Se[w+4>>2];if(9!=(0|Se[E+16>>2])){var p=c;break}var A=r+48|0,g=Se[A>>2]-Se[E+4>>2]|0;Se[A>>2]=g,Se[i]=0;var p=0}else var p=c;while(0);var p,y=D(r,35,k,p),h=y;break r}var m=N(r);if(0==(0|m)){var h=0;break r}if(0==(0|b)){var S=D(r,38,m,0);if(Se[l>>2]=S,0==(0|S)){var h=0;break r}var n=0,o=k,l=S+8|0;continue r}var b=0,k=m}var h;return Oe=v,h}function Mr(r){for(var a=r;;){var a;if(0==(0|a)){var e=0;break}var i=Se[a>>2];if(1!=(0|i)&&2!=(0|i)){if(6==(0|i)||7==(0|i)||42==(0|i)){var e=1;break}var e=0;break}var a=Se[a+8>>2]}var e;return e}function Cr(r){var a=r>>2;Se[a+3]=0,Se[a+2]=0,Se[a+1]=0,Se[a]=0,Se[a+4]=0}function Rr(r,a){var e,e=(r+12|0)>>2,i=Se[e],v=(Se[r+4>>2]-i|0)<(0|a);r:do if(v)var t=0;else{var f=i+a|0;Se[e]=f;var _=0==(4&Se[r+8>>2]|0);do if(!_){if(Ae[f]<<24>>24!=36)break;var s=a+(i+1)|0;Se[e]=s}while(0);var n=(0|a)>9;do if(n){var o=La(i,0|He.__str117,8);if(0!=(0|o))break;var l=Ae[i+8|0];if(l<<24>>24!=46&&l<<24>>24!=95&&l<<24>>24!=36)break;if(Ae[i+9|0]<<24>>24!=78)break;var b=r+48|0,k=22-a+Se[b>>2]|0;Se[b>>2]=k;var u=lr(r,0|He.__str169,21),t=u;break r}while(0);var c=lr(r,i,a),t=c}while(0);var t;return t}function Tr(r){var a,e,e=(r+48|0)>>2,i=Se[e],v=i+20|0;Se[e]=v;var a=(r+12|0)>>2,t=Se[a],f=t+1|0;Se[a]=f;var _=Ae[t];do if(_<<24>>24==84){var s=t+2|0;Se[a]=s;var n=Ae[f]<<24>>24;if(86==(0|n)){var o=i+15|0;Se[e]=o;var l=N(r),b=D(r,8,l,0),k=b}else if(84==(0|n)){var u=i+10|0;Se[e]=u;var c=N(r),h=D(r,9,c,0),k=h}else if(73==(0|n))var d=N(r),w=D(r,11,d,0),k=w;else if(83==(0|n))var p=N(r),E=D(r,12,p,0),k=E;else if(104==(0|n)){var A=Nr(r,104);if(0==(0|A)){var k=0;break}var g=O(r,0),y=D(r,14,g,0),k=y}else if(118==(0|n)){var m=Nr(r,118);if(0==(0|m)){var k=0;break}var S=O(r,0),M=D(r,15,S,0),k=M}else if(99==(0|n)){var C=Nr(r,0);if(0==(0|C)){var k=0;break}var R=Nr(r,0);if(0==(0|R)){var k=0;break}var T=O(r,0),I=D(r,16,T,0),k=I}else if(67==(0|n)){var P=N(r),L=sr(r);if((0|L)<0){var k=0;break}var F=Se[a],X=F+1|0;if(Se[a]=X,Ae[F]<<24>>24!=95){var k=0;break}var j=N(r),U=Se[e]+5|0;Se[e]=U;var x=D(r,10,j,P),k=x}else if(70==(0|n))var z=N(r),V=D(r,13,z,0),k=V;else{if(74!=(0|n)){var k=0;break}var B=N(r),H=D(r,17,B,0),k=H}}else if(_<<24>>24==71){var K=t+2|0;Se[a]=K;var Y=Ae[f]<<24>>24;if(86==(0|Y))var G=Ar(r),W=D(r,18,G,0),k=W;else if(82==(0|Y))var Z=Ar(r),Q=D(r,19,Z,0),k=Q;else{if(65!=(0|Y)){var k=0;break}var q=O(r,0),$=D(r,20,q,0),k=$}}else var k=0;while(0);var k;return k}function Or(r){for(var a,e=r,a=e>>2;;){var e;if(0==(0|e)){var i=0;break}var v=Se[a];if(4==(0|v)){var t=Se[a+1],f=Mr(t),i=0==(0|f)&1;break}if(25!=(0|v)&&26!=(0|v)&&27!=(0|v)){var i=0;break}var e=Se[a+1],a=e>>2}var i;return i}function Nr(r,a){var e;if(0==(0|a)){var i=r+12|0,v=Se[i>>2],t=v+1|0;Se[i>>2]=t;var f=Ae[v]<<24>>24}else var f=a;var f;do{if(104==(0|f)){var _=(sr(r),r+12|0);e=7;break}if(118==(0|f)){var s=(sr(r),r+12|0),n=Se[s>>2],o=n+1|0;if(Se[s>>2]=o,Ae[n]<<24>>24!=95){var l=0;e=8;break}var _=(sr(r),s);e=7;break}var l=0;e=8}while(0);if(7==e){var _,b=Se[_>>2],k=b+1|0;Se[_>>2]=k;var l=Ae[b]<<24>>24==95&1}var l;return l}function Ir(r){var a,e,i=r>>2,v=Oe;Oe+=56;var t,f=v,_=v+8,s=v+16,n=v+36,e=(0|r)>>2,o=Se[e],l=0==(8192&o|0);r:do{if(l){var a=(r+12|0)>>2,b=Se[a];if(Ae[b]<<24>>24!=63){var k=0;t=111;break}var u=b+1|0;Se[a]=u;var c=Ae[u];do if(c<<24>>24==63){if(Ae[b+2|0]<<24>>24==36){var h=b+3|0;if(Ae[h]<<24>>24!=63){var d=5;t=90;break}Se[a]=h;var w=6,p=h}else var w=0,p=u;var p,w,E=p+1|0;Se[a]=E;var A=Ae[E]<<24>>24;do if(48==(0|A)){var g=1;t=81}else{if(49==(0|A)){var g=2;t=81;break}if(50!=(0|A)){if(51==(0|A)){var y=0|He.__str2172,m=E;t=82;break}if(52==(0|A)){var y=0|He.__str3173,m=E;t=82;break}if(53==(0|A)){var y=0|He.__str4174,m=E;t=82;break}if(54==(0|A)){var y=0|He.__str5175,m=E;t=82;break}if(55==(0|A)){var y=0|He.__str6176,m=E;t=82;break}if(56==(0|A)){var y=0|He.__str7177,m=E;t=82;break}if(57==(0|A)){var y=0|He.__str8178,m=E;t=82;break}if(65==(0|A)){var y=0|He.__str9179,m=E;t=82;break}if(66==(0|A)){Se[a]=p+2|0;var S=0|He.__str10180,M=3;t=88;break}if(67==(0|A)){var y=0|He.__str11181,m=E;t=82;break}if(68==(0|A)){var y=0|He.__str12182,m=E;t=82;break}if(69==(0|A)){var y=0|He.__str13183,m=E;t=82;break}if(70==(0|A)){var y=0|He.__str14184,m=E;t=82;break}if(71==(0|A)){var y=0|He.__str15185,m=E;t=82;break}if(72==(0|A)){var y=0|He.__str16186,m=E;t=82;break}if(73==(0|A)){var y=0|He.__str17187,m=E;t=82;break}if(74==(0|A)){var y=0|He.__str18188,m=E;t=82;break}if(75==(0|A)){var y=0|He.__str19189,m=E;t=82;break}if(76==(0|A)){var y=0|He.__str20190,m=E;t=82;break}if(77==(0|A)){var y=0|He.__str21191,m=E;t=82;break}if(78==(0|A)){var y=0|He.__str22192,m=E;t=82;break}if(79==(0|A)){var y=0|He.__str23193,m=E;t=82;break}if(80==(0|A)){var y=0|He.__str24194,m=E;t=82;break}if(81==(0|A)){var y=0|He.__str25195,m=E;t=82;break}if(82==(0|A)){var y=0|He.__str26196,m=E;t=82;break}if(83==(0|A)){var y=0|He.__str27197,m=E;t=82;break}if(84==(0|A)){var y=0|He.__str28198,m=E;t=82;break}if(85==(0|A)){var y=0|He.__str29199,m=E;t=82;break}if(86==(0|A)){var y=0|He.__str30200,m=E;t=82;break}if(87==(0|A)){var y=0|He.__str31201,m=E;t=82;break}if(88==(0|A)){var y=0|He.__str32202,m=E;t=82;break}if(89==(0|A)){var y=0|He.__str33203,m=E;t=82;break}if(90==(0|A)){var y=0|He.__str34204,m=E;t=82;break}if(95==(0|A)){var C=p+2|0;Se[a]=C;var R=Ae[C]<<24>>24;if(48==(0|R)){var y=0|He.__str35205,m=C;t=82;break}if(49==(0|R)){var y=0|He.__str36206,m=C;t=82;break}if(50==(0|R)){var y=0|He.__str37207,m=C;t=82;break}if(51==(0|R)){var y=0|He.__str38208,m=C;t=82;break}if(52==(0|R)){var y=0|He.__str39209,m=C;t=82;break}if(53==(0|R)){var y=0|He.__str40210,m=C;t=82;break}if(54==(0|R)){var y=0|He.__str41211,m=C;t=82;break}if(55==(0|R)){var y=0|He.__str42212,m=C;t=82;break}if(56==(0|R)){var y=0|He.__str43213,m=C;t=82;break}if(57==(0|R)){var y=0|He.__str44214,m=C;t=82;break}if(65==(0|R)){var y=0|He.__str45215,m=C;t=82;break}if(66==(0|R)){var y=0|He.__str46216,m=C;t=82;break}if(67==(0|R)){Se[a]=p+3|0;var T=0|He.__str47217;t=84;break}if(68==(0|R)){var y=0|He.__str48218,m=C;t=82;break}if(69==(0|R)){var y=0|He.__str49219,m=C;t=82;break}if(70==(0|R)){var y=0|He.__str50220,m=C;t=82;break}if(71==(0|R)){var y=0|He.__str51221,m=C;t=82;break}if(72==(0|R)){var y=0|He.__str52222,m=C;t=82;break}if(73==(0|R)){var y=0|He.__str53223,m=C;t=82;break}if(74==(0|R)){var y=0|He.__str54224,m=C;t=82;break}if(75==(0|R)){var y=0|He.__str55225,m=C;t=82;break}if(76==(0|R)){var y=0|He.__str56226,m=C;t=82;break}if(77==(0|R)){var y=0|He.__str57227,m=C;t=82;break}if(78==(0|R)){var y=0|He.__str58228,m=C;t=82;break}if(79==(0|R)){var y=0|He.__str59229,m=C;t=82;break}if(82==(0|R)){var O=4|o;Se[e]=O;var N=p+3|0;Se[a]=N;var I=Ae[N]<<24>>24;if(48==(0|I)){Se[a]=p+4|0,Cr(s);var P=(Pr(r,_,s,0),Se[_>>2]),D=Se[_+4>>2],L=Dr(r,0|He.__str60230,(ne=Oe,Oe+=8,Se[ne>>2]=P,Se[ne+4>>2]=D,ne)),F=Se[a]-1|0;Se[a]=F;var y=L,m=F;t=82;break}if(49==(0|I)){Se[a]=p+4|0;var X=Lr(r),j=Lr(r),U=Lr(r),x=Lr(r),z=Se[a]-1|0;Se[a]=z;var V=Dr(r,0|He.__str61231,(ne=Oe,Oe+=16,Se[ne>>2]=X,Se[ne+4>>2]=j,Se[ne+8>>2]=U,Se[ne+12>>2]=x,ne)),y=V,m=Se[a];t=82;break}if(50==(0|I)){var y=0|He.__str62232,m=N;t=82;break}if(51==(0|I)){var y=0|He.__str63233,m=N;t=82;break}if(52==(0|I)){var y=0|He.__str64234,m=N;t=82;break}var y=0,m=N;t=82;break}if(83==(0|R)){var y=0|He.__str65235,m=C;t=82;break}if(84==(0|R)){var y=0|He.__str66236,m=C;t=82;break}if(85==(0|R)){var y=0|He.__str67237,m=C;t=82;break}if(86==(0|R)){var y=0|He.__str68238,m=C;t=82;break}if(88==(0|R)){var y=0|He.__str69239,m=C;t=82;break}if(89==(0|R)){var y=0|He.__str70240,m=C;t=82;break}var k=0;t=111;break r}var k=0;t=111;break r}var y=0|He.__str1171,m=E;t=82}while(0);do{if(81==t){var g;Se[a]=p+2|0;var B=g;t=83;break}if(82==t){var m,y;if(Se[a]=m+1|0,1==(0|w)||2==(0|w)){var B=w;t=83;break}if(4==(0|w)){var T=y;t=84;break}if(6!=(0|w)){var S=y,M=w;t=88;break}Cr(n);var H=Xr(r,n,0,60,62);if(0==(0|H))var K=y;else var Y=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=y,Se[ne+4>>2]=H,ne)),K=Y;var K;Se[i+6]=0;var S=K,M=w;t=88;break}}while(0);if(83==t){var B,G=r+40|0,W=Fr(r,0|He._symbol_demangle_dashed_null,-1,G);if(0==(0|W)){var k=0;t=111;break r}var d=B;t=90;break}if(84==t){var T;Se[i+4]=T;var Z=1,Q=T;t=109;break r}if(88==t){var M,S,q=r+40|0,$=Fr(r,S,-1,q);if(0==(0|$)){var k=0;t=111;break r}var d=M;t=90;break}}else{if(c<<24>>24==36){var J=b+2|0;Se[a]=J;var rr=jr(r);Se[i+4]=rr;var ar=0!=(0|rr)&1;t=107;break}var d=0;t=90}while(0);if(90==t){var d,er=Me[a],ir=Ae[er]<<24>>24;if(64==(0|ir))Se[a]=er+1|0;else if(36==(0|ir))t=93;else{var vr=zr(r);if(0==(0|vr)){var k=-1;t=111;break}}if(5==(0|d)){var tr=r+20|0,fr=Se[tr>>2]+1|0;Se[tr>>2]=fr}else if(1==(0|d)||2==(0|d)){if(Me[i+11]>>>0<2){var k=-1;t=111;break}var _r=r+56|0,sr=Me[_r>>2],nr=Se[sr+4>>2];if(1==(0|d))Se[sr>>2]=nr;else{var or=Dr(r,0|He.__str71241,(ne=Oe,Oe+=4,Se[ne>>2]=nr,ne)),lr=Se[_r>>2];Se[lr>>2]=or}var br=4|Se[e];Se[e]=br}else if(3==(0|d)){var kr=Se[e]&-5;Se[e]=kr}var ur=ge[Se[a]];if((ur-48&255&255)<10)var cr=Vr(r),ar=cr;else if((ur-65&255&255)<26)var hr=Br(r,3==(0|d)&1),ar=hr;else{if(ur<<24>>24!=36){var k=-1;t=111;break}var dr=Hr(r),ar=dr}}var ar;if(0==(0|ar)){var k=-1;t=111;break}var Z=ar,Q=Se[i+4];t=109;break}var wr=Pr(r,f,0,0);if(0==(0|wr)){var k=-1;t=111;break}var pr=Se[f>>2],Er=Se[f+4>>2],Ar=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=pr,Se[ne+4>>2]=Er,ne));Se[i+4]=Ar;var Z=1,Q=Ar;t=109;break}while(0);do if(109==t){var Q,Z;if(0!=(0|Q)){var k=Z;break}Xa(0|He.__str72242,1499,0|He.___func___symbol_demangle,0|He.__str73243);var k=Z}while(0);var k;return Oe=v,k}function Pr(r,a,e,i){var v,t,f,_=Oe;Oe+=24;var s=_,n=_+4,o=_+8,l=_+16,b=_+20;0==(0|a)&&Xa(0|He.__str72242,829,0|He.___func___demangle_datatype,0|He.__str121291);var f=(a+4|0)>>2;Se[f]=0;var t=(0|a)>>2;Se[t]=0;var v=(r+12|0)>>2,k=Me[v],u=k+1|0;Se[v]=u;var c=Ae[k],h=c<<24>>24;do if(95==(0|h)){Se[v]=k+2|0;var d=Ae[u],w=Zr(d);Se[t]=w}else if(67==(0|h)||68==(0|h)||69==(0|h)||70==(0|h)||71==(0|h)||72==(0|h)||73==(0|h)||74==(0|h)||75==(0|h)||77==(0|h)||78==(0|h)||79==(0|h)||88==(0|h)||90==(0|h)){var p=Qr(c);Se[t]=p}else if(84==(0|h)||85==(0|h)||86==(0|h)||89==(0|h)){var E=qr(r);if(0==(0|E))break;var A=0==(32768&Se[r>>2]|0);do if(A)if(84==(0|h))var g=0|He.__str122292;else if(85==(0|h))var g=0|He.__str123293;else if(86==(0|h))var g=0|He.__str124294;else{if(89!=(0|h)){var g=0;break}var g=0|He.__str125295}else var g=0;while(0);var g,y=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=g,Se[ne+4>>2]=E,ne));Se[t]=y}else if(63==(0|h))if(0==(0|i))$r(a,r,e,63,0);else{var m=Lr(r);if(0==(0|m))break;var S=Dr(r,0|He.__str126296,(ne=Oe,Oe+=4,Se[ne>>2]=m,ne));Se[t]=S}else if(65==(0|h)||66==(0|h))$r(a,r,e,c,i);else if(81==(0|h)||82==(0|h)||83==(0|h)){var M=0==(0|i)?80:c;$r(a,r,e,M,i)}else if(80==(0|h))if(((Ae[u]<<24>>24)-48|0)>>>0<10){var C=k+2|0;if(Se[v]=C,Ae[u]<<24>>24!=54)break;var R=r+44|0,T=Se[R>>2];Se[v]=k+3|0;var O=Ae[C],N=Se[r>>2]&-17,I=Ur(O,s,n,N);if(0==(0|I))break;var P=Pr(r,o,e,0);if(0==(0|P))break;var D=Xr(r,e,1,40,41);if(0==(0|D))break;Se[R>>2]=T;var L=Se[o>>2],F=Se[o+4>>2],X=Se[s>>2],j=Dr(r,0|He.__str127297,(ne=Oe,Oe+=12,Se[ne>>2]=L,Se[ne+4>>2]=F,Se[ne+8>>2]=X,ne));Se[t]=j;var U=Dr(r,0|He.__str128298,(ne=Oe,Oe+=4,Se[ne>>2]=D,ne));Se[f]=U}else $r(a,r,e,80,i);else if(87==(0|h)){if(Ae[u]<<24>>24!=52)break;Se[v]=k+2|0;var x=qr(r);if(0==(0|x))break;if(0==(32768&Se[r>>2]|0)){var z=Dr(r,0|He.__str129299,(ne=Oe,Oe+=4,Se[ne>>2]=x,ne));Se[t]=z}else Se[t]=x}else if(48==(0|h)||49==(0|h)||50==(0|h)||51==(0|h)||52==(0|h)||53==(0|h)||54==(0|h)||55==(0|h)||56==(0|h)||57==(0|h)){var V=h<<1,B=V-96|0,H=Yr(e,B);Se[t]=H;var K=V-95|0,Y=Yr(e,K);Se[f]=Y}else if(36==(0|h)){var G=k+2|0;Se[v]=G;var W=Ae[u]<<24>>24;if(48==(0|W)){var Z=Lr(r);Se[t]=Z}else if(68==(0|W)){var Q=Lr(r);if(0==(0|Q))break;var q=Dr(r,0|He.__str130300,(ne=Oe,Oe+=4,Se[ne>>2]=Q,ne));Se[t]=q}else if(70==(0|W)){var $=Lr(r);if(0==(0|$))break;var J=Lr(r);if(0==(0|J))break;var rr=Dr(r,0|He.__str131301,(ne=Oe,Oe+=8,Se[ne>>2]=$,Se[ne+4>>2]=J,ne));Se[t]=rr}else if(71==(0|W)){var ar=Lr(r);if(0==(0|ar))break;var er=Lr(r);if(0==(0|er))break;var ir=Lr(r);if(0==(0|ir))break;var vr=Dr(r,0|He.__str132302,(ne=Oe,Oe+=12,Se[ne>>2]=ar,Se[ne+4>>2]=er,Se[ne+8>>2]=ir,ne));Se[t]=vr}else if(81==(0|W)){var tr=Lr(r);if(0==(0|tr))break;var fr=Dr(r,0|He.__str133303,(ne=Oe,Oe+=4,Se[ne>>2]=tr,ne));Se[t]=fr}else{if(36!=(0|W))break;if(Ae[G]<<24>>24!=67)break;Se[v]=k+3|0;var _r=xr(r,l,b);if(0==(0|_r))break;var sr=Pr(r,a,e,i);if(0==(0|sr))break;var nr=Se[t],or=Se[l>>2],lr=Dr(r,0|He.__str83253,(ne=Oe,Oe+=8,Se[ne>>2]=nr,Se[ne+4>>2]=or,ne));Se[t]=lr}}while(0);var br=0!=(0|Se[t])&1;return Oe=_,br}function Dr(r,a){var e,i=Oe;Oe+=4;var v=i,e=v>>2,t=v;Se[t>>2]=arguments[Dr.length];var f=1,_=0;r:for(;;){var _,f,s=Ae[a+_|0];do{if(s<<24>>24==0)break r;if(s<<24>>24==37){var n=_+1|0,o=Ae[a+n|0]<<24>>24;if(115==(0|o)){var l=Se[e],b=l,k=l+4|0;Se[e]=k;var u=Se[b>>2];if(0==(0|u)){var c=f,h=n;break}var d=Ca(u),c=d+f|0,h=n;break}if(99==(0|o)){var w=Se[e]+4|0;Se[e]=w;var c=f+1|0,h=n;break}if(37==(0|o))var p=n;else var p=_;var p,c=f+1|0,h=p}else var c=f+1|0,h=_}while(0);var h,c,f=c,_=h+1|0}var E=Wr(r,f);if(0==(0|E))var A=0;else{Se[t>>2]=arguments[Dr.length];var g=E,y=0;r:for(;;){var y,g,m=Ae[a+y|0];do{if(m<<24>>24==0)break r;if(m<<24>>24==37){var S=y+1|0,M=Ae[a+S|0]<<24>>24;if(115==(0|M)){var C=Se[e],R=C,T=C+4|0;Se[e]=T;var O=Se[R>>2];if(0==(0|O)){var N=g,I=S;break}var P=Ca(O);Pa(g,O,P,1);var N=g+P|0,I=S;break}if(99==(0|M)){var D=Se[e],L=D,F=D+4|0;Se[e]=F,Ae[g]=255&Se[L>>2];var N=g+1|0,I=S;break}if(37==(0|M))var X=S;else var X=y;var X;Ae[g]=37;var N=g+1|0,I=X}else{Ae[g]=m;var N=g+1|0,I=y}}while(0);var I,N,g=N,y=I+1|0}Ae[g]=0;var A=E}var A;return Oe=i,A}function Lr(r){var a,a=(r+12|0)>>2,e=Se[a],i=Ae[e];if(i<<24>>24==63){var v=e+1|0;Se[a]=v;var t=1,f=v,_=Ae[v]}else var t=0,f=e,_=i;var _,f,t,s=(_-48&255&255)<9;do if(s){var n=Wr(r,3),o=0!=(0|t);o&&(Ae[n]=45);var l=Ae[Se[a]]+1&255;Ae[n+t|0]=l;var b=o?2:1; +Ae[n+b|0]=0;var k=Se[a]+1|0;Se[a]=k;var u=n}else if(_<<24>>24==57){var c=Wr(r,4),h=0!=(0|t);h&&(Ae[c]=45),Ae[c+t|0]=49;var d=h?2:1;Ae[c+d|0]=48;var w=h?3:2;Ae[c+w|0]=0;var p=Se[a]+1|0;Se[a]=p;var u=c}else{if((_-65&255&255)>=16){var u=0;break}for(var E=0,A=f;;){var A,E,g=A+1|0;Se[a]=g;var y=(Ae[A]<<24>>24)+((E<<4)-65)|0,m=ge[g];if((m-65&255&255)>=16)break;var E=y,A=g}if(m<<24>>24!=64){var u=0;break}var S=Wr(r,17),M=0!=(0|t)?0|He.__str119289:0|ii,C=(za(S,0|He.__str118288,(ne=Oe,Oe+=8,Se[ne>>2]=M,Se[ne+4>>2]=y,ne)),Se[a]+1|0);Se[a]=C;var u=S}while(0);var u;return u}function Fr(r,a,e,i){var v,t,f,_;0==(0|a)&&Xa(0|He.__str72242,212,0|He.___func___str_array_push,0|He.__str115285),0==(0|i)&&Xa(0|He.__str72242,213,0|He.___func___str_array_push,0|He.__str116286);var f=(i+12|0)>>2,s=Me[f],n=0==(0|s);do{if(n){Se[f]=32;var o=Wr(r,128);if(0==(0|o)){var l=0;_=17;break}Se[i+16>>2]=o,_=11;break}if(Me[i+8>>2]>>>0>>0){_=11;break}var b=s<<3,k=Wr(r,b);if(0==(0|k)){var l=0;_=17;break}var u=k,c=i+16|0,h=Se[c>>2],d=Se[f]<<2;Pa(k,h,d,1);var w=Se[f]<<1;Se[f]=w,Se[c>>2]=u,_=11;break}while(0);do if(11==_){if((0|e)==-1)var p=Ca(a),E=p;else var E=e;var E,A=ja(a),g=E+1|0,y=Wr(r,g),t=(i+4|0)>>2,v=(i+16|0)>>2,m=(Se[t]<<2)+Se[v]|0;Se[m>>2]=y;var S=Se[Se[v]+(Se[t]<<2)>>2];if(0==(0|S)){Xa(0|He.__str72242,233,0|He.___func___str_array_push,0|He.__str117287);var M=Se[Se[v]+(Se[t]<<2)>>2]}else var M=S;var M;Pa(M,A,E,1),va(A),Ae[Se[Se[v]+(Se[t]<<2)>>2]+g|0]=0;var C=Se[t]+1|0;Se[t]=C;var R=i+8|0;if(C>>>0>2]>>>0){var l=1;break}Se[R>>2]=C;var l=1}while(0);var l;return l}function Xr(r,a,e,i,v){var t,f,_=Oe;Oe+=28;var s,n=_,o=_+8;Cr(o);var f=(r+12|0)>>2,l=0==(0|e),t=(0|n)>>2,b=n+4|0;r:do if(l)for(;;){var k=Se[f],u=Ae[k];if(u<<24>>24==0){s=12;break r}if(u<<24>>24==64){var c=k;s=7;break r}var h=Pr(r,n,a,1);if(0==(0|h)){var d=0;s=25;break r}var w=Se[t],p=Se[b>>2],E=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=w,Se[ne+4>>2]=p,ne)),A=Fr(r,E,-1,o);if(0==(0|A)){var d=0;s=25;break r}var g=Se[t],y=Da(g,0|He.__str110280);if(0==(0|y)){s=12;break r}}else for(;;){var m=Se[f],S=Ae[m];if(S<<24>>24==0){s=12;break r}if(S<<24>>24==64){var c=m;s=7;break r}var M=Pr(r,n,a,1);if(0==(0|M)){var d=0;s=25;break r}var C=Se[t],R=Da(C,0|He.__str84254);if(0==(0|R)){s=13;break r}var T=Se[b>>2],O=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=C,Se[ne+4>>2]=T,ne)),N=Fr(r,O,-1,o);if(0==(0|N)){var d=0;s=25;break r}var I=Se[t],P=Da(I,0|He.__str110280);if(0==(0|P)){s=12;break r}}while(0);do if(7==s){var c;Se[f]=c+1|0,s=12;break}while(0);do if(12==s){if(l){s=14;break}s=13;break}while(0);do if(13==s){var D=Se[f],L=D+1|0;if(Se[f]=L,Ae[D]<<24>>24==90){s=14;break}var d=0;s=25;break}while(0);r:do if(14==s){var F=o+4|0,X=Me[F>>2];do{if(0!=(0|X)){if(1==(0|X)){var j=o+16|0,U=Se[Se[j>>2]>>2],x=Da(U,0|He.__str84254);if(0==(0|x)){s=17;break}var z=j;s=20;break}var V=o+16|0;if(X>>>0<=1){var z=V;s=20;break}for(var B=0,H=1;;){var H,B,K=Se[Se[V>>2]+(H<<2)>>2],Y=Dr(r,0|He.__str112282,(ne=Oe,Oe+=8,Se[ne>>2]=B,Se[ne+4>>2]=K,ne)),G=H+1|0;if(G>>>0>=Me[F>>2]>>>0)break;var B=Y,H=G}if(0==(0|Y)){var z=V;s=20;break}var W=Y,Z=Y;s=21;break}s=17}while(0);if(17==s){var Q=i<<24>>24,q=v<<24>>24,$=Dr(r,0|He.__str111281,(ne=Oe,Oe+=8,Se[ne>>2]=Q,Se[ne+4>>2]=q,ne)),d=$;break}if(20==s)var z,W=Se[Se[z>>2]>>2],Z=0;var Z,W,J=v<<24>>24,rr=v<<24>>24==62;do if(rr){var ar=Ca(W);if(Ae[W+(ar-1)|0]<<24>>24!=62)break;var er=i<<24>>24,ir=Se[Se[o+16>>2]>>2],vr=Dr(r,0|He.__str113283,(ne=Oe,Oe+=16,Se[ne>>2]=er,Se[ne+4>>2]=ir,Se[ne+8>>2]=Z,Se[ne+12>>2]=J,ne)),d=vr;break r}while(0);var tr=i<<24>>24,fr=Se[Se[o+16>>2]>>2],_r=Dr(r,0|He.__str114284,(ne=Oe,Oe+=16,Se[ne>>2]=tr,Se[ne+4>>2]=fr,Se[ne+8>>2]=Z,Se[ne+12>>2]=J,ne)),d=_r}while(0);var d;return Oe=_,d}function jr(r){var a,e=Oe;Oe+=20;var i=e,v=r+24|0,t=Se[v>>2],a=(r+20|0)>>2,f=Se[a],_=r+44|0,s=Se[_>>2];Se[a]=t;var n=Kr(r);if(0==(0|n))var o=0;else{Cr(i);var l=Xr(r,i,0,60,62);if(0==(0|l))var b=n;else var k=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=n,Se[ne+4>>2]=l,ne)),b=k;var b;Se[v>>2]=t,Se[a]=f,Se[_>>2]=s;var o=b}var o;return Oe=e,o}function Ur(r,a,e,i){var v,t=a>>2;Se[e>>2]=0,Se[t]=0;var f=0==(18&i|0);do{if(f){var _=r<<24>>24,s=1==((_-65)%2|0);if(0==(1&i|0)){if(s?Se[e>>2]=0|He.__str95265:v=14,65==(0|_)||66==(0|_)){Se[t]=0|He.__str96266,v=21;break}if(67==(0|_)||68==(0|_)){Se[t]=0|He.__str97267,v=21;break}if(69==(0|_)||70==(0|_)){Se[t]=0|He.__str98268,v=21;break}if(71==(0|_)||72==(0|_)){Se[t]=0|He.__str99269,v=21;break}if(73==(0|_)||74==(0|_)){Se[t]=0|He.__str100270,v=21;break}if(75==(0|_)||76==(0|_)){v=21;break}if(77==(0|_)){Se[t]=0|He.__str101271,v=21;break}var n=0;v=22;break}if(s?Se[e>>2]=0|He.__str88258:v=5,65==(0|_)||66==(0|_)){Se[t]=0|He.__str89259,v=21;break}if(67==(0|_)||68==(0|_)){Se[t]=0|He.__str90260,v=21;break}if(69==(0|_)||70==(0|_)){Se[t]=0|He.__str91261,v=21;break}if(71==(0|_)||72==(0|_)){Se[t]=0|He.__str92262,v=21;break}if(73==(0|_)||74==(0|_)){Se[t]=0|He.__str93263,v=21;break}if(75==(0|_)||76==(0|_)){v=21;break}if(77==(0|_)){Se[t]=0|He.__str94264,v=21;break}var n=0;v=22;break}v=21}while(0);if(21==v)var n=1;var n;return n}function xr(r,a,e){var i;Se[e>>2]=0;var i=(r+12|0)>>2,v=Se[i];if(Ae[v]<<24>>24==69){Se[e>>2]=0|He.__str102272;var t=Se[i]+1|0;Se[i]=t;var f=t}else var f=v;var f;Se[i]=f+1|0;var _=Ae[f]<<24>>24;if(65==(0|_)){Se[a>>2]=0;var s=1}else if(66==(0|_)){Se[a>>2]=0|He.__str103273;var s=1}else if(67==(0|_)){Se[a>>2]=0|He.__str104274;var s=1}else if(68==(0|_)){Se[a>>2]=0|He.__str105275;var s=1}else var s=0;var s;return s}function zr(r){var a,e,a=(r+12|0)>>2,i=r+40|0,v=r+20|0,t=0|i,f=r+44|0,_=r+48|0,s=r+52|0,n=r+56|0,o=r+20|0,l=r+24|0,b=r+16|0,k=0;r:for(;;){var k,u=Se[a],c=Ae[u];if(c<<24>>24==64){var h=u+1|0;Se[a]=h;var d=1;break}var w=c<<24>>24;do{if(0==(0|w)){var d=0;break r}if(48==(0|w)||49==(0|w)||50==(0|w)||51==(0|w)||52==(0|w)||53==(0|w)||54==(0|w)||55==(0|w)||56==(0|w)||57==(0|w)){var p=u+1|0;Se[a]=p;var E=(Ae[u]<<24>>24)-48|0,A=Yr(v,E),g=A;e=14;break}if(63==(0|w)){var y=u+1|0;Se[a]=y;var m=Ae[y]<<24>>24;if(36==(0|m)){var S=u+2|0;Se[a]=S;var M=jr(r);if(0==(0|M)){var d=0;break r}var C=Fr(r,M,-1,v);if(0==(0|C)){var d=0;break r}var R=M;e=15;break}if(63==(0|m)){var T=Se[t>>2],O=Se[f>>2],N=Se[_>>2],I=Se[s>>2],P=Se[n>>2],D=Se[o>>2],L=Se[l>>2];Cr(i);var F=Ir(r);if(0==(0|F))var X=k;else var j=Se[b>>2],U=Dr(r,0|He.__str109279,(ne=Oe,Oe+=4,Se[ne>>2]=j,ne)),X=U;var X;Se[o>>2]=D,Se[l>>2]=L,Se[t>>2]=T,Se[f>>2]=O,Se[_>>2]=N,Se[s>>2]=I,Se[n>>2]=P;var g=X;e=14;break}var x=Lr(r);if(0==(0|x)){var d=0;break r}var z=Dr(r,0|He.__str109279,(ne=Oe,Oe+=4,Se[ne>>2]=x,ne)),g=z;e=14;break}var V=Kr(r),g=V;e=14;break}while(0);if(14==e){var g;if(0==(0|g)){var d=0;break}var R=g}var R,B=Fr(r,R,-1,i);if(0==(0|B)){var d=0;break}var k=R}var d;return d}function Vr(r){var a,e,i,v=Oe;Oe+=36;var t,f=v,i=f>>2,_=v+4,s=v+8,e=s>>2,n=v+16;Se[i]=0;var o=0|r,l=Se[o>>2],b=0==(128&l|0),k=r+12|0;do if(b){var u=Ae[Se[k>>2]]<<24>>24;if(48==(0|u))var c=0|He.__str76246,h=k,a=h>>2;else if(49==(0|u))var c=0|He.__str77247,h=k,a=h>>2;else{if(50!=(0|u)){var c=0,h=k,a=h>>2;break}var c=0|He.__str78248,h=k,a=h>>2}}else var c=0,h=k,a=h>>2;while(0);var h,c,d=0==(512&l|0);do if(d){if((Ae[Se[a]]-48&255&255)>=3){var w=0;break}var w=0|He.__str79249}else var w=0;while(0);var w,p=Gr(r,0),E=Se[a],A=E+1|0;Se[a]=A;var g=Ae[E]<<24>>24;do{if(48==(0|g)||49==(0|g)||50==(0|g)||51==(0|g)||52==(0|g)||53==(0|g)){var y=r+44|0,m=Se[y>>2];Cr(n);var S=Pr(r,s,n,0);if(0==(0|S)){var M=0;t=28;break}var C=xr(r,f,_);if(0==(0|C)){var M=0;t=28;break}var R=Se[i],T=0==(0|R),O=Se[_>>2];do if(T)Se[i]=O;else{if(0==(0|O))break;var N=Dr(r,0|He.__str83253,(ne=Oe,Oe+=8,Se[ne>>2]=R,Se[ne+4>>2]=O,ne));Se[i]=N}while(0);Se[y>>2]=m,t=22;break}if(54==(0|g)||55==(0|g)){var I=s+4|0;Se[I>>2]=0,Se[e]=0;var P=xr(r,f,_);if(0==(0|P)){var M=0;t=28;break}if(Ae[Se[a]]<<24>>24==64){t=22;break}var D=qr(r);if(0==(0|D)){var M=0;t=28;break}var L=Dr(r,0|He.__str107277,(ne=Oe,Oe+=4,Se[ne>>2]=D,ne));Se[I>>2]=L,t=22;break}if(56==(0|g)||57==(0|g)){Se[e+1]=0,Se[e]=0,Se[i]=0,t=22;break}var M=0;t=28}while(0);if(22==t){var F=0==(4096&Se[o>>2]|0);do{if(F){var X=Se[e],j=Se[i];if(0==(0|j)){var U=X;t=26;break}var x=0!=(0|X)?0|He.__str87257:0,z=0|He.__str87257,V=j,B=x,H=X;t=27;break}Se[i]=0,Se[e+1]=0,Se[e]=0;var U=0;t=26;break}while(0);if(26==t)var U,K=0!=(0|U)?0|He.__str87257:0,z=K,V=0,B=0,H=U;var H,B,V,z,Y=Se[e+1],G=Dr(r,0|He.__str108278,(ne=Oe,Oe+=32,Se[ne>>2]=c,Se[ne+4>>2]=w,Se[ne+8>>2]=H,Se[ne+12>>2]=B,Se[ne+16>>2]=V,Se[ne+20>>2]=z,Se[ne+24>>2]=p,Se[ne+28>>2]=Y,ne));Se[r+16>>2]=G;var M=1}var M;return Oe=v,M}function Br(r,a){var e,i,v,t,f=Oe;Oe+=44;var _,s=f,t=s>>2,n=f+8,o=f+12,v=o>>2,l=f+16,b=f+20,k=f+40;Se[v]=0;var i=(r+12|0)>>2,u=Se[i],c=u+1|0;Se[i]=c;var h=ge[u],d=h<<24>>24,w=(h-65&255&255)>25;r:do if(w)var p=0;else{var e=(0|r)>>2,E=Me[e],A=0==(128&E|0),g=d-65|0;do if(A){var y=g/8|0;if(0==(0|y))var m=0|He.__str76246,S=g;else if(1==(0|y))var m=0|He.__str77247,S=g;else{if(2!=(0|y)){var m=0,S=g;break}var m=0|He.__str78248,S=g}}else var m=0,S=g;while(0);var S,m,M=0==(512&E|0)&h<<24>>24<89,C=(0|S)%8;do if(M)if(2==(0|C)||3==(0|C))var R=m,T=0|He.__str79249;else if(4==(0|C)||5==(0|C))var R=m,T=0|He.__str80250;else{if(6!=(0|C)&&7!=(0|C)){var R=m,T=0;break}var O=Dr(r,0|He.__str81251,(ne=Oe,Oe+=4,Se[ne>>2]=m,ne)),R=O,T=0|He.__str80250}else var R=m,T=0;while(0);var T,R,N=Gr(r,0),I=6==(0|C);do{if(!I){if(7==((d-56)%8|0)){_=14;break}var P=N;_=15;break}_=14}while(0);if(14==_)var D=Lr(r),L=Dr(r,0|He.__str82252,(ne=Oe,Oe+=8,Se[ne>>2]=N,Se[ne+4>>2]=D,ne)),P=L;var P,F=h<<24>>24>88;do if(F)var X=0;else{if((C-2|0)>>>0<2){var X=0;break}var j=xr(r,o,k);if(0==(0|j)){var p=0;break r}var U=Me[v],x=Se[k>>2];if(0==(0|U)&0==(0|x)){var X=0;break}var z=Dr(r,0|He.__str83253,(ne=Oe,Oe+=8,Se[ne>>2]=U,Se[ne+4>>2]=x,ne));Se[v]=z;var X=z}while(0);var X,V=Se[i],B=V+1|0;Se[i]=B;var H=Ae[V],K=Se[e],Y=Ur(H,n,l,K);if(0==(0|Y)){var p=0;break}Cr(b);var G=Se[i];if(Ae[G]<<24>>24==64){Se[t]=0|He.__str84254,Se[t+1]=0;var W=G+1|0;Se[i]=W}else{var Z=Pr(r,s,b,0);if(0==(0|Z)){var p=0;break}}if(0!=(4&Se[e]|0)&&(Se[t+1]=0,Se[t]=0),0==(0|a))var Q=P;else{var q=0|s,$=Se[q>>2],J=s+4|0,rr=Se[J>>2],ar=Dr(r,0|He.__str85255,(ne=Oe,Oe+=12,Se[ne>>2]=P,Se[ne+4>>2]=$,Se[ne+8>>2]=rr,ne));Se[J>>2]=0,Se[q>>2]=0;var Q=ar}var Q,er=r+44|0,ir=Se[er>>2],vr=Xr(r,b,1,40,41);if(0==(0|vr)){var p=0;break}if(0==(4096&Se[e]|0))var tr=vr,fr=X;else{Se[v]=0;var tr=0,fr=0}var fr,tr;Se[er>>2]=ir;var _r=Se[t],sr=Se[t+1];if(0==(0|_r))var nr=0;else var or=0!=(0|sr)?0:0|He.__str87257,nr=or;var nr,lr=Se[n>>2],br=0!=(0|lr)?0|He.__str87257:0,kr=Se[l>>2],ur=Dr(r,0|He.__str86256,(ne=Oe,Oe+=44,Se[ne>>2]=R,Se[ne+4>>2]=T,Se[ne+8>>2]=_r,Se[ne+12>>2]=nr,Se[ne+16>>2]=lr,Se[ne+20>>2]=br,Se[ne+24>>2]=kr,Se[ne+28>>2]=Q,Se[ne+32>>2]=tr,Se[ne+36>>2]=fr,Se[ne+40>>2]=sr,ne));Se[r+16>>2]=ur;var p=1}while(0);var p;return Oe=f,p}function Hr(r){var a,a=(r+12|0)>>2,e=Se[a];if(Ae[e]<<24>>24==36)var i=e;else{Xa(0|He.__str72242,1252,0|He.___func___handle_template,0|He.__str74244);var i=Se[a]}var i;Se[a]=i+1|0;var v=Kr(r),t=0==(0|v);do if(t)var f=0;else{var _=Xr(r,0,0,60,62);if(0==(0|_)){var f=0;break}var s=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=v,Se[ne+4>>2]=_,ne));Se[r+16>>2]=s;var f=1}while(0);var f;return f}function Kr(r){for(var a,a=(r+12|0)>>2,e=Me[a],i=e,v=Ae[e];;){var v,i;if(!((v-65&255&255)<26|(v-97&255&255)<26|(v-48&255&255)<10)&&v<<24>>24!=95&&v<<24>>24!=36){var t=0;break}var f=i+1|0;Se[a]=f;var _=ge[f];if(_<<24>>24==64){Se[a]=i+2|0;var s=f-e|0,n=r+20|0,o=Fr(r,e,s,n);if(0==(0|o)){var t=0;break}var l=Se[r+24>>2]-1-Se[n>>2]|0,b=Yr(n,l),t=b;break}var i=f,v=_}var t;return t}function Yr(r,a){0==(0|r)&&Xa(0|He.__str72242,263,0|He.___func___str_array_get_ref,0|He.__str75245);var e=Se[r>>2]+a|0;if(e>>>0>2]>>>0)var i=Se[Se[r+16>>2]+(e<<2)>>2];else var i=0;var i;return i}function Gr(r,a){var e,e=(r+44|0)>>2,i=Me[e];if(i>>>0>a>>>0){for(var v=r+56|0,t=a,f=0,_=Se[v>>2],s=i;;){var s,_,f,t,n=Me[_+(t<<2)>>2];if(0==(0|n)){Xa(0|He.__str72242,680,0|He.___func___get_class_string,0|He.__str106276);var o=Se[v>>2],l=o,b=Se[o+(t<<2)>>2],k=Se[e]}else var l=_,b=n,k=s;var k,b,l,u=Ca(b),c=u+(f+2)|0,h=t+1|0;if(h>>>0>=k>>>0)break;var t=h,f=c,_=l,s=k}var d=c-1|0}else var d=-1;var d,w=Wr(r,d);if(0==(0|w))var p=0;else{var E=Se[e]-1|0,A=(0|E)<(0|a);r:do if(A)var g=0;else for(var y=r+56|0,m=0,S=E;;){var S,m,M=Se[Se[y>>2]+(S<<2)>>2],C=Ca(M),R=w+m|0;Pa(R,M,C,1);var T=C+m|0;if((0|S)>(0|a)){var O=T+1|0;Ae[w+T|0]=58;var N=T+2|0;Ae[w+O|0]=58;var I=N}else var I=T;var I,P=S-1|0;if((0|P)<(0|a)){var g=I;break r}var m=I,S=P}while(0);var g;Ae[w+g|0]=0;var p=w}var p;return p}function Wr(r,a){var e,i=a>>>0>1020;do if(i){var v=Se[r+4>>2],t=a+4|0,f=pe[v](t);if(0==(0|f)){var _=0;break}var s=r+60|0,n=Se[s>>2],o=f;Se[o>>2]=n,Se[s>>2]=f,Se[r+64>>2]=0;var _=f+4|0}else{var e=(r+64|0)>>2,l=Me[e];if(l>>>0>>0){var b=Se[r+4>>2],k=pe[b](1024);if(0==(0|k)){var _=0;break}var u=r+60|0,c=Se[u>>2],h=k;Se[h>>2]=c,Se[u>>2]=k,Se[e]=1020;var d=1020,w=k}else var d=l,w=Se[r+60>>2];var w,d;Se[e]=d-a|0;var _=w+(1024-d)|0}while(0);var _;return _}function Zr(r){var a=r<<24>>24;if(68==(0|a))var e=0|He.__str157327;else if(69==(0|a))var e=0|He.__str158328;else if(70==(0|a))var e=0|He.__str159329;else if(71==(0|a))var e=0|He.__str160330;else if(72==(0|a))var e=0|He.__str161331;else if(73==(0|a))var e=0|He.__str162332;else if(74==(0|a))var e=0|He.__str163333;else if(75==(0|a))var e=0|He.__str164334;else if(76==(0|a))var e=0|He.__str165335;else if(77==(0|a))var e=0|He.__str166336;else if(78==(0|a))var e=0|He.__str167337;else if(87==(0|a))var e=0|He.__str168338;else var e=0;var e;return e}function Qr(r){var a=r<<24>>24;if(67==(0|a))var e=0|He.__str145315;else if(68==(0|a))var e=0|He.__str146316;else if(69==(0|a))var e=0|He.__str147317;else if(70==(0|a))var e=0|He.__str148318;else if(71==(0|a))var e=0|He.__str149319;else if(72==(0|a))var e=0|He.__str150320;else if(73==(0|a))var e=0|He.__str151321;else if(74==(0|a))var e=0|He.__str152322;else if(75==(0|a))var e=0|He.__str153323;else if(77==(0|a))var e=0|He.__str154324;else if(78==(0|a))var e=0|He.__str155325;else if(79==(0|a))var e=0|He.__str156326;else if(88==(0|a))var e=0|He.__str84254;else if(90==(0|a))var e=0|He.__str110280;else var e=0;var e;return e}function qr(r){var a=r+44|0,e=Se[a>>2],i=zr(r);if(0==(0|i))var v=0;else var t=Gr(r,e),v=t;var v;return Se[a>>2]=e,v}function $r(r,a,e,i,v){var t,f,_,s=Oe;Oe+=16;var n,o=s,_=o>>2,l=s+4,b=s+8,f=b>>2;Se[l>>2]=0|ii;var t=(a+12|0)>>2,k=Se[t];if(Ae[k]<<24>>24==69){Se[l>>2]=0|He.__str134304;var u=k+1|0;Se[t]=u;var c=0|He.__str134304}else var c=0|ii;var c,h=i<<24>>24;do{if(65==(0|h)){var d=Dr(a,0|He.__str135305,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=d;n=10;break}if(66==(0|h)){var p=Dr(a,0|He.__str136306,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=p;n=10;break}if(80==(0|h)){var E=Dr(a,0|He.__str137307,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=E;n=10;break}if(81==(0|h)){var A=Dr(a,0|He.__str138308,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=A;n=10;break}if(82==(0|h)){var g=Dr(a,0|He.__str139309,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=g;n=10;break}if(83==(0|h)){var y=Dr(a,0|He.__str140310,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=y;n=10;break}if(63==(0|h)){var w=0|ii;n=10}else n=31}while(0);r:do if(10==n){var w,m=xr(a,o,l);if(0==(0|m))break;var S=a+44|0,M=Se[S>>2],C=Se[t],R=Ae[C]<<24>>24==89;a:do if(R){var T=C+1|0;Se[t]=T;var O=Lr(a);if(0==(0|O))break r;var N=Ha(O),I=Ae[w]<<24>>24==32,P=Se[_],D=0==(0|P);do{if(I){if(!D){n=17;break}var L=w+1|0;n=18;break}if(D){var L=w;n=18;break}n=17;break}while(0);if(17==n){var F=Dr(a,0|He.__str141311,(ne=Oe,Oe+=8,Se[ne>>2]=P,Se[ne+4>>2]=w,ne));Se[_]=0;var X=F}else if(18==n)var L,j=Dr(a,0|He.__str142312,(ne=Oe,Oe+=4,Se[ne>>2]=L,ne)),X=j;var X;if(0==(0|N)){var U=X;break}for(var x=X,z=N;;){var z,x,V=z-1|0,B=Lr(a),H=Dr(a,0|He.__str143313,(ne=Oe,Oe+=8,Se[ne>>2]=x,Se[ne+4>>2]=B,ne));if(0==(0|V)){var U=H;break a}var x=H,z=V}}else var U=w;while(0);var U,K=Pr(a,b,e,0);if(0==(0|K))break;var Y=Se[_];if(0==(0|Y)){var G=0==(0|v);do if(G){if(Ae[U]<<24>>24==0){var W=U;break}var Z=U+1|0;if(Ae[Z]<<24>>24!=42){var W=U;break}var Q=Se[f],q=Ca(Q);if(Ae[Q+(q-1)|0]<<24>>24!=42){var W=U;break}var W=Z}else var W=U;while(0);var W,$=Se[f],J=Dr(a,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=$,Se[ne+4>>2]=W,ne));Se[r>>2]=J}else{var rr=Se[f],ar=Dr(a,0|He.__str144314,(ne=Oe,Oe+=12,Se[ne>>2]=rr,Se[ne+4>>2]=Y,Se[ne+8>>2]=U,ne));Se[r>>2]=ar}var er=Se[f+1];Se[r+4>>2]=er,Se[S>>2]=M}while(0);Oe=s}function Jr(r){var a,e=r>>>0<245;do{if(e){if(r>>>0<11)var i=16;else var i=r+11&-8;var i,v=i>>>3,t=Me[vi>>2],f=t>>>(v>>>0);if(0!=(3&f|0)){var _=(1&f^1)+v|0,s=_<<1,n=(s<<2)+vi+40|0,o=(s+2<<2)+vi+40|0,l=Me[o>>2],b=l+8|0,k=Me[b>>2];if((0|n)==(0|k))Se[vi>>2]=t&(1<<_^-1);else{if(k>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[o>>2]=k,Se[k+12>>2]=n}var u=_<<3;Se[l+4>>2]=3|u;var c=l+(4|u)|0,h=1|Se[c>>2];Se[c>>2]=h;var d=b;a=38;break}if(i>>>0<=Me[vi+8>>2]>>>0){var w=i;a=30;break}if(0!=(0|f)){var p=2<>>12&16,y=A>>>(g>>>0),m=y>>>5&8,S=y>>>(m>>>0),M=S>>>2&4,C=S>>>(M>>>0),R=C>>>1&2,T=C>>>(R>>>0),O=T>>>1&1,N=(m|g|M|R|O)+(T>>>(O>>>0))|0,I=N<<1,P=(I<<2)+vi+40|0,D=(I+2<<2)+vi+40|0,L=Me[D>>2],F=L+8|0,X=Me[F>>2];if((0|P)==(0|X))Se[vi>>2]=t&(1<>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[D>>2]=X,Se[X+12>>2]=P}var j=N<<3,U=j-i|0;Se[L+4>>2]=3|i;var x=L,z=x+i|0;Se[x+(4|i)>>2]=1|U,Se[x+j>>2]=U;var V=Me[vi+8>>2];if(0!=(0|V)){var B=Se[vi+20>>2],H=V>>>2&1073741822,K=(H<<2)+vi+40|0,Y=Me[vi>>2],G=1<<(V>>>3),W=0==(Y&G|0);do{if(!W){var Z=(H+2<<2)+vi+40|0,Q=Me[Z>>2];if(Q>>>0>=Me[vi+16>>2]>>>0){var q=Q,$=Z;break}throw Ka(),"Reached an unreachable!"}Se[vi>>2]=Y|G;var q=K,$=(H+2<<2)+vi+40|0}while(0);var $,q;Se[$>>2]=B,Se[q+12>>2]=B;var J=B+8|0;Se[J>>2]=q;var rr=B+12|0;Se[rr>>2]=K}Se[vi+8>>2]=U,Se[vi+20>>2]=z;var d=F;a=38;break}if(0==(0|Se[vi+4>>2])){var w=i;a=30;break}var ar=ra(i);if(0==(0|ar)){var w=i;a=30;break}var d=ar;a=38;break}if(r>>>0>4294967231){var w=-1;a=30;break}var er=r+11&-8;if(0==(0|Se[vi+4>>2])){var w=er;a=30;break}var ir=ea(er);if(0==(0|ir)){var w=er;a=30;break}var d=ir;a=38;break}while(0);if(30==a){var w,vr=Me[vi+8>>2];if(w>>>0>vr>>>0){var tr=Me[vi+12>>2];if(w>>>0>>0){var fr=tr-w|0;Se[vi+12>>2]=fr;var _r=Me[vi+24>>2],sr=_r;Se[vi+24>>2]=sr+w|0,Se[w+(sr+4)>>2]=1|fr,Se[_r+4>>2]=3|w;var d=_r+8|0}else var nr=aa(w),d=nr}else{var or=vr-w|0,lr=Me[vi+20>>2];if(or>>>0>15){var br=lr;Se[vi+20>>2]=br+w|0,Se[vi+8>>2]=or,Se[w+(br+4)>>2]=1|or,Se[br+vr>>2]=or,Se[lr+4>>2]=3|w}else{Se[vi+8>>2]=0,Se[vi+20>>2]=0,Se[lr+4>>2]=3|vr;var kr=vr+(lr+4)|0,ur=1|Se[kr>>2];Se[kr>>2]=ur}var d=lr+8|0}}var d;return d}function ra(r){var a,e,i,v=Se[vi+4>>2],t=(v&-v)-1|0,f=t>>>12&16,_=t>>>(f>>>0),s=_>>>5&8,n=_>>>(s>>>0),o=n>>>2&4,l=n>>>(o>>>0),b=l>>>1&2,k=l>>>(b>>>0),u=k>>>1&1,c=Me[vi+((s|f|o|b|u)+(k>>>(u>>>0))<<2)+304>>2],h=c,e=h>>2,d=(Se[c+4>>2]&-8)-r|0;r:for(;;)for(var d,h,w=h;;){var w,p=Se[w+16>>2];if(0==(0|p)){var E=Se[w+20>>2];if(0==(0|E))break r;var A=E}else var A=p;var A,g=(Se[A+4>>2]&-8)-r|0;if(g>>>0>>0){var h=A,e=h>>2,d=g;continue r}var w=A}var y=h,m=Me[vi+16>>2],S=y>>>0>>0;do if(!S){var M=y+r|0,C=M;if(y>>>0>=M>>>0)break;var R=Me[e+6],T=Me[e+3],O=(0|T)==(0|h);do if(O){var N=h+20|0,I=Se[N>>2];if(0==(0|I)){var P=h+16|0,D=Se[P>>2];if(0==(0|D)){var L=0,a=L>>2;break}var F=P,X=D}else{var F=N,X=I;i=14}for(;;){var X,F,j=X+20|0,U=Se[j>>2];if(0==(0|U)){var x=X+16|0,z=Me[x>>2];if(0==(0|z))break;var F=x,X=z}else var F=j,X=U}if(F>>>0>>0)throw Ka(),"Reached an unreachable!";Se[F>>2]=0;var L=X,a=L>>2}else{var V=Me[e+2];if(V>>>0>>0)throw Ka(),"Reached an unreachable!";Se[V+12>>2]=T,Se[T+8>>2]=V;var L=T,a=L>>2}while(0);var L,B=0==(0|R);r:do if(!B){var H=h+28|0,K=(Se[H>>2]<<2)+vi+304|0,Y=(0|h)==(0|Se[K>>2]);do{if(Y){if(Se[K>>2]=L,0!=(0|L))break;var G=Se[vi+4>>2]&(1<>2]^-1);Se[vi+4>>2]=G;break r}if(R>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";var W=R+16|0;if((0|Se[W>>2])==(0|h)?Se[W>>2]=L:Se[R+20>>2]=L,0==(0|L))break r}while(0);if(L>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+6]=R;var Z=Me[e+4];if(0!=(0|Z)){if(Z>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+4]=Z,Se[Z+24>>2]=L}var Q=Me[e+5];if(0==(0|Q))break;if(Q>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+5]=Q,Se[Q+24>>2]=L}while(0);if(d>>>0<16){var q=d+r|0;Se[e+1]=3|q;var $=q+(y+4)|0,J=1|Se[$>>2];Se[$>>2]=J}else{Se[e+1]=3|r,Se[r+(y+4)>>2]=1|d,Se[y+d+r>>2]=d;var rr=Me[vi+8>>2];if(0!=(0|rr)){var ar=Me[vi+20>>2],er=rr>>>2&1073741822,ir=(er<<2)+vi+40|0,vr=Me[vi>>2],tr=1<<(rr>>>3),fr=0==(vr&tr|0);do{if(!fr){var _r=(er+2<<2)+vi+40|0,sr=Me[_r>>2];if(sr>>>0>=Me[vi+16>>2]>>>0){var nr=sr,or=_r;break}throw Ka(),"Reached an unreachable!"}Se[vi>>2]=vr|tr;var nr=ir,or=(er+2<<2)+vi+40|0}while(0);var or,nr;Se[or>>2]=ar,Se[nr+12>>2]=ar,Se[ar+8>>2]=nr,Se[ar+12>>2]=ir}Se[vi+8>>2]=d,Se[vi+20>>2]=C}return h+8|0}while(0);throw Ka(),"Reached an unreachable!"}function aa(r){var a,e;0==(0|Se[ti>>2])&&ba();var i=0==(4&Se[vi+440>>2]|0);do{if(i){var v=Se[vi+24>>2],t=0==(0|v);do{if(!t){var f=v,_=ua(f);if(0==(0|_)){e=6;break}var s=Se[ti+8>>2],n=r+47-Se[vi+12>>2]+s&-s;if(n>>>0>=2147483647){e=14;break}var o=re(n);if((0|o)==(Se[_>>2]+Se[_+4>>2]|0)){var l=o,b=n,k=o;e=13;break}var u=o,c=n;e=15;break}e=6}while(0);do if(6==e){var h=re(0);if((0|h)==-1){e=14;break}var d=Se[ti+8>>2],w=d+(r+47)&-d,p=h,E=Se[ti+4>>2],A=E-1|0;if(0==(A&p|0))var g=w;else var g=w-p+(A+p&-E)|0;var g;if(g>>>0>=2147483647){e=14;break}var y=re(g);if((0|y)==(0|h)){var l=h,b=g,k=y;e=13;break}var u=y,c=g;e=15;break}while(0);if(13==e){var k,b,l;if((0|l)!=-1){var m=b,S=l;e=26;break}var u=k,c=b}else if(14==e){var M=4|Se[vi+440>>2];Se[vi+440>>2]=M,e=23;break}var c,u,C=0|-c,R=(0|u)!=-1&c>>>0<2147483647;do{if(R){if(c>>>0>=(r+48|0)>>>0){var T=c;e=21;break}var O=Se[ti+8>>2],N=r+47-c+O&-O;if(N>>>0>=2147483647){var T=c;e=21;break}var I=re(N);if((0|I)==-1){re(C);e=22;break}var T=N+c|0;e=21;break}var T=c;e=21}while(0);if(21==e){var T;if((0|u)!=-1){var m=T,S=u;e=26;break}}var P=4|Se[vi+440>>2];Se[vi+440>>2]=P,e=23;break}e=23}while(0);do if(23==e){var D=Se[ti+8>>2],L=D+(r+47)&-D;if(L>>>0>=2147483647){e=49;break}var F=re(L),X=re(0);if(!((0|X)!=-1&(0|F)!=-1&F>>>0>>0)){e=49;break}var j=X-F|0;if(j>>>0<=(r+40|0)>>>0|(0|F)==-1){e=49;break}var m=j,S=F;e=26;break}while(0);r:do if(26==e){var S,m,U=Se[vi+432>>2]+m|0;Se[vi+432>>2]=U,U>>>0>Me[vi+436>>2]>>>0&&(Se[vi+436>>2]=U);var x=Me[vi+24>>2],z=0==(0|x);a:do if(z){var V=Me[vi+16>>2];0==(0|V)|S>>>0>>0&&(Se[vi+16>>2]=S),Se[vi+444>>2]=S,Se[vi+448>>2]=m,Se[vi+456>>2]=0;var B=Se[ti>>2];Se[vi+36>>2]=B,Se[vi+32>>2]=-1,ha(),ca(S,m-40|0)}else{for(var H=vi+444|0,a=H>>2;;){var H;if(0==(0|H))break;var K=Me[a],Y=H+4|0,G=Me[Y>>2],W=K+G|0;if((0|S)==(0|W)){if(0!=(8&Se[a+3]|0))break;var Z=x;if(!(Z>>>0>=K>>>0&Z>>>0>>0))break;Se[Y>>2]=G+m|0;var Q=Se[vi+24>>2],q=Se[vi+12>>2]+m|0;ca(Q,q);break a}var H=Se[a+2],a=H>>2}S>>>0>2]>>>0&&(Se[vi+16>>2]=S);for(var $=S+m|0,J=vi+444|0;;){var J;if(0==(0|J))break;var rr=0|J,ar=Me[rr>>2];if((0|ar)==(0|$)){if(0!=(8&Se[J+12>>2]|0))break;Se[rr>>2]=S;var er=J+4|0,ir=Se[er>>2]+m|0;Se[er>>2]=ir;var vr=da(S,ar,r),tr=vr;e=50;break r}var J=Se[J+8>>2]}Ma(S,m)}while(0);var fr=Me[vi+12>>2];if(fr>>>0<=r>>>0){e=49;break}var _r=fr-r|0;Se[vi+12>>2]=_r;var sr=Me[vi+24>>2],nr=sr;Se[vi+24>>2]=nr+r|0,Se[r+(nr+4)>>2]=1|_r,Se[sr+4>>2]=3|r;var tr=sr+8|0;e=50;break}while(0);if(49==e){var or=Je();Se[or>>2]=12;var tr=0}var tr;return tr}function ea(r){var a,e,i,v,t,f,_=r>>2,s=0|-r,n=r>>>8,o=0==(0|n);do if(o)var l=0;else{if(r>>>0>16777215){var l=31;break}var b=(n+1048320|0)>>>16&8,k=n<>>16&4,c=k<>>16&2,d=14-(u|b|h)+(c<>>15)|0,l=r>>>((d+7|0)>>>0)&1|d<<1}while(0);var l,w=Me[vi+(l<<2)+304>>2],p=0==(0|w);r:do if(p)var E=0,A=s,g=0;else{if(31==(0|l))var y=0;else var y=25-(l>>>1)|0;for(var y,m=0,S=s,M=w,t=M>>2,C=r<>>0>>0){if((0|T)==(0|r)){var E=M,A=O,g=M;break r}var N=M,I=O}else var N=m,I=S;var I,N,P=Me[t+5],D=Me[((C>>>31<<2)+16>>2)+t],L=0==(0|P)|(0|P)==(0|D)?R:P;if(0==(0|D)){var E=N,A=I,g=L;break r}var m=N,S=I,M=D,t=M>>2,C=C<<1,R=L}}while(0);var g,A,E,F=0==(0|g)&0==(0|E);do if(F){var X=2<>2]&(X|-X);if(0==(0|j)){var U=g;break}var x=(j&-j)-1|0,z=x>>>12&16,V=x>>>(z>>>0),B=V>>>5&8,H=V>>>(B>>>0),K=H>>>2&4,Y=H>>>(K>>>0),G=Y>>>1&2,W=Y>>>(G>>>0),Z=W>>>1&1,U=Se[vi+((B|z|K|G|Z)+(W>>>(Z>>>0))<<2)+304>>2]}else var U=g;while(0);var U,Q=0==(0|U);r:do if(Q)var q=A,$=E,v=$>>2;else for(var J=U,i=J>>2,rr=A,ar=E;;){var ar,rr,J,er=(Se[i+1]&-8)-r|0,ir=er>>>0>>0,vr=ir?er:rr,tr=ir?J:ar,fr=Me[i+4];if(0==(0|fr)){var _r=Me[i+5];if(0==(0|_r)){var q=vr,$=tr,v=$>>2;break r}var J=_r,i=J>>2,rr=vr,ar=tr}else var J=fr,i=J>>2,rr=vr,ar=tr}while(0);var $,q,sr=0==(0|$);r:do{if(!sr){if(q>>>0>=(Se[vi+8>>2]-r|0)>>>0){var nr=0;break}var or=$,e=or>>2,lr=Me[vi+16>>2],br=or>>>0>>0;do if(!br){var kr=or+r|0,ur=kr;if(or>>>0>=kr>>>0)break;var cr=Me[v+6],hr=Me[v+3],dr=(0|hr)==(0|$);do if(dr){var wr=$+20|0,pr=Se[wr>>2];if(0==(0|pr)){var Er=$+16|0,Ar=Se[Er>>2];if(0==(0|Ar)){var gr=0,a=gr>>2;break}var yr=Er,mr=Ar}else{var yr=wr,mr=pr;f=28}for(;;){var mr,yr,Sr=mr+20|0,Mr=Se[Sr>>2];if(0==(0|Mr)){var Cr=mr+16|0,Rr=Me[Cr>>2];if(0==(0|Rr))break;var yr=Cr,mr=Rr}else var yr=Sr,mr=Mr}if(yr>>>0>>0)throw Ka(),"Reached an unreachable!";Se[yr>>2]=0;var gr=mr,a=gr>>2}else{var Tr=Me[v+2];if(Tr>>>0>>0)throw Ka(),"Reached an unreachable!";Se[Tr+12>>2]=hr,Se[hr+8>>2]=Tr;var gr=hr,a=gr>>2}while(0);var gr,Or=0==(0|cr);a:do if(!Or){var Nr=$+28|0,Ir=(Se[Nr>>2]<<2)+vi+304|0,Pr=(0|$)==(0|Se[Ir>>2]);do{if(Pr){if(Se[Ir>>2]=gr,0!=(0|gr))break;var Dr=Se[vi+4>>2]&(1<>2]^-1);Se[vi+4>>2]=Dr;break a}if(cr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";var Lr=cr+16|0;if((0|Se[Lr>>2])==(0|$)?Se[Lr>>2]=gr:Se[cr+20>>2]=gr,0==(0|gr))break a}while(0);if(gr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+6]=cr;var Fr=Me[v+4];if(0!=(0|Fr)){if(Fr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+4]=Fr,Se[Fr+24>>2]=gr}var Xr=Me[v+5];if(0==(0|Xr))break;if(Xr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+5]=Xr,Se[Xr+24>>2]=gr}while(0);var jr=q>>>0<16;a:do if(jr){var Ur=q+r|0;Se[v+1]=3|Ur;var xr=Ur+(or+4)|0,zr=1|Se[xr>>2];Se[xr>>2]=zr}else if(Se[v+1]=3|r,Se[_+(e+1)]=1|q,Se[(q>>2)+e+_]=q,q>>>0<256){var Vr=q>>>2&1073741822,Br=(Vr<<2)+vi+40|0,Hr=Me[vi>>2],Kr=1<<(q>>>3),Yr=0==(Hr&Kr|0);do{if(!Yr){var Gr=(Vr+2<<2)+vi+40|0,Wr=Me[Gr>>2];if(Wr>>>0>=Me[vi+16>>2]>>>0){var Zr=Wr,Qr=Gr;break}throw Ka(),"Reached an unreachable!"}Se[vi>>2]=Hr|Kr;var Zr=Br,Qr=(Vr+2<<2)+vi+40|0}while(0);var Qr,Zr;Se[Qr>>2]=ur,Se[Zr+12>>2]=ur,Se[_+(e+2)]=Zr,Se[_+(e+3)]=Br}else{var qr=kr,$r=q>>>8,Jr=0==(0|$r);do if(Jr)var ra=0;else{if(q>>>0>16777215){var ra=31;break}var aa=($r+1048320|0)>>>16&8,ea=$r<>>16&4,va=ea<>>16&2,fa=14-(ia|aa|ta)+(va<>>15)|0,ra=q>>>((fa+7|0)>>>0)&1|fa<<1}while(0);var ra,_a=(ra<<2)+vi+304|0;Se[_+(e+7)]=ra;var sa=r+(or+16)|0;Se[_+(e+5)]=0,Se[sa>>2]=0;var na=Se[vi+4>>2],oa=1<>2]=la,Se[_a>>2]=qr,Se[_+(e+6)]=_a,Se[_+(e+3)]=qr,Se[_+(e+2)]=qr}else{if(31==(0|ra))var ba=0;else var ba=25-(ra>>>1)|0;for(var ba,ka=q<>2];;){var ua,ka;if((Se[ua+4>>2]&-8|0)==(0|q)){var ca=ua+8|0,ha=Me[ca>>2],da=Me[vi+16>>2],wa=ua>>>0>>0;do if(!wa){if(ha>>>0>>0)break;Se[ha+12>>2]=qr,Se[ca>>2]=qr,Se[_+(e+2)]=ha,Se[_+(e+3)]=ua,Se[_+(e+6)]=0;break a}while(0);throw Ka(),"Reached an unreachable!"}var pa=(ka>>>31<<2)+ua+16|0,Ea=Me[pa>>2];if(0==(0|Ea)){if(pa>>>0>=Me[vi+16>>2]>>>0){Se[pa>>2]=qr,Se[_+(e+6)]=ua,Se[_+(e+3)]=qr,Se[_+(e+2)]=qr;break a}throw Ka(),"Reached an unreachable!"}var ka=ka<<1,ua=Ea}}}while(0);var nr=$+8|0;break r}while(0);throw Ka(),"Reached an unreachable!"}var nr=0}while(0);var nr;return nr}function ia(r){var a;0==(0|Se[ti>>2])&&ba();var e=r>>>0<4294967232;r:do if(e){var i=Me[vi+24>>2];if(0==(0|i)){var v=0;break}var t=Me[vi+12>>2],f=t>>>0>(r+40|0)>>>0;do if(f){var _=Me[ti+8>>2],s=-40-r-1+t+_|0,n=Math.floor((s>>>0)/(_>>>0)),o=(n-1)*_|0,l=i,b=ua(l);if(0!=(8&Se[b+12>>2]|0))break;var k=re(0),a=(b+4|0)>>2;if((0|k)!=(Se[b>>2]+Se[a]|0))break;var u=o>>>0>2147483646?-2147483648-_|0:o,c=0|-u,h=re(c),d=re(0);if(!((0|h)!=-1&d>>>0>>0))break;var w=k-d|0;if((0|k)==(0|d))break;var p=Se[a]-w|0;Se[a]=p;var E=Se[vi+432>>2]-w|0;Se[vi+432>>2]=E;var A=Se[vi+24>>2],g=Se[vi+12>>2]-w|0;ca(A,g);var v=(0|k)!=(0|d);break r}while(0);if(Me[vi+12>>2]>>>0<=Me[vi+28>>2]>>>0){var v=0;break}Se[vi+28>>2]=-1;var v=0}else var v=0;while(0);var v;return 1&v}function va(r){var a,e,i,v,t,f,_,s=r>>2,n=0==(0|r);r:do if(!n){var o=r-8|0,l=o,b=Me[vi+16>>2],k=o>>>0>>0;a:do if(!k){var u=Me[r-4>>2],c=3&u;if(1==(0|c))break;var h=u&-8,f=h>>2,d=r+(h-8)|0,w=d,p=0==(1&u|0);e:do if(p){var E=Me[o>>2];if(0==(0|c))break r;var A=-8-E|0,t=A>>2,g=r+A|0,y=g,m=E+h|0;if(g>>>0>>0)break a;if((0|y)==(0|Se[vi+20>>2])){var v=(r+(h-4)|0)>>2;if(3!=(3&Se[v]|0)){var S=y,i=S>>2,M=m;break}Se[vi+8>>2]=m;var C=Se[v]&-2;Se[v]=C,Se[t+(s+1)]=1|m,Se[d>>2]=m;break r}if(E>>>0<256){var R=Me[t+(s+2)],T=Me[t+(s+3)];if((0|R)!=(0|T)){var O=((E>>>2&1073741822)<<2)+vi+40|0,N=(0|R)!=(0|O)&R>>>0>>0;do if(!N){if(!((0|T)==(0|O)|T>>>0>=b>>>0))break;Se[R+12>>2]=T,Se[T+8>>2]=R;var S=y,i=S>>2,M=m;break e}while(0);throw Ka(),"Reached an unreachable!"}var I=Se[vi>>2]&(1<<(E>>>3)^-1);Se[vi>>2]=I;var S=y,i=S>>2,M=m}else{var P=g,D=Me[t+(s+6)],L=Me[t+(s+3)],F=(0|L)==(0|P);do if(F){var X=A+(r+20)|0,j=Se[X>>2];if(0==(0|j)){var U=A+(r+16)|0,x=Se[U>>2];if(0==(0|x)){var z=0,e=z>>2;break}var V=U,B=x}else{var V=X,B=j;_=21}for(;;){var B,V,H=B+20|0,K=Se[H>>2];if(0==(0|K)){var Y=B+16|0,G=Me[Y>>2];if(0==(0|G))break;var V=Y,B=G}else var V=H,B=K}if(V>>>0>>0)throw Ka(),"Reached an unreachable!";Se[V>>2]=0;var z=B,e=z>>2}else{var W=Me[t+(s+2)];if(W>>>0>>0)throw Ka(),"Reached an unreachable!";Se[W+12>>2]=L,Se[L+8>>2]=W;var z=L,e=z>>2}while(0);var z;if(0==(0|D)){var S=y,i=S>>2,M=m;break}var Z=A+(r+28)|0,Q=(Se[Z>>2]<<2)+vi+304|0,q=(0|P)==(0|Se[Q>>2]);do{if(q){if(Se[Q>>2]=z,0!=(0|z))break;var $=Se[vi+4>>2]&(1<>2]^-1);Se[vi+4>>2]=$;var S=y,i=S>>2,M=m;break e}if(D>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";var J=D+16|0;if((0|Se[J>>2])==(0|P)?Se[J>>2]=z:Se[D+20>>2]=z,0==(0|z)){var S=y,i=S>>2,M=m;break e}}while(0);if(z>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[e+6]=D;var rr=Me[t+(s+4)];if(0!=(0|rr)){if(rr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[e+4]=rr,Se[rr+24>>2]=z}var ar=Me[t+(s+5)];if(0==(0|ar)){var S=y,i=S>>2,M=m;break}if(ar>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[e+5]=ar,Se[ar+24>>2]=z;var S=y,i=S>>2,M=m}}else var S=l,i=S>>2,M=h;while(0);var M,S,er=S;if(er>>>0>=d>>>0)break;var ir=r+(h-4)|0,vr=Me[ir>>2];if(0==(1&vr|0))break;var tr=0==(2&vr|0);do{if(tr){if((0|w)==(0|Se[vi+24>>2])){var fr=Se[vi+12>>2]+M|0;Se[vi+12>>2]=fr,Se[vi+24>>2]=S;var _r=1|fr;if(Se[i+1]=_r,(0|S)==(0|Se[vi+20>>2])&&(Se[vi+20>>2]=0,Se[vi+8>>2]=0),fr>>>0<=Me[vi+28>>2]>>>0)break r;ia(0);break r}if((0|w)==(0|Se[vi+20>>2])){var sr=Se[vi+8>>2]+M|0;Se[vi+8>>2]=sr,Se[vi+20>>2]=S;var nr=1|sr;Se[i+1]=nr;var or=er+sr|0;Se[or>>2]=sr;break r}var lr=(vr&-8)+M|0,br=vr>>>3,kr=vr>>>0<256;e:do if(kr){var ur=Me[s+f],cr=Me[((4|h)>>2)+s];if((0|ur)!=(0|cr)){var hr=((vr>>>2&1073741822)<<2)+vi+40|0,dr=(0|ur)==(0|hr);do{if(!dr){if(ur>>>0>2]>>>0){_=66;break}_=63;break}_=63}while(0);do if(63==_){if((0|cr)!=(0|hr)&&cr>>>0>2]>>>0)break;Se[ur+12>>2]=cr,Se[cr+8>>2]=ur;break e}while(0);throw Ka(),"Reached an unreachable!"}var wr=Se[vi>>2]&(1<>2]=wr}else{var pr=d,Er=Me[f+(s+4)],Ar=Me[((4|h)>>2)+s],gr=(0|Ar)==(0|pr);do if(gr){var yr=h+(r+12)|0,mr=Se[yr>>2];if(0==(0|mr)){var Sr=h+(r+8)|0,Mr=Se[Sr>>2];if(0==(0|Mr)){var Cr=0,a=Cr>>2;break}var Rr=Sr,Tr=Mr}else{var Rr=yr,Tr=mr;_=73}for(;;){var Tr,Rr,Or=Tr+20|0,Nr=Se[Or>>2];if(0==(0|Nr)){var Ir=Tr+16|0,Pr=Me[Ir>>2];if(0==(0|Pr))break;var Rr=Ir,Tr=Pr}else var Rr=Or,Tr=Nr}if(Rr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[Rr>>2]=0;var Cr=Tr,a=Cr>>2}else{var Dr=Me[s+f];if(Dr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[Dr+12>>2]=Ar, +Se[Ar+8>>2]=Dr;var Cr=Ar,a=Cr>>2}while(0);var Cr;if(0==(0|Er))break;var Lr=h+(r+20)|0,Fr=(Se[Lr>>2]<<2)+vi+304|0,Xr=(0|pr)==(0|Se[Fr>>2]);do{if(Xr){if(Se[Fr>>2]=Cr,0!=(0|Cr))break;var jr=Se[vi+4>>2]&(1<>2]^-1);Se[vi+4>>2]=jr;break e}if(Er>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";var Ur=Er+16|0;if((0|Se[Ur>>2])==(0|pr)?Se[Ur>>2]=Cr:Se[Er+20>>2]=Cr,0==(0|Cr))break e}while(0);if(Cr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+6]=Er;var xr=Me[f+(s+2)];if(0!=(0|xr)){if(xr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+4]=xr,Se[xr+24>>2]=Cr}var zr=Me[f+(s+3)];if(0==(0|zr))break;if(zr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+5]=zr,Se[zr+24>>2]=Cr}while(0);if(Se[i+1]=1|lr,Se[er+lr>>2]=lr,(0|S)!=(0|Se[vi+20>>2])){var Vr=lr;break}Se[vi+8>>2]=lr;break r}Se[ir>>2]=vr&-2,Se[i+1]=1|M,Se[er+M>>2]=M;var Vr=M}while(0);var Vr;if(Vr>>>0<256){var Br=Vr>>>2&1073741822,Hr=(Br<<2)+vi+40|0,Kr=Me[vi>>2],Yr=1<<(Vr>>>3),Gr=0==(Kr&Yr|0);do{if(!Gr){var Wr=(Br+2<<2)+vi+40|0,Zr=Me[Wr>>2];if(Zr>>>0>=Me[vi+16>>2]>>>0){var Qr=Zr,qr=Wr;break}throw Ka(),"Reached an unreachable!"}Se[vi>>2]=Kr|Yr;var Qr=Hr,qr=(Br+2<<2)+vi+40|0}while(0);var qr,Qr;Se[qr>>2]=S,Se[Qr+12>>2]=S,Se[i+2]=Qr,Se[i+3]=Hr;break r}var $r=S,Jr=Vr>>>8,ra=0==(0|Jr);do if(ra)var aa=0;else{if(Vr>>>0>16777215){var aa=31;break}var ea=(Jr+1048320|0)>>>16&8,va=Jr<>>16&4,_a=va<>>16&2,na=14-(fa|ea|sa)+(_a<>>15)|0,aa=Vr>>>((na+7|0)>>>0)&1|na<<1}while(0);var aa,oa=(aa<<2)+vi+304|0;Se[i+7]=aa,Se[i+5]=0,Se[i+4]=0;var la=Se[vi+4>>2],ba=1<>2]=ua,Se[oa>>2]=$r,Se[i+6]=oa,Se[i+3]=S,Se[i+2]=S}else{if(31==(0|aa))var ca=0;else var ca=25-(aa>>>1)|0;for(var ca,ha=Vr<>2];;){var da,ha;if((Se[da+4>>2]&-8|0)==(0|Vr)){var wa=da+8|0,pa=Me[wa>>2],Ea=Me[vi+16>>2],Aa=da>>>0>>0;do if(!Aa){if(pa>>>0>>0)break;Se[pa+12>>2]=$r,Se[wa>>2]=$r,Se[i+2]=pa,Se[i+3]=da,Se[i+6]=0;break e}while(0);throw Ka(),"Reached an unreachable!"}var ga=(ha>>>31<<2)+da+16|0,ya=Me[ga>>2];if(0==(0|ya)){if(ga>>>0>=Me[vi+16>>2]>>>0){Se[ga>>2]=$r,Se[i+6]=da,Se[i+3]=S,Se[i+2]=S;break e}throw Ka(),"Reached an unreachable!"}var ha=ha<<1,da=ya}}while(0);var ma=Se[vi+32>>2]-1|0;if(Se[vi+32>>2]=ma,0!=(0|ma))break r;ta();break r}while(0);throw Ka(),"Reached an unreachable!"}while(0)}function ta(){var r=Se[vi+452>>2],a=0==(0|r);r:do if(!a)for(var e=r;;){var e,i=Se[e+8>>2];if(0==(0|i))break r;var e=i}while(0);Se[vi+32>>2]=-1}function fa(r,a){if(0==(0|r))var e=Jr(a),i=e;else var v=la(r,a),i=v;var i;return i}function _a(r,a){var e,i=r>>>0<9;do if(i)var v=Jr(a),t=v;else{var f=r>>>0<16?16:r,_=0==(f-1&f|0);r:do if(_)var s=f;else{if(f>>>0<=16){var s=16;break}for(var n=16;;){var n,o=n<<1;if(o>>>0>=f>>>0){var s=o;break r}var n=o}}while(0);var s;if((-64-s|0)>>>0>a>>>0){if(a>>>0<11)var l=16;else var l=a+11&-8;var l,b=Jr(l+(s+12)|0);if(0==(0|b)){var t=0;break}var k=b-8|0;if(0==((b>>>0)%(s>>>0)|0))var u=k,c=0;else{var h=b+(s-1)&-s,d=h-8|0,w=k;if((d-w|0)>>>0>15)var p=d;else var p=h+(s-8)|0;var p,E=p-w|0,e=(b-4|0)>>2,A=Se[e],g=(A&-8)-E|0;if(0==(3&A|0)){var y=Se[k>>2]+E|0;Se[p>>2]=y,Se[p+4>>2]=g;var u=p,c=0}else{var m=p+4|0,S=g|1&Se[m>>2]|2;Se[m>>2]=S;var M=g+(p+4)|0,C=1|Se[M>>2];Se[M>>2]=C;var R=E|1&Se[e]|2;Se[e]=R;var T=b+(E-4)|0,O=1|Se[T>>2];Se[T>>2]=O;var u=p,c=b}}var c,u,N=u+4|0,I=Me[N>>2],P=0==(3&I|0);do if(P)var D=0;else{var L=I&-8;if(L>>>0<=(l+16|0)>>>0){var D=0;break}var F=L-l|0;Se[N>>2]=l|1&I|2,Se[u+(4|l)>>2]=3|F;var X=u+(4|L)|0,j=1|Se[X>>2];Se[X>>2]=j;var D=l+(u+8)|0}while(0);var D;0!=(0|c)&&va(c),0!=(0|D)&&va(D);var t=u+8|0}else{var U=Je();Se[U>>2]=12;var t=0}}while(0);var t;return t}function sa(r,a,e,i){var v,t;0==(0|Se[ti>>2])&&ba();var f=0==(0|i),_=0==(0|r);do{if(f){if(_){var s=Jr(0),n=s;t=30;break}var o=r<<2;if(o>>>0<11){var l=0,b=16;t=9;break}var l=0,b=o+11&-8;t=9;break}if(_){var n=i;t=30;break}var l=i,b=0;t=9;break}while(0);do if(9==t){var b,l,k=0==(1&e|0);r:do if(k){if(_){var u=0,c=0;break}for(var h=0,d=0;;){var d,h,w=Me[a+(d<<2)>>2];if(w>>>0<11)var p=16;else var p=w+11&-8;var p,E=p+h|0,A=d+1|0;if((0|A)==(0|r)){var u=0,c=E;break r}var h=E,d=A}}else{var g=Me[a>>2];if(g>>>0<11)var y=16;else var y=g+11&-8;var y,u=y,c=y*r|0}while(0);var c,u,m=Jr(b-4+c|0);if(0==(0|m)){var n=0;break}var S=m-8|0,M=Se[m-4>>2]&-8;if(0!=(2&e|0)){var C=-4-b+M|0;Fa(m,0,C,1)}if(0==(0|l)){var R=m+c|0,T=M-c|3;Se[m+(c-4)>>2]=T;var O=R,v=O>>2,N=c}else var O=l,v=O>>2,N=M;var N,O;Se[v]=m;var I=r-1|0,P=0==(0|I);r:do if(P)var D=S,L=N;else if(0==(0|u))for(var F=S,X=N,j=0;;){var j,X,F,U=Me[a+(j<<2)>>2];if(U>>>0<11)var x=16;else var x=U+11&-8;var x,z=X-x|0;Se[F+4>>2]=3|x;var V=F+x|0,B=j+1|0;if(Se[(B<<2>>2)+v]=x+(F+8)|0,(0|B)==(0|I)){var D=V,L=z;break r}var F=V,X=z,j=B}else for(var H=3|u,K=u+8|0,Y=S,G=N,W=0;;){var W,G,Y,Z=G-u|0;Se[Y+4>>2]=H;var Q=Y+u|0,q=W+1|0;if(Se[(q<<2>>2)+v]=Y+K|0,(0|q)==(0|I)){var D=Q,L=Z;break r}var Y=Q,G=Z,W=q}while(0);var L,D;Se[D+4>>2]=3|L;var n=O}while(0);var n;return n}function na(r){var a=r>>2;0==(0|Se[ti>>2])&&ba();var e=Me[vi+24>>2];if(0==(0|e))var i=0,v=0,t=0,f=0,_=0,s=0,n=0;else{for(var o=Me[vi+12>>2],l=o+40|0,b=vi+444|0,k=l,u=l,c=1;;){var c,u,k,b,h=Me[b>>2],d=h+8|0;if(0==(7&d|0))var w=0;else var w=7&-d;for(var w,p=b+4|0,E=h+w|0,A=c,g=u,y=k;;){var y,g,A,E;if(E>>>0>>0)break;if(E>>>0>=(h+Se[p>>2]|0)>>>0|(0|E)==(0|e))break;var m=Se[E+4>>2];if(7==(0|m))break;var S=m&-8,M=S+y|0;if(1==(3&m|0))var C=A+1|0,R=S+g|0;else var C=A,R=g;var R,C,E=E+S|0,A=C,g=R,y=M}var T=Me[b+8>>2];if(0==(0|T))break;var b=T,k=y,u=g,c=A}var O=Se[vi+432>>2],i=y,v=A,t=o,f=g,_=O-y|0,s=Se[vi+436>>2],n=O-g|0}var n,s,_,f,t,v,i;Se[a]=i,Se[a+1]=v,Se[a+2]=0,Se[a+3]=0,Se[a+4]=_,Se[a+5]=s,Se[a+6]=0,Se[a+7]=n,Se[a+8]=f,Se[a+9]=t}function oa(){0==(0|Se[ti>>2])&&ba();var r=Me[vi+24>>2],a=0==(0|r);r:do if(a)var e=0,i=0,v=0;else for(var t=Se[vi+436>>2],f=Me[vi+432>>2],_=vi+444|0,s=f-40-Se[vi+12>>2]|0;;){var s,_,n=Me[_>>2],o=n+8|0;if(0==(7&o|0))var l=0;else var l=7&-o;for(var l,b=_+4|0,k=n+l|0,u=s;;){var u,k;if(k>>>0>>0)break;if(k>>>0>=(n+Se[b>>2]|0)>>>0|(0|k)==(0|r))break;var c=Se[k+4>>2];if(7==(0|c))break;var h=c&-8,d=1==(3&c|0)?h:0,w=u-d|0,k=k+h|0,u=w}var p=Me[_+8>>2];if(0==(0|p)){var e=t,i=f,v=u;break r}var _=p,s=u}while(0);var v,i,e,E=Se[Se[qe>>2]+12>>2],A=(Qa(E,0|He.__str339,(ne=Oe,Oe+=4,Se[ne>>2]=e,ne)),Se[Se[qe>>2]+12>>2]),g=(Qa(A,0|He.__str1340,(ne=Oe,Oe+=4,Se[ne>>2]=i,ne)),Se[Se[qe>>2]+12>>2]);Qa(g,0|He.__str2341,(ne=Oe,Oe+=4,Se[ne>>2]=v,ne))}function la(r,a){var e,i,v,t=a>>>0>4294967231;r:do{if(!t){var f=r-8|0,_=f,i=(r-4|0)>>2,s=Me[i],n=s&-8,o=n-8|0,l=r+o|0,b=f>>>0>2]>>>0;do if(!b){var k=3&s;if(!(1!=(0|k)&(0|o)>-8))break;var e=(r+(n-4)|0)>>2;if(0==(1&Se[e]|0))break;if(a>>>0<11)var u=16;else var u=a+11&-8;var u,c=0==(0|k);do{if(c){var h=ka(_,u),d=0,w=h;v=17;break}if(n>>>0>>0){if((0|l)!=(0|Se[vi+24>>2])){v=21;break}var p=Se[vi+12>>2]+n|0;if(p>>>0<=u>>>0){v=21;break}var E=p-u|0,A=r+(u-8)|0;Se[i]=u|1&s|2;var g=1|E;Se[r+(u-4)>>2]=g,Se[vi+24>>2]=A,Se[vi+12>>2]=E;var d=0,w=_;v=17;break}var y=n-u|0;if(y>>>0<=15){var d=0,w=_;v=17;break}Se[i]=u|1&s|2,Se[r+(u-4)>>2]=3|y;var m=1|Se[e];Se[e]=m;var d=r+u|0,w=_;v=17;break}while(0);do if(17==v){var w,d;if(0==(0|w))break;0!=(0|d)&&va(d);var S=w+8|0;break r}while(0);var M=Jr(a);if(0==(0|M)){var S=0;break r}var C=0==(3&Se[i]|0)?8:4,R=n-C|0,T=R>>>0>>0?R:a;Pa(M,r,T,1),va(r);var S=M;break r}while(0);throw Ka(),"Reached an unreachable!"}var O=Je();Se[O>>2]=12;var S=0}while(0);var S;return S}function ba(){if(0==(0|Se[ti>>2])){var r=qa(8);if(0!=(r-1&r|0))throw Ka(),"Reached an unreachable!";Se[ti+8>>2]=r,Se[ti+4>>2]=r,Se[ti+12>>2]=-1,Se[ti+16>>2]=2097152,Se[ti+20>>2]=0,Se[vi+440>>2]=0;var a=$a(0);Se[ti>>2]=a&-16^1431655768}}function ka(r,a){var e=Se[r+4>>2]&-8,i=a>>>0<256;do if(i)var v=0;else{if(e>>>0>=(a+4|0)>>>0&&(e-a|0)>>>0<=Se[ti+8>>2]<<1>>>0){var v=r;break}var v=0}while(0);var v;return v}function ua(r){for(var a,e=vi+444|0,a=e>>2;;){var e,i=Me[a];if(i>>>0<=r>>>0&&(i+Se[a+1]|0)>>>0>r>>>0){var v=e;break}var t=Me[a+2];if(0==(0|t)){var v=0;break}var e=t,a=e>>2}var v;return v}function ca(r,a){var e=r,i=r+8|0;if(0==(7&i|0))var v=0;else var v=7&-i;var v,t=a-v|0;Se[vi+24>>2]=e+v|0,Se[vi+12>>2]=t,Se[v+(e+4)>>2]=1|t,Se[a+(e+4)>>2]=40;var f=Se[ti+16>>2];Se[vi+28>>2]=f}function ha(){for(var r=0;;){var r,a=r<<1,e=(a<<2)+vi+40|0;Se[vi+(a+3<<2)+40>>2]=e,Se[vi+(a+2<<2)+40>>2]=e;var i=r+1|0;if(32==(0|i))break;var r=i}}function da(r,a,e){var i,v,t,f,_=a>>2,s=r>>2,n=r+8|0;if(0==(7&n|0))var o=0;else var o=7&-n;var o,l=a+8|0;if(0==(7&l|0))var b=0,t=b>>2;else var b=7&-l,t=b>>2;var b,k=a+b|0,u=k,c=o+e|0,v=c>>2,h=r+c|0,d=h,w=k-(r+o)-e|0;Se[(o+4>>2)+s]=3|e;var p=(0|u)==(0|Se[vi+24>>2]);r:do if(p){var E=Se[vi+12>>2]+w|0;Se[vi+12>>2]=E,Se[vi+24>>2]=d;var A=1|E;Se[v+(s+1)]=A}else if((0|u)==(0|Se[vi+20>>2])){var g=Se[vi+8>>2]+w|0;Se[vi+8>>2]=g,Se[vi+20>>2]=d;var y=1|g;Se[v+(s+1)]=y;var m=r+g+c|0;Se[m>>2]=g}else{var S=Me[t+(_+1)];if(1==(3&S|0)){var M=S&-8,C=S>>>3,R=S>>>0<256;a:do if(R){var T=Me[((8|b)>>2)+_],O=Me[t+(_+3)];if((0|T)!=(0|O)){var N=((S>>>2&1073741822)<<2)+vi+40|0,I=(0|T)==(0|N);do{if(!I){if(T>>>0>2]>>>0){f=18;break}f=15;break}f=15}while(0);do if(15==f){if((0|O)!=(0|N)&&O>>>0>2]>>>0)break;Se[T+12>>2]=O,Se[O+8>>2]=T;break a}while(0);throw Ka(),"Reached an unreachable!"}var P=Se[vi>>2]&(1<>2]=P}else{var D=k,L=Me[((24|b)>>2)+_],F=Me[t+(_+3)],X=(0|F)==(0|D);do if(X){var j=16|b,U=j+(a+4)|0,x=Se[U>>2];if(0==(0|x)){var z=a+j|0,V=Se[z>>2];if(0==(0|V)){var B=0,i=B>>2;break}var H=z,K=V}else{var H=U,K=x;f=25}for(;;){var K,H,Y=K+20|0,G=Se[Y>>2];if(0==(0|G)){var W=K+16|0,Z=Me[W>>2];if(0==(0|Z))break;var H=W,K=Z}else var H=Y,K=G}if(H>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[H>>2]=0;var B=K,i=B>>2}else{var Q=Me[((8|b)>>2)+_];if(Q>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[Q+12>>2]=F,Se[F+8>>2]=Q;var B=F,i=B>>2}while(0);var B;if(0==(0|L))break;var q=b+(a+28)|0,$=(Se[q>>2]<<2)+vi+304|0,J=(0|D)==(0|Se[$>>2]);do{if(J){if(Se[$>>2]=B,0!=(0|B))break;var rr=Se[vi+4>>2]&(1<>2]^-1);Se[vi+4>>2]=rr;break a}if(L>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";var ar=L+16|0;if((0|Se[ar>>2])==(0|D)?Se[ar>>2]=B:Se[L+20>>2]=B,0==(0|B))break a}while(0);if(B>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[i+6]=L;var er=16|b,ir=Me[(er>>2)+_];if(0!=(0|ir)){if(ir>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[i+4]=ir,Se[ir+24>>2]=B}var vr=Me[(er+4>>2)+_];if(0==(0|vr))break;if(vr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[i+5]=vr,Se[vr+24>>2]=B}while(0);var tr=a+(M|b)|0,fr=M+w|0}else var tr=u,fr=w;var fr,tr,_r=tr+4|0,sr=Se[_r>>2]&-2;if(Se[_r>>2]=sr,Se[v+(s+1)]=1|fr,Se[(fr>>2)+s+v]=fr,fr>>>0<256){var nr=fr>>>2&1073741822,or=(nr<<2)+vi+40|0,lr=Me[vi>>2],br=1<<(fr>>>3),kr=0==(lr&br|0);do{if(!kr){var ur=(nr+2<<2)+vi+40|0,cr=Me[ur>>2];if(cr>>>0>=Me[vi+16>>2]>>>0){var hr=cr,dr=ur;break}throw Ka(),"Reached an unreachable!"}Se[vi>>2]=lr|br;var hr=or,dr=(nr+2<<2)+vi+40|0}while(0);var dr,hr;Se[dr>>2]=d,Se[hr+12>>2]=d,Se[v+(s+2)]=hr,Se[v+(s+3)]=or}else{var wr=h,pr=fr>>>8,Er=0==(0|pr);do if(Er)var Ar=0;else{if(fr>>>0>16777215){var Ar=31;break}var gr=(pr+1048320|0)>>>16&8,yr=pr<>>16&4,Sr=yr<>>16&2,Cr=14-(mr|gr|Mr)+(Sr<>>15)|0,Ar=fr>>>((Cr+7|0)>>>0)&1|Cr<<1}while(0);var Ar,Rr=(Ar<<2)+vi+304|0;Se[v+(s+7)]=Ar;var Tr=c+(r+16)|0;Se[v+(s+5)]=0,Se[Tr>>2]=0;var Or=Se[vi+4>>2],Nr=1<>2]=Ir,Se[Rr>>2]=wr,Se[v+(s+6)]=Rr,Se[v+(s+3)]=wr,Se[v+(s+2)]=wr}else{if(31==(0|Ar))var Pr=0;else var Pr=25-(Ar>>>1)|0;for(var Pr,Dr=fr<>2];;){var Lr,Dr;if((Se[Lr+4>>2]&-8|0)==(0|fr)){var Fr=Lr+8|0,Xr=Me[Fr>>2],jr=Me[vi+16>>2],Ur=Lr>>>0>>0;do if(!Ur){if(Xr>>>0>>0)break;Se[Xr+12>>2]=wr,Se[Fr>>2]=wr,Se[v+(s+2)]=Xr,Se[v+(s+3)]=Lr,Se[v+(s+6)]=0;break r}while(0);throw Ka(),"Reached an unreachable!"}var xr=(Dr>>>31<<2)+Lr+16|0,zr=Me[xr>>2];if(0==(0|zr)){if(xr>>>0>=Me[vi+16>>2]>>>0){Se[xr>>2]=wr,Se[v+(s+6)]=Lr,Se[v+(s+3)]=wr,Se[v+(s+2)]=wr;break r}throw Ka(),"Reached an unreachable!"}var Dr=Dr<<1,Lr=zr}}}}while(0);return r+(8|o)|0}function wa(r){return 0|He.__str3342}function pa(r){return 0|He.__str14343}function Ea(r){Se[r>>2]=si+8|0}function Aa(r){0!=(0|r)&&va(r)}function ga(r){ya(r);var a=r;Aa(a)}function ya(r){var a=0|r;Ye(a)}function ma(r){var a=0|r;Ea(a),Se[r>>2]=ni+8|0}function Sa(r){var a=0|r;ya(a);var e=r;Aa(e)}function Ma(r,a){var e,i,v=Me[vi+24>>2],i=v>>2,t=v,f=ua(t),_=Se[f>>2],s=Se[f+4>>2],n=_+s|0,o=_+(s-39)|0;if(0==(7&o|0))var l=0;else var l=7&-o;var l,b=_+(s-47)+l|0,k=b>>>0<(v+16|0)>>>0?t:b,u=k+8|0,e=u>>2,c=u,h=r,d=a-40|0;ca(h,d);var w=k+4|0;Se[w>>2]=27,Se[e]=Se[vi+444>>2],Se[e+1]=Se[vi+448>>2],Se[e+2]=Se[vi+452>>2],Se[e+3]=Se[vi+456>>2],Se[vi+444>>2]=r,Se[vi+448>>2]=a,Se[vi+456>>2]=0,Se[vi+452>>2]=c;var p=k+28|0;Se[p>>2]=7;var E=(k+32|0)>>>0>>0;r:do if(E)for(var A=p;;){var A,g=A+4|0;if(Se[g>>2]=7,(A+8|0)>>>0>=n>>>0)break r;var A=g}while(0);var y=(0|k)==(0|t);r:do if(!y){var m=k-v|0,S=t+m|0,M=m+(t+4)|0,C=Se[M>>2]&-2;Se[M>>2]=C;var R=1|m;Se[i+1]=R;var T=S;if(Se[T>>2]=m,m>>>0<256){var O=m>>>2&1073741822,N=(O<<2)+vi+40|0,I=Me[vi>>2],P=1<<(m>>>3),D=0==(I&P|0);do{if(!D){var L=(O+2<<2)+vi+40|0,F=Me[L>>2];if(F>>>0>=Me[vi+16>>2]>>>0){var X=F,j=L;break}throw Ka(),"Reached an unreachable!"}var U=I|P;Se[vi>>2]=U;var X=N,j=(O+2<<2)+vi+40|0}while(0);var j,X;Se[j>>2]=v,Se[X+12>>2]=v,Se[i+2]=X,Se[i+3]=N}else{var x=v,z=m>>>8,V=0==(0|z);do if(V)var B=0;else{if(m>>>0>16777215){var B=31;break}var H=(z+1048320|0)>>>16&8,K=z<>>16&4,G=K<>>16&2,Z=14-(Y|H|W)+(G<>>15)|0,B=m>>>((Z+7|0)>>>0)&1|Z<<1}while(0);var B,Q=(B<<2)+vi+304|0;Se[i+7]=B,Se[i+5]=0,Se[i+4]=0;var q=Se[vi+4>>2],$=1<>2]=J,Se[Q>>2]=x,Se[i+6]=Q,Se[i+3]=v,Se[i+2]=v}else{if(31==(0|B))var rr=0;else var rr=25-(B>>>1)|0;for(var rr,ar=m<>2];;){var er,ar;if((Se[er+4>>2]&-8|0)==(0|m)){var ir=er+8|0,vr=Me[ir>>2],tr=Me[vi+16>>2],fr=er>>>0>>0;do if(!fr){if(vr>>>0>>0)break;Se[vr+12>>2]=x,Se[ir>>2]=x,Se[i+2]=vr,Se[i+3]=er,Se[i+6]=0;break r}while(0);throw Ka(),"Reached an unreachable!"}var _r=(ar>>>31<<2)+er+16|0,sr=Me[_r>>2];if(0==(0|sr)){if(_r>>>0>=Me[vi+16>>2]>>>0){Se[_r>>2]=x,Se[i+6]=er,Se[i+3]=v,Se[i+2]=v;break r}throw Ka(),"Reached an unreachable!"}var ar=ar<<1,er=sr}}}}while(0)}function Ca(r){return d(r)}function Ra(r,a){var e=0;do Ae[r+e]=Ae[a+e],e++;while(0!=Ae[a+e-1]);return r}function Ta(){var r=Ta;return r.LLVM_SAVEDSTACKS||(r.LLVM_SAVEDSTACKS=[]),r.LLVM_SAVEDSTACKS.push(le.stackSave()),r.LLVM_SAVEDSTACKS.length-1}function Oa(r){var a=Ta,e=a.LLVM_SAVEDSTACKS[r];a.LLVM_SAVEDSTACKS.splice(r,1),le.stackRestore(e)}function Na(r,a,e){for(var i=0;it?1:-1;i++}return 0}function Ia(r,a){var e=Ca(r),i=0;do Ae[r+e+i]=Ae[a+i],i++;while(0!=Ae[a+i-1]);return r}function Pa(r,a,e,i){if(e>=20&&a%2==r%2)if(a%4==r%4){for(var v=a+e;a%4;)Ae[r++]=Ae[a++];for(var t=a>>2,f=r>>2,_=v>>2;t<_;)Se[f++]=Se[t++];for(a=t<<2,r=f<<2;a>1,n=r>>1,o=v>>1;st?1:-1}return 0}function Fa(r,a,e,i){if(e>=20){for(var v=r+e;r%4;)Ae[r++]=a;a<0&&(a+=256);for(var t=r>>2,f=v>>2,_=a|a<<8|a<<16|a<<24;t>2],xe[1]=Se[a+_+4>>2],e=ze[0]):"i64"==r?e=[Se[a+_>>2],Se[a+_+4>>2]]:(r="i32",e=Se[a+_>>2]),_+=le.getNativeFieldSize(r),e}for(var i,v,t,f=r,_=0,s=[];;){var n=f;if(i=Ae[f],0===i)break;if(v=Ae[f+1],i=="%".charCodeAt(0)){var o=!1,l=!1,b=!1,k=!1;r:for(;;){switch(v){case"+".charCodeAt(0):o=!0;break;case"-".charCodeAt(0):l=!0;break;case"#".charCodeAt(0):b=!0;break;case"0".charCodeAt(0):if(k)break r;k=!0;break;default:break r}f++,v=Ae[f+1]}var u=0;if(v=="*".charCodeAt(0))u=e("i32"),f++,v=Ae[f+1];else for(;v>="0".charCodeAt(0)&&v<="9".charCodeAt(0);)u=10*u+(v-"0".charCodeAt(0)),f++,v=Ae[f+1];var c=!1;if(v==".".charCodeAt(0)){var h=0;if(c=!0,f++,v=Ae[f+1],v=="*".charCodeAt(0))h=e("i32"),f++;else for(;;){var d=Ae[f+1];if(d<"0".charCodeAt(0)||d>"9".charCodeAt(0))break;h=10*h+(d-"0".charCodeAt(0)),f++}v=Ae[f+1]}else var h=6;var E;switch(String.fromCharCode(v)){case"h":var A=Ae[f+2];A=="h".charCodeAt(0)?(f++,E=1):E=2;break;case"l":var A=Ae[f+2];A=="l".charCodeAt(0)?(f++,E=8):E=4;break;case"L":case"q":case"j":E=8;break;case"z":case"t":case"I":E=4;break;default:E=null}if(E&&f++,v=Ae[f+1],["d","i","u","o","x","X","p"].indexOf(String.fromCharCode(v))!=-1){var m=v=="d".charCodeAt(0)||v=="i".charCodeAt(0);E=E||4;var t=e("i"+8*E);if(8==E&&(t=le.makeBigInt(t[0],t[1],v=="u".charCodeAt(0))),E<=4){var S=Math.pow(256,E)-1;t=(m?y:g)(t&S,8*E)}var M,C=Math.abs(t),R="";if(v=="d".charCodeAt(0)||v=="i".charCodeAt(0))M=y(t,8*E,1).toString(10);else if(v=="u".charCodeAt(0))M=g(t,8*E,1).toString(10),t=Math.abs(t);else if(v=="o".charCodeAt(0))M=(b?"0":"")+C.toString(8);else if(v=="x".charCodeAt(0)||v=="X".charCodeAt(0)){if(R=b?"0x":"",t<0){t=-t,M=(C-1).toString(16);for(var T=[],O=0;OP&&P>=-4?(v=(v=="g".charCodeAt(0)?"f":"F").charCodeAt(0),h-=P+1):(v=(v=="g".charCodeAt(0)?"e":"E").charCodeAt(0),h--),I=Math.min(h,20)}v=="e".charCodeAt(0)||v=="E".charCodeAt(0)?(M=t.toExponential(I),/[eE][-+]\\d$/.test(M)&&(M=M.slice(0,-1)+"0"+M.slice(-1))):v!="f".charCodeAt(0)&&v!="F".charCodeAt(0)||(M=t.toFixed(I));var D=M.split("e");if(N&&!b)for(;D[0].length>1&&D[0].indexOf(".")!=-1&&("0"==D[0].slice(-1)||"."==D[0].slice(-1));)D[0]=D[0].slice(0,-1);else for(b&&M.indexOf(".")==-1&&(D[0]+=".");h>I++;)D[0]+="0";M=D[0]+(D.length>1?"e"+D[1]:""),v=="E".charCodeAt(0)&&(M=M.toUpperCase()),o&&t>=0&&(M="+"+M)}else M=(t<0?"-":"")+"inf",k=!1;for(;M.lengthh&&(L=L.slice(0,h))):L=p("(null)",!0),!l)for(;L.length0;)s.push(" ".charCodeAt(0));l||s.push(e("i8"))}else if(v=="n".charCodeAt(0)){var X=e("i32*");Se[X>>2]=s.length}else if(v=="%".charCodeAt(0))s.push(i);else for(var O=n;O="0".charCodeAt(0)&&r<="9".charCodeAt(0)}function Ha(r){for(var a;(a=Ae[r])&&Va(a);)r++;if(!a||!Ba(a))return 0;for(var e=r;(a=Ae[e])&&Ba(a);)e++;return Math.floor(Number(s(r).substr(0,e-r)))}function Ka(r){throw ke=!0,"ABORT: "+r+", at "+(new Error).stack}function Ya(r){return Ya.ret||(Ya.ret=_([0],"i32",we)),Se[Ya.ret>>2]=r,r}function Ga(r,a,e,i){var v=$e.streams[r];if(!v||v.object.isDevice)return Ya(Ge.EBADF),-1;if(v.isWrite){if(v.object.isFolder)return Ya(Ge.EISDIR),-1;if(e<0||i<0)return Ya(Ge.EINVAL),-1;for(var t=v.object.contents;t.length>2]=a),a}function Ja(){return Ya.ret}function re(r){var a=re;a.called||(Ie=o(Ie),a.called=!0);var e=Ie;return 0!=r&&le.staticAlloc(r),e}function ae(){return Se[ae.buf>>2]}function ee(r){r=r||Module.arguments,k();var a=null;return Module._main&&(a=Module.callMain(r),Module.noExitRuntime||u()),a}var ie=[],ve=false,te="object"==typeof window,fe="function"==typeof importScripts,_e=!te&&!ve&&!fe;if(ve){print=function(r){process.stdout.write(r+"\\n")},printErr=function(r){process.stderr.write(r+"\\n")};var se=require("fs");read=function(r){var a=se.readFileSync(r).toString();return a||"/"==r[0]||(r=__dirname.split("/").slice(0,-1).join("/")+"/src/"+r,a=se.readFileSync(r).toString()),a},load=function(a){r(read(a))},ie=process.argv.slice(2)}else if(_e)this.read||(this.read=function(r){snarf(r)}),"undefined"!=typeof scriptArgs?ie=scriptArgs:"undefined"!=typeof arguments&&(ie=arguments);else if(te)this.print=printErr=function(r){console.log(r)},this.read=function(r){var a=new XMLHttpRequest;return a.open("GET",r,!1),a.send(null),a.responseText},this.arguments&&(ie=arguments);else{if(!fe)throw"Unknown runtime environment. Where are we?";this.load=importScripts}"undefined"==typeof load&&"undefined"!=typeof read&&(this.load=function(a){r(read(a))}),"undefined"==typeof printErr&&(this.printErr=function(){}),"undefined"==typeof print&&(this.print=printErr);try{this.Module=Module}catch(r){this.Module=Module={}}Module.arguments||(Module.arguments=ie),Module.print&&(print=Module.print);var ne,oe,le={stackSave:function(){return Oe},stackRestore:function(r){Oe=r},forceAlign:function(r,a){if(a=a||4,1==a)return r;if(isNumber(r)&&isNumber(a))return Math.ceil(r/a)*a;if(isNumber(a)&&isPowerOfTwo(a)){var e=log2(a);return"(((("+r+")+"+(a-1)+")>>"+e+")<<"+e+")"}return"Math.ceil(("+r+")/"+a+")*"+a},isNumberType:function(r){return r in le.INT_TYPES||r in le.FLOAT_TYPES},isPointerType:function(r){return"*"==r[r.length-1]},isStructType:function(r){return!isPointerType(r)&&(!!/^\\[\\d+\\ x\\ (.*)\\]/.test(r)||(!!/?/.test(r)||"%"==r[0]))},INT_TYPES:{i1:0,i8:0,i16:0,i32:0,i64:0},FLOAT_TYPES:{float:0,double:0},bitshift64:function(r,e,i,v){var t=Math.pow(2,v)-1;if(v<32)switch(i){case"shl":return[r<>>32-v];case"ashr":return[(r>>>v|(e&t)<<32-v)>>0>>>0,e>>v>>>0];case"lshr":return[(r>>>v|(e&t)<<32-v)>>>0,e>>>v]}else if(32==v)switch(i){case"shl":return[0,r];case"ashr":return[e,(0|e)<0?t:0];case"lshr":return[e,0]}else switch(i){case"shl":return[0,r<>v-32>>>0,(0|e)<0?t:0];case"lshr":return[e>>>v-32,0]}a("unknown bitshift64 op: "+[value,i,v])},or64:function(r,a){var e=0|r|(0|a),i=4294967296*(Math.round(r/4294967296)|Math.round(a/4294967296));return e+i},and64:function(r,a){var e=(0|r)&(0|a),i=4294967296*(Math.round(r/4294967296)&Math.round(a/4294967296));return e+i},xor64:function(r,a){var e=(0|r)^(0|a),i=4294967296*(Math.round(r/4294967296)^Math.round(a/4294967296));return e+i},getNativeTypeSize:function(r,a){if(1==le.QUANTUM_SIZE)return 1;var i={"%i1":1,"%i8":1,"%i16":2,"%i32":4,"%i64":8,"%float":4,"%double":8}["%"+r];if(!i)if("*"==r[r.length-1])i=le.QUANTUM_SIZE;else if("i"==r[0]){var v=parseInt(r.substr(1));e(v%8==0),i=v/8}return i},getNativeFieldSize:function(r){return Math.max(le.getNativeTypeSize(r),le.QUANTUM_SIZE)},dedup:function(r,a){var e={};return a?r.filter(function(r){return!e[r[a]]&&(e[r[a]]=!0,!0)}):r.filter(function(r){return!e[r]&&(e[r]=!0,!0)})},set:function(){for(var r="object"==typeof arguments[0]?arguments[0]:arguments,a={},e=0;e=0&&a.push(f-e),e=f,f}),r.flatSize=le.alignMemory(r.flatSize,r.alignSize),0==a.length?r.flatFactor=r.flatSize:1==le.dedup(a).length&&(r.flatFactor=a[0]),r.needsFlattening=1!=r.flatFactor,r.flatIndexes},generateStructInfo:function(r,a,i){var v,t;if(a){if(i=i||0,v=("undefined"==typeof Types?le.typeInfo:Types.types)[a],!v)return null;e(v.fields.length===r.length,"Number of named fields must match the type for "+a),t=v.flatIndexes}else{var v={fields:r.map(function(r){return r[0]})};t=le.calculateStructAlignment(v)}var f={__size__:v.flatSize};return a?r.forEach(function(r,a){if("string"==typeof r)f[r]=t[a]+i;else{var e;for(var _ in r)e=_;f[e]=le.generateStructInfo(r[e],v.fields[a],t[a])}}):r.forEach(function(r,a){f[r[1]]=t[a]}),f},stackAlloc:function(r){var a=Oe;return Oe+=r,Oe=Oe+3>>2<<2,a},staticAlloc:function(r){var a=Ie;return Ie+=r,Ie=Ie+3>>2<<2,Ie>=Le&&l(),a},alignMemory:function(r,a){var e=r=Math.ceil(r/(a?a:4))*(a?a:4);return e},makeBigInt:function(r,a,e){var i=e?(r>>>0)+4294967296*(a>>>0):(r>>>0)+4294967296*(0|a);return i},QUANTUM_SIZE:4,__dummy__:0},be={MAX_ALLOWED:0,corrections:0,sigs:{},note:function(r,e,i){e||(this.corrections++,this.corrections>=this.MAX_ALLOWED&&a("\\n\\nToo many corrections!"))},print:function(){}},ke=!1,ue=0,ce=this;Module.ccall=i,Module.setValue=t,Module.getValue=f;var he=0,de=1,we=2;Module.ALLOC_NORMAL=he,Module.ALLOC_STACK=de,Module.ALLOC_STATIC=we,Module.allocate=_,Module.Pointer_stringify=s,Module.Array_stringify=n;var pe,Ee,Ae,ge,ye,me,Se,Me,Ce,Re,Te,Oe,Ne,Ie,Pe=4096,De=Module.TOTAL_STACK||5242880,Le=Module.TOTAL_MEMORY||10485760;Module.FAST_MEMORY||2097152;e(!!(Int32Array&&Float64Array&&new Int32Array(1).subarray&&new Int32Array(1).set),"Cannot fallback to non-typed array case: Code is too specialized");var Fe=new ArrayBuffer(Le);Ae=new Int8Array(Fe),ye=new Int16Array(Fe),Se=new Int32Array(Fe),ge=new Uint8Array(Fe),me=new Uint16Array(Fe),Me=new Uint32Array(Fe),Ce=new Float32Array(Fe),Re=new Float64Array(Fe),Se[0]=255,e(255===ge[0]&&0===ge[3],"Typed arrays 2 must be run on a little-endian system");var Xe=p("(null)");Ie=Xe.length;for(var je=0;je>2)),ze=(Ce.subarray(Ue>>2),Re.subarray(Ue>>3));Ne=Ue+8,Ie=o(Ne);var Ve=[],Be=[];Module.Array_copy=c,Module.TypedArray_copy=h,Module.String_len=d,Module.String_copy=w,Module.intArrayFromString=p,Module.intArrayToString=E,Module.writeStringToMemory=A;var He=[],Ke=0;O.X=1,N.X=1,V.X=1,H.X=1,G.X=1,W.X=1,q.X=1,$.X=1,rr.X=1,ar.X=1,er.X=1,vr.X=1,nr.X=1,or.X=1,kr.X=1,hr.X=1,Ar.X=1,Sr.X=1,Tr.X=1,Ir.X=1,Pr.X=1,Dr.X=1,Lr.X=1,Fr.X=1,Xr.X=1,zr.X=1,Vr.X=1,Br.X=1,Gr.X=1,$r.X=1,Module._malloc=Jr,Jr.X=1,ra.X=1,aa.X=1,ea.X=1,ia.X=1,Module._free=va,va.X=1,_a.X=1,sa.X=1,na.X=1,oa.X=1,la.X=1,da.X=1,Ma.X=1;var Ye,Ge={E2BIG:7,EACCES:13,EADDRINUSE:98,EADDRNOTAVAIL:99,EAFNOSUPPORT:97,EAGAIN:11,EALREADY:114,EBADF:9,EBADMSG:74,EBUSY:16,ECANCELED:125,ECHILD:10,ECONNABORTED:103,ECONNREFUSED:111,ECONNRESET:104,EDEADLK:35,EDESTADDRREQ:89,EDOM:33,EDQUOT:122,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:113,EIDRM:43,EILSEQ:84,EINPROGRESS:115,EINTR:4,EINVAL:22,EIO:5,EISCONN:106,EISDIR:21,ELOOP:40,EMFILE:24,EMLINK:31,EMSGSIZE:90,EMULTIHOP:72,ENAMETOOLONG:36,ENETDOWN:100,ENETRESET:102,ENETUNREACH:101,ENFILE:23,ENOBUFS:105,ENODATA:61,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:37,ENOLINK:67,ENOMEM:12,ENOMSG:42,ENOPROTOOPT:92,ENOSPC:28,ENOSR:63,ENOSTR:60,ENOSYS:38,ENOTCONN:107,ENOTDIR:20,ENOTEMPTY:39,ENOTRECOVERABLE:131,ENOTSOCK:88,ENOTSUP:95,ENOTTY:25,ENXIO:6,EOVERFLOW:75,EOWNERDEAD:130,EPERM:1,EPIPE:32,EPROTO:71,EPROTONOSUPPORT:93,EPROTOTYPE:91,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:116,ETIME:62,ETIMEDOUT:110,ETXTBSY:26,EWOULDBLOCK:11,EXDEV:18},We=0,Ze=0,Qe=0,qe=0,$e={currentPath:"/",nextInode:2,streams:[null],ignorePermissions:!0,absolutePath:function(r,a){if("string"!=typeof r)return null;void 0===a&&(a=$e.currentPath),r&&"/"==r[0]&&(a="");for(var e=a+"/"+r,i=e.split("/").reverse(),v=[""];i.length;){var t=i.pop();""==t||"."==t||(".."==t?v.length>1&&v.pop():v.push(t))}return 1==v.length?"/":v.join("/")},analyzePath:function(r,a,e){var i={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};if(r=$e.absolutePath(r),"/"==r)i.isRoot=!0,i.exists=i.parentExists=!0,i.name="/",i.path=i.parentPath="/",i.object=i.parentObject=$e.root;else if(null!==r){e=e||0,r=r.slice(1).split("/");for(var v=$e.root,t=[""];r.length;){1==r.length&&v.isFolder&&(i.parentExists=!0,i.parentPath=1==t.length?"/":t.join("/"),i.parentObject=v,i.name=r[0]);var f=r.shift();if(!v.isFolder){i.error=Ge.ENOTDIR;break}if(!v.read){i.error=Ge.EACCES;break}if(!v.contents.hasOwnProperty(f)){i.error=Ge.ENOENT;break}if(v=v.contents[f],v.link&&(!a||0!=r.length)){if(e>40){i.error=Ge.ELOOP;break}var _=$e.absolutePath(v.link,t.join("/"));return $e.analyzePath([_].concat(r).join("/"),a,e+1)}t.push(f),0==r.length&&(i.exists=!0,i.path=t.join("/"),i.object=v)}return i}return i},findObject:function(r,a){$e.ensureRoot();var e=$e.analyzePath(r,a);return e.exists?e.object:(Ya(e.error),null)},createObject:function(r,a,e,i,v){if(r||(r="/"),"string"==typeof r&&(r=$e.findObject(r)),!r)throw Ya(Ge.EACCES),new Error("Parent path must exist.");if(!r.isFolder)throw Ya(Ge.ENOTDIR), +new Error("Parent must be a folder.");if(!r.write&&!$e.ignorePermissions)throw Ya(Ge.EACCES),new Error("Parent folder must be writeable.");if(!a||"."==a||".."==a)throw Ya(Ge.ENOENT),new Error("Name must not be empty.");if(r.contents.hasOwnProperty(a))throw Ya(Ge.EEXIST),new Error("Can't overwrite object.");r.contents[a]={read:void 0===i||i,write:void 0!==v&&v,timestamp:Date.now(),inodeNumber:$e.nextInode++};for(var t in e)e.hasOwnProperty(t)&&(r.contents[a][t]=e[t]);return r.contents[a]},createFolder:function(r,a,e,i){var v={isFolder:!0,isDevice:!1,contents:{}};return $e.createObject(r,a,v,e,i)},createPath:function(r,a,e,i){var v=$e.findObject(r);if(null===v)throw new Error("Invalid parent.");for(a=a.split("/").reverse();a.length;){var t=a.pop();t&&(v.contents.hasOwnProperty(t)||$e.createFolder(v,t,e,i),v=v.contents[t])}return v},createFile:function(r,a,e,i,v){return e.isFolder=!1,$e.createObject(r,a,e,i,v)},createDataFile:function(r,a,e,i,v){if("string"==typeof e){for(var t=new Array(e.length),f=0,_=e.length;f<_;++f)t[f]=e.charCodeAt(f);e=t}var s={isDevice:!1,contents:e};return $e.createFile(r,a,s,i,v)},createLazyFile:function(r,a,e,i,v){var t={isDevice:!1,url:e};return $e.createFile(r,a,t,i,v)},createLink:function(r,a,e,i,v){var t={isDevice:!1,link:e};return $e.createFile(r,a,t,i,v)},createDevice:function(r,a,e,i){if(!e&&!i)throw new Error("A device must have at least one callback defined.");var v={isDevice:!0,input:e,output:i};return $e.createFile(r,a,v,Boolean(e),Boolean(i))},forceLoadFile:function(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;var a=!0;if("undefined"!=typeof XMLHttpRequest)e("Cannot do synchronous binary XHRs in modern browsers. Use --embed-file or --preload-file in emcc");else{if("undefined"==typeof read)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=p(read(r.url),!0)}catch(r){a=!1}}return a||Ya(Ge.EIO),a},ensureRoot:function(){$e.root||($e.root={read:!0,write:!0,isFolder:!0,isDevice:!1,timestamp:Date.now(),inodeNumber:1,contents:{}})},init:function(r,a,i){function v(r){null===r||r==="\\n".charCodeAt(0)?(a.printer(a.buffer.join("")),a.buffer=[]):a.buffer.push(String.fromCharCode(r))}e(!$e.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),$e.init.initialized=!0,$e.ensureRoot(),r=r||Module.stdin,a=a||Module.stdout,i=i||Module.stderr;var t=!0,f=!0,s=!0;r||(t=!1,r=function(){if(!r.cache||!r.cache.length){var a;"undefined"!=typeof window&&"function"==typeof window.prompt?a=window.prompt("Input: "):"function"==typeof readline&&(a=readline()),a||(a=""),r.cache=p(a+"\\n",!0)}return r.cache.shift()}),a||(f=!1,a=v),a.printer||(a.printer=print),a.buffer||(a.buffer=[]),i||(s=!1,i=v),i.printer||(i.printer=print),i.buffer||(i.buffer=[]),$e.createFolder("/","tmp",!0,!0);var n=$e.createFolder("/","dev",!0,!0),o=$e.createDevice(n,"stdin",r),l=$e.createDevice(n,"stdout",null,a),b=$e.createDevice(n,"stderr",null,i);$e.createDevice(n,"tty",r,a),$e.streams[1]={path:"/dev/stdin",object:o,position:0,isRead:!0,isWrite:!1,isAppend:!1,isTerminal:!t,error:!1,eof:!1,ungotten:[]},$e.streams[2]={path:"/dev/stdout",object:l,position:0,isRead:!1,isWrite:!0,isAppend:!1,isTerminal:!f,error:!1,eof:!1,ungotten:[]},$e.streams[3]={path:"/dev/stderr",object:b,position:0,isRead:!1,isWrite:!0,isAppend:!1,isTerminal:!s,error:!1,eof:!1,ungotten:[]},We=_([1],"void*",we),Ze=_([2],"void*",we),Qe=_([3],"void*",we),$e.createPath("/","dev/shm/tmp",!0,!0),$e.streams[We]=$e.streams[1],$e.streams[Ze]=$e.streams[2],$e.streams[Qe]=$e.streams[3],qe=_([_([0,0,0,0,We,0,0,0,Ze,0,0,0,Qe,0,0,0],"void*",we)],"void*",we)},quit:function(){$e.init.initialized&&($e.streams[2]&&$e.streams[2].object.output.buffer.length>0&&$e.streams[2].object.output("\\n".charCodeAt(0)),$e.streams[3]&&$e.streams[3].object.output.buffer.length>0&&$e.streams[3].object.output("\\n".charCodeAt(0)))}},Je=Ja;Ve.unshift({func:function(){$e.ignorePermissions=!1,$e.init.initialized||$e.init()}}),Be.push({func:function(){$e.quit()}}),Ya(0),ae.buf=_(12,"void*",we),Module.callMain=function(r){function a(){for(var r=0;r<3;r++)i.push(0)}var e=r.length+1,i=[_(p("/bin/this.program"),"i8",we)];a();for(var v=0;v>2]=0|He.__str,Se[ri+4>>2]=0|He.__str1,Se[ri+16>>2]=0|He.__str2,Se[ri+20>>2]=0|He.__str3,Se[ri+32>>2]=0|He.__str4,Se[ri+36>>2]=0|He.__str5,Se[ri+48>>2]=0|He.__str6,Se[ri+52>>2]=0|He.__str7,Se[ri+64>>2]=0|He.__str8,Se[ri+68>>2]=0|He.__str7,Se[ri+80>>2]=0|He.__str9,Se[ri+84>>2]=0|He.__str10,Se[ri+96>>2]=0|He.__str11,Se[ri+100>>2]=0|He.__str12,Se[ri+112>>2]=0|He.__str13,Se[ri+116>>2]=0|He.__str14,Se[ri+128>>2]=0|He.__str15,Se[ri+132>>2]=0|He.__str16,Se[ri+144>>2]=0|He.__str17,Se[ri+148>>2]=0|He.__str18,Se[ri+160>>2]=0|He.__str19,Se[ri+164>>2]=0|He.__str20,Se[ri+176>>2]=0|He.__str21,Se[ri+180>>2]=0|He.__str22,Se[ri+192>>2]=0|He.__str23,Se[ri+196>>2]=0|He.__str24,Se[ri+208>>2]=0|He.__str25,Se[ri+212>>2]=0|He.__str26,Se[ri+224>>2]=0|He.__str27,Se[ri+228>>2]=0|He.__str28,Se[ri+240>>2]=0|He.__str29,Se[ri+244>>2]=0|He.__str30,Se[ri+256>>2]=0|He.__str31,Se[ri+260>>2]=0|He.__str32,Se[ri+272>>2]=0|He.__str33,Se[ri+276>>2]=0|He.__str34,Se[ri+288>>2]=0|He.__str35,Se[ri+292>>2]=0|He.__str36,Se[ri+304>>2]=0|He.__str37,Se[ri+308>>2]=0|He.__str38,Se[ri+320>>2]=0|He.__str39,Se[ri+324>>2]=0|He.__str40,Se[ri+336>>2]=0|He.__str41,Se[ri+340>>2]=0|He.__str42,Se[ri+352>>2]=0|He.__str43,Se[ri+356>>2]=0|He.__str44,Se[ri+368>>2]=0|He.__str45,Se[ri+372>>2]=0|He.__str46,Se[ri+384>>2]=0|He.__str47,Se[ri+388>>2]=0|He.__str48,Se[ri+400>>2]=0|He.__str49,Se[ri+404>>2]=0|He.__str119289,Se[ri+416>>2]=0|He.__str51,Se[ri+420>>2]=0|He.__str20,Se[ri+432>>2]=0|He.__str52,Se[ri+436>>2]=0|He.__str53,Se[ri+448>>2]=0|He.__str54,Se[ri+452>>2]=0|He.__str55,Se[ri+464>>2]=0|He.__str56,Se[ri+468>>2]=0|He.__str57,Se[ri+480>>2]=0|He.__str58,Se[ri+484>>2]=0|He.__str119289,Se[ri+496>>2]=0|He.__str59,Se[ri+500>>2]=0|He.__str60,Se[ri+512>>2]=0|He.__str61,Se[ri+516>>2]=0|He.__str62,Se[ri+528>>2]=0|He.__str63,Se[ri+532>>2]=0|He.__str64,Se[ri+544>>2]=0|He.__str65,Se[ri+548>>2]=0|He.__str66,Se[ri+560>>2]=0|He.__str67,Se[ri+564>>2]=0|He.__str68,Se[ri+576>>2]=0|He.__str69,Se[ri+580>>2]=0|He.__str70,Se[ri+592>>2]=0|He.__str71,Se[ri+596>>2]=0|He.__str72,Se[ri+608>>2]=0|He.__str73,Se[ri+612>>2]=0|He.__str74,Se[ri+624>>2]=0|He.__str75,Se[ri+628>>2]=0|He.__str76,Se[ri+640>>2]=0|He.__str77,Se[ri+644>>2]=0|He.__str72,Se[ri+656>>2]=0|He.__str78,Se[ri+660>>2]=0|He.__str79,Se[ri+672>>2]=0|He.__str80,Se[ri+676>>2]=0|He.__str81,Se[ri+688>>2]=0|He.__str82,Se[ri+692>>2]=0|He.__str83,Se[ri+704>>2]=0|He.__str84,Se[ri+708>>2]=0|He.__str85,Se[ri+720>>2]=0|He.__str86,Se[ri+724>>2]=0|He.__str87,Se[ri+736>>2]=0|He.__str88,Se[ri+740>>2]=0|He.__str89,Se[ri+752>>2]=0|He.__str90,Se[ri+756>>2]=0|He.__str91,Se[ri+768>>2]=0|He.__str92,Se[ri+772>>2]=0|He.__str91,Se[ai>>2]=0|He.__str145315,Se[ai+8>>2]=0|He.__str145315,Se[ai+20>>2]=0|He.__str167337,Se[ai+28>>2]=0|He.__str95,Se[ai+40>>2]=0|He.__str146316,Se[ai+48>>2]=0|He.__str97,Se[ai+60>>2]=0|He.__str155325,Se[ai+68>>2]=0|He.__str155325,Se[ai+80>>2]=0|He.__str156326,Se[ai+88>>2]=0|He.__str156326,Se[ai+100>>2]=0|He.__str154324,Se[ai+108>>2]=0|He.__str154324,Se[ai+120>>2]=0|He.__str101,Se[ai+128>>2]=0|He.__str101,Se[ai+140>>2]=0|He.__str147317,Se[ai+148>>2]=0|He.__str147317,Se[ai+160>>2]=0|He.__str150320,Se[ai+168>>2]=0|He.__str150320,Se[ai+180>>2]=0|He.__str151321,Se[ai+188>>2]=0|He.__str105,Se[ai+220>>2]=0|He.__str152322,Se[ai+228>>2]=0|He.__str152322,Se[ai+240>>2]=0|He.__str153323,Se[ai+248>>2]=0|He.__str153323,Se[ai+260>>2]=0|He.__str165335,Se[ai+268>>2]=0|He.__str165335,Se[ai+280>>2]=0|He.__str166336,Se[ai+288>>2]=0|He.__str166336,Se[ai+360>>2]=0|He.__str148318,Se[ai+368>>2]=0|He.__str148318,Se[ai+380>>2]=0|He.__str149319,Se[ai+388>>2]=0|He.__str149319,Se[ai+420>>2]=0|He.__str84254,Se[ai+428>>2]=0|He.__str84254,Se[ai+440>>2]=0|He.__str168338,Se[ai+448>>2]=0|He.__str146316,Se[ai+460>>2]=0|He.__str114,Se[ai+468>>2]=0|He.__str152322,Se[ai+480>>2]=0|He.__str115,Se[ai+488>>2]=0|He.__str115,Se[ai+500>>2]=0|He.__str110280,Se[ai+508>>2]=0|He.__str110280,Se[ei+4>>2]=0|He.__str152,Se[ei+12>>2]=0|He.__str152,Se[ei+32>>2]=0|He.__str153,Se[ei+40>>2]=0|He.__str153,Se[ei+48>>2]=0|He.__str154,Se[ei+60>>2]=0|He.__str155,Se[ei+68>>2]=0|He.__str155,Se[ei+76>>2]=0|He.__str156,Se[ei+88>>2]=0|He.__str157,Se[ei+96>>2]=0|He.__str158,Se[ei+104>>2]=0|He.__str156,Se[ei+116>>2]=0|He.__str159,Se[ei+124>>2]=0|He.__str160,Se[ei+132>>2]=0|He.__str161,Se[ei+144>>2]=0|He.__str162,Se[ei+152>>2]=0|He.__str163,Se[ei+160>>2]=0|He.__str164,Se[ei+172>>2]=0|He.__str165,Se[ei+180>>2]=0|He.__str166,Se[ei+188>>2]=0|He.__str167,Se[si+4>>2]=bi,Se[ni+4>>2]=ki,oi=_([2,0,0,0,0],["i8*",0,0,0,0],we),Se[bi>>2]=oi+8|0,Se[bi+4>>2]=0|He.__ZTSSt9bad_alloc,Se[bi+8>>2]=li,Se[ki>>2]=oi+8|0,Se[ki+4>>2]=0|He.__ZTSSt20bad_array_new_length,Se[ki+8>>2]=bi,ui=16,ci=6,hi=18,di=6,wi=6,pe=[0,0,Jr,0,va,0,ya,0,ga,0,wa,0,Sa,0,pa,0,Ea,0,ma,0],Module.FUNCTION_TABLE=pe,Module.run=ee,Module.preRun&&Module.preRun(),0==Ke){ee()}Module.postRun&&Module.postRun(),Module.___cxa_demangle=G;var pi=v("__cxa_demangle","string",["string","string","number","number"]);return function(r){return pi(r,"",1,0)}}(); +`});var Lm,$a,ue,Mr,Wa,ne,de,Re=ie(()=>{"use strict";$();He();Lm=Promise.resolve().then(()=>(wo(),Co)),$a=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}},ue=class t extends $a{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,r){return e.getOrInsert(new t(r))}},Mr=class extends $a{constructor(r,a){super();this.frame=r;this.parent=a;this.children=[];this.frozen=!1}isRoot(){return this.frame===ue.root}isFrozen(){return this.frozen}freeze(){this.frozen=!0}},Wa=class t{constructor(e=0){this.name="";this.frames=new pt;this.appendOrderCalltreeRoot=new Mr(ue.root,null);this.groupedCalltreeRoot=new Mr(ue.root,null);this.samples=[];this.weights=[];this.valueFormatter=new It;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,r)=>e+r.getTotalWeight(),0)),this.totalNonIdleWeight}sortGroupedCallTree(){function e(r){r.children.sort((a,n)=>-(a.getTotalWeight()-n.getTotalWeight())),r.children.forEach(e)}e(this.groupedCalltreeRoot)}forEachCallGrouped(e,r){function a(n,i){n.frame!==ue.root&&e(n,i);let o=0;n.children.forEach(function(l){a(l,i+o),o+=l.getTotalWeight()}),n.frame!==ue.root&&r(n,i+n.getTotalWeight())}a(this.groupedCalltreeRoot,0)}forEachCall(e,r){let a=[],n=0,i=0;for(let o of this.samples){let l=null;for(l=o;l&&l.frame!=ue.root&&a.indexOf(l)===-1;l=l.parent);for(;a.length>0&&Z(a)!=l;){let s=a.pop();r(s,n)}let _=[];for(let s=o;s&&s.frame!=ue.root&&s!=l;s=s.parent)_.push(s);_.reverse();for(let s of _)e(s,n);a=a.concat(_),n+=this.weights[i++]}for(let o=a.length-1;o>=0;o--)r(a[o],n)}forEachFrame(e){this.frames.forEach(e)}getProfileWithRecursionFlattened(){let e=new de,r=[],a=new Set;function n(l,_){a.has(l.frame)?r.push(null):(a.add(l.frame),r.push(l),e.enterFrame(l.frame,_))}function i(l,_){let s=r.pop();s&&(a.delete(s.frame),e.leaveFrame(s.frame,_))}this.forEachCall(n,i);let o=e.build();return o.name=this.name,o.valueFormatter=this.valueFormatter,this.forEachFrame(l=>{o.frames.getOrInsert(l).overwriteWeightWith(l)}),o}getInvertedProfileForCallersOf(e){let r=ue.getOrInsert(this.frames,e),a=new ne,n=[];function i(l){if(l.frame===r)n.push(l);else for(let _ of l.children)i(_)}i(this.appendOrderCalltreeRoot);for(let l of n){let _=[];for(let s=l;s!=null&&s.frame!==ue.root;s=s.parent)_.push(s.frame);a.appendSampleWithWeight(_,l.getTotalWeight())}let o=a.build();return o.name=this.name,o.valueFormatter=this.valueFormatter,o}getProfileForCalleesOf(e){let r=ue.getOrInsert(this.frames,e),a=new ne;function n(l){let _=[];function s(c){_.push(c.frame),a.appendSampleWithWeight(_,c.getSelfWeight());for(let h of c.children)s(h);_.pop()}s(l)}function i(l){if(l.frame===r)n(l);else for(let _ of l.children)i(_)}i(this.appendOrderCalltreeRoot);let o=a.build();return o.name=this.name,o.valueFormatter=this.valueFormatter,o}async demangle(){let e=null;for(let r of this.frames)r.name.startsWith("__Z")&&(e||(e=(await Lm).demangleCpp),r.name=e(r.name))}remapSymbols(e){for(let r of this.frames){let a=e(r);if(a==null)continue;let{name:n,file:i,line:o,col:l}=a;n!=null&&(r.name=n),i!=null&&(r.file=i),o!=null&&(r.line=o),l!=null&&(r.col=l)}}},ne=class extends Wa{constructor(){super(...arguments);this.pendingSample=null}_appendSample(r,a,n){if(isNaN(a))throw new Error("invalid weight");let i=n?this.appendOrderCalltreeRoot:this.groupedCalltreeRoot,o=new Set;for(let l of r){let _=n?Z(i.children):i.children.find(s=>s.frame===l);if(_&&!_.isFrozen()&&_.frame==l)i=_;else{let s=i;i=new Mr(l,i),s.children.push(i)}i.addToTotalWeight(a),o.add(i.frame)}if(i.addToSelfWeight(a),n)for(let l of i.children)l.freeze();if(n){i.frame.addToSelfWeight(a);for(let l of o)l.addToTotalWeight(a);i===Z(this.samples)?this.weights[this.weights.length-1]+=a:(this.samples.push(i),this.weights.push(a))}}appendSampleWithWeight(r,a){if(a===0)return;if(a<0)throw new Error("Samples must have positive weights");let n=r.map(i=>ue.getOrInsert(this.frames,i));this._appendSample(n,a,!0),this._appendSample(n,a,!1)}appendSampleWithTimestamp(r,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 It))),this.totalWeight=Math.max(this.totalWeight,this.weights.reduce((r,a)=>r+a,0)),this.sortGroupedCallTree(),this}},de=class extends Wa{constructor(){super(...arguments);this.appendOrderStack=[this.appendOrderCalltreeRoot];this.groupedOrderStack=[this.groupedCalltreeRoot];this.framesInStack=new Map;this.stack=[];this.lastValue=0}addWeightsToFrames(r){let a=r-this.lastValue;for(let i of this.framesInStack.keys())i.addToTotalWeight(a);let n=Z(this.stack);n&&n.addToSelfWeight(a)}addWeightsToNodes(r,a){let n=r-this.lastValue;for(let o of a)o.addToTotalWeight(n);let i=Z(a);i&&i.addToSelfWeight(n)}_enterFrame(r,a,n){let i=n?this.appendOrderStack:this.groupedOrderStack;this.addWeightsToNodes(a,i);let o=Z(i);if(o){if(n){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 l=n?Z(o.children):o.children.find(s=>s.frame===r),_;l&&!l.isFrozen()&&l.frame==r?_=l:(_=new Mr(r,o),o.children.push(_)),i.push(_)}}enterFrame(r,a){let n=ue.getOrInsert(this.frames,r);this.addWeightsToFrames(a),this._enterFrame(n,a,!0),this._enterFrame(n,a,!1),this.stack.push(n);let i=this.framesInStack.get(n)||0;this.framesInStack.set(n,i+1),this.lastValue=a,this.totalWeight=Math.max(this.totalWeight,this.lastValue)}_leaveFrame(r,a,n){let i=n?this.appendOrderStack:this.groupedOrderStack;if(this.addWeightsToNodes(a,i),n){let o=this.appendOrderStack.pop();if(o==null)throw new Error(`Trying to leave ${r.key} when stack is empty`);if(this.lastValue==null)throw new Error(`Trying to leave a ${r.key} before any have been entered`);if(o.freeze(),o.frame.key!==r.key)throw new Error(`Tried to leave frame "${r.name}" while frame "${o.frame.name}" was at the top at ${a}`);let l=a-this.lastValue;if(l>0)this.samples.push(o),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(r,a){let n=ue.getOrInsert(this.frames,r);this.addWeightsToFrames(a),this._leaveFrame(n,a,!0),this._leaveFrame(n,a,!1),this.stack.pop();let i=this.framesInStack.get(n);i!=null&&(i===1?this.framesInStack.delete(n):this.framesInStack.set(n,i-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 Ft,Wc=ie(()=>{"use strict";(r=>{let t;(i=>(i.EVENTED="evented",i.SAMPLED="sampled"))(t=r.ProfileType||={});let e;(i=>(i.OPEN_FRAME="O",i.CLOSE_FRAME="C"))(e=r.EventType||={})})(Ft||={})});var xo=E((yj,Im)=>{Im.exports={name:"speedscope",version:"1.21.2",description:"",repository:"jlfwong/speedscope",main:"index.js",bin:{speedscope:"./bin/cli.js"},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.js","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:"7.2.0"}}});function Fm(t){let e=[],r=new Map;function a(i){let o=r.get(i);if(o==null){let l={name:i.name};i.file!=null&&(l.file=i.file),i.line!=null&&(l.line=i.line),i.col!=null&&(l.col=i.col),o=e.length,r.set(i,o),e.push(l)}return o}let n={exporter:`speedscope@${xo().version}`,name:t.name,activeProfileIndex:t.indexToView,$schema:"https://www.speedscope.app/file-format-schema.json",shared:{frames:e},profiles:[]};for(let i of t.profiles)n.profiles.push(Mm(i,a));return n}function Mm(t,e){let r={type:Ft.ProfileType.EVENTED,name:t.getName(),unit:t.getWeightUnit(),startValue:0,endValue:t.getTotalWeight(),events:[]},a=(i,o)=>{r.events.push({type:Ft.EventType.OPEN_FRAME,frame:e(i.frame),at:o})},n=(i,o)=>{r.events.push({type:Ft.EventType.CLOSE_FRAME,frame:e(i.frame),at:o})};return t.forEachCall(a,n),r}function Om(t,e){function r(i){let{name:o,unit:l}=t;switch(l){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":i.setValueFormatter(new Y(l));break;case"bytes":i.setValueFormatter(new Pe);break;case"none":i.setValueFormatter(new It);break}i.setName(o)}function a(i){let{startValue:o,endValue:l,events:_}=i,s=new de(l-o);r(s);let c=e.map((h,f)=>({key:f,...h}));for(let h of _)switch(h.type){case Ft.EventType.OPEN_FRAME:{s.enterFrame(c[h.frame],h.at-o);break}case Ft.EventType.CLOSE_FRAME:{s.leaveFrame(c[h.frame],h.at-o);break}}return s.build()}function n(i){let{startValue:o,endValue:l,samples:_,weights:s}=i,c=new ne(l-o);r(c);let h=e.map((f,v)=>({key:v,...f}));if(_.length!==s.length)throw new Error(`Expected samples.length (${_.length}) to equal weights.length (${s.length})`);for(let f=0;f<_.length;f++){let v=_[f],b=s[f];c.appendSampleWithWeight(v.map(p=>h[p]),b)}return c.build()}switch(t.type){case Ft.ProfileType.EVENTED:return a(t);case Ft.ProfileType.SAMPLED:return n(t)}}function ko(t){return{name:t.name||t.profiles[0].name||"profile",indexToView:t.activeProfileIndex||0,profiles:t.profiles.map(e=>Om(e,t.shared.frames))}}function Gc(t){let e=Fm(t),r=new Blob([JSON.stringify(e)],{type:"text/json"}),n=`${(e.name?e.name.split(".")[0]:"profile").replace(/\W+/g,"_")}.speedscope.json`;console.log("Saving",n);let i=document.createElement("a");i.download=n,i.href=window.URL.createObjectURL(r),i.dataset.downloadurl=["text/json",i.download,i.href].join(":"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}var Ao=ie(()=>{"use strict";Re();He();Wc()});var mh=E(Bo=>{var vh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Bo.encode=function(t){if(0<=t&&t{var gh=mh(),Po=5,yh=1<>1;return e?-r:r}Do.encode=function(e){var r="",a,n=h1(e);do a=n&bh,n>>>=Po,n>0&&(a|=Sh),r+=gh.encode(a);while(n>0);return r};Do.decode=function(e,r,a){var n=e.length,i=0,o=0,l,_;do{if(r>=n)throw new Error("Expected more digits in base 64 VLQ value.");if(_=gh.decode(e.charCodeAt(r++)),_===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));l=!!(_&Sh),_&=bh,i=i+(_<{function u1(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Le.getArg=u1;var jh=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,d1=/^data:.+\,.+$/;function bn(t){var e=t.match(jh);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Le.urlParse=bn;function Dr(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}Le.urlGenerate=Dr;function Vo(t){var e=t,r=bn(t);if(r){if(!r.path)return t;e=r.path}for(var a=Le.isAbsolute(e),n=e.split(/\/+/),i,o=0,l=n.length-1;l>=0;l--)i=n[l],i==="."?n.splice(l,1):i===".."?o++:o>0&&(i===""?(n.splice(l+1,o),o=0):(n.splice(l,2),o--));return e=n.join("/"),e===""&&(e=a?"/":"."),r?(r.path=e,Dr(r)):e}Le.normalize=Vo;function Ch(t,e){t===""&&(t="."),e===""&&(e=".");var r=bn(e),a=bn(t);if(a&&(t=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),Dr(r);if(r||e.match(d1))return e;if(a&&!a.host&&!a.path)return a.host=e,Dr(a);var n=e.charAt(0)==="/"?e:Vo(t.replace(/\/+$/,"")+"/"+e);return a?(a.path=n,Dr(a)):n}Le.join=Ch;Le.isAbsolute=function(t){return t.charAt(0)==="/"||jh.test(t)};function p1(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var a=t.lastIndexOf("/");if(a<0||(t=t.slice(0,a),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Le.relative=p1;var wh=function(){var t=Object.create(null);return!("__proto__"in t)}();function xh(t){return t}function v1(t){return kh(t)?"$"+t:t}Le.toSetString=wh?xh:v1;function m1(t){return kh(t)?t.slice(1):t}Le.fromSetString=wh?xh:m1;function kh(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 r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function g1(t,e,r){var a=zr(t.source,e.source);return a!==0||(a=t.originalLine-e.originalLine,a!==0)||(a=t.originalColumn-e.originalColumn,a!==0||r)||(a=t.generatedColumn-e.generatedColumn,a!==0)||(a=t.generatedLine-e.generatedLine,a!==0)?a:zr(t.name,e.name)}Le.compareByOriginalPositions=g1;function y1(t,e,r){var a=t.generatedLine-e.generatedLine;return a!==0||(a=t.generatedColumn-e.generatedColumn,a!==0||r)||(a=zr(t.source,e.source),a!==0)||(a=t.originalLine-e.originalLine,a!==0)||(a=t.originalColumn-e.originalColumn,a!==0)?a:zr(t.name,e.name)}Le.compareByGeneratedPositionsDeflated=y1;function zr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function b1(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=zr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:zr(t.name,e.name)}Le.compareByGeneratedPositionsInflated=b1;function S1(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Le.parseSourceMapInput=S1;function j1(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var a=bn(r);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var n=a.path.lastIndexOf("/");n>=0&&(a.path=a.path.substring(0,n+1))}e=Ch(Dr(a),e)}return Vo(e)}Le.computeSourceURL=j1});var Ko=E(Ah=>{var Jo=Vr(),Uo=Object.prototype.hasOwnProperty,fr=typeof Map<"u";function Bt(){this._array=[],this._set=fr?new Map:Object.create(null)}Bt.fromArray=function(e,r){for(var a=new Bt,n=0,i=e.length;n=0)return r}else{var a=Jo.toSetString(e);if(Uo.call(this._set,a))return this._set[a]}throw new Error('"'+e+'" is not in the set.')};Bt.prototype.at=function(e){if(e>=0&&e{var Nh=Vr();function C1(t,e){var r=t.generatedLine,a=e.generatedLine,n=t.generatedColumn,i=e.generatedColumn;return a>r||a==r&&i>=n||Nh.compareByGeneratedPositionsInflated(t,e)<=0}function ai(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}ai.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};ai.prototype.add=function(e){C1(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};ai.prototype.toArray=function(){return this._sorted||(this._array.sort(Nh.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Eh.MappingList=ai});var $o=E(Hh=>{var Sn=zo(),pe=Vr(),ii=Ko().ArraySet,w1=Th().MappingList;function Qe(t){t||(t={}),this._file=pe.getArg(t,"file",null),this._sourceRoot=pe.getArg(t,"sourceRoot",null),this._skipValidation=pe.getArg(t,"skipValidation",!1),this._sources=new ii,this._names=new ii,this._mappings=new w1,this._sourcesContents=null}Qe.prototype._version=3;Qe.fromSourceMap=function(e){var r=e.sourceRoot,a=new Qe({file:e.file,sourceRoot:r});return e.eachMapping(function(n){var i={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source!=null&&(i.source=n.source,r!=null&&(i.source=pe.relative(r,i.source)),i.original={line:n.originalLine,column:n.originalColumn},n.name!=null&&(i.name=n.name)),a.addMapping(i)}),e.sources.forEach(function(n){var i=n;r!==null&&(i=pe.relative(r,n)),a._sources.has(i)||a._sources.add(i);var o=e.sourceContentFor(n);o!=null&&a.setSourceContent(n,o)}),a};Qe.prototype.addMapping=function(e){var r=pe.getArg(e,"generated"),a=pe.getArg(e,"original",null),n=pe.getArg(e,"source",null),i=pe.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,a,n,i),n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:a!=null&&a.line,originalColumn:a!=null&&a.column,source:n,name:i})};Qe.prototype.setSourceContent=function(e,r){var a=e;this._sourceRoot!=null&&(a=pe.relative(this._sourceRoot,a)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[pe.toSetString(a)]=r):this._sourcesContents&&(delete this._sourcesContents[pe.toSetString(a)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Qe.prototype.applySourceMap=function(e,r,a){var n=r;if(r==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.`);n=e.file}var i=this._sourceRoot;i!=null&&(n=pe.relative(i,n));var o=new ii,l=new ii;this._mappings.unsortedForEach(function(_){if(_.source===n&&_.originalLine!=null){var s=e.originalPositionFor({line:_.originalLine,column:_.originalColumn});s.source!=null&&(_.source=s.source,a!=null&&(_.source=pe.join(a,_.source)),i!=null&&(_.source=pe.relative(i,_.source)),_.originalLine=s.line,_.originalColumn=s.column,s.name!=null&&(_.name=s.name))}var c=_.source;c!=null&&!o.has(c)&&o.add(c);var h=_.name;h!=null&&!l.has(h)&&l.add(h)},this),this._sources=o,this._names=l,e.sources.forEach(function(_){var s=e.sourceContentFor(_);s!=null&&(a!=null&&(_=pe.join(a,_)),i!=null&&(_=pe.relative(i,_)),this.setSourceContent(_,s))},this)};Qe.prototype._validateMapping=function(e,r,a,n){if(r&&typeof r.line!="number"&&typeof r.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&&!r&&!a&&!n)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&a)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:a,original:r,name:n}))}};Qe.prototype._serializeMappings=function(){for(var e=0,r=1,a=0,n=0,i=0,o=0,l="",_,s,c,h,f=this._mappings.toArray(),v=0,b=f.length;v0){if(!pe.compareByGeneratedPositionsInflated(s,f[v-1]))continue;_+=","}_+=Sn.encode(s.generatedColumn-e),e=s.generatedColumn,s.source!=null&&(h=this._sources.indexOf(s.source),_+=Sn.encode(h-o),o=h,_+=Sn.encode(s.originalLine-1-n),n=s.originalLine-1,_+=Sn.encode(s.originalColumn-a),a=s.originalColumn,s.name!=null&&(c=this._names.indexOf(s.name),_+=Sn.encode(c-i),i=c)),l+=_}return l};Qe.prototype._generateSourcesContent=function(e,r){return e.map(function(a){if(!this._sourcesContents)return null;r!=null&&(a=pe.relative(r,a));var n=pe.toSetString(a);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};Qe.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};Qe.prototype.toString=function(){return JSON.stringify(this.toJSON())};Hh.SourceMapGenerator=Qe});var Rh=E(ur=>{ur.GREATEST_LOWER_BOUND=1;ur.LEAST_UPPER_BOUND=2;function Wo(t,e,r,a,n,i){var o=Math.floor((e-t)/2)+t,l=n(r,a[o],!0);return l===0?o:l>0?e-o>1?Wo(o,e,r,a,n,i):i==ur.LEAST_UPPER_BOUND?e1?Wo(t,o,r,a,n,i):i==ur.LEAST_UPPER_BOUND?o:t<0?-1:t}ur.search=function(e,r,a,n){if(r.length===0)return-1;var i=Wo(-1,r.length,e,r,a,n||ur.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&a(r[i],r[i-1],!0)===0;)--i;return i}});var Ih=E(Lh=>{function Go(t,e,r){var a=t[e];t[e]=t[r],t[r]=a}function x1(t,e){return Math.round(t+Math.random()*(e-t))}function qo(t,e,r,a){if(r{var L=Vr(),Xo=Rh(),Jr=Ko().ArraySet,k1=zo(),jn=Ih().quickSort;function re(t,e){var r=t;return typeof t=="string"&&(r=L.parseSourceMapInput(t)),r.sections!=null?new st(r,e):new ke(r,e)}re.fromSourceMap=function(t,e){return ke.fromSourceMap(t,e)};re.prototype._version=3;re.prototype.__generatedMappings=null;Object.defineProperty(re.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});re.prototype.__originalMappings=null;Object.defineProperty(re.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});re.prototype._charIsMappingSeparator=function(e,r){var a=e.charAt(r);return a===";"||a===","};re.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};re.GENERATED_ORDER=1;re.ORIGINAL_ORDER=2;re.GREATEST_LOWER_BOUND=1;re.LEAST_UPPER_BOUND=2;re.prototype.eachMapping=function(e,r,a){var n=r||null,i=a||re.GENERATED_ORDER,o;switch(i){case re.GENERATED_ORDER:o=this._generatedMappings;break;case re.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var l=this.sourceRoot;o.map(function(_){var s=_.source===null?null:this._sources.at(_.source);return s=L.computeSourceURL(l,s,this._sourceMapURL),{source:s,generatedLine:_.generatedLine,generatedColumn:_.generatedColumn,originalLine:_.originalLine,originalColumn:_.originalColumn,name:_.name===null?null:this._names.at(_.name)}},this).forEach(e,n)};re.prototype.allGeneratedPositionsFor=function(e){var r=L.getArg(e,"line"),a={source:L.getArg(e,"source"),originalLine:r,originalColumn:L.getArg(e,"column",0)};if(a.source=this._findSourceIndex(a.source),a.source<0)return[];var n=[],i=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",L.compareByOriginalPositions,Xo.LEAST_UPPER_BOUND);if(i>=0){var o=this._originalMappings[i];if(e.column===void 0)for(var l=o.originalLine;o&&o.originalLine===l;)n.push({line:L.getArg(o,"generatedLine",null),column:L.getArg(o,"generatedColumn",null),lastColumn:L.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i];else for(var _=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==_;)n.push({line:L.getArg(o,"generatedLine",null),column:L.getArg(o,"generatedColumn",null),lastColumn:L.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i]}return n};oi.SourceMapConsumer=re;function ke(t,e){var r=t;typeof t=="string"&&(r=L.parseSourceMapInput(t));var a=L.getArg(r,"version"),n=L.getArg(r,"sources"),i=L.getArg(r,"names",[]),o=L.getArg(r,"sourceRoot",null),l=L.getArg(r,"sourcesContent",null),_=L.getArg(r,"mappings"),s=L.getArg(r,"file",null);if(a!=this._version)throw new Error("Unsupported version: "+a);o&&(o=L.normalize(o)),n=n.map(String).map(L.normalize).map(function(c){return o&&L.isAbsolute(o)&&L.isAbsolute(c)?L.relative(o,c):c}),this._names=Jr.fromArray(i.map(String),!0),this._sources=Jr.fromArray(n,!0),this._absoluteSources=this._sources.toArray().map(function(c){return L.computeSourceURL(o,c,e)}),this.sourceRoot=o,this.sourcesContent=l,this._mappings=_,this._sourceMapURL=e,this.file=s}ke.prototype=Object.create(re.prototype);ke.prototype.consumer=re;ke.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=L.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r1&&(p.source=l+m[1],l+=m[1],p.originalLine=i+m[2],i=p.originalLine,p.originalLine+=1,p.originalColumn=o+m[3],o=p.originalColumn,m.length>4&&(p.name=_+m[4],_+=m[4])),b.push(p),typeof p.originalLine=="number"&&v.push(p)}jn(b,L.compareByGeneratedPositionsDeflated),this.__generatedMappings=b,jn(v,L.compareByOriginalPositions),this.__originalMappings=v};ke.prototype._findMapping=function(e,r,a,n,i,o){if(e[a]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[a]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return Xo.search(e,r,i,o)};ke.prototype.computeColumnSpans=function(){for(var e=0;e=0){var n=this._generatedMappings[a];if(n.generatedLine===r.generatedLine){var i=L.getArg(n,"source",null);i!==null&&(i=this._sources.at(i),i=L.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var o=L.getArg(n,"name",null);return o!==null&&(o=this._names.at(o)),{source:i,line:L.getArg(n,"originalLine",null),column:L.getArg(n,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};ke.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};ke.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var a=this._findSourceIndex(e);if(a>=0)return this.sourcesContent[a];var n=e;this.sourceRoot!=null&&(n=L.relative(this.sourceRoot,n));var i;if(this.sourceRoot!=null&&(i=L.urlParse(this.sourceRoot))){var o=n.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!i.path||i.path=="/")&&this._sources.has("/"+n))return this.sourcesContent[this._sources.indexOf("/"+n)]}if(r)return null;throw new Error('"'+n+'" is not in the SourceMap.')};ke.prototype.generatedPositionFor=function(e){var r=L.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var a={source:r,originalLine:L.getArg(e,"line"),originalColumn:L.getArg(e,"column")},n=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",L.compareByOriginalPositions,L.getArg(e,"bias",re.GREATEST_LOWER_BOUND));if(n>=0){var i=this._originalMappings[n];if(i.source===a.source)return{line:L.getArg(i,"generatedLine",null),column:L.getArg(i,"generatedColumn",null),lastColumn:L.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};oi.BasicSourceMapConsumer=ke;function st(t,e){var r=t;typeof t=="string"&&(r=L.parseSourceMapInput(t));var a=L.getArg(r,"version"),n=L.getArg(r,"sections");if(a!=this._version)throw new Error("Unsupported version: "+a);this._sources=new Jr,this._names=new Jr;var i={line:-1,column:0};this._sections=n.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var l=L.getArg(o,"offset"),_=L.getArg(l,"line"),s=L.getArg(l,"column");if(_{var A1=$o().SourceMapGenerator,li=Vr(),N1=/(\r?\n)/,E1=10,Ur="$$$isSourceNode$$$";function $e(t,e,r,a,n){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=n??null,this[Ur]=!0,a!=null&&this.add(a)}$e.fromStringWithSourceMap=function(e,r,a){var n=new $e,i=e.split(N1),o=0,l=function(){var f=b(),v=b()||"";return f+v;function b(){return o=0;r--)this.prepend(e[r]);else if(e[Ur]||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};$e.prototype.walk=function(e){for(var r,a=0,n=this.children.length;a0){for(r=[],a=0;a{si.SourceMapGenerator=$o().SourceMapGenerator;si.SourceMapConsumer=Mh().SourceMapConsumer;si.SourceNode=Bh().SourceNode});function K1(t){let e=[];function r(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(n=>n.id)}),a.children.forEach(r)}return r(t),e}function $1(t,e){return t.map((r,a)=>{let n=a===0?e*1e6:t[a-1];return r-n})}function Wh(t){return{samples:t.samples,startTime:t.startTime*1e6,endTime:t.endTime*1e6,nodes:K1(t.head),timeDeltas:$1(t.timestamps,t.startTime)}}var Gh=ie(()=>{"use strict"});function tl(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(r=>r.name==="CpuProfile"||r.name==="Profile"||r.name==="ProfileChunk"))}function Xh(t){return"traceEvents"in t?tl(t.traceEvents):!1}function wn(t,e){let r=new Map,a=new Map,n=new Map;Ie(t,i=>i.ts);for(let i of t){if(i.name==="CpuProfile"){let o=`${i.pid}:${i.tid}`,l=i.id||o;r.set(l,i.args.data.cpuProfile),a.set(l,o)}if(i.name==="Profile"){let o=`${i.pid}:${i.tid}`;r.set(i.id||o,{startTime:0,endTime:0,nodes:[],samples:[],timeDeltas:[],...i.args.data}),i.id&&a.set(i.id,`${i.pid}:${i.tid}`)}if(i.name==="thread_name"&&n.set(`${i.pid}:${i.tid}`,i.args.name),i.name==="ProfileChunk"){let o=`${i.pid}:${i.tid}`,l=r.get(i.id||o);if(l){let _=i.args.data;_.cpuProfile&&(_.cpuProfile.nodes&&(l.nodes=l.nodes.concat(_.cpuProfile.nodes)),_.cpuProfile.samples&&(l.samples=l.samples.concat(_.cpuProfile.samples))),_.timeDeltas&&(l.timeDeltas=l.timeDeltas.concat(_.timeDeltas)),_.startTime!=null&&(l.startTime=_.startTime),_.endTime!=null&&(l.endTime=_.endTime)}else console.warn(`Ignoring ProfileChunk for undeclared Profile with id ${i.id||o}`)}}if(r.size>0){let i=[],o=0;return Ns(r.keys(),l=>{let _=null,s=a.get(l);s&&(_=n.get(s)||null);let c=ci(r.get(l));_&&r.size>1?(c.setName(`${e} - ${_}`),_==="CrRendererMain"&&(o=i.length)):c.setName(`${e}`),i.push(c)}),{name:e,indexToView:o,profiles:i}}else throw new Error("Could not find CPU profile in Timeline")}function el(t){return Ce(W1,t,e=>{let r=e.url,a=e.lineNumber;a!=null&&a++;let n=e.columnNumber;n!=null&&n++;let i=e.functionName||(r?`(anonymous ${r.split("/").pop()}:${a})`:"(anonymous)");return{key:`${i}:${r}:${a}:${n}`,name:i,file:r,line:a,col:n}})}function G1(t){let{functionName:e,url:r}=t;return r==="native dummy.js"?!0:e==="(root)"||e==="(idle)"}function qh(t){return t==="(garbage collector)"||t==="(program)"}function ci(t){let e=new de(t.endTime-t.startTime),r=new Map;for(let s of t.nodes)r.set(s.id,s);for(let s of t.nodes)if(typeof s.parent=="number"&&(s.parent=r.get(s.parent)),!!s.children)for(let c of s.children){let h=r.get(c);h&&(h.parent=s)}let a=[],n=[],i=t.timeDeltas[0],o=i,l=NaN;for(let s=0;s0&&Z(_)!=v;){let p=_.pop(),d=el(p.callFrame);e.leaveFrame(d,c)}let b=[];for(let p=f;p&&p!=v&&!G1(p.callFrame);p=qh(p.callFrame.functionName)?Z(_):p.parent||null)b.push(p);b.reverse();for(let p of b)e.enterFrame(el(p.callFrame),c);_=_.concat(b)}for(let s=_.length-1;s>=0;s--)e.leaveFrame(el(_[s].callFrame),Z(n));return e.setValueFormatter(new Y("microseconds")),e.build()}function Yh(t){return ci(Wh(t))}var W1,Zh=ie(()=>{"use strict";Re();$();He();Gh();W1=new Map});function rl(t){let{frames:e,mode:r,raw:a,raw_timestamp_deltas:n,interval:i}=t,o=new ne;o.setValueFormatter(new Y("microseconds"));let l=0,_=[];for(let s=0;s{"use strict";Re();He()});var Pt=E(Fe=>{"use strict";var q1=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function X1(t,e){return Object.prototype.hasOwnProperty.call(t,e)}Fe.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var a in r)X1(r,a)&&(t[a]=r[a])}}return t};Fe.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var Y1={arraySet:function(t,e,r,a,n){if(e.subarray&&t.subarray){t.set(e.subarray(r,r+a),n);return}for(var i=0;i{"use strict";var Q1=Pt(),eg=4,ef=0,tf=1,tg=2;function Wr(t){for(var e=t.length;--e>=0;)t[e]=0}var rg=0,sf=1,ng=2,ag=3,ig=258,_l=29,Tn=256,kn=Tn+1+_l,$r=30,cl=19,_f=2*kn+1,dr=15,nl=16,og=7,hl=256,cf=16,hf=17,ff=18,ll=[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],hi=[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],lg=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],uf=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],sg=512,Dt=new Array((kn+2)*2);Wr(Dt);var xn=new Array($r*2);Wr(xn);var An=new Array(sg);Wr(An);var Nn=new Array(ig-ag+1);Wr(Nn);var fl=new Array(_l);Wr(fl);var fi=new Array($r);Wr(fi);function al(t,e,r,a,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=a,this.max_length=n,this.has_stree=t&&t.length}var df,pf,vf;function il(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function mf(t){return t<256?An[t]:An[256+(t>>>7)]}function En(t,e){t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255}function De(t,e,r){t.bi_valid>nl-r?(t.bi_buf|=e<>nl-t.bi_valid,t.bi_valid+=r-nl):(t.bi_buf|=e<>>=1,r<<=1;while(--e>0);return r>>>1}function _g(t){t.bi_valid===16?(En(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 cg(t,e){var r=e.dyn_tree,a=e.max_code,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,_=e.stat_desc.max_length,s,c,h,f,v,b,p=0;for(f=0;f<=dr;f++)t.bl_count[f]=0;for(r[t.heap[t.heap_max]*2+1]=0,s=t.heap_max+1;s<_f;s++)c=t.heap[s],f=r[r[c*2+1]*2+1]+1,f>_&&(f=_,p++),r[c*2+1]=f,!(c>a)&&(t.bl_count[f]++,v=0,c>=l&&(v=o[c-l]),b=r[c*2],t.opt_len+=b*(f+v),i&&(t.static_len+=b*(n[c*2+1]+v)));if(p!==0){do{for(f=_-1;t.bl_count[f]===0;)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[_]--,p-=2}while(p>0);for(f=_;f!==0;f--)for(c=t.bl_count[f];c!==0;)h=t.heap[--s],!(h>a)&&(r[h*2+1]!==f&&(t.opt_len+=(f-r[h*2+1])*r[h*2],r[h*2+1]=f),c--)}}function yf(t,e,r){var a=new Array(dr+1),n=0,i,o;for(i=1;i<=dr;i++)a[i]=n=n+r[i-1]<<1;for(o=0;o<=e;o++){var l=t[o*2+1];l!==0&&(t[o*2]=gf(a[l]++,l))}}function hg(){var t,e,r,a,n,i=new Array(dr+1);for(r=0,a=0;a<_l-1;a++)for(fl[a]=r,t=0;t<1<>=7;a<$r;a++)for(fi[a]=n<<7,t=0;t<1<8?En(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 fg(t,e,r,a){Sf(t),a&&(En(t,r),En(t,~r)),Q1.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function rf(t,e,r,a){var n=e*2,i=r*2;return t[n]>1;o>=1;o--)ol(t,r,o);s=i;do o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],ol(t,r,1),l=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=l,r[s*2]=r[o*2]+r[l*2],t.depth[s]=(t.depth[o]>=t.depth[l]?t.depth[o]:t.depth[l])+1,r[o*2+1]=r[l*2+1]=s,t.heap[1]=s++,ol(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],cg(t,e),yf(r,_,t.bl_count)}function af(t,e,r){var a,n=-1,i,o=e[0*2+1],l=0,_=7,s=4;for(o===0&&(_=138,s=3),e[(r+1)*2+1]=65535,a=0;a<=r;a++)i=o,o=e[(a+1)*2+1],!(++l<_&&i===o)&&(l=3&&t.bl_tree[uf[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e}function dg(t,e,r,a){var n;for(De(t,e-257,5),De(t,r-1,5),De(t,a-4,4),n=0;n>>=1)if(e&1&&t.dyn_ltree[r*2]!==0)return ef;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return tf;for(r=32;r0?(t.strm.data_type===tg&&(t.strm.data_type=pg(t)),sl(t,t.l_desc),sl(t,t.d_desc),o=ug(t),n=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=n&&(n=i)):n=i=r+5,r+4<=n&&e!==-1?jf(t,e,r,a):t.strategy===eg||i===n?(De(t,(sf<<1)+(a?1:0),3),nf(t,Dt,xn)):(De(t,(ng<<1)+(a?1:0),3),dg(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),nf(t,t.dyn_ltree,t.dyn_dtree)),bf(t),a&&Sf(t)}function yg(t,e,r){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]=r&255,t.last_lit++,e===0?t.dyn_ltree[r*2]++:(t.matches++,e--,t.dyn_ltree[(Nn[r]+Tn+1)*2]++,t.dyn_dtree[mf(e)*2]++),t.last_lit===t.lit_bufsize-1}Gr._tr_init=vg;Gr._tr_stored_block=jf;Gr._tr_flush_block=gg;Gr._tr_tally=yg;Gr._tr_align=mg});var ul=E((Yk,wf)=>{"use strict";function bg(t,e,r,a){for(var n=t&65535|0,i=t>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+e[a++]|0,i=i+n|0;while(--o);n%=65521,i%=65521}return n|i<<16|0}wf.exports=bg});var dl=E((Zk,xf)=>{"use strict";function Sg(){for(var t,e=[],r=0;r<256;r++){t=r;for(var a=0;a<8;a++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e}var jg=Sg();function Cg(t,e,r,a){var n=jg,i=a+r;t^=-1;for(var o=a;o>>8^n[(t^e[o])&255];return t^-1}xf.exports=Cg});var ui=E((Qk,kf)=>{"use strict";kf.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 Ff=E(wt=>{"use strict";var Me=Pt(),et=Cf(),Tf=ul(),Gt=dl(),wg=ui(),gr=0,xg=1,kg=3,Qt=4,Af=5,Ct=0,Nf=1,tt=-2,Ag=-3,pl=-5,Ng=-1,Eg=1,di=2,Tg=3,Hg=4,Rg=0,Lg=2,gi=8,Ig=9,Fg=15,Mg=8,Og=29,Bg=256,ml=Bg+1+Og,Pg=30,Dg=19,zg=2*ml+1,Vg=15,K=3,Yt=258,_t=Yt+K+1,Jg=32,yi=42,gl=69,pi=73,vi=91,mi=103,pr=113,Rn=666,ye=1,Ln=2,vr=3,Yr=4,Ug=3;function Zt(t,e){return t.msg=wg[e],e}function Ef(t){return(t<<1)-(t>4?9:0)}function Xt(t){for(var e=t.length;--e>=0;)t[e]=0}function qt(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),r!==0&&(Me.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,e.pending===0&&(e.pending_out=0))}function Ae(t,e){et._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,qt(t.strm)}function G(t,e){t.pending_buf[t.pending++]=e}function Hn(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255}function Kg(t,e,r,a){var n=t.avail_in;return n>a&&(n=a),n===0?0:(t.avail_in-=n,Me.arraySet(e,t.input,t.next_in,n,r),t.state.wrap===1?t.adler=Tf(t.adler,e,n,r):t.state.wrap===2&&(t.adler=Gt(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)}function Hf(t,e){var r=t.max_chain_length,a=t.strstart,n,i,o=t.prev_length,l=t.nice_match,_=t.strstart>t.w_size-_t?t.strstart-(t.w_size-_t):0,s=t.window,c=t.w_mask,h=t.prev,f=t.strstart+Yt,v=s[a+o-1],b=s[a+o];t.prev_length>=t.good_match&&(r>>=2),l>t.lookahead&&(l=t.lookahead);do if(n=e,!(s[n+o]!==b||s[n+o-1]!==v||s[n]!==s[a]||s[++n]!==s[a+1])){a+=2,n++;do;while(s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&ao){if(t.match_start=e,o=i,i>=l)break;v=s[a+o-1],b=s[a+o]}}while((e=h[e&c])>_&&--r!==0);return o<=t.lookahead?o:t.lookahead}function mr(t){var e=t.w_size,r,a,n,i,o;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-_t)){Me.arraySet(t.window,t.window,e,e,0),t.match_start-=e,t.strstart-=e,t.block_start-=e,a=t.hash_size,r=a;do n=t.head[--r],t.head[r]=n>=e?n-e:0;while(--a);a=e,r=a;do n=t.prev[--r],t.prev[r]=n>=e?n-e:0;while(--a);i+=e}if(t.strm.avail_in===0)break;if(a=Kg(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=K)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(mr(t),t.lookahead===0&&e===gr)return ye;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var a=t.block_start+r;if((t.strstart===0||t.strstart>=a)&&(t.lookahead=t.strstart-a,t.strstart=a,Ae(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-_t&&(Ae(t,!1),t.strm.avail_out===0))return ye}return t.insert=0,e===Qt?(Ae(t,!0),t.strm.avail_out===0?vr:Yr):(t.strstart>t.block_start&&(Ae(t,!1),t.strm.avail_out===0),ye)}function vl(t,e){for(var r,a;;){if(t.lookahead<_t){if(mr(t),t.lookahead<_t&&e===gr)return ye;if(t.lookahead===0)break}if(r=0,t.lookahead>=K&&(t.ins_h=(t.ins_h<=K)if(a=et._tr_tally(t,t.strstart-t.match_start,t.match_length-K),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=K){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=K&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=K-1)),t.prev_length>=K&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-K,a=et._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-K),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=(t.ins_h<=K&&t.strstart>0&&(n=t.strstart-1,a=o[n],a===o[++n]&&a===o[++n]&&a===o[++n])){i=t.strstart+Yt;do;while(a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=K?(r=et._tr_tally(t,1,t.match_length-K),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=et._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Ae(t,!1),t.strm.avail_out===0))return ye}return t.insert=0,e===Qt?(Ae(t,!0),t.strm.avail_out===0?vr:Yr):t.last_lit&&(Ae(t,!1),t.strm.avail_out===0)?ye:Ln}function Gg(t,e){for(var r;;){if(t.lookahead===0&&(mr(t),t.lookahead===0)){if(e===gr)return ye;break}if(t.match_length=0,r=et._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Ae(t,!1),t.strm.avail_out===0))return ye}return t.insert=0,e===Qt?(Ae(t,!0),t.strm.avail_out===0?vr:Yr):t.last_lit&&(Ae(t,!1),t.strm.avail_out===0)?ye:Ln}function jt(t,e,r,a,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=a,this.func=n}var Xr;Xr=[new jt(0,0,0,0,$g),new jt(4,4,8,4,vl),new jt(4,5,16,8,vl),new jt(4,6,32,32,vl),new jt(4,4,16,16,qr),new jt(8,16,32,32,qr),new jt(8,16,128,128,qr),new jt(8,32,128,256,qr),new jt(32,128,258,1024,qr),new jt(32,258,258,4096,qr)];function qg(t){t.window_size=2*t.w_size,Xt(t.head),t.max_lazy_match=Xr[t.level].max_lazy,t.good_match=Xr[t.level].good_length,t.nice_match=Xr[t.level].nice_length,t.max_chain_length=Xr[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=K-1,t.match_available=0,t.ins_h=0}function Xg(){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=gi,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 Me.Buf16(zg*2),this.dyn_dtree=new Me.Buf16((2*Pg+1)*2),this.bl_tree=new Me.Buf16((2*Dg+1)*2),Xt(this.dyn_ltree),Xt(this.dyn_dtree),Xt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Me.Buf16(Vg+1),this.heap=new Me.Buf16(2*ml+1),Xt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Me.Buf16(2*ml+1),Xt(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 Rf(t){var e;return!t||!t.state?Zt(t,tt):(t.total_in=t.total_out=0,t.data_type=Lg,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?yi:pr,t.adler=e.wrap===2?0:1,e.last_flush=gr,et._tr_init(e),Ct)}function Lf(t){var e=Rf(t);return e===Ct&&qg(t.state),e}function Yg(t,e){return!t||!t.state||t.state.wrap!==2?tt:(t.state.gzhead=e,Ct)}function If(t,e,r,a,n,i){if(!t)return tt;var o=1;if(e===Ng&&(e=6),a<0?(o=0,a=-a):a>15&&(o=2,a-=16),n<1||n>Ig||r!==gi||a<8||a>15||e<0||e>9||i<0||i>Hg)return Zt(t,tt);a===8&&(a=9);var l=new Xg;return t.state=l,l.strm=t,l.wrap=o,l.gzhead=null,l.w_bits=a,l.w_size=1<Af||e<0)return t?Zt(t,tt):tt;if(a=t.state,!t.output||!t.input&&t.avail_in!==0||a.status===Rn&&e!==Qt)return Zt(t,t.avail_out===0?pl:tt);if(a.strm=t,r=a.last_flush,a.last_flush=e,a.status===yi)if(a.wrap===2)t.adler=0,G(a,31),G(a,139),G(a,8),a.gzhead?(G(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)),G(a,a.gzhead.time&255),G(a,a.gzhead.time>>8&255),G(a,a.gzhead.time>>16&255),G(a,a.gzhead.time>>24&255),G(a,a.level===9?2:a.strategy>=di||a.level<2?4:0),G(a,a.gzhead.os&255),a.gzhead.extra&&a.gzhead.extra.length&&(G(a,a.gzhead.extra.length&255),G(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=Gt(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=gl):(G(a,0),G(a,0),G(a,0),G(a,0),G(a,0),G(a,a.level===9?2:a.strategy>=di||a.level<2?4:0),G(a,Ug),a.status=pr);else{var o=gi+(a.w_bits-8<<4)<<8,l=-1;a.strategy>=di||a.level<2?l=0:a.level<6?l=1:a.level===6?l=2:l=3,o|=l<<6,a.strstart!==0&&(o|=Jg),o+=31-o%31,a.status=pr,Hn(a,o),a.strstart!==0&&(Hn(a,t.adler>>>16),Hn(a,t.adler&65535)),t.adler=1}if(a.status===gl)if(a.gzhead.extra){for(n=a.pending;a.gzindex<(a.gzhead.extra.length&65535)&&!(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),qt(t),n=a.pending,a.pending===a.pending_buf_size));)G(a,a.gzhead.extra[a.gzindex]&255),a.gzindex++;a.gzhead.hcrc&&a.pending>n&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=pi)}else a.status=pi;if(a.status===pi)if(a.gzhead.name){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),qt(t),n=a.pending,a.pending===a.pending_buf_size)){i=1;break}a.gzindexn&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),i===0&&(a.gzindex=0,a.status=vi)}else a.status=vi;if(a.status===vi)if(a.gzhead.comment){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),qt(t),n=a.pending,a.pending===a.pending_buf_size)){i=1;break}a.gzindexn&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),i===0&&(a.status=mi)}else a.status=mi;if(a.status===mi&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&qt(t),a.pending+2<=a.pending_buf_size&&(G(a,t.adler&255),G(a,t.adler>>8&255),t.adler=0,a.status=pr)):a.status=pr),a.pending!==0){if(qt(t),t.avail_out===0)return a.last_flush=-1,Ct}else if(t.avail_in===0&&Ef(e)<=Ef(r)&&e!==Qt)return Zt(t,pl);if(a.status===Rn&&t.avail_in!==0)return Zt(t,pl);if(t.avail_in!==0||a.lookahead!==0||e!==gr&&a.status!==Rn){var _=a.strategy===di?Gg(a,e):a.strategy===Tg?Wg(a,e):Xr[a.level].func(a,e);if((_===vr||_===Yr)&&(a.status=Rn),_===ye||_===vr)return t.avail_out===0&&(a.last_flush=-1),Ct;if(_===Ln&&(e===xg?et._tr_align(a):e!==Af&&(et._tr_stored_block(a,0,0,!1),e===kg&&(Xt(a.head),a.lookahead===0&&(a.strstart=0,a.block_start=0,a.insert=0))),qt(t),t.avail_out===0))return a.last_flush=-1,Ct}return e!==Qt?Ct:a.wrap<=0?Nf:(a.wrap===2?(G(a,t.adler&255),G(a,t.adler>>8&255),G(a,t.adler>>16&255),G(a,t.adler>>24&255),G(a,t.total_in&255),G(a,t.total_in>>8&255),G(a,t.total_in>>16&255),G(a,t.total_in>>24&255)):(Hn(a,t.adler>>>16),Hn(a,t.adler&65535)),qt(t),a.wrap>0&&(a.wrap=-a.wrap),a.pending!==0?Ct:Nf)}function ey(t){var e;return!t||!t.state?tt:(e=t.state.status,e!==yi&&e!==gl&&e!==pi&&e!==vi&&e!==mi&&e!==pr&&e!==Rn?Zt(t,tt):(t.state=null,e===pr?Zt(t,Ag):Ct))}function ty(t,e){var r=e.length,a,n,i,o,l,_,s,c;if(!t||!t.state||(a=t.state,o=a.wrap,o===2||o===1&&a.status!==yi||a.lookahead))return tt;for(o===1&&(t.adler=Tf(t.adler,e,r,0)),a.wrap=0,r>=a.w_size&&(o===0&&(Xt(a.head),a.strstart=0,a.block_start=0,a.insert=0),c=new Me.Buf8(a.w_size),Me.arraySet(c,e,r-a.w_size,a.w_size,0),e=c,r=a.w_size),l=t.avail_in,_=t.next_in,s=t.input,t.avail_in=r,t.next_in=0,t.input=e,mr(a);a.lookahead>=K;){n=a.strstart,i=a.lookahead-(K-1);do a.ins_h=(a.ins_h<{"use strict";var bi=Pt(),Mf=!0,Of=!0;try{String.fromCharCode.apply(null,[0])}catch{Mf=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Of=!1}var In=new bi.Buf8(256);for(zt=0;zt<256;zt++)In[zt]=zt>=252?6:zt>=248?5:zt>=240?4:zt>=224?3:zt>=192?2:1;var zt;In[254]=In[254]=1;Zr.string2buf=function(t){var e,r,a,n,i,o=t.length,l=0;for(n=0;n>>6,e[i++]=128|r&63):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|r&63):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|r&63);return e};function Bf(t,e){if(e<65537&&(t.subarray&&Of||!t.subarray&&Mf))return String.fromCharCode.apply(null,bi.shrinkBuf(t,e));for(var r="",a=0;a4){l[a++]=65533,r+=i-1;continue}for(n&=i===2?31:i===3?15:7;i>1&&r1){l[a++]=65533;continue}n<65536?l[a++]=n:(n-=65536,l[a++]=55296|n>>10&1023,l[a++]=56320|n&1023)}return Bf(l,a)};Zr.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+In[t[r]]>e?r:e}});var bl=E((r4,Pf)=>{"use strict";function ry(){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}Pf.exports=ry});var Jf=E(On=>{"use strict";var Fn=Ff(),Mn=Pt(),jl=yl(),Cl=ui(),ny=bl(),Vf=Object.prototype.toString,ay=0,Sl=4,Qr=0,Df=1,zf=2,iy=-1,oy=0,ly=8;function yr(t){if(!(this instanceof yr))return new yr(t);this.options=Mn.assign({level:iy,method:ly,chunkSize:16384,windowBits:15,memLevel:8,strategy:oy,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 ny,this.strm.avail_out=0;var r=Fn.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Qr)throw new Error(Cl[r]);if(e.header&&Fn.deflateSetHeader(this.strm,e.header),e.dictionary){var a;if(typeof e.dictionary=="string"?a=jl.string2buf(e.dictionary):Vf.call(e.dictionary)==="[object ArrayBuffer]"?a=new Uint8Array(e.dictionary):a=e.dictionary,r=Fn.deflateSetDictionary(this.strm,a),r!==Qr)throw new Error(Cl[r]);this._dict_set=!0}}yr.prototype.push=function(t,e){var r=this.strm,a=this.options.chunkSize,n,i;if(this.ended)return!1;i=e===~~e?e:e===!0?Sl:ay,typeof t=="string"?r.input=jl.string2buf(t):Vf.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Mn.Buf8(a),r.next_out=0,r.avail_out=a),n=Fn.deflate(r,i),n!==Df&&n!==Qr)return this.onEnd(n),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(i===Sl||i===zf))&&(this.options.to==="string"?this.onData(jl.buf2binstring(Mn.shrinkBuf(r.output,r.next_out))):this.onData(Mn.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&n!==Df);return i===Sl?(n=Fn.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Qr):(i===zf&&(this.onEnd(Qr),r.avail_out=0),!0)};yr.prototype.onData=function(t){this.chunks.push(t)};yr.prototype.onEnd=function(t){t===Qr&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Mn.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function wl(t,e){var r=new yr(e);if(r.push(t,!0),r.err)throw r.msg||Cl[r.err];return r.result}function sy(t,e){return e=e||{},e.raw=!0,wl(t,e)}function _y(t,e){return e=e||{},e.gzip=!0,wl(t,e)}On.Deflate=yr;On.deflate=wl;On.deflateRaw=sy;On.gzip=_y});var Kf=E((a4,Uf)=>{"use strict";var Si=30,cy=12;Uf.exports=function(e,r){var a,n,i,o,l,_,s,c,h,f,v,b,p,d,m,y,S,w,j,k,H,O,T,A,B;a=e.state,n=e.next_in,A=e.input,i=n+(e.avail_in-5),o=e.next_out,B=e.output,l=o-(r-e.avail_out),_=o+(e.avail_out-257),s=a.dmax,c=a.wsize,h=a.whave,f=a.wnext,v=a.window,b=a.hold,p=a.bits,d=a.lencode,m=a.distcode,y=(1<>>24,b>>>=j,p-=j,j=w>>>16&255,j===0)B[o++]=w&65535;else if(j&16){k=w&65535,j&=15,j&&(p>>=j,p-=j),p<15&&(b+=A[n++]<>>24,b>>>=j,p-=j,j=w>>>16&255,j&16){if(H=w&65535,j&=15,ps){e.msg="invalid distance too far back",a.mode=Si;break e}if(b>>>=j,p-=j,j=o-l,H>j){if(j=H-j,j>h&&a.sane){e.msg="invalid distance too far back",a.mode=Si;break e}if(O=0,T=v,f===0){if(O+=c-j,j2;)B[o++]=T[O++],B[o++]=T[O++],B[o++]=T[O++],k-=3;k&&(B[o++]=T[O++],k>1&&(B[o++]=T[O++]))}else{O=o-H;do B[o++]=B[O++],B[o++]=B[O++],B[o++]=B[O++],k-=3;while(k>2);k&&(B[o++]=B[O++],k>1&&(B[o++]=B[O++]))}}else if(j&64){e.msg="invalid distance code",a.mode=Si;break e}else{w=m[(w&65535)+(b&(1<>3,n-=k,p-=k<<3,b&=(1<{"use strict";var $f=Pt(),en=15,Wf=852,Gf=592,qf=0,xl=1,Xf=2,hy=[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],fy=[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],uy=[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],dy=[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];Yf.exports=function(e,r,a,n,i,o,l,_){var s=_.bits,c=0,h=0,f=0,v=0,b=0,p=0,d=0,m=0,y=0,S=0,w,j,k,H,O,T=null,A=0,B,_e=new $f.Buf16(en+1),on=new $f.Buf16(en+1),Ar=null,ln=0,Nr,nr,ar;for(c=0;c<=en;c++)_e[c]=0;for(h=0;h=1&&_e[v]===0;v--);if(b>v&&(b=v),v===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,_.bits=1,0;for(f=1;f0&&(e===qf||v!==1))return-1;for(on[1]=0,c=1;cWf||e===Xf&&y>Gf)return 1;for(;;){Nr=c-d,l[h]B?(nr=Ar[ln+l[h]],ar=T[A+l[h]]):(nr=96,ar=0),w=1<>d)+j]=Nr<<24|nr<<16|ar|0;while(j!==0);for(w=1<>=1;if(w!==0?(S&=w-1,S+=w):S=0,h++,--_e[c]===0){if(c===v)break;c=r[a+l[h]]}if(c>b&&(S&H)!==k){for(d===0&&(d=b),O+=f,p=c-d,m=1<Wf||e===Xf&&y>Gf)return 1;k=S&H,i[k]=b<<24|p<<16|O-o|0}}return S!==0&&(i[O+S]=c-d<<24|64<<16|0),_.bits=b,0}});var Lu=E(ct=>{"use strict";var We=Pt(),Hl=ul(),xt=dl(),py=Kf(),Bn=Zf(),vy=0,wu=1,xu=2,Qf=4,my=5,ji=6,br=0,gy=1,yy=2,rt=-2,ku=-3,Rl=-4,by=-5,eu=8,Au=1,tu=2,ru=3,nu=4,au=5,iu=6,ou=7,lu=8,su=9,_u=10,xi=11,Vt=12,kl=13,cu=14,Al=15,hu=16,fu=17,uu=18,du=19,Ci=20,wi=21,pu=22,vu=23,mu=24,gu=25,yu=26,Nl=27,bu=28,Su=29,ae=30,Ll=31,Sy=32,jy=852,Cy=592,wy=15,xy=wy;function ju(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function ky(){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 We.Buf16(320),this.work=new We.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Nu(t){var e;return!t||!t.state?rt:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=Au,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new We.Buf32(jy),e.distcode=e.distdyn=new We.Buf32(Cy),e.sane=1,e.back=-1,br)}function Eu(t){var e;return!t||!t.state?rt:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,Nu(t))}function Tu(t,e){var r,a;return!t||!t.state||(a=t.state,e<0?(r=0,e=-e):(r=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?rt:(a.window!==null&&a.wbits!==e&&(a.window=null),a.wrap=r,a.wbits=e,Eu(t))}function Hu(t,e){var r,a;return t?(a=new ky,t.state=a,a.window=null,r=Tu(t,e),r!==br&&(t.state=null),r):rt}function Ay(t){return Hu(t,xy)}var Cu=!0,El,Tl;function Ny(t){if(Cu){var e;for(El=new We.Buf32(512),Tl=new We.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(Bn(wu,t.lens,0,288,El,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Bn(xu,t.lens,0,32,Tl,0,t.work,{bits:5}),Cu=!1}t.lencode=El,t.lenbits=9,t.distcode=Tl,t.distbits=5}function Ru(t,e,r,a){var n,i=t.state;return i.window===null&&(i.wsize=1<=i.wsize?(We.arraySet(i.window,e,r-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(n=i.wsize-i.wnext,n>a&&(n=a),We.arraySet(i.window,e,r-a,n,i.wnext),a-=n,a?(We.arraySet(i.window,e,r-a,a,0),i.wnext=a,i.whave=i.wsize):(i.wnext+=n,i.wnext===i.wsize&&(i.wnext=0),i.whave>>8&255,r.check=xt(r.check,T,2,0),s=0,c=0,r.mode=tu;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((s&255)<<8)+(s>>8))%31){t.msg="incorrect header check",r.mode=ae;break}if((s&15)!==eu){t.msg="unknown compression method",r.mode=ae;break}if(s>>>=4,c-=4,H=(s&15)+8,r.wbits===0)r.wbits=H;else if(H>r.wbits){t.msg="invalid window size",r.mode=ae;break}r.dmax=1<>8&1),r.flags&512&&(T[0]=s&255,T[1]=s>>>8&255,r.check=xt(r.check,T,2,0)),s=0,c=0,r.mode=ru;case ru:for(;c<32;){if(l===0)break e;l--,s+=a[i++]<>>8&255,T[2]=s>>>16&255,T[3]=s>>>24&255,r.check=xt(r.check,T,4,0)),s=0,c=0,r.mode=nu;case nu:for(;c<16;){if(l===0)break e;l--,s+=a[i++]<>8),r.flags&512&&(T[0]=s&255,T[1]=s>>>8&255,r.check=xt(r.check,T,2,0)),s=0,c=0,r.mode=au;case au:if(r.flags&1024){for(;c<16;){if(l===0)break e;l--,s+=a[i++]<>>8&255,r.check=xt(r.check,T,2,0)),s=0,c=0}else r.head&&(r.head.extra=null);r.mode=iu;case iu:if(r.flags&1024&&(v=r.length,v>l&&(v=l),v&&(r.head&&(H=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),We.arraySet(r.head.extra,a,i,v,H)),r.flags&512&&(r.check=xt(r.check,a,v,i)),l-=v,i+=v,r.length-=v),r.length))break e;r.length=0,r.mode=ou;case ou:if(r.flags&2048){if(l===0)break e;v=0;do H=a[i+v++],r.head&&H&&r.length<65536&&(r.head.name+=String.fromCharCode(H));while(H&&v>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=Vt;break;case _u:for(;c<32;){if(l===0)break e;l--,s+=a[i++]<>>=c&7,c-=c&7,r.mode=Nl;break}for(;c<3;){if(l===0)break e;l--,s+=a[i++]<>>=1,c-=1,s&3){case 0:r.mode=cu;break;case 1:if(Ny(r),r.mode=Ci,e===ji){s>>>=2,c-=2;break e}break;case 2:r.mode=fu;break;case 3:t.msg="invalid block type",r.mode=ae}s>>>=2,c-=2;break;case cu:for(s>>>=c&7,c-=c&7;c<32;){if(l===0)break e;l--,s+=a[i++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=ae;break}if(r.length=s&65535,s=0,c=0,r.mode=Al,e===ji)break e;case Al:r.mode=hu;case hu:if(v=r.length,v){if(v>l&&(v=l),v>_&&(v=_),v===0)break e;We.arraySet(n,a,i,v,o),l-=v,i+=v,_-=v,o+=v,r.length-=v;break}r.mode=Vt;break;case fu:for(;c<14;){if(l===0)break e;l--,s+=a[i++]<>>=5,c-=5,r.ndist=(s&31)+1,s>>>=5,c-=5,r.ncode=(s&15)+4,s>>>=4,c-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ae;break}r.have=0,r.mode=uu;case uu:for(;r.have>>=3,c-=3}for(;r.have<19;)r.lens[_e[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},O=Bn(vy,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,O){t.msg="invalid code lengths set",r.mode=ae;break}r.have=0,r.mode=du;case du:for(;r.have>>24,y=d>>>16&255,S=d&65535,!(m<=c);){if(l===0)break e;l--,s+=a[i++]<>>=m,c-=m,r.lens[r.have++]=S;else{if(S===16){for(B=m+2;c>>=m,c-=m,r.have===0){t.msg="invalid bit length repeat",r.mode=ae;break}H=r.lens[r.have-1],v=3+(s&3),s>>>=2,c-=2}else if(S===17){for(B=m+3;c>>=m,c-=m,H=0,v=3+(s&7),s>>>=3,c-=3}else{for(B=m+7;c>>=m,c-=m,H=0,v=11+(s&127),s>>>=7,c-=7}if(r.have+v>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ae;break}for(;v--;)r.lens[r.have++]=H}}if(r.mode===ae)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=ae;break}if(r.lenbits=9,A={bits:r.lenbits},O=Bn(wu,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,O){t.msg="invalid literal/lengths set",r.mode=ae;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},O=Bn(xu,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,O){t.msg="invalid distances set",r.mode=ae;break}if(r.mode=Ci,e===ji)break e;case Ci:r.mode=wi;case wi:if(l>=6&&_>=258){t.next_out=o,t.avail_out=_,t.next_in=i,t.avail_in=l,r.hold=s,r.bits=c,py(t,f),o=t.next_out,n=t.output,_=t.avail_out,i=t.next_in,a=t.input,l=t.avail_in,s=r.hold,c=r.bits,r.mode===Vt&&(r.back=-1);break}for(r.back=0;d=r.lencode[s&(1<>>24,y=d>>>16&255,S=d&65535,!(m<=c);){if(l===0)break e;l--,s+=a[i++]<>w)],m=d>>>24,y=d>>>16&255,S=d&65535,!(w+m<=c);){if(l===0)break e;l--,s+=a[i++]<>>=w,c-=w,r.back+=w}if(s>>>=m,c-=m,r.back+=m,r.length=S,y===0){r.mode=yu;break}if(y&32){r.back=-1,r.mode=Vt;break}if(y&64){t.msg="invalid literal/length code",r.mode=ae;break}r.extra=y&15,r.mode=pu;case pu:if(r.extra){for(B=r.extra;c>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=vu;case vu:for(;d=r.distcode[s&(1<>>24,y=d>>>16&255,S=d&65535,!(m<=c);){if(l===0)break e;l--,s+=a[i++]<>w)],m=d>>>24,y=d>>>16&255,S=d&65535,!(w+m<=c);){if(l===0)break e;l--,s+=a[i++]<>>=w,c-=w,r.back+=w}if(s>>>=m,c-=m,r.back+=m,y&64){t.msg="invalid distance code",r.mode=ae;break}r.offset=S,r.extra=y&15,r.mode=mu;case mu:if(r.extra){for(B=r.extra;c>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ae;break}r.mode=gu;case gu:if(_===0)break e;if(v=f-_,r.offset>v){if(v=r.offset-v,v>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ae;break}v>r.wnext?(v-=r.wnext,b=r.wsize-v):b=r.wnext-v,v>r.length&&(v=r.length),p=r.window}else p=n,b=o-r.offset,v=r.length;v>_&&(v=_),_-=v,r.length-=v;do n[o++]=p[b++];while(--v);r.length===0&&(r.mode=wi);break;case yu:if(_===0)break e;n[o++]=r.length,_--,r.mode=wi;break;case Nl:if(r.wrap){for(;c<32;){if(l===0)break e;l--,s|=a[i++]<{"use strict";Iu.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 Mu=E((s4,Fu)=>{"use strict";function Ly(){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}Fu.exports=Ly});var Pu=E(zn=>{"use strict";var Pn=Lu(),Dn=Pt(),ki=yl(),ve=Il(),Bu=ui(),Iy=bl(),Fy=Mu(),Ou=Object.prototype.toString;function Sr(t){if(!(this instanceof Sr))return new Sr(t);this.options=Dn.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 Iy,this.strm.avail_out=0;var r=Pn.inflateInit2(this.strm,e.windowBits);if(r!==ve.Z_OK)throw new Error(Bu[r]);this.header=new Fy,Pn.inflateGetHeader(this.strm,this.header)}Sr.prototype.push=function(t,e){var r=this.strm,a=this.options.chunkSize,n=this.options.dictionary,i,o,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"?r.input=ki.binstring2buf(t):Ou.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Dn.Buf8(a),r.next_out=0,r.avail_out=a),i=Pn.inflate(r,ve.Z_NO_FLUSH),i===ve.Z_NEED_DICT&&n&&(typeof n=="string"?c=ki.string2buf(n):Ou.call(n)==="[object ArrayBuffer]"?c=new Uint8Array(n):c=n,i=Pn.inflateSetDictionary(this.strm,c)),i===ve.Z_BUF_ERROR&&h===!0&&(i=ve.Z_OK,h=!1),i!==ve.Z_STREAM_END&&i!==ve.Z_OK)return this.onEnd(i),this.ended=!0,!1;r.next_out&&(r.avail_out===0||i===ve.Z_STREAM_END||r.avail_in===0&&(o===ve.Z_FINISH||o===ve.Z_SYNC_FLUSH))&&(this.options.to==="string"?(l=ki.utf8border(r.output,r.next_out),_=r.next_out-l,s=ki.buf2string(r.output,l),r.next_out=_,r.avail_out=a-_,_&&Dn.arraySet(r.output,r.output,l,_,0),this.onData(s)):this.onData(Dn.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(h=!0)}while((r.avail_in>0||r.avail_out===0)&&i!==ve.Z_STREAM_END);return i===ve.Z_STREAM_END&&(o=ve.Z_FINISH),o===ve.Z_FINISH?(i=Pn.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ve.Z_OK):(o===ve.Z_SYNC_FLUSH&&(this.onEnd(ve.Z_OK),r.avail_out=0),!0)};Sr.prototype.onData=function(t){this.chunks.push(t)};Sr.prototype.onEnd=function(t){t===ve.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Dn.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Fl(t,e){var r=new Sr(e);if(r.push(t,!0),r.err)throw r.msg||Bu[r.err];return r.result}function My(t,e){return e=e||{},e.raw=!0,Fl(t,e)}zn.Inflate=Sr;zn.inflate=Fl;zn.inflateRaw=My;zn.ungzip=Fl});var Vu=E((c4,zu)=>{"use strict";var Oy=Pt().assign,By=Jf(),Py=Pu(),Dy=Il(),Du={};Oy(Du,By,Py,Dy);zu.exports=Du});var Ju=E(Ai=>{(function(t){var e=String.fromCharCode;function r(a,n,i){for(var o=a[n],l=1,_=0,s=0;s=32&&o<=126?"Unexpected character "+e(o)+" in JSON at position "+n+" (line "+l+", column "+_+")":"Unexpected byte 0x"+o.toString(16)+" in JSON at position "+n+" (line "+l+", column "+_+")"))}t.JSON_parse=function(a){if(!(a instanceof Uint8Array))throw new Error("JSON input must be a Uint8Array");for(var n=[],i=[],o=[],l=a.length,_=null,s=0,c,h=0;h=l&&r(a,l),f=a[h++],f!==34;)if(f===92)switch(a[h++]){case 34:v+='"';break;case 47:v+="/";break;case 92:v+="\\";break;case 98:v+="\b";break;case 102:v+="\f";break;case 110:v+=` +`;break;case 114:v+="\r";break;case 116:v+=" ";break;case 117:{for(var p=0,d=0;d<4;d++)f=a[h++],p<<=4,f>=48&&f<=57?p|=f-48:f>=97&&f<=102?p|=f+-87:f>=65&&f<=70?p|=f+-55:r(a,--h);v+=e(p);break}default:r(a,--h);break}else if(f<=127)v+=e(f);else if((f&224)===192)v+=e((f&31)<<6|a[h++]&63);else if((f&240)===224)v+=e((f&15)<<12|(a[h++]&63)<<6|a[h++]&63);else if((f&248)==240){var m=(f&7)<<18|(a[h++]&63)<<12|(a[h++]&63)<<6|a[h++]&63;m>65535&&(m-=65536,v+=e(m>>10&1023|55296),m=56320|m&1023),v+=e(m)}v[0];break}case 91:{v=[],n.push(_),i.push(c),o.push(s),_=null,c=v,s=1;continue}case 123:{v={},n.push(_),i.push(c),o.push(s),_=null,c=v,s=2;continue}case 93:{s!==1&&r(a,--h),v=c,_=n.pop(),c=i.pop(),s=o.pop();break}case 125:{s!==2&&r(a,--h),v=c,_=n.pop(),c=i.pop(),s=o.pop();break}default:r(a,--h)}for(f=a[h];f<=32;)f=a[++h];switch(s){case 0:{if(h===l)return v;break}case 1:{if(c.push(v),f===44){h++;continue}if(f===93)continue;break}case 2:{if(_===null){if(_=v,f===58){h++;continue}}else{if(c[_]=v,_=null,f===44){h++;continue}if(f===125)continue}break}}break}}r(a,h)}})(Ai)});function $u(t){return t=t.trim(),t[0]==="["&&(t=t.replace(/,\s*$/,""),t[t.length-1]!=="]"&&(t+="]")),JSON.parse(t)}function zy(t){let e=0;for(let r=0;r0&&/\s/.exec(String.fromCharCode(t[r-1]));)r--;if(String.fromCharCode(t[r-1])===","&&r--,String.fromCharCode(t[r-1])!=="]"){let a=new Uint8Array(r+1);a.set(t.subarray(0,r)),a[r]=93,t=a}}return(0,Ku.JSON_parse)(t)}var Uu,Ku,Ni,Ml,Ol,Ei,Jt,Bl=ie(()=>{"use strict";Uu=se(Vu()),Ku=se(Ju()),Ni=1<<27;Ml=class{constructor(e){this.chunks=[];let r=this.byteArray=new Uint8Array(e),a="utf-8";if(r.length>2&&(r[0]===255&&r[1]===254?a="utf-16le":r[0]===254&&r[1]===255&&(a="utf-16be")),typeof TextDecoder<"u"){let n=new TextDecoder(a);for(let i=0;i=Ni&&this.chunks.push("")}}splitLines(){let e=function*(){let r="";for(let a of this.chunks){let n=a.split(` +`);for(let i=0;i{try{return Uu.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 Ml(e)}static fromFile(e){let r=new Promise(a=>{let n=new FileReader;n.addEventListener("loadend",()=>{if(!(n.result instanceof ArrayBuffer))throw new Error("Expected reader.result to be an instance of ArrayBuffer");a(n.result)}),n.readAsArrayBuffer(e)});return new t(Promise.resolve(e.name),r)}static fromArrayBuffer(e,r){return new t(Promise.resolve(e),Promise.resolve(r))}}});function Vy(t){let e=[...t.splitLines()].map(i=>i.split(" ")),r=e.shift();if(!r)return[];let a=new Map;for(let i=0;i0;){let o=a.pop();n=Math.max(n,o.endValue),e.leaveFrame(o,n)}return"Bytes Used"in r[0]?e.setValueFormatter(new Pe):("Weight"in r[0]||"Running Time"in r[0])&&e.setValueFormatter(new Y("milliseconds")),e.build()}async function Gu(t){let e={name:t.name,files:new Map,subdirectories:new Map},r=await new Promise((a,n)=>{t.createReader().readEntries(i=>{a(i)},n)});for(let a of r)if(a.isDirectory){let n=await Gu(a);e.subdirectories.set(n.name,n)}else{let n=await new Promise((i,o)=>{a.file(i,o)});e.files.set(n.name,n)}return e}function Ti(t){return Jt.fromFile(t).readAsArrayBuffer()}function Uy(t){return Jt.fromFile(t).readAsText()}function Ky(t,e){let r=Ue(t.subdirectories,"corespace"),a=Ue(r.subdirectories,`run${e}`);return Ue(a.subdirectories,"core")}async function $y(t){let e=Ue(t.subdirectories,"stores");for(let r of e.subdirectories.values()){let a=r.files.get("schema.xml");if(!a)continue;let n=await Uy(a);if(!/name="time-profile"/.exec(n.firstChunk()))continue;let i=new Vn(await Ti(Ue(r.files,"bulkstore")));i.readUint32(),i.readUint32(),i.readUint32();let o=i.readUint32(),l=i.readUint32();i.seek(o);let _=[];for(;;){let s=i.readUint48();if(s===0)break;let c=i.readUint32();i.skip(l-6-4-4);let h=i.readUint32();_.push({timestamp:s,threadID:c,backtraceID:h})}return _}throw new Error("Could not find sample list")}async function Wy(t,e){let r=Ue(e.subdirectories,"uniquing"),a=Ue(r.subdirectories,"arrayUniquer"),n=Ue(a.files,"integeruniquer.index"),i=Ue(a.files,"integeruniquer.data"),o=new Vn(await Ti(n)),l=new Vn(await Ti(i));o.seek(32);let _=[];for(;o.hasMore();){let s=o.readUint32()+o.readUint32()*1048576;if(s===0)continue;l.seek(s);let c=l.readUint32(),h=[];for(;c--;)h.push(l.readUint64());_.push(h)}return _}async function Gy(t){let e=Ue(t.files,"form.template"),r=Yy(await Ti(e)),a=r["com.apple.xray.owner.template.version"],n=1;"com.apple.xray.owner.template"in r&&(n=r["com.apple.xray.owner.template"].get("_selectedRunNumber"));let i=r.$1;"stubInfoByUUID"in r&&(i=Array.from(r.stubInfoByUUID.keys())[0]);let o=r["com.apple.xray.run.data"],l=[];for(let _ of o.runNumbers){let s=Ue(o.runData,_),c=Ue(s,"symbolsByPid"),h=new Map;for(let f of c.values()){for(let v of f.symbols){if(!v)continue;let{sourcePath:b,symbolName:p,addressToLine:d}=v;for(let m of d.keys())Ce(h,m,()=>{let y=p||`0x${Ut(m.toString(16),16)}`,S={key:`${b}:${y}`,name:y};return b&&(S.file=b),S})}l.push({number:_,addressToFrameMap:h})}}return{version:a,instrument:i,selectedRunNumber:n,runs:l}}async function qu(t){let e=await Gu(t),{version:r,runs:a,instrument:n,selectedRunNumber:i}=await Gy(e);if(n!=="com.apple.xray.instrument-type.coresampler2")throw new Error(`The only supported instrument from .trace import is "com.apple.xray.instrument-type.coresampler2". Got ${n}`);console.log("version: ",r),console.log("Importing time profile");let o=[],l=0;for(let _ of a){let{addressToFrameMap:s,number:c}=_,h=await qy({fileName:t.name,tree:e,addressToFrameMap:s,runNumber:c});_.number===i&&(l=o.length+h.indexToView),o.push(...h.profiles)}return{name:t.name,indexToView:l,profiles:o}}async function qy(t){let{fileName:e,tree:r,addressToFrameMap:a,runNumber:n}=t,i=Ky(r,n),o=await $y(i),l=await Wy(o,i),_=new Map;for(let h of o)_.set(h.threadID,Zn(_,h.threadID,()=>0)+1);let s=Array.from(_.entries());Ie(s,h=>-h[1]);let c=s.map(h=>h[0]);return{name:e,indexToView:0,profiles:c.map(h=>Xy({threadID:h,fileName:e,arrays:l,addressToFrameMap:a,samples:o}))}}function Xy(t){let{fileName:e,addressToFrameMap:r,arrays:a,threadID:n,samples:i}=t,o=new Map;i=i.filter(c=>c.threadID===n);let l=new ne(Z(i).timestamp);l.setName(`${e} - thread ${n}`);function _(c,h){let f=r.get(c);if(f)h.push(f);else if(c in a)for(let v of a[c])_(v,h);else{let v={key:c,name:`0x${Ut(c.toString(16),16)}`};r.set(c,v),h.push(v)}}let s=null;for(let c of i){let h=Ce(o,c.backtraceID,f=>{let v=[];return _(f,v),v.reverse(),v});if(s===null&&(l.appendSampleWithWeight([],c.timestamp),s=c.timestamp),c.timestamp{switch(n){case"NSTextStorage":case"NSParagraphStyle":case"NSFont":return null;case"PFTSymbolData":{let o=Object.create(null);o.symbolName=i.$0,o.sourcePath=i.$1,o.addressToLine=new Map;for(let l=3;;l+=2){let _=i["$"+l],s=i["$"+(l+1)];if(_==null||s==null)break;o.addressToLine.set(_,s)}return o}case"PFTOwnerData":{let o=Object.create(null);return o.ownerName=i.$0,o.ownerPath=i.$1,o}case"PFTPersistentSymbols":{let o=Object.create(null),l=i.$4;o.threadNames=i.$3,o.symbols=[];for(let _=1;_r){if(t.$version!==1e5||t.$archiver!=="NSKeyedArchiver"||!Pl(t.$top)||!Wu(t.$objects))throw new Error("Invalid keyed archive");t.$objects[0]==="$null"&&(t.$objects[0]=null);for(let a=0;a{if(a instanceof Jn)return t.$objects[a.index];if(Wu(a))for(let n=0;na){if(Pl(e)&&e.$class){let a=Qy(t,e.$class).$classname;switch(a){case"NSDecimalNumberPlaceholder":{let l=e["NS.length"],_=e["NS.exponent"],s=e["NS.mantissa.bo"],c=e["NS.negative"],h=new Uint16Array(new Uint8Array(e["NS.mantissa"]).buffer),f=0;for(let v=0;v>8|(b&255)<<8),f+=b*Math.pow(65536,v)}return f*=Math.pow(10,_),c?-f:f}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"]?Zy(e["NS.bytes"]):(console.warn(`Unexpected ${a} format: `,e),null);case"NSArray":case"NSMutableArray":if("NS.objects"in e)return e["NS.objects"];let n=[];for(;;){let l="NS.object."+n.length;if(!(l in e))break;n.push(e[l])}return n;case"_NSKeyedCoderOldStyleArray":{let l=e["NS.count"],_=[];for(let s=0;s{"use strict";Re();$();He();Bl();Vn=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)}};Jn=class{constructor(e){this.index=e}};Dl=class{constructor(e){this.view=e;this.referenceSize=0;this.objects=[];this.offsetTable=[]}parseRoot(){let e=this.view.byteLength-32,r=this.view.getUint8(e+6);this.referenceSize=this.view.getUint8(e+7);let a=this.view.getUint32(e+12,!1),n=this.view.getUint32(e+20,!1),i=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(i,10)})}return e}function Vl(t){let e=n2(t),r=e.reduce((n,i)=>n+i.duration,0),a=new ne(r);if(e.length===0)return null;for(let n of e)a.appendSampleWithWeight(n.stack,n.duration);return a.build()}var Yu=ie(()=>{"use strict";Re()});function Zu(t){let e=t.profile,r=e.threads.length===1?e.threads[0]:e.threads.filter(l=>l.name==="GeckoMain")[0],a=new Map;function n(l){let _=l[0],s=[];for(;_!=null;){let c=r.stackTable.data[_],[h,f]=c;s.push(f),_=h}return s.reverse(),s.map(c=>{let h=r.frameTable.data[c],f=r.stringTable[h[0]],v=/(.*)\s+\((.*?)(?::(\d+))?(?::(\d+))?\)$/.exec(f);return!v||v[2].startsWith("resource:")||v[2]==="self-hosted"||v[2].startsWith("self-hosted:")?null:Ce(a,f,()=>({key:f,name:v[1],file:v[2],line:v[3]?parseInt(v[3]):void 0,col:v[4]?parseInt(v[4])+1:void 0}))}).filter(c=>c!=null)}let i=new de(t.duration),o=[];for(let l of r.samples.data){let _=n(l),s=l[1],c=-1;for(let h=0;hc;h--)i.leaveFrame(o[h],s);for(let h=c+1;h<_.length;h++)i.enterFrame(_[h],s);o=_}return i.setValueFormatter(new Y("milliseconds")),i.build()}var Qu=ie(()=>{"use strict";Re();$();He()});function a2(t,e){if(!t||!t.type)return{key:"(unknown type)",name:"(unknown type)"};let r=t.name;switch(t.type){case"CPP":{let a=r.match(/[tT] ([^(<]*)/);a&&(r=`(c++) ${a[1]}`);break}case"SHARED_LIB":r="(LIB) "+r;break;case"JS":{let a=r.match(/([a-zA-Z0-9\._\-$]*) ([a-zA-Z0-9\.\-_\/$]*):(\d+):(\d+)/);if(a){let n=a[2],i=parseInt(a[3],10),o=parseInt(a[4],10),l=a[1].length>0?a[1]:n?`(anonymous ${n.split("/").pop()}:${i})`:"(anonymous)";return{key:r,name:l,file:n.length>0?n:"(unknown file)",line:i,col:o}}break}case"CODE":{switch(t.kind){case"LoadIC":case"StoreIC":case"KeyedStoreIC":case"KeyedLoadIC":case"LoadGlobalIC":case"Handler":r="(IC) "+r;break;case"BytecodeHandler":r="(bytecode) ~"+r;break;case"Stub":r="(stub) "+r;break;case"Builtin":r="(builtin) "+r;break;case"RegExp":r="(regexp) "+r;break}break}default:{r=`(${t.type}) ${r}`;break}}return{key:r,name:r}}function Jl(t){let e=new ne,r=new Map;function a(i){return Ce(r,i,o=>{let l=t.code[o];return a2(l,t)})}let n=0;Ie(t.ticks,i=>i.tm);for(let i of t.ticks){let o=[];for(let l=i.s.length-2;l>=0;l-=2){let _=i.s[l];if(_!==-1){if(_>t.code.length){o.push({key:_,name:`0x${_.toString(16)}`});continue}o.push(a(_))}}e.appendSampleWithWeight(o,i.tm-n),n=i.tm}return e.setValueFormatter(new Y("microseconds")),e.build()}var ed=ie(()=>{"use strict";Re();$();He()});function*i2(t){let e=[];for(let r of t.splitLines())r===""?(yield td(e),e=[]):e.push(r);e.length>0&&(yield td(e))}function td(t){let e=t.filter(l=>!/^\s*#/.exec(l)),r={command:null,processID:null,threadID:null,time:null,eventType:"",stack:[]},a=e.shift();if(!a)return null;let n=/^(\S.+?)\s+(\d+)(?:\/?(\d+))?\s+/.exec(a);if(!n)return null;r.command=n[1],n[3]?(r.processID=parseInt(n[2],10),r.threadID=parseInt(n[3],10)):r.threadID=parseInt(n[2],10);let i=/\s+(\d+\.\d+):\s+/.exec(a);i&&(r.time=parseFloat(i[1]));let o=/(\S+):\s*$/.exec(a);o&&(r.eventType=o[1]);for(let l of e){let _=/^\s*(\w+)\s*(.+) \((\S*)\)/.exec(l);if(!_)continue;let[,s,c,h]=_;c=c.replace(/\+0x[\da-f]+$/,""),r.stack.push({address:`0x${s}`,symbolName:c,file:h})}return r.stack.reverse(),r}function Ul(t){let e=new Map,r=null;for(let a of i2(t)){if(a==null||r!=null&&r!=a.eventType||a.time==null)continue;r=a.eventType;let n=[];a.command&&n.push(a.command),a.processID&&n.push(`pid: ${a.processID}`),a.threadID&&n.push(`tid: ${a.threadID}`);let i=n.join(" ");Ce(e,i,()=>{let _=new ne;return _.setName(i),_.setValueFormatter(new Y("seconds")),_}).appendSampleWithTimestamp(a.stack.map(({symbolName:_,file:s})=>({key:`${_} (${s})`,name:_==="[unknown]"?`??? (${s})`:_,file:s})),a.time)}return e.size===0?null:{name:e.size===1?Array.from(e.keys())[0]:"",indexToView:0,profiles:Array.from(As(e.values(),a=>a.build()))}}var rd=ie(()=>{"use strict";Re();$();He()});function Kl(t,e,r,a,n){if(t.ticks===0&&t.entries===0&&t.alloc===0&&t.children.length===0)return e;let i=e,o=a.get(t.id);r.enterFrame(o,i);for(let l of t.children)i=Kl(l,i,r,a,n);return i+=n(t),r.leaveFrame(o,i),i}function nd(t){let e=new Map;for(let n of t.cost_centres){let i={key:n.id,name:`${n.module}.${n.label}`};n.src_loc.startsWith("<")||(i.file=n.src_loc),e.set(n.id,i)}let r=new de(t.total_ticks);Kl(t.profile,0,r,e,n=>n.ticks),r.setValueFormatter(new Y("milliseconds")),r.setName(`${t.program} time`);let a=new de(t.total_ticks);return Kl(t.profile,0,a,e,n=>n.alloc),a.setValueFormatter(new Pe),a.setName(`${t.program} allocation`),{name:t.program,indexToView:0,profiles:[r.build(),a.build()]}}var ad=ie(()=>{"use strict";Re();He()});function o2(t){return t.map(({name:e,url:r,line:a,column:n})=>({key:`${e}:${r}:${a}:${n}`,file:r,line:a,col:n,name:e||(r?`(anonymous ${r.split("/").pop()}:${a})`:"(anonymous)")})).reverse()}function $l(t){t.version!==1&&console.warn(`Unknown Safari profile version ${t.version}... Might be incompatible.`);let{recording:e}=t,{sampleStackTraces:r,sampleDurations:a}=e,n=r.length;if(n<1)return console.warn("Empty profile"),null;let i=r[n-1].timestamp-r[0].timestamp+a[0],o=new ne(i),l=Number.MAX_VALUE;return r.forEach((_,s)=>{let c=_.timestamp,h=a[s],v=c-h-l;v>.002&&o.appendSampleWithWeight([],v),o.appendSampleWithWeight(o2(_.stackFrames),h),l=c}),o.setValueFormatter(new Y("seconds")),o.setName(e.displayName),o.build()}var id=ie(()=>{"use strict";Re();He()});var ld=E((Q4,od)=>{"use strict";od.exports=l2;function l2(t,e){for(var r=new Array(arguments.length-1),a=0,n=2,i=!0;n{"use strict";var Hi=cd;Hi.length=function(e){var r=e.length;if(!r)return 0;for(var a=0;--r%4>1&&e.charAt(r)==="=";)++a;return Math.ceil(e.length*3)/4-a};var tn=new Array(64),_d=new Array(123);for(ht=0;ht<64;)_d[tn[ht]=ht<26?ht+65:ht<52?ht+71:ht<62?ht-4:ht-59|43]=ht++;var ht;Hi.encode=function(e,r,a){for(var n=null,i=[],o=0,l=0,_;r>2],_=(s&3)<<4,l=1;break;case 1:i[o++]=tn[_|s>>4],_=(s&15)<<2,l=2;break;case 2:i[o++]=tn[_|s>>6],i[o++]=tn[s&63],l=0;break}o>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,i)),o=0)}return l&&(i[o++]=tn[_],i[o++]=61,l===1&&(i[o++]=61)),n?(o&&n.push(String.fromCharCode.apply(String,i.slice(0,o))),n.join("")):String.fromCharCode.apply(String,i.slice(0,o))};var sd="invalid encoding";Hi.decode=function(e,r,a){for(var n=a,i=0,o,l=0;l1)break;if((_=_d[_])===void 0)throw Error(sd);switch(i){case 0:o=_,i=1;break;case 1:r[a++]=o<<2|(_&48)>>4,o=_,i=2;break;case 2:r[a++]=(o&15)<<4|(_&60)>>2,o=_,i=3;break;case 3:r[a++]=(o&3)<<6|_,i=0;break}}if(i===1)throw Error(sd);return a-n};Hi.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var ud=E((tA,fd)=>{"use strict";fd.exports=Ri;function Ri(){this._listeners={}}Ri.prototype.on=function(e,r,a){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:r,ctx:a||this}),this};Ri.prototype.off=function(e,r){if(e===void 0)this._listeners={};else if(r===void 0)this._listeners[e]=[];else for(var a=this._listeners[e],n=0;n{"use strict";yd.exports=dd(dd);function dd(t){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),a=r[3]===128;function n(_,s,c){e[0]=_,s[c]=r[0],s[c+1]=r[1],s[c+2]=r[2],s[c+3]=r[3]}function i(_,s,c){e[0]=_,s[c]=r[3],s[c+1]=r[2],s[c+2]=r[1],s[c+3]=r[0]}t.writeFloatLE=a?n:i,t.writeFloatBE=a?i:n;function o(_,s){return r[0]=_[s],r[1]=_[s+1],r[2]=_[s+2],r[3]=_[s+3],e[0]}function l(_,s){return r[3]=_[s],r[2]=_[s+1],r[1]=_[s+2],r[0]=_[s+3],e[0]}t.readFloatLE=a?o:l,t.readFloatBE=a?l:o}():function(){function e(a,n,i,o){var l=n<0?1:0;if(l&&(n=-n),n===0)a(1/n>0?0:2147483648,i,o);else if(isNaN(n))a(2143289344,i,o);else if(n>34028234663852886e22)a((l<<31|2139095040)>>>0,i,o);else if(n<11754943508222875e-54)a((l<<31|Math.round(n/1401298464324817e-60))>>>0,i,o);else{var _=Math.floor(Math.log(n)/Math.LN2),s=Math.round(n*Math.pow(2,-_)*8388608)&8388607;a((l<<31|_+127<<23|s)>>>0,i,o)}}t.writeFloatLE=e.bind(null,pd),t.writeFloatBE=e.bind(null,vd);function r(a,n,i){var o=a(n,i),l=(o>>31)*2+1,_=o>>>23&255,s=o&8388607;return _===255?s?NaN:l*(1/0):_===0?l*1401298464324817e-60*s:l*Math.pow(2,_-150)*(s+8388608)}t.readFloatLE=r.bind(null,md),t.readFloatBE=r.bind(null,gd)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),a=r[7]===128;function n(_,s,c){e[0]=_,s[c]=r[0],s[c+1]=r[1],s[c+2]=r[2],s[c+3]=r[3],s[c+4]=r[4],s[c+5]=r[5],s[c+6]=r[6],s[c+7]=r[7]}function i(_,s,c){e[0]=_,s[c]=r[7],s[c+1]=r[6],s[c+2]=r[5],s[c+3]=r[4],s[c+4]=r[3],s[c+5]=r[2],s[c+6]=r[1],s[c+7]=r[0]}t.writeDoubleLE=a?n:i,t.writeDoubleBE=a?i:n;function o(_,s){return r[0]=_[s],r[1]=_[s+1],r[2]=_[s+2],r[3]=_[s+3],r[4]=_[s+4],r[5]=_[s+5],r[6]=_[s+6],r[7]=_[s+7],e[0]}function l(_,s){return r[7]=_[s],r[6]=_[s+1],r[5]=_[s+2],r[4]=_[s+3],r[3]=_[s+4],r[2]=_[s+5],r[1]=_[s+6],r[0]=_[s+7],e[0]}t.readDoubleLE=a?o:l,t.readDoubleBE=a?l:o}():function(){function e(a,n,i,o,l,_){var s=o<0?1:0;if(s&&(o=-o),o===0)a(0,l,_+n),a(1/o>0?0:2147483648,l,_+i);else if(isNaN(o))a(0,l,_+n),a(2146959360,l,_+i);else if(o>17976931348623157e292)a(0,l,_+n),a((s<<31|2146435072)>>>0,l,_+i);else{var c;if(o<22250738585072014e-324)c=o/5e-324,a(c>>>0,l,_+n),a((s<<31|c/4294967296)>>>0,l,_+i);else{var h=Math.floor(Math.log(o)/Math.LN2);h===1024&&(h=1023),c=o*Math.pow(2,-h),a(c*4503599627370496>>>0,l,_+n),a((s<<31|h+1023<<20|c*1048576&1048575)>>>0,l,_+i)}}}t.writeDoubleLE=e.bind(null,pd,0,4),t.writeDoubleBE=e.bind(null,vd,4,0);function r(a,n,i,o,l){var _=a(o,l+n),s=a(o,l+i),c=(s>>31)*2+1,h=s>>>20&2047,f=4294967296*(s&1048575)+_;return h===2047?f?NaN:c*(1/0):h===0?c*5e-324*f:c*Math.pow(2,h-1075)*(f+4503599627370496)}t.readDoubleLE=r.bind(null,md,0,4),t.readDoubleBE=r.bind(null,gd,4,0)}(),t}function pd(t,e,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function vd(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=t&255}function md(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function gd(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}});var Sd=E((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 Cd=E(jd=>{"use strict";var Wl=jd;Wl.length=function(e){for(var r=0,a=0,n=0;n191&&_<224?o[l++]=(_&31)<<6|e[r++]&63:_>239&&_<365?(_=((_&7)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,o[l++]=55296+(_>>10),o[l++]=56320+(_&1023)):o[l++]=(_&15)<<12|(e[r++]&63)<<6|e[r++]&63,l>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),l=0);return i?(l&&i.push(String.fromCharCode.apply(String,o.slice(0,l))),i.join("")):String.fromCharCode.apply(String,o.slice(0,l))};Wl.write=function(e,r,a){for(var n=a,i,o,l=0;l>6|192,r[a++]=i&63|128):(i&64512)===55296&&((o=e.charCodeAt(l+1))&64512)===56320?(i=65536+((i&1023)<<10)+(o&1023),++l,r[a++]=i>>18|240,r[a++]=i>>12&63|128,r[a++]=i>>6&63|128,r[a++]=i&63|128):(r[a++]=i>>12|224,r[a++]=i>>6&63|128,r[a++]=i&63|128);return a-n}});var xd=E((aA,wd)=>{"use strict";wd.exports=s2;function s2(t,e,r){var a=r||8192,n=a>>>1,i=null,o=a;return function(_){if(_<1||_>n)return t(_);o+_>a&&(i=t(a),o=0);var s=e.call(i,o,o+=_);return o&7&&(o=(o|7)+1),s}}});var Ad=E((iA,kd)=>{"use strict";kd.exports=Se;var Un=tr();function Se(t,e){this.lo=t>>>0,this.hi=e>>>0}var jr=Se.zero=new Se(0,0);jr.toNumber=function(){return 0};jr.zzEncode=jr.zzDecode=function(){return this};jr.length=function(){return 1};var _2=Se.zeroHash="\0\0\0\0\0\0\0\0";Se.fromNumber=function(e){if(e===0)return jr;var r=e<0;r&&(e=-e);var a=e>>>0,n=(e-a)/4294967296>>>0;return r&&(n=~n>>>0,a=~a>>>0,++a>4294967295&&(a=0,++n>4294967295&&(n=0))),new Se(a,n)};Se.from=function(e){if(typeof e=="number")return Se.fromNumber(e);if(Un.isString(e))if(Un.Long)e=Un.Long.fromString(e);else return Se.fromNumber(parseInt(e,10));return e.low||e.high?new Se(e.low>>>0,e.high>>>0):jr};Se.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var r=~this.lo+1>>>0,a=~this.hi>>>0;return r||(a=a+1>>>0),-(r+a*4294967296)}return this.lo+this.hi*4294967296};Se.prototype.toLong=function(e){return Un.Long?new Un.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var er=String.prototype.charCodeAt;Se.fromHash=function(e){return e===_2?jr:new Se((er.call(e,0)|er.call(e,1)<<8|er.call(e,2)<<16|er.call(e,3)<<24)>>>0,(er.call(e,4)|er.call(e,5)<<8|er.call(e,6)<<16|er.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,r=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return a===0?r===0?e<16384?e<128?1:2:e<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:a<128?9:10}});var tr=E(Gl=>{"use strict";var M=Gl;M.asPromise=ld();M.base64=hd();M.EventEmitter=ud();M.float=bd();M.inquire=Sd();M.utf8=Cd();M.pool=xd();M.LongBits=Ad();M.global=typeof window<"u"&&window||typeof global<"u"&&global||typeof self<"u"&&self||Gl;M.emptyArray=Object.freeze?Object.freeze([]):[];M.emptyObject=Object.freeze?Object.freeze({}):{};M.isNode=!!(M.global.process&&M.global.process.versions&&M.global.process.versions.node);M.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};M.isString=function(e){return typeof e=="string"||e instanceof String};M.isObject=function(e){return e&&typeof e=="object"};M.isset=M.isSet=function(e,r){var a=e[r];return a!=null&&e.hasOwnProperty(r)?typeof a!="object"||(Array.isArray(a)?a.length:Object.keys(a).length)>0:!1};M.Buffer=function(){try{var t=M.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch{return null}}();M._Buffer_from=null;M._Buffer_allocUnsafe=null;M.newBuffer=function(e){return typeof e=="number"?M.Buffer?M._Buffer_allocUnsafe(e):new M.Array(e):M.Buffer?M._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};M.Array=typeof Uint8Array<"u"?Uint8Array:Array;M.Long=M.global.dcodeIO&&M.global.dcodeIO.Long||M.global.Long||M.inquire("long");M.key2Re=/^true|false|0|1$/;M.key32Re=/^-?(?:0|[1-9][0-9]*)$/;M.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;M.longToHash=function(e){return e?M.LongBits.from(e).toHash():M.LongBits.zeroHash};M.longFromHash=function(e,r){var a=M.LongBits.fromHash(e);return M.Long?M.Long.fromBits(a.lo,a.hi,r):a.toNumber(!!r)};function Nd(t,e,r){for(var a=Object.keys(e),n=0;n-1;--i)if(r[n[i]]===1&&this[n[i]]!==void 0&&this[n[i]]!==null)return n[i]}};M.oneOfSetter=function(e){return function(r){for(var a=0;a{"use strict";Ld.exports=q;var nt=tr(),Rd,Li=nt.LongBits,Td=nt.base64,Hd=nt.utf8;function Kn(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function Xl(){}function c2(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function q(){this.len=0,this.head=new Kn(Xl,0,0),this.tail=this.head,this.states=null}q.create=nt.Buffer?function(){return(q.create=function(){return new Rd})()}:function(){return new q};q.alloc=function(e){return new nt.Array(e)};nt.Array!==Array&&(q.alloc=nt.pool(q.alloc,nt.Array.prototype.subarray));q.prototype._push=function(e,r,a){return this.tail=this.tail.next=new Kn(e,r,a),this.len+=r,this};function Yl(t,e,r){e[r]=t&255}function h2(t,e,r){for(;t>127;)e[r++]=t&127|128,t>>>=7;e[r]=t}function Zl(t,e){this.len=t,this.next=void 0,this.val=e}Zl.prototype=Object.create(Kn.prototype);Zl.prototype.fn=h2;q.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new Zl((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};q.prototype.int32=function(e){return e<0?this._push(Ql,10,Li.fromNumber(e)):this.uint32(e)};q.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function Ql(t,e,r){for(;t.hi;)e[r++]=t.lo&127|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=t.lo&127|128,t.lo=t.lo>>>7;e[r++]=t.lo}q.prototype.uint64=function(e){var r=Li.from(e);return this._push(Ql,r.length(),r)};q.prototype.int64=q.prototype.uint64;q.prototype.sint64=function(e){var r=Li.from(e).zzEncode();return this._push(Ql,r.length(),r)};q.prototype.bool=function(e){return this._push(Yl,1,e?1:0)};function ql(t,e,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}q.prototype.fixed32=function(e){return this._push(ql,4,e>>>0)};q.prototype.sfixed32=q.prototype.fixed32;q.prototype.fixed64=function(e){var r=Li.from(e);return this._push(ql,4,r.lo)._push(ql,4,r.hi)};q.prototype.sfixed64=q.prototype.fixed64;q.prototype.float=function(e){return this._push(nt.float.writeFloatLE,4,e)};q.prototype.double=function(e){return this._push(nt.float.writeDoubleLE,8,e)};var f2=nt.Array.prototype.set?function(e,r,a){r.set(e,a)}:function(e,r,a){for(var n=0;n>>0;if(!r)return this._push(Yl,1,0);if(nt.isString(e)){var a=q.alloc(r=Td.length(e));Td.decode(e,a,0),e=a}return this.uint32(r)._push(f2,r,e)};q.prototype.string=function(e){var r=Hd.length(e);return r?this.uint32(r)._push(Hd.write,r,e):this._push(Yl,1,0)};q.prototype.fork=function(){return this.states=new c2(this),this.head=this.tail=new Kn(Xl,0,0),this.len=0,this};q.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 Kn(Xl,0,0),this.len=0),this};q.prototype.ldelim=function(){var e=this.head,r=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=e.next,this.tail=r,this.len+=a),this};q.prototype.finish=function(){for(var e=this.head.next,r=this.constructor.alloc(this.len),a=0;e;)e.fn(e.val,r,a),a+=e.len,e=e.next;return r};q._configure=function(t){Rd=t}});var Md=E((sA,Fd)=>{"use strict";Fd.exports=Cr;var Id=es();(Cr.prototype=Object.create(Id.prototype)).constructor=Cr;var $n=tr(),Ii=$n.Buffer;function Cr(){Id.call(this)}Cr.alloc=function(e){return(Cr.alloc=$n._Buffer_allocUnsafe)(e)};var u2=Ii&&Ii.prototype instanceof Uint8Array&&Ii.prototype.set.name==="set"?function(e,r,a){r.set(e,a)}:function(e,r,a){if(e.copy)e.copy(r,a,0,e.length);else for(var n=0;n>>0;return this.uint32(r),r&&this._push(u2,r,e),this};function d2(t,e,r){t.length<40?$n.utf8.write(t,e,r):e.utf8Write(t,r)}Cr.prototype.string=function(e){var r=Ii.byteLength(e);return this.uint32(r),r&&this._push(d2,r,e),this}});var rs=E((_A,zd)=>{"use strict";zd.exports=me;var kt=tr(),Pd,Dd=kt.LongBits,p2=kt.utf8;function ft(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function me(t){this.buf=t,this.pos=0,this.len=t.length}var Od=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new me(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new me(e);throw Error("illegal buffer")};me.create=kt.Buffer?function(e){return(me.create=function(a){return kt.Buffer.isBuffer(a)?new Pd(a):Od(a)})(e)}:Od;me.prototype._slice=kt.Array.prototype.subarray||kt.Array.prototype.slice;me.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,ft(this,10);return e}}();me.prototype.int32=function(){return this.uint32()|0};me.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function ts(){var t=new Dd(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 ft(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 ft(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}me.prototype.bool=function(){return this.uint32()!==0};function Fi(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}me.prototype.fixed32=function(){if(this.pos+4>this.len)throw ft(this,4);return Fi(this.buf,this.pos+=4)};me.prototype.sfixed32=function(){if(this.pos+4>this.len)throw ft(this,4);return Fi(this.buf,this.pos+=4)|0};function Bd(){if(this.pos+8>this.len)throw ft(this,8);return new Dd(Fi(this.buf,this.pos+=4),Fi(this.buf,this.pos+=4))}me.prototype.float=function(){if(this.pos+4>this.len)throw ft(this,4);var e=kt.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};me.prototype.double=function(){if(this.pos+8>this.len)throw ft(this,4);var e=kt.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};me.prototype.bytes=function(){var e=this.uint32(),r=this.pos,a=this.pos+e;if(a>this.len)throw ft(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(r,a):r===a?new this.buf.constructor(0):this._slice.call(this.buf,r,a)};me.prototype.string=function(){var e=this.bytes();return p2.read(e,0,e.length)};me.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw ft(this,e);this.pos+=e}else do if(this.pos>=this.len)throw ft(this);while(this.buf[this.pos++]&128);return this};me.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};me._configure=function(t){Pd=t;var e=kt.Long?"toLong":"toNumber";kt.merge(me.prototype,{int64:function(){return ts.call(this)[e](!1)},uint64:function(){return ts.call(this)[e](!0)},sint64:function(){return ts.call(this).zzDecode()[e](!1)},fixed64:function(){return Bd.call(this)[e](!0)},sfixed64:function(){return Bd.call(this)[e](!1)}})}});var Kd=E((cA,Ud)=>{"use strict";Ud.exports=Wn;var Jd=rs();(Wn.prototype=Object.create(Jd.prototype)).constructor=Wn;var Vd=tr();function Wn(t){Jd.call(this,t)}Vd.Buffer&&(Wn.prototype._slice=Vd.Buffer.prototype.slice);Wn.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}});var Wd=E((hA,$d)=>{"use strict";$d.exports=Gn;var ns=tr();(Gn.prototype=Object.create(ns.EventEmitter.prototype)).constructor=Gn;function Gn(t,e,r){if(typeof t!="function")throw TypeError("rpcImpl must be a function");ns.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!r}Gn.prototype.rpcCall=function t(e,r,a,n,i){if(!n)throw TypeError("request must be specified");var o=this;if(!i)return ns.asPromise(t,o,e,r,a,n);if(!o.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return o.rpcImpl(e,r[o.requestDelimited?"encodeDelimited":"encode"](n).finish(),function(_,s){if(_)return o.emit("error",_,e),i(_);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),i(c)}return o.emit("data",s,e),i(null,s)})}catch(l){o.emit("error",l,e),setTimeout(function(){i(l)},0);return}};Gn.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var qd=E(Gd=>{"use strict";var v2=Gd;v2.Service=Wd()});var Yd=E((uA,Xd)=>{"use strict";Xd.exports={}});var e0=E(Qd=>{"use strict";var ze=Qd;ze.build="minimal";ze.Writer=es();ze.BufferWriter=Md();ze.Reader=rs();ze.BufferReader=Kd();ze.util=tr();ze.rpc=qd();ze.roots=Yd();ze.configure=Zd;function Zd(){ze.Reader._configure(ze.BufferReader),ze.util._configure()}ze.Writer._configure(ze.BufferWriter);Zd()});var r0=E((pA,t0)=>{"use strict";t0.exports=e0()});var a0=E((vA,n0)=>{"use strict";var Ge=r0(),X=Ge.Reader,rr=Ge.Writer,u=Ge.util,R=Ge.roots.default||(Ge.roots.default={});R.perftools=function(){var t={};return t.profiles=function(){var e={};return e.Profile=function(){function r(a){if(this.sampleType=[],this.sample=[],this.mapping=[],this.location=[],this.function=[],this.stringTable=[],this.comment=[],a)for(var n=Object.keys(a),i=0;i>>3){case 1:l.sampleType&&l.sampleType.length||(l.sampleType=[]),l.sampleType.push(R.perftools.profiles.ValueType.decode(n,n.uint32()));break;case 2:l.sample&&l.sample.length||(l.sample=[]),l.sample.push(R.perftools.profiles.Sample.decode(n,n.uint32()));break;case 3:l.mapping&&l.mapping.length||(l.mapping=[]),l.mapping.push(R.perftools.profiles.Mapping.decode(n,n.uint32()));break;case 4:l.location&&l.location.length||(l.location=[]),l.location.push(R.perftools.profiles.Location.decode(n,n.uint32()));break;case 5:l.function&&l.function.length||(l.function=[]),l.function.push(R.perftools.profiles.Function.decode(n,n.uint32()));break;case 6:l.stringTable&&l.stringTable.length||(l.stringTable=[]),l.stringTable.push(n.string());break;case 7:l.dropFrames=n.int64();break;case 8:l.keepFrames=n.int64();break;case 9:l.timeNanos=n.int64();break;case 10:l.durationNanos=n.int64();break;case 11:l.periodType=R.perftools.profiles.ValueType.decode(n,n.uint32());break;case 12:l.period=n.int64();break;case 13:if(l.comment&&l.comment.length||(l.comment=[]),(_&7)===2)for(var s=n.uint32()+n.pos;n.pos>>0,n.dropFrames.high>>>0).toNumber())),n.keepFrames!=null&&(u.Long?(i.keepFrames=u.Long.fromValue(n.keepFrames)).unsigned=!1:typeof n.keepFrames=="string"?i.keepFrames=parseInt(n.keepFrames,10):typeof n.keepFrames=="number"?i.keepFrames=n.keepFrames:typeof n.keepFrames=="object"&&(i.keepFrames=new u.LongBits(n.keepFrames.low>>>0,n.keepFrames.high>>>0).toNumber())),n.timeNanos!=null&&(u.Long?(i.timeNanos=u.Long.fromValue(n.timeNanos)).unsigned=!1:typeof n.timeNanos=="string"?i.timeNanos=parseInt(n.timeNanos,10):typeof n.timeNanos=="number"?i.timeNanos=n.timeNanos:typeof n.timeNanos=="object"&&(i.timeNanos=new u.LongBits(n.timeNanos.low>>>0,n.timeNanos.high>>>0).toNumber())),n.durationNanos!=null&&(u.Long?(i.durationNanos=u.Long.fromValue(n.durationNanos)).unsigned=!1:typeof n.durationNanos=="string"?i.durationNanos=parseInt(n.durationNanos,10):typeof n.durationNanos=="number"?i.durationNanos=n.durationNanos:typeof n.durationNanos=="object"&&(i.durationNanos=new u.LongBits(n.durationNanos.low>>>0,n.durationNanos.high>>>0).toNumber())),n.periodType!=null){if(typeof n.periodType!="object")throw TypeError(".perftools.profiles.Profile.periodType: object expected");i.periodType=R.perftools.profiles.ValueType.fromObject(n.periodType)}if(n.period!=null&&(u.Long?(i.period=u.Long.fromValue(n.period)).unsigned=!1:typeof n.period=="string"?i.period=parseInt(n.period,10):typeof n.period=="number"?i.period=n.period:typeof n.period=="object"&&(i.period=new u.LongBits(n.period.low>>>0,n.period.high>>>0).toNumber())),n.comment){if(!Array.isArray(n.comment))throw TypeError(".perftools.profiles.Profile.comment: array expected");i.comment=[];for(var o=0;o>>0,n.comment[o].high>>>0).toNumber())}return n.defaultSampleType!=null&&(u.Long?(i.defaultSampleType=u.Long.fromValue(n.defaultSampleType)).unsigned=!1:typeof n.defaultSampleType=="string"?i.defaultSampleType=parseInt(n.defaultSampleType,10):typeof n.defaultSampleType=="number"?i.defaultSampleType=n.defaultSampleType:typeof n.defaultSampleType=="object"&&(i.defaultSampleType=new u.LongBits(n.defaultSampleType.low>>>0,n.defaultSampleType.high>>>0).toNumber())),i},r.toObject=function(n,i){i||(i={});var o={};if((i.arrays||i.defaults)&&(o.sampleType=[],o.sample=[],o.mapping=[],o.location=[],o.function=[],o.stringTable=[],o.comment=[]),i.defaults){if(u.Long){var l=new u.Long(0,0,!1);o.dropFrames=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.dropFrames=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.keepFrames=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.keepFrames=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.timeNanos=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.timeNanos=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.durationNanos=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.durationNanos=i.longs===String?"0":0;if(o.periodType=null,u.Long){var l=new u.Long(0,0,!1);o.period=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.period=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.defaultSampleType=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.defaultSampleType=i.longs===String?"0":0}if(n.sampleType&&n.sampleType.length){o.sampleType=[];for(var _=0;_>>0,n.dropFrames.high>>>0).toNumber():n.dropFrames),n.keepFrames!=null&&n.hasOwnProperty("keepFrames")&&(typeof n.keepFrames=="number"?o.keepFrames=i.longs===String?String(n.keepFrames):n.keepFrames:o.keepFrames=i.longs===String?u.Long.prototype.toString.call(n.keepFrames):i.longs===Number?new u.LongBits(n.keepFrames.low>>>0,n.keepFrames.high>>>0).toNumber():n.keepFrames),n.timeNanos!=null&&n.hasOwnProperty("timeNanos")&&(typeof n.timeNanos=="number"?o.timeNanos=i.longs===String?String(n.timeNanos):n.timeNanos:o.timeNanos=i.longs===String?u.Long.prototype.toString.call(n.timeNanos):i.longs===Number?new u.LongBits(n.timeNanos.low>>>0,n.timeNanos.high>>>0).toNumber():n.timeNanos),n.durationNanos!=null&&n.hasOwnProperty("durationNanos")&&(typeof n.durationNanos=="number"?o.durationNanos=i.longs===String?String(n.durationNanos):n.durationNanos:o.durationNanos=i.longs===String?u.Long.prototype.toString.call(n.durationNanos):i.longs===Number?new u.LongBits(n.durationNanos.low>>>0,n.durationNanos.high>>>0).toNumber():n.durationNanos),n.periodType!=null&&n.hasOwnProperty("periodType")&&(o.periodType=R.perftools.profiles.ValueType.toObject(n.periodType,i)),n.period!=null&&n.hasOwnProperty("period")&&(typeof n.period=="number"?o.period=i.longs===String?String(n.period):n.period:o.period=i.longs===String?u.Long.prototype.toString.call(n.period):i.longs===Number?new u.LongBits(n.period.low>>>0,n.period.high>>>0).toNumber():n.period),n.comment&&n.comment.length){o.comment=[];for(var _=0;_>>0,n.comment[_].high>>>0).toNumber():n.comment[_]}return n.defaultSampleType!=null&&n.hasOwnProperty("defaultSampleType")&&(typeof n.defaultSampleType=="number"?o.defaultSampleType=i.longs===String?String(n.defaultSampleType):n.defaultSampleType:o.defaultSampleType=i.longs===String?u.Long.prototype.toString.call(n.defaultSampleType):i.longs===Number?new u.LongBits(n.defaultSampleType.low>>>0,n.defaultSampleType.high>>>0).toNumber():n.defaultSampleType),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e.ValueType=function(){function r(a){if(a)for(var n=Object.keys(a),i=0;i>>3){case 1:l.type=n.int64();break;case 2:l.unit=n.int64();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){return typeof n!="object"||n===null?"object expected":n.type!=null&&n.hasOwnProperty("type")&&!u.isInteger(n.type)&&!(n.type&&u.isInteger(n.type.low)&&u.isInteger(n.type.high))?"type: integer|Long expected":n.unit!=null&&n.hasOwnProperty("unit")&&!u.isInteger(n.unit)&&!(n.unit&&u.isInteger(n.unit.low)&&u.isInteger(n.unit.high))?"unit: integer|Long expected":null},r.fromObject=function(n){if(n instanceof R.perftools.profiles.ValueType)return n;var i=new R.perftools.profiles.ValueType;return n.type!=null&&(u.Long?(i.type=u.Long.fromValue(n.type)).unsigned=!1:typeof n.type=="string"?i.type=parseInt(n.type,10):typeof n.type=="number"?i.type=n.type:typeof n.type=="object"&&(i.type=new u.LongBits(n.type.low>>>0,n.type.high>>>0).toNumber())),n.unit!=null&&(u.Long?(i.unit=u.Long.fromValue(n.unit)).unsigned=!1:typeof n.unit=="string"?i.unit=parseInt(n.unit,10):typeof n.unit=="number"?i.unit=n.unit:typeof n.unit=="object"&&(i.unit=new u.LongBits(n.unit.low>>>0,n.unit.high>>>0).toNumber())),i},r.toObject=function(n,i){i||(i={});var o={};if(i.defaults){if(u.Long){var l=new u.Long(0,0,!1);o.type=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.type=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.unit=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.unit=i.longs===String?"0":0}return n.type!=null&&n.hasOwnProperty("type")&&(typeof n.type=="number"?o.type=i.longs===String?String(n.type):n.type:o.type=i.longs===String?u.Long.prototype.toString.call(n.type):i.longs===Number?new u.LongBits(n.type.low>>>0,n.type.high>>>0).toNumber():n.type),n.unit!=null&&n.hasOwnProperty("unit")&&(typeof n.unit=="number"?o.unit=i.longs===String?String(n.unit):n.unit:o.unit=i.longs===String?u.Long.prototype.toString.call(n.unit):i.longs===Number?new u.LongBits(n.unit.low>>>0,n.unit.high>>>0).toNumber():n.unit),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e.Sample=function(){function r(a){if(this.locationId=[],this.value=[],this.label=[],a)for(var n=Object.keys(a),i=0;i>>3){case 1:if(l.locationId&&l.locationId.length||(l.locationId=[]),(_&7)===2)for(var s=n.uint32()+n.pos;n.pos>>0,n.locationId[o].high>>>0).toNumber(!0))}if(n.value){if(!Array.isArray(n.value))throw TypeError(".perftools.profiles.Sample.value: array expected");i.value=[];for(var o=0;o>>0,n.value[o].high>>>0).toNumber())}if(n.label){if(!Array.isArray(n.label))throw TypeError(".perftools.profiles.Sample.label: array expected");i.label=[];for(var o=0;o>>0,n.locationId[l].high>>>0).toNumber(!0):n.locationId[l]}if(n.value&&n.value.length){o.value=[];for(var l=0;l>>0,n.value[l].high>>>0).toNumber():n.value[l]}if(n.label&&n.label.length){o.label=[];for(var l=0;l>>3){case 1:l.key=n.int64();break;case 2:l.str=n.int64();break;case 3:l.num=n.int64();break;case 4:l.numUnit=n.int64();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){return typeof n!="object"||n===null?"object expected":n.key!=null&&n.hasOwnProperty("key")&&!u.isInteger(n.key)&&!(n.key&&u.isInteger(n.key.low)&&u.isInteger(n.key.high))?"key: integer|Long expected":n.str!=null&&n.hasOwnProperty("str")&&!u.isInteger(n.str)&&!(n.str&&u.isInteger(n.str.low)&&u.isInteger(n.str.high))?"str: integer|Long expected":n.num!=null&&n.hasOwnProperty("num")&&!u.isInteger(n.num)&&!(n.num&&u.isInteger(n.num.low)&&u.isInteger(n.num.high))?"num: integer|Long expected":n.numUnit!=null&&n.hasOwnProperty("numUnit")&&!u.isInteger(n.numUnit)&&!(n.numUnit&&u.isInteger(n.numUnit.low)&&u.isInteger(n.numUnit.high))?"numUnit: integer|Long expected":null},r.fromObject=function(n){if(n instanceof R.perftools.profiles.Label)return n;var i=new R.perftools.profiles.Label;return n.key!=null&&(u.Long?(i.key=u.Long.fromValue(n.key)).unsigned=!1:typeof n.key=="string"?i.key=parseInt(n.key,10):typeof n.key=="number"?i.key=n.key:typeof n.key=="object"&&(i.key=new u.LongBits(n.key.low>>>0,n.key.high>>>0).toNumber())),n.str!=null&&(u.Long?(i.str=u.Long.fromValue(n.str)).unsigned=!1:typeof n.str=="string"?i.str=parseInt(n.str,10):typeof n.str=="number"?i.str=n.str:typeof n.str=="object"&&(i.str=new u.LongBits(n.str.low>>>0,n.str.high>>>0).toNumber())),n.num!=null&&(u.Long?(i.num=u.Long.fromValue(n.num)).unsigned=!1:typeof n.num=="string"?i.num=parseInt(n.num,10):typeof n.num=="number"?i.num=n.num:typeof n.num=="object"&&(i.num=new u.LongBits(n.num.low>>>0,n.num.high>>>0).toNumber())),n.numUnit!=null&&(u.Long?(i.numUnit=u.Long.fromValue(n.numUnit)).unsigned=!1:typeof n.numUnit=="string"?i.numUnit=parseInt(n.numUnit,10):typeof n.numUnit=="number"?i.numUnit=n.numUnit:typeof n.numUnit=="object"&&(i.numUnit=new u.LongBits(n.numUnit.low>>>0,n.numUnit.high>>>0).toNumber())),i},r.toObject=function(n,i){i||(i={});var o={};if(i.defaults){if(u.Long){var l=new u.Long(0,0,!1);o.key=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.key=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.str=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.str=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.num=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.num=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.numUnit=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.numUnit=i.longs===String?"0":0}return n.key!=null&&n.hasOwnProperty("key")&&(typeof n.key=="number"?o.key=i.longs===String?String(n.key):n.key:o.key=i.longs===String?u.Long.prototype.toString.call(n.key):i.longs===Number?new u.LongBits(n.key.low>>>0,n.key.high>>>0).toNumber():n.key),n.str!=null&&n.hasOwnProperty("str")&&(typeof n.str=="number"?o.str=i.longs===String?String(n.str):n.str:o.str=i.longs===String?u.Long.prototype.toString.call(n.str):i.longs===Number?new u.LongBits(n.str.low>>>0,n.str.high>>>0).toNumber():n.str),n.num!=null&&n.hasOwnProperty("num")&&(typeof n.num=="number"?o.num=i.longs===String?String(n.num):n.num:o.num=i.longs===String?u.Long.prototype.toString.call(n.num):i.longs===Number?new u.LongBits(n.num.low>>>0,n.num.high>>>0).toNumber():n.num),n.numUnit!=null&&n.hasOwnProperty("numUnit")&&(typeof n.numUnit=="number"?o.numUnit=i.longs===String?String(n.numUnit):n.numUnit:o.numUnit=i.longs===String?u.Long.prototype.toString.call(n.numUnit):i.longs===Number?new u.LongBits(n.numUnit.low>>>0,n.numUnit.high>>>0).toNumber():n.numUnit),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e.Mapping=function(){function r(a){if(a)for(var n=Object.keys(a),i=0;i>>3){case 1:l.id=n.uint64();break;case 2:l.memoryStart=n.uint64();break;case 3:l.memoryLimit=n.uint64();break;case 4:l.fileOffset=n.uint64();break;case 5:l.filename=n.int64();break;case 6:l.buildId=n.int64();break;case 7:l.hasFunctions=n.bool();break;case 8:l.hasFilenames=n.bool();break;case 9:l.hasLineNumbers=n.bool();break;case 10:l.hasInlineFrames=n.bool();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){return typeof n!="object"||n===null?"object expected":n.id!=null&&n.hasOwnProperty("id")&&!u.isInteger(n.id)&&!(n.id&&u.isInteger(n.id.low)&&u.isInteger(n.id.high))?"id: integer|Long expected":n.memoryStart!=null&&n.hasOwnProperty("memoryStart")&&!u.isInteger(n.memoryStart)&&!(n.memoryStart&&u.isInteger(n.memoryStart.low)&&u.isInteger(n.memoryStart.high))?"memoryStart: integer|Long expected":n.memoryLimit!=null&&n.hasOwnProperty("memoryLimit")&&!u.isInteger(n.memoryLimit)&&!(n.memoryLimit&&u.isInteger(n.memoryLimit.low)&&u.isInteger(n.memoryLimit.high))?"memoryLimit: integer|Long expected":n.fileOffset!=null&&n.hasOwnProperty("fileOffset")&&!u.isInteger(n.fileOffset)&&!(n.fileOffset&&u.isInteger(n.fileOffset.low)&&u.isInteger(n.fileOffset.high))?"fileOffset: integer|Long expected":n.filename!=null&&n.hasOwnProperty("filename")&&!u.isInteger(n.filename)&&!(n.filename&&u.isInteger(n.filename.low)&&u.isInteger(n.filename.high))?"filename: integer|Long expected":n.buildId!=null&&n.hasOwnProperty("buildId")&&!u.isInteger(n.buildId)&&!(n.buildId&&u.isInteger(n.buildId.low)&&u.isInteger(n.buildId.high))?"buildId: integer|Long expected":n.hasFunctions!=null&&n.hasOwnProperty("hasFunctions")&&typeof n.hasFunctions!="boolean"?"hasFunctions: boolean expected":n.hasFilenames!=null&&n.hasOwnProperty("hasFilenames")&&typeof n.hasFilenames!="boolean"?"hasFilenames: boolean expected":n.hasLineNumbers!=null&&n.hasOwnProperty("hasLineNumbers")&&typeof n.hasLineNumbers!="boolean"?"hasLineNumbers: boolean expected":n.hasInlineFrames!=null&&n.hasOwnProperty("hasInlineFrames")&&typeof n.hasInlineFrames!="boolean"?"hasInlineFrames: boolean expected":null},r.fromObject=function(n){if(n instanceof R.perftools.profiles.Mapping)return n;var i=new R.perftools.profiles.Mapping;return n.id!=null&&(u.Long?(i.id=u.Long.fromValue(n.id)).unsigned=!0:typeof n.id=="string"?i.id=parseInt(n.id,10):typeof n.id=="number"?i.id=n.id:typeof n.id=="object"&&(i.id=new u.LongBits(n.id.low>>>0,n.id.high>>>0).toNumber(!0))),n.memoryStart!=null&&(u.Long?(i.memoryStart=u.Long.fromValue(n.memoryStart)).unsigned=!0:typeof n.memoryStart=="string"?i.memoryStart=parseInt(n.memoryStart,10):typeof n.memoryStart=="number"?i.memoryStart=n.memoryStart:typeof n.memoryStart=="object"&&(i.memoryStart=new u.LongBits(n.memoryStart.low>>>0,n.memoryStart.high>>>0).toNumber(!0))),n.memoryLimit!=null&&(u.Long?(i.memoryLimit=u.Long.fromValue(n.memoryLimit)).unsigned=!0:typeof n.memoryLimit=="string"?i.memoryLimit=parseInt(n.memoryLimit,10):typeof n.memoryLimit=="number"?i.memoryLimit=n.memoryLimit:typeof n.memoryLimit=="object"&&(i.memoryLimit=new u.LongBits(n.memoryLimit.low>>>0,n.memoryLimit.high>>>0).toNumber(!0))),n.fileOffset!=null&&(u.Long?(i.fileOffset=u.Long.fromValue(n.fileOffset)).unsigned=!0:typeof n.fileOffset=="string"?i.fileOffset=parseInt(n.fileOffset,10):typeof n.fileOffset=="number"?i.fileOffset=n.fileOffset:typeof n.fileOffset=="object"&&(i.fileOffset=new u.LongBits(n.fileOffset.low>>>0,n.fileOffset.high>>>0).toNumber(!0))),n.filename!=null&&(u.Long?(i.filename=u.Long.fromValue(n.filename)).unsigned=!1:typeof n.filename=="string"?i.filename=parseInt(n.filename,10):typeof n.filename=="number"?i.filename=n.filename:typeof n.filename=="object"&&(i.filename=new u.LongBits(n.filename.low>>>0,n.filename.high>>>0).toNumber())),n.buildId!=null&&(u.Long?(i.buildId=u.Long.fromValue(n.buildId)).unsigned=!1:typeof n.buildId=="string"?i.buildId=parseInt(n.buildId,10):typeof n.buildId=="number"?i.buildId=n.buildId:typeof n.buildId=="object"&&(i.buildId=new u.LongBits(n.buildId.low>>>0,n.buildId.high>>>0).toNumber())),n.hasFunctions!=null&&(i.hasFunctions=!!n.hasFunctions),n.hasFilenames!=null&&(i.hasFilenames=!!n.hasFilenames),n.hasLineNumbers!=null&&(i.hasLineNumbers=!!n.hasLineNumbers),n.hasInlineFrames!=null&&(i.hasInlineFrames=!!n.hasInlineFrames),i},r.toObject=function(n,i){i||(i={});var o={};if(i.defaults){if(u.Long){var l=new u.Long(0,0,!0);o.id=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.id=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!0);o.memoryStart=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.memoryStart=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!0);o.memoryLimit=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.memoryLimit=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!0);o.fileOffset=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.fileOffset=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.filename=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.filename=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.buildId=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.buildId=i.longs===String?"0":0;o.hasFunctions=!1,o.hasFilenames=!1,o.hasLineNumbers=!1,o.hasInlineFrames=!1}return n.id!=null&&n.hasOwnProperty("id")&&(typeof n.id=="number"?o.id=i.longs===String?String(n.id):n.id:o.id=i.longs===String?u.Long.prototype.toString.call(n.id):i.longs===Number?new u.LongBits(n.id.low>>>0,n.id.high>>>0).toNumber(!0):n.id),n.memoryStart!=null&&n.hasOwnProperty("memoryStart")&&(typeof n.memoryStart=="number"?o.memoryStart=i.longs===String?String(n.memoryStart):n.memoryStart:o.memoryStart=i.longs===String?u.Long.prototype.toString.call(n.memoryStart):i.longs===Number?new u.LongBits(n.memoryStart.low>>>0,n.memoryStart.high>>>0).toNumber(!0):n.memoryStart),n.memoryLimit!=null&&n.hasOwnProperty("memoryLimit")&&(typeof n.memoryLimit=="number"?o.memoryLimit=i.longs===String?String(n.memoryLimit):n.memoryLimit:o.memoryLimit=i.longs===String?u.Long.prototype.toString.call(n.memoryLimit):i.longs===Number?new u.LongBits(n.memoryLimit.low>>>0,n.memoryLimit.high>>>0).toNumber(!0):n.memoryLimit),n.fileOffset!=null&&n.hasOwnProperty("fileOffset")&&(typeof n.fileOffset=="number"?o.fileOffset=i.longs===String?String(n.fileOffset):n.fileOffset:o.fileOffset=i.longs===String?u.Long.prototype.toString.call(n.fileOffset):i.longs===Number?new u.LongBits(n.fileOffset.low>>>0,n.fileOffset.high>>>0).toNumber(!0):n.fileOffset),n.filename!=null&&n.hasOwnProperty("filename")&&(typeof n.filename=="number"?o.filename=i.longs===String?String(n.filename):n.filename:o.filename=i.longs===String?u.Long.prototype.toString.call(n.filename):i.longs===Number?new u.LongBits(n.filename.low>>>0,n.filename.high>>>0).toNumber():n.filename),n.buildId!=null&&n.hasOwnProperty("buildId")&&(typeof n.buildId=="number"?o.buildId=i.longs===String?String(n.buildId):n.buildId:o.buildId=i.longs===String?u.Long.prototype.toString.call(n.buildId):i.longs===Number?new u.LongBits(n.buildId.low>>>0,n.buildId.high>>>0).toNumber():n.buildId),n.hasFunctions!=null&&n.hasOwnProperty("hasFunctions")&&(o.hasFunctions=n.hasFunctions),n.hasFilenames!=null&&n.hasOwnProperty("hasFilenames")&&(o.hasFilenames=n.hasFilenames),n.hasLineNumbers!=null&&n.hasOwnProperty("hasLineNumbers")&&(o.hasLineNumbers=n.hasLineNumbers),n.hasInlineFrames!=null&&n.hasOwnProperty("hasInlineFrames")&&(o.hasInlineFrames=n.hasInlineFrames),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e.Location=function(){function r(a){if(this.line=[],a)for(var n=Object.keys(a),i=0;i>>3){case 1:l.id=n.uint64();break;case 2:l.mappingId=n.uint64();break;case 3:l.address=n.uint64();break;case 4:l.line&&l.line.length||(l.line=[]),l.line.push(R.perftools.profiles.Line.decode(n,n.uint32()));break;case 5:l.isFolded=n.bool();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.id!=null&&n.hasOwnProperty("id")&&!u.isInteger(n.id)&&!(n.id&&u.isInteger(n.id.low)&&u.isInteger(n.id.high)))return"id: integer|Long expected";if(n.mappingId!=null&&n.hasOwnProperty("mappingId")&&!u.isInteger(n.mappingId)&&!(n.mappingId&&u.isInteger(n.mappingId.low)&&u.isInteger(n.mappingId.high)))return"mappingId: integer|Long expected";if(n.address!=null&&n.hasOwnProperty("address")&&!u.isInteger(n.address)&&!(n.address&&u.isInteger(n.address.low)&&u.isInteger(n.address.high)))return"address: integer|Long expected";if(n.line!=null&&n.hasOwnProperty("line")){if(!Array.isArray(n.line))return"line: array expected";for(var i=0;i>>0,n.id.high>>>0).toNumber(!0))),n.mappingId!=null&&(u.Long?(i.mappingId=u.Long.fromValue(n.mappingId)).unsigned=!0:typeof n.mappingId=="string"?i.mappingId=parseInt(n.mappingId,10):typeof n.mappingId=="number"?i.mappingId=n.mappingId:typeof n.mappingId=="object"&&(i.mappingId=new u.LongBits(n.mappingId.low>>>0,n.mappingId.high>>>0).toNumber(!0))),n.address!=null&&(u.Long?(i.address=u.Long.fromValue(n.address)).unsigned=!0:typeof n.address=="string"?i.address=parseInt(n.address,10):typeof n.address=="number"?i.address=n.address:typeof n.address=="object"&&(i.address=new u.LongBits(n.address.low>>>0,n.address.high>>>0).toNumber(!0))),n.line){if(!Array.isArray(n.line))throw TypeError(".perftools.profiles.Location.line: array expected");i.line=[];for(var o=0;o>>0,n.id.high>>>0).toNumber(!0):n.id),n.mappingId!=null&&n.hasOwnProperty("mappingId")&&(typeof n.mappingId=="number"?o.mappingId=i.longs===String?String(n.mappingId):n.mappingId:o.mappingId=i.longs===String?u.Long.prototype.toString.call(n.mappingId):i.longs===Number?new u.LongBits(n.mappingId.low>>>0,n.mappingId.high>>>0).toNumber(!0):n.mappingId),n.address!=null&&n.hasOwnProperty("address")&&(typeof n.address=="number"?o.address=i.longs===String?String(n.address):n.address:o.address=i.longs===String?u.Long.prototype.toString.call(n.address):i.longs===Number?new u.LongBits(n.address.low>>>0,n.address.high>>>0).toNumber(!0):n.address),n.line&&n.line.length){o.line=[];for(var _=0;_>>3){case 1:l.functionId=n.uint64();break;case 2:l.line=n.int64();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){return typeof n!="object"||n===null?"object expected":n.functionId!=null&&n.hasOwnProperty("functionId")&&!u.isInteger(n.functionId)&&!(n.functionId&&u.isInteger(n.functionId.low)&&u.isInteger(n.functionId.high))?"functionId: integer|Long expected":n.line!=null&&n.hasOwnProperty("line")&&!u.isInteger(n.line)&&!(n.line&&u.isInteger(n.line.low)&&u.isInteger(n.line.high))?"line: integer|Long expected":null},r.fromObject=function(n){if(n instanceof R.perftools.profiles.Line)return n;var i=new R.perftools.profiles.Line;return n.functionId!=null&&(u.Long?(i.functionId=u.Long.fromValue(n.functionId)).unsigned=!0:typeof n.functionId=="string"?i.functionId=parseInt(n.functionId,10):typeof n.functionId=="number"?i.functionId=n.functionId:typeof n.functionId=="object"&&(i.functionId=new u.LongBits(n.functionId.low>>>0,n.functionId.high>>>0).toNumber(!0))),n.line!=null&&(u.Long?(i.line=u.Long.fromValue(n.line)).unsigned=!1:typeof n.line=="string"?i.line=parseInt(n.line,10):typeof n.line=="number"?i.line=n.line:typeof n.line=="object"&&(i.line=new u.LongBits(n.line.low>>>0,n.line.high>>>0).toNumber())),i},r.toObject=function(n,i){i||(i={});var o={};if(i.defaults){if(u.Long){var l=new u.Long(0,0,!0);o.functionId=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.functionId=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.line=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.line=i.longs===String?"0":0}return n.functionId!=null&&n.hasOwnProperty("functionId")&&(typeof n.functionId=="number"?o.functionId=i.longs===String?String(n.functionId):n.functionId:o.functionId=i.longs===String?u.Long.prototype.toString.call(n.functionId):i.longs===Number?new u.LongBits(n.functionId.low>>>0,n.functionId.high>>>0).toNumber(!0):n.functionId),n.line!=null&&n.hasOwnProperty("line")&&(typeof n.line=="number"?o.line=i.longs===String?String(n.line):n.line:o.line=i.longs===String?u.Long.prototype.toString.call(n.line):i.longs===Number?new u.LongBits(n.line.low>>>0,n.line.high>>>0).toNumber():n.line),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e.Function=function(){function r(a){if(a)for(var n=Object.keys(a),i=0;i>>3){case 1:l.id=n.uint64();break;case 2:l.name=n.int64();break;case 3:l.systemName=n.int64();break;case 4:l.filename=n.int64();break;case 5:l.startLine=n.int64();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){return typeof n!="object"||n===null?"object expected":n.id!=null&&n.hasOwnProperty("id")&&!u.isInteger(n.id)&&!(n.id&&u.isInteger(n.id.low)&&u.isInteger(n.id.high))?"id: integer|Long expected":n.name!=null&&n.hasOwnProperty("name")&&!u.isInteger(n.name)&&!(n.name&&u.isInteger(n.name.low)&&u.isInteger(n.name.high))?"name: integer|Long expected":n.systemName!=null&&n.hasOwnProperty("systemName")&&!u.isInteger(n.systemName)&&!(n.systemName&&u.isInteger(n.systemName.low)&&u.isInteger(n.systemName.high))?"systemName: integer|Long expected":n.filename!=null&&n.hasOwnProperty("filename")&&!u.isInteger(n.filename)&&!(n.filename&&u.isInteger(n.filename.low)&&u.isInteger(n.filename.high))?"filename: integer|Long expected":n.startLine!=null&&n.hasOwnProperty("startLine")&&!u.isInteger(n.startLine)&&!(n.startLine&&u.isInteger(n.startLine.low)&&u.isInteger(n.startLine.high))?"startLine: integer|Long expected":null},r.fromObject=function(n){if(n instanceof R.perftools.profiles.Function)return n;var i=new R.perftools.profiles.Function;return n.id!=null&&(u.Long?(i.id=u.Long.fromValue(n.id)).unsigned=!0:typeof n.id=="string"?i.id=parseInt(n.id,10):typeof n.id=="number"?i.id=n.id:typeof n.id=="object"&&(i.id=new u.LongBits(n.id.low>>>0,n.id.high>>>0).toNumber(!0))),n.name!=null&&(u.Long?(i.name=u.Long.fromValue(n.name)).unsigned=!1:typeof n.name=="string"?i.name=parseInt(n.name,10):typeof n.name=="number"?i.name=n.name:typeof n.name=="object"&&(i.name=new u.LongBits(n.name.low>>>0,n.name.high>>>0).toNumber())),n.systemName!=null&&(u.Long?(i.systemName=u.Long.fromValue(n.systemName)).unsigned=!1:typeof n.systemName=="string"?i.systemName=parseInt(n.systemName,10):typeof n.systemName=="number"?i.systemName=n.systemName:typeof n.systemName=="object"&&(i.systemName=new u.LongBits(n.systemName.low>>>0,n.systemName.high>>>0).toNumber())),n.filename!=null&&(u.Long?(i.filename=u.Long.fromValue(n.filename)).unsigned=!1:typeof n.filename=="string"?i.filename=parseInt(n.filename,10):typeof n.filename=="number"?i.filename=n.filename:typeof n.filename=="object"&&(i.filename=new u.LongBits(n.filename.low>>>0,n.filename.high>>>0).toNumber())),n.startLine!=null&&(u.Long?(i.startLine=u.Long.fromValue(n.startLine)).unsigned=!1:typeof n.startLine=="string"?i.startLine=parseInt(n.startLine,10):typeof n.startLine=="number"?i.startLine=n.startLine:typeof n.startLine=="object"&&(i.startLine=new u.LongBits(n.startLine.low>>>0,n.startLine.high>>>0).toNumber())),i},r.toObject=function(n,i){i||(i={});var o={};if(i.defaults){if(u.Long){var l=new u.Long(0,0,!0);o.id=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.id=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.name=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.name=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.systemName=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.systemName=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.filename=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.filename=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.startLine=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.startLine=i.longs===String?"0":0}return n.id!=null&&n.hasOwnProperty("id")&&(typeof n.id=="number"?o.id=i.longs===String?String(n.id):n.id:o.id=i.longs===String?u.Long.prototype.toString.call(n.id):i.longs===Number?new u.LongBits(n.id.low>>>0,n.id.high>>>0).toNumber(!0):n.id),n.name!=null&&n.hasOwnProperty("name")&&(typeof n.name=="number"?o.name=i.longs===String?String(n.name):n.name:o.name=i.longs===String?u.Long.prototype.toString.call(n.name):i.longs===Number?new u.LongBits(n.name.low>>>0,n.name.high>>>0).toNumber():n.name),n.systemName!=null&&n.hasOwnProperty("systemName")&&(typeof n.systemName=="number"?o.systemName=i.longs===String?String(n.systemName):n.systemName:o.systemName=i.longs===String?u.Long.prototype.toString.call(n.systemName):i.longs===Number?new u.LongBits(n.systemName.low>>>0,n.systemName.high>>>0).toNumber():n.systemName),n.filename!=null&&n.hasOwnProperty("filename")&&(typeof n.filename=="number"?o.filename=i.longs===String?String(n.filename):n.filename:o.filename=i.longs===String?u.Long.prototype.toString.call(n.filename):i.longs===Number?new u.LongBits(n.filename.low>>>0,n.filename.high>>>0).toNumber():n.filename),n.startLine!=null&&n.hasOwnProperty("startLine")&&(typeof n.startLine=="number"?o.startLine=i.longs===String?String(n.startLine):n.startLine:o.startLine=i.longs===String?u.Long.prototype.toString.call(n.startLine):i.longs===Number?new u.LongBits(n.startLine.low>>>0,n.startLine.high>>>0).toNumber():n.startLine),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e}(),t}();n0.exports=R});var p0=E((mA,d0)=>{d0.exports=ee;var at=null;try{at=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 ee(t,e,r){this.low=t|0,this.high=e|0,this.unsigned=!!r}ee.prototype.__isLong__;Object.defineProperty(ee.prototype,"__isLong__",{value:!0});function Je(t){return(t&&t.__isLong__)===!0}ee.isLong=Je;var i0={},o0={};function xr(t,e){var r,a,n;return e?(t>>>=0,(n=0<=t&&t<256)&&(a=o0[t],a)?a:(r=te(t,(t|0)<0?-1:0,!0),n&&(o0[t]=r),r)):(t|=0,(n=-128<=t&&t<128)&&(a=i0[t],a)?a:(r=te(t,t<0?-1:0,!1),n&&(i0[t]=r),r))}ee.fromInt=xr;function it(t,e){if(isNaN(t))return e?wr:ot;if(e){if(t<0)return wr;if(t>=c0)return u0}else{if(t<=-s0)return Ve;if(t+1>=s0)return f0}return t<0?it(-t,e).neg():te(t%nn|0,t/nn|0,e)}ee.fromNumber=it;function te(t,e,r){return new ee(t,e,r)}ee.fromBits=te;var Mi=Math.pow;function is(t,e,r){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return ot;if(typeof e=="number"?(r=e,e=!1):e=!!e,r=r||10,r<2||360)throw Error("interior hyphen");if(a===0)return is(t.substring(1),e,r).neg();for(var n=it(Mi(r,8)),i=ot,o=0;o>>0:this.low};N.toNumber=function(){return this.unsigned?(this.high>>>0)*nn+(this.low>>>0):this.high*nn+(this.low>>>0)};N.toString=function(e){if(e=e||10,e<2||36>>0,c=s.toString(e);if(o=_,o.isZero())return c+l;for(;c.length<6;)c="0"+c;l=""+c+l}};N.getHighBits=function(){return this.high};N.getHighBitsUnsigned=function(){return this.high>>>0};N.getLowBits=function(){return this.low};N.getLowBitsUnsigned=function(){return this.low>>>0};N.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Ve)?64:this.neg().getNumBitsAbs();for(var e=this.high!=0?this.high:this.low,r=31;r>0&&!(e&1<=0};N.isOdd=function(){return(this.low&1)===1};N.isEven=function(){return(this.low&1)===0};N.equals=function(e){return Je(e)||(e=ut(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low};N.eq=N.equals;N.notEquals=function(e){return!this.eq(e)};N.neq=N.notEquals;N.ne=N.notEquals;N.lessThan=function(e){return this.comp(e)<0};N.lt=N.lessThan;N.lessThanOrEqual=function(e){return this.comp(e)<=0};N.lte=N.lessThanOrEqual;N.le=N.lessThanOrEqual;N.greaterThan=function(e){return this.comp(e)>0};N.gt=N.greaterThan;N.greaterThanOrEqual=function(e){return this.comp(e)>=0};N.gte=N.greaterThanOrEqual;N.ge=N.greaterThanOrEqual;N.compare=function(e){if(Je(e)||(e=ut(e)),this.eq(e))return 0;var r=this.isNegative(),a=e.isNegative();return r&&!a?-1:!r&&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};N.comp=N.compare;N.negate=function(){return!this.unsigned&&this.eq(Ve)?Ve:this.not().add(rn)};N.neg=N.negate;N.add=function(e){Je(e)||(e=ut(e));var r=this.high>>>16,a=this.high&65535,n=this.low>>>16,i=this.low&65535,o=e.high>>>16,l=e.high&65535,_=e.low>>>16,s=e.low&65535,c=0,h=0,f=0,v=0;return v+=i+s,f+=v>>>16,v&=65535,f+=n+_,h+=f>>>16,f&=65535,h+=a+l,c+=h>>>16,h&=65535,c+=r+o,c&=65535,te(f<<16|v,c<<16|h,this.unsigned)};N.subtract=function(e){return Je(e)||(e=ut(e)),this.add(e.neg())};N.sub=N.subtract;N.multiply=function(e){if(this.isZero())return ot;if(Je(e)||(e=ut(e)),at){var r=at.mul(this.low,this.high,e.low,e.high);return te(r,at.get_high(),this.unsigned)}if(e.isZero())return ot;if(this.eq(Ve))return e.isOdd()?Ve:ot;if(e.eq(Ve))return this.isOdd()?Ve:ot;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(_0)&&e.lt(_0))return it(this.toNumber()*e.toNumber(),this.unsigned);var a=this.high>>>16,n=this.high&65535,i=this.low>>>16,o=this.low&65535,l=e.high>>>16,_=e.high&65535,s=e.low>>>16,c=e.low&65535,h=0,f=0,v=0,b=0;return b+=o*c,v+=b>>>16,b&=65535,v+=i*c,f+=v>>>16,v&=65535,v+=o*s,f+=v>>>16,v&=65535,f+=n*c,h+=f>>>16,f&=65535,f+=i*s,h+=f>>>16,f&=65535,f+=o*_,h+=f>>>16,f&=65535,h+=a*c+n*s+i*_+o*l,h&=65535,te(v<<16|b,h<<16|f,this.unsigned)};N.mul=N.multiply;N.divide=function(e){if(Je(e)||(e=ut(e)),e.isZero())throw Error("division by zero");if(at){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var r=(this.unsigned?at.div_u:at.div_s)(this.low,this.high,e.low,e.high);return te(r,at.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?wr:ot;var a,n,i;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return wr;if(e.gt(this.shru(1)))return h0;i=wr}else{if(this.eq(Ve)){if(e.eq(rn)||e.eq(as))return Ve;if(e.eq(Ve))return rn;var o=this.shr(1);return a=o.div(e).shl(1),a.eq(ot)?e.isNegative()?rn:as:(n=this.sub(e.mul(a)),i=a.add(n.div(e)),i)}else if(e.eq(Ve))return this.unsigned?wr:ot;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();i=ot}for(n=this;n.gte(e);){a=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var l=Math.ceil(Math.log(a)/Math.LN2),_=l<=48?1:Mi(2,l-48),s=it(a),c=s.mul(e);c.isNegative()||c.gt(n);)a-=_,s=it(a,this.unsigned),c=s.mul(e);s.isZero()&&(s=rn),i=i.add(s),n=n.sub(c)}return i};N.div=N.divide;N.modulo=function(e){if(Je(e)||(e=ut(e)),at){var r=(this.unsigned?at.rem_u:at.rem_s)(this.low,this.high,e.low,e.high);return te(r,at.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))};N.mod=N.modulo;N.rem=N.modulo;N.not=function(){return te(~this.low,~this.high,this.unsigned)};N.and=function(e){return Je(e)||(e=ut(e)),te(this.low&e.low,this.high&e.high,this.unsigned)};N.or=function(e){return Je(e)||(e=ut(e)),te(this.low|e.low,this.high|e.high,this.unsigned)};N.xor=function(e){return Je(e)||(e=ut(e)),te(this.low^e.low,this.high^e.high,this.unsigned)};N.shiftLeft=function(e){return Je(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?te(this.low<>>32-e,this.unsigned):te(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):te(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};N.shr=N.shiftRight;N.shiftRightUnsigned=function(e){if(Je(e)&&(e=e.toInt()),e&=63,e===0)return this;var r=this.high;if(e<32){var a=this.low;return te(a>>>e|r<<32-e,r>>>e,this.unsigned)}else return e===32?te(r,0,this.unsigned):te(r>>>e-32,0,this.unsigned)};N.shru=N.shiftRightUnsigned;N.shr_u=N.shiftRightUnsigned;N.toSigned=function(){return this.unsigned?te(this.low,this.high,!1):this};N.toUnsigned=function(){return this.unsigned?this:te(this.low,this.high,!0)};N.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()};N.toBytesLE=function(){var e=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};N.toBytesBE=function(){var e=this.high,r=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,r>>>24,r>>>16&255,r>>>8&255,r&255]};ee.fromBytes=function(e,r,a){return a?ee.fromBytesLE(e,r):ee.fromBytesBE(e,r)};ee.fromBytesLE=function(e,r){return new ee(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,r)};ee.fromBytesBE=function(e,r){return new ee(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],r)}});function g2(t){let e=t.defaultSampleType,r=t.sampleType,a=r.length-1;if(!e||!+e)return a;let n=r.findIndex(i=>i.type===e);return n===-1?a:n}function g0(t){if(t.byteLength===0)return null;let e;try{e=v0.perftools.profiles.Profile.decode(new Uint8Array(t))}catch{return null}function r(f){return typeof f=="number"?f:f.low}function a(f){return e.stringTable[r(f)]||null}let n=new Map;function i(f){let{name:v,filename:b,startLine:p}=f,d=v!=null&&a(v)||"(unknown)",m=b!=null?a(b):null,y=p!=null?+p:null,w={key:`${d}:${m}:${y}`,name:d};return m!=null&&(w.file=m),y!=null&&(w.line=y),w}for(let f of e.function)if(f.id){let v=i(f);v!=null&&n.set(r(f.id),v)}function o(f){let{line:v}=f;if(v==null)return null;let b=Z(v);if(b==null)return null;if(b.functionId){let p=n.get(r(b.functionId)),d=b.line instanceof m0.default?b.line.toNumber():b.line;return d&&d>0&&p!=null&&(p.line=d),p||null}else return null}let l=new Map;for(let f of e.location)if(f.id!=null){let v=o(f);v&&l.set(r(f.id),v)}let _=e.sampleType.map(f=>({type:f.type&&a(f.type)||"samples",unit:f.unit&&a(f.unit)||"count"})),s=g2(e);if(s<0||s>=_.length)return null;let c=_[s],h=new ne;switch(c.unit){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":h.setValueFormatter(new Y(c.unit));break;case"bytes":h.setValueFormatter(new Pe);break}for(let f of e.sample){let v=f.locationId?f.locationId.map(p=>l.get(r(p))):[];if(v.reverse(),f.value==null||f.value.length<=s)return null;let b=f.value[s];h.appendSampleWithWeight(v.filter(p=>p!=null),+b)}return h.build()}var v0,m0,y0=ie(()=>{"use strict";v0=se(a0());Re();$();He();m0=se(p0())});function b2(t){return Ce(y2,t,e=>{let r=e.url,a=e.lineNumber,n=e.columnNumber,i=e.functionName||(r?`(anonymous ${r.split("/").pop()}:${a})`:"(anonymous)");return{key:`${i}:${r}:${a}:${n}`,name:i,file:r,line:a,col:n}})}function os(t){let e=new Map,r=0,a=(_,s)=>{_.id=r++,e.set(_.id,_),s&&(_.parent=s.id),_.children.forEach(c=>a(c,_))};a(t.head);let n=_=>{if(_.children.length===0)return _.selfSize||0;let s=_.children.reduce((c,h)=>(c+=n(h),c),_.selfSize);return _.totalSize=s,s},i=n(t.head),o=[];for(let _ of e.values()){let s=[];for(s.push(_);_.parent!==void 0;){let c=e.get(_.parent);if(c===void 0)break;s.unshift(c),_=c}o.push(s)}let l=new ne(i);for(let _ of o){let s=_[_.length-1];l.appendSampleWithWeight(_.map(c=>b2(c.callFrame)),s.selfSize)}return l.setValueFormatter(new Pe),l.build()}var y2,b0=ie(()=>{"use strict";Re();$();He();y2=new Map});function Oi(t,e){return`${Ut(""+t,10)}:${Ut(""+e,10)}`}function S0(t){let e=new Map;for(let r of t)Ce(e,Oi(Number(r.pid),Number(r.tid)),()=>[]).push(r);return e}function j2(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 r=t[0],a=e[0],n=r.ts,i=a.ts;return n0){let o=Number.MAX_SAFE_INTEGER;for(let l of t)o=Math.min(o,l.ts);for(let l of t)l.ts-=o}let a=[];for(let o of t)switch(o.ph){case"B":{e.push(o);break}case"E":{r.push(o);break}case"X":{a.push(o);break}default:return o}function n(o){return o.dur??o.tdur??0}a.sort((o,l)=>{if(o.tsl.ts)return 1;let _=n(o),s=n(l);return _>s?-1:_l.ts?1:0}return e.sort(i),r.sort(i),[e,r]}function w2(t){let e=[];for(let r of t)switch(r.ph){case"B":case"E":case"X":e.push(r)}return e}function j0(t){let e=new Map;for(let r of t)r.ph==="M"&&r.name==="process_name"&&r.args&&r.args.name&&e.set(r.pid,r.args.name);return e}function C0(t){let e=new Map;for(let r of t)r.ph==="M"&&r.name==="thread_name"&&r.args&&r.args.name&&e.set(Oi(r.pid,r.tid),r.args.name);return e}function w0(t){return`${t.name||"(unnamed)"}`}function ss(t){let e=w0(t);return t.args&&(e+=` ${JSON.stringify(t.args)}`),e}function kr(t,e="UNKNOWN"){if(e==="HERMES"){let a=`${t.name}:${t.args.url}:${t.args.line}:${t.args.column}`;return{name:w0(t),key:a,file:t.args.url,line:t.args.line,col:t.args.column}}let r=ss(t);return{name:r,key:r}}function x0(t,e,r,a){return t!=null&&e!=null?`${t} (pid ${r}), ${e} (tid ${a})`:t!=null?`${t} (pid ${r}, tid ${a})`:e!=null?`${e} (pid ${r}, tid ${a})`:`pid ${r}, tid ${a}`}function x2(t,e){let r=j0(t),a=C0(t),n=new Map;return e.forEach(i=>{if(i.length===0)return;let o=Number(i[0].pid),l=Number(i[0].tid),_=Oi(o,l),s=r.get(o),c=a.get(_),h=x0(s,c,o,l);n.set(_,h)}),n}function k2(t,e){let r=j0(t),a=C0(t),n=new Map;return e.forEach(i=>{if(i.length===0)return;let{pid:o,tid:l}=i[0],_=Oi(o,l),s=r.get(o),c=a.get(_),h=x0(s,c,o,l);n.set(_,h)}),n}function A2(t,e,r="UNKNOWN"){let[a,n]=C2(t),i=new de;i.setValueFormatter(new Y("microseconds")),i.setName(e);let o=[],l=s=>{o.push(s),i.enterFrame(kr(s,r),s.ts)},_=s=>{let c=Z(o);if(c==null){console.warn(`Tried to end frame "${kr(s,r).key}", but the stack was empty. Doing nothing instead.`);return}let h=kr(s,r),f=kr(c,r);if(s.name!==c.name){console.warn(`ts=${s.ts}: Tried to end "${h.key}" when "${f.key}" was on the top of the stack. Doing nothing instead.`);return}h.key!==f.key&&console.warn(`ts=${s.ts}: Tried to end "${h.key}" when "${f.key}" was on the top of the stack. Ending ${f.key} instead.`),o.pop(),i.leaveFrame(f,s.ts)};for(;a.length>0||n.length>0;){let s=j2(a,n);switch(s){case"B":{l(a.shift());break}case"E":{let h=Z(o);if(h!=null){let v=kr(h,r),b=!1;for(let p=1;pn[0].ts)break;let m=kr(d,r);if(v.key===m.key){let y=n[0];n[0]=n[p],n[p]=y,b=!0;break}}if(!b)for(let p=1;pn[0].ts)break;if(d.name===h.name){let m=n[0];n[0]=n[p],n[p]=m,b=!0;break}}}let f=n.shift();_(f);break}default:return s}}for(let s=o.length-1;s>=0;s--){let c=kr(o[s],r);console.warn(`Frame "${c.key}" was still open at end of profile. Closing automatically.`),i.leaveFrame(c,i.getTotalWeight())}return i.build()}function N2(t){let e=[],r=Number(t[0].ts);return t.forEach((a,n)=>{if(n===0)return;let i=Number(a.ts)-r;r=Number(a.ts),e.push(i)}),e.push(0),e}function E2({name:t,category:e}){return{key:`${t}:${e}`,name:t}}function T2(t,e){let r=[],a=e;for(;a;){let n=t[a];if(!n)throw new Error(`Could not find frame for id ${a}`);r.push(E2(n)),a=n.parent}return r.reverse()}function H2(t,e,r){let a=new ne;a.setValueFormatter(new Y("microseconds")),a.setName(r);let n=N2(e);return e.forEach((i,o)=>{let l=n[o],_=T2(t.stackFrames,i.sf);a.appendSampleWithWeight(_,l)}),a.build()}function ls(t,e="UNKNOWN"){let r=w2(t),a=S0(r),n=k2(t,a),i=[];return n.forEach((o,l)=>{let _=a.get(l);if(!_)throw new Error(`Could not find events for key: ${_}`);i.push([l,A2(_,o,e)])}),Ie(i,o=>o[0]),{name:"",indexToView:0,profiles:i.map(o=>o[1])}}function R2(t){let e=S0(t.samples),r=x2(t.traceEvents,e),a=[];return r.forEach((n,i)=>{let o=e.get(i);if(!o)throw new Error(`Could not find samples for key: ${o}`);o.length!==0&&a.push([i,H2(t,o,n)])}),Ie(a,n=>n[0]),{name:"",indexToView:0,profiles:a.map(n=>n[1])}}function qn(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 L2(t){return t?S2.every(e=>e in t):!1}function I2(t){return qn(t)?L2(t[0].args):!1}function k0(t){return"traceEvents"in t?qn(t.traceEvents):!1}function F2(t){return"traceEvents"in t&&"stackFrames"in t&&"samples"in t&&qn(t.traceEvents)}function A0(t){return k0(t)||qn(t)}function N0(t){return F2(t)?R2(t):k0(t)?ls(t.traceEvents):I2(t)?ls(t,"HERMES"):qn(t)?ls(t):t}var S2,E0=ie(()=>{"use strict";$();Re();He();S2=["line","column","name","category","url","params","allocatedCategory","allocatedName"]});function hs(t,e){return new cs(t,e).parse()}var _s,cs,T0=ie(()=>{"use strict";Re();$();He();_s=class{constructor(e,r){this.fileName=e;this.fieldName=r;this.frameSet=new pt;this.totalWeights=new Map;this.childrenTotalWeights=new Map}getOrInsertFrame(e){return ue.getOrInsert(this.frameSet,e)}addToTotalWeight(e,r){this.totalWeights.has(e)?this.totalWeights.set(e,this.totalWeights.get(e)+r):this.totalWeights.set(e,r)}addSelfWeight(e,r){this.addToTotalWeight(this.getOrInsertFrame(e),r)}addChildWithTotalWeight(e,r,a){let n=this.getOrInsertFrame(e),i=this.getOrInsertFrame(r),o=Ce(this.childrenTotalWeights,n,l=>new Map);o.has(i)?o.set(i,o.get(i)+a):o.set(i,a),this.addToTotalWeight(n,a)}toProfile(){let e=new de,r=1;this.fieldName==="Time_(10ns)"?(e.setName(`${this.fileName} -- Time`),r=10,e.setValueFormatter(new Y("nanoseconds"))):this.fieldName=="Memory_(bytes)"?(e.setName(`${this.fileName} -- Memory`),e.setValueFormatter(new Pe)):e.setName(`${this.fileName} -- ${this.fieldName}`);let a=0,n=new Set,i=0;for(let[_,s]of this.totalWeights)i=Math.max(i,s);let o=(_,s)=>{if(n.has(_)||s<1e-4*i)return;let c=Zn(this.totalWeights,_,()=>0);if(c===0)return;let h=s;e.enterFrame(_,Math.round(a*r)),n.add(_);for(let[f,v]of this.childrenTotalWeights.get(_)||[]){let b=s*(v/c),p=a;o(f,b);let d=a-p;h-=d}n.delete(_),a+=h,e.leaveFrame(_,Math.round(a*r))},l=new Set(this.frameSet);for(let[_,s]of this.childrenTotalWeights)for(let[c,h]of s)l.delete(c);for(let _ of l)o(_,this.totalWeights.get(_));return e.build()}},cs=class{constructor(e,r){this.importedFileName=r;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)",r=this.functionName||"(unknown)";return{key:`${e}:${r}`,name:r,file:e}}calleeFrameInfo(){let e=this.calleeFilename||this.filename||"(unknown)",r=this.calleeFunctionName||"(unknown)";return{key:`${e}:${r}`,name:r,file:e}}parseHeaderLine(e){let r=/^\s*(\w+):\s*(.*)+$/.exec(e);if(!r)return!1;if(r[1]!=="events")return!0;let a=r[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(n=>new _s(this.importedFileName,n)),!0}parseAssignmentLine(e){let r=/^(\w+)=\s*(.*)$/.exec(e);if(!r)return!1;let a=r[1],n=r[2];switch(a){case"fe":case"fi":{this.parseNameWithCompression(n,this.savedFileNames);break}case"fl":{this.filename=this.parseNameWithCompression(n,this.savedFileNames);break}case"fn":{this.functionName=this.parseNameWithCompression(n,this.savedFunctionNames);break}case"cfi":case"cfl":{this.calleeFilename=this.parseNameWithCompression(n,this.savedFileNames);break}case"cfn":{this.calleeFunctionName=this.parseNameWithCompression(n,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,r){{let a=/^\((\d+)\)\s*(.+)$/.exec(e);if(a){let n=a[1],i=a[2];if(n in r)throw new Error(`Redefinition of name with id: ${n}. Original value was "${r[n]}". Tried to redefine as "${i}" on line ${this.lineNum}.`);return r[n]=i,i}}{let a=/^\((\d+)\)$/.exec(e);if(a){let n=a[1];if(!(n in r))throw new Error(`Tried to use name with id ${n} on line ${this.lineNum} before it was defined.`);return r[n]}}return e}parseCostLine(e,r){let a=e.split(/\s+/),n=[];for(let o=0;o!/^$|^Log closed$|log opened/.exec(m)),a=-1,n=d(r[0]);if(n===null)throw Error;a=n.at;let i=Z(r);if(i===null)throw Error;let o=d(i);if(o===null)throw Error;let l=o.at,_=new pt,s=[],c=0,h,f=-1;function v(m,y,S){function w(k,H){s.push(H),e.enterFrame(ue.getOrInsert(_,{name:H,key:H}),k),c=k}f>-1&&(f=-1,h===S&&f>=c&&v(m,f,`QUEUE ${S}`));let j=`STACK ${m}`;[...s].reverse().find(k=>k.startsWith("STACK "))!==j&&(s.length===1&&b(c),w(y,j)),w(y,S)}function b(m){let y=s.pop();if(y===void 0)throw Error("Tried to leave frame when nothing was on stack.");e.leaveFrame(ue.getOrInsert(_,{name:y,key:y}),m);let S=Z(s);S!==null&&S.startsWith("QUEUE ")&&(b(m),S=Z(s)),s.length>1&&S!==null&&S.startsWith("STACK ")&&b(m),c=m}function p(m,y,S){Z(s)===S?b(y):c===0?(console.log(`Tried to leave frame "${S}" which was never entered. Assuming it has been running since the start.`),v(m,0,S),b(y)):console.log(`Tried to leave frame "${S}" which was never entered. Other events have happened since the start, ignoring line.`)}function d(m){if(m===void 0)throw Error("Probably tried to import empty file.");let y=m.split(":");return y.length<3?null:a!==-1?{at:parseInt(y[0])-a,event:y[1],stackInt:parseInt(y[2]),name:y[5]}:{at:parseInt(y[0]),event:y[1],stackInt:parseInt(y[2]),name:y[5]}}for(r.forEach((m,y,S)=>{let w=d(m);if(w!==null){if(w.event==="PUSH"){v(w.stackInt,w.at,w.name),y+=1;let j=d(S[y]);for(;j!==null&&j.at===w.at;)j.name===w.name&&j.stackInt===w.stackInt&&j.event==="POP"?(p(j.stackInt,j.at,j.name),S.splice(y,1),j=null):(y+=1,y0;)b(l);return e.build()}var R0=ie(()=>{"use strict";Re();$();He()});var L0={};ps(L0,{importFromFileSystemDirectoryEntry:()=>z2,importProfileGroupFromBase64:()=>O2,importProfileGroupFromText:()=>M2,importProfilesFromArrayBuffer:()=>P2,importProfilesFromFile:()=>B2});async function M2(t,e){return await Bi(new Ei(t,e))}async function O2(t,e){return await Bi(Jt.fromArrayBuffer(t,Hs(e).buffer))}async function B2(t){return Bi(Jt.fromFile(t))}async function P2(t,e){return Bi(Jt.fromArrayBuffer(t,e))}async function Bi(t){let e=await t.name(),r=await D2(t);if(r){r.name||(r.name=e);for(let a of r.profiles)a&&!a.getName()&&a.setName(e);return r}return null}function Ne(t){return t?{name:t.getName(),indexToView:0,profiles:[t]}:null}async function D2(t){let e=await t.name(),r=await t.readAsArrayBuffer();{let i=g0(r);if(i)return console.log("Importing as protobuf encoded pprof file"),Ne(i)}let a=await t.readAsText();if(e.endsWith(".speedscope.json"))return console.log("Importing as speedscope json file"),ko(a.parseAsJSON());if(/Trace-\d{8}T\d{6}/.exec(e))return console.log("Importing as Chrome Timeline Object"),wn(a.parseAsJSON().traceEvents,e);if(e.endsWith(".chrome.json")||/Profile-\d{8}T\d{6}/.exec(e))return console.log("Importing as Chrome Timeline"),wn(a.parseAsJSON(),e);if(e.endsWith(".stackprof.json"))return console.log("Importing as stackprof profile"),Ne(rl(a.parseAsJSON()));if(e.endsWith(".instruments.txt"))return console.log("Importing as Instruments.app deep copy"),Ne(zl(a));if(e.endsWith(".linux-perf.txt"))return console.log("Importing as output of linux perf script"),Ul(a);if(e.endsWith(".collapsedstack.txt"))return console.log("Importing as collapsed stack format"),Ne(Vl(a));if(e.endsWith(".v8log.json"))return console.log("Importing as --prof-process v8 log"),Ne(Jl(a.parseAsJSON()));if(e.endsWith(".heapprofile"))return console.log("Importing as Chrome Heap Profile"),Ne(os(a.parseAsJSON()));if(e.endsWith("-recording.json"))return console.log("Importing as Safari profile"),Ne($l(a.parseAsJSON()));if(e.startsWith("callgrind."))return console.log("Importing as Callgrind profile"),hs(a,e);let n;try{n=a.parseAsJSON()}catch{}if(n){if(n.$schema==="https://www.speedscope.app/file-format-schema.json")return console.log("Importing as speedscope json file"),ko(n);if(n.systemHost&&n.systemHost.name=="Firefox")return console.log("Importing as Firefox profile"),Ne(Zu(n));if(tl(n))return console.log("Importing as Chrome Timeline"),wn(n,e);if(Xh(n))return console.log("Importing as Chrome Timeline Object"),wn(n.traceEvents,e);if("nodes"in n&&"samples"in n&&"timeDeltas"in n)return console.log("Importing as Chrome CPU Profile"),Ne(ci(n));if(A0(n))return console.log("Importing as Trace Event Format profile"),N0(n);if("head"in n&&"samples"in n&&"timestamps"in n)return console.log("Importing as Chrome CPU Profile (old format)"),Ne(Yh(n));if("mode"in n&&"frames"in n&&"raw_timestamp_deltas"in n)return console.log("Importing as stackprof profile"),Ne(rl(n));if("code"in n&&"functions"in n&&"ticks"in n)return console.log("Importing as --prof-process v8 log"),Ne(Jl(n));if("head"in n&&"selfSize"in n.head)return console.log("Importing as Chrome Heap Profile"),Ne(os(n));if("rts_arguments"in n&&"initial_capabilities"in n)return console.log("Importing as Haskell GHC JSON Profile"),nd(n);if("recording"in n&&"sampleStackTraces"in n.recording)return console.log("Importing as Safari profile"),Ne($l(n))}else{if(/^# callgrind format/.exec(a.firstChunk())||/^events:/m.exec(a.firstChunk())&&/^fn=/m.exec(a.firstChunk()))return console.log("Importing as Callgrind profile"),hs(a,e);if(/^[\w \t\(\)]*\tSymbol Name/.exec(a.firstChunk()))return console.log("Importing as Instruments.app deep copy"),Ne(zl(a));if(/^(Stack_|Script_|Obj_)\S+ log opened \(PC\)\n/.exec(a.firstChunk()))return console.log("Importing as Papyrus profile"),Ne(H0(a));let i=Ul(a);if(i)return console.log("Importing from linux perf script output"),i;let o=Vl(a);if(o)return console.log("Importing as collapsed stack format"),Ne(o)}return null}async function z2(t){return qu(t)}var I0=ie(()=>{"use strict";Zh();Qh();Xu();Yu();Qu();Ao();ed();rd();ad();id();Bl();y0();$();b0();E0();T0();R0()});var F0=E((uN,V2)=>{V2.exports="./perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt"});var P,K0,sn,Vi,ys,vs,bs,Ss,At={},Ji=[],$0=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function ir(t,e){for(var r in e)t[r]=e[r];return t}function js(t){var e=t.parentNode;e&&e.removeChild(t)}function g(t,e,r){var a,n=arguments,i={};for(a in e)a!=="key"&&a!=="ref"&&(i[a]=e[a]);if(arguments.length>3)for(r=[r],a=3;a=this.capacity;)this.map.delete(this.list.pop().data);let n=this.list.prepend(new Wi(e));this.map.set(e,{value:r,listNode:n})}getOrInsert(e,r){let a=this.get(e);return a==null&&(a=r(e),this.insert(e,a)),a}removeLRU(){let e=this.list.pop();if(!e)return null;let r=e.data,a=this.map.get(r).value;return this.map.delete(r),[r,a]}clear(){this.list=new ea,this.map=new Map}};function we(t,e,r){return tr?r:t}var C=class t{constructor(e,r){this.x=e;this.y=r}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,r=1e-9){return Math.abs(this.x-e.x)=0&&e<=31),t.TEXTURE0+e}var J;(v=>{class t{constructor(p=0,d=0,m=0,y=0){this.x=p;this.y=d;this.width=m;this.height=y}set(p,d,m,y){this.x=p,this.y=d,this.width=m,this.height=y}equals(p){return this.x===p.x&&this.y===p.y&&this.width===p.width&&this.height===p.height}}v.Rect=t;class e{constructor(p,d,m,y){this.redF=p;this.greenF=d;this.blueF=m;this.alphaF=y}equals(p){return this.redF===p.redF&&this.greenF===p.greenF&&this.blueF===p.blueF&&this.alphaF===p.alphaF}static{this.TRANSPARENT=new e(0,0,0,0)}}v.Color=e;let r;(A=>(A[A.ZERO=0]="ZERO",A[A.ONE=1]="ONE",A[A.SOURCE_COLOR=2]="SOURCE_COLOR",A[A.TARGET_COLOR=3]="TARGET_COLOR",A[A.INVERSE_SOURCE_COLOR=4]="INVERSE_SOURCE_COLOR",A[A.INVERSE_TARGET_COLOR=5]="INVERSE_TARGET_COLOR",A[A.SOURCE_ALPHA=6]="SOURCE_ALPHA",A[A.TARGET_ALPHA=7]="TARGET_ALPHA",A[A.INVERSE_SOURCE_ALPHA=8]="INVERSE_SOURCE_ALPHA",A[A.INVERSE_TARGET_ALPHA=9]="INVERSE_TARGET_ALPHA",A[A.CONSTANT=10]="CONSTANT",A[A.INVERSE_CONSTANT=11]="INVERSE_CONSTANT"))(r=v.BlendOperation||={});let a;(d=>(d[d.TRIANGLES=0]="TRIANGLES",d[d.TRIANGLE_STRIP=1]="TRIANGLE_STRIP"))(a=v.Primitive||={});class n{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(p){this.resizeEventHandlers.add(p)}removeAfterResizeEventHandler(p){this.resizeEventHandlers.delete(p)}}v.Context=n;let i;(d=>(d[d.FLOAT=0]="FLOAT",d[d.BYTE=1]="BYTE"))(i=v.AttributeType||={});function o(b){return b==0?4:1}v.attributeByteLength=o;class l{constructor(p,d,m,y){this.name=p;this.type=d;this.count=m;this.byteOffset=y}}v.Attribute=l;class _{constructor(){this._attributes=[];this._stride=0}get attributes(){return this._attributes}get stride(){return this._stride}add(p,d,m){return this.attributes.push(new l(p,d,m,this.stride)),this._stride+=m*o(d),this}}v.VertexFormat=_;class s{uploadFloat32Array(p){this.upload(new Uint8Array(p.buffer),0)}uploadFloats(p){this.uploadFloat32Array(new Float32Array(p))}}v.VertexBuffer=s;let c;(d=>(d[d.NEAREST=0]="NEAREST",d[d.LINEAR=1]="LINEAR"))(c=v.PixelFilter||={});let h;(d=>(d[d.REPEAT=0]="REPEAT",d[d.CLAMP=1]="CLAMP"))(h=v.PixelWrap||={});class f{constructor(p,d,m){this.minFilter=p;this.magFilter=d;this.wrap=m}static{this.LINEAR_CLAMP=new f(1,1,1)}static{this.LINEAR_MIN_NEAREST_MAG_CLAMP=new f(1,0,1)}static{this.NEAREST_CLAMP=new f(0,0,1)}}v.TextureFormat=f})(J||={});var qi;(v=>{class t extends J.Context{constructor(d=document.createElement("canvas")){super();this._attributeCount=0;this._blendOperations=0;this._contextResetHandlers=[];this._currentClearColor=J.Color.TRANSPARENT;this._currentRenderTarget=null;this._defaultViewport=new J.Rect;this._forceStateUpdate=!0;this._generation=1;this._height=0;this._oldBlendOperations=0;this._oldRenderTarget=null;this._oldViewport=new J.Rect;this._width=0;this.handleWebglContextRestored=()=>{this._attributeCount=0,this._currentClearColor=J.Color.TRANSPARENT,this._forceStateUpdate=!0,this._generation++;for(let d of this._contextResetHandlers)d()};this.ANGLE_instanced_arrays=null;this.ANGLE_instanced_arrays_generation=-1;let m=d.getContext("webgl",{alpha:!1,antialias:!1,depth:!1,preserveDrawingBuffer:!1,stencil:!1});if(m==null)throw new Error("Setup failure");this._gl=m;let y=d.style;d.width=0,d.height=0,y.width=y.height="0",d.addEventListener("webglcontextlost",S=>{S.preventDefault()}),d.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(d){ep(this._contextResetHandlers,d)}removeContextResetHandler(d){tp(this._contextResetHandlers,d)}get currentRenderTarget(){return this._currentRenderTarget}beginFrame(){this.setRenderTarget(null)}endFrame(){}setBlendState(d,m){this._blendOperations=t._packBlendModes(d,m)}setViewport(d,m,y,S){(this._currentRenderTarget!=null?this._currentRenderTarget.viewport:this._defaultViewport).set(d,m,y,S)}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(d,m,y){this._updateRenderTargetAndViewport(),s.from(m).prepare(),c.from(y).prepare(),this._updateFormat(m.format),this._updateBlendState(),this._gl.drawArrays(d==0?this._gl.TRIANGLES:this._gl.TRIANGLE_STRIP,0,Math.floor(y.byteCount/m.format.stride)),this._forceStateUpdate=!1}resize(d,m,y,S){let w=this._gl.canvas,j=w.getBoundingClientRect();if(this._width===d&&this._height===m&&j.width===y&&j.height===S)return;let k=w.style;w.width=d,w.height=m,k.width=`${y}px`,k.height=`${S}px`,this.setViewport(0,0,d,m),this._width=d,this._height=m,this.resizeEventHandlers.forEach(H=>H())}clear(d){this._updateRenderTargetAndViewport(),this._updateBlendState(),d.equals(this._currentClearColor)||(this._gl.clearColor(d.redF,d.greenF,d.blueF,d.alphaF),this._currentClearColor=d),this._gl.clear(this._gl.COLOR_BUFFER_BIT)}setRenderTarget(d){this._currentRenderTarget=f.from(d)}createMaterial(d,m,y){let S=new s(this,d,m,y);return S.program,S}createVertexBuffer(d){return V(d>0&&d%4==0),new c(this,d)}createTexture(d,m,y,S){return new h(this,d,m,y,S)}createRenderTarget(d){return new f(this,h.from(d))}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 d=this._currentRenderTarget,m=d!=null?d.viewport:this._defaultViewport,y=this._gl;(this._forceStateUpdate||this._oldRenderTarget!=d)&&(y.bindFramebuffer(y.FRAMEBUFFER,d?d.framebuffer:null),this._oldRenderTarget=d),(this._forceStateUpdate||!this._oldViewport.equals(m))&&(y.viewport(m.x,this.renderTargetHeightInPixels-m.y-m.height,m.width,m.height),this._oldViewport.set(m.x,m.y,m.width,m.height))}_updateBlendState(){if(this._forceStateUpdate||this._oldBlendOperations!=this._blendOperations){let d=this._gl,m=this._blendOperations,y=this._oldBlendOperations,S=m&15,w=m>>4;V(S in this._blendOperationMap),V(w in this._blendOperationMap),m==t.COPY_BLEND_OPERATIONS?d.disable(d.BLEND):((this._forceStateUpdate||y==t.COPY_BLEND_OPERATIONS)&&d.enable(d.BLEND),d.blendFunc(this._blendOperationMap[S],this._blendOperationMap[w])),this._oldBlendOperations=m}}_updateFormat(d){let m=this._gl,y=d.attributes,S=y.length;for(let w=0;wS;)this._attributeCount--,m.disableVertexAttribArray(this._attributeCount);this._attributeCount=S}getWebGLInfo(){let d=this.gl.getExtension("WEBGL_debug_renderer_info"),m=d?this.gl.getParameter(d.UNMASKED_RENDERER_WEBGL):null,y=d?this.gl.getParameter(d.UNMASKED_VENDOR_WEBGL):null,S=this.gl.getParameter(this.gl.VERSION);return{renderer:m,vendor:y,version:S}}static from(d){return V(d==null||d instanceof t),d}static _packBlendModes(d,m){return d|m<<4}static{this.COPY_BLEND_OPERATIONS=t._packBlendModes(1,0)}}v.Context=t;class e{constructor(p,d,m=0,y=null,S=!0){this._material=p;this._name=d;this._generation=m;this._location=y;this._isDirty=S}get location(){let p=t.from(this._material.context);if(this._generation!=p.generation&&(this._location=p.gl.getUniformLocation(this._material.program,this._name),this._generation=p.generation,!Gi)){let d=this._material.program,m=p.gl;for(let y=0,S=m.getProgramParameter(d,m.ACTIVE_UNIFORMS);y0&&this._texture.height>0?this._texture.texture:null)}}class s{constructor(p,d,m,y,S={},w=[],j=0,k=null){this._context=p;this._format=d;this._vertexSource=m;this._fragmentSource=y;this._uniformsMap=S;this._uniformsList=w;this._generation=j;this._program=k}get context(){return this._context}get format(){return this._format}get vertexSource(){return this._vertexSource}get fragmentSource(){return this._fragmentSource}setUniformFloat(p,d){let m=this._uniformsMap[p]||null;m==null&&(m=new r(this,p),this._uniformsMap[p]=m,this._uniformsList.push(m)),V(m instanceof r),m.set(d)}setUniformInt(p,d){let m=this._uniformsMap[p]||null;m==null&&(m=new a(this,p),this._uniformsMap[p]=m,this._uniformsList.push(m)),V(m instanceof a),m.set(d)}setUniformVec2(p,d,m){let y=this._uniformsMap[p]||null;y==null&&(y=new n(this,p),this._uniformsMap[p]=y,this._uniformsList.push(y)),V(y instanceof n),y.set(d,m)}setUniformVec3(p,d,m,y){let S=this._uniformsMap[p]||null;S==null&&(S=new i(this,p),this._uniformsMap[p]=S,this._uniformsList.push(S)),V(S instanceof i),S.set(d,m,y)}setUniformVec4(p,d,m,y,S){let w=this._uniformsMap[p]||null;w==null&&(w=new o(this,p),this._uniformsMap[p]=w,this._uniformsList.push(w)),V(w instanceof o),w.set(d,m,y,S)}setUniformMat3(p,d,m,y,S,w,j,k,H,O){let T=this._uniformsMap[p]||null;T==null&&(T=new l(this,p),this._uniformsMap[p]=T,this._uniformsList.push(T)),V(T instanceof l),T.set(d,m,y,S,w,j,k,H,O)}setUniformSampler(p,d,m){let y=this._uniformsMap[p]||null;y==null&&(y=new _(this,p),this._uniformsMap[p]=y,this._uniformsList.push(y)),V(y instanceof _),y.set(d,m)}get program(){let p=this._context.gl;if(this._generation!=this._context.generation){this._program=p.createProgram(),this._compileShader(p,p.VERTEX_SHADER,this.vertexSource),this._compileShader(p,p.FRAGMENT_SHADER,this.fragmentSource);let d=this.format.attributes;for(let m=0;m=0),V(0<=d&&d+y<=this._byteCount),V(0<=m&&m+y<=this._byteCount),this._bytes&&d!=m&&y!=0&&(this._bytes.set(this._bytes.subarray(d,this._byteCount),m),this._growDirtyRegion(Math.min(d,m),Math.max(d,m)+y))}upload(d,m=0){V(0<=m&&m+d.length<=this._byteCount),V(this._bytes!=null),this._bytes.set(d,m),this._growDirtyRegion(m,m+d.length)}free(){this._buffer&&this._context.gl.deleteBuffer(this._buffer),this._generation=0}prepare(){let d=this._context.gl;this._generation!==this._context.generation&&(this._buffer=d.createBuffer(),this._generation=this._context.generation,this._isDirty=!0),d.bindBuffer(d.ARRAY_BUFFER,this._buffer),this._isDirty&&(d.bufferData(d.ARRAY_BUFFER,this._byteCount,d.DYNAMIC_DRAW),this._dirtyMin=this._totalMin,this._dirtyMax=this._totalMax,this._isDirty=!1),this._dirtyMin{let r=z.betweenRects(e.configSpaceSrcRect,e.physicalSpaceDstRect),a=new C(this.gl.viewport.width,this.gl.viewport.height);return z.withTranslation(new C(-1,1)).times(z.withScale(new C(2,-2).dividedByPointwise(a))).times(r)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(J.Primitive.TRIANGLES,this.material,e.batch.getBuffer())}};var ce=class t{constructor(e=0,r=0,a=0,n=1){this.r=e;this.g=r;this.b=a;this.a=n}static fromLumaChromaHue(e,r,a){let n=a/60,i=r*(1-Math.abs(n%2-1)),[o,l,_]=n<1?[r,i,0]:n<2?[i,r,0]:n<3?[0,r,i]:n<4?[0,i,r]:n<5?[i,0,r]:[r,0,i],s=e-(.3*o+.59*l+.11*_);return new t(we(o+s,0,1),we(l+s,0,1),we(_+s,0,1),1)}static fromCSSHex(e){if(e.length!==7||e[0]!=="#")throw new Error(`Invalid color input ${e}`);let r=parseInt(e.substr(1,2),16)/255,a=parseInt(e.substr(3,2),16)/255,n=parseInt(e.substr(5,2),16)/255;if(r<0||r>1||a<0||a>1||n<0||n>1)throw new Error(`Invalid color input ${e}`);return new t(r,a,n)}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 ia=class{constructor(e,r,a){this.gl=e;this.rectangleBatchRenderer=r;this.textureRenderer=a;this.texture=e.createTexture(J.TextureFormat.NEAREST_CLAMP,4096,4096),this.renderTarget=e.createRenderTarget(this.texture),this.rowCache=new ta(this.texture.height),this.clearLineBatch=new or(e),this.clearLineBatch.addRect(I.unit,new ce(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 n=this.rowCache.get(a);if(n!=null)continue;n=this.allocateLine(a);let i=new I(new C(0,n),new C(this.texture.width,1));this.rectangleBatchRenderer.render({batch:this.clearLineBatch,configSpaceSrcRect:I.unit,physicalSpaceDstRect:i}),r(i,a)}})}renderViaAtlas(e,r){let a=this.rowCache.get(e);if(a==null)return!1;let n=new I(new C(0,a),new C(this.texture.width,1));return this.textureRenderer.render({texture:this.texture,srcRect:n,dstRect:r}),!0}};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); + } +`,op=` + precision mediump float; + + varying vec2 vUv; + uniform sampler2D texture; + + void main() { + gl_FragColor = texture2D(texture, vUv); + } +`,oa=class{constructor(e){this.gl=e;let r=new J.VertexFormat;r.add("position",J.AttributeType.FLOAT,2),r.add("uv",J.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]}],n=[];for(let i of a)n.push(i.pos[0]),n.push(i.pos[1]),n.push(i.uv[0]),n.push(i.uv[1]);this.buffer=e.createVertexBuffer(r.stride*a.length),this.buffer.upload(new Uint8Array(new Float32Array(n).buffer)),this.material=e.createMaterial(r,ip,op)}render(e){this.material.setUniformSampler("texture",e.texture,0),mt(this.material,"uvTransform",(()=>{let{srcRect:r,texture:a}=e,i=z.withTranslation(new C(0,1)).times(z.withScale(new C(1,-1))).times(z.betweenRects(new I(C.zero,new C(a.width,a.height)),I.unit)).transformRect(r);return z.betweenRects(I.unit,i)})()),mt(this.material,"positionTransform",(()=>{let{dstRect:r}=e,{viewport:a}=this.gl,n=new C(a.width,a.height),o=z.withScale(new C(1,-1)).times(z.betweenRects(new I(C.zero,n),I.NDC)).transformRect(r);return z.betweenRects(I.NDC,o)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(J.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var Yi=new J.VertexFormat;Yi.add("position",J.AttributeType.FLOAT,2);var lp=` + attribute vec2 position; + + void main() { + gl_Position = vec4(position, 0, 1); + } +`,sp=t=>{let{r:e,g:r,b:a}=ce.fromCSSHex(t.fgSecondaryColor),n=`${e.toFixed(1)}, ${r.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(${n}, 0.8); + } else { + // Outside viewport rectangle + gl_FragColor = vec4(${n}, 0.5); + } + } + `},la=class{constructor(e,r){this.gl=e;let a=[[-1,1],[1,1],[-1,-1],[1,-1]],n=[];for(let i of a)n.push(i[0]),n.push(i[1]);this.buffer=e.createVertexBuffer(Yi.stride*a.length),this.buffer.upload(new Uint8Array(new Float32Array(n).buffer)),this.material=e.createMaterial(Yi,lp,sp(r))}render(e){mt(this.material,"configSpaceToPhysicalViewSpace",e.configSpaceToPhysicalViewSpace),Xi(this.material,"configSpaceViewportOrigin",e.configSpaceViewportRect.origin),Xi(this.material,"configSpaceViewportSize",e.configSpaceViewportRect.size);let r=this.gl.viewport;this.material.setUniformVec2("physicalOrigin",r.x,r.y),this.material.setUniformVec2("physicalSize",r.width,r.height),this.material.setUniformFloat("framebufferHeight",this.gl.renderTargetHeightInPixels),this.gl.setBlendState(J.BlendOperation.SOURCE_ALPHA,J.BlendOperation.INVERSE_SOURCE_ALPHA),this.gl.draw(J.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var sa=new J.VertexFormat;sa.add("position",J.AttributeType.FLOAT,2);sa.add("uv",J.AttributeType.FLOAT,2);var _p=` + 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); + } +`,cp=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); + } + } +`,_a=class{constructor(e,r){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]}],n=[];for(let i of a)n.push(i.pos[0]),n.push(i.pos[1]),n.push(i.uv[0]),n.push(i.uv[1]);this.buffer=e.createVertexBuffer(sa.stride*a.length),this.buffer.uploadFloats(n),this.material=e.createMaterial(sa,_p,cp(r.colorForBucketGLSL))}render(e){let{srcRect:r,rectInfoTexture:a}=e,i=z.withTranslation(new C(0,1)).times(z.withScale(new C(1,-1))).times(z.betweenRects(new I(C.zero,new C(a.width,a.height)),I.unit)).transformRect(r),o=z.betweenRects(I.unit,i),{dstRect:l}=e,_=new C(this.gl.viewport.width,this.gl.viewport.height),c=z.withScale(new C(1,-1)).times(z.betweenRects(new I(C.zero,_),I.NDC)).transformRect(l),h=z.betweenRects(I.NDC,c),f=C.unit.dividedByPointwise(new C(e.rectInfoTexture.width,e.rectInfoTexture.height));this.material.setUniformSampler("colorTexture",e.rectInfoTexture,0),mt(this.material,"uvTransform",o),this.material.setUniformFloat("renderOutlines",e.renderOutlines?1:0),this.material.setUniformVec2("uvSpacePixelSize",f.x,f.y),mt(this.material,"positionTransform",h),this.gl.setUnpremultipliedBlendState(),this.gl.draw(J.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var ca=class{constructor(e,r){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=ce.fromCSSHex(this.theme.bgPrimaryColor);this.gl.clear(new J.Color(e.r,e.g,e.b,e.a));for(let r of this.beforeFrameHandlers)r()};this.gl=new qi.Context(e),this.rectangleBatchRenderer=new na(this.gl),this.textureRenderer=new oa(this.gl),this.viewportRectangleRenderer=new la(this.gl,r),this.flamechartColorPassRenderer=new _a(this.gl,r),this.theme=r,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,r){let{origin:a,size:n}=e,i=this.gl.viewport;this.gl.setViewport(a.x,a.y,n.x,n.y),r();let{x:o,y:l,width:_,height:s}=i;this.gl.setViewport(o,l,_,s)}renderBehind(e,r){let a=e.getBoundingClientRect(),n=new I(new C(a.left*window.devicePixelRatio,a.top*window.devicePixelRatio),new C(a.width*window.devicePixelRatio,a.height*window.devicePixelRatio));this.setViewport(n,r)}};var Kt=Tr(t=>e=>t.get(e.key)||0),Nt=Oe(({theme:t,frameToColorBucket:e})=>{let r=Kt(e);return a=>{let n=r(a)/255;return t.colorForBucket(n).toCSS()}}),Et=Oe(({theme:t,canvas:e})=>new ca(e,t)),Rs=Tr(t=>new ia(t.gl,t.rectangleBatchRenderer,t.textureRenderer)),Ls=Oe(({profile:t,flattenRecursion:e})=>e?t.getProfileWithRecursionFlattened():t),Tt=Tr(t=>{let e=[];t.forEachFrame(i=>e.push(i));function r(i){return(i.file||"")+i.name}function a(i,o){return r(i)>r(o)?1:-1}e.sort(a);let n=new Map;for(let i=0;i=r.__.length&&r.__.push({}),r.__[t]}function Be(t){return fn=1,Ps(Ds,t)}function Ps(t,e,r){var a=un(Hr++,2);return a.__c||(a.__c=Xe,a.__=[r?r(e):Ds(void 0,e),function(n){var i=t(a.__[0],n);a.__[0]!==i&&(a.__[0]=i,a.__c.setState({}))}]),a.__}function Ke(t,e){var r=un(Hr++,3);!P.__s&&ro(r.__H,e)&&(r.__=t,r.__H=e,Xe.__H.__h.push(r))}function to(t,e){var r=un(Hr++,4);!P.__s&&ro(r.__H,e)&&(r.__=t,r.__H=e,Xe.__h.push(r))}function $t(t){return fn=5,Q(function(){return{current:t}},[])}function Q(t,e){var r=un(Hr++,7);return ro(r.__H,e)?(r.__H=e,r.__h=t,r.__=t()):r.__}function D(t,e){return fn=8,Q(function(){return t},e)}function Ye(t){var e=Xe.context[t.__c],r=un(Hr++,9);return r.__c=t,e?(r.__==null&&(r.__=!0,e.sub(Xe)),e.props.value):t.__}function hp(){Zi.some(function(t){if(t.__P)try{t.__H.__h.forEach(Qi),t.__H.__h.forEach(eo),t.__H.__h=[]}catch(e){return t.__H.__h=[],P.__e(e,t.__v),!0}}),Zi=[]}function Qi(t){t.t&&t.t()}function eo(t){var e=t.__();typeof e=="function"&&(t.t=e)}function ro(t,e){return!t||e.some(function(r,a){return r!==t[a]})}function Ds(t,e){return typeof e=="function"?e(t):e}P.__r=function(t){Fs&&Fs(t),Hr=0,(Xe=t.__c).__H&&(Xe.__H.__h.forEach(Qi),Xe.__H.__h.forEach(eo),Xe.__H.__h=[])},P.diffed=function(t){Ms&&Ms(t);var e=t.__c;if(e){var r=e.__H;r&&r.__h.length&&(Zi.push(e)!==1&&Is===P.requestAnimationFrame||((Is=P.requestAnimationFrame)||function(a){var n,i=function(){clearTimeout(o),cancelAnimationFrame(n),setTimeout(a)},o=setTimeout(i,100);typeof window<"u"&&(n=requestAnimationFrame(i))})(hp))}},P.__c=function(t,e){e.some(function(r){try{r.__h.forEach(Qi),r.__h=r.__h.filter(function(a){return!a.__||eo(a)})}catch(a){e.some(function(n){n.__h&&(n.__h=[])}),e=[],P.__e(a,r.__v)}}),Os&&Os(t,e)},P.unmount=function(t){Bs&&Bs(t);var e=t.__c;if(e){var r=e.__H;if(r)try{r.__.forEach(function(a){return a.t&&a.t()})}catch(a){P.__e(a,e.__v)}}};function Gs(t,e){for(var r in e)t[r]=e[r];return t}function ao(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var a in e)if(a!=="__source"&&t[a]!==e[a])return!0;return!1}var qb=function(t){var e,r;function a(n){var i;return(i=t.call(this,n)||this).isPureReactComponent=!0,i}return r=t,(e=a).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,a.prototype.shouldComponentUpdate=function(n,i){return ao(this.props,n)||ao(this.state,i)},a}(je);function he(t,e){function r(n){var i=this.props.ref,o=i==n.ref;return!o&&i&&(i.call?i(null):i.current=null),e?!e(this.props,n)||!o:ao(this.props,n)}function a(n){return this.shouldComponentUpdate=r,g(t,Gs({},n))}return a.prototype.isReactComponent=!0,a.displayName="Memo("+(t.displayName||t.name)+")",a.t=!0,a}var zs=P.__b;P.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),zs&&zs(t)};var up=P.__e;function qs(t){return t&&((t=Gs({},t)).__c=null,t.__k=t.__k&&t.__k.map(qs)),t}function Vs(){this.__u=0,this.o=null,this.__b=null}function Xs(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function ha(){this.i=null,this.l=null}P.__e=function(t,e,r){if(t.then){for(var a,n=e;n=n.__;)if((a=n.__c)&&a.__c)return a.__c(t,e.__c)}up(t,e,r)},(Vs.prototype=new je).__c=function(t,e){var r=this;r.o==null&&(r.o=[]),r.o.push(e);var a=Xs(r.__v),n=!1,i=function(){n||(n=!0,a?a(o):o())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c()};var o=function(){var l;if(!--r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});l=r.o.pop();)l.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),t.then(i,i)},Vs.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=qs(this.__b),this.__b=null),[g(je,null,e.u?null:t.children),e.u&&t.fallback]};var Js=function(t,e,r){if(++r[1]===r[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(r=t.i;r;){for(;r.length>3;)r.pop()();if(r[1]r()))}get(){return this.state}subscribe(e){this.observers.push(e)}unsubscribe(e){let r=this.observers.indexOf(e);r!==-1&&this.observers.splice(r,1)}};function W(t){let[e,r]=Be(t.get());return to(()=>{r(t.get());function a(){r(t.get())}return t.subscribe(a),()=>{t.unsubscribe(a)}},[t]),e}function pp(t){switch(t){case"time-ordered":return 0;case"left-heavy":return 1;case"sandwich":return 2;default:return null}}function Ys(t=window.location.hash){try{if(!t.startsWith("#"))return{};let e=t.substr(1).split("&"),r={};for(let a of e){let[n,i]=a.split("=");if(i=decodeURIComponent(i),n==="profileURL")r.profileURL=i;else if(n==="title")r.title=i;else if(n==="localProfilePath")r.localProfilePath=i;else if(n==="view"){let o=pp(i);o!==null?r.viewMode=o:console.error(`Ignoring invalid view specifier: ${i}`)}}return r}catch(e){return console.error("Error when loading hash fragment."),console.error(e),{}}}$();var fa={hover:null,selectedNode:null,configSpaceViewportRect:I.empty,logicalSpaceViewportSize:C.zero},ua=class extends xe{constructor(){super(...arguments);this.setProfileGroup=r=>{this.set({name:r.name,indexToView:r.indexToView,profiles:r.profiles.map(a=>({profile:a,chronoViewState:fa,leftHeavyViewState:fa,sandwichViewState:{callerCallee:null}}))})};this.setProfileIndexToView=r=>{this.state!=null&&(r=we(r,0,this.state.profiles.length-1),this.set({...this.state,indexToView:r}))};this.setSelectedFrame=r=>{this.state==null||this.getActiveProfile()==null||this.updateActiveSandwichViewState(n=>r==null?{callerCallee:null}:{callerCallee:{invertedCallerFlamegraph:fa,calleeFlamegraph:fa,selectedFrame:r}})}}set(r){let a=this.state;a!=null&&r!=null&&hn(a,r)||super.set(r)}getActiveProfile(){return this.state==null?null:this.state.profiles[this.state?.indexToView]||null}updateActiveProfileState(r){if(this.state==null)return;let{indexToView:a,profiles:n}=this.state;this.set({...this.state,profiles:n.map((i,o)=>o!=a?i:r(i))})}updateActiveSandwichViewState(r){this.updateActiveProfileState(a=>({...a,sandwichViewState:r(a.sandwichViewState)}))}updateFlamechartState(r,a){switch(r){case"CHRONO":{this.updateActiveProfileState(n=>({...n,chronoViewState:a(n.chronoViewState)}));break}case"LEFT_HEAVY":{this.updateActiveProfileState(n=>({...n,leftHeavyViewState:a(n.leftHeavyViewState)}));break}case"SANDWICH_CALLEES":{this.updateActiveSandwichViewState(n=>({...n,callerCallee:n.callerCallee==null?null:{...n.callerCallee,calleeFlamegraph:a(n.callerCallee.calleeFlamegraph)}}));break}case"SANDWICH_INVERTED_CALLERS":{this.updateActiveSandwichViewState(n=>({...n,callerCallee:n.callerCallee==null?null:{...n.callerCallee,invertedCallerFlamegraph:a(n.callerCallee.invertedCallerFlamegraph)}}));break}}}setFlamechartHoveredNode(r,a){this.updateFlamechartState(r,n=>({...n,hover:a}))}setSelectedNode(r,a){this.updateFlamechartState(r,n=>({...n,selectedNode:a}))}setConfigSpaceViewportRect(r,a){this.updateFlamechartState(r,n=>({...n,configSpaceViewportRect:a}))}setLogicalSpaceViewportSize(r,a){this.updateFlamechartState(r,n=>({...n,logicalSpaceViewportSize:a}))}clearHoverNode(){this.setFlamechartHoveredNode("CHRONO",null),this.setFlamechartHoveredNode("LEFT_HEAVY",null),this.setFlamechartHoveredNode("SANDWICH_CALLEES",null),this.setFlamechartHoveredNode("SANDWICH_INVERTED_CALLERS",null)}};var Ht=new xe(!1,"flattenRecursion"),Rr=new xe(!1,"searchIsActive"),Lr=new xe("","searchQueryAtom"),Wt=new xe(0,"viewMode"),Ee=new ua(null,"profileGroup");Wt.subscribe(()=>{Ee.clearHoverNode()});var Qs=Ys(),e_=new xe(Qs,"hashParams"),lr=new xe(null,"glCanvas"),oo=new xe(!1,"dragActive"),Zs=window.location.protocol,da=Zs==="http:"||Zs==="https:",vp=da&&Qs.profileURL!=null,lo=new xe(vp,"loading"),so=new xe(!1,"error");var dn=new xe({field:1,direction:1},"tableSortMethod");function pa(){let t=W(Ht),e=W(Ee);if(!e||e.indexToView>=e.profiles.length)return null;let r=e.indexToView,a=e.profiles[r];return{...e.profiles[e.indexToView],profile:Ls({profile:a.profile,flattenRecursion:t}),index:e.indexToView}}var va="speedscope-color-scheme";function mp(){let t=window.localStorage&&window.localStorage[va];return t==="DARK"?1:t==="LIGHT"?2:0}function gp(){return matchMedia("(prefers-color-scheme: dark)")}function yp(t){if(gp().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 _o=class extends xe{constructor(){super(...arguments);this.cycleToNextColorScheme=()=>{this.set(yp(this.get()))}}},sr=new _o(mp(),"colorScheme");sr.subscribe(()=>{let t=sr.get();switch(t){case 1:{window.localStorage[va]="DARK";break}case 2:{window.localStorage[va]="LIGHT";break}case 0:{delete window.localStorage[va];break}default:return t}return t});$();$();var t_=.2,r_=.1,n_=.2,a_=.1,bp=t=>{let e=Qn(30*t),r=360*(.9*t),a=t_+r_*e,n=n_-a_*e;return ce.fromLumaChromaHue(n,a,r)},Sp=` + vec3 colorForBucket(float t) { + float x = triangle(30.0 * t); + float H = 360.0 * (0.9 * t); + float C = ${t_.toFixed(1)} + ${r_.toFixed(1)} * x; + float L = ${n_.toFixed(1)} - ${a_.toFixed(1)} * x; + return hcl2rgb(H, C, L); + } +`,co={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:bp,colorForBucketGLSL:Sp};$();var i_=.25,o_=.2,l_=.8,s_=.15,jp=t=>{let e=Qn(30*t),r=360*(.9*t),a=i_+o_*e,n=l_-s_*e;return ce.fromLumaChromaHue(n,a,r)},Cp=` + vec3 colorForBucket(float t) { + float x = triangle(30.0 * t); + float H = 360.0 * (0.9 * t); + float C = ${i_.toFixed(1)} + ${o_.toFixed(1)} * x; + float L = ${l_.toFixed(1)} - ${s_.toFixed(1)} * x; + return hcl2rgb(H, C, L); + } +`,ma={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:jp,colorForBucketGLSL:Cp};var c_=dt(ma);function U(){return Ye(c_)}function fe(t){return Tr(t)}function __(){return matchMedia("(prefers-color-scheme: dark)")}function h_(t){switch(t){case 0:return"System";case 1:return"Dark";case 2:return"Light"}}function wp(t,e){switch(t){case 0:return e?co:ma;case 1:return co;case 2:return ma}}function f_(t){let[e,r]=Be(()=>__().matches),a=D(o=>{r(o.matches)},[r]);Ke(()=>{let o=__();return o.addEventListener("change",a),()=>{o.removeEventListener("change",a)}},[a]);let n=W(sr),i=wp(n,e);return g(c_.Provider,{value:i,children:t.children})}var Sc=se(p_()),jc=se(m_()),Cc=se(y_()),wc=se(S_()),xc=se(w_()),kc=se(A_()),Ac=se(T_()),Nc=se(R_()),Ec=se(I_()),Tc=se(M_()),Hc=se(B_()),Rc=se($_()),Lc=se(G_()),Ic=se(oc()),Fc=se(mc()),F=["Webkit"],go=["Moz"],oe=["ms"],Te=["Webkit","Moz"],be=["Webkit","ms"],pn=["Webkit","Moz","ms"],qv={plugins:[Sc.default,jc.default,Cc.default,wc.default,xc.default,kc.default,Ac.default,Nc.default,Ec.default,Tc.default,Hc.default,Rc.default],prefixMap:{transform:be,transformOrigin:be,transformOriginX:be,transformOriginY:be,backfaceVisibility:F,perspective:F,perspectiveOrigin:F,transformStyle:F,transformOriginZ:F,animation:F,animationDelay:F,animationDirection:F,animationFillMode:F,animationDuration:F,animationIterationCount:F,animationName:F,animationPlayState:F,animationTimingFunction:F,appearance:Te,userSelect:pn,fontKerning:F,textEmphasisPosition:F,textEmphasis:F,textEmphasisStyle:F,textEmphasisColor:F,boxDecorationBreak:F,clipPath:F,maskImage:F,maskMode:F,maskRepeat:F,maskPosition:F,maskClip:F,maskOrigin:F,maskSize:F,maskComposite:F,mask:F,maskBorderSource:F,maskBorderMode:F,maskBorderSlice:F,maskBorderWidth:F,maskBorderOutset:F,maskBorderRepeat:F,maskBorder:F,maskType:F,textDecorationStyle:Te,textDecorationSkip:Te,textDecorationLine:Te,textDecorationColor:Te,filter:F,fontFeatureSettings:Te,breakAfter:pn,breakBefore:pn,breakInside:pn,columnCount:Te,columnFill:Te,columnGap:Te,columnRule:Te,columnRuleColor:Te,columnRuleStyle:Te,columnRuleWidth:Te,columns:Te,columnSpan:Te,columnWidth:Te,writingMode:be,flex:be,flexBasis:F,flexDirection:be,flexGrow:F,flexFlow:be,flexShrink:F,flexWrap:be,alignContent:F,alignItems:F,alignSelf:F,justifyContent:F,order:F,transitionDelay:F,transitionDuration:F,transitionProperty:F,transitionTimingFunction:F,backdropFilter:F,scrollSnapType:be,scrollSnapPointsX:be,scrollSnapPointsY:be,scrollSnapDestination:be,scrollSnapCoordinate:be,shapeImageThreshold:F,shapeImageMargin:F,shapeImageOutside:F,hyphens:pn,flowInto:be,flowFrom:be,regionFragment:be,boxSizing:go,textAlignLast:go,tabSize:go,wrapFlow:oe,wrapThrough:oe,wrapMargin:oe,touchAction:oe,gridTemplateColumns:oe,gridTemplateRows:oe,gridTemplateAreas:oe,gridTemplate:oe,gridAutoColumns:oe,gridAutoRows:oe,gridAutoFlow:oe,grid:oe,gridRowStart:oe,gridColumnStart:oe,gridRowEnd:oe,gridRow:oe,gridColumn:oe,gridColumnEnd:oe,gridColumnGap:oe,gridRowGap:oe,gridArea:oe,gridGap:oe,textSizeAdjust:be,borderImage:F,borderImageOutset:F,borderImageRepeat:F,borderImageSlice:F,borderImageSource:F,borderImageWidth:F}},Xv=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},Yv=function(){function t(e,r){for(var a=0;a"u"?"undefined":Xv(a))==="object"){for(var l=this.elements.hasOwnProperty(r)?this.elements[r]:new t,_=Object.keys(a),s=0;s<_.length;s+=1)l.set(_[s],a[_[s]],n);this.elements[r]=l;return}this.elements[r]=a}return e}()},{key:"get",value:function(){function e(r){return this.elements[r]}return e}()},{key:"has",value:function(){function e(r){return this.elements.hasOwnProperty(r)}return e}()},{key:"addStyleType",value:function(){function e(r){var a=this;if(gc&&r instanceof Map||r instanceof t)r.forEach(function(o,l){a.set(l,o,!0)});else for(var n=Object.keys(r),i=0;i"u"?"undefined":bc(e))==="object"?(Bc(e.src,"@font-face",[e],!1),'"'+String(e.fontFamily)+'"'):e}return t}(),animationName:function(){function t(e,r){if(Array.isArray(e))return e.map(function(i){return t(i,r)}).join(",");if((typeof e>"u"?"undefined":bc(e))==="object"){var a="keyframe_"+String(im(e)),n="@keyframes "+a+"{";return e instanceof yo?e.forEach(function(i,o){n+=bo(o,[i],r,So,!1).join("")}):Object.keys(e).forEach(function(i){n+=bo(i,[e[i]],r,So,!1).join("")}),n+="}",Oc(a,[n]),a}else return e}return t}()},Ir={},Va=[],Fr=!1,Oc=function(e,r){var a;if(!Ir[e]){if(!Fr){if(typeof document>"u")throw new Error("Cannot automatically buffer without a document");Fr=!0,(0,Fc.default)(gm)}(a=Va).push.apply(a,um(r)),Ir[e]=!0}},Bc=function(e,r,a,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];if(!Ir[e]){var o=bo(r,a,i,So,n);Oc(e,o)}},pm=function(){Va=[],Ir={},Fr=!1,Ze=null};var vm=function(){if(Fr)throw new Error("Cannot buffer while already buffering");Fr=!0},Pc=function(){Fr=!1;var e=Va;return Va=[],e},mm=function(){return Pc().join("")},gm=function(){var e=Pc();e.length>0&&dm(e)},ym=function(){return Object.keys(Ir)},bm=function(e){e.forEach(function(r){Ir[r]=!0})},Sm=function t(e,r,a,n){for(var i=0;i0&&arguments[0]!==void 0?arguments[0]:[];bm(e)}return t}()},km=typeof window<"u"?null:{renderStatic:function(){function t(e){pm(),vm();var r=e(),a=mm();return{html:r,css:{content:a,renderedClassNames:ym()}}}return t}()},Am=null;function zc(t,e){return{StyleSheet:Object.assign({},xm,{extend:function(){function r(a){var n=a.map(function(i){return i.selectorHandler}).filter(function(i){return i});return zc(t,e.concat(n))}return r}()}),StyleSheetServer:km,StyleSheetTestUtils:Am,minify:function(){function r(a){Dc=a?vn:Cm}return r}(),css:function(){function r(){for(var a=arguments.length,n=Array(a),i=0;i{let a=Em(r.name,this.searchQuery);this.matches.set(r,a.length===0?null:a)})),this.matches.get(e)||null}},Ua=class{constructor(e,r){this.flamechart=e;this.profileResults=r;this.matches=null}getResults(){if(this.matches==null){let e=[],r=new Map,a=(i,o)=>{let{node:l}=i;if(this.profileResults.getMatchForFrame(l.frame)){let _=new I(new C(i.start,o),new C(i.end-i.start,1));r.set(l,e.length),e.push({configSpaceBounds:_,node:l})}i.children.forEach(_=>{a(_,o+1)})},n=this.flamechart.getLayers();n.length>0&&n[0].forEach(i=>a(i,0)),this.matches={matches:e,indexForNode:r}}return this.matches}count(){return this.getResults().matches.length}indexOf(e){let r=this.getResults().indexForNode.get(e);return r===void 0?null:r}at(e){let r=this.getResults().matches;if(e<0||e>=r.length)throw new Error(`Index ${e} out of bounds in list of ${r.length} matches.`);return r[e]}};function Vc(t){t.stopPropagation()}var cr=dt(null),Jc=({children:t})=>{let e=pa(),r=e?e.profile:null,a=W(Rr),n=W(Lr),i=Q(()=>!r||!a||n.length===0?null:new Ja(r,n),[a,n,r]);return g(cr.Provider,{value:i},t)},Ka=he(({numResults:t,resultIndex:e,selectNext:r,selectPrev:a})=>{let n=U(),i=Tm(n),o=W(Rr),l=W(Lr),_=Lr.set,s=Rr.set,c=D(p=>{let d=p.target.value;_(d)},[_]),h=$t(null),f=D(()=>s(!1),[s]),v=D(p=>{p.shiftKey?a():r()},[a,r]),b=D(p=>{p.stopPropagation(),p.key==="Escape"&&s(!1),p.key==="Enter"&&v(p),p.key=="f"&&(p.metaKey||p.ctrlKey)&&(h.current&&h.current.select(),p.preventDefault())},[s,v]);return Ke(()=>{let p=d=>{d.key=="f"&&(d.metaKey||d.ctrlKey)&&(d.preventDefault(),h.current?h.current.select():(s(!0),requestAnimationFrame(()=>{h.current&&h.current.select()})))};return window.addEventListener("keydown",p),()=>{window.removeEventListener("keydown",p)}},[s]),o?g("div",{className:x(i.searchView)},g("span",{className:x(i.icon)},"\u{1F50D}"),g("span",{className:x(i.inputContainer)},g("input",{className:x(i.input),value:l,onInput:c,onKeyDown:b,onKeyUp:Vc,onKeyPress:Vc,ref:h})),t!=null&&g(qe,null,g("span",{className:x(i.resultCount)},e==null?"?":e+1,"/",t),g("button",{className:x(i.icon,i.button),onClick:a},"\u2B05\uFE0F"),g("button",{className:x(i.icon,i.button),onClick:r},"\u27A1\uFE0F")),g("svg",{className:x(i.icon),onClick:f,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g("path",{d:"M4.99999 4.16217L11.6427 10.8048M11.6427 4.16217L4.99999 10.8048",stroke:n.altFgSecondaryColor}))):null}),Tm=fe(t=>le.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 Uc(t){return t.replace(/\\([a-fA-F0-9]{2})/g,(e,r)=>{let a=parseInt(r,16);return String.fromCharCode(a)})}function Kc(t){let e=t.split(` +`);if(!e.length||(e[e.length-1]===""&&e.pop(),!e.length))return null;let r=new Map,a=/^(\d+):(.+)$/,n=/^([\$\w]+):([\$\w-]+)$/;for(let i of e){let o=a.exec(i);if(o){r.set(`wasm-function[${o[1]}]`,Uc(o[2]));continue}let l=n.exec(i);if(l){r.set(l[1],Uc(l[2]));continue}return null}return i=>r.has(i.name)?{name:r.get(i.name)}:null}Ao();$();var Mt=class{constructor(e){this.source=e;this.layers=[];this.totalWeight=0;this.minFrameWidth=1;let r=[],a=(i,o)=>{let l=Z(r),_={node:i,parent:l,children:[],start:o,end:o};l&&l.children.push(_),r.push(_)};this.minFrameWidth=1/0;let n=(i,o)=>{console.assert(r.length>0);let l=r.pop();if(l.end=o,l.end-l.start===0)return;let _=r.length;for(;this.layers.length<=_;)this.layers.push([]);this.layers[_].push(l),this.minFrameWidth=Math.min(this.minFrameWidth,l.end-l.start)};this.totalWeight=e.getTotalWeight(),e.forEachCall(a,n),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 r=this.getTotalWeight(),a=Math.pow(2,40),n=we(3*this.getMinFrameWidth(),r/a,r);return we(e,n,r)}getClampedConfigSpaceViewportRect({configSpaceViewportRect:e,renderInverted:r}){let a=new C(this.getTotalWeight(),this.getLayers().length),n=this.getClampedViewportWidth(e.size.x),i=e.size.withX(n),o=C.clamp(e.origin,new C(0,r?0:-1),C.max(C.zero,a.minus(i).plus(new C(0,1))));return new I(o,e.size.withX(n))}};$();var Bm=1e4,Ga=class{constructor(e,r,a){this.batch=e;this.bounds=r;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,r){this.bounds.hasIntersectionWith(e)&&r(this)}},No=class{constructor(e){this.children=e;this.rectCount=0;if(e.length===0)throw new Error("Empty interior node");let r=1/0,a=-1/0,n=1/0,i=-1/0;for(let o of e){this.rectCount+=o.getRectCount();let l=o.getBounds();r=Math.min(r,l.left()),a=Math.max(a,l.right()),n=Math.min(n,l.top()),i=Math.max(i,l.bottom())}this.bounds=new I(new C(r,n),new C(a-r,i-n))}getBounds(){return this.bounds}getRectCount(){return this.rectCount}getChildren(){return this.children}forEachLeafNodeWithinBounds(e,r){if(this.bounds.hasIntersectionWith(e))for(let a of this.children)a.forEachLeafNodeWithinBounds(e,r)}},qa=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,r){return e.getOrInsert(new t(r))}},Xa=class{constructor(e,r,a,n,i,o={inverted:!1}){this.gl=e;this.rowAtlas=r;this.flamechart=a;this.rectangleBatchRenderer=n;this.colorPassRenderer=i;this.options=o;this.layers=[];this.rectInfoTexture=null;this.rectInfoRenderTarget=null;this.atlasKeys=new pt;let l=a.getLayers().length;for(let _=0;_=Bm&&(s.push(new Ga(v,new I(new C(h,c),new C(f-h,1)),b)),h=1/0,f=-1/0,v=new or(this.gl));let y=new I(new C(m.start,c),new C(m.end-m.start,1));h=Math.min(h,y.left()),f=Math.max(f,y.right());let S=new ce((1+d%255)/256,(1+_%255)/256,(1+this.flamechart.getColorBucketForFrame(m.node.frame))/256);v.addRect(y,S),b++}v.getRectCount()>0&&s.push(new Ga(v,new I(new C(h,c),new C(f-h,1)),b)),this.layers.push(new No(s))}}getRectInfoTexture(e,r){if(this.rectInfoTexture){let a=this.rectInfoTexture;(a.width!=e||a.height!=r)&&a.resize(e,r)}else this.rectInfoTexture=this.gl.createTexture(J.TextureFormat.NEAREST_CLAMP,e,r);return this.rectInfoTexture}getRectInfoRenderTarget(e,r){let a=this.getRectInfoTexture(e,r);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:r,zoomLevel:a,index:n}=e,o=this.flamechart.getTotalWeight()/Math.pow(2,a),l=this.flamechart.getLayers().length,_=this.options.inverted?l-1-r:r;return new I(new C(o*n,_),new C(o,1))}render(e){let{configSpaceSrcRect:r,physicalSpaceDstRect:a}=e,n=[],i=z.betweenRects(r,a);if(r.isEmpty())return;let o=0;for(;;){let S=qa.getOrInsert(this.atlasKeys,{stackDepth:0,zoomLevel:o,index:0}),w=this.configSpaceBoundsForKey(S);if(i.transformRect(w).width(){let j=this.configSpaceBoundsForKey(w);this.layers[w.stackDepth].forEachLeafNodeWithinBounds(j,k=>{this.rectangleBatchRenderer.render({batch:k.getBatch(),configSpaceSrcRect:j,physicalSpaceDstRect:S})})});let m=this.getRectInfoRenderTarget(a.width(),a.height());ra(this.gl,m,()=>{this.gl.clear(new J.Color(0,0,0,0));let S=new I(C.zero,new C(this.gl.viewport.width,this.gl.viewport.height)),w=z.betweenRects(r,S);for(let j of p){let k=this.configSpaceBoundsForKey(j);this.rowAtlas.renderViaAtlas(j,w.transformRect(k))}for(let j of d){let k=this.configSpaceBoundsForKey(j),H=w.transformRect(k);this.layers[j.stackDepth].forEachLeafNodeWithinBounds(k,O=>{this.rectangleBatchRenderer.render({batch:O.getBatch(),configSpaceSrcRect:k,physicalSpaceDstRect:H})})}});let y=this.getRectInfoTexture(a.width(),a.height());this.colorPassRenderer.render({rectInfoTexture:y,srcRect:new I(C.zero,new C(y.width,y.height)),dstRect:a,renderOutlines:e.renderOutlines})}};$();$();var bt=fe(t=>le.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%"}}));$();var To="\u2026",Ya=new Map,qc=-1;function Ot(t,e){return window.devicePixelRatio!==qc&&(Ya.clear(),qc=window.devicePixelRatio),Ya.has(e)||Ya.set(e,t.measureText(e).width),Ya.get(e)}function Eo(t,e){if(t.length<=e)return{trimmedString:t,trimmedLength:t.length,prefixLength:t.length,suffixLength:0,originalString:t,originalLength:t.length};let r=Math.floor(e/2),a=e-r-1,n=t.substring(0,r),i=t.substring(t.length-a,t.length),o=n+To+i;return{trimmedString:o,trimmedLength:o.length,prefixLength:n.length,suffixLength:i.length,originalString:t,originalLength:t.length}}function Yc(t,e,r){if(Ot(t,e)<=r)return Eo(e,e.length);let[a]=Es(0,e.length,n=>Ot(t,Eo(e,Math.floor(n)).trimmedString),r);return Eo(e,Math.floor(a))}function Xc(t,e){return e{this.container=r||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=r=>{if(r.preventDefault(),this.frameHadWheelEvent=!0,(r.metaKey||r.ctrlKey)&&this.interactionLock!=="pan"){let n=1+r.deltaY/100;r.ctrlKey&&(n=1+r.deltaY/40),n=we(n,.1,10),this.zoom(n)}else this.interactionLock!=="zoom"&&this.pan(new C(r.deltaX,r.deltaY));this.renderCanvas()};this.dragStartConfigSpaceMouse=null;this.dragConfigSpaceViewportOffset=null;this.draggingMode=null;this.onMouseDown=r=>{let a=this.configSpaceMouse(r);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=r=>{if(!this.dragStartConfigSpaceMouse)return;let a=this.configSpaceMouse(r);if(a){if(this.updateCursor(a),a=new I(new C(0,0),this.configSpaceSize()).closestPointTo(a),this.draggingMode===0){let n=this.dragStartConfigSpaceMouse,i=a;if(!n||!i)return;let o=Math.min(n.x,i.x),_=Math.max(n.x,i.x)-o,s=this.props.configSpaceViewportRect.height();this.props.setConfigSpaceViewportRect(new I(new C(o,i.y-s/2),new C(_,s)))}else if(this.draggingMode===1){if(!this.dragConfigSpaceViewportOffset)return;let n=a.minus(this.dragConfigSpaceViewportOffset);this.props.setConfigSpaceViewportRect(this.props.configSpaceViewportRect.withOrigin(n))}}};this.updateCursor=r=>{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(r)?(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")};this.onMouseMove=r=>{let a=this.configSpaceMouse(r);a&&this.updateCursor(a)};this.onWindowMouseUp=r=>{this.draggingMode=null,window.removeEventListener("mousemove",this.onWindowMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp);let a=this.configSpaceMouse(r);a&&this.updateCursor(a)};this.overlayCanvasRef=r=>{r?(this.overlayCanvas=r,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)}}physicalViewSize(){return new C(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}getStyle(){return bt(this.props.theme)}minimapOrigin(){return new C(0,20*window.devicePixelRatio)}configSpaceSize(){return new C(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}configSpaceToPhysicalViewSpace(){let r=this.minimapOrigin();return z.betweenRects(new I(new C(0,0),this.configSpaceSize()),new I(r,this.physicalViewSize().minus(r)))}logicalToPhysicalViewSpace(){return z.withScale(new C(window.devicePixelRatio,window.devicePixelRatio))}windowToLogicalViewSpace(){if(!this.container)return new z;let r=this.container.getBoundingClientRect();return z.withTranslation(new C(-r.left,-r.top))}renderRects(){this.container&&(this.physicalViewSize().x<2||this.props.canvasContext.renderBehind(this.container,()=>{this.props.flamechartRenderer.render({configSpaceSrcRect:new I(new C(0,0),this.configSpaceSize()),physicalSpaceDstRect:new I(this.minimapOrigin(),this.physicalViewSize().minus(this.minimapOrigin())),renderOutlines:!1}),this.props.canvasContext.viewportRectangleRenderer.render({configSpaceViewportRect:this.props.configSpaceViewportRect,configSpaceToPhysicalViewSpace:this.configSpaceToPhysicalViewSpace()})}))}renderOverlays(){let r=this.overlayCtx;if(!r)return;let a=this.physicalViewSize();r.clearRect(0,0,a.x,a.y);let n=this.configSpaceToPhysicalViewSpace(),i=0,o=this.configSpaceSize().x,_=(this.configSpaceToPhysicalViewSpace().inverted()||new z).times(this.logicalToPhysicalViewSpace()).transformVector(new C(200,1)).x,s=20*window.devicePixelRatio,c=10*window.devicePixelRatio,h=(s-c)/2;r.font=`${c}px/${s}px "Source Code Pro", Courier, monospace`,r.textBaseline="top";let v=Math.pow(10,Math.floor(Math.log10(_)));_/v>5?v*=5:_/v>2&&(v*=2);let b=this.props.theme;{r.fillStyle=ce.fromCSSHex(b.bgPrimaryColor).withAlpha(.8).toCSS(),r.fillRect(0,0,a.x,s),r.textBaseline="top";for(let p=Math.ceil(i/v)*v;ple.create({stackChit:{position:"relative",top:-1,display:"inline-block",verticalAlign:"middle",marginRight:"0.5em",border:`1px solid ${t.fgSecondaryColor}`,width:8,height:8}}));function Qc(t){let e=bt(U()),r=t.formatter(t.selectedTotal),a=t.formatter(t.selectedSelf),n=100*t.selectedTotal/t.grandTotal,i=100*t.selectedSelf/t.grandTotal;return g("div",{className:x(e.statsTable)},g("div",{className:x(t.cellStyle,e.statsTableCell,e.statsTableHeader)},t.title),g("div",{className:x(t.cellStyle,e.statsTableCell)},"Total"),g("div",{className:x(t.cellStyle,e.statsTableCell)},"Self"),g("div",{className:x(t.cellStyle,e.statsTableCell)},r),g("div",{className:x(t.cellStyle,e.statsTableCell)},a),g("div",{className:x(t.cellStyle,e.statsTableCell)},vt(n),g("div",{className:x(e.barDisplay),style:{height:`${n}%`}})),g("div",{className:x(t.cellStyle,e.statsTableCell)},vt(i),g("div",{className:x(e.barDisplay),style:{height:`${i}%`}})))}function Dm(t){let e=bt(U()),r=[],a=t.node;for(;a&&!a.isRoot();a=a.parent){let n=[],{frame:i}=a;if(n.push(g(ei,{color:t.getFrameColor(i)})),r.length&&n.push(g("span",{className:x(e.stackFileLine)},"> ")),n.push(i.name),i.file){let o=i.file;i.line!=null&&(o+=`:${i.line}`,i.col!=null&&(o+=`:${i.col}`)),n.push(g("span",{className:x(e.stackFileLine)}," (",o,")"))}r.push(g("div",{className:x(e.stackLine)},n))}return g("div",{className:x(e.stackTraceView)},g("div",{className:x(e.stackTraceViewPadding)},r))}function eh(t){let e=bt(U()),{flamechart:r,selectedNode:a}=t,{frame:n}=a;return g("div",{className:x(e.detailView)},g(Qc,{title:"This Instance",cellStyle:e.thisInstanceCell,grandTotal:r.getTotalWeight(),selectedTotal:a.getTotalWeight(),selectedSelf:a.getSelfWeight(),formatter:r.formatValue.bind(r)}),g(Qc,{title:"All Instances",cellStyle:e.allInstancesCell,grandTotal:r.getTotalWeight(),selectedTotal:n.getTotalWeight(),selectedSelf:n.getSelfWeight(),formatter:r.formatValue.bind(r)}),g(Dm,{node:a,getFrameColor:t.getCSSColorForFrame}))}var gn=class{constructor(){this.argsBatch=[]}text(e){this.argsBatch.push(e)}fill(e,r){if(this.argsBatch.length!==0){e.fillStyle=r;for(let a of this.argsBatch)e.fillText(a.text,a.x,a.y);this.argsBatch=[]}}},hr=class{constructor(){this.argsBatch=[]}rect(e){this.argsBatch.push(e)}drawPath(e){e.beginPath();for(let r of this.argsBatch)e.rect(r.x,r.y,r.w,r.h);e.closePath(),this.argsBatch=[]}fill(e,r){this.argsBatch.length!==0&&(e.fillStyle=r,this.drawPath(e),e.fill())}stroke(e,r,a){this.argsBatch.length!==0&&(e.strokeStyle=r,e.lineWidth=a,this.drawPath(e),e.stroke())}};var Or=class extends je{constructor(){super(...arguments);this.container=null;this.containerRef=r=>{this.container=r||null};this.overlayCanvas=null;this.overlayCtx=null;this.hoveredLabel=null;this.overlayCanvasRef=r=>{r?(this.overlayCanvas=r,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.onMouseDown=r=>{this.mouseDownPos=this.lastDragPos=new C(r.offsetX,r.offsetY),this.updateCursor(),window.addEventListener("mouseup",this.onWindowMouseUp)};this.onMouseDrag=r=>{if(!this.lastDragPos)return;let a=new C(r.offsetX,r.offsetY);this.pan(this.lastDragPos.minus(a)),this.lastDragPos=a,this.hoveredLabel&&this.props.onNodeHover(null)};this.onDblClick=r=>{if(this.hoveredLabel){let a=this.hoveredLabel.configSpaceBounds,n=new I(a.origin.minus(new C(0,1)),a.size.withY(this.props.configSpaceViewportRect.height()));this.props.setConfigSpaceViewportRect(n)}};this.onClick=r=>{let a=new C(r.offsetX,r.offsetY),n=this.mouseDownPos;this.mouseDownPos=null,!(n&&a.minus(n).length()>5)&&(this.hoveredLabel?(this.props.onNodeSelect(this.hoveredLabel.node),this.renderCanvas()):this.props.onNodeSelect(null))};this.onWindowMouseUp=r=>{this.lastDragPos=null,this.updateCursor(),window.removeEventListener("mouseup",this.onWindowMouseUp)};this.onMouseMove=r=>{if(this.updateCursor(),this.lastDragPos){r.preventDefault(),this.onMouseDrag(r);return}let a=new C(r.offsetX,r.offsetY),n=this.logicalToPhysicalViewSpace().transformPosition(a),i=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(n);if(!i)return;let o=(_,s=0)=>{let c=_.end-_.start,h=this.props.renderInverted?this.configSpaceSize().y-1-s:s,f=new I(new C(_.start,h),new C(c,1));if(i.xf.right())return null;f.contains(i)&&(this.hoveredLabel={configSpaceBounds:f,node:_.node});for(let v of _.children)o(v,s+1)};(()=>{this.hoveredLabel=null})();for(let _ of this.props.flamechart.getLayers()[0]||[])o(_);this.hoveredLabel?this.props.onNodeHover({node:this.hoveredLabel.node,event:r}):this.props.onNodeHover(null),this.renderCanvas()};this.onMouseLeave=r=>{this.hoveredLabel=null,this.props.onNodeHover(null),this.renderCanvas()};this.onWheel=r=>{r.preventDefault(),this.frameHadWheelEvent=!0;let a=r.metaKey||r.ctrlKey,n=r.deltaY,i=r.deltaX;if(r.deltaMode===r.DOM_DELTA_LINE&&(n*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT,i*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT),a&&this.interactionLock!=="pan"){let o=1+n/100;r.ctrlKey&&(o=1+n/40),o=we(o,.1,10),this.zoom(new C(r.offsetX,r.offsetY),o)}else this.interactionLock!=="zoom"&&this.pan(new C(i,n));this.renderCanvas()};this.onWindowKeyPress=r=>{if(!this.container)return;let{width:a,height:n}=this.container.getBoundingClientRect();r.key==="="||r.key==="+"?(this.zoom(new C(a/2,n/2),.5),r.preventDefault()):(r.key==="-"||r.key==="_")&&(this.zoom(new C(a/2,n/2),2),r.preventDefault()),!(r.ctrlKey||r.shiftKey||r.metaKey)&&(r.key==="0"?this.zoom(new C(a/2,n/2),1e9):r.key==="ArrowRight"||r.code==="KeyD"?this.pan(new C(100,0)):r.key==="ArrowLeft"||r.code==="KeyA"?this.pan(new C(-100,0)):r.key==="ArrowUp"||r.code==="KeyW"?this.pan(new C(0,-100)):r.key==="ArrowDown"||r.code==="KeyS"?this.pan(new C(0,100)):r.key==="Escape"&&(this.props.onNodeSelect(null),this.renderCanvas()))}}getStyle(){return bt(this.props.theme)}setConfigSpaceViewportRect(r){this.props.setConfigSpaceViewportRect(r)}configSpaceSize(){return new C(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}physicalViewSize(){return new C(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}physicalBounds(){if(this.props.renderInverted){let r=this.physicalViewSize().y,a=(this.configSpaceSize().y+1)*this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio;if(a{let H=j.end-j.start,O=this.props.renderInverted?this.configSpaceSize().y-1-k:k,T=new I(new C(j.start,O),new C(H,1));if(!(H<_)&&!(T.left()>this.props.configSpaceViewportRect.right())&&!(T.right()this.props.configSpaceViewportRect.bottom())return;if(T.hasIntersectionWith(this.props.configSpaceViewportRect)){let A=a.transformRect(T);if(A.left()<0&&(A=A.withOrigin(A.origin.withX(0)).withSize(A.size.withX(A.size.x+A.left()))),A.right()>o.x&&(A=A.withSize(A.size.withX(o.x-A.left()))),A.width()>l){let B=this.props.searchResults?.getMatchForFrame(j.node.frame),_e=Yc(r,j.node.frame.name,A.width()-2*s);if(B){let Ar=Zc(_e,B),ln=0,Nr=A.left()+s,nr=(i-n)/2-2;for(let[ar,us]of Ar){Nr+=Ot(r,_e.trimmedString.substring(ln,ar));let ds=Ot(r,_e.trimmedString.substring(ar,us));f.rect({x:Nr,y:A.top()+nr,w:ds,h:i-2*nr}),Nr+=ds,ln=us}}(this.props.searchResults!=null&&!B?h:c).text({text:_e.trimmedString,x:A.left()+s,y:Math.round(A.bottom()-(i-n)/2)})}}for(let A of j.children)d(A,k+1)}},m=2*window.devicePixelRatio;r.strokeStyle=this.props.theme.selectionSecondaryColor;let y=(a.inverseTransformVector(new C(1,0))||new C(0,0)).x,S=(j,k=0)=>{if(!this.props.selectedNode&&this.props.searchResults==null)return;let H=j.end-j.start,O=this.props.renderInverted?this.configSpaceSize().y-1-k:k,T=new I(new C(j.start,O),new C(H,1));if(!(Hthis.props.configSpaceViewportRect.right())&&!(T.right()this.props.configSpaceViewportRect.bottom())){if(T.hasIntersectionWith(this.props.configSpaceViewportRect)){if(this.props.searchResults?.getMatchForFrame(j.node.frame)){let A=a.transformRect(T);p.rect({x:Math.round(A.left()+m/2),y:Math.round(A.top()+m/2),w:Math.round(Math.max(0,A.width()-m)),h:Math.round(Math.max(0,A.height()-m))})}if(this.props.selectedNode!=null&&j.node.frame===this.props.selectedNode.frame){let A=j.node===this.props.selectedNode?v:b,B=a.transformRect(T);A.rect({x:Math.round(B.left()+1+m/2),y:Math.round(B.top()+1+m/2),w:Math.round(Math.max(0,B.width()-2-m)),h:Math.round(Math.max(0,B.height()-2-m))})}}for(let A of j.children)S(A,k+1)}};for(let j of this.props.flamechart.getLayers()[0]||[])S(j);for(let j of this.props.flamechart.getLayers()[0]||[])d(j);let w=this.props.theme;if(p.fill(r,w.searchMatchPrimaryColor),f.fill(r,w.searchMatchSecondaryColor),h.fill(r,w.fgSecondaryColor),c.fill(r,this.props.searchResults!=null?w.searchMatchTextColor:w.fgPrimaryColor),b.stroke(r,w.selectionSecondaryColor,m),v.stroke(r,w.selectionPrimaryColor,m),this.hoveredLabel){let j=w.fgPrimaryColor;this.props.selectedNode===this.hoveredLabel.node&&(j=w.selectionPrimaryColor),r.lineWidth=2*devicePixelRatio,r.strokeStyle=j;let k=a.transformRect(this.hoveredLabel.configSpaceBounds);r.strokeRect(Math.round(k.left()),Math.round(k.top()),Math.round(Math.max(0,k.width())),Math.round(Math.max(0,k.height())))}this.renderTimeIndicators()}renderTimeIndicators(){let r=this.overlayCtx;if(!r)return;let a=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio,n=this.physicalViewSize(),i=this.configSpaceToPhysicalViewSpace(),o=10*window.devicePixelRatio,l=(a-o)/2,_=this.props.configSpaceViewportRect.left(),s=this.props.configSpaceViewportRect.right(),h=(this.configSpaceToPhysicalViewSpace().inverted()||new z).times(this.logicalToPhysicalViewSpace()).transformVector(new C(200,1)).x,v=Math.pow(10,Math.floor(Math.log10(h)));h/v>5?v*=5:h/v>2&&(v*=2);let b=this.props.theme;{let p=this.props.renderInverted?n.y-a:0;r.fillStyle=ce.fromCSSHex(b.bgPrimaryColor).withAlpha(.8).toCSS(),r.fillRect(0,p,n.x,a),r.textBaseline="top";for(let d=Math.ceil(_/v)*v;d{this.props.flamechartRenderer.render({physicalSpaceDstRect:this.physicalBounds(),configSpaceSrcRect:this.props.configSpaceViewportRect,renderOutlines:!0})}))}pan(r){this.interactionLock="pan";let a=this.logicalToPhysicalViewSpace().transformVector(r),n=this.configSpaceToPhysicalViewSpace().inverseTransformVector(a);this.hoveredLabel&&this.props.onNodeHover(null),n&&this.props.transformViewport(z.withTranslation(n))}zoom(r,a){this.interactionLock="zoom";let n=this.logicalToPhysicalViewSpace().transformPosition(r),i=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(n);if(!i)return;let o=z.withTranslation(i.times(-1)).scaledBy(new C(a,1)).translatedBy(i);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(r){this.props.flamechart!==r.flamechart?(this.hoveredLabel=null,this.renderCanvas()):this.props.searchResults!==r.searchResults?this.renderCanvas():this.props.selectedNode!==r.selectedNode?this.renderCanvas():this.props.configSpaceViewportRect!==r.configSpaceViewportRect?this.renderCanvas():this.props.canvasContext!==r.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),r.canvasContext&&(r.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),r.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 r=this.getStyle();return g("div",{className:x(r.panZoomView,ge.vbox),onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onClick:this.onClick,onDblClick:this.onDblClick,onWheel:this.onWheel,ref:this.containerRef},g("canvas",{width:1,height:1,ref:this.overlayCanvasRef,className:x(r.fill)}))}};function ri(t){let e=Vm(U()),{containerSize:r,offset:a}=t,n=r.x,i=r.y,o=7,l=D(_=>{if(!_)return;let s=_.getBoundingClientRect(),c=a.x+o;c+s.width>n-1&&(c=n-s.width-1,c<1&&(c=1)),_.style.left=`${c}px`;let h=a.y+o;h+s.height>i-1&&(h=a.y-s.height-1,h<1&&(h=1)),_.style.top=`${h}px`},[n,i,a.x,a.y]);return g("div",{className:x(e.hoverTip),ref:l},g("div",{className:x(e.hoverTipRow)},t.children))}var ti=2,Vm=fe(t=>le.create({hoverTip:{position:"absolute",background:t.bgPrimaryColor,border:"1px solid black",maxWidth:900,paddingTop:ti,paddingBottom:ti,pointerEvents:"none",userSelect:"none",fontSize:10,fontFamily:'"Source Code Pro", Courier, monospace',zIndex:2},hoverTipRow:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflowX:"hidden",paddingLeft:ti,paddingRight:ti,maxWidth:900}}));var th=dt(null),Ho=({flamechart:t,selectedNode:e,setSelectedNode:r,configSpaceViewportRect:a,setConfigSpaceViewportRect:n,children:i})=>{let o=Ye(cr),l=Q(()=>o==null?null:new Ua(t,o),[t,o]);return g(th.Provider,{value:{results:l,flamechart:t,selectedNode:e,setSelectedNode:r,configSpaceViewportRect:a,setConfigSpaceViewportRect:n}},i)},rh=he(()=>{let t=Ye(th),e=t==null?null:t.results,r=t==null?null:t.selectedNode,a=t==null?null:t.setSelectedNode,n=t==null?null:t.configSpaceViewportRect,i=t==null?null:t.setConfigSpaceViewportRect,o=t==null?null:t.flamechart,l=e==null?null:e.count(),_=Q(()=>e==null||r==null?null:e.indexOf(r),[e,r]),s=D(f=>{if(!a||!o||!n||!i)return;let v=f.configSpaceBounds,b=new I(v.origin.minus(new C(0,1)),v.size.withY(n.height()));a(f.node),i(o.getClampedConfigSpaceViewportRect({configSpaceViewportRect:b}))},[n,i,a,o]),{selectPrev:c,selectNext:h}=Q(()=>l==null||l===0||e==null?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{if(!e?.at||l==null||l===0)return;let f=_==null?l-1:_-1;f<0&&(f=l-1);let v=e.at(f);s(v)},selectNext:()=>{if(!e?.at||l==null||l===0)return;let f=_==null?0:_+1;f>=l&&(f=0);let v=e.at(f);s(v)}},[l,_,e,s]);return g(Ka,{resultIndex:_,numResults:l,selectPrev:c,selectNext:h})});var lt=class extends je{};var yn=class extends lt{constructor(){super(...arguments);this.setConfigSpaceViewportRect=r=>{let a=150/20,n=this.configSpaceSize(),i=this.props.flamechart.getClampedViewportWidth(r.size.x),o=r.size.withX(i),l=C.clamp(r.origin,new C(0,-1),C.max(C.zero,n.minus(o).plus(new C(0,a+1))));this.props.setConfigSpaceViewportRect(new I(l,r.size.withX(i)))};this.setLogicalSpaceViewportSize=r=>{this.props.setLogicalSpaceViewportSize(r)};this.transformViewport=r=>{let a=r.transformRect(this.props.configSpaceViewportRect);this.setConfigSpaceViewportRect(a)};this.onNodeHover=r=>{this.props.setNodeHover(r)};this.onNodeClick=r=>{this.props.setSelectedNode(r)};this.container=null;this.containerRef=r=>{this.container=r||null}}getStyle(){return bt(this.props.theme)}configSpaceSize(){return new C(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}formatValue(r){let a=this.props.flamechart.getTotalWeight(),n=100*r/a,i=vt(n);return`${this.props.flamechart.formatValue(r)} (${i})`}renderTooltip(){if(!this.container)return null;let{hover:r}=this.props;if(!r)return null;let{width:a,height:n,left:i,top:o}=this.container.getBoundingClientRect(),l=new C(r.event.clientX-i,r.event.clientY-o),_=r.node.frame,s=this.getStyle();return g(ri,{containerSize:new C(a,n),offset:l},g("span",{className:x(s.hoverCount)},this.formatValue(r.node.getTotalWeight()))," ",_.name,_.file?g("div",null,_.file,":",_.line):void 0)}render(){let r=this.getStyle();return g("div",{className:x(r.fill,ge.vbox),ref:this.containerRef},g(Za,{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}),g(cr.Consumer,null,a=>g(qe,null,g(Or,{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}),g(rh,null))),this.renderTooltip(),this.props.selectedNode&&g(eh,{flamechart:this.props.flamechart,getCSSColorForFrame:this.props.getCSSColorForFrame,selectedNode:this.props.selectedNode}))}};function Br(t){return{setNodeHover:D(e=>{Ee.setFlamechartHoveredNode(t,e)},[t]),setLogicalSpaceViewportSize:D(e=>{Ee.setLogicalSpaceViewportSize(t,e)},[t]),setConfigSpaceViewportRect:D(e=>{Ee.setConfigSpaceViewportRect(t,e)},[t]),setSelectedNode:D(e=>{Ee.setSelectedNode(t,e)},[t])}}var Jm=Oe(({profile:t,getColorBucketForFrame:e})=>new Mt({getTotalWeight:t.getTotalWeight.bind(t),forEachCall:t.forEachCall.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),Pr=t=>Oe(({canvasContext:e,flamechart:r})=>new Xa(e.gl,Rs(e),r,e.rectangleBatchRenderer,e.flamechartColorPassRenderer,t)),Um=Pr(),ah=he(t=>{let{activeProfileState:e,glCanvas:r}=t,{profile:a,chronoViewState:n}=e,i=U(),o=Et({theme:i,canvas:r}),l=Tt(a),_=Kt(l),s=Nt({theme:i,frameToColorBucket:l}),c=Jm({profile:a,getColorBucketForFrame:_}),h=Um({canvasContext:o,flamechart:c}),f=Br("CHRONO");return g(Ho,{flamechart:c,selectedNode:n.selectedNode,setSelectedNode:f.setSelectedNode,configSpaceViewportRect:n.configSpaceViewportRect,setConfigSpaceViewportRect:f.setConfigSpaceViewportRect},g(yn,{theme:i,renderInverted:!1,flamechart:c,flamechartRenderer:h,canvasContext:o,getCSSColorForFrame:s,...n,...f}))}),Km=Oe(({profile:t,getColorBucketForFrame:e})=>new Mt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),$m=Pr(),ih=he(t=>{let{activeProfileState:e,glCanvas:r}=t,{profile:a,leftHeavyViewState:n}=e,i=U(),o=Et({theme:i,canvas:r}),l=Tt(a),_=Kt(l),s=Nt({theme:i,frameToColorBucket:l}),c=Km({profile:a,getColorBucketForFrame:_}),h=$m({canvasContext:o,flamechart:c}),f=Br("LEFT_HEAVY");return g(Ho,{flamechart:c,selectedNode:n.selectedNode,setSelectedNode:f.setSelectedNode,configSpaceViewportRect:n.configSpaceViewportRect,setConfigSpaceViewportRect:f.setConfigSpaceViewportRect},g(yn,{theme:i,renderInverted:!1,flamechart:c,flamechartRenderer:h,canvasContext:o,getCSSColorForFrame:s,...n,...f}))});function lh(t,e){return Xm(t,e)}var Ro=97,sh=122,_h=65,Wm=90,Gm=48,qm=57;function oh(t){let e=t.charCodeAt(0);return Ro<=e&&e<=sh?1:_h<=e&&e<=Wm?2:Gm<=e&&e<=qm?3:0}function Lo(t,e){if(t===e)return!0;let r=e.charCodeAt(0);return Ro<=r&&r<=sh?t.charCodeAt(0)===r-Ro+_h:!1}function Xm(t,e){if(e.length==0)return{matchedRanges:[],score:0};let r=0,a=-1,n=-1,i=t.length,o=e.length;for(let l=0;l=a;l--){let _=t[l],s=e[r];if(Lo(_,s)&&(r--,r<0))return a=l,r1(t,e,a,n)}throw new Error("Implementation error. This must be a bug in fzfFuzzyMatchV1")}var Io=16,ch=-3,Fo=-1,Mo=Io/2,Ym=Io/2,Zm=Mo+Fo,Qm=-(ch+Fo),e1=2;function t1(t,e){return t===0&&e!==0?Mo:t===1&&e==2||t!==3&&e==3?Zm:e===0?Ym:0}function r1(t,e,r,a){let n=0,i=0,o=!1,l=0,_=0,s=new Array(e.length),c=0;r>0&&(c=oh(t[r-1]));for(let f=r;f{l(),t(_)},[l,t,_]),v=D(y=>{e(_)},[e,_]),b=r.getName(),p=1+Math.floor(Math.log10(i)),d=x(h.highlighted),m=Q(()=>n1(b,s,d),[b,s,d]);return g("div",{ref:o,onMouseUp:f,onMouseEnter:v,title:b,className:x(h.profileRow,c%2===0&&h.profileRowEven,a&&h.profileRowSelected,n&&h.profileRowHovered)},g("span",{className:x(h.profileIndex,a&&h.profileIndexSelected),style:{width:p+"em"}},_+1,":")," ",m)}function hh(t){t.stopPropagation()}function i1(t,e){let r=[];for(let a=0;a-a.score),r}function uh({profiles:t,closeProfileSelect:e,indexToView:r,visible:a,setProfileIndexToView:n}){let i=dh(U()),[o,l]=Be(""),_=D(S=>{let w=S.target.value;l(w)},[l]),s=D(S=>{S&&(a?S.select():S.blur())},[a]),c=Q(()=>i1(t,o),[t,o]),[h,f]=Be(0),v=$t(null);Ke(()=>{a&&(f(null),v.current!==null&&v.current.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}))},[a]);let b=D(S=>{S.stopPropagation();let w=null;switch(S.key){case"Enter":{h!=null&&(e(),n(h));break}case"Escape":{e();break}case"ArrowDown":{if(S.preventDefault(),w=0,h!=null){let j=c.findIndex(k=>k.indexInProfileGroup===h);j!==-1&&(w=j+1)}break}case"ArrowUp":{if(S.preventDefault(),w=c.length-1,h!=null){let j=c.findIndex(k=>k.indexInProfileGroup===h);j!==-1&&(w=j-1)}break}}if(w!=null&&w>=0&&w{c.length>0&&(f(c[0].indexInProfileGroup),d(!0))},[f,c]);let m=D(S=>{p&&S&&(S.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}),d(!1))},[p,d]),y=D(S=>{v.current=S,m(S)},[v,m]);return g("div",{className:x(i.profileSelectOuter)},g("div",{className:x(i.caret)}),g("div",{className:x(i.profileSelectBox)},g("div",{className:x(i.filterInputContainer)},g("input",{type:"text",className:x(i.filterInput),ref:s,placeholder:"Filter...",value:o,onInput:_,onKeyDown:b,onKeyUp:hh,onKeyPress:hh})),g("div",{className:x(i.profileSelectScrolling)},c.map(({profile:S,matchedRanges:w,indexInProfileGroup:j},k)=>{let H,O=j===r,T=j===h;return O&&T?H=y:O?H=v:T&&(H=m),g(a1,{setHoveredProfileIndex:f,indexInProfileGroup:j,indexInFilteredListView:k,hovered:j==h,selected:j===r,profile:S,profileCount:t.length,nodeRef:H,matchedRanges:w,setProfileIndexToView:n,closeProfileSelect:e})}),c.length===0?g("div",{className:x(i.profileRow)},'No results match filter "',o,'"'):null)))}var fh=10,dh=fe(t=>le.create({filterInputContainer:{display:"flex",flexDirection:"column",padding:5,alignItems:"stretch"},filterInput:{color:t.altFgPrimaryColor,background:t.altBgSecondaryColor,borderRadius:5,padding:5,":focus":{border:"none",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:fh,background:t.altBgPrimaryColor},profileRow:{height:18,border:"1px solid transparent",textAlign:"left",paddingLeft:10,paddingRight:10,background:t.altBgPrimaryColor,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:"pointer"},profileRowHovered:{border:`1px solid ${t.selectionPrimaryColor}`},profileRowSelected:{background:t.selectionPrimaryColor},profileRowEven:{background:t.altBgSecondaryColor},profileSelectScrolling:{maxHeight:`min(calc(100vh - ${20-2*fh}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:480,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}}));$();function Oo(t,e){return D(()=>t(e),[t,e])}function l1(t){let e=ni(U()),r=Oo(Wt.set,0),a=Oo(Wt.set,1),n=Oo(Wt.set,2);return t.activeProfileState?g("div",{className:x(e.toolbarLeft)},g("div",{className:x(e.toolbarTab,t.viewMode===0&&e.toolbarTabActive),onClick:r},g("span",{className:x(e.emoji)},"\u{1F570}"),"Time Order"),g("div",{className:x(e.toolbarTab,t.viewMode===1&&e.toolbarTabActive),onClick:a},g("span",{className:x(e.emoji)},"\u2B05\uFE0F"),"Left Heavy"),g("div",{className:x(e.toolbarTab,t.viewMode===2&&e.toolbarTabActive),onClick:n},g("span",{className:x(e.emoji)},"\u{1F96A}"),"Sandwich")):null}var s1=(()=>{let t=null;return e=>{let r=e?.profiles.map(a=>a.profile)||null;return(t===null||r!=null&&!hn(t,r))&&(t=r),t}})();function _1(t){let e=ni(U()),{activeProfileState:r,profileGroup:a}=t,n=s1(a),[i,o]=Be(!1),l=D(()=>{o(!0)},[o]),_=D(()=>{o(!1)},[o]);return Ke(()=>{let s=c=>{c.key==="t"&&(c.preventDefault(),o(!0))};return window.addEventListener("keypress",s),()=>{window.removeEventListener("keypress",s)}},[o]),Ke(()=>{let s=c=>{c.key==="t"&&(c.preventDefault(),o(!0))};return window.addEventListener("keypress",s),()=>{window.removeEventListener("keypress",s)}},[o]),r&&a&&n?a.profiles.length===1?g(qe,null,r.profile.getName()):g("div",{className:x(e.toolbarCenter),onMouseLeave:_},g("span",{onMouseOver:l},r.profile.getName()," ",g("span",{className:x(e.toolbarProfileIndex)},"(",r.index+1,"/",a.profiles.length,")")),g("div",{style:{display:i?"block":"none"}},g(uh,{setProfileIndexToView:t.setProfileIndexToView,indexToView:a.indexToView,profiles:n,closeProfileSelect:_,visible:i}))):g(qe,null,"\u{1F52C}speedscope")}function c1(t){let e=ni(U()),r=W(sr),a=g("div",{className:x(e.toolbarTab),onClick:t.saveFile},g("span",{className:x(e.emoji)},"\u2934\uFE0F"),"Export"),n=g("div",{className:x(e.toolbarTab),onClick:t.browseForFile},g("span",{className:x(e.emoji)},"\u2935\uFE0F"),"Import"),i=g("div",{className:x(e.toolbarTab),onClick:sr.cycleToNextColorScheme},g("span",{className:x(e.emoji)},"\u{1F3A8}"),g("span",{className:x(e.toolbarTabColorSchemeToggle)},h_(r))),o=g("div",{className:x(e.toolbarTab)},g("a",{href:"https://github.com/jlfwong/speedscope#usage",className:x(e.noLinkStyle),target:"_blank"},g("span",{className:x(e.emoji)},"\u2753"),"Help"));return g("div",{className:x(e.toolbarRight)},t.activeProfileState&&a,n,i,o)}function ph(t){let e=ni(U());return g("div",{className:x(e.toolbar)},g(l1,{...t}),g(_1,{...t}),g(c1,{...t}))}var ni=fe(t=>le.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"}}));$();var T1=Promise.resolve().then(()=>se(Yo())),H1=!1;async function Ph(t,e){let r=await T1,a=null,n=null;try{n=JSON.parse(t),a=new r.SourceMapConsumer(n)}catch{return null}let i=[];a.eachMapping(function(l){i.push({...l,generatedColumn:l.generatedColumn+1,originalColumn:l.originalColumn+1})},{},r.SourceMapConsumer.GENERATED_ORDER);let o=e.replace(/\.[^/]*$/,"");return l=>{let _=!1;if((n?.file&&n?.file===l.file||("/"+l.file?.replace(/\.[^/]*$/,"")).endsWith("/"+o))&&(_=!0),!_||l.line==null||l.col==null)return null;let s=Ts(i,f=>f.generatedLine>l.line?!0:f.generatedLine=l.col);if(s===-1)s=i.length-1;else{if(s===0)return null;s--}let c=i[s],h={};if(c.name!=null)h.name=c.name;else if(c.source!=null){let f=a?.sourceContentFor(c.source,!0);if(f){let b=f.split(` +`)[c.originalLine-1];if(b){let p=/\w+/.exec(b.substr(c.originalColumn-1));p&&(h.name=p[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),H1&&(console.groupCollapsed(`Remapping "${l.name}" -> "${h.name}"`),console.log("before",{...l}),console.log("item @ index",c),console.log("item @ index + 1",i[s+1]),console.log("after",h),console.groupEnd()),h}}$();var Dh=({items:t,axis:e,renderItems:r,className:a,initialIndexInView:n})=>{let[i,o]=Be(null),[l,_]=Be(0),s=$t(null),c=e==="x"?"width":"height",h=e==="x"?"left":"top",f=e==="x"?"scrollLeft":"scrollTop",v=n?t.reduce((j,k,H)=>H{j?requestAnimationFrame(()=>{o(j.getBoundingClientRect()[c]),b.current!=null&&(j.scrollTo({[h]:b.current}),b.current=null)}):o(null),s.current=j},[o,c,h]),d=Q(()=>{if(s.current==null||i==null||l==null)return null;let j=l-i/4,k=l+i+i/4,H=0,O=0,T=0;for(;T=j)break}let A=T;for(;T=k)break}let B=Math.min(T,t.length-1);return{firstVisibleIndex:A,lastVisibleIndex:B,invisiblePrefixSize:O}},[i,l,t]),m=Q(()=>t.reduce((j,k)=>j+k.size,0),[t]),y=D(()=>{s.current!=null&&_(s.current[f])},[f]);Ke(()=>{let j=()=>{s.current!=null&&o(s.current.getBoundingClientRect()[c])};return window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[c]);let S=Q(()=>d?r(d.firstVisibleIndex,d.lastVisibleIndex):null,[r,d]),w=Q(()=>g("div",{style:{height:m}},g("div",{style:{transform:`translateY(${d?.invisiblePrefixSize||0}px)`}},S)),[d,S,m]);return g("div",{className:a,ref:p,onScroll:y},w)};function zh(t){let e=_i(U());return g("div",{className:x(e.hBarDisplay)},g("div",{className:x(e.hBarDisplayFilled),style:{width:`${t.perc}%`}}))}function Zo(t){let e=U(),r=_i(e),{activeDirection:a}=t,n=a===0?e.fgPrimaryColor:e.fgSecondaryColor,i=a===1?e.fgPrimaryColor:e.fgSecondaryColor;return g("svg",{width:"8",height:"10",viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:x(r.sortIcon)},g("path",{d:"M0 4L4 0L8 4H0Z",fill:n}),g("path",{d:"M0 4L4 0L8 4H0Z",transform:"translate(0 10) scale(1 -1)",fill:i}))}function I1(t,e,r){let a=[],n=0;for(let i of e)a.push(t.slice(n,i[0])),a.push(g("span",{className:r},t.slice(i[0],i[1]))),n=i[1];return a.push(t.slice(n)),g("span",null,a)}var F1=({frame:t,matchedRanges:e,profile:r,index:a,selectedFrame:n,setSelectedFrame:i,getCSSColorForFrame:o})=>{let l=_i(U()),_=t.getTotalWeight(),s=t.getSelfWeight(),c=100*_/r.getTotalNonIdleWeight(),h=100*s/r.getTotalNonIdleWeight(),f=t===n;return g("tr",{key:`${a}`,onClick:i.bind(null,t),className:x(l.tableRow,a%2==0&&l.tableRowEven,f&&l.tableRowSelected)},g("td",{className:x(l.numericCell)},r.formatValue(_)," (",vt(c),")",g(zh,{perc:c})),g("td",{className:x(l.numericCell)},r.formatValue(s)," (",vt(h),")",g(zh,{perc:h})),g("td",{title:t.file,className:x(l.textCell)},g(ei,{color:o(t)}),e?I1(t.name,e,x(l.matched,f&&l.matchedSelected)):t.name))},M1=he(({profile:t,sortMethod:e,setSortMethod:r,selectedFrame:a,setSelectedFrame:n,getCSSColorForFrame:i,searchQuery:o,searchIsActive:l})=>{let _=_i(U()),s=D((d,m)=>{if(m.preventDefault(),e.field==d)r({field:d,direction:e.direction===0?1:0});else switch(d){case 0:{r({field:d,direction:0});break}case 1:{r({field:d,direction:1});break}case 2:{r({field:d,direction:1});break}}},[e,r]),c=Ye(Cn),h=D((d,m)=>{if(!c)return null;let y=[];for(let S=d;S<=m;S++){let w=c.rowList[S],j=c.getSearchMatchForFrame(w);y.push(F1({frame:w,matchedRanges:j??null,index:S,profile:t,selectedFrame:a,setSelectedFrame:n,getCSSColorForFrame:i}))}return y.length===0&&(l?y.push(g("tr",null,g("td",{className:x(_.emptyState)},'No symbol names match query "',o,'".'))):y.push(g("tr",null,g("td",{className:x(_.emptyState)},"No symbols found.")))),g("table",{className:x(_.tableView)},y)},[c,t,a,n,i,l,o,_.emptyState,_.tableView]),f=Q(()=>c==null?[]:c.rowList.map(d=>({size:20})),[c]),v=D(d=>s(2,d),[s]),b=D(d=>s(1,d),[s]),p=D(d=>s(0,d),[s]);return g("div",{className:x(ge.vbox,_.profileTableView)},g("table",{className:x(_.tableView)},g("thead",{className:x(_.tableHeader)},g("tr",null,g("th",{className:x(_.numericCell),onClick:v},g(Zo,{activeDirection:e.field===2?e.direction:null}),"Total"),g("th",{className:x(_.numericCell),onClick:b},g(Zo,{activeDirection:e.field===1?e.direction:null}),"Self"),g("th",{className:x(_.textCell),onClick:p},g(Zo,{activeDirection:e.field===0?e.direction:null}),"Symbol Name")))),g(Dh,{axis:"y",items:f,className:x(_.scrollView),renderItems:h,initialIndexInView:a==null?null:c?.getIndexForFrame(a)}))}),_i=fe(t=>le.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:ce.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"}})),Vh=he(t=>{let{activeProfileState:e}=t,{profile:r,sandwichViewState:a}=e;if(!r)throw new Error("profile missing");let n=W(dn),i=U(),{callerCallee:o}=a,l=o?o.selectedFrame:null,_=Tt(r),s=Nt({theme:i,frameToColorBucket:_}),c=D(v=>{Ee.setSelectedFrame(v)},[]),h=W(Rr),f=W(Lr);return g(M1,{profile:r,selectedFrame:l,getCSSColorForFrame:s,sortMethod:n,setSelectedFrame:c,setSortMethod:dn.set,searchIsActive:h,searchQuery:f})});$();$();var Kr=class extends lt{constructor(){super(...arguments);this.setConfigSpaceViewportRect=r=>{this.props.setConfigSpaceViewportRect(this.clampViewportToFlamegraph(r))};this.setLogicalSpaceViewportSize=r=>{this.props.setLogicalSpaceViewportSize(r)};this.transformViewport=r=>{this.setConfigSpaceViewportRect(r.transformRect(this.props.configSpaceViewportRect))};this.container=null;this.containerRef=r=>{this.container=r||null};this.setNodeHover=r=>{this.props.setNodeHover(r)}}clampViewportToFlamegraph(r){let{flamechart:a,renderInverted:n}=this.props;return a.getClampedConfigSpaceViewportRect({configSpaceViewportRect:r,renderInverted:n})}formatValue(r){let a=this.props.flamechart.getTotalWeight(),n=100*r/a,i=vt(n);return`${this.props.flamechart.formatValue(r)} (${i})`}renderTooltip(){if(!this.container)return null;let{hover:r}=this.props;if(!r)return null;let{width:a,height:n,left:i,top:o}=this.container.getBoundingClientRect(),l=new C(r.event.clientX-i,r.event.clientY-o),_=O1(this.props.theme),s=r.node.frame;return g(ri,{containerSize:new C(a,n),offset:l},g("span",{className:x(_.hoverCount)},this.formatValue(r.node.getTotalWeight()))," ",s.name,s.file?g("div",null,s.file,":",s.line):void 0)}render(){return g("div",{className:x(ge.fillY,ge.fillX,ge.vbox),ref:this.containerRef},g(Or,{theme:this.props.theme,selectedNode:null,onNodeHover:this.setNodeHover,onNodeSelect:Er,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())}},O1=fe(t=>le.create({hoverCount:{color:t.weightColor}}));var B1=Oe(({profile:t,frame:e,flattenRecursion:r})=>{let a=t.getInvertedProfileForCallersOf(e);return r?a.getProfileWithRecursionFlattened():a}),P1=Oe(({invertedCallerProfile:t,getColorBucketForFrame:e})=>new Mt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),D1=Pr({inverted:!0}),Jh=he(t=>{let{activeProfileState:e}=t,{profile:r,sandwichViewState:a}=e,n=W(Ht),i=W(lr),o=U();if(!r)throw new Error("profile missing");if(!i)throw new Error("glCanvas missing");let{callerCallee:l}=a;if(!l)throw new Error("callerCallee missing");let{selectedFrame:_}=l,s=Tt(r),c=Kt(s),h=Nt({theme:o,frameToColorBucket:s}),f=Et({theme:o,canvas:i}),v=P1({invertedCallerProfile:B1({profile:r,frame:_,flattenRecursion:n}),getColorBucketForFrame:c}),b=D1({canvasContext:f,flamechart:v});return g(Kr,{theme:o,renderInverted:!0,flamechart:v,flamechartRenderer:b,canvasContext:f,getCSSColorForFrame:h,...Br("SANDWICH_INVERTED_CALLERS"),...l.invertedCallerFlamegraph,setSelectedNode:Er})});$();var z1=Oe(({profile:t,frame:e,flattenRecursion:r})=>{let a=t.getProfileForCalleesOf(e);return r?a.getProfileWithRecursionFlattened():a}),V1=Oe(({calleeProfile:t,getColorBucketForFrame:e})=>new Mt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),J1=Pr(),Uh=he(t=>{let{activeProfileState:e}=t,{profile:r,sandwichViewState:a}=e,n=W(Ht),i=W(lr),o=U();if(!r)throw new Error("profile missing");if(!i)throw new Error("glCanvas missing");let{callerCallee:l}=a;if(!l)throw new Error("callerCallee missing");let{selectedFrame:_}=l,s=Tt(r),c=Kt(s),h=Nt({theme:o,frameToColorBucket:s}),f=Et({theme:o,canvas:i}),v=V1({calleeProfile:z1({profile:r,frame:_,flattenRecursion:n}),getColorBucketForFrame:c}),b=J1({canvasContext:f,flamechart:v});return g(Kr,{theme:o,renderInverted:!1,flamechart:v,flamechartRenderer:b,canvasContext:f,getCSSColorForFrame:h,...Br("SANDWICH_CALLEES"),...l.calleeFlamegraph,setSelectedNode:Er})});var Kh=he(()=>{let t=Ye(Cn),e=t!=null?t.rowList:null,r=t?.selectedFrame!=null?t.getIndexForFrame(t.selectedFrame):null,a=e!=null?e.length:null,{selectPrev:n,selectNext:i}=Q(()=>e==null||a==null||a===0||t==null?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{let o=r==null?a-1:r-1;o<0&&(o=a-1),t.setSelectedFrame(e[o])},selectNext:()=>{let o=r==null?0:r+1;o>=a&&(o=0),t.setSelectedFrame(e[o])}},[r,e,a,t]);return g(Ka,{resultIndex:r,numResults:a,selectPrev:n,selectNext:i})});$();var Qo=class extends lt{constructor(){super(...arguments);this.setSelectedFrame=r=>{this.props.setSelectedFrame(r)};this.onWindowKeyPress=r=>{r.key==="Escape"&&this.setSelectedFrame(null)}}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyPress)}render(){let r=U1(this.props.theme),{selectedFrame:a}=this.props,n=null;return a&&(n=g("div",{className:x(ge.fillY,r.callersAndCallees,ge.vbox)},g("div",{className:x(ge.hbox,r.panZoomViewWraper)},g("div",{className:x(r.flamechartLabelParent)},g("div",{className:x(r.flamechartLabel)},"Callers")),g(Jh,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})),g("div",{className:x(r.divider)}),g("div",{className:x(ge.hbox,r.panZoomViewWraper)},g("div",{className:x(r.flamechartLabelParent,r.flamechartLabelParentBottom)},g("div",{className:x(r.flamechartLabel,r.flamechartLabelBottom)},"Callees")),g(Uh,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})))),g("div",{className:x(ge.hbox,ge.fillY)},g("div",{className:x(r.tableView)},g(Vh,{activeProfileState:this.props.activeProfileState}),g(Kh,null)),n)}},U1=fe(t=>le.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}})),Cn=dt(null),$h=he(t=>{let{activeProfileState:e,glCanvas:r}=t,{sandwichViewState:a,index:n}=e,{callerCallee:i}=a,o=U(),l=D(d=>{Ee.setSelectedFrame(d)},[]),_=e.profile,s=W(dn),c=Ye(cr),h=i?i.selectedFrame:null,f=Q(()=>{let d=[];switch(_.forEachFrame(m=>{c&&!c.getMatchForFrame(m)||d.push(m)}),s.field){case 0:{Ie(d,m=>m.name.toLowerCase());break}case 1:{Ie(d,m=>m.getSelfWeight());break}case 2:{Ie(d,m=>m.getTotalWeight());break}}return s.direction===1&&d.reverse(),d},[_,c,s]),v=Q(()=>{let d=new Map;for(let m=0;m{let y=d.get(m);return y??null}},[f]),b=Q(()=>d=>c==null?null:c.getMatchForFrame(d),[c]),p={rowList:f,selectedFrame:h,setSelectedFrame:l,getIndexForFrame:v,getSearchMatchForFrame:b};return g(Cn.Provider,{value:p},g(Qo,{theme:o,activeProfileState:e,glCanvas:r,setSelectedFrame:l,selectedFrame:h,profileIndex:n}))});var an=Promise.resolve().then(()=>(I0(),L0));an.then(()=>{});Promise.resolve().then(()=>(wo(),Co)).then(()=>{});Promise.resolve().then(()=>se(Yo())).then(()=>{});async function M0(t,e){return(await an).importProfileGroupFromText(t,e)}async function J2(t,e){return(await an).importProfileGroupFromBase64(t,e)}async function U2(t,e){return(await an).importProfilesFromArrayBuffer(t,e)}async function K2(t){return(await an).importProfilesFromFile(t)}async function $2(t){return(await an).importFromFileSystemDirectoryEntry(t)}var W2=F0();function G2(t){return t!=null&&t.isDirectory}var fs=class extends lt{constructor(){super(...arguments);this.canvas=null;this.ref=r=>{r instanceof HTMLCanvasElement?this.canvas=r:this.canvas=null,this.props.setGLCanvas(this.canvas)};this.container=null;this.containerRef=r=>{r instanceof HTMLElement?this.container=r:this.container=null};this.maybeResize=()=>{if(!this.container||!this.props.canvasContext)return;let{width:r,height:a}=this.container.getBoundingClientRect(),n=r,i=a,o=r*window.devicePixelRatio,l=a*window.devicePixelRatio;this.props.canvasContext.gl.resize(o,l,n,i)};this.onWindowResize=()=>{this.props.canvasContext&&this.props.canvasContext.requestFrame()}}componentWillReceiveProps(r){this.props.canvasContext!==r.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),r.canvasContext&&(r.canvasContext.addBeforeFrameHandler(this.maybeResize),r.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 r=O0(this.props.theme);return g("div",{ref:this.containerRef,className:x(r.glCanvasView)},g("canvas",{ref:this.ref,width:1,height:1}))}},Pi=class extends lt{constructor(){super(...arguments);this.loadExample=()=>{this.loadProfile(async()=>{let r="perf-vertx-stacks-01-collapsed-all.txt",a=await fetch(W2).then(n=>n.text());return await M0(r,a)})};this.onDrop=r=>{if(this.props.setDragActive(!1),r.preventDefault(),!r.dataTransfer)return;let a=r.dataTransfer.items[0];if("webkitGetAsEntry"in a){let i=a.webkitGetAsEntry();if(i&&G2(i)&&i.name.endsWith(".trace")){console.log("Importing as Instruments.app .trace file");let o=i;this.loadProfile(async()=>await $2(o));return}}let n=r.dataTransfer.files.item(0);n&&this.loadFromFile(n)};this.onDragOver=r=>{this.props.setDragActive(!0),r.preventDefault()};this.onDragLeave=r=>{this.props.setDragActive(!1),r.preventDefault()};this.onWindowKeyPress=async r=>{if(r.key==="1")this.props.setViewMode(0);else if(r.key==="2")this.props.setViewMode(1);else if(r.key==="3")this.props.setViewMode(2);else if(r.key==="r"){let{flattenRecursion:a}=this.props;this.props.setFlattenRecursion(!a)}else if(r.key==="n"){let{activeProfileState:a}=this.props;a&&this.props.setProfileIndexToView(a.index+1)}else if(r.key==="p"){let{activeProfileState:a}=this.props;a&&this.props.setProfileIndexToView(a.index-1)}};this.saveFile=()=>{if(this.props.profileGroup){let{name:r,indexToView:a,profiles:n}=this.props.profileGroup,i={name:r,indexToView:a,profiles:n.map(o=>o.profile)};Gc(i)}};this.browseForFile=()=>{let r=document.createElement("input");r.type="file",r.addEventListener("change",this.onFileSelect),r.click()};this.onWindowKeyDown=async r=>{r.key==="s"&&(r.ctrlKey||r.metaKey)?(r.preventDefault(),this.saveFile()):r.key==="o"&&(r.ctrlKey||r.metaKey)&&(r.preventDefault(),this.browseForFile())};this.onDocumentPaste=r=>{if(document.activeElement!=null&&document.activeElement.nodeName==="INPUT")return;r.preventDefault(),r.stopPropagation();let a=r.clipboardData;if(!a)return;let n=a.getData("text");this.loadProfile(async()=>await M0("From Clipboard",n))};this.onFileSelect=r=>{let a=r.target.files.item(0);a&&this.loadFromFile(a)}}async loadProfile(r){if(this.props.setError(!1),this.props.setLoading(!0),await new Promise(n=>setTimeout(n,0)),!this.props.glCanvas)return;console.time("import");let a=null;try{a=await r()}catch(n){console.log("Failed to load format",n),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 n of a.profiles)await n.demangle();for(let n of a.profiles){let i=this.props.hashParams.title||n.getName();n.setName(i)}console.timeEnd("import"),this.props.setProfileGroup(a),this.props.setLoading(!1)}getStyle(){return O0(this.props.theme)}loadFromFile(r){this.loadProfile(async()=>{let a=await K2(r);if(a){for(let n of a.profiles)n.getName()||n.setName(r.name);return a}if(this.props.profileGroup&&this.props.activeProfileState){let n=new FileReader,i=new Promise(c=>{n.addEventListener("loadend",()=>{if(typeof n.result!="string")throw new Error("Expected reader.result to be a string");c(n.result)})});n.readAsText(r);let o=await i,l=null,_=Kc(o);_&&(console.log("Importing as emscripten symbol map"),l=_);let s=await Ph(o,r.name);if(!l&&s&&(console.log("Importing as JavaScript source map"),l=s),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:r}=this.props.hashParams;if(r){if(!da){alert(`Cannot load a profile URL when loading from "${window.location.protocol}" URL protocol`);return}this.loadProfile(async()=>{let a=await fetch(r),n=new URL(r,window.location.href).pathname;return n.includes("/")&&(n=n.slice(n.lastIndexOf("/")+1)),await U2(n,await a.arrayBuffer())})}else if(this.props.hashParams.localProfilePath){window.speedscope={loadFileFromBase64:(n,i)=>{this.loadProfile(()=>J2(n,i))}};let a=document.createElement("script");a.src=`file:///${this.props.hashParams.localProfilePath}`,document.head.appendChild(a)}}renderLanding(){let r=this.getStyle();return g("div",{className:x(r.landingContainer)},g("div",{className:x(r.landingMessage)},g("p",{className:x(r.landingP)},"\u{1F44B} Hi there! Welcome to \u{1F52C}speedscope, an interactive"," ",g("a",{className:x(r.link),href:"http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html"},"flamegraph")," ","visualizer. Use it to help you make your software faster."),da?g("p",{className:x(r.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"," ",g("a",{tabIndex:0,className:x(r.link),onClick:this.loadExample},"click here")," ","to load an example profile."):g("p",{className:x(r.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."),g("div",{className:x(r.browseButtonContainer)},g("input",{type:"file",name:"file",id:"file",onChange:this.onFileSelect,className:x(r.hide)}),g("label",{for:"file",className:x(r.browseButton),tabIndex:0},"Browse")),g("p",{className:x(r.landingP)},"See the"," ",g("a",{className:x(r.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."),g("p",{className:x(r.landingP)},"speedscope is open source. Please"," ",g("a",{className:x(r.link),target:"_blank",href:"https://github.com/jlfwong/speedscope/issues"},"report any issues on GitHub"),".")))}renderError(){let r=this.getStyle();return g("div",{className:x(r.error)},g("div",null,"\u{1F63F} Something went wrong."),g("div",null,"Check the JS console for more details."))}renderLoadingBar(){let r=this.getStyle();return g("div",{className:x(r.loading)})}renderContent(){let{viewMode:r,activeProfileState:a,error:n,loading:i,glCanvas:o}=this.props;if(n)return this.renderError();if(i)return this.renderLoadingBar();if(!a||!o)return this.renderLanding();switch(r){case 0:return g(ah,{activeProfileState:a,glCanvas:o});case 1:return g(ih,{activeProfileState:a,glCanvas:o});case 2:return g($h,{activeProfileState:a,glCanvas:o})}}render(){let r=this.getStyle();return g("div",{onDrop:this.onDrop,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,className:x(r.root,this.props.dragActive&&r.dragTargetRoot)},g(fs,{setGLCanvas:this.props.setGLCanvas,canvasContext:this.props.canvasContext,theme:this.props.theme}),g(ph,{saveFile:this.saveFile,browseForFile:this.browseForFile,...this.props}),g("div",{className:x(r.contentContainer)},this.renderContent()),this.props.dragActive&&g("div",{className:x(r.dragTarget)}))}},O0=fe(t=>le.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 B0=he(()=>{let t=W(lr),e=U(),r=Q(()=>t?Et({theme:e,canvas:t}):null,[e,t]);return g(Jc,null,g(Pi,{activeProfileState:pa(),canvasContext:r,setGLCanvas:lr.set,setLoading:lo.set,setError:so.set,setProfileGroup:Ee.setProfileGroup,setDragActive:oo.set,setViewMode:Wt.set,setFlattenRecursion:Ht.set,setProfileIndexToView:Ee.setProfileIndexToView,profileGroup:W(Ee),theme:e,flattenRecursion:W(Ht),viewMode:W(Wt),hashParams:W(e_),glCanvas:t,dragActive:W(oo),loading:W(lo),error:W(so)}))});console.log(`speedscope v${xo().version}`);$i(g(f_,null,g(B0,null)),document.body,document.body.lastElementChild||void 0);})(); +//# sourceMappingURL=speedscope-W5HZ7E66.js.map diff --git a/deps/speedscope/speedscope.6f107512.js b/deps/speedscope/speedscope.6f107512.js deleted file mode 100644 index 462a27d5..00000000 --- a/deps/speedscope/speedscope.6f107512.js +++ /dev/null @@ -1,193 +0,0 @@ -parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c3)for(n=[n],o=3;o2&&(t.children=s.slice.call(arguments,2)),n={},t)"key"!==o&&"ref"!==o&&(n[o]=t[o]);return d(e.type,n,t.key||e.key,t.ref||e.ref,null)}function R(e){var t={},n={__c:"__cC"+i++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var o,_=this;return this.getChildContext||(o=[],this.getChildContext=function(){return t[n.__c]=_,t},this.shouldComponentUpdate=function(e){_.props.value!==e.value&&o.some(function(t){t.context=e.value,g(t)})},this.sub=function(e){o.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){o.splice(o.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}exports.isValidElement=t,exports.options=e,exports.options=e={__e:function(e,t){for(var n,o;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(o=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(o=!0,n.componentDidCatch(e)),o)return g(n.__E=n)}catch(t){e=t}throw e}},exports.isValidElement=t=function(e){return null!=e&&void 0===e.constructor},y.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&p(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),g(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),g(this))},y.prototype.render=v,n=[],o=0,_="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,r=u,i=0; -},{}],"ucYa":[function(require,module,exports) { -"use strict";function t(t){return t[t.length-1]||null}function e(t,e){t.sort(function(t,r){const n=e(t),o=e(r);return no?1:0})}function r(t,e,r){return t.has(e)||t.set(e,r(e)),t.get(e)}function n(t,e,r){return t.has(e)?t.get(e):r(e)}function o(t,e){if(!t.has(e))throw new Error(`Expected key ${e}`);return t.get(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.lastOf=t,exports.sortBy=e,exports.getOrInsert=r,exports.getOrElse=n,exports.getOrThrow=o,exports.itMap=l,exports.itForEach=u,exports.itReduce=i,exports.zeroPad=c,exports.formatPercent=a,exports.fract=f,exports.triangle=h,exports.findValueBisect=g,exports.findIndexBisect=p,exports.noop=x,exports.objectsHaveShallowEquality=d,exports.memoizeByShallowEquality=y,exports.memoizeByReference=w,exports.lazyStatic=E,exports.decodeBase64=A,exports.KeyedSet=void 0;class s{constructor(){this.map=new Map}getOrInsert(t){const e=t.key,r=this.map.get(e);return r||(this.map.set(e,t),t)}forEach(t){this.map.forEach(t)}[Symbol.iterator](){return this.map.values()}}function*l(t,e){for(let r of t)yield e(r)}function u(t,e){for(let r of t)e(r)}function i(t,e,r){let n=r;for(let o of t)n=e(n,o);return n}function c(t,e){return new Array(Math.max(e-t.length,0)+1).join("0")+t}function a(t){let e=`${t.toFixed(0)}%`;return 100===t?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 f(t){return t-Math.floor(t)}function h(t){return 2*Math.abs(f(t)-.5)-1}function g(t,e,r,n,o=1){for(console.assert(!isNaN(o)&&!isNaN(n));;){if(e-t<=o)return[t,e];const s=(e+t)/2;r(s){let n;return null==e?(n=t(r),e={args:r,result:n},n):d(e.args,r)?e.result:(e.args=r,e.result=t(r),e.result)}}function w(t){let e=null;return r=>{let n;return null==e?(n=t(r),e={args:r,result:n},n):e.args===r?e.result:(e.args=r,e.result=t(r),e.result)}}function E(t){let e=null;return()=>(null==e&&(e={result:t()}),e.result)}exports.KeyedSet=s;const m=E(()=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Map;for(let r=0;r>4,"="!==u&&(o[s++]=(15&a)<<4|f>>2),"="!==i&&(o[s++]=(7&f)<<6|h)}if(s!==n)throw new Error(`Expected to decode ${n} bytes, but only decoded ${s})`);return o} -},{}],"EhY8":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LRUCache=exports.List=void 0;class t{constructor(t){this.data=t,this.prev=null,this.next=null}}class e{constructor(){this.head=null,this.tail=null,this.size=0}getHead(){return this.head}getTail(){return this.tail}getSize(){return this.size}append(t){this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this.size++}prepend(t){return this.head?(this.head.prev=t,t.next=this.head,this.head=t):this.head=this.tail=t,this.size++,t}pop(){if(this.tail){const t=this.tail;return t.prev?(this.tail=t.prev,this.tail.next=null):this.head=this.tail=null,this.size--,t.prev=null,t}return null}dequeue(){if(this.head){const t=this.head;return t.next?(this.head=t.next,this.head.prev=null):this.head=this.tail=null,this.size--,t.next=null,t}return null}remove(t){null==t.prev?this.dequeue():null==t.next?this.pop():(t.next.prev=t.prev,t.prev.next=t.next,t.next=null,t.prev=null,this.size--)}}exports.List=e;class i{constructor(t){this.capacity=t,this.list=new e,this.map=new Map}has(t){return this.map.has(t)}get(t){const e=this.map.get(t);return e?(this.list.remove(e.listNode),this.list.prepend(e.listNode),e?e.value:null):null}getSize(){return this.list.getSize()}getCapacity(){return this.capacity}insert(e,i){const s=this.map.get(e);for(s&&this.list.remove(s.listNode);this.list.getSize()>=this.capacity;)this.map.delete(this.list.pop().data);const h=this.list.prepend(new t(e));this.map.set(e,{value:i,listNode:h})}getOrInsert(t,e){let i=this.get(t);return null==i&&(i=e(t),this.insert(t,i)),i}removeLRU(){const t=this.list.pop();if(!t)return null;const e=t.data,i=this.map.get(e).value;return this.map.delete(e),[e,i]}clear(){this.list=new e,this.map=new Map}}exports.LRUCache=i; -},{}],"tDuZ":[function(require,module,exports) { -"use strict";function t(t,i,s){return ts?s:t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.clamp=t,exports.Rect=exports.AffineTransform=exports.Vec2=void 0;class i{constructor(t,i){this.x=t,this.y=i}withX(t){return new i(t,this.y)}withY(t){return new i(this.x,t)}plus(t){return new i(this.x+t.x,this.y+t.y)}minus(t){return new i(this.x-t.x,this.y-t.y)}times(t){return new i(this.x*t,this.y*t)}timesPointwise(t){return new i(this.x*t.x,this.y*t.y)}dividedByPointwise(t){return new i(this.x/t.x,this.y/t.y)}dot(t){return this.x*t.x+this.y*t.y}equals(t){return this.x===t.x&&this.y===t.y}approxEquals(t,i=1e-9){return Math.abs(this.x-t.x)1)for(var n=1;n=0&&e<=31),t.TEXTURE0+e}var h,a;exports.Graphics=h,function(t){t.Rect=class{constructor(t=0,e=0,i=0,r=0){this.x=t,this.y=e,this.width=i,this.height=r}set(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}equals(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}};class e{constructor(t,e,i,r){this.redF=t,this.greenF=e,this.blueF=i,this.alphaF=r}equals(t){return this.redF===t.redF&&this.greenF===t.greenF&&this.blueF===t.blueF&&this.alphaF===t.alphaF}}let i,r,s,n,h;e.TRANSPARENT=new e(0,0,0,0),t.Color=e,function(t){t[t.ZERO=0]="ZERO",t[t.ONE=1]="ONE",t[t.SOURCE_COLOR=2]="SOURCE_COLOR",t[t.TARGET_COLOR=3]="TARGET_COLOR",t[t.INVERSE_SOURCE_COLOR=4]="INVERSE_SOURCE_COLOR",t[t.INVERSE_TARGET_COLOR=5]="INVERSE_TARGET_COLOR",t[t.SOURCE_ALPHA=6]="SOURCE_ALPHA",t[t.TARGET_ALPHA=7]="TARGET_ALPHA",t[t.INVERSE_SOURCE_ALPHA=8]="INVERSE_SOURCE_ALPHA",t[t.INVERSE_TARGET_ALPHA=9]="INVERSE_TARGET_ALPHA",t[t.CONSTANT=10]="CONSTANT",t[t.INVERSE_CONSTANT=11]="INVERSE_CONSTANT"}(i=t.BlendOperation||(t.BlendOperation={})),function(t){t[t.TRIANGLES=0]="TRIANGLES",t[t.TRIANGLE_STRIP=1]="TRIANGLE_STRIP"}(r=t.Primitive||(t.Primitive={}));function a(t){return t==s.FLOAT?4:1}t.Context=class{constructor(){this.resizeEventHandlers=new Set}setCopyBlendState(){this.setBlendState(i.ONE,i.ZERO)}setAddBlendState(){this.setBlendState(i.ONE,i.ONE)}setPremultipliedBlendState(){this.setBlendState(i.ONE,i.INVERSE_SOURCE_ALPHA)}setUnpremultipliedBlendState(){this.setBlendState(i.SOURCE_ALPHA,i.INVERSE_SOURCE_ALPHA)}addAfterResizeEventHandler(t){this.resizeEventHandlers.add(t)}removeAfterResizeEventHandler(t){this.resizeEventHandlers.delete(t)}},function(t){t[t.FLOAT=0]="FLOAT",t[t.BYTE=1]="BYTE"}(s=t.AttributeType||(t.AttributeType={})),t.attributeByteLength=a;class _{constructor(t,e,i,r){this.name=t,this.type=e,this.count=i,this.byteOffset=r}}t.Attribute=_;t.VertexFormat=class{constructor(){this._attributes=[],this._stride=0}get attributes(){return this._attributes}get stride(){return this._stride}add(t,e,i){return this.attributes.push(new _(t,e,i,this.stride)),this._stride+=i*a(e),this}};t.VertexBuffer=class{uploadFloat32Array(t){this.upload(new Uint8Array(t.buffer),0)}uploadFloats(t){this.uploadFloat32Array(new Float32Array(t))}},function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(n=t.PixelFilter||(t.PixelFilter={})),function(t){t[t.REPEAT=0]="REPEAT",t[t.CLAMP=1]="CLAMP"}(h=t.PixelWrap||(t.PixelWrap={}));class o{constructor(t,e,i){this.minFilter=t,this.magFilter=e,this.wrap=i}}o.LINEAR_CLAMP=new o(n.LINEAR,n.LINEAR,h.CLAMP),o.LINEAR_MIN_NEAREST_MAG_CLAMP=new o(n.LINEAR,n.NEAREST,h.CLAMP),o.NEAREST_CLAMP=new o(n.NEAREST,n.NEAREST,h.CLAMP),t.TextureFormat=o}(h||(exports.Graphics=h={})),exports.WebGL=a,function(t){class a extends h.Context{get widthInPixels(){return this._width}get heightInPixels(){return this._height}constructor(t=document.createElement("canvas")){super(),this._attributeCount=0,this._blendOperations=0,this._contextResetHandlers=[],this._currentClearColor=h.Color.TRANSPARENT,this._currentRenderTarget=null,this._defaultViewport=new h.Rect,this._forceStateUpdate=!0,this._generation=1,this._height=0,this._oldBlendOperations=0,this._oldRenderTarget=null,this._oldViewport=new h.Rect,this._width=0,this.handleWebglContextRestored=(()=>{this._attributeCount=0,this._currentClearColor=h.Color.TRANSPARENT,this._forceStateUpdate=!0,this._generation++;for(let t of this._contextResetHandlers)t()}),this.ANGLE_instanced_arrays=null,this.ANGLE_instanced_arrays_generation=-1;let e=t.getContext("webgl",{alpha:!1,antialias:!1,depth:!1,preserveDrawingBuffer:!1,stencil:!1});if(null==e)throw new Error("Setup failure");this._gl=e;let i=t.style;t.width=0,t.height=0,i.width=i.height="0",t.addEventListener("webglcontextlost",t=>{t.preventDefault()}),t.addEventListener("webglcontextrestored",this.handleWebglContextRestored),this._blendOperationMap={[h.BlendOperation.ZERO]:this._gl.ZERO,[h.BlendOperation.ONE]:this._gl.ONE,[h.BlendOperation.SOURCE_COLOR]:this._gl.SRC_COLOR,[h.BlendOperation.TARGET_COLOR]:this._gl.DST_COLOR,[h.BlendOperation.INVERSE_SOURCE_COLOR]:this._gl.ONE_MINUS_SRC_COLOR,[h.BlendOperation.INVERSE_TARGET_COLOR]:this._gl.ONE_MINUS_DST_COLOR,[h.BlendOperation.SOURCE_ALPHA]:this._gl.SRC_ALPHA,[h.BlendOperation.TARGET_ALPHA]:this._gl.DST_ALPHA,[h.BlendOperation.INVERSE_SOURCE_ALPHA]:this._gl.ONE_MINUS_SRC_ALPHA,[h.BlendOperation.INVERSE_TARGET_ALPHA]:this._gl.ONE_MINUS_DST_ALPHA,[h.BlendOperation.CONSTANT]:this._gl.CONSTANT_COLOR,[h.BlendOperation.INVERSE_CONSTANT]:this._gl.ONE_MINUS_CONSTANT_COLOR}}testContextLoss(){this.handleWebglContextRestored()}get gl(){return this._gl}get generation(){return this._generation}addContextResetHandler(t){r(this._contextResetHandlers,t)}removeContextResetHandler(t){s(this._contextResetHandlers,t)}get currentRenderTarget(){return this._currentRenderTarget}beginFrame(){this.setRenderTarget(null)}endFrame(){}setBlendState(t,e){this._blendOperations=a._packBlendModes(t,e)}setViewport(t,e,i,r){(null!=this._currentRenderTarget?this._currentRenderTarget.viewport:this._defaultViewport).set(t,e,i,r)}get viewport(){return null!=this._currentRenderTarget?this._currentRenderTarget.viewport:this._defaultViewport}get renderTargetWidthInPixels(){return null!=this._currentRenderTarget?this._currentRenderTarget.viewport.width:this._width}get renderTargetHeightInPixels(){return null!=this._currentRenderTarget?this._currentRenderTarget.viewport.height:this._height}draw(t,e,i){this._updateRenderTargetAndViewport(),f.from(e).prepare(),R.from(i).prepare(),this._updateFormat(e.format),this._updateBlendState(),this._gl.drawArrays(t==h.Primitive.TRIANGLES?this._gl.TRIANGLES:this._gl.TRIANGLE_STRIP,0,Math.floor(i.byteCount/e.format.stride)),this._forceStateUpdate=!1}resize(t,e,i,r){let s=this._gl.canvas;const n=s.getBoundingClientRect();if(this._width===t&&this._height===e&&n.width===i&&n.height===r)return;let h=s.style;s.width=t,s.height=e,h.width=`${i}px`,h.height=`${r}px`,this.setViewport(0,0,t,e),this._width=t,this._height=e,this.resizeEventHandlers.forEach(t=>t())}clear(t){this._updateRenderTargetAndViewport(),this._updateBlendState(),t.equals(this._currentClearColor)||(this._gl.clearColor(t.redF,t.greenF,t.blueF,t.alphaF),this._currentClearColor=t),this._gl.clear(this._gl.COLOR_BUFFER_BIT)}setRenderTarget(t){this._currentRenderTarget=A.from(t)}createMaterial(t,e,i){let r=new f(this,t,e,i);return r.program,r}createVertexBuffer(t){return i(t>0&&t%4==0),new R(this,t)}createTexture(t,e,i,r){return new p(this,t,e,i,r)}createRenderTarget(t){return new A(this,p.from(t))}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 t=this._currentRenderTarget,e=null!=t?t.viewport:this._defaultViewport,i=this._gl;(this._forceStateUpdate||this._oldRenderTarget!=t)&&(i.bindFramebuffer(i.FRAMEBUFFER,t?t.framebuffer:null),this._oldRenderTarget=t),!this._forceStateUpdate&&this._oldViewport.equals(e)||(i.viewport(e.x,this.renderTargetHeightInPixels-e.y-e.height,e.width,e.height),this._oldViewport.set(e.x,e.y,e.width,e.height))}_updateBlendState(){if(this._forceStateUpdate||this._oldBlendOperations!=this._blendOperations){let t=this._gl,e=this._blendOperations,r=this._oldBlendOperations,s=15&e,n=e>>4;i(s in this._blendOperationMap),i(n in this._blendOperationMap),e==a.COPY_BLEND_OPERATIONS?t.disable(t.BLEND):((this._forceStateUpdate||r==a.COPY_BLEND_OPERATIONS)&&t.enable(t.BLEND),t.blendFunc(this._blendOperationMap[s],this._blendOperationMap[n])),this._oldBlendOperations=e}}_updateFormat(t){let e=this._gl,i=t.attributes,r=i.length;for(let s=0;sr;)this._attributeCount--,e.disableVertexAttribArray(this._attributeCount);this._attributeCount=r}getWebGLInfo(){const t=this.gl.getExtension("WEBGL_debug_renderer_info");return{renderer:t?this.gl.getParameter(t.UNMASKED_RENDERER_WEBGL):null,vendor:t?this.gl.getParameter(t.UNMASKED_VENDOR_WEBGL):null,version:this.gl.getParameter(this.gl.VERSION)}}static from(t){return i(null==t||t instanceof a),t}static _packBlendModes(t,e){return t|e<<4}}a.COPY_BLEND_OPERATIONS=a._packBlendModes(h.BlendOperation.ONE,h.BlendOperation.ZERO),t.Context=a;class _{constructor(t,e,i=0,r=null,s=!0){this._material=t,this._name=e,this._generation=i,this._location=r,this._isDirty=s}get location(){let t=a.from(this._material.context);if(this._generation!=t.generation&&(this._location=t.gl.getUniformLocation(this._material.program,this._name),this._generation=t.generation,!e)){let e=this._material.program,r=t.gl;for(let t=0,s=r.getProgramParameter(e,r.ACTIVE_UNIFORMS);t0&&this._texture.height>0?this._texture.texture:null)}}class f{constructor(t,e,i,r,s={},n=[],h=0,a=null){this._context=t,this._format=e,this._vertexSource=i,this._fragmentSource=r,this._uniformsMap=s,this._uniformsList=n,this._generation=h,this._program=a}get context(){return this._context}get format(){return this._format}get vertexSource(){return this._vertexSource}get fragmentSource(){return this._fragmentSource}setUniformFloat(t,e){let r=this._uniformsMap[t]||null;null==r&&(r=new o(this,t),this._uniformsMap[t]=r,this._uniformsList.push(r)),i(r instanceof o),r.set(e)}setUniformInt(t,e){let r=this._uniformsMap[t]||null;null==r&&(r=new l(this,t),this._uniformsMap[t]=r,this._uniformsList.push(r)),i(r instanceof l),r.set(e)}setUniformVec2(t,e,r){let s=this._uniformsMap[t]||null;null==s&&(s=new u(this,t),this._uniformsMap[t]=s,this._uniformsList.push(s)),i(s instanceof u),s.set(e,r)}setUniformVec3(t,e,r,s){let n=this._uniformsMap[t]||null;null==n&&(n=new c(this,t),this._uniformsMap[t]=n,this._uniformsList.push(n)),i(n instanceof c),n.set(e,r,s)}setUniformVec4(t,e,r,s,n){let h=this._uniformsMap[t]||null;null==h&&(h=new d(this,t),this._uniformsMap[t]=h,this._uniformsList.push(h)),i(h instanceof d),h.set(e,r,s,n)}setUniformMat3(t,e,r,s,n,h,a,_,o,l){let u=this._uniformsMap[t]||null;null==u&&(u=new E(this,t),this._uniformsMap[t]=u,this._uniformsList.push(u)),i(u instanceof E),u.set(e,r,s,n,h,a,_,o,l)}setUniformSampler(t,e,r){let s=this._uniformsMap[t]||null;null==s&&(s=new g(this,t),this._uniformsMap[t]=s,this._uniformsList.push(s)),i(s instanceof g),s.set(e,r)}get program(){let t=this._context.gl;if(this._generation!=this._context.generation){this._program=t.createProgram(),this._compileShader(t,t.VERTEX_SHADER,this.vertexSource),this._compileShader(t,t.FRAGMENT_SHADER,this.fragmentSource);let r=this.format.attributes;for(let e=0;e=0),i(0<=t&&t+r<=this._byteCount),i(0<=e&&e+r<=this._byteCount),this._bytes&&t!=e&&0!=r&&(this._bytes.set(this._bytes.subarray(t,this._byteCount),e),this._growDirtyRegion(Math.min(t,e),Math.max(t,e)+r))}upload(t,e=0){i(0<=e&&e+t.length<=this._byteCount),i(null!=this._bytes),this._bytes.set(t,e),this._growDirtyRegion(e,e+t.length)}free(){this._buffer&&this._context.gl.deleteBuffer(this._buffer),this._generation=0}prepare(){let t=this._context.gl;this._generation!==this._context.generation&&(this._buffer=t.createBuffer(),this._generation=this._context.generation,this._isDirty=!0),t.bindBuffer(t.ARRAY_BUFFER,this._buffer),this._isDirty&&(t.bufferData(t.ARRAY_BUFFER,this._byteCount,t.DYNAMIC_DRAW),this._dirtyMin=this._totalMin,this._dirtyMax=this._totalMax,this._isDirty=!1),this._dirtyMin{const t=e.AffineTransform.betweenRects(i.configSpaceSrcRect,i.physicalSpaceDstRect),r=new e.Vec2(this.gl.viewport.width,this.gl.viewport.height);return e.AffineTransform.withTranslation(new e.Vec2(-1,1)).times(e.AffineTransform.withScale(new e.Vec2(2,-2).dividedByPointwise(r))).times(t)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(t.Graphics.Primitive.TRIANGLES,this.material,i.batch.getBuffer())}}exports.RectangleBatchRenderer=c; -},{"../lib/math":"tDuZ","./graphics":"XGYN","./utils":"MMP6"}],"x77Y":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Color=void 0;var t=require("./math");class r{constructor(t=0,r=0,s=0,e=1){this.r=t,this.g=r,this.b=s,this.a=e}static fromLumaChromaHue(s,e,o){const i=o/60,a=e*(1-Math.abs(i%2-1)),[n,h,u]=i<1?[e,a,0]:i<2?[a,e,0]:i<3?[0,e,a]:i<4?[0,a,e]:i<5?[a,0,e]:[e,0,a],c=s-(.3*n+.59*h+.11*u);return new r((0,t.clamp)(n+c,0,1),(0,t.clamp)(h+c,0,1),(0,t.clamp)(u+c,0,1),1)}static fromCSSHex(t){if(7!==t.length||"#"!==t[0])throw new Error(`Invalid color input ${t}`);const s=parseInt(t.substr(1,2),16)/255,e=parseInt(t.substr(3,2),16)/255,o=parseInt(t.substr(5,2),16)/255;if(s<0||s>1||e<0||e>1||o<0||o>1)throw new Error(`Invalid color input ${t}`);return new r(s,e,o)}withAlpha(t){return new r(this.r,this.g,this.b,t)}toCSS(){return`rgba(${(255*this.r).toFixed()}, ${(255*this.g).toFixed()}, ${(255*this.b).toFixed()}, ${this.a.toFixed(2)})`}}exports.Color=r; -},{"./math":"tDuZ"}],"cFC1":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RowAtlas=void 0;var e=require("../lib/lru-cache"),t=require("./rectangle-batch-renderer"),r=require("../lib/math"),i=require("../lib/color"),c=require("./graphics"),h=require("./utils");class a{constructor(h,a,s){this.gl=h,this.rectangleBatchRenderer=a,this.textureRenderer=s,this.texture=h.createTexture(c.Graphics.TextureFormat.NEAREST_CLAMP,4096,4096),this.renderTarget=h.createRenderTarget(this.texture),this.rowCache=new e.LRUCache(this.texture.height),this.clearLineBatch=new t.RectangleBatch(h),this.clearLineBatch.addRect(r.Rect.unit,new i.Color(0,0,0,0)),h.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 i of e){let e=this.rowCache.get(i);if(null!=e)continue;e=this.allocateLine(i);const c=new r.Rect(new r.Vec2(0,e),new r.Vec2(this.texture.width,1));this.rectangleBatchRenderer.render({batch:this.clearLineBatch,configSpaceSrcRect:r.Rect.unit,physicalSpaceDstRect:c}),t(c,i)}})}renderViaAtlas(e,t){let i=this.rowCache.get(e);if(null==i)return!1;const c=new r.Rect(new r.Vec2(0,i),new r.Vec2(this.texture.width,1));return this.textureRenderer.render({texture:this.texture,srcRect:c,dstRect:t}),!0}}exports.RowAtlas=a; -},{"../lib/lru-cache":"EhY8","./rectangle-batch-renderer":"UGJH","../lib/math":"tDuZ","../lib/color":"x77Y","./graphics":"XGYN","./utils":"MMP6"}],"p3j0":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextureRenderer=void 0;var e=require("../lib/math"),t=require("./graphics"),r=require("./utils");const n="\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",i="\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";class s{constructor(e){this.gl=e;const r=new t.Graphics.VertexFormat;r.add("position",t.Graphics.AttributeType.FLOAT,2),r.add("uv",t.Graphics.AttributeType.FLOAT,2);const s=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],o=[];for(let t of s)o.push(t.pos[0]),o.push(t.pos[1]),o.push(t.uv[0]),o.push(t.uv[1]);this.buffer=e.createVertexBuffer(r.stride*s.length),this.buffer.upload(new Uint8Array(new Float32Array(o).buffer)),this.material=e.createMaterial(r,n,i)}render(n){this.material.setUniformSampler("texture",n.texture,0),(0,r.setUniformAffineTransform)(this.material,"uvTransform",(()=>{const{srcRect:t,texture:r}=n,i=e.AffineTransform.withTranslation(new e.Vec2(0,1)).times(e.AffineTransform.withScale(new e.Vec2(1,-1))).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,new e.Vec2(r.width,r.height)),e.Rect.unit)).transformRect(t);return e.AffineTransform.betweenRects(e.Rect.unit,i)})()),(0,r.setUniformAffineTransform)(this.material,"positionTransform",(()=>{const{dstRect:t}=n,{viewport:r}=this.gl,i=new e.Vec2(r.width,r.height),s=e.AffineTransform.withScale(new e.Vec2(1,-1)).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,i),e.Rect.NDC)).transformRect(t);return e.AffineTransform.betweenRects(e.Rect.NDC,s)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(t.Graphics.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}}exports.TextureRenderer=s; -},{"../lib/math":"tDuZ","./graphics":"XGYN","./utils":"MMP6"}],"tdKg":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ViewportRectangleRenderer=void 0;var e=require("../lib/color"),i=require("./graphics"),r=require("./utils");const o=new i.Graphics.VertexFormat;o.add("position",i.Graphics.AttributeType.FLOAT,2);const n="\n attribute vec2 position;\n\n void main() {\n gl_Position = vec4(position, 0, 1);\n }\n",t=i=>{const{r:r,g:o,b:n}=e.Color.fromCSSHex(i.fgSecondaryColor),t=`${r.toFixed(1)}, ${o.toFixed(1)}, ${n.toFixed(1)}`;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(${t}, 0.8);\n } else {\n // Outside viewport rectangle\n gl_FragColor = vec4(${t}, 0.5);\n }\n }\n `};class a{constructor(e,i){this.gl=e;const r=[[-1,1],[1,1],[-1,-1],[1,-1]],a=[];for(let o of r)a.push(o[0]),a.push(o[1]);this.buffer=e.createVertexBuffer(o.stride*r.length),this.buffer.upload(new Uint8Array(new Float32Array(a).buffer)),this.material=e.createMaterial(o,n,t(i))}render(e){(0,r.setUniformAffineTransform)(this.material,"configSpaceToPhysicalViewSpace",e.configSpaceToPhysicalViewSpace),(0,r.setUniformVec2)(this.material,"configSpaceViewportOrigin",e.configSpaceViewportRect.origin),(0,r.setUniformVec2)(this.material,"configSpaceViewportSize",e.configSpaceViewportRect.size);const o=this.gl.viewport;this.material.setUniformVec2("physicalOrigin",o.x,o.y),this.material.setUniformVec2("physicalSize",o.width,o.height),this.material.setUniformFloat("framebufferHeight",this.gl.renderTargetHeightInPixels),this.gl.setBlendState(i.Graphics.BlendOperation.SOURCE_ALPHA,i.Graphics.BlendOperation.INVERSE_SOURCE_ALPHA),this.gl.draw(i.Graphics.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}}exports.ViewportRectangleRenderer=a; -},{"../lib/color":"x77Y","./graphics":"XGYN","./utils":"MMP6"}],"Q0ad":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartColorPassRenderer=void 0;var e=require("../lib/math"),r=require("./graphics"),n=require("./utils");const t=new r.Graphics.VertexFormat;t.add("position",r.Graphics.AttributeType.FLOAT,2),t.add("uv",r.Graphics.AttributeType.FLOAT,2);const i="\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",o=e=>`\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 ${e}\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`;class a{constructor(e,r){this.gl=e;const n=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],a=[];for(let t of n)a.push(t.pos[0]),a.push(t.pos[1]),a.push(t.uv[0]),a.push(t.uv[1]);this.buffer=e.createVertexBuffer(t.stride*n.length),this.buffer.uploadFloats(a),this.material=e.createMaterial(t,i,o(r.colorForBucketGLSL))}render(t){const{srcRect:i,rectInfoTexture:o}=t,a=e.AffineTransform.withTranslation(new e.Vec2(0,1)).times(e.AffineTransform.withScale(new e.Vec2(1,-1))).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,new e.Vec2(o.width,o.height)),e.Rect.unit)).transformRect(i),s=e.AffineTransform.betweenRects(e.Rect.unit,a),{dstRect:c}=t,l=new e.Vec2(this.gl.viewport.width,this.gl.viewport.height),u=e.AffineTransform.withScale(new e.Vec2(1,-1)).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,l),e.Rect.NDC)).transformRect(c),h=e.AffineTransform.betweenRects(e.Rect.NDC,u),f=e.Vec2.unit.dividedByPointwise(new e.Vec2(t.rectInfoTexture.width,t.rectInfoTexture.height));this.material.setUniformSampler("colorTexture",t.rectInfoTexture,0),(0,n.setUniformAffineTransform)(this.material,"uvTransform",s),this.material.setUniformFloat("renderOutlines",t.renderOutlines?1:0),this.material.setUniformVec2("uvSpacePixelSize",f.x,f.y),(0,n.setUniformAffineTransform)(this.material,"positionTransform",h),this.gl.setUnpremultipliedBlendState(),this.gl.draw(r.Graphics.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}}exports.FlamechartColorPassRenderer=a; -},{"../lib/math":"tDuZ","./graphics":"XGYN","./utils":"MMP6"}],"KwET":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CanvasContext=void 0;var e=require("./graphics"),r=require("./rectangle-batch-renderer"),t=require("./texture-renderer"),i=require("../lib/math"),n=require("./overlay-rectangle-renderer"),s=require("./flamechart-color-pass-renderer"),o=require("../lib/color");class a{constructor(i,a){this.animationFrameRequest=null,this.beforeFrameHandlers=new Set,this.onBeforeFrame=(()=>{this.animationFrameRequest=null,this.gl.setViewport(0,0,this.gl.renderTargetWidthInPixels,this.gl.renderTargetHeightInPixels);const r=o.Color.fromCSSHex(this.theme.bgPrimaryColor);this.gl.clear(new e.Graphics.Color(r.r,r.g,r.b,r.a));for(const e of this.beforeFrameHandlers)e()}),this.gl=new e.WebGL.Context(i),this.rectangleBatchRenderer=new r.RectangleBatchRenderer(this.gl),this.textureRenderer=new t.TextureRenderer(this.gl),this.viewportRectangleRenderer=new n.ViewportRectangleRenderer(this.gl,a),this.flamechartColorPassRenderer=new s.FlamechartColorPassRenderer(this.gl,a),this.theme=a,this.gl.addAfterResizeEventHandler(this.onBeforeFrame);const l=this.gl.getWebGLInfo();l&&console.log(`WebGL initialized. renderer: ${l.renderer}, vendor: ${l.vendor}, version: ${l.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,r){const{origin:t,size:i}=e;let n=this.gl.viewport;this.gl.setViewport(t.x,t.y,i.x,i.y),r();let{x:s,y:o,width:a,height:l}=n;this.gl.setViewport(s,o,a,l)}renderBehind(e,r){const t=e.getBoundingClientRect(),n=new i.Rect(new i.Vec2(t.left*window.devicePixelRatio,t.top*window.devicePixelRatio),new i.Vec2(t.width*window.devicePixelRatio,t.height*window.devicePixelRatio));this.setViewport(n,r)}}exports.CanvasContext=a; -},{"./graphics":"XGYN","./rectangle-batch-renderer":"UGJH","./texture-renderer":"p3j0","../lib/math":"tDuZ","./overlay-rectangle-renderer":"tdKg","./flamechart-color-pass-renderer":"Q0ad","../lib/color":"x77Y"}],"zEXv":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFrameToColorBucket=exports.getProfileToView=exports.getRowAtlas=exports.getCanvasContext=exports.createGetCSSColorForFrame=exports.createGetColorBucketForFrame=void 0;var e=require("../lib/utils"),t=require("../gl/row-atlas"),o=require("../gl/canvas-context");const r=(0,e.memoizeByReference)(e=>t=>e.get(t.key)||0);exports.createGetColorBucketForFrame=r;const n=(0,e.memoizeByShallowEquality)(({theme:e,frameToColorBucket:t})=>{const o=r(t);return t=>{const r=o(t)/255;return e.colorForBucket(r).toCSS()}});exports.createGetCSSColorForFrame=n;const a=(0,e.memoizeByShallowEquality)(({theme:e,canvas:t})=>new o.CanvasContext(t,e));exports.getCanvasContext=a;const s=(0,e.memoizeByReference)(e=>new t.RowAtlas(e.gl,e.rectangleBatchRenderer,e.textureRenderer));exports.getRowAtlas=s;const l=(0,e.memoizeByShallowEquality)(({profile:e,flattenRecursion:t})=>t?e.getProfileWithRecursionFlattened():e);exports.getProfileToView=l;const c=(0,e.memoizeByReference)(e=>{const t=[];function o(e){return(e.file||"")+e.name}e.forEachFrame(e=>t.push(e)),t.sort(function(e,t){return o(e)>o(t)?1:-1});const r=new Map;for(let n=0;n=u.__.length&&u.__.push({}),u.__[_]}function a(_){return e=1,p(A,_)}function p(t,o,e){var u=f(_++,2);return u.__c||(u.__c=n,u.__=[e?e(o):A(void 0,o),function(_){var n=t(u.__[0],_);u.__[0]!==n&&(u.__[0]=n,u.__c.setState({}))}]),u.__}function h(t,e){var u=f(_++,3);!o.options.__s&&q(u.__H,e)&&(u.__=t,u.__H=e,n.__H.__h.push(u))}function v(t,e){var u=f(_++,4);!o.options.__s&&q(u.__H,e)&&(u.__=t,u.__H=e,n.__h.push(u))}function m(_){return e=5,l(function(){return{current:_}},[])}function H(_,n,t){e=6,v(function(){"function"==typeof _?_(n()):_&&(_.current=n())},null==t?t:t.concat(_))}function l(n,t){var o=f(_++,7);return q(o.__H,t)?(o.__H=t,o.__h=n,o.__=n()):o.__}function d(_,n){return e=8,l(function(){return _},n)}function x(t){var o=n.context[t.__c],e=f(_++,9);return e.__c=t,o?(null==e.__&&(e.__=!0,o.sub(n)),o.props.value):t.__}function y(_,n){o.options.useDebugValue&&o.options.useDebugValue(n?n(_):_)}function E(t){var o=f(_++,10),e=a();return o.__=t,n.componentDidCatch||(n.componentDidCatch=function(_){o.__&&o.__(_),e[1](_)}),[e[0],function(){e[1](void 0)}]}function b(){u.some(function(_){if(_.__P)try{_.__H.__h.forEach(g),_.__H.__h.forEach(D),_.__H.__h=[]}catch(n){return _.__H.__h=[],o.options.__e(n,_.__v),!0}}),u=[]}function g(_){_.t&&_.t()}function D(_){var n=_.__();"function"==typeof n&&(_.t=n)}function q(_,n){return!_||n.some(function(n,t){return n!==_[t]})}function A(_,n){return"function"==typeof n?n(_):n}o.options.__r=function(t){r&&r(t),_=0,(n=t.__c).__H&&(n.__H.__h.forEach(g),n.__H.__h.forEach(D),n.__H.__h=[])},o.options.diffed=function(_){i&&i(_);var n=_.__c;if(n){var e=n.__H;e&&e.__h.length&&(1!==u.push(n)&&t===o.options.requestAnimationFrame||((t=o.options.requestAnimationFrame)||function(_){var n,t=function(){clearTimeout(o),cancelAnimationFrame(n),setTimeout(_)},o=setTimeout(t,100);"undefined"!=typeof window&&(n=requestAnimationFrame(t))})(b))}},o.options.__c=function(_,n){n.some(function(_){try{_.__h.forEach(g),_.__h=_.__h.filter(function(_){return!_.__||D(_)})}catch(t){n.some(function(_){_.__h&&(_.__h=[])}),n=[],o.options.__e(t,_.__v)}}),c&&c(_,n)},o.options.unmount=function(_){s&&s(_);var n=_.__c;if(n){var t=n.__H;if(t)try{t.__.forEach(function(_){return _.t&&_.t()})}catch(_){o.options.__e(_,n.__v)}}}; -},{"preact":"aSor"}],"AQ6k":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={version:!0,Children:!0,render:!0,hydrate:!0,unmountComponentAtNode:!0,createPortal:!0,createFactory:!0,cloneElement:!0,isValidElement:!0,findDOMNode:!0,PureComponent:!0,memo:!0,forwardRef:!0,unstable_batchedUpdates:!0,Suspense:!0,SuspenseList:!0,lazy:!0,createElement:!0,createContext:!0,createRef:!0,Fragment:!0,Component:!0};exports.render=E,exports.hydrate=k,exports.unmountComponentAtNode=j,exports.createPortal=C,exports.createFactory=A,exports.cloneElement=U,exports.isValidElement=S,exports.findDOMNode=F,exports.memo=i,exports.forwardRef=l,exports.Suspense=d,exports.SuspenseList=v,exports.lazy=m,Object.defineProperty(exports,"createElement",{enumerable:!0,get:function(){return n.createElement}}),Object.defineProperty(exports,"createContext",{enumerable:!0,get:function(){return n.createContext}}),Object.defineProperty(exports,"createRef",{enumerable:!0,get:function(){return n.createRef}}),Object.defineProperty(exports,"Fragment",{enumerable:!0,get:function(){return n.Fragment}}),Object.defineProperty(exports,"Component",{enumerable:!0,get:function(){return n.Component}}),exports.unstable_batchedUpdates=exports.PureComponent=exports.Children=exports.version=exports.default=void 0;var t=require("preact/hooks");Object.keys(t).forEach(function(n){"default"!==n&&"__esModule"!==n&&(Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(exports,n,{enumerable:!0,get:function(){return t[n]}}))});var n=require("preact");function r(e,t){for(var n in t)e[n]=t[n];return e}function o(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}var u=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return o(this.props,e)||o(this.state,t)},r}(n.Component);function i(e,t){function u(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:o(this.props,e)}function i(t){return this.shouldComponentUpdate=u,(0,n.createElement)(e,r({},t))}return i.prototype.isReactComponent=!0,i.displayName="Memo("+(e.displayName||e.name)+")",i.t=!0,i}exports.PureComponent=u;var a=n.options.__b;function l(e){function t(t){var n=r({},t);return delete n.ref,e(n,t.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}n.options.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),a&&a(e)};var c=function(e,t){return e?(0,n.toChildArray)(e).reduce(function(e,n,r){return e.concat(t(n,r))},[]):null},p={map:c,forEach:c,count:function(e){return e?(0,n.toChildArray)(e).length:0},only:function(e){if(1!==(e=(0,n.toChildArray)(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:n.toChildArray},s=n.options.__e;function f(e){return e&&((e=r({},e)).__c=null,e.__k=e.__k&&e.__k.map(f)),e}function d(){this.__u=0,this.o=null,this.__b=null}function _(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function m(e){var t,r,o;function u(u){if(t||(t=e()).then(function(e){r=e.default||e},function(e){o=e}),o)throw o;if(!r)throw t;return(0,n.createElement)(r,u)}return u.displayName="Lazy",u.t=!0,u}function v(){this.i=null,this.l=null}exports.Children=p,n.options.__e=function(e,t,n){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return r.__c(e,t.__c);s(e,t,n)},(d.prototype=new n.Component).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=_(n.__v),o=!1,u=function(){o||(o=!0,r?r(i):i())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){u(),t.__c&&t.__c()};var i=function(){var e;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(u,u)},d.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=f(this.__b),this.__b=null),[(0,n.createElement)(n.Component,null,t.u?null:e.children),t.u&&e.fallback]};var h=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]s()))}get(){return this.state}subscribe(s){this.observers.push(s)}unsubscribe(s){const t=this.observers.indexOf(s);-1!==t&&this.observers.splice(t,1)}}function i(t){const[e,r]=(0,s.useState)(t.get());return(0,s.useLayoutEffect)(()=>{function s(){r(t.get())}return r(t.get()),t.subscribe(s),()=>{t.unsubscribe(s)}},[t]),e}exports.Atom=r; -},{"preact/hooks":"MwGB"}],"dpTI":[function(require,module,exports) { -"use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ViewMode=void 0,exports.ViewMode=e,function(e){e[e.CHRONO_FLAME_CHART=0]="CHRONO_FLAME_CHART",e[e.LEFT_HEAVY_FLAME_GRAPH=1]="LEFT_HEAVY_FLAME_GRAPH",e[e.SANDWICH_VIEW=2]="SANDWICH_VIEW"}(e||(exports.ViewMode=e={})); -},{}],"O1pB":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getHashParams=o;var e=require("../lib/view-mode");function r(r){switch(r){case"time-ordered":return e.ViewMode.CHRONO_FLAME_CHART;case"left-heavy":return e.ViewMode.LEFT_HEAVY_FLAME_GRAPH;case"sandwich":return e.ViewMode.SANDWICH_VIEW;default:return null}}function o(e=window.location.hash){try{if(!e.startsWith("#"))return{};const t=e.substr(1).split("&"),i={};for(const e of t){let[o,t]=e.split("=");if(t=decodeURIComponent(t),"profileURL"===o)i.profileURL=t;else if("title"===o)i.title=t;else if("localProfilePath"===o)i.localProfilePath=t;else if("view"===o){const e=r(t);null!==e?i.viewMode=e:console.error(`Ignoring invalid view specifier: ${t}`)}}return i}catch(o){return console.error("Error when loading hash fragment."),console.error(o),{}}} -},{"../lib/view-mode":"dpTI"}],"uxXA":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ProfileGroupAtom=exports.FlamechartID=void 0;var e,t=require("../lib/atom"),a=require("../lib/math"),l=require("../lib/utils");exports.FlamechartID=e,function(e){e.LEFT_HEAVY="LEFT_HEAVY",e.CHRONO="CHRONO",e.SANDWICH_INVERTED_CALLERS="SANDWICH_INVERTED_CALLERS",e.SANDWICH_CALLEES="SANDWICH_CALLEES"}(e||(exports.FlamechartID=e={}));let i={hover:null,selectedNode:null,configSpaceViewportRect:a.Rect.empty,logicalSpaceViewportSize:a.Vec2.zero};class s extends t.Atom{constructor(){super(...arguments),this.setProfileGroup=(e=>{this.set({name:e.name,indexToView:e.indexToView,profiles:e.profiles.map(e=>({profile:e,chronoViewState:i,leftHeavyViewState:i,sandwichViewState:{callerCallee:null}}))})}),this.setProfileIndexToView=(e=>{null!=this.state&&(e=(0,a.clamp)(e,0,this.state.profiles.length-1),this.set(Object.assign(Object.assign({},this.state),{indexToView:e})))}),this.setSelectedFrame=(e=>{if(null==this.state)return;null!=this.getActiveProfile()&&this.updateActiveSandwichViewState(t=>null==e?{callerCallee:null}:{callerCallee:{invertedCallerFlamegraph:i,calleeFlamegraph:i,selectedFrame:e}})})}set(e){const t=this.state;null!=t&&null!=e&&(0,l.objectsHaveShallowEquality)(t,e)||super.set(e)}getActiveProfile(){var e;return null==this.state?null:this.state.profiles[null===(e=this.state)||void 0===e?void 0:e.indexToView]||null}updateActiveProfileState(e){if(null==this.state)return;const{indexToView:t,profiles:a}=this.state;this.set(Object.assign(Object.assign({},this.state),{profiles:a.map((a,l)=>l!=t?a:e(a))}))}updateActiveSandwichViewState(e){this.updateActiveProfileState(t=>Object.assign(Object.assign({},t),{sandwichViewState:e(t.sandwichViewState)}))}updateFlamechartState(t,a){switch(t){case e.CHRONO:this.updateActiveProfileState(e=>Object.assign(Object.assign({},e),{chronoViewState:a(e.chronoViewState)}));break;case e.LEFT_HEAVY:this.updateActiveProfileState(e=>Object.assign(Object.assign({},e),{leftHeavyViewState:a(e.leftHeavyViewState)}));break;case e.SANDWICH_CALLEES:this.updateActiveSandwichViewState(e=>Object.assign(Object.assign({},e),{callerCallee:null==e.callerCallee?null:Object.assign(Object.assign({},e.callerCallee),{calleeFlamegraph:a(e.callerCallee.calleeFlamegraph)})}));break;case e.SANDWICH_INVERTED_CALLERS:this.updateActiveSandwichViewState(e=>Object.assign(Object.assign({},e),{callerCallee:null==e.callerCallee?null:Object.assign(Object.assign({},e.callerCallee),{invertedCallerFlamegraph:a(e.callerCallee.invertedCallerFlamegraph)})}))}}setFlamechartHoveredNode(e,t){this.updateFlamechartState(e,e=>Object.assign(Object.assign({},e),{hover:t}))}setSelectedNode(e,t){this.updateFlamechartState(e,e=>Object.assign(Object.assign({},e),{selectedNode:t}))}setConfigSpaceViewportRect(e,t){this.updateFlamechartState(e,e=>Object.assign(Object.assign({},e),{configSpaceViewportRect:t}))}setLogicalSpaceViewportSize(e,t){this.updateFlamechartState(e,e=>Object.assign(Object.assign({},e),{logicalSpaceViewportSize:t}))}clearHoverNode(){this.setFlamechartHoveredNode(e.CHRONO,null),this.setFlamechartHoveredNode(e.LEFT_HEAVY,null),this.setFlamechartHoveredNode(e.SANDWICH_CALLEES,null),this.setFlamechartHoveredNode(e.SANDWICH_INVERTED_CALLERS,null)}}exports.ProfileGroupAtom=s; -},{"../lib/atom":"QkVE","../lib/math":"tDuZ","../lib/utils":"ucYa"}],"LDQe":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.tableSortMethodAtom=exports.SortDirection=exports.SortField=exports.errorAtom=exports.loadingAtom=exports.canUseXHR=exports.dragActiveAtom=exports.glCanvasAtom=exports.hashParamsAtom=exports.profileGroupAtom=exports.viewModeAtom=exports.searchQueryAtom=exports.searchIsActiveAtom=exports.flattenRecursionAtom=void 0;var o=require("../lib/atom"),t=require("../lib/view-mode"),e=require("../lib/hash-params"),r=require("./profile-group");const s=new o.Atom(!1,"flattenRecursion");exports.flattenRecursionAtom=s;const n=new o.Atom(!1,"searchIsActive");exports.searchIsActiveAtom=n;const i=new o.Atom("","searchQueryAtom");exports.searchQueryAtom=i;const A=new o.Atom(t.ViewMode.CHRONO_FLAME_CHART,"viewMode");exports.viewModeAtom=A;const a=new r.ProfileGroupAtom(null,"profileGroup");exports.profileGroupAtom=a,A.subscribe(()=>{a.clearHoverNode()});const p=(0,e.getHashParams)(),c=new o.Atom(p,"hashParams");exports.hashParamsAtom=c;const m=new o.Atom(null,"glCanvas");exports.glCanvasAtom=m;const l=new o.Atom(!1,"dragActive");exports.dragActiveAtom=l;const x=window.location.protocol,d="http:"===x||"https:"===x;exports.canUseXHR=d;const u=d&&null!=p.profileURL,h=new o.Atom(u,"loading");exports.loadingAtom=h;const S=new o.Atom(!1,"error");var v,w;exports.errorAtom=S,exports.SortField=v,function(o){o[o.SYMBOL_NAME=0]="SYMBOL_NAME",o[o.SELF=1]="SELF",o[o.TOTAL=2]="TOTAL"}(v||(exports.SortField=v={})),exports.SortDirection=w,function(o){o[o.ASCENDING=0]="ASCENDING",o[o.DESCENDING=1]="DESCENDING"}(w||(exports.SortDirection=w={}));const E=new o.Atom({field:v.SELF,direction:w.DESCENDING},"tableSortMethod");exports.tableSortMethodAtom=E; -},{"../lib/atom":"QkVE","../lib/view-mode":"dpTI","../lib/hash-params":"O1pB","./profile-group":"uxXA"}],"MY42":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useActiveProfileState=t;var e=require("./getters"),i=require("."),r=require("../lib/atom");function t(){const t=(0,r.useAtom)(i.flattenRecursionAtom),o=(0,r.useAtom)(i.profileGroupAtom);if(!o)return null;if(o.indexToView>=o.profiles.length)return null;const n=o.indexToView,s=o.profiles[n];return Object.assign(Object.assign({},o.profiles[o.indexToView]),{profile:(0,e.getProfileToView)({profile:s.profile,flattenRecursion:t}),index:o.indexToView})} -},{"./getters":"zEXv",".":"LDQe","../lib/atom":"QkVE"}],"KQrJ":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.colorSchemeAtom=exports.ColorScheme=void 0;var e,o=require("../lib/atom");exports.ColorScheme=e,function(e){e[e.SYSTEM=0]="SYSTEM",e[e.DARK=1]="DARK",e[e.LIGHT=2]="LIGHT"}(e||(exports.ColorScheme=e={}));const r="speedscope-color-scheme";function t(){const o=window.localStorage&&window.localStorage[r];return"DARK"===o?e.DARK:"LIGHT"===o?e.LIGHT:e.SYSTEM}function c(){return matchMedia("(prefers-color-scheme: dark)")}function s(o){if(c().matches)switch(o){case e.SYSTEM:return e.LIGHT;case e.LIGHT:return e.DARK;case e.DARK:return e.SYSTEM}else switch(o){case e.SYSTEM:return e.DARK;case e.DARK:return e.LIGHT;case e.LIGHT:return e.SYSTEM}}class a extends o.Atom{constructor(){super(...arguments),this.cycleToNextColorScheme=(()=>{this.set(s(this.get()))})}}const n=new a(t(),"colorScheme");exports.colorSchemeAtom=n,n.subscribe(()=>{const o=n.get();switch(o){case e.DARK:window.localStorage[r]="DARK";break;case e.LIGHT:window.localStorage[r]="LIGHT";break;case e.SYSTEM:delete window.localStorage[r];break;default:return o}return o}); -},{"../lib/atom":"QkVE"}],"osod":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.darkTheme=void 0;var o,r=require("../../lib/color"),e=require("../../lib/utils");!function(o){o.LIGHTER_GRAY="#D0D0D0",o.LIGHT_GRAY="#BDBDBD",o.GRAY="#666666",o.DARK_GRAY="#222222",o.DARKER_GRAY="#0C0C0C",o.OFF_BLACK="#060606",o.BLACK="#000000",o.BLUE="#00769B",o.PALE_BLUE="#004E75",o.GREEN="#0F8A42",o.LIGHT_BROWN="#D6AE24",o.BROWN="#A66F1C"}(o||(o={}));const t=.2,l=.1,a=.2,R=.1,c=o=>{const t=(0,e.triangle)(30*o),l=.9*o*360,a=.2+.1*t,R=.2-.1*t;return r.Color.fromLumaChromaHue(R,a,l)},A=`\n vec3 colorForBucket(float t) {\n float x = triangle(30.0 * t);\n float H = 360.0 * (0.9 * t);\n float C = ${.2.toFixed(1)} + ${.1.toFixed(1)} * x;\n float L = ${.2.toFixed(1)} - ${.1.toFixed(1)} * x;\n return hcl2rgb(H, C, L);\n }\n`,C={fgPrimaryColor:o.LIGHTER_GRAY,fgSecondaryColor:o.GRAY,bgPrimaryColor:o.OFF_BLACK,bgSecondaryColor:o.DARKER_GRAY,altFgPrimaryColor:o.LIGHTER_GRAY,altFgSecondaryColor:o.GRAY,altBgPrimaryColor:o.BLACK,altBgSecondaryColor:o.DARKER_GRAY,selectionPrimaryColor:o.BLUE,selectionSecondaryColor:o.PALE_BLUE,weightColor:o.GREEN,searchMatchTextColor:o.DARKER_GRAY,searchMatchPrimaryColor:o.BROWN,searchMatchSecondaryColor:o.LIGHT_BROWN,colorForBucket:c,colorForBucketGLSL:A};exports.darkTheme=C; -},{"../../lib/color":"x77Y","../../lib/utils":"ucYa"}],"CjU5":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.lightTheme=void 0;var o,r=require("../../lib/color"),e=require("../../lib/utils");!function(o){o.WHITE="#FFFFFF",o.OFF_WHITE="#F6F6F6",o.LIGHT_GRAY="#BDBDBD",o.GRAY="#666666",o.DARK_GRAY="#222222",o.OFF_BLACK="#111111",o.BLACK="#000000",o.DARK_BLUE="#2F80ED",o.PALE_DARK_BLUE="#8EB7ED",o.GREEN="#6FCF97",o.YELLOW="#FEDC62",o.ORANGE="#FFAC02"}(o||(o={}));const t=.25,l=.2,a=.8,F=.15,c=o=>{const t=(0,e.triangle)(30*o),l=.9*o*360,a=.25+.2*t,F=.8-.15*t;return r.Color.fromLumaChromaHue(F,a,l)},i=`\n vec3 colorForBucket(float t) {\n float x = triangle(30.0 * t);\n float H = 360.0 * (0.9 * t);\n float C = ${.25.toFixed(1)} + ${.2.toFixed(1)} * x;\n float L = ${.8.toFixed(1)} - ${.15.toFixed(1)} * x;\n return hcl2rgb(H, C, L);\n }\n`,C={fgPrimaryColor:o.BLACK,fgSecondaryColor:o.LIGHT_GRAY,bgPrimaryColor:o.WHITE,bgSecondaryColor:o.OFF_WHITE,altFgPrimaryColor:o.WHITE,altFgSecondaryColor:o.LIGHT_GRAY,altBgPrimaryColor:o.BLACK,altBgSecondaryColor:o.DARK_GRAY,selectionPrimaryColor:o.DARK_BLUE,selectionSecondaryColor:o.PALE_DARK_BLUE,weightColor:o.GREEN,searchMatchTextColor:o.BLACK,searchMatchPrimaryColor:o.ORANGE,searchMatchSecondaryColor:o.YELLOW,colorForBucket:c,colorForBucketGLSL:i};exports.lightTheme=C; -},{"../../lib/color":"x77Y","../../lib/utils":"ucYa"}],"gzKG":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useTheme=i,exports.withTheme=u,exports.colorSchemeToString=a,exports.ThemeProvider=S,exports.ThemeContext=void 0;var e=require("preact"),r=require("preact/hooks"),t=require("../../app-state/color-scheme"),o=require("../../lib/atom"),c=require("../../lib/utils"),n=require("./dark-theme"),h=require("./light-theme");const s=(0,e.createContext)(h.lightTheme);function i(){return(0,r.useContext)(s)}function u(e){return(0,c.memoizeByReference)(e)}function m(){return matchMedia("(prefers-color-scheme: dark)")}function a(e){switch(e){case t.ColorScheme.SYSTEM:return"System";case t.ColorScheme.DARK:return"Dark";case t.ColorScheme.LIGHT:return"Light"}}function l(e,r){switch(e){case t.ColorScheme.SYSTEM:return r?n.darkTheme:h.lightTheme;case t.ColorScheme.DARK:return n.darkTheme;case t.ColorScheme.LIGHT:return h.lightTheme}}function S(c){const[n,h]=(0,r.useState)(()=>m().matches),i=(0,r.useCallback)(e=>{h(e.matches)},[h]);(0,r.useEffect)(()=>{const e=m();return e.addEventListener("change",i),()=>{e.removeEventListener("change",i)}},[i]);const u=l((0,o.useAtom)(t.colorSchemeAtom),n);return(0,e.h)(s.Provider,{value:u,children:c.children})}exports.ThemeContext=s; -},{"preact":"aSor","preact/hooks":"MwGB","../../app-state/color-scheme":"KQrJ","../../lib/atom":"QkVE","../../lib/utils":"ucYa","./dark-theme":"osod","./light-theme":"CjU5"}],"QXNG":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;var e=/-webkit-|-moz-|-ms-/;function t(t){return"string"==typeof t&&e.test(t)}module.exports=exports.default; -},{}],"tSfb":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var u=["-webkit-","-moz-",""];function i(e,r){if("string"==typeof r&&!(0,t.default)(r)&&r.indexOf("calc(")>-1)return u.map(function(e){return r.replace(/calc\(/g,e+"calc(")})}module.exports=exports.default; -},{"css-in-js-utils/lib/isPrefixedValue":"QXNG"}],"ie1g":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("css-in-js-utils/lib/isPrefixedValue"),r=t(e);function t(e){return e&&e.__esModule?e:{default:e}}var s=["-webkit-",""];function u(e,t){if("string"==typeof t&&!(0,r.default)(t)&&t.indexOf("cross-fade(")>-1)return s.map(function(e){return t.replace(/cross-fade\(/g,e+"cross-fade(")})}module.exports=exports.default; -},{"css-in-js-utils/lib/isPrefixedValue":"QXNG"}],"CYBj":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=o;var e=["-webkit-","-moz-",""],r={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function o(o,t){if("cursor"===o&&r.hasOwnProperty(t))return e.map(function(e){return e+t})}module.exports=exports.default; -},{}],"MH9I":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var i=["-webkit-",""];function u(e,r){if("string"==typeof r&&!(0,t.default)(r)&&r.indexOf("filter(")>-1)return i.map(function(e){return r.replace(/filter\(/g,e+"filter(")})}module.exports=exports.default; -},{"css-in-js-utils/lib/isPrefixedValue":"QXNG"}],"jmPR":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e={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 i(i,l){if("display"===i&&e.hasOwnProperty(l))return e[l]}module.exports=exports.default; -},{}],"FRuF":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=s;var e={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},t={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function s(s,l,r){t.hasOwnProperty(s)&&(r[t[s]]=e[l]||l)}module.exports=exports.default; -},{}],"bHSr":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},t={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};function i(i,r,o){"flexDirection"===i&&"string"==typeof r&&(r.indexOf("column")>-1?o.WebkitBoxOrient="vertical":o.WebkitBoxOrient="horizontal",r.indexOf("reverse")>-1?o.WebkitBoxDirection="reverse":o.WebkitBoxDirection="normal"),t.hasOwnProperty(i)&&(o[t[i]]=e[r]||r)}module.exports=exports.default; -},{}],"QxYG":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var i=["-webkit-","-moz-",""],a=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;function n(e,r){if("string"==typeof r&&!(0,t.default)(r)&&a.test(r))return i.map(function(e){return e+r})}module.exports=exports.default; -},{"css-in-js-utils/lib/isPrefixedValue":"QXNG"}],"qrrU":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var i=["-webkit-",""];function u(e,r){if("string"==typeof r&&!(0,t.default)(r)&&r.indexOf("image-set(")>-1)return i.map(function(e){return r.replace(/image-set\(/g,e+"image-set(")})}module.exports=exports.default; -},{"css-in-js-utils/lib/isPrefixedValue":"QXNG"}],"pEQ2":[function(require,module,exports) { -"use strict";function e(e,t){if("position"===e&&"sticky"===t)return["-webkit-sticky","sticky"]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e,module.exports=exports.default; -},{}],"M0DH":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var t=["-webkit-","-moz-",""],e={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},n={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function i(i,o){if(e.hasOwnProperty(i)&&n.hasOwnProperty(o))return t.map(function(t){return t+o})}module.exports=exports.default; -},{}],"jNGL":[function(require,module,exports) { -"use strict";var e=/[A-Z]/g,r=/^ms-/,s={};function t(t){return t in s?s[t]:s[t]=t.replace(e,"-$&").toLowerCase().replace(r,"-ms-")}module.exports=t; -},{}],"S6J3":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("hyphenate-style-name"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}function u(e){return(0,t.default)(e)}module.exports=exports.default; -},{"hyphenate-style-name":"jNGL"}],"XxlV":[function(require,module,exports) { -"use strict";function e(e){return e.charAt(0).toUpperCase()+e.slice(1)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e,module.exports=exports.default; -},{}],"cnM4":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=l;var t=require("css-in-js-utils/lib/hyphenateProperty"),e=s(t),r=require("css-in-js-utils/lib/isPrefixedValue"),i=s(r),n=require("../../utils/capitalizeString"),o=s(n);function s(t){return t&&t.__esModule?t:{default:t}}var u={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},a={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function f(t,r){if((0,i.default)(t))return t;for(var n=t.split(/,(?![^()]*(?:\([^()]*\))?\))/g),o=0,s=n.length;o-1&&"order"!==p)for(var d=r[l],c=0,b=d.length;c-1)return s;var a=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(t){return!/-webkit-|-ms-/.test(t)}).join(",");return t.indexOf("Moz")>-1?a:(r["Webkit"+(0,o.default)(t)]=s,r["Moz"+(0,o.default)(t)]=a,n)}}module.exports=exports.default; -},{"css-in-js-utils/lib/hyphenateProperty":"S6J3","css-in-js-utils/lib/isPrefixedValue":"QXNG","../../utils/capitalizeString":"XxlV"}],"ZBgn":[function(require,module,exports) { -"use strict";function r(r){for(var t=5381,e=r.length;e;)t=33*t^r.charCodeAt(--e);return t>>>0}module.exports=r; -},{}],"D2Wi":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("./capitalizeString"),r=t(e);function t(e){return e&&e.__esModule?e:{default:e}}function u(e,t,u){if(e.hasOwnProperty(t)){for(var o={},a=e[t],n=(0,r.default)(t),f=Object.keys(u),l=0;l0&&(i[s]=d)}else{var x=(0,u.default)(l,s,n,i,t);x&&(i[s]=x),i=(0,r.default)(t,s,i)}}return i}}module.exports=exports.default; -},{"../utils/prefixProperty":"D2Wi","../utils/prefixValue":"qgi9","../utils/addNewValuesOnly":"a80f","../utils/isObject":"ek9P"}],"AARE":[function(require,module,exports) { -var global = arguments[3]; -var e=arguments[3];function t(e){r.length||(n(),a=!0),r[r.length]=e}module.exports=t;var n,r=[],a=!1,o=0,u=1024;function l(){for(;ou){for(var t=0,n=r.length-o;t4&&void 0!==arguments[4]?arguments[4]:[];if(!Q[e]){var o=N(t,r,i,V,n);te(e,o)}},ne=function(){$=[],Q={},ee=!1,Z=null},ie=function(){return $},oe=function(){if(ee)throw new Error("Cannot buffer while already buffering");ee=!0},ae=function(){ee=!1;var e=$;return $=[],e},se=function(){return ae().join("")},ue=function(){var e=ae();e.length>0&&K(e)};exports.flushToStyleTag=ue;var le=function(){return Object.keys(Q)},fe=function(e){e.forEach(function(e){Q[e]=!0})},ce=function e(t,r,n,i){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:[];fe(e)}}()},ge="undefined"!=typeof window?null:{renderStatic:function(){return function(e){return ne(),oe(),{html:e(),css:{content:se(),renderedClassNames:le()}}}}()},Se=null;function ve(e,t){return{StyleSheet:Object.assign({},he,{extend:function(){return function(r){var n=r.map(function(e){return e.selectorHandler}).filter(function(e){return e});return ve(e,t.concat(n))}}()}),StyleSheetServer:ge,StyleSheetTestUtils:Se,minify:function(){return function(e){me=e?W:pe}}(),css:function(){return function(){for(var r=arguments.length,n=Array(r),i=0;i{const t=s(e.name,this.searchQuery);this.matches.set(e,0===t.length?null:t)})),this.matches.get(e)||null}}exports.ProfileSearchResults=r;class h{constructor(e,t){this.flamechart=e,this.profileResults=t,this.matches=null}getResults(){if(null==this.matches){const e=[],s=new Map,r=(h,a)=>{const{node:c}=h;if(this.profileResults.getMatchForFrame(c.frame)){const r=new t.Rect(new t.Vec2(h.start,a),new t.Vec2(h.end-h.start,1));s.set(c,e.length),e.push({configSpaceBounds:r,node:c})}h.children.forEach(e=>{r(e,a+1)})},h=this.flamechart.getLayers();h.length>0&&h[0].forEach(e=>r(e,0)),this.matches={matches:e,indexForNode:s}}return this.matches}count(){return this.getResults().matches.length}indexOf(e){const t=this.getResults().indexForNode.get(e);return void 0===t?null:t}at(e){const t=this.getResults().matches;if(e<0||e>=t.length)throw new Error(`Index ${e} out of bounds in list of ${t.length} matches.`);return t[e]}}exports.FlamechartSearchResults=h; -},{"./math":"tDuZ"}],"t9CM":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SearchView=exports.ProfileSearchContextProvider=exports.ProfileSearchContext=void 0;var e=require("aphrodite"),t=require("preact"),r=require("preact/hooks"),o=require("preact/compat"),n=require("./style"),s=require("../lib/profile-search"),i=require("../app-state/active-profile-state"),l=require("./themes/theme"),a=require("../app-state"),c=require("../lib/atom");function u(e){e.stopPropagation()}const h=(0,t.createContext)(null);exports.ProfileSearchContext=h;const p=({children:e})=>{const o=(0,i.useActiveProfileState)(),n=o?o.profile:null,l=(0,c.useAtom)(a.searchIsActiveAtom),u=(0,c.useAtom)(a.searchQueryAtom),p=(0,r.useMemo)(()=>n&&l&&0!==u.length?new s.ProfileSearchResults(n,u):null,[l,u,n]);return(0,t.h)(h.Provider,{value:p},e)};exports.ProfileSearchContextProvider=p;const d=(0,o.memo)(({numResults:o,resultIndex:n,selectNext:s,selectPrev:i})=>{const h=(0,l.useTheme)(),p=m(h),d=(0,c.useAtom)(a.searchIsActiveAtom),f=(0,c.useAtom)(a.searchQueryAtom),y=a.searchQueryAtom.set,g=a.searchIsActiveAtom.set,x=(0,r.useCallback)(e=>{const t=e.target.value;y(t)},[y]),b=(0,r.useRef)(null),v=(0,r.useCallback)(()=>g(!1),[g]),C=(0,r.useCallback)(e=>{e.shiftKey?i():s()},[i,s]),S=(0,r.useCallback)(e=>{e.stopPropagation(),"Escape"===e.key&&g(!1),"Enter"===e.key&&C(e),"f"==e.key&&(e.metaKey||e.ctrlKey)&&(b.current&&b.current.select(),e.preventDefault())},[g,C]);return(0,r.useEffect)(()=>{const e=e=>{"f"==e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b.current?b.current.select():(g(!0),requestAnimationFrame(()=>{b.current&&b.current.select()})))};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[g]),d?(0,t.h)("div",{className:(0,e.css)(p.searchView)},(0,t.h)("span",{className:(0,e.css)(p.icon)},"🔍"),(0,t.h)("span",{className:(0,e.css)(p.inputContainer)},(0,t.h)("input",{className:(0,e.css)(p.input),value:f,onInput:x,onKeyDown:S,onKeyUp:u,onKeyPress:u,ref:b})),null!=o&&(0,t.h)(t.Fragment,null,(0,t.h)("span",{className:(0,e.css)(p.resultCount)},null==n?"?":n+1,"/",o),(0,t.h)("button",{className:(0,e.css)(p.icon,p.button),onClick:i},"⬅️"),(0,t.h)("button",{className:(0,e.css)(p.icon,p.button),onClick:s},"➡️")),(0,t.h)("svg",{className:(0,e.css)(p.icon),onClick:v,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.h)("path",{d:"M4.99999 4.16217L11.6427 10.8048M11.6427 4.16217L4.99999 10.8048",stroke:h.altFgSecondaryColor}))):null});exports.SearchView=d;const m=(0,l.withTheme)(t=>e.StyleSheet.create({searchView:{position:"absolute",top:0,right:10,height:n.Sizes.TOOLBAR_HEIGHT,width:208,borderWidth:2,borderColor:t.altFgPrimaryColor,borderStyle:"solid",fontSize:n.FontSize.LABEL,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:n.FontSize.LABEL,lineHeight:`${n.Sizes.TOOLBAR_HEIGHT}px`,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:n.FontSize.LABEL},button:{display:"inline",background:"none",border:"none",padding:0,":focus":{outline:"none"}}})); -},{"aphrodite":"CxN7","preact":"aSor","preact/hooks":"MwGB","preact/compat":"AQ6k","./style":"hvr4","../lib/profile-search":"DHvC","../app-state/active-profile-state":"MY42","./themes/theme":"gzKG","../app-state":"LDQe","../lib/atom":"QkVE"}],"FbpF":[function(require,module,exports) { -"use strict";function e(e){return e.replace(/\\([a-fA-F0-9]{2})/g,(e,n)=>{const t=parseInt(n,16);return String.fromCharCode(t)})}function n(n){const t=n.split("\n");if(!t.length)return null;if(""===t[t.length-1]&&t.pop(),!t.length)return null;const r=new Map,o=/^(\d+):(.+)$/,s=/^([\$\w]+):([\$\w-]+)$/;for(const u of t){const n=o.exec(u);if(n){r.set(`wasm-function[${n[1]}]`,e(n[2]));continue}const t=s.exec(u);if(!t)return null;r.set(t[1],e(t[2]))}return e=>r.has(e.name)?{name:r.get(e.name)}:null}Object.defineProperty(exports,"__esModule",{value:!0}),exports.importEmscriptenSymbolMap=n; -},{}],"Pua8":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ColorChit=o;var e=require("preact"),t=require("aphrodite"),r=require("./style"),i=require("./themes/theme");function o(r){const o=s((0,i.useTheme)());return(0,e.h)("span",{className:(0,t.css)(o.stackChit),style:{backgroundColor:r.color}})}const s=(0,i.withTheme)(e=>t.StyleSheet.create({stackChit:{position:"relative",top:-1,display:"inline-block",verticalAlign:"middle",marginRight:"0.5em",border:`1px solid ${e.fgSecondaryColor}`,width:r.FontSize.LABEL-2,height:r.FontSize.LABEL-2}})); -},{"preact":"aSor","aphrodite":"CxN7","./style":"hvr4","./themes/theme":"gzKG"}],"SGwe":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ScrollableListView=void 0;var e=require("preact"),t=require("preact/hooks");const r=({items:r,axis:l,renderItems:n,className:i,initialIndexInView:s})=>{const[u,o]=(0,t.useState)(null),[c,a]=(0,t.useState)(0),d=(0,t.useRef)(null),f="x"===l?"width":"height",x="x"===l?"left":"top",b="x"===l?"scrollLeft":"scrollTop",h=s?r.reduce((e,t,r)=>r{e?requestAnimationFrame(()=>{o(e.getBoundingClientRect()[f]),null!=m.current&&(e.scrollTo({[x]:m.current}),m.current=null)}):o(null),d.current=e},[o,f,x]),g=(0,t.useMemo)(()=>{if(null==d.current||null==u||null==c)return null;const e=c-u/4,t=c+u+u/4;let l=0,n=0,i=0;for(;i=e)break}const s=i;for(;i=t)break}return{firstVisibleIndex:s,lastVisibleIndex:Math.min(i,r.length-1),invisiblePrefixSize:n}},[u,c,r]),p=(0,t.useMemo)(()=>r.reduce((e,t)=>e+t.size,0),[r]),w=(0,t.useCallback)(()=>{null!=d.current&&a(d.current[b])},[b]);(0,t.useEffect)(()=>{const e=()=>{null!=d.current&&o(d.current.getBoundingClientRect()[f])};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[f]);const z=(0,t.useMemo)(()=>g?n(g.firstVisibleIndex,g.lastVisibleIndex):null,[n,g]),I=(0,t.useMemo)(()=>(0,e.h)("div",{style:{height:p}},(0,e.h)("div",{style:{transform:`translateY(${(null==g?void 0:g.invisiblePrefixSize)||0}px)`}},z)),[g,z,p]);return(0,e.h)("div",{className:i,ref:v,onScroll:w},I)};exports.ScrollableListView=r; -},{"preact":"aSor","preact/hooks":"MwGB"}],"Ivh5":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ProfileTableViewContainer=exports.ProfileTableView=void 0;var e=require("preact"),t=require("aphrodite"),r=require("../lib/utils"),o=require("./style"),l=require("./color-chit"),i=require("./scrollable-list-view"),a=require("../app-state/getters"),s=require("preact/compat"),c=require("preact/hooks"),n=require("./sandwich-view"),h=require("../lib/color"),d=require("./themes/theme"),m=require("../app-state"),u=require("../lib/atom");function S(r){const o=p((0,d.useTheme)());return(0,e.h)("div",{className:(0,t.css)(o.hBarDisplay)},(0,e.h)("div",{className:(0,t.css)(o.hBarDisplayFilled),style:{width:`${r.perc}%`}}))}function b(r){const o=(0,d.useTheme)(),l=p(o),{activeDirection:i}=r,a=i===m.SortDirection.ASCENDING?o.fgPrimaryColor:o.fgSecondaryColor,s=i===m.SortDirection.DESCENDING?o.fgPrimaryColor:o.fgSecondaryColor;return(0,e.h)("svg",{width:"8",height:"10",viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:(0,t.css)(l.sortIcon)},(0,e.h)("path",{d:"M0 4L4 0L8 4H0Z",fill:a}),(0,e.h)("path",{d:"M0 4L4 0L8 4H0Z",transform:"translate(0 10) scale(1 -1)",fill:s}))}function g(t,r,o){const l=[];let i=0;for(let a of r)l.push(t.slice(i,a[0])),l.push((0,e.h)("span",{className:o},t.slice(a[0],a[1]))),i=a[1];return l.push(t.slice(i)),(0,e.h)("span",null,l)}const C=({frame:o,matchedRanges:i,profile:a,index:s,selectedFrame:c,setSelectedFrame:n,getCSSColorForFrame:h})=>{const m=p((0,d.useTheme)()),u=o.getTotalWeight(),b=o.getSelfWeight(),C=100*u/a.getTotalNonIdleWeight(),f=100*b/a.getTotalNonIdleWeight(),w=o===c;return(0,e.h)("tr",{key:`${s}`,onClick:n.bind(null,o),className:(0,t.css)(m.tableRow,s%2==0&&m.tableRowEven,w&&m.tableRowSelected)},(0,e.h)("td",{className:(0,t.css)(m.numericCell)},a.formatValue(u)," (",(0,r.formatPercent)(C),")",(0,e.h)(S,{perc:C})),(0,e.h)("td",{className:(0,t.css)(m.numericCell)},a.formatValue(b)," (",(0,r.formatPercent)(f),")",(0,e.h)(S,{perc:f})),(0,e.h)("td",{title:o.file,className:(0,t.css)(m.textCell)},(0,e.h)(l.ColorChit,{color:h(o)}),i?g(o.name,i,(0,t.css)(m.matched,w&&m.matchedSelected)):o.name))},f=(0,s.memo)(({profile:r,sortMethod:l,setSortMethod:a,selectedFrame:s,setSelectedFrame:h,getCSSColorForFrame:u,searchQuery:S,searchIsActive:g})=>{const f=p((0,d.useTheme)()),w=(0,c.useCallback)((e,t)=>{if(t.preventDefault(),l.field==e)a({field:e,direction:l.direction===m.SortDirection.ASCENDING?m.SortDirection.DESCENDING:m.SortDirection.ASCENDING});else switch(e){case m.SortField.SYMBOL_NAME:a({field:e,direction:m.SortDirection.ASCENDING});break;case m.SortField.SELF:case m.SortField.TOTAL:a({field:e,direction:m.SortDirection.DESCENDING})}},[l,a]),F=(0,c.useContext)(n.SandwichViewContext),y=(0,c.useCallback)((o,l)=>{if(!F)return null;const i=[];for(let e=o;e<=l;e++){const t=F.rowList[e],o=F.getSearchMatchForFrame(t);i.push(C({frame:t,matchedRanges:null==o?null:o,index:e,profile:r,selectedFrame:s,setSelectedFrame:h,getCSSColorForFrame:u}))}return 0===i.length&&(g?i.push((0,e.h)("tr",null,(0,e.h)("td",{className:(0,t.css)(f.emptyState)},'No symbol names match query "',S,'".'))):i.push((0,e.h)("tr",null,(0,e.h)("td",{className:(0,t.css)(f.emptyState)},"No symbols found.")))),(0,e.h)("table",{className:(0,t.css)(f.tableView)},i)},[F,r,s,h,u,g,S,f.emptyState,f.tableView]),N=(0,c.useMemo)(()=>null==F?[]:F.rowList.map(e=>({size:o.Sizes.FRAME_HEIGHT})),[F]),E=(0,c.useCallback)(e=>w(m.SortField.TOTAL,e),[w]),A=(0,c.useCallback)(e=>w(m.SortField.SELF,e),[w]),v=(0,c.useCallback)(e=>w(m.SortField.SYMBOL_NAME,e),[w]);return(0,e.h)("div",{className:(0,t.css)(o.commonStyle.vbox,f.profileTableView)},(0,e.h)("table",{className:(0,t.css)(f.tableView)},(0,e.h)("thead",{className:(0,t.css)(f.tableHeader)},(0,e.h)("tr",null,(0,e.h)("th",{className:(0,t.css)(f.numericCell),onClick:E},(0,e.h)(b,{activeDirection:l.field===m.SortField.TOTAL?l.direction:null}),"Total"),(0,e.h)("th",{className:(0,t.css)(f.numericCell),onClick:A},(0,e.h)(b,{activeDirection:l.field===m.SortField.SELF?l.direction:null}),"Self"),(0,e.h)("th",{className:(0,t.css)(f.textCell),onClick:v},(0,e.h)(b,{activeDirection:l.field===m.SortField.SYMBOL_NAME?l.direction:null}),"Symbol Name")))),(0,e.h)(i.ScrollableListView,{axis:"y",items:N,className:(0,t.css)(f.scrollView),renderItems:y,initialIndexInView:null==s?null:null==F?void 0:F.getIndexForFrame(s)}))});exports.ProfileTableView=f;const p=(0,d.withTheme)(e=>t.StyleSheet.create({profileTableView:{background:e.bgPrimaryColor,height:"100%"},scrollView:{overflowY:"auto",overflowX:"hidden",flexGrow:1,"::-webkit-scrollbar":{background:e.bgPrimaryColor},"::-webkit-scrollbar-thumb":{background:e.fgSecondaryColor,borderRadius:20,border:`3px solid ${e.bgPrimaryColor}`,":hover":{background:e.fgPrimaryColor}}},tableView:{width:"100%",fontSize:o.FontSize.LABEL,background:e.bgPrimaryColor},tableHeader:{borderBottom:`2px solid ${e.bgSecondaryColor}`,textAlign:"left",color:e.fgPrimaryColor,userSelect:"none"},sortIcon:{position:"relative",top:1,marginRight:o.Sizes.FRAME_HEIGHT/4},tableRow:{background:e.bgPrimaryColor,height:o.Sizes.FRAME_HEIGHT},tableRowEven:{background:e.bgSecondaryColor},tableRowSelected:{background:e.selectionPrimaryColor,color:e.altFgPrimaryColor},numericCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",position:"relative",textAlign:"right",paddingRight:o.Sizes.FRAME_HEIGHT,width:6*o.Sizes.FRAME_HEIGHT,minWidth:6*o.Sizes.FRAME_HEIGHT},textCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:"100%",maxWidth:0},hBarDisplay:{position:"absolute",background:h.Color.fromCSSHex(e.weightColor).withAlpha(.2).toCSS(),bottom:2,height:2,width:`calc(100% - ${2*o.Sizes.FRAME_HEIGHT}px)`,right:o.Sizes.FRAME_HEIGHT},hBarDisplayFilled:{height:"100%",position:"absolute",background:e.weightColor,right:0},matched:{borderBottom:`2px solid ${e.fgPrimaryColor}`},matchedSelected:{borderColor:e.altFgPrimaryColor},emptyState:{textAlign:"center",fontWeight:"bold"}})),w=(0,s.memo)(t=>{const{activeProfileState:r}=t,{profile:o,sandwichViewState:l}=r;if(!o)throw new Error("profile missing");const i=(0,u.useAtom)(m.tableSortMethodAtom),s=(0,d.useTheme)(),{callerCallee:n}=l,h=n?n.selectedFrame:null,S=(0,a.getFrameToColorBucket)(o),b=(0,a.createGetCSSColorForFrame)({theme:s,frameToColorBucket:S}),g=(0,c.useCallback)(e=>{m.profileGroupAtom.setSelectedFrame(e)},[]),C=(0,u.useAtom)(m.searchIsActiveAtom),p=(0,u.useAtom)(m.searchQueryAtom);return(0,e.h)(f,{profile:o,selectedFrame:h,getCSSColorForFrame:b,sortMethod:i,setSelectedFrame:g,setSortMethod:m.tableSortMethodAtom.set,searchIsActive:C,searchQuery:p})});exports.ProfileTableViewContainer=w; -},{"preact":"aSor","aphrodite":"CxN7","../lib/utils":"ucYa","./style":"hvr4","./color-chit":"Pua8","./scrollable-list-view":"SGwe","../app-state/getters":"zEXv","preact/compat":"AQ6k","preact/hooks":"MwGB","./sandwich-view":"L8J2","../lib/color":"x77Y","./themes/theme":"gzKG","../app-state":"LDQe","../lib/atom":"QkVE"}],"gFMr":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Flamechart=void 0;var t=require("./utils"),e=require("./math");class i{getTotalWeight(){return this.totalWeight}getLayers(){return this.layers}getColorBucketForFrame(t){return this.source.getColorBucketForFrame(t)}getMinFrameWidth(){return this.minFrameWidth}formatValue(t){return this.source.formatValue(t)}getClampedViewportWidth(t){const i=this.getTotalWeight(),r=Math.pow(2,40),s=(0,e.clamp)(3*this.getMinFrameWidth(),i/r,i);return(0,e.clamp)(t,s,i)}getClampedConfigSpaceViewportRect({configSpaceViewportRect:t,renderInverted:i}){const r=new e.Vec2(this.getTotalWeight(),this.getLayers().length),s=this.getClampedViewportWidth(t.size.x),h=t.size.withX(s),a=e.Vec2.clamp(t.origin,new e.Vec2(0,i?0:-1),e.Vec2.max(e.Vec2.zero,r.minus(h).plus(new e.Vec2(0,1))));return new e.Rect(a,t.size.withX(s))}constructor(e){this.source=e,this.layers=[],this.totalWeight=0,this.minFrameWidth=1;const i=[];this.minFrameWidth=1/0;this.totalWeight=e.getTotalWeight(),e.forEachCall((e,r)=>{const s=(0,t.lastOf)(i),h={node:e,parent:s,children:[],start:r,end:r};s&&s.children.push(h),i.push(h)},(t,e)=>{console.assert(i.length>0);const r=i.pop();if(r.end=e,r.end-r.start==0)return;const s=i.length;for(;this.layers.length<=s;)this.layers.push([]);this.layers[s].push(r),this.minFrameWidth=Math.min(this.minFrameWidth,r.end-r.start)}),isFinite(this.minFrameWidth)||(this.minFrameWidth=1)}}exports.Flamechart=i; -},{"./utils":"ucYa","./math":"tDuZ"}],"P80v":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartRenderer=exports.FlamechartRowAtlasKey=void 0;var e=require("./rectangle-batch-renderer"),t=require("../lib/math"),r=require("../lib/color"),n=require("../lib/utils"),s=require("./graphics"),o=require("./utils");const c=1e4;class i{constructor(e,t,r){this.batch=e,this.bounds=t,this.numPrecedingRectanglesInRow=r,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,t){this.bounds.hasIntersectionWith(e)&&t(this)}}class h{constructor(e){if(this.children=e,this.rectCount=0,0===e.length)throw new Error("Empty interior node");let r=1/0,n=-1/0,s=1/0,o=-1/0;for(let t of e){this.rectCount+=t.getRectCount();const e=t.getBounds();r=Math.min(r,e.left()),n=Math.max(n,e.right()),s=Math.min(s,e.top()),o=Math.max(o,e.bottom())}this.bounds=new t.Rect(new t.Vec2(r,s),new t.Vec2(n-r,o-s))}getBounds(){return this.bounds}getRectCount(){return this.rectCount}getChildren(){return this.children}forEachLeafNodeWithinBounds(e,t){if(this.bounds.hasIntersectionWith(e))for(let r of this.children)r.forEachLeafNodeWithinBounds(e,t)}}class a{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,t){return e.getOrInsert(new a(t))}}exports.FlamechartRowAtlasKey=a;class l{constructor(s,o,a,l,g,d={inverted:!1}){this.gl=s,this.rowAtlas=o,this.flamechart=a,this.rectangleBatchRenderer=l,this.colorPassRenderer=g,this.options=d,this.layers=[],this.rectInfoTexture=null,this.rectInfoRenderTarget=null,this.atlasKeys=new n.KeyedSet;const f=a.getLayers().length;for(let n=0;n=c&&(s.push(new i(u,new t.Rect(new t.Vec2(l,o),new t.Vec2(g-l,1)),R)),l=1/0,g=-1/0,u=new e.RectangleBatch(this.gl));const d=new t.Rect(new t.Vec2(a.start,o),new t.Vec2(a.end-a.start,1));l=Math.min(l,d.left()),g=Math.max(g,d.right());const f=new r.Color((1+h%255)/256,(1+n%255)/256,(1+this.flamechart.getColorBucketForFrame(a.node.frame))/256);u.addRect(d,f),R++}u.getRectCount()>0&&s.push(new i(u,new t.Rect(new t.Vec2(l,o),new t.Vec2(g-l,1)),R)),this.layers.push(new h(s))}}getRectInfoTexture(e,t){if(this.rectInfoTexture){const r=this.rectInfoTexture;r.width==e&&r.height==t||r.resize(e,t)}else this.rectInfoTexture=this.gl.createTexture(s.Graphics.TextureFormat.NEAREST_CLAMP,e,t);return this.rectInfoTexture}getRectInfoRenderTarget(e,t){const r=this.getRectInfoTexture(e,t);return this.rectInfoRenderTarget&&this.rectInfoRenderTarget.texture!=r&&(this.rectInfoRenderTarget.texture.free(),this.rectInfoRenderTarget.setColor(r)),this.rectInfoRenderTarget||(this.rectInfoRenderTarget=this.gl.createRenderTarget(r)),this.rectInfoRenderTarget}free(){this.rectInfoRenderTarget&&this.rectInfoRenderTarget.free(),this.rectInfoTexture&&this.rectInfoTexture.free()}configSpaceBoundsForKey(e){const{stackDepth:r,zoomLevel:n,index:s}=e,o=this.flamechart.getTotalWeight()/Math.pow(2,n),c=this.flamechart.getLayers().length,i=this.options.inverted?c-1-r:r;return new t.Rect(new t.Vec2(o*s,i),new t.Vec2(o,1))}render(e){const{configSpaceSrcRect:r,physicalSpaceDstRect:n}=e,c=[],i=t.AffineTransform.betweenRects(r,n);if(r.isEmpty())return;let h=0;for(;;){const e=a.getOrInsert(this.atlasKeys,{stackDepth:0,zoomLevel:h,index:0}),t=this.configSpaceBoundsForKey(e);if(i.transformRect(t).width(){const r=this.configSpaceBoundsForKey(t);this.layers[t.stackDepth].forEachLeafNodeWithinBounds(r,t=>{this.rectangleBatchRenderer.render({batch:t.getBatch(),configSpaceSrcRect:r,physicalSpaceDstRect:e})})});const T=this.getRectInfoRenderTarget(n.width(),n.height());(0,o.renderInto)(this.gl,T,()=>{this.gl.clear(new s.Graphics.Color(0,0,0,0));const e=new t.Rect(t.Vec2.zero,new t.Vec2(this.gl.viewport.width,this.gl.viewport.height)),n=t.AffineTransform.betweenRects(r,e);for(let t of m){const e=this.configSpaceBoundsForKey(t);this.rowAtlas.renderViaAtlas(t,n.transformRect(e))}for(let t of I){const e=this.configSpaceBoundsForKey(t),r=n.transformRect(e);this.layers[t.stackDepth].forEachLeafNodeWithinBounds(e,t=>{this.rectangleBatchRenderer.render({batch:t.getBatch(),configSpaceSrcRect:e,physicalSpaceDstRect:r})})}});const x=this.getRectInfoTexture(n.width(),n.height());this.colorPassRenderer.render({rectInfoTexture:x,srcRect:new t.Rect(t.Vec2.zero,new t.Vec2(x.width,x.height)),dstRect:n,renderOutlines:e.renderOutlines})}}exports.FlamechartRenderer=l; -},{"./rectangle-batch-renderer":"UGJH","../lib/math":"tDuZ","../lib/color":"x77Y","../lib/utils":"ucYa","./graphics":"XGYN","./utils":"MMP6"}],"jZ6t":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFlamechartStyle=void 0;var e=require("aphrodite"),o=require("./style"),r=require("./themes/theme");const t=(0,r.withTheme)(r=>e.StyleSheet.create({hoverCount:{color:r.weightColor},fill:{width:"100%",height:"100%",position:"absolute",left:0,top:0},minimap:{height:o.Sizes.MINIMAP_HEIGHT,borderBottom:`${o.Sizes.SEPARATOR_HEIGHT}px solid ${r.fgSecondaryColor}`},panZoomView:{flex:1},detailView:{display:"grid",height:o.Sizes.DETAIL_VIEW_HEIGHT,overflow:"hidden",gridTemplateColumns:"120px 120px 1fr",gridTemplateRows:"repeat(4, 1fr)",borderTop:`${o.Sizes.SEPARATOR_HEIGHT}px solid ${r.fgSecondaryColor}`,fontSize:o.FontSize.LABEL,position:"absolute",background:r.bgPrimaryColor,width:"100vw",bottom:0},stackTraceViewPadding:{padding:5},stackTraceView:{height:o.Sizes.DETAIL_VIEW_HEIGHT,lineHeight:`${o.FontSize.LABEL+2}px`,overflow:"auto","::-webkit-scrollbar":{background:r.bgPrimaryColor},"::-webkit-scrollbar-thumb":{background:r.fgSecondaryColor,borderRadius:20,border:`3px solid ${r.bgPrimaryColor}`,":hover":{background:r.fgPrimaryColor}}},stackLine:{whiteSpace:"nowrap"},stackFileLine:{color:r.fgSecondaryColor},statsTable:{display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:`repeat(3, ${o.FontSize.LABEL+10}px)`,gridGap:"1px 1px",textAlign:"center",paddingRight:1},statsTableHeader:{gridColumn:"1 / 3"},statsTableCell:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},thisInstanceCell:{background:r.selectionPrimaryColor,color:r.altFgPrimaryColor},allInstancesCell:{background:r.selectionSecondaryColor,color:r.altFgPrimaryColor},barDisplay:{position:"absolute",top:0,left:0,background:"rgba(0, 0, 0, 0.2)",width:"100%"}}));exports.getFlamechartStyle=t; -},{"aphrodite":"CxN7","./style":"hvr4","./themes/theme":"gzKG"}],"eeWS":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.cachedMeasureTextWidth=i,exports.buildTrimmedText=s,exports.trimTextMid=h,exports.remapRangesToTrimmedText=o,exports.ELLIPSIS=void 0;var e=require("./utils");const t="…";exports.ELLIPSIS=t;const n=new Map;let r=-1;function i(e,t){return window.devicePixelRatio!==r&&(n.clear(),r=window.devicePixelRatio),n.has(t)||n.set(t,e.measureText(t).width),n.get(t)}function s(e,n){if(e.length<=n)return{trimmedString:e,trimmedLength:e.length,prefixLength:e.length,suffixLength:0,originalString:e,originalLength:e.length};let r=Math.floor(n/2);const i=n-r-1,s=e.substring(0,r),h=e.substring(e.length-i,e.length),g=s+t+h;return{trimmedString:g,trimmedLength:g.length,prefixLength:s.length,suffixLength:h.length,originalString:e,originalLength:e.length}}function h(t,n,r){if(i(t,n)<=r)return s(n,n.length);const[h]=(0,e.findValueBisect)(0,n.length,e=>i(t,s(n,Math.floor(e)).trimmedString),r);return s(n,Math.floor(h))}var g;function a(e,t){return t{this.container=e||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=(e=>{if(e.preventDefault(),this.frameHadWheelEvent=!0,(e.metaKey||e.ctrlKey)&&"pan"!==this.interactionLock){let t=1+e.deltaY/100;e.ctrlKey&&(t=1+e.deltaY/40),t=(0,o.clamp)(t,.1,10),this.zoom(t)}else"zoom"!==this.interactionLock&&this.pan(new o.Vec2(e.deltaX,e.deltaY));this.renderCanvas()}),this.dragStartConfigSpaceMouse=null,this.dragConfigSpaceViewportOffset=null,this.draggingMode=null,this.onMouseDown=(t=>{const i=this.configSpaceMouse(t);i&&(this.props.configSpaceViewportRect.contains(i)?(this.draggingMode=e.TRANSLATE_VIEWPORT,this.dragConfigSpaceViewportOffset=i.minus(this.props.configSpaceViewportRect.origin)):this.draggingMode=e.DRAW_NEW_VIEWPORT,this.dragStartConfigSpaceMouse=i,window.addEventListener("mousemove",this.onWindowMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.updateCursor(i))}),this.onWindowMouseMove=(t=>{if(!this.dragStartConfigSpaceMouse)return;let i=this.configSpaceMouse(t);if(i)if(this.updateCursor(i),i=new o.Rect(new o.Vec2(0,0),this.configSpaceSize()).closestPointTo(i),this.draggingMode===e.DRAW_NEW_VIEWPORT){const e=this.dragStartConfigSpaceMouse;let t=i;if(!e||!t)return;const s=Math.min(e.x,t.x),n=Math.max(e.x,t.x)-s,r=this.props.configSpaceViewportRect.height();this.props.setConfigSpaceViewportRect(new o.Rect(new o.Vec2(s,t.y-r/2),new o.Vec2(n,r)))}else if(this.draggingMode===e.TRANSLATE_VIEWPORT){if(!this.dragConfigSpaceViewportOffset)return;const e=i.minus(this.dragConfigSpaceViewportOffset);this.props.setConfigSpaceViewportRect(this.props.configSpaceViewportRect.withOrigin(e))}}),this.updateCursor=(t=>{this.draggingMode===e.TRANSLATE_VIEWPORT?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):this.draggingMode===e.DRAW_NEW_VIEWPORT?document.body.style.cursor="col-resize":this.props.configSpaceViewportRect.contains(t)?(document.body.style.cursor="grab",document.body.style.cursor="-webkit-grab"):document.body.style.cursor="col-resize"}),this.onMouseLeave=(()=>{null==this.draggingMode&&(document.body.style.cursor="default")}),this.onMouseMove=(e=>{const t=this.configSpaceMouse(e);t&&this.updateCursor(t)}),this.onWindowMouseUp=(e=>{this.draggingMode=null,window.removeEventListener("mousemove",this.onWindowMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp);const t=this.configSpaceMouse(e);t&&this.updateCursor(t)}),this.overlayCanvasRef=(e=>{e?(this.overlayCanvas=e,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)})}physicalViewSize(){return new o.Vec2(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}getStyle(){return(0,s.getFlamechartStyle)(this.props.theme)}minimapOrigin(){return new o.Vec2(0,n.Sizes.FRAME_HEIGHT*window.devicePixelRatio)}configSpaceSize(){return new o.Vec2(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}configSpaceToPhysicalViewSpace(){const e=this.minimapOrigin();return o.AffineTransform.betweenRects(new o.Rect(new o.Vec2(0,0),this.configSpaceSize()),new o.Rect(e,this.physicalViewSize().minus(e)))}logicalToPhysicalViewSpace(){return o.AffineTransform.withScale(new o.Vec2(window.devicePixelRatio,window.devicePixelRatio))}windowToLogicalViewSpace(){if(!this.container)return new o.AffineTransform;const e=this.container.getBoundingClientRect();return o.AffineTransform.withTranslation(new o.Vec2(-e.left,-e.top))}renderRects(){this.container&&(this.physicalViewSize().x<2||this.props.canvasContext.renderBehind(this.container,()=>{this.props.flamechartRenderer.render({configSpaceSrcRect:new o.Rect(new o.Vec2(0,0),this.configSpaceSize()),physicalSpaceDstRect:new o.Rect(this.minimapOrigin(),this.physicalViewSize().minus(this.minimapOrigin())),renderOutlines:!1}),this.props.canvasContext.viewportRectangleRenderer.render({configSpaceViewportRect:this.props.configSpaceViewportRect,configSpaceToPhysicalViewSpace:this.configSpaceToPhysicalViewSpace()})}))}renderOverlays(){const e=this.overlayCtx;if(!e)return;const t=this.physicalViewSize();e.clearRect(0,0,t.x,t.y);const i=this.configSpaceToPhysicalViewSpace(),s=this.configSpaceSize().x,c=(this.configSpaceToPhysicalViewSpace().inverted()||new o.AffineTransform).times(this.logicalToPhysicalViewSpace()).transformVector(new o.Vec2(200,1)).x,h=n.Sizes.FRAME_HEIGHT*window.devicePixelRatio,l=n.FontSize.LABEL*window.devicePixelRatio,p=(h-l)/2;e.font=`${l}px/${h}px ${n.FontFamily.MONOSPACE}`,e.textBaseline="top";let d=Math.pow(10,Math.floor(Math.log10(c)));c/d>5?d*=5:c/d>2&&(d*=2);const f=this.props.theme;e.fillStyle=a.Color.fromCSSHex(f.bgPrimaryColor).withAlpha(.8).toCSS(),e.fillRect(0,0,t.x,h),e.textBaseline="top";for(let n=Math.ceil(0/d)*d;n ")),t.push(c.name),c.file){let s=c.file;null!=c.line&&(s+=`:${c.line}`,null!=c.col&&(s+=`:${c.col}`)),t.push((0,l.h)("span",{className:(0,e.css)(r.stackFileLine)}," (",s,")"))}i.push((0,l.h)("div",{className:(0,e.css)(r.stackLine)},t))}return(0,l.h)("div",{className:(0,e.css)(r.stackTraceView)},(0,l.h)("div",{className:(0,e.css)(r.stackTraceViewPadding)},i))}function o(s){const a=(0,t.getFlamechartStyle)((0,c.useTheme)()),{flamechart:o,selectedNode:h}=s,{frame:n}=h;return(0,l.h)("div",{className:(0,e.css)(a.detailView)},(0,l.h)(r,{title:"This Instance",cellStyle:a.thisInstanceCell,grandTotal:o.getTotalWeight(),selectedTotal:h.getTotalWeight(),selectedSelf:h.getSelfWeight(),formatter:o.formatValue.bind(o)}),(0,l.h)(r,{title:"All Instances",cellStyle:a.allInstancesCell,grandTotal:o.getTotalWeight(),selectedTotal:n.getTotalWeight(),selectedSelf:n.getSelfWeight(),formatter:o.formatValue.bind(o)}),(0,l.h)(i,{node:h,getFrameColor:s.getCSSColorForFrame}))} -},{"aphrodite":"CxN7","preact":"aSor","./flamechart-style":"jZ6t","../lib/utils":"ucYa","./color-chit":"Pua8","./themes/theme":"gzKG"}],"e6nh":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BatchCanvasRectRenderer=exports.BatchCanvasTextRenderer=void 0;class t{constructor(){this.argsBatch=[]}text(t){this.argsBatch.push(t)}fill(t,e){if(0!==this.argsBatch.length){t.fillStyle=e;for(let e of this.argsBatch)t.fillText(e.text,e.x,e.y);this.argsBatch=[]}}}exports.BatchCanvasTextRenderer=t;class e{constructor(){this.argsBatch=[]}rect(t){this.argsBatch.push(t)}drawPath(t){t.beginPath();for(let e of this.argsBatch)t.rect(e.x,e.y,e.w,e.h);t.closePath(),this.argsBatch=[]}fill(t,e){0!==this.argsBatch.length&&(t.fillStyle=e,this.drawPath(t),t.fill())}stroke(t,e,s){0!==this.argsBatch.length&&(t.strokeStyle=e,t.lineWidth=s,this.drawPath(t),t.stroke())}}exports.BatchCanvasRectRenderer=e; -},{}],"e7Fh":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartPanZoomView=void 0;var e=require("../lib/math"),t=require("./style"),i=require("../lib/text-utils"),o=require("./flamechart-style"),s=require("preact"),r=require("aphrodite"),n=require("../lib/canvas-2d-batch-renderers"),a=require("../lib/color");class h extends s.Component{constructor(){super(...arguments),this.container=null,this.containerRef=(e=>{this.container=e||null}),this.overlayCanvas=null,this.overlayCtx=null,this.hoveredLabel=null,this.overlayCanvasRef=(e=>{e?(this.overlayCanvas=e,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)}),this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT=t.Sizes.FRAME_HEIGHT,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.onMouseDown=(t=>{this.mouseDownPos=this.lastDragPos=new e.Vec2(t.offsetX,t.offsetY),this.updateCursor(),window.addEventListener("mouseup",this.onWindowMouseUp)}),this.onMouseDrag=(t=>{if(!this.lastDragPos)return;const i=new e.Vec2(t.offsetX,t.offsetY);this.pan(this.lastDragPos.minus(i)),this.lastDragPos=i,this.hoveredLabel&&this.props.onNodeHover(null)}),this.onDblClick=(t=>{if(this.hoveredLabel){const t=this.hoveredLabel.configSpaceBounds,i=new e.Rect(t.origin.minus(new e.Vec2(0,1)),t.size.withY(this.props.configSpaceViewportRect.height()));this.props.setConfigSpaceViewportRect(i)}}),this.onClick=(t=>{const i=new e.Vec2(t.offsetX,t.offsetY),o=this.mouseDownPos;this.mouseDownPos=null,o&&i.minus(o).length()>5||(this.hoveredLabel?(this.props.onNodeSelect(this.hoveredLabel.node),this.renderCanvas()):this.props.onNodeSelect(null))}),this.onWindowMouseUp=(e=>{this.lastDragPos=null,this.updateCursor(),window.removeEventListener("mouseup",this.onWindowMouseUp)}),this.onMouseMove=(t=>{if(this.updateCursor(),this.lastDragPos)return t.preventDefault(),void this.onMouseDrag(t);const i=new e.Vec2(t.offsetX,t.offsetY),o=this.logicalToPhysicalViewSpace().transformPosition(i),s=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(o);if(!s)return;const r=(t,i=0)=>{const o=t.end-t.start,n=this.props.renderInverted?this.configSpaceSize().y-1-i:i,a=new e.Rect(new e.Vec2(t.start,n),new e.Vec2(o,1));if(s.xa.right())return null;a.contains(s)&&(this.hoveredLabel={configSpaceBounds:a,node:t.node});for(let e of t.children)r(e,i+1)};(()=>{this.hoveredLabel=null})();for(let e of this.props.flamechart.getLayers()[0]||[])r(e);this.hoveredLabel?this.props.onNodeHover({node:this.hoveredLabel.node,event:t}):this.props.onNodeHover(null),this.renderCanvas()}),this.onMouseLeave=(e=>{this.hoveredLabel=null,this.props.onNodeHover(null),this.renderCanvas()}),this.onWheel=(t=>{t.preventDefault(),this.frameHadWheelEvent=!0;const i=t.metaKey||t.ctrlKey;let o=t.deltaY,s=t.deltaX;if(t.deltaMode===t.DOM_DELTA_LINE&&(o*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT,s*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT),i&&"pan"!==this.interactionLock){let i=1+o/100;t.ctrlKey&&(i=1+o/40),i=(0,e.clamp)(i,.1,10),this.zoom(new e.Vec2(t.offsetX,t.offsetY),i)}else"zoom"!==this.interactionLock&&this.pan(new e.Vec2(s,o));this.renderCanvas()}),this.onWindowKeyPress=(t=>{if(!this.container)return;const{width:i,height:o}=this.container.getBoundingClientRect();"="===t.key||"+"===t.key?(this.zoom(new e.Vec2(i/2,o/2),.5),t.preventDefault()):"-"!==t.key&&"_"!==t.key||(this.zoom(new e.Vec2(i/2,o/2),2),t.preventDefault()),t.ctrlKey||t.shiftKey||t.metaKey||("0"===t.key?this.zoom(new e.Vec2(i/2,o/2),1e9):"ArrowRight"===t.key||"KeyD"===t.code?this.pan(new e.Vec2(100,0)):"ArrowLeft"===t.key||"KeyA"===t.code?this.pan(new e.Vec2(-100,0)):"ArrowUp"===t.key||"KeyW"===t.code?this.pan(new e.Vec2(0,-100)):"ArrowDown"===t.key||"KeyS"===t.code?this.pan(new e.Vec2(0,100)):"Escape"===t.key&&(this.props.onNodeSelect(null),this.renderCanvas()))})}getStyle(){return(0,o.getFlamechartStyle)(this.props.theme)}setConfigSpaceViewportRect(e){this.props.setConfigSpaceViewportRect(e)}configSpaceSize(){return new e.Vec2(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}physicalViewSize(){return new e.Vec2(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}physicalBounds(){if(this.props.renderInverted){const t=this.physicalViewSize().y,i=(this.configSpaceSize().y+1)*this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio;if(i{var u;const v=t.end-t.start,m=this.props.renderInverted?this.configSpaceSize().y-1-n:n,g=new e.Rect(new e.Vec2(t.start,m),new e.Vec2(v,1));if(!(vthis.props.configSpaceViewportRect.right()||g.right()this.props.configSpaceViewportRect.bottom())return;if(g.hasIntersectionWith(this.props.configSpaceViewportRect)){let e=s.transformRect(g);if(e.left()<0&&(e=e.withOrigin(e.origin.withX(0)).withSize(e.size.withX(e.size.x+e.left()))),e.right()>h.x&&(e=e.withSize(e.size.withX(h.x-e.left()))),e.width()>c){const s=null===(u=this.props.searchResults)||void 0===u?void 0:u.getMatchForFrame(t.node.frame),n=(0,i.trimTextMid)(o,t.node.frame.name,e.width()-2*p);if(s){const t=(0,i.remapRangesToTrimmedText)(n,s);let h=0,c=e.left()+p;const l=(a-r)/2-2;for(let[s,r]of t){c+=(0,i.cachedMeasureTextWidth)(o,n.trimmedString.substring(h,s));const t=(0,i.cachedMeasureTextWidth)(o,n.trimmedString.substring(s,r));w.rect({x:c,y:e.top()+l,w:t,h:a-2*l}),c+=t,h=r}}(null==this.props.searchResults||s?d:f).text({text:n.trimmedString,x:e.left()+p,y:Math.round(e.bottom()-(a-r)/2)})}}for(let e of t.children)y(e,n+1)}},g=2*window.devicePixelRatio;o.strokeStyle=this.props.theme.selectionSecondaryColor;const S=(s.inverseTransformVector(new e.Vec2(1,0))||new e.Vec2(0,0)).x,C=(t,i=0)=>{var o;if(!this.props.selectedNode&&null==this.props.searchResults)return;const r=t.end-t.start,n=this.props.renderInverted?this.configSpaceSize().y-1-i:i,a=new e.Rect(new e.Vec2(t.start,n),new e.Vec2(r,1));if(!(rthis.props.configSpaceViewportRect.right()||a.right()this.props.configSpaceViewportRect.bottom())){if(a.hasIntersectionWith(this.props.configSpaceViewportRect)){if(null===(o=this.props.searchResults)||void 0===o?void 0:o.getMatchForFrame(t.node.frame)){const e=s.transformRect(a);m.rect({x:Math.round(e.left()+g/2),y:Math.round(e.top()+g/2),w:Math.round(Math.max(0,e.width()-g)),h:Math.round(Math.max(0,e.height()-g))})}if(null!=this.props.selectedNode&&t.node.frame===this.props.selectedNode.frame){let e=t.node===this.props.selectedNode?u:v;const i=s.transformRect(a);e.rect({x:Math.round(i.left()+1+g/2),y:Math.round(i.top()+1+g/2),w:Math.round(Math.max(0,i.width()-2-g)),h:Math.round(Math.max(0,i.height()-2-g))})}}for(let e of t.children)C(e,i+1)}};for(let e of this.props.flamechart.getLayers()[0]||[])C(e);for(let e of this.props.flamechart.getLayers()[0]||[])y(e);const V=this.props.theme;if(m.fill(o,V.searchMatchPrimaryColor),w.fill(o,V.searchMatchSecondaryColor),f.fill(o,V.fgSecondaryColor),d.fill(o,null!=this.props.searchResults?V.searchMatchTextColor:V.fgPrimaryColor),v.stroke(o,V.selectionSecondaryColor,g),u.stroke(o,V.selectionPrimaryColor,g),this.hoveredLabel){let e=V.fgPrimaryColor;this.props.selectedNode===this.hoveredLabel.node&&(e=V.selectionPrimaryColor),o.lineWidth=2*devicePixelRatio,o.strokeStyle=e;const t=s.transformRect(this.hoveredLabel.configSpaceBounds);o.strokeRect(Math.round(t.left()),Math.round(t.top()),Math.round(Math.max(0,t.width())),Math.round(Math.max(0,t.height())))}this.renderTimeIndicators()}renderTimeIndicators(){const o=this.overlayCtx;if(!o)return;const s=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio,r=this.physicalViewSize(),n=this.configSpaceToPhysicalViewSpace(),h=(s-t.FontSize.LABEL*window.devicePixelRatio)/2,c=this.props.configSpaceViewportRect.left(),l=this.props.configSpaceViewportRect.right(),p=(this.configSpaceToPhysicalViewSpace().inverted()||new e.AffineTransform).times(this.logicalToPhysicalViewSpace()).transformVector(new e.Vec2(200,1)).x;let d=Math.pow(10,Math.floor(Math.log10(p)));p/d>5?d*=5:p/d>2&&(d*=2);const f=this.props.theme;{const t=this.props.renderInverted?r.y-s:0;o.fillStyle=a.Color.fromCSSHex(f.bgPrimaryColor).withAlpha(.8).toCSS(),o.fillRect(0,t,r.x,s),o.textBaseline="top";for(let s=Math.ceil(c/d)*d;s{this.props.flamechartRenderer.render({physicalSpaceDstRect:this.physicalBounds(),configSpaceSrcRect:this.props.configSpaceViewportRect,renderOutlines:!0})}))}pan(t){this.interactionLock="pan";const i=this.logicalToPhysicalViewSpace().transformVector(t),o=this.configSpaceToPhysicalViewSpace().inverseTransformVector(i);this.hoveredLabel&&this.props.onNodeHover(null),o&&this.props.transformViewport(e.AffineTransform.withTranslation(o))}zoom(t,i){this.interactionLock="zoom";const o=this.logicalToPhysicalViewSpace().transformPosition(t),s=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(o);if(!s)return;const r=e.AffineTransform.withTranslation(s.times(-1)).scaledBy(new e.Vec2(i,1)).translatedBy(s);this.props.transformViewport(r)}updateCursor(){this.lastDragPos?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):document.body.style.cursor="default"}shouldComponentUpdate(){return!1}componentWillReceiveProps(e){this.props.flamechart!==e.flamechart?(this.hoveredLabel=null,this.renderCanvas()):this.props.searchResults!==e.searchResults?this.renderCanvas():this.props.selectedNode!==e.selectedNode?this.renderCanvas():this.props.configSpaceViewportRect!==e.configSpaceViewportRect?this.renderCanvas():this.props.canvasContext!==e.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),e.canvasContext&&(e.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),e.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(){const e=this.getStyle();return(0,s.h)("div",{className:(0,r.css)(e.panZoomView,t.commonStyle.vbox),onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onClick:this.onClick,onDblClick:this.onDblClick,onWheel:this.onWheel,ref:this.containerRef},(0,s.h)("canvas",{width:1,height:1,ref:this.overlayCanvasRef,className:(0,r.css)(e.fill)}))}}exports.FlamechartPanZoomView=h; -},{"../lib/math":"tDuZ","./style":"hvr4","../lib/text-utils":"eeWS","./flamechart-style":"jZ6t","preact":"aSor","aphrodite":"CxN7","../lib/canvas-2d-batch-renderers":"e6nh","../lib/color":"x77Y"}],"PGRN":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Hovertip=n;var e=require("./style"),t=require("aphrodite"),i=require("preact"),o=require("./themes/theme"),r=require("preact/hooks");function n(e){const n=a((0,o.useTheme)()),{containerSize:s,offset:d}=e,h=s.x,l=s.y,p=(0,r.useCallback)(e=>{if(!e)return;const t=e.getBoundingClientRect();let i=d.x+7;i+t.width>h-1&&(i=h-t.width-1)<1&&(i=1),e.style.left=`${i}px`;let o=d.y+7;o+t.height>l-1&&(o=d.y-t.height-1)<1&&(o=1),e.style.top=`${o}px`},[h,l,d.x,d.y]);return(0,i.h)("div",{className:(0,t.css)(n.hoverTip),ref:p},(0,i.h)("div",{className:(0,t.css)(n.hoverTipRow)},e.children))}const s=2,a=(0,o.withTheme)(i=>t.StyleSheet.create({hoverTip:{position:"absolute",background:i.bgPrimaryColor,border:"1px solid black",maxWidth:e.Sizes.TOOLTIP_WIDTH_MAX,paddingTop:2,paddingBottom:2,pointerEvents:"none",userSelect:"none",fontSize:e.FontSize.LABEL,fontFamily:e.FontFamily.MONOSPACE,zIndex:e.ZIndex.HOVERTIP},hoverTipRow:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflowX:"hidden",paddingLeft:2,paddingRight:2,maxWidth:e.Sizes.TOOLTIP_WIDTH_MAX}})); -},{"./style":"hvr4","aphrodite":"CxN7","preact":"aSor","./themes/theme":"gzKG","preact/hooks":"MwGB"}],"zsRf":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartSearchView=exports.FlamechartSearchContextProvider=exports.FlamechartSearchContext=void 0;var e=require("preact/compat"),t=require("preact/hooks"),l=require("./search-view"),r=require("../lib/profile-search"),c=require("../lib/math"),n=require("preact");const o=(0,n.createContext)(null);exports.FlamechartSearchContext=o;const u=({flamechart:e,selectedNode:c,setSelectedNode:u,configSpaceViewportRect:a,setConfigSpaceViewportRect:s,children:i})=>{const p=(0,t.useContext)(l.ProfileSearchContext),h=(0,t.useMemo)(()=>null==p?null:new r.FlamechartSearchResults(e,p),[e,p]);return(0,n.h)(o.Provider,{value:{results:h,flamechart:e,selectedNode:c,setSelectedNode:u,configSpaceViewportRect:a,setConfigSpaceViewportRect:s}},i)};exports.FlamechartSearchContextProvider=u;const a=(0,e.memo)(()=>{const e=(0,t.useContext)(o),r=null==e?null:e.results,u=null==e?null:e.selectedNode,a=null==e?null:e.setSelectedNode,s=null==e?null:e.configSpaceViewportRect,i=null==e?null:e.setConfigSpaceViewportRect,p=null==e?null:e.flamechart,h=null==r?null:r.count(),d=(0,t.useMemo)(()=>null==r?null:null==u?null:r.indexOf(u),[r,u]),f=(0,t.useCallback)(e=>{if(!a)return;if(!p)return;if(!s)return;if(!i)return;const t=e.configSpaceBounds,l=new c.Rect(t.origin.minus(new c.Vec2(0,1)),t.size.withY(s.height()));a(e.node),i(p.getClampedConfigSpaceViewportRect({configSpaceViewportRect:l}))},[s,i,a,p]),{selectPrev:x,selectNext:S}=(0,t.useMemo)(()=>null==h||0===h||null==r?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{if(!(null==r?void 0:r.at))return;if(null==h||0===h)return;let e=null==d?h-1:d-1;e<0&&(e=h-1);const t=r.at(e);f(t)},selectNext:()=>{if(!(null==r?void 0:r.at))return;if(null==h||0===h)return;let e=null==d?0:d+1;e>=h&&(e=0);const t=r.at(e);f(t)}},[h,d,r,f]);return(0,n.h)(l.SearchView,{resultIndex:d,numResults:h,selectPrev:x,selectNext:S})});exports.FlamechartSearchView=a; -},{"preact/compat":"AQ6k","preact/hooks":"MwGB","./search-view":"t9CM","../lib/profile-search":"DHvC","../lib/math":"tDuZ","preact":"aSor"}],"Hete":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StatelessComponent=void 0;var e=require("preact");class t extends e.Component{}exports.StatelessComponent=t; -},{"preact":"aSor"}],"Z2mP":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartView=void 0;var e=require("preact"),t=require("aphrodite"),r=require("../lib/math"),i=require("../lib/utils"),o=require("./flamechart-minimap-view"),s=require("./style"),a=require("./flamechart-detail-view"),c=require("./flamechart-pan-zoom-view"),p=require("./hovertip"),h=require("./search-view"),n=require("./flamechart-search-view"),l=require("./flamechart-style"),m=require("../lib/preact-helpers");class f extends m.StatelessComponent{constructor(){super(...arguments),this.setConfigSpaceViewportRect=(e=>{const t=s.Sizes.DETAIL_VIEW_HEIGHT/s.Sizes.FRAME_HEIGHT,i=this.configSpaceSize(),o=this.props.flamechart.getClampedViewportWidth(e.size.x),a=e.size.withX(o),c=r.Vec2.clamp(e.origin,new r.Vec2(0,-1),r.Vec2.max(r.Vec2.zero,i.minus(a).plus(new r.Vec2(0,t+1))));this.props.setConfigSpaceViewportRect(new r.Rect(c,e.size.withX(o)))}),this.setLogicalSpaceViewportSize=(e=>{this.props.setLogicalSpaceViewportSize(e)}),this.transformViewport=(e=>{const t=e.transformRect(this.props.configSpaceViewportRect);this.setConfigSpaceViewportRect(t)}),this.onNodeHover=(e=>{this.props.setNodeHover(e)}),this.onNodeClick=(e=>{this.props.setSelectedNode(e)}),this.container=null,this.containerRef=(e=>{this.container=e||null})}getStyle(){return(0,l.getFlamechartStyle)(this.props.theme)}configSpaceSize(){return new r.Vec2(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}formatValue(e){const t=100*e/this.props.flamechart.getTotalWeight(),r=(0,i.formatPercent)(t);return`${this.props.flamechart.formatValue(e)} (${r})`}renderTooltip(){if(!this.container)return null;const{hover:i}=this.props;if(!i)return null;const{width:o,height:s,left:a,top:c}=this.container.getBoundingClientRect(),h=new r.Vec2(i.event.clientX-a,i.event.clientY-c),n=i.node.frame,l=this.getStyle();return(0,e.h)(p.Hovertip,{containerSize:new r.Vec2(o,s),offset:h},(0,e.h)("span",{className:(0,t.css)(l.hoverCount)},this.formatValue(i.node.getTotalWeight()))," ",n.name,n.file?(0,e.h)("div",null,n.file,":",n.line):void 0)}render(){const r=this.getStyle();return(0,e.h)("div",{className:(0,t.css)(r.fill,s.commonStyle.vbox),ref:this.containerRef},(0,e.h)(o.FlamechartMinimapView,{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}),(0,e.h)(h.ProfileSearchContext.Consumer,null,t=>(0,e.h)(e.Fragment,null,(0,e.h)(c.FlamechartPanZoomView,{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:t}),(0,e.h)(n.FlamechartSearchView,null))),this.renderTooltip(),this.props.selectedNode&&(0,e.h)(a.FlamechartDetailView,{flamechart:this.props.flamechart,getCSSColorForFrame:this.props.getCSSColorForFrame,selectedNode:this.props.selectedNode}))}}exports.FlamechartView=f; -},{"preact":"aSor","aphrodite":"CxN7","../lib/math":"tDuZ","../lib/utils":"ucYa","./flamechart-minimap-view":"S7z0","./style":"hvr4","./flamechart-detail-view":"uohB","./flamechart-pan-zoom-view":"e7Fh","./hovertip":"PGRN","./search-view":"t9CM","./flamechart-search-view":"zsRf","./flamechart-style":"jZ6t","../lib/preact-helpers":"Hete"}],"PJJu":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFlamechartSetters=h,exports.LeftHeavyFlamechartView=exports.getLeftHeavyFlamechart=exports.ChronoFlamechartView=exports.createMemoizedFlamechartRenderer=exports.getChronoViewFlamechart=void 0;var e=require("preact"),t=require("../lib/flamechart"),r=require("../gl/flamechart-renderer"),a=require("../lib/utils"),o=require("./flamechart-view"),c=require("../app-state/getters"),l=require("preact/compat"),i=require("./flamechart-search-view"),m=require("./themes/theme"),s=require("../app-state/profile-group"),n=require("../app-state");function h(e){return{setNodeHover:(0,l.useCallback)(t=>{n.profileGroupAtom.setFlamechartHoveredNode(e,t)},[e]),setLogicalSpaceViewportSize:(0,l.useCallback)(t=>{n.profileGroupAtom.setLogicalSpaceViewportSize(e,t)},[e]),setConfigSpaceViewportRect:(0,l.useCallback)(t=>{n.profileGroupAtom.setConfigSpaceViewportRect(e,t)},[e]),setSelectedNode:(0,l.useCallback)(t=>{n.profileGroupAtom.setSelectedNode(e,t)},[e])}}const p=(0,a.memoizeByShallowEquality)(({profile:e,getColorBucketForFrame:r})=>new t.Flamechart({getTotalWeight:e.getTotalWeight.bind(e),forEachCall:e.forEachCall.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:r}));exports.getChronoViewFlamechart=p;const f=e=>(0,a.memoizeByShallowEquality)(({canvasContext:t,flamechart:a})=>new r.FlamechartRenderer(t.gl,(0,c.getRowAtlas)(t),a,t.rectangleBatchRenderer,t.flamechartColorPassRenderer,e));exports.createMemoizedFlamechartRenderer=f;const C=f(),u=(0,l.memo)(t=>{const{activeProfileState:r,glCanvas:a}=t,{profile:l,chronoViewState:n}=r,f=(0,m.useTheme)(),u=(0,c.getCanvasContext)({theme:f,canvas:a}),d=(0,c.getFrameToColorBucket)(l),F=(0,c.createGetColorBucketForFrame)(d),g=(0,c.createGetCSSColorForFrame)({theme:f,frameToColorBucket:d}),S=p({profile:l,getColorBucketForFrame:F}),w=C({canvasContext:u,flamechart:S}),v=h(s.FlamechartID.CHRONO);return(0,e.h)(i.FlamechartSearchContextProvider,{flamechart:S,selectedNode:n.selectedNode,setSelectedNode:v.setSelectedNode,configSpaceViewportRect:n.configSpaceViewportRect,setConfigSpaceViewportRect:v.setConfigSpaceViewportRect},(0,e.h)(o.FlamechartView,Object.assign({theme:f,renderInverted:!1,flamechart:S,flamechartRenderer:w,canvasContext:u,getCSSColorForFrame:g},n,v)))});exports.ChronoFlamechartView=u;const d=(0,a.memoizeByShallowEquality)(({profile:e,getColorBucketForFrame:r})=>new t.Flamechart({getTotalWeight:e.getTotalNonIdleWeight.bind(e),forEachCall:e.forEachCallGrouped.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:r}));exports.getLeftHeavyFlamechart=d;const F=f(),g=(0,l.memo)(t=>{const{activeProfileState:r,glCanvas:a}=t,{profile:l,leftHeavyViewState:n}=r,p=(0,m.useTheme)(),f=(0,c.getCanvasContext)({theme:p,canvas:a}),C=(0,c.getFrameToColorBucket)(l),u=(0,c.createGetColorBucketForFrame)(C),g=(0,c.createGetCSSColorForFrame)({theme:p,frameToColorBucket:C}),S=d({profile:l,getColorBucketForFrame:u}),w=F({canvasContext:f,flamechart:S}),v=h(s.FlamechartID.LEFT_HEAVY);return(0,e.h)(i.FlamechartSearchContextProvider,{flamechart:S,selectedNode:n.selectedNode,setSelectedNode:v.setSelectedNode,configSpaceViewportRect:n.configSpaceViewportRect,setConfigSpaceViewportRect:v.setConfigSpaceViewportRect},(0,e.h)(o.FlamechartView,Object.assign({theme:p,renderInverted:!1,flamechart:S,flamechartRenderer:w,canvasContext:f,getCSSColorForFrame:g},n,v)))});exports.LeftHeavyFlamechartView=g; -},{"preact":"aSor","../lib/flamechart":"gFMr","../gl/flamechart-renderer":"P80v","../lib/utils":"ucYa","./flamechart-view":"Z2mP","../app-state/getters":"zEXv","preact/compat":"AQ6k","./flamechart-search-view":"zsRf","./themes/theme":"gzKG","../app-state/profile-group":"uxXA","../app-state":"LDQe"}],"MXNL":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStyle=exports.FlamechartWrapper=void 0;var e=require("aphrodite"),t=require("preact"),r=require("./style"),o=require("../lib/math"),i=require("./flamechart-pan-zoom-view"),s=require("../lib/utils"),p=require("./hovertip"),a=require("./themes/theme"),n=require("../lib/preact-helpers");class c extends n.StatelessComponent{constructor(){super(...arguments),this.setConfigSpaceViewportRect=(e=>{this.props.setConfigSpaceViewportRect(this.clampViewportToFlamegraph(e))}),this.setLogicalSpaceViewportSize=(e=>{this.props.setLogicalSpaceViewportSize(e)}),this.transformViewport=(e=>{this.setConfigSpaceViewportRect(e.transformRect(this.props.configSpaceViewportRect))}),this.container=null,this.containerRef=(e=>{this.container=e||null}),this.setNodeHover=(e=>{this.props.setNodeHover(e)})}clampViewportToFlamegraph(e){const{flamechart:t,renderInverted:r}=this.props;return t.getClampedConfigSpaceViewportRect({configSpaceViewportRect:e,renderInverted:r})}formatValue(e){const t=100*e/this.props.flamechart.getTotalWeight(),r=(0,s.formatPercent)(t);return`${this.props.flamechart.formatValue(e)} (${r})`}renderTooltip(){if(!this.container)return null;const{hover:r}=this.props;if(!r)return null;const{width:i,height:s,left:a,top:n}=this.container.getBoundingClientRect(),c=new o.Vec2(r.event.clientX-a,r.event.clientY-n),h=l(this.props.theme),m=r.node.frame;return(0,t.h)(p.Hovertip,{containerSize:new o.Vec2(i,s),offset:c},(0,t.h)("span",{className:(0,e.css)(h.hoverCount)},this.formatValue(r.node.getTotalWeight()))," ",m.name,m.file?(0,t.h)("div",null,m.file,":",m.line):void 0)}render(){return(0,t.h)("div",{className:(0,e.css)(r.commonStyle.fillY,r.commonStyle.fillX,r.commonStyle.vbox),ref:this.containerRef},(0,t.h)(i.FlamechartPanZoomView,{theme:this.props.theme,selectedNode:null,onNodeHover:this.setNodeHover,onNodeSelect:s.noop,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())}}exports.FlamechartWrapper=c;const l=(0,a.withTheme)(t=>e.StyleSheet.create({hoverCount:{color:t.weightColor}}));exports.getStyle=l; -},{"aphrodite":"CxN7","preact":"aSor","./style":"hvr4","../lib/math":"tDuZ","./flamechart-pan-zoom-view":"e7Fh","../lib/utils":"ucYa","./hovertip":"PGRN","./themes/theme":"gzKG","../lib/preact-helpers":"Hete"}],"Cw7z":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.InvertedCallerFlamegraphView=void 0;var e=require("../lib/utils"),r=require("../lib/flamechart"),t=require("./flamechart-view-container"),a=require("../app-state/getters"),o=require("./flamechart-wrapper"),l=require("preact"),i=require("preact/compat"),n=require("./themes/theme"),m=require("../app-state/profile-group"),c=require("../app-state"),s=require("../lib/atom");const u=(0,e.memoizeByShallowEquality)(({profile:e,frame:r,flattenRecursion:t})=>{let a=e.getInvertedProfileForCallersOf(r);return t?a.getProfileWithRecursionFlattened():a}),h=(0,e.memoizeByShallowEquality)(({invertedCallerProfile:e,getColorBucketForFrame:t})=>new r.Flamechart({getTotalWeight:e.getTotalNonIdleWeight.bind(e),forEachCall:e.forEachCallGrouped.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:t})),f=(0,t.createMemoizedFlamechartRenderer)({inverted:!0}),p=(0,i.memo)(r=>{const{activeProfileState:i}=r;let{profile:p,sandwichViewState:C}=i;const d=(0,s.useAtom)(c.flattenRecursionAtom),F=(0,s.useAtom)(c.glCanvasAtom),g=(0,n.useTheme)();if(!p)throw new Error("profile missing");if(!F)throw new Error("glCanvas missing");const{callerCallee:v}=C;if(!v)throw new Error("callerCallee missing");const{selectedFrame:w}=v,q=(0,a.getFrameToColorBucket)(p),S=(0,a.createGetColorBucketForFrame)(q),E=(0,a.createGetCSSColorForFrame)({theme:g,frameToColorBucket:q}),b=(0,a.getCanvasContext)({theme:g,canvas:F}),B=h({invertedCallerProfile:u({profile:p,frame:w,flattenRecursion:d}),getColorBucketForFrame:S}),I=f({canvasContext:b,flamechart:B});return(0,l.h)(o.FlamechartWrapper,Object.assign({theme:g,renderInverted:!0,flamechart:B,flamechartRenderer:I,canvasContext:b,getCSSColorForFrame:E},(0,t.useFlamechartSetters)(m.FlamechartID.SANDWICH_INVERTED_CALLERS),v.invertedCallerFlamegraph,{setSelectedNode:e.noop}))});exports.InvertedCallerFlamegraphView=p; -},{"../lib/utils":"ucYa","../lib/flamechart":"gFMr","./flamechart-view-container":"PJJu","../app-state/getters":"zEXv","./flamechart-wrapper":"MXNL","preact":"aSor","preact/compat":"AQ6k","./themes/theme":"gzKG","../app-state/profile-group":"uxXA","../app-state":"LDQe","../lib/atom":"QkVE"}],"KT37":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CalleeFlamegraphView=void 0;var e=require("../lib/utils"),r=require("../lib/flamechart"),t=require("./flamechart-view-container"),a=require("../app-state/getters"),o=require("./flamechart-wrapper"),l=require("preact"),i=require("preact/compat"),c=require("./themes/theme"),m=require("../app-state/profile-group"),n=require("../app-state"),s=require("../lib/atom");const u=(0,e.memoizeByShallowEquality)(({profile:e,frame:r,flattenRecursion:t})=>{let a=e.getProfileForCalleesOf(r);return t?a.getProfileWithRecursionFlattened():a}),h=(0,e.memoizeByShallowEquality)(({calleeProfile:e,getColorBucketForFrame:t})=>new r.Flamechart({getTotalWeight:e.getTotalNonIdleWeight.bind(e),forEachCall:e.forEachCallGrouped.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:t})),f=(0,t.createMemoizedFlamechartRenderer)(),p=(0,i.memo)(r=>{const{activeProfileState:i}=r,{profile:p,sandwichViewState:C}=i,F=(0,s.useAtom)(n.flattenRecursionAtom),g=(0,s.useAtom)(n.glCanvasAtom),d=(0,c.useTheme)();if(!p)throw new Error("profile missing");if(!g)throw new Error("glCanvas missing");const{callerCallee:w}=C;if(!w)throw new Error("callerCallee missing");const{selectedFrame:q}=w,v=(0,a.getFrameToColorBucket)(p),S=(0,a.createGetColorBucketForFrame)(v),E=(0,a.createGetCSSColorForFrame)({theme:d,frameToColorBucket:v}),b=(0,a.getCanvasContext)({theme:d,canvas:g}),B=h({calleeProfile:u({profile:p,frame:q,flattenRecursion:F}),getColorBucketForFrame:S}),k=f({canvasContext:b,flamechart:B});return(0,l.h)(o.FlamechartWrapper,Object.assign({theme:d,renderInverted:!1,flamechart:B,flamechartRenderer:k,canvasContext:b,getCSSColorForFrame:E},(0,t.useFlamechartSetters)(m.FlamechartID.SANDWICH_CALLEES),w.calleeFlamegraph,{setSelectedNode:e.noop}))});exports.CalleeFlamegraphView=p; -},{"../lib/utils":"ucYa","../lib/flamechart":"gFMr","./flamechart-view-container":"PJJu","../app-state/getters":"zEXv","./flamechart-wrapper":"MXNL","preact":"aSor","preact/compat":"AQ6k","./themes/theme":"gzKG","../app-state/profile-group":"uxXA","../app-state":"LDQe","../lib/atom":"QkVE"}],"cWm7":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SandwichSearchView=void 0;var e=require("preact/compat"),l=require("preact/hooks"),t=require("./search-view"),r=require("preact"),s=require("./sandwich-view");const c=(0,e.memo)(()=>{const e=(0,l.useContext)(s.SandwichViewContext),c=null!=e?e.rowList:null,n=null!=(null==e?void 0:e.selectedFrame)?e.getIndexForFrame(e.selectedFrame):null,u=null!=c?c.length:null,{selectPrev:i,selectNext:a}=(0,l.useMemo)(()=>null==c||null==u||0===u||null==e?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{let l=null==n?u-1:n-1;l<0&&(l=u-1),e.setSelectedFrame(c[l])},selectNext:()=>{let l=null==n?0:n+1;l>=u&&(l=0),e.setSelectedFrame(c[l])}},[n,c,u,e]);return(0,r.h)(t.SearchView,{resultIndex:n,numResults:u,selectPrev:i,selectNext:a})});exports.SandwichSearchView=c; -},{"preact/compat":"AQ6k","preact/hooks":"MwGB","./search-view":"t9CM","preact":"aSor","./sandwich-view":"L8J2"}],"L8J2":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SandwichViewContainer=exports.SandwichViewContext=void 0;var e=require("aphrodite"),t=require("./profile-table-view"),r=require("preact"),a=require("preact/compat"),l=require("preact/hooks"),o=require("./style"),s=require("./inverted-caller-flamegraph-view"),i=require("./callee-flamegraph-view"),n=require("./sandwich-search-view"),c=require("../lib/utils"),h=require("./search-view"),m=require("./themes/theme"),d=require("../app-state"),p=require("../lib/atom"),f=require("../lib/preact-helpers");class u extends f.StatelessComponent{constructor(){super(...arguments),this.setSelectedFrame=(e=>{this.props.setSelectedFrame(e)}),this.onWindowKeyPress=(e=>{"Escape"===e.key&&this.setSelectedFrame(null)})}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyPress)}render(){const a=S(this.props.theme),{selectedFrame:l}=this.props;let c=null;return l&&(c=(0,r.h)("div",{className:(0,e.css)(o.commonStyle.fillY,a.callersAndCallees,o.commonStyle.vbox)},(0,r.h)("div",{className:(0,e.css)(o.commonStyle.hbox,a.panZoomViewWraper)},(0,r.h)("div",{className:(0,e.css)(a.flamechartLabelParent)},(0,r.h)("div",{className:(0,e.css)(a.flamechartLabel)},"Callers")),(0,r.h)(s.InvertedCallerFlamegraphView,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})),(0,r.h)("div",{className:(0,e.css)(a.divider)}),(0,r.h)("div",{className:(0,e.css)(o.commonStyle.hbox,a.panZoomViewWraper)},(0,r.h)("div",{className:(0,e.css)(a.flamechartLabelParent,a.flamechartLabelParentBottom)},(0,r.h)("div",{className:(0,e.css)(a.flamechartLabel,a.flamechartLabelBottom)},"Callees")),(0,r.h)(i.CalleeFlamegraphView,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})))),(0,r.h)("div",{className:(0,e.css)(o.commonStyle.hbox,o.commonStyle.fillY)},(0,r.h)("div",{className:(0,e.css)(a.tableView)},(0,r.h)(t.ProfileTableViewContainer,{activeProfileState:this.props.activeProfileState}),(0,r.h)(n.SandwichSearchView,null)),c)}}const S=(0,m.withTheme)(t=>e.StyleSheet.create({tableView:{position:"relative",flex:1},panZoomViewWraper:{flex:1},flamechartLabelParent:{display:"flex",flexDirection:"column",justifyContent:"flex-end",alignItems:"flex-start",fontSize:o.FontSize.TITLE,width:1.2*o.FontSize.TITLE,borderRight:`1px solid ${t.fgSecondaryColor}`},flamechartLabelParentBottom:{justifyContent:"flex-start"},flamechartLabel:{transform:"rotate(-90deg)",transformOrigin:"50% 50% 0",width:1.2*o.FontSize.TITLE,flexShrink:1},flamechartLabelBottom:{transform:"rotate(-90deg)",display:"flex",justifyContent:"flex-end"},callersAndCallees:{flex:1,borderLeft:`${o.Sizes.SEPARATOR_HEIGHT}px solid ${t.fgSecondaryColor}`},divider:{height:2,background:t.fgSecondaryColor}})),v=(0,r.createContext)(null);exports.SandwichViewContext=v;const w=(0,a.memo)(e=>{const{activeProfileState:t,glCanvas:a}=e,{sandwichViewState:o,index:s}=t,{callerCallee:i}=o,n=(0,m.useTheme)(),f=(0,l.useCallback)(e=>{d.profileGroupAtom.setSelectedFrame(e)},[]),S=t.profile,w=(0,p.useAtom)(d.tableSortMethodAtom),x=(0,l.useContext)(h.ProfileSearchContext),C=i?i.selectedFrame:null,g=(0,l.useMemo)(()=>{const e=[];switch(S.forEachFrame(t=>{x&&!x.getMatchForFrame(t)||e.push(t)}),w.field){case d.SortField.SYMBOL_NAME:(0,c.sortBy)(e,e=>e.name.toLowerCase());break;case d.SortField.SELF:(0,c.sortBy)(e,e=>e.getSelfWeight());break;case d.SortField.TOTAL:(0,c.sortBy)(e,e=>e.getTotalWeight())}return w.direction===d.SortDirection.DESCENDING&&e.reverse(),e},[S,x,w]),b=(0,l.useMemo)(()=>{const e=new Map;for(let t=0;t{const r=e.get(t);return null==r?null:r}},[g]),F=(0,l.useMemo)(()=>e=>null==x?null:x.getMatchForFrame(e),[x]),y={rowList:g,selectedFrame:C,setSelectedFrame:f,getIndexForFrame:b,getSearchMatchForFrame:F};return(0,r.h)(v.Provider,{value:y},(0,r.h)(u,{theme:n,activeProfileState:t,glCanvas:a,setSelectedFrame:f,selectedFrame:C,profileIndex:s}))});exports.SandwichViewContainer=w; -},{"aphrodite":"CxN7","./profile-table-view":"Ivh5","preact":"aSor","preact/compat":"AQ6k","preact/hooks":"MwGB","./style":"hvr4","./inverted-caller-flamegraph-view":"Cw7z","./callee-flamegraph-view":"KT37","./sandwich-search-view":"cWm7","../lib/utils":"ucYa","./search-view":"t9CM","./themes/theme":"gzKG","../app-state":"LDQe","../lib/atom":"QkVE","../lib/preact-helpers":"Hete"}],"LsM4":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ByteFormatter=exports.TimeFormatter=exports.RawValueFormatter=void 0;var t=require("./utils");class e{constructor(){this.unit="none"}format(t){return t.toLocaleString()}}exports.RawValueFormatter=e;class r{constructor(t){this.unit=t,this.multiplier="nanoseconds"===t?1e-9:"microseconds"===t?1e-6:"milliseconds"===t?.001:1}formatUnsigned(e){const r=e*this.multiplier;if(r/60>=1){const e=Math.floor(r/60),o=Math.floor(r-60*e).toString();return`${e}:${(0,t.zeroPad)(o,2)}`}return r/1>=1?`${r.toFixed(2)}s`:r/.001>=1?`${(r/.001).toFixed(2)}ms`:r/1e-6>=1?`${(r/1e-6).toFixed(2)}µs`:`${(r/1e-9).toFixed(2)}ns`}format(t){return`${t<0?"-":""}${this.formatUnsigned(Math.abs(t))}`}}exports.TimeFormatter=r;class o{constructor(){this.unit="bytes"}format(t){return t<1024?`${t.toFixed(0)} B`:(t/=1024)<1024?`${t.toFixed(2)} KB`:(t/=1024)<1024?`${t.toFixed(2)} MB`:`${(t/=1024).toFixed(2)} GB`}}exports.ByteFormatter=o; -},{"./utils":"ucYa"}],"FheM":[function(require,module,exports) { -var t=null;function e(){return t||(t=n()),t}function n(){try{throw new Error}catch(e){var t=(""+e.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(t)return r(t[0])}return"/"}function r(t){return(""+t).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/,"$1")+"/"}exports.getBundleURL=e,exports.getBaseURL=r; -},{}],"TUK3":[function(require,module,exports) { -var r=require("./bundle-url").getBundleURL;function e(r){Array.isArray(r)||(r=[r]);var e=r[r.length-1];try{return Promise.resolve(require(e))}catch(n){if("MODULE_NOT_FOUND"===n.code)return new s(function(n,i){t(r.slice(0,-1)).then(function(){return require(e)}).then(n,i)});throw n}}function t(r){return Promise.all(r.map(u))}var n={};function i(r,e){n[r]=e}module.exports=exports=e,exports.load=t,exports.register=i;var o={};function u(e){var t;if(Array.isArray(e)&&(t=e[1],e=e[0]),o[e])return o[e];var i=(e.substring(e.lastIndexOf(".")+1,e.length)||e).toLowerCase(),u=n[i];return u?o[e]=u(r()+e).then(function(r){return r&&module.bundle.register(t,r),r}).catch(function(r){throw delete o[e],r}):void 0}function s(r){this.executor=r,this.promise=null}s.prototype.then=function(r,e){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.then(r,e)},s.prototype.catch=function(r){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.catch(r)}; -},{"./bundle-url":"FheM"}],"YG8z":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CallTreeProfileBuilder=exports.StackListProfileBuilder=exports.Profile=exports.CallTreeNode=exports.Frame=exports.HasWeights=void 0;var e=require("./utils"),t=require("./value-formatters"),r=function(e,t,r,s){return new(r||(r=Promise))(function(a,i){function l(e){try{n(s.next(e))}catch(t){i(t)}}function o(e){try{n(s.throw(e))}catch(t){i(t)}}function n(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(l,o)}n((s=s.apply(e,t||[])).next())})};const s=require("_bundle_loader")(require.resolve("./demangle-cpp"));class a{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}}exports.HasWeights=a;class i extends a{constructor(e){super(),this.key=e.key,this.name=e.name,this.file=e.file,this.line=e.line,this.col=e.col}static getOrInsert(e,t){return e.getOrInsert(new i(t))}}exports.Frame=i,i.root=new i({key:"(speedscope root)",name:"(speedscope root)"});class l extends a{isRoot(){return this.frame===i.root}isFrozen(){return this.frozen}freeze(){this.frozen=!0}constructor(e,t){super(),this.frame=e,this.parent=t,this.children=[],this.frozen=!1}}exports.CallTreeNode=l;class o{getAppendOrderCalltreeRoot(){return this.appendOrderCalltreeRoot}getGroupedCalltreeRoot(){return this.groupedCalltreeRoot}constructor(r=0){this.name="",this.frames=new e.KeyedSet,this.appendOrderCalltreeRoot=new l(i.root,null),this.groupedCalltreeRoot=new l(i.root,null),this.samples=[],this.weights=[],this.valueFormatter=new t.RawValueFormatter,this.totalNonIdleWeight=null,this.totalWeight=r}shallowClone(){const e=new o(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 null===this.totalNonIdleWeight&&(this.totalNonIdleWeight=this.groupedCalltreeRoot.children.reduce((e,t)=>e+t.getTotalWeight(),0)),this.totalNonIdleWeight}sortGroupedCallTree(){!function e(t){t.children.sort((e,t)=>-(e.getTotalWeight()-t.getTotalWeight())),t.children.forEach(e)}(this.groupedCalltreeRoot)}forEachCallGrouped(e,t){!function r(s,a){s.frame!==i.root&&e(s,a);let l=0;s.children.forEach(function(e){r(e,a+l),l+=e.getTotalWeight()}),s.frame!==i.root&&t(s,a+s.getTotalWeight())}(this.groupedCalltreeRoot,0)}forEachCall(t,r){let s=[],a=0,l=0;for(let o of this.samples){let n=null;for(n=o;n&&n.frame!=i.root&&-1===s.indexOf(n);n=n.parent);for(;s.length>0&&(0,e.lastOf)(s)!=n;){r(s.pop(),a)}const h=[];for(let e=o;e&&e.frame!=i.root&&e!=n;e=e.parent)h.push(e);h.reverse();for(let e of h)t(e,a);s=s.concat(h),a+=this.weights[l++]}for(let e=s.length-1;e>=0;e--)r(s[e],a)}forEachFrame(e){this.frames.forEach(e)}getProfileWithRecursionFlattened(){const e=new h,t=[],r=new Set;this.forEachCall(function(s,a){r.has(s.frame)?t.push(null):(r.add(s.frame),t.push(s),e.enterFrame(s.frame,a))},function(s,a){const i=t.pop();i&&(r.delete(i.frame),e.leaveFrame(i.frame,a))});const s=e.build();return s.name=this.name,s.valueFormatter=this.valueFormatter,this.forEachFrame(e=>{s.frames.getOrInsert(e).overwriteWeightWith(e)}),s}getInvertedProfileForCallersOf(e){const t=i.getOrInsert(this.frames,e),r=new n,s=[];!function e(r){if(r.frame===t)s.push(r);else for(let t of r.children)e(t)}(this.appendOrderCalltreeRoot);for(let l of s){const e=[];for(let t=l;null!=t&&t.frame!==i.root;t=t.parent)e.push(t.frame);r.appendSampleWithWeight(e,l.getTotalWeight())}const a=r.build();return a.name=this.name,a.valueFormatter=this.valueFormatter,a}getProfileForCalleesOf(e){const t=i.getOrInsert(this.frames,e),r=new n;!function e(s){if(s.frame===t)!function(e){const t=[];!function e(s){t.push(s.frame),r.appendSampleWithWeight(t,s.getSelfWeight());for(let t of s.children)e(t);t.pop()}(e)}(s);else for(let t of s.children)e(t)}(this.appendOrderCalltreeRoot);const s=r.build();return s.name=this.name,s.valueFormatter=this.valueFormatter,s}demangle(){return r(this,void 0,void 0,function*(){let e=null;for(let t of this.frames)t.name.startsWith("__Z")&&(e||(e=(yield s).demangleCpp),t.name=e(t.name))})}remapSymbols(e){for(let t of this.frames){const r=e(t);if(null==r)continue;const{name:s,file:a,line:i,col:l}=r;null!=s&&(t.name=s),null!=a&&(t.file=a),null!=i&&(t.line=i),null!=l&&(t.col=l)}}}exports.Profile=o;class n extends o{constructor(){super(...arguments),this.pendingSample=null}_appendSample(t,r,s){if(isNaN(r))throw new Error("invalid weight");let a=s?this.appendOrderCalltreeRoot:this.groupedCalltreeRoot,i=new Set;for(let o of t){const t=s?(0,e.lastOf)(a.children):a.children.find(e=>e.frame===o);if(t&&!t.isFrozen()&&t.frame==o)a=t;else{const e=a;a=new l(o,a),e.children.push(a)}a.addToTotalWeight(r),i.add(a.frame)}if(a.addToSelfWeight(r),s)for(let e of a.children)e.freeze();if(s){a.frame.addToSelfWeight(r);for(let e of i)e.addToTotalWeight(r);a===(0,e.lastOf)(this.samples)?this.weights[this.weights.length-1]+=r:(this.samples.push(a),this.weights.push(r))}}appendSampleWithWeight(e,t){if(0===t)return;if(t<0)throw new Error("Samples must have positive weights");const r=e.map(e=>i.getOrInsert(this.frames,e));this._appendSample(r,t,!0),this._appendSample(r,t,!1)}appendSampleWithTimestamp(e,t){if(this.pendingSample){if(t0?this.appendSampleWithWeight(this.pendingSample.stack,this.pendingSample.centralTimestamp-this.pendingSample.startTimestamp):(this.appendSampleWithWeight(this.pendingSample.stack,1),this.setValueFormatter(new t.RawValueFormatter))),this.totalWeight=Math.max(this.totalWeight,this.weights.reduce((e,t)=>e+t,0)),this.sortGroupedCallTree(),this}}exports.StackListProfileBuilder=n;class h extends o{constructor(){super(...arguments),this.appendOrderStack=[this.appendOrderCalltreeRoot],this.groupedOrderStack=[this.groupedCalltreeRoot],this.framesInStack=new Map,this.stack=[],this.lastValue=0}addWeightsToFrames(t){const r=t-this.lastValue;for(let e of this.framesInStack.keys())e.addToTotalWeight(r);const s=(0,e.lastOf)(this.stack);s&&s.addToSelfWeight(r)}addWeightsToNodes(t,r){const s=t-this.lastValue;for(let e of r)e.addToTotalWeight(s);const a=(0,e.lastOf)(r);a&&a.addToSelfWeight(s)}_enterFrame(t,r,s){let a=s?this.appendOrderStack:this.groupedOrderStack;this.addWeightsToNodes(r,a);let i=(0,e.lastOf)(a);if(i){if(s){const e=r-this.lastValue;if(e>0)this.samples.push(i),this.weights.push(r-this.lastValue);else if(e<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${r}`)}const o=s?(0,e.lastOf)(i.children):i.children.find(e=>e.frame===t);let n;o&&!o.isFrozen()&&o.frame==t?n=o:(n=new l(t,i),i.children.push(n)),a.push(n)}}enterFrame(e,t){const r=i.getOrInsert(this.frames,e);this.addWeightsToFrames(t),this._enterFrame(r,t,!0),this._enterFrame(r,t,!1),this.stack.push(r);const s=this.framesInStack.get(r)||0;this.framesInStack.set(r,s+1),this.lastValue=t,this.totalWeight=Math.max(this.totalWeight,this.lastValue)}_leaveFrame(e,t,r){let s=r?this.appendOrderStack:this.groupedOrderStack;if(this.addWeightsToNodes(t,s),r){const r=this.appendOrderStack.pop();if(null==r)throw new Error(`Trying to leave ${e.key} when stack is empty`);if(null==this.lastValue)throw new Error(`Trying to leave a ${e.key} before any have been entered`);if(r.freeze(),r.frame.key!==e.key)throw new Error(`Tried to leave frame "${e.name}" while frame "${r.frame.name}" was at the top at ${t}`);const s=t-this.lastValue;if(s>0)this.samples.push(r),this.weights.push(t-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 ${t}`)}else this.groupedOrderStack.pop()}leaveFrame(e,t){const r=i.getOrInsert(this.frames,e);this.addWeightsToFrames(t),this._leaveFrame(r,t,!0),this._leaveFrame(r,t,!1),this.stack.pop();const s=this.framesInStack.get(r);null!=s&&(1===s?this.framesInStack.delete(r):this.framesInStack.set(r,s-1),this.lastValue=t,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}}exports.CallTreeProfileBuilder=h; -},{"./utils":"ucYa","./value-formatters":"LsM4","_bundle_loader":"TUK3","./demangle-cpp":[["demangle-cpp.1768f4cc.js","bS28"],"demangle-cpp.1768f4cc.js.map","bS28"]}],"x8nU":[function(require,module,exports) { -"use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileFormat=void 0,exports.FileFormat=e,function(e){let t,o;!function(e){e.EVENTED="evented",e.SAMPLED="sampled"}(t=e.ProfileType||(e.ProfileType={})),function(e){e.OPEN_FRAME="O",e.CLOSE_FRAME="C"}(o=e.EventType||(e.EventType={}))}(e||(exports.FileFormat=e={})); -},{}],"EHrm":[function(require,module,exports) { -module.exports={name:"speedscope",version:"1.21.0",description:"",repository:"jlfwong/speedscope",main:"index.js",bin:{speedscope:"./bin/cli.js"},scripts:{deploy:"./scripts/deploy.sh",prepack:"./scripts/build-release.sh",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:"parcel assets/index.html --open --no-autoinstall"},files:["bin/cli.js","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",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","parcel-bundler":"1.12.4",preact:"10.4.1",prettier:"3.1.1",protobufjs:"6.8.8","source-map":"0.6.1","ts-jest":"24.3.0",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:"7.2.0"}}; -},{}],"Xzb6":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.exportProfileGroup=r,exports.importSpeedscopeProfiles=s,exports.saveToFile=l;var e=require("./profile"),t=require("./value-formatters"),n=require("./file-format-spec");function r(e){const t=[],n=new Map;function r(e){let r=n.get(e);if(null==r){const o={name:e.name};null!=e.file&&(o.file=e.file),null!=e.line&&(o.line=e.line),null!=e.col&&(o.col=e.col),r=t.length,n.set(e,r),t.push(o)}return r}const a={exporter:`speedscope@${require("../../package.json").version}`,name:e.name,activeProfileIndex:e.indexToView,$schema:"https://www.speedscope.app/file-format-schema.json",shared:{frames:t},profiles:[]};for(let s of e.profiles)a.profiles.push(o(s,r));return a}function o(e,t){const r={type:n.FileFormat.ProfileType.EVENTED,name:e.getName(),unit:e.getWeightUnit(),startValue:0,endValue:e.getTotalWeight(),events:[]};return e.forEachCall((e,o)=>{r.events.push({type:n.FileFormat.EventType.OPEN_FRAME,frame:t(e.frame),at:o})},(e,o)=>{r.events.push({type:n.FileFormat.EventType.CLOSE_FRAME,frame:t(e.frame),at:o})}),r}function a(r,o){function a(e){const{name:n,unit:o}=r;switch(o){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":e.setValueFormatter(new t.TimeFormatter(o));break;case"bytes":e.setValueFormatter(new t.ByteFormatter);break;case"none":e.setValueFormatter(new t.RawValueFormatter)}e.setName(n)}switch(r.type){case n.FileFormat.ProfileType.EVENTED:return function(t){const{startValue:r,endValue:s,events:l}=t,i=new e.CallTreeProfileBuilder(s-r);a(i);const c=o.map((e,t)=>Object.assign({key:t},e));for(let e of l)switch(e.type){case n.FileFormat.EventType.OPEN_FRAME:i.enterFrame(c[e.frame],e.at-r);break;case n.FileFormat.EventType.CLOSE_FRAME:i.leaveFrame(c[e.frame],e.at-r)}return i.build()}(r);case n.FileFormat.ProfileType.SAMPLED:return function(t){const{startValue:n,endValue:r,samples:s,weights:l}=t,i=new e.StackListProfileBuilder(r-n);a(i);const c=o.map((e,t)=>Object.assign({key:t},e));if(s.length!==l.length)throw new Error(`Expected samples.length (${s.length}) to equal weights.length (${l.length})`);for(let e=0;ec[e]),n)}return i.build()}(r)}}function s(e){return{name:e.name||e.profiles[0].name||"profile",indexToView:e.activeProfileIndex||0,profiles:e.profiles.map(t=>a(t,e.shared.frames))}}function l(e){const t=r(e),n=new Blob([JSON.stringify(t)],{type:"text/json"}),o=`${(t.name?t.name.split(".")[0]:"profile").replace(/\W+/g,"_")}.speedscope.json`;console.log("Saving",o);const a=document.createElement("a");a.download=o,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)} -},{"./profile":"YG8z","./value-formatters":"LsM4","./file-format-spec":"x8nU","../../package.json":"EHrm"}],"C6HJ":[function(require,module,exports) { -"use strict";function r(r,e){return d(r,e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.fuzzyMatchStrings=r;const e="a".charCodeAt(0),t="z".charCodeAt(0),n="A".charCodeAt(0),o="Z".charCodeAt(0),c="0".charCodeAt(0),a="9".charCodeAt(0);var h;function u(r){const u=r.charCodeAt(0);return e<=u&&u<=t?h.charLower:n<=u&&u<=o?h.charUpper:c<=u&&u<=a?h.charNumber:h.charNonWord}function l(r,o){if(r===o)return!0;const c=o.charCodeAt(0);return e<=c&&c<=t&&r.charCodeAt(0)===c-e+n}function d(r,e){if(0==e.length)return{matchedRanges:[],score:0};let t=0,n=-1,o=-1,c=r.length,a=e.length;for(let h=0;h=n;h--){if(l(r[h],e[t])&&--t<0)return A(r,e,n=h,o)}throw new Error("Implementation error. This must be a bug in fzfFuzzyMatchV1")}!function(r){r[r.charNonWord=0]="charNonWord",r[r.charLower=1]="charLower",r[r.charUpper=2]="charUpper",r[r.charNumber=3]="charNumber"}(h||(h={}));const f=16,i=-3,s=-1,p=f/2,N=f/2,b=p+s,g=-(i+s),m=2;function w(r,e){return r===h.charNonWord&&e!==h.charNonWord?p:r===h.charLower&&e==h.charUpper||r!==h.charNumber&&e==h.charNumber?b:e===h.charNonWord?N:0}function A(r,e,t,n){let o=0,c=0,a=!1,d=0,N=0,b=new Array(e.length),A=h.charNonWord;t>0&&(A=u(r[t-1]));for(let h=t;h{p(),l(h)},[p,l,h]),I=(0,o.useCallback)(e=>{t(h)},[t,h]),P=i.getName(),w=1+Math.floor(Math.log10(d)),y=(0,r.css)(b.highlighted),S=(0,o.useMemo)(()=>{return s(P,g,y)},[P,g,y]);return(0,e.h)("div",{ref:u,onMouseUp:x,onMouseEnter:I,title:P,className:(0,r.css)(b.profileRow,m%2==0&&b.profileRowEven,a&&b.profileRowSelected,c&&b.profileRowHovered)},(0,e.h)("span",{className:(0,r.css)(b.profileIndex,a&&b.profileIndexSelected),style:{width:w+"em"}},h+1,":")," ",S)}function c(e){e.stopPropagation()}function d(e,o){const r=[];for(let l=0;l-e.score),r}function u({profiles:l,closeProfileSelect:t,indexToView:i,visible:s,setProfileIndexToView:u}){const p=f((0,n.useTheme)()),[h,g]=(0,o.useState)(""),m=(0,o.useCallback)(e=>{const o=e.target.value;g(o)},[g]),b=(0,o.useCallback)(e=>{e&&(s?e.select():e.blur())},[s]),x=(0,o.useMemo)(()=>d(l,h),[l,h]),[I,P]=(0,o.useState)(0),w=(0,o.useRef)(null);(0,o.useEffect)(()=>{s&&(P(null),null!==w.current&&w.current.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}))},[s]);const y=(0,o.useCallback)(e=>{e.stopPropagation();let o=null;switch(e.key){case"Enter":null!=I&&(t(),u(I));break;case"Escape":t();break;case"ArrowDown":if(e.preventDefault(),o=0,null!=I){const e=x.findIndex(e=>e.indexInProfileGroup===I);-1!==e&&(o=e+1)}break;case"ArrowUp":if(e.preventDefault(),o=x.length-1,null!=I){const e=x.findIndex(e=>e.indexInProfileGroup===I);-1!==e&&(o=e-1)}}if(null!=o&&o>=0&&o{x.length>0&&(P(x[0].indexInProfileGroup),v(!0))},[P,x]);const C=(0,o.useCallback)(e=>{S&&e&&(e.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}),v(!1))},[S,v]),k=(0,o.useCallback)(e=>{w.current=e,C(e)},[w,C]);return(0,e.h)("div",{className:(0,r.css)(p.profileSelectOuter)},(0,e.h)("div",{className:(0,r.css)(p.caret)}),(0,e.h)("div",{className:(0,r.css)(p.profileSelectBox)},(0,e.h)("div",{className:(0,r.css)(p.filterInputContainer)},(0,e.h)("input",{type:"text",className:(0,r.css)(p.filterInput),ref:b,placeholder:"Filter...",value:h,onInput:m,onKeyDown:y,onKeyUp:c,onKeyPress:c})),(0,e.h)("div",{className:(0,r.css)(p.profileSelectScrolling)},x.map(({profile:o,matchedRanges:r,indexInProfileGroup:n},s)=>{let c=void 0;const d=n===i,p=n===I;return d&&p?c=k:d?c=w:p&&(c=C),(0,e.h)(a,{setHoveredProfileIndex:P,indexInProfileGroup:n,indexInFilteredListView:s,hovered:n==I,selected:n===i,profile:o,profileCount:l.length,nodeRef:c,matchedRanges:r,setProfileIndexToView:u,closeProfileSelect:t})}),0===x.length?(0,e.h)("div",{className:(0,r.css)(p.profileRow)},'No results match filter "',h,'"'):null)))}const p=10,f=(0,n.withTheme)(e=>r.StyleSheet.create({filterInputContainer:{display:"flex",flexDirection:"column",padding:5,alignItems:"stretch"},filterInput:{color:e.altFgPrimaryColor,background:e.altBgSecondaryColor,borderRadius:5,padding:5,":focus":{border:"none",outline:"none"},"::selection":{color:e.altFgPrimaryColor,background:e.selectionPrimaryColor}},caret:{width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:"5px solid black"},highlighted:{background:e.selectionSecondaryColor},padding:{height:10,background:e.altBgPrimaryColor},profileRow:{height:l.Sizes.FRAME_HEIGHT-2,border:"1px solid transparent",textAlign:"left",paddingLeft:10,paddingRight:10,background:e.altBgPrimaryColor,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:"pointer"},profileRowHovered:{border:`1px solid ${e.selectionPrimaryColor}`},profileRowSelected:{background:e.selectionPrimaryColor},profileRowEven:{background:e.altBgSecondaryColor},profileSelectScrolling:{maxHeight:`min(calc(100vh - ${l.Sizes.TOOLBAR_HEIGHT-20}px), ${20*l.Sizes.FRAME_HEIGHT}px)`,overflow:"auto","::-webkit-scrollbar":{background:e.altBgPrimaryColor},"::-webkit-scrollbar-thumb":{background:e.altFgSecondaryColor,borderRadius:20,border:`3px solid ${e.altBgPrimaryColor}`,":hover":{background:e.altBgPrimaryColor}}},profileSelectBox:{width:"100%",paddingBottom:10,background:e.altBgPrimaryColor,color:e.altFgPrimaryColor},profileSelectOuter:{width:"100%",maxWidth:480,margin:"0 auto",position:"relative",zIndex:l.ZIndex.PROFILE_SELECT,alignItems:"center",display:"flex",flexDirection:"column"},profileIndex:{textAlign:"right",display:"inline-block",color:e.altFgSecondaryColor},profileIndexSelected:{color:e.altFgPrimaryColor}})); -},{"preact":"aSor","preact/hooks":"MwGB","aphrodite":"CxN7","./style":"hvr4","../lib/fuzzy-find":"C6HJ","../lib/utils":"ucYa","./themes/theme":"gzKG"}],"BPHY":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Toolbar=T;var e=require("preact"),o=require("preact/hooks"),t=require("aphrodite"),i=require("./style"),s=require("./profile-select"),l=require("../lib/utils"),a=require("./themes/theme"),r=require("../lib/view-mode"),n=require("../app-state"),c=require("../app-state/color-scheme"),h=require("../lib/atom");function d(e,t){return(0,o.useCallback)(()=>e(t),[e,t])}function m(o){const i=g((0,a.useTheme)()),s=d(n.viewModeAtom.set,r.ViewMode.CHRONO_FLAME_CHART),l=d(n.viewModeAtom.set,r.ViewMode.LEFT_HEAVY_FLAME_GRAPH),c=d(n.viewModeAtom.set,r.ViewMode.SANDWICH_VIEW);return o.activeProfileState?(0,e.h)("div",{className:(0,t.css)(i.toolbarLeft)},(0,e.h)("div",{className:(0,t.css)(i.toolbarTab,o.viewMode===r.ViewMode.CHRONO_FLAME_CHART&&i.toolbarTabActive),onClick:s},(0,e.h)("span",{className:(0,t.css)(i.emoji)},"🕰"),"Time Order"),(0,e.h)("div",{className:(0,t.css)(i.toolbarTab,o.viewMode===r.ViewMode.LEFT_HEAVY_FLAME_GRAPH&&i.toolbarTabActive),onClick:l},(0,e.h)("span",{className:(0,t.css)(i.emoji)},"⬅️"),"Left Heavy"),(0,e.h)("div",{className:(0,t.css)(i.toolbarTab,o.viewMode===r.ViewMode.SANDWICH_VIEW&&i.toolbarTabActive),onClick:c},(0,e.h)("span",{className:(0,t.css)(i.emoji)},"🥪"),"Sandwich")):null}const b=(()=>{let e=null;return o=>{let t=(null==o?void 0:o.profiles.map(e=>e.profile))||null;return(null===e||null!=t&&!(0,l.objectsHaveShallowEquality)(e,t))&&(e=t),e}})();function u(i){const l=g((0,a.useTheme)()),{activeProfileState:r,profileGroup:n}=i,c=b(n),[h,d]=(0,o.useState)(!1),m=(0,o.useCallback)(()=>{d(!0)},[d]),u=(0,o.useCallback)(()=>{d(!1)},[d]);return(0,o.useEffect)(()=>{const e=e=>{"t"===e.key&&(e.preventDefault(),d(!0))};return window.addEventListener("keypress",e),()=>{window.removeEventListener("keypress",e)}},[d]),(0,o.useEffect)(()=>{const e=e=>{"t"===e.key&&(e.preventDefault(),d(!0))};return window.addEventListener("keypress",e),()=>{window.removeEventListener("keypress",e)}},[d]),r&&n&&c?1===n.profiles.length?(0,e.h)(e.Fragment,null,r.profile.getName()):(0,e.h)("div",{className:(0,t.css)(l.toolbarCenter),onMouseLeave:u},(0,e.h)("span",{onMouseOver:m},r.profile.getName()," ",(0,e.h)("span",{className:(0,t.css)(l.toolbarProfileIndex)},"(",r.index+1,"/",n.profiles.length,")")),(0,e.h)("div",{style:{display:h?"block":"none"}},(0,e.h)(s.ProfileSelect,{setProfileIndexToView:i.setProfileIndexToView,indexToView:n.indexToView,profiles:c,closeProfileSelect:u,visible:h}))):(0,e.h)(e.Fragment,null,"🔬speedscope")}function p(o){const i=g((0,a.useTheme)()),s=(0,h.useAtom)(c.colorSchemeAtom),l=(0,e.h)("div",{className:(0,t.css)(i.toolbarTab),onClick:o.saveFile},(0,e.h)("span",{className:(0,t.css)(i.emoji)},"⤴️"),"Export"),r=(0,e.h)("div",{className:(0,t.css)(i.toolbarTab),onClick:o.browseForFile},(0,e.h)("span",{className:(0,t.css)(i.emoji)},"⤵️"),"Import"),n=(0,e.h)("div",{className:(0,t.css)(i.toolbarTab),onClick:c.colorSchemeAtom.cycleToNextColorScheme},(0,e.h)("span",{className:(0,t.css)(i.emoji)},"🎨"),(0,e.h)("span",{className:(0,t.css)(i.toolbarTabColorSchemeToggle)},(0,a.colorSchemeToString)(s))),d=(0,e.h)("div",{className:(0,t.css)(i.toolbarTab)},(0,e.h)("a",{href:"https://github.com/jlfwong/speedscope#usage",className:(0,t.css)(i.noLinkStyle),target:"_blank"},(0,e.h)("span",{className:(0,t.css)(i.emoji)},"❓"),"Help"));return(0,e.h)("div",{className:(0,t.css)(i.toolbarRight)},o.activeProfileState&&l,r,n,d)}function T(o){const i=g((0,a.useTheme)());return(0,e.h)("div",{className:(0,t.css)(i.toolbar)},(0,e.h)(m,Object.assign({},o)),(0,e.h)(u,Object.assign({},o)),(0,e.h)(p,Object.assign({},o)))}const g=(0,a.withTheme)(e=>t.StyleSheet.create({toolbar:{height:i.Sizes.TOOLBAR_HEIGHT,flexShrink:0,background:e.altBgPrimaryColor,color:e.altFgPrimaryColor,textAlign:"center",fontFamily:i.FontFamily.MONOSPACE,fontSize:i.FontSize.TITLE,lineHeight:`${i.Sizes.TOOLBAR_TAB_HEIGHT}px`,userSelect:"none"},toolbarLeft:{position:"absolute",height:i.Sizes.TOOLBAR_HEIGHT,overflow:"hidden",top:0,left:0,marginRight:2,textAlign:"left"},toolbarCenter:{paddingTop:1,height:i.Sizes.TOOLBAR_HEIGHT},toolbarRight:{height:i.Sizes.TOOLBAR_HEIGHT,overflow:"hidden",position:"absolute",top:0,right:0,marginRight:2,textAlign:"right"},toolbarProfileIndex:{color:e.altFgSecondaryColor},toolbarTab:{background:e.altBgSecondaryColor,marginTop:i.Sizes.SEPARATOR_HEIGHT,height:i.Sizes.TOOLBAR_TAB_HEIGHT,lineHeight:`${i.Sizes.TOOLBAR_TAB_HEIGHT}px`,paddingLeft:2,paddingRight:8,display:"inline-block",marginLeft:2,transition:`all ${i.Duration.HOVER_CHANGE} ease-in`,":hover":{background:e.selectionSecondaryColor}},toolbarTabActive:{background:e.selectionPrimaryColor,":hover":{background:e.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"}})); -},{"preact":"aSor","preact/hooks":"MwGB","aphrodite":"CxN7","./style":"hvr4","./profile-select":"tOar","../lib/utils":"ucYa","./themes/theme":"gzKG","../lib/view-mode":"dpTI","../app-state":"LDQe","../app-state/color-scheme":"KQrJ","../lib/atom":"QkVE"}],"bv0g":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importJavaScriptSourceMapSymbolRemapper=r;var e=require("./utils"),n=function(e,n,o,l){return new(o||(o=Promise))(function(r,i){function t(e){try{a(l.next(e))}catch(n){i(n)}}function u(e){try{a(l.throw(e))}catch(n){i(n)}}function a(e){var n;e.done?r(e.value):(n=e.value,n instanceof o?n:new o(function(e){e(n)})).then(t,u)}a((l=l.apply(e,n||[])).next())})};const o=require("_bundle_loader")(require.resolve("source-map")),l=!1;function r(r,i){return n(this,void 0,void 0,function*(){const n=yield o;let t=null,u=null;try{u=JSON.parse(r),t=new n.SourceMapConsumer(u)}catch(s){return null}const a=[];t.eachMapping(function(e){a.push(Object.assign(Object.assign({},e),{generatedColumn:e.generatedColumn+1,originalColumn:e.originalColumn+1}))},{},n.SourceMapConsumer.GENERATED_ORDER);const c=i.replace(/\.[^/]*$/,"");return n=>{var o;let r=!1;if((null==u?void 0:u.file)&&(null==u?void 0:u.file)===n.file?r=!0:("/"+(null===(o=n.file)||void 0===o?void 0:o.replace(/\.[^/]*$/,""))).endsWith("/"+c)&&(r=!0),!r)return null;if(null==n.line||null==n.col)return null;let i=(0,e.findIndexBisect)(a,e=>e.generatedLine>n.line||!(e.generatedLine=n.col);if(-1===i)i=a.length-1;else{if(0===i)return null;i--}const s=a[i],m={};if(null!=s.name)m.name=s.name;else if(null!=s.source){const e=null==t?void 0:t.sourceContentFor(s.source,!0);if(e){const n=e.split("\n")[s.originalLine-1];if(n){const e=/\w+/.exec(n.substr(s.originalColumn-1));e&&(m.name=e[0])}}}switch(m.name){case"constructor":m.name=n.name+" constructor";break;case"function":m.name=n.name;break;case"const":case"export":m.name=n.name}return m.name&&n.name.includes(m.name)&&(m.name=n.name),null!=s.source&&(m.file=s.source,m.line=s.originalLine,m.col=s.originalColumn),l&&(console.groupCollapsed(`Remapping "${n.name}" -> "${m.name}"`),console.log("before",Object.assign({},n)),console.log("item @ index",s),console.log("item @ index + 1",a[i+1]),console.log("after",m),console.groupEnd()),m}})} -},{"_bundle_loader":"TUK3","source-map":[["source-map.438fa06b.js","aRf0"],"source-map.438fa06b.js.map","aRf0"],"./utils":"ucYa"}],"ThNa":[function(require,module,exports) { -module.exports="perf-vertx-stacks-01-collapsed-all.2681da68.txt"; -},{}],"wCGh":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Application=exports.GLCanvas=void 0;var e=require("preact"),t=require("aphrodite"),o=require("./style"),i=require("../lib/emscripten"),r=require("./sandwich-view"),s=require("../lib/file-format"),n=require("./flamechart-view-container"),a=require("./toolbar"),l=require("../lib/js-source-map"),c=require("./themes/theme"),p=require("../lib/view-mode"),d=require("../app-state"),h=require("../lib/preact-helpers"),u=function(e,t,o,i){return new(o||(o=Promise))(function(r,s){function n(e){try{l(i.next(e))}catch(t){s(t)}}function a(e){try{l(i.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(n,a)}l((i=i.apply(e,t||[])).next())})};const m=require("_bundle_loader")(require.resolve("../import"));function f(e,t){return u(this,void 0,void 0,function*(){return(yield m).importProfileGroupFromText(e,t)})}function v(e,t){return u(this,void 0,void 0,function*(){return(yield m).importProfileGroupFromBase64(e,t)})}function g(e,t){return u(this,void 0,void 0,function*(){return(yield m).importProfilesFromArrayBuffer(e,t)})}function w(e){return u(this,void 0,void 0,function*(){return(yield m).importProfilesFromFile(e)})}function y(e){return u(this,void 0,void 0,function*(){return(yield m).importFromFileSystemDirectoryEntry(e)})}m.then(()=>{}),require("_bundle_loader")(require.resolve("../lib/demangle-cpp")).then(()=>{}),require("_bundle_loader")(require.resolve("source-map")).then(()=>{});const b=require("../../sample/profiles/stackcollapse/perf-vertx-stacks-01-collapsed-all.txt");function x(e){return null!=e&&e.isDirectory}class C extends h.StatelessComponent{constructor(){super(...arguments),this.canvas=null,this.ref=(e=>{e instanceof HTMLCanvasElement?this.canvas=e:this.canvas=null,this.props.setGLCanvas(this.canvas)}),this.container=null,this.containerRef=(e=>{e instanceof HTMLElement?this.container=e:this.container=null}),this.maybeResize=(()=>{if(!this.container)return;if(!this.props.canvasContext)return;let{width:e,height:t}=this.container.getBoundingClientRect();const o=e,i=t,r=e*window.devicePixelRatio,s=t*window.devicePixelRatio;this.props.canvasContext.gl.resize(r,s,o,i)}),this.onWindowResize=(()=>{this.props.canvasContext&&this.props.canvasContext.requestFrame()})}componentWillReceiveProps(e){this.props.canvasContext!==e.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),e.canvasContext&&(e.canvasContext.addBeforeFrameHandler(this.maybeResize),e.canvasContext.requestFrame()))}componentDidMount(){window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),window.removeEventListener("resize",this.onWindowResize)}render(){const o=F(this.props.theme);return(0,e.h)("div",{ref:this.containerRef,className:(0,t.css)(o.glCanvasView)},(0,e.h)("canvas",{ref:this.ref,width:1,height:1}))}}exports.GLCanvas=C;class P extends h.StatelessComponent{constructor(){super(...arguments),this.loadExample=(()=>{this.loadProfile(()=>u(this,void 0,void 0,function*(){const e=yield fetch(b).then(e=>e.text());return yield f("perf-vertx-stacks-01-collapsed-all.txt",e)}))}),this.onDrop=(e=>{if(this.props.setDragActive(!1),e.preventDefault(),!e.dataTransfer)return;const t=e.dataTransfer.items[0];if("webkitGetAsEntry"in t){const e=t.webkitGetAsEntry();if(e&&x(e)&&e.name.endsWith(".trace")){console.log("Importing as Instruments.app .trace file");const t=e;return void this.loadProfile(()=>u(this,void 0,void 0,function*(){return yield y(t)}))}}let o=e.dataTransfer.files.item(0);o&&this.loadFromFile(o)}),this.onDragOver=(e=>{this.props.setDragActive(!0),e.preventDefault()}),this.onDragLeave=(e=>{this.props.setDragActive(!1),e.preventDefault()}),this.onWindowKeyPress=(e=>u(this,void 0,void 0,function*(){if("1"===e.key)this.props.setViewMode(p.ViewMode.CHRONO_FLAME_CHART);else if("2"===e.key)this.props.setViewMode(p.ViewMode.LEFT_HEAVY_FLAME_GRAPH);else if("3"===e.key)this.props.setViewMode(p.ViewMode.SANDWICH_VIEW);else if("r"===e.key){const{flattenRecursion:e}=this.props;this.props.setFlattenRecursion(!e)}else if("n"===e.key){const{activeProfileState:e}=this.props;e&&this.props.setProfileIndexToView(e.index+1)}else if("p"===e.key){const{activeProfileState:e}=this.props;e&&this.props.setProfileIndexToView(e.index-1)}})),this.saveFile=(()=>{if(this.props.profileGroup){const{name:e,indexToView:t,profiles:o}=this.props.profileGroup,i={name:e,indexToView:t,profiles:o.map(e=>e.profile)};(0,s.saveToFile)(i)}}),this.browseForFile=(()=>{const e=document.createElement("input");e.type="file",e.addEventListener("change",this.onFileSelect),e.click()}),this.onWindowKeyDown=(e=>u(this,void 0,void 0,function*(){"s"===e.key&&(e.ctrlKey||e.metaKey)?(e.preventDefault(),this.saveFile()):"o"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.browseForFile())})),this.onDocumentPaste=(e=>{if(null!=document.activeElement&&"INPUT"===document.activeElement.nodeName)return;e.preventDefault(),e.stopPropagation();const t=e.clipboardData;if(!t)return;const o=t.getData("text");this.loadProfile(()=>u(this,void 0,void 0,function*(){return yield f("From Clipboard",o)}))}),this.onFileSelect=(e=>{const t=e.target.files.item(0);t&&this.loadFromFile(t)})}loadProfile(e){return u(this,void 0,void 0,function*(){if(this.props.setError(!1),this.props.setLoading(!0),yield new Promise(e=>setTimeout(e,0)),!this.props.glCanvas)return;console.time("import");let t=null;try{t=yield e()}catch(o){return console.log("Failed to load format",o),void this.props.setError(!0)}if(null==t)return alert("Unrecognized format! See documentation about supported formats."),void this.props.setLoading(!1);if(0===t.profiles.length)return alert("Successfully imported profile, but it's empty!"),void this.props.setLoading(!1);this.props.hashParams.title&&(t=Object.assign(Object.assign({},t),{name:this.props.hashParams.title})),document.title=`${t.name} - speedscope`,this.props.hashParams.viewMode&&this.props.setViewMode(this.props.hashParams.viewMode);for(let e of t.profiles)yield e.demangle();for(let e of t.profiles){const t=this.props.hashParams.title||e.getName();e.setName(t)}console.timeEnd("import"),this.props.setProfileGroup(t),this.props.setLoading(!1)})}getStyle(){return F(this.props.theme)}loadFromFile(e){this.loadProfile(()=>u(this,void 0,void 0,function*(){const t=yield w(e);if(t){for(let o of t.profiles)o.getName()||o.setName(e.name);return t}if(this.props.profileGroup&&this.props.activeProfileState){const t=new FileReader,o=new Promise(e=>{t.addEventListener("loadend",()=>{if("string"!=typeof t.result)throw new Error("Expected reader.result to be a string");e(t.result)})});t.readAsText(e);const r=yield o;let s=null;const n=(0,i.importEmscriptenSymbolMap)(r);n&&(console.log("Importing as emscripten symbol map"),s=n);const a=yield(0,l.importJavaScriptSourceMapSymbolRemapper)(r,e.name);if(!s&&a&&(console.log("Importing as JavaScript source map"),s=a),null!=s)return{name:this.props.profileGroup.name||"profile",indexToView:this.props.profileGroup.indexToView,profiles:this.props.profileGroup.profiles.map(e=>{const t=e.profile.shallowClone();return t.remapSymbols(s),t})}}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)}maybeLoadHashParamProfile(){return u(this,void 0,void 0,function*(){const{profileURL:e}=this.props.hashParams;if(e){if(!d.canUseXHR)return void alert(`Cannot load a profile URL when loading from "${window.location.protocol}" URL protocol`);this.loadProfile(()=>u(this,void 0,void 0,function*(){const t=yield fetch(e);let o=new URL(e,window.location.href).pathname;return o.includes("/")&&(o=o.slice(o.lastIndexOf("/")+1)),yield g(o,yield t.arrayBuffer())}))}else if(this.props.hashParams.localProfilePath){window.speedscope={loadFileFromBase64:(e,t)=>{this.loadProfile(()=>v(e,t))}};const e=document.createElement("script");e.src=`file:///${this.props.hashParams.localProfilePath}`,document.head.appendChild(e)}})}renderLanding(){const o=this.getStyle();return(0,e.h)("div",{className:(0,t.css)(o.landingContainer)},(0,e.h)("div",{className:(0,t.css)(o.landingMessage)},(0,e.h)("p",{className:(0,t.css)(o.landingP)},"👋 Hi there! Welcome to 🔬speedscope, an interactive"," ",(0,e.h)("a",{className:(0,t.css)(o.link),href:"http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html"},"flamegraph")," ","visualizer. Use it to help you make your software faster."),d.canUseXHR?(0,e.h)("p",{className:(0,t.css)(o.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"," ",(0,e.h)("a",{tabIndex:0,className:(0,t.css)(o.link),onClick:this.loadExample},"click here")," ","to load an example profile."):(0,e.h)("p",{className:(0,t.css)(o.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."),(0,e.h)("div",{className:(0,t.css)(o.browseButtonContainer)},(0,e.h)("input",{type:"file",name:"file",id:"file",onChange:this.onFileSelect,className:(0,t.css)(o.hide)}),(0,e.h)("label",{for:"file",className:(0,t.css)(o.browseButton),tabIndex:0},"Browse")),(0,e.h)("p",{className:(0,t.css)(o.landingP)},"See the"," ",(0,e.h)("a",{className:(0,t.css)(o.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."),(0,e.h)("p",{className:(0,t.css)(o.landingP)},"speedscope is open source. Please"," ",(0,e.h)("a",{className:(0,t.css)(o.link),target:"_blank",href:"https://github.com/jlfwong/speedscope/issues"},"report any issues on GitHub"),".")))}renderError(){const o=this.getStyle();return(0,e.h)("div",{className:(0,t.css)(o.error)},(0,e.h)("div",null,"😿 Something went wrong."),(0,e.h)("div",null,"Check the JS console for more details."))}renderLoadingBar(){const o=this.getStyle();return(0,e.h)("div",{className:(0,t.css)(o.loading)})}renderContent(){const{viewMode:t,activeProfileState:o,error:i,loading:s,glCanvas:a}=this.props;if(i)return this.renderError();if(s)return this.renderLoadingBar();if(!o||!a)return this.renderLanding();switch(t){case p.ViewMode.CHRONO_FLAME_CHART:return(0,e.h)(n.ChronoFlamechartView,{activeProfileState:o,glCanvas:a});case p.ViewMode.LEFT_HEAVY_FLAME_GRAPH:return(0,e.h)(n.LeftHeavyFlamechartView,{activeProfileState:o,glCanvas:a});case p.ViewMode.SANDWICH_VIEW:return(0,e.h)(r.SandwichViewContainer,{activeProfileState:o,glCanvas:a})}}render(){const o=this.getStyle();return(0,e.h)("div",{onDrop:this.onDrop,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,className:(0,t.css)(o.root,this.props.dragActive&&o.dragTargetRoot)},(0,e.h)(C,{setGLCanvas:this.props.setGLCanvas,canvasContext:this.props.canvasContext,theme:this.props.theme}),(0,e.h)(a.Toolbar,Object.assign({saveFile:this.saveFile,browseForFile:this.browseForFile},this.props)),(0,e.h)("div",{className:(0,t.css)(o.contentContainer)},this.renderContent()),this.props.dragActive&&(0,e.h)("div",{className:(0,t.css)(o.dragTarget)}))}}exports.Application=P;const F=(0,c.withTheme)(e=>t.StyleSheet.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:e.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:o.FontFamily.MONOSPACE,lineHeight:"20px",color:e.fgPrimaryColor},dragTargetRoot:{cursor:"copy"},dragTarget:{boxSizing:"border-box",position:"absolute",top:0,left:0,width:"100%",height:"100%",border:`5px dashed ${e.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:o.FontSize.BIG_BUTTON,lineHeight:"72px",background:e.selectionPrimaryColor,color:e.altFgPrimaryColor,transition:`all ${o.Duration.HOVER_CHANGE} ease-in`,":hover":{background:e.selectionSecondaryColor}},link:{color:e.selectionPrimaryColor,cursor:"pointer",textDecoration:"none",transition:`all ${o.Duration.HOVER_CHANGE} ease-in`,":hover":{color:e.selectionSecondaryColor}}})); -},{"preact":"aSor","aphrodite":"CxN7","./style":"hvr4","../lib/emscripten":"FbpF","./sandwich-view":"L8J2","../lib/file-format":"Xzb6","./flamechart-view-container":"PJJu","./toolbar":"BPHY","../lib/js-source-map":"bv0g","./themes/theme":"gzKG","../lib/view-mode":"dpTI","../app-state":"LDQe","../lib/preact-helpers":"Hete","_bundle_loader":"TUK3","../import":[["import.bcbb2033.js","uRa7"],"import.bcbb2033.js.map","uRa7"],"../lib/demangle-cpp":[["demangle-cpp.1768f4cc.js","bS28"],"demangle-cpp.1768f4cc.js.map","bS28"],"source-map":[["source-map.438fa06b.js","aRf0"],"source-map.438fa06b.js.map","aRf0"],"../../sample/profiles/stackcollapse/perf-vertx-stacks-01-collapsed-all.txt":"ThNa"}],"A6uO":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApplicationContainer=void 0;var e=require("preact"),t=require("../app-state/getters"),o=require("preact/compat"),r=require("../app-state/active-profile-state"),a=require("./themes/theme"),i=require("../app-state"),s=require("../lib/atom"),n=require("./search-view"),m=require("./application");const u=(0,o.memo)(()=>{const u=(0,s.useAtom)(i.glCanvasAtom),l=(0,a.useTheme)(),p=(0,o.useMemo)(()=>u?(0,t.getCanvasContext)({theme:l,canvas:u}):null,[l,u]);return(0,e.h)(n.ProfileSearchContextProvider,null,(0,e.h)(m.Application,{activeProfileState:(0,r.useActiveProfileState)(),canvasContext:p,setGLCanvas:i.glCanvasAtom.set,setLoading:i.loadingAtom.set,setError:i.errorAtom.set,setProfileGroup:i.profileGroupAtom.setProfileGroup,setDragActive:i.dragActiveAtom.set,setViewMode:i.viewModeAtom.set,setFlattenRecursion:i.flattenRecursionAtom.set,setProfileIndexToView:i.profileGroupAtom.setProfileIndexToView,profileGroup:(0,s.useAtom)(i.profileGroupAtom),theme:l,flattenRecursion:(0,s.useAtom)(i.flattenRecursionAtom),viewMode:(0,s.useAtom)(i.viewModeAtom),hashParams:(0,s.useAtom)(i.hashParamsAtom),glCanvas:u,dragActive:(0,s.useAtom)(i.dragActiveAtom),loading:(0,s.useAtom)(i.loadingAtom),error:(0,s.useAtom)(i.errorAtom)}))});exports.ApplicationContainer=u; -},{"preact":"aSor","../app-state/getters":"zEXv","preact/compat":"AQ6k","../app-state/active-profile-state":"MY42","./themes/theme":"gzKG","../app-state":"LDQe","../lib/atom":"QkVE","./search-view":"t9CM","./application":"wCGh"}],"K5F6":[function(require,module,exports) { -"use strict";var e=require("preact"),o=require("./views/application-container"),d=require("./views/themes/theme");console.log(`speedscope v${require("../package.json").version}`),module.hot&&(module.hot.dispose(()=>{(0,e.render)((0,e.h)("div",null),document.body,document.body.lastElementChild||void 0)}),module.hot.accept()),(0,e.render)((0,e.h)(d.ThemeProvider,null,(0,e.h)(o.ApplicationContainer,null)),document.body,document.body.lastElementChild||void 0); -},{"preact":"aSor","./views/application-container":"A6uO","./views/themes/theme":"gzKG","../package.json":"EHrm"}],"Yi9z":[function(require,module,exports) { -module.exports=function(n){return new Promise(function(e,o){var r=document.createElement("script");r.async=!0,r.type="text/javascript",r.charset="utf-8",r.src=n,r.onerror=function(n){r.onerror=r.onload=null,o(n)},r.onload=function(){r.onerror=r.onload=null,e()},document.getElementsByTagName("head")[0].appendChild(r)})}; -},{}],0:[function(require,module,exports) { -var b=require("TUK3");b.register("js",require("Yi9z")); -},{}]},{},[0,"K5F6"], null) -//# sourceMappingURL=speedscope.6f107512.js.map \ No newline at end of file