diff --git a/404.html b/404.html index 52c71956..93486def 100644 --- a/404.html +++ b/404.html @@ -10,14 +10,14 @@ Page Not Found | memlab - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/assets/js/015e0bf7.afed0852.js b/assets/js/015e0bf7.911c53e5.js similarity index 98% rename from assets/js/015e0bf7.afed0852.js rename to assets/js/015e0bf7.911c53e5.js index f2c19c25..0380c185 100644 --- a/assets/js/015e0bf7.afed0852.js +++ b/assets/js/015e0bf7.911c53e5.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[2775],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>m});var t=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function i(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function r(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):r(r({},a),e)),n},y=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},g="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},u=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,i=e.originalType,o=e.parentName,y=l(e,["components","mdxType","originalType","parentName"]),g=p(n),u=s,m=g["".concat(o,".").concat(u)]||g[u]||c[u]||i;return n?t.createElement(m,r(r({ref:a},y),{},{components:n})):t.createElement(m,r({ref:a},y))}));function m(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var i=n.length,r=new Array(i);r[0]=u;var l={};for(var o in a)hasOwnProperty.call(a,o)&&(l[o]=a[o]);l.originalType=e,l[g]="string"==typeof e?e:s,r[1]=l;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>r,default:()=>c,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var t=n(8168),s=(n(6540),n(5680));const i={id:"heap_analysis_src.StringAnalysis",title:"Class: StringAnalysis",sidebar_label:"StringAnalysis",custom_edit_url:null},r=void 0,l={unversionedId:"api/classes/heap_analysis_src.StringAnalysis",id:"api/classes/heap_analysis_src.StringAnalysis",title:"Class: StringAnalysis",description:"This analysis finds duplicated string instance in JavaScript heap",source:"@site/docs/api/classes/heap_analysis_src.StringAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.StringAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.StringAnalysis",title:"Class: StringAnalysis",sidebar_label:"StringAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ShapeUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis"},next:{title:"IBrowserInfo",permalink:"/memlab/docs/api/interfaces/core_src.IBrowserInfo"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new StringAnalysis()',id:"new-stringanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3},{value:'getTopDuplicatedStringsInCount()',id:"gettopduplicatedstringsincount",level:3}],y={toc:p},g="wrapper";function c(e){let{components:a,...n}=e;return(0,s.yg)(g,(0,t.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("p",null,"This analysis finds duplicated string instance in JavaScript heap\nand rank them based on the duplicated string size and count."),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"StringAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-stringanalysis"},(0,s.yg)("a",{id:"new stringanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new StringAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,s.yg)("a",{id:"analyzesnapshotfromfile"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,s.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"get CLI command name for this memory analysis;\nuse it with ",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")," in CLI"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("strong",{parentName:"p"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"p"},"string")," | command name")),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("strong",{parentName:"p"},"Source"),":"),(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/StringAnalysis.ts#L118"},"heap-analysis/src/plugins/StringAnalysis.ts:118"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"gettopduplicatedstringsincount"},(0,s.yg)("a",{id:"gettopduplicatedstringsincount"}),(0,s.yg)("strong",{parentName:"h3"},"getTopDuplicatedStringsInCount"),"()"),(0,s.yg)("p",null,"get the top duplicated string in terms of duplicated string count"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("strong",{parentName:"p"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"p"},"StringRecord"),"[] | an array of the top-duplicated strings' information")),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("strong",{parentName:"p"},"Source"),":"),(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/StringAnalysis.ts#L68"},"heap-analysis/src/plugins/StringAnalysis.ts:68"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[2775],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>m});var t=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function i(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function r(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):r(r({},a),e)),n},y=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},g="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},u=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,i=e.originalType,o=e.parentName,y=l(e,["components","mdxType","originalType","parentName"]),g=p(n),u=s,m=g["".concat(o,".").concat(u)]||g[u]||c[u]||i;return n?t.createElement(m,r(r({ref:a},y),{},{components:n})):t.createElement(m,r({ref:a},y))}));function m(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var i=n.length,r=new Array(i);r[0]=u;var l={};for(var o in a)hasOwnProperty.call(a,o)&&(l[o]=a[o]);l.originalType=e,l[g]="string"==typeof e?e:s,r[1]=l;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>r,default:()=>c,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var t=n(8168),s=(n(6540),n(5680));const i={id:"heap_analysis_src.StringAnalysis",title:"Class: StringAnalysis",sidebar_label:"StringAnalysis",custom_edit_url:null},r=void 0,l={unversionedId:"api/classes/heap_analysis_src.StringAnalysis",id:"api/classes/heap_analysis_src.StringAnalysis",title:"Class: StringAnalysis",description:"This analysis finds duplicated string instance in JavaScript heap",source:"@site/docs/api/classes/heap_analysis_src.StringAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.StringAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.StringAnalysis",title:"Class: StringAnalysis",sidebar_label:"StringAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ShapeUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis"},next:{title:"IBrowserInfo",permalink:"/memlab/docs/api/interfaces/core_src.IBrowserInfo"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new StringAnalysis()',id:"new-stringanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3},{value:'getTopDuplicatedStringsInCount()',id:"gettopduplicatedstringsincount",level:3}],y={toc:p},g="wrapper";function c(e){let{components:a,...n}=e;return(0,s.yg)(g,(0,t.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("p",null,"This analysis finds duplicated string instance in JavaScript heap\nand rank them based on the duplicated string size and count."),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"StringAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-stringanalysis"},(0,s.yg)("a",{id:"new stringanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new StringAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,s.yg)("a",{id:"analyzesnapshotfromfile"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,s.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"get CLI command name for this memory analysis;\nuse it with ",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")," in CLI"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("strong",{parentName:"p"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"p"},"string")," | command name")),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("strong",{parentName:"p"},"Source"),":"),(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/StringAnalysis.ts#L118"},"heap-analysis/src/plugins/StringAnalysis.ts:118"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"gettopduplicatedstringsincount"},(0,s.yg)("a",{id:"gettopduplicatedstringsincount"}),(0,s.yg)("strong",{parentName:"h3"},"getTopDuplicatedStringsInCount"),"()"),(0,s.yg)("p",null,"get the top duplicated string in terms of duplicated string count"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("strong",{parentName:"p"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"p"},"StringRecord"),"[] | an array of the top-duplicated strings' information")),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("strong",{parentName:"p"},"Source"),":"),(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/StringAnalysis.ts#L68"},"heap-analysis/src/plugins/StringAnalysis.ts:68"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/086eefc4.f6eaaa13.js b/assets/js/086eefc4.02b40484.js similarity index 97% rename from assets/js/086eefc4.f6eaaa13.js rename to assets/js/086eefc4.02b40484.js index e42d454d..7ae4a74a 100644 --- a/assets/js/086eefc4.f6eaaa13.js +++ b/assets/js/086eefc4.02b40484.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[6192],{5680:(e,a,t)=>{t.d(a,{xA:()=>g,yg:()=>d});var n=t(6540);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function s(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i=n.createContext({}),p=function(e){var a=n.useContext(i),t=a;return e&&(t="function"==typeof e?e(a):l(l({},a),e)),t},g=function(e){var a=p(e.components);return n.createElement(i.Provider,{value:a},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},m=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,s=e.originalType,i=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),u=p(t),m=r,d=u["".concat(i,".").concat(m)]||u[m]||c[m]||s;return t?n.createElement(d,l(l({ref:a},g),{},{components:t})):n.createElement(d,l({ref:a},g))}));function d(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var s=t.length,l=new Array(s);l[0]=m;var o={};for(var i in a)hasOwnProperty.call(a,i)&&(o[i]=a[i]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var p=2;p{t.r(a),t.d(a,{assets:()=>i,contentTitle:()=>l,default:()=>c,frontMatter:()=>s,metadata:()=>o,toc:()=>p});var n=t(8168),r=(t(6540),t(5680));const s={id:"api_src.SnapshotResultReader",title:"Class: SnapshotResultReader",sidebar_label:"SnapshotResultReader",custom_edit_url:null},l=void 0,o={unversionedId:"api/classes/api_src.SnapshotResultReader",id:"api/classes/api_src.SnapshotResultReader",title:"Class: SnapshotResultReader",description:"A utility entity to read all MemLab files generated from",source:"@site/docs/api/classes/api_src.SnapshotResultReader.md",sourceDirName:"api/classes",slug:"/api/classes/api_src.SnapshotResultReader",permalink:"/memlab/docs/api/classes/api_src.SnapshotResultReader",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"api_src.SnapshotResultReader",title:"Class: SnapshotResultReader",sidebar_label:"SnapshotResultReader",custom_edit_url:null},sidebar:"sidebar",previous:{title:"BrowserInteractionResultReader",permalink:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},next:{title:"BaseAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"}},i={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Methods",id:"methods",level:2},{value:'getConsoleBackupFile()',id:"getconsolebackupfile",level:3},{value:'getInteractionSteps()',id:"getinteractionsteps",level:3},{value:'getRootDirectory()',id:"getrootdirectory",level:3},{value:'getSnapshotFiles()',id:"getsnapshotfiles",level:3},{value:'Static fromSnapshots(baselineSnapshot, targetSnapshot, finalSnapshot)',id:"static-fromsnapshotsbaselinesnapshot-targetsnapshot-finalsnapshot",level:3}],g={toc:p},u="wrapper";function c(e){let{components:a,...t}=e;return(0,r.yg)(u,(0,n.A)({},g,t,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"A utility entity to read all MemLab files generated from\nbaseline, target and final heap snapshots."),(0,r.yg)("p",null,"The most useful feature of this class is when you have\nthree separate snapshots (baseline, target, and final)\nthat are not taken from MemLab, but you still would\nlike to use the ",(0,r.yg)("inlineCode",{parentName:"p"},"findLeaks")," to detect memory leaks:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {SnapshotResultReader, findLeaks} = require('@memlab/api');\n\n// baseline, target, and final are file paths of heap snapshot files\nconst reader = SnapshotResultReader.fromSnapshots(baseline, target, final);\nconst leaks = await findLeaks(reader);\n")),(0,r.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"default")),(0,r.yg)("p",{parentName:"li"},"\u21b3 ",(0,r.yg)("strong",{parentName:"p"},(0,r.yg)("inlineCode",{parentName:"strong"},"SnapshotResultReader"))))),(0,r.yg)("h2",{id:"methods"},"Methods"),(0,r.yg)("h3",{id:"getconsolebackupfile"},(0,r.yg)("a",{id:"getconsolebackupfile"}),(0,r.yg)("strong",{parentName:"h3"},"getConsoleBackupFile"),"()"),(0,r.yg)("p",null,"This method gets the backup file of the console output."),(0,r.yg)("p",null,"The memlab CLI commands (e.g., ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab find-leaks"),") outputs a\nnon-structured string representation for easy reading, while the\nAPIs (e.g., ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#findleaks"},"findLeaks")),") return structured leaks\nrepresentation that is handy for post-processing. If you need to\nobtain all the string output from the CLI in the current working directory,\nyou can read them from the CLI output backup file returned by this method."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the backup file"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots, findLeaks} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n const leaks = await findLeaks(result);\n\n // get the console output backup file\n const consoleBackupFile = result.getConsoleBackupFile();\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/BaseResultReader.ts#L102"},"api/src/result-reader/BaseResultReader.ts:102"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getinteractionsteps"},(0,r.yg)("a",{id:"getinteractionsteps"}),(0,r.yg)("strong",{parentName:"h3"},"getInteractionSteps"),"()"),(0,r.yg)("p",null,"browser interaction step sequence"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"E2EStepInfo"),"[] | an array of browser interaction step information")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {SnapshotResultReader} = require('@memlab/api');\n\n// baseline, target, and final are file paths of heap snapshot files\nconst reader = SnapshotResultReader.fromSnapshots(baseline, target, final);\nconst paths = reader.getInteractionSteps();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/SnapshotResultReader.ts#L159"},"api/src/result-reader/SnapshotResultReader.ts:159"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getrootdirectory"},(0,r.yg)("a",{id:"getrootdirectory"}),(0,r.yg)("strong",{parentName:"h3"},"getRootDirectory"),"()"),(0,r.yg)("p",null,"get the directory where the data and generated files of\nthe memlab run were stored"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | absolute path of the directory"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n // get the directory that stores all the files\n // generated from the takeSnapshots call\n const dataDir = result.getRootDirectory();\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/BaseResultReader.ts#L72"},"api/src/result-reader/BaseResultReader.ts:72"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getsnapshotfiles"},(0,r.yg)("a",{id:"getsnapshotfiles"}),(0,r.yg)("strong",{parentName:"h3"},"getSnapshotFiles"),"()"),(0,r.yg)("p",null,"get all snapshot files related to this SnapshotResultReader"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"string"),"[] | an array of snapshot file's absolute path")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {SnapshotResultReader} = require('@memlab/api');\n\n// baseline, target, and final are file paths of heap snapshot files\nconst reader = SnapshotResultReader.fromSnapshots(baseline, target, final);\nconst paths = reader.getSnapshotFiles();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/SnapshotResultReader.ts#L132"},"api/src/result-reader/SnapshotResultReader.ts:132"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"static-fromsnapshotsbaselinesnapshot-targetsnapshot-finalsnapshot"},(0,r.yg)("a",{id:"fromsnapshots"}),(0,r.yg)("inlineCode",{parentName:"h3"},"Static")," ",(0,r.yg)("strong",{parentName:"h3"},"fromSnapshots"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"baselineSnapshot"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"targetSnapshot"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"finalSnapshot"),")"),(0,r.yg)("p",null,"Build a result reader from baseline, target, and final heap snapshot files.\nThe three snapshot files do not have to be in the same directory."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"baselineSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | file path of the baseline heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"targetSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | file path of the target heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"finalSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | file path of the final heap snapshot"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.SnapshotResultReader"},(0,r.yg)("inlineCode",{parentName:"a"},"SnapshotResultReader"))," | the ResultReader instance")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {SnapshotResultReader, findLeaks} = require('@memlab/api');\n\n// baseline, target, and final are file paths of heap snapshot files\nconst reader = SnapshotResultReader.fromSnapshots(baseline, target, final);\nconst leaks = await findLeaks(reader);\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/SnapshotResultReader.ts#L99"},"api/src/result-reader/SnapshotResultReader.ts:99"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[6192],{5680:(e,a,t)=>{t.d(a,{xA:()=>g,yg:()=>d});var n=t(6540);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function s(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i=n.createContext({}),p=function(e){var a=n.useContext(i),t=a;return e&&(t="function"==typeof e?e(a):l(l({},a),e)),t},g=function(e){var a=p(e.components);return n.createElement(i.Provider,{value:a},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},m=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,s=e.originalType,i=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),u=p(t),m=r,d=u["".concat(i,".").concat(m)]||u[m]||c[m]||s;return t?n.createElement(d,l(l({ref:a},g),{},{components:t})):n.createElement(d,l({ref:a},g))}));function d(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var s=t.length,l=new Array(s);l[0]=m;var o={};for(var i in a)hasOwnProperty.call(a,i)&&(o[i]=a[i]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var p=2;p{t.r(a),t.d(a,{assets:()=>i,contentTitle:()=>l,default:()=>c,frontMatter:()=>s,metadata:()=>o,toc:()=>p});var n=t(8168),r=(t(6540),t(5680));const s={id:"api_src.SnapshotResultReader",title:"Class: SnapshotResultReader",sidebar_label:"SnapshotResultReader",custom_edit_url:null},l=void 0,o={unversionedId:"api/classes/api_src.SnapshotResultReader",id:"api/classes/api_src.SnapshotResultReader",title:"Class: SnapshotResultReader",description:"A utility entity to read all MemLab files generated from",source:"@site/docs/api/classes/api_src.SnapshotResultReader.md",sourceDirName:"api/classes",slug:"/api/classes/api_src.SnapshotResultReader",permalink:"/memlab/docs/api/classes/api_src.SnapshotResultReader",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"api_src.SnapshotResultReader",title:"Class: SnapshotResultReader",sidebar_label:"SnapshotResultReader",custom_edit_url:null},sidebar:"sidebar",previous:{title:"BrowserInteractionResultReader",permalink:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},next:{title:"BaseAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"}},i={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Methods",id:"methods",level:2},{value:'getConsoleBackupFile()',id:"getconsolebackupfile",level:3},{value:'getInteractionSteps()',id:"getinteractionsteps",level:3},{value:'getRootDirectory()',id:"getrootdirectory",level:3},{value:'getSnapshotFiles()',id:"getsnapshotfiles",level:3},{value:'Static fromSnapshots(baselineSnapshot, targetSnapshot, finalSnapshot)',id:"static-fromsnapshotsbaselinesnapshot-targetsnapshot-finalsnapshot",level:3}],g={toc:p},u="wrapper";function c(e){let{components:a,...t}=e;return(0,r.yg)(u,(0,n.A)({},g,t,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"A utility entity to read all MemLab files generated from\nbaseline, target and final heap snapshots."),(0,r.yg)("p",null,"The most useful feature of this class is when you have\nthree separate snapshots (baseline, target, and final)\nthat are not taken from MemLab, but you still would\nlike to use the ",(0,r.yg)("inlineCode",{parentName:"p"},"findLeaks")," to detect memory leaks:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {SnapshotResultReader, findLeaks} = require('@memlab/api');\n\n// baseline, target, and final are file paths of heap snapshot files\nconst reader = SnapshotResultReader.fromSnapshots(baseline, target, final);\nconst leaks = await findLeaks(reader);\n")),(0,r.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"default")),(0,r.yg)("p",{parentName:"li"},"\u21b3 ",(0,r.yg)("strong",{parentName:"p"},(0,r.yg)("inlineCode",{parentName:"strong"},"SnapshotResultReader"))))),(0,r.yg)("h2",{id:"methods"},"Methods"),(0,r.yg)("h3",{id:"getconsolebackupfile"},(0,r.yg)("a",{id:"getconsolebackupfile"}),(0,r.yg)("strong",{parentName:"h3"},"getConsoleBackupFile"),"()"),(0,r.yg)("p",null,"This method gets the backup file of the console output."),(0,r.yg)("p",null,"The memlab CLI commands (e.g., ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab find-leaks"),") outputs a\nnon-structured string representation for easy reading, while the\nAPIs (e.g., ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#findleaks"},"findLeaks")),") return structured leaks\nrepresentation that is handy for post-processing. If you need to\nobtain all the string output from the CLI in the current working directory,\nyou can read them from the CLI output backup file returned by this method."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the backup file"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots, findLeaks} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n const leaks = await findLeaks(result);\n\n // get the console output backup file\n const consoleBackupFile = result.getConsoleBackupFile();\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/BaseResultReader.ts#L102"},"api/src/result-reader/BaseResultReader.ts:102"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getinteractionsteps"},(0,r.yg)("a",{id:"getinteractionsteps"}),(0,r.yg)("strong",{parentName:"h3"},"getInteractionSteps"),"()"),(0,r.yg)("p",null,"browser interaction step sequence"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"E2EStepInfo"),"[] | an array of browser interaction step information")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {SnapshotResultReader} = require('@memlab/api');\n\n// baseline, target, and final are file paths of heap snapshot files\nconst reader = SnapshotResultReader.fromSnapshots(baseline, target, final);\nconst paths = reader.getInteractionSteps();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/SnapshotResultReader.ts#L159"},"api/src/result-reader/SnapshotResultReader.ts:159"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getrootdirectory"},(0,r.yg)("a",{id:"getrootdirectory"}),(0,r.yg)("strong",{parentName:"h3"},"getRootDirectory"),"()"),(0,r.yg)("p",null,"get the directory where the data and generated files of\nthe memlab run were stored"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | absolute path of the directory"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n // get the directory that stores all the files\n // generated from the takeSnapshots call\n const dataDir = result.getRootDirectory();\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/BaseResultReader.ts#L72"},"api/src/result-reader/BaseResultReader.ts:72"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getsnapshotfiles"},(0,r.yg)("a",{id:"getsnapshotfiles"}),(0,r.yg)("strong",{parentName:"h3"},"getSnapshotFiles"),"()"),(0,r.yg)("p",null,"get all snapshot files related to this SnapshotResultReader"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"string"),"[] | an array of snapshot file's absolute path")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {SnapshotResultReader} = require('@memlab/api');\n\n// baseline, target, and final are file paths of heap snapshot files\nconst reader = SnapshotResultReader.fromSnapshots(baseline, target, final);\nconst paths = reader.getSnapshotFiles();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/SnapshotResultReader.ts#L132"},"api/src/result-reader/SnapshotResultReader.ts:132"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"static-fromsnapshotsbaselinesnapshot-targetsnapshot-finalsnapshot"},(0,r.yg)("a",{id:"fromsnapshots"}),(0,r.yg)("inlineCode",{parentName:"h3"},"Static")," ",(0,r.yg)("strong",{parentName:"h3"},"fromSnapshots"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"baselineSnapshot"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"targetSnapshot"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"finalSnapshot"),")"),(0,r.yg)("p",null,"Build a result reader from baseline, target, and final heap snapshot files.\nThe three snapshot files do not have to be in the same directory."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"baselineSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | file path of the baseline heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"targetSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | file path of the target heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"finalSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | file path of the final heap snapshot"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.SnapshotResultReader"},(0,r.yg)("inlineCode",{parentName:"a"},"SnapshotResultReader"))," | the ResultReader instance")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {SnapshotResultReader, findLeaks} = require('@memlab/api');\n\n// baseline, target, and final are file paths of heap snapshot files\nconst reader = SnapshotResultReader.fromSnapshots(baseline, target, final);\nconst leaks = await findLeaks(reader);\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/SnapshotResultReader.ts#L99"},"api/src/result-reader/SnapshotResultReader.ts:99"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0d63082f.5b3b8cf1.js b/assets/js/0d63082f.283ba5b1.js similarity index 97% rename from assets/js/0d63082f.5b3b8cf1.js rename to assets/js/0d63082f.283ba5b1.js index a365bd7c..dba597eb 100644 --- a/assets/js/0d63082f.5b3b8cf1.js +++ b/assets/js/0d63082f.283ba5b1.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[5214],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>u});var s=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,s)}return n}function i(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var o=s.createContext({}),p=function(e){var a=s.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return s.createElement(o.Provider,{value:a},e.children)},g="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},c=s.forwardRef((function(e,a){var n=e.components,t=e.mdxType,l=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),g=p(n),c=t,u=g["".concat(o,".").concat(c)]||g[c]||m[c]||l;return n?s.createElement(u,i(i({ref:a},y),{},{components:n})):s.createElement(u,i({ref:a},y))}));function u(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var l=n.length,i=new Array(l);i[0]=c;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[g]="string"==typeof e?e:t,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>r,toc:()=>p});var s=n(8168),t=(n(6540),n(5680));const l={id:"heap_analysis_src.BaseAnalysis",title:"Class: BaseAnalysis",sidebar_label:"BaseAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.BaseAnalysis",id:"api/classes/heap_analysis_src.BaseAnalysis",title:"Class: BaseAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.BaseAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.BaseAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.BaseAnalysis",title:"Class: BaseAnalysis",sidebar_label:"BaseAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"SnapshotResultReader",permalink:"/memlab/docs/api/classes/api_src.SnapshotResultReader"},next:{title:"CollectionsHoldingStaleAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new BaseAnalysis()',id:"new-baseanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'analyzeSnapshotsInDirectory(directory, options?)',id:"analyzesnapshotsindirectorydirectory-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3},{value:'getDescription()',id:"getdescription",level:3},{value:'getOptions()',id:"getoptions",level:3},{value:'process(options)',id:"processoptions",level:3}],y={toc:p},g="wrapper";function m(e){let{components:a,...n}=e;return(0,t.yg)(g,(0,s.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("inlineCode",{parentName:"p"},"Analysis")),(0,t.yg)("p",{parentName:"li"},"\u21b3 ",(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"BaseAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"DetachedDOMElementAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"GlobalVariableAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"CollectionsHoldingStaleAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ObjectShallowAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ObjectSizeAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ShapeUnboundGrowthAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ObjectFanoutAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ObjectShapeAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ObjectUnboundGrowthAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"StringAnalysis"))))),(0,t.yg)("h2",{id:"constructors"},"Constructors"),(0,t.yg)("h3",{id:"new-baseanalysis"},(0,t.yg)("a",{id:"new baseanalysis"}),(0,t.yg)("strong",{parentName:"h3"},"new BaseAnalysis"),"()"),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,t.yg)("a",{id:"analyzesnapshotfromfile"}),(0,t.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,t.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,t.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,t.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Example"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,t.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"analyzesnapshotsindirectorydirectory-options"},(0,t.yg)("a",{id:"analyzesnapshotsindirectory"}),(0,t.yg)("strong",{parentName:"h3"},"analyzeSnapshotsInDirectory"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"directory"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,t.yg)("p",null,"Run heap analysis for a series of heap snapshot files"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"directory"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the directory holding a series of ",(0,t.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," files, all snapshot files will be loaded and analyzed in the alphanumerically ascending order of those snapshot file names."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,t.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Example"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory);\n// query analysis-specific and structured results\nconst shapes = analysis.getShapesWithUnboundGrowth();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L148"},"heap-analysis/src/BaseAnalysis.ts:148"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getcommandname"},(0,t.yg)("a",{id:"getcommandname"}),(0,t.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,t.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,t.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,t.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L189"},"heap-analysis/src/BaseAnalysis.ts:189"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getdescription"},(0,t.yg)("a",{id:"getdescription"}),(0,t.yg)("strong",{parentName:"h3"},"getDescription"),"()"),(0,t.yg)("p",null,"Get the textual description of the heap analysis.\nThe description of this analysis will be printed by:\n",(0,t.yg)("inlineCode",{parentName:"p"},"memlab analyze list")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"string")," | the description")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L201"},"heap-analysis/src/BaseAnalysis.ts:201"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getoptions"},(0,t.yg)("a",{id:"getoptions"}),(0,t.yg)("strong",{parentName:"h3"},"getOptions"),"()"),(0,t.yg)("p",null,"override this method if you would like CLI to print the option info"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"default"),"[] | an array of command line options")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L228"},"heap-analysis/src/BaseAnalysis.ts:228"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"processoptions"},(0,t.yg)("a",{id:"process"}),(0,t.yg)("strong",{parentName:"h3"},"process"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"options"),")"),(0,t.yg)("p",null,"Callback for ",(0,t.yg)("inlineCode",{parentName:"p"},"memlab analyze "),".\nDo the memory analysis and print results in this callback\nThe analysis should support:\n1) printing results on screen\n2) returning results via the return value"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#heapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"HeapAnalysisOptions"))," | This is the auto-generated arguments passed to all the ",(0,t.yg)("inlineCode",{parentName:"li"},"process")," method that your self-defined heap analysis should implement. You are not supposed to construct instances of this class."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"any"),">"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L216"},"heap-analysis/src/BaseAnalysis.ts:216"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[5214],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>u});var s=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,s)}return n}function i(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var o=s.createContext({}),p=function(e){var a=s.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return s.createElement(o.Provider,{value:a},e.children)},g="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},c=s.forwardRef((function(e,a){var n=e.components,t=e.mdxType,l=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),g=p(n),c=t,u=g["".concat(o,".").concat(c)]||g[c]||m[c]||l;return n?s.createElement(u,i(i({ref:a},y),{},{components:n})):s.createElement(u,i({ref:a},y))}));function u(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var l=n.length,i=new Array(l);i[0]=c;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[g]="string"==typeof e?e:t,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>r,toc:()=>p});var s=n(8168),t=(n(6540),n(5680));const l={id:"heap_analysis_src.BaseAnalysis",title:"Class: BaseAnalysis",sidebar_label:"BaseAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.BaseAnalysis",id:"api/classes/heap_analysis_src.BaseAnalysis",title:"Class: BaseAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.BaseAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.BaseAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.BaseAnalysis",title:"Class: BaseAnalysis",sidebar_label:"BaseAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"SnapshotResultReader",permalink:"/memlab/docs/api/classes/api_src.SnapshotResultReader"},next:{title:"CollectionsHoldingStaleAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new BaseAnalysis()',id:"new-baseanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'analyzeSnapshotsInDirectory(directory, options?)',id:"analyzesnapshotsindirectorydirectory-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3},{value:'getDescription()',id:"getdescription",level:3},{value:'getOptions()',id:"getoptions",level:3},{value:'process(options)',id:"processoptions",level:3}],y={toc:p},g="wrapper";function m(e){let{components:a,...n}=e;return(0,t.yg)(g,(0,s.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("inlineCode",{parentName:"p"},"Analysis")),(0,t.yg)("p",{parentName:"li"},"\u21b3 ",(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"BaseAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"DetachedDOMElementAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"GlobalVariableAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"CollectionsHoldingStaleAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ObjectShallowAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ObjectSizeAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ShapeUnboundGrowthAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ObjectFanoutAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ObjectShapeAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"ObjectUnboundGrowthAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"StringAnalysis"))))),(0,t.yg)("h2",{id:"constructors"},"Constructors"),(0,t.yg)("h3",{id:"new-baseanalysis"},(0,t.yg)("a",{id:"new baseanalysis"}),(0,t.yg)("strong",{parentName:"h3"},"new BaseAnalysis"),"()"),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,t.yg)("a",{id:"analyzesnapshotfromfile"}),(0,t.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,t.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,t.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,t.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Example"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,t.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"analyzesnapshotsindirectorydirectory-options"},(0,t.yg)("a",{id:"analyzesnapshotsindirectory"}),(0,t.yg)("strong",{parentName:"h3"},"analyzeSnapshotsInDirectory"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"directory"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,t.yg)("p",null,"Run heap analysis for a series of heap snapshot files"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"directory"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the directory holding a series of ",(0,t.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," files, all snapshot files will be loaded and analyzed in the alphanumerically ascending order of those snapshot file names."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,t.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Example"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory);\n// query analysis-specific and structured results\nconst shapes = analysis.getShapesWithUnboundGrowth();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L148"},"heap-analysis/src/BaseAnalysis.ts:148"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getcommandname"},(0,t.yg)("a",{id:"getcommandname"}),(0,t.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,t.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,t.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,t.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L189"},"heap-analysis/src/BaseAnalysis.ts:189"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getdescription"},(0,t.yg)("a",{id:"getdescription"}),(0,t.yg)("strong",{parentName:"h3"},"getDescription"),"()"),(0,t.yg)("p",null,"Get the textual description of the heap analysis.\nThe description of this analysis will be printed by:\n",(0,t.yg)("inlineCode",{parentName:"p"},"memlab analyze list")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"string")," | the description")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L201"},"heap-analysis/src/BaseAnalysis.ts:201"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getoptions"},(0,t.yg)("a",{id:"getoptions"}),(0,t.yg)("strong",{parentName:"h3"},"getOptions"),"()"),(0,t.yg)("p",null,"override this method if you would like CLI to print the option info"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"default"),"[] | an array of command line options")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L228"},"heap-analysis/src/BaseAnalysis.ts:228"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"processoptions"},(0,t.yg)("a",{id:"process"}),(0,t.yg)("strong",{parentName:"h3"},"process"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"options"),")"),(0,t.yg)("p",null,"Callback for ",(0,t.yg)("inlineCode",{parentName:"p"},"memlab analyze "),".\nDo the memory analysis and print results in this callback\nThe analysis should support:\n1) printing results on screen\n2) returning results via the return value"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#heapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"HeapAnalysisOptions"))," | This is the auto-generated arguments passed to all the ",(0,t.yg)("inlineCode",{parentName:"li"},"process")," method that your self-defined heap analysis should implement. You are not supposed to construct instances of this class."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"any"),">"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L216"},"heap-analysis/src/BaseAnalysis.ts:216"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0ee6ea57.f387e1a5.js b/assets/js/0ee6ea57.26c081ec.js similarity index 95% rename from assets/js/0ee6ea57.f387e1a5.js rename to assets/js/0ee6ea57.26c081ec.js index 3a532e8a..67b7b292 100644 --- a/assets/js/0ee6ea57.f387e1a5.js +++ b/assets/js/0ee6ea57.26c081ec.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[4573],{5680:(e,a,n)=>{n.d(a,{xA:()=>s,yg:()=>y});var r=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function i(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var p=r.createContext({}),g=function(e){var a=r.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):o(o({},a),e)),n},s=function(e){var a=g(e.components);return r.createElement(p.Provider,{value:a},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},d=r.forwardRef((function(e,a){var n=e.components,t=e.mdxType,i=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),m=g(n),d=t,y=m["".concat(p,".").concat(d)]||m[d]||c[d]||i;return n?r.createElement(y,o(o({ref:a},s),{},{components:n})):r.createElement(y,o({ref:a},s))}));function y(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var p in a)hasOwnProperty.call(a,p)&&(l[p]=a[p]);l.originalType=e,l[m]="string"==typeof e?e:t,o[1]=l;for(var g=2;g{n.r(a),n.d(a,{assets:()=>p,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>l,toc:()=>g});var r=n(8168),t=(n(6540),n(5680));const i={id:"core_src.IHeapNode",title:"Interface: IHeapNode",sidebar_label:"IHeapNode",custom_edit_url:null},o=void 0,l={unversionedId:"api/interfaces/core_src.IHeapNode",id:"api/interfaces/core_src.IHeapNode",title:"Interface: IHeapNode",description:"An IHeapNode instance represents a JS heap object in a heap snapshot.",source:"@site/docs/api/interfaces/core_src.IHeapNode.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNode",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapNode",title:"Interface: IHeapNode",sidebar_label:"IHeapNode",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapLocation",permalink:"/memlab/docs/api/interfaces/core_src.IHeapLocation"},next:{title:"IHeapNodes",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNodes"}},p={},g=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:' dominatorNode: Nullable<IHeapNode>',id:"-dominatornode-nullableiheapnode",level:3},{value:' edge_count: number',id:"-edge_count-number",level:3},{value:' hasPathEdge: boolean',id:"-haspathedge-boolean",level:3},{value:' id: number',id:"-id-number",level:3},{value:' isString: boolean',id:"-isstring-boolean",level:3},{value:' is_detached: boolean',id:"-is_detached-boolean",level:3},{value:' location: Nullable<IHeapLocation>',id:"-location-nullableiheaplocation",level:3},{value:' name: string',id:"-name-string",level:3},{value:' nodeIndex: number',id:"-nodeindex-number",level:3},{value:' numOfReferrers: number',id:"-numofreferrers-number",level:3},{value:' pathEdge: null | IHeapEdge',id:"-pathedge-null--iheapedge",level:3},{value:' references: IHeapEdge[]',id:"-references-iheapedge",level:3},{value:' referrers: IHeapEdge[]',id:"-referrers-iheapedge",level:3},{value:' retainedSize: number',id:"-retainedsize-number",level:3},{value:' self_size: number',id:"-self_size-number",level:3},{value:' snapshot: IHeapSnapshot',id:"-snapshot-iheapsnapshot",level:3},{value:' type: string',id:"-type-string",level:3},{value:"Methods",id:"methods",level:2},{value:'findAnyReference(predicate)',id:"findanyreferencepredicate",level:3},{value:'findAnyReferrer(predicate)',id:"findanyreferrerpredicate",level:3},{value:'findAnyReferrerNode(predicate)',id:"findanyreferrernodepredicate",level:3},{value:'findReferrerNodes(predicate)',id:"findreferrernodespredicate",level:3},{value:'findReferrers(predicate)',id:"findreferrerspredicate",level:3},{value:'forEachReference(callback)',id:"foreachreferencecallback",level:3},{value:'forEachReferrer(callback)',id:"foreachreferrercallback",level:3},{value:'getAnyReferrer(edgeName, edgeType?)',id:"getanyreferreredgename-edgetype",level:3},{value:'getAnyReferrerNode(edgeName, edgeType?)',id:"getanyreferrernodeedgename-edgetype",level:3},{value:'getReference(edgeName, edgeType?)',id:"getreferenceedgename-edgetype",level:3},{value:'getReferenceNode(edgeName, edgeType?)',id:"getreferencenodeedgename-edgetype",level:3},{value:'getReferrerNodes(edgeName, edgeType?)',id:"getreferrernodesedgename-edgetype",level:3},{value:'getReferrers(edgeName, edgeType?)',id:"getreferrersedgename-edgetype",level:3},{value:'toJSONString(...args)',id:"tojsonstringargs",level:3},{value:'toStringNode()',id:"tostringnode",level:3}],s={toc:g},m="wrapper";function c(e){let{components:a,...n}=e;return(0,t.yg)(m,(0,r.A)({},s,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"An ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapNode")," instance represents a JS heap object in a heap snapshot.\nA heap snapshot is generally a graph where graph nodes are JS heap objects\nand graph edges are JS references among JS heap objects."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"readonly"))," it is not recommended to modify any ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapNode")," instance"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),": V8 or hermes heap snapshot can be parsed by the\n",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#getfullheapfromfile"},"getFullHeapFromFile")," API.")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapNode} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // iterate over each node (heap object)\n heap.nodes.forEach((node: IHeapNode, i: number) => {\n // use the heap node APIs here\n const id = node.id;\n const type = node.type;\n // ...\n });\n})();\n")),(0,t.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("inlineCode",{parentName:"p"},"IHeapNodeBasic")),(0,t.yg)("p",{parentName:"li"},"\u21b3 ",(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"IHeapNode"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapStringNode"))))),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-dominatornode-nullableiheapnode"},(0,t.yg)("a",{id:"dominatornode",name:"dominatornode"})," ",(0,t.yg)("strong",{parentName:"h3"},"dominatorNode"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"),(0,t.yg)("p",null,"get the dominator node of this node. If the dominator node gets released\nthere will be no path from GC to this node, and therefore this node can\nalso be released.\nFor more information on what a dominator node is, please check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#dominators"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1888"},"core/src/lib/Types.ts:1888"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-edge_count-number"},(0,t.yg)("a",{id:"edge\\_count",name:"edge\\_count"})," ",(0,t.yg)("strong",{parentName:"h3"},"edge","_","count"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The total number of outgoing JS references (including engine-internal,\nnative, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1842"},"core/src/lib/Types.ts:1842"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-haspathedge-boolean"},(0,t.yg)("a",{id:"haspathedge",name:"haspathedge"})," ",(0,t.yg)("strong",{parentName:"h3"},"hasPathEdge"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("p",null,"returns true if the heap node has been set an incoming edge\nwhich leads to the parent node on the shortest path to GC root."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1864"},"core/src/lib/Types.ts:1864"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-id-number"},(0,t.yg)("a",{id:"id",name:"id"})," ",(0,t.yg)("strong",{parentName:"h3"},"id"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"unique id of the heap object"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1769"},"core/src/lib/Types.ts:1769"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-isstring-boolean"},(0,t.yg)("a",{id:"isstring",name:"isstring"})," ",(0,t.yg)("strong",{parentName:"h3"},"isString"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("p",null,"check if this a string node (normal string node, concatenated string node\nor sliced string node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1900"},"core/src/lib/Types.ts:1900"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-is_detached-boolean"},(0,t.yg)("a",{id:"is\\_detached",name:"is\\_detached"})," ",(0,t.yg)("strong",{parentName:"h3"},"is","_","detached"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},"If the heap object is a DOM element and the DOM element is detached\nfrom the DOM tree, ",(0,t.yg)("inlineCode",{parentName:"p"},"is_detached")," will be ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),";")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},"If the heap object is a React Fiber node and the Fiber node is unmounted\nfrom the React Fiber tree, ",(0,t.yg)("inlineCode",{parentName:"p"},"is_detached")," will be ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),";\notherwise it will be ",(0,t.yg)("inlineCode",{parentName:"p"},"false"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1824"},"core/src/lib/Types.ts:1824"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-location-nullableiheaplocation"},(0,t.yg)("a",{id:"location",name:"location"})," ",(0,t.yg)("strong",{parentName:"h3"},"location"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapLocation"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapLocation")),">"),(0,t.yg)("p",null,"source location information of this heap object (if it is recorded by\nthe heap snapshot)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1893"},"core/src/lib/Types.ts:1893"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-name-string"},(0,t.yg)("a",{id:"name",name:"name"})," ",(0,t.yg)("strong",{parentName:"h3"},"name"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"this is the ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," field associated with the heap object,\nfor JS object instances (type ",(0,t.yg)("inlineCode",{parentName:"p"},"object"),"), ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," is the constructor's name\nof the object instance. for ",(0,t.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," is the string value."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1765"},"core/src/lib/Types.ts:1765"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-nodeindex-number"},(0,t.yg)("a",{id:"nodeindex",name:"nodeindex"})," ",(0,t.yg)("strong",{parentName:"h3"},"nodeIndex"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"index of this heap object inside the ",(0,t.yg)("inlineCode",{parentName:"p"},"node.snapshot.nodes")," pseudo array"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1873"},"core/src/lib/Types.ts:1873"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-numofreferrers-number"},(0,t.yg)("a",{id:"numofreferrers",name:"numofreferrers"})," ",(0,t.yg)("strong",{parentName:"h3"},"numOfReferrers"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"Get the number of all incoming references pointing to this heap object\n(including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1859"},"core/src/lib/Types.ts:1859"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-pathedge-null--iheapedge"},(0,t.yg)("a",{id:"pathedge",name:"pathedge"})," ",(0,t.yg)("strong",{parentName:"h3"},"pathEdge"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"null")," ","|"," ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge"))),(0,t.yg)("p",null,"The incoming edge which leads to the parent node\non the shortest path to GC root."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1869"},"core/src/lib/Types.ts:1869"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-references-iheapedge"},(0,t.yg)("a",{id:"references",name:"references"})," ",(0,t.yg)("strong",{parentName:"h3"},"references"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[]"),(0,t.yg)("p",null,"Get a JS array containing all outgoing JS references from this heap object\n(including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1849"},"core/src/lib/Types.ts:1849"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-referrers-iheapedge"},(0,t.yg)("a",{id:"referrers",name:"referrers"})," ",(0,t.yg)("strong",{parentName:"h3"},"referrers"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[]"),(0,t.yg)("p",null,"Get a JS array containing all incoming JS references pointing to this heap\nobject (including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1854"},"core/src/lib/Types.ts:1854"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-retainedsize-number"},(0,t.yg)("a",{id:"retainedsize",name:"retainedsize"})," ",(0,t.yg)("strong",{parentName:"h3"},"retainedSize"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The ",(0,t.yg)("em",{parentName:"p"},"retained size")," of the heap object (i.e., the total size of memory that\ncould be released if this object is released). For difference between\n",(0,t.yg)("strong",{parentName:"p"},"retained size")," and ",(0,t.yg)("strong",{parentName:"p"},"shallow size"),", check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#object_sizes"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1880"},"core/src/lib/Types.ts:1880"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-self_size-number"},(0,t.yg)("a",{id:"self\\_size",name:"self\\_size"})," ",(0,t.yg)("strong",{parentName:"h3"},"self","_","size"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The ",(0,t.yg)("em",{parentName:"p"},"shallow size")," of the heap object (i.e., the size of memory that is held\nby the object itself.). For difference between ",(0,t.yg)("strong",{parentName:"p"},"shallow size")," and\n",(0,t.yg)("strong",{parentName:"p"},"retained size"),", check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#object_sizes"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1837"},"core/src/lib/Types.ts:1837"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-snapshot-iheapsnapshot"},(0,t.yg)("a",{id:"snapshot",name:"snapshot"})," ",(0,t.yg)("strong",{parentName:"h3"},"snapshot"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))),(0,t.yg)("p",null,"get the ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," containing this heap object"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1816"},"core/src/lib/Types.ts:1816"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-type-string"},(0,t.yg)("a",{id:"type",name:"type"})," ",(0,t.yg)("strong",{parentName:"h3"},"type"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"the type of the heap node object. All possible types:\nThis is engine-specific, for example all types in V8:\n",(0,t.yg)("inlineCode",{parentName:"p"},"hidden"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"array"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"object"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"code"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"closure"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"regexp"),",\n",(0,t.yg)("inlineCode",{parentName:"p"},"number"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"native"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"synthetic"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"concatenated string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"sliced string"),",\n",(0,t.yg)("inlineCode",{parentName:"p"},"symbol"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"bigint")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1759"},"core/src/lib/Types.ts:1759"))))),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"findanyreferencepredicate"},(0,t.yg)("a",{id:"findanyreference"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\nin the hosting node (or outgoing edges from the node) until the predicate\nreturns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the first outgoing edge for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such edge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const reference = node.findAnyReference((edge: IHeapEdge) => {\n // find the outgoing reference with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1972"},"core/src/lib/Types.ts:1972"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findanyreferrerpredicate"},(0,t.yg)("a",{id:"findanyreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\npointing to the hosting node (or incoming edges to the node) until the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the first incoming edge for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such edge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrer = node.findAnyReferrer((edge: IHeapEdge) => {\n // find the incoming reference with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1989"},"core/src/lib/Types.ts:1989"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findanyreferrernodepredicate"},(0,t.yg)("a",{id:"findanyreferrernode"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReferrerNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript heap\nobject (heap graph node) pointing to the hosting node\n(or nodes having edges to the hosting node) until the predicate\nreturns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the callback for each incoming JavaScript heap object"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the first referring node for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such node is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrer = node.findAnyReferrerNode((node: IHeapNode) => {\n // find the referring node with name \"Parent\"\n return node.name === 'Parent';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2007"},"core/src/lib/Types.ts:2007"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findreferrernodespredicate"},(0,t.yg)("a",{id:"findreferrernodes"}),(0,t.yg)("strong",{parentName:"h3"},"findReferrerNodes"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript heap\nobject (heap graph node) pointing to the hosting node\n(or nodes having edges to the hosting node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the callback for each referrer nodes"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),"[] | an array containing all the referrer nodes for which the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),", otherwise returns an empty array if no such\nnode is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrerNodes = node.findReferrerNodes((node: IHeapNode) => {\n // find all the referring nodes with name \"Parent\"\n return node.name === 'Parent';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2042"},"core/src/lib/Types.ts:2042"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findreferrerspredicate"},(0,t.yg)("a",{id:"findreferrers"}),(0,t.yg)("strong",{parentName:"h3"},"findReferrers"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\npointing to the hosting node (or incoming edges to the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[] | an array containing all the incoming edges for which the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),", otherwise returns an empty array if no such\nedge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrers = node.findReferrers((edge: IHeapEdge) => {\n // find all the incoming references with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2024"},"core/src/lib/Types.ts:2024"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"foreachreferencecallback"},(0,t.yg)("a",{id:"foreachreference"}),(0,t.yg)("strong",{parentName:"h3"},"forEachReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"executes a provided callback once for each JavaScript reference in the\nhosting node (or outgoing edges from the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#edgeiterationcallback"},(0,t.yg)("inlineCode",{parentName:"a"},"EdgeIterationCallback"))," | the callback for each outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"void")," | this API returns void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"node.forEachReference((edge: IHeapEdge) => {\n // process edge ...\n\n // if no need to iterate over remaining edges after\n // the current edge in the node.references list\n return {stop: true};\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1937"},"core/src/lib/Types.ts:1937"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"foreachreferrercallback"},(0,t.yg)("a",{id:"foreachreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"forEachReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"executes a provided callback once for each JavaScript reference pointing\nto the hosting node (or incoming edges to the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#edgeiterationcallback"},(0,t.yg)("inlineCode",{parentName:"a"},"EdgeIterationCallback"))," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"void")," | this API returns void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"node.forEachReferrer((edge: IHeapEdge) => {\n // process edge ...\n\n // if no need to iterate over remaining edges after\n // the current edge in the node.referrers list\n return {stop: true};\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1955"},"core/src/lib/Types.ts:1955"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getanyreferreredgename-edgetype"},(0,t.yg)("a",{id:"getanyreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"getAnyReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds an incoming JS\nreference pointing to the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the incoming edge that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find one of the JS reference named \"ref\" pointing to node\nconst reference = node.getAnyReferrer('ref', 'property');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2097"},"core/src/lib/Types.ts:2097"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getanyreferrernodeedgename-edgetype"},(0,t.yg)("a",{id:"getanyreferrernode"}),(0,t.yg)("strong",{parentName:"h3"},"getAnyReferrerNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds one of the incoming JS\nreferences pointing to the hosting node, and returns the JS heap object\ncontaining the incoming reference."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the node containing the incoming JS reference that meets\nthe specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find one of the JS heap object with a JS reference\n// named \"ref\" pointing to node\nconst n1 = node.getAnyReferrerNode('ref', 'property');\n// this is equivalent to\nconst n2 = node.getAnyReferrer('ref', 'property')?.fromNode;\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2120"},"core/src/lib/Types.ts:2120"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferenceedgename-edgetype"},(0,t.yg)("a",{id:"getreference"}),(0,t.yg)("strong",{parentName:"h3"},"getReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds an outgoing JS\nreference from the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the outgoing JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the outgoing edge that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find the internal reference to node's hidden class\nconst reference = node.getReference('map', 'hidden');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2057"},"core/src/lib/Types.ts:2057"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferencenodeedgename-edgetype"},(0,t.yg)("a",{id:"getreferencenode"}),(0,t.yg)("strong",{parentName:"h3"},"getReferenceNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds the outgoing JS\nreference from the hosting node, and returns the JS heap object pointed to\nby the outgoing JS reference."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the outgoing JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the node pointed to by the outgoing reference that meets\nthe specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find the node's hidden class\nconst hiddenClassNode = node.getReferenceNode('map', 'hidden');\n// this is equivalent to\nconst hiddenClassNode2 = node.getReference('map', 'hidden')?.toNode;\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2079"},"core/src/lib/Types.ts:2079"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferrernodesedgename-edgetype"},(0,t.yg)("a",{id:"getreferrernodes"}),(0,t.yg)("strong",{parentName:"h3"},"getReferrerNodes"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds all of the incoming JS\nreferences pointing to the hosting node, and returns an array containing\nthe hosting node for each of the incoming JS references."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),"[] | an array containing the hosting nodes, with each node corresponds\nto each incoming JS reference that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find all of the JS heap object with a JS reference\n// named \"ref\" pointing to node\nconst nodes1 = node.getReferrerNodes('ref', 'property');\n// this is equivalent to\nconst nodes2 = node.getReferrers('ref', 'property')\n .map(edge => edge.fromNode);\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2160"},"core/src/lib/Types.ts:2160"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferrersedgename-edgetype"},(0,t.yg)("a",{id:"getreferrers"}),(0,t.yg)("strong",{parentName:"h3"},"getReferrers"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds all the incoming JS\nreference pointing to the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[] | an array containing all the incoming edges that\nmeet the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find all of of the JS reference named \"ref\" pointing to node\nconst referrers = node.getReferrers('ref', 'property');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2139"},"core/src/lib/Types.ts:2139"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"tojsonstringargs"},(0,t.yg)("a",{id:"tojsonstring"}),(0,t.yg)("strong",{parentName:"h3"},"toJSONString"),"(...",(0,t.yg)("inlineCode",{parentName:"h3"},"args"),")"),(0,t.yg)("p",null,"convert to a concise readable string output\n(like calling ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)"),")."),(0,t.yg)("p",null,"Note: Please be aware that using ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)")," is\nnot recommended as it will generate a JSON representation of the host\nobject that is too large to be easily readable due to its connections\nto other parts of the data structures within the heap snapshot."),(0,t.yg)("p",null,"This API does not completely serialize all the information\ncaptured by the hosting object."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"...args"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"any"),"[]"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1919"},"core/src/lib/Types.ts:1919"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"tostringnode"},(0,t.yg)("a",{id:"tostringnode"}),(0,t.yg)("strong",{parentName:"h3"},"toStringNode"),"()"),(0,t.yg)("p",null,"convert to an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},"IHeapStringNode")," object if this node is a string node.\nThe ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},"IHeapStringNode")," object supports querying the string content\ninside the string node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapStringNode")),">"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1906"},"core/src/lib/Types.ts:1906"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[4573],{5680:(e,a,n)=>{n.d(a,{xA:()=>s,yg:()=>y});var r=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function i(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var p=r.createContext({}),g=function(e){var a=r.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):o(o({},a),e)),n},s=function(e){var a=g(e.components);return r.createElement(p.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},d=r.forwardRef((function(e,a){var n=e.components,t=e.mdxType,i=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=g(n),d=t,y=c["".concat(p,".").concat(d)]||c[d]||m[d]||i;return n?r.createElement(y,o(o({ref:a},s),{},{components:n})):r.createElement(y,o({ref:a},s))}));function y(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var p in a)hasOwnProperty.call(a,p)&&(l[p]=a[p]);l.originalType=e,l[c]="string"==typeof e?e:t,o[1]=l;for(var g=2;g{n.r(a),n.d(a,{assets:()=>p,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>g});var r=n(8168),t=(n(6540),n(5680));const i={id:"core_src.IHeapNode",title:"Interface: IHeapNode",sidebar_label:"IHeapNode",custom_edit_url:null},o=void 0,l={unversionedId:"api/interfaces/core_src.IHeapNode",id:"api/interfaces/core_src.IHeapNode",title:"Interface: IHeapNode",description:"An IHeapNode instance represents a JS heap object in a heap snapshot.",source:"@site/docs/api/interfaces/core_src.IHeapNode.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNode",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapNode",title:"Interface: IHeapNode",sidebar_label:"IHeapNode",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapLocation",permalink:"/memlab/docs/api/interfaces/core_src.IHeapLocation"},next:{title:"IHeapNodes",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNodes"}},p={},g=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:' dominatorNode: Nullable<IHeapNode>',id:"-dominatornode-nullableiheapnode",level:3},{value:' edge_count: number',id:"-edge_count-number",level:3},{value:' hasPathEdge: boolean',id:"-haspathedge-boolean",level:3},{value:' id: number',id:"-id-number",level:3},{value:' isString: boolean',id:"-isstring-boolean",level:3},{value:' is_detached: boolean',id:"-is_detached-boolean",level:3},{value:' location: Nullable<IHeapLocation>',id:"-location-nullableiheaplocation",level:3},{value:' name: string',id:"-name-string",level:3},{value:' nodeIndex: number',id:"-nodeindex-number",level:3},{value:' numOfReferrers: number',id:"-numofreferrers-number",level:3},{value:' pathEdge: null | IHeapEdge',id:"-pathedge-null--iheapedge",level:3},{value:' references: IHeapEdge[]',id:"-references-iheapedge",level:3},{value:' referrers: IHeapEdge[]',id:"-referrers-iheapedge",level:3},{value:' retainedSize: number',id:"-retainedsize-number",level:3},{value:' self_size: number',id:"-self_size-number",level:3},{value:' snapshot: IHeapSnapshot',id:"-snapshot-iheapsnapshot",level:3},{value:' type: string',id:"-type-string",level:3},{value:"Methods",id:"methods",level:2},{value:'findAnyReference(predicate)',id:"findanyreferencepredicate",level:3},{value:'findAnyReferrer(predicate)',id:"findanyreferrerpredicate",level:3},{value:'findAnyReferrerNode(predicate)',id:"findanyreferrernodepredicate",level:3},{value:'findReferrerNodes(predicate)',id:"findreferrernodespredicate",level:3},{value:'findReferrers(predicate)',id:"findreferrerspredicate",level:3},{value:'forEachReference(callback)',id:"foreachreferencecallback",level:3},{value:'forEachReferrer(callback)',id:"foreachreferrercallback",level:3},{value:'getAnyReferrer(edgeName, edgeType?)',id:"getanyreferreredgename-edgetype",level:3},{value:'getAnyReferrerNode(edgeName, edgeType?)',id:"getanyreferrernodeedgename-edgetype",level:3},{value:'getReference(edgeName, edgeType?)',id:"getreferenceedgename-edgetype",level:3},{value:'getReferenceNode(edgeName, edgeType?)',id:"getreferencenodeedgename-edgetype",level:3},{value:'getReferrerNodes(edgeName, edgeType?)',id:"getreferrernodesedgename-edgetype",level:3},{value:'getReferrers(edgeName, edgeType?)',id:"getreferrersedgename-edgetype",level:3},{value:'toJSONString(...args)',id:"tojsonstringargs",level:3},{value:'toStringNode()',id:"tostringnode",level:3}],s={toc:g},c="wrapper";function m(e){let{components:a,...n}=e;return(0,t.yg)(c,(0,r.A)({},s,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"An ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapNode")," instance represents a JS heap object in a heap snapshot.\nA heap snapshot is generally a graph where graph nodes are JS heap objects\nand graph edges are JS references among JS heap objects."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"readonly"))," it is not recommended to modify any ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapNode")," instance"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),": V8 or hermes heap snapshot can be parsed by the\n",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#getfullheapfromfile"},"getFullHeapFromFile")," API.")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapNode} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // iterate over each node (heap object)\n heap.nodes.forEach((node: IHeapNode, i: number) => {\n // use the heap node APIs here\n const id = node.id;\n const type = node.type;\n // ...\n });\n})();\n")),(0,t.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("inlineCode",{parentName:"p"},"IHeapNodeBasic")),(0,t.yg)("p",{parentName:"li"},"\u21b3 ",(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"IHeapNode"))),(0,t.yg)("p",{parentName:"li"},"\u21b3\u21b3 ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapStringNode"))))),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-dominatornode-nullableiheapnode"},(0,t.yg)("a",{id:"dominatornode",name:"dominatornode"})," ",(0,t.yg)("strong",{parentName:"h3"},"dominatorNode"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"),(0,t.yg)("p",null,"get the dominator node of this node. If the dominator node gets released\nthere will be no path from GC to this node, and therefore this node can\nalso be released.\nFor more information on what a dominator node is, please check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#dominators"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1888"},"core/src/lib/Types.ts:1888"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-edge_count-number"},(0,t.yg)("a",{id:"edge\\_count",name:"edge\\_count"})," ",(0,t.yg)("strong",{parentName:"h3"},"edge","_","count"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The total number of outgoing JS references (including engine-internal,\nnative, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1842"},"core/src/lib/Types.ts:1842"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-haspathedge-boolean"},(0,t.yg)("a",{id:"haspathedge",name:"haspathedge"})," ",(0,t.yg)("strong",{parentName:"h3"},"hasPathEdge"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("p",null,"returns true if the heap node has been set an incoming edge\nwhich leads to the parent node on the shortest path to GC root."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1864"},"core/src/lib/Types.ts:1864"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-id-number"},(0,t.yg)("a",{id:"id",name:"id"})," ",(0,t.yg)("strong",{parentName:"h3"},"id"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"unique id of the heap object"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1769"},"core/src/lib/Types.ts:1769"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-isstring-boolean"},(0,t.yg)("a",{id:"isstring",name:"isstring"})," ",(0,t.yg)("strong",{parentName:"h3"},"isString"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("p",null,"check if this a string node (normal string node, concatenated string node\nor sliced string node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1900"},"core/src/lib/Types.ts:1900"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-is_detached-boolean"},(0,t.yg)("a",{id:"is\\_detached",name:"is\\_detached"})," ",(0,t.yg)("strong",{parentName:"h3"},"is","_","detached"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},"If the heap object is a DOM element and the DOM element is detached\nfrom the DOM tree, ",(0,t.yg)("inlineCode",{parentName:"p"},"is_detached")," will be ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),";")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},"If the heap object is a React Fiber node and the Fiber node is unmounted\nfrom the React Fiber tree, ",(0,t.yg)("inlineCode",{parentName:"p"},"is_detached")," will be ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),";\notherwise it will be ",(0,t.yg)("inlineCode",{parentName:"p"},"false"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1824"},"core/src/lib/Types.ts:1824"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-location-nullableiheaplocation"},(0,t.yg)("a",{id:"location",name:"location"})," ",(0,t.yg)("strong",{parentName:"h3"},"location"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapLocation"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapLocation")),">"),(0,t.yg)("p",null,"source location information of this heap object (if it is recorded by\nthe heap snapshot)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1893"},"core/src/lib/Types.ts:1893"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-name-string"},(0,t.yg)("a",{id:"name",name:"name"})," ",(0,t.yg)("strong",{parentName:"h3"},"name"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"this is the ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," field associated with the heap object,\nfor JS object instances (type ",(0,t.yg)("inlineCode",{parentName:"p"},"object"),"), ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," is the constructor's name\nof the object instance. for ",(0,t.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," is the string value."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1765"},"core/src/lib/Types.ts:1765"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-nodeindex-number"},(0,t.yg)("a",{id:"nodeindex",name:"nodeindex"})," ",(0,t.yg)("strong",{parentName:"h3"},"nodeIndex"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"index of this heap object inside the ",(0,t.yg)("inlineCode",{parentName:"p"},"node.snapshot.nodes")," pseudo array"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1873"},"core/src/lib/Types.ts:1873"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-numofreferrers-number"},(0,t.yg)("a",{id:"numofreferrers",name:"numofreferrers"})," ",(0,t.yg)("strong",{parentName:"h3"},"numOfReferrers"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"Get the number of all incoming references pointing to this heap object\n(including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1859"},"core/src/lib/Types.ts:1859"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-pathedge-null--iheapedge"},(0,t.yg)("a",{id:"pathedge",name:"pathedge"})," ",(0,t.yg)("strong",{parentName:"h3"},"pathEdge"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"null")," ","|"," ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge"))),(0,t.yg)("p",null,"The incoming edge which leads to the parent node\non the shortest path to GC root."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1869"},"core/src/lib/Types.ts:1869"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-references-iheapedge"},(0,t.yg)("a",{id:"references",name:"references"})," ",(0,t.yg)("strong",{parentName:"h3"},"references"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[]"),(0,t.yg)("p",null,"Get a JS array containing all outgoing JS references from this heap object\n(including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1849"},"core/src/lib/Types.ts:1849"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-referrers-iheapedge"},(0,t.yg)("a",{id:"referrers",name:"referrers"})," ",(0,t.yg)("strong",{parentName:"h3"},"referrers"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[]"),(0,t.yg)("p",null,"Get a JS array containing all incoming JS references pointing to this heap\nobject (including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1854"},"core/src/lib/Types.ts:1854"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-retainedsize-number"},(0,t.yg)("a",{id:"retainedsize",name:"retainedsize"})," ",(0,t.yg)("strong",{parentName:"h3"},"retainedSize"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The ",(0,t.yg)("em",{parentName:"p"},"retained size")," of the heap object (i.e., the total size of memory that\ncould be released if this object is released). For difference between\n",(0,t.yg)("strong",{parentName:"p"},"retained size")," and ",(0,t.yg)("strong",{parentName:"p"},"shallow size"),", check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#object_sizes"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1880"},"core/src/lib/Types.ts:1880"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-self_size-number"},(0,t.yg)("a",{id:"self\\_size",name:"self\\_size"})," ",(0,t.yg)("strong",{parentName:"h3"},"self","_","size"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The ",(0,t.yg)("em",{parentName:"p"},"shallow size")," of the heap object (i.e., the size of memory that is held\nby the object itself.). For difference between ",(0,t.yg)("strong",{parentName:"p"},"shallow size")," and\n",(0,t.yg)("strong",{parentName:"p"},"retained size"),", check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#object_sizes"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1837"},"core/src/lib/Types.ts:1837"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-snapshot-iheapsnapshot"},(0,t.yg)("a",{id:"snapshot",name:"snapshot"})," ",(0,t.yg)("strong",{parentName:"h3"},"snapshot"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))),(0,t.yg)("p",null,"get the ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," containing this heap object"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1816"},"core/src/lib/Types.ts:1816"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-type-string"},(0,t.yg)("a",{id:"type",name:"type"})," ",(0,t.yg)("strong",{parentName:"h3"},"type"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"the type of the heap node object. All possible types:\nThis is engine-specific, for example all types in V8:\n",(0,t.yg)("inlineCode",{parentName:"p"},"hidden"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"array"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"object"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"code"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"closure"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"regexp"),",\n",(0,t.yg)("inlineCode",{parentName:"p"},"number"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"native"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"synthetic"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"concatenated string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"sliced string"),",\n",(0,t.yg)("inlineCode",{parentName:"p"},"symbol"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"bigint")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1759"},"core/src/lib/Types.ts:1759"))))),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"findanyreferencepredicate"},(0,t.yg)("a",{id:"findanyreference"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\nin the hosting node (or outgoing edges from the node) until the predicate\nreturns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the first outgoing edge for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such edge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const reference = node.findAnyReference((edge: IHeapEdge) => {\n // find the outgoing reference with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1972"},"core/src/lib/Types.ts:1972"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findanyreferrerpredicate"},(0,t.yg)("a",{id:"findanyreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\npointing to the hosting node (or incoming edges to the node) until the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the first incoming edge for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such edge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrer = node.findAnyReferrer((edge: IHeapEdge) => {\n // find the incoming reference with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1989"},"core/src/lib/Types.ts:1989"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findanyreferrernodepredicate"},(0,t.yg)("a",{id:"findanyreferrernode"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReferrerNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript heap\nobject (heap graph node) pointing to the hosting node\n(or nodes having edges to the hosting node) until the predicate\nreturns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the callback for each incoming JavaScript heap object"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the first referring node for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such node is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrer = node.findAnyReferrerNode((node: IHeapNode) => {\n // find the referring node with name \"Parent\"\n return node.name === 'Parent';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2007"},"core/src/lib/Types.ts:2007"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findreferrernodespredicate"},(0,t.yg)("a",{id:"findreferrernodes"}),(0,t.yg)("strong",{parentName:"h3"},"findReferrerNodes"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript heap\nobject (heap graph node) pointing to the hosting node\n(or nodes having edges to the hosting node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the callback for each referrer nodes"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),"[] | an array containing all the referrer nodes for which the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),", otherwise returns an empty array if no such\nnode is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrerNodes = node.findReferrerNodes((node: IHeapNode) => {\n // find all the referring nodes with name \"Parent\"\n return node.name === 'Parent';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2042"},"core/src/lib/Types.ts:2042"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findreferrerspredicate"},(0,t.yg)("a",{id:"findreferrers"}),(0,t.yg)("strong",{parentName:"h3"},"findReferrers"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\npointing to the hosting node (or incoming edges to the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[] | an array containing all the incoming edges for which the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),", otherwise returns an empty array if no such\nedge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrers = node.findReferrers((edge: IHeapEdge) => {\n // find all the incoming references with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2024"},"core/src/lib/Types.ts:2024"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"foreachreferencecallback"},(0,t.yg)("a",{id:"foreachreference"}),(0,t.yg)("strong",{parentName:"h3"},"forEachReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"executes a provided callback once for each JavaScript reference in the\nhosting node (or outgoing edges from the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#edgeiterationcallback"},(0,t.yg)("inlineCode",{parentName:"a"},"EdgeIterationCallback"))," | the callback for each outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"void")," | this API returns void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"node.forEachReference((edge: IHeapEdge) => {\n // process edge ...\n\n // if no need to iterate over remaining edges after\n // the current edge in the node.references list\n return {stop: true};\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1937"},"core/src/lib/Types.ts:1937"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"foreachreferrercallback"},(0,t.yg)("a",{id:"foreachreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"forEachReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"executes a provided callback once for each JavaScript reference pointing\nto the hosting node (or incoming edges to the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#edgeiterationcallback"},(0,t.yg)("inlineCode",{parentName:"a"},"EdgeIterationCallback"))," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"void")," | this API returns void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"node.forEachReferrer((edge: IHeapEdge) => {\n // process edge ...\n\n // if no need to iterate over remaining edges after\n // the current edge in the node.referrers list\n return {stop: true};\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1955"},"core/src/lib/Types.ts:1955"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getanyreferreredgename-edgetype"},(0,t.yg)("a",{id:"getanyreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"getAnyReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds an incoming JS\nreference pointing to the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the incoming edge that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find one of the JS reference named \"ref\" pointing to node\nconst reference = node.getAnyReferrer('ref', 'property');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2097"},"core/src/lib/Types.ts:2097"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getanyreferrernodeedgename-edgetype"},(0,t.yg)("a",{id:"getanyreferrernode"}),(0,t.yg)("strong",{parentName:"h3"},"getAnyReferrerNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds one of the incoming JS\nreferences pointing to the hosting node, and returns the JS heap object\ncontaining the incoming reference."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the node containing the incoming JS reference that meets\nthe specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find one of the JS heap object with a JS reference\n// named \"ref\" pointing to node\nconst n1 = node.getAnyReferrerNode('ref', 'property');\n// this is equivalent to\nconst n2 = node.getAnyReferrer('ref', 'property')?.fromNode;\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2120"},"core/src/lib/Types.ts:2120"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferenceedgename-edgetype"},(0,t.yg)("a",{id:"getreference"}),(0,t.yg)("strong",{parentName:"h3"},"getReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds an outgoing JS\nreference from the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the outgoing JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the outgoing edge that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find the internal reference to node's hidden class\nconst reference = node.getReference('map', 'hidden');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2057"},"core/src/lib/Types.ts:2057"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferencenodeedgename-edgetype"},(0,t.yg)("a",{id:"getreferencenode"}),(0,t.yg)("strong",{parentName:"h3"},"getReferenceNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds the outgoing JS\nreference from the hosting node, and returns the JS heap object pointed to\nby the outgoing JS reference."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the outgoing JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the node pointed to by the outgoing reference that meets\nthe specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find the node's hidden class\nconst hiddenClassNode = node.getReferenceNode('map', 'hidden');\n// this is equivalent to\nconst hiddenClassNode2 = node.getReference('map', 'hidden')?.toNode;\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2079"},"core/src/lib/Types.ts:2079"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferrernodesedgename-edgetype"},(0,t.yg)("a",{id:"getreferrernodes"}),(0,t.yg)("strong",{parentName:"h3"},"getReferrerNodes"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds all of the incoming JS\nreferences pointing to the hosting node, and returns an array containing\nthe hosting node for each of the incoming JS references."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),"[] | an array containing the hosting nodes, with each node corresponds\nto each incoming JS reference that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find all of the JS heap object with a JS reference\n// named \"ref\" pointing to node\nconst nodes1 = node.getReferrerNodes('ref', 'property');\n// this is equivalent to\nconst nodes2 = node.getReferrers('ref', 'property')\n .map(edge => edge.fromNode);\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2160"},"core/src/lib/Types.ts:2160"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferrersedgename-edgetype"},(0,t.yg)("a",{id:"getreferrers"}),(0,t.yg)("strong",{parentName:"h3"},"getReferrers"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds all the incoming JS\nreference pointing to the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[] | an array containing all the incoming edges that\nmeet the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find all of of the JS reference named \"ref\" pointing to node\nconst referrers = node.getReferrers('ref', 'property');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2139"},"core/src/lib/Types.ts:2139"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"tojsonstringargs"},(0,t.yg)("a",{id:"tojsonstring"}),(0,t.yg)("strong",{parentName:"h3"},"toJSONString"),"(...",(0,t.yg)("inlineCode",{parentName:"h3"},"args"),")"),(0,t.yg)("p",null,"convert to a concise readable string output\n(like calling ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)"),")."),(0,t.yg)("p",null,"Note: Please be aware that using ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)")," is\nnot recommended as it will generate a JSON representation of the host\nobject that is too large to be easily readable due to its connections\nto other parts of the data structures within the heap snapshot."),(0,t.yg)("p",null,"This API does not completely serialize all the information\ncaptured by the hosting object."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"...args"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"any"),"[]"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1919"},"core/src/lib/Types.ts:1919"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"tostringnode"},(0,t.yg)("a",{id:"tostringnode"}),(0,t.yg)("strong",{parentName:"h3"},"toStringNode"),"()"),(0,t.yg)("p",null,"convert to an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},"IHeapStringNode")," object if this node is a string node.\nThe ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},"IHeapStringNode")," object supports querying the string content\ninside the string node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapStringNode")),">"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1906"},"core/src/lib/Types.ts:1906"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1774.2aa21cf8.js b/assets/js/1774.f1fe53b9.js similarity index 94% rename from assets/js/1774.2aa21cf8.js rename to assets/js/1774.f1fe53b9.js index 0a364a1b..09e7b365 100644 --- a/assets/js/1774.2aa21cf8.js +++ b/assets/js/1774.f1fe53b9.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[1774],{1774:(e,t,a)=>{a.r(t),a.d(t,{default:()=>i});var n=a(6540),l=a(1312),o=a(9024),r=a(1868);function i(){return n.createElement(n.Fragment,null,n.createElement(o.be,{title:(0,l.T)({id:"theme.NotFound.title",message:"Page Not Found"})}),n.createElement(r.A,null,n.createElement("main",{className:"container margin-vert--xl"},n.createElement("div",{className:"row"},n.createElement("div",{className:"col col--6 col--offset-3"},n.createElement("h1",{className:"hero__title"},n.createElement(l.A,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),n.createElement("p",null,n.createElement(l.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),n.createElement("p",null,n.createElement(l.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[1774],{1774:(e,t,a)=>{a.r(t),a.d(t,{default:()=>i});var n=a(6540),l=a(1312),o=a(9024),r=a(8916);function i(){return n.createElement(n.Fragment,null,n.createElement(o.be,{title:(0,l.T)({id:"theme.NotFound.title",message:"Page Not Found"})}),n.createElement(r.A,null,n.createElement("main",{className:"container margin-vert--xl"},n.createElement("div",{className:"row"},n.createElement("div",{className:"col col--6 col--offset-3"},n.createElement("h1",{className:"hero__title"},n.createElement(l.A,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),n.createElement("p",null,n.createElement(l.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),n.createElement("p",null,n.createElement(l.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.54295ca3.js b/assets/js/1a4e3797.d6130a4b.js similarity index 60% rename from assets/js/1a4e3797.54295ca3.js rename to assets/js/1a4e3797.d6130a4b.js index 088fe03a..01f0e7fa 100644 --- a/assets/js/1a4e3797.54295ca3.js +++ b/assets/js/1a4e3797.d6130a4b.js @@ -1,2 +1,2 @@ -/*! For license information please see 1a4e3797.54295ca3.js.LICENSE.txt */ -(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[2138],{2733:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,o,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(n(a))for(c=Array.prototype.slice.call(arguments,1),s=(u=a.slice()).length,o=0;o0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},4103:(e,t,r)=>{"use strict";var n=r(6571),i=r(9127),a=r(2223),s=r(3371),c=r(7691);function o(e,t,r,i){return new n(e,t,r,i)}o.version=r(6938),o.AlgoliaSearchHelper=n,o.SearchParameters=s,o.RecommendParameters=i,o.SearchResults=c,o.RecommendResults=a,e.exports=o},6732:(e,t,r)=>{"use strict";var n=r(2733);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(3014)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},9127:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice();return r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter((function(e){return void 0===t[e.$$id]})).map((function(t){var r=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete r.$$id,r}))}},e.exports=t},2223:e=>{"use strict";function t(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach((function(e){var n=e.$$id;r[n]=t[n],r._rawResults[n]=t[n]}))}t.prototype={constructor:t},e.exports=t},1673:(e,t,r)=>{"use strict";var n=r(9110),i=r(317),a=r(1383),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return a(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},3371:(e,t,r)=>{"use strict";var n=r(9110),i=r(849),a=r(4843),s=r(4728),c=r(317),o=r(1383),u=r(7507),h=r(2208),l=r(1673);function f(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return f(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return s(e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:l.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:l.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:l.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:l.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=s({},this.numericRefinements);return i[e]=s({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&f(r.val,u(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return o(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:l.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:l.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:l.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:l.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:l.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:l.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:l.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:l.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:l.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&l.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var a,s,c=u(r),o=void 0!==(a=this.numericRefinements[e][t],s=c,i(a,(function(e){return f(e,s)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?o(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},6673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),l=e._getHierarchicalRootPath(n),f=e._getHierarchicalShowParentLevel(n),m=a(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,n,a){return function(u,h,l){var f=u;if(l>0){var m=0;for(f=u;m{"use strict";var n=r(8965),i=r(9110),a=r(2909),s=r(849),c=r(3917),o=r(7577),u=r(4728),h=r(8601),l=a.escapeFacetValue,f=a.unescapeFacetValue,m=r(6673);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function g(e,t,r){var a=t[0]||{};this._rawResults=t;var o=this;Object.keys(a).forEach((function(e){o[e]=a[e]}));var h=u({persistHierarchicalRootCount:!1},r);Object.keys(h).forEach((function(e){o[e]=h[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var l=e.getRefinedDisjunctiveFacets(),g=d(e.facets),v=d(e.disjunctiveFacets),y=1,R=a.facets||{};Object.keys(R).forEach((function(t){var r,n,i=R[t],u=(r=e.hierarchicalFacets,n=t,s(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(u){var h=u.attributes.indexOf(t),l=c(e.hierarchicalFacets,(function(e){return e.name===u.name}));o.hierarchicalFacets[l][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var f,m=-1!==e.disjunctiveFacets.indexOf(t),d=-1!==e.facets.indexOf(t);m&&(f=v[t],o.disjunctiveFacets[f]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(o.disjunctiveFacets[f],a.facets_stats,t)),d&&(f=g[t],o.facets[f]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(o.facets[f],a.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),l.forEach((function(r){var n=t[y],s=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(s).forEach((function(t){var r,l=s[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=u({},o.hierarchicalFacets[r][m].data,l)}else{r=v[t];var d=a.facets&&a.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},l,d),exhaustive:n.exhaustiveFacetsCount},p(o.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(f(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),y++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),l=c(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==l){var f={};if(s.length>0&&!o.persistHierarchicalRootCount){var m=s[0].split(a)[0];f[m]=o.hierarchicalFacets[h][l].data[m]}o.hierarchicalFacets[h][l].data=i(f,u,o.hierarchicalFacets[h][l].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=g[t];o.facets[n]={name:t,data:R[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=s(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=l(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=s(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=l(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var a=s(e.hierarchicalFacets,r);if(!a)return a;var c=e._state.getHierarchicalFacetByName(t),o=e._state._getHierarchicalFacetSeparator(c),u=f(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(c.rootPath)&&(u=u.replace(c.rootPath+o,""));var h=u.split(o);return h.unshift(t),y(a,h,0),a}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return R(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function F(e,t){var r=s(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var a=s(i,(function(e){return e.name===r})),c=a&&a.data&&a.data[n]?a.data[n]:0,o=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:o}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return s(this.facets,t)||s(this.disjunctiveFacets,t)||s(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var r=v(this,e);if(r){var n,a=i({},t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;if(Array.isArray(r))n=[e];else n=s._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(a.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(s,t);if(r)return function(e,t){var r=[],n=[],i=t.hide||[],a=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name,s=i.indexOf(t)>-1;s||void 0===a[t]?s||n.push(e):r[a[t]]=e})),r=r.filter((function(e){return e}));var s,c=t.sortRemainingBy;return"hidden"===c?r:(s="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,s[0],s[1])))}(e,r)}if(Array.isArray(a.sortBy)){var n=o(a.sortBy,g.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof a.sortBy)return function(e,t){return t.sort(e)}(a.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),c=r.split(a),o=s(n,(function(e){return e.name===t})),u=c.reduce((function(e,t){var r=e&&s(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),o),h=u&&u.count||0,l=u&&u.exhaustive||!1,f=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:f,count:h,exhaustive:l}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=g},6571:(e,t,r)=>{"use strict";var n=r(2733),i=r(6732),a=r(2909).escapeFacetValue,s=r(3014),c=r(4728),o=r(317),u=r(1383),h=r(9127),l=r(2223),f=r(9228),m=r(3371),d=r(7691),p=r(7749),g=r(6938);function v(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.setClient(e);var i=r||{};i.index=t,this.state=m.make(i),this.recommendState=new h({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}function y(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function R(){return this.state.page}s(v,n),v.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},v.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},v.prototype.recommend=function(){return this._recommend(),this},v.prototype.getQuery=function(){var e=this.state;return f._getHitsSearchParams(e)},v.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=f._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new d(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new d(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},v.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(f._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var s=this.client.initIndex(n.index);if("function"!=typeof s.findAnswers)throw new Error(a);return s.findAnswers(n.query,e.queryLanguages,i)},v.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,s="function"==typeof this.client.initIndex;if(!i&&!s&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),o=c.isDisjunctiveFacet(e),u=f.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,l=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:u}]):s?h=this.client.initIndex(c.index).searchForFacetValues(u):(delete u.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=a(t.value),t.isRefined=o?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),e}))},v.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},v.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},v.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},v.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},v.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},v.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},v.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},v.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},v.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},v.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},v.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},v.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},v.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},v.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},v.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},v.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},v.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},v.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},v.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},v.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},v.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},v.prototype.setCurrentPage=y,v.prototype.setPage=y,v.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},v.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},v.prototype.setState=function(e){return this._change({state:m.make(e),isPageReset:!1}),this},v.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new m(e),this},v.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},v.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},v.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},v.prototype.hasTag=function(e){return this.state.isTagRefined(e)},v.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},v.prototype.getIndex=function(){return this.state.index},v.prototype.getCurrentPage=R,v.prototype.getPage=R,v.prototype.getTags=function(){return this.state.tagRefinements},v.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},v.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},v.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},v.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=f._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?f._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(c){this.emit("error",{error:c})}},v.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}],i=t.params.map((function(e){return e.$$id}));this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var a=this._recommendCache,s=this.derivedHelpers.map((function(t){var r=t.getModifiedState(e).index;if(!r)return[];var s=t.getModifiedRecommendState(new h);return n.push({state:s,index:r,helper:t}),i=Array.prototype.concat.apply(i,s.params.map((function(e){return e.$$id}))),t.emit("fetch",{recommend:{state:s,results:t.lastRecommendResults}}),s._buildQueries(r,a)})),c=Array.prototype.concat.apply(this.recommendState._buildQueries(r,a),s);if(0!==c.length)if(c.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var o=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(c).then(this._dispatchRecommendResponse.bind(this,o,n,i)).catch(this._dispatchRecommendError.bind(this,o))}catch(u){this.emit("error",{error:u})}}},v.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},v.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},v.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},v.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},v.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.client=e),this},v.prototype.getClient=function(){return this.client},v.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},v.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},v.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=v},8965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},9110:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},2909:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},849:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{e.exports=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}},7577:(e,t,r)=>{"use strict";var n=r(849);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),a=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},3014:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},4843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},4728:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},1383:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},8601:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},7507:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},9228:(e,t,r)=>{"use strict";var n=r(4728);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var o=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);o.forEach((function(n,s){var c=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===s);function u(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),l=o[s-1];c.facetFilters=s>0?h.concat(l.attribute+":"+l.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),o={};return t.length>0&&(o.facets=t.indexOf("*")>-1?["*"]:t),c.length>0&&(o.tagFilters=c),r.length>0&&(o.facetFilters=r),s.length>0&&(o.numericFilters=s),i(n({},e.getQueryParams(),o))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),o=a._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};o.length>0&&(u.tagFilters=o);var h=e.getHierarchicalFacetByName(t);return u.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(u.numericFilters=c),s.length>0&&(u.facetFilters=s),i(n({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).sort().forEach((function(e){(a[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,o,u=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(u),l=e._getHierarchicalRootPath(u);if(t===i){if(-1===a.indexOf(h)||!l&&!0===r||l&&l.split(h).length===a.split(h).length)return;l?(o=l.split(h).length-1,a=l):(o=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=u.attributes[o]}else o=a.split(h).length-1,s=u.attributes[o];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,o={facetQuery:t,facetName:e};return"number"==typeof r&&(o.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),o))}};e.exports=a},2208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},7749:(e,t,r)=>{"use strict";var n=r(849),i=r(8657);e.exports=function(e){var t={};return e.forEach((function(e){e.forEach((function(e,r){t[e.objectID]?t[e.objectID]={indexSum:t[e.objectID].indexSum+r,count:t[e.objectID].count+1}:t[e.objectID]={indexSum:r,count:1}}))})),function(e,t){var r=[];return Object.keys(e).forEach((function(n){e[n].count<2&&(e[n].indexSum+=100),r.push({objectID:n,avgOfIndices:e[n].indexSum/t})})),r.sort((function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1}))}(t,e.length).reduce((function(t,r){var a=n(i(e),(function(e){return e.objectID===r.objectID}));return a?t.concat(a):t}),[])}},6938:e=>{"use strict";e.exports="3.22.2"},3643:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return a()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function l(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,g=2,v=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function _(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===v&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function P(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),o=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),l=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),f=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .",transporterStackTrace:O(s)};var m={data:c,headers:o,method:u,url:x(h,n.path,l),connectTimeout:a(f,e.timeouts.connect),responseTimeout:a(f,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&f++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?v:g))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&!~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return _(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function j(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function x(e,t,r){var n=E(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function E(e){return Object.keys(e).map((function(t){return l("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var S=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===f.WithinHeaders?n:{}},queryParameters:function(){return e===f.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:f.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,o=e.userAgent,u=e.hosts,h=e.queryParameters,l={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:o,headers:e.headers,queryParameters:h,hosts:u.map((function(e){return R(e)})),read:function(e,t){var r=m(t,l.timeouts.read),n=function(){return P(l,l.hosts.filter((function(e){return!!(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:l.queryParameters,headers:l.headers}};return l.responsesCache.get(a,(function(){return l.requestsCache.get(a,(function(){return l.requestsCache.set(a,n()).then((function(e){return Promise.all([l.requestsCache.delete(a),e])}),(function(e){return Promise.all([l.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return l.responsesCache.set(a,e)}})},write:function(e,t){return P(l,l.hosts.filter((function(e){return!!(e.accept&d.Write)})),e,m(t,l.timeouts.write))}};return l}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},N=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},Q=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:E(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},H=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,o=n(a,["facetName","facetQuery"]);return N(e)(t.indexName,{methods:{searchForFacetValues:I}}).searchForFacetValues(s,c,r(r({},i),o))})))}},T=function(e){return function(t,r,n){return e.transporter.read({method:b,path:l("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:l("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},I=function(e){return function(t,r,n){return e.transporter.read({method:b,path:l("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},k=1,D=2,q=3,L=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{threshold:e.threshold||0})}));return e.transporter.read({method:b,path:"1/indexes/*/recommendations",data:{requests:i},cacheable:!0},n)}};function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return k>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return D>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:o(),requestsCache:o({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.24.0","-").concat(e)}),o()]}),userAgent:j("4.24.0").add({segment:"Browser",version:"lite"}),authMode:f.WithinQueryParameters};return S(r(r(r({},a),n),{},{methods:{search:Q,searchForFacetValues:H,multipleQueries:Q,multipleSearchForFacetValues:H,customRequest:A,initIndex:function(e){return function(t){return N(e)(t,{methods:{search:C,searchForFacetValues:I,findAnswers:T}})}},getRecommendations:L}}))}return V.version="4.24.0",V}()},6996:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(6540),i=r(53),a=r(3643),s=r.n(a),c=r(4103),o=r.n(c),u=r(5260),h=r(5489),l=r(8193),f=r(4586);const m=["zero","one","two","few","many","other"];function d(e){return m.filter((t=>e.includes(t)))}const p={locale:"en",pluralForms:d(["one","other"]),select:e=>1===e?"one":"other"};function g(){const{i18n:{currentLocale:e}}=(0,f.A)();return(0,n.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:d(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),p}}),[e])}function v(){const e=g();return{selectMessage:(t,r)=>function(e,t,r){const n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${n.length}: ${e}`);const i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}var y=r(4255),R=r(1252),F=r(9532),b=r(481),_=r(9024),P=r(4070),j=r(1312),x=r(1868);const E={searchQueryInput:"searchQueryInput_fOvw",searchVersionInput:"searchVersionInput_uwCD",searchResultsColumn:"searchResultsColumn_XAOM",algoliaLogo:"algoliaLogo_lMQB",algoliaLogoPathFill:"algoliaLogoPathFill_UGFK",searchResultItem:"searchResultItem_RfWM",searchResultItemHeading:"searchResultItemHeading_cu9x",searchResultItemPath:"searchResultItemPath_bRHw",searchResultItemSummary:"searchResultItemSummary_gq1k",searchQueryColumn:"searchQueryColumn_vJqv",searchVersionColumn:"searchVersionColumn_Afdn",searchLogoColumn:"searchLogoColumn_D3Uo",loadingSpinner:"loadingSpinner_bRrL","loading-spin":"loading-spin_kfRG",loader:"loader_Ubv2"};function O(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return n.createElement("div",{className:(0,i.A)("col","col--3","padding-left--none",E.searchVersionColumn)},r.map((e=>{let[i,a]=e;const s=r.length>1?`${i}: `:"";return n.createElement("select",{key:i,onChange:e=>t.setSearchVersion(i,e.target.value),defaultValue:t.searchVersions[i],className:E.searchVersionInput},a.versions.map(((e,t)=>n.createElement("option",{key:t,label:`${s}${e.label}`,value:e.name}))))})))}function w(){const{siteConfig:{themeConfig:e},i18n:{currentLocale:t}}=(0,f.A)(),{algolia:{appId:r,apiKey:a,indexName:c,externalUrlRegex:m}}=e,d=function(){const{selectMessage:e}=v();return t=>e(t,(0,j.T)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),p=function(){const e=(0,P.Gy)(),[t,r]=(0,n.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return{...e,[r]:n.versions[0].name}}),{}))),i=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:i,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),{searchQuery:g,setSearchQuery:_}=(0,y.n)(),w={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[S,A]=(0,n.useReducer)(((e,t)=>{switch(t.type){case"reset":return w;case"loading":return{...e,loading:!0};case"update":return g!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),w),N=s()(r,a),Q=o()(N,c,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});Q.on("result",(e=>{let{results:{query:t,hits:r,page:n,nbHits:i,nbPages:a}}=e;if(""===t||!Array.isArray(r))return void A({type:"reset"});const s=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),c=r.map((e=>{let{url:t,_highlightResult:{hierarchy:r},_snippetResult:n={}}=e;const i=new URL(t),a=Object.keys(r).map((e=>s(r[e].value)));return{title:a.pop(),url:(0,R.G)(m,i.href)?i.href:i.pathname+i.hash,summary:n.content?`${s(n.content.value)}...`:"",breadcrumbs:a}}));A({type:"update",value:{items:c,query:t,totalResults:i,totalPages:a,lastPage:n,hasMore:a>n+1,loading:!1}})}));const[H,T]=(0,n.useState)(null),C=(0,n.useRef)(0),I=(0,n.useRef)(l.A.canUseDOM&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&C.current>r&&A({type:"advance"}),C.current=r}),{threshold:1})),k=()=>g?(0,j.T)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:g}):(0,j.T)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),D=(0,F.qd)((function(e){void 0===e&&(e=0),Q.addDisjunctiveFacetRefinement("docusaurus_tag","default"),Q.addDisjunctiveFacetRefinement("language",t),Object.entries(p.searchVersions).forEach((e=>{let[t,r]=e;Q.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)})),Q.setQuery(g).setPage(e).search()}));return(0,n.useEffect)((()=>{if(!H)return;const e=I.current;return e?(e.observe(H),()=>e.unobserve(H)):()=>!0}),[H]),(0,n.useEffect)((()=>{A({type:"reset"}),g&&(A({type:"loading"}),setTimeout((()=>{D()}),300))}),[g,p.searchVersions,D]),(0,n.useEffect)((()=>{S.lastPage&&0!==S.lastPage&&D(S.lastPage)}),[D,S.lastPage]),n.createElement(x.A,null,n.createElement(u.A,null,n.createElement("title",null,(0,b.s)(k())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,k()),n.createElement("form",{className:"row",onSubmit:e=>e.preventDefault()},n.createElement("div",{className:(0,i.A)("col",E.searchQueryColumn,{"col--9":p.versioningEnabled,"col--12":!p.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:E.searchQueryInput,placeholder:(0,j.T)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,j.T)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>_(e.target.value),value:g,autoComplete:"off",autoFocus:!0})),p.versioningEnabled&&n.createElement(O,{docsSearchVersionsHelpers:p})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.A)("col","col--8",E.searchResultsColumn)},!!S.totalResults&&d(S.totalResults)),n.createElement("div",{className:(0,i.A)("col","col--4","text--right",E.searchLogoColumn)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,j.T)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:E.algoliaLogo},n.createElement("g",{fill:"none"},n.createElement("path",{className:E.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),S.items.length>0?n.createElement("main",null,S.items.map(((e,t)=>{let{title:r,url:a,summary:s,breadcrumbs:c}=e;return n.createElement("article",{key:t,className:E.searchResultItem},n.createElement("h2",{className:E.searchResultItemHeading},n.createElement(h.A,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.A)("breadcrumbs",E.searchResultItemPath)},c.map(((e,t)=>n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}}))))),s&&n.createElement("p",{className:E.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}}))}))):[g&&!S.loading&&n.createElement("p",{key:"no-results"},n.createElement(j.A,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!S.loading&&n.createElement("div",{key:"spinner",className:E.loadingSpinner})],S.hasMore&&n.createElement("div",{className:E.loader,ref:T},n.createElement(j.A,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function S(){return n.createElement(_.e3,{className:"search-page-wrapper"},n.createElement(w,null))}}}]); \ No newline at end of file +/*! For license information please see 1a4e3797.d6130a4b.js.LICENSE.txt */ +(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[2138],{2733:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,o,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(n(a))for(c=Array.prototype.slice.call(arguments,1),s=(u=a.slice()).length,o=0;o0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},4103:(e,t,r)=>{"use strict";var n=r(6571),i=r(9127),a=r(2223),s=r(3371),c=r(7691);function o(e,t,r,i){return new n(e,t,r,i)}o.version=r(6938),o.AlgoliaSearchHelper=n,o.SearchParameters=s,o.RecommendParameters=i,o.SearchResults=c,o.RecommendResults=a,e.exports=o},6732:(e,t,r)=>{"use strict";var n=r(2733);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(3014)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},9127:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice();return r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter((function(e){return void 0===t[e.$$id]})).map((function(t){var r=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete r.$$id,r}))}},e.exports=t},2223:e=>{"use strict";function t(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach((function(e){var n=e.$$id;r[n]=t[n],r._rawResults[n]=t[n]}))}t.prototype={constructor:t},e.exports=t},1673:(e,t,r)=>{"use strict";var n=r(9110),i=r(317),a=r(1383),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return a(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},3371:(e,t,r)=>{"use strict";var n=r(9110),i=r(849),a=r(4843),s=r(4728),c=r(317),o=r(1383),u=r(7507),h=r(2208),l=r(1673);function f(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return f(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return s(e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:l.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:l.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:l.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:l.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=s({},this.numericRefinements);return i[e]=s({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&f(r.val,u(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return o(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:l.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:l.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:l.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:l.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:l.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:l.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:l.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:l.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:l.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&l.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var a,s,c=u(r),o=void 0!==(a=this.numericRefinements[e][t],s=c,i(a,(function(e){return f(e,s)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?o(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},6673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),l=e._getHierarchicalRootPath(n),f=e._getHierarchicalShowParentLevel(n),m=a(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,n,a){return function(u,h,l){var f=u;if(l>0){var m=0;for(f=u;m{"use strict";var n=r(8965),i=r(9110),a=r(2909),s=r(849),c=r(3917),o=r(7577),u=r(4728),h=r(8601),l=a.escapeFacetValue,f=a.unescapeFacetValue,m=r(6673);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function g(e,t,r){var a=t[0]||{};this._rawResults=t;var o=this;Object.keys(a).forEach((function(e){o[e]=a[e]}));var h=u({persistHierarchicalRootCount:!1},r);Object.keys(h).forEach((function(e){o[e]=h[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var l=e.getRefinedDisjunctiveFacets(),g=d(e.facets),v=d(e.disjunctiveFacets),y=1,R=a.facets||{};Object.keys(R).forEach((function(t){var r,n,i=R[t],u=(r=e.hierarchicalFacets,n=t,s(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(u){var h=u.attributes.indexOf(t),l=c(e.hierarchicalFacets,(function(e){return e.name===u.name}));o.hierarchicalFacets[l][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var f,m=-1!==e.disjunctiveFacets.indexOf(t),d=-1!==e.facets.indexOf(t);m&&(f=v[t],o.disjunctiveFacets[f]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(o.disjunctiveFacets[f],a.facets_stats,t)),d&&(f=g[t],o.facets[f]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(o.facets[f],a.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),l.forEach((function(r){var n=t[y],s=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(s).forEach((function(t){var r,l=s[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=u({},o.hierarchicalFacets[r][m].data,l)}else{r=v[t];var d=a.facets&&a.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},l,d),exhaustive:n.exhaustiveFacetsCount},p(o.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(f(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),y++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),l=c(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==l){var f={};if(s.length>0&&!o.persistHierarchicalRootCount){var m=s[0].split(a)[0];f[m]=o.hierarchicalFacets[h][l].data[m]}o.hierarchicalFacets[h][l].data=i(f,u,o.hierarchicalFacets[h][l].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=g[t];o.facets[n]={name:t,data:R[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=s(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=l(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=s(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=l(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var a=s(e.hierarchicalFacets,r);if(!a)return a;var c=e._state.getHierarchicalFacetByName(t),o=e._state._getHierarchicalFacetSeparator(c),u=f(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(c.rootPath)&&(u=u.replace(c.rootPath+o,""));var h=u.split(o);return h.unshift(t),y(a,h,0),a}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return R(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function F(e,t){var r=s(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var a=s(i,(function(e){return e.name===r})),c=a&&a.data&&a.data[n]?a.data[n]:0,o=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:o}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return s(this.facets,t)||s(this.disjunctiveFacets,t)||s(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var r=v(this,e);if(r){var n,a=i({},t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;if(Array.isArray(r))n=[e];else n=s._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(a.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(s,t);if(r)return function(e,t){var r=[],n=[],i=t.hide||[],a=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name,s=i.indexOf(t)>-1;s||void 0===a[t]?s||n.push(e):r[a[t]]=e})),r=r.filter((function(e){return e}));var s,c=t.sortRemainingBy;return"hidden"===c?r:(s="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,s[0],s[1])))}(e,r)}if(Array.isArray(a.sortBy)){var n=o(a.sortBy,g.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof a.sortBy)return function(e,t){return t.sort(e)}(a.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),c=r.split(a),o=s(n,(function(e){return e.name===t})),u=c.reduce((function(e,t){var r=e&&s(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),o),h=u&&u.count||0,l=u&&u.exhaustive||!1,f=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:f,count:h,exhaustive:l}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=g},6571:(e,t,r)=>{"use strict";var n=r(2733),i=r(6732),a=r(2909).escapeFacetValue,s=r(3014),c=r(4728),o=r(317),u=r(1383),h=r(9127),l=r(2223),f=r(9228),m=r(3371),d=r(7691),p=r(7749),g=r(6938);function v(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.setClient(e);var i=r||{};i.index=t,this.state=m.make(i),this.recommendState=new h({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}function y(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function R(){return this.state.page}s(v,n),v.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},v.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},v.prototype.recommend=function(){return this._recommend(),this},v.prototype.getQuery=function(){var e=this.state;return f._getHitsSearchParams(e)},v.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=f._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new d(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new d(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},v.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(f._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var s=this.client.initIndex(n.index);if("function"!=typeof s.findAnswers)throw new Error(a);return s.findAnswers(n.query,e.queryLanguages,i)},v.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,s="function"==typeof this.client.initIndex;if(!i&&!s&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),o=c.isDisjunctiveFacet(e),u=f.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,l=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:u}]):s?h=this.client.initIndex(c.index).searchForFacetValues(u):(delete u.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=a(t.value),t.isRefined=o?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),e}))},v.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},v.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},v.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},v.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},v.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},v.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},v.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},v.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},v.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},v.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},v.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},v.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},v.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},v.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},v.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},v.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},v.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},v.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},v.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},v.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},v.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},v.prototype.setCurrentPage=y,v.prototype.setPage=y,v.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},v.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},v.prototype.setState=function(e){return this._change({state:m.make(e),isPageReset:!1}),this},v.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new m(e),this},v.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},v.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},v.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},v.prototype.hasTag=function(e){return this.state.isTagRefined(e)},v.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},v.prototype.getIndex=function(){return this.state.index},v.prototype.getCurrentPage=R,v.prototype.getPage=R,v.prototype.getTags=function(){return this.state.tagRefinements},v.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},v.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},v.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},v.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=f._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?f._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(c){this.emit("error",{error:c})}},v.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}],i=t.params.map((function(e){return e.$$id}));this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var a=this._recommendCache,s=this.derivedHelpers.map((function(t){var r=t.getModifiedState(e).index;if(!r)return[];var s=t.getModifiedRecommendState(new h);return n.push({state:s,index:r,helper:t}),i=Array.prototype.concat.apply(i,s.params.map((function(e){return e.$$id}))),t.emit("fetch",{recommend:{state:s,results:t.lastRecommendResults}}),s._buildQueries(r,a)})),c=Array.prototype.concat.apply(this.recommendState._buildQueries(r,a),s);if(0!==c.length)if(c.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var o=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(c).then(this._dispatchRecommendResponse.bind(this,o,n,i)).catch(this._dispatchRecommendError.bind(this,o))}catch(u){this.emit("error",{error:u})}}},v.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},v.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},v.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},v.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},v.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.client=e),this},v.prototype.getClient=function(){return this.client},v.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},v.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},v.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=v},8965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},9110:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},2909:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},849:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{e.exports=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}},7577:(e,t,r)=>{"use strict";var n=r(849);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),a=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},3014:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},4843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},4728:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},1383:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},8601:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},7507:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},9228:(e,t,r)=>{"use strict";var n=r(4728);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var o=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);o.forEach((function(n,s){var c=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===s);function u(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),l=o[s-1];s>0?c.facetFilters=h.concat(l.attribute+":"+l.value):h.length>0?c.facetFilters=h:delete c.facetFilters,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),o={};return t.length>0&&(o.facets=t.indexOf("*")>-1?["*"]:t),c.length>0&&(o.tagFilters=c),r.length>0&&(o.facetFilters=r),s.length>0&&(o.numericFilters=s),i(n({},e.getQueryParams(),o))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),o=a._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};o.length>0&&(u.tagFilters=o);var h=e.getHierarchicalFacetByName(t);return u.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(u.numericFilters=c),s.length>0&&(u.facetFilters=s),i(n({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).sort().forEach((function(e){(a[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,o,u=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(u),l=e._getHierarchicalRootPath(u);if(t===i){if(-1===a.indexOf(h)||!l&&!0===r||l&&l.split(h).length===a.split(h).length)return;l?(o=l.split(h).length-1,a=l):(o=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=u.attributes[o]}else o=a.split(h).length-1,s=u.attributes[o];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,o={facetQuery:t,facetName:e};return"number"==typeof r&&(o.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),o))}};e.exports=a},2208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},7749:(e,t,r)=>{"use strict";var n=r(849),i=r(8657);e.exports=function(e){var t={};return e.forEach((function(e){e.forEach((function(e,r){t[e.objectID]?t[e.objectID]={indexSum:t[e.objectID].indexSum+r,count:t[e.objectID].count+1}:t[e.objectID]={indexSum:r,count:1}}))})),function(e,t){var r=[];return Object.keys(e).forEach((function(n){e[n].count<2&&(e[n].indexSum+=100),r.push({objectID:n,avgOfIndices:e[n].indexSum/t})})),r.sort((function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1}))}(t,e.length).reduce((function(t,r){var a=n(i(e),(function(e){return e.objectID===r.objectID}));return a?t.concat(a):t}),[])}},6938:e=>{"use strict";e.exports="3.22.3"},3643:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return a()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function l(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,g=2,v=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function _(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===v&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function P(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),o=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),l=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),f=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .",transporterStackTrace:O(s)};var m={data:c,headers:o,method:u,url:x(h,n.path,l),connectTimeout:a(f,e.timeouts.connect),responseTimeout:a(f,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&f++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?v:g))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&!~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return _(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function j(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function x(e,t,r){var n=E(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function E(e){return Object.keys(e).map((function(t){return l("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var S=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===f.WithinHeaders?n:{}},queryParameters:function(){return e===f.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:f.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,o=e.userAgent,u=e.hosts,h=e.queryParameters,l={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:o,headers:e.headers,queryParameters:h,hosts:u.map((function(e){return R(e)})),read:function(e,t){var r=m(t,l.timeouts.read),n=function(){return P(l,l.hosts.filter((function(e){return!!(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:l.queryParameters,headers:l.headers}};return l.responsesCache.get(a,(function(){return l.requestsCache.get(a,(function(){return l.requestsCache.set(a,n()).then((function(e){return Promise.all([l.requestsCache.delete(a),e])}),(function(e){return Promise.all([l.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return l.responsesCache.set(a,e)}})},write:function(e,t){return P(l,l.hosts.filter((function(e){return!!(e.accept&d.Write)})),e,m(t,l.timeouts.write))}};return l}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},N=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},Q=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:E(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},H=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,o=n(a,["facetName","facetQuery"]);return N(e)(t.indexName,{methods:{searchForFacetValues:I}}).searchForFacetValues(s,c,r(r({},i),o))})))}},T=function(e){return function(t,r,n){return e.transporter.read({method:b,path:l("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:l("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},I=function(e){return function(t,r,n){return e.transporter.read({method:b,path:l("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},k=1,D=2,q=3,L=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{threshold:e.threshold||0})}));return e.transporter.read({method:b,path:"1/indexes/*/recommendations",data:{requests:i},cacheable:!0},n)}};function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return k>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return D>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:o(),requestsCache:o({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.24.0","-").concat(e)}),o()]}),userAgent:j("4.24.0").add({segment:"Browser",version:"lite"}),authMode:f.WithinQueryParameters};return S(r(r(r({},a),n),{},{methods:{search:Q,searchForFacetValues:H,multipleQueries:Q,multipleSearchForFacetValues:H,customRequest:A,initIndex:function(e){return function(t){return N(e)(t,{methods:{search:C,searchForFacetValues:I,findAnswers:T}})}},getRecommendations:L}}))}return V.version="4.24.0",V}()},6996:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(6540),i=r(53),a=r(3643),s=r.n(a),c=r(4103),o=r.n(c),u=r(5260),h=r(5489),l=r(8193),f=r(4586);const m=["zero","one","two","few","many","other"];function d(e){return m.filter((t=>e.includes(t)))}const p={locale:"en",pluralForms:d(["one","other"]),select:e=>1===e?"one":"other"};function g(){const{i18n:{currentLocale:e}}=(0,f.A)();return(0,n.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:d(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),p}}),[e])}function v(){const e=g();return{selectMessage:(t,r)=>function(e,t,r){const n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${n.length}: ${e}`);const i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}var y=r(4255),R=r(1252),F=r(9532),b=r(481),_=r(9024),P=r(4070),j=r(1312),x=r(8916);const E={searchQueryInput:"searchQueryInput_fOvw",searchVersionInput:"searchVersionInput_uwCD",searchResultsColumn:"searchResultsColumn_XAOM",algoliaLogo:"algoliaLogo_lMQB",algoliaLogoPathFill:"algoliaLogoPathFill_UGFK",searchResultItem:"searchResultItem_RfWM",searchResultItemHeading:"searchResultItemHeading_cu9x",searchResultItemPath:"searchResultItemPath_bRHw",searchResultItemSummary:"searchResultItemSummary_gq1k",searchQueryColumn:"searchQueryColumn_vJqv",searchVersionColumn:"searchVersionColumn_Afdn",searchLogoColumn:"searchLogoColumn_D3Uo",loadingSpinner:"loadingSpinner_bRrL","loading-spin":"loading-spin_kfRG",loader:"loader_Ubv2"};function O(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return n.createElement("div",{className:(0,i.A)("col","col--3","padding-left--none",E.searchVersionColumn)},r.map((e=>{let[i,a]=e;const s=r.length>1?`${i}: `:"";return n.createElement("select",{key:i,onChange:e=>t.setSearchVersion(i,e.target.value),defaultValue:t.searchVersions[i],className:E.searchVersionInput},a.versions.map(((e,t)=>n.createElement("option",{key:t,label:`${s}${e.label}`,value:e.name}))))})))}function w(){const{siteConfig:{themeConfig:e},i18n:{currentLocale:t}}=(0,f.A)(),{algolia:{appId:r,apiKey:a,indexName:c,externalUrlRegex:m}}=e,d=function(){const{selectMessage:e}=v();return t=>e(t,(0,j.T)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),p=function(){const e=(0,P.Gy)(),[t,r]=(0,n.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return{...e,[r]:n.versions[0].name}}),{}))),i=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:i,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),{searchQuery:g,setSearchQuery:_}=(0,y.n)(),w={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[S,A]=(0,n.useReducer)(((e,t)=>{switch(t.type){case"reset":return w;case"loading":return{...e,loading:!0};case"update":return g!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),w),N=s()(r,a),Q=o()(N,c,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});Q.on("result",(e=>{let{results:{query:t,hits:r,page:n,nbHits:i,nbPages:a}}=e;if(""===t||!Array.isArray(r))return void A({type:"reset"});const s=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),c=r.map((e=>{let{url:t,_highlightResult:{hierarchy:r},_snippetResult:n={}}=e;const i=new URL(t),a=Object.keys(r).map((e=>s(r[e].value)));return{title:a.pop(),url:(0,R.G)(m,i.href)?i.href:i.pathname+i.hash,summary:n.content?`${s(n.content.value)}...`:"",breadcrumbs:a}}));A({type:"update",value:{items:c,query:t,totalResults:i,totalPages:a,lastPage:n,hasMore:a>n+1,loading:!1}})}));const[H,T]=(0,n.useState)(null),C=(0,n.useRef)(0),I=(0,n.useRef)(l.A.canUseDOM&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&C.current>r&&A({type:"advance"}),C.current=r}),{threshold:1})),k=()=>g?(0,j.T)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:g}):(0,j.T)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),D=(0,F.qd)((function(e){void 0===e&&(e=0),Q.addDisjunctiveFacetRefinement("docusaurus_tag","default"),Q.addDisjunctiveFacetRefinement("language",t),Object.entries(p.searchVersions).forEach((e=>{let[t,r]=e;Q.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)})),Q.setQuery(g).setPage(e).search()}));return(0,n.useEffect)((()=>{if(!H)return;const e=I.current;return e?(e.observe(H),()=>e.unobserve(H)):()=>!0}),[H]),(0,n.useEffect)((()=>{A({type:"reset"}),g&&(A({type:"loading"}),setTimeout((()=>{D()}),300))}),[g,p.searchVersions,D]),(0,n.useEffect)((()=>{S.lastPage&&0!==S.lastPage&&D(S.lastPage)}),[D,S.lastPage]),n.createElement(x.A,null,n.createElement(u.A,null,n.createElement("title",null,(0,b.s)(k())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,k()),n.createElement("form",{className:"row",onSubmit:e=>e.preventDefault()},n.createElement("div",{className:(0,i.A)("col",E.searchQueryColumn,{"col--9":p.versioningEnabled,"col--12":!p.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:E.searchQueryInput,placeholder:(0,j.T)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,j.T)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>_(e.target.value),value:g,autoComplete:"off",autoFocus:!0})),p.versioningEnabled&&n.createElement(O,{docsSearchVersionsHelpers:p})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.A)("col","col--8",E.searchResultsColumn)},!!S.totalResults&&d(S.totalResults)),n.createElement("div",{className:(0,i.A)("col","col--4","text--right",E.searchLogoColumn)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,j.T)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:E.algoliaLogo},n.createElement("g",{fill:"none"},n.createElement("path",{className:E.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),S.items.length>0?n.createElement("main",null,S.items.map(((e,t)=>{let{title:r,url:a,summary:s,breadcrumbs:c}=e;return n.createElement("article",{key:t,className:E.searchResultItem},n.createElement("h2",{className:E.searchResultItemHeading},n.createElement(h.A,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.A)("breadcrumbs",E.searchResultItemPath)},c.map(((e,t)=>n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}}))))),s&&n.createElement("p",{className:E.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}}))}))):[g&&!S.loading&&n.createElement("p",{key:"no-results"},n.createElement(j.A,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!S.loading&&n.createElement("div",{key:"spinner",className:E.loadingSpinner})],S.hasMore&&n.createElement("div",{className:E.loader,ref:T},n.createElement(j.A,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function S(){return n.createElement(_.e3,{className:"search-page-wrapper"},n.createElement(w,null))}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.54295ca3.js.LICENSE.txt b/assets/js/1a4e3797.d6130a4b.js.LICENSE.txt similarity index 100% rename from assets/js/1a4e3797.54295ca3.js.LICENSE.txt rename to assets/js/1a4e3797.d6130a4b.js.LICENSE.txt diff --git a/assets/js/1bb76b7a.5c9babf6.js b/assets/js/1bb76b7a.505cb674.js similarity index 91% rename from assets/js/1bb76b7a.5c9babf6.js rename to assets/js/1bb76b7a.505cb674.js index d2efb22f..f04d607c 100644 --- a/assets/js/1bb76b7a.5c9babf6.js +++ b/assets/js/1bb76b7a.505cb674.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[2915],{5680:(e,a,n)=>{n.d(a,{xA:()=>p,yg:()=>d});var t=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function r(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=t.createContext({}),y=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},p=function(e){var a=y(e.components);return t.createElement(o.Provider,{value:a},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},m=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,r=e.originalType,o=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),c=y(n),m=s,d=c["".concat(o,".").concat(m)]||c[m]||u[m]||r;return n?t.createElement(d,l(l({ref:a},p),{},{components:n})):t.createElement(d,l({ref:a},p))}));function d(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var r=n.length,l=new Array(r);l[0]=m;var i={};for(var o in a)hasOwnProperty.call(a,o)&&(i[o]=a[o]);i.originalType=e,i[c]="string"==typeof e?e:s,l[1]=i;for(var y=2;y{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>y});var t=n(8168),s=(n(6540),n(5680));const r={id:"heap_analysis_src.ObjectUnboundGrowthAnalysis",title:"Class: ObjectUnboundGrowthAnalysis",sidebar_label:"ObjectUnboundGrowthAnalysis",custom_edit_url:null},l=void 0,i={unversionedId:"api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis",id:"api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis",title:"Class: ObjectUnboundGrowthAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ObjectUnboundGrowthAnalysis",title:"Class: ObjectUnboundGrowthAnalysis",sidebar_label:"ObjectUnboundGrowthAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ObjectSizeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis"},next:{title:"ShapeUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis"}},o={},y=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ObjectUnboundGrowthAnalysis()',id:"new-objectunboundgrowthanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotsInDirectory(directory, options?)',id:"analyzesnapshotsindirectorydirectory-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],p={toc:y},c="wrapper";function u(e){let{components:a,...n}=e;return(0,s.yg)(c,(0,t.A)({},p,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"ObjectUnboundGrowthAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-objectunboundgrowthanalysis"},(0,s.yg)("a",{id:"new objectunboundgrowthanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new ObjectUnboundGrowthAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotsindirectorydirectory-options"},(0,s.yg)("a",{id:"analyzesnapshotsindirectory"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotsInDirectory"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"directory"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a series of heap snapshot files"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"directory"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the directory holding a series of ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," files, all snapshot files will be loaded and analyzed in the alphanumerically ascending order of those snapshot file names."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory);\n// query analysis-specific and structured results\nconst shapes = analysis.getShapesWithUnboundGrowth();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L148"},"heap-analysis/src/BaseAnalysis.ts:148"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/ObjectUnboundGrowthAnalysis.ts#L33"},"heap-analysis/src/plugins/ObjectUnboundGrowthAnalysis.ts:33"))))))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[2915],{5680:(e,a,n)=>{n.d(a,{xA:()=>c,yg:()=>d});var t=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function r(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=t.createContext({}),y=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},c=function(e){var a=y(e.components);return t.createElement(o.Provider,{value:a},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},m=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,r=e.originalType,o=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=y(n),m=s,d=p["".concat(o,".").concat(m)]||p[m]||u[m]||r;return n?t.createElement(d,l(l({ref:a},c),{},{components:n})):t.createElement(d,l({ref:a},c))}));function d(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var r=n.length,l=new Array(r);l[0]=m;var i={};for(var o in a)hasOwnProperty.call(a,o)&&(i[o]=a[o]);i.originalType=e,i[p]="string"==typeof e?e:s,l[1]=i;for(var y=2;y{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>y});var t=n(8168),s=(n(6540),n(5680));const r={id:"heap_analysis_src.ObjectUnboundGrowthAnalysis",title:"Class: ObjectUnboundGrowthAnalysis",sidebar_label:"ObjectUnboundGrowthAnalysis",custom_edit_url:null},l=void 0,i={unversionedId:"api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis",id:"api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis",title:"Class: ObjectUnboundGrowthAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ObjectUnboundGrowthAnalysis",title:"Class: ObjectUnboundGrowthAnalysis",sidebar_label:"ObjectUnboundGrowthAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ObjectSizeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis"},next:{title:"ShapeUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis"}},o={},y=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ObjectUnboundGrowthAnalysis()',id:"new-objectunboundgrowthanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotsInDirectory(directory, options?)',id:"analyzesnapshotsindirectorydirectory-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],c={toc:y},p="wrapper";function u(e){let{components:a,...n}=e;return(0,s.yg)(p,(0,t.A)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"ObjectUnboundGrowthAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-objectunboundgrowthanalysis"},(0,s.yg)("a",{id:"new objectunboundgrowthanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new ObjectUnboundGrowthAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotsindirectorydirectory-options"},(0,s.yg)("a",{id:"analyzesnapshotsindirectory"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotsInDirectory"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"directory"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a series of heap snapshot files"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"directory"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the directory holding a series of ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," files, all snapshot files will be loaded and analyzed in the alphanumerically ascending order of those snapshot file names."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory);\n// query analysis-specific and structured results\nconst shapes = analysis.getShapesWithUnboundGrowth();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L148"},"heap-analysis/src/BaseAnalysis.ts:148"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/ObjectUnboundGrowthAnalysis.ts#L33"},"heap-analysis/src/plugins/ObjectUnboundGrowthAnalysis.ts:33"))))))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1be78505.6c1d1b54.js b/assets/js/1be78505.cc3d2b74.js similarity index 98% rename from assets/js/1be78505.6c1d1b54.js rename to assets/js/1be78505.cc3d2b74.js index e8a28120..8c1dca50 100644 --- a/assets/js/1be78505.6c1d1b54.js +++ b/assets/js/1be78505.cc3d2b74.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8714,1774],{8067:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ee});var a=n(6540),l=n(53),o=n(1754),r=n(2967),c=n(9024),i=n(7559),s=n(2252),d=n(6588),m=n(1868),u=n(1312),b=n(3104),p=n(5062);const h={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};function E(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,l]=(0,a.useState)(!1),o=(0,a.useRef)(!1),{startScroll:r,cancelScroll:c}=(0,b.gk)();return(0,b.Mq)(((e,n)=>{let{scrollY:a}=e;const r=n?.scrollY;r&&(o.current?o.current=!1:a>=r?(c(),l(!1)):a{e.location.hash&&(o.current=!0,l(!1))})),{shown:n,scrollToTop:()=>r(0)}}({threshold:300});return a.createElement("button",{"aria-label":(0,u.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,l.A)("clean-btn",i.G.common.backToTopButton,h.backToTopButton,e&&h.backToTopButtonShow),type:"button",onClick:t})}var f=n(6347),g=n(4581),v=n(6342),_=n(3465),C=n(8168);function k(e){return a.createElement("svg",(0,C.A)({width:"20",height:"20","aria-hidden":"true"},e),a.createElement("g",{fill:"#7a7a7a"},a.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),a.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}const A={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function S(e){let{onClick:t}=e;return a.createElement("button",{type:"button",title:(0,u.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,u.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,l.A)("button button--secondary button--outline",A.collapseSidebarButton),onClick:t},a.createElement(k,{className:A.collapseSidebarButtonIcon}))}var N=n(5041),T=n(9532);const I=Symbol("EmptyContext"),x=a.createContext(I);function y(e){let{children:t}=e;const[n,l]=(0,a.useState)(null),o=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:l})),[n]);return a.createElement(x.Provider,{value:o},t)}var B=n(9169),w=n(1422),L=n(5489),M=n(2303);function P(e){let{categoryLabel:t,onClick:n}=e;return a.createElement("button",{"aria-label":(0,u.T)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function H(e){let{item:t,onItemClick:n,activePath:r,level:c,index:s,...d}=e;const{items:m,label:u,collapsible:b,className:p,href:h}=t,{docs:{sidebar:{autoCollapseCategories:E}}}=(0,v.p)(),f=function(e){const t=(0,M.A)();return(0,a.useMemo)((()=>e.href?e.href:!t&&e.collapsible?(0,o._o)(e):void 0),[e,t])}(t),g=(0,o.w8)(t,r),_=(0,B.ys)(h,r),{collapsed:k,setCollapsed:A}=(0,w.u)({initialState:()=>!!b&&(!g&&t.collapsed)}),{expandedItem:S,setExpandedItem:N}=function(){const e=(0,a.useContext)(x);if(e===I)throw new T.dV("DocSidebarItemsExpandedStateProvider");return e}(),y=function(e){void 0===e&&(e=!k),N(e?null:s),A(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:l}=e;const o=(0,T.ZC)(t);(0,a.useEffect)((()=>{t&&!o&&n&&l(!1)}),[t,o,n,l])}({isActive:g,collapsed:k,updateCollapsed:y}),(0,a.useEffect)((()=>{b&&S&&S!==s&&E&&A(!0)}),[b,S,s,A,E]),a.createElement("li",{className:(0,l.A)(i.G.docs.docSidebarItemCategory,i.G.docs.docSidebarItemCategoryLevel(c),"menu__list-item",{"menu__list-item--collapsed":k},p)},a.createElement("div",{className:(0,l.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":_})},a.createElement(L.A,(0,C.A)({className:(0,l.A)("menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!h&&b,"menu__link--active":g}),onClick:b?e=>{n?.(t),h?y(!1):(e.preventDefault(),y())}:()=>{n?.(t)},"aria-current":_?"page":void 0,"aria-expanded":b?!k:void 0,href:b?f??"#":f},d),u),h&&b&&a.createElement(P,{categoryLabel:u,onClick:e=>{e.preventDefault(),y()}})),a.createElement(w.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:k},a.createElement(j,{items:m,tabIndex:k?-1:0,onItemClick:n,activePath:r,level:c+1})))}var G=n(6654),W=n(2523);const F={menuExternalLink:"menuExternalLink_NmtK"};function D(e){let{item:t,onItemClick:n,activePath:r,level:c,index:s,...d}=e;const{href:m,label:u,className:b}=t,p=(0,o.w8)(t,r),h=(0,G.A)(m);return a.createElement("li",{className:(0,l.A)(i.G.docs.docSidebarItemLink,i.G.docs.docSidebarItemLinkLevel(c),"menu__list-item",b),key:u},a.createElement(L.A,(0,C.A)({className:(0,l.A)("menu__link",!h&&F.menuExternalLink,{"menu__link--active":p}),"aria-current":p?"page":void 0,to:m},h&&{onClick:n?()=>n(t):void 0},d),u,!h&&a.createElement(W.A,null)))}const z={menuHtmlItem:"menuHtmlItem_M9Kj"};function R(e){let{item:t,level:n,index:o}=e;const{value:r,defaultStyle:c,className:s}=t;return a.createElement("li",{className:(0,l.A)(i.G.docs.docSidebarItemLink,i.G.docs.docSidebarItemLinkLevel(n),c&&[z.menuHtmlItem,"menu__list-item"],s),key:o,dangerouslySetInnerHTML:{__html:r}})}function U(e){let{item:t,...n}=e;switch(t.type){case"category":return a.createElement(H,(0,C.A)({item:t},n));case"html":return a.createElement(R,(0,C.A)({item:t},n));default:return a.createElement(D,(0,C.A)({item:t},n))}}function V(e){let{items:t,...n}=e;return a.createElement(y,null,t.map(((e,t)=>a.createElement(U,(0,C.A)({key:t,item:e,index:t},n)))))}const j=(0,a.memo)(V),K={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function q(e){let{path:t,sidebar:n,className:o}=e;const r=function(){const{isActive:e}=(0,N.Mj)(),[t,n]=(0,a.useState)(e);return(0,b.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return a.createElement("nav",{className:(0,l.A)("menu thin-scrollbar",K.menu,r&&K.menuWithAnnouncementBar,o)},a.createElement("ul",{className:(0,l.A)(i.G.docs.docSidebarMenu,"menu__list")},a.createElement(j,{items:n,activePath:t,level:1})))}const Y="sidebar_njMd",O="sidebarWithHideableNavbar_wUlq",X="sidebarHidden_VK0M",Z="sidebarLogo_isFc";function $(e){let{path:t,sidebar:n,onCollapse:o,isHidden:r}=e;const{navbar:{hideOnScroll:c},docs:{sidebar:{hideable:i}}}=(0,v.p)();return a.createElement("div",{className:(0,l.A)(Y,c&&O,r&&X)},c&&a.createElement(_.A,{tabIndex:-1,className:Z}),a.createElement(q,{path:t,sidebar:n}),i&&a.createElement(S,{onClick:o}))}const J=a.memo($);var Q=n(9876),ee=n(5600);const te=e=>{let{sidebar:t,path:n}=e;const o=(0,Q.M)();return a.createElement("ul",{className:(0,l.A)(i.G.docs.docSidebarMenu,"menu__list")},a.createElement(j,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&o.toggle(),"link"===e.type&&o.toggle()},level:1}))};function ne(e){return a.createElement(ee.GX,{component:te,props:e})}const ae=a.memo(ne);function le(e){const t=(0,g.l)(),n="desktop"===t||"ssr"===t,l="mobile"===t;return a.createElement(a.Fragment,null,n&&a.createElement(J,e),l&&a.createElement(ae,e))}const oe={expandButton:"expandButton_m80_",expandButtonIcon:"expandButtonIcon_BlDH"};function re(e){let{toggleSidebar:t}=e;return a.createElement("div",{className:oe.expandButton,title:(0,u.T)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,u.T)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t},a.createElement(k,{className:oe.expandButtonIcon}))}const ce={docSidebarContainer:"docSidebarContainer_b6E3",docSidebarContainerHidden:"docSidebarContainerHidden_b3ry"};function ie(e){let{children:t}=e;const n=(0,d.t)();return a.createElement(a.Fragment,{key:n?.name??"noSidebar"},t)}function se(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:o}=e;const{pathname:r}=(0,f.zy)(),[c,s]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{c&&s(!1),o((e=>!e))}),[o,c]);return a.createElement("aside",{className:(0,l.A)(i.G.docs.docSidebarContainer,ce.docSidebarContainer,n&&ce.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ce.docSidebarContainer)&&n&&s(!0)}},a.createElement(ie,null,a.createElement(le,{sidebar:t,path:r,onCollapse:d,isHidden:c})),c&&a.createElement(re,{toggleSidebar:d}))}const de={docMainContainer:"docMainContainer_gTbr",docMainContainerEnhanced:"docMainContainerEnhanced_Uz_u",docItemWrapperEnhanced:"docItemWrapperEnhanced_czyv"};function me(e){let{hiddenSidebarContainer:t,children:n}=e;const o=(0,d.t)();return a.createElement("main",{className:(0,l.A)(de.docMainContainer,(t||!o)&&de.docMainContainerEnhanced)},a.createElement("div",{className:(0,l.A)("container padding-top--md padding-bottom--lg",de.docItemWrapper,t&&de.docItemWrapperEnhanced)},n))}const ue={docPage:"docPage__5DB",docsWrapper:"docsWrapper_BCFX"};function be(e){let{children:t}=e;const n=(0,d.t)(),[l,o]=(0,a.useState)(!1);return a.createElement(m.A,{wrapperClassName:ue.docsWrapper},a.createElement(E,null),a.createElement("div",{className:ue.docPage},n&&a.createElement(se,{sidebar:n.items,hiddenSidebarContainer:l,setHiddenSidebarContainer:o}),a.createElement(me,{hiddenSidebarContainer:l},t)))}var pe=n(1774),he=n(1463);function Ee(e){const{versionMetadata:t}=e,n=(0,o.mz)(e);if(!n)return a.createElement(pe.default,null);const{docElement:m,sidebarName:u,sidebarItems:b}=n;return a.createElement(a.Fragment,null,a.createElement(he.A,{version:t.version,tag:(0,r.tU)(t.pluginId,t.version)}),a.createElement(c.e3,{className:(0,l.A)(i.G.wrapper.docsPages,i.G.page.docsDocPage,e.versionMetadata.className)},a.createElement(s.n,{version:t},a.createElement(d.V,{name:u,items:b},a.createElement(be,null,m)))))}},1774:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var a=n(6540),l=n(1312),o=n(9024),r=n(1868);function c(){return a.createElement(a.Fragment,null,a.createElement(o.be,{title:(0,l.T)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.A,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.A,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}},2252:(e,t,n)=>{n.d(t,{n:()=>r,r:()=>c});var a=n(6540),l=n(9532);const o=a.createContext(null);function r(e){let{children:t,version:n}=e;return a.createElement(o.Provider,{value:n},t)}function c(){const e=(0,a.useContext)(o);if(null===e)throw new l.dV("DocsVersionProvider");return e}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8714,1774],{8067:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ee});var a=n(6540),l=n(53),o=n(1754),r=n(2967),c=n(9024),i=n(7559),s=n(2252),d=n(6588),m=n(8916),u=n(1312),b=n(3104),p=n(5062);const h={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};function E(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,l]=(0,a.useState)(!1),o=(0,a.useRef)(!1),{startScroll:r,cancelScroll:c}=(0,b.gk)();return(0,b.Mq)(((e,n)=>{let{scrollY:a}=e;const r=n?.scrollY;r&&(o.current?o.current=!1:a>=r?(c(),l(!1)):a{e.location.hash&&(o.current=!0,l(!1))})),{shown:n,scrollToTop:()=>r(0)}}({threshold:300});return a.createElement("button",{"aria-label":(0,u.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,l.A)("clean-btn",i.G.common.backToTopButton,h.backToTopButton,e&&h.backToTopButtonShow),type:"button",onClick:t})}var f=n(6347),g=n(4581),v=n(6342),_=n(3465),C=n(8168);function k(e){return a.createElement("svg",(0,C.A)({width:"20",height:"20","aria-hidden":"true"},e),a.createElement("g",{fill:"#7a7a7a"},a.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),a.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}const A={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function S(e){let{onClick:t}=e;return a.createElement("button",{type:"button",title:(0,u.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,u.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,l.A)("button button--secondary button--outline",A.collapseSidebarButton),onClick:t},a.createElement(k,{className:A.collapseSidebarButtonIcon}))}var N=n(5041),T=n(9532);const I=Symbol("EmptyContext"),x=a.createContext(I);function y(e){let{children:t}=e;const[n,l]=(0,a.useState)(null),o=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:l})),[n]);return a.createElement(x.Provider,{value:o},t)}var B=n(9169),w=n(1422),L=n(5489),M=n(2303);function P(e){let{categoryLabel:t,onClick:n}=e;return a.createElement("button",{"aria-label":(0,u.T)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function H(e){let{item:t,onItemClick:n,activePath:r,level:c,index:s,...d}=e;const{items:m,label:u,collapsible:b,className:p,href:h}=t,{docs:{sidebar:{autoCollapseCategories:E}}}=(0,v.p)(),f=function(e){const t=(0,M.A)();return(0,a.useMemo)((()=>e.href?e.href:!t&&e.collapsible?(0,o._o)(e):void 0),[e,t])}(t),g=(0,o.w8)(t,r),_=(0,B.ys)(h,r),{collapsed:k,setCollapsed:A}=(0,w.u)({initialState:()=>!!b&&(!g&&t.collapsed)}),{expandedItem:S,setExpandedItem:N}=function(){const e=(0,a.useContext)(x);if(e===I)throw new T.dV("DocSidebarItemsExpandedStateProvider");return e}(),y=function(e){void 0===e&&(e=!k),N(e?null:s),A(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:l}=e;const o=(0,T.ZC)(t);(0,a.useEffect)((()=>{t&&!o&&n&&l(!1)}),[t,o,n,l])}({isActive:g,collapsed:k,updateCollapsed:y}),(0,a.useEffect)((()=>{b&&S&&S!==s&&E&&A(!0)}),[b,S,s,A,E]),a.createElement("li",{className:(0,l.A)(i.G.docs.docSidebarItemCategory,i.G.docs.docSidebarItemCategoryLevel(c),"menu__list-item",{"menu__list-item--collapsed":k},p)},a.createElement("div",{className:(0,l.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":_})},a.createElement(L.A,(0,C.A)({className:(0,l.A)("menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!h&&b,"menu__link--active":g}),onClick:b?e=>{n?.(t),h?y(!1):(e.preventDefault(),y())}:()=>{n?.(t)},"aria-current":_?"page":void 0,"aria-expanded":b?!k:void 0,href:b?f??"#":f},d),u),h&&b&&a.createElement(P,{categoryLabel:u,onClick:e=>{e.preventDefault(),y()}})),a.createElement(w.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:k},a.createElement(j,{items:m,tabIndex:k?-1:0,onItemClick:n,activePath:r,level:c+1})))}var G=n(6654),W=n(2523);const F={menuExternalLink:"menuExternalLink_NmtK"};function D(e){let{item:t,onItemClick:n,activePath:r,level:c,index:s,...d}=e;const{href:m,label:u,className:b}=t,p=(0,o.w8)(t,r),h=(0,G.A)(m);return a.createElement("li",{className:(0,l.A)(i.G.docs.docSidebarItemLink,i.G.docs.docSidebarItemLinkLevel(c),"menu__list-item",b),key:u},a.createElement(L.A,(0,C.A)({className:(0,l.A)("menu__link",!h&&F.menuExternalLink,{"menu__link--active":p}),"aria-current":p?"page":void 0,to:m},h&&{onClick:n?()=>n(t):void 0},d),u,!h&&a.createElement(W.A,null)))}const z={menuHtmlItem:"menuHtmlItem_M9Kj"};function R(e){let{item:t,level:n,index:o}=e;const{value:r,defaultStyle:c,className:s}=t;return a.createElement("li",{className:(0,l.A)(i.G.docs.docSidebarItemLink,i.G.docs.docSidebarItemLinkLevel(n),c&&[z.menuHtmlItem,"menu__list-item"],s),key:o,dangerouslySetInnerHTML:{__html:r}})}function U(e){let{item:t,...n}=e;switch(t.type){case"category":return a.createElement(H,(0,C.A)({item:t},n));case"html":return a.createElement(R,(0,C.A)({item:t},n));default:return a.createElement(D,(0,C.A)({item:t},n))}}function V(e){let{items:t,...n}=e;return a.createElement(y,null,t.map(((e,t)=>a.createElement(U,(0,C.A)({key:t,item:e,index:t},n)))))}const j=(0,a.memo)(V),K={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function q(e){let{path:t,sidebar:n,className:o}=e;const r=function(){const{isActive:e}=(0,N.Mj)(),[t,n]=(0,a.useState)(e);return(0,b.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return a.createElement("nav",{className:(0,l.A)("menu thin-scrollbar",K.menu,r&&K.menuWithAnnouncementBar,o)},a.createElement("ul",{className:(0,l.A)(i.G.docs.docSidebarMenu,"menu__list")},a.createElement(j,{items:n,activePath:t,level:1})))}const Y="sidebar_njMd",O="sidebarWithHideableNavbar_wUlq",X="sidebarHidden_VK0M",Z="sidebarLogo_isFc";function $(e){let{path:t,sidebar:n,onCollapse:o,isHidden:r}=e;const{navbar:{hideOnScroll:c},docs:{sidebar:{hideable:i}}}=(0,v.p)();return a.createElement("div",{className:(0,l.A)(Y,c&&O,r&&X)},c&&a.createElement(_.A,{tabIndex:-1,className:Z}),a.createElement(q,{path:t,sidebar:n}),i&&a.createElement(S,{onClick:o}))}const J=a.memo($);var Q=n(9876),ee=n(5600);const te=e=>{let{sidebar:t,path:n}=e;const o=(0,Q.M)();return a.createElement("ul",{className:(0,l.A)(i.G.docs.docSidebarMenu,"menu__list")},a.createElement(j,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&o.toggle(),"link"===e.type&&o.toggle()},level:1}))};function ne(e){return a.createElement(ee.GX,{component:te,props:e})}const ae=a.memo(ne);function le(e){const t=(0,g.l)(),n="desktop"===t||"ssr"===t,l="mobile"===t;return a.createElement(a.Fragment,null,n&&a.createElement(J,e),l&&a.createElement(ae,e))}const oe={expandButton:"expandButton_m80_",expandButtonIcon:"expandButtonIcon_BlDH"};function re(e){let{toggleSidebar:t}=e;return a.createElement("div",{className:oe.expandButton,title:(0,u.T)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,u.T)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t},a.createElement(k,{className:oe.expandButtonIcon}))}const ce={docSidebarContainer:"docSidebarContainer_b6E3",docSidebarContainerHidden:"docSidebarContainerHidden_b3ry"};function ie(e){let{children:t}=e;const n=(0,d.t)();return a.createElement(a.Fragment,{key:n?.name??"noSidebar"},t)}function se(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:o}=e;const{pathname:r}=(0,f.zy)(),[c,s]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{c&&s(!1),o((e=>!e))}),[o,c]);return a.createElement("aside",{className:(0,l.A)(i.G.docs.docSidebarContainer,ce.docSidebarContainer,n&&ce.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ce.docSidebarContainer)&&n&&s(!0)}},a.createElement(ie,null,a.createElement(le,{sidebar:t,path:r,onCollapse:d,isHidden:c})),c&&a.createElement(re,{toggleSidebar:d}))}const de={docMainContainer:"docMainContainer_gTbr",docMainContainerEnhanced:"docMainContainerEnhanced_Uz_u",docItemWrapperEnhanced:"docItemWrapperEnhanced_czyv"};function me(e){let{hiddenSidebarContainer:t,children:n}=e;const o=(0,d.t)();return a.createElement("main",{className:(0,l.A)(de.docMainContainer,(t||!o)&&de.docMainContainerEnhanced)},a.createElement("div",{className:(0,l.A)("container padding-top--md padding-bottom--lg",de.docItemWrapper,t&&de.docItemWrapperEnhanced)},n))}const ue={docPage:"docPage__5DB",docsWrapper:"docsWrapper_BCFX"};function be(e){let{children:t}=e;const n=(0,d.t)(),[l,o]=(0,a.useState)(!1);return a.createElement(m.A,{wrapperClassName:ue.docsWrapper},a.createElement(E,null),a.createElement("div",{className:ue.docPage},n&&a.createElement(se,{sidebar:n.items,hiddenSidebarContainer:l,setHiddenSidebarContainer:o}),a.createElement(me,{hiddenSidebarContainer:l},t)))}var pe=n(1774),he=n(1463);function Ee(e){const{versionMetadata:t}=e,n=(0,o.mz)(e);if(!n)return a.createElement(pe.default,null);const{docElement:m,sidebarName:u,sidebarItems:b}=n;return a.createElement(a.Fragment,null,a.createElement(he.A,{version:t.version,tag:(0,r.tU)(t.pluginId,t.version)}),a.createElement(c.e3,{className:(0,l.A)(i.G.wrapper.docsPages,i.G.page.docsDocPage,e.versionMetadata.className)},a.createElement(s.n,{version:t},a.createElement(d.V,{name:u,items:b},a.createElement(be,null,m)))))}},1774:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var a=n(6540),l=n(1312),o=n(9024),r=n(8916);function c(){return a.createElement(a.Fragment,null,a.createElement(o.be,{title:(0,l.T)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.A,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.A,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}},2252:(e,t,n)=>{n.d(t,{n:()=>r,r:()=>c});var a=n(6540),l=n(9532);const o=a.createContext(null);function r(e){let{children:t,version:n}=e;return a.createElement(o.Provider,{value:n},t)}function c(){const e=(0,a.useContext)(o);if(null===e)throw new l.dV("DocsVersionProvider");return e}}}]); \ No newline at end of file diff --git a/assets/js/1df93b7f.1f7608cc.js b/assets/js/1df93b7f.1b4a5d7b.js similarity index 99% rename from assets/js/1df93b7f.1f7608cc.js rename to assets/js/1df93b7f.1b4a5d7b.js index 334ba019..156db5ab 100644 --- a/assets/js/1df93b7f.1f7608cc.js +++ b/assets/js/1df93b7f.1b4a5d7b.js @@ -1 +1 @@ -(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[4583],{490:(t,e,m)=>{(function(){"use strict";var e=this.document;function m(){this._events=this._events||{}}m.prototype.addListener=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},m.prototype.on=m.prototype.addListener,m.prototype.removeListener=function(t,e){if(this._events[t])for(var m=this._events[t],n=m.length;n--;)if(m[n]===e||m[n].listener===e)return void m.splice(n,1)},m.prototype.off=m.prototype.removeListener,m.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},m.prototype.once=function(t,e){function m(){var n=Array.prototype.slice.call(arguments);return this.removeListener(t,m),e.apply(this,n)}return m.listener=e,this.on(t,m)},m.prototype.emit=function(t){if(this._events[t])for(var e=Array.prototype.slice.call(arguments,1),m=this._events[t],n=m.length,i=0;i>16&255,t>>8&255,255&t]);return e}(),n.defaults={colors:n.colors,convertEol:!1,termName:"xterm",geometry:[80,24],cursorBlink:!0,visualBell:!1,popOnBell:!1,scrollback:1e3,screenKeys:!1,debug:!1,useStyle:!1},n.options={},d(u(n.defaults),(function(t){n[t]=n.defaults[t],n.options[t]=n.defaults[t]})),n.focus=null,n.prototype.focus=function(){n.focus!==this&&(n.focus&&n.focus.blur(),this.sendFocus&&this.send("\x1b[I"),this.showCursor(),n.focus=this)},n.prototype.blur=function(){n.focus===this&&(this.cursorState=0,this.refresh(this.y,this.y),this.sendFocus&&this.send("\x1b[O"),n.focus=null)},n.prototype.initGlobal=function(){var t=this.document;n._boundDocs=n._boundDocs||[],~function(t,e){var m=t.length;for(;m--;)if(t[m]===e)return m;return-1}(n._boundDocs,t)||(n._boundDocs.push(t),n.bindPaste(t),n.bindKeys(t),n.bindCopy(t),this.isIpad&&n.fixIpad(t),this.useStyle&&n.insertStyle(t,this.colors[256],this.colors[257]))},n.bindPaste=function(t){i(t.defaultView,"paste",(function(t){var e=n.focus;if(e)return t.clipboardData?e.send(t.clipboardData.getData("text/plain")):e.context.clipboardData&&e.send(e.context.clipboardData.getData("Text")),e.element.contentEditable="inherit",s(t)}))},n.bindKeys=function(t){i(t,"keydown",(function(t){if(n.focus){var e=t.target||t.srcElement;if(e)return e===n.focus.element||e===n.focus.context||e===n.focus.document||e===n.focus.body||e===n._textarea||e===n.focus.parent?n.focus.keyDown(t):void 0}}),!0),i(t,"keypress",(function(t){if(n.focus){var e=t.target||t.srcElement;if(e)return e===n.focus.element||e===n.focus.context||e===n.focus.document||e===n.focus.body||e===n._textarea||e===n.focus.parent?n.focus.keyPress(t):void 0}}),!0),i(t,"mousedown",(function(t){if(n.focus){var e=t.target||t.srcElement;if(e){do{if(e===n.focus.element)return}while(e=e.parentNode);n.focus.blur()}}}))},n.bindCopy=function(t){i(t.defaultView,"copy",(function(t){var e=n.focus;if(e&&e._selected){var m=e.getCopyTextarea(),i=e.grabText(e._selected.x1,e._selected.x2,e._selected.y1,e._selected.y2);e.emit("copy",i),m.focus(),m.textContent=i,m.value=i,m.setSelectionRange(0,i.length),a((function(){e.element.focus(),e.focus()}),1)}}))},n.fixIpad=function(t){var e=t.createElement("textarea");e.style.position="absolute",e.style.left="-32000px",e.style.top="-32000px",e.style.width="0px",e.style.height="0px",e.style.opacity="0",e.style.backgroundColor="transparent",e.style.borderStyle="none",e.style.outlineStyle="none",t.getElementsByTagName("body")[0].appendChild(e),n._textarea=e,a((function(){e.focus()}),1e3)},n.insertStyle=function(t,e,m){if(!(n=t.getElementById("term-style"))){var n,i=t.getElementsByTagName("head")[0];if(i)(n=t.createElement("style")).id="term-style",n.innerHTML=".terminal {\n float: left;\n border: "+e+' solid 5px;\n font-family: "DejaVu Sans Mono", "Liberation Mono", monospace;\n font-size: 11px;\n color: '+m+";\n background: "+e+";\n}\n\n.terminal-cursor {\n color: "+e+";\n background: "+m+";\n}\n",i.insertBefore(n,i.firstChild)}},n.prototype.open=function(t){var e,m=this,o=0;if(this.parent=t||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");for(this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.getElementsByTagName("body")[0],this.context.navigator&&this.context.navigator.userAgent&&(this.isMac=!!~this.context.navigator.userAgent.indexOf("Mac"),this.isIpad=!!~this.context.navigator.userAgent.indexOf("iPad"),this.isMSIE=!!~this.context.navigator.userAgent.indexOf("MSIE")),this.element=this.document.createElement("div"),this.element.className="terminal",this.element.style.outline="none",this.element.setAttribute("tabindex",0),this.element.style.backgroundColor=this.colors[256],this.element.style.color=this.colors[257],this.children=[];o0?64:65}n=t.shiftKey?4:0,i=t.metaKey?8:0,o=t.ctrlKey?16:0,s=n|i|o,e.vt200Mouse?s&=o:e.normalMouse||(s=0);return m=32+(s<<2)+m,m}(t),i=p(t))switch(l(n,i),t.type){case"mousedown":m=n;break;case"mouseup":m=32}}function a(t){var e,n=m;(e=p(t))&&l(n+=32,e)}function h(t,m){if(e.utfMouse){if(2047===m)return t.push(0);m<127?t.push(m):(m>2047&&(m=2047),t.push(192|m>>6),t.push(128|63&m))}else{if(255===m)return t.push(0);m>127&&(m=127),t.push(m)}}function l(t,m){if(e.vt300Mouse){t&=3,m.x-=32,m.y-=32;var n="\x1b[24";if(0===t)n+="1";else if(1===t)n+="3";else if(2===t)n+="5";else{if(3===t)return;n+="0"}return n+="~["+m.x+","+m.y+"]\r",void e.send(n)}return e.decLocator?(t&=3,m.x-=32,m.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void e.send("\x1b["+t+";"+(3===t?4:0)+";"+m.y+";"+m.x+";"+(m.page||0)+"&w")):e.urxvtMouse?(m.x-=32,m.y-=32,m.x++,m.y++,void e.send("\x1b["+t+";"+m.x+";"+m.y+"M")):e.sgrMouse?(m.x-=32,m.y-=32,void e.send("\x1b[<"+(3&~t?t:-4&t)+";"+m.x+";"+m.y+(3&~t?"M":"m"))):(h(n=[],t),h(n,m.x),h(n,m.y),void e.send("\x1b[M"+r.fromCharCode.apply(r,n)))}function p(t){var m,i,o,s,c;if(null!=t.pageX){for(m=t.pageX,i=t.pageY,c=e.element;c&&c!==e.document.documentElement;)m-=c.offsetLeft,i-=c.offsetTop,c="offsetParent"in c?c.offsetParent:c.parentNode;return o=e.element.clientWidth,s=e.element.clientHeight,m=Math.round(m/o*e.cols),i=Math.round(i/s*e.rows),m<0&&(m=0),m>e.cols&&(m=e.cols),i<0&&(i=0),i>e.rows&&(i=e.rows),{x:m+=32,y:i+=32,type:t.type===n?"mousewheel":t.type}}}i(t,"mousedown",(function(t){if(e.mouseEvents)return c(t),e.focus(),e.vt200Mouse?(c({__proto__:t,type:"mouseup"}),s(t)):(e.normalMouse&&i(e.document,"mousemove",a),e.x10Mouse||i(e.document,"mouseup",(function t(m){return c(m),e.normalMouse&&o(e.document,"mousemove",a),o(e.document,"mouseup",t),s(m)})),s(t))})),i(t,n,(function(t){if(e.mouseEvents&&!(e.x10Mouse||e.vt300Mouse||e.decLocator))return c(t),s(t)})),i(t,n,(function(t){if(!e.mouseEvents&&!e.applicationKeypad)return"DOMMouseScroll"===t.type?e.scrollDisp(t.detail<0?-5:5):e.scrollDisp(t.wheelDeltaY>0?-5:5),s(t)}))},n.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){},this.element.parentNode&&this.element.parentNode.removeChild(this.element)},n.prototype.refresh=function(t,e){var m,i,o,s,c,r,a,h,p,d,u,f,b,y;for(e-t>=this.rows/2&&(y=this.element.parentNode)&&y.removeChild(this.element),a=this.cols,i=t,e>=this.lines.length&&(this.log("`end` is too large. Most likely a bad CSR."),e=this.lines.length-1);i<=e;i++){for(b=i+this.ydisp,s=this.lines[b],c="",m=i!==this.y||!this.cursorState||this.ydisp!==this.ybase&&!this.selectMode||this.cursorHidden?-1:this.x,p=this.defAttr,o=0;o"),h!==this.defAttr&&(-1===h?c+='':(c+='>9&511,d=511&h,1&f&&d<8&&(d+=8)),16&f&&(c+="visibility:hidden;"),256!==u&&(c+="background-color:"+this.colors[u]+";"),257!==d&&(c+="color:"+this.colors[d]+";"),c+='">'))),r){case"&":c+="&";break;case"<":c+="<";break;case">":c+=">";break;default:r<=" "?c+=" ":(l(r)&&o++,c+=r)}p=h}p!==this.defAttr&&(c+=""),this.children[i].innerHTML=c}y&&y.appendChild(this.element)},n.prototype._cursorBlink=function(){n.focus===this&&(this.cursorState^=1,this.refresh(this.y,this.y))},n.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.y,this.y))},n.prototype.startBlink=function(){if(this.cursorBlink){var t=this;this._blinker=function(){t._cursorBlink()},this._blink=h(this._blinker,500)}},n.prototype.refreshBlink=function(){this.cursorBlink&&(clearInterval(this._blink),this._blink=h(this._blinker,500))},n.prototype.scroll=function(){var t;++this.ybase===this.scrollback&&(this.ybase=this.ybase/2|0,this.lines=this.lines.slice(1-(this.ybase+this.rows))),this.ydisp=this.ybase,t=this.ybase+this.rows-1,(t-=this.rows-1-this.scrollBottom)===this.lines.length?this.lines.push(this.blankLine()):this.lines.splice(t,0,this.blankLine()),0!==this.scrollTop&&(0!==this.ybase&&(this.ybase--,this.ydisp=this.ybase),this.lines.splice(this.ybase+this.scrollTop,1)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)},n.prototype.scrollDisp=function(t){this.ydisp+=t,this.ydisp>this.ybase?this.ydisp=this.ybase:this.ydisp<0&&(this.ydisp=0),this.refresh(0,this.rows-1)},n.prototype.write=function(t){var e,m,i,o=t.length,s=0;for(this.refreshStart=this.y,this.refreshEnd=this.y,this.ybase!==this.ydisp&&(this.ydisp=this.ybase,this.maxRange());sthis.scrollBottom&&(this.y--,this.scroll());break;case"\r":this.x=0;break;case"\b":this.x>0&&this.x--;break;case"\t":this.x=this.nextStop();break;case"\x0e":this.setgLevel(1);break;case"\x0f":this.setgLevel(0);break;case"\x1b":this.state=1;break;default:if(i>=" "&&(this.charset&&this.charset[i]&&(i=this.charset[i]),this.x>=this.cols&&(this.x=0,this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll())),this.lines[this.y+this.ybase][this.x]=[this.curAttr,i],this.x++,this.updateRange(this.y),l(i))){if(e=this.y+this.ybase,this.cols<2||this.x>=this.cols){this.lines[e][this.x-1]=[this.curAttr," "];break}this.lines[e][this.x]=[this.curAttr," "],this.x++}}break;case 1:switch(i){case"[":this.params=[],this.currentParam=0,this.state=2;break;case"]":this.params=[],this.currentParam=0,this.state=3;break;case"P":this.params=[],this.currentParam=0,this.state=5;break;case"_":case"^":this.state=6;break;case"c":this.reset();break;case"E":this.x=0;case"D":this.index();break;case"M":this.reverseIndex();break;case"%":this.setgLevel(0),this.setgCharset(0,n.charsets.US),this.state=0,s++;break;case"(":case")":case"*":case"+":case"-":case".":switch(i){case"(":this.gcharset=0;break;case")":case"-":this.gcharset=1;break;case"*":case".":this.gcharset=2;break;case"+":this.gcharset=3}this.state=4;break;case"/":this.gcharset=3,this.state=4,s--;break;case"N":case"O":break;case"n":this.setgLevel(2);break;case"o":case"|":this.setgLevel(3);break;case"}":this.setgLevel(2);break;case"~":this.setgLevel(1);break;case"7":this.saveCursor(),this.state=0;break;case"8":this.restoreCursor(),this.state=0;break;case"#":this.state=0,s++;break;case"H":this.tabSet();break;case"=":this.log("Serial port requested application keypad."),this.applicationKeypad=!0,this.state=0;break;case">":this.log("Switching back to normal keypad."),this.applicationKeypad=!1,this.state=0;break;default:this.state=0,this.error("Unknown ESC control: %s.",i)}break;case 4:switch(i){case"0":m=n.charsets.SCLD;break;case"A":m=n.charsets.UK;break;case"B":default:m=n.charsets.US;break;case"4":m=n.charsets.Dutch;break;case"C":case"5":m=n.charsets.Finnish;break;case"R":m=n.charsets.French;break;case"Q":m=n.charsets.FrenchCanadian;break;case"K":m=n.charsets.German;break;case"Y":m=n.charsets.Italian;break;case"E":case"6":m=n.charsets.NorwegianDanish;break;case"Z":m=n.charsets.Spanish;break;case"H":case"7":m=n.charsets.Swedish;break;case"=":m=n.charsets.Swiss;break;case"/":m=n.charsets.ISOLatin,s++}this.setgCharset(this.gcharset,m),this.gcharset=null,this.state=0;break;case 3:if("\x1b"===i||"\x07"===i){switch("\x1b"===i&&s++,this.params.push(this.currentParam),this.params[0]){case 0:case 1:case 2:this.params[1]&&(this.title=this.params[1],this.handleTitle(this.title))}this.params=[],this.currentParam=0,this.state=0}else this.params.length?this.currentParam+=i:i>="0"&&i<="9"?this.currentParam=10*this.currentParam+i.charCodeAt(0)-48:";"===i&&(this.params.push(this.currentParam),this.currentParam="");break;case 2:if("?"===i||">"===i||"!"===i){this.prefix=i;break}if(i>="0"&&i<="9"){this.currentParam=10*this.currentParam+i.charCodeAt(0)-48;break}if("$"===i||'"'===i||" "===i||"'"===i){this.postfix=i;break}if(this.params.push(this.currentParam),this.currentParam=0,";"===i)break;switch(this.state=0,i){case"A":this.cursorUp(this.params);break;case"B":this.cursorDown(this.params);break;case"C":this.cursorForward(this.params);break;case"D":this.cursorBackward(this.params);break;case"H":this.cursorPos(this.params);break;case"J":this.eraseInDisplay(this.params);break;case"K":this.eraseInLine(this.params);break;case"m":this.charAttributes(this.params);break;case"n":this.deviceStatus(this.params);break;case"@":this.insertChars(this.params);break;case"E":this.cursorNextLine(this.params);break;case"F":this.cursorPrecedingLine(this.params);break;case"G":this.cursorCharAbsolute(this.params);break;case"L":this.insertLines(this.params);break;case"M":this.deleteLines(this.params);break;case"P":this.deleteChars(this.params);break;case"X":this.eraseChars(this.params);break;case"`":this.charPosAbsolute(this.params);break;case"a":this.HPositionRelative(this.params);break;case"c":this.sendDeviceAttributes(this.params);break;case"d":this.linePosAbsolute(this.params);break;case"e":this.VPositionRelative(this.params);break;case"f":this.HVPosition(this.params);break;case"h":this.setMode(this.params);break;case"l":this.resetMode(this.params);break;case"r":this.setScrollRegion(this.params);break;case"s":this.saveCursor(this.params);break;case"u":this.restoreCursor(this.params);break;case"I":this.cursorForwardTab(this.params);break;case"S":this.scrollUp(this.params);break;case"T":this.params.length<2&&!this.prefix&&this.scrollDown(this.params);break;case"Z":this.cursorBackwardTab(this.params);break;case"b":this.repeatPrecedingCharacter(this.params);break;case"g":this.tabClear(this.params);break;case"p":if("!"===this.prefix)this.softReset(this.params);break;default:this.error("Unknown CSI code: %s.",i)}this.prefix="",this.postfix="";break;case 5:if("\x1b"===i||"\x07"===i){switch("\x1b"===i&&s++,this.prefix){case"":case"+p":break;case"$q":var c=!1;switch(r=this.currentParam){case'"q':r='0"q';break;case'"p':r='61"p';break;case"r":r=this.scrollTop+1+";"+(this.scrollBottom+1)+"r";break;case"m":r="0m";break;default:this.error("Unknown DCS Pt: %s.",r),r=""}this.send("\x1bP"+ +c+"$r"+r+"\x1b\\");break;case"+q":var r=this.currentParam;c=!1;this.send("\x1bP"+ +c+"+r"+r+"\x1b\\");break;default:this.error("Unknown DCS prefix: %s.",this.prefix)}this.currentParam=0,this.prefix="",this.state=0}else this.currentParam?this.currentParam+=i:this.prefix||"$"===i||"+"===i?2===this.prefix.length?this.currentParam=i:this.prefix+=i:this.currentParam=i;break;case 6:"\x1b"!==i&&"\x07"!==i||("\x1b"===i&&s++,this.state=0)}this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)},n.prototype.writeln=function(t){this.write(t+"\r\n")},n.prototype.keyDown=function(t){var e,m=this;switch(t.keyCode){case 8:if(t.shiftKey){e="\b";break}e="\x7f";break;case 9:if(t.shiftKey){e="\x1b[Z";break}e="\t";break;case 13:e="\r";break;case 27:e="\x1b";break;case 37:if(this.applicationCursor){e="\x1bOD";break}e="\x1b[D";break;case 39:if(this.applicationCursor){e="\x1bOC";break}e="\x1b[C";break;case 38:if(this.applicationCursor){e="\x1bOA";break}if(t.ctrlKey)return this.scrollDisp(-1),s(t);e="\x1b[A";break;case 40:if(this.applicationCursor){e="\x1bOB";break}if(t.ctrlKey)return this.scrollDisp(1),s(t);e="\x1b[B";break;case 46:e="\x1b[3~";break;case 45:e="\x1b[2~";break;case 36:if(this.applicationKeypad){e="\x1bOH";break}e="\x1bOH";break;case 35:if(this.applicationKeypad){e="\x1bOF";break}e="\x1bOF";break;case 33:if(t.shiftKey)return this.scrollDisp(-(this.rows-1)),s(t);e="\x1b[5~";break;case 34:if(t.shiftKey)return this.scrollDisp(this.rows-1),s(t);e="\x1b[6~";break;case 112:e="\x1bOP";break;case 113:e="\x1bOQ";break;case 114:e="\x1bOR";break;case 115:e="\x1bOS";break;case 116:e="\x1b[15~";break;case 117:e="\x1b[17~";break;case 118:e="\x1b[18~";break;case 119:e="\x1b[19~";break;case 120:e="\x1b[20~";break;case 121:e="\x1b[21~";break;case 122:e="\x1b[23~";break;case 123:e="\x1b[24~";break;default:if(t.ctrlKey)if(t.keyCode>=65&&t.keyCode<=90){if(this.screenKeys&&!this.prefixMode&&!this.selectMode&&65===t.keyCode)return this.enterPrefix(),s(t);if(this.prefixMode&&86===t.keyCode)return void this.leavePrefix();if((this.prefixMode||this.selectMode)&&67===t.keyCode)return void(this.visualMode&&a((function(){m.leaveVisual()}),1));e=r.fromCharCode(t.keyCode-64)}else 32===t.keyCode?e=r.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e=r.fromCharCode(t.keyCode-51+27):56===t.keyCode?e=r.fromCharCode(127):219===t.keyCode?e=r.fromCharCode(27):221===t.keyCode&&(e=r.fromCharCode(29));else(!this.isMac&&t.altKey||this.isMac&&t.metaKey)&&(t.keyCode>=65&&t.keyCode<=90?e="\x1b"+r.fromCharCode(t.keyCode+32):192===t.keyCode?e="\x1b`":t.keyCode>=48&&t.keyCode<=57&&(e="\x1b"+(t.keyCode-48)))}return!e||(this.prefixMode?(this.leavePrefix(),s(t)):this.selectMode?(this.keySelect(t,e),s(t)):(this.emit("keydown",t),this.emit("key",e,t),this.showCursor(),this.handler(e),s(t)))},n.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},n.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},n.prototype.keyPress=function(t){var e;if(s(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||t.ctrlKey||t.altKey||t.metaKey)&&(e=r.fromCharCode(e),this.prefixMode?(this.leavePrefix(),this.keyPrefix(t,e),!1):this.selectMode?(this.keySelect(t,e),!1):(this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!1))},n.prototype.send=function(t){var e=this;this.queue||a((function(){e.handler(e.queue),e.queue=""}),1),this.queue+=t},n.prototype.bell=function(){if(this.visualBell){var t=this;this.element.style.borderColor="white",a((function(){t.element.style.borderColor=""}),10),this.popOnBell&&this.focus()}},n.prototype.log=function(){if(this.debug&&this.context.console&&this.context.console.log){var t=Array.prototype.slice.call(arguments);this.context.console.log.apply(this.context.console,t)}},n.prototype.error=function(){if(this.debug&&this.context.console&&this.context.console.error){var t=Array.prototype.slice.call(arguments);this.context.console.error.apply(this.context.console,t)}},n.prototype.resize=function(t,e){var m,n,i,o,s;if(t<1&&(t=1),e<1&&(e=1),(o=this.cols)t)for(i=this.lines.length;i--;)for(;this.lines[i].length>t;)this.lines[i].pop();if(this.setupStops(o),this.cols=t,(o=this.rows)e)for(;o-- >e;)if(this.lines.length>e+this.ybase&&this.lines.pop(),this.children.length>e){if(!(n=this.children.pop()))continue;n.parentNode.removeChild(n)}this.rows=e,this.y>=e&&(this.y=e-1),this.x>=t&&(this.x=t-1),this.scrollTop=0,this.scrollBottom=e-1,this.refresh(0,this.rows-1),this.normal=null},n.prototype.updateRange=function(t){tthis.refreshEnd&&(this.refreshEnd=t)},n.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},n.prototype.setupStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t0;);return t>=this.cols?this.cols-1:t<0?0:t},n.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t=this.cols?this.cols-1:t<0?0:t},n.prototype.eraseRight=function(t,e){for(var m=this.lines[this.ybase+e],n=[this.eraseAttr()," "];tthis.scrollBottom&&(this.y--,this.scroll()),this.state=0},n.prototype.reverseIndex=function(){var t;this.y--,this.y=this.rows&&(this.y=this.rows-1)},n.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this.x+=e,this.x>=this.cols&&(this.x=this.cols-1)},n.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this.x-=e,this.x<0&&(this.x=0)},n.prototype.cursorPos=function(t){var e,m;e=t[0]-1,m=t.length>=2?t[1]-1:0,e<0?e=0:e>=this.rows&&(e=this.rows-1),m<0?m=0:m>=this.cols&&(m=this.cols-1),this.x=m,this.y=e},n.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this.eraseRight(this.x,this.y),e=this.y+1;e>18,o=this.curAttr>>9&511,s=511&this.curAttr;n=30&&e<=37?o=e-30:e>=40&&e<=47?s=e-40:e>=90&&e<=97?o=(e+=8)-90:e>=100&&e<=107?s=(e+=8)-100:0===e?(i=this.defAttr>>18,o=this.defAttr>>9&511,s=511&this.defAttr):1===e?i|=1:4===e?i|=2:5===e?i|=4:7===e?i|=8:8===e?i|=16:22===e?i&=-2:24===e?i&=-3:25===e?i&=-5:27===e?i&=-9:28===e?i&=-17:39===e?o=this.defAttr>>9&511:49===e?s=511&this.defAttr:38===e?2===t[n+1]?(-1===(o=p(255&t[n+=2],255&t[n+1],255&t[n+2]))&&(o=511),n+=2):5===t[n+1]&&(o=e=255&t[n+=2]):48===e?2===t[n+1]?(-1===(s=p(255&t[n+=2],255&t[n+1],255&t[n+2]))&&(s=511),n+=2):5===t[n+1]&&(s=e=255&t[n+=2]):100===e?(o=this.defAttr>>9&511,s=511&this.defAttr):this.error("Unknown SGR attribute: %d.",e);this.curAttr=i<<18|o<<9|s}else this.curAttr=this.defAttr},n.prototype.deviceStatus=function(t){if(this.prefix){if("?"===this.prefix&&6===t[0])this.send("\x1b[?"+(this.y+1)+";"+(this.x+1)+"R")}else switch(t[0]){case 5:this.send("\x1b[0n");break;case 6:this.send("\x1b["+(this.y+1)+";"+(this.x+1)+"R")}},n.prototype.insertChars=function(t){var e,m,n,i;for((e=t[0])<1&&(e=1),m=this.y+this.ybase,n=this.x,i=[this.eraseAttr()," "];e--&&n=this.rows&&(this.y=this.rows-1),this.x=0},n.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this.y-=e,this.y<0&&(this.y=0),this.x=0},n.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this.x=e-1},n.prototype.insertLines=function(t){var e,m,n;for((e=t[0])<1&&(e=1),m=this.y+this.ybase,n=this.rows-1-this.scrollBottom,n=this.rows-1+this.ybase-n+1;e--;)this.lines.splice(m,0,this.blankLine(!0)),this.lines.splice(n,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},n.prototype.deleteLines=function(t){var e,m,n;for((e=t[0])<1&&(e=1),m=this.y+this.ybase,n=this.rows-1-this.scrollBottom,n=this.rows-1+this.ybase-n;e--;)this.lines.splice(n+1,0,this.blankLine(!0)),this.lines.splice(m,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},n.prototype.deleteChars=function(t){var e,m,n;for((e=t[0])<1&&(e=1),m=this.y+this.ybase,n=[this.eraseAttr()," "];e--;)this.lines[m].splice(this.x,1),this.lines[m].push(n)},n.prototype.eraseChars=function(t){var e,m,n,i;for((e=t[0])<1&&(e=1),m=this.y+this.ybase,n=this.x,i=[this.eraseAttr()," "];e--&&n=this.cols&&(this.x=this.cols-1)},n.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this.x+=e,this.x>=this.cols&&(this.x=this.cols-1)},n.prototype.sendDeviceAttributes=function(t){t[0]>0||(this.prefix?">"===this.prefix&&(this.is("xterm")?this.send("\x1b[>0;276;0c"):this.is("rxvt-unicode")?this.send("\x1b[>85;95;0c"):this.is("linux")?this.send(t[0]+"c"):this.is("screen")&&this.send("\x1b[>83;40003;0c")):this.is("xterm")||this.is("rxvt-unicode")||this.is("screen")?this.send("\x1b[?1;2c"):this.is("linux")&&this.send("\x1b[?6c"))},n.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this.y=e-1,this.y>=this.rows&&(this.y=this.rows-1)},n.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1)},n.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this.y=t[0]-1,this.y>=this.rows&&(this.y=this.rows-1),this.x=t[1]-1,this.x>=this.cols&&(this.x=this.cols-1)},n.prototype.setMode=function(t){if("object"!=typeof t){if(this.prefix){if("?"===this.prefix)switch(t){case 1:this.applicationCursor=!0;break;case 2:this.setgCharset(0,n.charsets.US),this.setgCharset(1,n.charsets.US),this.setgCharset(2,n.charsets.US),this.setgCharset(3,n.charsets.US);break;case 3:this.savedCols=this.cols,this.resize(132,this.rows);break;case 6:this.originMode=!0;break;case 7:this.wraparoundMode=!0;break;case 12:break;case 66:this.log("Serial port requested application keypad."),this.applicationKeypad=!0;break;case 9:case 1e3:case 1002:case 1003:this.x10Mouse=9===t,this.vt200Mouse=1e3===t,this.normalMouse=t>1e3,this.mouseEvents=!0,this.element.style.cursor="default",this.log("Binding to mouse events.");break;case 1004:this.sendFocus=!0;break;case 1005:this.utfMouse=!0;break;case 1006:this.sgrMouse=!0;break;case 1015:this.urxvtMouse=!0;break;case 25:this.cursorHidden=!1;break;case 1049:case 47:case 1047:if(!this.normal){var e={lines:this.lines,ybase:this.ybase,ydisp:this.ydisp,x:this.x,y:this.y,scrollTop:this.scrollTop,scrollBottom:this.scrollBottom,tabs:this.tabs};this.reset(),this.normal=e,this.showCursor()}}}else if(4===t)this.insertMode=!0}else for(var m=t.length,i=0;i="0"&&e<="9"?(~(e=+e-1)||(e=9),this.emit("request term",e)):"n"===e?this.emit("request term next"):"P"===e?this.emit("request term previous"):":"===e?this.emit("request command mode"):"["===e&&this.enterSelect()},n.prototype.keySelect=function(t,e){if(this.showCursor(),this.searchMode||"n"===e||"N"===e)return this.keySearch(t,e);if("\x04"===e){var m=this.ydisp+this.y;return this.ydisp===this.ybase?(this.y=Math.min(this.y+(this.rows-1)/2|0,this.rows-1),this.refresh(0,this.rows-1)):this.scrollDisp((this.rows-1)/2|0),void(this.visualMode&&this.selectText(this.x,this.x,m,this.ydisp+this.y))}if("\x15"===e){m=this.ydisp+this.y;return 0===this.ydisp?(this.y=Math.max(this.y-(this.rows-1)/2|0,0),this.refresh(0,this.rows-1)):this.scrollDisp(-(this.rows-1)/2|0),void(this.visualMode&&this.selectText(this.x,this.x,m,this.ydisp+this.y))}if("\x06"===e){m=this.ydisp+this.y;return this.scrollDisp(this.rows-1),void(this.visualMode&&this.selectText(this.x,this.x,m,this.ydisp+this.y))}if("\x02"===e){m=this.ydisp+this.y;return this.scrollDisp(-(this.rows-1)),void(this.visualMode&&this.selectText(this.x,this.x,m,this.ydisp+this.y))}if("k"===e){m=this.ydisp+this.y;return this.y--,this.y<0&&(this.y=0,this.scrollDisp(-1)),void(this.visualMode?this.selectText(this.x,this.x,m,this.ydisp+this.y):this.refresh(this.y,this.y+1))}if("j"===e){m=this.ydisp+this.y;return this.y++,this.y>=this.rows&&(this.y=this.rows-1,this.scrollDisp(1)),void(this.visualMode?this.selectText(this.x,this.x,m,this.ydisp+this.y):this.refresh(this.y-1,this.y))}if("h"===e){var n=this.x;return this.x--,this.x<0&&(this.x=0),void(this.visualMode?this.selectText(this.x,n,this.ydisp+this.y,this.ydisp+this.y):this.refresh(this.y,this.y))}if("l"===e){n=this.x;return this.x++,this.x>=this.cols&&(this.x=this.cols-1),void(this.visualMode?this.selectText(n,this.x,this.ydisp+this.y,this.ydisp+this.y):this.refresh(this.y,this.y))}if("v"!==e&&" "!==e){if("y"!==e)if("q"!==e){if("w"===e||"W"===e){for(var i=this.x,o=this.y,s=this.ydisp,c=(n=this.x,m=this.y,this.ydisp),r=!1;;){for(var a=this.lines[c+m];n=this.cols&&(n=this.cols-1),!(n===this.cols-1&&a[n][1]<=" "))break;if(n=0,++m>=this.rows&&(m--,++c>this.ybase)){c=this.ybase,n=this.x;break}}return this.x=n,this.y=m,this.scrollDisp(-this.ydisp+c),void(this.visualMode&&this.selectText(i,this.x,o+s,this.ydisp+this.y))}if("b"===e||"B"===e){for(i=this.x,o=this.y,s=this.ydisp,n=this.x,m=this.y,c=this.ydisp;;){for(a=this.lines[c+m],r=n>0&&a[n][1]>" "&&a[n-1][1]>" ";n>=0;){if(a[n][1]<=" "){if(r&&n+1" "){n++;break}r=!0}n--}if(n<0&&(n=0),0!==n||!(a[n][1]<=" ")&&r)break;if(n=this.cols-1,--m<0&&(m++,--c<0)){c++,n=0;break}}return this.x=n,this.y=m,this.scrollDisp(-this.ydisp+c),void(this.visualMode&&this.selectText(this.x,i,this.ydisp+this.y,o+s))}if("e"===e||"E"===e){n=this.x+1,m=this.y,c=this.ydisp;for(n>=this.cols&&n--;;){for(a=this.lines[c+m];n=0&&a[n-1][1]>" "){n--;break}n++}if(n>=this.cols&&(n=this.cols-1),!(n===this.cols-1&&a[n][1]<=" "))break;if(n=0,++m>=this.rows&&(m--,++c>this.ybase)){c=this.ybase;break}}return this.x=n,this.y=m,this.scrollDisp(-this.ydisp+c),void(this.visualMode&&this.selectText(i,this.x,o+s,this.ydisp+this.y))}if("^"!==e&&"0"!==e){if("$"===e){for(i=this.x,a=this.lines[this.ydisp+this.y],n=this.cols-1;n>=0;){if(a[n][1]>" "){this.visualMode&&n0&&c--):"}"===e&&m>=this.rows&&(m--,c" "){-1===d&&(d=0),l=!0;break}if(h===this.cols-1){-1===d?d=1:(0===d||1===d&&l)&&(p=!0);break}}if(p)break;if("{"===e){if(--m<0){if(m++,!(c>0))break;c--}}else if("}"===e&&++m>=this.rows){if(m--,!(c" ");)n++;n>=this.cols&&(n=this.cols-1),this.x=n}this.visualMode?this.selectText(this.x,i,this.ydisp+this.y,this.ydisp+this.y):this.refresh(this.y,this.y)}}else this.visualMode?this.leaveVisual():this.leaveSelect();else if(this.visualMode){var u=this.grabText(this._selected.x1,this._selected.x2,this._selected.y1,this._selected.y2);this.copyText(u),this.leaveVisual()}}else this.visualMode?this.leaveVisual():this.enterVisual()},n.prototype.keySearch=function(t,e){if("\x1b"!==e){if("\r"===e||!this.searchMode&&("n"===e||"N"===e)){this.leaveSearch();var m=this.entry;if(!m)return void this.refresh(0,this.rows-1);for(var n,i,o=this.x,s=this.y,c=this.ydisp,r=!1,a=!1,h=this.x+1,l=this.ydisp+this.y,p="N"===e?this.searchDown:!this.searchDown;;){for(n=this.lines[l];h=this.cols)&&n[h+u][1]===m[u];u++)if(n[h+u][1]===m[u]&&u===m.length-1){r=!0;break}if(r)break;h+=u+1}if(r)break;if(h=0,p){if(--l<0){if(a)break;a=!0,l=this.ybase+this.rows-1}}else if(++l>this.ybase+this.rows-1){if(a)break;a=!0,l=0}}return r?(l-this.ybase<0?(i=l,l=0,i>this.ybase&&(l=i-this.ybase,i=this.ybase)):(i=this.ybase,l-=this.ybase),this.x=h,this.y=l,this.scrollDisp(-this.ydisp+i),void(this.visualMode&&this.selectText(o,this.x,s+c,this.ydisp+this.y))):void this.refresh(0,this.rows-1)}if("\b"===e||"\x7f"===e){if(0===this.entry.length)return;var d=this.ydisp+this.rows-1;this.entry=this.entry.slice(0,-1);var u=this.entryPrefix.length+this.entry.length;return this.lines[d][u]=[this.lines[d][u][0]," "],this.x--,this.refresh(this.rows-1,this.rows-1),void this.refresh(this.y,this.y)}if(1===e.length&&e>=" "&&e<="~"){d=this.ydisp+this.rows-1;this.entry+=e;u=this.entryPrefix.length+this.entry.length-1;return this.lines[d][u]=[-512&this.defAttr|4,e],this.x++,this.refresh(this.rows-1,this.rows-1),void this.refresh(this.y,this.y)}return!1}this.leaveSearch()},n.charsets={},n.charsets.SCLD={"`":"\u25c6",a:"\u2592",b:"\t",c:"\f",d:"\r",e:"\n",f:"\xb0",g:"\xb1",h:"\u2424",i:"\v",j:"\u2518",k:"\u2510",l:"\u250c",m:"\u2514",n:"\u253c",o:"\u23ba",p:"\u23bb",q:"\u2500",r:"\u23bc",s:"\u23bd",t:"\u251c",u:"\u2524",v:"\u2534",w:"\u252c",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03c0","|":"\u2260","}":"\xa3","~":"\xb7"},n.charsets.UK=null,n.charsets.US=null,n.charsets.Dutch=null,n.charsets.Finnish=null,n.charsets.French=null,n.charsets.FrenchCanadian=null,n.charsets.German=null,n.charsets.Italian=null,n.charsets.NorwegianDanish=null,n.charsets.Spanish=null,n.charsets.Swedish=null,n.charsets.Swiss=null,n.charsets.ISOLatin=null;var r=this.String,a=this.setTimeout,h=this.setInterval;function l(t){return!(t<="\uff00")&&(t>="\uff01"&&t<="\uffbe"||t>="\uffc2"&&t<="\uffc7"||t>="\uffca"&&t<="\uffcf"||t>="\uffd2"&&t<="\uffd7"||t>="\uffda"&&t<="\uffdc"||t>="\uffe0"&&t<="\uffe6"||t>="\uffe8"&&t<="\uffee")}function p(t,e,m){var i=t<<16|e<<8|m;if(null!=p._cache[i])return p._cache[i];for(var o,s,c,r,a,h=1/0,l=-1,d=0;d{t.exports=[{time:1146,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ #"},{time:2158,content:" "},{time:2438,content:"W"},{time:2502,content:"e"},{time:2815,content:"l"},{time:2945,content:"c"},{time:3062,content:"o"},{time:3247,content:"m"},{time:3312,content:"e"},{time:3600,content:"!"},{time:4032,content:" "},{time:5015,content:"T"},{time:5150,content:"h"},{time:5303,content:"i"},{time:5415,content:"s"},{time:5503,content:" "},{time:5656,content:"i"},{time:5744,content:"s"},{time:5823,content:" "},{time:5936,content:"a"},{time:6007,content:" "},{time:6568,content:"t"},{time:6720,content:"e"},{time:6767,content:"r"},{time:6840,content:"m"},{time:7015,content:"i"},{time:7161,content:"n"},{time:7223,content:"a"},{time:7335,content:"l"},{time:7423,content:" "},{time:7598,content:"r"},{time:7648,content:"e"},{time:7790,content:"p"},{time:7984,content:"l"},{time:8071,content:"a"},{time:8230,content:"y"},{time:8592,content:" "},{time:8784,content:"w"},{time:8856,content:"h"},{time:8927,content:"e"},{time:8998,content:"r"},{time:9583,content:"e"},{time:10110,content:"\r\n"},{time:10110,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:10863,content:"#"},{time:10943,content:" "},{time:11350,content:"I"},{time:11574,content:"'"},{time:11814,content:"m"},{time:11918,content:" "},{time:12438,content:"g"},{time:12526,content:"o"},{time:12704,content:"i"},{time:12767,content:"n"},{time:12838,content:"g"},{time:12919,content:" "},{time:13079,content:"t"},{time:13159,content:"o"},{time:13237,content:" "},{time:13429,content:"d"},{time:13591,content:"e"},{time:13663,content:"m"},{time:13822,content:"o"},{time:13880,content:" "},{time:14025,content:"a"},{time:14111,content:" "},{time:14287,content:"f"},{time:14322,content:"e"},{time:14391,content:"w"},{time:14533,content:" "},{time:14879,content:"e"},{time:15046,content:"x"},{time:15207,content:"a"},{time:15238,content:"m"},{time:15407,content:"p"},{time:15558,content:"l"},{time:15728,content:"e"},{time:16358,content:"s"},{time:16478,content:" "},{time:16841,content:"o"},{time:16895,content:"f"},{time:16966,content:" "},{time:17198,content:"m"},{time:17349,content:"e"},{time:17390,content:"m"},{time:18303,content:"l"},{time:18351,content:"a"},{time:18494,content:"b"},{time:18623,content:" "},{time:18839,content:"c"},{time:18936,content:"o"},{time:19110,content:"m"},{time:19248,content:"m"},{time:19311,content:"a"},{time:19415,content:"n"},{time:19486,content:"d"},{time:19536,content:"s"},{time:20005,content:"\r\n"},{time:20005,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:21702,content:"#"},{time:21776,content:" "},{time:22110,content:"f"},{time:22270,content:"i"},{time:22351,content:"r"},{time:22446,content:"s"},{time:22543,content:"t"},{time:22630,content:" "},{time:22791,content:"i"},{time:22830,content:"n"},{time:22887,content:"s"},{time:22952,content:"t"},{time:23039,content:"a"},{time:23135,content:"l"},{time:23296,content:"l"},{time:24175,content:" "},{time:24431,content:"m"},{time:24488,content:"e"},{time:24575,content:"m"},{time:24726,content:"l"},{time:24751,content:"a"},{time:24942,content:"b"},{time:25013,content:" "},{time:25509,content:"u"},{time:25591,content:"s"},{time:25734,content:"i"},{time:25767,content:"n"},{time:25862,content:"g"},{time:25950,content:" "},{time:26606,content:"n"},{time:26775,content:"p"},{time:26942,content:"m"},{time:26942,content:" "},{time:26942,content:"("},{time:26942,content:"t"},{time:26942,content:"h"},{time:26942,content:"i"},{time:26942,content:"s"},{time:26942,content:" "},{time:26942,content:"m"},{time:26942,content:"a"},{time:26942,content:"y"},{time:26942,content:" "},{time:26942,content:"t"},{time:26942,content:"a"},{time:26942,content:"k"},{time:26942,content:"e"},{time:26942,content:" "},{time:26942,content:"1"},{time:26942,content:" "},{time:26942,content:"m"},{time:26942,content:"i"},{time:26942,content:"n"},{time:26942,content:")"},{time:27158,content:"\r\n"},{time:27158,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:27702,content:"n"},{time:28054,content:"p"},{time:28262,content:"m"},{time:28382,content:" "},{time:29686,content:"i"},{time:29774,content:" "},{time:29958,content:"-"},{time:30174,content:"g"},{time:30349,content:" "},{time:30566,content:"m"},{time:30653,content:"e"},{time:30727,content:"m"},{time:31127,content:"l"},{time:31174,content:"a"},{time:31351,content:"b"},{time:31455,content:"\r\n"},{time:31753,content:"\x1b[?25l"},{time:31757,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2807 reify: \x1b[32;40mtiming\x1b[0m \x1b[35marborist:ctor\x1b[0m Completed in 0ms\x1b[0m\x1b[K\r"},{time:31804,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:31854,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:31905,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:31960,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32024,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32076,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32135,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2839 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32185,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2807 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32237,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2807 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32287,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32337,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280b idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32387,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2839 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32477,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32526,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32576,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32634,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32684,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2826 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32748,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32801,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32849,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2826 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32900,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32950,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2827 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33001,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33063,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33113,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33162,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33213,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33263,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33313,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33363,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33413,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33464,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33514,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33563,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33614,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2827 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33663,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33714,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2807 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33764,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33814,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2826 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33864,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2839 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33918,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33973,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2826 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34023,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280b idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34074,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2827 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34123,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280b idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34173,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34224,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280b idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34273,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2839 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34324,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2826 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34374,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34424,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280b idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34474,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2807 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:35102,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u283c reify:@memlab/cli: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modul\x1b[0m\x1b[K\r"},{time:35152,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u283c reify:@memlab/cli: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modul\x1b[0m\x1b[K\r"},{time:35202,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u283c reify:@memlab/cli: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modul\x1b[0m\x1b[K\r"},{time:35252,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u2834 reify:puppeteer: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modules\x1b[0m\x1b[K\r"},{time:35313,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u2826 reify:es-abstract: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modul\x1b[0m\x1b[K\r"},{time:35362,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u2826 reify:es-abstract: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modul\x1b[0m\x1b[K\r"},{time:69252,content:"\r\x1b[K\x1b[?25h",timeGapFromPreviousStep:3e3},{time:69257,content:"\r\nchanged 126 packages, and audited 127 packages in 38s\r\n"},{time:69257,content:" run `npm fund` for details\r\n"},{time:69257,content:"\r\n44 packages are looking for funding\r\n"},{time:69258,content:"\r\nfound \x1b[32m\x1b[1m0\x1b[22m\x1b[39m vulnerabilities\r\n"},{time:69264,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:70895,content:"c",timeGapFromPreviousStep:3e3},{time:71069,content:"l"},{time:71141,content:"e"},{time:71205,content:"a"},{time:71278,content:"r"},{time:71470,content:"\r\n"},{time:71471,content:"\x1b[H\x1b[2J"},{time:71472,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:73520,content:"#"},{time:73582,content:" "},{time:74045,content:"n"},{time:74118,content:"o"},{time:74193,content:"w"},{time:74269,content:" "},{time:74765,content:"d"},{time:74941,content:"e"},{time:75069,content:"f"},{time:75126,content:"i"},{time:75286,content:"n"},{time:75389,content:"e"},{time:75501,content:" "},{time:75631,content:"a"},{time:75693,content:" "},{time:76078,content:"t"},{time:76117,content:"e"},{time:76269,content:"s"},{time:76345,content:"t"},{time:76406,content:" "},{time:76565,content:"s"},{time:76766,content:"c"},{time:76934,content:"e"},{time:77038,content:"n"},{time:77126,content:"a"},{time:77215,content:"r"},{time:77286,content:"i"},{time:77349,content:"o"},{time:77447,content:" "},{time:77581,content:"f"},{time:77686,content:"i"},{time:77853,content:"l"},{time:77902,content:"e"},{time:78093,content:" "},{time:79094,content:"o"},{time:79148,content:"n"},{time:79598,content:"\r\n"},{time:79598,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:79925,content:"#"},{time:80166,content:" "},{time:80493,content:"h"},{time:80558,content:"o"},{time:80588,content:"w"},{time:80663,content:" "},{time:81004,content:"y"},{time:81093,content:"o"},{time:81151,content:"u"},{time:81245,content:" "},{time:81476,content:"w"},{time:81550,content:"a"},{time:81654,content:"n"},{time:81757,content:"t"},{time:81812,content:" "},{time:81949,content:"t"},{time:82030,content:"o"},{time:82117,content:" "},{time:82462,content:"i"},{time:82508,content:"n"},{time:82558,content:"t"},{time:82638,content:"e"},{time:82726,content:"r"},{time:82820,content:"a"},{time:83070,content:"c"},{time:83254,content:"t"},{time:83341,content:" "},{time:83484,content:"w"},{time:83596,content:"i"},{time:83662,content:"t"},{time:83812,content:"h"},{time:83917,content:" "},{time:84193,content:"a"},{time:84294,content:" "},{time:84469,content:"w"},{time:84549,content:"e"},{time:84654,content:"b"},{time:84758,content:" "},{time:84909,content:"p"},{time:84959,content:"a"},{time:85092,content:"g"},{time:85150,content:"e"},{time:85316,content:"\r\n"},{time:85317,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:86590,content:"c"},{time:86653,content:"a"},{time:86837,content:"t"},{time:86924,content:" "},{time:87214,content:"."},{time:87269,content:"/"},{time:88108,content:"t"},{time:88165,content:"e"},{time:88302,content:"s"},{time:88349,content:"t"},{time:88502,content:"-"},{time:88661,content:"g"},{time:88805,content:"o"},{time:88932,content:"o"},{time:89007,content:"g"},{time:89133,content:"l"},{time:89236,content:"e"},{time:89449,content:"-maps.js "},{time:90045,content:"\r\n"},{time:90046,content:"// Visit Google Maps\r\nfunction url() {\r\n return 'https://www.google.com/maps/@37.386427,-122.0428214,11z';\r\n}\r\n\r\n// action where we want to detect memory leaks: click the Hotels button\r\nasync function action(page) {\r\n await page.click('button[aria-label=\"Hotels\"]');\r\n}\r\n\r\n// action where we want to go back to the step before: click clear search\r\nasync function back(page) {\r\n await page.click('[aria-label=\"Clear search\"]');\r\n}\r\n\r\nmodule.exports = {action, back, url};\r\n"},{time:90047,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:95735,content:"\r\n"},{time:95735,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:96444,content:"#"},{time:96638,content:" "},{time:97187,content:"a"},{time:97262,content:"s"},{time:97445,content:"k"},{time:97557,content:" "},{time:99365,content:"m"},{time:99429,content:"e"},{time:99508,content:"m"},{time:99669,content:"l"},{time:99692,content:"a"},{time:99870,content:"b"},{time:99981,content:" "},{time:100174,content:"t"},{time:100243,content:"o"},{time:100294,content:" "},{time:100516,content:"d"},{time:100693,content:"e"},{time:100837,content:"t"},{time:100916,content:"e"},{time:101156,content:"c"},{time:101350,content:"t"},{time:101404,content:" "},{time:101582,content:"m"},{time:101661,content:"e"},{time:101725,content:"m"},{time:101893,content:"o"},{time:101942,content:"r"},{time:102045,content:"y"},{time:102189,content:" "},{time:102310,content:"l"},{time:102390,content:"e"},{time:102470,content:"a"},{time:102515,content:"k"},{time:102644,content:"s"},{time:102990,content:"\r\n"},{time:102990,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:103357,content:"#"},{time:103484,content:" "},{time:103918,content:"i"},{time:103957,content:"n"},{time:104061,content:" "},{time:105303,content:"t"},{time:105437,content:"h"},{time:105502,content:"e"},{time:105556,content:" "},{time:105740,content:"t"},{time:105789,content:"e"},{time:105989,content:"s"},{time:106077,content:"t"},{time:106180,content:" "},{time:106357,content:"s"},{time:106533,content:"c"},{time:106702,content:"e"},{time:106829,content:"n"},{time:106925,content:"a"},{time:106989,content:"r"},{time:107147,content:"i"},{time:107189,content:"o"},{time:107868,content:"\r\n"},{time:107868,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:108267,content:"#"},{time:108437,content:" "},{time:108788,content:"m"},{time:108859,content:"e"},{time:108951,content:"m"},{time:109100,content:"l"},{time:109117,content:"a"},{time:109308,content:"b"},{time:109413,content:" "},{time:109596,content:"w"},{time:109613,content:"i"},{time:109788,content:"l"},{time:109924,content:"l"},{time:110036,content:" "},{time:110268,content:"r"},{time:110371,content:"u"},{time:110604,content:"n"},{time:110669,content:" "},{time:110798,content:"a"},{time:110884,content:" "},{time:111349,content:"h"},{time:111404,content:"e"},{time:111454,content:"a"},{time:111957,content:"d"},{time:112187,content:"l"},{time:112253,content:"e"},{time:112387,content:"s"},{time:112532,content:"s"},{time:112613,content:" "},{time:113014,content:"b"},{time:113195,content:"r"},{time:113292,content:"o"},{time:113358,content:"w"},{time:113556,content:"s"},{time:113622,content:"e"},{time:113691,content:"r"},{time:115317,content:"\r\n"},{time:115317,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:115611,content:"#"},{time:115748,content:" "},{time:115972,content:"a"},{time:116094,content:"n"},{time:116181,content:"d"},{time:116277,content:" "},{time:116411,content:"r"},{time:116469,content:"e"},{time:116684,content:"c"},{time:116844,content:"o"},{time:116915,content:"r"},{time:116948,content:"d"},{time:117262,content:" "},{time:117844,content:"J"},{time:117902,content:"S"},{time:118015,content:" "},{time:118341,content:"h"},{time:118421,content:"e"},{time:118469,content:"a"},{time:118619,content:"p"},{time:118732,content:" "},{time:119070,content:"i"},{time:119107,content:"n"},{time:119205,content:"f"},{time:119293,content:"o"},{time:119491,content:" "},{time:119661,content:"a"},{time:119773,content:"n"},{time:119852,content:"d"},{time:119931,content:" "},{time:121325,content:"f"},{time:121459,content:"i"},{time:121509,content:"n"},{time:121573,content:"d"},{time:122334,content:"\r\n"},{time:122334,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:122596,content:"#"},{time:122717,content:" "},{time:122964,content:"m"},{time:123038,content:"e"},{time:123115,content:"m"},{time:123284,content:"o"},{time:123316,content:"r"},{time:123469,content:"y"},{time:123669,content:" "},{time:123955,content:"l"},{time:125238,content:"e"},{time:125324,content:"a"},{time:125731,content:"k"},{time:125804,content:"s"},{time:128116,content:"\r\n"},{time:128116,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:129091,content:"m"},{time:129189,content:"e"},{time:129253,content:"m"},{time:129421,content:"l"},{time:129470,content:"a"},{time:129645,content:"b"},{time:129755,content:" "},{time:129908,content:"r"},{time:129996,content:"u"},{time:130173,content:"n"},{time:130252,content:" "},{time:130452,content:"-"},{time:130580,content:"-"},{time:130695,content:"s"},{time:130907,content:"c"},{time:131076,content:"e"},{time:131211,content:"n"},{time:131301,content:"a"},{time:131397,content:"r"},{time:131502,content:"i"},{time:131556,content:"o"},{time:131716,content:" "},{time:132492,content:"."},{time:132565,content:"/"},{time:132677,content:"t"},{time:132756,content:"e"},{time:132869,content:"s"},{time:132948,content:"t"},{time:133189,content:"-"},{time:133372,content:"g"},{time:133581,content:"o"},{time:133770,content:"ogle-maps.js "},{time:134572,content:"\r\n"},{time:135612,content:"\x1b[1mpage-load(\x1b[32mbaseline\x1b[39m)[\x1b[32ms1\x1b[39m]\x1b[22m \x1b[90m>\x1b[39m \x1b[2maction-on-page(\x1b[32mtarget\x1b[39m)[\x1b[32ms2\x1b[39m] \x1b[90m>\x1b[39m \x1b[22m\x1b[2mrevert(\x1b[32mfinal\x1b[39m)[\x1b[32ms3\x1b[39m] \x1b[22m\r\n"},{time:135614,content:"\x1b[90mConnecting to web server...\x1b[39m\r\n"},{time:140058,content:"\x1b[90mrunning a full GC...\x1b[39m\r\n"},{time:140058,content:"\x1b[K\x1b[F\x1b[K"},{time:144663,content:"\x1b[F\x1b[K\x1b[33mHeap size: 24.6MB\x1b[39m\r\n"},{time:144663,content:"\x1b[K"},{time:144665,content:"\x1b[90mtaking screenshot...\x1b[39m\r\n"},{time:145090,content:"\x1b[K"},{time:145091,content:"\x1b[F\x1b[K"},{time:146397,content:"\x1b[90mheap snapshot 0% complete\x1b[39m\r\n"},{time:146455,content:"\x1b[K"},{time:146455,content:"\x1b[F\x1b[K"},{time:146455,content:"\x1b[90mheap snapshot 1% complete\x1b[39m\r\n"},{time:146515,content:"\x1b[K"},{time:146515,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 3% complete\x1b[39m\r\n"},{time:146852,content:"\x1b[K"},{time:146852,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 5% complete\x1b[39m\r\n"},{time:147205,content:"\x1b[K"},{time:147205,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 6% complete\x1b[39m\r\n"},{time:147298,content:"\x1b[K\x1b[F\x1b[K"},{time:147299,content:"\x1b[90mheap snapshot 8% complete\x1b[39m\r\n"},{time:147380,content:"\x1b[K"},{time:147380,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 10% complete\x1b[39m\r\n"},{time:147525,content:"\x1b[K"},{time:147525,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 11% complete\x1b[39m\r\n"},{time:147661,content:"\x1b[K"},{time:147661,content:"\x1b[90mheap snapshot 13% complete\x1b[39m\r\n"},{time:147661,content:"\x1b[F\x1b[K"},{time:147688,content:"\x1b[K\x1b[F\x1b[K"},{time:147688,content:"\x1b[90mheap snapshot 15% complete\x1b[39m\r\n"},{time:147723,content:"\x1b[K"},{time:147723,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 17% complete\x1b[39m\r\n"},{time:147779,content:"\x1b[K"},{time:147780,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 18% complete\x1b[39m\r\n"},{time:147850,content:"\x1b[K"},{time:147850,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 20% complete\x1b[39m\r\n"},{time:148068,content:"\x1b[K"},{time:148068,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 22% complete\x1b[39m\r\n"},{time:148118,content:"\x1b[K"},{time:148118,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 23% complete\x1b[39m\r\n"},{time:148431,content:"\x1b[K"},{time:148431,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 25% complete\x1b[39m\r\n"},{time:148832,content:"\x1b[K\x1b[F\x1b[K"},{time:148832,content:"\x1b[90mheap snapshot 27% complete\x1b[39m\r\n"},{time:148854,content:"\x1b[K\x1b[F\x1b[K"},{time:148854,content:"\x1b[90mheap snapshot 29% complete\x1b[39m\r\n"},{time:148896,content:"\x1b[K"},{time:148897,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 30% complete\x1b[39m\r\n"},{time:148959,content:"\x1b[K"},{time:148959,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 32% complete\x1b[39m\r\n"},{time:148987,content:"\x1b[K\x1b[F\x1b[K"},{time:148987,content:"\x1b[90mheap snapshot 34% complete\x1b[39m\r\n"},{time:149013,content:"\x1b[K"},{time:149014,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 35% complete\x1b[39m\r\n"},{time:149057,content:"\x1b[K\x1b[F\x1b[K"},{time:149057,content:"\x1b[90mheap snapshot 37% complete\x1b[39m\r\n"},{time:149083,content:"\x1b[K\x1b[F\x1b[K"},{time:149083,content:"\x1b[90mheap snapshot 39% complete\x1b[39m\r\n"},{time:149167,content:"\x1b[K\x1b[F\x1b[K"},{time:149167,content:"\x1b[90mheap snapshot 41% complete\x1b[39m\r\n"},{time:149217,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 42% complete\x1b[39m\r\n"},{time:149217,content:"\x1b[K"},{time:149270,content:"\x1b[K"},{time:149271,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 44% complete\x1b[39m\r\n"},{time:149590,content:"\x1b[K\x1b[F\x1b[K"},{time:149590,content:"\x1b[90mheap snapshot 46% complete\x1b[39m\r\n"},{time:149607,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 47% complete\x1b[39m\r\n"},{time:149614,content:"\x1b[K\x1b[F\x1b[K"},{time:149614,content:"\x1b[90mheap snapshot 49% complete\x1b[39m\r\n"},{time:149652,content:"\x1b[K"},{time:149652,content:"\x1b[90mheap snapshot 51% complete\x1b[39m\r\n"},{time:149652,content:"\x1b[F\x1b[K"},{time:149722,content:"\x1b[K\x1b[F\x1b[K"},{time:149722,content:"\x1b[90mheap snapshot 53% complete\x1b[39m\r\n"},{time:149774,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 54% complete\x1b[39m\r\n"},{time:149797,content:"\x1b[K"},{time:149797,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 56% complete\x1b[39m\r\n"},{time:149840,content:"\x1b[K"},{time:149840,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 58% complete\x1b[39m\r\n"},{time:149893,content:"\x1b[K"},{time:149893,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 59% complete\x1b[39m\r\n"},{time:149908,content:"\x1b[K"},{time:149909,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 61% complete\x1b[39m\r\n"},{time:149940,content:"\x1b[K"},{time:149940,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 63% complete\x1b[39m\r\n"},{time:149972,content:"\x1b[90mheap snapshot 64% complete\x1b[39m\r\n"},{time:149972,content:"\x1b[K\x1b[F\x1b[K"},{time:150021,content:"\x1b[K\x1b[F\x1b[K"},{time:150021,content:"\x1b[90mheap snapshot 66% complete\x1b[39m\r\n"},{time:150125,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 68% complete\x1b[39m\r\n"},{time:150125,content:"\x1b[K"},{time:150183,content:"\x1b[K"},{time:150183,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 70% complete\x1b[39m\r\n"},{time:150233,content:"\x1b[K"},{time:150233,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 71% complete\x1b[39m\r\n"},{time:150270,content:"\x1b[K"},{time:150270,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 73% complete\x1b[39m\r\n"},{time:150306,content:"\x1b[K"},{time:150306,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 75% complete\x1b[39m\r\n"},{time:150348,content:"\x1b[K\x1b[F\x1b[K"},{time:150348,content:"\x1b[90mheap snapshot 76% complete\x1b[39m\r\n"},{time:150392,content:"\x1b[K"},{time:150392,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 78% complete\x1b[39m\r\n"},{time:150438,content:"\x1b[K"},{time:150438,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 80% complete\x1b[39m\r\n"},{time:150465,content:"\x1b[K"},{time:150465,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 82% complete\x1b[39m\r\n"},{time:150683,content:"\x1b[K\x1b[F\x1b[K"},{time:150683,content:"\x1b[90mheap snapshot 83% complete\x1b[39m\r\n"},{time:150712,content:"\x1b[K\x1b[F\x1b[K"},{time:150712,content:"\x1b[90mheap snapshot 85% complete\x1b[39m\r\n"},{time:150757,content:"\x1b[K"},{time:150757,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 87% complete\x1b[39m\r\n"},{time:150803,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 88% complete\x1b[39m\r\n"},{time:150852,content:"\x1b[K"},{time:150852,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 90% complete\x1b[39m\r\n"},{time:150878,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 92% complete\x1b[39m\r\n"},{time:150878,content:"\x1b[K"},{time:150923,content:"\x1b[K"},{time:150923,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 94% complete\x1b[39m\r\n"},{time:150971,content:"\x1b[K\x1b[F\x1b[K"},{time:150971,content:"\x1b[90mheap snapshot 95% complete\x1b[39m\r\n"},{time:150981,content:"\x1b[K\x1b[F\x1b[K"},{time:150981,content:"\x1b[90mheap snapshot 97% complete\x1b[39m\r\n"},{time:150991,content:"\x1b[K\x1b[F\x1b[K"},{time:150991,content:"\x1b[90mheap snapshot 99% complete\x1b[39m\r\n"},{time:151271,content:"\x1b[K\x1b[F\x1b[K"},{time:151271,content:"\x1b[90mheap snapshot 99% complete\x1b[39m\r\n"},{time:151658,content:"\x1b[K"},{time:151658,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:151658,content:"\x1b[K"},{time:151658,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:152958,content:"\x1b[K"},{time:152958,content:"\x1b[F\x1b[K"},{time:152959,content:"\x1b[90msnapshot saved to disk\x1b[39m\r\n"},{time:152959,content:"\x1b[K\x1b[F\x1b[K"},{time:152959,content:"\r\n\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K"},{time:152960,content:"page-load[\x1b[32m24.6MB\x1b[39m](\x1b[32mbaseline\x1b[39m)[\x1b[32ms1\x1b[39m] \x1b[90m>\x1b[39m \x1b[1maction-on-page(\x1b[32mtarget\x1b[39m)[\x1b[32ms2\x1b[39m]\x1b[22m \x1b[90m>\x1b[39m \x1b[2mrevert(\x1b[32mfinal\x1b[39m)[\x1b[32ms3\x1b[39m] \x1b[22m\r\n"},{time:155348,content:"\x1b[90mrunning a full GC...\x1b[39m\r\n"},{time:160192,content:"\x1b[K\x1b[F\x1b[K"},{time:160192,content:"\x1b[33mHeap size: 30.4MB\x1b[39m\r\n"},{time:160193,content:"\x1b[90mtaking screenshot...\x1b[39m\r\n"},{time:160546,content:"\x1b[K"},{time:160546,content:"\x1b[F\x1b[K"},{time:162104,content:"\x1b[90mheap snapshot 0% complete\x1b[39m\r\n"},{time:162180,content:"\x1b[K"},{time:162180,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 1% complete\x1b[39m\r\n"},{time:162244,content:"\x1b[K"},{time:162244,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 2% complete\x1b[39m\r\n"},{time:162835,content:"\x1b[K"},{time:162835,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 4% complete\x1b[39m\r\n"},{time:163371,content:"\x1b[K"},{time:163371,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 5% complete\x1b[39m\r\n"},{time:163579,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 6% complete\x1b[39m\r\n"},{time:163579,content:"\x1b[K"},{time:163877,content:"\x1b[K"},{time:163877,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 8% complete\x1b[39m\r\n"},{time:164001,content:"\x1b[90mheap snapshot 9% complete\x1b[39m\r\n"},{time:164001,content:"\x1b[K\x1b[F\x1b[K"},{time:164168,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 10% complete\x1b[39m\r\n"},{time:164168,content:"\x1b[K"},{time:164249,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 12% complete\x1b[39m\r\n"},{time:164249,content:"\x1b[K"},{time:164330,content:"\x1b[K"},{time:164330,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 13% complete\x1b[39m\r\n"},{time:164346,content:"\x1b[90mheap snapshot 14% complete\x1b[39m\r\n"},{time:164346,content:"\x1b[K\x1b[F\x1b[K"},{time:164397,content:"\x1b[K"},{time:164397,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 16% complete\x1b[39m\r\n"},{time:164444,content:"\x1b[K"},{time:164444,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 17% complete\x1b[39m\r\n"},{time:164500,content:"\x1b[K"},{time:164500,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 18% complete\x1b[39m\r\n"},{time:164532,content:"\x1b[K"},{time:164532,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 20% complete\x1b[39m\r\n"},{time:164582,content:"\x1b[K"},{time:164582,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 21% complete\x1b[39m\r\n"},{time:164614,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 22% complete\x1b[39m\r\n"},{time:164614,content:"\x1b[K"},{time:164655,content:"\x1b[K\x1b[F\x1b[K"},{time:164655,content:"\x1b[90mheap snapshot 24% complete\x1b[39m\r\n"},{time:164700,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 25% complete\x1b[39m\r\n"},{time:164700,content:"\x1b[K"},{time:164749,content:"\x1b[90mheap snapshot 26% complete\x1b[39m\r\n"},{time:164749,content:"\x1b[K\x1b[F\x1b[K"},{time:164782,content:"\x1b[K"},{time:164782,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 28% complete\x1b[39m\r\n"},{time:164824,content:"\x1b[K"},{time:164824,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 29% complete\x1b[39m\r\n"},{time:164862,content:"\x1b[K"},{time:164862,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 30% complete\x1b[39m\r\n"},{time:164903,content:"\x1b[K\x1b[F\x1b[K"},{time:164903,content:"\x1b[90mheap snapshot 32% complete\x1b[39m\r\n"},{time:164941,content:"\x1b[K"},{time:164941,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 33% complete\x1b[39m\r\n"},{time:164976,content:"\x1b[K"},{time:164976,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 34% complete\x1b[39m\r\n"},{time:164997,content:"\x1b[K"},{time:164997,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 36% complete\x1b[39m\r\n"},{time:165031,content:"\x1b[K"},{time:165031,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 37% complete\x1b[39m\r\n"},{time:165048,content:"\x1b[K"},{time:165048,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 38% complete\x1b[39m\r\n"},{time:165128,content:"\x1b[K"},{time:165128,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 40% complete\x1b[39m\r\n"},{time:165162,content:"\x1b[K"},{time:165162,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 41% complete\x1b[39m\r\n"},{time:165174,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 42% complete\x1b[39m\r\n"},{time:165174,content:"\x1b[K"},{time:165438,content:"\x1b[K"},{time:165438,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 44% complete\x1b[39m\r\n"},{time:165476,content:"\x1b[K\x1b[F\x1b[K"},{time:165476,content:"\x1b[90mheap snapshot 45% complete\x1b[39m\r\n"},{time:165537,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 46% complete\x1b[39m\r\n"},{time:165537,content:"\x1b[K"},{time:165603,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 48% complete\x1b[39m\r\n"},{time:165654,content:"\x1b[K"},{time:165654,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 49% complete\x1b[39m\r\n"},{time:165699,content:"\x1b[K"},{time:165699,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 50% complete\x1b[39m\r\n"},{time:165745,content:"\x1b[90mheap snapshot 52% complete\x1b[39m\r\n"},{time:165745,content:"\x1b[K\x1b[F\x1b[K"},{time:165807,content:"\x1b[K"},{time:165807,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 53% complete\x1b[39m\r\n"},{time:165878,content:"\x1b[K"},{time:165878,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 54% complete\x1b[39m\r\n"},{time:165948,content:"\x1b[K"},{time:165948,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 56% complete\x1b[39m\r\n"},{time:165998,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 57% complete\x1b[39m\r\n"},{time:165998,content:"\x1b[K"},{time:166068,content:"\x1b[K"},{time:166068,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 58% complete\x1b[39m\r\n"},{time:166147,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 60% complete\x1b[39m\r\n"},{time:166147,content:"\x1b[K"},{time:166234,content:"\x1b[K"},{time:166234,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 61% complete\x1b[39m\r\n"},{time:166299,content:"\x1b[K\x1b[F\x1b[K"},{time:166299,content:"\x1b[90mheap snapshot 62% complete\x1b[39m\r\n"},{time:166355,content:"\x1b[K"},{time:166355,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 64% complete\x1b[39m\r\n"},{time:166427,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 65% complete\x1b[39m\r\n"},{time:166427,content:"\x1b[K"},{time:166496,content:"\x1b[K\x1b[F\x1b[K"},{time:166496,content:"\x1b[90mheap snapshot 66% complete\x1b[39m\r\n"},{time:166552,content:"\x1b[K"},{time:166552,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 68% complete\x1b[39m\r\n"},{time:166637,content:"\x1b[K"},{time:166637,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 69% complete\x1b[39m\r\n"},{time:166686,content:"\x1b[K"},{time:166686,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 70% complete\x1b[39m\r\n"},{time:166757,content:"\x1b[K"},{time:166757,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 72% complete\x1b[39m\r\n"},{time:166799,content:"\x1b[K\x1b[F\x1b[K"},{time:166799,content:"\x1b[90mheap snapshot 73% complete\x1b[39m\r\n"},{time:166831,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 74% complete\x1b[39m\r\n"},{time:166831,content:"\x1b[K"},{time:166890,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 76% complete\x1b[39m\r\n"},{time:166890,content:"\x1b[K"},{time:166987,content:"\x1b[K"},{time:166987,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 77% complete\x1b[39m\r\n"},{time:167023,content:"\x1b[K"},{time:167023,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 78% complete\x1b[39m\r\n"},{time:167056,content:"\x1b[K"},{time:167056,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 80% complete\x1b[39m\r\n"},{time:167104,content:"\x1b[K\x1b[F\x1b[K"},{time:167104,content:"\x1b[90mheap snapshot 81% complete\x1b[39m\r\n"},{time:167137,content:"\x1b[K\x1b[F\x1b[K"},{time:167137,content:"\x1b[90mheap snapshot 82% complete\x1b[39m\r\n"},{time:167182,content:"\x1b[90mheap snapshot 84% complete\x1b[39m\r\n"},{time:167182,content:"\x1b[K\x1b[F\x1b[K"},{time:167212,content:"\x1b[K"},{time:167212,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 85% complete\x1b[39m\r\n"},{time:167247,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 86% complete\x1b[39m\r\n"},{time:167247,content:"\x1b[K"},{time:167277,content:"\x1b[K"},{time:167277,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 88% complete\x1b[39m\r\n"},{time:167321,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 89% complete\x1b[39m\r\n"},{time:167321,content:"\x1b[K"},{time:167375,content:"\x1b[K"},{time:167375,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 90% complete\x1b[39m\r\n"},{time:167430,content:"\x1b[K"},{time:167430,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 92% complete\x1b[39m\r\n"},{time:167507,content:"\x1b[K"},{time:167507,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 93% complete\x1b[39m\r\n"},{time:167627,content:"\x1b[K"},{time:167627,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 94% complete\x1b[39m\r\n"},{time:167687,content:"\x1b[K\x1b[F\x1b[K"},{time:167687,content:"\x1b[90mheap snapshot 96% complete\x1b[39m\r\n"},{time:167703,content:"\x1b[K"},{time:167703,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 97% complete\x1b[39m\r\n"},{time:167713,content:"\x1b[K"},{time:167713,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 98% complete\x1b[39m\r\n"},{time:168077,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 99% complete\x1b[39m\r\n"},{time:169011,content:"\x1b[K"},{time:169011,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:169011,content:"\x1b[K\x1b[F\x1b[K"},{time:169011,content:"\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:170622,content:"\x1b[K"},{time:170622,content:"\x1b[F\x1b[K"},{time:170623,content:"\x1b[90msnapshot saved to disk\x1b[39m\r\n"},{time:170623,content:"\x1b[K"},{time:170623,content:"\x1b[F\x1b[K"},{time:170624,content:"\r\n"},{time:170624,content:"\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K"},{time:170624,content:"page-load[\x1b[32m24.6MB\x1b[39m](\x1b[32mbaseline\x1b[39m)[\x1b[32ms1\x1b[39m] \x1b[90m>\x1b[39m action-on-page[\x1b[32m30.4MB\x1b[39m](\x1b[32mtarget\x1b[39m)[\x1b[32ms2\x1b[39m] \x1b[90m>\x1b[39m \x1b[1mrevert(\x1b[32mfinal\x1b[39m)[\x1b[32ms3\x1b[39m]\x1b[22m \r\n"},{time:201208,content:"\x1b[90mCheck timeout '/maps/search/Hotels/@37.3862618,-122.0428216,11z/data=!3m1!4b1' set wait: 2000ms\x1b[39m\r\n",timeGapFromPreviousStep:5e3},{time:201711,content:"\x1b[K\x1b[F\x1b[K\x1b[F\x1b[K"},{time:201711,content:"\x1b[90mrunning a full GC...\x1b[39m\r\n"},{time:206435,content:"\x1b[K\x1b[F\x1b[K"},{time:206435,content:"\x1b[33mHeap size: 29.4MB\x1b[39m\r\n"},{time:206435,content:"\x1b[90mtaking screenshot...\x1b[39m\r\n"},{time:206824,content:"\x1b[K\x1b[F\x1b[K"},{time:208321,content:"\x1b[90mheap snapshot 0% complete\x1b[39m\r\n"},{time:208396,content:"\x1b[K"},{time:208396,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 1% complete\x1b[39m\r\n"},{time:208460,content:"\x1b[K"},{time:208460,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 2% complete\x1b[39m\r\n"},{time:209047,content:"\x1b[K\x1b[F\x1b[K"},{time:209047,content:"\x1b[90mheap snapshot 4% complete\x1b[39m\r\n"},{time:209579,content:"\x1b[K\x1b[F\x1b[K"},{time:209579,content:"\x1b[90mheap snapshot 5% complete\x1b[39m\r\n"},{time:209786,content:"\x1b[K"},{time:209786,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 7% complete\x1b[39m\r\n"},{time:210080,content:"\x1b[K"},{time:210081,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 8% complete\x1b[39m\r\n"},{time:210205,content:"\x1b[K\x1b[F\x1b[K"},{time:210205,content:"\x1b[90mheap snapshot 9% complete\x1b[39m\r\n"},{time:210371,content:"\x1b[K"},{time:210371,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 11% complete\x1b[39m\r\n"},{time:210452,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 12% complete\x1b[39m\r\n"},{time:210452,content:"\x1b[K"},{time:210532,content:"\x1b[K"},{time:210532,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 14% complete\x1b[39m\r\n"},{time:210574,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 15% complete\x1b[39m\r\n"},{time:210574,content:"\x1b[K"},{time:210623,content:"\x1b[K"},{time:210623,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 17% complete\x1b[39m\r\n"},{time:210696,content:"\x1b[K"},{time:210697,content:"\x1b[F\x1b[K"},{time:210697,content:"\x1b[90mheap snapshot 18% complete\x1b[39m"},{time:210697,content:"\r\n"},{time:210783,content:"\x1b[K"},{time:210783,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 19% complete\x1b[39m\r\n"},{time:210857,content:"\x1b[K"},{time:210857,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 21% complete\x1b[39m\r\n"},{time:210906,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 22% complete\x1b[39m\r\n"},{time:210906,content:"\x1b[K"},{time:210966,content:"\x1b[K\x1b[F\x1b[K"},{time:210966,content:"\x1b[90mheap snapshot 24% complete\x1b[39m\r\n"},{time:211011,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 25% complete\x1b[39m\r\n"},{time:211011,content:"\x1b[K"},{time:211061,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 27% complete\x1b[39m\r\n"},{time:211106,content:"\x1b[K\x1b[F\x1b[K"},{time:211106,content:"\x1b[90mheap snapshot 28% complete\x1b[39m\r\n"},{time:211147,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 29% complete\x1b[39m\r\n"},{time:211147,content:"\x1b[K"},{time:211174,content:"\x1b[K"},{time:211174,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 31% complete\x1b[39m\r\n"},{time:211208,content:"\x1b[K"},{time:211208,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 32% complete\x1b[39m\r\n"},{time:211242,content:"\x1b[K\x1b[F\x1b[K"},{time:211242,content:"\x1b[90mheap snapshot 34% complete\x1b[39m\r\n"},{time:211292,content:"\x1b[K"},{time:211292,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 35% complete\x1b[39m\r\n"},{time:211338,content:"\x1b[K\x1b[F\x1b[K"},{time:211338,content:"\x1b[90mheap snapshot 37% complete\x1b[39m\r\n"},{time:211374,content:"\x1b[K"},{time:211374,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 38% complete\x1b[39m\r\n"},{time:211418,content:"\x1b[K\x1b[F\x1b[K"},{time:211418,content:"\x1b[90mheap snapshot 39% complete\x1b[39m\r\n"},{time:211474,content:"\x1b[90mheap snapshot 41% complete\x1b[39m\r\n"},{time:211474,content:"\x1b[K\x1b[F\x1b[K"},{time:211485,content:"\x1b[K\x1b[F\x1b[K"},{time:211485,content:"\x1b[90mheap snapshot 42% complete\x1b[39m\r\n"},{time:211586,content:"\x1b[K\x1b[F\x1b[K"},{time:211586,content:"\x1b[90mheap snapshot 44% complete\x1b[39m\r\n"},{time:211661,content:"\x1b[K"},{time:211661,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 45% complete\x1b[39m\r\n"},{time:211689,content:"\x1b[K\x1b[F\x1b[K"},{time:211689,content:"\x1b[90mheap snapshot 47% complete\x1b[39m\r\n"},{time:211722,content:"\x1b[K"},{time:211722,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 48% complete\x1b[39m\r\n"},{time:211744,content:"\x1b[K"},{time:211744,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 49% complete\x1b[39m\r\n"},{time:211785,content:"\x1b[K"},{time:211785,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 51% complete\x1b[39m\r\n"},{time:211850,content:"\x1b[K\x1b[F\x1b[K"},{time:211850,content:"\x1b[90mheap snapshot 52% complete\x1b[39m\r\n"},{time:211887,content:"\x1b[K\x1b[F\x1b[K"},{time:211887,content:"\x1b[90mheap snapshot 54% complete\x1b[39m\r\n"},{time:211927,content:"\x1b[K\x1b[F\x1b[K"},{time:211927,content:"\x1b[90mheap snapshot 55% complete\x1b[39m\r\n"},{time:211992,content:"\x1b[K"},{time:211993,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 57% complete\x1b[39m\r\n"},{time:212031,content:"\x1b[K"},{time:212031,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 58% complete\x1b[39m\r\n"},{time:212091,content:"\x1b[K"},{time:212091,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 59% complete\x1b[39m\r\n"},{time:212127,content:"\x1b[K"},{time:212127,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 61% complete\x1b[39m\r\n"},{time:212198,content:"\x1b[K\x1b[F\x1b[K"},{time:212198,content:"\x1b[90mheap snapshot 62% complete\x1b[39m\r\n"},{time:212238,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 64% complete\x1b[39m\r\n"},{time:212238,content:"\x1b[K"},{time:212259,content:"\x1b[K"},{time:212259,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 65% complete\x1b[39m\r\n"},{time:212290,content:"\x1b[K"},{time:212290,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 66% complete\x1b[39m\r\n"},{time:212334,content:"\x1b[K"},{time:212334,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 68% complete\x1b[39m\r\n"},{time:212378,content:"\x1b[90mheap snapshot 69% complete\x1b[39m\r\n"},{time:212378,content:"\x1b[K\x1b[F\x1b[K"},{time:212431,content:"\x1b[K"},{time:212431,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 71% complete\x1b[39m\r\n"},{time:212462,content:"\x1b[K\x1b[F\x1b[K"},{time:212462,content:"\x1b[90mheap snapshot 72% complete\x1b[39m\r\n"},{time:212516,content:"\x1b[K"},{time:212516,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 74% complete\x1b[39m\r\n"},{time:212555,content:"\x1b[K\x1b[F\x1b[K"},{time:212555,content:"\x1b[90mheap snapshot 75% complete\x1b[39m\r\n"},{time:212586,content:"\x1b[K\x1b[F\x1b[K"},{time:212586,content:"\x1b[90mheap snapshot 76% complete\x1b[39m\r\n"},{time:212623,content:"\x1b[K"},{time:212623,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 78% complete\x1b[39m\r\n"},{time:212677,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 79% complete\x1b[39m\r\n"},{time:212678,content:"\x1b[K"},{time:212724,content:"\x1b[K"},{time:212724,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 81% complete\x1b[39m\r\n"},{time:212803,content:"\x1b[K"},{time:212803,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 82% complete\x1b[39m\r\n"},{time:212856,content:"\x1b[K"},{time:212856,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 84% complete\x1b[39m\r\n"},{time:212965,content:"\x1b[K"},{time:212965,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 85% complete\x1b[39m\r\n"},{time:213096,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 86% complete\x1b[39m\r\n"},{time:213096,content:"\x1b[K"},{time:213193,content:"\x1b[K"},{time:213193,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 88% complete\x1b[39m\r\n"},{time:213335,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 89% complete\x1b[39m\r\n"},{time:213335,content:"\x1b[K"},{time:213387,content:"\x1b[K"},{time:213387,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 91% complete\x1b[39m\r\n"},{time:213432,content:"\x1b[K"},{time:213432,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 92% complete\x1b[39m\r\n"},{time:213519,content:"\x1b[K"},{time:213519,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 94% complete\x1b[39m\r\n"},{time:213572,content:"\x1b[K"},{time:213572,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 95% complete\x1b[39m\r\n"},{time:213602,content:"\x1b[K"},{time:213602,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 96% complete\x1b[39m\r\n"},{time:213613,content:"\x1b[K\x1b[F\x1b[K"},{time:213613,content:"\x1b[90mheap snapshot 98% complete\x1b[39m\r\n"},{time:213624,content:"\x1b[K"},{time:213625,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 99% complete\x1b[39m\r\n"},{time:213965,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 99% complete\x1b[39m\r\n"},{time:213965,content:"\x1b[K"},{time:214598,content:"\x1b[K"},{time:214598,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:214598,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:216109,content:"\x1b[K\x1b[F\x1b[K"},{time:216109,content:"\x1b[90msnapshot saved to disk\x1b[39m\r\n"},{time:216109,content:"\x1b[K"},{time:216110,content:"\x1b[F\x1b[K"},{time:216111,content:"\r\n"},{time:216111,content:"\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K"},{time:216112,content:"page-load[\x1b[32m24.6MB\x1b[39m](\x1b[32mbaseline\x1b[39m)[\x1b[32ms1\x1b[39m] \x1b[90m>\x1b[39m action-on-page[\x1b[32m30.4MB\x1b[39m](\x1b[32mtarget\x1b[39m)[\x1b[32ms2\x1b[39m] \x1b[90m>\x1b[39m revert[\x1b[32m29.4MB\x1b[39m](\x1b[32mfinal\x1b[39m)[\x1b[32ms3\x1b[39m] \r\n\r\n"},{time:216183,content:"total time: 1.3min\r\n"},{time:216189,content:"Memory usage across all steps:\r\n"},{time:216191,content:"35.0 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\r\n30.7 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\r\n26.5 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[30m_\x1b[39m\r\n22.2 \x1b[32m\u2584\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n18.0 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n13.7 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 9.5 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 5.2 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 1.0 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 1 2 3 \r\n"},{time:216192,content:"\r\n"},{time:216199,content:"\x1b[90mlightweight parsing /tmp/memlab/data/cur/s1.heapsnapshot ...\x1b[39m\r\n"},{time:216756,content:"\x1b[K\x1b[F\x1b[K"},{time:216757,content:"\x1b[90mlightweight parsing /tmp/memlab/data/cur/s2.heapsnapshot ...\x1b[39m\r\n"},{time:217427,content:"\x1b[K\x1b[F\x1b[K"},{time:217427,content:"\x1b[90mparsing /tmp/memlab/data/cur/s3.heapsnapshot ...\x1b[39m\r\n"},{time:218998,content:"\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:218998,content:"\x1b[K\x1b[F\x1b[K"},{time:218998,content:"\x1b[K\x1b[F\x1b[K"},{time:218998,content:"\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:219003,content:"\x1b[K\x1b[F\x1b[K"},{time:219003,content:"\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:219173,content:"\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:219173,content:"\x1b[K\x1b[F\x1b[K"},{time:219209,content:"\x1b[K\x1b[F\x1b[K"},{time:219209,content:"\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:219619,content:"\x1b[K"},{time:219619,content:"\x1b[F\x1b[K\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:219723,content:"\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:219723,content:"\x1b[K\x1b[F\x1b[K"},{time:219724,content:"\x1b[K\x1b[F\x1b[K"},{time:219724,content:"\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:220097,content:"\x1b[K\x1b[F\x1b[K\x1b[90mannotating shortest path for all nodes\x1b[39m\r\n"},{time:221263,content:"\x1b[K"},{time:221264,content:"\x1b[F\x1b[K\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:223071,content:"\x1b[90mmarking all detached Fiber nodes...\x1b[39m\r\n"},{time:223071,content:"\x1b[K\x1b[F\x1b[K"},{time:223097,content:"\x1b[K"},{time:223097,content:"\x1b[F\x1b[K\x1b[90mmarking alternate Fiber nodes...\x1b[39m\r\n"},{time:223199,content:"\x1b[K\x1b[F\x1b[K"},{time:223199,content:"\x1b[90mprogress: 11 / 643 @951667136\x1b[39m\r\n"},{time:223199,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 22 / 643 @1106611808\x1b[39m\r\n"},{time:223199,content:"\x1b[K\x1b[F\x1b[K"},{time:223199,content:"\x1b[90mprogress: 33 / 643 @1106670816\x1b[39m\r\n"},{time:223200,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 44 / 643 @1106659296\x1b[39m\r\n"},{time:223200,content:"\x1b[K\x1b[F\x1b[K"},{time:223200,content:"\x1b[90mprogress: 55 / 643 @1106652896\x1b[39m\r\n"},{time:223200,content:"\x1b[K\x1b[F\x1b[K"},{time:223200,content:"\x1b[90mprogress: 66 / 643 @1106647456\x1b[39m\r\n"},{time:223200,content:"\x1b[90mprogress: 77 / 643 @1106641696\x1b[39m\r\n"},{time:223200,content:"\x1b[K\x1b[F\x1b[K"},{time:223200,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 88 / 643 @1106699424\x1b[39m\r\n"},{time:223200,content:"\x1b[90mprogress: 99 / 643 @1106694944\x1b[39m\r\n"},{time:223200,content:"\x1b[K\x1b[F\x1b[K"},{time:223200,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 110 / 643 @1106690304\x1b[39m\r\n"},{time:223200,content:"\x1b[K"},{time:223200,content:"\x1b[F\x1b[K\x1b[90mprogress: 121 / 643 @1106685504\x1b[39m\r\n"},{time:223201,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 132 / 643 @1106679744\x1b[39m\r\n"},{time:223201,content:"\x1b[K"},{time:223201,content:"\x1b[F\x1b[K\x1b[90mprogress: 143 / 643 @1106675904\x1b[39m\r\n"},{time:223201,content:"\x1b[K\x1b[F\x1b[K"},{time:223201,content:"\x1b[90mprogress: 154 / 643 @1106733632\x1b[39m\r\n"},{time:223201,content:"\x1b[K"},{time:223201,content:"\x1b[F\x1b[K\x1b[90mprogress: 165 / 643 @1106729472\x1b[39m\r\n"},{time:223201,content:"\x1b[90mprogress: 176 / 643 @1106716992\x1b[39m\r\n"},{time:223201,content:"\x1b[K\x1b[F\x1b[K"},{time:223201,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 187 / 643 @1633955\x1b[39m\r\n"},{time:223202,content:"\x1b[K"},{time:223202,content:"\x1b[F\x1b[K\x1b[90mprogress: 198 / 643 @1633783\x1b[39m\r\n"},{time:223202,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 209 / 643 @1633701\x1b[39m\r\n"},{time:223202,content:"\x1b[K\x1b[F\x1b[K"},{time:223202,content:"\x1b[90mprogress: 220 / 643 @1633673\x1b[39m\r\n\x1b[K\x1b[F\x1b[K"},{time:223202,content:"\x1b[90mprogress: 231 / 643 @1633501\x1b[39m\r\n"},{time:223202,content:"\x1b[K\x1b[F\x1b[K"},{time:223202,content:"\x1b[90mprogress: 242 / 643 @1633075\x1b[39m\r\n"},{time:223202,content:"\x1b[K\x1b[F\x1b[K"},{time:223202,content:"\x1b[90mprogress: 253 / 643 @1632921\x1b[39m\r\n"},{time:223202,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 264 / 643 @1632875\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K"},{time:223203,content:"\x1b[90mprogress: 275 / 643 @1632837\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K"},{time:223203,content:"\x1b[90mprogress: 286 / 643 @1632767\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K"},{time:223203,content:"\x1b[90mprogress: 297 / 643 @1632703\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K"},{time:223203,content:"\x1b[90mprogress: 308 / 643 @1632657\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K"},{time:223203,content:"\x1b[90mprogress: 319 / 643 @1632619\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 330 / 643 @1632589\x1b[39m\r\n"},{time:223203,content:"\x1b[F\x1b[K\x1b[90mprogress: 341 / 643 @1632547\x1b[39m\r\n"},{time:223203,content:"\x1b[K"},{time:223203,content:"\x1b[K"},{time:223203,content:"\x1b[F\x1b[K\x1b[90mprogress: 352 / 643 @1632509\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 363 / 643 @1632479\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K"},{time:223204,content:"\x1b[90mprogress: 374 / 643 @1632383\x1b[39m\r\n"},{time:223204,content:"\x1b[K"},{time:223204,content:"\x1b[F\x1b[K\x1b[90mprogress: 385 / 643 @1632313\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 396 / 643 @1632287\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 407 / 643 @1632245\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 418 / 643 @1632197\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 429 / 643 @1632173\x1b[39m\r\n"},{time:223205,content:"\x1b[K\x1b[F\x1b[K"},{time:223205,content:"\x1b[90mprogress: 440 / 643 @1632143\x1b[39m\r\n"},{time:223205,content:"\x1b[K\x1b[F\x1b[K"},{time:223205,content:"\x1b[90mprogress: 451 / 643 @1632115\x1b[39m\r\n"},{time:223205,content:"\x1b[K"},{time:223205,content:"\x1b[F\x1b[K\x1b[90mprogress: 462 / 643 @1632089\x1b[39m\r\n"},{time:223205,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 473 / 643 @1631967\x1b[39m\r\n"},{time:223205,content:"\x1b[K\x1b[F\x1b[K"},{time:223206,content:"\x1b[90mprogress: 484 / 643 @1631893\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 495 / 643 @1631737\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 506 / 643 @1631691\x1b[39m\r\n"},{time:223206,content:"\x1b[K"},{time:223206,content:"\x1b[F\x1b[K\x1b[90mprogress: 517 / 643 @1631655\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K"},{time:223206,content:"\x1b[90mprogress: 528 / 643 @1631621\x1b[39m\r\n\x1b[K"},{time:223206,content:"\x1b[F\x1b[K\x1b[90mprogress: 539 / 643 @1631581\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K"},{time:223206,content:"\x1b[90mprogress: 550 / 643 @1631559\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 561 / 643 @1631509\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 572 / 643 @1631463\x1b[39m\r\n"},{time:223206,content:"\x1b[90mprogress: 583 / 643 @1631429\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K"},{time:223206,content:"\x1b[K\x1b[F\x1b[K"},{time:223206,content:"\x1b[90mprogress: 594 / 643 @1631393\x1b[39m\r\n"},{time:223207,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 605 / 643 @1631021\x1b[39m\r\n"},{time:223207,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 616 / 643 @1630999\x1b[39m\r\n"},{time:223207,content:"\x1b[K\x1b[F\x1b[K"},{time:223207,content:"\x1b[90mprogress: 627 / 643 @1630977\x1b[39m\r\n"},{time:223207,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 638 / 643 @1630931\x1b[39m\r\n"},{time:223208,content:"\x1b[K\x1b[F\x1b[K"},{time:223208,content:"\x1b[90mClustering leak traces\x1b[39m\r\n"},{time:223267,content:"\x1b[K\x1b[F\x1b[K"},{time:223267,content:"\x1b[33mMemLab found 7 leak(s)\x1b[39m\r\n"},{time:223268,content:"\x1b[90mDiffing clusters\x1b[39m\r\n"},{time:223270,content:"\x1b[K"},{time:223270,content:"\x1b[F\x1b[K\r\n--Similar leaks in this run: 473--\r\n--Retained size of leaked objects: 294.5KB--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlatLngToXY\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@536395\x1b[39m \x1b[90m[\x1b[39m\x1b[34m132 bytes\x1b[39m\x1b[90m]\x1b[39m"},{time:223270,content:"\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@955491\x1b[39m \x1b[90m[\x1b[39m\x1b[34m68 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[nIh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@836337\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[C1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@844325\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[x8h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829419\x1b[39m \x1b[90m[\x1b[39m\x1b[34m3.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mha\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[r8h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829777\x1b[39m \x1b[90m[\x1b[39m\x1b[34m6.8MB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@830367\x1b[39m \x1b[90m[\x1b[39m\x1b[34m28 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mA:m:68:set:Roadmap:\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[m8h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@390351\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.7MB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@390167\x1b[39m \x1b[90m[\x1b[39m\x1b[34m919KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mA5,TC,B\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.v7]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@389545\x1b[39m \x1b[90m[\x1b[39m\x1b[34m65.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mjc\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[aVh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@389553\x1b[39m \x1b[90m[\x1b[39m\x1b[34m23.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mFa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[W0h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@390729\x1b[39m \x1b[90m[\x1b[39m\x1b[34m16.3KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Map]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1392807\x1b[39m \x1b[90m[\x1b[39m\x1b[34m15.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mtable\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(array)\x1b[39m \x1b[90m@1393047\x1b[39m \x1b[90m[\x1b[39m\x1b[34m15.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m15\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[P0h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1393709\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.3KB\x1b[39m\x1b[90m]\x1b[39m\r\n"},{time:223270,content:" \x1b[90m--\x1b[39m\x1b[37mcanvas\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLCanvasElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@94051\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m3\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached CanvasRenderingContext2D]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106300288\x1b[39m \x1b[90m[\x1b[39m\x1b[34m736 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n"},{time:223276,content:"\r\n--Similar leaks in this run: 77--\r\n--Retained size of leaked objects: 81KB--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlatLngToXY\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@536395\x1b[39m \x1b[90m[\x1b[39m\x1b[34m132 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@955491\x1b[39m \x1b[90m[\x1b[39m\x1b[34m68 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[nIh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@836337\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37msf\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[tRc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@827985\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mNh\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@846651\x1b[39m \x1b[90m[\x1b[39m\x1b[34m64 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@828191\x1b[39m \x1b[90m[\x1b[39m\x1b[34m736 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m$k\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[zwc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@303147\x1b[39m \x1b[90m[\x1b[39m\x1b[34m124 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mOd\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Fwc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@577499\x1b[39m \x1b[90m[\x1b[39m\x1b[34m36.9KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37myH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Bjc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1352791\x1b[39m \x1b[90m[\x1b[39m\x1b[34m388 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mFb\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[DBc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@577447\x1b[39m \x1b[90m[\x1b[39m\x1b[34m2.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.oAc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@577449\x1b[39m \x1b[90m[\x1b[39m\x1b[34m5.4KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mO\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[gAc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1149047\x1b[39m \x1b[90m[\x1b[39m\x1b[34m20 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[eAc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@306355\x1b[39m \x1b[90m[\x1b[39m\x1b[34m118.8KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mT\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.Qyc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@306379\x1b[39m \x1b[90m[\x1b[39m\x1b[34m28KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mha\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@306639\x1b[39m \x1b[90m[\x1b[39m\x1b[34m20.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m165\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[zyc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@2112105\x1b[39m \x1b[90m[\x1b[39m\x1b[34m956 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mO\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.PP]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@2112107\x1b[39m \x1b[90m[\x1b[39m\x1b[34m9.9KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mCa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1631793\x1b[39m \x1b[90m[\x1b[39m\x1b[34m384 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m8\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached Text]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@7090208\x1b[39m \x1b[90m[\x1b[39m\x1b[34m96 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m2\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1631391\x1b[39m \x1b[90m[\x1b[39m\x1b[34m160 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m7\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached Text]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106273280\x1b[39m \x1b[90m[\x1b[39m\x1b[34m96 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n\r\n--Similar leaks in this run: 79--\r\n--Retained size of leaked objects: 58.1KB--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b["},{time:223276,content:"39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlatLngToXY\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@536395\x1b[39m \x1b[90m[\x1b[39m\x1b[34m132 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@955491\x1b[39m \x1b[90m[\x1b[39m\x1b[34m68 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[nIh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@836337\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[C1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@844325\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mO\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[B1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829397\x1b[39m \x1b[90m[\x1b[39m\x1b[34m14.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mO\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[CXh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829417\x1b[39m \x1b[90m[\x1b[39m\x1b[34m2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mka\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Array]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@3029899\x1b[39m \x1b[90m[\x1b[39m\x1b[34m196 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m0\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.v7]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@390155\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mjc\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[aVh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@403033\x1b[39m \x1b[90m[\x1b[39m\x1b[34m25.9KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mFa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[W0h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@865681\x1b[39m \x1b[90m[\x1b[39m\x1b[34m13.8KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Map]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1120041\x1b[39m \x1b[90m[\x1b[39m\x1b[34m13.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mtable\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(array)\x1b[39m \x1b[90m@1120043\x1b[39m \x1b[90m[\x1b[39m\x1b[34m13.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m12\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[P0h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1122257\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.3KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcanvas\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLCanvasElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95123\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m3\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached CanvasRenderingContext2D]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106207104\x1b[39m \x1b[90m[\x1b[39m\x1b[34m736 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n\r\n--Similar leaks in this run: 1--\r\n--Retained size of leaked objects: 736 bytes--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlatLngToXY\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@536395\x1b[39m \x1b[90m[\x1b[39m\x1b[34m132 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@955491\x1b[39m \x1b[90m[\x1b[39m\x1b[34m68 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[nIh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@836337\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[C1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@844325\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mO\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m--"},{time:223276,content:"-\x1b[39m> \x1b[32m[B1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829397\x1b[39m \x1b[90m[\x1b[39m\x1b[34m14.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmf\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[D0h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@845679\x1b[39m \x1b[90m[\x1b[39m\x1b[34m2.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mha\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[V_h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@323969\x1b[39m \x1b[90m[\x1b[39m\x1b[34m952 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mTf\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@892457\x1b[39m \x1b[90m[\x1b[39m\x1b[34m596 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m427978617201219913262367069104001551995958065274705215.25483520271785833800727.75677232634339395207331.751795684530287346656945.25677232634339395207357.51167137520669053277470.5236886225445112838179864064813017677298190.7516331133490957378007108.517688983653134912985120.257596719916999682473132.517688983653134912985139.754835202717858338007152.25\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[T_h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@400619\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcanvas\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLCanvasElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@94207\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m3\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached CanvasRenderingContext2D]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106693184\x1b[39m \x1b[90m[\x1b[39m\x1b[34m736 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n\r\n--Similar leaks in this run: 7--\r\n--Retained size of leaked objects: 532 bytes--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mglobals\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1091821\x1b[39m \x1b[90m[\x1b[39m\x1b[34m2.6KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mfua\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1118697\x1b[39m \x1b[90m[\x1b[39m\x1b[34m864 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mdata\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@2135695\x1b[39m \x1b[90m[\x1b[39m\x1b[34m336 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mtarget\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLSpanElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@92981\x1b[39m \x1b[90m[\x1b[39m\x1b[34m332 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m9\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLButtonElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@92987\x1b[39m \x1b[90m[\x1b[39m\x1b[34m520 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m11\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached InternalNode]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@951600320\x1b[39m \x1b[90m[\x1b[39m\x1b[34m148 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m2\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached ElementIntersectionObserverData]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106126208\x1b[39m \x1b[90m[\x1b[39m\x1b[34m64 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n\r\n--Similar leaks in this run: 2--\r\n--Retained size of leaked objects: 488 bytes--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m_\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@585959\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1MB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mML\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@495501\x1b[39m \x1b[90m[\x1b[39m\x1b[34m19.3KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m"},{time:223276,content:"QL\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.ML]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@495199\x1b[39m \x1b[90m[\x1b[39m\x1b[34m18.6KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@495931\x1b[39m \x1b[90m[\x1b[39m\x1b[34m18.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m/maps/vt/icon/name=assets/icons/poi/tactile/tinier_dot_outline-0-tiny.png,assets/icons/poi/tactile/tinier_dot-0-tiny.png&highlight=ffffff,3e628c?scale=1\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@2344107\x1b[39m \x1b[90m[\x1b[39m\x1b[34m284 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mimage\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLImageElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1632275\x1b[39m \x1b[90m[\x1b[39m\x1b[34m244 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n\r\n--Similar leaks in this run: 4--\r\n--Retained size of leaked objects: 400 bytes--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m4\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[HTMLDocument]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95749\x1b[39m \x1b[90m[\x1b[39m\x1b[34m20.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m16\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[HTMLHtmlElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95573\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m8\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[HTMLBodyElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95893\x1b[39m \x1b[90m[\x1b[39m\x1b[34m4KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mclosure_lm_56909\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Lo]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@753333\x1b[39m \x1b[90m[\x1b[39m\x1b[34m800 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@754285\x1b[39m \x1b[90m[\x1b[39m\x1b[34m776 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mkeydown\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Array]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@584059\x1b[39m \x1b[90m[\x1b[39m\x1b[34m176 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m2\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Gqa]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@753069\x1b[39m \x1b[90m[\x1b[39m\x1b[34m112 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlistener\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@1353157\x1b[39m \x1b[90m[\x1b[39m\x1b[34m64 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@849053\x1b[39m \x1b[90m[\x1b[39m\x1b[34m80 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[HBe]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@828277\x1b[39m \x1b[90m[\x1b[39m\x1b[34m6.4KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mW\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[eAe]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@961871\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.4KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mZa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[qze]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@845485\x1b[39m \x1b[90m[\x1b[39m\x1b[34m25KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mBa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Cze]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829011\x1b[39m \x1b[90m[\x1b[39m\x1b[34m21.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mBa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.Beb]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829015\x1b[39m \x1b[90m[\x1b[39m\x1b[34m16KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mHb\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554799\x1b[39m \x1b[90m[\x1b[39m\x1b[34m14.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m9\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554797\x1b[39m \x1b[90m[\x1b[39m\x1b[34m160 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m6\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554795\x1b[39m \x1b[90m[\x1b[39m\x1b[34m160 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m6\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554793\x1b[39m \x1b[90m[\x1b[39m\x1b[34m160 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m7\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLSpanElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554777\x1b[39m \x1b[9"},{time:223277,content:"0m[\x1b[39m\x1b[34m252 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m10\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached Text]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106716992\x1b[39m \x1b[90m[\x1b[39m\x1b[34m96 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m2\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLSpanElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554781\x1b[39m \x1b[90m[\x1b[39m\x1b[34m252 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m7\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLSpanElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554779\x1b[39m \x1b[90m[\x1b[39m\x1b[34m256 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m6\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached Text]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106721792\x1b[39m \x1b[90m[\x1b[39m\x1b[34m96 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n"},{time:223460,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:225025,content:"#"},{time:225129,content:" "},{time:225738,content:"v"},{time:225921,content:"i"},{time:226002,content:"e"},{time:226074,content:"w"},{time:226145,content:" "},{time:226321,content:"a"},{time:226425,content:"l"},{time:226586,content:"l"},{time:226617,content:" "},{time:226782,content:"f"},{time:226866,content:"i"},{time:227025,content:"l"},{time:227091,content:"e"},{time:227146,content:"s"},{time:227242,content:" "},{time:229101,content:"g"},{time:229121,content:"e"},{time:229145,content:"n"},{time:229211,content:"e"},{time:229282,content:"r"},{time:229393,content:"a"},{time:229523,content:"t"},{time:229625,content:"e"},{time:229874,content:"d"},{time:229954,content:" "},{time:230145,content:"b"},{time:230281,content:"y"},{time:230401,content:" "},{time:231738,content:"m"},{time:231778,content:"e"},{time:231875,content:"m"},{time:232025,content:"l"},{time:232025,content:"a"},{time:232225,content:"b"},{time:232290,content:" "},{time:232474,content:"r"},{time:232545,content:"u"},{time:232730,content:"n"},{time:233139,content:"\r\n"},{time:233139,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:234331,content:"m"},{time:234385,content:"e"},{time:234497,content:"m"},{time:234968,content:"l"},{time:235026,content:"a"},{time:235210,content:"b"},{time:235314,content:" "},{time:235568,content:"g"},{time:235617,content:"e"},{time:235793,content:"t"},{time:235937,content:"-"},{time:236193,content:"d"},{time:236362,content:"e"},{time:236539,content:"f"},{time:236593,content:"a"},{time:236667,content:"u"},{time:236825,content:"l"},{time:236922,content:"t"},{time:237080,content:"-"},{time:237177,content:"w"},{time:237312,content:"o"},{time:237401,content:"r"},{time:237520,content:"k"},{time:237762,content:"-"},{time:237888,content:"d"},{time:238024,content:"i"},{time:238113,content:"r"},{time:238288,content:"\r\n"},{time:238484,content:"/tmp/memlab\r\n"},{time:238495,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:240337,content:"t"},{time:240513,content:"r"},{time:240690,content:"e"},{time:240818,content:"e"},{time:240920,content:" "},{time:241090,content:"-"},{time:241197,content:"d"},{time:241282,content:" "},{time:241762,content:"/"},{time:241929,content:"t"},{time:242024,content:"m"},{time:242202,content:"p"},{time:242274,content:"/"},{time:242714,content:"m"},{time:242795,content:"e"},{time:242874,content:"m"},{time:243025,content:"l"},{time:243084,content:"a"},{time:243258,content:"b"},{time:243402,content:"\r\n"},{time:243404,content:"\x1b[01;34m/tmp/memlab\x1b[00m\r\n\u251c\u2500\u2500 \x1b[01;34mchrome\x1b[00m\r\n"},{time:243404,content:"\u251c\u2500\u2500 \x1b[01;34mdata\x1b[00m\r\n"},{time:243404,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mcur\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mdataBuilder\x1b[00m\r\n"},{time:243404,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mgen-files\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mlogger\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mmetrics\x1b[00m\r\n"},{time:243404,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mtrace-clusters\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mtrace-jsons\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34munclassified-clusters\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34munique-trace-clusters\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34madd\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mdelete\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mexisting\x1b[00m\r\n"},{time:243405,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mout\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mpersist\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mreport-preview\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mreports\x1b[00m\r\n"},{time:243405,content:"\u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mprofile\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mAutofillRegex\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2021.8.17.1300\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mAutofillStates\x1b[00m\r\n"},{time:243405,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mCertificateRevocation\x1b[00m\r\n"},{time:243405,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m7439\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n"},{time:243405,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2020.11.2.164946\x1b[00m\r\n"},{time:243406,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mClientSidePhishing\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m29.0\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n"},{time:243406,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mCrowd Deny\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2022.6.6.1142\x1b[00m\r\n"},{time:243406,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n"},{time:243406,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mDefault\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mAutofillStrikeDatabase\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mblob_storage\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m8a78572a-ca3e-4c0c-b5fa-805a7f37a58f\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mBudgetDatabase\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mCache\x1b[00m\r\n"},{time:243407,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mCache_Data\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mindex-dir\x1b[00m\r\n"},{time:243408,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mCode Cache\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mjs\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mindex-dir\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mwasm\x1b[00m\r\n"},{time:243408,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mindex-dir\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mwebui_js\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mindex-dir\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mcoupon_db\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mDownload Service\x1b[00m\r\n"},{time:243408,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mEntryDB\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mFiles\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mExtension Scripts\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mExtension State\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mFeature Engagement Tracker\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mAvailabilityDB\x1b[00m\r\n"},{time:243408,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mEventDB\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mGPUCache\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mLocal Storage\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mleveldb\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34moptimization_guide_hint_cache_store\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34moptimization_guide_model_and_features_store\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSessions\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSession Storage\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mshared_proto_db\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mmetadata\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSite Characteristics Database\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mSync Data\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mLevelDB\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mDesktopSharingHub\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m20220505\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mFileTypePolicies\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m51\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mFirstPartySetsPreloaded\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2022.2.15.1\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mGrShaderCache\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mGPUCache\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mhyphen-data\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m105.0.5160.0\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mMEIPreload\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m1.0.7.1652906823\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mOnDeviceHeadSuggestModel\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m20220627.458453771\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mOptimizationGuidePredictionModels\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mOptimizationHints\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m339\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mOriginTrials\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m1.0.0.13\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mPKIMetadata\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m292\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mpnacl\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m0.57.44.2492\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_platform_specific\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mx86_64\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSafe Browsing\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSafetyTips\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2833\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mShaderCache\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mGPUCache\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSSLErrorAssistant\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m7\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSubresource Filter\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mIndexed Rules\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m35\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m9.36.0\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mUnindexed Rules\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m9.36.0\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mTrustTokenKeyCommitments\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2022.7.5.2\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mZxcvbnData\x1b[00m\r\n\u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m1\x1b[00m\r\n\u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2514\u2500\u2500 \x1b[01;34minput\x1b[00m\r\n\r\n128 directories\r\n"},{time:243410,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:246081,content:"#"},{time:246145,content:" "},{time:246394,content:"s"},{time:246577,content:"c"},{time:246761,content:"r"},{time:246912,content:"e"},{time:247048,content:"e"},{time:247225,content:"n"},{time:247377,content:"s"},{time:247497,content:"h"},{time:247648,content:"o"},{time:247673,content:"t"},{time:247744,content:"s"},{time:247848,content:" "},{time:247969,content:"a"},{time:248105,content:"n"},{time:248177,content:"d"},{time:248264,content:" "},{time:248817,content:"h"},{time:248898,content:"e"},{time:248960,content:"a"},{time:249064,content:"p"},{time:249176,content:" "},{time:249305,content:"s"},{time:249416,content:"n"},{time:249489,content:"a"},{time:249617,content:"p"},{time:249706,content:"s"},{time:249776,content:"h"},{time:249905,content:"o"},{time:249993,content:"t"},{time:250034,content:"s"},{time:250210,content:" "},{time:250330,content:"a"},{time:250481,content:"r"},{time:250539,content:"e"},{time:250642,content:" "},{time:250860,content:"s"},{time:250976,content:"t"},{time:251121,content:"o"},{time:251168,content:"r"},{time:251226,content:"e"},{time:251569,content:"d"},{time:251962,content:" "},{time:252184,content:"h"},{time:252242,content:"e"},{time:252330,content:"r"},{time:252401,content:"e"},{time:252721,content:"\r\n"},{time:252721,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:254513,content:"l"},{time:254571,content:"s"},{time:254682,content:" "},{time:254841,content:"/"},{time:255033,content:"t"},{time:255129,content:"m"},{time:255457,content:"p"},{time:257210,content:"/"},{time:257537,content:"m"},{time:257608,content:"e"},{time:257699,content:"m"},{time:257881,content:"l"},{time:257912,content:"a"},{time:258097,content:"b"},{time:258280,content:"/"},{time:259344,content:"d"},{time:259420,content:"a"},{time:259521,content:"t"},{time:259624,content:"a"},{time:259640,content:"/"},{time:260232,content:"c"},{time:260323,content:"u"},{time:260426,content:"r"},{time:260621,content:"/"},{time:260881,content:"\r\n"},{time:260883,content:"browser-info.txt run-meta.json s3.heapsnapshot \x1b[0m\x1b[01;35mscreenshot-3.png\x1b[0m\r\nconsole-log.txt s1.heapsnapshot \x1b[01;35mscreenshot-1.png\x1b[0m snap-seq.json\r\nleaks.txt s2.heapsnapshot \x1b[01;35mscreenshot-2.png\x1b[0m\r\n"},{time:260885,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:263218,content:"#"},{time:263264,content:" "},{time:263584,content:"s"},{time:263626,content:"e"},{time:263840,content:"e"},{time:263914,content:" "},{time:264256,content:"w"},{time:264401,content:"h"},{time:264546,content:"i"},{time:264584,content:"c"},{time:264704,content:"h"},{time:264801,content:" "},{time:264992,content:"o"},{time:265097,content:"b"},{time:265184,content:"j"},{time:265264,content:"e"},{time:265442,content:"c"},{time:265664,content:"t"},{time:266145,content:" "},{time:266857,content:"k"},{time:266945,content:"e"},{time:267137,content:"e"},{time:267392,content:"p"},{time:267488,content:"s"},{time:267583,content:" "},{time:267833,content:"g"},{time:268010,content:"r"},{time:268122,content:"o"},{time:268153,content:"w"},{time:268313,content:"i"},{time:268370,content:"n"},{time:268425,content:"g"},{time:268512,content:" "},{time:268649,content:"i"},{time:268687,content:"n"},{time:268769,content:" "},{time:268937,content:"s"},{time:269105,content:"i"},{time:269163,content:"z"},{time:269248,content:"e"},{time:269345,content:" "},{time:269666,content:"o"},{time:269729,content:"v"},{time:269880,content:"e"},{time:269937,content:"r"},{time:270048,content:" "},{time:270193,content:"t"},{time:270282,content:"i"},{time:270457,content:"m"},{time:270520,content:"e"},{time:270704,content:"\r\n"},{time:270704,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:271407,content:"m"},{time:271457,content:"e"},{time:271560,content:"m"},{time:271712,content:"l"},{time:271746,content:"a"},{time:271937,content:"b"},{time:272040,content:" "},{time:272312,content:"a"},{time:272394,content:"n"},{time:272481,content:"a"},{time:272568,content:"l"},{time:272665,content:"y"},{time:272760,content:"z"},{time:272815,content:"e"},{time:272882,content:" "},{time:274328,content:"u"},{time:274505,content:"n"},{time:274792,content:"b"},{time:274912,content:"o"},{time:274977,content:"u"},{time:275135,content:"n"},{time:275219,content:"d"},{time:275361,content:"-"},{time:275601,content:"o"},{time:275697,content:"b"},{time:275784,content:"j"},{time:275880,content:"e"},{time:276041,content:"c"},{time:276210,content:"t"},{time:276297,content:"\r\n"},{time:276498,content:"Memory usage across all steps:\r\n"},{time:276501,content:"35.0 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\r\n30.7 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\r\n26.5 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[30m_\x1b[39m\r\n22.2 \x1b[32m\u2584\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n18.0 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n13.7 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 9.5 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 5.2 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 1.0 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 1 2 3 \r\n"},{time:276502,content:"\r\n"},{time:276503,content:"\x1b[90mChecking unbounded objects...\x1b[39m\r\n"},{time:276508,content:"\x1b[K"},{time:276508,content:"\x1b[F\x1b[K\x1b[90mparsing /tmp/memlab/data/cur/s1.heapsnapshot ...\x1b[39m\r\n"},{time:277830,content:"\x1b[K"},{time:277830,content:"\x1b[F\x1b[K"},{time:277830,content:"\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:277831,content:"\x1b[K\x1b[F\x1b[K"},{time:277831,content:"\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:277836,content:"\x1b[F\x1b[K"},{time:277836,content:"\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:277836,content:"\x1b[K"},{time:277979,content:"\x1b[K"},{time:277979,content:"\x1b[F\x1b[K"},{time:277979,content:"\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:278018,content:"\x1b[K\x1b[F\x1b[K"},{time:278018,content:"\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:278179,content:"\x1b[K"},{time:278179,content:"\x1b[F\x1b[K\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:278270,content:"\x1b[K"},{time:278270,content:"\x1b[F\x1b[K"},{time:278270,content:"\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:278271,content:"\x1b[K"},{time:278271,content:"\x1b[F\x1b[K\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:278290,content:"\x1b[K\x1b[F\x1b[K"},{time:278290,content:"\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:280049,content:"\x1b[K"},{time:280049,content:"\x1b[F\x1b[K"},{time:280049,content:"\x1b[90mparsing /tmp/memlab/data/cur/s2.heapsnapshot ...\x1b[39m\r\n"},{time:281644,content:"\x1b[K\x1b[F\x1b[K"},{time:281644,content:"\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:281644,content:"\x1b[K\x1b[F\x1b[K\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:281649,content:"\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:281649,content:"\x1b[K\x1b[F\x1b[K"},{time:281818,content:"\x1b[K\x1b[F\x1b[K"},{time:281818,content:"\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:281833,content:"\x1b[K\x1b[F\x1b[K"},{time:281833,content:"\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:282179,content:"\x1b[K\x1b[F\x1b[K"},{time:282179,content:"\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:282256,content:"\x1b[K\x1b[F\x1b[K"},{time:282256,content:"\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:282258,content:"\x1b[K\x1b[F\x1b[K\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:282355,content:"\x1b[K\x1b[F\x1b[K"},{time:282356,content:"\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:284378,content:"\x1b[K"},{time:284378,content:"\x1b[F\x1b[K\x1b[90mparsing /tmp/memlab/data/cur/s3.heapsnapshot ...\x1b[39m\r\n"},{time:285900,content:"\x1b[F\x1b[K\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:285900,content:"\x1b[K"},{time:285907,content:"\x1b[K"},{time:285907,content:"\x1b[F\x1b[K\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:285919,content:"\x1b[K"},{time:285920,content:"\x1b[F\x1b[K\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:286066,content:"\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:286066,content:"\x1b[K\x1b[F\x1b[K"},{time:286088,content:"\x1b[K"},{time:286088,content:"\x1b[F\x1b[K\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:286506,content:"\x1b[K\x1b[F\x1b[K"},{time:286506,content:"\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:286573,content:"\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:286573,content:"\x1b[K\x1b[F\x1b[K"},{time:286575,content:"\x1b[K"},{time:286576,content:"\x1b[F\x1b[K\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:286695,content:"\x1b[F\x1b[K\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:286695,content:"\x1b[K"},{time:288809,content:"\x1b[K"},{time:288810,content:"\x1b[F\x1b[K"},{time:288810,content:"Top growing objects in sizes:\r\n"},{time:288810,content:"\x1b[90m (Use `memlab trace --node-id=@ID` to get trace)\x1b[39m\r\n\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mR5h\x1b[22m\x1b[39m [object](\x1b[90m@831333\x1b[39m): 9.6MB\x1b[90m > \x1b[39m9.6MB\x1b[90m > \x1b[39m9.6MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mr8h\x1b[22m\x1b[39m [object](\x1b[90m@829777\x1b[39m): 12.6KB\x1b[90m > \x1b[39m3.4MB\x1b[90m > \x1b[39m6.8MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1md5h\x1b[22m\x1b[39m [object](\x1b[90m@952237\x1b[39m): 6.1MB\x1b[90m > \x1b[39m6.1MB\x1b[90m > \x1b[39m6.1MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mArray\x1b[22m\x1b[39m [object](\x1b[90m@952239\x1b[39m): 3.2MB\x1b[90m > \x1b[39m3.2MB\x1b[90m > \x1b[39m3.2MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mArray\x1b[22m\x1b[39m [object](\x1b[90m@952295\x1b[39m): 2.3MB\x1b[90m > \x1b[39m2.3MB\x1b[90m > \x1b[39m2.3MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mm8h\x1b[22m\x1b[39m [object](\x1b[90m@390351\x1b[39m): 2.1KB\x1b[90m > \x1b[39m3.4MB\x1b[90m > \x1b[39m1.7MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mArray\x1b[22m\x1b[39m [object](\x1b[90m@917939\x1b[39m): 1.4MB\x1b[90m > \x1b[39m1.4MB\x1b[90m > \x1b[39m1.4MB\r\n\x1b[90m\xb7 \x1b[39mObject \x1b[1m{ \x1b[22m\x1b[32m$Ia\x1b[39m\x1b[90m, \x1b[39m\x1b[32m$y\x1b[39m\x1b[90m, \x1b[39m\x1b[32mHeb\x1b[39m\x1b[90m, \x1b[39m\x1b[32mHxb\x1b[39m\x1b[90m, \x1b[39m\x1b[32mpAa\x1b[39m\x1b[90m, \x1b[39m...\x1b[1m }\x1b[22m [object](\x1b[90m@585959\x1b[39m): 1MB\x1b[90m > \x1b[39m1MB\x1b[90m > \x1b[39m1.1MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1msystem / Context\x1b[22m\x1b[39m [object](\x1b[90m@301477\x1b[39m): 949.2KB\x1b[90m > \x1b[39m955.2KB\x1b[90m > \x1b[39m952.8KB\r\n\x1b[90m\xb7 \x1b[39mObject \x1b[1m{ \x1b[22m\x1b[1m }\x1b[22m [object](\x1b[90m@390167\x1b[39m): 28 bytes\x1b[90m > \x1b[39m28 bytes\x1b[90m > \x1b[39m919KB\r\n\x1b[90m\xb7 \x1b[39mObject \x1b[1m{ \x1b[22m\x1b[32m55,RC,B\x1b[39m\x1b[90m, \x1b[39m\x1b[32m85,PC,B\x1b[39m\x1b[90m, \x1b[39m\x1b[32mD5,NC,B\x1b[39m\x1b[90m, \x1b[39m\x1b[32mG1,63,9\x1b[39m\x1b[90m, \x1b[39m\x1b[32mH1,63,9\x1b[39m\x1b[90m, \x1b[39m...\x1b[1m }\x1b[22m [object](\x1b[90m@390073\x1b[39m): 1.5KB\x1b[90m > \x1b[39m3.4MB\x1b[90m > \x1b[39m853.9KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1msystem / Context\x1b[22m\x1b[39m [object](\x1b[90m@315397\x1b[39m): 354.9KB\x1b[90m > \x1b[39m384.1KB\x1b[90m > \x1b[39m388.7KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mKq\x1b[22m\x1b[39m [object](\x1b[90m@605759\x1b[39m): 299.2KB\x1b[90m > \x1b[39m300.5KB\x1b[90m > \x1b[39m300.5KB\r\n\x1b[90m\xb7 \x1b[39mObject \x1b[1m{ \x1b[22m\x1b[32msy56\x1b[39m\x1b[90m, \x1b[39m\x1b[32msy9o\x1b[39m\x1b[90m, \x1b[39m\x1b[32msyad\x1b[39m\x1b[90m, \x1b[39m\x1b[32msyds\x1b[39m\x1b[90m, \x1b[39m\x1b[32msywf\x1b[39m\x1b[90m, \x1b[39m...\x1b[1m }\x1b[22m [object](\x1b[90m@605761\x1b[39m): 295.5KB\x1b[90m > \x1b[39m296.7KB\x1b[90m > \x1b[39m296.7KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1msystem / Context\x1b[22m\x1b[39m [object](\x1b[90m@293283\x1b[39m): 200.1KB\x1b[90m > \x1b[39m195.4KB\x1b[90m > \x1b[39m195.9KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mHee\x1b[22m\x1b[39m [object](\x1b[90m@828193\x1b[39m): 154.5KB\x1b[90m > \x1b[39m155.1KB\x1b[90m > \x1b[39m155.1KB\r\n\x1b[90m\xb7 \x1b[39mObject \x1b[1m{ \x1b[22m\x1b[32mA:m\x1b[39m\x1b[1m }\x1b[22m [object](\x1b[90m@947431\x1b[39m): 154.2KB\x1b[90m > \x1b[39m154.7KB\x1b[90m > \x1b[39m154.7KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mGee\x1b[22m\x1b[39m [object](\x1b[90m@947433\x1b[39m): 154KB\x1b[90m > \x1b[39m154.6KB\x1b[90m > \x1b[39m154.6KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mFee\x1b[22m\x1b[39m [object](\x1b[90m@947591\x1b[39m): 153.8KB\x1b[90m > \x1b[39m154.4KB\x1b[90m > \x1b[39m154.4KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mDee\x1b[22m\x1b[39m [object](\x1b[90m@947601\x1b[39m): 153.4KB\x1b[90m > \x1b[39m154KB\x1b[90m > \x1b[39m154KB\r\n"},{time:288856,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:290464,content:"#",timeGapFromPreviousStep:3e3},{time:290529,content:" "},{time:290880,content:"n"},{time:290913,content:"o"},{time:291017,content:"t"},{time:291152,content:"i"},{time:291296,content:"c"},{time:292288,content:"e"},{time:292497,content:" "},{time:292728,content:"t"},{time:292863,content:"h"},{time:292930,content:"a"},{time:293008,content:"t"},{time:293097,content:" "},{time:293225,content:"t"},{time:293313,content:"h"},{time:293383,content:"e"},{time:293451,content:" "},{time:293642,content:"s"},{time:293697,content:"e"},{time:293889,content:"c"},{time:293975,content:"o"},{time:294009,content:"n"},{time:294112,content:"d"},{time:294183,content:" "},{time:294344,content:"o"},{time:294456,content:"b"},{time:294545,content:"j"},{time:294625,content:"e"},{time:294799,content:"c"},{time:294992,content:"t"},{time:295071,content:" "},{time:295312,content:"k"},{time:295368,content:"e"},{time:295511,content:"e"},{time:295642,content:"p"},{time:295761,content:"s"},{time:295865,content:" "},{time:296183,content:"g"},{time:296362,content:"r"},{time:296466,content:"o"},{time:296520,content:"w"},{time:296679,content:"i"},{time:296720,content:"n"},{time:296791,content:"g"},{time:296872,content:" "},{time:297583,content:"f"},{time:297768,content:"r"},{time:297832,content:"o"},{time:298007,content:"m"},{time:298624,content:"\r\n"},{time:298624,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:299215,content:"#"},{time:299295,content:" "},{time:299776,content:"1"},{time:299833,content:"2"},{time:300503,content:"K"},{time:300601,content:"B"},{time:300768,content:" "},{time:300991,content:"t"},{time:301101,content:"o"},{time:301176,content:" "},{time:301920,content:"6"},{time:302070,content:"."},{time:302220,content:"8"},{time:302304,content:"M"},{time:302385,content:"B"},{time:303015,content:"!"},{time:303327,content:"\r\n"},{time:303328,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:305673,content:"#"},{time:305751,content:" "},{time:306272,content:"y"},{time:306423,content:"o"},{time:306488,content:"u"},{time:306532,content:" "},{time:306738,content:"c"},{time:306785,content:"a"},{time:306879,content:"n"},{time:306959,content:" "},{time:307096,content:"a"},{time:307216,content:"l"},{time:307312,content:"s"},{time:307408,content:"o"},{time:307487,content:" "},{time:307663,content:"v"},{time:307784,content:"i"},{time:307855,content:"e"},{time:307921,content:"w"},{time:307984,content:" "},{time:308225,content:"t"},{time:308337,content:"h"},{time:308425,content:"e"},{time:308567,content:" "},{time:308897,content:"r"},{time:308928,content:"e"},{time:309128,content:"t"},{time:309175,content:"a"},{time:309320,content:"i"},{time:309366,content:"n"},{time:309471,content:"e"},{time:309504,content:"r"},{time:309720,content:" "},{time:309927,content:"t"},{time:310079,content:"r"},{time:310153,content:"a"},{time:310336,content:"c"},{time:310511,content:"e"},{time:310608,content:" "},{time:311055,content:"o"},{time:311121,content:"f"},{time:311216,content:" "},{time:311375,content:"a"},{time:311478,content:"n"},{time:311672,content:"y"},{time:311816,content:" "},{time:312057,content:"o"},{time:312137,content:"b"},{time:312249,content:"j"},{time:312295,content:"e"},{time:312473,content:"c"},{time:312633,content:"t"},{time:312776,content:"\r\n"},{time:312776,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:313145,content:"#"},{time:313286,content:" "},{time:314255,content:"i"},{time:314295,content:"n"},{time:314398,content:" "},{time:315040,content:"a"},{time:315135,content:"n"},{time:315344,content:"y"},{time:315415,content:" "},{time:315575,content:"h"},{time:315664,content:"e"},{time:315711,content:"a"},{time:315806,content:"p"},{time:316984,content:" "},{time:317135,content:"s"},{time:317247,content:"n"},{time:317311,content:"a"},{time:317439,content:"p"},{time:317489,content:"s"},{time:317614,content:"h"},{time:317760,content:"o"},{time:317847,content:"t"},{time:318096,content:"\r\n\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:320126,content:"m"},{time:320192,content:"e"},{time:320272,content:"m"},{time:320430,content:"l"},{time:320455,content:"a"},{time:320618,content:"b"},{time:320734,content:" "},{time:320952,content:"t"},{time:321151,content:"r"},{time:321194,content:"a"},{time:321407,content:"c"},{time:321599,content:"e"},{time:321647,content:" "},{time:322238,content:"-"},{time:322383,content:"-"},{time:322704,content:"n"},{time:322742,content:"o"},{time:322800,content:"d"},{time:322976,content:"e"},{time:323887,content:"-"},{time:324112,content:"i"},{time:324159,content:"d"},{time:324368,content:" "},{time:327703,content:"@829777"},{time:328047,content:"\r\n"},{time:328253,content:"\x1b[90mGenerating report for node @829777\x1b[39m\r\n"},{time:328254,content:"\x1b[K"},{time:328255,content:"\x1b[F\x1b[K"},{time:328255,content:"\x1b[90mparsing /tmp/memlab/data/cur/s3.heapsnapshot ...\x1b[39m\r\n"},{time:329810,content:"\x1b[K"},{time:329811,content:"\x1b[F\x1b[K"},{time:329811,content:"\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:329812,content:"\x1b[K"},{time:329812,content:"\x1b[F\x1b[K"},{time:329812,content:"\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:329819,content:"\x1b[F\x1b[K\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:329819,content:"\x1b[K"},{time:329991,content:"\x1b[F\x1b[K\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:329991,content:"\x1b[K"},{time:330027,content:"\x1b[K"},{time:330027,content:"\x1b[F\x1b[K"},{time:330027,content:"\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:330454,content:"\x1b[K"},{time:330454,content:"\x1b[F\x1b[K\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:330557,content:"\x1b[K"},{time:330557,content:"\x1b[F\x1b[K\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:330558,content:"\x1b[K"},{time:330558,content:"\x1b[F\x1b[K"},{time:330558,content:"\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:330579,content:"\x1b[K"},{time:330579,content:"\x1b[F\x1b[K"},{time:330579,content:"\x1b[90mstart analysis...\x1b[39m\r\n"},{time:330579,content:"\x1b[K"},{time:330579,content:"\x1b[F\x1b[K"},{time:330579,content:"\x1b[90mannotating shortest path for all nodes\x1b[39m\r\n"},{time:331717,content:"\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:331717,content:"\x1b[K\x1b[F\x1b[K"},{time:333496,content:"\x1b[K\x1b[F\x1b[K"},{time:333496,content:"\x1b[90mmarking all detached Fiber nodes...\x1b[39m\r\n"},{time:333523,content:"\x1b[90mmarking alternate Fiber nodes...\x1b[39m\r\n"},{time:333523,content:"\x1b[K\x1b[F\x1b[K"},{time:333561,content:"\x1b[K\x1b[F\x1b[K"},{time:333561,content:"\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlatLngToXY\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@536395\x1b[39m \x1b[90m[\x1b[39m\x1b[34m132 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@955491\x1b[39m \x1b[90m[\x1b[39m\x1b[34m68 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[nIh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@836337\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[C1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@844325\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[x8h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829419\x1b[39m \x1b[90m[\x1b[39m\x1b[34m3.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mha\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[r8h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829777\x1b[39m \x1b[90m[\x1b[39m\x1b[34m6.8MB\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n"},{time:333589,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:334871,content:"#"},{time:334943,content:" "},{time:335639,content:"a"},{time:335766,content:"l"},{time:335855,content:"t"},{time:336015,content:"e"},{time:336055,content:"r"},{time:336271,content:"n"},{time:336312,content:"a"},{time:336431,content:"t"},{time:336530,content:"i"},{time:336679,content:"v"},{time:336758,content:"e"},{time:336800,content:"l"},{time:336911,content:"y"},{time:337234,content:","},{time:337382,content:" "},{time:339759,content:"y"},{time:339911,content:"o"},{time:340462,content:"u"},{time:340641,content:" "},{time:340879,content:"c"},{time:340937,content:"a"},{time:341007,content:"n"},{time:341112,content:" "},{time:341320,content:"v"},{time:341432,content:"i"},{time:341486,content:"e"},{time:341574,content:"w"},{time:341631,content:" "},{time:342302,content:"t"},{time:342455,content:"h"},{time:342527,content:"e"},{time:342607,content:" "},{time:342782,content:"r"},{time:342849,content:"e"},{time:343007,content:"t"},{time:343064,content:"a"},{time:343145,content:"i"},{time:343182,content:"n"},{time:343294,content:"e"},{time:343352,content:"r"},{time:343448,content:" "},{time:343624,content:"t"},{time:343814,content:"r"},{time:343856,content:"a"},{time:344047,content:"c"},{time:344214,content:"e"},{time:344384,content:"\r\n"},{time:344385,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:346110,content:"#"},{time:346177,content:" "},{time:346455,content:"b"},{time:346560,content:"y"},{time:346672,content:" "},{time:346959,content:"o"},{time:347030,content:"p"},{time:347303,content:"e"},{time:347414,content:"n"},{time:347591,content:"i"},{time:347648,content:"n"},{time:347791,content:"g"},{time:348655,content:" "},{time:348831,content:"t"},{time:348943,content:"h"},{time:349008,content:"e"},{time:349070,content:" "},{time:350223,content:"h"},{time:350271,content:"e"},{time:350327,content:"a"},{time:350438,content:"p"},{time:350663,content:" "},{time:350798,content:"s"},{time:350920,content:"n"},{time:350999,content:"a"},{time:351088,content:"p"},{time:351216,content:"s"},{time:351263,content:"h"},{time:351382,content:"o"},{time:351486,content:"t"},{time:351559,content:" "},{time:351735,content:"f"},{time:351807,content:"i"},{time:351974,content:"l"},{time:352063,content:"e"},{time:352134,content:" "},{time:352375,content:"i"},{time:352431,content:"n"},{time:352486,content:" "},{time:353040,content:"C"},{time:353182,content:"h"},{time:353287,content:"r"},{time:353406,content:"o"},{time:353583,content:"m"},{time:353653,content:"e"},{time:354336,content:"\r\n"},{time:354336,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:354640,content:"#"},{time:354839,content:" "},{time:355406,content:"D"},{time:355615,content:"e"},{time:355783,content:"v"},{time:356559,content:"t"},{time:356662,content:"o"},{time:356798,content:"o"},{time:356966,content:"l"},{time:357022,content:"s"},{time:357127,content:" "},{time:358111,content:"a"},{time:358247,content:"n"},{time:358310,content:"d"},{time:358415,content:" "},{time:358566,content:"s"},{time:358606,content:"e"},{time:358742,content:"a"},{time:358797,content:"r"},{time:359031,content:"c"},{time:359119,content:"h"},{time:359560,content:"i"},{time:359589,content:"n"},{time:359647,content:"g"},{time:359726,content:" "},{time:359879,content:"f"},{time:359998,content:"o"},{time:360056,content:"r"},{time:360152,content:" "},{time:360614,content:"@829777"},{time:360975,content:"\r\n"},{time:360975,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:363510,content:"\r\n"},{time:363510,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:368767,content:"\x07"},{time:371054,content:"#"},{time:371165,content:" "},{time:371518,content:"v"},{time:371703,content:"i"},{time:371765,content:"e"},{time:371869,content:"w"},{time:371918,content:" "},{time:372161,content:"d"},{time:372294,content:"e"},{time:372440,content:"t"},{time:372518,content:"a"},{time:372734,content:"c"},{time:372830,content:"h"},{time:372918,content:"e"},{time:373054,content:"d"},{time:373190,content:" "},{time:373575,content:"D"},{time:373702,content:"O"},{time:373886,content:"M"},{time:374005,content:" "},{time:374238,content:"e"},{time:374351,content:"l"},{time:374415,content:"e"},{time:374526,content:"m"},{time:374576,content:"e"},{time:374670,content:"n"},{time:374759,content:"t"},{time:374822,content:"s"},{time:374902,content:" "},{time:375045,content:"i"},{time:375085,content:"n"},{time:375135,content:" "},{time:375405,content:"a"},{time:375575,content:" "},{time:375814,content:"s"},{time:375950,content:"p"},{time:376022,content:"e"},{time:376214,content:"c"},{time:376301,content:"i"},{time:376375,content:"f"},{time:376501,content:"i"},{time:376622,content:"c"},{time:377470,content:" "},{time:377654,content:"h"},{time:377709,content:"e"},{time:377766,content:"a"},{time:377870,content:"p"},{time:377975,content:" "},{time:378102,content:"s"},{time:378213,content:"n"},{time:378263,content:"a"},{time:378398,content:"p"},{time:378472,content:"s"},{time:378574,content:"h"},{time:378709,content:"o"},{time:378783,content:"t"},{time:379725,content:"\r\n"},{time:379725,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:382262,content:"m"},{time:382278,content:"e"},{time:382399,content:"m"},{time:382767,content:"l"},{time:382845,content:"a"},{time:383053,content:"b"},{time:383174,content:" "},{time:383405,content:"a"},{time:383494,content:"n"},{time:383566,content:"a"},{time:383670,content:"l"},{time:383737,content:"y"},{time:383839,content:"z"},{time:383918,content:"e"},{time:383990,content:" "},{time:385008,content:"d"},{time:385157,content:"e"},{time:385318,content:"t"},{time:385381,content:"a"},{time:385583,content:"c"},{time:385669,content:"h"},{time:385765,content:"e"},{time:385902,content:"d"},{time:386173,content:"-"},{time:386518,content:"D"},{time:386614,content:"O"},{time:386829,content:"M"},{time:387023,content:" "},{time:387639,content:"-"},{time:387774,content:"-"},{time:387877,content:"s"},{time:388006,content:"n"},{time:388064,content:"a"},{time:388197,content:"p"},{time:388277,content:"s"},{time:388510,content:"h"},{time:388774,content:"o"},{time:388966,content:"t"},{time:389615,content:" "},{time:390255,content:"/"},{time:390389,content:"t"},{time:390517,content:"m"},{time:390701,content:"p"},{time:390783,content:"/"},{time:390998,content:"m"},{time:391092,content:"e"},{time:391166,content:"m"},{time:393117,content:"l"},{time:393191,content:"a"},{time:393349,content:"b"},{time:393471,content:"/"},{time:394221,content:"d"},{time:394296,content:"a"},{time:394406,content:"t"},{time:394478,content:"a"},{time:394549,content:"/"},{time:394758,content:"c"},{time:394877,content:"u"},{time:394941,content:"r \r\n"},{time:395167,content:"/"},{time:396358,content:"s"},{time:396663,content:"1"},{time:396991,content:".heapsnapshot "},{time:397429,content:"\r\n"},{time:397632,content:"\x1b[90mparsing /tmp/memlab/data/cur/s1.heapsnapshot ...\x1b[39m\r\n"},{time:398959,content:"\x1b[K"},{time:398959,content:"\x1b[F\x1b[K\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:398960,content:"\x1b[K"},{time:398960,content:"\x1b[F\x1b[K"},{time:398960,content:"\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:398965,content:"\x1b[K"},{time:398966,content:"\x1b[F\x1b[K"},{time:398966,content:"\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:399112,content:"\x1b[F\x1b[K\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:399112,content:"\x1b[K"},{time:399152,content:"\x1b[K"},{time:399152,content:"\x1b[F\x1b[K"},{time:399152,content:"\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:399311,content:"\x1b[K"},{time:399311,content:"\x1b[F\x1b[K"},{time:399311,content:"\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:399400,content:"\x1b[K"},{time:399400,content:"\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:399400,content:"\x1b[F\x1b[K"},{time:399402,content:"\x1b[K"},{time:399402,content:"\x1b[F\x1b[K"},{time:399402,content:"\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:399421,content:"\x1b[K"},{time:399421,content:"\x1b[F\x1b[K"},{time:399421,content:"\x1b[90mannotating shortest path for all nodes\x1b[39m\r\n"},{time:400358,content:"\x1b[K\x1b[F\x1b[K"},{time:400359,content:"\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:401889,content:"\x1b[K\x1b[F\x1b[K"},{time:401889,content:"\x1b[90mmarking all detached Fiber nodes...\x1b[39m\r\n"},{time:401912,content:"\x1b[K\x1b[F\x1b[K"},{time:401912,content:"\x1b[90mmarking alternate Fiber nodes...\x1b[39m\r\n"},{time:401983,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@93679\x1b[39m native \x1b[34m\x1b[1mDetached HTMLDivElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 13 edges\x1b[90m,\x1b[39m 4.2KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39melement\x1b[90m, \x1b[39mO\x1b[90m]\x1b[39m\r\n"},{time:401983,content:"\x1b[K\x1b[F\x1b[K"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@93693\x1b[39m native \x1b[34m\x1b[1mDetached HTMLDivElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 13 edges\x1b[90m,\x1b[39m 3.4KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39melement\x1b[90m, \x1b[39mO\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@95895\x1b[39m native \x1b[34m\x1b[1mDetached HTMLDivElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 11 edges\x1b[90m,\x1b[39m 2.8KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mHb\x1b[90m, \x1b[39msrc\x1b[90m, \x1b[39mW\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@93699\x1b[39m native \x1b[34m\x1b[1mDetached HTMLDivElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 13 edges\x1b[90m,\x1b[39m 2.3KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39melement\x1b[90m, \x1b[39mO\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@93855\x1b[39m native \x1b[34m\x1b[1mDetached HTMLDivElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 9 edges\x1b[90m,\x1b[39m 1.4KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39m\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91765\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91769\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91773\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91777\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91781\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91785\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91789\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91793\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91797\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91801\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91805\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91809\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91813\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91817\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91821\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91841\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91845\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91849\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91853\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91857\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91861\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91865\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91869\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91873\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91877\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91881\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91885\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91889\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91923\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91927\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91931\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91935\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91939\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91943\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91977\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91981\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91985\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91989\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91993\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91997\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:402010,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:403685,content:"#"},{time:403735,content:" "},{time:404020,content:"t"},{time:404206,content:"r"},{time:404309,content:"y"},{time:404438,content:" "},{time:404662,content:"o"},{time:404726,content:"u"},{time:404775,content:"t"},{time:404862,content:" "},{time:405070,content:"o"},{time:405126,content:"t"},{time:405238,content:"h"},{time:405309,content:"e"},{time:405388,content:"r"},{time:405455,content:" "},{time:405672,content:"c"},{time:405725,content:"o"},{time:405901,content:"m"},{time:406029,content:"m"},{time:406126,content:"a"},{time:406197,content:"n"},{time:406292,content:"d"},{time:406349,content:"s"},{time:407245,content:"\r\n"},{time:407245,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:407854,content:"m"},{time:407887,content:"e"},{time:407998,content:"m"},{time:408150,content:"l"},{time:408166,content:"a"},{time:408325,content:"b"},{time:408421,content:" "},{time:408622,content:"h"},{time:408698,content:"e"},{time:408800,content:"l"},{time:408989,content:"p"},{time:409212,content:"\r\n"},{time:409411,content:"\r\n memlab: memory leak detector for front-end JS\r\n\r\n"},{time:409412,content:"\x1b[1m COMMON COMMANDS\x1b[22m\r\n"},{time:409412,content:"\r\n"},{time:409413,content:" \x1b[32mmemlab run --app=comet --interaction=watch\x1b[39m\r\n Find memory leaks in web apps\r\n"},{time:409414,content:"\x1b[90m\x1b[1m Options:\x1b[22m --work-dir --app --interaction --full --skip-snapshot\x1b[39m\r\n\x1b[90m --skip-screenshot --skip-gc --skip-scroll\x1b[39m\r\n\x1b[90m --skip-extra-ops --run-mode --local-puppeteer --scenario\x1b[39m\r\n\x1b[90m --device --disable-xvfb --baseline --target --final\x1b[39m\r\n\x1b[90m --snapshot-dir --engine --leak-filter\x1b[39m\r\n\x1b[90m --oversize-threshold --trace-all-objects\x1b[39m\r\n\x1b[90m --save-trace-as-unclassified-cluster\x1b[39m\r\n"},{time:409414,content:"\r\n"},{time:409414,content:" \x1b[32mmemlab list\x1b[39m\r\n List all test scenarios\r\n"},{time:409414,content:"\r\n"},{time:409414,content:" \x1b[32mmemlab trace --node-id=@3123123\x1b[39m\r\n Report retainer trace of a specific node, use with --nodeId\r\n"},{time:409415,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot --snapshot-dir --engine --node-id\x1b[39m\r\n"},{time:409415,content:"\r\n"},{time:409415,content:" \x1b[32mmemlab find-leaks\x1b[39m\r\n Find memory leaks in heap snapshots\r\n"},{time:409415,content:"\x1b[90m\x1b[1m Options:\x1b[22m --baseline --target --final --snapshot-dir --engine\x1b[39m\r\n\x1b[90m --leak-filter --oversize-threshold --trace-all-objects\x1b[39m\r\n\x1b[90m --save-trace-as-unclassified-cluster --work-dir\x1b[39m\r\n"},{time:409415,content:"\r\n"},{time:409415,content:" \x1b[32mmemlab analyze [PLUGIN_OPTIONS]\x1b[39m\r\n Run heap analysis plugins\r\n"},{time:409415,content:"\x1b[90m\x1b[1m Options:\x1b[22m --work-dir\x1b[39m\r\n"},{time:409415,content:"\r\n"},{time:409416,content:" \x1b[32mmemlab help [SUB-COMMANDS]\x1b[39m\r\n List all MemLab CLI commands or print helper text for a specific command\r\n"},{time:409416,content:"\r\n"},{time:409416,content:"\r\n"},{time:409416,content:"\x1b[1m DEV COMMANDS\x1b[22m\r\n"},{time:409416,content:"\r\n"},{time:409416,content:"\r\n"},{time:409417,content:"\r\n"},{time:409417,content:"\x1b[1m MISC COMMANDS\x1b[22m\r\n"},{time:409417,content:" \x1b[32mmemlab reset\x1b[39m\r\n Reset and initialize all directories\r\n"},{time:409417,content:"\x1b[90m\x1b[1m Options:\x1b[22m --work-dir\x1b[39m\r\n"},{time:409417,content:"\r\n"},{time:409417,content:" \x1b[32mmemlab measure\x1b[39m\r\n Run test scenario in measure mode\r\n"},{time:409417,content:"\x1b[90m\x1b[1m Options:\x1b[22m --run-num --app --interaction --full --skip-snapshot\x1b[39m\r\n\x1b[90m --skip-screenshot --skip-gc --skip-scroll\x1b[39m\r\n\x1b[90m --skip-extra-ops --run-mode --local-puppeteer --scenario\x1b[39m\r\n\x1b[90m --device --disable-xvfb --work-dir\x1b[39m\r\n"},{time:409417,content:"\r\n"},{time:409417,content:" \x1b[32mmemlab warmup\x1b[39m\r\n Warm up the target app\r\n"},{time:409419,content:"\x1b[90m\x1b[1m Options:\x1b[22m --app --interaction --run-mode --local-puppeteer\x1b[39m\r\n\x1b[90m --scenario --device --disable-xvfb --skip-warmup\x1b[39m\r\n\x1b[90m --work-dir\x1b[39m\r\n"},{time:409419,content:"\r\n"},{time:409419,content:" \x1b[32mmemlab get-default-work-dir\x1b[39m\r\n Query the default working directory\r\n\r\n \x1b[32mmemlab snapshot\x1b[39m\r\n Interact with web app and take heap snapshots\r\n\x1b[90m\x1b[1m Options:\x1b[22m --app --interaction --full --skip-snapshot\x1b[39m\r\n\x1b[90m --skip-screenshot --skip-gc --skip-scroll\x1b[39m\r\n\x1b[90m --skip-extra-ops --run-mode --local-puppeteer --scenario\x1b[39m\r\n\x1b[90m --device --disable-xvfb --work-dir\x1b[39m\r\n\r\n \x1b[32mmemlab warmup-and-snapshot\x1b[39m\r\n Warm up server and take heap snapshots\r\n\x1b[90m\x1b[1m Options:\x1b[22m --work-dir --app --interaction --run-mode\x1b[39m\r\n\x1b[90m --local-puppeteer --scenario --device --disable-xvfb\x1b[39m\r\n\x1b[90m --skip-warmup --full --skip-snapshot --skip-screenshot\x1b[39m\r\n\x1b[90m --skip-gc --skip-scroll --skip-extra-ops\x1b[39m\r\n\r\n\r\n"},{time:409429,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:410926,content:"#"},{time:411037,content:" "},{time:411389,content:"o"},{time:411428,content:"r"},{time:411557,content:" "},{time:411702,content:"y"},{time:411861,content:"o"},{time:411918,content:"u"},{time:411966,content:" "},{time:412182,content:"c"},{time:412237,content:"a"},{time:412349,content:"n"},{time:412444,content:" "},{time:412910,content:"v"},{time:413036,content:"i"},{time:413109,content:"e"},{time:413174,content:"w"},{time:413293,content:" "},{time:413605,content:"t"},{time:413661,content:"h"},{time:413772,content:"e"},{time:413830,content:" "},{time:414022,content:"h"},{time:415397,content:"e"},{time:415573,content:"l"},{time:415790,content:"p"},{time:415845,content:"e"},{time:415918,content:"r"},{time:416013,content:" "},{time:416356,content:"t"},{time:416398,content:"e"},{time:416613,content:"x"},{time:416773,content:"t"},{time:416831,content:" "},{time:416972,content:"o"},{time:417030,content:"f"},{time:417118,content:" "},{time:417197,content:"a"},{time:417301,content:" "},{time:417438,content:"s"},{time:417556,content:"p"},{time:417646,content:"e"},{time:417876,content:"c"},{time:418028,content:"i"},{time:418102,content:"f"},{time:418213,content:"i"},{time:418309,content:"c"},{time:418476,content:" "},{time:418638,content:"c"},{time:418742,content:"o"},{time:418917,content:"m"},{time:419052,content:"m"},{time:419116,content:"a"},{time:419214,content:"n"},{time:419263,content:"d"},{time:419677,content:"\r\n"},{time:419677,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:420517,content:"m"},{time:420550,content:"e"},{time:420663,content:"m"},{time:420813,content:"l"},{time:420829,content:"a"},{time:420988,content:"b"},{time:421101,content:" "},{time:421453,content:"h"},{time:421525,content:"e"},{time:421612,content:"l"},{time:421788,content:"p"},{time:421892,content:" "},{time:422126,content:"a"},{time:422244,content:"n"},{time:422301,content:"a"},{time:422396,content:"l"},{time:422478,content:"y"},{time:422565,content:"z"},{time:422629,content:"e"},{time:422861,content:"\r\n"},{time:423062,content:"\r\n"},{time:423063,content:" \x1b[32mmemlab analyze [PLUGIN_OPTIONS]\x1b[39m\r\n Run heap analysis plugins\r\n"},{time:423064,content:"\r\n \x1b[1mCOMMAND LINE OPTIONS\x1b[22m\r\n"},{time:423065,content:"\r\n \x1b[32m--work-dir\x1b[39m set the working directory of the current run\r\n"},{time:423065,content:"\r\n \x1b[32m--help, -h\x1b[39m print helper text\r\n"},{time:423065,content:"\r\n \x1b[32m--verbose, -v\x1b[39m show more details\r\n"},{time:423065,content:"\r\n \x1b[32m--sc\x1b[39m set to continuous test mode\r\n"},{time:423065,content:"\r\n \x1b[32m--debug\x1b[39m enable manual debugging\r\n"},{time:423065,content:"\r\n \x1b[32m--silent, -s\x1b[39m mute all terminal output\r\n"},{time:423065,content:"\r\n"},{time:423065,content:"\x1b[1m SUB-COMMANDS\x1b[22m\r\n\x1b[1m\x1b[22m\r\n"},{time:423065,content:" \x1b[32mmemlab analyze collections-with-stale\x1b[39m\r\n Analyze collections holding stale objects\r\n"},{time:423066,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423066,content:"\r\n"},{time:423066,content:" \x1b[32mmemlab analyze detached-DOM\x1b[39m\r\n Get detached DOM elements\r\n"},{time:423066,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423066,content:"\r\n"},{time:423066,content:" \x1b[32mmemlab analyze global-variable\x1b[39m\r\n Get global variables in heap\r\n"},{time:423066,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423066,content:"\r\n"},{time:423066,content:" \x1b[32mmemlab analyze object-fanout\x1b[39m\r\n Get objects with the most out-going references in heap\r\n"},{time:423067,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423067,content:"\r\n"},{time:423067,content:" \x1b[32mmemlab analyze object-shallow\x1b[39m\r\n Get objects by key and value, without recursing into sub-objects\r\n"},{time:423068,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423068,content:"\r\n"},{time:423068,content:" \x1b[32mmemlab analyze shape\x1b[39m\r\n List the shapes that retained most memory\r\n"},{time:423068,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423068,content:"\r\n"},{time:423068,content:" \x1b[32mmemlab analyze object-size\x1b[39m\r\n Get the largest objects in heap\r\n"},{time:423068,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n\r\n"},{time:423068,content:" \x1b[32mmemlab analyze unbound-object\x1b[39m\r\n Check unbound object growth\r\n"},{time:423068,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot-dir\x1b[39m\r\n"},{time:423068,content:"\r\n"},{time:423068,content:" \x1b[32mmemlab analyze unbound-shape\x1b[39m\r\n Get shapes with unbound growth\r\n"},{time:423068,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot-dir\x1b[39m\r\n"},{time:423068,content:"\r\n"},{time:423068,content:" \x1b[32mmemlab analyze string\x1b[39m\r\n Analyze string in heap\r\n"},{time:423069,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423069,content:"\r\n"},{time:423069,content:" \x1b[32mmemlab analyze unmounted-fiber-node\x1b[39m\r\n Get unmounted React Fiber nodes\r\n"},{time:423069,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423069,content:"\r\n"},{time:423085,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:423733,content:"m"},{time:423798,content:"e"},{time:423879,content:"m"},{time:424046,content:"l"},{time:424070,content:"a"},{time:424244,content:"b"},{time:424324,content:" "},{time:425709,content:"a"},{time:425797,content:"n"},{time:425885,content:"a"},{time:425965,content:"l"},{time:426036,content:"y"},{time:426166,content:"z"},{time:426237,content:"e"},{time:426332,content:" "},{time:426445,content:"s"},{time:426557,content:"t"},{time:426716,content:"r"},{time:426724,content:"i"},{time:426774,content:"n"},{time:426949,content:"g"},{time:427020,content:" "},{time:427310,content:"-"},{time:427644,content:"h"},{time:427893,content:"\r\n"},{time:428093,content:"\r\n"},{time:428094,content:" \x1b[32mmemlab analyze string\x1b[39m\r\n Analyze string in heap\r\n"},{time:428095,content:"\r\n \x1b[1mCOMMAND LINE OPTIONS\x1b[22m\r\n"},{time:428096,content:"\r\n \x1b[32m--snapshot\x1b[39m set file path of the heap snapshot under analysis\r\n"},{time:428096,content:"\r\n \x1b[32m--help, -h\x1b[39m print helper text\r\n"},{time:428096,content:"\r\n \x1b[32m--verbose, -v\x1b[39m show more details\r\n"},{time:428096,content:"\r\n \x1b[32m--sc\x1b[39m set to continuous test mode\r\n\r\n \x1b[32m--debug\x1b[39m enable manual debugging\r\n"},{time:428096,content:"\r\n \x1b[32m--silent, -s\x1b[39m mute all terminal output\r\n\r\n"},{time:428108,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:430309,content:"#"},{time:430405,content:" "},{time:430702,content:"f"},{time:430877,content:"o"},{time:430956,content:"r"},{time:431093,content:" "},{time:431382,content:"m"},{time:431549,content:"o"},{time:431614,content:"r"},{time:431676,content:"e"},{time:431764,content:" "},{time:432284,content:"i"},{time:432325,content:"n"},{time:432413,content:"f"},{time:432492,content:"o"},{time:432772,content:","},{time:434476,content:" "},{time:435229,content:"c"},{time:435325,content:"h"},{time:435405,content:"e"},{time:435550,content:"c"},{time:435669,content:"k"},{time:435718,content:" "},{time:436271,content:"o"},{time:436350,content:"u"},{time:436374,content:"t"},{time:436462,content:" "},{time:436621,content:"t"},{time:436692,content:"h"},{time:436853,content:"i"},{time:436893,content:"s"},{time:436995,content:" "},{time:437317,content:"d"},{time:437413,content:"o"},{time:437549,content:"c"},{time:437662,content:" "},{time:437805,content:"s"},{time:437889,content:"i"},{time:437982,content:"t"},{time:438069,content:"e"},{time:439045,content:"\r\n"},{time:439045,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:439437,content:"T"},{time:439573,content:"h"},{time:439669,content:"a"},{time:439798,content:"n"},{time:439836,content:"k"},{time:439942,content:" "},{time:440101,content:"y"},{time:440245,content:"o"},{time:440316,content:"u"},{time:440820,content:"!"},{time:441124,content:"\r\n"}]},9539:t=>{const e=new Set('~!@#$%^&*()_+{}:"<>?|'.split(""));t.exports=function(t,m){void 0===m&&(m=1);const n=[0];for(let i=1;i{"use strict";m.r(e),m.d(e,{default:()=>z});var n=m(6540),i=m(53),o=m(1868),s=m(5489),c=m(8168),r=m(5293),a=m(8382),h=m(3706),l=m(3517);const p=t=>{let{code:e,language:m}=t;const{colorMode:i}=(0,r.G)();return n.createElement(a.Ay,(0,c.A)({},a.Gs,{code:e,language:m,theme:"dark"===i?h.A:l.A}),(t=>{let{className:e,getLineProps:m,getTokenProps:i,style:o,tokens:s}=t;return n.createElement("pre",{className:e,style:{...o,textAlign:"left"}},s.map(((t,e)=>n.createElement("div",m({line:t,key:e}),t.map(((t,e)=>n.createElement("span",i({token:t,key:e}))))))))}))},d=t=>{let{code:e,language:m}=t;return n.createElement(a.Ay,(0,c.A)({},a.Gs,{code:e,language:m,theme:h.A}),(t=>{let{className:e,getLineProps:m,getTokenProps:i,style:o,tokens:s}=t;return n.createElement("pre",{className:e,style:{...o,textAlign:"left"}},s.map(((t,e)=>n.createElement("div",m({line:t,key:e}),t.map(((t,e)=>n.createElement("span",i({token:t,key:e}))))))))}))};var u=m(4586),f=m(6025);const b={heroBanner:"heroBanner_UJJx",buttons:"buttons_pzbO",features:"features_keug",featureImage:"featureImage_yA8i",showcase:"showcase_SATw",showcaseHeading:"showcaseHeading_iAvm",showcaseHeadingColored:"showcaseHeadingColored_wr9e",showcaseLogos:"showcaseLogos_MhuO",showcaseLogo:"showcaseLogo_uMXs",titleLink:"titleLink_sVF8"};var y=m(490),K=m.n(y);const g=Array.prototype.slice,v=function(){function t(e){var m,n;let i,o,s;for(i in this._onTick=(m=this._onTick,n=this,function(){return m.apply(n,arguments)}),this._options={},s=t.defaults,s)o=s[i],this._options[i]=o;for(i in e)o=e[i],this._options[i]=o;this._events={},this.markers=[]}return t.defaults={frequency:100,length:0},t.prototype._lastPosition=0,t.prototype._position=0,t.prototype._timer=-1,t.prototype._previousTick=0,t.prototype._createTick=function(){return clearInterval(this._timer),this._timer=(t=this._options.frequency,e=this._onTick,setInterval(e,t));var t,e},t.prototype._onTick=function(){let t;return t=(new Date).getTime(),this._updatePositions(t),this._triggerMarkers(),this._previousTick=t,this.trigger("tick"),this._checkForEnd()},t.prototype._updatePositions=function(t){if(this._lastPosition=this._position,this._position+=t-this._previousTick,this._position>this._options.length)return this._position=this._options.length},t.prototype._triggerMarkers=function(){let t,e,m,n,i,o,s;for(n=this.markers,s=[],e=0,m=n.length;e(i=t.time)&&i>=this._position&&t.backward(),this._lastPosition<=(o=t.time)&&o0;e--)t=n[e],this._lastPosition>(i=t.time)&&i>=this._position&&t.backward(),this._lastPosition<=(o=t.time)&&o=this._options.length)return this._position=this._options.length,this.pause(),this.trigger("end")},t.prototype.playing=!1,t.prototype.length=function(t){return null!=t?(this._options.length=t,this):this._options.length},t.prototype.frequency=function(t){return null!=t?(this._options.frequency=t,this):this._options.frequency},t.prototype.position=function(t){return null!=t?(t>this._options.length&&(t=this._options.length),t<0&&(t=0),this._lastPosition=this._position,this._position=t,this._position{let{stdouts:e}=t;const[m]=(0,n.useState)("terminal-"+k++);return(0,n.useEffect)((()=>{const t=function(t){const e=new(K())({cols:90,rows:28,screenKeys:!0});return e.open(document.querySelector(`#${t} .content`)),e}(m),n=function(t,e){const m=e[e.length-1].time,n=new v({length:m,frequency:10});class i{constructor(t,e){this.time=t,this.content=e}forward(){t.write(this.content)}}for(let o=0;o{n.pause()}}),[m,e]),n.createElement("div",{className:"terminal-content"},n.createElement("div",{id:m,className:"terminal-inner"},n.createElement("div",{xterm:!0,className:"content"})))},x=t=>{let{i:e,infoUrl:m,imageUrl:i,caption:o}=t;return n.createElement("a",{key:e,className:b.showcaseLogo,href:m},n.createElement("img",{src:(0,f.A)(i),title:o}))};var w=m(6942),_=m.n(w);const M=()=>{const{siteConfig:t={}}=(0,u.A)(),{users:e}=t.customFields,m=e.map(((t,e)=>n.createElement(x,{i:e,infoUrl:t.infoUrl,imageUrl:t.imageUrl,caption:t.caption})));return n.createElement("section",{className:_()("text--center",b.showcase)},n.createElement("h2",{className:_()("showcaseHeading",b.showcaseHeadingColored)},"Who's using memlab?"),n.createElement("div",{className:b.showcaseLogos},m),t.customFields.showAddLogoButton&&n.createElement("div",{className:"more-users"},n.createElement(s.A,{className:_()("button button--primary button--outline",b.button),href:"https://github.com/facebook/memlab/edit/main/website/docusaurus.config.js"},"Add your company/project here")))};var C=m(8964),B=m(63),T=m.n(B);const D="undefined"!=typeof window?window:{addEventListener:()=>{},removeEventListener:()=>{},innerWidth:0,innerHeight:0};function E(){const{innerWidth:t,innerHeight:e}=D;return{width:t,height:e}}var L=m(9539),S=m.n(L),j=m(8231),A=m.n(j);const H=[{title:"Define Your Test",docUrl:"docs/api/interfaces/core_src.IScenario",description:n.createElement(n.Fragment,null,"Define E2E test scenarios on browser interaction:",n.createElement(p,{language:"typescript",code:"// test.js\nfunction url() {\n return 'https://www.google.com/maps/place/Silicon+Valley,+CA/';\n}\nasync function action(page) {\n await page.click('button[aria-label=\"Hotels\"]');\n}\nasync function back(page) {\n await page.click('[aria-label=\"Close\"]');\n}\n\nmodule.exports = {action, back, url};"}))},{title:"Run memlab in CLI",docUrl:"docs/cli/CLI-commands",description:n.createElement(n.Fragment,null,"Find memory leaks with the custom E2E test scenario:",n.createElement(d,{language:"bash",code:"$ memlab run --scenario test.js"}),"Support memory analyses for the previous browser test:",n.createElement(d,{language:"bash",code:"# Analyze duplicated string in heap\n$ memlab analyze string\n# Check unbound object growth\n$ memlab analyze unbound-object\n# Get shapes with unbound growth\n$ memlab analyze unbound-shape\n# Discover more memory analyses\n$ memlab analyze -h"}))},{title:"Programming API",docUrl:"docs/api/modules/api_src",description:n.createElement(n.Fragment,null,"Memory analysis for JavaScript heap snapshots:",n.createElement(p,{language:"typescript",code:"const {findLeaks, takeSnapshots} = require('@memlab/api');\n\nasync function test() {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const result = await takeSnapshots({scenario});\n const leaks = findLeaks(result);\n // ...\n}"}))}];function P(t){let{imageUrl:e,title:m,description:o,docUrl:c}=t;const r=(0,f.A)(e);return n.createElement("div",{className:(0,i.A)("col col--4",b.feature)},r&&n.createElement("div",{className:"text--center"},n.createElement("img",{className:b.featureImage,src:r,alt:m})),c?n.createElement(s.A,{className:b.titleLink,to:c},n.createElement("h3",null,m)):n.createElement("h3",null,m),n.createElement("p",null,o))}const O=S()(A()),N=6,R=16;function z(){const{siteConfig:t}=(0,u.A)(),[e,m]=(0,n.useState)(null),c=(0,n.useRef)(null),{width:r}=function(){const[t,e]=(0,n.useState)(E());return(0,n.useEffect)((()=>{function t(){e(E())}return D.addEventListener("resize",t),()=>D.removeEventListener("resize",t)}),[]),t}();return(0,n.useEffect)((()=>(!e&&r>800&&m(T()({el:c.current,THREE:C,mouseControls:!0,touchControls:!0,gyroControls:!1,minHeight:200,minWidth:200,scale:.9,scaleMobile:.4,color:6521387,backgroundColor:15784783,points:Math.min(Math.max(Math.floor(12*r/1800),N),R),maxDistance:30,spacing:22})),()=>{null!=e&&e.destroy()})),[e]),n.createElement(o.A,{description:"memlab is an E2E testing, memory leak detection, and heap analysis framework for front-end JavaScript."},n.createElement("header",{id:"css-animated-bg-container",ref:c,className:(0,i.A)("hero hero--primary",b.heroBanner)},n.createElement("div",{id:"header-container",className:"container"},n.createElement("div",{id:"left-header-section",className:"container-section"},n.createElement("h1",{id:"title",className:"hero__title"},t.title),n.createElement("p",{id:"sub-title",className:"hero__subtitle"},t.tagline),n.createElement("div",{className:b.buttons},n.createElement(s.A,{id:"learn-more",className:(0,i.A)("button button--outline button--secondary button--lg",b.getStarted),to:(0,f.A)("docs/getting-started")},"Learn more"))),n.createElement("div",{className:"container-section"},n.createElement(F,{stdouts:O})))),n.createElement("main",null,H&&H.length>0&&n.createElement("section",{className:b.features},n.createElement("div",{className:"container"},n.createElement("div",{className:"row"},H.map((t=>{let{title:e,docUrl:m,imageUrl:i,description:o}=t;return n.createElement(P,{key:e,title:e,docUrl:(0,f.A)(m),imageUrl:(0,f.A)(i),description:o})}))))),n.createElement(M,null)))}}}]); \ No newline at end of file +(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[4583],{490:(t,e,m)=>{(function(){"use strict";var e=this.document;function m(){this._events=this._events||{}}m.prototype.addListener=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},m.prototype.on=m.prototype.addListener,m.prototype.removeListener=function(t,e){if(this._events[t])for(var m=this._events[t],n=m.length;n--;)if(m[n]===e||m[n].listener===e)return void m.splice(n,1)},m.prototype.off=m.prototype.removeListener,m.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},m.prototype.once=function(t,e){function m(){var n=Array.prototype.slice.call(arguments);return this.removeListener(t,m),e.apply(this,n)}return m.listener=e,this.on(t,m)},m.prototype.emit=function(t){if(this._events[t])for(var e=Array.prototype.slice.call(arguments,1),m=this._events[t],n=m.length,i=0;i>16&255,t>>8&255,255&t]);return e}(),n.defaults={colors:n.colors,convertEol:!1,termName:"xterm",geometry:[80,24],cursorBlink:!0,visualBell:!1,popOnBell:!1,scrollback:1e3,screenKeys:!1,debug:!1,useStyle:!1},n.options={},d(u(n.defaults),(function(t){n[t]=n.defaults[t],n.options[t]=n.defaults[t]})),n.focus=null,n.prototype.focus=function(){n.focus!==this&&(n.focus&&n.focus.blur(),this.sendFocus&&this.send("\x1b[I"),this.showCursor(),n.focus=this)},n.prototype.blur=function(){n.focus===this&&(this.cursorState=0,this.refresh(this.y,this.y),this.sendFocus&&this.send("\x1b[O"),n.focus=null)},n.prototype.initGlobal=function(){var t=this.document;n._boundDocs=n._boundDocs||[],~function(t,e){var m=t.length;for(;m--;)if(t[m]===e)return m;return-1}(n._boundDocs,t)||(n._boundDocs.push(t),n.bindPaste(t),n.bindKeys(t),n.bindCopy(t),this.isIpad&&n.fixIpad(t),this.useStyle&&n.insertStyle(t,this.colors[256],this.colors[257]))},n.bindPaste=function(t){i(t.defaultView,"paste",(function(t){var e=n.focus;if(e)return t.clipboardData?e.send(t.clipboardData.getData("text/plain")):e.context.clipboardData&&e.send(e.context.clipboardData.getData("Text")),e.element.contentEditable="inherit",s(t)}))},n.bindKeys=function(t){i(t,"keydown",(function(t){if(n.focus){var e=t.target||t.srcElement;if(e)return e===n.focus.element||e===n.focus.context||e===n.focus.document||e===n.focus.body||e===n._textarea||e===n.focus.parent?n.focus.keyDown(t):void 0}}),!0),i(t,"keypress",(function(t){if(n.focus){var e=t.target||t.srcElement;if(e)return e===n.focus.element||e===n.focus.context||e===n.focus.document||e===n.focus.body||e===n._textarea||e===n.focus.parent?n.focus.keyPress(t):void 0}}),!0),i(t,"mousedown",(function(t){if(n.focus){var e=t.target||t.srcElement;if(e){do{if(e===n.focus.element)return}while(e=e.parentNode);n.focus.blur()}}}))},n.bindCopy=function(t){i(t.defaultView,"copy",(function(t){var e=n.focus;if(e&&e._selected){var m=e.getCopyTextarea(),i=e.grabText(e._selected.x1,e._selected.x2,e._selected.y1,e._selected.y2);e.emit("copy",i),m.focus(),m.textContent=i,m.value=i,m.setSelectionRange(0,i.length),a((function(){e.element.focus(),e.focus()}),1)}}))},n.fixIpad=function(t){var e=t.createElement("textarea");e.style.position="absolute",e.style.left="-32000px",e.style.top="-32000px",e.style.width="0px",e.style.height="0px",e.style.opacity="0",e.style.backgroundColor="transparent",e.style.borderStyle="none",e.style.outlineStyle="none",t.getElementsByTagName("body")[0].appendChild(e),n._textarea=e,a((function(){e.focus()}),1e3)},n.insertStyle=function(t,e,m){if(!(n=t.getElementById("term-style"))){var n,i=t.getElementsByTagName("head")[0];if(i)(n=t.createElement("style")).id="term-style",n.innerHTML=".terminal {\n float: left;\n border: "+e+' solid 5px;\n font-family: "DejaVu Sans Mono", "Liberation Mono", monospace;\n font-size: 11px;\n color: '+m+";\n background: "+e+";\n}\n\n.terminal-cursor {\n color: "+e+";\n background: "+m+";\n}\n",i.insertBefore(n,i.firstChild)}},n.prototype.open=function(t){var e,m=this,o=0;if(this.parent=t||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");for(this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.getElementsByTagName("body")[0],this.context.navigator&&this.context.navigator.userAgent&&(this.isMac=!!~this.context.navigator.userAgent.indexOf("Mac"),this.isIpad=!!~this.context.navigator.userAgent.indexOf("iPad"),this.isMSIE=!!~this.context.navigator.userAgent.indexOf("MSIE")),this.element=this.document.createElement("div"),this.element.className="terminal",this.element.style.outline="none",this.element.setAttribute("tabindex",0),this.element.style.backgroundColor=this.colors[256],this.element.style.color=this.colors[257],this.children=[];o0?64:65}n=t.shiftKey?4:0,i=t.metaKey?8:0,o=t.ctrlKey?16:0,s=n|i|o,e.vt200Mouse?s&=o:e.normalMouse||(s=0);return m=32+(s<<2)+m,m}(t),i=p(t))switch(l(n,i),t.type){case"mousedown":m=n;break;case"mouseup":m=32}}function a(t){var e,n=m;(e=p(t))&&l(n+=32,e)}function h(t,m){if(e.utfMouse){if(2047===m)return t.push(0);m<127?t.push(m):(m>2047&&(m=2047),t.push(192|m>>6),t.push(128|63&m))}else{if(255===m)return t.push(0);m>127&&(m=127),t.push(m)}}function l(t,m){if(e.vt300Mouse){t&=3,m.x-=32,m.y-=32;var n="\x1b[24";if(0===t)n+="1";else if(1===t)n+="3";else if(2===t)n+="5";else{if(3===t)return;n+="0"}return n+="~["+m.x+","+m.y+"]\r",void e.send(n)}return e.decLocator?(t&=3,m.x-=32,m.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void e.send("\x1b["+t+";"+(3===t?4:0)+";"+m.y+";"+m.x+";"+(m.page||0)+"&w")):e.urxvtMouse?(m.x-=32,m.y-=32,m.x++,m.y++,void e.send("\x1b["+t+";"+m.x+";"+m.y+"M")):e.sgrMouse?(m.x-=32,m.y-=32,void e.send("\x1b[<"+(3&~t?t:-4&t)+";"+m.x+";"+m.y+(3&~t?"M":"m"))):(h(n=[],t),h(n,m.x),h(n,m.y),void e.send("\x1b[M"+r.fromCharCode.apply(r,n)))}function p(t){var m,i,o,s,c;if(null!=t.pageX){for(m=t.pageX,i=t.pageY,c=e.element;c&&c!==e.document.documentElement;)m-=c.offsetLeft,i-=c.offsetTop,c="offsetParent"in c?c.offsetParent:c.parentNode;return o=e.element.clientWidth,s=e.element.clientHeight,m=Math.round(m/o*e.cols),i=Math.round(i/s*e.rows),m<0&&(m=0),m>e.cols&&(m=e.cols),i<0&&(i=0),i>e.rows&&(i=e.rows),{x:m+=32,y:i+=32,type:t.type===n?"mousewheel":t.type}}}i(t,"mousedown",(function(t){if(e.mouseEvents)return c(t),e.focus(),e.vt200Mouse?(c({__proto__:t,type:"mouseup"}),s(t)):(e.normalMouse&&i(e.document,"mousemove",a),e.x10Mouse||i(e.document,"mouseup",(function t(m){return c(m),e.normalMouse&&o(e.document,"mousemove",a),o(e.document,"mouseup",t),s(m)})),s(t))})),i(t,n,(function(t){if(e.mouseEvents&&!(e.x10Mouse||e.vt300Mouse||e.decLocator))return c(t),s(t)})),i(t,n,(function(t){if(!e.mouseEvents&&!e.applicationKeypad)return"DOMMouseScroll"===t.type?e.scrollDisp(t.detail<0?-5:5):e.scrollDisp(t.wheelDeltaY>0?-5:5),s(t)}))},n.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){},this.element.parentNode&&this.element.parentNode.removeChild(this.element)},n.prototype.refresh=function(t,e){var m,i,o,s,c,r,a,h,p,d,u,f,b,y;for(e-t>=this.rows/2&&(y=this.element.parentNode)&&y.removeChild(this.element),a=this.cols,i=t,e>=this.lines.length&&(this.log("`end` is too large. Most likely a bad CSR."),e=this.lines.length-1);i<=e;i++){for(b=i+this.ydisp,s=this.lines[b],c="",m=i!==this.y||!this.cursorState||this.ydisp!==this.ybase&&!this.selectMode||this.cursorHidden?-1:this.x,p=this.defAttr,o=0;o"),h!==this.defAttr&&(-1===h?c+='':(c+='>9&511,d=511&h,1&f&&d<8&&(d+=8)),16&f&&(c+="visibility:hidden;"),256!==u&&(c+="background-color:"+this.colors[u]+";"),257!==d&&(c+="color:"+this.colors[d]+";"),c+='">'))),r){case"&":c+="&";break;case"<":c+="<";break;case">":c+=">";break;default:r<=" "?c+=" ":(l(r)&&o++,c+=r)}p=h}p!==this.defAttr&&(c+=""),this.children[i].innerHTML=c}y&&y.appendChild(this.element)},n.prototype._cursorBlink=function(){n.focus===this&&(this.cursorState^=1,this.refresh(this.y,this.y))},n.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.y,this.y))},n.prototype.startBlink=function(){if(this.cursorBlink){var t=this;this._blinker=function(){t._cursorBlink()},this._blink=h(this._blinker,500)}},n.prototype.refreshBlink=function(){this.cursorBlink&&(clearInterval(this._blink),this._blink=h(this._blinker,500))},n.prototype.scroll=function(){var t;++this.ybase===this.scrollback&&(this.ybase=this.ybase/2|0,this.lines=this.lines.slice(1-(this.ybase+this.rows))),this.ydisp=this.ybase,t=this.ybase+this.rows-1,(t-=this.rows-1-this.scrollBottom)===this.lines.length?this.lines.push(this.blankLine()):this.lines.splice(t,0,this.blankLine()),0!==this.scrollTop&&(0!==this.ybase&&(this.ybase--,this.ydisp=this.ybase),this.lines.splice(this.ybase+this.scrollTop,1)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)},n.prototype.scrollDisp=function(t){this.ydisp+=t,this.ydisp>this.ybase?this.ydisp=this.ybase:this.ydisp<0&&(this.ydisp=0),this.refresh(0,this.rows-1)},n.prototype.write=function(t){var e,m,i,o=t.length,s=0;for(this.refreshStart=this.y,this.refreshEnd=this.y,this.ybase!==this.ydisp&&(this.ydisp=this.ybase,this.maxRange());sthis.scrollBottom&&(this.y--,this.scroll());break;case"\r":this.x=0;break;case"\b":this.x>0&&this.x--;break;case"\t":this.x=this.nextStop();break;case"\x0e":this.setgLevel(1);break;case"\x0f":this.setgLevel(0);break;case"\x1b":this.state=1;break;default:if(i>=" "&&(this.charset&&this.charset[i]&&(i=this.charset[i]),this.x>=this.cols&&(this.x=0,this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll())),this.lines[this.y+this.ybase][this.x]=[this.curAttr,i],this.x++,this.updateRange(this.y),l(i))){if(e=this.y+this.ybase,this.cols<2||this.x>=this.cols){this.lines[e][this.x-1]=[this.curAttr," "];break}this.lines[e][this.x]=[this.curAttr," "],this.x++}}break;case 1:switch(i){case"[":this.params=[],this.currentParam=0,this.state=2;break;case"]":this.params=[],this.currentParam=0,this.state=3;break;case"P":this.params=[],this.currentParam=0,this.state=5;break;case"_":case"^":this.state=6;break;case"c":this.reset();break;case"E":this.x=0;case"D":this.index();break;case"M":this.reverseIndex();break;case"%":this.setgLevel(0),this.setgCharset(0,n.charsets.US),this.state=0,s++;break;case"(":case")":case"*":case"+":case"-":case".":switch(i){case"(":this.gcharset=0;break;case")":case"-":this.gcharset=1;break;case"*":case".":this.gcharset=2;break;case"+":this.gcharset=3}this.state=4;break;case"/":this.gcharset=3,this.state=4,s--;break;case"N":case"O":break;case"n":this.setgLevel(2);break;case"o":case"|":this.setgLevel(3);break;case"}":this.setgLevel(2);break;case"~":this.setgLevel(1);break;case"7":this.saveCursor(),this.state=0;break;case"8":this.restoreCursor(),this.state=0;break;case"#":this.state=0,s++;break;case"H":this.tabSet();break;case"=":this.log("Serial port requested application keypad."),this.applicationKeypad=!0,this.state=0;break;case">":this.log("Switching back to normal keypad."),this.applicationKeypad=!1,this.state=0;break;default:this.state=0,this.error("Unknown ESC control: %s.",i)}break;case 4:switch(i){case"0":m=n.charsets.SCLD;break;case"A":m=n.charsets.UK;break;case"B":default:m=n.charsets.US;break;case"4":m=n.charsets.Dutch;break;case"C":case"5":m=n.charsets.Finnish;break;case"R":m=n.charsets.French;break;case"Q":m=n.charsets.FrenchCanadian;break;case"K":m=n.charsets.German;break;case"Y":m=n.charsets.Italian;break;case"E":case"6":m=n.charsets.NorwegianDanish;break;case"Z":m=n.charsets.Spanish;break;case"H":case"7":m=n.charsets.Swedish;break;case"=":m=n.charsets.Swiss;break;case"/":m=n.charsets.ISOLatin,s++}this.setgCharset(this.gcharset,m),this.gcharset=null,this.state=0;break;case 3:if("\x1b"===i||"\x07"===i){switch("\x1b"===i&&s++,this.params.push(this.currentParam),this.params[0]){case 0:case 1:case 2:this.params[1]&&(this.title=this.params[1],this.handleTitle(this.title))}this.params=[],this.currentParam=0,this.state=0}else this.params.length?this.currentParam+=i:i>="0"&&i<="9"?this.currentParam=10*this.currentParam+i.charCodeAt(0)-48:";"===i&&(this.params.push(this.currentParam),this.currentParam="");break;case 2:if("?"===i||">"===i||"!"===i){this.prefix=i;break}if(i>="0"&&i<="9"){this.currentParam=10*this.currentParam+i.charCodeAt(0)-48;break}if("$"===i||'"'===i||" "===i||"'"===i){this.postfix=i;break}if(this.params.push(this.currentParam),this.currentParam=0,";"===i)break;switch(this.state=0,i){case"A":this.cursorUp(this.params);break;case"B":this.cursorDown(this.params);break;case"C":this.cursorForward(this.params);break;case"D":this.cursorBackward(this.params);break;case"H":this.cursorPos(this.params);break;case"J":this.eraseInDisplay(this.params);break;case"K":this.eraseInLine(this.params);break;case"m":this.charAttributes(this.params);break;case"n":this.deviceStatus(this.params);break;case"@":this.insertChars(this.params);break;case"E":this.cursorNextLine(this.params);break;case"F":this.cursorPrecedingLine(this.params);break;case"G":this.cursorCharAbsolute(this.params);break;case"L":this.insertLines(this.params);break;case"M":this.deleteLines(this.params);break;case"P":this.deleteChars(this.params);break;case"X":this.eraseChars(this.params);break;case"`":this.charPosAbsolute(this.params);break;case"a":this.HPositionRelative(this.params);break;case"c":this.sendDeviceAttributes(this.params);break;case"d":this.linePosAbsolute(this.params);break;case"e":this.VPositionRelative(this.params);break;case"f":this.HVPosition(this.params);break;case"h":this.setMode(this.params);break;case"l":this.resetMode(this.params);break;case"r":this.setScrollRegion(this.params);break;case"s":this.saveCursor(this.params);break;case"u":this.restoreCursor(this.params);break;case"I":this.cursorForwardTab(this.params);break;case"S":this.scrollUp(this.params);break;case"T":this.params.length<2&&!this.prefix&&this.scrollDown(this.params);break;case"Z":this.cursorBackwardTab(this.params);break;case"b":this.repeatPrecedingCharacter(this.params);break;case"g":this.tabClear(this.params);break;case"p":if("!"===this.prefix)this.softReset(this.params);break;default:this.error("Unknown CSI code: %s.",i)}this.prefix="",this.postfix="";break;case 5:if("\x1b"===i||"\x07"===i){switch("\x1b"===i&&s++,this.prefix){case"":case"+p":break;case"$q":var c=!1;switch(r=this.currentParam){case'"q':r='0"q';break;case'"p':r='61"p';break;case"r":r=this.scrollTop+1+";"+(this.scrollBottom+1)+"r";break;case"m":r="0m";break;default:this.error("Unknown DCS Pt: %s.",r),r=""}this.send("\x1bP"+ +c+"$r"+r+"\x1b\\");break;case"+q":var r=this.currentParam;c=!1;this.send("\x1bP"+ +c+"+r"+r+"\x1b\\");break;default:this.error("Unknown DCS prefix: %s.",this.prefix)}this.currentParam=0,this.prefix="",this.state=0}else this.currentParam?this.currentParam+=i:this.prefix||"$"===i||"+"===i?2===this.prefix.length?this.currentParam=i:this.prefix+=i:this.currentParam=i;break;case 6:"\x1b"!==i&&"\x07"!==i||("\x1b"===i&&s++,this.state=0)}this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)},n.prototype.writeln=function(t){this.write(t+"\r\n")},n.prototype.keyDown=function(t){var e,m=this;switch(t.keyCode){case 8:if(t.shiftKey){e="\b";break}e="\x7f";break;case 9:if(t.shiftKey){e="\x1b[Z";break}e="\t";break;case 13:e="\r";break;case 27:e="\x1b";break;case 37:if(this.applicationCursor){e="\x1bOD";break}e="\x1b[D";break;case 39:if(this.applicationCursor){e="\x1bOC";break}e="\x1b[C";break;case 38:if(this.applicationCursor){e="\x1bOA";break}if(t.ctrlKey)return this.scrollDisp(-1),s(t);e="\x1b[A";break;case 40:if(this.applicationCursor){e="\x1bOB";break}if(t.ctrlKey)return this.scrollDisp(1),s(t);e="\x1b[B";break;case 46:e="\x1b[3~";break;case 45:e="\x1b[2~";break;case 36:if(this.applicationKeypad){e="\x1bOH";break}e="\x1bOH";break;case 35:if(this.applicationKeypad){e="\x1bOF";break}e="\x1bOF";break;case 33:if(t.shiftKey)return this.scrollDisp(-(this.rows-1)),s(t);e="\x1b[5~";break;case 34:if(t.shiftKey)return this.scrollDisp(this.rows-1),s(t);e="\x1b[6~";break;case 112:e="\x1bOP";break;case 113:e="\x1bOQ";break;case 114:e="\x1bOR";break;case 115:e="\x1bOS";break;case 116:e="\x1b[15~";break;case 117:e="\x1b[17~";break;case 118:e="\x1b[18~";break;case 119:e="\x1b[19~";break;case 120:e="\x1b[20~";break;case 121:e="\x1b[21~";break;case 122:e="\x1b[23~";break;case 123:e="\x1b[24~";break;default:if(t.ctrlKey)if(t.keyCode>=65&&t.keyCode<=90){if(this.screenKeys&&!this.prefixMode&&!this.selectMode&&65===t.keyCode)return this.enterPrefix(),s(t);if(this.prefixMode&&86===t.keyCode)return void this.leavePrefix();if((this.prefixMode||this.selectMode)&&67===t.keyCode)return void(this.visualMode&&a((function(){m.leaveVisual()}),1));e=r.fromCharCode(t.keyCode-64)}else 32===t.keyCode?e=r.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e=r.fromCharCode(t.keyCode-51+27):56===t.keyCode?e=r.fromCharCode(127):219===t.keyCode?e=r.fromCharCode(27):221===t.keyCode&&(e=r.fromCharCode(29));else(!this.isMac&&t.altKey||this.isMac&&t.metaKey)&&(t.keyCode>=65&&t.keyCode<=90?e="\x1b"+r.fromCharCode(t.keyCode+32):192===t.keyCode?e="\x1b`":t.keyCode>=48&&t.keyCode<=57&&(e="\x1b"+(t.keyCode-48)))}return!e||(this.prefixMode?(this.leavePrefix(),s(t)):this.selectMode?(this.keySelect(t,e),s(t)):(this.emit("keydown",t),this.emit("key",e,t),this.showCursor(),this.handler(e),s(t)))},n.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},n.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},n.prototype.keyPress=function(t){var e;if(s(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||t.ctrlKey||t.altKey||t.metaKey)&&(e=r.fromCharCode(e),this.prefixMode?(this.leavePrefix(),this.keyPrefix(t,e),!1):this.selectMode?(this.keySelect(t,e),!1):(this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!1))},n.prototype.send=function(t){var e=this;this.queue||a((function(){e.handler(e.queue),e.queue=""}),1),this.queue+=t},n.prototype.bell=function(){if(this.visualBell){var t=this;this.element.style.borderColor="white",a((function(){t.element.style.borderColor=""}),10),this.popOnBell&&this.focus()}},n.prototype.log=function(){if(this.debug&&this.context.console&&this.context.console.log){var t=Array.prototype.slice.call(arguments);this.context.console.log.apply(this.context.console,t)}},n.prototype.error=function(){if(this.debug&&this.context.console&&this.context.console.error){var t=Array.prototype.slice.call(arguments);this.context.console.error.apply(this.context.console,t)}},n.prototype.resize=function(t,e){var m,n,i,o,s;if(t<1&&(t=1),e<1&&(e=1),(o=this.cols)t)for(i=this.lines.length;i--;)for(;this.lines[i].length>t;)this.lines[i].pop();if(this.setupStops(o),this.cols=t,(o=this.rows)e)for(;o-- >e;)if(this.lines.length>e+this.ybase&&this.lines.pop(),this.children.length>e){if(!(n=this.children.pop()))continue;n.parentNode.removeChild(n)}this.rows=e,this.y>=e&&(this.y=e-1),this.x>=t&&(this.x=t-1),this.scrollTop=0,this.scrollBottom=e-1,this.refresh(0,this.rows-1),this.normal=null},n.prototype.updateRange=function(t){tthis.refreshEnd&&(this.refreshEnd=t)},n.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},n.prototype.setupStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t0;);return t>=this.cols?this.cols-1:t<0?0:t},n.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t=this.cols?this.cols-1:t<0?0:t},n.prototype.eraseRight=function(t,e){for(var m=this.lines[this.ybase+e],n=[this.eraseAttr()," "];tthis.scrollBottom&&(this.y--,this.scroll()),this.state=0},n.prototype.reverseIndex=function(){var t;this.y--,this.y=this.rows&&(this.y=this.rows-1)},n.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this.x+=e,this.x>=this.cols&&(this.x=this.cols-1)},n.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this.x-=e,this.x<0&&(this.x=0)},n.prototype.cursorPos=function(t){var e,m;e=t[0]-1,m=t.length>=2?t[1]-1:0,e<0?e=0:e>=this.rows&&(e=this.rows-1),m<0?m=0:m>=this.cols&&(m=this.cols-1),this.x=m,this.y=e},n.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this.eraseRight(this.x,this.y),e=this.y+1;e>18,o=this.curAttr>>9&511,s=511&this.curAttr;n=30&&e<=37?o=e-30:e>=40&&e<=47?s=e-40:e>=90&&e<=97?o=(e+=8)-90:e>=100&&e<=107?s=(e+=8)-100:0===e?(i=this.defAttr>>18,o=this.defAttr>>9&511,s=511&this.defAttr):1===e?i|=1:4===e?i|=2:5===e?i|=4:7===e?i|=8:8===e?i|=16:22===e?i&=-2:24===e?i&=-3:25===e?i&=-5:27===e?i&=-9:28===e?i&=-17:39===e?o=this.defAttr>>9&511:49===e?s=511&this.defAttr:38===e?2===t[n+1]?(-1===(o=p(255&t[n+=2],255&t[n+1],255&t[n+2]))&&(o=511),n+=2):5===t[n+1]&&(o=e=255&t[n+=2]):48===e?2===t[n+1]?(-1===(s=p(255&t[n+=2],255&t[n+1],255&t[n+2]))&&(s=511),n+=2):5===t[n+1]&&(s=e=255&t[n+=2]):100===e?(o=this.defAttr>>9&511,s=511&this.defAttr):this.error("Unknown SGR attribute: %d.",e);this.curAttr=i<<18|o<<9|s}else this.curAttr=this.defAttr},n.prototype.deviceStatus=function(t){if(this.prefix){if("?"===this.prefix&&6===t[0])this.send("\x1b[?"+(this.y+1)+";"+(this.x+1)+"R")}else switch(t[0]){case 5:this.send("\x1b[0n");break;case 6:this.send("\x1b["+(this.y+1)+";"+(this.x+1)+"R")}},n.prototype.insertChars=function(t){var e,m,n,i;for((e=t[0])<1&&(e=1),m=this.y+this.ybase,n=this.x,i=[this.eraseAttr()," "];e--&&n=this.rows&&(this.y=this.rows-1),this.x=0},n.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this.y-=e,this.y<0&&(this.y=0),this.x=0},n.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this.x=e-1},n.prototype.insertLines=function(t){var e,m,n;for((e=t[0])<1&&(e=1),m=this.y+this.ybase,n=this.rows-1-this.scrollBottom,n=this.rows-1+this.ybase-n+1;e--;)this.lines.splice(m,0,this.blankLine(!0)),this.lines.splice(n,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},n.prototype.deleteLines=function(t){var e,m,n;for((e=t[0])<1&&(e=1),m=this.y+this.ybase,n=this.rows-1-this.scrollBottom,n=this.rows-1+this.ybase-n;e--;)this.lines.splice(n+1,0,this.blankLine(!0)),this.lines.splice(m,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},n.prototype.deleteChars=function(t){var e,m,n;for((e=t[0])<1&&(e=1),m=this.y+this.ybase,n=[this.eraseAttr()," "];e--;)this.lines[m].splice(this.x,1),this.lines[m].push(n)},n.prototype.eraseChars=function(t){var e,m,n,i;for((e=t[0])<1&&(e=1),m=this.y+this.ybase,n=this.x,i=[this.eraseAttr()," "];e--&&n=this.cols&&(this.x=this.cols-1)},n.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this.x+=e,this.x>=this.cols&&(this.x=this.cols-1)},n.prototype.sendDeviceAttributes=function(t){t[0]>0||(this.prefix?">"===this.prefix&&(this.is("xterm")?this.send("\x1b[>0;276;0c"):this.is("rxvt-unicode")?this.send("\x1b[>85;95;0c"):this.is("linux")?this.send(t[0]+"c"):this.is("screen")&&this.send("\x1b[>83;40003;0c")):this.is("xterm")||this.is("rxvt-unicode")||this.is("screen")?this.send("\x1b[?1;2c"):this.is("linux")&&this.send("\x1b[?6c"))},n.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this.y=e-1,this.y>=this.rows&&(this.y=this.rows-1)},n.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1)},n.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this.y=t[0]-1,this.y>=this.rows&&(this.y=this.rows-1),this.x=t[1]-1,this.x>=this.cols&&(this.x=this.cols-1)},n.prototype.setMode=function(t){if("object"!=typeof t){if(this.prefix){if("?"===this.prefix)switch(t){case 1:this.applicationCursor=!0;break;case 2:this.setgCharset(0,n.charsets.US),this.setgCharset(1,n.charsets.US),this.setgCharset(2,n.charsets.US),this.setgCharset(3,n.charsets.US);break;case 3:this.savedCols=this.cols,this.resize(132,this.rows);break;case 6:this.originMode=!0;break;case 7:this.wraparoundMode=!0;break;case 12:break;case 66:this.log("Serial port requested application keypad."),this.applicationKeypad=!0;break;case 9:case 1e3:case 1002:case 1003:this.x10Mouse=9===t,this.vt200Mouse=1e3===t,this.normalMouse=t>1e3,this.mouseEvents=!0,this.element.style.cursor="default",this.log("Binding to mouse events.");break;case 1004:this.sendFocus=!0;break;case 1005:this.utfMouse=!0;break;case 1006:this.sgrMouse=!0;break;case 1015:this.urxvtMouse=!0;break;case 25:this.cursorHidden=!1;break;case 1049:case 47:case 1047:if(!this.normal){var e={lines:this.lines,ybase:this.ybase,ydisp:this.ydisp,x:this.x,y:this.y,scrollTop:this.scrollTop,scrollBottom:this.scrollBottom,tabs:this.tabs};this.reset(),this.normal=e,this.showCursor()}}}else if(4===t)this.insertMode=!0}else for(var m=t.length,i=0;i="0"&&e<="9"?(~(e=+e-1)||(e=9),this.emit("request term",e)):"n"===e?this.emit("request term next"):"P"===e?this.emit("request term previous"):":"===e?this.emit("request command mode"):"["===e&&this.enterSelect()},n.prototype.keySelect=function(t,e){if(this.showCursor(),this.searchMode||"n"===e||"N"===e)return this.keySearch(t,e);if("\x04"===e){var m=this.ydisp+this.y;return this.ydisp===this.ybase?(this.y=Math.min(this.y+(this.rows-1)/2|0,this.rows-1),this.refresh(0,this.rows-1)):this.scrollDisp((this.rows-1)/2|0),void(this.visualMode&&this.selectText(this.x,this.x,m,this.ydisp+this.y))}if("\x15"===e){m=this.ydisp+this.y;return 0===this.ydisp?(this.y=Math.max(this.y-(this.rows-1)/2|0,0),this.refresh(0,this.rows-1)):this.scrollDisp(-(this.rows-1)/2|0),void(this.visualMode&&this.selectText(this.x,this.x,m,this.ydisp+this.y))}if("\x06"===e){m=this.ydisp+this.y;return this.scrollDisp(this.rows-1),void(this.visualMode&&this.selectText(this.x,this.x,m,this.ydisp+this.y))}if("\x02"===e){m=this.ydisp+this.y;return this.scrollDisp(-(this.rows-1)),void(this.visualMode&&this.selectText(this.x,this.x,m,this.ydisp+this.y))}if("k"===e){m=this.ydisp+this.y;return this.y--,this.y<0&&(this.y=0,this.scrollDisp(-1)),void(this.visualMode?this.selectText(this.x,this.x,m,this.ydisp+this.y):this.refresh(this.y,this.y+1))}if("j"===e){m=this.ydisp+this.y;return this.y++,this.y>=this.rows&&(this.y=this.rows-1,this.scrollDisp(1)),void(this.visualMode?this.selectText(this.x,this.x,m,this.ydisp+this.y):this.refresh(this.y-1,this.y))}if("h"===e){var n=this.x;return this.x--,this.x<0&&(this.x=0),void(this.visualMode?this.selectText(this.x,n,this.ydisp+this.y,this.ydisp+this.y):this.refresh(this.y,this.y))}if("l"===e){n=this.x;return this.x++,this.x>=this.cols&&(this.x=this.cols-1),void(this.visualMode?this.selectText(n,this.x,this.ydisp+this.y,this.ydisp+this.y):this.refresh(this.y,this.y))}if("v"!==e&&" "!==e){if("y"!==e)if("q"!==e){if("w"===e||"W"===e){for(var i=this.x,o=this.y,s=this.ydisp,c=(n=this.x,m=this.y,this.ydisp),r=!1;;){for(var a=this.lines[c+m];n=this.cols&&(n=this.cols-1),!(n===this.cols-1&&a[n][1]<=" "))break;if(n=0,++m>=this.rows&&(m--,++c>this.ybase)){c=this.ybase,n=this.x;break}}return this.x=n,this.y=m,this.scrollDisp(-this.ydisp+c),void(this.visualMode&&this.selectText(i,this.x,o+s,this.ydisp+this.y))}if("b"===e||"B"===e){for(i=this.x,o=this.y,s=this.ydisp,n=this.x,m=this.y,c=this.ydisp;;){for(a=this.lines[c+m],r=n>0&&a[n][1]>" "&&a[n-1][1]>" ";n>=0;){if(a[n][1]<=" "){if(r&&n+1" "){n++;break}r=!0}n--}if(n<0&&(n=0),0!==n||!(a[n][1]<=" ")&&r)break;if(n=this.cols-1,--m<0&&(m++,--c<0)){c++,n=0;break}}return this.x=n,this.y=m,this.scrollDisp(-this.ydisp+c),void(this.visualMode&&this.selectText(this.x,i,this.ydisp+this.y,o+s))}if("e"===e||"E"===e){n=this.x+1,m=this.y,c=this.ydisp;for(n>=this.cols&&n--;;){for(a=this.lines[c+m];n=0&&a[n-1][1]>" "){n--;break}n++}if(n>=this.cols&&(n=this.cols-1),!(n===this.cols-1&&a[n][1]<=" "))break;if(n=0,++m>=this.rows&&(m--,++c>this.ybase)){c=this.ybase;break}}return this.x=n,this.y=m,this.scrollDisp(-this.ydisp+c),void(this.visualMode&&this.selectText(i,this.x,o+s,this.ydisp+this.y))}if("^"!==e&&"0"!==e){if("$"===e){for(i=this.x,a=this.lines[this.ydisp+this.y],n=this.cols-1;n>=0;){if(a[n][1]>" "){this.visualMode&&n0&&c--):"}"===e&&m>=this.rows&&(m--,c" "){-1===d&&(d=0),l=!0;break}if(h===this.cols-1){-1===d?d=1:(0===d||1===d&&l)&&(p=!0);break}}if(p)break;if("{"===e){if(--m<0){if(m++,!(c>0))break;c--}}else if("}"===e&&++m>=this.rows){if(m--,!(c" ");)n++;n>=this.cols&&(n=this.cols-1),this.x=n}this.visualMode?this.selectText(this.x,i,this.ydisp+this.y,this.ydisp+this.y):this.refresh(this.y,this.y)}}else this.visualMode?this.leaveVisual():this.leaveSelect();else if(this.visualMode){var u=this.grabText(this._selected.x1,this._selected.x2,this._selected.y1,this._selected.y2);this.copyText(u),this.leaveVisual()}}else this.visualMode?this.leaveVisual():this.enterVisual()},n.prototype.keySearch=function(t,e){if("\x1b"!==e){if("\r"===e||!this.searchMode&&("n"===e||"N"===e)){this.leaveSearch();var m=this.entry;if(!m)return void this.refresh(0,this.rows-1);for(var n,i,o=this.x,s=this.y,c=this.ydisp,r=!1,a=!1,h=this.x+1,l=this.ydisp+this.y,p="N"===e?this.searchDown:!this.searchDown;;){for(n=this.lines[l];h=this.cols)&&n[h+u][1]===m[u];u++)if(n[h+u][1]===m[u]&&u===m.length-1){r=!0;break}if(r)break;h+=u+1}if(r)break;if(h=0,p){if(--l<0){if(a)break;a=!0,l=this.ybase+this.rows-1}}else if(++l>this.ybase+this.rows-1){if(a)break;a=!0,l=0}}return r?(l-this.ybase<0?(i=l,l=0,i>this.ybase&&(l=i-this.ybase,i=this.ybase)):(i=this.ybase,l-=this.ybase),this.x=h,this.y=l,this.scrollDisp(-this.ydisp+i),void(this.visualMode&&this.selectText(o,this.x,s+c,this.ydisp+this.y))):void this.refresh(0,this.rows-1)}if("\b"===e||"\x7f"===e){if(0===this.entry.length)return;var d=this.ydisp+this.rows-1;this.entry=this.entry.slice(0,-1);var u=this.entryPrefix.length+this.entry.length;return this.lines[d][u]=[this.lines[d][u][0]," "],this.x--,this.refresh(this.rows-1,this.rows-1),void this.refresh(this.y,this.y)}if(1===e.length&&e>=" "&&e<="~"){d=this.ydisp+this.rows-1;this.entry+=e;u=this.entryPrefix.length+this.entry.length-1;return this.lines[d][u]=[-512&this.defAttr|4,e],this.x++,this.refresh(this.rows-1,this.rows-1),void this.refresh(this.y,this.y)}return!1}this.leaveSearch()},n.charsets={},n.charsets.SCLD={"`":"\u25c6",a:"\u2592",b:"\t",c:"\f",d:"\r",e:"\n",f:"\xb0",g:"\xb1",h:"\u2424",i:"\v",j:"\u2518",k:"\u2510",l:"\u250c",m:"\u2514",n:"\u253c",o:"\u23ba",p:"\u23bb",q:"\u2500",r:"\u23bc",s:"\u23bd",t:"\u251c",u:"\u2524",v:"\u2534",w:"\u252c",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03c0","|":"\u2260","}":"\xa3","~":"\xb7"},n.charsets.UK=null,n.charsets.US=null,n.charsets.Dutch=null,n.charsets.Finnish=null,n.charsets.French=null,n.charsets.FrenchCanadian=null,n.charsets.German=null,n.charsets.Italian=null,n.charsets.NorwegianDanish=null,n.charsets.Spanish=null,n.charsets.Swedish=null,n.charsets.Swiss=null,n.charsets.ISOLatin=null;var r=this.String,a=this.setTimeout,h=this.setInterval;function l(t){return!(t<="\uff00")&&(t>="\uff01"&&t<="\uffbe"||t>="\uffc2"&&t<="\uffc7"||t>="\uffca"&&t<="\uffcf"||t>="\uffd2"&&t<="\uffd7"||t>="\uffda"&&t<="\uffdc"||t>="\uffe0"&&t<="\uffe6"||t>="\uffe8"&&t<="\uffee")}function p(t,e,m){var i=t<<16|e<<8|m;if(null!=p._cache[i])return p._cache[i];for(var o,s,c,r,a,h=1/0,l=-1,d=0;d{t.exports=[{time:1146,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ #"},{time:2158,content:" "},{time:2438,content:"W"},{time:2502,content:"e"},{time:2815,content:"l"},{time:2945,content:"c"},{time:3062,content:"o"},{time:3247,content:"m"},{time:3312,content:"e"},{time:3600,content:"!"},{time:4032,content:" "},{time:5015,content:"T"},{time:5150,content:"h"},{time:5303,content:"i"},{time:5415,content:"s"},{time:5503,content:" "},{time:5656,content:"i"},{time:5744,content:"s"},{time:5823,content:" "},{time:5936,content:"a"},{time:6007,content:" "},{time:6568,content:"t"},{time:6720,content:"e"},{time:6767,content:"r"},{time:6840,content:"m"},{time:7015,content:"i"},{time:7161,content:"n"},{time:7223,content:"a"},{time:7335,content:"l"},{time:7423,content:" "},{time:7598,content:"r"},{time:7648,content:"e"},{time:7790,content:"p"},{time:7984,content:"l"},{time:8071,content:"a"},{time:8230,content:"y"},{time:8592,content:" "},{time:8784,content:"w"},{time:8856,content:"h"},{time:8927,content:"e"},{time:8998,content:"r"},{time:9583,content:"e"},{time:10110,content:"\r\n"},{time:10110,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:10863,content:"#"},{time:10943,content:" "},{time:11350,content:"I"},{time:11574,content:"'"},{time:11814,content:"m"},{time:11918,content:" "},{time:12438,content:"g"},{time:12526,content:"o"},{time:12704,content:"i"},{time:12767,content:"n"},{time:12838,content:"g"},{time:12919,content:" "},{time:13079,content:"t"},{time:13159,content:"o"},{time:13237,content:" "},{time:13429,content:"d"},{time:13591,content:"e"},{time:13663,content:"m"},{time:13822,content:"o"},{time:13880,content:" "},{time:14025,content:"a"},{time:14111,content:" "},{time:14287,content:"f"},{time:14322,content:"e"},{time:14391,content:"w"},{time:14533,content:" "},{time:14879,content:"e"},{time:15046,content:"x"},{time:15207,content:"a"},{time:15238,content:"m"},{time:15407,content:"p"},{time:15558,content:"l"},{time:15728,content:"e"},{time:16358,content:"s"},{time:16478,content:" "},{time:16841,content:"o"},{time:16895,content:"f"},{time:16966,content:" "},{time:17198,content:"m"},{time:17349,content:"e"},{time:17390,content:"m"},{time:18303,content:"l"},{time:18351,content:"a"},{time:18494,content:"b"},{time:18623,content:" "},{time:18839,content:"c"},{time:18936,content:"o"},{time:19110,content:"m"},{time:19248,content:"m"},{time:19311,content:"a"},{time:19415,content:"n"},{time:19486,content:"d"},{time:19536,content:"s"},{time:20005,content:"\r\n"},{time:20005,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:21702,content:"#"},{time:21776,content:" "},{time:22110,content:"f"},{time:22270,content:"i"},{time:22351,content:"r"},{time:22446,content:"s"},{time:22543,content:"t"},{time:22630,content:" "},{time:22791,content:"i"},{time:22830,content:"n"},{time:22887,content:"s"},{time:22952,content:"t"},{time:23039,content:"a"},{time:23135,content:"l"},{time:23296,content:"l"},{time:24175,content:" "},{time:24431,content:"m"},{time:24488,content:"e"},{time:24575,content:"m"},{time:24726,content:"l"},{time:24751,content:"a"},{time:24942,content:"b"},{time:25013,content:" "},{time:25509,content:"u"},{time:25591,content:"s"},{time:25734,content:"i"},{time:25767,content:"n"},{time:25862,content:"g"},{time:25950,content:" "},{time:26606,content:"n"},{time:26775,content:"p"},{time:26942,content:"m"},{time:26942,content:" "},{time:26942,content:"("},{time:26942,content:"t"},{time:26942,content:"h"},{time:26942,content:"i"},{time:26942,content:"s"},{time:26942,content:" "},{time:26942,content:"m"},{time:26942,content:"a"},{time:26942,content:"y"},{time:26942,content:" "},{time:26942,content:"t"},{time:26942,content:"a"},{time:26942,content:"k"},{time:26942,content:"e"},{time:26942,content:" "},{time:26942,content:"1"},{time:26942,content:" "},{time:26942,content:"m"},{time:26942,content:"i"},{time:26942,content:"n"},{time:26942,content:")"},{time:27158,content:"\r\n"},{time:27158,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:27702,content:"n"},{time:28054,content:"p"},{time:28262,content:"m"},{time:28382,content:" "},{time:29686,content:"i"},{time:29774,content:" "},{time:29958,content:"-"},{time:30174,content:"g"},{time:30349,content:" "},{time:30566,content:"m"},{time:30653,content:"e"},{time:30727,content:"m"},{time:31127,content:"l"},{time:31174,content:"a"},{time:31351,content:"b"},{time:31455,content:"\r\n"},{time:31753,content:"\x1b[?25l"},{time:31757,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2807 reify: \x1b[32;40mtiming\x1b[0m \x1b[35marborist:ctor\x1b[0m Completed in 0ms\x1b[0m\x1b[K\r"},{time:31804,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:31854,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:31905,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:31960,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32024,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32076,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32135,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2839 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32185,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2807 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32237,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2807 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32287,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32337,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280b idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32387,content:"\u2e28\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2839 idealTree:lib: \x1b[7msill\x1b[0m \x1b[35midealTree\x1b[0m buildDeps\x1b[0m\x1b[K\r"},{time:32477,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32526,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32576,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32634,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32684,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2826 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32748,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32801,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32849,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2826 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32900,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:32950,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2827 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33001,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33063,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33113,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33162,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33213,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33263,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33313,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33363,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33413,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33464,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33514,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33563,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33614,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2827 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33663,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2834 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33714,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2807 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33764,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33814,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2826 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33864,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2839 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33918,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u283c idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:33973,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2826 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34023,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280b idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34074,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2827 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34123,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280b idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34173,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2838 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34224,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280b idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34273,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2839 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34324,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2826 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34374,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280f idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34424,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u280b idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:34474,content:"\u2e28\x1b[107;97m#########\x1b[0m\x1b[100;90m\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\u2802\x1b[0m\u2e29 \u2807 idealTree:lib: \x1b[32;40mtiming\x1b[0m \x1b[35midealTree:#root\x1b[0m Completed in 663ms\x1b[0m\x1b[K\r"},{time:35102,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u283c reify:@memlab/cli: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modul\x1b[0m\x1b[K\r"},{time:35152,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u283c reify:@memlab/cli: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modul\x1b[0m\x1b[K\r"},{time:35202,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u283c reify:@memlab/cli: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modul\x1b[0m\x1b[K\r"},{time:35252,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u2834 reify:puppeteer: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modules\x1b[0m\x1b[K\r"},{time:35313,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u2826 reify:es-abstract: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modul\x1b[0m\x1b[K\r"},{time:35362,content:"\u2e28\x1b[107;97m##################\x1b[0m\u2e29 \u2826 reify:es-abstract: \x1b[32;40mtiming\x1b[0m \x1b[35mreifyNode:node_modules/memlab/node_modul\x1b[0m\x1b[K\r"},{time:69252,content:"\r\x1b[K\x1b[?25h",timeGapFromPreviousStep:3e3},{time:69257,content:"\r\nchanged 126 packages, and audited 127 packages in 38s\r\n"},{time:69257,content:" run `npm fund` for details\r\n"},{time:69257,content:"\r\n44 packages are looking for funding\r\n"},{time:69258,content:"\r\nfound \x1b[32m\x1b[1m0\x1b[22m\x1b[39m vulnerabilities\r\n"},{time:69264,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:70895,content:"c",timeGapFromPreviousStep:3e3},{time:71069,content:"l"},{time:71141,content:"e"},{time:71205,content:"a"},{time:71278,content:"r"},{time:71470,content:"\r\n"},{time:71471,content:"\x1b[H\x1b[2J"},{time:71472,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:73520,content:"#"},{time:73582,content:" "},{time:74045,content:"n"},{time:74118,content:"o"},{time:74193,content:"w"},{time:74269,content:" "},{time:74765,content:"d"},{time:74941,content:"e"},{time:75069,content:"f"},{time:75126,content:"i"},{time:75286,content:"n"},{time:75389,content:"e"},{time:75501,content:" "},{time:75631,content:"a"},{time:75693,content:" "},{time:76078,content:"t"},{time:76117,content:"e"},{time:76269,content:"s"},{time:76345,content:"t"},{time:76406,content:" "},{time:76565,content:"s"},{time:76766,content:"c"},{time:76934,content:"e"},{time:77038,content:"n"},{time:77126,content:"a"},{time:77215,content:"r"},{time:77286,content:"i"},{time:77349,content:"o"},{time:77447,content:" "},{time:77581,content:"f"},{time:77686,content:"i"},{time:77853,content:"l"},{time:77902,content:"e"},{time:78093,content:" "},{time:79094,content:"o"},{time:79148,content:"n"},{time:79598,content:"\r\n"},{time:79598,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:79925,content:"#"},{time:80166,content:" "},{time:80493,content:"h"},{time:80558,content:"o"},{time:80588,content:"w"},{time:80663,content:" "},{time:81004,content:"y"},{time:81093,content:"o"},{time:81151,content:"u"},{time:81245,content:" "},{time:81476,content:"w"},{time:81550,content:"a"},{time:81654,content:"n"},{time:81757,content:"t"},{time:81812,content:" "},{time:81949,content:"t"},{time:82030,content:"o"},{time:82117,content:" "},{time:82462,content:"i"},{time:82508,content:"n"},{time:82558,content:"t"},{time:82638,content:"e"},{time:82726,content:"r"},{time:82820,content:"a"},{time:83070,content:"c"},{time:83254,content:"t"},{time:83341,content:" "},{time:83484,content:"w"},{time:83596,content:"i"},{time:83662,content:"t"},{time:83812,content:"h"},{time:83917,content:" "},{time:84193,content:"a"},{time:84294,content:" "},{time:84469,content:"w"},{time:84549,content:"e"},{time:84654,content:"b"},{time:84758,content:" "},{time:84909,content:"p"},{time:84959,content:"a"},{time:85092,content:"g"},{time:85150,content:"e"},{time:85316,content:"\r\n"},{time:85317,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:86590,content:"c"},{time:86653,content:"a"},{time:86837,content:"t"},{time:86924,content:" "},{time:87214,content:"."},{time:87269,content:"/"},{time:88108,content:"t"},{time:88165,content:"e"},{time:88302,content:"s"},{time:88349,content:"t"},{time:88502,content:"-"},{time:88661,content:"g"},{time:88805,content:"o"},{time:88932,content:"o"},{time:89007,content:"g"},{time:89133,content:"l"},{time:89236,content:"e"},{time:89449,content:"-maps.js "},{time:90045,content:"\r\n"},{time:90046,content:"// Visit Google Maps\r\nfunction url() {\r\n return 'https://www.google.com/maps/@37.386427,-122.0428214,11z';\r\n}\r\n\r\n// action where we want to detect memory leaks: click the Hotels button\r\nasync function action(page) {\r\n await page.click('button[aria-label=\"Hotels\"]');\r\n}\r\n\r\n// action where we want to go back to the step before: click clear search\r\nasync function back(page) {\r\n await page.click('[aria-label=\"Clear search\"]');\r\n}\r\n\r\nmodule.exports = {action, back, url};\r\n"},{time:90047,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:95735,content:"\r\n"},{time:95735,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:96444,content:"#"},{time:96638,content:" "},{time:97187,content:"a"},{time:97262,content:"s"},{time:97445,content:"k"},{time:97557,content:" "},{time:99365,content:"m"},{time:99429,content:"e"},{time:99508,content:"m"},{time:99669,content:"l"},{time:99692,content:"a"},{time:99870,content:"b"},{time:99981,content:" "},{time:100174,content:"t"},{time:100243,content:"o"},{time:100294,content:" "},{time:100516,content:"d"},{time:100693,content:"e"},{time:100837,content:"t"},{time:100916,content:"e"},{time:101156,content:"c"},{time:101350,content:"t"},{time:101404,content:" "},{time:101582,content:"m"},{time:101661,content:"e"},{time:101725,content:"m"},{time:101893,content:"o"},{time:101942,content:"r"},{time:102045,content:"y"},{time:102189,content:" "},{time:102310,content:"l"},{time:102390,content:"e"},{time:102470,content:"a"},{time:102515,content:"k"},{time:102644,content:"s"},{time:102990,content:"\r\n"},{time:102990,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:103357,content:"#"},{time:103484,content:" "},{time:103918,content:"i"},{time:103957,content:"n"},{time:104061,content:" "},{time:105303,content:"t"},{time:105437,content:"h"},{time:105502,content:"e"},{time:105556,content:" "},{time:105740,content:"t"},{time:105789,content:"e"},{time:105989,content:"s"},{time:106077,content:"t"},{time:106180,content:" "},{time:106357,content:"s"},{time:106533,content:"c"},{time:106702,content:"e"},{time:106829,content:"n"},{time:106925,content:"a"},{time:106989,content:"r"},{time:107147,content:"i"},{time:107189,content:"o"},{time:107868,content:"\r\n"},{time:107868,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:108267,content:"#"},{time:108437,content:" "},{time:108788,content:"m"},{time:108859,content:"e"},{time:108951,content:"m"},{time:109100,content:"l"},{time:109117,content:"a"},{time:109308,content:"b"},{time:109413,content:" "},{time:109596,content:"w"},{time:109613,content:"i"},{time:109788,content:"l"},{time:109924,content:"l"},{time:110036,content:" "},{time:110268,content:"r"},{time:110371,content:"u"},{time:110604,content:"n"},{time:110669,content:" "},{time:110798,content:"a"},{time:110884,content:" "},{time:111349,content:"h"},{time:111404,content:"e"},{time:111454,content:"a"},{time:111957,content:"d"},{time:112187,content:"l"},{time:112253,content:"e"},{time:112387,content:"s"},{time:112532,content:"s"},{time:112613,content:" "},{time:113014,content:"b"},{time:113195,content:"r"},{time:113292,content:"o"},{time:113358,content:"w"},{time:113556,content:"s"},{time:113622,content:"e"},{time:113691,content:"r"},{time:115317,content:"\r\n"},{time:115317,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:115611,content:"#"},{time:115748,content:" "},{time:115972,content:"a"},{time:116094,content:"n"},{time:116181,content:"d"},{time:116277,content:" "},{time:116411,content:"r"},{time:116469,content:"e"},{time:116684,content:"c"},{time:116844,content:"o"},{time:116915,content:"r"},{time:116948,content:"d"},{time:117262,content:" "},{time:117844,content:"J"},{time:117902,content:"S"},{time:118015,content:" "},{time:118341,content:"h"},{time:118421,content:"e"},{time:118469,content:"a"},{time:118619,content:"p"},{time:118732,content:" "},{time:119070,content:"i"},{time:119107,content:"n"},{time:119205,content:"f"},{time:119293,content:"o"},{time:119491,content:" "},{time:119661,content:"a"},{time:119773,content:"n"},{time:119852,content:"d"},{time:119931,content:" "},{time:121325,content:"f"},{time:121459,content:"i"},{time:121509,content:"n"},{time:121573,content:"d"},{time:122334,content:"\r\n"},{time:122334,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:122596,content:"#"},{time:122717,content:" "},{time:122964,content:"m"},{time:123038,content:"e"},{time:123115,content:"m"},{time:123284,content:"o"},{time:123316,content:"r"},{time:123469,content:"y"},{time:123669,content:" "},{time:123955,content:"l"},{time:125238,content:"e"},{time:125324,content:"a"},{time:125731,content:"k"},{time:125804,content:"s"},{time:128116,content:"\r\n"},{time:128116,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:129091,content:"m"},{time:129189,content:"e"},{time:129253,content:"m"},{time:129421,content:"l"},{time:129470,content:"a"},{time:129645,content:"b"},{time:129755,content:" "},{time:129908,content:"r"},{time:129996,content:"u"},{time:130173,content:"n"},{time:130252,content:" "},{time:130452,content:"-"},{time:130580,content:"-"},{time:130695,content:"s"},{time:130907,content:"c"},{time:131076,content:"e"},{time:131211,content:"n"},{time:131301,content:"a"},{time:131397,content:"r"},{time:131502,content:"i"},{time:131556,content:"o"},{time:131716,content:" "},{time:132492,content:"."},{time:132565,content:"/"},{time:132677,content:"t"},{time:132756,content:"e"},{time:132869,content:"s"},{time:132948,content:"t"},{time:133189,content:"-"},{time:133372,content:"g"},{time:133581,content:"o"},{time:133770,content:"ogle-maps.js "},{time:134572,content:"\r\n"},{time:135612,content:"\x1b[1mpage-load(\x1b[32mbaseline\x1b[39m)[\x1b[32ms1\x1b[39m]\x1b[22m \x1b[90m>\x1b[39m \x1b[2maction-on-page(\x1b[32mtarget\x1b[39m)[\x1b[32ms2\x1b[39m] \x1b[90m>\x1b[39m \x1b[22m\x1b[2mrevert(\x1b[32mfinal\x1b[39m)[\x1b[32ms3\x1b[39m] \x1b[22m\r\n"},{time:135614,content:"\x1b[90mConnecting to web server...\x1b[39m\r\n"},{time:140058,content:"\x1b[90mrunning a full GC...\x1b[39m\r\n"},{time:140058,content:"\x1b[K\x1b[F\x1b[K"},{time:144663,content:"\x1b[F\x1b[K\x1b[33mHeap size: 24.6MB\x1b[39m\r\n"},{time:144663,content:"\x1b[K"},{time:144665,content:"\x1b[90mtaking screenshot...\x1b[39m\r\n"},{time:145090,content:"\x1b[K"},{time:145091,content:"\x1b[F\x1b[K"},{time:146397,content:"\x1b[90mheap snapshot 0% complete\x1b[39m\r\n"},{time:146455,content:"\x1b[K"},{time:146455,content:"\x1b[F\x1b[K"},{time:146455,content:"\x1b[90mheap snapshot 1% complete\x1b[39m\r\n"},{time:146515,content:"\x1b[K"},{time:146515,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 3% complete\x1b[39m\r\n"},{time:146852,content:"\x1b[K"},{time:146852,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 5% complete\x1b[39m\r\n"},{time:147205,content:"\x1b[K"},{time:147205,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 6% complete\x1b[39m\r\n"},{time:147298,content:"\x1b[K\x1b[F\x1b[K"},{time:147299,content:"\x1b[90mheap snapshot 8% complete\x1b[39m\r\n"},{time:147380,content:"\x1b[K"},{time:147380,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 10% complete\x1b[39m\r\n"},{time:147525,content:"\x1b[K"},{time:147525,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 11% complete\x1b[39m\r\n"},{time:147661,content:"\x1b[K"},{time:147661,content:"\x1b[90mheap snapshot 13% complete\x1b[39m\r\n"},{time:147661,content:"\x1b[F\x1b[K"},{time:147688,content:"\x1b[K\x1b[F\x1b[K"},{time:147688,content:"\x1b[90mheap snapshot 15% complete\x1b[39m\r\n"},{time:147723,content:"\x1b[K"},{time:147723,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 17% complete\x1b[39m\r\n"},{time:147779,content:"\x1b[K"},{time:147780,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 18% complete\x1b[39m\r\n"},{time:147850,content:"\x1b[K"},{time:147850,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 20% complete\x1b[39m\r\n"},{time:148068,content:"\x1b[K"},{time:148068,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 22% complete\x1b[39m\r\n"},{time:148118,content:"\x1b[K"},{time:148118,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 23% complete\x1b[39m\r\n"},{time:148431,content:"\x1b[K"},{time:148431,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 25% complete\x1b[39m\r\n"},{time:148832,content:"\x1b[K\x1b[F\x1b[K"},{time:148832,content:"\x1b[90mheap snapshot 27% complete\x1b[39m\r\n"},{time:148854,content:"\x1b[K\x1b[F\x1b[K"},{time:148854,content:"\x1b[90mheap snapshot 29% complete\x1b[39m\r\n"},{time:148896,content:"\x1b[K"},{time:148897,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 30% complete\x1b[39m\r\n"},{time:148959,content:"\x1b[K"},{time:148959,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 32% complete\x1b[39m\r\n"},{time:148987,content:"\x1b[K\x1b[F\x1b[K"},{time:148987,content:"\x1b[90mheap snapshot 34% complete\x1b[39m\r\n"},{time:149013,content:"\x1b[K"},{time:149014,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 35% complete\x1b[39m\r\n"},{time:149057,content:"\x1b[K\x1b[F\x1b[K"},{time:149057,content:"\x1b[90mheap snapshot 37% complete\x1b[39m\r\n"},{time:149083,content:"\x1b[K\x1b[F\x1b[K"},{time:149083,content:"\x1b[90mheap snapshot 39% complete\x1b[39m\r\n"},{time:149167,content:"\x1b[K\x1b[F\x1b[K"},{time:149167,content:"\x1b[90mheap snapshot 41% complete\x1b[39m\r\n"},{time:149217,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 42% complete\x1b[39m\r\n"},{time:149217,content:"\x1b[K"},{time:149270,content:"\x1b[K"},{time:149271,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 44% complete\x1b[39m\r\n"},{time:149590,content:"\x1b[K\x1b[F\x1b[K"},{time:149590,content:"\x1b[90mheap snapshot 46% complete\x1b[39m\r\n"},{time:149607,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 47% complete\x1b[39m\r\n"},{time:149614,content:"\x1b[K\x1b[F\x1b[K"},{time:149614,content:"\x1b[90mheap snapshot 49% complete\x1b[39m\r\n"},{time:149652,content:"\x1b[K"},{time:149652,content:"\x1b[90mheap snapshot 51% complete\x1b[39m\r\n"},{time:149652,content:"\x1b[F\x1b[K"},{time:149722,content:"\x1b[K\x1b[F\x1b[K"},{time:149722,content:"\x1b[90mheap snapshot 53% complete\x1b[39m\r\n"},{time:149774,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 54% complete\x1b[39m\r\n"},{time:149797,content:"\x1b[K"},{time:149797,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 56% complete\x1b[39m\r\n"},{time:149840,content:"\x1b[K"},{time:149840,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 58% complete\x1b[39m\r\n"},{time:149893,content:"\x1b[K"},{time:149893,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 59% complete\x1b[39m\r\n"},{time:149908,content:"\x1b[K"},{time:149909,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 61% complete\x1b[39m\r\n"},{time:149940,content:"\x1b[K"},{time:149940,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 63% complete\x1b[39m\r\n"},{time:149972,content:"\x1b[90mheap snapshot 64% complete\x1b[39m\r\n"},{time:149972,content:"\x1b[K\x1b[F\x1b[K"},{time:150021,content:"\x1b[K\x1b[F\x1b[K"},{time:150021,content:"\x1b[90mheap snapshot 66% complete\x1b[39m\r\n"},{time:150125,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 68% complete\x1b[39m\r\n"},{time:150125,content:"\x1b[K"},{time:150183,content:"\x1b[K"},{time:150183,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 70% complete\x1b[39m\r\n"},{time:150233,content:"\x1b[K"},{time:150233,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 71% complete\x1b[39m\r\n"},{time:150270,content:"\x1b[K"},{time:150270,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 73% complete\x1b[39m\r\n"},{time:150306,content:"\x1b[K"},{time:150306,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 75% complete\x1b[39m\r\n"},{time:150348,content:"\x1b[K\x1b[F\x1b[K"},{time:150348,content:"\x1b[90mheap snapshot 76% complete\x1b[39m\r\n"},{time:150392,content:"\x1b[K"},{time:150392,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 78% complete\x1b[39m\r\n"},{time:150438,content:"\x1b[K"},{time:150438,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 80% complete\x1b[39m\r\n"},{time:150465,content:"\x1b[K"},{time:150465,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 82% complete\x1b[39m\r\n"},{time:150683,content:"\x1b[K\x1b[F\x1b[K"},{time:150683,content:"\x1b[90mheap snapshot 83% complete\x1b[39m\r\n"},{time:150712,content:"\x1b[K\x1b[F\x1b[K"},{time:150712,content:"\x1b[90mheap snapshot 85% complete\x1b[39m\r\n"},{time:150757,content:"\x1b[K"},{time:150757,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 87% complete\x1b[39m\r\n"},{time:150803,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 88% complete\x1b[39m\r\n"},{time:150852,content:"\x1b[K"},{time:150852,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 90% complete\x1b[39m\r\n"},{time:150878,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 92% complete\x1b[39m\r\n"},{time:150878,content:"\x1b[K"},{time:150923,content:"\x1b[K"},{time:150923,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 94% complete\x1b[39m\r\n"},{time:150971,content:"\x1b[K\x1b[F\x1b[K"},{time:150971,content:"\x1b[90mheap snapshot 95% complete\x1b[39m\r\n"},{time:150981,content:"\x1b[K\x1b[F\x1b[K"},{time:150981,content:"\x1b[90mheap snapshot 97% complete\x1b[39m\r\n"},{time:150991,content:"\x1b[K\x1b[F\x1b[K"},{time:150991,content:"\x1b[90mheap snapshot 99% complete\x1b[39m\r\n"},{time:151271,content:"\x1b[K\x1b[F\x1b[K"},{time:151271,content:"\x1b[90mheap snapshot 99% complete\x1b[39m\r\n"},{time:151658,content:"\x1b[K"},{time:151658,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:151658,content:"\x1b[K"},{time:151658,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:152958,content:"\x1b[K"},{time:152958,content:"\x1b[F\x1b[K"},{time:152959,content:"\x1b[90msnapshot saved to disk\x1b[39m\r\n"},{time:152959,content:"\x1b[K\x1b[F\x1b[K"},{time:152959,content:"\r\n\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K"},{time:152960,content:"page-load[\x1b[32m24.6MB\x1b[39m](\x1b[32mbaseline\x1b[39m)[\x1b[32ms1\x1b[39m] \x1b[90m>\x1b[39m \x1b[1maction-on-page(\x1b[32mtarget\x1b[39m)[\x1b[32ms2\x1b[39m]\x1b[22m \x1b[90m>\x1b[39m \x1b[2mrevert(\x1b[32mfinal\x1b[39m)[\x1b[32ms3\x1b[39m] \x1b[22m\r\n"},{time:155348,content:"\x1b[90mrunning a full GC...\x1b[39m\r\n"},{time:160192,content:"\x1b[K\x1b[F\x1b[K"},{time:160192,content:"\x1b[33mHeap size: 30.4MB\x1b[39m\r\n"},{time:160193,content:"\x1b[90mtaking screenshot...\x1b[39m\r\n"},{time:160546,content:"\x1b[K"},{time:160546,content:"\x1b[F\x1b[K"},{time:162104,content:"\x1b[90mheap snapshot 0% complete\x1b[39m\r\n"},{time:162180,content:"\x1b[K"},{time:162180,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 1% complete\x1b[39m\r\n"},{time:162244,content:"\x1b[K"},{time:162244,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 2% complete\x1b[39m\r\n"},{time:162835,content:"\x1b[K"},{time:162835,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 4% complete\x1b[39m\r\n"},{time:163371,content:"\x1b[K"},{time:163371,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 5% complete\x1b[39m\r\n"},{time:163579,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 6% complete\x1b[39m\r\n"},{time:163579,content:"\x1b[K"},{time:163877,content:"\x1b[K"},{time:163877,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 8% complete\x1b[39m\r\n"},{time:164001,content:"\x1b[90mheap snapshot 9% complete\x1b[39m\r\n"},{time:164001,content:"\x1b[K\x1b[F\x1b[K"},{time:164168,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 10% complete\x1b[39m\r\n"},{time:164168,content:"\x1b[K"},{time:164249,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 12% complete\x1b[39m\r\n"},{time:164249,content:"\x1b[K"},{time:164330,content:"\x1b[K"},{time:164330,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 13% complete\x1b[39m\r\n"},{time:164346,content:"\x1b[90mheap snapshot 14% complete\x1b[39m\r\n"},{time:164346,content:"\x1b[K\x1b[F\x1b[K"},{time:164397,content:"\x1b[K"},{time:164397,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 16% complete\x1b[39m\r\n"},{time:164444,content:"\x1b[K"},{time:164444,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 17% complete\x1b[39m\r\n"},{time:164500,content:"\x1b[K"},{time:164500,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 18% complete\x1b[39m\r\n"},{time:164532,content:"\x1b[K"},{time:164532,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 20% complete\x1b[39m\r\n"},{time:164582,content:"\x1b[K"},{time:164582,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 21% complete\x1b[39m\r\n"},{time:164614,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 22% complete\x1b[39m\r\n"},{time:164614,content:"\x1b[K"},{time:164655,content:"\x1b[K\x1b[F\x1b[K"},{time:164655,content:"\x1b[90mheap snapshot 24% complete\x1b[39m\r\n"},{time:164700,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 25% complete\x1b[39m\r\n"},{time:164700,content:"\x1b[K"},{time:164749,content:"\x1b[90mheap snapshot 26% complete\x1b[39m\r\n"},{time:164749,content:"\x1b[K\x1b[F\x1b[K"},{time:164782,content:"\x1b[K"},{time:164782,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 28% complete\x1b[39m\r\n"},{time:164824,content:"\x1b[K"},{time:164824,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 29% complete\x1b[39m\r\n"},{time:164862,content:"\x1b[K"},{time:164862,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 30% complete\x1b[39m\r\n"},{time:164903,content:"\x1b[K\x1b[F\x1b[K"},{time:164903,content:"\x1b[90mheap snapshot 32% complete\x1b[39m\r\n"},{time:164941,content:"\x1b[K"},{time:164941,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 33% complete\x1b[39m\r\n"},{time:164976,content:"\x1b[K"},{time:164976,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 34% complete\x1b[39m\r\n"},{time:164997,content:"\x1b[K"},{time:164997,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 36% complete\x1b[39m\r\n"},{time:165031,content:"\x1b[K"},{time:165031,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 37% complete\x1b[39m\r\n"},{time:165048,content:"\x1b[K"},{time:165048,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 38% complete\x1b[39m\r\n"},{time:165128,content:"\x1b[K"},{time:165128,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 40% complete\x1b[39m\r\n"},{time:165162,content:"\x1b[K"},{time:165162,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 41% complete\x1b[39m\r\n"},{time:165174,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 42% complete\x1b[39m\r\n"},{time:165174,content:"\x1b[K"},{time:165438,content:"\x1b[K"},{time:165438,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 44% complete\x1b[39m\r\n"},{time:165476,content:"\x1b[K\x1b[F\x1b[K"},{time:165476,content:"\x1b[90mheap snapshot 45% complete\x1b[39m\r\n"},{time:165537,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 46% complete\x1b[39m\r\n"},{time:165537,content:"\x1b[K"},{time:165603,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 48% complete\x1b[39m\r\n"},{time:165654,content:"\x1b[K"},{time:165654,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 49% complete\x1b[39m\r\n"},{time:165699,content:"\x1b[K"},{time:165699,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 50% complete\x1b[39m\r\n"},{time:165745,content:"\x1b[90mheap snapshot 52% complete\x1b[39m\r\n"},{time:165745,content:"\x1b[K\x1b[F\x1b[K"},{time:165807,content:"\x1b[K"},{time:165807,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 53% complete\x1b[39m\r\n"},{time:165878,content:"\x1b[K"},{time:165878,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 54% complete\x1b[39m\r\n"},{time:165948,content:"\x1b[K"},{time:165948,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 56% complete\x1b[39m\r\n"},{time:165998,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 57% complete\x1b[39m\r\n"},{time:165998,content:"\x1b[K"},{time:166068,content:"\x1b[K"},{time:166068,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 58% complete\x1b[39m\r\n"},{time:166147,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 60% complete\x1b[39m\r\n"},{time:166147,content:"\x1b[K"},{time:166234,content:"\x1b[K"},{time:166234,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 61% complete\x1b[39m\r\n"},{time:166299,content:"\x1b[K\x1b[F\x1b[K"},{time:166299,content:"\x1b[90mheap snapshot 62% complete\x1b[39m\r\n"},{time:166355,content:"\x1b[K"},{time:166355,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 64% complete\x1b[39m\r\n"},{time:166427,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 65% complete\x1b[39m\r\n"},{time:166427,content:"\x1b[K"},{time:166496,content:"\x1b[K\x1b[F\x1b[K"},{time:166496,content:"\x1b[90mheap snapshot 66% complete\x1b[39m\r\n"},{time:166552,content:"\x1b[K"},{time:166552,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 68% complete\x1b[39m\r\n"},{time:166637,content:"\x1b[K"},{time:166637,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 69% complete\x1b[39m\r\n"},{time:166686,content:"\x1b[K"},{time:166686,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 70% complete\x1b[39m\r\n"},{time:166757,content:"\x1b[K"},{time:166757,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 72% complete\x1b[39m\r\n"},{time:166799,content:"\x1b[K\x1b[F\x1b[K"},{time:166799,content:"\x1b[90mheap snapshot 73% complete\x1b[39m\r\n"},{time:166831,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 74% complete\x1b[39m\r\n"},{time:166831,content:"\x1b[K"},{time:166890,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 76% complete\x1b[39m\r\n"},{time:166890,content:"\x1b[K"},{time:166987,content:"\x1b[K"},{time:166987,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 77% complete\x1b[39m\r\n"},{time:167023,content:"\x1b[K"},{time:167023,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 78% complete\x1b[39m\r\n"},{time:167056,content:"\x1b[K"},{time:167056,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 80% complete\x1b[39m\r\n"},{time:167104,content:"\x1b[K\x1b[F\x1b[K"},{time:167104,content:"\x1b[90mheap snapshot 81% complete\x1b[39m\r\n"},{time:167137,content:"\x1b[K\x1b[F\x1b[K"},{time:167137,content:"\x1b[90mheap snapshot 82% complete\x1b[39m\r\n"},{time:167182,content:"\x1b[90mheap snapshot 84% complete\x1b[39m\r\n"},{time:167182,content:"\x1b[K\x1b[F\x1b[K"},{time:167212,content:"\x1b[K"},{time:167212,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 85% complete\x1b[39m\r\n"},{time:167247,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 86% complete\x1b[39m\r\n"},{time:167247,content:"\x1b[K"},{time:167277,content:"\x1b[K"},{time:167277,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 88% complete\x1b[39m\r\n"},{time:167321,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 89% complete\x1b[39m\r\n"},{time:167321,content:"\x1b[K"},{time:167375,content:"\x1b[K"},{time:167375,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 90% complete\x1b[39m\r\n"},{time:167430,content:"\x1b[K"},{time:167430,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 92% complete\x1b[39m\r\n"},{time:167507,content:"\x1b[K"},{time:167507,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 93% complete\x1b[39m\r\n"},{time:167627,content:"\x1b[K"},{time:167627,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 94% complete\x1b[39m\r\n"},{time:167687,content:"\x1b[K\x1b[F\x1b[K"},{time:167687,content:"\x1b[90mheap snapshot 96% complete\x1b[39m\r\n"},{time:167703,content:"\x1b[K"},{time:167703,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 97% complete\x1b[39m\r\n"},{time:167713,content:"\x1b[K"},{time:167713,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 98% complete\x1b[39m\r\n"},{time:168077,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 99% complete\x1b[39m\r\n"},{time:169011,content:"\x1b[K"},{time:169011,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:169011,content:"\x1b[K\x1b[F\x1b[K"},{time:169011,content:"\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:170622,content:"\x1b[K"},{time:170622,content:"\x1b[F\x1b[K"},{time:170623,content:"\x1b[90msnapshot saved to disk\x1b[39m\r\n"},{time:170623,content:"\x1b[K"},{time:170623,content:"\x1b[F\x1b[K"},{time:170624,content:"\r\n"},{time:170624,content:"\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K"},{time:170624,content:"page-load[\x1b[32m24.6MB\x1b[39m](\x1b[32mbaseline\x1b[39m)[\x1b[32ms1\x1b[39m] \x1b[90m>\x1b[39m action-on-page[\x1b[32m30.4MB\x1b[39m](\x1b[32mtarget\x1b[39m)[\x1b[32ms2\x1b[39m] \x1b[90m>\x1b[39m \x1b[1mrevert(\x1b[32mfinal\x1b[39m)[\x1b[32ms3\x1b[39m]\x1b[22m \r\n"},{time:201208,content:"\x1b[90mCheck timeout '/maps/search/Hotels/@37.3862618,-122.0428216,11z/data=!3m1!4b1' set wait: 2000ms\x1b[39m\r\n",timeGapFromPreviousStep:5e3},{time:201711,content:"\x1b[K\x1b[F\x1b[K\x1b[F\x1b[K"},{time:201711,content:"\x1b[90mrunning a full GC...\x1b[39m\r\n"},{time:206435,content:"\x1b[K\x1b[F\x1b[K"},{time:206435,content:"\x1b[33mHeap size: 29.4MB\x1b[39m\r\n"},{time:206435,content:"\x1b[90mtaking screenshot...\x1b[39m\r\n"},{time:206824,content:"\x1b[K\x1b[F\x1b[K"},{time:208321,content:"\x1b[90mheap snapshot 0% complete\x1b[39m\r\n"},{time:208396,content:"\x1b[K"},{time:208396,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 1% complete\x1b[39m\r\n"},{time:208460,content:"\x1b[K"},{time:208460,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 2% complete\x1b[39m\r\n"},{time:209047,content:"\x1b[K\x1b[F\x1b[K"},{time:209047,content:"\x1b[90mheap snapshot 4% complete\x1b[39m\r\n"},{time:209579,content:"\x1b[K\x1b[F\x1b[K"},{time:209579,content:"\x1b[90mheap snapshot 5% complete\x1b[39m\r\n"},{time:209786,content:"\x1b[K"},{time:209786,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 7% complete\x1b[39m\r\n"},{time:210080,content:"\x1b[K"},{time:210081,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 8% complete\x1b[39m\r\n"},{time:210205,content:"\x1b[K\x1b[F\x1b[K"},{time:210205,content:"\x1b[90mheap snapshot 9% complete\x1b[39m\r\n"},{time:210371,content:"\x1b[K"},{time:210371,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 11% complete\x1b[39m\r\n"},{time:210452,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 12% complete\x1b[39m\r\n"},{time:210452,content:"\x1b[K"},{time:210532,content:"\x1b[K"},{time:210532,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 14% complete\x1b[39m\r\n"},{time:210574,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 15% complete\x1b[39m\r\n"},{time:210574,content:"\x1b[K"},{time:210623,content:"\x1b[K"},{time:210623,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 17% complete\x1b[39m\r\n"},{time:210696,content:"\x1b[K"},{time:210697,content:"\x1b[F\x1b[K"},{time:210697,content:"\x1b[90mheap snapshot 18% complete\x1b[39m"},{time:210697,content:"\r\n"},{time:210783,content:"\x1b[K"},{time:210783,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 19% complete\x1b[39m\r\n"},{time:210857,content:"\x1b[K"},{time:210857,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 21% complete\x1b[39m\r\n"},{time:210906,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 22% complete\x1b[39m\r\n"},{time:210906,content:"\x1b[K"},{time:210966,content:"\x1b[K\x1b[F\x1b[K"},{time:210966,content:"\x1b[90mheap snapshot 24% complete\x1b[39m\r\n"},{time:211011,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 25% complete\x1b[39m\r\n"},{time:211011,content:"\x1b[K"},{time:211061,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 27% complete\x1b[39m\r\n"},{time:211106,content:"\x1b[K\x1b[F\x1b[K"},{time:211106,content:"\x1b[90mheap snapshot 28% complete\x1b[39m\r\n"},{time:211147,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 29% complete\x1b[39m\r\n"},{time:211147,content:"\x1b[K"},{time:211174,content:"\x1b[K"},{time:211174,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 31% complete\x1b[39m\r\n"},{time:211208,content:"\x1b[K"},{time:211208,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 32% complete\x1b[39m\r\n"},{time:211242,content:"\x1b[K\x1b[F\x1b[K"},{time:211242,content:"\x1b[90mheap snapshot 34% complete\x1b[39m\r\n"},{time:211292,content:"\x1b[K"},{time:211292,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 35% complete\x1b[39m\r\n"},{time:211338,content:"\x1b[K\x1b[F\x1b[K"},{time:211338,content:"\x1b[90mheap snapshot 37% complete\x1b[39m\r\n"},{time:211374,content:"\x1b[K"},{time:211374,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 38% complete\x1b[39m\r\n"},{time:211418,content:"\x1b[K\x1b[F\x1b[K"},{time:211418,content:"\x1b[90mheap snapshot 39% complete\x1b[39m\r\n"},{time:211474,content:"\x1b[90mheap snapshot 41% complete\x1b[39m\r\n"},{time:211474,content:"\x1b[K\x1b[F\x1b[K"},{time:211485,content:"\x1b[K\x1b[F\x1b[K"},{time:211485,content:"\x1b[90mheap snapshot 42% complete\x1b[39m\r\n"},{time:211586,content:"\x1b[K\x1b[F\x1b[K"},{time:211586,content:"\x1b[90mheap snapshot 44% complete\x1b[39m\r\n"},{time:211661,content:"\x1b[K"},{time:211661,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 45% complete\x1b[39m\r\n"},{time:211689,content:"\x1b[K\x1b[F\x1b[K"},{time:211689,content:"\x1b[90mheap snapshot 47% complete\x1b[39m\r\n"},{time:211722,content:"\x1b[K"},{time:211722,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 48% complete\x1b[39m\r\n"},{time:211744,content:"\x1b[K"},{time:211744,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 49% complete\x1b[39m\r\n"},{time:211785,content:"\x1b[K"},{time:211785,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 51% complete\x1b[39m\r\n"},{time:211850,content:"\x1b[K\x1b[F\x1b[K"},{time:211850,content:"\x1b[90mheap snapshot 52% complete\x1b[39m\r\n"},{time:211887,content:"\x1b[K\x1b[F\x1b[K"},{time:211887,content:"\x1b[90mheap snapshot 54% complete\x1b[39m\r\n"},{time:211927,content:"\x1b[K\x1b[F\x1b[K"},{time:211927,content:"\x1b[90mheap snapshot 55% complete\x1b[39m\r\n"},{time:211992,content:"\x1b[K"},{time:211993,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 57% complete\x1b[39m\r\n"},{time:212031,content:"\x1b[K"},{time:212031,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 58% complete\x1b[39m\r\n"},{time:212091,content:"\x1b[K"},{time:212091,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 59% complete\x1b[39m\r\n"},{time:212127,content:"\x1b[K"},{time:212127,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 61% complete\x1b[39m\r\n"},{time:212198,content:"\x1b[K\x1b[F\x1b[K"},{time:212198,content:"\x1b[90mheap snapshot 62% complete\x1b[39m\r\n"},{time:212238,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 64% complete\x1b[39m\r\n"},{time:212238,content:"\x1b[K"},{time:212259,content:"\x1b[K"},{time:212259,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 65% complete\x1b[39m\r\n"},{time:212290,content:"\x1b[K"},{time:212290,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 66% complete\x1b[39m\r\n"},{time:212334,content:"\x1b[K"},{time:212334,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 68% complete\x1b[39m\r\n"},{time:212378,content:"\x1b[90mheap snapshot 69% complete\x1b[39m\r\n"},{time:212378,content:"\x1b[K\x1b[F\x1b[K"},{time:212431,content:"\x1b[K"},{time:212431,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 71% complete\x1b[39m\r\n"},{time:212462,content:"\x1b[K\x1b[F\x1b[K"},{time:212462,content:"\x1b[90mheap snapshot 72% complete\x1b[39m\r\n"},{time:212516,content:"\x1b[K"},{time:212516,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 74% complete\x1b[39m\r\n"},{time:212555,content:"\x1b[K\x1b[F\x1b[K"},{time:212555,content:"\x1b[90mheap snapshot 75% complete\x1b[39m\r\n"},{time:212586,content:"\x1b[K\x1b[F\x1b[K"},{time:212586,content:"\x1b[90mheap snapshot 76% complete\x1b[39m\r\n"},{time:212623,content:"\x1b[K"},{time:212623,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 78% complete\x1b[39m\r\n"},{time:212677,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 79% complete\x1b[39m\r\n"},{time:212678,content:"\x1b[K"},{time:212724,content:"\x1b[K"},{time:212724,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 81% complete\x1b[39m\r\n"},{time:212803,content:"\x1b[K"},{time:212803,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 82% complete\x1b[39m\r\n"},{time:212856,content:"\x1b[K"},{time:212856,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 84% complete\x1b[39m\r\n"},{time:212965,content:"\x1b[K"},{time:212965,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 85% complete\x1b[39m\r\n"},{time:213096,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 86% complete\x1b[39m\r\n"},{time:213096,content:"\x1b[K"},{time:213193,content:"\x1b[K"},{time:213193,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 88% complete\x1b[39m\r\n"},{time:213335,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 89% complete\x1b[39m\r\n"},{time:213335,content:"\x1b[K"},{time:213387,content:"\x1b[K"},{time:213387,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 91% complete\x1b[39m\r\n"},{time:213432,content:"\x1b[K"},{time:213432,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 92% complete\x1b[39m\r\n"},{time:213519,content:"\x1b[K"},{time:213519,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 94% complete\x1b[39m\r\n"},{time:213572,content:"\x1b[K"},{time:213572,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 95% complete\x1b[39m\r\n"},{time:213602,content:"\x1b[K"},{time:213602,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 96% complete\x1b[39m\r\n"},{time:213613,content:"\x1b[K\x1b[F\x1b[K"},{time:213613,content:"\x1b[90mheap snapshot 98% complete\x1b[39m\r\n"},{time:213624,content:"\x1b[K"},{time:213625,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 99% complete\x1b[39m\r\n"},{time:213965,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 99% complete\x1b[39m\r\n"},{time:213965,content:"\x1b[K"},{time:214598,content:"\x1b[K"},{time:214598,content:"\x1b[F\x1b[K\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:214598,content:"\x1b[K\x1b[F\x1b[K\x1b[90mheap snapshot 100% complete\x1b[39m\r\n"},{time:216109,content:"\x1b[K\x1b[F\x1b[K"},{time:216109,content:"\x1b[90msnapshot saved to disk\x1b[39m\r\n"},{time:216109,content:"\x1b[K"},{time:216110,content:"\x1b[F\x1b[K"},{time:216111,content:"\r\n"},{time:216111,content:"\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K\x1b[K\x1b[F\x1b[K"},{time:216112,content:"page-load[\x1b[32m24.6MB\x1b[39m](\x1b[32mbaseline\x1b[39m)[\x1b[32ms1\x1b[39m] \x1b[90m>\x1b[39m action-on-page[\x1b[32m30.4MB\x1b[39m](\x1b[32mtarget\x1b[39m)[\x1b[32ms2\x1b[39m] \x1b[90m>\x1b[39m revert[\x1b[32m29.4MB\x1b[39m](\x1b[32mfinal\x1b[39m)[\x1b[32ms3\x1b[39m] \r\n\r\n"},{time:216183,content:"total time: 1.3min\r\n"},{time:216189,content:"Memory usage across all steps:\r\n"},{time:216191,content:"35.0 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\r\n30.7 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\r\n26.5 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[30m_\x1b[39m\r\n22.2 \x1b[32m\u2584\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n18.0 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n13.7 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 9.5 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 5.2 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 1.0 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 1 2 3 \r\n"},{time:216192,content:"\r\n"},{time:216199,content:"\x1b[90mlightweight parsing /tmp/memlab/data/cur/s1.heapsnapshot ...\x1b[39m\r\n"},{time:216756,content:"\x1b[K\x1b[F\x1b[K"},{time:216757,content:"\x1b[90mlightweight parsing /tmp/memlab/data/cur/s2.heapsnapshot ...\x1b[39m\r\n"},{time:217427,content:"\x1b[K\x1b[F\x1b[K"},{time:217427,content:"\x1b[90mparsing /tmp/memlab/data/cur/s3.heapsnapshot ...\x1b[39m\r\n"},{time:218998,content:"\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:218998,content:"\x1b[K\x1b[F\x1b[K"},{time:218998,content:"\x1b[K\x1b[F\x1b[K"},{time:218998,content:"\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:219003,content:"\x1b[K\x1b[F\x1b[K"},{time:219003,content:"\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:219173,content:"\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:219173,content:"\x1b[K\x1b[F\x1b[K"},{time:219209,content:"\x1b[K\x1b[F\x1b[K"},{time:219209,content:"\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:219619,content:"\x1b[K"},{time:219619,content:"\x1b[F\x1b[K\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:219723,content:"\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:219723,content:"\x1b[K\x1b[F\x1b[K"},{time:219724,content:"\x1b[K\x1b[F\x1b[K"},{time:219724,content:"\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:220097,content:"\x1b[K\x1b[F\x1b[K\x1b[90mannotating shortest path for all nodes\x1b[39m\r\n"},{time:221263,content:"\x1b[K"},{time:221264,content:"\x1b[F\x1b[K\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:223071,content:"\x1b[90mmarking all detached Fiber nodes...\x1b[39m\r\n"},{time:223071,content:"\x1b[K\x1b[F\x1b[K"},{time:223097,content:"\x1b[K"},{time:223097,content:"\x1b[F\x1b[K\x1b[90mmarking alternate Fiber nodes...\x1b[39m\r\n"},{time:223199,content:"\x1b[K\x1b[F\x1b[K"},{time:223199,content:"\x1b[90mprogress: 11 / 643 @951667136\x1b[39m\r\n"},{time:223199,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 22 / 643 @1106611808\x1b[39m\r\n"},{time:223199,content:"\x1b[K\x1b[F\x1b[K"},{time:223199,content:"\x1b[90mprogress: 33 / 643 @1106670816\x1b[39m\r\n"},{time:223200,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 44 / 643 @1106659296\x1b[39m\r\n"},{time:223200,content:"\x1b[K\x1b[F\x1b[K"},{time:223200,content:"\x1b[90mprogress: 55 / 643 @1106652896\x1b[39m\r\n"},{time:223200,content:"\x1b[K\x1b[F\x1b[K"},{time:223200,content:"\x1b[90mprogress: 66 / 643 @1106647456\x1b[39m\r\n"},{time:223200,content:"\x1b[90mprogress: 77 / 643 @1106641696\x1b[39m\r\n"},{time:223200,content:"\x1b[K\x1b[F\x1b[K"},{time:223200,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 88 / 643 @1106699424\x1b[39m\r\n"},{time:223200,content:"\x1b[90mprogress: 99 / 643 @1106694944\x1b[39m\r\n"},{time:223200,content:"\x1b[K\x1b[F\x1b[K"},{time:223200,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 110 / 643 @1106690304\x1b[39m\r\n"},{time:223200,content:"\x1b[K"},{time:223200,content:"\x1b[F\x1b[K\x1b[90mprogress: 121 / 643 @1106685504\x1b[39m\r\n"},{time:223201,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 132 / 643 @1106679744\x1b[39m\r\n"},{time:223201,content:"\x1b[K"},{time:223201,content:"\x1b[F\x1b[K\x1b[90mprogress: 143 / 643 @1106675904\x1b[39m\r\n"},{time:223201,content:"\x1b[K\x1b[F\x1b[K"},{time:223201,content:"\x1b[90mprogress: 154 / 643 @1106733632\x1b[39m\r\n"},{time:223201,content:"\x1b[K"},{time:223201,content:"\x1b[F\x1b[K\x1b[90mprogress: 165 / 643 @1106729472\x1b[39m\r\n"},{time:223201,content:"\x1b[90mprogress: 176 / 643 @1106716992\x1b[39m\r\n"},{time:223201,content:"\x1b[K\x1b[F\x1b[K"},{time:223201,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 187 / 643 @1633955\x1b[39m\r\n"},{time:223202,content:"\x1b[K"},{time:223202,content:"\x1b[F\x1b[K\x1b[90mprogress: 198 / 643 @1633783\x1b[39m\r\n"},{time:223202,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 209 / 643 @1633701\x1b[39m\r\n"},{time:223202,content:"\x1b[K\x1b[F\x1b[K"},{time:223202,content:"\x1b[90mprogress: 220 / 643 @1633673\x1b[39m\r\n\x1b[K\x1b[F\x1b[K"},{time:223202,content:"\x1b[90mprogress: 231 / 643 @1633501\x1b[39m\r\n"},{time:223202,content:"\x1b[K\x1b[F\x1b[K"},{time:223202,content:"\x1b[90mprogress: 242 / 643 @1633075\x1b[39m\r\n"},{time:223202,content:"\x1b[K\x1b[F\x1b[K"},{time:223202,content:"\x1b[90mprogress: 253 / 643 @1632921\x1b[39m\r\n"},{time:223202,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 264 / 643 @1632875\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K"},{time:223203,content:"\x1b[90mprogress: 275 / 643 @1632837\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K"},{time:223203,content:"\x1b[90mprogress: 286 / 643 @1632767\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K"},{time:223203,content:"\x1b[90mprogress: 297 / 643 @1632703\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K"},{time:223203,content:"\x1b[90mprogress: 308 / 643 @1632657\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K"},{time:223203,content:"\x1b[90mprogress: 319 / 643 @1632619\x1b[39m\r\n"},{time:223203,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 330 / 643 @1632589\x1b[39m\r\n"},{time:223203,content:"\x1b[F\x1b[K\x1b[90mprogress: 341 / 643 @1632547\x1b[39m\r\n"},{time:223203,content:"\x1b[K"},{time:223203,content:"\x1b[K"},{time:223203,content:"\x1b[F\x1b[K\x1b[90mprogress: 352 / 643 @1632509\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 363 / 643 @1632479\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K"},{time:223204,content:"\x1b[90mprogress: 374 / 643 @1632383\x1b[39m\r\n"},{time:223204,content:"\x1b[K"},{time:223204,content:"\x1b[F\x1b[K\x1b[90mprogress: 385 / 643 @1632313\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 396 / 643 @1632287\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 407 / 643 @1632245\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 418 / 643 @1632197\x1b[39m\r\n"},{time:223204,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 429 / 643 @1632173\x1b[39m\r\n"},{time:223205,content:"\x1b[K\x1b[F\x1b[K"},{time:223205,content:"\x1b[90mprogress: 440 / 643 @1632143\x1b[39m\r\n"},{time:223205,content:"\x1b[K\x1b[F\x1b[K"},{time:223205,content:"\x1b[90mprogress: 451 / 643 @1632115\x1b[39m\r\n"},{time:223205,content:"\x1b[K"},{time:223205,content:"\x1b[F\x1b[K\x1b[90mprogress: 462 / 643 @1632089\x1b[39m\r\n"},{time:223205,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 473 / 643 @1631967\x1b[39m\r\n"},{time:223205,content:"\x1b[K\x1b[F\x1b[K"},{time:223206,content:"\x1b[90mprogress: 484 / 643 @1631893\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 495 / 643 @1631737\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 506 / 643 @1631691\x1b[39m\r\n"},{time:223206,content:"\x1b[K"},{time:223206,content:"\x1b[F\x1b[K\x1b[90mprogress: 517 / 643 @1631655\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K"},{time:223206,content:"\x1b[90mprogress: 528 / 643 @1631621\x1b[39m\r\n\x1b[K"},{time:223206,content:"\x1b[F\x1b[K\x1b[90mprogress: 539 / 643 @1631581\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K"},{time:223206,content:"\x1b[90mprogress: 550 / 643 @1631559\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 561 / 643 @1631509\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 572 / 643 @1631463\x1b[39m\r\n"},{time:223206,content:"\x1b[90mprogress: 583 / 643 @1631429\x1b[39m\r\n"},{time:223206,content:"\x1b[K\x1b[F\x1b[K"},{time:223206,content:"\x1b[K\x1b[F\x1b[K"},{time:223206,content:"\x1b[90mprogress: 594 / 643 @1631393\x1b[39m\r\n"},{time:223207,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 605 / 643 @1631021\x1b[39m\r\n"},{time:223207,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 616 / 643 @1630999\x1b[39m\r\n"},{time:223207,content:"\x1b[K\x1b[F\x1b[K"},{time:223207,content:"\x1b[90mprogress: 627 / 643 @1630977\x1b[39m\r\n"},{time:223207,content:"\x1b[K\x1b[F\x1b[K\x1b[90mprogress: 638 / 643 @1630931\x1b[39m\r\n"},{time:223208,content:"\x1b[K\x1b[F\x1b[K"},{time:223208,content:"\x1b[90mClustering leak traces\x1b[39m\r\n"},{time:223267,content:"\x1b[K\x1b[F\x1b[K"},{time:223267,content:"\x1b[33mMemLab found 7 leak(s)\x1b[39m\r\n"},{time:223268,content:"\x1b[90mDiffing clusters\x1b[39m\r\n"},{time:223270,content:"\x1b[K"},{time:223270,content:"\x1b[F\x1b[K\r\n--Similar leaks in this run: 473--\r\n--Retained size of leaked objects: 294.5KB--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlatLngToXY\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@536395\x1b[39m \x1b[90m[\x1b[39m\x1b[34m132 bytes\x1b[39m\x1b[90m]\x1b[39m"},{time:223270,content:"\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@955491\x1b[39m \x1b[90m[\x1b[39m\x1b[34m68 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[nIh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@836337\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[C1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@844325\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[x8h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829419\x1b[39m \x1b[90m[\x1b[39m\x1b[34m3.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mha\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[r8h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829777\x1b[39m \x1b[90m[\x1b[39m\x1b[34m6.8MB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@830367\x1b[39m \x1b[90m[\x1b[39m\x1b[34m28 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mA:m:68:set:Roadmap:\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[m8h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@390351\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.7MB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@390167\x1b[39m \x1b[90m[\x1b[39m\x1b[34m919KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mA5,TC,B\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.v7]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@389545\x1b[39m \x1b[90m[\x1b[39m\x1b[34m65.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mjc\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[aVh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@389553\x1b[39m \x1b[90m[\x1b[39m\x1b[34m23.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mFa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[W0h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@390729\x1b[39m \x1b[90m[\x1b[39m\x1b[34m16.3KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Map]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1392807\x1b[39m \x1b[90m[\x1b[39m\x1b[34m15.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mtable\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(array)\x1b[39m \x1b[90m@1393047\x1b[39m \x1b[90m[\x1b[39m\x1b[34m15.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m15\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[P0h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1393709\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.3KB\x1b[39m\x1b[90m]\x1b[39m\r\n"},{time:223270,content:" \x1b[90m--\x1b[39m\x1b[37mcanvas\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLCanvasElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@94051\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m3\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached CanvasRenderingContext2D]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106300288\x1b[39m \x1b[90m[\x1b[39m\x1b[34m736 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n"},{time:223276,content:"\r\n--Similar leaks in this run: 77--\r\n--Retained size of leaked objects: 81KB--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlatLngToXY\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@536395\x1b[39m \x1b[90m[\x1b[39m\x1b[34m132 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@955491\x1b[39m \x1b[90m[\x1b[39m\x1b[34m68 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[nIh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@836337\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37msf\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[tRc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@827985\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mNh\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@846651\x1b[39m \x1b[90m[\x1b[39m\x1b[34m64 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@828191\x1b[39m \x1b[90m[\x1b[39m\x1b[34m736 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m$k\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[zwc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@303147\x1b[39m \x1b[90m[\x1b[39m\x1b[34m124 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mOd\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Fwc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@577499\x1b[39m \x1b[90m[\x1b[39m\x1b[34m36.9KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37myH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Bjc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1352791\x1b[39m \x1b[90m[\x1b[39m\x1b[34m388 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mFb\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[DBc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@577447\x1b[39m \x1b[90m[\x1b[39m\x1b[34m2.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.oAc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@577449\x1b[39m \x1b[90m[\x1b[39m\x1b[34m5.4KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mO\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[gAc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1149047\x1b[39m \x1b[90m[\x1b[39m\x1b[34m20 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[eAc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@306355\x1b[39m \x1b[90m[\x1b[39m\x1b[34m118.8KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mT\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.Qyc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@306379\x1b[39m \x1b[90m[\x1b[39m\x1b[34m28KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mha\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@306639\x1b[39m \x1b[90m[\x1b[39m\x1b[34m20.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m165\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[zyc]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@2112105\x1b[39m \x1b[90m[\x1b[39m\x1b[34m956 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mO\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.PP]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@2112107\x1b[39m \x1b[90m[\x1b[39m\x1b[34m9.9KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mCa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1631793\x1b[39m \x1b[90m[\x1b[39m\x1b[34m384 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m8\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached Text]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@7090208\x1b[39m \x1b[90m[\x1b[39m\x1b[34m96 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m2\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1631391\x1b[39m \x1b[90m[\x1b[39m\x1b[34m160 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m7\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached Text]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106273280\x1b[39m \x1b[90m[\x1b[39m\x1b[34m96 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n\r\n--Similar leaks in this run: 79--\r\n--Retained size of leaked objects: 58.1KB--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b["},{time:223276,content:"39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlatLngToXY\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@536395\x1b[39m \x1b[90m[\x1b[39m\x1b[34m132 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@955491\x1b[39m \x1b[90m[\x1b[39m\x1b[34m68 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[nIh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@836337\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[C1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@844325\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mO\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[B1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829397\x1b[39m \x1b[90m[\x1b[39m\x1b[34m14.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mO\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[CXh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829417\x1b[39m \x1b[90m[\x1b[39m\x1b[34m2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mka\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Array]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@3029899\x1b[39m \x1b[90m[\x1b[39m\x1b[34m196 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m0\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.v7]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@390155\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mjc\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[aVh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@403033\x1b[39m \x1b[90m[\x1b[39m\x1b[34m25.9KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mFa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[W0h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@865681\x1b[39m \x1b[90m[\x1b[39m\x1b[34m13.8KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Map]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1120041\x1b[39m \x1b[90m[\x1b[39m\x1b[34m13.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mtable\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(array)\x1b[39m \x1b[90m@1120043\x1b[39m \x1b[90m[\x1b[39m\x1b[34m13.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m12\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[P0h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1122257\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.3KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcanvas\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLCanvasElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95123\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m3\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached CanvasRenderingContext2D]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106207104\x1b[39m \x1b[90m[\x1b[39m\x1b[34m736 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n\r\n--Similar leaks in this run: 1--\r\n--Retained size of leaked objects: 736 bytes--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlatLngToXY\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@536395\x1b[39m \x1b[90m[\x1b[39m\x1b[34m132 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@955491\x1b[39m \x1b[90m[\x1b[39m\x1b[34m68 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[nIh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@836337\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[C1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@844325\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mO\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m--"},{time:223276,content:"-\x1b[39m> \x1b[32m[B1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829397\x1b[39m \x1b[90m[\x1b[39m\x1b[34m14.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmf\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[D0h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@845679\x1b[39m \x1b[90m[\x1b[39m\x1b[34m2.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mha\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[V_h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@323969\x1b[39m \x1b[90m[\x1b[39m\x1b[34m952 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mTf\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@892457\x1b[39m \x1b[90m[\x1b[39m\x1b[34m596 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m427978617201219913262367069104001551995958065274705215.25483520271785833800727.75677232634339395207331.751795684530287346656945.25677232634339395207357.51167137520669053277470.5236886225445112838179864064813017677298190.7516331133490957378007108.517688983653134912985120.257596719916999682473132.517688983653134912985139.754835202717858338007152.25\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[T_h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@400619\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcanvas\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLCanvasElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@94207\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m3\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached CanvasRenderingContext2D]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106693184\x1b[39m \x1b[90m[\x1b[39m\x1b[34m736 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n\r\n--Similar leaks in this run: 7--\r\n--Retained size of leaked objects: 532 bytes--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mglobals\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1091821\x1b[39m \x1b[90m[\x1b[39m\x1b[34m2.6KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mfua\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@1118697\x1b[39m \x1b[90m[\x1b[39m\x1b[34m864 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mdata\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@2135695\x1b[39m \x1b[90m[\x1b[39m\x1b[34m336 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mtarget\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLSpanElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@92981\x1b[39m \x1b[90m[\x1b[39m\x1b[34m332 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m9\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLButtonElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@92987\x1b[39m \x1b[90m[\x1b[39m\x1b[34m520 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m11\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached InternalNode]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@951600320\x1b[39m \x1b[90m[\x1b[39m\x1b[34m148 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m2\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached ElementIntersectionObserverData]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106126208\x1b[39m \x1b[90m[\x1b[39m\x1b[34m64 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n\r\n--Similar leaks in this run: 2--\r\n--Retained size of leaked objects: 488 bytes--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m_\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@585959\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1MB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mML\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@495501\x1b[39m \x1b[90m[\x1b[39m\x1b[34m19.3KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m"},{time:223276,content:"QL\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.ML]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@495199\x1b[39m \x1b[90m[\x1b[39m\x1b[34m18.6KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@495931\x1b[39m \x1b[90m[\x1b[39m\x1b[34m18.5KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m/maps/vt/icon/name=assets/icons/poi/tactile/tinier_dot_outline-0-tiny.png,assets/icons/poi/tactile/tinier_dot-0-tiny.png&highlight=ffffff,3e628c?scale=1\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@2344107\x1b[39m \x1b[90m[\x1b[39m\x1b[34m284 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mimage\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLImageElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1632275\x1b[39m \x1b[90m[\x1b[39m\x1b[34m244 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n\r\n--Similar leaks in this run: 4--\r\n--Retained size of leaked objects: 400 bytes--\r\n\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m4\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[HTMLDocument]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95749\x1b[39m \x1b[90m[\x1b[39m\x1b[34m20.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m16\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[HTMLHtmlElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95573\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m8\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[HTMLBodyElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95893\x1b[39m \x1b[90m[\x1b[39m\x1b[34m4KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mclosure_lm_56909\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Lo]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@753333\x1b[39m \x1b[90m[\x1b[39m\x1b[34m800 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Object]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@754285\x1b[39m \x1b[90m[\x1b[39m\x1b[34m776 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mkeydown\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Array]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@584059\x1b[39m \x1b[90m[\x1b[39m\x1b[34m176 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m2\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Gqa]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@753069\x1b[39m \x1b[90m[\x1b[39m\x1b[34m112 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlistener\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@1353157\x1b[39m \x1b[90m[\x1b[39m\x1b[34m64 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@849053\x1b[39m \x1b[90m[\x1b[39m\x1b[34m80 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[HBe]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@828277\x1b[39m \x1b[90m[\x1b[39m\x1b[34m6.4KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mW\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[eAe]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@961871\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.4KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mZa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[qze]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@845485\x1b[39m \x1b[90m[\x1b[39m\x1b[34m25KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mBa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Cze]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829011\x1b[39m \x1b[90m[\x1b[39m\x1b[34m21.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mBa\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[_.Beb]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829015\x1b[39m \x1b[90m[\x1b[39m\x1b[34m16KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mHb\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554799\x1b[39m \x1b[90m[\x1b[39m\x1b[34m14.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m9\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554797\x1b[39m \x1b[90m[\x1b[39m\x1b[34m160 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m6\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554795\x1b[39m \x1b[90m[\x1b[39m\x1b[34m160 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m6\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLDivElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554793\x1b[39m \x1b[90m[\x1b[39m\x1b[34m160 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m7\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLSpanElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554777\x1b[39m \x1b[9"},{time:223277,content:"0m[\x1b[39m\x1b[34m252 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m10\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached Text]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106716992\x1b[39m \x1b[90m[\x1b[39m\x1b[34m96 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m2\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLSpanElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554781\x1b[39m \x1b[90m[\x1b[39m\x1b[34m252 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m7\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached HTMLSpanElement]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@2554779\x1b[39m \x1b[90m[\x1b[39m\x1b[34m256 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37m6\x1b[39m \x1b[90m(element)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Detached Text]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@1106721792\x1b[39m \x1b[90m[\x1b[39m\x1b[34m96 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n"},{time:223460,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:225025,content:"#"},{time:225129,content:" "},{time:225738,content:"v"},{time:225921,content:"i"},{time:226002,content:"e"},{time:226074,content:"w"},{time:226145,content:" "},{time:226321,content:"a"},{time:226425,content:"l"},{time:226586,content:"l"},{time:226617,content:" "},{time:226782,content:"f"},{time:226866,content:"i"},{time:227025,content:"l"},{time:227091,content:"e"},{time:227146,content:"s"},{time:227242,content:" "},{time:229101,content:"g"},{time:229121,content:"e"},{time:229145,content:"n"},{time:229211,content:"e"},{time:229282,content:"r"},{time:229393,content:"a"},{time:229523,content:"t"},{time:229625,content:"e"},{time:229874,content:"d"},{time:229954,content:" "},{time:230145,content:"b"},{time:230281,content:"y"},{time:230401,content:" "},{time:231738,content:"m"},{time:231778,content:"e"},{time:231875,content:"m"},{time:232025,content:"l"},{time:232025,content:"a"},{time:232225,content:"b"},{time:232290,content:" "},{time:232474,content:"r"},{time:232545,content:"u"},{time:232730,content:"n"},{time:233139,content:"\r\n"},{time:233139,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:234331,content:"m"},{time:234385,content:"e"},{time:234497,content:"m"},{time:234968,content:"l"},{time:235026,content:"a"},{time:235210,content:"b"},{time:235314,content:" "},{time:235568,content:"g"},{time:235617,content:"e"},{time:235793,content:"t"},{time:235937,content:"-"},{time:236193,content:"d"},{time:236362,content:"e"},{time:236539,content:"f"},{time:236593,content:"a"},{time:236667,content:"u"},{time:236825,content:"l"},{time:236922,content:"t"},{time:237080,content:"-"},{time:237177,content:"w"},{time:237312,content:"o"},{time:237401,content:"r"},{time:237520,content:"k"},{time:237762,content:"-"},{time:237888,content:"d"},{time:238024,content:"i"},{time:238113,content:"r"},{time:238288,content:"\r\n"},{time:238484,content:"/tmp/memlab\r\n"},{time:238495,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:240337,content:"t"},{time:240513,content:"r"},{time:240690,content:"e"},{time:240818,content:"e"},{time:240920,content:" "},{time:241090,content:"-"},{time:241197,content:"d"},{time:241282,content:" "},{time:241762,content:"/"},{time:241929,content:"t"},{time:242024,content:"m"},{time:242202,content:"p"},{time:242274,content:"/"},{time:242714,content:"m"},{time:242795,content:"e"},{time:242874,content:"m"},{time:243025,content:"l"},{time:243084,content:"a"},{time:243258,content:"b"},{time:243402,content:"\r\n"},{time:243404,content:"\x1b[01;34m/tmp/memlab\x1b[00m\r\n\u251c\u2500\u2500 \x1b[01;34mchrome\x1b[00m\r\n"},{time:243404,content:"\u251c\u2500\u2500 \x1b[01;34mdata\x1b[00m\r\n"},{time:243404,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mcur\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mdataBuilder\x1b[00m\r\n"},{time:243404,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mgen-files\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mlogger\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mmetrics\x1b[00m\r\n"},{time:243404,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mtrace-clusters\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mtrace-jsons\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34munclassified-clusters\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34munique-trace-clusters\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34madd\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mdelete\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mexisting\x1b[00m\r\n"},{time:243405,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mout\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mpersist\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mreport-preview\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mreports\x1b[00m\r\n"},{time:243405,content:"\u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mprofile\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mAutofillRegex\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2021.8.17.1300\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mAutofillStates\x1b[00m\r\n"},{time:243405,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mCertificateRevocation\x1b[00m\r\n"},{time:243405,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m7439\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n"},{time:243405,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2020.11.2.164946\x1b[00m\r\n"},{time:243406,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mClientSidePhishing\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m29.0\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n"},{time:243406,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mCrowd Deny\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2022.6.6.1142\x1b[00m\r\n"},{time:243406,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n"},{time:243406,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mDefault\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mAutofillStrikeDatabase\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mblob_storage\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m8a78572a-ca3e-4c0c-b5fa-805a7f37a58f\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mBudgetDatabase\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mCache\x1b[00m\r\n"},{time:243407,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mCache_Data\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mindex-dir\x1b[00m\r\n"},{time:243408,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mCode Cache\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mjs\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mindex-dir\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mwasm\x1b[00m\r\n"},{time:243408,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mindex-dir\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mwebui_js\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mindex-dir\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mcoupon_db\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mDownload Service\x1b[00m\r\n"},{time:243408,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mEntryDB\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mFiles\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mExtension Scripts\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mExtension State\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mFeature Engagement Tracker\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mAvailabilityDB\x1b[00m\r\n"},{time:243408,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mEventDB\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mGPUCache\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mLocal Storage\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mleveldb\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34moptimization_guide_hint_cache_store\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34moptimization_guide_model_and_features_store\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSessions\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSession Storage\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mshared_proto_db\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mmetadata\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSite Characteristics Database\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mSync Data\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mLevelDB\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mDesktopSharingHub\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m20220505\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mFileTypePolicies\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m51\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mFirstPartySetsPreloaded\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2022.2.15.1\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mGrShaderCache\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mGPUCache\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mhyphen-data\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m105.0.5160.0\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mMEIPreload\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m1.0.7.1652906823\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mOnDeviceHeadSuggestModel\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m20220627.458453771\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mOptimizationGuidePredictionModels\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mOptimizationHints\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m339\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mOriginTrials\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m1.0.0.13\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mPKIMetadata\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m292\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mpnacl\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m0.57.44.2492\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_platform_specific\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mx86_64\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSafe Browsing\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSafetyTips\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2833\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mShaderCache\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mGPUCache\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSSLErrorAssistant\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m7\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mSubresource Filter\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mIndexed Rules\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m35\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m9.36.0\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mUnindexed Rules\x1b[00m\r\n"},{time:243409,content:"\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m9.36.0\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u251c\u2500\u2500 \x1b[01;34mTrustTokenKeyCommitments\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m2022.7.5.2\x1b[00m\r\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34mZxcvbnData\x1b[00m\r\n\u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m1\x1b[00m\r\n\u2502\xa0\xa0 \u2514\u2500\u2500 \x1b[01;34m_metadata\x1b[00m\r\n\u2514\u2500\u2500 \x1b[01;34minput\x1b[00m\r\n\r\n128 directories\r\n"},{time:243410,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:246081,content:"#"},{time:246145,content:" "},{time:246394,content:"s"},{time:246577,content:"c"},{time:246761,content:"r"},{time:246912,content:"e"},{time:247048,content:"e"},{time:247225,content:"n"},{time:247377,content:"s"},{time:247497,content:"h"},{time:247648,content:"o"},{time:247673,content:"t"},{time:247744,content:"s"},{time:247848,content:" "},{time:247969,content:"a"},{time:248105,content:"n"},{time:248177,content:"d"},{time:248264,content:" "},{time:248817,content:"h"},{time:248898,content:"e"},{time:248960,content:"a"},{time:249064,content:"p"},{time:249176,content:" "},{time:249305,content:"s"},{time:249416,content:"n"},{time:249489,content:"a"},{time:249617,content:"p"},{time:249706,content:"s"},{time:249776,content:"h"},{time:249905,content:"o"},{time:249993,content:"t"},{time:250034,content:"s"},{time:250210,content:" "},{time:250330,content:"a"},{time:250481,content:"r"},{time:250539,content:"e"},{time:250642,content:" "},{time:250860,content:"s"},{time:250976,content:"t"},{time:251121,content:"o"},{time:251168,content:"r"},{time:251226,content:"e"},{time:251569,content:"d"},{time:251962,content:" "},{time:252184,content:"h"},{time:252242,content:"e"},{time:252330,content:"r"},{time:252401,content:"e"},{time:252721,content:"\r\n"},{time:252721,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:254513,content:"l"},{time:254571,content:"s"},{time:254682,content:" "},{time:254841,content:"/"},{time:255033,content:"t"},{time:255129,content:"m"},{time:255457,content:"p"},{time:257210,content:"/"},{time:257537,content:"m"},{time:257608,content:"e"},{time:257699,content:"m"},{time:257881,content:"l"},{time:257912,content:"a"},{time:258097,content:"b"},{time:258280,content:"/"},{time:259344,content:"d"},{time:259420,content:"a"},{time:259521,content:"t"},{time:259624,content:"a"},{time:259640,content:"/"},{time:260232,content:"c"},{time:260323,content:"u"},{time:260426,content:"r"},{time:260621,content:"/"},{time:260881,content:"\r\n"},{time:260883,content:"browser-info.txt run-meta.json s3.heapsnapshot \x1b[0m\x1b[01;35mscreenshot-3.png\x1b[0m\r\nconsole-log.txt s1.heapsnapshot \x1b[01;35mscreenshot-1.png\x1b[0m snap-seq.json\r\nleaks.txt s2.heapsnapshot \x1b[01;35mscreenshot-2.png\x1b[0m\r\n"},{time:260885,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:263218,content:"#"},{time:263264,content:" "},{time:263584,content:"s"},{time:263626,content:"e"},{time:263840,content:"e"},{time:263914,content:" "},{time:264256,content:"w"},{time:264401,content:"h"},{time:264546,content:"i"},{time:264584,content:"c"},{time:264704,content:"h"},{time:264801,content:" "},{time:264992,content:"o"},{time:265097,content:"b"},{time:265184,content:"j"},{time:265264,content:"e"},{time:265442,content:"c"},{time:265664,content:"t"},{time:266145,content:" "},{time:266857,content:"k"},{time:266945,content:"e"},{time:267137,content:"e"},{time:267392,content:"p"},{time:267488,content:"s"},{time:267583,content:" "},{time:267833,content:"g"},{time:268010,content:"r"},{time:268122,content:"o"},{time:268153,content:"w"},{time:268313,content:"i"},{time:268370,content:"n"},{time:268425,content:"g"},{time:268512,content:" "},{time:268649,content:"i"},{time:268687,content:"n"},{time:268769,content:" "},{time:268937,content:"s"},{time:269105,content:"i"},{time:269163,content:"z"},{time:269248,content:"e"},{time:269345,content:" "},{time:269666,content:"o"},{time:269729,content:"v"},{time:269880,content:"e"},{time:269937,content:"r"},{time:270048,content:" "},{time:270193,content:"t"},{time:270282,content:"i"},{time:270457,content:"m"},{time:270520,content:"e"},{time:270704,content:"\r\n"},{time:270704,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:271407,content:"m"},{time:271457,content:"e"},{time:271560,content:"m"},{time:271712,content:"l"},{time:271746,content:"a"},{time:271937,content:"b"},{time:272040,content:" "},{time:272312,content:"a"},{time:272394,content:"n"},{time:272481,content:"a"},{time:272568,content:"l"},{time:272665,content:"y"},{time:272760,content:"z"},{time:272815,content:"e"},{time:272882,content:" "},{time:274328,content:"u"},{time:274505,content:"n"},{time:274792,content:"b"},{time:274912,content:"o"},{time:274977,content:"u"},{time:275135,content:"n"},{time:275219,content:"d"},{time:275361,content:"-"},{time:275601,content:"o"},{time:275697,content:"b"},{time:275784,content:"j"},{time:275880,content:"e"},{time:276041,content:"c"},{time:276210,content:"t"},{time:276297,content:"\r\n"},{time:276498,content:"Memory usage across all steps:\r\n"},{time:276501,content:"35.0 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\r\n30.7 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\r\n26.5 \x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[30m_\x1b[39m\r\n22.2 \x1b[32m\u2584\x1b[39m\x1b[32m\u2584\x1b[39m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n18.0 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n13.7 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 9.5 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 5.2 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 1.0 \x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[7m\x1b[32m \x1b[39m\x1b[27m\x1b[30m_\x1b[39m\r\n 1 2 3 \r\n"},{time:276502,content:"\r\n"},{time:276503,content:"\x1b[90mChecking unbounded objects...\x1b[39m\r\n"},{time:276508,content:"\x1b[K"},{time:276508,content:"\x1b[F\x1b[K\x1b[90mparsing /tmp/memlab/data/cur/s1.heapsnapshot ...\x1b[39m\r\n"},{time:277830,content:"\x1b[K"},{time:277830,content:"\x1b[F\x1b[K"},{time:277830,content:"\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:277831,content:"\x1b[K\x1b[F\x1b[K"},{time:277831,content:"\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:277836,content:"\x1b[F\x1b[K"},{time:277836,content:"\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:277836,content:"\x1b[K"},{time:277979,content:"\x1b[K"},{time:277979,content:"\x1b[F\x1b[K"},{time:277979,content:"\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:278018,content:"\x1b[K\x1b[F\x1b[K"},{time:278018,content:"\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:278179,content:"\x1b[K"},{time:278179,content:"\x1b[F\x1b[K\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:278270,content:"\x1b[K"},{time:278270,content:"\x1b[F\x1b[K"},{time:278270,content:"\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:278271,content:"\x1b[K"},{time:278271,content:"\x1b[F\x1b[K\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:278290,content:"\x1b[K\x1b[F\x1b[K"},{time:278290,content:"\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:280049,content:"\x1b[K"},{time:280049,content:"\x1b[F\x1b[K"},{time:280049,content:"\x1b[90mparsing /tmp/memlab/data/cur/s2.heapsnapshot ...\x1b[39m\r\n"},{time:281644,content:"\x1b[K\x1b[F\x1b[K"},{time:281644,content:"\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:281644,content:"\x1b[K\x1b[F\x1b[K\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:281649,content:"\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:281649,content:"\x1b[K\x1b[F\x1b[K"},{time:281818,content:"\x1b[K\x1b[F\x1b[K"},{time:281818,content:"\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:281833,content:"\x1b[K\x1b[F\x1b[K"},{time:281833,content:"\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:282179,content:"\x1b[K\x1b[F\x1b[K"},{time:282179,content:"\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:282256,content:"\x1b[K\x1b[F\x1b[K"},{time:282256,content:"\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:282258,content:"\x1b[K\x1b[F\x1b[K\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:282355,content:"\x1b[K\x1b[F\x1b[K"},{time:282356,content:"\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:284378,content:"\x1b[K"},{time:284378,content:"\x1b[F\x1b[K\x1b[90mparsing /tmp/memlab/data/cur/s3.heapsnapshot ...\x1b[39m\r\n"},{time:285900,content:"\x1b[F\x1b[K\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:285900,content:"\x1b[K"},{time:285907,content:"\x1b[K"},{time:285907,content:"\x1b[F\x1b[K\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:285919,content:"\x1b[K"},{time:285920,content:"\x1b[F\x1b[K\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:286066,content:"\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:286066,content:"\x1b[K\x1b[F\x1b[K"},{time:286088,content:"\x1b[K"},{time:286088,content:"\x1b[F\x1b[K\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:286506,content:"\x1b[K\x1b[F\x1b[K"},{time:286506,content:"\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:286573,content:"\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:286573,content:"\x1b[K\x1b[F\x1b[K"},{time:286575,content:"\x1b[K"},{time:286576,content:"\x1b[F\x1b[K\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:286695,content:"\x1b[F\x1b[K\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:286695,content:"\x1b[K"},{time:288809,content:"\x1b[K"},{time:288810,content:"\x1b[F\x1b[K"},{time:288810,content:"Top growing objects in sizes:\r\n"},{time:288810,content:"\x1b[90m (Use `memlab trace --node-id=@ID` to get trace)\x1b[39m\r\n\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mR5h\x1b[22m\x1b[39m [object](\x1b[90m@831333\x1b[39m): 9.6MB\x1b[90m > \x1b[39m9.6MB\x1b[90m > \x1b[39m9.6MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mr8h\x1b[22m\x1b[39m [object](\x1b[90m@829777\x1b[39m): 12.6KB\x1b[90m > \x1b[39m3.4MB\x1b[90m > \x1b[39m6.8MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1md5h\x1b[22m\x1b[39m [object](\x1b[90m@952237\x1b[39m): 6.1MB\x1b[90m > \x1b[39m6.1MB\x1b[90m > \x1b[39m6.1MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mArray\x1b[22m\x1b[39m [object](\x1b[90m@952239\x1b[39m): 3.2MB\x1b[90m > \x1b[39m3.2MB\x1b[90m > \x1b[39m3.2MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mArray\x1b[22m\x1b[39m [object](\x1b[90m@952295\x1b[39m): 2.3MB\x1b[90m > \x1b[39m2.3MB\x1b[90m > \x1b[39m2.3MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mm8h\x1b[22m\x1b[39m [object](\x1b[90m@390351\x1b[39m): 2.1KB\x1b[90m > \x1b[39m3.4MB\x1b[90m > \x1b[39m1.7MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mArray\x1b[22m\x1b[39m [object](\x1b[90m@917939\x1b[39m): 1.4MB\x1b[90m > \x1b[39m1.4MB\x1b[90m > \x1b[39m1.4MB\r\n\x1b[90m\xb7 \x1b[39mObject \x1b[1m{ \x1b[22m\x1b[32m$Ia\x1b[39m\x1b[90m, \x1b[39m\x1b[32m$y\x1b[39m\x1b[90m, \x1b[39m\x1b[32mHeb\x1b[39m\x1b[90m, \x1b[39m\x1b[32mHxb\x1b[39m\x1b[90m, \x1b[39m\x1b[32mpAa\x1b[39m\x1b[90m, \x1b[39m...\x1b[1m }\x1b[22m [object](\x1b[90m@585959\x1b[39m): 1MB\x1b[90m > \x1b[39m1MB\x1b[90m > \x1b[39m1.1MB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1msystem / Context\x1b[22m\x1b[39m [object](\x1b[90m@301477\x1b[39m): 949.2KB\x1b[90m > \x1b[39m955.2KB\x1b[90m > \x1b[39m952.8KB\r\n\x1b[90m\xb7 \x1b[39mObject \x1b[1m{ \x1b[22m\x1b[1m }\x1b[22m [object](\x1b[90m@390167\x1b[39m): 28 bytes\x1b[90m > \x1b[39m28 bytes\x1b[90m > \x1b[39m919KB\r\n\x1b[90m\xb7 \x1b[39mObject \x1b[1m{ \x1b[22m\x1b[32m55,RC,B\x1b[39m\x1b[90m, \x1b[39m\x1b[32m85,PC,B\x1b[39m\x1b[90m, \x1b[39m\x1b[32mD5,NC,B\x1b[39m\x1b[90m, \x1b[39m\x1b[32mG1,63,9\x1b[39m\x1b[90m, \x1b[39m\x1b[32mH1,63,9\x1b[39m\x1b[90m, \x1b[39m...\x1b[1m }\x1b[22m [object](\x1b[90m@390073\x1b[39m): 1.5KB\x1b[90m > \x1b[39m3.4MB\x1b[90m > \x1b[39m853.9KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1msystem / Context\x1b[22m\x1b[39m [object](\x1b[90m@315397\x1b[39m): 354.9KB\x1b[90m > \x1b[39m384.1KB\x1b[90m > \x1b[39m388.7KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mKq\x1b[22m\x1b[39m [object](\x1b[90m@605759\x1b[39m): 299.2KB\x1b[90m > \x1b[39m300.5KB\x1b[90m > \x1b[39m300.5KB\r\n\x1b[90m\xb7 \x1b[39mObject \x1b[1m{ \x1b[22m\x1b[32msy56\x1b[39m\x1b[90m, \x1b[39m\x1b[32msy9o\x1b[39m\x1b[90m, \x1b[39m\x1b[32msyad\x1b[39m\x1b[90m, \x1b[39m\x1b[32msyds\x1b[39m\x1b[90m, \x1b[39m\x1b[32msywf\x1b[39m\x1b[90m, \x1b[39m...\x1b[1m }\x1b[22m [object](\x1b[90m@605761\x1b[39m): 295.5KB\x1b[90m > \x1b[39m296.7KB\x1b[90m > \x1b[39m296.7KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1msystem / Context\x1b[22m\x1b[39m [object](\x1b[90m@293283\x1b[39m): 200.1KB\x1b[90m > \x1b[39m195.4KB\x1b[90m > \x1b[39m195.9KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mHee\x1b[22m\x1b[39m [object](\x1b[90m@828193\x1b[39m): 154.5KB\x1b[90m > \x1b[39m155.1KB\x1b[90m > \x1b[39m155.1KB\r\n\x1b[90m\xb7 \x1b[39mObject \x1b[1m{ \x1b[22m\x1b[32mA:m\x1b[39m\x1b[1m }\x1b[22m [object](\x1b[90m@947431\x1b[39m): 154.2KB\x1b[90m > \x1b[39m154.7KB\x1b[90m > \x1b[39m154.7KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mGee\x1b[22m\x1b[39m [object](\x1b[90m@947433\x1b[39m): 154KB\x1b[90m > \x1b[39m154.6KB\x1b[90m > \x1b[39m154.6KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mFee\x1b[22m\x1b[39m [object](\x1b[90m@947591\x1b[39m): 153.8KB\x1b[90m > \x1b[39m154.4KB\x1b[90m > \x1b[39m154.4KB\r\n\x1b[90m\xb7 \x1b[39m\x1b[34m\x1b[1mDee\x1b[22m\x1b[39m [object](\x1b[90m@947601\x1b[39m): 153.4KB\x1b[90m > \x1b[39m154KB\x1b[90m > \x1b[39m154KB\r\n"},{time:288856,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:290464,content:"#",timeGapFromPreviousStep:3e3},{time:290529,content:" "},{time:290880,content:"n"},{time:290913,content:"o"},{time:291017,content:"t"},{time:291152,content:"i"},{time:291296,content:"c"},{time:292288,content:"e"},{time:292497,content:" "},{time:292728,content:"t"},{time:292863,content:"h"},{time:292930,content:"a"},{time:293008,content:"t"},{time:293097,content:" "},{time:293225,content:"t"},{time:293313,content:"h"},{time:293383,content:"e"},{time:293451,content:" "},{time:293642,content:"s"},{time:293697,content:"e"},{time:293889,content:"c"},{time:293975,content:"o"},{time:294009,content:"n"},{time:294112,content:"d"},{time:294183,content:" "},{time:294344,content:"o"},{time:294456,content:"b"},{time:294545,content:"j"},{time:294625,content:"e"},{time:294799,content:"c"},{time:294992,content:"t"},{time:295071,content:" "},{time:295312,content:"k"},{time:295368,content:"e"},{time:295511,content:"e"},{time:295642,content:"p"},{time:295761,content:"s"},{time:295865,content:" "},{time:296183,content:"g"},{time:296362,content:"r"},{time:296466,content:"o"},{time:296520,content:"w"},{time:296679,content:"i"},{time:296720,content:"n"},{time:296791,content:"g"},{time:296872,content:" "},{time:297583,content:"f"},{time:297768,content:"r"},{time:297832,content:"o"},{time:298007,content:"m"},{time:298624,content:"\r\n"},{time:298624,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:299215,content:"#"},{time:299295,content:" "},{time:299776,content:"1"},{time:299833,content:"2"},{time:300503,content:"K"},{time:300601,content:"B"},{time:300768,content:" "},{time:300991,content:"t"},{time:301101,content:"o"},{time:301176,content:" "},{time:301920,content:"6"},{time:302070,content:"."},{time:302220,content:"8"},{time:302304,content:"M"},{time:302385,content:"B"},{time:303015,content:"!"},{time:303327,content:"\r\n"},{time:303328,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:305673,content:"#"},{time:305751,content:" "},{time:306272,content:"y"},{time:306423,content:"o"},{time:306488,content:"u"},{time:306532,content:" "},{time:306738,content:"c"},{time:306785,content:"a"},{time:306879,content:"n"},{time:306959,content:" "},{time:307096,content:"a"},{time:307216,content:"l"},{time:307312,content:"s"},{time:307408,content:"o"},{time:307487,content:" "},{time:307663,content:"v"},{time:307784,content:"i"},{time:307855,content:"e"},{time:307921,content:"w"},{time:307984,content:" "},{time:308225,content:"t"},{time:308337,content:"h"},{time:308425,content:"e"},{time:308567,content:" "},{time:308897,content:"r"},{time:308928,content:"e"},{time:309128,content:"t"},{time:309175,content:"a"},{time:309320,content:"i"},{time:309366,content:"n"},{time:309471,content:"e"},{time:309504,content:"r"},{time:309720,content:" "},{time:309927,content:"t"},{time:310079,content:"r"},{time:310153,content:"a"},{time:310336,content:"c"},{time:310511,content:"e"},{time:310608,content:" "},{time:311055,content:"o"},{time:311121,content:"f"},{time:311216,content:" "},{time:311375,content:"a"},{time:311478,content:"n"},{time:311672,content:"y"},{time:311816,content:" "},{time:312057,content:"o"},{time:312137,content:"b"},{time:312249,content:"j"},{time:312295,content:"e"},{time:312473,content:"c"},{time:312633,content:"t"},{time:312776,content:"\r\n"},{time:312776,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:313145,content:"#"},{time:313286,content:" "},{time:314255,content:"i"},{time:314295,content:"n"},{time:314398,content:" "},{time:315040,content:"a"},{time:315135,content:"n"},{time:315344,content:"y"},{time:315415,content:" "},{time:315575,content:"h"},{time:315664,content:"e"},{time:315711,content:"a"},{time:315806,content:"p"},{time:316984,content:" "},{time:317135,content:"s"},{time:317247,content:"n"},{time:317311,content:"a"},{time:317439,content:"p"},{time:317489,content:"s"},{time:317614,content:"h"},{time:317760,content:"o"},{time:317847,content:"t"},{time:318096,content:"\r\n\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:320126,content:"m"},{time:320192,content:"e"},{time:320272,content:"m"},{time:320430,content:"l"},{time:320455,content:"a"},{time:320618,content:"b"},{time:320734,content:" "},{time:320952,content:"t"},{time:321151,content:"r"},{time:321194,content:"a"},{time:321407,content:"c"},{time:321599,content:"e"},{time:321647,content:" "},{time:322238,content:"-"},{time:322383,content:"-"},{time:322704,content:"n"},{time:322742,content:"o"},{time:322800,content:"d"},{time:322976,content:"e"},{time:323887,content:"-"},{time:324112,content:"i"},{time:324159,content:"d"},{time:324368,content:" "},{time:327703,content:"@829777"},{time:328047,content:"\r\n"},{time:328253,content:"\x1b[90mGenerating report for node @829777\x1b[39m\r\n"},{time:328254,content:"\x1b[K"},{time:328255,content:"\x1b[F\x1b[K"},{time:328255,content:"\x1b[90mparsing /tmp/memlab/data/cur/s3.heapsnapshot ...\x1b[39m\r\n"},{time:329810,content:"\x1b[K"},{time:329811,content:"\x1b[F\x1b[K"},{time:329811,content:"\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:329812,content:"\x1b[K"},{time:329812,content:"\x1b[F\x1b[K"},{time:329812,content:"\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:329819,content:"\x1b[F\x1b[K\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:329819,content:"\x1b[K"},{time:329991,content:"\x1b[F\x1b[K\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:329991,content:"\x1b[K"},{time:330027,content:"\x1b[K"},{time:330027,content:"\x1b[F\x1b[K"},{time:330027,content:"\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:330454,content:"\x1b[K"},{time:330454,content:"\x1b[F\x1b[K\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:330557,content:"\x1b[K"},{time:330557,content:"\x1b[F\x1b[K\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:330558,content:"\x1b[K"},{time:330558,content:"\x1b[F\x1b[K"},{time:330558,content:"\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:330579,content:"\x1b[K"},{time:330579,content:"\x1b[F\x1b[K"},{time:330579,content:"\x1b[90mstart analysis...\x1b[39m\r\n"},{time:330579,content:"\x1b[K"},{time:330579,content:"\x1b[F\x1b[K"},{time:330579,content:"\x1b[90mannotating shortest path for all nodes\x1b[39m\r\n"},{time:331717,content:"\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:331717,content:"\x1b[K\x1b[F\x1b[K"},{time:333496,content:"\x1b[K\x1b[F\x1b[K"},{time:333496,content:"\x1b[90mmarking all detached Fiber nodes...\x1b[39m\r\n"},{time:333523,content:"\x1b[90mmarking alternate Fiber nodes...\x1b[39m\r\n"},{time:333523,content:"\x1b[K\x1b[F\x1b[K"},{time:333561,content:"\x1b[K\x1b[F\x1b[K"},{time:333561,content:"\x1b[32m[Window]\x1b[39m \x1b[90m(native)\x1b[39m \x1b[90m@95751\x1b[39m \x1b[90m[\x1b[39m\x1b[34m10.7KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mmap\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[system / Map]\x1b[39m \x1b[90m(hidden)\x1b[39m \x1b[90m@443093\x1b[39m \x1b[90m[\x1b[39m\x1b[34m236 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mprototype\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[Window / https://www.google.com]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@9825\x1b[39m \x1b[90m[\x1b[39m\x1b[34m87KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mlatLngToXY\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(closure)\x1b[39m \x1b[90m@536395\x1b[39m \x1b[90m[\x1b[39m\x1b[34m132 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mcontext\x1b[39m \x1b[90m(internal)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@955491\x1b[39m \x1b[90m[\x1b[39m\x1b[34m68 bytes\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mthis\x1b[39m \x1b[90m(variable)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[nIh]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@836337\x1b[39m \x1b[90m[\x1b[39m\x1b[34m7.2KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mH\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[C1h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@844325\x1b[39m \x1b[90m[\x1b[39m\x1b[34m1.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mN\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[x8h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829419\x1b[39m \x1b[90m[\x1b[39m\x1b[34m3.1KB\x1b[39m\x1b[90m]\x1b[39m\r\n \x1b[90m--\x1b[39m\x1b[37mha\x1b[39m \x1b[90m(property)\x1b[39m\x1b[90m---\x1b[39m> \x1b[32m[r8h]\x1b[39m \x1b[90m(object)\x1b[39m \x1b[90m@829777\x1b[39m \x1b[90m[\x1b[39m\x1b[34m6.8MB\x1b[39m\x1b[90m]\x1b[39m\r\n\r\n"},{time:333589,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:334871,content:"#"},{time:334943,content:" "},{time:335639,content:"a"},{time:335766,content:"l"},{time:335855,content:"t"},{time:336015,content:"e"},{time:336055,content:"r"},{time:336271,content:"n"},{time:336312,content:"a"},{time:336431,content:"t"},{time:336530,content:"i"},{time:336679,content:"v"},{time:336758,content:"e"},{time:336800,content:"l"},{time:336911,content:"y"},{time:337234,content:","},{time:337382,content:" "},{time:339759,content:"y"},{time:339911,content:"o"},{time:340462,content:"u"},{time:340641,content:" "},{time:340879,content:"c"},{time:340937,content:"a"},{time:341007,content:"n"},{time:341112,content:" "},{time:341320,content:"v"},{time:341432,content:"i"},{time:341486,content:"e"},{time:341574,content:"w"},{time:341631,content:" "},{time:342302,content:"t"},{time:342455,content:"h"},{time:342527,content:"e"},{time:342607,content:" "},{time:342782,content:"r"},{time:342849,content:"e"},{time:343007,content:"t"},{time:343064,content:"a"},{time:343145,content:"i"},{time:343182,content:"n"},{time:343294,content:"e"},{time:343352,content:"r"},{time:343448,content:" "},{time:343624,content:"t"},{time:343814,content:"r"},{time:343856,content:"a"},{time:344047,content:"c"},{time:344214,content:"e"},{time:344384,content:"\r\n"},{time:344385,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:346110,content:"#"},{time:346177,content:" "},{time:346455,content:"b"},{time:346560,content:"y"},{time:346672,content:" "},{time:346959,content:"o"},{time:347030,content:"p"},{time:347303,content:"e"},{time:347414,content:"n"},{time:347591,content:"i"},{time:347648,content:"n"},{time:347791,content:"g"},{time:348655,content:" "},{time:348831,content:"t"},{time:348943,content:"h"},{time:349008,content:"e"},{time:349070,content:" "},{time:350223,content:"h"},{time:350271,content:"e"},{time:350327,content:"a"},{time:350438,content:"p"},{time:350663,content:" "},{time:350798,content:"s"},{time:350920,content:"n"},{time:350999,content:"a"},{time:351088,content:"p"},{time:351216,content:"s"},{time:351263,content:"h"},{time:351382,content:"o"},{time:351486,content:"t"},{time:351559,content:" "},{time:351735,content:"f"},{time:351807,content:"i"},{time:351974,content:"l"},{time:352063,content:"e"},{time:352134,content:" "},{time:352375,content:"i"},{time:352431,content:"n"},{time:352486,content:" "},{time:353040,content:"C"},{time:353182,content:"h"},{time:353287,content:"r"},{time:353406,content:"o"},{time:353583,content:"m"},{time:353653,content:"e"},{time:354336,content:"\r\n"},{time:354336,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:354640,content:"#"},{time:354839,content:" "},{time:355406,content:"D"},{time:355615,content:"e"},{time:355783,content:"v"},{time:356559,content:"t"},{time:356662,content:"o"},{time:356798,content:"o"},{time:356966,content:"l"},{time:357022,content:"s"},{time:357127,content:" "},{time:358111,content:"a"},{time:358247,content:"n"},{time:358310,content:"d"},{time:358415,content:" "},{time:358566,content:"s"},{time:358606,content:"e"},{time:358742,content:"a"},{time:358797,content:"r"},{time:359031,content:"c"},{time:359119,content:"h"},{time:359560,content:"i"},{time:359589,content:"n"},{time:359647,content:"g"},{time:359726,content:" "},{time:359879,content:"f"},{time:359998,content:"o"},{time:360056,content:"r"},{time:360152,content:" "},{time:360614,content:"@829777"},{time:360975,content:"\r\n"},{time:360975,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:363510,content:"\r\n"},{time:363510,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:368767,content:"\x07"},{time:371054,content:"#"},{time:371165,content:" "},{time:371518,content:"v"},{time:371703,content:"i"},{time:371765,content:"e"},{time:371869,content:"w"},{time:371918,content:" "},{time:372161,content:"d"},{time:372294,content:"e"},{time:372440,content:"t"},{time:372518,content:"a"},{time:372734,content:"c"},{time:372830,content:"h"},{time:372918,content:"e"},{time:373054,content:"d"},{time:373190,content:" "},{time:373575,content:"D"},{time:373702,content:"O"},{time:373886,content:"M"},{time:374005,content:" "},{time:374238,content:"e"},{time:374351,content:"l"},{time:374415,content:"e"},{time:374526,content:"m"},{time:374576,content:"e"},{time:374670,content:"n"},{time:374759,content:"t"},{time:374822,content:"s"},{time:374902,content:" "},{time:375045,content:"i"},{time:375085,content:"n"},{time:375135,content:" "},{time:375405,content:"a"},{time:375575,content:" "},{time:375814,content:"s"},{time:375950,content:"p"},{time:376022,content:"e"},{time:376214,content:"c"},{time:376301,content:"i"},{time:376375,content:"f"},{time:376501,content:"i"},{time:376622,content:"c"},{time:377470,content:" "},{time:377654,content:"h"},{time:377709,content:"e"},{time:377766,content:"a"},{time:377870,content:"p"},{time:377975,content:" "},{time:378102,content:"s"},{time:378213,content:"n"},{time:378263,content:"a"},{time:378398,content:"p"},{time:378472,content:"s"},{time:378574,content:"h"},{time:378709,content:"o"},{time:378783,content:"t"},{time:379725,content:"\r\n"},{time:379725,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:382262,content:"m"},{time:382278,content:"e"},{time:382399,content:"m"},{time:382767,content:"l"},{time:382845,content:"a"},{time:383053,content:"b"},{time:383174,content:" "},{time:383405,content:"a"},{time:383494,content:"n"},{time:383566,content:"a"},{time:383670,content:"l"},{time:383737,content:"y"},{time:383839,content:"z"},{time:383918,content:"e"},{time:383990,content:" "},{time:385008,content:"d"},{time:385157,content:"e"},{time:385318,content:"t"},{time:385381,content:"a"},{time:385583,content:"c"},{time:385669,content:"h"},{time:385765,content:"e"},{time:385902,content:"d"},{time:386173,content:"-"},{time:386518,content:"D"},{time:386614,content:"O"},{time:386829,content:"M"},{time:387023,content:" "},{time:387639,content:"-"},{time:387774,content:"-"},{time:387877,content:"s"},{time:388006,content:"n"},{time:388064,content:"a"},{time:388197,content:"p"},{time:388277,content:"s"},{time:388510,content:"h"},{time:388774,content:"o"},{time:388966,content:"t"},{time:389615,content:" "},{time:390255,content:"/"},{time:390389,content:"t"},{time:390517,content:"m"},{time:390701,content:"p"},{time:390783,content:"/"},{time:390998,content:"m"},{time:391092,content:"e"},{time:391166,content:"m"},{time:393117,content:"l"},{time:393191,content:"a"},{time:393349,content:"b"},{time:393471,content:"/"},{time:394221,content:"d"},{time:394296,content:"a"},{time:394406,content:"t"},{time:394478,content:"a"},{time:394549,content:"/"},{time:394758,content:"c"},{time:394877,content:"u"},{time:394941,content:"r \r\n"},{time:395167,content:"/"},{time:396358,content:"s"},{time:396663,content:"1"},{time:396991,content:".heapsnapshot "},{time:397429,content:"\r\n"},{time:397632,content:"\x1b[90mparsing /tmp/memlab/data/cur/s1.heapsnapshot ...\x1b[39m\r\n"},{time:398959,content:"\x1b[K"},{time:398959,content:"\x1b[F\x1b[K\x1b[90mcalculating basic meta info...\x1b[39m\r\n"},{time:398960,content:"\x1b[K"},{time:398960,content:"\x1b[F\x1b[K"},{time:398960,content:"\x1b[90mbuilding reference index...\x1b[39m\r\n"},{time:398965,content:"\x1b[K"},{time:398966,content:"\x1b[F\x1b[K"},{time:398966,content:"\x1b[90mbuilding referrers index...\x1b[39m\r\n"},{time:399112,content:"\x1b[F\x1b[K\x1b[90mpropagating detachedness state...\x1b[39m\r\n"},{time:399112,content:"\x1b[K"},{time:399152,content:"\x1b[K"},{time:399152,content:"\x1b[F\x1b[K"},{time:399152,content:"\x1b[90mbuilding node index...\x1b[39m\r\n"},{time:399311,content:"\x1b[K"},{time:399311,content:"\x1b[F\x1b[K"},{time:399311,content:"\x1b[90mbuilding location index...\x1b[39m\r\n"},{time:399400,content:"\x1b[K"},{time:399400,content:"\x1b[90mbuilding extra meta info...\x1b[39m\r\n"},{time:399400,content:"\x1b[F\x1b[K"},{time:399402,content:"\x1b[K"},{time:399402,content:"\x1b[F\x1b[K"},{time:399402,content:"\x1b[90midentifying snapshot engine...\x1b[39m\r\n"},{time:399421,content:"\x1b[K"},{time:399421,content:"\x1b[F\x1b[K"},{time:399421,content:"\x1b[90mannotating shortest path for all nodes\x1b[39m\r\n"},{time:400358,content:"\x1b[K\x1b[F\x1b[K"},{time:400359,content:"\x1b[90mcalculating dominators and retained sizes...\x1b[39m\r\n"},{time:401889,content:"\x1b[K\x1b[F\x1b[K"},{time:401889,content:"\x1b[90mmarking all detached Fiber nodes...\x1b[39m\r\n"},{time:401912,content:"\x1b[K\x1b[F\x1b[K"},{time:401912,content:"\x1b[90mmarking alternate Fiber nodes...\x1b[39m\r\n"},{time:401983,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@93679\x1b[39m native \x1b[34m\x1b[1mDetached HTMLDivElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 13 edges\x1b[90m,\x1b[39m 4.2KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39melement\x1b[90m, \x1b[39mO\x1b[90m]\x1b[39m\r\n"},{time:401983,content:"\x1b[K\x1b[F\x1b[K"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@93693\x1b[39m native \x1b[34m\x1b[1mDetached HTMLDivElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 13 edges\x1b[90m,\x1b[39m 3.4KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39melement\x1b[90m, \x1b[39mO\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@95895\x1b[39m native \x1b[34m\x1b[1mDetached HTMLDivElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 11 edges\x1b[90m,\x1b[39m 2.8KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mHb\x1b[90m, \x1b[39msrc\x1b[90m, \x1b[39mW\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@93699\x1b[39m native \x1b[34m\x1b[1mDetached HTMLDivElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 13 edges\x1b[90m,\x1b[39m 2.3KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39melement\x1b[90m, \x1b[39mO\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@93855\x1b[39m native \x1b[34m\x1b[1mDetached HTMLDivElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 9 edges\x1b[90m,\x1b[39m 1.4KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39m\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91765\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91769\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401984,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91773\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91777\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91781\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91785\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91789\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91793\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91797\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91801\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91805\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401985,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91809\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91813\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91817\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91821\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91841\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91845\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91849\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91853\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91857\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91861\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91865\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91869\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91873\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91877\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91881\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401986,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91885\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91889\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91923\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91927\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91931\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91935\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91939\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91943\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91977\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91981\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91985\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91989\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91993\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:401987,content:"\x1b[90m\xb7 \x1b[39m\x1b[90m@91997\x1b[39m native \x1b[34m\x1b[1mDetached HTMLCanvasElement\x1b[22m\x1b[39m\x1b[90m:\x1b[39m 5 edges\x1b[90m,\x1b[39m 1.1KB\x1b[90m,\x1b[39m refs: \x1b[90m[\x1b[39mcanvas\x1b[90m]\x1b[39m\r\n"},{time:402010,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:403685,content:"#"},{time:403735,content:" "},{time:404020,content:"t"},{time:404206,content:"r"},{time:404309,content:"y"},{time:404438,content:" "},{time:404662,content:"o"},{time:404726,content:"u"},{time:404775,content:"t"},{time:404862,content:" "},{time:405070,content:"o"},{time:405126,content:"t"},{time:405238,content:"h"},{time:405309,content:"e"},{time:405388,content:"r"},{time:405455,content:" "},{time:405672,content:"c"},{time:405725,content:"o"},{time:405901,content:"m"},{time:406029,content:"m"},{time:406126,content:"a"},{time:406197,content:"n"},{time:406292,content:"d"},{time:406349,content:"s"},{time:407245,content:"\r\n"},{time:407245,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:407854,content:"m"},{time:407887,content:"e"},{time:407998,content:"m"},{time:408150,content:"l"},{time:408166,content:"a"},{time:408325,content:"b"},{time:408421,content:" "},{time:408622,content:"h"},{time:408698,content:"e"},{time:408800,content:"l"},{time:408989,content:"p"},{time:409212,content:"\r\n"},{time:409411,content:"\r\n memlab: memory leak detector for front-end JS\r\n\r\n"},{time:409412,content:"\x1b[1m COMMON COMMANDS\x1b[22m\r\n"},{time:409412,content:"\r\n"},{time:409413,content:" \x1b[32mmemlab run --app=comet --interaction=watch\x1b[39m\r\n Find memory leaks in web apps\r\n"},{time:409414,content:"\x1b[90m\x1b[1m Options:\x1b[22m --work-dir --app --interaction --full --skip-snapshot\x1b[39m\r\n\x1b[90m --skip-screenshot --skip-gc --skip-scroll\x1b[39m\r\n\x1b[90m --skip-extra-ops --run-mode --local-puppeteer --scenario\x1b[39m\r\n\x1b[90m --device --disable-xvfb --baseline --target --final\x1b[39m\r\n\x1b[90m --snapshot-dir --engine --leak-filter\x1b[39m\r\n\x1b[90m --oversize-threshold --trace-all-objects\x1b[39m\r\n\x1b[90m --save-trace-as-unclassified-cluster\x1b[39m\r\n"},{time:409414,content:"\r\n"},{time:409414,content:" \x1b[32mmemlab list\x1b[39m\r\n List all test scenarios\r\n"},{time:409414,content:"\r\n"},{time:409414,content:" \x1b[32mmemlab trace --node-id=@3123123\x1b[39m\r\n Report retainer trace of a specific node, use with --nodeId\r\n"},{time:409415,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot --snapshot-dir --engine --node-id\x1b[39m\r\n"},{time:409415,content:"\r\n"},{time:409415,content:" \x1b[32mmemlab find-leaks\x1b[39m\r\n Find memory leaks in heap snapshots\r\n"},{time:409415,content:"\x1b[90m\x1b[1m Options:\x1b[22m --baseline --target --final --snapshot-dir --engine\x1b[39m\r\n\x1b[90m --leak-filter --oversize-threshold --trace-all-objects\x1b[39m\r\n\x1b[90m --save-trace-as-unclassified-cluster --work-dir\x1b[39m\r\n"},{time:409415,content:"\r\n"},{time:409415,content:" \x1b[32mmemlab analyze [PLUGIN_OPTIONS]\x1b[39m\r\n Run heap analysis plugins\r\n"},{time:409415,content:"\x1b[90m\x1b[1m Options:\x1b[22m --work-dir\x1b[39m\r\n"},{time:409415,content:"\r\n"},{time:409416,content:" \x1b[32mmemlab help [SUB-COMMANDS]\x1b[39m\r\n List all MemLab CLI commands or print helper text for a specific command\r\n"},{time:409416,content:"\r\n"},{time:409416,content:"\r\n"},{time:409416,content:"\x1b[1m DEV COMMANDS\x1b[22m\r\n"},{time:409416,content:"\r\n"},{time:409416,content:"\r\n"},{time:409417,content:"\r\n"},{time:409417,content:"\x1b[1m MISC COMMANDS\x1b[22m\r\n"},{time:409417,content:" \x1b[32mmemlab reset\x1b[39m\r\n Reset and initialize all directories\r\n"},{time:409417,content:"\x1b[90m\x1b[1m Options:\x1b[22m --work-dir\x1b[39m\r\n"},{time:409417,content:"\r\n"},{time:409417,content:" \x1b[32mmemlab measure\x1b[39m\r\n Run test scenario in measure mode\r\n"},{time:409417,content:"\x1b[90m\x1b[1m Options:\x1b[22m --run-num --app --interaction --full --skip-snapshot\x1b[39m\r\n\x1b[90m --skip-screenshot --skip-gc --skip-scroll\x1b[39m\r\n\x1b[90m --skip-extra-ops --run-mode --local-puppeteer --scenario\x1b[39m\r\n\x1b[90m --device --disable-xvfb --work-dir\x1b[39m\r\n"},{time:409417,content:"\r\n"},{time:409417,content:" \x1b[32mmemlab warmup\x1b[39m\r\n Warm up the target app\r\n"},{time:409419,content:"\x1b[90m\x1b[1m Options:\x1b[22m --app --interaction --run-mode --local-puppeteer\x1b[39m\r\n\x1b[90m --scenario --device --disable-xvfb --skip-warmup\x1b[39m\r\n\x1b[90m --work-dir\x1b[39m\r\n"},{time:409419,content:"\r\n"},{time:409419,content:" \x1b[32mmemlab get-default-work-dir\x1b[39m\r\n Query the default working directory\r\n\r\n \x1b[32mmemlab snapshot\x1b[39m\r\n Interact with web app and take heap snapshots\r\n\x1b[90m\x1b[1m Options:\x1b[22m --app --interaction --full --skip-snapshot\x1b[39m\r\n\x1b[90m --skip-screenshot --skip-gc --skip-scroll\x1b[39m\r\n\x1b[90m --skip-extra-ops --run-mode --local-puppeteer --scenario\x1b[39m\r\n\x1b[90m --device --disable-xvfb --work-dir\x1b[39m\r\n\r\n \x1b[32mmemlab warmup-and-snapshot\x1b[39m\r\n Warm up server and take heap snapshots\r\n\x1b[90m\x1b[1m Options:\x1b[22m --work-dir --app --interaction --run-mode\x1b[39m\r\n\x1b[90m --local-puppeteer --scenario --device --disable-xvfb\x1b[39m\r\n\x1b[90m --skip-warmup --full --skip-snapshot --skip-screenshot\x1b[39m\r\n\x1b[90m --skip-gc --skip-scroll --skip-extra-ops\x1b[39m\r\n\r\n\r\n"},{time:409429,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:410926,content:"#"},{time:411037,content:" "},{time:411389,content:"o"},{time:411428,content:"r"},{time:411557,content:" "},{time:411702,content:"y"},{time:411861,content:"o"},{time:411918,content:"u"},{time:411966,content:" "},{time:412182,content:"c"},{time:412237,content:"a"},{time:412349,content:"n"},{time:412444,content:" "},{time:412910,content:"v"},{time:413036,content:"i"},{time:413109,content:"e"},{time:413174,content:"w"},{time:413293,content:" "},{time:413605,content:"t"},{time:413661,content:"h"},{time:413772,content:"e"},{time:413830,content:" "},{time:414022,content:"h"},{time:415397,content:"e"},{time:415573,content:"l"},{time:415790,content:"p"},{time:415845,content:"e"},{time:415918,content:"r"},{time:416013,content:" "},{time:416356,content:"t"},{time:416398,content:"e"},{time:416613,content:"x"},{time:416773,content:"t"},{time:416831,content:" "},{time:416972,content:"o"},{time:417030,content:"f"},{time:417118,content:" "},{time:417197,content:"a"},{time:417301,content:" "},{time:417438,content:"s"},{time:417556,content:"p"},{time:417646,content:"e"},{time:417876,content:"c"},{time:418028,content:"i"},{time:418102,content:"f"},{time:418213,content:"i"},{time:418309,content:"c"},{time:418476,content:" "},{time:418638,content:"c"},{time:418742,content:"o"},{time:418917,content:"m"},{time:419052,content:"m"},{time:419116,content:"a"},{time:419214,content:"n"},{time:419263,content:"d"},{time:419677,content:"\r\n"},{time:419677,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:420517,content:"m"},{time:420550,content:"e"},{time:420663,content:"m"},{time:420813,content:"l"},{time:420829,content:"a"},{time:420988,content:"b"},{time:421101,content:" "},{time:421453,content:"h"},{time:421525,content:"e"},{time:421612,content:"l"},{time:421788,content:"p"},{time:421892,content:" "},{time:422126,content:"a"},{time:422244,content:"n"},{time:422301,content:"a"},{time:422396,content:"l"},{time:422478,content:"y"},{time:422565,content:"z"},{time:422629,content:"e"},{time:422861,content:"\r\n"},{time:423062,content:"\r\n"},{time:423063,content:" \x1b[32mmemlab analyze [PLUGIN_OPTIONS]\x1b[39m\r\n Run heap analysis plugins\r\n"},{time:423064,content:"\r\n \x1b[1mCOMMAND LINE OPTIONS\x1b[22m\r\n"},{time:423065,content:"\r\n \x1b[32m--work-dir\x1b[39m set the working directory of the current run\r\n"},{time:423065,content:"\r\n \x1b[32m--help, -h\x1b[39m print helper text\r\n"},{time:423065,content:"\r\n \x1b[32m--verbose, -v\x1b[39m show more details\r\n"},{time:423065,content:"\r\n \x1b[32m--sc\x1b[39m set to continuous test mode\r\n"},{time:423065,content:"\r\n \x1b[32m--debug\x1b[39m enable manual debugging\r\n"},{time:423065,content:"\r\n \x1b[32m--silent, -s\x1b[39m mute all terminal output\r\n"},{time:423065,content:"\r\n"},{time:423065,content:"\x1b[1m SUB-COMMANDS\x1b[22m\r\n\x1b[1m\x1b[22m\r\n"},{time:423065,content:" \x1b[32mmemlab analyze collections-with-stale\x1b[39m\r\n Analyze collections holding stale objects\r\n"},{time:423066,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423066,content:"\r\n"},{time:423066,content:" \x1b[32mmemlab analyze detached-DOM\x1b[39m\r\n Get detached DOM elements\r\n"},{time:423066,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423066,content:"\r\n"},{time:423066,content:" \x1b[32mmemlab analyze global-variable\x1b[39m\r\n Get global variables in heap\r\n"},{time:423066,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423066,content:"\r\n"},{time:423066,content:" \x1b[32mmemlab analyze object-fanout\x1b[39m\r\n Get objects with the most out-going references in heap\r\n"},{time:423067,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423067,content:"\r\n"},{time:423067,content:" \x1b[32mmemlab analyze object-shallow\x1b[39m\r\n Get objects by key and value, without recursing into sub-objects\r\n"},{time:423068,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423068,content:"\r\n"},{time:423068,content:" \x1b[32mmemlab analyze shape\x1b[39m\r\n List the shapes that retained most memory\r\n"},{time:423068,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423068,content:"\r\n"},{time:423068,content:" \x1b[32mmemlab analyze object-size\x1b[39m\r\n Get the largest objects in heap\r\n"},{time:423068,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n\r\n"},{time:423068,content:" \x1b[32mmemlab analyze unbound-object\x1b[39m\r\n Check unbound object growth\r\n"},{time:423068,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot-dir\x1b[39m\r\n"},{time:423068,content:"\r\n"},{time:423068,content:" \x1b[32mmemlab analyze unbound-shape\x1b[39m\r\n Get shapes with unbound growth\r\n"},{time:423068,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot-dir\x1b[39m\r\n"},{time:423068,content:"\r\n"},{time:423068,content:" \x1b[32mmemlab analyze string\x1b[39m\r\n Analyze string in heap\r\n"},{time:423069,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423069,content:"\r\n"},{time:423069,content:" \x1b[32mmemlab analyze unmounted-fiber-node\x1b[39m\r\n Get unmounted React Fiber nodes\r\n"},{time:423069,content:"\x1b[90m\x1b[1m Options:\x1b[22m --snapshot\x1b[39m\r\n"},{time:423069,content:"\r\n"},{time:423085,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:423733,content:"m"},{time:423798,content:"e"},{time:423879,content:"m"},{time:424046,content:"l"},{time:424070,content:"a"},{time:424244,content:"b"},{time:424324,content:" "},{time:425709,content:"a"},{time:425797,content:"n"},{time:425885,content:"a"},{time:425965,content:"l"},{time:426036,content:"y"},{time:426166,content:"z"},{time:426237,content:"e"},{time:426332,content:" "},{time:426445,content:"s"},{time:426557,content:"t"},{time:426716,content:"r"},{time:426724,content:"i"},{time:426774,content:"n"},{time:426949,content:"g"},{time:427020,content:" "},{time:427310,content:"-"},{time:427644,content:"h"},{time:427893,content:"\r\n"},{time:428093,content:"\r\n"},{time:428094,content:" \x1b[32mmemlab analyze string\x1b[39m\r\n Analyze string in heap\r\n"},{time:428095,content:"\r\n \x1b[1mCOMMAND LINE OPTIONS\x1b[22m\r\n"},{time:428096,content:"\r\n \x1b[32m--snapshot\x1b[39m set file path of the heap snapshot under analysis\r\n"},{time:428096,content:"\r\n \x1b[32m--help, -h\x1b[39m print helper text\r\n"},{time:428096,content:"\r\n \x1b[32m--verbose, -v\x1b[39m show more details\r\n"},{time:428096,content:"\r\n \x1b[32m--sc\x1b[39m set to continuous test mode\r\n\r\n \x1b[32m--debug\x1b[39m enable manual debugging\r\n"},{time:428096,content:"\r\n \x1b[32m--silent, -s\x1b[39m mute all terminal output\r\n\r\n"},{time:428108,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:430309,content:"#"},{time:430405,content:" "},{time:430702,content:"f"},{time:430877,content:"o"},{time:430956,content:"r"},{time:431093,content:" "},{time:431382,content:"m"},{time:431549,content:"o"},{time:431614,content:"r"},{time:431676,content:"e"},{time:431764,content:" "},{time:432284,content:"i"},{time:432325,content:"n"},{time:432413,content:"f"},{time:432492,content:"o"},{time:432772,content:","},{time:434476,content:" "},{time:435229,content:"c"},{time:435325,content:"h"},{time:435405,content:"e"},{time:435550,content:"c"},{time:435669,content:"k"},{time:435718,content:" "},{time:436271,content:"o"},{time:436350,content:"u"},{time:436374,content:"t"},{time:436462,content:" "},{time:436621,content:"t"},{time:436692,content:"h"},{time:436853,content:"i"},{time:436893,content:"s"},{time:436995,content:" "},{time:437317,content:"d"},{time:437413,content:"o"},{time:437549,content:"c"},{time:437662,content:" "},{time:437805,content:"s"},{time:437889,content:"i"},{time:437982,content:"t"},{time:438069,content:"e"},{time:439045,content:"\r\n"},{time:439045,content:"\x1b]0;demo@memlab: ~\x07\x1b[01;32mdemo@memlab\x1b[00m:\x1b[01;34m~\x1b[00m$ "},{time:439437,content:"T"},{time:439573,content:"h"},{time:439669,content:"a"},{time:439798,content:"n"},{time:439836,content:"k"},{time:439942,content:" "},{time:440101,content:"y"},{time:440245,content:"o"},{time:440316,content:"u"},{time:440820,content:"!"},{time:441124,content:"\r\n"}]},9539:t=>{const e=new Set('~!@#$%^&*()_+{}:"<>?|'.split(""));t.exports=function(t,m){void 0===m&&(m=1);const n=[0];for(let i=1;i{"use strict";m.r(e),m.d(e,{default:()=>z});var n=m(6540),i=m(53),o=m(8916),s=m(5489),c=m(8168),r=m(5293),a=m(8382),h=m(3706),l=m(3517);const p=t=>{let{code:e,language:m}=t;const{colorMode:i}=(0,r.G)();return n.createElement(a.Ay,(0,c.A)({},a.Gs,{code:e,language:m,theme:"dark"===i?h.A:l.A}),(t=>{let{className:e,getLineProps:m,getTokenProps:i,style:o,tokens:s}=t;return n.createElement("pre",{className:e,style:{...o,textAlign:"left"}},s.map(((t,e)=>n.createElement("div",m({line:t,key:e}),t.map(((t,e)=>n.createElement("span",i({token:t,key:e}))))))))}))},d=t=>{let{code:e,language:m}=t;return n.createElement(a.Ay,(0,c.A)({},a.Gs,{code:e,language:m,theme:h.A}),(t=>{let{className:e,getLineProps:m,getTokenProps:i,style:o,tokens:s}=t;return n.createElement("pre",{className:e,style:{...o,textAlign:"left"}},s.map(((t,e)=>n.createElement("div",m({line:t,key:e}),t.map(((t,e)=>n.createElement("span",i({token:t,key:e}))))))))}))};var u=m(4586),f=m(6025);const b={heroBanner:"heroBanner_UJJx",buttons:"buttons_pzbO",features:"features_keug",featureImage:"featureImage_yA8i",showcase:"showcase_SATw",showcaseHeading:"showcaseHeading_iAvm",showcaseHeadingColored:"showcaseHeadingColored_wr9e",showcaseLogos:"showcaseLogos_MhuO",showcaseLogo:"showcaseLogo_uMXs",titleLink:"titleLink_sVF8"};var y=m(490),K=m.n(y);const g=Array.prototype.slice,v=function(){function t(e){var m,n;let i,o,s;for(i in this._onTick=(m=this._onTick,n=this,function(){return m.apply(n,arguments)}),this._options={},s=t.defaults,s)o=s[i],this._options[i]=o;for(i in e)o=e[i],this._options[i]=o;this._events={},this.markers=[]}return t.defaults={frequency:100,length:0},t.prototype._lastPosition=0,t.prototype._position=0,t.prototype._timer=-1,t.prototype._previousTick=0,t.prototype._createTick=function(){return clearInterval(this._timer),this._timer=(t=this._options.frequency,e=this._onTick,setInterval(e,t));var t,e},t.prototype._onTick=function(){let t;return t=(new Date).getTime(),this._updatePositions(t),this._triggerMarkers(),this._previousTick=t,this.trigger("tick"),this._checkForEnd()},t.prototype._updatePositions=function(t){if(this._lastPosition=this._position,this._position+=t-this._previousTick,this._position>this._options.length)return this._position=this._options.length},t.prototype._triggerMarkers=function(){let t,e,m,n,i,o,s;for(n=this.markers,s=[],e=0,m=n.length;e(i=t.time)&&i>=this._position&&t.backward(),this._lastPosition<=(o=t.time)&&o0;e--)t=n[e],this._lastPosition>(i=t.time)&&i>=this._position&&t.backward(),this._lastPosition<=(o=t.time)&&o=this._options.length)return this._position=this._options.length,this.pause(),this.trigger("end")},t.prototype.playing=!1,t.prototype.length=function(t){return null!=t?(this._options.length=t,this):this._options.length},t.prototype.frequency=function(t){return null!=t?(this._options.frequency=t,this):this._options.frequency},t.prototype.position=function(t){return null!=t?(t>this._options.length&&(t=this._options.length),t<0&&(t=0),this._lastPosition=this._position,this._position=t,this._position{let{stdouts:e}=t;const[m]=(0,n.useState)("terminal-"+k++);return(0,n.useEffect)((()=>{const t=function(t){const e=new(K())({cols:90,rows:28,screenKeys:!0});return e.open(document.querySelector(`#${t} .content`)),e}(m),n=function(t,e){const m=e[e.length-1].time,n=new v({length:m,frequency:10});class i{constructor(t,e){this.time=t,this.content=e}forward(){t.write(this.content)}}for(let o=0;o{n.pause()}}),[m,e]),n.createElement("div",{className:"terminal-content"},n.createElement("div",{id:m,className:"terminal-inner"},n.createElement("div",{xterm:!0,className:"content"})))},x=t=>{let{i:e,infoUrl:m,imageUrl:i,caption:o}=t;return n.createElement("a",{key:e,className:b.showcaseLogo,href:m},n.createElement("img",{src:(0,f.A)(i),title:o}))};var w=m(6942),_=m.n(w);const M=()=>{const{siteConfig:t={}}=(0,u.A)(),{users:e}=t.customFields,m=e.map(((t,e)=>n.createElement(x,{i:e,infoUrl:t.infoUrl,imageUrl:t.imageUrl,caption:t.caption})));return n.createElement("section",{className:_()("text--center",b.showcase)},n.createElement("h2",{className:_()("showcaseHeading",b.showcaseHeadingColored)},"Who's using memlab?"),n.createElement("div",{className:b.showcaseLogos},m),t.customFields.showAddLogoButton&&n.createElement("div",{className:"more-users"},n.createElement(s.A,{className:_()("button button--primary button--outline",b.button),href:"https://github.com/facebook/memlab/edit/main/website/docusaurus.config.js"},"Add your company/project here")))};var C=m(8964),B=m(63),T=m.n(B);const D="undefined"!=typeof window?window:{addEventListener:()=>{},removeEventListener:()=>{},innerWidth:0,innerHeight:0};function E(){const{innerWidth:t,innerHeight:e}=D;return{width:t,height:e}}var L=m(9539),S=m.n(L),j=m(8231),A=m.n(j);const H=[{title:"Define Your Test",docUrl:"docs/api/interfaces/core_src.IScenario",description:n.createElement(n.Fragment,null,"Define E2E test scenarios on browser interaction:",n.createElement(p,{language:"typescript",code:"// test.js\nfunction url() {\n return 'https://www.google.com/maps/place/Silicon+Valley,+CA/';\n}\nasync function action(page) {\n await page.click('button[aria-label=\"Hotels\"]');\n}\nasync function back(page) {\n await page.click('[aria-label=\"Close\"]');\n}\n\nmodule.exports = {action, back, url};"}))},{title:"Run memlab in CLI",docUrl:"docs/cli/CLI-commands",description:n.createElement(n.Fragment,null,"Find memory leaks with the custom E2E test scenario:",n.createElement(d,{language:"bash",code:"$ memlab run --scenario test.js"}),"Support memory analyses for the previous browser test:",n.createElement(d,{language:"bash",code:"# Analyze duplicated string in heap\n$ memlab analyze string\n# Check unbound object growth\n$ memlab analyze unbound-object\n# Get shapes with unbound growth\n$ memlab analyze unbound-shape\n# Discover more memory analyses\n$ memlab analyze -h"}))},{title:"Programming API",docUrl:"docs/api/modules/api_src",description:n.createElement(n.Fragment,null,"Memory analysis for JavaScript heap snapshots:",n.createElement(p,{language:"typescript",code:"const {findLeaks, takeSnapshots} = require('@memlab/api');\n\nasync function test() {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const result = await takeSnapshots({scenario});\n const leaks = findLeaks(result);\n // ...\n}"}))}];function P(t){let{imageUrl:e,title:m,description:o,docUrl:c}=t;const r=(0,f.A)(e);return n.createElement("div",{className:(0,i.A)("col col--4",b.feature)},r&&n.createElement("div",{className:"text--center"},n.createElement("img",{className:b.featureImage,src:r,alt:m})),c?n.createElement(s.A,{className:b.titleLink,to:c},n.createElement("h3",null,m)):n.createElement("h3",null,m),n.createElement("p",null,o))}const O=S()(A()),N=6,R=16;function z(){const{siteConfig:t}=(0,u.A)(),[e,m]=(0,n.useState)(null),c=(0,n.useRef)(null),{width:r}=function(){const[t,e]=(0,n.useState)(E());return(0,n.useEffect)((()=>{function t(){e(E())}return D.addEventListener("resize",t),()=>D.removeEventListener("resize",t)}),[]),t}();return(0,n.useEffect)((()=>(!e&&r>800&&m(T()({el:c.current,THREE:C,mouseControls:!0,touchControls:!0,gyroControls:!1,minHeight:200,minWidth:200,scale:.9,scaleMobile:.4,color:6521387,backgroundColor:15784783,points:Math.min(Math.max(Math.floor(12*r/1800),N),R),maxDistance:30,spacing:22})),()=>{null!=e&&e.destroy()})),[e]),n.createElement(o.A,{description:"memlab is an E2E testing, memory leak detection, and heap analysis framework for front-end JavaScript."},n.createElement("header",{id:"css-animated-bg-container",ref:c,className:(0,i.A)("hero hero--primary",b.heroBanner)},n.createElement("div",{id:"header-container",className:"container"},n.createElement("div",{id:"left-header-section",className:"container-section"},n.createElement("h1",{id:"title",className:"hero__title"},t.title),n.createElement("p",{id:"sub-title",className:"hero__subtitle"},t.tagline),n.createElement("div",{className:b.buttons},n.createElement(s.A,{id:"learn-more",className:(0,i.A)("button button--outline button--secondary button--lg",b.getStarted),to:(0,f.A)("docs/getting-started")},"Learn more"))),n.createElement("div",{className:"container-section"},n.createElement(F,{stdouts:O})))),n.createElement("main",null,H&&H.length>0&&n.createElement("section",{className:b.features},n.createElement("div",{className:"container"},n.createElement("div",{className:"row"},H.map((t=>{let{title:e,docUrl:m,imageUrl:i,description:o}=t;return n.createElement(P,{key:e,title:e,docUrl:(0,f.A)(m),imageUrl:(0,f.A)(i),description:o})}))))),n.createElement(M,null)))}}}]); \ No newline at end of file diff --git a/assets/js/1f391b9e.8b165441.js b/assets/js/1f391b9e.fdab0dc8.js similarity index 93% rename from assets/js/1f391b9e.8b165441.js rename to assets/js/1f391b9e.fdab0dc8.js index 0b38f5c1..40f346d3 100644 --- a/assets/js/1f391b9e.8b165441.js +++ b/assets/js/1f391b9e.fdab0dc8.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[6061],{7973:(e,a,t)=>{t.r(a),t.d(a,{default:()=>d});var l=t(6540),n=t(53),c=t(9024),r=t(7559),m=t(1868),i=t(1363),s=t(7763);const o={mdxPageWrapper:"mdxPageWrapper_j9I6"};function d(e){const{content:a}=e,{metadata:{title:t,description:d,frontMatter:p}}=a,{wrapperClassName:g,hide_table_of_contents:_}=p;return l.createElement(c.e3,{className:(0,n.A)(g??r.G.wrapper.mdxPages,r.G.page.mdxPage)},l.createElement(c.be,{title:t,description:d}),l.createElement(m.A,null,l.createElement("main",{className:"container container--fluid margin-vert--lg"},l.createElement("div",{className:(0,n.A)("row",o.mdxPageWrapper)},l.createElement("div",{className:(0,n.A)("col",!_&&"col--8")},l.createElement(i.A,null,l.createElement(a,null))),!_&&a.toc&&l.createElement("div",{className:"col col--2"},l.createElement(s.A,{toc:a.toc,minHeadingLevel:p.toc_min_heading_level,maxHeadingLevel:p.toc_max_heading_level}))))))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[6061],{7973:(e,a,t)=>{t.r(a),t.d(a,{default:()=>d});var l=t(6540),n=t(53),c=t(9024),r=t(7559),m=t(8916),i=t(1363),s=t(7763);const o={mdxPageWrapper:"mdxPageWrapper_j9I6"};function d(e){const{content:a}=e,{metadata:{title:t,description:d,frontMatter:p}}=a,{wrapperClassName:g,hide_table_of_contents:_}=p;return l.createElement(c.e3,{className:(0,n.A)(g??r.G.wrapper.mdxPages,r.G.page.mdxPage)},l.createElement(c.be,{title:t,description:d}),l.createElement(m.A,null,l.createElement("main",{className:"container container--fluid margin-vert--lg"},l.createElement("div",{className:(0,n.A)("row",o.mdxPageWrapper)},l.createElement("div",{className:(0,n.A)("col",!_&&"col--8")},l.createElement(i.A,null,l.createElement(a,null))),!_&&a.toc&&l.createElement("div",{className:"col col--2"},l.createElement(s.A,{toc:a.toc,minHeadingLevel:p.toc_min_heading_level,maxHeadingLevel:p.toc_max_heading_level}))))))}}}]); \ No newline at end of file diff --git a/assets/js/26eba521.2425aa16.js b/assets/js/26eba521.26511a95.js similarity index 97% rename from assets/js/26eba521.2425aa16.js rename to assets/js/26eba521.26511a95.js index cd1a72bd..0c1e2c4f 100644 --- a/assets/js/26eba521.2425aa16.js +++ b/assets/js/26eba521.26511a95.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[6571],{5680:(e,a,n)=>{n.d(a,{xA:()=>s,yg:()=>y});var t=n(6540);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=t.createContext({}),g=function(e){var a=t.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},s=function(e){var a=g(e.components);return t.createElement(p.Provider,{value:a},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},d=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=g(n),d=r,y=m["".concat(p,".").concat(d)]||m[d]||c[d]||l;return n?t.createElement(y,i(i({ref:a},s),{},{components:n})):t.createElement(y,i({ref:a},s))}));function y(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=d;var o={};for(var p in a)hasOwnProperty.call(a,p)&&(o[p]=a[p]);o.originalType=e,o[m]="string"==typeof e?e:r,i[1]=o;for(var g=2;g{n.r(a),n.d(a,{assets:()=>p,contentTitle:()=>i,default:()=>c,frontMatter:()=>l,metadata:()=>o,toc:()=>g});var t=n(8168),r=(n(6540),n(5680));const l={id:"core_src",title:"Package: @memlab/core",sidebar_label:"core/src",sidebar_position:0,custom_edit_url:null},i=void 0,o={unversionedId:"api/modules/core_src",id:"api/modules/core_src",title:"Package: @memlab/core",description:"Interfaces",source:"@site/docs/api/modules/core_src.md",sourceDirName:"api/modules",slug:"/api/modules/core_src",permalink:"/memlab/docs/api/modules/core_src",draft:!1,editUrl:null,tags:[],version:"current",sidebarPosition:0,frontMatter:{id:"core_src",title:"Package: @memlab/core",sidebar_label:"core/src",sidebar_position:0,custom_edit_url:null},sidebar:"sidebar",previous:{title:"api/src",permalink:"/memlab/docs/api/modules/api_src"},next:{title:"heap-analysis/src",permalink:"/memlab/docs/api/modules/heap_analysis_src"}},p={},g=[{value:"Interfaces",id:"interfaces",level:2},{value:"Type Aliases",id:"type-aliases",level:2},{value:' CheckPageLoadCallback: (page: Page) => Promise<boolean>',id:"-checkpageloadcallback-page-page--promiseboolean",level:3},{value:' Cookie: Object',id:"-cookie-object",level:3},{value:' Cookies: Cookie[]',id:"-cookies-cookie",level:3},{value:' EdgeIterationCallback: (edge: IHeapEdge) => Optional<{ stop: boolean }> | void',id:"-edgeiterationcallback-edge-iheapedge--optional-stop-boolean----void",level:3},{value:' InitLeakFilterCallback: (snapshot: IHeapSnapshot, leakedNodeIds: HeapNodeIdSet) => void',id:"-initleakfiltercallback-snapshot-iheapsnapshot-leakednodeids-heapnodeidset--void",level:3},{value:' InteractionsCallback: (page: Page, args?: OperationArgs) => Promise<void>',id:"-interactionscallback-page-page-args-operationargs--promisevoid",level:3},{value:' LeakFilterCallback: (node: IHeapNode, snapshot: IHeapSnapshot, leakedNodeIds: HeapNodeIdSet) => boolean',id:"-leakfiltercallback-node-iheapnode-snapshot-iheapsnapshot-leakednodeids-heapnodeidset--boolean",level:3},{value:' Nullable<T>: T | null',id:"-nullablet-t--null",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:' Optional<T>: T | null | undefined',id:"-optionalt-t--null--undefined",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:' Page: PuppeteerPage',id:"-page-puppeteerpage",level:3},{value:' Predicator<T>: (entity: T) => boolean',id:"-predicatort-entity-t--boolean",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:' ReferenceFilterCallback: (edge: IHeapEdge, snapshot: IHeapSnapshot, isReferenceUsedByDefault: boolean) => boolean',id:"-referencefiltercallback-edge-iheapedge-snapshot-iheapsnapshot-isreferenceusedbydefault-boolean--boolean",level:3},{value:' RunMetaInfo: Object',id:"-runmetainfo-object",level:3},{value:' Undefinable<T>: T | undefined',id:"-undefinablet-t--undefined",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Functions",id:"functions",level:2},{value:'dumpNodeHeapSnapshot()',id:"dumpnodeheapsnapshot",level:3},{value:'tagObject<T>(o, tag)',id:"tagobjectto-tag",level:3},{value:"Type parameters",id:"type-parameters-4",level:4},{value:'takeNodeMinimalHeap()',id:"takenodeminimalheap",level:3}],s={toc:g},m="wrapper";function c(e){let{components:a,...n}=e;return(0,r.yg)(m,(0,t.A)({},s,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("h2",{id:"interfaces"},"Interfaces"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IBrowserInfo"},"IBrowserInfo")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},"IHeapEdge")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdges"},"IHeapEdges")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapLocation"},"IHeapLocation")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNodes"},"IHeapNodes")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},"IHeapStringNode")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.ILeakFilter"},"ILeakFilter")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IScenario"},"IScenario"))),(0,r.yg)("h2",{id:"type-aliases"},"Type Aliases"),(0,r.yg)("h3",{id:"-checkpageloadcallback-page-page--promiseboolean"},(0,r.yg)("a",{id:"checkpageloadcallback",name:"checkpageloadcallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"CheckPageLoadCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"page"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean"),">"),(0,r.yg)("p",null,"Callback function to provide if the page is loaded.\nFor concrete example, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#ispageloaded"},"isPageLoaded"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page"))," | puppeteer's ",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page/"},"Page")," object. To import this type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"p"},"boolean"),">"," | a boolean value, if it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true"),", memlab will consider\nthe navigation completes, if it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"false"),", memlab will keep calling\nthis callback until it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true"),". This is an async callback, you can\nalso ",(0,r.yg)("inlineCode",{parentName:"p"},"await")," and returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true")," until some async logic is resolved.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1166"},"core/src/lib/Types.ts:1166"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-cookie-object"},(0,r.yg)("a",{id:"cookie",name:"cookie"})," ",(0,r.yg)("strong",{parentName:"h3"},"Cookie"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"Object")),(0,r.yg)("p",null,"A single cookie entry in a Cookies list.\nThe ",(0,r.yg)("inlineCode",{parentName:"p"},"name")," and ",(0,r.yg)("inlineCode",{parentName:"p"},"value")," field is mandatory.\nIt is better to also specify the ",(0,r.yg)("inlineCode",{parentName:"p"},"domain")," field, otherwise MemLab\nwill try to infer ",(0,r.yg)("inlineCode",{parentName:"p"},"domain")," automatically.\nThe other fields are optional.\nFor concrete use case, please check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#cookies"},"cookies"),"."),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"domain?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"Add when possible: Defines the domain associated with the cookie")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"expires?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"number"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Indicates when the cookie will expire, in Unix time (seconds)")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"httpOnly?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"boolean"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Flag to determine if the cookie is accessible only over HTTP")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"name")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"Mandatory: Represents the name of the cookie")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"path?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"string"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Defines the domain associated with the cookie")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"sameSite?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},'"Strict"')," ","|"," ",(0,r.yg)("inlineCode",{parentName:"td"},'"Lax"'),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Determines if a cookie is transmitted with cross-site requests, offering a degree of defense against cross-site request forgery attacks.")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"secure?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"boolean"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Flag to indicate if the cookie transmission requires a secure protocol (e.g., HTTPS)")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"session?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"boolean"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Flag to check if the cookie is a session cookie")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"url?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"string"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Specifies the request-URI linked with the cookie setup. This can influence the cookie's default domain and path")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"value")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"Mandatory: Represents the value assigned to the cookie")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L236"},"core/src/lib/Types.ts:236"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-cookies-cookie"},(0,r.yg)("a",{id:"cookies",name:"cookies"})," ",(0,r.yg)("strong",{parentName:"h3"},"Cookies"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#cookie"},(0,r.yg)("inlineCode",{parentName:"a"},"Cookie")),"[]"),(0,r.yg)("p",null,"Data structure for holding cookies.\nFor concrete use case, please check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#cookies"},"cookies"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L226"},"core/src/lib/Types.ts:226"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-edgeiterationcallback-edge-iheapedge--optional-stop-boolean----void"},(0,r.yg)("a",{id:"edgeiterationcallback",name:"edgeiterationcallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"EdgeIterationCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"edge"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),") => ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#optional"},(0,r.yg)("inlineCode",{parentName:"a"},"Optional")),"<{ ",(0,r.yg)("inlineCode",{parentName:"h3"},"stop"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean")," }",">"," ","|"," ",(0,r.yg)("inlineCode",{parentName:"h3"},"void")),(0,r.yg)("p",null,"Executes a provided callback once for JavaScript references.\nFor concrete examples, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode#foreachreference"},"forEachReference"),"\nor ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode#foreachreferrer"},"forEachReferrer"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"edge"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapEdge"))))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#optional"},(0,r.yg)("inlineCode",{parentName:"a"},"Optional")),"<{ ",(0,r.yg)("inlineCode",{parentName:"p"},"stop"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"boolean")," }",">"," ","|"," ",(0,r.yg)("inlineCode",{parentName:"p"},"void")," | this API returns void")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1779"},"core/src/lib/Types.ts:1779"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-initleakfiltercallback-snapshot-iheapsnapshot-leakednodeids-heapnodeidset--void"},(0,r.yg)("a",{id:"initleakfiltercallback",name:"initleakfiltercallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"InitLeakFilterCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"snapshot"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"HeapNodeIdSet"),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"void")),(0,r.yg)("p",null,"Lifecycle function callback that is invoked initially once before calling any\nleak filter function.\nFor concrete example, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.ILeakFilter#beforeleakfilter"},"beforeLeakFilter"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))," | heap snapshot see ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"HeapNodeIdSet")," | the set of leaked object (node) ids."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"void"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L554"},"core/src/lib/Types.ts:554"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-interactionscallback-page-page-args-operationargs--promisevoid"},(0,r.yg)("a",{id:"interactionscallback",name:"interactionscallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"InteractionsCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"page"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"args?"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"OperationArgs"),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"void"),">"),(0,r.yg)("p",null,"The callback defines browser interactions which are\nused by memlab to interact with the web app under test.\nFor concrete examples, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#action"},"action")," or ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#back"},"back"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page"))," | the puppeteer ",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page"))," object, which provides APIs to interact with the web browser. To import this type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"args?"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"OperationArgs")))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"p"},"void"),">"," | no return value")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L640"},"core/src/lib/Types.ts:640"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-leakfiltercallback-node-iheapnode-snapshot-iheapsnapshot-leakednodeids-heapnodeidset--boolean"},(0,r.yg)("a",{id:"leakfiltercallback",name:"leakfiltercallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"LeakFilterCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"node"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"snapshot"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"HeapNodeIdSet"),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,r.yg)("p",null,"Callback that can be used to define a logic to filter the\nleaked objects. The callback is only called for every node\nallocated but not released from the target interaction\nin the heap snapshot."),(0,r.yg)("p",null,"For concrete examples, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.ILeakFilter#leakfilter"},"leakFilter"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"node"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode"))," | the node that is kept alive in the memory in the heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))," | the snapshot of target interaction"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"HeapNodeIdSet")," | the set of leaked node ids"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"boolean")," | the value indicating whether the given node in the snapshot\nshould be considered as leaked."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"// any node in the heap snapshot that is greater than 1MB\nfunction leakFilter(node, _snapshot, _leakedNodeIds) {\n return node.retainedSize > 1000000;\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L581"},"core/src/lib/Types.ts:581"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-nullablet-t--null"},(0,r.yg)("a",{id:"nullable",name:"nullable"})," ",(0,r.yg)("strong",{parentName:"h3"},"Nullable"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),">",": ",(0,r.yg)("inlineCode",{parentName:"h3"},"T")," ","|"," ",(0,r.yg)("inlineCode",{parentName:"h3"},"null")),(0,r.yg)("p",null,"Given any type ",(0,r.yg)("inlineCode",{parentName:"p"},"T"),", return the union type ",(0,r.yg)("inlineCode",{parentName:"p"},"T")," and ",(0,r.yg)("inlineCode",{parentName:"p"},"null")),(0,r.yg)("h4",{id:"type-parameters"},"Type parameters"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"T")),(0,r.yg)("td",{parentName:"tr",align:"left"},"The type that will be made nullable.")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L32"},"core/src/lib/Types.ts:32"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optionalt-t--null--undefined"},(0,r.yg)("a",{id:"optional",name:"optional"})," ",(0,r.yg)("strong",{parentName:"h3"},"Optional"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),">",": ",(0,r.yg)("inlineCode",{parentName:"h3"},"T")," ","|"," ",(0,r.yg)("inlineCode",{parentName:"h3"},"null")," ","|"," ",(0,r.yg)("inlineCode",{parentName:"h3"},"undefined")),(0,r.yg)("p",null,"Given any type ",(0,r.yg)("inlineCode",{parentName:"p"},"T"),", return the union type ",(0,r.yg)("inlineCode",{parentName:"p"},"T"),", ",(0,r.yg)("inlineCode",{parentName:"p"},"null"),", and ",(0,r.yg)("inlineCode",{parentName:"p"},"undefined"),"."),(0,r.yg)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"T")),(0,r.yg)("td",{parentName:"tr",align:"left"},"The type that will be made both nullable and undefinable.")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L38"},"core/src/lib/Types.ts:38"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-page-puppeteerpage"},(0,r.yg)("a",{id:"page",name:"page"})," ",(0,r.yg)("strong",{parentName:"h3"},"Page"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"PuppeteerPage")),(0,r.yg)("p",null,"This is the puppeteer ",(0,r.yg)("a",{parentName:"p",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nclass used by MemLab. The puppeteer ",(0,r.yg)("inlineCode",{parentName:"p"},"Page")," class instance provides\nAPIs to interact with the web browser."),(0,r.yg)("p",null,"The puppeteer ",(0,r.yg)("inlineCode",{parentName:"p"},"Page")," type can be incompatible across different versions.\nYour local npm-installed puppeteer version may be different from\nthe puppeteer used by MemLab. This may cause some type errors, for example:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {Page} from 'puppeteer';\nimport type {RunOptions} from '@memlab/api';\n\nconst runOptions: RunOptions = {\n scenario: {\n // initial page load url: Google Maps\n url: () => {\n return \"https://www.google.com/maps/@37.386427,-122.0428214,11z\";\n },\n // type error here if your local puppeeter version is different\n // from the puppeteer used by MemLab\n action: async function (page: Page) {\n await page.click('button[aria-label=\"Hotels\"]');\n },\n },\n};\n")),(0,r.yg)("p",null,"To avoid the type error in the code example above, MemLab exports the\npuppeteer ",(0,r.yg)("inlineCode",{parentName:"p"},"Page")," type used by MemLab so that your code can import it\nwhen necessary:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {Page} from '@memlab/core' // import Page type from memlab\nimport type {RunOptions} from 'memlab';\n\nconst runOptions: RunOptions = {\n scenario: {\n // initial page load url: Google Maps\n url: () => {\n return \"https://www.google.com/maps/@37.386427,-122.0428214,11z\";\n },\n // no type error here\n action: async function (page: Page) {\n await page.click('button[aria-label=\"Hotels\"]');\n },\n },\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L207"},"core/src/lib/Types.ts:207"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-predicatort-entity-t--boolean"},(0,r.yg)("a",{id:"predicator",name:"predicator"})," ",(0,r.yg)("strong",{parentName:"h3"},"Predicator"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),">",": (",(0,r.yg)("inlineCode",{parentName:"h3"},"entity"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,r.yg)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"T")),(0,r.yg)("td",{parentName:"tr",align:"left"},"the type of the entity to be checked")))),(0,r.yg)("p",null,"the predicate callback is used to decide if a\nentity of type ",(0,r.yg)("inlineCode",{parentName:"p"},"T"),".\nFor more concrete examples on where it is used,\ncheck out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode#findanyreference"},"findAnyReference"),", ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode#findanyreferrer"},"findAnyReferrer"),",\nand ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode#findreferrers"},"findReferrers"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"entity"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"T")," | the entity to be checked"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"boolean")," | whether the entity passes the predicate check")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L220"},"core/src/lib/Types.ts:220"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-referencefiltercallback-edge-iheapedge-snapshot-iheapsnapshot-isreferenceusedbydefault-boolean--boolean"},(0,r.yg)("a",{id:"referencefiltercallback",name:"referencefiltercallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"ReferenceFilterCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"edge"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"snapshot"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"isReferenceUsedByDefault"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean"),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,r.yg)("p",null,"Callback that can be used to define a logic to decide whether\na reference should be filtered (included) for some\ncalculations (e.g., retainer trace calculation)"),(0,r.yg)("p",null,"For concrete examples, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.ILeakFilter#leakfilter"},"leakFilter"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"edge"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapEdge"))," | the reference (edge) that is considered for calcualting the retainer trace"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))," | the final snapshot taken after all browser interactions are done."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"isReferenceUsedByDefault"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"boolean")," | MemLab has its own default logic for whether a reference should be filtered (included), if this parameter is true, it means MemLab will consider this reference for inclusion"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"boolean")," | the value indicating whether the given reference should be\nfiltered (i.e., included)")),(0,r.yg)("p",null,"Please also be aware that some edges like self-referencing edges,\nJS engine's internal edges, and hidden edges should not be considered\nas part of the retainer trace. These edges could make the retainer trace\nunncessarily complex and cause confusion. ",(0,r.yg)("inlineCode",{parentName:"p"},"isReferenceUsedByDefault")," will\nbe ",(0,r.yg)("inlineCode",{parentName:"p"},"false")," for these types of edges."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"// exclude react fiber references\nfunction retainerReferenceFilter(edge, _snapshot, _isReferenceUsedByDefault) {\n if (edge.name_or_index.toString().startsWith('__reactFiber$')) {\n return false;\n }\n // exclude other references here\n // ...\n return true;\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L624"},"core/src/lib/Types.ts:624"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-runmetainfo-object"},(0,r.yg)("a",{id:"runmetainfo",name:"runmetainfo"})," ",(0,r.yg)("strong",{parentName:"h3"},"RunMetaInfo"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"Object")),(0,r.yg)("p",null,"This data structure holds the information about memlab run.\nYou can retrieve the instance of this type through ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader#getrunmetainfo"},"getRunMetaInfo"),"."),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"browserInfo")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/interfaces/core_src.IBrowserInfo"},(0,r.yg)("inlineCode",{parentName:"a"},"IBrowserInfo"))),(0,r.yg)("td",{parentName:"tr",align:"left"},"input configuration for the browser and output data from the browser")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"type")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"type of the memlab run")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1247"},"core/src/lib/Types.ts:1247"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-undefinablet-t--undefined"},(0,r.yg)("a",{id:"undefinable",name:"undefinable"})," ",(0,r.yg)("strong",{parentName:"h3"},"Undefinable"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),">",": ",(0,r.yg)("inlineCode",{parentName:"h3"},"T")," ","|"," ",(0,r.yg)("inlineCode",{parentName:"h3"},"undefined")),(0,r.yg)("p",null,"Given any type ",(0,r.yg)("inlineCode",{parentName:"p"},"T"),", return the union type ",(0,r.yg)("inlineCode",{parentName:"p"},"T")," and ",(0,r.yg)("inlineCode",{parentName:"p"},"undefined"),"."),(0,r.yg)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"T")),(0,r.yg)("td",{parentName:"tr",align:"left"},"The type that will be made undefinable.")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L44"},"core/src/lib/Types.ts:44"))))),(0,r.yg)("h2",{id:"functions"},"Functions"),(0,r.yg)("h3",{id:"dumpnodeheapsnapshot"},(0,r.yg)("a",{id:"dumpnodeheapsnapshot"}),(0,r.yg)("strong",{parentName:"h3"},"dumpNodeHeapSnapshot"),"()"),(0,r.yg)("p",null,"Take a heap snapshot of the current program state and save it as a\n",(0,r.yg)("inlineCode",{parentName:"p"},".heapsnapshot")," file under a randomly generated folder inside the system's\ntemp folder."),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"Note"),": All ",(0,r.yg)("inlineCode",{parentName:"p"},".heapsnapshot")," files could also be loaded by Chrome DevTools."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"string")," | the absolute file path to the saved ",(0,r.yg)("inlineCode",{parentName:"p"},".heapsnapshot")," file.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/NodeHeap.ts#L84"},"core/src/lib/NodeHeap.ts:84"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"tagobjectto-tag"},(0,r.yg)("a",{id:"tagobject"}),(0,r.yg)("strong",{parentName:"h3"},"tagObject"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),">","(",(0,r.yg)("inlineCode",{parentName:"h3"},"o"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"tag"),")"),(0,r.yg)("p",null,"Tags a string marker to an object instance, which can later be checked by\n",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot#hasobjectwithtag"},"hasObjectWithTag"),". This API does not modify the object instance in\nany way (e.g., no additional or hidden properties added to the tagged\nobject)."),(0,r.yg)("h4",{id:"type-parameters-4"},"Type parameters"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"T")),(0,r.yg)("td",{parentName:"tr",align:"left"},"extends ",(0,r.yg)("inlineCode",{parentName:"td"},"object"))))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"o"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"T")," | specify the object instance you want to tag, you cannot tag a ",(0,r.yg)("a",{parentName:"li",href:"https://developer.mozilla.org/en-US/docs/Glossary/Primitive"},"primitive"),"."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"tag"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | marker name to tag on the object instance"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"T")," | returns the tagged object instance (same reference as\nthe input argument ",(0,r.yg)("inlineCode",{parentName:"li"},"o"),")"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, AnyValue} from '@memlab/core';\nimport {config, takeNodeMinimalHeap, tagObject} from '@memlab/core';\n\ntest('memory test', async () => {\n config.muteConsole = true;\n const o1: AnyValue = {};\n let o2: AnyValue = {};\n\n // tag o1 with marker: \"memlab-mark-1\", does not modify o1 in any way\n tagObject(o1, 'memlab-mark-1');\n // tag o2 with marker: \"memlab-mark-2\", does not modify o2 in any way\n tagObject(o2, 'memlab-mark-2');\n\n o2 = null;\n\n const heap: IHeapSnapshot = await takeNodeMinimalHeap();\n\n // expect object with marker \"memlab-mark-1\" exists\n expect(heap.hasObjectWithTag('memlab-mark-1')).toBe(true);\n\n // expect object with marker \"memlab-mark-2\" can be GCed\n expect(heap.hasObjectWithTag('memlab-mark-2')).toBe(false);\n\n}, 30000);\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/NodeHeap.ts#L59"},"core/src/lib/NodeHeap.ts:59"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"takenodeminimalheap"},(0,r.yg)("a",{id:"takenodeminimalheap"}),(0,r.yg)("strong",{parentName:"h3"},"takeNodeMinimalHeap"),"()"),(0,r.yg)("p",null,"Take a heap snapshot of the current program state\nand parse it as ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"),". Notice that\nthis API does not calculate some heap analysis meta data\nfor heap analysis. But this also means faster heap parsing."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot")),">"," | heap representation without heap analysis meta data.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples:")))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {takeNodeMinimalHeap} from '@memlab/core';\n\n(async function () {\n const heap: IHeapSnapshot = await takeNodeMinimalHeap();\n})();\n")),(0,r.yg)("p",null,"If you need to get the heap snapshot with heap analysis meta data, please\nuse ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/heap_analysis_src#getfullheapfromfile"},"getFullHeapFromFile"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/NodeHeap.ts#L152"},"core/src/lib/NodeHeap.ts:152"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[6571],{5680:(e,a,n)=>{n.d(a,{xA:()=>s,yg:()=>y});var t=n(6540);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=t.createContext({}),g=function(e){var a=t.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},s=function(e){var a=g(e.components);return t.createElement(p.Provider,{value:a},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},d=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=g(n),d=r,y=m["".concat(p,".").concat(d)]||m[d]||c[d]||l;return n?t.createElement(y,i(i({ref:a},s),{},{components:n})):t.createElement(y,i({ref:a},s))}));function y(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=d;var o={};for(var p in a)hasOwnProperty.call(a,p)&&(o[p]=a[p]);o.originalType=e,o[m]="string"==typeof e?e:r,i[1]=o;for(var g=2;g{n.r(a),n.d(a,{assets:()=>p,contentTitle:()=>i,default:()=>c,frontMatter:()=>l,metadata:()=>o,toc:()=>g});var t=n(8168),r=(n(6540),n(5680));const l={id:"core_src",title:"Package: @memlab/core",sidebar_label:"core/src",sidebar_position:0,custom_edit_url:null},i=void 0,o={unversionedId:"api/modules/core_src",id:"api/modules/core_src",title:"Package: @memlab/core",description:"Interfaces",source:"@site/docs/api/modules/core_src.md",sourceDirName:"api/modules",slug:"/api/modules/core_src",permalink:"/memlab/docs/api/modules/core_src",draft:!1,editUrl:null,tags:[],version:"current",sidebarPosition:0,frontMatter:{id:"core_src",title:"Package: @memlab/core",sidebar_label:"core/src",sidebar_position:0,custom_edit_url:null},sidebar:"sidebar",previous:{title:"api/src",permalink:"/memlab/docs/api/modules/api_src"},next:{title:"heap-analysis/src",permalink:"/memlab/docs/api/modules/heap_analysis_src"}},p={},g=[{value:"Interfaces",id:"interfaces",level:2},{value:"Type Aliases",id:"type-aliases",level:2},{value:' CheckPageLoadCallback: (page: Page) => Promise<boolean>',id:"-checkpageloadcallback-page-page--promiseboolean",level:3},{value:' Cookie: Object',id:"-cookie-object",level:3},{value:' Cookies: Cookie[]',id:"-cookies-cookie",level:3},{value:' EdgeIterationCallback: (edge: IHeapEdge) => Optional<{ stop: boolean }> | void',id:"-edgeiterationcallback-edge-iheapedge--optional-stop-boolean----void",level:3},{value:' InitLeakFilterCallback: (snapshot: IHeapSnapshot, leakedNodeIds: HeapNodeIdSet) => void',id:"-initleakfiltercallback-snapshot-iheapsnapshot-leakednodeids-heapnodeidset--void",level:3},{value:' InteractionsCallback: (page: Page, args?: OperationArgs) => Promise<void>',id:"-interactionscallback-page-page-args-operationargs--promisevoid",level:3},{value:' LeakFilterCallback: (node: IHeapNode, snapshot: IHeapSnapshot, leakedNodeIds: HeapNodeIdSet) => boolean',id:"-leakfiltercallback-node-iheapnode-snapshot-iheapsnapshot-leakednodeids-heapnodeidset--boolean",level:3},{value:' Nullable<T>: T | null',id:"-nullablet-t--null",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:' Optional<T>: T | null | undefined',id:"-optionalt-t--null--undefined",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:' Page: PuppeteerPage',id:"-page-puppeteerpage",level:3},{value:' Predicator<T>: (entity: T) => boolean',id:"-predicatort-entity-t--boolean",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:' ReferenceFilterCallback: (edge: IHeapEdge, snapshot: IHeapSnapshot, isReferenceUsedByDefault: boolean) => boolean',id:"-referencefiltercallback-edge-iheapedge-snapshot-iheapsnapshot-isreferenceusedbydefault-boolean--boolean",level:3},{value:' RunMetaInfo: Object',id:"-runmetainfo-object",level:3},{value:' Undefinable<T>: T | undefined',id:"-undefinablet-t--undefined",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Functions",id:"functions",level:2},{value:'dumpNodeHeapSnapshot()',id:"dumpnodeheapsnapshot",level:3},{value:'tagObject<T>(o, tag)',id:"tagobjectto-tag",level:3},{value:"Type parameters",id:"type-parameters-4",level:4},{value:'takeNodeMinimalHeap()',id:"takenodeminimalheap",level:3}],s={toc:g},m="wrapper";function c(e){let{components:a,...n}=e;return(0,r.yg)(m,(0,t.A)({},s,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("h2",{id:"interfaces"},"Interfaces"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IBrowserInfo"},"IBrowserInfo")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},"IHeapEdge")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdges"},"IHeapEdges")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapLocation"},"IHeapLocation")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNodes"},"IHeapNodes")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},"IHeapStringNode")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.ILeakFilter"},"ILeakFilter")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IScenario"},"IScenario"))),(0,r.yg)("h2",{id:"type-aliases"},"Type Aliases"),(0,r.yg)("h3",{id:"-checkpageloadcallback-page-page--promiseboolean"},(0,r.yg)("a",{id:"checkpageloadcallback",name:"checkpageloadcallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"CheckPageLoadCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"page"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean"),">"),(0,r.yg)("p",null,"Callback function to provide if the page is loaded.\nFor concrete example, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#ispageloaded"},"isPageLoaded"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page"))," | puppeteer's ",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page/"},"Page")," object. To import this type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"p"},"boolean"),">"," | a boolean value, if it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true"),", memlab will consider\nthe navigation completes, if it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"false"),", memlab will keep calling\nthis callback until it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true"),". This is an async callback, you can\nalso ",(0,r.yg)("inlineCode",{parentName:"p"},"await")," and returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true")," until some async logic is resolved.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1166"},"core/src/lib/Types.ts:1166"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-cookie-object"},(0,r.yg)("a",{id:"cookie",name:"cookie"})," ",(0,r.yg)("strong",{parentName:"h3"},"Cookie"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"Object")),(0,r.yg)("p",null,"A single cookie entry in a Cookies list.\nThe ",(0,r.yg)("inlineCode",{parentName:"p"},"name")," and ",(0,r.yg)("inlineCode",{parentName:"p"},"value")," field is mandatory.\nIt is better to also specify the ",(0,r.yg)("inlineCode",{parentName:"p"},"domain")," field, otherwise MemLab\nwill try to infer ",(0,r.yg)("inlineCode",{parentName:"p"},"domain")," automatically.\nThe other fields are optional.\nFor concrete use case, please check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#cookies"},"cookies"),"."),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"domain?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"Add when possible: Defines the domain associated with the cookie")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"expires?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"number"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Indicates when the cookie will expire, in Unix time (seconds)")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"httpOnly?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"boolean"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Flag to determine if the cookie is accessible only over HTTP")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"name")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"Mandatory: Represents the name of the cookie")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"path?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"string"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Defines the domain associated with the cookie")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"sameSite?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},'"Strict"')," ","|"," ",(0,r.yg)("inlineCode",{parentName:"td"},'"Lax"'),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Determines if a cookie is transmitted with cross-site requests, offering a degree of defense against cross-site request forgery attacks.")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"secure?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"boolean"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Flag to indicate if the cookie transmission requires a secure protocol (e.g., HTTPS)")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"session?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"boolean"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Flag to check if the cookie is a session cookie")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"url?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/modules/core_src#undefinable"},(0,r.yg)("inlineCode",{parentName:"a"},"Undefinable")),"<",(0,r.yg)("inlineCode",{parentName:"td"},"string"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"Optional: Specifies the request-URI linked with the cookie setup. This can influence the cookie's default domain and path")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"value")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"Mandatory: Represents the value assigned to the cookie")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L236"},"core/src/lib/Types.ts:236"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-cookies-cookie"},(0,r.yg)("a",{id:"cookies",name:"cookies"})," ",(0,r.yg)("strong",{parentName:"h3"},"Cookies"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#cookie"},(0,r.yg)("inlineCode",{parentName:"a"},"Cookie")),"[]"),(0,r.yg)("p",null,"Data structure for holding cookies.\nFor concrete use case, please check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#cookies"},"cookies"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L226"},"core/src/lib/Types.ts:226"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-edgeiterationcallback-edge-iheapedge--optional-stop-boolean----void"},(0,r.yg)("a",{id:"edgeiterationcallback",name:"edgeiterationcallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"EdgeIterationCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"edge"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),") => ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#optional"},(0,r.yg)("inlineCode",{parentName:"a"},"Optional")),"<{ ",(0,r.yg)("inlineCode",{parentName:"h3"},"stop"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean")," }",">"," ","|"," ",(0,r.yg)("inlineCode",{parentName:"h3"},"void")),(0,r.yg)("p",null,"Executes a provided callback once for JavaScript references.\nFor concrete examples, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode#foreachreference"},"forEachReference"),"\nor ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode#foreachreferrer"},"forEachReferrer"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"edge"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapEdge"))))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#optional"},(0,r.yg)("inlineCode",{parentName:"a"},"Optional")),"<{ ",(0,r.yg)("inlineCode",{parentName:"p"},"stop"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"boolean")," }",">"," ","|"," ",(0,r.yg)("inlineCode",{parentName:"p"},"void")," | this API returns void")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1779"},"core/src/lib/Types.ts:1779"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-initleakfiltercallback-snapshot-iheapsnapshot-leakednodeids-heapnodeidset--void"},(0,r.yg)("a",{id:"initleakfiltercallback",name:"initleakfiltercallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"InitLeakFilterCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"snapshot"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"HeapNodeIdSet"),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"void")),(0,r.yg)("p",null,"Lifecycle function callback that is invoked initially once before calling any\nleak filter function.\nFor concrete example, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.ILeakFilter#beforeleakfilter"},"beforeLeakFilter"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))," | heap snapshot see ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"HeapNodeIdSet")," | the set of leaked object (node) ids."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"void"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L554"},"core/src/lib/Types.ts:554"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-interactionscallback-page-page-args-operationargs--promisevoid"},(0,r.yg)("a",{id:"interactionscallback",name:"interactionscallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"InteractionsCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"page"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"args?"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"OperationArgs"),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"void"),">"),(0,r.yg)("p",null,"The callback defines browser interactions which are\nused by memlab to interact with the web app under test.\nFor concrete examples, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#action"},"action")," or ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#back"},"back"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page"))," | the puppeteer ",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page"))," object, which provides APIs to interact with the web browser. To import this type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"args?"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"OperationArgs")))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"p"},"void"),">"," | no return value")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L640"},"core/src/lib/Types.ts:640"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-leakfiltercallback-node-iheapnode-snapshot-iheapsnapshot-leakednodeids-heapnodeidset--boolean"},(0,r.yg)("a",{id:"leakfiltercallback",name:"leakfiltercallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"LeakFilterCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"node"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"snapshot"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"HeapNodeIdSet"),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,r.yg)("p",null,"Callback that can be used to define a logic to filter the\nleaked objects. The callback is only called for every node\nallocated but not released from the target interaction\nin the heap snapshot."),(0,r.yg)("p",null,"For concrete examples, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.ILeakFilter#leakfilter"},"leakFilter"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"node"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode"))," | the node that is kept alive in the memory in the heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))," | the snapshot of target interaction"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"HeapNodeIdSet")," | the set of leaked node ids"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"boolean")," | the value indicating whether the given node in the snapshot\nshould be considered as leaked."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"// any node in the heap snapshot that is greater than 1MB\nfunction leakFilter(node, _snapshot, _leakedNodeIds) {\n return node.retainedSize > 1000000;\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L581"},"core/src/lib/Types.ts:581"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-nullablet-t--null"},(0,r.yg)("a",{id:"nullable",name:"nullable"})," ",(0,r.yg)("strong",{parentName:"h3"},"Nullable"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),">",": ",(0,r.yg)("inlineCode",{parentName:"h3"},"T")," ","|"," ",(0,r.yg)("inlineCode",{parentName:"h3"},"null")),(0,r.yg)("p",null,"Given any type ",(0,r.yg)("inlineCode",{parentName:"p"},"T"),", return the union type ",(0,r.yg)("inlineCode",{parentName:"p"},"T")," and ",(0,r.yg)("inlineCode",{parentName:"p"},"null")),(0,r.yg)("h4",{id:"type-parameters"},"Type parameters"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"T")),(0,r.yg)("td",{parentName:"tr",align:"left"},"The type that will be made nullable.")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L32"},"core/src/lib/Types.ts:32"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optionalt-t--null--undefined"},(0,r.yg)("a",{id:"optional",name:"optional"})," ",(0,r.yg)("strong",{parentName:"h3"},"Optional"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),">",": ",(0,r.yg)("inlineCode",{parentName:"h3"},"T")," ","|"," ",(0,r.yg)("inlineCode",{parentName:"h3"},"null")," ","|"," ",(0,r.yg)("inlineCode",{parentName:"h3"},"undefined")),(0,r.yg)("p",null,"Given any type ",(0,r.yg)("inlineCode",{parentName:"p"},"T"),", return the union type ",(0,r.yg)("inlineCode",{parentName:"p"},"T"),", ",(0,r.yg)("inlineCode",{parentName:"p"},"null"),", and ",(0,r.yg)("inlineCode",{parentName:"p"},"undefined"),"."),(0,r.yg)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"T")),(0,r.yg)("td",{parentName:"tr",align:"left"},"The type that will be made both nullable and undefinable.")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L38"},"core/src/lib/Types.ts:38"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-page-puppeteerpage"},(0,r.yg)("a",{id:"page",name:"page"})," ",(0,r.yg)("strong",{parentName:"h3"},"Page"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"PuppeteerPage")),(0,r.yg)("p",null,"This is the puppeteer ",(0,r.yg)("a",{parentName:"p",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nclass used by MemLab. The puppeteer ",(0,r.yg)("inlineCode",{parentName:"p"},"Page")," class instance provides\nAPIs to interact with the web browser."),(0,r.yg)("p",null,"The puppeteer ",(0,r.yg)("inlineCode",{parentName:"p"},"Page")," type can be incompatible across different versions.\nYour local npm-installed puppeteer version may be different from\nthe puppeteer used by MemLab. This may cause some type errors, for example:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {Page} from 'puppeteer';\nimport type {RunOptions} from '@memlab/api';\n\nconst runOptions: RunOptions = {\n scenario: {\n // initial page load url: Google Maps\n url: () => {\n return \"https://www.google.com/maps/@37.386427,-122.0428214,11z\";\n },\n // type error here if your local puppeeter version is different\n // from the puppeteer used by MemLab\n action: async function (page: Page) {\n await page.click('button[aria-label=\"Hotels\"]');\n },\n },\n};\n")),(0,r.yg)("p",null,"To avoid the type error in the code example above, MemLab exports the\npuppeteer ",(0,r.yg)("inlineCode",{parentName:"p"},"Page")," type used by MemLab so that your code can import it\nwhen necessary:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {Page} from '@memlab/core' // import Page type from memlab\nimport type {RunOptions} from 'memlab';\n\nconst runOptions: RunOptions = {\n scenario: {\n // initial page load url: Google Maps\n url: () => {\n return \"https://www.google.com/maps/@37.386427,-122.0428214,11z\";\n },\n // no type error here\n action: async function (page: Page) {\n await page.click('button[aria-label=\"Hotels\"]');\n },\n },\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L207"},"core/src/lib/Types.ts:207"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-predicatort-entity-t--boolean"},(0,r.yg)("a",{id:"predicator",name:"predicator"})," ",(0,r.yg)("strong",{parentName:"h3"},"Predicator"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),">",": (",(0,r.yg)("inlineCode",{parentName:"h3"},"entity"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,r.yg)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"T")),(0,r.yg)("td",{parentName:"tr",align:"left"},"the type of the entity to be checked")))),(0,r.yg)("p",null,"the predicate callback is used to decide if a\nentity of type ",(0,r.yg)("inlineCode",{parentName:"p"},"T"),".\nFor more concrete examples on where it is used,\ncheck out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode#findanyreference"},"findAnyReference"),", ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode#findanyreferrer"},"findAnyReferrer"),",\nand ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode#findreferrers"},"findReferrers"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"entity"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"T")," | the entity to be checked"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"boolean")," | whether the entity passes the predicate check")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L220"},"core/src/lib/Types.ts:220"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-referencefiltercallback-edge-iheapedge-snapshot-iheapsnapshot-isreferenceusedbydefault-boolean--boolean"},(0,r.yg)("a",{id:"referencefiltercallback",name:"referencefiltercallback"})," ",(0,r.yg)("strong",{parentName:"h3"},"ReferenceFilterCallback"),": (",(0,r.yg)("inlineCode",{parentName:"h3"},"edge"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"snapshot"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot")),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"isReferenceUsedByDefault"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean"),") => ",(0,r.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,r.yg)("p",null,"Callback that can be used to define a logic to decide whether\na reference should be filtered (included) for some\ncalculations (e.g., retainer trace calculation)"),(0,r.yg)("p",null,"For concrete examples, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.ILeakFilter#leakfilter"},"leakFilter"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"edge"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapEdge"))," | the reference (edge) that is considered for calcualting the retainer trace"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))," | the final snapshot taken after all browser interactions are done."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"isReferenceUsedByDefault"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"boolean")," | MemLab has its own default logic for whether a reference should be filtered (included), if this parameter is true, it means MemLab will consider this reference for inclusion"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"boolean")," | the value indicating whether the given reference should be\nfiltered (i.e., included)")),(0,r.yg)("p",null,"Please also be aware that some edges like self-referencing edges,\nJS engine's internal edges, and hidden edges should not be considered\nas part of the retainer trace. These edges could make the retainer trace\nunncessarily complex and cause confusion. ",(0,r.yg)("inlineCode",{parentName:"p"},"isReferenceUsedByDefault")," will\nbe ",(0,r.yg)("inlineCode",{parentName:"p"},"false")," for these types of edges."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"// exclude react fiber references\nfunction retainerReferenceFilter(edge, _snapshot, _isReferenceUsedByDefault) {\n if (edge.name_or_index.toString().startsWith('__reactFiber$')) {\n return false;\n }\n // exclude other references here\n // ...\n return true;\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L624"},"core/src/lib/Types.ts:624"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-runmetainfo-object"},(0,r.yg)("a",{id:"runmetainfo",name:"runmetainfo"})," ",(0,r.yg)("strong",{parentName:"h3"},"RunMetaInfo"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"Object")),(0,r.yg)("p",null,"This data structure holds the information about memlab run.\nYou can retrieve the instance of this type through ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader#getrunmetainfo"},"getRunMetaInfo"),"."),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"browserInfo")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/interfaces/core_src.IBrowserInfo"},(0,r.yg)("inlineCode",{parentName:"a"},"IBrowserInfo"))),(0,r.yg)("td",{parentName:"tr",align:"left"},"input configuration for the browser and output data from the browser")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"type")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"type of the memlab run")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1247"},"core/src/lib/Types.ts:1247"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-undefinablet-t--undefined"},(0,r.yg)("a",{id:"undefinable",name:"undefinable"})," ",(0,r.yg)("strong",{parentName:"h3"},"Undefinable"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),">",": ",(0,r.yg)("inlineCode",{parentName:"h3"},"T")," ","|"," ",(0,r.yg)("inlineCode",{parentName:"h3"},"undefined")),(0,r.yg)("p",null,"Given any type ",(0,r.yg)("inlineCode",{parentName:"p"},"T"),", return the union type ",(0,r.yg)("inlineCode",{parentName:"p"},"T")," and ",(0,r.yg)("inlineCode",{parentName:"p"},"undefined"),"."),(0,r.yg)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"T")),(0,r.yg)("td",{parentName:"tr",align:"left"},"The type that will be made undefinable.")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L44"},"core/src/lib/Types.ts:44"))))),(0,r.yg)("h2",{id:"functions"},"Functions"),(0,r.yg)("h3",{id:"dumpnodeheapsnapshot"},(0,r.yg)("a",{id:"dumpnodeheapsnapshot"}),(0,r.yg)("strong",{parentName:"h3"},"dumpNodeHeapSnapshot"),"()"),(0,r.yg)("p",null,"Take a heap snapshot of the current program state and save it as a\n",(0,r.yg)("inlineCode",{parentName:"p"},".heapsnapshot")," file under a randomly generated folder inside the system's\ntemp folder."),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"Note"),": All ",(0,r.yg)("inlineCode",{parentName:"p"},".heapsnapshot")," files could also be loaded by Chrome DevTools."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"string")," | the absolute file path to the saved ",(0,r.yg)("inlineCode",{parentName:"p"},".heapsnapshot")," file.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/NodeHeap.ts#L84"},"core/src/lib/NodeHeap.ts:84"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"tagobjectto-tag"},(0,r.yg)("a",{id:"tagobject"}),(0,r.yg)("strong",{parentName:"h3"},"tagObject"),"<",(0,r.yg)("inlineCode",{parentName:"h3"},"T"),">","(",(0,r.yg)("inlineCode",{parentName:"h3"},"o"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"tag"),")"),(0,r.yg)("p",null,"Tags a string marker to an object instance, which can later be checked by\n",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot#hasobjectwithtag"},"hasObjectWithTag"),". This API does not modify the object instance in\nany way (e.g., no additional or hidden properties added to the tagged\nobject)."),(0,r.yg)("h4",{id:"type-parameters-4"},"Type parameters"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"T")),(0,r.yg)("td",{parentName:"tr",align:"left"},"extends ",(0,r.yg)("inlineCode",{parentName:"td"},"object"))))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"o"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"T")," | specify the object instance you want to tag, you cannot tag a ",(0,r.yg)("a",{parentName:"li",href:"https://developer.mozilla.org/en-US/docs/Glossary/Primitive"},"primitive"),"."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"tag"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | marker name to tag on the object instance"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"T")," | returns the tagged object instance (same reference as\nthe input argument ",(0,r.yg)("inlineCode",{parentName:"li"},"o"),")"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, AnyValue} from '@memlab/core';\nimport {config, takeNodeMinimalHeap, tagObject} from '@memlab/core';\n\ntest('memory test', async () => {\n config.muteConsole = true;\n const o1: AnyValue = {};\n let o2: AnyValue = {};\n\n // tag o1 with marker: \"memlab-mark-1\", does not modify o1 in any way\n tagObject(o1, 'memlab-mark-1');\n // tag o2 with marker: \"memlab-mark-2\", does not modify o2 in any way\n tagObject(o2, 'memlab-mark-2');\n\n o2 = null;\n\n const heap: IHeapSnapshot = await takeNodeMinimalHeap();\n\n // expect object with marker \"memlab-mark-1\" exists\n expect(heap.hasObjectWithTag('memlab-mark-1')).toBe(true);\n\n // expect object with marker \"memlab-mark-2\" can be GCed\n expect(heap.hasObjectWithTag('memlab-mark-2')).toBe(false);\n\n}, 30000);\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/NodeHeap.ts#L59"},"core/src/lib/NodeHeap.ts:59"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"takenodeminimalheap"},(0,r.yg)("a",{id:"takenodeminimalheap"}),(0,r.yg)("strong",{parentName:"h3"},"takeNodeMinimalHeap"),"()"),(0,r.yg)("p",null,"Take a heap snapshot of the current program state\nand parse it as ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"),". Notice that\nthis API does not calculate some heap analysis meta data\nfor heap analysis. But this also means faster heap parsing."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot")),">"," | heap representation without heap analysis meta data.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples:")))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {takeNodeMinimalHeap} from '@memlab/core';\n\n(async function () {\n const heap: IHeapSnapshot = await takeNodeMinimalHeap();\n})();\n")),(0,r.yg)("p",null,"If you need to get the heap snapshot with heap analysis meta data, please\nuse ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/heap_analysis_src#getfullheapfromfile"},"getFullHeapFromFile"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/NodeHeap.ts#L152"},"core/src/lib/NodeHeap.ts:152"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/27652c34.24ea7dfe.js b/assets/js/27652c34.9593c084.js similarity index 95% rename from assets/js/27652c34.24ea7dfe.js rename to assets/js/27652c34.9593c084.js index 93fe6a35..b93f366e 100644 --- a/assets/js/27652c34.24ea7dfe.js +++ b/assets/js/27652c34.9593c084.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8417],{5680:(e,a,n)=>{n.d(a,{xA:()=>s,yg:()=>y});var r=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function i(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var g=r.createContext({}),p=function(e){var a=r.useContext(g),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},s=function(e){var a=p(e.components);return r.createElement(g.Provider,{value:a},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},d=r.forwardRef((function(e,a){var n=e.components,t=e.mdxType,i=e.originalType,g=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=p(n),d=t,y=m["".concat(g,".").concat(d)]||m[d]||c[d]||i;return n?r.createElement(y,l(l({ref:a},s),{},{components:n})):r.createElement(y,l({ref:a},s))}));function y(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var g in a)hasOwnProperty.call(a,g)&&(o[g]=a[g]);o.originalType=e,o[m]="string"==typeof e?e:t,l[1]=o;for(var p=2;p{n.r(a),n.d(a,{assets:()=>g,contentTitle:()=>l,default:()=>c,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var r=n(8168),t=(n(6540),n(5680));const i={id:"core_src.IHeapStringNode",title:"Interface: IHeapStringNode",sidebar_label:"IHeapStringNode",custom_edit_url:null},l=void 0,o={unversionedId:"api/interfaces/core_src.IHeapStringNode",id:"api/interfaces/core_src.IHeapStringNode",title:"Interface: IHeapStringNode",description:"An IHeapStringNode instance represents a JS string in a heap snapshot.",source:"@site/docs/api/interfaces/core_src.IHeapStringNode.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapStringNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapStringNode",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapStringNode",title:"Interface: IHeapStringNode",sidebar_label:"IHeapStringNode",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapSnapshot",permalink:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},next:{title:"ILeakFilter",permalink:"/memlab/docs/api/interfaces/core_src.ILeakFilter"}},g={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:' dominatorNode: Nullable<IHeapNode>',id:"-dominatornode-nullableiheapnode",level:3},{value:' edge_count: number',id:"-edge_count-number",level:3},{value:' hasPathEdge: boolean',id:"-haspathedge-boolean",level:3},{value:' id: number',id:"-id-number",level:3},{value:' isString: boolean',id:"-isstring-boolean",level:3},{value:' is_detached: boolean',id:"-is_detached-boolean",level:3},{value:' location: Nullable<IHeapLocation>',id:"-location-nullableiheaplocation",level:3},{value:' name: string',id:"-name-string",level:3},{value:' nodeIndex: number',id:"-nodeindex-number",level:3},{value:' numOfReferrers: number',id:"-numofreferrers-number",level:3},{value:' pathEdge: null | IHeapEdge',id:"-pathedge-null--iheapedge",level:3},{value:' references: IHeapEdge[]',id:"-references-iheapedge",level:3},{value:' referrers: IHeapEdge[]',id:"-referrers-iheapedge",level:3},{value:' retainedSize: number',id:"-retainedsize-number",level:3},{value:' self_size: number',id:"-self_size-number",level:3},{value:' snapshot: IHeapSnapshot',id:"-snapshot-iheapsnapshot",level:3},{value:' stringValue: string',id:"-stringvalue-string",level:3},{value:' type: string',id:"-type-string",level:3},{value:"Methods",id:"methods",level:2},{value:'findAnyReference(predicate)',id:"findanyreferencepredicate",level:3},{value:'findAnyReferrer(predicate)',id:"findanyreferrerpredicate",level:3},{value:'findAnyReferrerNode(predicate)',id:"findanyreferrernodepredicate",level:3},{value:'findReferrerNodes(predicate)',id:"findreferrernodespredicate",level:3},{value:'findReferrers(predicate)',id:"findreferrerspredicate",level:3},{value:'forEachReference(callback)',id:"foreachreferencecallback",level:3},{value:'forEachReferrer(callback)',id:"foreachreferrercallback",level:3},{value:'getAnyReferrer(edgeName, edgeType?)',id:"getanyreferreredgename-edgetype",level:3},{value:'getAnyReferrerNode(edgeName, edgeType?)',id:"getanyreferrernodeedgename-edgetype",level:3},{value:'getReference(edgeName, edgeType?)',id:"getreferenceedgename-edgetype",level:3},{value:'getReferenceNode(edgeName, edgeType?)',id:"getreferencenodeedgename-edgetype",level:3},{value:'getReferrerNodes(edgeName, edgeType?)',id:"getreferrernodesedgename-edgetype",level:3},{value:'getReferrers(edgeName, edgeType?)',id:"getreferrersedgename-edgetype",level:3},{value:'toJSONString(...args)',id:"tojsonstringargs",level:3},{value:'toStringNode()',id:"tostringnode",level:3}],s={toc:p},m="wrapper";function c(e){let{components:a,...n}=e;return(0,t.yg)(m,(0,r.A)({},s,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"An ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapStringNode")," instance represents a JS string in a heap snapshot.\nA heap snapshot is generally a graph where graph nodes are JS heap objects\nand graph edges are JS references among JS heap objects."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"readonly"))," it is not recommended to modify any ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapStringNode")," instance"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),": V8 or hermes heap snapshot can be parsed by the\n",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#getfullheapfromfile"},"getFullHeapFromFile")," API.")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapNode, IHeapStringNode} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // iterate over each node (heap object)\n heap.nodes.forEach((node: IHeapNode, i: number) => {\n if (node.isString) {\n const stringNode: IheapStringNode = node.toStringNode();\n // get the string value\n stringNode.stringValue;\n }\n });\n})();\n")),(0,t.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode"))),(0,t.yg)("p",{parentName:"li"},"\u21b3 ",(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"IHeapStringNode"))))),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-dominatornode-nullableiheapnode"},(0,t.yg)("a",{id:"dominatornode",name:"dominatornode"})," ",(0,t.yg)("strong",{parentName:"h3"},"dominatorNode"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"),(0,t.yg)("p",null,"get the dominator node of this node. If the dominator node gets released\nthere will be no path from GC to this node, and therefore this node can\nalso be released.\nFor more information on what a dominator node is, please check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#dominators"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1888"},"core/src/lib/Types.ts:1888"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-edge_count-number"},(0,t.yg)("a",{id:"edge\\_count",name:"edge\\_count"})," ",(0,t.yg)("strong",{parentName:"h3"},"edge","_","count"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The total number of outgoing JS references (including engine-internal,\nnative, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1842"},"core/src/lib/Types.ts:1842"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-haspathedge-boolean"},(0,t.yg)("a",{id:"haspathedge",name:"haspathedge"})," ",(0,t.yg)("strong",{parentName:"h3"},"hasPathEdge"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("p",null,"returns true if the heap node has been set an incoming edge\nwhich leads to the parent node on the shortest path to GC root."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1864"},"core/src/lib/Types.ts:1864"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-id-number"},(0,t.yg)("a",{id:"id",name:"id"})," ",(0,t.yg)("strong",{parentName:"h3"},"id"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"unique id of the heap object"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1769"},"core/src/lib/Types.ts:1769"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-isstring-boolean"},(0,t.yg)("a",{id:"isstring",name:"isstring"})," ",(0,t.yg)("strong",{parentName:"h3"},"isString"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("p",null,"check if this a string node (normal string node, concatenated string node\nor sliced string node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1900"},"core/src/lib/Types.ts:1900"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-is_detached-boolean"},(0,t.yg)("a",{id:"is\\_detached",name:"is\\_detached"})," ",(0,t.yg)("strong",{parentName:"h3"},"is","_","detached"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},"If the heap object is a DOM element and the DOM element is detached\nfrom the DOM tree, ",(0,t.yg)("inlineCode",{parentName:"p"},"is_detached")," will be ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),";")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},"If the heap object is a React Fiber node and the Fiber node is unmounted\nfrom the React Fiber tree, ",(0,t.yg)("inlineCode",{parentName:"p"},"is_detached")," will be ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),";\notherwise it will be ",(0,t.yg)("inlineCode",{parentName:"p"},"false"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1824"},"core/src/lib/Types.ts:1824"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-location-nullableiheaplocation"},(0,t.yg)("a",{id:"location",name:"location"})," ",(0,t.yg)("strong",{parentName:"h3"},"location"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapLocation"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapLocation")),">"),(0,t.yg)("p",null,"source location information of this heap object (if it is recorded by\nthe heap snapshot)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1893"},"core/src/lib/Types.ts:1893"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-name-string"},(0,t.yg)("a",{id:"name",name:"name"})," ",(0,t.yg)("strong",{parentName:"h3"},"name"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"this is the ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," field associated with the heap object,\nfor JS object instances (type ",(0,t.yg)("inlineCode",{parentName:"p"},"object"),"), ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," is the constructor's name\nof the object instance. for ",(0,t.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," is the string value."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1765"},"core/src/lib/Types.ts:1765"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-nodeindex-number"},(0,t.yg)("a",{id:"nodeindex",name:"nodeindex"})," ",(0,t.yg)("strong",{parentName:"h3"},"nodeIndex"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"index of this heap object inside the ",(0,t.yg)("inlineCode",{parentName:"p"},"node.snapshot.nodes")," pseudo array"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1873"},"core/src/lib/Types.ts:1873"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-numofreferrers-number"},(0,t.yg)("a",{id:"numofreferrers",name:"numofreferrers"})," ",(0,t.yg)("strong",{parentName:"h3"},"numOfReferrers"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"Get the number of all incoming references pointing to this heap object\n(including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1859"},"core/src/lib/Types.ts:1859"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-pathedge-null--iheapedge"},(0,t.yg)("a",{id:"pathedge",name:"pathedge"})," ",(0,t.yg)("strong",{parentName:"h3"},"pathEdge"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"null")," ","|"," ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge"))),(0,t.yg)("p",null,"The incoming edge which leads to the parent node\non the shortest path to GC root."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1869"},"core/src/lib/Types.ts:1869"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-references-iheapedge"},(0,t.yg)("a",{id:"references",name:"references"})," ",(0,t.yg)("strong",{parentName:"h3"},"references"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[]"),(0,t.yg)("p",null,"Get a JS array containing all outgoing JS references from this heap object\n(including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1849"},"core/src/lib/Types.ts:1849"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-referrers-iheapedge"},(0,t.yg)("a",{id:"referrers",name:"referrers"})," ",(0,t.yg)("strong",{parentName:"h3"},"referrers"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[]"),(0,t.yg)("p",null,"Get a JS array containing all incoming JS references pointing to this heap\nobject (including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1854"},"core/src/lib/Types.ts:1854"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-retainedsize-number"},(0,t.yg)("a",{id:"retainedsize",name:"retainedsize"})," ",(0,t.yg)("strong",{parentName:"h3"},"retainedSize"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The ",(0,t.yg)("em",{parentName:"p"},"retained size")," of the heap object (i.e., the total size of memory that\ncould be released if this object is released). For difference between\n",(0,t.yg)("strong",{parentName:"p"},"retained size")," and ",(0,t.yg)("strong",{parentName:"p"},"shallow size"),", check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#object_sizes"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1880"},"core/src/lib/Types.ts:1880"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-self_size-number"},(0,t.yg)("a",{id:"self\\_size",name:"self\\_size"})," ",(0,t.yg)("strong",{parentName:"h3"},"self","_","size"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The ",(0,t.yg)("em",{parentName:"p"},"shallow size")," of the heap object (i.e., the size of memory that is held\nby the object itself.). For difference between ",(0,t.yg)("strong",{parentName:"p"},"shallow size")," and\n",(0,t.yg)("strong",{parentName:"p"},"retained size"),", check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#object_sizes"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1837"},"core/src/lib/Types.ts:1837"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-snapshot-iheapsnapshot"},(0,t.yg)("a",{id:"snapshot",name:"snapshot"})," ",(0,t.yg)("strong",{parentName:"h3"},"snapshot"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))),(0,t.yg)("p",null,"get the ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," containing this heap object"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1816"},"core/src/lib/Types.ts:1816"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-stringvalue-string"},(0,t.yg)("a",{id:"stringvalue",name:"stringvalue"})," ",(0,t.yg)("strong",{parentName:"h3"},"stringValue"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"get the string value of the JS string heap object associated with\nthis ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapStringNode")," instance in heap"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2201"},"core/src/lib/Types.ts:2201"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-type-string"},(0,t.yg)("a",{id:"type",name:"type"})," ",(0,t.yg)("strong",{parentName:"h3"},"type"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"the type of the heap node object. All possible types:\nThis is engine-specific, for example all types in V8:\n",(0,t.yg)("inlineCode",{parentName:"p"},"hidden"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"array"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"object"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"code"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"closure"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"regexp"),",\n",(0,t.yg)("inlineCode",{parentName:"p"},"number"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"native"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"synthetic"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"concatenated string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"sliced string"),",\n",(0,t.yg)("inlineCode",{parentName:"p"},"symbol"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"bigint")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1759"},"core/src/lib/Types.ts:1759"))))),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"findanyreferencepredicate"},(0,t.yg)("a",{id:"findanyreference"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\nin the hosting node (or outgoing edges from the node) until the predicate\nreturns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the first outgoing edge for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such edge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const reference = node.findAnyReference((edge: IHeapEdge) => {\n // find the outgoing reference with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1972"},"core/src/lib/Types.ts:1972"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findanyreferrerpredicate"},(0,t.yg)("a",{id:"findanyreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\npointing to the hosting node (or incoming edges to the node) until the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the first incoming edge for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such edge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrer = node.findAnyReferrer((edge: IHeapEdge) => {\n // find the incoming reference with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1989"},"core/src/lib/Types.ts:1989"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findanyreferrernodepredicate"},(0,t.yg)("a",{id:"findanyreferrernode"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReferrerNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript heap\nobject (heap graph node) pointing to the hosting node\n(or nodes having edges to the hosting node) until the predicate\nreturns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the callback for each incoming JavaScript heap object"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the first referring node for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such node is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrer = node.findAnyReferrerNode((node: IHeapNode) => {\n // find the referring node with name \"Parent\"\n return node.name === 'Parent';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2007"},"core/src/lib/Types.ts:2007"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findreferrernodespredicate"},(0,t.yg)("a",{id:"findreferrernodes"}),(0,t.yg)("strong",{parentName:"h3"},"findReferrerNodes"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript heap\nobject (heap graph node) pointing to the hosting node\n(or nodes having edges to the hosting node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the callback for each referrer nodes"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),"[] | an array containing all the referrer nodes for which the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),", otherwise returns an empty array if no such\nnode is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrerNodes = node.findReferrerNodes((node: IHeapNode) => {\n // find all the referring nodes with name \"Parent\"\n return node.name === 'Parent';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2042"},"core/src/lib/Types.ts:2042"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findreferrerspredicate"},(0,t.yg)("a",{id:"findreferrers"}),(0,t.yg)("strong",{parentName:"h3"},"findReferrers"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\npointing to the hosting node (or incoming edges to the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[] | an array containing all the incoming edges for which the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),", otherwise returns an empty array if no such\nedge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrers = node.findReferrers((edge: IHeapEdge) => {\n // find all the incoming references with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2024"},"core/src/lib/Types.ts:2024"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"foreachreferencecallback"},(0,t.yg)("a",{id:"foreachreference"}),(0,t.yg)("strong",{parentName:"h3"},"forEachReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"executes a provided callback once for each JavaScript reference in the\nhosting node (or outgoing edges from the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#edgeiterationcallback"},(0,t.yg)("inlineCode",{parentName:"a"},"EdgeIterationCallback"))," | the callback for each outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"void")," | this API returns void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"node.forEachReference((edge: IHeapEdge) => {\n // process edge ...\n\n // if no need to iterate over remaining edges after\n // the current edge in the node.references list\n return {stop: true};\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1937"},"core/src/lib/Types.ts:1937"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"foreachreferrercallback"},(0,t.yg)("a",{id:"foreachreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"forEachReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"executes a provided callback once for each JavaScript reference pointing\nto the hosting node (or incoming edges to the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#edgeiterationcallback"},(0,t.yg)("inlineCode",{parentName:"a"},"EdgeIterationCallback"))," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"void")," | this API returns void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"node.forEachReferrer((edge: IHeapEdge) => {\n // process edge ...\n\n // if no need to iterate over remaining edges after\n // the current edge in the node.referrers list\n return {stop: true};\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1955"},"core/src/lib/Types.ts:1955"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getanyreferreredgename-edgetype"},(0,t.yg)("a",{id:"getanyreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"getAnyReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds an incoming JS\nreference pointing to the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the incoming edge that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find one of the JS reference named \"ref\" pointing to node\nconst reference = node.getAnyReferrer('ref', 'property');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2097"},"core/src/lib/Types.ts:2097"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getanyreferrernodeedgename-edgetype"},(0,t.yg)("a",{id:"getanyreferrernode"}),(0,t.yg)("strong",{parentName:"h3"},"getAnyReferrerNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds one of the incoming JS\nreferences pointing to the hosting node, and returns the JS heap object\ncontaining the incoming reference."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the node containing the incoming JS reference that meets\nthe specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find one of the JS heap object with a JS reference\n// named \"ref\" pointing to node\nconst n1 = node.getAnyReferrerNode('ref', 'property');\n// this is equivalent to\nconst n2 = node.getAnyReferrer('ref', 'property')?.fromNode;\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2120"},"core/src/lib/Types.ts:2120"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferenceedgename-edgetype"},(0,t.yg)("a",{id:"getreference"}),(0,t.yg)("strong",{parentName:"h3"},"getReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds an outgoing JS\nreference from the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the outgoing JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the outgoing edge that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find the internal reference to node's hidden class\nconst reference = node.getReference('map', 'hidden');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2057"},"core/src/lib/Types.ts:2057"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferencenodeedgename-edgetype"},(0,t.yg)("a",{id:"getreferencenode"}),(0,t.yg)("strong",{parentName:"h3"},"getReferenceNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds the outgoing JS\nreference from the hosting node, and returns the JS heap object pointed to\nby the outgoing JS reference."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the outgoing JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the node pointed to by the outgoing reference that meets\nthe specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find the node's hidden class\nconst hiddenClassNode = node.getReferenceNode('map', 'hidden');\n// this is equivalent to\nconst hiddenClassNode2 = node.getReference('map', 'hidden')?.toNode;\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2079"},"core/src/lib/Types.ts:2079"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferrernodesedgename-edgetype"},(0,t.yg)("a",{id:"getreferrernodes"}),(0,t.yg)("strong",{parentName:"h3"},"getReferrerNodes"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds all of the incoming JS\nreferences pointing to the hosting node, and returns an array containing\nthe hosting node for each of the incoming JS references."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),"[] | an array containing the hosting nodes, with each node corresponds\nto each incoming JS reference that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find all of the JS heap object with a JS reference\n// named \"ref\" pointing to node\nconst nodes1 = node.getReferrerNodes('ref', 'property');\n// this is equivalent to\nconst nodes2 = node.getReferrers('ref', 'property')\n .map(edge => edge.fromNode);\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2160"},"core/src/lib/Types.ts:2160"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferrersedgename-edgetype"},(0,t.yg)("a",{id:"getreferrers"}),(0,t.yg)("strong",{parentName:"h3"},"getReferrers"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds all the incoming JS\nreference pointing to the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[] | an array containing all the incoming edges that\nmeet the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find all of of the JS reference named \"ref\" pointing to node\nconst referrers = node.getReferrers('ref', 'property');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2139"},"core/src/lib/Types.ts:2139"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"tojsonstringargs"},(0,t.yg)("a",{id:"tojsonstring"}),(0,t.yg)("strong",{parentName:"h3"},"toJSONString"),"(...",(0,t.yg)("inlineCode",{parentName:"h3"},"args"),")"),(0,t.yg)("p",null,"convert to a concise readable string output\n(like calling ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)"),")."),(0,t.yg)("p",null,"Note: Please be aware that using ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)")," is\nnot recommended as it will generate a JSON representation of the host\nobject that is too large to be easily readable due to its connections\nto other parts of the data structures within the heap snapshot."),(0,t.yg)("p",null,"This API does not completely serialize all the information\ncaptured by the hosting object."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"...args"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"any"),"[]"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1919"},"core/src/lib/Types.ts:1919"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"tostringnode"},(0,t.yg)("a",{id:"tostringnode"}),(0,t.yg)("strong",{parentName:"h3"},"toStringNode"),"()"),(0,t.yg)("p",null,"convert to an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},"IHeapStringNode")," object if this node is a string node.\nThe ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},"IHeapStringNode")," object supports querying the string content\ninside the string node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapStringNode")),">"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1906"},"core/src/lib/Types.ts:1906"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8417],{5680:(e,a,n)=>{n.d(a,{xA:()=>s,yg:()=>y});var r=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function i(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var g=r.createContext({}),p=function(e){var a=r.useContext(g),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},s=function(e){var a=p(e.components);return r.createElement(g.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},d=r.forwardRef((function(e,a){var n=e.components,t=e.mdxType,i=e.originalType,g=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),c=p(n),d=t,y=c["".concat(g,".").concat(d)]||c[d]||m[d]||i;return n?r.createElement(y,l(l({ref:a},s),{},{components:n})):r.createElement(y,l({ref:a},s))}));function y(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var g in a)hasOwnProperty.call(a,g)&&(o[g]=a[g]);o.originalType=e,o[c]="string"==typeof e?e:t,l[1]=o;for(var p=2;p{n.r(a),n.d(a,{assets:()=>g,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var r=n(8168),t=(n(6540),n(5680));const i={id:"core_src.IHeapStringNode",title:"Interface: IHeapStringNode",sidebar_label:"IHeapStringNode",custom_edit_url:null},l=void 0,o={unversionedId:"api/interfaces/core_src.IHeapStringNode",id:"api/interfaces/core_src.IHeapStringNode",title:"Interface: IHeapStringNode",description:"An IHeapStringNode instance represents a JS string in a heap snapshot.",source:"@site/docs/api/interfaces/core_src.IHeapStringNode.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapStringNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapStringNode",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapStringNode",title:"Interface: IHeapStringNode",sidebar_label:"IHeapStringNode",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapSnapshot",permalink:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},next:{title:"ILeakFilter",permalink:"/memlab/docs/api/interfaces/core_src.ILeakFilter"}},g={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:' dominatorNode: Nullable<IHeapNode>',id:"-dominatornode-nullableiheapnode",level:3},{value:' edge_count: number',id:"-edge_count-number",level:3},{value:' hasPathEdge: boolean',id:"-haspathedge-boolean",level:3},{value:' id: number',id:"-id-number",level:3},{value:' isString: boolean',id:"-isstring-boolean",level:3},{value:' is_detached: boolean',id:"-is_detached-boolean",level:3},{value:' location: Nullable<IHeapLocation>',id:"-location-nullableiheaplocation",level:3},{value:' name: string',id:"-name-string",level:3},{value:' nodeIndex: number',id:"-nodeindex-number",level:3},{value:' numOfReferrers: number',id:"-numofreferrers-number",level:3},{value:' pathEdge: null | IHeapEdge',id:"-pathedge-null--iheapedge",level:3},{value:' references: IHeapEdge[]',id:"-references-iheapedge",level:3},{value:' referrers: IHeapEdge[]',id:"-referrers-iheapedge",level:3},{value:' retainedSize: number',id:"-retainedsize-number",level:3},{value:' self_size: number',id:"-self_size-number",level:3},{value:' snapshot: IHeapSnapshot',id:"-snapshot-iheapsnapshot",level:3},{value:' stringValue: string',id:"-stringvalue-string",level:3},{value:' type: string',id:"-type-string",level:3},{value:"Methods",id:"methods",level:2},{value:'findAnyReference(predicate)',id:"findanyreferencepredicate",level:3},{value:'findAnyReferrer(predicate)',id:"findanyreferrerpredicate",level:3},{value:'findAnyReferrerNode(predicate)',id:"findanyreferrernodepredicate",level:3},{value:'findReferrerNodes(predicate)',id:"findreferrernodespredicate",level:3},{value:'findReferrers(predicate)',id:"findreferrerspredicate",level:3},{value:'forEachReference(callback)',id:"foreachreferencecallback",level:3},{value:'forEachReferrer(callback)',id:"foreachreferrercallback",level:3},{value:'getAnyReferrer(edgeName, edgeType?)',id:"getanyreferreredgename-edgetype",level:3},{value:'getAnyReferrerNode(edgeName, edgeType?)',id:"getanyreferrernodeedgename-edgetype",level:3},{value:'getReference(edgeName, edgeType?)',id:"getreferenceedgename-edgetype",level:3},{value:'getReferenceNode(edgeName, edgeType?)',id:"getreferencenodeedgename-edgetype",level:3},{value:'getReferrerNodes(edgeName, edgeType?)',id:"getreferrernodesedgename-edgetype",level:3},{value:'getReferrers(edgeName, edgeType?)',id:"getreferrersedgename-edgetype",level:3},{value:'toJSONString(...args)',id:"tojsonstringargs",level:3},{value:'toStringNode()',id:"tostringnode",level:3}],s={toc:p},c="wrapper";function m(e){let{components:a,...n}=e;return(0,t.yg)(c,(0,r.A)({},s,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"An ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapStringNode")," instance represents a JS string in a heap snapshot.\nA heap snapshot is generally a graph where graph nodes are JS heap objects\nand graph edges are JS references among JS heap objects."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"readonly"))," it is not recommended to modify any ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapStringNode")," instance"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),": V8 or hermes heap snapshot can be parsed by the\n",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#getfullheapfromfile"},"getFullHeapFromFile")," API.")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapNode, IHeapStringNode} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // iterate over each node (heap object)\n heap.nodes.forEach((node: IHeapNode, i: number) => {\n if (node.isString) {\n const stringNode: IheapStringNode = node.toStringNode();\n // get the string value\n stringNode.stringValue;\n }\n });\n})();\n")),(0,t.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode"))),(0,t.yg)("p",{parentName:"li"},"\u21b3 ",(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"IHeapStringNode"))))),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-dominatornode-nullableiheapnode"},(0,t.yg)("a",{id:"dominatornode",name:"dominatornode"})," ",(0,t.yg)("strong",{parentName:"h3"},"dominatorNode"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"),(0,t.yg)("p",null,"get the dominator node of this node. If the dominator node gets released\nthere will be no path from GC to this node, and therefore this node can\nalso be released.\nFor more information on what a dominator node is, please check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#dominators"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1888"},"core/src/lib/Types.ts:1888"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-edge_count-number"},(0,t.yg)("a",{id:"edge\\_count",name:"edge\\_count"})," ",(0,t.yg)("strong",{parentName:"h3"},"edge","_","count"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The total number of outgoing JS references (including engine-internal,\nnative, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1842"},"core/src/lib/Types.ts:1842"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-haspathedge-boolean"},(0,t.yg)("a",{id:"haspathedge",name:"haspathedge"})," ",(0,t.yg)("strong",{parentName:"h3"},"hasPathEdge"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("p",null,"returns true if the heap node has been set an incoming edge\nwhich leads to the parent node on the shortest path to GC root."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1864"},"core/src/lib/Types.ts:1864"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-id-number"},(0,t.yg)("a",{id:"id",name:"id"})," ",(0,t.yg)("strong",{parentName:"h3"},"id"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"unique id of the heap object"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1769"},"core/src/lib/Types.ts:1769"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-isstring-boolean"},(0,t.yg)("a",{id:"isstring",name:"isstring"})," ",(0,t.yg)("strong",{parentName:"h3"},"isString"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("p",null,"check if this a string node (normal string node, concatenated string node\nor sliced string node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1900"},"core/src/lib/Types.ts:1900"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-is_detached-boolean"},(0,t.yg)("a",{id:"is\\_detached",name:"is\\_detached"})," ",(0,t.yg)("strong",{parentName:"h3"},"is","_","detached"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},"If the heap object is a DOM element and the DOM element is detached\nfrom the DOM tree, ",(0,t.yg)("inlineCode",{parentName:"p"},"is_detached")," will be ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),";")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},"If the heap object is a React Fiber node and the Fiber node is unmounted\nfrom the React Fiber tree, ",(0,t.yg)("inlineCode",{parentName:"p"},"is_detached")," will be ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),";\notherwise it will be ",(0,t.yg)("inlineCode",{parentName:"p"},"false"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1824"},"core/src/lib/Types.ts:1824"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-location-nullableiheaplocation"},(0,t.yg)("a",{id:"location",name:"location"})," ",(0,t.yg)("strong",{parentName:"h3"},"location"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapLocation"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapLocation")),">"),(0,t.yg)("p",null,"source location information of this heap object (if it is recorded by\nthe heap snapshot)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1893"},"core/src/lib/Types.ts:1893"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-name-string"},(0,t.yg)("a",{id:"name",name:"name"})," ",(0,t.yg)("strong",{parentName:"h3"},"name"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"this is the ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," field associated with the heap object,\nfor JS object instances (type ",(0,t.yg)("inlineCode",{parentName:"p"},"object"),"), ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," is the constructor's name\nof the object instance. for ",(0,t.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"name")," is the string value."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1765"},"core/src/lib/Types.ts:1765"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-nodeindex-number"},(0,t.yg)("a",{id:"nodeindex",name:"nodeindex"})," ",(0,t.yg)("strong",{parentName:"h3"},"nodeIndex"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"index of this heap object inside the ",(0,t.yg)("inlineCode",{parentName:"p"},"node.snapshot.nodes")," pseudo array"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1873"},"core/src/lib/Types.ts:1873"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-numofreferrers-number"},(0,t.yg)("a",{id:"numofreferrers",name:"numofreferrers"})," ",(0,t.yg)("strong",{parentName:"h3"},"numOfReferrers"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"Get the number of all incoming references pointing to this heap object\n(including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1859"},"core/src/lib/Types.ts:1859"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-pathedge-null--iheapedge"},(0,t.yg)("a",{id:"pathedge",name:"pathedge"})," ",(0,t.yg)("strong",{parentName:"h3"},"pathEdge"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"null")," ","|"," ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge"))),(0,t.yg)("p",null,"The incoming edge which leads to the parent node\non the shortest path to GC root."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1869"},"core/src/lib/Types.ts:1869"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-references-iheapedge"},(0,t.yg)("a",{id:"references",name:"references"})," ",(0,t.yg)("strong",{parentName:"h3"},"references"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[]"),(0,t.yg)("p",null,"Get a JS array containing all outgoing JS references from this heap object\n(including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1849"},"core/src/lib/Types.ts:1849"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-referrers-iheapedge"},(0,t.yg)("a",{id:"referrers",name:"referrers"})," ",(0,t.yg)("strong",{parentName:"h3"},"referrers"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[]"),(0,t.yg)("p",null,"Get a JS array containing all incoming JS references pointing to this heap\nobject (including engine-internal, native, and JS references)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1854"},"core/src/lib/Types.ts:1854"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-retainedsize-number"},(0,t.yg)("a",{id:"retainedsize",name:"retainedsize"})," ",(0,t.yg)("strong",{parentName:"h3"},"retainedSize"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The ",(0,t.yg)("em",{parentName:"p"},"retained size")," of the heap object (i.e., the total size of memory that\ncould be released if this object is released). For difference between\n",(0,t.yg)("strong",{parentName:"p"},"retained size")," and ",(0,t.yg)("strong",{parentName:"p"},"shallow size"),", check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#object_sizes"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1880"},"core/src/lib/Types.ts:1880"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-self_size-number"},(0,t.yg)("a",{id:"self\\_size",name:"self\\_size"})," ",(0,t.yg)("strong",{parentName:"h3"},"self","_","size"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The ",(0,t.yg)("em",{parentName:"p"},"shallow size")," of the heap object (i.e., the size of memory that is held\nby the object itself.). For difference between ",(0,t.yg)("strong",{parentName:"p"},"shallow size")," and\n",(0,t.yg)("strong",{parentName:"p"},"retained size"),", check out\n",(0,t.yg)("a",{parentName:"p",href:"https://developer.chrome.com/docs/devtools/memory-problems/memory-101/#object_sizes"},"this doc"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1837"},"core/src/lib/Types.ts:1837"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-snapshot-iheapsnapshot"},(0,t.yg)("a",{id:"snapshot",name:"snapshot"})," ",(0,t.yg)("strong",{parentName:"h3"},"snapshot"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))),(0,t.yg)("p",null,"get the ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," containing this heap object"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1816"},"core/src/lib/Types.ts:1816"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-stringvalue-string"},(0,t.yg)("a",{id:"stringvalue",name:"stringvalue"})," ",(0,t.yg)("strong",{parentName:"h3"},"stringValue"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"get the string value of the JS string heap object associated with\nthis ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapStringNode")," instance in heap"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2201"},"core/src/lib/Types.ts:2201"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-type-string"},(0,t.yg)("a",{id:"type",name:"type"})," ",(0,t.yg)("strong",{parentName:"h3"},"type"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"the type of the heap node object. All possible types:\nThis is engine-specific, for example all types in V8:\n",(0,t.yg)("inlineCode",{parentName:"p"},"hidden"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"array"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"object"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"code"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"closure"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"regexp"),",\n",(0,t.yg)("inlineCode",{parentName:"p"},"number"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"native"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"synthetic"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"concatenated string"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"sliced string"),",\n",(0,t.yg)("inlineCode",{parentName:"p"},"symbol"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"bigint")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1759"},"core/src/lib/Types.ts:1759"))))),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"findanyreferencepredicate"},(0,t.yg)("a",{id:"findanyreference"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\nin the hosting node (or outgoing edges from the node) until the predicate\nreturns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the first outgoing edge for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such edge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const reference = node.findAnyReference((edge: IHeapEdge) => {\n // find the outgoing reference with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1972"},"core/src/lib/Types.ts:1972"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findanyreferrerpredicate"},(0,t.yg)("a",{id:"findanyreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\npointing to the hosting node (or incoming edges to the node) until the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the first incoming edge for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such edge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrer = node.findAnyReferrer((edge: IHeapEdge) => {\n // find the incoming reference with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1989"},"core/src/lib/Types.ts:1989"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findanyreferrernodepredicate"},(0,t.yg)("a",{id:"findanyreferrernode"}),(0,t.yg)("strong",{parentName:"h3"},"findAnyReferrerNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript heap\nobject (heap graph node) pointing to the hosting node\n(or nodes having edges to the hosting node) until the predicate\nreturns ",(0,t.yg)("inlineCode",{parentName:"p"},"true")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the callback for each incoming JavaScript heap object"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the first referring node for which the predicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),",\notherwise returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null")," if no such node is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrer = node.findAnyReferrerNode((node: IHeapNode) => {\n // find the referring node with name \"Parent\"\n return node.name === 'Parent';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2007"},"core/src/lib/Types.ts:2007"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findreferrernodespredicate"},(0,t.yg)("a",{id:"findreferrernodes"}),(0,t.yg)("strong",{parentName:"h3"},"findReferrerNodes"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript heap\nobject (heap graph node) pointing to the hosting node\n(or nodes having edges to the hosting node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the callback for each referrer nodes"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),"[] | an array containing all the referrer nodes for which the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),", otherwise returns an empty array if no such\nnode is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrerNodes = node.findReferrerNodes((node: IHeapNode) => {\n // find all the referring nodes with name \"Parent\"\n return node.name === 'Parent';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2042"},"core/src/lib/Types.ts:2042"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"findreferrerspredicate"},(0,t.yg)("a",{id:"findreferrers"}),(0,t.yg)("strong",{parentName:"h3"},"findReferrers"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"predicate"),")"),(0,t.yg)("p",null,"executes a provided predicate callback once for each JavaScript reference\npointing to the hosting node (or incoming edges to the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"predicate"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#predicator"},(0,t.yg)("inlineCode",{parentName:"a"},"Predicator")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[] | an array containing all the incoming edges for which the\npredicate returns ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),", otherwise returns an empty array if no such\nedge is found.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const referrers = node.findReferrers((edge: IHeapEdge) => {\n // find all the incoming references with name \"ref\"\n return edge.name_or_index === 'ref';\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2024"},"core/src/lib/Types.ts:2024"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"foreachreferencecallback"},(0,t.yg)("a",{id:"foreachreference"}),(0,t.yg)("strong",{parentName:"h3"},"forEachReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"executes a provided callback once for each JavaScript reference in the\nhosting node (or outgoing edges from the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#edgeiterationcallback"},(0,t.yg)("inlineCode",{parentName:"a"},"EdgeIterationCallback"))," | the callback for each outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"void")," | this API returns void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"node.forEachReference((edge: IHeapEdge) => {\n // process edge ...\n\n // if no need to iterate over remaining edges after\n // the current edge in the node.references list\n return {stop: true};\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1937"},"core/src/lib/Types.ts:1937"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"foreachreferrercallback"},(0,t.yg)("a",{id:"foreachreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"forEachReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"executes a provided callback once for each JavaScript reference pointing\nto the hosting node (or incoming edges to the node)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#edgeiterationcallback"},(0,t.yg)("inlineCode",{parentName:"a"},"EdgeIterationCallback"))," | the callback for each incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"void")," | this API returns void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"node.forEachReferrer((edge: IHeapEdge) => {\n // process edge ...\n\n // if no need to iterate over remaining edges after\n // the current edge in the node.referrers list\n return {stop: true};\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1955"},"core/src/lib/Types.ts:1955"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getanyreferreredgename-edgetype"},(0,t.yg)("a",{id:"getanyreferrer"}),(0,t.yg)("strong",{parentName:"h3"},"getAnyReferrer"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds an incoming JS\nreference pointing to the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the incoming edge that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find one of the JS reference named \"ref\" pointing to node\nconst reference = node.getAnyReferrer('ref', 'property');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2097"},"core/src/lib/Types.ts:2097"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getanyreferrernodeedgename-edgetype"},(0,t.yg)("a",{id:"getanyreferrernode"}),(0,t.yg)("strong",{parentName:"h3"},"getAnyReferrerNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds one of the incoming JS\nreferences pointing to the hosting node, and returns the JS heap object\ncontaining the incoming reference."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the node containing the incoming JS reference that meets\nthe specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find one of the JS heap object with a JS reference\n// named \"ref\" pointing to node\nconst n1 = node.getAnyReferrerNode('ref', 'property');\n// this is equivalent to\nconst n2 = node.getAnyReferrer('ref', 'property')?.fromNode;\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2120"},"core/src/lib/Types.ts:2120"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferenceedgename-edgetype"},(0,t.yg)("a",{id:"getreference"}),(0,t.yg)("strong",{parentName:"h3"},"getReference"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds an outgoing JS\nreference from the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the outgoing JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | the outgoing edge that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find the internal reference to node's hidden class\nconst reference = node.getReference('map', 'hidden');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2057"},"core/src/lib/Types.ts:2057"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferencenodeedgename-edgetype"},(0,t.yg)("a",{id:"getreferencenode"}),(0,t.yg)("strong",{parentName:"h3"},"getReferenceNode"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds the outgoing JS\nreference from the hosting node, and returns the JS heap object pointed to\nby the outgoing JS reference."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the outgoing JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the outgoing JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the node pointed to by the outgoing reference that meets\nthe specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find the node's hidden class\nconst hiddenClassNode = node.getReferenceNode('map', 'hidden');\n// this is equivalent to\nconst hiddenClassNode2 = node.getReference('map', 'hidden')?.toNode;\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2079"},"core/src/lib/Types.ts:2079"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferrernodesedgename-edgetype"},(0,t.yg)("a",{id:"getreferrernodes"}),(0,t.yg)("strong",{parentName:"h3"},"getReferrerNodes"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds all of the incoming JS\nreferences pointing to the hosting node, and returns an array containing\nthe hosting node for each of the incoming JS references."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),"[] | an array containing the hosting nodes, with each node corresponds\nto each incoming JS reference that meets the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find all of the JS heap object with a JS reference\n// named \"ref\" pointing to node\nconst nodes1 = node.getReferrerNodes('ref', 'property');\n// this is equivalent to\nconst nodes2 = node.getReferrers('ref', 'property')\n .map(edge => edge.fromNode);\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2160"},"core/src/lib/Types.ts:2160"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getreferrersedgename-edgetype"},(0,t.yg)("a",{id:"getreferrers"}),(0,t.yg)("strong",{parentName:"h3"},"getReferrers"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeName"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"edgeType?"),")"),(0,t.yg)("p",null,"Given a JS reference's name and type, this API finds all the incoming JS\nreference pointing to the hosting node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeName"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the name of the incoming JavaScript reference"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edgeType?"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | optional parameter specifying the type of the incoming JavaScript reference"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),"[] | an array containing all the incoming edges that\nmeet the specification")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"// find all of of the JS reference named \"ref\" pointing to node\nconst referrers = node.getReferrers('ref', 'property');\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2139"},"core/src/lib/Types.ts:2139"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"tojsonstringargs"},(0,t.yg)("a",{id:"tojsonstring"}),(0,t.yg)("strong",{parentName:"h3"},"toJSONString"),"(...",(0,t.yg)("inlineCode",{parentName:"h3"},"args"),")"),(0,t.yg)("p",null,"convert to a concise readable string output\n(like calling ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)"),")."),(0,t.yg)("p",null,"Note: Please be aware that using ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)")," is\nnot recommended as it will generate a JSON representation of the host\nobject that is too large to be easily readable due to its connections\nto other parts of the data structures within the heap snapshot."),(0,t.yg)("p",null,"This API does not completely serialize all the information\ncaptured by the hosting object."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"...args"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"any"),"[]"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1919"},"core/src/lib/Types.ts:1919"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"tostringnode"},(0,t.yg)("a",{id:"tostringnode"}),(0,t.yg)("strong",{parentName:"h3"},"toStringNode"),"()"),(0,t.yg)("p",null,"convert to an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},"IHeapStringNode")," object if this node is a string node.\nThe ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},"IHeapStringNode")," object supports querying the string content\ninside the string node."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapStringNode")),">"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1906"},"core/src/lib/Types.ts:1906"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2d8affd8.5425e231.js b/assets/js/2d8affd8.644516c0.js similarity index 88% rename from assets/js/2d8affd8.5425e231.js rename to assets/js/2d8affd8.644516c0.js index 7504ff4f..80c1c399 100644 --- a/assets/js/2d8affd8.5425e231.js +++ b/assets/js/2d8affd8.644516c0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8032],{5680:(e,t,n)=>{n.d(t,{xA:()=>p,yg:()=>d});var a=n(6540);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=u(n),g=r,d=m["".concat(s,".").concat(g)]||m[g]||c[g]||o;return n?a.createElement(d,l(l({ref:t},p),{},{components:n})):a.createElement(d,l({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=g;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:r,l[1]=i;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var a=n(8168),r=(n(6540),n(5680));const o={id:"api_src.ConsoleMode",title:"Enumeration: ConsoleMode",sidebar_label:"ConsoleMode",custom_edit_url:null},l=void 0,i={unversionedId:"api/enums/api_src.ConsoleMode",id:"api/enums/api_src.ConsoleMode",title:"Enumeration: ConsoleMode",description:"enum of all console mode options",source:"@site/docs/api/enums/api_src.ConsoleMode.md",sourceDirName:"api/enums",slug:"/api/enums/api_src.ConsoleMode",permalink:"/memlab/docs/api/enums/api_src.ConsoleMode",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"api_src.ConsoleMode",title:"Enumeration: ConsoleMode",sidebar_label:"ConsoleMode",custom_edit_url:null},sidebar:"sidebar",previous:{title:"heap-analysis/src",permalink:"/memlab/docs/api/modules/heap_analysis_src"},next:{title:"BrowserInteractionResultReader",permalink:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"}},s={},u=[{value:"Enumeration Members",id:"enumeration-members",level:2},{value:' CONTINUOUS_TEST',id:"-continuous_test",level:3},{value:' DEFAULT',id:"-default",level:3},{value:' SILENT',id:"-silent",level:3},{value:' VERBOSE',id:"-verbose",level:3}],p={toc:u},m="wrapper";function c(e){let{components:t,...n}=e;return(0,r.yg)(m,(0,a.A)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"enum of all console mode options"),(0,r.yg)("h2",{id:"enumeration-members"},"Enumeration Members"),(0,r.yg)("h3",{id:"-continuous_test"},(0,r.yg)("a",{id:"continuous\\_test",name:"continuous\\_test"})," ",(0,r.yg)("strong",{parentName:"h3"},"CONTINUOUS","_","TEST")),(0,r.yg)("p",null,"continuous test mode, no terminal output overwrite or animation,\nequivalent to using ",(0,r.yg)("inlineCode",{parentName:"p"},"--sc")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/state/ConsoleModeManager.ts#L26"},"api/src/state/ConsoleModeManager.ts:26"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-default"},(0,r.yg)("a",{id:"default",name:"default"})," ",(0,r.yg)("strong",{parentName:"h3"},"DEFAULT")),(0,r.yg)("p",null,"the default mode, there could be terminal output overwrite and animation,"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/state/ConsoleModeManager.ts#L30"},"api/src/state/ConsoleModeManager.ts:30"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-silent"},(0,r.yg)("a",{id:"silent",name:"silent"})," ",(0,r.yg)("strong",{parentName:"h3"},"SILENT")),(0,r.yg)("p",null,"mute all terminal output, equivalent to using ",(0,r.yg)("inlineCode",{parentName:"p"},"--silent")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/state/ConsoleModeManager.ts#L21"},"api/src/state/ConsoleModeManager.ts:21"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-verbose"},(0,r.yg)("a",{id:"verbose",name:"verbose"})," ",(0,r.yg)("strong",{parentName:"h3"},"VERBOSE")),(0,r.yg)("p",null,"verbose mode, there could be terminal output overwrite and animation"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/state/ConsoleModeManager.ts#L34"},"api/src/state/ConsoleModeManager.ts:34"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8032],{5680:(e,t,n)=>{n.d(t,{xA:()=>p,yg:()=>d});var a=n(6540);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),c=u(n),g=r,d=c["".concat(s,".").concat(g)]||c[g]||m[g]||o;return n?a.createElement(d,l(l({ref:t},p),{},{components:n})):a.createElement(d,l({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=g;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:r,l[1]=i;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var a=n(8168),r=(n(6540),n(5680));const o={id:"api_src.ConsoleMode",title:"Enumeration: ConsoleMode",sidebar_label:"ConsoleMode",custom_edit_url:null},l=void 0,i={unversionedId:"api/enums/api_src.ConsoleMode",id:"api/enums/api_src.ConsoleMode",title:"Enumeration: ConsoleMode",description:"enum of all console mode options",source:"@site/docs/api/enums/api_src.ConsoleMode.md",sourceDirName:"api/enums",slug:"/api/enums/api_src.ConsoleMode",permalink:"/memlab/docs/api/enums/api_src.ConsoleMode",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"api_src.ConsoleMode",title:"Enumeration: ConsoleMode",sidebar_label:"ConsoleMode",custom_edit_url:null},sidebar:"sidebar",previous:{title:"heap-analysis/src",permalink:"/memlab/docs/api/modules/heap_analysis_src"},next:{title:"BrowserInteractionResultReader",permalink:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"}},s={},u=[{value:"Enumeration Members",id:"enumeration-members",level:2},{value:' CONTINUOUS_TEST',id:"-continuous_test",level:3},{value:' DEFAULT',id:"-default",level:3},{value:' SILENT',id:"-silent",level:3},{value:' VERBOSE',id:"-verbose",level:3}],p={toc:u},c="wrapper";function m(e){let{components:t,...n}=e;return(0,r.yg)(c,(0,a.A)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"enum of all console mode options"),(0,r.yg)("h2",{id:"enumeration-members"},"Enumeration Members"),(0,r.yg)("h3",{id:"-continuous_test"},(0,r.yg)("a",{id:"continuous\\_test",name:"continuous\\_test"})," ",(0,r.yg)("strong",{parentName:"h3"},"CONTINUOUS","_","TEST")),(0,r.yg)("p",null,"continuous test mode, no terminal output overwrite or animation,\nequivalent to using ",(0,r.yg)("inlineCode",{parentName:"p"},"--sc")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/state/ConsoleModeManager.ts#L26"},"api/src/state/ConsoleModeManager.ts:26"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-default"},(0,r.yg)("a",{id:"default",name:"default"})," ",(0,r.yg)("strong",{parentName:"h3"},"DEFAULT")),(0,r.yg)("p",null,"the default mode, there could be terminal output overwrite and animation,"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/state/ConsoleModeManager.ts#L30"},"api/src/state/ConsoleModeManager.ts:30"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-silent"},(0,r.yg)("a",{id:"silent",name:"silent"})," ",(0,r.yg)("strong",{parentName:"h3"},"SILENT")),(0,r.yg)("p",null,"mute all terminal output, equivalent to using ",(0,r.yg)("inlineCode",{parentName:"p"},"--silent")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/state/ConsoleModeManager.ts#L21"},"api/src/state/ConsoleModeManager.ts:21"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-verbose"},(0,r.yg)("a",{id:"verbose",name:"verbose"})," ",(0,r.yg)("strong",{parentName:"h3"},"VERBOSE")),(0,r.yg)("p",null,"verbose mode, there could be terminal output overwrite and animation"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/state/ConsoleModeManager.ts#L34"},"api/src/state/ConsoleModeManager.ts:34"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2ecac66d.9c1d34f0.js b/assets/js/2ecac66d.940c4262.js similarity index 97% rename from assets/js/2ecac66d.9c1d34f0.js rename to assets/js/2ecac66d.940c4262.js index 91f15899..208131db 100644 --- a/assets/js/2ecac66d.9c1d34f0.js +++ b/assets/js/2ecac66d.940c4262.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[1797],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>u});var t=n(6540);function l(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function s(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(l[n]=e[n]);return l}(e,a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},g=t.forwardRef((function(e,a){var n=e.components,l=e.mdxType,s=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),g=l,u=c["".concat(o,".").concat(g)]||c[g]||m[g]||s;return n?t.createElement(u,i(i({ref:a},y),{},{components:n})):t.createElement(u,i({ref:a},y))}));function u(e,a){var n=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var s=n.length,i=new Array(s);i[0]=g;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:l,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>r,toc:()=>p});var t=n(8168),l=(n(6540),n(5680));const s={id:"heap_analysis_src.DetachedDOMElementAnalysis",title:"Class: DetachedDOMElementAnalysis",sidebar_label:"DetachedDOMElementAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.DetachedDOMElementAnalysis",id:"api/classes/heap_analysis_src.DetachedDOMElementAnalysis",title:"Class: DetachedDOMElementAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.DetachedDOMElementAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.DetachedDOMElementAnalysis",title:"Class: DetachedDOMElementAnalysis",sidebar_label:"DetachedDOMElementAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"CollectionsHoldingStaleAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis"},next:{title:"GlobalVariableAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new DetachedDOMElementAnalysis()',id:"new-detacheddomelementanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3},{value:'getDetachedElements()',id:"getdetachedelements",level:3}],y={toc:p},c="wrapper";function m(e){let{components:a,...n}=e;return(0,l.yg)(c,(0,t.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,l.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,l.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,l.yg)("p",{parentName:"li"},"\u21b3 ",(0,l.yg)("strong",{parentName:"p"},(0,l.yg)("inlineCode",{parentName:"strong"},"DetachedDOMElementAnalysis"))))),(0,l.yg)("h2",{id:"constructors"},"Constructors"),(0,l.yg)("h3",{id:"new-detacheddomelementanalysis"},(0,l.yg)("a",{id:"new detacheddomelementanalysis"}),(0,l.yg)("strong",{parentName:"h3"},"new DetachedDOMElementAnalysis"),"()"),(0,l.yg)("h2",{id:"methods"},"Methods"),(0,l.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,l.yg)("a",{id:"analyzesnapshotfromfile"}),(0,l.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,l.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,l.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,l.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Parameters"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,l.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,l.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,l.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Example"),":")),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,l.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Source"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"getcommandname"},(0,l.yg)("a",{id:"getcommandname"}),(0,l.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,l.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,l.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,l.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Examples"),":")),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Source"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/DetachedDOMElementAnalysis.ts#L20"},"heap-analysis/src/plugins/DetachedDOMElementAnalysis.ts:20"))))),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"getdetachedelements"},(0,l.yg)("a",{id:"getdetachedelements"}),(0,l.yg)("strong",{parentName:"h3"},"getDetachedElements"),"()"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"IHeapNode"),"[]"),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Source"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/DetachedDOMElementAnalysis.ts#L47"},"heap-analysis/src/plugins/DetachedDOMElementAnalysis.ts:47"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[1797],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>u});var t=n(6540);function l(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function s(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(l[n]=e[n]);return l}(e,a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},g=t.forwardRef((function(e,a){var n=e.components,l=e.mdxType,s=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),g=l,u=c["".concat(o,".").concat(g)]||c[g]||m[g]||s;return n?t.createElement(u,i(i({ref:a},y),{},{components:n})):t.createElement(u,i({ref:a},y))}));function u(e,a){var n=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var s=n.length,i=new Array(s);i[0]=g;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:l,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>r,toc:()=>p});var t=n(8168),l=(n(6540),n(5680));const s={id:"heap_analysis_src.DetachedDOMElementAnalysis",title:"Class: DetachedDOMElementAnalysis",sidebar_label:"DetachedDOMElementAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.DetachedDOMElementAnalysis",id:"api/classes/heap_analysis_src.DetachedDOMElementAnalysis",title:"Class: DetachedDOMElementAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.DetachedDOMElementAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.DetachedDOMElementAnalysis",title:"Class: DetachedDOMElementAnalysis",sidebar_label:"DetachedDOMElementAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"CollectionsHoldingStaleAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis"},next:{title:"GlobalVariableAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new DetachedDOMElementAnalysis()',id:"new-detacheddomelementanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3},{value:'getDetachedElements()',id:"getdetachedelements",level:3}],y={toc:p},c="wrapper";function m(e){let{components:a,...n}=e;return(0,l.yg)(c,(0,t.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,l.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,l.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,l.yg)("p",{parentName:"li"},"\u21b3 ",(0,l.yg)("strong",{parentName:"p"},(0,l.yg)("inlineCode",{parentName:"strong"},"DetachedDOMElementAnalysis"))))),(0,l.yg)("h2",{id:"constructors"},"Constructors"),(0,l.yg)("h3",{id:"new-detacheddomelementanalysis"},(0,l.yg)("a",{id:"new detacheddomelementanalysis"}),(0,l.yg)("strong",{parentName:"h3"},"new DetachedDOMElementAnalysis"),"()"),(0,l.yg)("h2",{id:"methods"},"Methods"),(0,l.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,l.yg)("a",{id:"analyzesnapshotfromfile"}),(0,l.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,l.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,l.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,l.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Parameters"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,l.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,l.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,l.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Example"),":")),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,l.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Source"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"getcommandname"},(0,l.yg)("a",{id:"getcommandname"}),(0,l.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,l.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,l.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,l.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Examples"),":")),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Source"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/DetachedDOMElementAnalysis.ts#L20"},"heap-analysis/src/plugins/DetachedDOMElementAnalysis.ts:20"))))),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"getdetachedelements"},(0,l.yg)("a",{id:"getdetachedelements"}),(0,l.yg)("strong",{parentName:"h3"},"getDetachedElements"),"()"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"IHeapNode"),"[]"),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Source"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/DetachedDOMElementAnalysis.ts#L47"},"heap-analysis/src/plugins/DetachedDOMElementAnalysis.ts:47"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3531de3b.f774d49a.js b/assets/js/3531de3b.3c5b03a1.js similarity index 96% rename from assets/js/3531de3b.f774d49a.js rename to assets/js/3531de3b.3c5b03a1.js index 36a4f003..246a02a0 100644 --- a/assets/js/3531de3b.f774d49a.js +++ b/assets/js/3531de3b.3c5b03a1.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9477],{5680:(e,r,n)=>{n.d(r,{xA:()=>p,yg:()=>m});var t=n(6540);function o(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function s(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=t.createContext({}),c=function(e){var r=t.useContext(l),n=r;return e&&(n="function"==typeof e?e(r):s(s({},r),e)),n},p=function(e){var r=c(e.components);return t.createElement(l.Provider,{value:r},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},f=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=c(n),f=o,m=u["".concat(l,".").concat(f)]||u[f]||g[f]||a;return n?t.createElement(m,s(s({ref:r},p),{},{components:n})):t.createElement(m,s({ref:r},p))}));function m(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=n.length,s=new Array(a);s[0]=f;var i={};for(var l in r)hasOwnProperty.call(r,l)&&(i[l]=r[l]);i.originalType=e,i[u]="string"==typeof e?e:o,s[1]=i;for(var c=2;c{n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>s,default:()=>g,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var t=n(8168),o=(n(6540),n(5680));const a={id:"core_src.IBrowserInfo",title:"Interface: IBrowserInfo",sidebar_label:"IBrowserInfo",custom_edit_url:null},s=void 0,i={unversionedId:"api/interfaces/core_src.IBrowserInfo",id:"api/interfaces/core_src.IBrowserInfo",title:"Interface: IBrowserInfo",description:"This data structure contains the input configuration for the browser and",source:"@site/docs/api/interfaces/core_src.IBrowserInfo.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IBrowserInfo",permalink:"/memlab/docs/api/interfaces/core_src.IBrowserInfo",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IBrowserInfo",title:"Interface: IBrowserInfo",sidebar_label:"IBrowserInfo",custom_edit_url:null},sidebar:"sidebar",previous:{title:"StringAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis"},next:{title:"IHeapEdge",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdge"}},l={},c=[{value:"Properties",id:"properties",level:2},{value:' _browserVersion: string',id:"-_browserversion-string",level:3},{value:' _consoleMessages: string[]',id:"-_consolemessages-string",level:3},{value:' _puppeteerConfig: LaunchOptions',id:"-_puppeteerconfig-launchoptions",level:3}],p={toc:c},u="wrapper";function g(e){let{components:r,...n}=e;return(0,o.yg)(u,(0,t.A)({},p,n,{components:r,mdxType:"MDXLayout"}),(0,o.yg)("p",null,"This data structure contains the input configuration for the browser and\noutput data from the browser. You can retrieve the instance of this type\nthrough ",(0,o.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#runmetainfo"},"RunMetaInfo"),"."),(0,o.yg)("h2",{id:"properties"},"Properties"),(0,o.yg)("h3",{id:"-_browserversion-string"},(0,o.yg)("a",{id:"\\_browserversion",name:"\\_browserversion"})," ",(0,o.yg)("strong",{parentName:"h3"},"_","browserVersion"),": ",(0,o.yg)("inlineCode",{parentName:"h3"},"string")),(0,o.yg)("p",null,"browser version"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("strong",{parentName:"li"},"Source"),":",(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1232"},"core/src/lib/Types.ts:1232"))))),(0,o.yg)("hr",null),(0,o.yg)("h3",{id:"-_consolemessages-string"},(0,o.yg)("a",{id:"\\_consolemessages",name:"\\_consolemessages"})," ",(0,o.yg)("strong",{parentName:"h3"},"_","consoleMessages"),": ",(0,o.yg)("inlineCode",{parentName:"h3"},"string"),"[]"),(0,o.yg)("p",null,"all web console output"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("strong",{parentName:"li"},"Source"),":",(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1240"},"core/src/lib/Types.ts:1240"))))),(0,o.yg)("hr",null),(0,o.yg)("h3",{id:"-_puppeteerconfig-launchoptions"},(0,o.yg)("a",{id:"\\_puppeteerconfig",name:"\\_puppeteerconfig"})," ",(0,o.yg)("strong",{parentName:"h3"},"_","puppeteerConfig"),": ",(0,o.yg)("inlineCode",{parentName:"h3"},"LaunchOptions")),(0,o.yg)("p",null,"configuration for puppeteer"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("strong",{parentName:"li"},"Source"),":",(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1236"},"core/src/lib/Types.ts:1236"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9477],{5680:(e,r,n)=>{n.d(r,{xA:()=>p,yg:()=>m});var t=n(6540);function o(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function s(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=t.createContext({}),c=function(e){var r=t.useContext(l),n=r;return e&&(n="function"==typeof e?e(r):s(s({},r),e)),n},p=function(e){var r=c(e.components);return t.createElement(l.Provider,{value:r},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},f=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=c(n),f=o,m=u["".concat(l,".").concat(f)]||u[f]||g[f]||a;return n?t.createElement(m,s(s({ref:r},p),{},{components:n})):t.createElement(m,s({ref:r},p))}));function m(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=n.length,s=new Array(a);s[0]=f;var i={};for(var l in r)hasOwnProperty.call(r,l)&&(i[l]=r[l]);i.originalType=e,i[u]="string"==typeof e?e:o,s[1]=i;for(var c=2;c{n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>s,default:()=>g,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var t=n(8168),o=(n(6540),n(5680));const a={id:"core_src.IBrowserInfo",title:"Interface: IBrowserInfo",sidebar_label:"IBrowserInfo",custom_edit_url:null},s=void 0,i={unversionedId:"api/interfaces/core_src.IBrowserInfo",id:"api/interfaces/core_src.IBrowserInfo",title:"Interface: IBrowserInfo",description:"This data structure contains the input configuration for the browser and",source:"@site/docs/api/interfaces/core_src.IBrowserInfo.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IBrowserInfo",permalink:"/memlab/docs/api/interfaces/core_src.IBrowserInfo",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IBrowserInfo",title:"Interface: IBrowserInfo",sidebar_label:"IBrowserInfo",custom_edit_url:null},sidebar:"sidebar",previous:{title:"StringAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis"},next:{title:"IHeapEdge",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdge"}},l={},c=[{value:"Properties",id:"properties",level:2},{value:' _browserVersion: string',id:"-_browserversion-string",level:3},{value:' _consoleMessages: string[]',id:"-_consolemessages-string",level:3},{value:' _puppeteerConfig: LaunchOptions',id:"-_puppeteerconfig-launchoptions",level:3}],p={toc:c},u="wrapper";function g(e){let{components:r,...n}=e;return(0,o.yg)(u,(0,t.A)({},p,n,{components:r,mdxType:"MDXLayout"}),(0,o.yg)("p",null,"This data structure contains the input configuration for the browser and\noutput data from the browser. You can retrieve the instance of this type\nthrough ",(0,o.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#runmetainfo"},"RunMetaInfo"),"."),(0,o.yg)("h2",{id:"properties"},"Properties"),(0,o.yg)("h3",{id:"-_browserversion-string"},(0,o.yg)("a",{id:"\\_browserversion",name:"\\_browserversion"})," ",(0,o.yg)("strong",{parentName:"h3"},"_","browserVersion"),": ",(0,o.yg)("inlineCode",{parentName:"h3"},"string")),(0,o.yg)("p",null,"browser version"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("strong",{parentName:"li"},"Source"),":",(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1232"},"core/src/lib/Types.ts:1232"))))),(0,o.yg)("hr",null),(0,o.yg)("h3",{id:"-_consolemessages-string"},(0,o.yg)("a",{id:"\\_consolemessages",name:"\\_consolemessages"})," ",(0,o.yg)("strong",{parentName:"h3"},"_","consoleMessages"),": ",(0,o.yg)("inlineCode",{parentName:"h3"},"string"),"[]"),(0,o.yg)("p",null,"all web console output"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("strong",{parentName:"li"},"Source"),":",(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1240"},"core/src/lib/Types.ts:1240"))))),(0,o.yg)("hr",null),(0,o.yg)("h3",{id:"-_puppeteerconfig-launchoptions"},(0,o.yg)("a",{id:"\\_puppeteerconfig",name:"\\_puppeteerconfig"})," ",(0,o.yg)("strong",{parentName:"h3"},"_","puppeteerConfig"),": ",(0,o.yg)("inlineCode",{parentName:"h3"},"LaunchOptions")),(0,o.yg)("p",null,"configuration for puppeteer"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("strong",{parentName:"li"},"Source"),":",(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1236"},"core/src/lib/Types.ts:1236"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4527bbe9.24742c13.js b/assets/js/4527bbe9.ca2fb253.js similarity index 98% rename from assets/js/4527bbe9.24742c13.js rename to assets/js/4527bbe9.ca2fb253.js index fafeaf89..e99f0361 100644 --- a/assets/js/4527bbe9.24742c13.js +++ b/assets/js/4527bbe9.ca2fb253.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[2625],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>g});var l=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function t(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);a&&(l=l.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,l)}return n}function i(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=l.createContext({}),p=function(e){var a=l.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return l.createElement(o.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return l.createElement(l.Fragment,{},a)}},u=l.forwardRef((function(e,a){var n=e.components,s=e.mdxType,t=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),u=s,g=c["".concat(o,".").concat(u)]||c[u]||m[u]||t;return n?l.createElement(g,i(i({ref:a},y),{},{components:n})):l.createElement(g,i({ref:a},y))}));function g(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var t=n.length,i=new Array(t);i[0]=u;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:s,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>t,metadata:()=>r,toc:()=>p});var l=n(8168),s=(n(6540),n(5680));const t={id:"heap_analysis_src.GlobalVariableAnalysis",title:"Class: GlobalVariableAnalysis",sidebar_label:"GlobalVariableAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.GlobalVariableAnalysis",id:"api/classes/heap_analysis_src.GlobalVariableAnalysis",title:"Class: GlobalVariableAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.GlobalVariableAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.GlobalVariableAnalysis",title:"Class: GlobalVariableAnalysis",sidebar_label:"GlobalVariableAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"DetachedDOMElementAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis"},next:{title:"ObjectFanoutAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new GlobalVariableAnalysis()',id:"new-globalvariableanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],y={toc:p},c="wrapper";function m(e){let{components:a,...n}=e;return(0,s.yg)(c,(0,l.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"GlobalVariableAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-globalvariableanalysis"},(0,s.yg)("a",{id:"new globalvariableanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new GlobalVariableAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,s.yg)("a",{id:"analyzesnapshotfromfile"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,s.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/GlobalVariableAnalysis/GlobalVariableAnalysis.ts#L24"},"heap-analysis/src/plugins/GlobalVariableAnalysis/GlobalVariableAnalysis.ts:24"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[2625],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>g});var l=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function t(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);a&&(l=l.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,l)}return n}function i(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=l.createContext({}),p=function(e){var a=l.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return l.createElement(o.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return l.createElement(l.Fragment,{},a)}},u=l.forwardRef((function(e,a){var n=e.components,s=e.mdxType,t=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),u=s,g=c["".concat(o,".").concat(u)]||c[u]||m[u]||t;return n?l.createElement(g,i(i({ref:a},y),{},{components:n})):l.createElement(g,i({ref:a},y))}));function g(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var t=n.length,i=new Array(t);i[0]=u;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:s,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>t,metadata:()=>r,toc:()=>p});var l=n(8168),s=(n(6540),n(5680));const t={id:"heap_analysis_src.GlobalVariableAnalysis",title:"Class: GlobalVariableAnalysis",sidebar_label:"GlobalVariableAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.GlobalVariableAnalysis",id:"api/classes/heap_analysis_src.GlobalVariableAnalysis",title:"Class: GlobalVariableAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.GlobalVariableAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.GlobalVariableAnalysis",title:"Class: GlobalVariableAnalysis",sidebar_label:"GlobalVariableAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"DetachedDOMElementAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis"},next:{title:"ObjectFanoutAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new GlobalVariableAnalysis()',id:"new-globalvariableanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],y={toc:p},c="wrapper";function m(e){let{components:a,...n}=e;return(0,s.yg)(c,(0,l.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"GlobalVariableAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-globalvariableanalysis"},(0,s.yg)("a",{id:"new globalvariableanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new GlobalVariableAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,s.yg)("a",{id:"analyzesnapshotfromfile"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,s.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/GlobalVariableAnalysis/GlobalVariableAnalysis.ts#L24"},"heap-analysis/src/plugins/GlobalVariableAnalysis/GlobalVariableAnalysis.ts:24"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5a17db6f.23413be0.js b/assets/js/5a17db6f.358718ba.js similarity index 98% rename from assets/js/5a17db6f.23413be0.js rename to assets/js/5a17db6f.358718ba.js index 976413a0..06b8627f 100644 --- a/assets/js/5a17db6f.23413be0.js +++ b/assets/js/5a17db6f.358718ba.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8807],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>g});var t=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},u=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,l=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),u=s,g=c["".concat(o,".").concat(u)]||c[u]||m[u]||l;return n?t.createElement(g,i(i({ref:a},y),{},{components:n})):t.createElement(g,i({ref:a},y))}));function g(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var l=n.length,i=new Array(l);i[0]=u;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:s,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>r,toc:()=>p});var t=n(8168),s=(n(6540),n(5680));const l={id:"heap_analysis_src.ObjectSizeAnalysis",title:"Class: ObjectSizeAnalysis",sidebar_label:"ObjectSizeAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.ObjectSizeAnalysis",id:"api/classes/heap_analysis_src.ObjectSizeAnalysis",title:"Class: ObjectSizeAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ObjectSizeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ObjectSizeAnalysis",title:"Class: ObjectSizeAnalysis",sidebar_label:"ObjectSizeAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ObjectShapeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis"},next:{title:"ObjectUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ObjectSizeAnalysis()',id:"new-objectsizeanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],y={toc:p},c="wrapper";function m(e){let{components:a,...n}=e;return(0,s.yg)(c,(0,t.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"ObjectSizeAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-objectsizeanalysis"},(0,s.yg)("a",{id:"new objectsizeanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new ObjectSizeAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,s.yg)("a",{id:"analyzesnapshotfromfile"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,s.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/ObjectSizeAnalysis.ts#L19"},"heap-analysis/src/plugins/ObjectSizeAnalysis.ts:19"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8807],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>g});var t=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},u=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,l=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),u=s,g=c["".concat(o,".").concat(u)]||c[u]||m[u]||l;return n?t.createElement(g,i(i({ref:a},y),{},{components:n})):t.createElement(g,i({ref:a},y))}));function g(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var l=n.length,i=new Array(l);i[0]=u;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:s,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>r,toc:()=>p});var t=n(8168),s=(n(6540),n(5680));const l={id:"heap_analysis_src.ObjectSizeAnalysis",title:"Class: ObjectSizeAnalysis",sidebar_label:"ObjectSizeAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.ObjectSizeAnalysis",id:"api/classes/heap_analysis_src.ObjectSizeAnalysis",title:"Class: ObjectSizeAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ObjectSizeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ObjectSizeAnalysis",title:"Class: ObjectSizeAnalysis",sidebar_label:"ObjectSizeAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ObjectShapeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis"},next:{title:"ObjectUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ObjectSizeAnalysis()',id:"new-objectsizeanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],y={toc:p},c="wrapper";function m(e){let{components:a,...n}=e;return(0,s.yg)(c,(0,t.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"ObjectSizeAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-objectsizeanalysis"},(0,s.yg)("a",{id:"new objectsizeanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new ObjectSizeAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,s.yg)("a",{id:"analyzesnapshotfromfile"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,s.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/ObjectSizeAnalysis.ts#L19"},"heap-analysis/src/plugins/ObjectSizeAnalysis.ts:19"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5b1d4bc5.bd22f119.js b/assets/js/5b1d4bc5.d31acc36.js similarity index 97% rename from assets/js/5b1d4bc5.bd22f119.js rename to assets/js/5b1d4bc5.d31acc36.js index b688127f..4550e418 100644 --- a/assets/js/5b1d4bc5.bd22f119.js +++ b/assets/js/5b1d4bc5.d31acc36.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9439],{5680:(e,a,n)=>{n.d(a,{xA:()=>m,yg:()=>d});var s=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,s)}return n}function i(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var o=s.createContext({}),r=function(e){var a=s.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},m=function(e){var a=r(e.components);return s.createElement(o.Provider,{value:a},e.children)},y="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},h=s.forwardRef((function(e,a){var n=e.components,t=e.mdxType,l=e.originalType,o=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),y=r(n),h=t,d=y["".concat(o,".").concat(h)]||y[h]||g[h]||l;return n?s.createElement(d,i(i({ref:a},m),{},{components:n})):s.createElement(d,i({ref:a},m))}));function d(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var l=n.length,i=new Array(l);i[0]=h;var p={};for(var o in a)hasOwnProperty.call(a,o)&&(p[o]=a[o]);p.originalType=e,p[y]="string"==typeof e?e:t,i[1]=p;for(var r=2;r{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>g,frontMatter:()=>l,metadata:()=>p,toc:()=>r});var s=n(8168),t=(n(6540),n(5680));const l={id:"heap_analysis_src",title:"Package: @memlab/heap-analysis",sidebar_label:"heap-analysis/src",sidebar_position:0,custom_edit_url:null},i=void 0,p={unversionedId:"api/modules/heap_analysis_src",id:"api/modules/heap_analysis_src",title:"Package: @memlab/heap-analysis",description:"Classes",source:"@site/docs/api/modules/heap_analysis_src.md",sourceDirName:"api/modules",slug:"/api/modules/heap_analysis_src",permalink:"/memlab/docs/api/modules/heap_analysis_src",draft:!1,editUrl:null,tags:[],version:"current",sidebarPosition:0,frontMatter:{id:"heap_analysis_src",title:"Package: @memlab/heap-analysis",sidebar_label:"heap-analysis/src",sidebar_position:0,custom_edit_url:null},sidebar:"sidebar",previous:{title:"core/src",permalink:"/memlab/docs/api/modules/core_src"},next:{title:"ConsoleMode",permalink:"/memlab/docs/api/enums/api_src.ConsoleMode"}},o={},r=[{value:"Classes",id:"classes",level:2},{value:"Type Aliases",id:"type-aliases",level:2},{value:' AnalyzeSnapshotResult: Object',id:"-analyzesnapshotresult-object",level:3},{value:' HeapAnalysisOptions: Object',id:"-heapanalysisoptions-object",level:3},{value:' RunHeapAnalysisOptions: Object',id:"-runheapanalysisoptions-object",level:3},{value:"Functions",id:"functions",level:2},{value:'getDominatorNodes(ids, snapshot)',id:"getdominatornodesids-snapshot",level:3},{value:'getFullHeapFromFile(file)',id:"getfullheapfromfilefile",level:3},{value:'getHeapFromFile(file)',id:"getheapfromfilefile",level:3},{value:'getSnapshotDirForAnalysis(options)',id:"getsnapshotdirforanalysisoptions",level:3},{value:'getSnapshotFileForAnalysis(options)',id:"getsnapshotfileforanalysisoptions",level:3},{value:'loadHeapSnapshot(options)',id:"loadheapsnapshotoptions",level:3},{value:'snapshotMapReduce<T1, T2>(mapCallback, reduceCallback, options)',id:"snapshotmapreducet1-t2mapcallback-reducecallback-options",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:'takeNodeFullHeap()',id:"takenodefullheap",level:3}],m={toc:r},y="wrapper";function g(e){let{components:a,...n}=e;return(0,t.yg)(y,(0,s.A)({},m,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("h2",{id:"classes"},"Classes"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},"BaseAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis"},"CollectionsHoldingStaleAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis"},"DetachedDOMElementAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis"},"GlobalVariableAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis"},"ObjectFanoutAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis"},"ObjectShallowAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis"},"ObjectShapeAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis"},"ObjectSizeAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis"},"ObjectUnboundGrowthAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis"},"ShapeUnboundGrowthAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis"},"StringAnalysis"))),(0,t.yg)("h2",{id:"type-aliases"},"Type Aliases"),(0,t.yg)("h3",{id:"-analyzesnapshotresult-object"},(0,t.yg)("a",{id:"analyzesnapshotresult",name:"analyzesnapshotresult"})," ",(0,t.yg)("strong",{parentName:"h3"},"AnalyzeSnapshotResult"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"Object")),(0,t.yg)("p",null,"This is the return type from calling ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis#analyzesnapshotfromfile"},"analyzeSnapshotFromFile"),"\nor ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis#analyzesnapshotsindirectory"},"analyzeSnapshotsInDirectory"),"."),(0,t.yg)("table",null,(0,t.yg)("thead",{parentName:"table"},(0,t.yg)("tr",{parentName:"thead"},(0,t.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,t.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,t.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,t.yg)("tbody",{parentName:"table"},(0,t.yg)("tr",{parentName:"tbody"},(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"analysisOutputFile")),(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"string")),(0,t.yg)("td",{parentName:"tr",align:"left"},"file path of the console output of the heap analysis call")))),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L91"},"heap-analysis/src/PluginUtils.ts:91"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-heapanalysisoptions-object"},(0,t.yg)("a",{id:"heapanalysisoptions",name:"heapanalysisoptions"})," ",(0,t.yg)("strong",{parentName:"h3"},"HeapAnalysisOptions"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"Object")),(0,t.yg)("p",null,"This is the auto-generated arguments passed to all the ",(0,t.yg)("inlineCode",{parentName:"p"},"process")," method\nthat your self-defined heap analysis should implement.\nYou are not supposed to construct instances of this class."),(0,t.yg)("p",null,"For code examples on how this options could be used, see\n",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/heap_analysis_src#getsnapshotfileforanalysis"},"getSnapshotFileForAnalysis"),", ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/heap_analysis_src#loadheapsnapshot"},"loadHeapSnapshot"),",\nor ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/heap_analysis_src#snapshotmapreduce"},"snapshotMapReduce"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L68"},"heap-analysis/src/PluginUtils.ts:68"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-runheapanalysisoptions-object"},(0,t.yg)("a",{id:"runheapanalysisoptions",name:"runheapanalysisoptions"})," ",(0,t.yg)("strong",{parentName:"h3"},"RunHeapAnalysisOptions"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"Object")),(0,t.yg)("p",null,"This is the input option for ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis#analyzesnapshotfromfile"},"analyzeSnapshotFromFile"),"\nand ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis#analyzesnapshotsindirectory"},"analyzeSnapshotsInDirectory"),"."),(0,t.yg)("table",null,(0,t.yg)("thead",{parentName:"table"},(0,t.yg)("tr",{parentName:"thead"},(0,t.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,t.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,t.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,t.yg)("tbody",{parentName:"table"},(0,t.yg)("tr",{parentName:"tbody"},(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"workDir?")),(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"string")),(0,t.yg)("td",{parentName:"tr",align:"left"},"specify the working directory to where the intermediate, logging, and output files should be saved")))),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L79"},"heap-analysis/src/PluginUtils.ts:79"))))),(0,t.yg)("h2",{id:"functions"},"Functions"),(0,t.yg)("h3",{id:"getdominatornodesids-snapshot"},(0,t.yg)("a",{id:"getdominatornodes"}),(0,t.yg)("strong",{parentName:"h3"},"getDominatorNodes"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"ids"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"snapshot"),")"),(0,t.yg)("p",null,"This API calculate the set of\n",(0,t.yg)("a",{parentName:"p",href:"https://firefox-source-docs.mozilla.org/devtools-user/memory/dominators/index.html"},"dominator nodes"),"\nof the set of input heap objects."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"ids"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Set"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"number"),">"," | Set of ids of heap objects (or nodes)"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"IHeapSnapshot")," | heap loaded from a heap snapshot"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Set"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"number"),">"," | the set of dominator nodes/objects"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile, getDominatorNodes} from '@memlab/heap-analysis';\n\nclass TestObject {}\n\n(async function () {\n const t1 = new TestObject();\n const t2 = new TestObject();\n\n // dump the heap of this running JavaScript program\n const heapFile = dumpNodeHeapSnapshot();\n const heap = await getFullHeapFromFile(heapFile);\n\n // find the heap node for TestObject\n let nodes = [];\n heap.nodes.forEach(node => {\n if (node.name === 'TestObject' && node.type === 'object') {\n nodes.push(node);\n }\n });\n\n // get the dominator nodes\n const dominatorIds = getDominatorNodes(\n new Set(nodes.map(node => node.id)),\n heap,\n );\n})();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L687"},"heap-analysis/src/PluginUtils.ts:687"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getfullheapfromfilefile"},(0,t.yg)("a",{id:"getfullheapfromfile"}),(0,t.yg)("strong",{parentName:"h3"},"getFullHeapFromFile"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"file"),")"),(0,t.yg)("p",null,"Load and parse a ",(0,t.yg)("inlineCode",{parentName:"p"},".heapsnapshot")," file and calculate meta data like\ndominator nodes and retained sizes."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the ",(0,t.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"IHeapSnapshot"),">"," | the heap graph representation instance that supports querying\nthe heap"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function (){\n const heapFile = dumpNodeHeapSnapshot();\n const heap = await getFullHeapFromFile(heapFile);\n})();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L484"},"heap-analysis/src/PluginUtils.ts:484"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getheapfromfilefile"},(0,t.yg)("a",{id:"getheapfromfile"}),(0,t.yg)("strong",{parentName:"h3"},"getHeapFromFile"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"file"),")"),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"deprecated"))),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"IHeapSnapshot"),">"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L515"},"heap-analysis/src/PluginUtils.ts:515"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getsnapshotdirforanalysisoptions"},(0,t.yg)("a",{id:"getsnapshotdirforanalysis"}),(0,t.yg)("strong",{parentName:"h3"},"getSnapshotDirForAnalysis"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"options"),")"),(0,t.yg)("p",null,"Get the absolute path of the directory holding all the heap snapshot files\npassed to the hosting heap analysis via ",(0,t.yg)("inlineCode",{parentName:"p"},"HeapAnalysisOptions"),"."),(0,t.yg)("p",null,"This API is supposed to be used within the overridden ",(0,t.yg)("inlineCode",{parentName:"p"},"process")," method\nof an ",(0,t.yg)("inlineCode",{parentName:"p"},"BaseAnalysis")," instance."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#heapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"HeapAnalysisOptions"))," | this is the auto-generated input passed to all the ",(0,t.yg)("inlineCode",{parentName:"li"},"BaseAnalysis")," instances"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Nullable"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"string"),">"," | the absolute path of the directory"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples:"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport type {HeapAnalysisOptions} from '@memlab/heap-analysis';\nimport {getSnapshotFileForAnalysis, BaseAnalysis} from '@memlab/heap-analysis';\n\nclass ExampleAnalysis extends BaseAnalysis {\n public getCommandName(): string {\n return 'example-analysis';\n }\n\n public getDescription(): string {\n return 'an example analysis for demo';\n }\n\n async process(options: HeapAnalysisOptions): Promise {\n const directory = getSnapshotDirForAnalysis(options);\n }\n}\n")),(0,t.yg)("p",null,"Use the following code to invoke the heap analysis:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ExampleAnalysis();\n// any .heapsnapshot file recorded by memlab or saved manually from Chrome\nawait analysis.analyzeSnapshotFromFile(snapshotFile);\n")),(0,t.yg)("p",null,"The new heap analysis can also be used with ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#analyze"},"analyze"),", in that case\n",(0,t.yg)("inlineCode",{parentName:"p"},"getSnapshotDirForAnalysis")," use the snapshot directory from\n",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},"BrowserInteractionResultReader"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L396"},"heap-analysis/src/PluginUtils.ts:396"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getsnapshotfileforanalysisoptions"},(0,t.yg)("a",{id:"getsnapshotfileforanalysis"}),(0,t.yg)("strong",{parentName:"h3"},"getSnapshotFileForAnalysis"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"options"),")"),(0,t.yg)("p",null,"Get the heap snapshot file's absolute path passed to the hosting heap\nanalysis via ",(0,t.yg)("inlineCode",{parentName:"p"},"HeapAnalysisOptions"),"."),(0,t.yg)("p",null,"This API is supposed to be used within the overridden ",(0,t.yg)("inlineCode",{parentName:"p"},"process")," method\nof an ",(0,t.yg)("inlineCode",{parentName:"p"},"BaseAnalysis")," instance."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#heapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"HeapAnalysisOptions"))," | this is the auto-generated input passed to all the ",(0,t.yg)("inlineCode",{parentName:"li"},"BaseAnalysis")," instances"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the heap snapshot file"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples:"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport type {HeapAnalysisOptions} from '@memlab/heap-analysis';\nimport {getSnapshotFileForAnalysis, BaseAnalysis} from '@memlab/heap-analysis';\n\nclass ExampleAnalysis extends BaseAnalysis {\n public getCommandName(): string {\n return 'example-analysis';\n }\n\n public getDescription(): string {\n return 'an example analysis for demo';\n }\n\n async process(options: HeapAnalysisOptions): Promise {\n const file = getSnapshotFileForAnalysis(options);\n }\n}\n")),(0,t.yg)("p",null,"Use the following code to invoke the heap analysis:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ExampleAnalysis();\n// any .heapsnapshot file recorded by memlab or saved manually from Chrome\nawait analysis.analyzeSnapshotFromFile(snapshotFile);\n")),(0,t.yg)("p",null,"The new heap analysis can also be used with ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#analyze"},"analyze"),", in that case\n",(0,t.yg)("inlineCode",{parentName:"p"},"getSnapshotFileForAnalysis")," will use the last heap snapshot in alphanumerically\nascending order from ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},"BrowserInteractionResultReader"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L347"},"heap-analysis/src/PluginUtils.ts:347"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"loadheapsnapshotoptions"},(0,t.yg)("a",{id:"loadheapsnapshot"}),(0,t.yg)("strong",{parentName:"h3"},"loadHeapSnapshot"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"options"),")"),(0,t.yg)("p",null,"Load the heap graph based on the single JavaScript heap snapshot\npassed to the hosting heap analysis via ",(0,t.yg)("inlineCode",{parentName:"p"},"HeapAnalysisOptions"),"."),(0,t.yg)("p",null,"This API is supposed to be used within the ",(0,t.yg)("inlineCode",{parentName:"p"},"process")," implementation\nof an ",(0,t.yg)("inlineCode",{parentName:"p"},"BaseAnalysis")," instance."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#heapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"HeapAnalysisOptions"))," | this is the auto-generated input passed to all the ",(0,t.yg)("inlineCode",{parentName:"li"},"BaseAnalysis")," instances"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"IHeapSnapshot"),">"," | the graph representation of the heap"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples:"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport type {HeapAnalysisOptions} from '@memlab/heap-analysis';\nimport {loadHeapSnapshot, BaseAnalysis} from '@memlab/heap-analysis';\n\nclass ExampleAnalysis extends BaseAnalysis {\n public getCommandName(): string {\n return 'example-analysis';\n }\n\n public getDescription(): string {\n return 'an example analysis for demo';\n }\n\n async process(options: HeapAnalysisOptions): Promise {\n const heap = await loadHeapSnapshot(options);\n // doing heap analysis\n }\n}\n")),(0,t.yg)("p",null,"Use the following code to invoke the heap analysis:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ExampleAnalysis();\n// any .heapsnapshot file recorded by memlab or saved manually from Chrome\nawait analysis.analyzeSnapshotFromFile(snapshotFile);\n")),(0,t.yg)("p",null,"The new heap analysis can also be used with ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#analyze"},"analyze"),", in that case\n",(0,t.yg)("inlineCode",{parentName:"p"},"loadHeapSnapshot")," will use the last heap snapshot in alphanumerically\nascending order from ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},"BrowserInteractionResultReader"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L450"},"heap-analysis/src/PluginUtils.ts:450"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"snapshotmapreducet1-t2mapcallback-reducecallback-options"},(0,t.yg)("a",{id:"snapshotmapreduce"}),(0,t.yg)("strong",{parentName:"h3"},"snapshotMapReduce"),"<",(0,t.yg)("inlineCode",{parentName:"h3"},"T1"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"T2"),">","(",(0,t.yg)("inlineCode",{parentName:"h3"},"mapCallback"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"reduceCallback"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"options"),")"),(0,t.yg)("p",null,"When a heap analysis is taking multiple heap snapshots as input for memory\nanalysis (e.g., finding which object keeps growing in size in a series of\nheap snapshots), this API could be used to do\n",(0,t.yg)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/MapReduce"},"MapRedue")," on all heap snapshots."),(0,t.yg)("p",null,"This API is supposed to be used within the ",(0,t.yg)("inlineCode",{parentName:"p"},"process")," implementation\nof an ",(0,t.yg)("inlineCode",{parentName:"p"},"BaseAnalysis")," instance that is designed to analyze multiple heap\nsnapshots (as an example, finding which object keeps growing overtime)"),(0,t.yg)("h4",{id:"type-parameters"},"Type parameters"),(0,t.yg)("table",null,(0,t.yg)("thead",{parentName:"table"},(0,t.yg)("tr",{parentName:"thead"},(0,t.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,t.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,t.yg)("tbody",{parentName:"table"},(0,t.yg)("tr",{parentName:"tbody"},(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"T1")),(0,t.yg)("td",{parentName:"tr",align:"left"},"the type of the intermediate result from each map function call")),(0,t.yg)("tr",{parentName:"tbody"},(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"T2")),(0,t.yg)("td",{parentName:"tr",align:"left"},"the type of the final result of the reduce function call")))),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"mapCallback"),": (",(0,t.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"IHeapSnapshot"),", ",(0,t.yg)("inlineCode",{parentName:"li"},"i"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"number"),", ",(0,t.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string"),") => ",(0,t.yg)("inlineCode",{parentName:"li"},"T1")," | the map function in MapReduce, the function will be applied to each heap snapshot"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"reduceCallback"),": (",(0,t.yg)("inlineCode",{parentName:"li"},"results"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"T1"),"[]) => ",(0,t.yg)("inlineCode",{parentName:"li"},"T2")," | the reduce function in MapReduce, the function will take as input all intermediate results from all map function calls"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#heapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"HeapAnalysisOptions"))," | this is the auto-generated input passed to all the ",(0,t.yg)("inlineCode",{parentName:"li"},"BaseAnalysis")," instances"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"T2"),">"," | the return value of your reduce function"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples:"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport type {HeapAnalysisOptions} from '@memlab/heap-analysis';\nimport {snapshotMapReduce, BaseAnalysis} from '@memlab/heap-analysis';\n\nclass ExampleAnalysis extends BaseAnalysis {\n public getCommandName(): string {\n return 'example-analysis';\n }\n\n public getDescription(): string {\n return 'an example analysis for demo';\n }\n\n async process(options: HeapAnalysisOptions): Promise {\n // check if the number of heap objects keeps growing overtime\n const isMonotonicIncreasing = await snapshotMapReduce(\n (heap) => heap.nodes.length,\n (nodeCounts) =>\n nodeCounts[0] < nodeCounts[nodeCounts.length - 1] &&\n nodeCounts.every((count, i) => i === 0 || count >= nodeCounts[i - 1]),\n options,\n );\n }\n}\n")),(0,t.yg)("p",null,"Use the following code to invoke the heap analysis:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ExampleAnalysis();\n// snapshotDir includes a series of .heapsnapshot files recorded by\n// memlab or saved manually from Chrome, those files will be loaded\n// in alphanumerically ascending order\nawait analysis.analyzeSnapshotsInDirectory(snapshotDir);\n")),(0,t.yg)("p",null,"The new heap analysis can also be used with ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#analyze"},"analyze"),", in that case\n",(0,t.yg)("inlineCode",{parentName:"p"},"snapshotMapReduce")," will use all the heap snapshot in alphanumerically\nascending order from ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},"BrowserInteractionResultReader"),"."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},"Why not passing in all heap snapshots as an array of ",(0,t.yg)("a",{parentName:"strong",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"),"s?"),"\nEach heap snapshot could be non-trivial in size, loading them all at once\nmay not be possible."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L592"},"heap-analysis/src/PluginUtils.ts:592"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"takenodefullheap"},(0,t.yg)("a",{id:"takenodefullheap"}),(0,t.yg)("strong",{parentName:"h3"},"takeNodeFullHeap"),"()"),(0,t.yg)("p",null,"Take a heap snapshot of the current program state\nand parse it as ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"),". This\nAPI also calculates some heap analysis meta data\nfor heap analysis. But this also means slower heap parsing\ncomparing with ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#takenodeminimalheap"},"takeNodeMinimalHeap"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapSnapshot"),">"," | heap representation with heap analysis meta data.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples:")))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport type {takeNodeFullHeap} from '@memlab/heap-analysis';\n\n(async function () {\n const heap: IHeapSnapshot = await takeNodeFullHeap();\n})();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/PluginUtils.ts#L507"},"heap-analysis/src/PluginUtils.ts:507"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9439],{5680:(e,a,n)=>{n.d(a,{xA:()=>m,yg:()=>c});var s=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,s)}return n}function i(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var o=s.createContext({}),r=function(e){var a=s.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},m=function(e){var a=r(e.components);return s.createElement(o.Provider,{value:a},e.children)},y="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},h=s.forwardRef((function(e,a){var n=e.components,t=e.mdxType,l=e.originalType,o=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),y=r(n),h=t,c=y["".concat(o,".").concat(h)]||y[h]||g[h]||l;return n?s.createElement(c,i(i({ref:a},m),{},{components:n})):s.createElement(c,i({ref:a},m))}));function c(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var l=n.length,i=new Array(l);i[0]=h;var p={};for(var o in a)hasOwnProperty.call(a,o)&&(p[o]=a[o]);p.originalType=e,p[y]="string"==typeof e?e:t,i[1]=p;for(var r=2;r{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>g,frontMatter:()=>l,metadata:()=>p,toc:()=>r});var s=n(8168),t=(n(6540),n(5680));const l={id:"heap_analysis_src",title:"Package: @memlab/heap-analysis",sidebar_label:"heap-analysis/src",sidebar_position:0,custom_edit_url:null},i=void 0,p={unversionedId:"api/modules/heap_analysis_src",id:"api/modules/heap_analysis_src",title:"Package: @memlab/heap-analysis",description:"Classes",source:"@site/docs/api/modules/heap_analysis_src.md",sourceDirName:"api/modules",slug:"/api/modules/heap_analysis_src",permalink:"/memlab/docs/api/modules/heap_analysis_src",draft:!1,editUrl:null,tags:[],version:"current",sidebarPosition:0,frontMatter:{id:"heap_analysis_src",title:"Package: @memlab/heap-analysis",sidebar_label:"heap-analysis/src",sidebar_position:0,custom_edit_url:null},sidebar:"sidebar",previous:{title:"core/src",permalink:"/memlab/docs/api/modules/core_src"},next:{title:"ConsoleMode",permalink:"/memlab/docs/api/enums/api_src.ConsoleMode"}},o={},r=[{value:"Classes",id:"classes",level:2},{value:"Type Aliases",id:"type-aliases",level:2},{value:' AnalyzeSnapshotResult: Object',id:"-analyzesnapshotresult-object",level:3},{value:' HeapAnalysisOptions: Object',id:"-heapanalysisoptions-object",level:3},{value:' RunHeapAnalysisOptions: Object',id:"-runheapanalysisoptions-object",level:3},{value:"Functions",id:"functions",level:2},{value:'getDominatorNodes(ids, snapshot)',id:"getdominatornodesids-snapshot",level:3},{value:'getFullHeapFromFile(file)',id:"getfullheapfromfilefile",level:3},{value:'getHeapFromFile(file)',id:"getheapfromfilefile",level:3},{value:'getSnapshotDirForAnalysis(options)',id:"getsnapshotdirforanalysisoptions",level:3},{value:'getSnapshotFileForAnalysis(options)',id:"getsnapshotfileforanalysisoptions",level:3},{value:'loadHeapSnapshot(options)',id:"loadheapsnapshotoptions",level:3},{value:'snapshotMapReduce<T1, T2>(mapCallback, reduceCallback, options)',id:"snapshotmapreducet1-t2mapcallback-reducecallback-options",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:'takeNodeFullHeap()',id:"takenodefullheap",level:3}],m={toc:r},y="wrapper";function g(e){let{components:a,...n}=e;return(0,t.yg)(y,(0,s.A)({},m,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("h2",{id:"classes"},"Classes"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},"BaseAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis"},"CollectionsHoldingStaleAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis"},"DetachedDOMElementAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis"},"GlobalVariableAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis"},"ObjectFanoutAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis"},"ObjectShallowAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis"},"ObjectShapeAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis"},"ObjectSizeAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis"},"ObjectUnboundGrowthAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis"},"ShapeUnboundGrowthAnalysis")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis"},"StringAnalysis"))),(0,t.yg)("h2",{id:"type-aliases"},"Type Aliases"),(0,t.yg)("h3",{id:"-analyzesnapshotresult-object"},(0,t.yg)("a",{id:"analyzesnapshotresult",name:"analyzesnapshotresult"})," ",(0,t.yg)("strong",{parentName:"h3"},"AnalyzeSnapshotResult"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"Object")),(0,t.yg)("p",null,"This is the return type from calling ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis#analyzesnapshotfromfile"},"analyzeSnapshotFromFile"),"\nor ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis#analyzesnapshotsindirectory"},"analyzeSnapshotsInDirectory"),"."),(0,t.yg)("table",null,(0,t.yg)("thead",{parentName:"table"},(0,t.yg)("tr",{parentName:"thead"},(0,t.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,t.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,t.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,t.yg)("tbody",{parentName:"table"},(0,t.yg)("tr",{parentName:"tbody"},(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"analysisOutputFile")),(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"string")),(0,t.yg)("td",{parentName:"tr",align:"left"},"file path of the console output of the heap analysis call")))),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L91"},"heap-analysis/src/PluginUtils.ts:91"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-heapanalysisoptions-object"},(0,t.yg)("a",{id:"heapanalysisoptions",name:"heapanalysisoptions"})," ",(0,t.yg)("strong",{parentName:"h3"},"HeapAnalysisOptions"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"Object")),(0,t.yg)("p",null,"This is the auto-generated arguments passed to all the ",(0,t.yg)("inlineCode",{parentName:"p"},"process")," method\nthat your self-defined heap analysis should implement.\nYou are not supposed to construct instances of this class."),(0,t.yg)("p",null,"For code examples on how this options could be used, see\n",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/heap_analysis_src#getsnapshotfileforanalysis"},"getSnapshotFileForAnalysis"),", ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/heap_analysis_src#loadheapsnapshot"},"loadHeapSnapshot"),",\nor ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/heap_analysis_src#snapshotmapreduce"},"snapshotMapReduce"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L68"},"heap-analysis/src/PluginUtils.ts:68"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-runheapanalysisoptions-object"},(0,t.yg)("a",{id:"runheapanalysisoptions",name:"runheapanalysisoptions"})," ",(0,t.yg)("strong",{parentName:"h3"},"RunHeapAnalysisOptions"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"Object")),(0,t.yg)("p",null,"This is the input option for ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis#analyzesnapshotfromfile"},"analyzeSnapshotFromFile"),"\nand ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis#analyzesnapshotsindirectory"},"analyzeSnapshotsInDirectory"),"."),(0,t.yg)("table",null,(0,t.yg)("thead",{parentName:"table"},(0,t.yg)("tr",{parentName:"thead"},(0,t.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,t.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,t.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,t.yg)("tbody",{parentName:"table"},(0,t.yg)("tr",{parentName:"tbody"},(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"workDir?")),(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"string")),(0,t.yg)("td",{parentName:"tr",align:"left"},"specify the working directory to where the intermediate, logging, and output files should be saved")))),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L79"},"heap-analysis/src/PluginUtils.ts:79"))))),(0,t.yg)("h2",{id:"functions"},"Functions"),(0,t.yg)("h3",{id:"getdominatornodesids-snapshot"},(0,t.yg)("a",{id:"getdominatornodes"}),(0,t.yg)("strong",{parentName:"h3"},"getDominatorNodes"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"ids"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"snapshot"),")"),(0,t.yg)("p",null,"This API calculate the set of\n",(0,t.yg)("a",{parentName:"p",href:"https://firefox-source-docs.mozilla.org/devtools-user/memory/dominators/index.html"},"dominator nodes"),"\nof the set of input heap objects."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"ids"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Set"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"number"),">"," | Set of ids of heap objects (or nodes)"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"IHeapSnapshot")," | heap loaded from a heap snapshot"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Set"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"number"),">"," | the set of dominator nodes/objects"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile, getDominatorNodes} from '@memlab/heap-analysis';\n\nclass TestObject {}\n\n(async function () {\n const t1 = new TestObject();\n const t2 = new TestObject();\n\n // dump the heap of this running JavaScript program\n const heapFile = dumpNodeHeapSnapshot();\n const heap = await getFullHeapFromFile(heapFile);\n\n // find the heap node for TestObject\n let nodes = [];\n heap.nodes.forEach(node => {\n if (node.name === 'TestObject' && node.type === 'object') {\n nodes.push(node);\n }\n });\n\n // get the dominator nodes\n const dominatorIds = getDominatorNodes(\n new Set(nodes.map(node => node.id)),\n heap,\n );\n})();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L687"},"heap-analysis/src/PluginUtils.ts:687"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getfullheapfromfilefile"},(0,t.yg)("a",{id:"getfullheapfromfile"}),(0,t.yg)("strong",{parentName:"h3"},"getFullHeapFromFile"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"file"),")"),(0,t.yg)("p",null,"Load and parse a ",(0,t.yg)("inlineCode",{parentName:"p"},".heapsnapshot")," file and calculate meta data like\ndominator nodes and retained sizes."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the ",(0,t.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"IHeapSnapshot"),">"," | the heap graph representation instance that supports querying\nthe heap"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function (){\n const heapFile = dumpNodeHeapSnapshot();\n const heap = await getFullHeapFromFile(heapFile);\n})();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L484"},"heap-analysis/src/PluginUtils.ts:484"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getheapfromfilefile"},(0,t.yg)("a",{id:"getheapfromfile"}),(0,t.yg)("strong",{parentName:"h3"},"getHeapFromFile"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"file"),")"),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"deprecated"))),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"IHeapSnapshot"),">"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L515"},"heap-analysis/src/PluginUtils.ts:515"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getsnapshotdirforanalysisoptions"},(0,t.yg)("a",{id:"getsnapshotdirforanalysis"}),(0,t.yg)("strong",{parentName:"h3"},"getSnapshotDirForAnalysis"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"options"),")"),(0,t.yg)("p",null,"Get the absolute path of the directory holding all the heap snapshot files\npassed to the hosting heap analysis via ",(0,t.yg)("inlineCode",{parentName:"p"},"HeapAnalysisOptions"),"."),(0,t.yg)("p",null,"This API is supposed to be used within the overridden ",(0,t.yg)("inlineCode",{parentName:"p"},"process")," method\nof an ",(0,t.yg)("inlineCode",{parentName:"p"},"BaseAnalysis")," instance."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#heapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"HeapAnalysisOptions"))," | this is the auto-generated input passed to all the ",(0,t.yg)("inlineCode",{parentName:"li"},"BaseAnalysis")," instances"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Nullable"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"string"),">"," | the absolute path of the directory"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples:"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport type {HeapAnalysisOptions} from '@memlab/heap-analysis';\nimport {getSnapshotFileForAnalysis, BaseAnalysis} from '@memlab/heap-analysis';\n\nclass ExampleAnalysis extends BaseAnalysis {\n public getCommandName(): string {\n return 'example-analysis';\n }\n\n public getDescription(): string {\n return 'an example analysis for demo';\n }\n\n async process(options: HeapAnalysisOptions): Promise {\n const directory = getSnapshotDirForAnalysis(options);\n }\n}\n")),(0,t.yg)("p",null,"Use the following code to invoke the heap analysis:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ExampleAnalysis();\n// any .heapsnapshot file recorded by memlab or saved manually from Chrome\nawait analysis.analyzeSnapshotFromFile(snapshotFile);\n")),(0,t.yg)("p",null,"The new heap analysis can also be used with ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#analyze"},"analyze"),", in that case\n",(0,t.yg)("inlineCode",{parentName:"p"},"getSnapshotDirForAnalysis")," use the snapshot directory from\n",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},"BrowserInteractionResultReader"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L396"},"heap-analysis/src/PluginUtils.ts:396"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getsnapshotfileforanalysisoptions"},(0,t.yg)("a",{id:"getsnapshotfileforanalysis"}),(0,t.yg)("strong",{parentName:"h3"},"getSnapshotFileForAnalysis"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"options"),")"),(0,t.yg)("p",null,"Get the heap snapshot file's absolute path passed to the hosting heap\nanalysis via ",(0,t.yg)("inlineCode",{parentName:"p"},"HeapAnalysisOptions"),"."),(0,t.yg)("p",null,"This API is supposed to be used within the overridden ",(0,t.yg)("inlineCode",{parentName:"p"},"process")," method\nof an ",(0,t.yg)("inlineCode",{parentName:"p"},"BaseAnalysis")," instance."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#heapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"HeapAnalysisOptions"))," | this is the auto-generated input passed to all the ",(0,t.yg)("inlineCode",{parentName:"li"},"BaseAnalysis")," instances"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the heap snapshot file"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples:"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport type {HeapAnalysisOptions} from '@memlab/heap-analysis';\nimport {getSnapshotFileForAnalysis, BaseAnalysis} from '@memlab/heap-analysis';\n\nclass ExampleAnalysis extends BaseAnalysis {\n public getCommandName(): string {\n return 'example-analysis';\n }\n\n public getDescription(): string {\n return 'an example analysis for demo';\n }\n\n async process(options: HeapAnalysisOptions): Promise {\n const file = getSnapshotFileForAnalysis(options);\n }\n}\n")),(0,t.yg)("p",null,"Use the following code to invoke the heap analysis:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ExampleAnalysis();\n// any .heapsnapshot file recorded by memlab or saved manually from Chrome\nawait analysis.analyzeSnapshotFromFile(snapshotFile);\n")),(0,t.yg)("p",null,"The new heap analysis can also be used with ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#analyze"},"analyze"),", in that case\n",(0,t.yg)("inlineCode",{parentName:"p"},"getSnapshotFileForAnalysis")," will use the last heap snapshot in alphanumerically\nascending order from ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},"BrowserInteractionResultReader"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L347"},"heap-analysis/src/PluginUtils.ts:347"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"loadheapsnapshotoptions"},(0,t.yg)("a",{id:"loadheapsnapshot"}),(0,t.yg)("strong",{parentName:"h3"},"loadHeapSnapshot"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"options"),")"),(0,t.yg)("p",null,"Load the heap graph based on the single JavaScript heap snapshot\npassed to the hosting heap analysis via ",(0,t.yg)("inlineCode",{parentName:"p"},"HeapAnalysisOptions"),"."),(0,t.yg)("p",null,"This API is supposed to be used within the ",(0,t.yg)("inlineCode",{parentName:"p"},"process")," implementation\nof an ",(0,t.yg)("inlineCode",{parentName:"p"},"BaseAnalysis")," instance."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#heapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"HeapAnalysisOptions"))," | this is the auto-generated input passed to all the ",(0,t.yg)("inlineCode",{parentName:"li"},"BaseAnalysis")," instances"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"IHeapSnapshot"),">"," | the graph representation of the heap"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples:"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport type {HeapAnalysisOptions} from '@memlab/heap-analysis';\nimport {loadHeapSnapshot, BaseAnalysis} from '@memlab/heap-analysis';\n\nclass ExampleAnalysis extends BaseAnalysis {\n public getCommandName(): string {\n return 'example-analysis';\n }\n\n public getDescription(): string {\n return 'an example analysis for demo';\n }\n\n async process(options: HeapAnalysisOptions): Promise {\n const heap = await loadHeapSnapshot(options);\n // doing heap analysis\n }\n}\n")),(0,t.yg)("p",null,"Use the following code to invoke the heap analysis:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ExampleAnalysis();\n// any .heapsnapshot file recorded by memlab or saved manually from Chrome\nawait analysis.analyzeSnapshotFromFile(snapshotFile);\n")),(0,t.yg)("p",null,"The new heap analysis can also be used with ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#analyze"},"analyze"),", in that case\n",(0,t.yg)("inlineCode",{parentName:"p"},"loadHeapSnapshot")," will use the last heap snapshot in alphanumerically\nascending order from ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},"BrowserInteractionResultReader"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L450"},"heap-analysis/src/PluginUtils.ts:450"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"snapshotmapreducet1-t2mapcallback-reducecallback-options"},(0,t.yg)("a",{id:"snapshotmapreduce"}),(0,t.yg)("strong",{parentName:"h3"},"snapshotMapReduce"),"<",(0,t.yg)("inlineCode",{parentName:"h3"},"T1"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"T2"),">","(",(0,t.yg)("inlineCode",{parentName:"h3"},"mapCallback"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"reduceCallback"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"options"),")"),(0,t.yg)("p",null,"When a heap analysis is taking multiple heap snapshots as input for memory\nanalysis (e.g., finding which object keeps growing in size in a series of\nheap snapshots), this API could be used to do\n",(0,t.yg)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/MapReduce"},"MapRedue")," on all heap snapshots."),(0,t.yg)("p",null,"This API is supposed to be used within the ",(0,t.yg)("inlineCode",{parentName:"p"},"process")," implementation\nof an ",(0,t.yg)("inlineCode",{parentName:"p"},"BaseAnalysis")," instance that is designed to analyze multiple heap\nsnapshots (as an example, finding which object keeps growing overtime)"),(0,t.yg)("h4",{id:"type-parameters"},"Type parameters"),(0,t.yg)("table",null,(0,t.yg)("thead",{parentName:"table"},(0,t.yg)("tr",{parentName:"thead"},(0,t.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,t.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,t.yg)("tbody",{parentName:"table"},(0,t.yg)("tr",{parentName:"tbody"},(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"T1")),(0,t.yg)("td",{parentName:"tr",align:"left"},"the type of the intermediate result from each map function call")),(0,t.yg)("tr",{parentName:"tbody"},(0,t.yg)("td",{parentName:"tr",align:"left"},(0,t.yg)("inlineCode",{parentName:"td"},"T2")),(0,t.yg)("td",{parentName:"tr",align:"left"},"the type of the final result of the reduce function call")))),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"mapCallback"),": (",(0,t.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"IHeapSnapshot"),", ",(0,t.yg)("inlineCode",{parentName:"li"},"i"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"number"),", ",(0,t.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string"),") => ",(0,t.yg)("inlineCode",{parentName:"li"},"T1")," | the map function in MapReduce, the function will be applied to each heap snapshot"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"reduceCallback"),": (",(0,t.yg)("inlineCode",{parentName:"li"},"results"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"T1"),"[]) => ",(0,t.yg)("inlineCode",{parentName:"li"},"T2")," | the reduce function in MapReduce, the function will take as input all intermediate results from all map function calls"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#heapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"HeapAnalysisOptions"))," | this is the auto-generated input passed to all the ",(0,t.yg)("inlineCode",{parentName:"li"},"BaseAnalysis")," instances"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"li"},"T2"),">"," | the return value of your reduce function"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples:"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport type {HeapAnalysisOptions} from '@memlab/heap-analysis';\nimport {snapshotMapReduce, BaseAnalysis} from '@memlab/heap-analysis';\n\nclass ExampleAnalysis extends BaseAnalysis {\n public getCommandName(): string {\n return 'example-analysis';\n }\n\n public getDescription(): string {\n return 'an example analysis for demo';\n }\n\n async process(options: HeapAnalysisOptions): Promise {\n // check if the number of heap objects keeps growing overtime\n const isMonotonicIncreasing = await snapshotMapReduce(\n (heap) => heap.nodes.length,\n (nodeCounts) =>\n nodeCounts[0] < nodeCounts[nodeCounts.length - 1] &&\n nodeCounts.every((count, i) => i === 0 || count >= nodeCounts[i - 1]),\n options,\n );\n }\n}\n")),(0,t.yg)("p",null,"Use the following code to invoke the heap analysis:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ExampleAnalysis();\n// snapshotDir includes a series of .heapsnapshot files recorded by\n// memlab or saved manually from Chrome, those files will be loaded\n// in alphanumerically ascending order\nawait analysis.analyzeSnapshotsInDirectory(snapshotDir);\n")),(0,t.yg)("p",null,"The new heap analysis can also be used with ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#analyze"},"analyze"),", in that case\n",(0,t.yg)("inlineCode",{parentName:"p"},"snapshotMapReduce")," will use all the heap snapshot in alphanumerically\nascending order from ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},"BrowserInteractionResultReader"),"."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},"Why not passing in all heap snapshots as an array of ",(0,t.yg)("a",{parentName:"strong",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"),"s?"),"\nEach heap snapshot could be non-trivial in size, loading them all at once\nmay not be possible."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L592"},"heap-analysis/src/PluginUtils.ts:592"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"takenodefullheap"},(0,t.yg)("a",{id:"takenodefullheap"}),(0,t.yg)("strong",{parentName:"h3"},"takeNodeFullHeap"),"()"),(0,t.yg)("p",null,"Take a heap snapshot of the current program state\nand parse it as ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"),". This\nAPI also calculates some heap analysis meta data\nfor heap analysis. But this also means slower heap parsing\ncomparing with ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#takenodeminimalheap"},"takeNodeMinimalHeap"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"p"},"Promise"),"<",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapSnapshot"),">"," | heap representation with heap analysis meta data.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples:")))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport type {takeNodeFullHeap} from '@memlab/heap-analysis';\n\n(async function () {\n const heap: IHeapSnapshot = await takeNodeFullHeap();\n})();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/PluginUtils.ts#L507"},"heap-analysis/src/PluginUtils.ts:507"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5be78946.d05ac803.js b/assets/js/5be78946.770eca4f.js similarity index 98% rename from assets/js/5be78946.d05ac803.js rename to assets/js/5be78946.770eca4f.js index e7482340..13269505 100644 --- a/assets/js/5be78946.d05ac803.js +++ b/assets/js/5be78946.770eca4f.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8485],{5680:(e,a,n)=>{n.d(a,{xA:()=>p,yg:()=>g});var r=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var s=r.createContext({}),c=function(e){var a=r.useContext(s),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},p=function(e){var a=c(e.components);return r.createElement(s.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},f=r.forwardRef((function(e,a){var n=e.components,t=e.mdxType,l=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=c(n),f=t,g=d["".concat(s,".").concat(f)]||d[f]||m[f]||l;return n?r.createElement(g,i(i({ref:a},p),{},{components:n})):r.createElement(g,i({ref:a},p))}));function g(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var l=n.length,i=new Array(l);i[0]=f;var o={};for(var s in a)hasOwnProperty.call(a,s)&&(o[s]=a[s]);o.originalType=e,o[d]="string"==typeof e?e:t,i[1]=o;for(var c=2;c{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var r=n(8168),t=(n(6540),n(5680));const l={id:"core_src.ILeakFilter",title:"Interface: ILeakFilter",sidebar_label:"ILeakFilter",custom_edit_url:null},i=void 0,o={unversionedId:"api/interfaces/core_src.ILeakFilter",id:"api/interfaces/core_src.ILeakFilter",title:"Interface: ILeakFilter",description:"The ILeakFilter interface allows you to define a leak detector and",source:"@site/docs/api/interfaces/core_src.ILeakFilter.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.ILeakFilter",permalink:"/memlab/docs/api/interfaces/core_src.ILeakFilter",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.ILeakFilter",title:"Interface: ILeakFilter",sidebar_label:"ILeakFilter",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapStringNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},next:{title:"IScenario",permalink:"/memlab/docs/api/interfaces/core_src.IScenario"}},s={},c=[{value:"Properties",id:"properties",level:2},{value:' Optional beforeLeakFilter: InitLeakFilterCallback',id:"-optional-beforeleakfilter-initleakfiltercallback",level:3},{value:' Optional leakFilter: LeakFilterCallback',id:"-optional-leakfilter-leakfiltercallback",level:3},{value:' Optional retainerReferenceFilter: ReferenceFilterCallback',id:"-optional-retainerreferencefilter-referencefiltercallback",level:3}],p={toc:c},d="wrapper";function m(e){let{components:a,...n}=e;return(0,t.yg)(d,(0,r.A)({},p,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"The ",(0,t.yg)("inlineCode",{parentName:"p"},"ILeakFilter")," interface allows you to define a leak detector and\ncustomize the leak filtering logic in memlab (instead of using the\nbuilt-in leak filters)."),(0,t.yg)("p",null,"Use the leak filter definition in command line interface to filter\nleaks detected from browser interactions"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab run --scenario --leak-filter \n")),(0,t.yg)("p",null,"If you have already run ",(0,t.yg)("inlineCode",{parentName:"p"},"memlab run")," or ",(0,t.yg)("inlineCode",{parentName:"p"},"memlab snapshot")," which saved\nheap snapshot and other meta data on disk, use the following command\nto filter leaks based on those saved heap snapshots (query the default\ndata location by ",(0,t.yg)("inlineCode",{parentName:"p"},"memlab get-default-work-dir"),")."),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab find-leaks --leak-filter \n")),(0,t.yg)("p",null,"Here is an example TypeScript file defining a leak filter.\nThe command line interface only accepts compiled JavaScript file.\nYou can also define the leak filter in JavaScript (without the\ntype annotations."),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import {IHeapNode, IHeapSnapshot, HeapNodeIdSet, utils} from '@memlab/core';\n\nfunction initMap(snapshot: IHeapSnapshot): Record {\n const map = Object.create(null);\n snapshot.nodes.forEach(node => {\n if (node.type !== 'string') {\n return;\n }\n const str = utils.getStringNodeValue(node);\n if (str in map) {\n ++map[str];\n } else {\n map[str] = 1;\n }\n });\n return map;\n}\nconst beforeLeakFilter = (snapshot: IHeapSnapshot, _leakedNodeIds: HeapNodeIdSet): void => {\n map = initMap(snapshot);\n};\n\n// duplicated string with size > 1KB as memory leak\nconst leakFilter = (node: IHeapNode): boolean => {\n if (node.type !== 'string' || node.retainedSize < 1000) {\n return false;\n }\n const str = utils.getStringNodeValue(node);\n return map[str] > 1;\n};\n\nexport default {beforeLeakFilter, leakFilter};\n")),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-optional-beforeleakfilter-initleakfiltercallback"},(0,t.yg)("a",{id:"beforeleakfilter",name:"beforeleakfilter"})," ",(0,t.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,t.yg)("strong",{parentName:"h3"},"beforeLeakFilter"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#initleakfiltercallback"},(0,t.yg)("inlineCode",{parentName:"a"},"InitLeakFilterCallback"))),(0,t.yg)("p",null,"Lifecycle function callback that is invoked initially once before\nthe subsequent ",(0,t.yg)("inlineCode",{parentName:"p"},"leakFilter")," function calls. This callback could\nbe used to initialize some data stores or any one-off\npreprocessings."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,t.yg)("code",null,(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the final heap\nsnapshot taken after all browser interactions are done.\nCheck out ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Set")," | the set of ids of all JS heap objects\nallocated by the ",(0,t.yg)("inlineCode",{parentName:"li"},"action")," call but not released after the ",(0,t.yg)("inlineCode",{parentName:"li"},"back")," call\nin browser."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-javascript"},"module.exports = {\n beforeLeakFilter: (snapshot, leakedNodeIds) {\n // initialize some data stores\n },\n leakFilter(node, snapshot, leakedNodeIds) {\n // use the data stores\n },\n};\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L428"},"core/src/lib/Types.ts:428"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-optional-leakfilter-leakfiltercallback"},(0,t.yg)("a",{id:"leakfilter",name:"leakfilter"})," ",(0,t.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,t.yg)("strong",{parentName:"h3"},"leakFilter"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#leakfiltercallback"},(0,t.yg)("inlineCode",{parentName:"a"},"LeakFilterCallback"))),(0,t.yg)("p",null,"This callback defines how you want to filter out the\nleaked objects. The callback is called for every node (JS heap\nobject in browser) allocated by the ",(0,t.yg)("inlineCode",{parentName:"p"},"action")," callback, but not\nreleased after the ",(0,t.yg)("inlineCode",{parentName:"p"},"back")," callback. Those objects could be caches\nthat are retained in memory on purpose, or they are memory leaks."),(0,t.yg)("p",null,"This optional callback allows you to define your own algorithm\nto cherry pick memory leaks for specific JS program under test."),(0,t.yg)("p",null,"If this optional callback is not defined, memlab will use its\nbuilt-in leak filter, which considers detached DOM elements\nand unmounted Fiber nodes (detached from React Fiber tree) as\nmemory leaks."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"node"),": ",(0,t.yg)("code",null,(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode"))," | the heap object\nallocated but not released. This filter callback will be applied\nto each node allocated but not released in the heap snapshot."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,t.yg)("code",null,(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the final heap\nsnapshot taken after all browser interactions are done.\nCheck out ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Set")," | the set of ids of all JS heap objects\nallocated by the ",(0,t.yg)("inlineCode",{parentName:"li"},"action")," call but not released after the ",(0,t.yg)("inlineCode",{parentName:"li"},"back")," call\nin browser."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": the boolean value indicating whether the given node in\nthe snapshot should be considered as leaked.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-javascript"},"// save as leak-filter.js\nmodule.exports = {\n leakFilter(node, snapshot, leakedNodeIds) {\n // any unreleased node (JS heap object) with 1MB+\n // retained size is considered a memory leak\n return node.retainedSize > 1000000;\n },\n};\n")),(0,t.yg)("p",null,"Use the leak filter definition in command line interface:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab find-leaks --leak-filter \n")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab run --scenario --leak-filter \n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L480"},"core/src/lib/Types.ts:480"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-optional-retainerreferencefilter-referencefiltercallback"},(0,t.yg)("a",{id:"retainerreferencefilter",name:"retainerreferencefilter"})," ",(0,t.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,t.yg)("strong",{parentName:"h3"},"retainerReferenceFilter"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#referencefiltercallback"},(0,t.yg)("inlineCode",{parentName:"a"},"ReferenceFilterCallback"))),(0,t.yg)("p",null,"Callback that can be used to define a logic to decide whether\na reference should be considered as part of the retainer trace.\nThe callback is called for every reference (edge) in the heap snapshot."),(0,t.yg)("p",null,"For concrete examples, check out ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.ILeakFilter#leakfilter"},"leakFilter"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edge")," : ",(0,t.yg)("code",null,(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},"IHeapEdge"))," | the reference (edge)\nthat is considered for calcualting the retainer trace"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,t.yg)("code",null,(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the final heap\nsnapshot taken after all browser interactions are done.\nCheck out ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"isReferenceUsedByDefault"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"boolean")," | MemLab has its own default\nlogic for whether a reference should be considered as part of the\nretainer trace, if this parameter is true, it means MemLab will\nconsider this reference when calculating the retainer trace."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": the value indicating whether the given reference should be\nconsidered when calculating the retainer trace. Note that when this\ncallback returns true, the reference will only be considered as a candidate\nfor retainer trace, so it may or may not be included in the retainer trace;\nhowever, if this callback returns false, the reference will be excluded."))),(0,t.yg)("p",null,"Note that by excluding a dominator reference of an object (i.e., an edge\nthat must be traveled through to reach the heap object from GC roots),\nthe object will be considered as unreachable in the heap graph; and\ntherefore, the reference and heap object will not be included in the\nretainer trace detection and retainer size calculation."),(0,t.yg)("p",null,"Please also be aware that some edges like self-referencing edges,\nJS engine's internal edges, and hidden edges should not be considered\nas part of the retainer trace. These edges could make the retainer trace\nunncessarily complex and cause confusion. ",(0,t.yg)("inlineCode",{parentName:"p"},"isReferenceUsedByDefault")," will\nbe ",(0,t.yg)("inlineCode",{parentName:"p"},"false")," for these types of edges."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-javascript"},"// save as leak-filter.js\nmodule.exports = {\n retainerReferenceFilter(edge, _snapshot, _isReferenceUsedByDefault) {\n // exclude react fiber references\n if (edge.name_or_index.toString().startsWith('__reactFiber$')) {\n return false;\n }\n // exclude other references here\n // ...\n return true;\n }\n};\n")),(0,t.yg)("p",null,"Use the leak filter definition in command line interface:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab find-leaks --leak-filter \n")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab run --scenario --leak-filter \n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L543"},"core/src/lib/Types.ts:543"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8485],{5680:(e,a,n)=>{n.d(a,{xA:()=>p,yg:()=>g});var r=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var s=r.createContext({}),c=function(e){var a=r.useContext(s),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},p=function(e){var a=c(e.components);return r.createElement(s.Provider,{value:a},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},f=r.forwardRef((function(e,a){var n=e.components,t=e.mdxType,l=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=c(n),f=t,g=d["".concat(s,".").concat(f)]||d[f]||m[f]||l;return n?r.createElement(g,i(i({ref:a},p),{},{components:n})):r.createElement(g,i({ref:a},p))}));function g(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var l=n.length,i=new Array(l);i[0]=f;var o={};for(var s in a)hasOwnProperty.call(a,s)&&(o[s]=a[s]);o.originalType=e,o[d]="string"==typeof e?e:t,i[1]=o;for(var c=2;c{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var r=n(8168),t=(n(6540),n(5680));const l={id:"core_src.ILeakFilter",title:"Interface: ILeakFilter",sidebar_label:"ILeakFilter",custom_edit_url:null},i=void 0,o={unversionedId:"api/interfaces/core_src.ILeakFilter",id:"api/interfaces/core_src.ILeakFilter",title:"Interface: ILeakFilter",description:"The ILeakFilter interface allows you to define a leak detector and",source:"@site/docs/api/interfaces/core_src.ILeakFilter.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.ILeakFilter",permalink:"/memlab/docs/api/interfaces/core_src.ILeakFilter",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.ILeakFilter",title:"Interface: ILeakFilter",sidebar_label:"ILeakFilter",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapStringNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"},next:{title:"IScenario",permalink:"/memlab/docs/api/interfaces/core_src.IScenario"}},s={},c=[{value:"Properties",id:"properties",level:2},{value:' Optional beforeLeakFilter: InitLeakFilterCallback',id:"-optional-beforeleakfilter-initleakfiltercallback",level:3},{value:' Optional leakFilter: LeakFilterCallback',id:"-optional-leakfilter-leakfiltercallback",level:3},{value:' Optional retainerReferenceFilter: ReferenceFilterCallback',id:"-optional-retainerreferencefilter-referencefiltercallback",level:3}],p={toc:c},d="wrapper";function m(e){let{components:a,...n}=e;return(0,t.yg)(d,(0,r.A)({},p,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"The ",(0,t.yg)("inlineCode",{parentName:"p"},"ILeakFilter")," interface allows you to define a leak detector and\ncustomize the leak filtering logic in memlab (instead of using the\nbuilt-in leak filters)."),(0,t.yg)("p",null,"Use the leak filter definition in command line interface to filter\nleaks detected from browser interactions"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab run --scenario --leak-filter \n")),(0,t.yg)("p",null,"If you have already run ",(0,t.yg)("inlineCode",{parentName:"p"},"memlab run")," or ",(0,t.yg)("inlineCode",{parentName:"p"},"memlab snapshot")," which saved\nheap snapshot and other meta data on disk, use the following command\nto filter leaks based on those saved heap snapshots (query the default\ndata location by ",(0,t.yg)("inlineCode",{parentName:"p"},"memlab get-default-work-dir"),")."),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab find-leaks --leak-filter \n")),(0,t.yg)("p",null,"Here is an example TypeScript file defining a leak filter.\nThe command line interface only accepts compiled JavaScript file.\nYou can also define the leak filter in JavaScript (without the\ntype annotations."),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import {IHeapNode, IHeapSnapshot, HeapNodeIdSet, utils} from '@memlab/core';\n\nfunction initMap(snapshot: IHeapSnapshot): Record {\n const map = Object.create(null);\n snapshot.nodes.forEach(node => {\n if (node.type !== 'string') {\n return;\n }\n const str = utils.getStringNodeValue(node);\n if (str in map) {\n ++map[str];\n } else {\n map[str] = 1;\n }\n });\n return map;\n}\nconst beforeLeakFilter = (snapshot: IHeapSnapshot, _leakedNodeIds: HeapNodeIdSet): void => {\n map = initMap(snapshot);\n};\n\n// duplicated string with size > 1KB as memory leak\nconst leakFilter = (node: IHeapNode): boolean => {\n if (node.type !== 'string' || node.retainedSize < 1000) {\n return false;\n }\n const str = utils.getStringNodeValue(node);\n return map[str] > 1;\n};\n\nexport default {beforeLeakFilter, leakFilter};\n")),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-optional-beforeleakfilter-initleakfiltercallback"},(0,t.yg)("a",{id:"beforeleakfilter",name:"beforeleakfilter"})," ",(0,t.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,t.yg)("strong",{parentName:"h3"},"beforeLeakFilter"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#initleakfiltercallback"},(0,t.yg)("inlineCode",{parentName:"a"},"InitLeakFilterCallback"))),(0,t.yg)("p",null,"Lifecycle function callback that is invoked initially once before\nthe subsequent ",(0,t.yg)("inlineCode",{parentName:"p"},"leakFilter")," function calls. This callback could\nbe used to initialize some data stores or any one-off\npreprocessings."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,t.yg)("code",null,(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the final heap\nsnapshot taken after all browser interactions are done.\nCheck out ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Set")," | the set of ids of all JS heap objects\nallocated by the ",(0,t.yg)("inlineCode",{parentName:"li"},"action")," call but not released after the ",(0,t.yg)("inlineCode",{parentName:"li"},"back")," call\nin browser."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-javascript"},"module.exports = {\n beforeLeakFilter: (snapshot, leakedNodeIds) {\n // initialize some data stores\n },\n leakFilter(node, snapshot, leakedNodeIds) {\n // use the data stores\n },\n};\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L428"},"core/src/lib/Types.ts:428"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-optional-leakfilter-leakfiltercallback"},(0,t.yg)("a",{id:"leakfilter",name:"leakfilter"})," ",(0,t.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,t.yg)("strong",{parentName:"h3"},"leakFilter"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#leakfiltercallback"},(0,t.yg)("inlineCode",{parentName:"a"},"LeakFilterCallback"))),(0,t.yg)("p",null,"This callback defines how you want to filter out the\nleaked objects. The callback is called for every node (JS heap\nobject in browser) allocated by the ",(0,t.yg)("inlineCode",{parentName:"p"},"action")," callback, but not\nreleased after the ",(0,t.yg)("inlineCode",{parentName:"p"},"back")," callback. Those objects could be caches\nthat are retained in memory on purpose, or they are memory leaks."),(0,t.yg)("p",null,"This optional callback allows you to define your own algorithm\nto cherry pick memory leaks for specific JS program under test."),(0,t.yg)("p",null,"If this optional callback is not defined, memlab will use its\nbuilt-in leak filter, which considers detached DOM elements\nand unmounted Fiber nodes (detached from React Fiber tree) as\nmemory leaks."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"node"),": ",(0,t.yg)("code",null,(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode"))," | the heap object\nallocated but not released. This filter callback will be applied\nto each node allocated but not released in the heap snapshot."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,t.yg)("code",null,(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the final heap\nsnapshot taken after all browser interactions are done.\nCheck out ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Set")," | the set of ids of all JS heap objects\nallocated by the ",(0,t.yg)("inlineCode",{parentName:"li"},"action")," call but not released after the ",(0,t.yg)("inlineCode",{parentName:"li"},"back")," call\nin browser."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": the boolean value indicating whether the given node in\nthe snapshot should be considered as leaked.")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-javascript"},"// save as leak-filter.js\nmodule.exports = {\n leakFilter(node, snapshot, leakedNodeIds) {\n // any unreleased node (JS heap object) with 1MB+\n // retained size is considered a memory leak\n return node.retainedSize > 1000000;\n },\n};\n")),(0,t.yg)("p",null,"Use the leak filter definition in command line interface:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab find-leaks --leak-filter \n")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab run --scenario --leak-filter \n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L480"},"core/src/lib/Types.ts:480"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-optional-retainerreferencefilter-referencefiltercallback"},(0,t.yg)("a",{id:"retainerreferencefilter",name:"retainerreferencefilter"})," ",(0,t.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,t.yg)("strong",{parentName:"h3"},"retainerReferenceFilter"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#referencefiltercallback"},(0,t.yg)("inlineCode",{parentName:"a"},"ReferenceFilterCallback"))),(0,t.yg)("p",null,"Callback that can be used to define a logic to decide whether\na reference should be considered as part of the retainer trace.\nThe callback is called for every reference (edge) in the heap snapshot."),(0,t.yg)("p",null,"For concrete examples, check out ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.ILeakFilter#leakfilter"},"leakFilter"),"."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"edge")," : ",(0,t.yg)("code",null,(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},"IHeapEdge"))," | the reference (edge)\nthat is considered for calcualting the retainer trace"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,t.yg)("code",null,(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the final heap\nsnapshot taken after all browser interactions are done.\nCheck out ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"isReferenceUsedByDefault"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"boolean")," | MemLab has its own default\nlogic for whether a reference should be considered as part of the\nretainer trace, if this parameter is true, it means MemLab will\nconsider this reference when calculating the retainer trace."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": the value indicating whether the given reference should be\nconsidered when calculating the retainer trace. Note that when this\ncallback returns true, the reference will only be considered as a candidate\nfor retainer trace, so it may or may not be included in the retainer trace;\nhowever, if this callback returns false, the reference will be excluded."))),(0,t.yg)("p",null,"Note that by excluding a dominator reference of an object (i.e., an edge\nthat must be traveled through to reach the heap object from GC roots),\nthe object will be considered as unreachable in the heap graph; and\ntherefore, the reference and heap object will not be included in the\nretainer trace detection and retainer size calculation."),(0,t.yg)("p",null,"Please also be aware that some edges like self-referencing edges,\nJS engine's internal edges, and hidden edges should not be considered\nas part of the retainer trace. These edges could make the retainer trace\nunncessarily complex and cause confusion. ",(0,t.yg)("inlineCode",{parentName:"p"},"isReferenceUsedByDefault")," will\nbe ",(0,t.yg)("inlineCode",{parentName:"p"},"false")," for these types of edges."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-javascript"},"// save as leak-filter.js\nmodule.exports = {\n retainerReferenceFilter(edge, _snapshot, _isReferenceUsedByDefault) {\n // exclude react fiber references\n if (edge.name_or_index.toString().startsWith('__reactFiber$')) {\n return false;\n }\n // exclude other references here\n // ...\n return true;\n }\n};\n")),(0,t.yg)("p",null,"Use the leak filter definition in command line interface:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab find-leaks --leak-filter \n")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-bash"},"memlab run --scenario --leak-filter \n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L543"},"core/src/lib/Types.ts:543"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6b5d7254.113809e6.js b/assets/js/6b5d7254.fa96421c.js similarity index 97% rename from assets/js/6b5d7254.113809e6.js rename to assets/js/6b5d7254.fa96421c.js index 2b452e92..11c6f52a 100644 --- a/assets/js/6b5d7254.113809e6.js +++ b/assets/js/6b5d7254.fa96421c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9548],{5680:(e,a,n)=>{n.d(a,{xA:()=>c,yg:()=>y});var r=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var p=r.createContext({}),s=function(e){var a=r.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},c=function(e){var a=s(e.components);return r.createElement(p.Provider,{value:a},e.children)},g="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},d=r.forwardRef((function(e,a){var n=e.components,t=e.mdxType,l=e.originalType,p=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),g=s(n),d=t,y=g["".concat(p,".").concat(d)]||g[d]||m[d]||l;return n?r.createElement(y,i(i({ref:a},c),{},{components:n})):r.createElement(y,i({ref:a},c))}));function y(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var l=n.length,i=new Array(l);i[0]=d;var o={};for(var p in a)hasOwnProperty.call(a,p)&&(o[p]=a[p]);o.originalType=e,o[g]="string"==typeof e?e:t,i[1]=o;for(var s=2;s{n.r(a),n.d(a,{assets:()=>p,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>o,toc:()=>s});var r=n(8168),t=(n(6540),n(5680));const l={id:"core_src.IHeapEdges",title:"Interface: IHeapEdges",sidebar_label:"IHeapEdges",custom_edit_url:null},i=void 0,o={unversionedId:"api/interfaces/core_src.IHeapEdges",id:"api/interfaces/core_src.IHeapEdges",title:"Interface: IHeapEdges",description:"A pseudo array containing all heap graph edges (references to heap objects",source:"@site/docs/api/interfaces/core_src.IHeapEdges.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapEdges",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdges",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapEdges",title:"Interface: IHeapEdges",sidebar_label:"IHeapEdges",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapEdge",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},next:{title:"IHeapLocation",permalink:"/memlab/docs/api/interfaces/core_src.IHeapLocation"}},p={},s=[{value:"Properties",id:"properties",level:2},{value:' length: number',id:"-length-number",level:3},{value:"Methods",id:"methods",level:2},{value:'forEach(callback)',id:"foreachcallback",level:3},{value:'get(index)',id:"getindex",level:3}],c={toc:s},g="wrapper";function m(e){let{components:a,...n}=e;return(0,t.yg)(g,(0,r.A)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"A pseudo array containing all heap graph edges (references to heap objects\nin heap). A JS heap could contain millions of references, so memlab uses\na pseudo array as the collection of all the heap edges. The pseudo\narray provides API to query and traverse all heap references."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"readonly"))," modifying this pseudo array is not recommended"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapEdges} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n const edges: IHeapEdges = heap.edges;\n edges.length;\n edges.get(0);\n edges.forEach((edge, i) => {\n if (stopIteration) {\n return false;\n }\n });\n})();\n")),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-length-number"},(0,t.yg)("a",{id:"length",name:"length"})," ",(0,t.yg)("strong",{parentName:"h3"},"length"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The total number of edges in heap graph (or JS references in heap\nsnapshot)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1731"},"core/src/lib/Types.ts:1731"))))),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"foreachcallback"},(0,t.yg)("a",{id:"foreach"}),(0,t.yg)("strong",{parentName:"h3"},"forEach"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"Iterate over all array elements and apply the callback\nto each element in ascending order of element index."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": (",(0,t.yg)("inlineCode",{parentName:"li"},"edge"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),", ",(0,t.yg)("inlineCode",{parentName:"li"},"index"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"number"),") => ",(0,t.yg)("inlineCode",{parentName:"li"},"boolean")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"void")," | the callback does not need to return any value, if the callback returns ",(0,t.yg)("inlineCode",{parentName:"li"},"false")," when iterating on element at index ",(0,t.yg)("inlineCode",{parentName:"li"},"i"),", then all elements after ",(0,t.yg)("inlineCode",{parentName:"li"},"i")," won't be iterated."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1747"},"core/src/lib/Types.ts:1747"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getindex"},(0,t.yg)("a",{id:"get"}),(0,t.yg)("strong",{parentName:"h3"},"get"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"index"),")"),(0,t.yg)("p",null,"get an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},"IHeapEdge")," element at the specified index"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"index"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the index of an element in the pseudo array, the index ranges from 0 to array length - 1. Notice that this is not the heap node id."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | When 0 <= ",(0,t.yg)("inlineCode",{parentName:"p"},"index")," < array.length, this API returns the element\nat the specified index, otherwise it returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null"),".")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1739"},"core/src/lib/Types.ts:1739"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9548],{5680:(e,a,n)=>{n.d(a,{xA:()=>c,yg:()=>y});var r=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var p=r.createContext({}),s=function(e){var a=r.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},c=function(e){var a=s(e.components);return r.createElement(p.Provider,{value:a},e.children)},g="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},d=r.forwardRef((function(e,a){var n=e.components,t=e.mdxType,l=e.originalType,p=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),g=s(n),d=t,y=g["".concat(p,".").concat(d)]||g[d]||m[d]||l;return n?r.createElement(y,i(i({ref:a},c),{},{components:n})):r.createElement(y,i({ref:a},c))}));function y(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var l=n.length,i=new Array(l);i[0]=d;var o={};for(var p in a)hasOwnProperty.call(a,p)&&(o[p]=a[p]);o.originalType=e,o[g]="string"==typeof e?e:t,i[1]=o;for(var s=2;s{n.r(a),n.d(a,{assets:()=>p,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>o,toc:()=>s});var r=n(8168),t=(n(6540),n(5680));const l={id:"core_src.IHeapEdges",title:"Interface: IHeapEdges",sidebar_label:"IHeapEdges",custom_edit_url:null},i=void 0,o={unversionedId:"api/interfaces/core_src.IHeapEdges",id:"api/interfaces/core_src.IHeapEdges",title:"Interface: IHeapEdges",description:"A pseudo array containing all heap graph edges (references to heap objects",source:"@site/docs/api/interfaces/core_src.IHeapEdges.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapEdges",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdges",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapEdges",title:"Interface: IHeapEdges",sidebar_label:"IHeapEdges",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapEdge",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},next:{title:"IHeapLocation",permalink:"/memlab/docs/api/interfaces/core_src.IHeapLocation"}},p={},s=[{value:"Properties",id:"properties",level:2},{value:' length: number',id:"-length-number",level:3},{value:"Methods",id:"methods",level:2},{value:'forEach(callback)',id:"foreachcallback",level:3},{value:'get(index)',id:"getindex",level:3}],c={toc:s},g="wrapper";function m(e){let{components:a,...n}=e;return(0,t.yg)(g,(0,r.A)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"A pseudo array containing all heap graph edges (references to heap objects\nin heap). A JS heap could contain millions of references, so memlab uses\na pseudo array as the collection of all the heap edges. The pseudo\narray provides API to query and traverse all heap references."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"readonly"))," modifying this pseudo array is not recommended"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapEdges} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n const edges: IHeapEdges = heap.edges;\n edges.length;\n edges.get(0);\n edges.forEach((edge, i) => {\n if (stopIteration) {\n return false;\n }\n });\n})();\n")),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-length-number"},(0,t.yg)("a",{id:"length",name:"length"})," ",(0,t.yg)("strong",{parentName:"h3"},"length"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The total number of edges in heap graph (or JS references in heap\nsnapshot)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1731"},"core/src/lib/Types.ts:1731"))))),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"foreachcallback"},(0,t.yg)("a",{id:"foreach"}),(0,t.yg)("strong",{parentName:"h3"},"forEach"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"Iterate over all array elements and apply the callback\nto each element in ascending order of element index."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": (",(0,t.yg)("inlineCode",{parentName:"li"},"edge"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),", ",(0,t.yg)("inlineCode",{parentName:"li"},"index"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"number"),") => ",(0,t.yg)("inlineCode",{parentName:"li"},"boolean")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"void")," | the callback does not need to return any value, if the callback returns ",(0,t.yg)("inlineCode",{parentName:"li"},"false")," when iterating on element at index ",(0,t.yg)("inlineCode",{parentName:"li"},"i"),", then all elements after ",(0,t.yg)("inlineCode",{parentName:"li"},"i")," won't be iterated."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1747"},"core/src/lib/Types.ts:1747"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getindex"},(0,t.yg)("a",{id:"get"}),(0,t.yg)("strong",{parentName:"h3"},"get"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"index"),")"),(0,t.yg)("p",null,"get an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},"IHeapEdge")," element at the specified index"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"index"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the index of an element in the pseudo array, the index ranges from 0 to array length - 1. Notice that this is not the heap node id."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapEdge")),">"," | When 0 <= ",(0,t.yg)("inlineCode",{parentName:"p"},"index")," < array.length, this API returns the element\nat the specified index, otherwise it returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null"),".")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1739"},"core/src/lib/Types.ts:1739"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/72eddb53.946b8ce2.js b/assets/js/72eddb53.67cf03cb.js similarity index 98% rename from assets/js/72eddb53.946b8ce2.js rename to assets/js/72eddb53.67cf03cb.js index 272045e8..5e80b7a0 100644 --- a/assets/js/72eddb53.946b8ce2.js +++ b/assets/js/72eddb53.67cf03cb.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[1473],{5680:(e,a,n)=>{n.d(a,{xA:()=>c,yg:()=>g});var t=n(6540);function l(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function s(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(l[n]=e[n]);return l}(e,a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},c=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},y="mdxType",u={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},m=t.forwardRef((function(e,a){var n=e.components,l=e.mdxType,s=e.originalType,o=e.parentName,c=r(e,["components","mdxType","originalType","parentName"]),y=p(n),m=l,g=y["".concat(o,".").concat(m)]||y[m]||u[m]||s;return n?t.createElement(g,i(i({ref:a},c),{},{components:n})):t.createElement(g,i({ref:a},c))}));function g(e,a){var n=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var s=n.length,i=new Array(s);i[0]=m;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[y]="string"==typeof e?e:l,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>r,toc:()=>p});var t=n(8168),l=(n(6540),n(5680));const s={id:"heap_analysis_src.ObjectShallowAnalysis",title:"Class: ObjectShallowAnalysis",sidebar_label:"ObjectShallowAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.ObjectShallowAnalysis",id:"api/classes/heap_analysis_src.ObjectShallowAnalysis",title:"Class: ObjectShallowAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ObjectShallowAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ObjectShallowAnalysis",title:"Class: ObjectShallowAnalysis",sidebar_label:"ObjectShallowAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ObjectFanoutAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis"},next:{title:"ObjectShapeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ObjectShallowAnalysis()',id:"new-objectshallowanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3},{value:'getTopDuplicatedObjectInCount()',id:"gettopduplicatedobjectincount",level:3}],c={toc:p},y="wrapper";function u(e){let{components:a,...n}=e;return(0,l.yg)(y,(0,t.A)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,l.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,l.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,l.yg)("p",{parentName:"li"},"\u21b3 ",(0,l.yg)("strong",{parentName:"p"},(0,l.yg)("inlineCode",{parentName:"strong"},"ObjectShallowAnalysis"))))),(0,l.yg)("h2",{id:"constructors"},"Constructors"),(0,l.yg)("h3",{id:"new-objectshallowanalysis"},(0,l.yg)("a",{id:"new objectshallowanalysis"}),(0,l.yg)("strong",{parentName:"h3"},"new ObjectShallowAnalysis"),"()"),(0,l.yg)("h2",{id:"methods"},"Methods"),(0,l.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,l.yg)("a",{id:"analyzesnapshotfromfile"}),(0,l.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,l.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,l.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,l.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Parameters"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,l.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,l.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,l.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Example"),":")),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,l.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Source"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"getcommandname"},(0,l.yg)("a",{id:"getcommandname"}),(0,l.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,l.yg)("p",null,"get CLI command name for this memory analysis;\nuse it with ",(0,l.yg)("inlineCode",{parentName:"p"},"memlab analyze ")," in CLI"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("strong",{parentName:"p"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"string")," | command name")),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("strong",{parentName:"p"},"Source"),":"),(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/ObjectShallowAnalysis.ts#L65"},"heap-analysis/src/plugins/ObjectShallowAnalysis.ts:65"))))),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"gettopduplicatedobjectincount"},(0,l.yg)("a",{id:"gettopduplicatedobjectincount"}),(0,l.yg)("strong",{parentName:"h3"},"getTopDuplicatedObjectInCount"),"()"),(0,l.yg)("p",null,"get the top duplicated object in terms of duplicated object count"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("strong",{parentName:"p"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"ObjectRecord"),"[] | an array of the top-duplicated objects' information")),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("strong",{parentName:"p"},"Source"),":"),(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/ObjectShallowAnalysis.ts#L108"},"heap-analysis/src/plugins/ObjectShallowAnalysis.ts:108"))))))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[1473],{5680:(e,a,n)=>{n.d(a,{xA:()=>c,yg:()=>g});var t=n(6540);function l(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function s(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(l[n]=e[n]);return l}(e,a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},c=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},y="mdxType",u={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},m=t.forwardRef((function(e,a){var n=e.components,l=e.mdxType,s=e.originalType,o=e.parentName,c=r(e,["components","mdxType","originalType","parentName"]),y=p(n),m=l,g=y["".concat(o,".").concat(m)]||y[m]||u[m]||s;return n?t.createElement(g,i(i({ref:a},c),{},{components:n})):t.createElement(g,i({ref:a},c))}));function g(e,a){var n=arguments,l=a&&a.mdxType;if("string"==typeof e||l){var s=n.length,i=new Array(s);i[0]=m;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[y]="string"==typeof e?e:l,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>r,toc:()=>p});var t=n(8168),l=(n(6540),n(5680));const s={id:"heap_analysis_src.ObjectShallowAnalysis",title:"Class: ObjectShallowAnalysis",sidebar_label:"ObjectShallowAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.ObjectShallowAnalysis",id:"api/classes/heap_analysis_src.ObjectShallowAnalysis",title:"Class: ObjectShallowAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ObjectShallowAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ObjectShallowAnalysis",title:"Class: ObjectShallowAnalysis",sidebar_label:"ObjectShallowAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ObjectFanoutAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis"},next:{title:"ObjectShapeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ObjectShallowAnalysis()',id:"new-objectshallowanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3},{value:'getTopDuplicatedObjectInCount()',id:"gettopduplicatedobjectincount",level:3}],c={toc:p},y="wrapper";function u(e){let{components:a,...n}=e;return(0,l.yg)(y,(0,t.A)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,l.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,l.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,l.yg)("p",{parentName:"li"},"\u21b3 ",(0,l.yg)("strong",{parentName:"p"},(0,l.yg)("inlineCode",{parentName:"strong"},"ObjectShallowAnalysis"))))),(0,l.yg)("h2",{id:"constructors"},"Constructors"),(0,l.yg)("h3",{id:"new-objectshallowanalysis"},(0,l.yg)("a",{id:"new objectshallowanalysis"}),(0,l.yg)("strong",{parentName:"h3"},"new ObjectShallowAnalysis"),"()"),(0,l.yg)("h2",{id:"methods"},"Methods"),(0,l.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,l.yg)("a",{id:"analyzesnapshotfromfile"}),(0,l.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,l.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,l.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,l.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Parameters"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,l.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,l.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,l.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,l.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Example"),":")),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,l.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("strong",{parentName:"li"},"Source"),":",(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"getcommandname"},(0,l.yg)("a",{id:"getcommandname"}),(0,l.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,l.yg)("p",null,"get CLI command name for this memory analysis;\nuse it with ",(0,l.yg)("inlineCode",{parentName:"p"},"memlab analyze ")," in CLI"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("strong",{parentName:"p"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"string")," | command name")),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("strong",{parentName:"p"},"Source"),":"),(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/ObjectShallowAnalysis.ts#L65"},"heap-analysis/src/plugins/ObjectShallowAnalysis.ts:65"))))),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"gettopduplicatedobjectincount"},(0,l.yg)("a",{id:"gettopduplicatedobjectincount"}),(0,l.yg)("strong",{parentName:"h3"},"getTopDuplicatedObjectInCount"),"()"),(0,l.yg)("p",null,"get the top duplicated object in terms of duplicated object count"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("strong",{parentName:"p"},"Returns"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"ObjectRecord"),"[] | an array of the top-duplicated objects' information")),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},(0,l.yg)("strong",{parentName:"p"},"Source"),":"),(0,l.yg)("ul",{parentName:"li"},(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/ObjectShallowAnalysis.ts#L108"},"heap-analysis/src/plugins/ObjectShallowAnalysis.ts:108"))))))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8158.45fb47a3.js b/assets/js/8158.45fb47a3.js new file mode 100644 index 00000000..c88a4ed1 --- /dev/null +++ b/assets/js/8158.45fb47a3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8158],{8158:(e,a,s)=>{s.r(a),s.d(a,{DocSearchModal:()=>b.a1});var b=s(3219)}}]); \ No newline at end of file diff --git a/assets/js/8b21a35a.85e6694e.js b/assets/js/8b21a35a.aa28b6bb.js similarity index 98% rename from assets/js/8b21a35a.85e6694e.js rename to assets/js/8b21a35a.aa28b6bb.js index 87608547..1c218dfa 100644 --- a/assets/js/8b21a35a.85e6694e.js +++ b/assets/js/8b21a35a.aa28b6bb.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[6640],{5680:(e,a,n)=>{n.d(a,{xA:()=>m,yg:()=>u});var t=n(6540);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function i(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var a=1;a=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=t.createContext({}),p=function(e){var a=t.useContext(s),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},m=function(e){var a=p(e.components);return t.createElement(s.Provider,{value:a},e.children)},g="mdxType",y={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},d=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),g=p(n),d=r,u=g["".concat(s,".").concat(d)]||g[d]||y[d]||i;return n?t.createElement(u,l(l({ref:a},m),{},{components:n})):t.createElement(u,l({ref:a},m))}));function u(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var s in a)hasOwnProperty.call(a,s)&&(o[s]=a[s]);o.originalType=e,o[g]="string"==typeof e?e:r,l[1]=o;for(var p=2;p{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>l,default:()=>y,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var t=n(8168),r=(n(6540),n(5680));const i={id:"api_src",title:"Package: @memlab/api",sidebar_label:"api/src",sidebar_position:0,custom_edit_url:null},l=void 0,o={unversionedId:"api/modules/api_src",id:"api/modules/api_src",title:"Package: @memlab/api",description:"Enumerations",source:"@site/docs/api/modules/api_src.md",sourceDirName:"api/modules",slug:"/api/modules/api_src",permalink:"/memlab/docs/api/modules/api_src",draft:!1,editUrl:null,tags:[],version:"current",sidebarPosition:0,frontMatter:{id:"api_src",title:"Package: @memlab/api",sidebar_label:"api/src",sidebar_position:0,custom_edit_url:null},sidebar:"sidebar",previous:{title:"Table of contents",permalink:"/memlab/docs/api/"},next:{title:"core/src",permalink:"/memlab/docs/api/modules/core_src"}},s={},p=[{value:"Enumerations",id:"enumerations",level:2},{value:"Classes",id:"classes",level:2},{value:"Type Aliases",id:"type-aliases",level:2},{value:' RunOptions: Object',id:"-runoptions-object",level:3},{value:' RunResult: Object',id:"-runresult-object",level:3},{value:"Functions",id:"functions",level:2},{value:'analyze(runResult, heapAnalyzer, args?)',id:"analyzerunresult-heapanalyzer-args",level:3},{value:'findLeaks(runResult, options?)',id:"findleaksrunresult-options",level:3},{value:'findLeaksBySnapshotFilePaths(baselineSnapshot, targetSnapshot, finalSnapshot, options?)',id:"findleaksbysnapshotfilepathsbaselinesnapshot-targetsnapshot-finalsnapshot-options",level:3},{value:'run(options?)',id:"runoptions",level:3},{value:'takeSnapshots(options?)',id:"takesnapshotsoptions",level:3},{value:'warmupAndTakeSnapshots(options?)',id:"warmupandtakesnapshotsoptions",level:3}],m={toc:p},g="wrapper";function y(e){let{components:a,...n}=e;return(0,r.yg)(g,(0,t.A)({},m,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("h2",{id:"enumerations"},"Enumerations"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},"ConsoleMode"))),(0,r.yg)("h2",{id:"classes"},"Classes"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},"BrowserInteractionResultReader")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/api_src.SnapshotResultReader"},"SnapshotResultReader"))),(0,r.yg)("h2",{id:"type-aliases"},"Type Aliases"),(0,r.yg)("h3",{id:"-runoptions-object"},(0,r.yg)("a",{id:"runoptions",name:"runoptions"})," ",(0,r.yg)("strong",{parentName:"h3"},"RunOptions"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"Object")),(0,r.yg)("p",null,"Options for configuring browser interaction run, all fields are optional"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"chromiumBinary?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"if not specified, memlab will use the Chromium binary installed by Puppeteer. Use this option to specify a different binary if Puppeteer does not install the Chromium binary correctly (e.g., in a environtment Docker) or when you may want to use a different version of Chromium binary.")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"consoleMode?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},(0,r.yg)("inlineCode",{parentName:"a"},"ConsoleMode"))),(0,r.yg)("td",{parentName:"tr",align:"left"},"specifying the terminal output mode, default is ",(0,r.yg)("inlineCode",{parentName:"td"},"default"),". For more details. please check out ",(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},"ConsoleMode"))),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"cookiesFile?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"the absolute path of cookies file")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"evalInBrowserAfterInitLoad?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"AnyFunction")),(0,r.yg)("td",{parentName:"tr",align:"left"},"function to be evaluated in browser context after the web page initial load. Note that this function is defined in node.js context but it will be evaluated in browser context so the function should not use any closure variables outside of the browser context.")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"scenario?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"IScenario")),(0,r.yg)("td",{parentName:"tr",align:"left"},"test scenario specifying how to interact with browser (for more details view ",(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/interfaces/core_src.IScenario"},"IScenario"),")")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"skipWarmup?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"boolean")),(0,r.yg)("td",{parentName:"tr",align:"left"},"skip the initial page loading warmup for the web application being tested")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"snapshotForEachStep?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"boolean")),(0,r.yg)("td",{parentName:"tr",align:"left"},"if true, take heap snapshot for each interaction step, by default this is false, which means memlab will decide which steps it will take heap snapshots")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"webWorker?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"Optional"),"<",(0,r.yg)("inlineCode",{parentName:"td"},"string"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"if this field is provided, it specifies the web worker as the target for heap analysis. For example ",(0,r.yg)("inlineCode",{parentName:"td"},"{webWorker: null}")," means analyzing the heap of the first web worker found. ",(0,r.yg)("inlineCode",{parentName:"td"},"{webWorker: 'workerTitle'}")," means analyzing the heap of the web worker with name: ",(0,r.yg)("inlineCode",{parentName:"td"},"'workerTitle'"),".")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"workDir?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"specify the working directory where you want memlab to dump heap snapshots and other meta data of the test run. If no working directory is provided, memlab will generate a random temp directory under the operating system's default directory for temporary files. Note: It's the caller's responsibility to make sure the specified working directory exists.")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/API.ts#L47"},"api/src/API.ts:47"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-runresult-object"},(0,r.yg)("a",{id:"runresult",name:"runresult"})," ",(0,r.yg)("strong",{parentName:"h3"},"RunResult"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"Object")),(0,r.yg)("p",null,"A data structure holding the result of the ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#run"},"run")," API call."),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"leaks")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"ISerializedInfo"),"[]"),(0,r.yg)("td",{parentName:"tr",align:"left"},"leak traces detected and clustered from the browser interaction")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"runResult")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},(0,r.yg)("inlineCode",{parentName:"a"},"BrowserInteractionResultReader"))),(0,r.yg)("td",{parentName:"tr",align:"left"},"a utility for reading browser interaction results from disk")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/API.ts#L108"},"api/src/API.ts:108"))))),(0,r.yg)("h2",{id:"functions"},"Functions"),(0,r.yg)("h3",{id:"analyzerunresult-heapanalyzer-args"},(0,r.yg)("a",{id:"analyze"}),(0,r.yg)("strong",{parentName:"h3"},"analyze"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"runResult"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"heapAnalyzer"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"args?"),")"),(0,r.yg)("p",null,"This API analyzes heap snapshot(s) with a specified heap analysis.\nThis is equivalent to ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab analyze")," in CLI."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"runResult"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"default")," | return value of a browser interaction run"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"heapAnalyzer"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"BaseAnalysis")," | instance of a heap analysis"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"args"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"ParsedArgs")," | other CLI arguments that needs to be passed to the heap analysis"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"li"},"void"),">"," | each analysis may have a different return type, please check out\nthe type definition or the documentation for the ",(0,r.yg)("inlineCode",{parentName:"li"},"process")," method of the\nanalysis class you are using for ",(0,r.yg)("inlineCode",{parentName:"li"},"heapAnalyzer"),"."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {analyze, takeSnapshots, StringAnalysis} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const result = await takeSnapshots({scenario});\n const analysis = new StringAnalysis();\n await analyze(result, analysis);\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/API.ts#L328"},"api/src/API.ts:328"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"findleaksrunresult-options"},(0,r.yg)("a",{id:"findleaks"}),(0,r.yg)("strong",{parentName:"h3"},"findLeaks"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"runResult"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,r.yg)("p",null,"This API finds memory leaks by analyzing heap snapshot(s).\nThis is equivalent to ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab find-leaks")," in CLI."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"runResult"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"default")," | return value of a browser interaction run"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Object")," | configure memory leak detection run"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options.consoleMode?"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},(0,r.yg)("inlineCode",{parentName:"a"},"ConsoleMode"))," | specify the terminal output mode (see ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},"ConsoleMode"),")"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"li"},"ISerializedInfo"),"[]",">"," | leak traces detected and clustered from the browser interaction"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {findLeaks, takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const result = await takeSnapshots({scenario, consoleMode: 'SILENT'});\n const leaks = findLeaks(result, {consoleMode: 'CONTINUOUS_TEST'});\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/API.ts#L256"},"api/src/API.ts:256"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"findleaksbysnapshotfilepathsbaselinesnapshot-targetsnapshot-finalsnapshot-options"},(0,r.yg)("a",{id:"findleaksbysnapshotfilepaths"}),(0,r.yg)("strong",{parentName:"h3"},"findLeaksBySnapshotFilePaths"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"baselineSnapshot"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"targetSnapshot"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"finalSnapshot"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,r.yg)("p",null,"This API finds memory leaks by analyzing specified heap snapshots.\nThis is equivalent to ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab find-leaks")," with\nthe ",(0,r.yg)("inlineCode",{parentName:"p"},"--baseline"),", ",(0,r.yg)("inlineCode",{parentName:"p"},"--target"),", and ",(0,r.yg)("inlineCode",{parentName:"p"},"--final")," flags in CLI."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"baselineSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | the file path of the baseline heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"targetSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | the file path of the target heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"finalSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | the file path of the final heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Object")," | optionally, you can specify a mode for heap analysis"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options.consoleMode?"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},(0,r.yg)("inlineCode",{parentName:"a"},"ConsoleMode"))," | specify the terminal output mode (see ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},"ConsoleMode"),")"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options.workDir?"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | specify a working directory (other than the default one)"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"p"},"ISerializedInfo"),"[]",">"," | leak traces detected and clustered from the browser interaction")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/API.ts#L284"},"api/src/API.ts:284"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"runoptions"},(0,r.yg)("a",{id:"run"}),(0,r.yg)("strong",{parentName:"h3"},"run"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,r.yg)("p",null,"This API runs browser interaction and find memory leaks triggered in browser\nThis is equivalent to running ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab run")," in CLI.\nThis is also equivalent to warm up, and call ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#takesnapshots"},"takeSnapshots"),"\nand ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#findleaks"},"findLeaks"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/api_src#runoptions"},(0,r.yg)("inlineCode",{parentName:"a"},"RunOptions"))))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/api_src#runresult"},(0,r.yg)("inlineCode",{parentName:"a"},"RunResult")),">"," | memory leaks detected and a utility reading browser\ninteraction results from disk"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {run} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const {leaks} = await run({scenario});\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/API.ts#L188"},"api/src/API.ts:188"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"takesnapshotsoptions"},(0,r.yg)("a",{id:"takesnapshots"}),(0,r.yg)("strong",{parentName:"h3"},"takeSnapshots"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,r.yg)("p",null,"This API runs E2E interaction and takes heap snapshots.\nThis is equivalent to running ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab snapshot")," in CLI."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/api_src#runoptions"},(0,r.yg)("inlineCode",{parentName:"a"},"RunOptions"))," | configure browser interaction run"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},(0,r.yg)("inlineCode",{parentName:"a"},"BrowserInteractionResultReader")),">"," | a utility reading browser interaction results from disk"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const result = await takeSnapshots({scenario});\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/API.ts#L221"},"api/src/API.ts:221"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"warmupandtakesnapshotsoptions"},(0,r.yg)("a",{id:"warmupandtakesnapshots"}),(0,r.yg)("strong",{parentName:"h3"},"warmupAndTakeSnapshots"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,r.yg)("p",null,"This API warms up web server, runs E2E interaction, and takes heap snapshots.\nThis is equivalent to running ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab warmup-and-snapshot")," in CLI.\nThis is also equivalent to warm up and call ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#takesnapshots"},"takeSnapshots"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/api_src#runoptions"},(0,r.yg)("inlineCode",{parentName:"a"},"RunOptions"))," | configure browser interaction run"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},(0,r.yg)("inlineCode",{parentName:"a"},"BrowserInteractionResultReader")),">"," | browser interaction results"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {warmupAndTakeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const result = await warmupAndTakeSnapshots({scenario});\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/API.ts#L151"},"api/src/API.ts:151"))))))}y.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[6640],{5680:(e,a,n)=>{n.d(a,{xA:()=>m,yg:()=>u});var t=n(6540);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function i(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var a=1;a=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=t.createContext({}),p=function(e){var a=t.useContext(s),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},m=function(e){var a=p(e.components);return t.createElement(s.Provider,{value:a},e.children)},g="mdxType",y={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},d=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),g=p(n),d=r,u=g["".concat(s,".").concat(d)]||g[d]||y[d]||i;return n?t.createElement(u,l(l({ref:a},m),{},{components:n})):t.createElement(u,l({ref:a},m))}));function u(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var s in a)hasOwnProperty.call(a,s)&&(o[s]=a[s]);o.originalType=e,o[g]="string"==typeof e?e:r,l[1]=o;for(var p=2;p{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>l,default:()=>y,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var t=n(8168),r=(n(6540),n(5680));const i={id:"api_src",title:"Package: @memlab/api",sidebar_label:"api/src",sidebar_position:0,custom_edit_url:null},l=void 0,o={unversionedId:"api/modules/api_src",id:"api/modules/api_src",title:"Package: @memlab/api",description:"Enumerations",source:"@site/docs/api/modules/api_src.md",sourceDirName:"api/modules",slug:"/api/modules/api_src",permalink:"/memlab/docs/api/modules/api_src",draft:!1,editUrl:null,tags:[],version:"current",sidebarPosition:0,frontMatter:{id:"api_src",title:"Package: @memlab/api",sidebar_label:"api/src",sidebar_position:0,custom_edit_url:null},sidebar:"sidebar",previous:{title:"Table of contents",permalink:"/memlab/docs/api/"},next:{title:"core/src",permalink:"/memlab/docs/api/modules/core_src"}},s={},p=[{value:"Enumerations",id:"enumerations",level:2},{value:"Classes",id:"classes",level:2},{value:"Type Aliases",id:"type-aliases",level:2},{value:' RunOptions: Object',id:"-runoptions-object",level:3},{value:' RunResult: Object',id:"-runresult-object",level:3},{value:"Functions",id:"functions",level:2},{value:'analyze(runResult, heapAnalyzer, args?)',id:"analyzerunresult-heapanalyzer-args",level:3},{value:'findLeaks(runResult, options?)',id:"findleaksrunresult-options",level:3},{value:'findLeaksBySnapshotFilePaths(baselineSnapshot, targetSnapshot, finalSnapshot, options?)',id:"findleaksbysnapshotfilepathsbaselinesnapshot-targetsnapshot-finalsnapshot-options",level:3},{value:'run(options?)',id:"runoptions",level:3},{value:'takeSnapshots(options?)',id:"takesnapshotsoptions",level:3},{value:'warmupAndTakeSnapshots(options?)',id:"warmupandtakesnapshotsoptions",level:3}],m={toc:p},g="wrapper";function y(e){let{components:a,...n}=e;return(0,r.yg)(g,(0,t.A)({},m,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("h2",{id:"enumerations"},"Enumerations"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},"ConsoleMode"))),(0,r.yg)("h2",{id:"classes"},"Classes"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},"BrowserInteractionResultReader")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/api_src.SnapshotResultReader"},"SnapshotResultReader"))),(0,r.yg)("h2",{id:"type-aliases"},"Type Aliases"),(0,r.yg)("h3",{id:"-runoptions-object"},(0,r.yg)("a",{id:"runoptions",name:"runoptions"})," ",(0,r.yg)("strong",{parentName:"h3"},"RunOptions"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"Object")),(0,r.yg)("p",null,"Options for configuring browser interaction run, all fields are optional"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"chromiumBinary?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"if not specified, memlab will use the Chromium binary installed by Puppeteer. Use this option to specify a different binary if Puppeteer does not install the Chromium binary correctly (e.g., in a environtment Docker) or when you may want to use a different version of Chromium binary.")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"consoleMode?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},(0,r.yg)("inlineCode",{parentName:"a"},"ConsoleMode"))),(0,r.yg)("td",{parentName:"tr",align:"left"},"specifying the terminal output mode, default is ",(0,r.yg)("inlineCode",{parentName:"td"},"default"),". For more details. please check out ",(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},"ConsoleMode"))),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"cookiesFile?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"the absolute path of cookies file")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"evalInBrowserAfterInitLoad?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"AnyFunction")),(0,r.yg)("td",{parentName:"tr",align:"left"},"function to be evaluated in browser context after the web page initial load. Note that this function is defined in node.js context but it will be evaluated in browser context so the function should not use any closure variables outside of the browser context.")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"scenario?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"IScenario")),(0,r.yg)("td",{parentName:"tr",align:"left"},"test scenario specifying how to interact with browser (for more details view ",(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/interfaces/core_src.IScenario"},"IScenario"),")")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"skipWarmup?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"boolean")),(0,r.yg)("td",{parentName:"tr",align:"left"},"skip the initial page loading warmup for the web application being tested")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"snapshotForEachStep?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"boolean")),(0,r.yg)("td",{parentName:"tr",align:"left"},"if true, take heap snapshot for each interaction step, by default this is false, which means memlab will decide which steps it will take heap snapshots")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"webWorker?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"Optional"),"<",(0,r.yg)("inlineCode",{parentName:"td"},"string"),">"),(0,r.yg)("td",{parentName:"tr",align:"left"},"if this field is provided, it specifies the web worker as the target for heap analysis. For example ",(0,r.yg)("inlineCode",{parentName:"td"},"{webWorker: null}")," means analyzing the heap of the first web worker found. ",(0,r.yg)("inlineCode",{parentName:"td"},"{webWorker: 'workerTitle'}")," means analyzing the heap of the web worker with name: ",(0,r.yg)("inlineCode",{parentName:"td"},"'workerTitle'"),".")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"workDir?")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"string")),(0,r.yg)("td",{parentName:"tr",align:"left"},"specify the working directory where you want memlab to dump heap snapshots and other meta data of the test run. If no working directory is provided, memlab will generate a random temp directory under the operating system's default directory for temporary files. Note: It's the caller's responsibility to make sure the specified working directory exists.")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/API.ts#L47"},"api/src/API.ts:47"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-runresult-object"},(0,r.yg)("a",{id:"runresult",name:"runresult"})," ",(0,r.yg)("strong",{parentName:"h3"},"RunResult"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"Object")),(0,r.yg)("p",null,"A data structure holding the result of the ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#run"},"run")," API call."),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"left"},"Name"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Type"),(0,r.yg)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.yg)("tbody",{parentName:"table"},(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"leaks")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"ISerializedInfo"),"[]"),(0,r.yg)("td",{parentName:"tr",align:"left"},"leak traces detected and clustered from the browser interaction")),(0,r.yg)("tr",{parentName:"tbody"},(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("inlineCode",{parentName:"td"},"runResult")),(0,r.yg)("td",{parentName:"tr",align:"left"},(0,r.yg)("a",{parentName:"td",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},(0,r.yg)("inlineCode",{parentName:"a"},"BrowserInteractionResultReader"))),(0,r.yg)("td",{parentName:"tr",align:"left"},"a utility for reading browser interaction results from disk")))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/API.ts#L108"},"api/src/API.ts:108"))))),(0,r.yg)("h2",{id:"functions"},"Functions"),(0,r.yg)("h3",{id:"analyzerunresult-heapanalyzer-args"},(0,r.yg)("a",{id:"analyze"}),(0,r.yg)("strong",{parentName:"h3"},"analyze"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"runResult"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"heapAnalyzer"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"args?"),")"),(0,r.yg)("p",null,"This API analyzes heap snapshot(s) with a specified heap analysis.\nThis is equivalent to ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab analyze")," in CLI."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"runResult"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"default")," | return value of a browser interaction run"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"heapAnalyzer"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"BaseAnalysis")," | instance of a heap analysis"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"args"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"ParsedArgs")," | other CLI arguments that needs to be passed to the heap analysis"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"li"},"void"),">"," | each analysis may have a different return type, please check out\nthe type definition or the documentation for the ",(0,r.yg)("inlineCode",{parentName:"li"},"process")," method of the\nanalysis class you are using for ",(0,r.yg)("inlineCode",{parentName:"li"},"heapAnalyzer"),"."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {analyze, takeSnapshots, StringAnalysis} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const result = await takeSnapshots({scenario});\n const analysis = new StringAnalysis();\n await analyze(result, analysis);\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/API.ts#L328"},"api/src/API.ts:328"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"findleaksrunresult-options"},(0,r.yg)("a",{id:"findleaks"}),(0,r.yg)("strong",{parentName:"h3"},"findLeaks"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"runResult"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,r.yg)("p",null,"This API finds memory leaks by analyzing heap snapshot(s).\nThis is equivalent to ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab find-leaks")," in CLI."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"runResult"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"default")," | return value of a browser interaction run"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Object")," | configure memory leak detection run"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options.consoleMode?"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},(0,r.yg)("inlineCode",{parentName:"a"},"ConsoleMode"))," | specify the terminal output mode (see ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},"ConsoleMode"),")"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"li"},"ISerializedInfo"),"[]",">"," | leak traces detected and clustered from the browser interaction"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {findLeaks, takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const result = await takeSnapshots({scenario, consoleMode: 'SILENT'});\n const leaks = findLeaks(result, {consoleMode: 'CONTINUOUS_TEST'});\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/API.ts#L256"},"api/src/API.ts:256"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"findleaksbysnapshotfilepathsbaselinesnapshot-targetsnapshot-finalsnapshot-options"},(0,r.yg)("a",{id:"findleaksbysnapshotfilepaths"}),(0,r.yg)("strong",{parentName:"h3"},"findLeaksBySnapshotFilePaths"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"baselineSnapshot"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"targetSnapshot"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"finalSnapshot"),", ",(0,r.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,r.yg)("p",null,"This API finds memory leaks by analyzing specified heap snapshots.\nThis is equivalent to ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab find-leaks")," with\nthe ",(0,r.yg)("inlineCode",{parentName:"p"},"--baseline"),", ",(0,r.yg)("inlineCode",{parentName:"p"},"--target"),", and ",(0,r.yg)("inlineCode",{parentName:"p"},"--final")," flags in CLI."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"baselineSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | the file path of the baseline heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"targetSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | the file path of the target heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"finalSnapshot"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | the file path of the final heap snapshot"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Object")," | optionally, you can specify a mode for heap analysis"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options.consoleMode?"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},(0,r.yg)("inlineCode",{parentName:"a"},"ConsoleMode"))," | specify the terminal output mode (see ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/enums/api_src.ConsoleMode"},"ConsoleMode"),")"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options.workDir?"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | specify a working directory (other than the default one)"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.yg)("inlineCode",{parentName:"p"},"ISerializedInfo"),"[]",">"," | leak traces detected and clustered from the browser interaction")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Source"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/API.ts#L284"},"api/src/API.ts:284"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"runoptions"},(0,r.yg)("a",{id:"run"}),(0,r.yg)("strong",{parentName:"h3"},"run"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,r.yg)("p",null,"This API runs browser interaction and find memory leaks triggered in browser\nThis is equivalent to running ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab run")," in CLI.\nThis is also equivalent to warm up, and call ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#takesnapshots"},"takeSnapshots"),"\nand ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#findleaks"},"findLeaks"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/api_src#runoptions"},(0,r.yg)("inlineCode",{parentName:"a"},"RunOptions"))))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/api_src#runresult"},(0,r.yg)("inlineCode",{parentName:"a"},"RunResult")),">"," | memory leaks detected and a utility reading browser\ninteraction results from disk"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {run} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const {leaks} = await run({scenario});\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/API.ts#L188"},"api/src/API.ts:188"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"takesnapshotsoptions"},(0,r.yg)("a",{id:"takesnapshots"}),(0,r.yg)("strong",{parentName:"h3"},"takeSnapshots"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,r.yg)("p",null,"This API runs E2E interaction and takes heap snapshots.\nThis is equivalent to running ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab snapshot")," in CLI."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/api_src#runoptions"},(0,r.yg)("inlineCode",{parentName:"a"},"RunOptions"))," | configure browser interaction run"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},(0,r.yg)("inlineCode",{parentName:"a"},"BrowserInteractionResultReader")),">"," | a utility reading browser interaction results from disk"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const result = await takeSnapshots({scenario});\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/API.ts#L221"},"api/src/API.ts:221"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"warmupandtakesnapshotsoptions"},(0,r.yg)("a",{id:"warmupandtakesnapshots"}),(0,r.yg)("strong",{parentName:"h3"},"warmupAndTakeSnapshots"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,r.yg)("p",null,"This API warms up web server, runs E2E interaction, and takes heap snapshots.\nThis is equivalent to running ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab warmup-and-snapshot")," in CLI.\nThis is also equivalent to warm up and call ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#takesnapshots"},"takeSnapshots"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/api_src#runoptions"},(0,r.yg)("inlineCode",{parentName:"a"},"RunOptions"))," | configure browser interaction run"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},(0,r.yg)("inlineCode",{parentName:"a"},"BrowserInteractionResultReader")),">"," | browser interaction results"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"const {warmupAndTakeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n };\n const result = await warmupAndTakeSnapshots({scenario});\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/API.ts#L151"},"api/src/API.ts:151"))))))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9462.ce4fb08d.js b/assets/js/9462.ce4fb08d.js deleted file mode 100644 index 2dfa985f..00000000 --- a/assets/js/9462.ce4fb08d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9462],{9462:(e,t,r)=>{function n(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;ivn});var a=function(){};function c(e){var t=e.item,r=e.items;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(s){u=!0,o=s}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t=3||2===r&&n>=4||1===r&&n>=10);function i(t,r,n){if(o&&void 0!==n){var i=n[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(p(r),[{headers:a}]))}else e.apply(void 0,[t].concat(p(r)))}return{init:function(t,r){e("init",{appId:t,apiKey:r})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDsAfterSearch",g(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDs",g(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["clickedFilters"].concat(r))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDsAfterSearch",g(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDs",g(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["convertedFilters"].concat(r))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var r=t.items,n=d(t,f);return[].concat(p(e),p(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n0&&e.apply(void 0,["viewedFilters"].concat(r))}}}function S(e){var t=e.items.reduce((function(e,t){var r;return e[t.__autocomplete_indexName]=(null!==(r=e[t.__autocomplete_indexName])&&void 0!==r?r:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function j(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function E(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&C({onItemsChange:o,items:r,insights:f,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,r=e.onSelect,n=e.onActive;s("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:f}}),r((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&l({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Selected"},c({item:t,items:m.current}))]})})),n((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&u({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Active"},c({item:t,items:m.current}))]})}))},onStateChange:function(e){var t=e.state;p({state:t})},__autocomplete_pluginOptions:e}}function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==N(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===N(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e,t,r){var n,o=t.initialState;return{getState:function(){return o},dispatch:function(n,i){var a=function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(V++),plugins:o,initialState:X({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(Q(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var r=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:a,onResolve:a};Object.keys(t).forEach((function(e){t[e].__default=!0}));var n=$($({},t),e);return Promise.resolve(n)})))}))}(e,r)}))).then((function(e){return L(e)})).then((function(e){return e.map((function(e){return X(X({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onActive:function(r){e.onActive(r),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,r)}))},onResolve:function(r){e.onResolve(r),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:X({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ie,De,Ae,ke=null,xe=(Ie=-1,De=-1,Ae=void 0,function(e){var t=++Ie;return Promise.resolve(e).then((function(e){return Ae&&t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Me=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}var Fe=["props","refresh","store"],Ue=["inputElement","formElement","panelElement"],Be=["inputElement"],Ve=["inputElement","maxLength"],Ke=["sourceIndex"],$e=["sourceIndex"],Je=["item","source","sourceIndex"];function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ge(e){var t=e.props,r=e.refresh,n=e.store,o=Ze(e,Fe),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var r=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===r||!1===[o,i].some((function(t){return r=t,n=e.target,r===n||r.contains(n);var r,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return We({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==n.getState().isOpen&&r===t.environment.document.activeElement&&e.target!==r&&r.blur()}},Ze(e,Ue))},getRootProps:function(e){return We({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return We({action:"",noValidate:!0,role:"search",onSubmit:function(i){var a;i.preventDefault(),t.onSubmit(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()},onReset:function(i){var a;i.preventDefault(),t.onReset(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},Ze(e,Be))},getLabelProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,Ke);return We({htmlFor:"".concat(i(t.id,n),"-input"),id:"".concat(i(t.id,n),"-label")},o)},getInputProps:function(e){var i;function c(e){(t.openOnFocus||Boolean(n.getState().query))&&Ce(We({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var l=e||{},u=(l.inputElement,l.maxLength),s=void 0===u?512:u,f=Ze(l,Ve),m=ge(n.getState()),p=function(e){return Boolean(e&&e.match(Me))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),v=null!=m&&m.itemUrl&&!p?"go":"search";return We({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:v,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:s,type:"search",onChange:function(e){Ce(We({event:e,props:t,query:e.currentTarget.value.slice(0,s),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,i=Le(e,Ne);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},c=function(){var e=ge(o.getState());if(null!==o.getState().activeItemId&&e){var r=e.item,a=e.itemInputValue,c=e.itemUrl,l=e.source;l.onActive(qe({event:t,item:r,itemInputValue:a,itemUrl:c,refresh:n,source:l,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(r.openOnFocus||Boolean(o.getState().query))?Ce(qe({event:t,props:r,query:o.getState().query,refresh:n,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:r.defaultActiveItemId}),c(),setTimeout(a,0)})):(o.dispatch(t.key,{}),c(),a())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(r.debug||o.pendingRequests.cancelAll());t.preventDefault();var l=ge(o.getState()),u=l.item,s=l.itemInputValue,f=l.itemUrl,m=l.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewTab({itemUrl:f,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewWindow({itemUrl:f,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),void r.navigator.navigate({itemUrl:f,item:u,state:o.getState()});Ce(qe({event:t,nextState:{isOpen:!1},props:r,query:s,refresh:n,store:o},i)).then((function(){m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i))}))}}}(We({event:e,props:t,refresh:r,store:n},o))},onFocus:c,onBlur:a,onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||c(r)}},f)},getPanelProps:function(e){return We({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,$e);return We({role:"listbox","aria-labelledby":"".concat(i(t.id,n),"-label"),id:"".concat(i(t.id,n),"-list")},o)},getItemProps:function(e){var a=e.item,c=e.source,l=e.sourceIndex,u=Ze(e,Je);return We({id:"".concat(i(t.id,l),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=ge(n.getState());if(null!==n.getState().activeItemId&&t){var i=t.item,c=t.itemInputValue,l=t.itemUrl,u=t.source;u.onActive(We({event:e,item:i,itemInputValue:c,itemUrl:l,refresh:r,source:u,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():Ce(We({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(We({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},u)}}}var Xe=[{segment:"autocomplete-core",version:"1.9.3"}];function Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t=r?null===n?null:0:o}function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kt(e){var t=e.translations,r=void 0===t?{}:t,n=At(e,Pt),o=r.noResultsText,i=void 0===o?"No results for":o,a=r.suggestedQueryText,c=void 0===a?"Try searching for":a,l=r.reportMissingResultsText,u=void 0===l?"Believe this query should return results?":l,s=r.reportMissingResultsLinkText,f=void 0===s?"Let us know.":s,m=n.state.context.searchSuggestions;return yt.createElement("div",{className:"DocSearch-NoResults"},yt.createElement("div",{className:"DocSearch-Screen-Icon"},yt.createElement(Et,null)),yt.createElement("p",{className:"DocSearch-Title"},i,' "',yt.createElement("strong",null,n.state.query),'"'),m&&m.length>0&&yt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},yt.createElement("p",{className:"DocSearch-Help"},c,":"),yt.createElement("ul",null,m.slice(0,3).reduce((function(e,t){return[].concat(It(e),[yt.createElement("li",{key:t},yt.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){n.setQuery(t.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},t))])}),[]))),n.getMissingResultsUrl&&yt.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),yt.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var xt=function(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Ct(e){switch(e.type){case"lvl1":return yt.createElement(xt,null);case"content":return yt.createElement(Nt,null);default:return yt.createElement(_t,null)}}function _t(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Nt(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Tt(){return yt.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},yt.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),yt.createElement("path",{d:"M8 17l-6-6 6-6"})))}var qt=["hit","attribute","tagName"];function Rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ft(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function Ut(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,i=Ht(e,qt);return(0,yt.createElement)(o,Lt(Lt({},i),{},{dangerouslySetInnerHTML:{__html:Ft(t,"_snippetResult.".concat(r,".value"))||Ft(t,r)}}))}function Bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){c=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r|<\/mark>)/g,Wt=RegExp(zt.source);function Qt(e){var t,r,n=e;if(!n.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=((n.__docsearch_parent?null===(t=n.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(r=e._highlightResult)||void 0===r||null===(r=r.hierarchy)||void 0===r?void 0:r.lvl0)||{}).value;return o&&Wt.test(o)?o.replace(zt,""):o}function Zt(){return Zt=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function or(e){var t=e.translations,r=void 0===t?{}:t,n=nr(e,tr),o=r.recentSearchesTitle,i=void 0===o?"Recent":o,a=r.noRecentSearchesText,c=void 0===a?"No recent searches":a,l=r.saveRecentSearchButtonTitle,u=void 0===l?"Save this search":l,s=r.removeRecentSearchButtonTitle,f=void 0===s?"Remove this search from history":s,m=r.favoriteSearchesTitle,p=void 0===m?"Favorite":m,v=r.removeFavoriteSearchButtonTitle,d=void 0===v?"Remove this search from favorites":v;return"idle"===n.state.status&&!1===n.hasCollections?n.disableUserPersonalization?null:yt.createElement("div",{className:"DocSearch-StartScreen"},yt.createElement("p",{className:"DocSearch-Help"},c)):!1===n.hasCollections?null:yt.createElement("div",{className:"DocSearch-Dropdown-Container"},yt.createElement($t,rr({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Xt,null))},renderAction:function(e){var t=e.item,r=e.runFavoriteTransition,o=e.runDeleteTransition;return yt.createElement(yt.Fragment,null,yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.add(t),n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(Yt,null))),yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(er,null))))}})),yt.createElement($t,rr({},n,{title:p,collection:n.state.collections[1],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Yt,null))},renderAction:function(e){var t=e.item,r=e.runDeleteTransition;return yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:d,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.remove(t),n.refresh()}))}},yt.createElement(er,null)))}})))}var ir=["translations"];function ar(){return ar=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var lr=yt.memo((function(e){var t=e.translations,r=void 0===t?{}:t,n=cr(e,ir);if("error"===n.state.status)return yt.createElement(wt,{translations:null==r?void 0:r.errorScreen});var o=n.state.collections.some((function(e){return e.items.length>0}));return n.state.query?!1===o?yt.createElement(kt,ar({},n,{translations:null==r?void 0:r.noResultsScreen})):yt.createElement(Gt,n):yt.createElement(or,ar({},n,{hasCollections:o,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function ur(){return yt.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},yt.createElement("g",{fill:"none",fillRule:"evenodd"},yt.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},yt.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),yt.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},yt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var sr=r(9188),fr=["translations"];function mr(){return mr=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function vr(e){var t=e.translations,r=void 0===t?{}:t,n=pr(e,fr),o=r.resetButtonTitle,i=void 0===o?"Clear the query":o,a=r.resetButtonAriaLabel,c=void 0===a?"Clear the query":a,l=r.cancelButtonText,u=void 0===l?"Cancel":l,s=r.cancelButtonAriaLabel,f=void 0===s?"Cancel":s,m=r.searchInputLabel,p=void 0===m?"Search":m,v=n.getFormProps({inputElement:n.inputRef.current}).onReset;return yt.useEffect((function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()}),[n.autoFocus,n.inputRef]),yt.useEffect((function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()}),[n.isFromSelection,n.inputRef]),yt.createElement(yt.Fragment,null,yt.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:v},yt.createElement("label",mr({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),yt.createElement(sr.W,null),yt.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},p)),yt.createElement("div",{className:"DocSearch-LoadingIndicator"},yt.createElement(ur,null)),yt.createElement("input",mr({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:ht}))),yt.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},yt.createElement(er,null))),yt.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:n.onClose},u))}var dr=["_highlightResult","_snippetResult"];function yr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hr(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function br(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=hr(t),i=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,yr(t,dr)),a=i.findIndex((function(e){return e.objectID===r.objectID}));a>-1&&i.splice(a,1),i.unshift(r),i=i.slice(0,n),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}function gr(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}"),i=e=>{n().setItem(t,JSON.stringify(e))};return{get:(t,r,n={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),n=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(i(n),!t)return;const a=Object.fromEntries(Object.entries(n).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||n.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},n().setItem(t,JSON.stringify(i)),r})),delete:e=>Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{n().removeItem(t)}))}}function Or(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,o={miss:()=>Promise.resolve()})=>r.get(e,n,o).catch((()=>Or({caches:t}).get(e,n,o))),set:(e,n)=>r.set(e,n).catch((()=>Or({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>Or({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>Or({caches:t}).clear()))}}function Sr(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const i=JSON.stringify(r);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const a=n(),c=o&&o.miss||(()=>Promise.resolve());return a.then((e=>c(e))).then((()=>a))},set:(r,n)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function jr(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function wr(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Er(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Pr="4.24.0",Ir={WithinQueryParameters:0,WithinHeaders:1};function Dr(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ar={Read:1,Write:2,Any:3},kr={Up:1,Down:2,Timeouted:3},xr=12e4;function Cr(e,t=kr.Up){return{...e,status:t,lastUpdate:Date.now()}}function _r(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ar.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ar.Any}}const Nr={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};function Tr(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(Cr(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===kr.Up||Date.now()-e.lastUpdate>xr}(e))),n=e.filter((e=>function(e){return e.status===kr.Timeouted&&Date.now()-e.lastUpdate<=xr}(e))),o=[...r,...n];return{getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t,statelessHosts:o.length>0?o.map((e=>_r(e))):t}}))}const qr=(e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&!~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e);function Rr(e,t,r,n){const o=[],i=function(e,t){if(e.method===Nr.Get||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),a=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),c=r.method,l=r.method!==Nr.Get?{}:{...r.data,...n.data},u={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let s=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .",transporterStackTrace:Fr(o)};const p={data:i,headers:a,method:c,url:Mr(m,r.path,u),connectTimeout:l(s,e.timeouts.connect),responseTimeout:l(s,n.timeout)},v=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},d={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=v(r);return r.isTimedOut&&s++,Promise.all([e.logger.info("Retryable failure",Ur(n)),e.hostsCache.set(m,Cr(m,r.isTimedOut?kr.Timeouted:kr.Down))]).then((()=>f(t,l)))},onFail(e){throw v(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,Fr(o))}};return e.requester.send(p).then((e=>qr(e,d)))};return Tr(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function Lr(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function Mr(e,t,r){const n=Hr(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function Hr(e){return Object.keys(e).map((t=>{return Er("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function Fr(e){return e.map((e=>Ur(e)))}function Ur(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const Br=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:()=>e===Ir.WithinHeaders?n:{},queryParameters:()=>e===Ir.WithinQueryParameters?n:{}}}(void 0!==e.authMode?e.authMode:Ir.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,hosts:l,queryParameters:u,headers:s}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,headers:s,queryParameters:u,hosts:l.map((e=>_r(e))),read(e,t){const r=Dr(t,f.timeouts.read),n=()=>Rr(f,f.hosts.filter((e=>!!(e.accept&Ar.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write:(e,t)=>Rr(f,f.hosts.filter((e=>!!(e.accept&Ar.Write))),e,Dr(t,f.timeouts.write))};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ar.Read},{url:`${t}.algolia.net`,accept:Ar.Write}].concat(jr([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),o={transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))};return wr(o,e.methods)},Vr=e=>(t,r)=>t.method===Nr.Get?e.transporter.read(t,r):e.transporter.write(t,r),Kr=e=>(t,r={})=>wr({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),$r=e=>(t,r)=>{const n=t.map((e=>({...e,params:Hr(e.params||{})})));return e.transporter.read({method:Nr.Post,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},Jr=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...i}=t.params;return Kr(e)(t.indexName,{methods:{searchForFacetValues:Qr}}).searchForFacetValues(n,o,{...r,...i})}))),zr=e=>(t,r,n)=>e.transporter.read({method:Nr.Post,path:Er("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Wr=e=>(t,r)=>e.transporter.read({method:Nr.Post,path:Er("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),Qr=e=>(t,r,n)=>e.transporter.read({method:Nr.Post,path:Er("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Zr={Debug:1,Info:2,Error:3};const Gr=e=>(t,r)=>{const n=t.map((e=>({...e,threshold:e.threshold||0})));return e.transporter.read({method:Nr.Post,path:"1/indexes/*/recommendations",data:{requests:n},cacheable:!0},r)};function Xr(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(o),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))},logger:(o=Zr.Error,{debug:(e,t)=>(Zr.Debug>=o&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(Zr.Info>=o&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:Sr(),requestsCache:Sr({serializable:!1}),hostsCache:Or({caches:[gr({key:`${Pr}-${e}`}),Sr()]}),userAgent:Lr(Pr).add({segment:"Browser",version:"lite"}),authMode:Ir.WithinQueryParameters};var o;return Br({...n,...r,methods:{search:$r,searchForFacetValues:Jr,multipleQueries:$r,multipleSearchForFacetValues:Jr,customRequest:Vr,initIndex:e=>t=>Kr(e)(t,{methods:{search:Wr,searchForFacetValues:Qr,findAnswers:zr}}),getRecommendations:Gr}})}Xr.version=Pr;const Yr=Xr;var en="3.6.0";function tn(){}function rn(e){return e}function nn(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function on(e,t,r){return e.reduce((function(e,n){var o=t(n);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(r||5)&&e[o].push(n),e}),{})}var an=["footer","searchBox"];function cn(){return cn=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function vn(e){var t=e.appId,r=e.apiKey,n=e.indexName,o=e.placeholder,i=void 0===o?"Search docs":o,a=e.searchParameters,c=e.maxResultsPerGroup,l=e.onClose,u=void 0===l?tn:l,s=e.transformItems,f=void 0===s?rn:s,m=e.hitComponent,p=void 0===m?St:m,v=e.resultsFooterComponent,d=void 0===v?function(){return null}:v,y=e.navigator,h=e.initialScrollY,b=void 0===h?0:h,g=e.transformSearchClient,O=void 0===g?rn:g,S=e.disableUserPersonalization,j=void 0!==S&&S,w=e.initialQuery,E=void 0===w?"":w,P=e.translations,I=void 0===P?{}:P,D=e.getMissingResultsUrl,A=e.insights,k=void 0!==A&&A,x=I.footer,C=I.searchBox,_=pn(I,an),N=fn(yt.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),T=N[0],q=N[1],R=yt.useRef(null),L=yt.useRef(null),M=yt.useRef(null),H=yt.useRef(null),F=yt.useRef(null),U=yt.useRef(10),B=yt.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,ht):"").current,V=yt.useRef(E||B).current,K=function(e,t,r){return yt.useMemo((function(){var n=Yr(e,t);return n.addAlgoliaAgent("docsearch",en),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",en),r(n)}),[e,t,r])}(t,r,O),$=yt.useRef(br({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,J=yt.useRef(br({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:0===$.getAll().length?7:4})).current,z=yt.useCallback((function(e){if(!j){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===$.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&J.add(t)}}),[$,J,j]),W=yt.useCallback((function(e){if(T.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,r={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(r)}}),[T.context.algoliaInsightsPlugin]),Q=yt.useMemo((function(){return dt({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:V,context:{searchSuggestions:[]}},insights:k,navigator:y,onStateChange:function(e){q(e.state)},getSources:function(e){var o=e.query,i=e.state,l=e.setContext,s=e.setStatus;if(!o)return j?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),nn(r)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return J.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),nn(r)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return $.getAll()}}];var m=Boolean(k);return K.search([{query:o,indexName:n,params:un({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(U.current),"hierarchy.lvl2:".concat(U.current),"hierarchy.lvl3:".concat(U.current),"hierarchy.lvl4:".concat(U.current),"hierarchy.lvl5:".concat(U.current),"hierarchy.lvl6:".concat(U.current),"content:".concat(U.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:m},a)}]).catch((function(e){throw"RetryError"===e.name&&s("error"),e})).then((function(e){var o=e.results[0],a=o.hits,s=o.nbHits,p=on(a,(function(e){return Qt(e)}),c);i.context.searchSuggestions.length0&&(X(),F.current&&F.current.focus())}),[V,X]),yt.useEffect((function(){function e(){if(L.current){var e=.01*window.innerHeight;L.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),yt.createElement("div",cn({ref:R},G({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===T.status&&"DocSearch-Container--Stalled","error"===T.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&u()}}),yt.createElement("div",{className:"DocSearch-Modal",ref:L},yt.createElement("header",{className:"DocSearch-SearchBar",ref:M},yt.createElement(vr,cn({},Q,{state:T,autoFocus:0===V.length,inputRef:F,isFromSelection:Boolean(V)&&V===B,translations:C,onClose:u}))),yt.createElement("div",{className:"DocSearch-Dropdown",ref:H},yt.createElement(lr,cn({},Q,{indexName:n,state:T,hitComponent:p,resultsFooterComponent:d,disableUserPersonalization:j,recentSearches:J,favoriteSearches:$,inputRef:F,translations:_,getMissingResultsUrl:D,onItemClick:function(e,t){W(e),z(e),nn(t)||u()}}))),yt.createElement("footer",{className:"DocSearch-Footer"},yt.createElement(Ot,{translations:x}))))}}}]); \ No newline at end of file diff --git a/assets/js/95206942.155e7ee5.js b/assets/js/95206942.b147003e.js similarity index 98% rename from assets/js/95206942.155e7ee5.js rename to assets/js/95206942.b147003e.js index b10a4904..6130411a 100644 --- a/assets/js/95206942.155e7ee5.js +++ b/assets/js/95206942.b147003e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[2522],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>u});var l=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function t(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);a&&(l=l.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,l)}return n}function i(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=l.createContext({}),p=function(e){var a=l.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return l.createElement(o.Provider,{value:a},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return l.createElement(l.Fragment,{},a)}},m=l.forwardRef((function(e,a){var n=e.components,s=e.mdxType,t=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),m=s,u=c["".concat(o,".").concat(m)]||c[m]||g[m]||t;return n?l.createElement(u,i(i({ref:a},y),{},{components:n})):l.createElement(u,i({ref:a},y))}));function u(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var t=n.length,i=new Array(t);i[0]=m;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:s,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>g,frontMatter:()=>t,metadata:()=>r,toc:()=>p});var l=n(8168),s=(n(6540),n(5680));const t={id:"heap_analysis_src.CollectionsHoldingStaleAnalysis",title:"Class: CollectionsHoldingStaleAnalysis",sidebar_label:"CollectionsHoldingStaleAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis",id:"api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis",title:"Class: CollectionsHoldingStaleAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.CollectionsHoldingStaleAnalysis",title:"Class: CollectionsHoldingStaleAnalysis",sidebar_label:"CollectionsHoldingStaleAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"BaseAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},next:{title:"DetachedDOMElementAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new CollectionsHoldingStaleAnalysis()',id:"new-collectionsholdingstaleanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],y={toc:p},c="wrapper";function g(e){let{components:a,...n}=e;return(0,s.yg)(c,(0,l.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"CollectionsHoldingStaleAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-collectionsholdingstaleanalysis"},(0,s.yg)("a",{id:"new collectionsholdingstaleanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new CollectionsHoldingStaleAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,s.yg)("a",{id:"analyzesnapshotfromfile"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,s.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/CollectionsHoldingStaleAnalysis.ts#L64"},"heap-analysis/src/plugins/CollectionsHoldingStaleAnalysis.ts:64"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[2522],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>u});var l=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function t(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);a&&(l=l.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,l)}return n}function i(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=l.createContext({}),p=function(e){var a=l.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return l.createElement(o.Provider,{value:a},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return l.createElement(l.Fragment,{},a)}},m=l.forwardRef((function(e,a){var n=e.components,s=e.mdxType,t=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),m=s,u=c["".concat(o,".").concat(m)]||c[m]||g[m]||t;return n?l.createElement(u,i(i({ref:a},y),{},{components:n})):l.createElement(u,i({ref:a},y))}));function u(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var t=n.length,i=new Array(t);i[0]=m;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:s,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>g,frontMatter:()=>t,metadata:()=>r,toc:()=>p});var l=n(8168),s=(n(6540),n(5680));const t={id:"heap_analysis_src.CollectionsHoldingStaleAnalysis",title:"Class: CollectionsHoldingStaleAnalysis",sidebar_label:"CollectionsHoldingStaleAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis",id:"api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis",title:"Class: CollectionsHoldingStaleAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.CollectionsHoldingStaleAnalysis",title:"Class: CollectionsHoldingStaleAnalysis",sidebar_label:"CollectionsHoldingStaleAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"BaseAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},next:{title:"DetachedDOMElementAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new CollectionsHoldingStaleAnalysis()',id:"new-collectionsholdingstaleanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],y={toc:p},c="wrapper";function g(e){let{components:a,...n}=e;return(0,s.yg)(c,(0,l.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"CollectionsHoldingStaleAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-collectionsholdingstaleanalysis"},(0,s.yg)("a",{id:"new collectionsholdingstaleanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new CollectionsHoldingStaleAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,s.yg)("a",{id:"analyzesnapshotfromfile"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,s.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/CollectionsHoldingStaleAnalysis.ts#L64"},"heap-analysis/src/plugins/CollectionsHoldingStaleAnalysis.ts:64"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/95f47cf5.52e9af0f.js b/assets/js/95f47cf5.125dd7c6.js similarity index 98% rename from assets/js/95f47cf5.52e9af0f.js rename to assets/js/95f47cf5.125dd7c6.js index cbaf0275..68c5f197 100644 --- a/assets/js/95f47cf5.52e9af0f.js +++ b/assets/js/95f47cf5.125dd7c6.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[7130],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>g});var s=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,s)}return n}function i(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var o=s.createContext({}),p=function(e){var a=s.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return s.createElement(o.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},u=s.forwardRef((function(e,a){var n=e.components,t=e.mdxType,l=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),u=t,g=c["".concat(o,".").concat(u)]||c[u]||m[u]||l;return n?s.createElement(g,i(i({ref:a},y),{},{components:n})):s.createElement(g,i({ref:a},y))}));function g(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var l=n.length,i=new Array(l);i[0]=u;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:t,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>r,toc:()=>p});var s=n(8168),t=(n(6540),n(5680));const l={id:"heap_analysis_src.ObjectShapeAnalysis",title:"Class: ObjectShapeAnalysis",sidebar_label:"ObjectShapeAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.ObjectShapeAnalysis",id:"api/classes/heap_analysis_src.ObjectShapeAnalysis",title:"Class: ObjectShapeAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ObjectShapeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ObjectShapeAnalysis",title:"Class: ObjectShapeAnalysis",sidebar_label:"ObjectShapeAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ObjectShallowAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis"},next:{title:"ObjectSizeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ObjectShapeAnalysis()',id:"new-objectshapeanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],y={toc:p},c="wrapper";function m(e){let{components:a,...n}=e;return(0,t.yg)(c,(0,s.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3 ",(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"ObjectShapeAnalysis"))))),(0,t.yg)("h2",{id:"constructors"},"Constructors"),(0,t.yg)("h3",{id:"new-objectshapeanalysis"},(0,t.yg)("a",{id:"new objectshapeanalysis"}),(0,t.yg)("strong",{parentName:"h3"},"new ObjectShapeAnalysis"),"()"),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,t.yg)("a",{id:"analyzesnapshotfromfile"}),(0,t.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,t.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,t.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,t.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Example"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,t.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getcommandname"},(0,t.yg)("a",{id:"getcommandname"}),(0,t.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,t.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,t.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,t.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/ObjectShapeAnalysis.ts#L28"},"heap-analysis/src/plugins/ObjectShapeAnalysis.ts:28"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[7130],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>g});var s=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,s)}return n}function i(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var o=s.createContext({}),p=function(e){var a=s.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return s.createElement(o.Provider,{value:a},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},u=s.forwardRef((function(e,a){var n=e.components,t=e.mdxType,l=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),u=t,g=c["".concat(o,".").concat(u)]||c[u]||m[u]||l;return n?s.createElement(g,i(i({ref:a},y),{},{components:n})):s.createElement(g,i({ref:a},y))}));function g(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var l=n.length,i=new Array(l);i[0]=u;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:t,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>r,toc:()=>p});var s=n(8168),t=(n(6540),n(5680));const l={id:"heap_analysis_src.ObjectShapeAnalysis",title:"Class: ObjectShapeAnalysis",sidebar_label:"ObjectShapeAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.ObjectShapeAnalysis",id:"api/classes/heap_analysis_src.ObjectShapeAnalysis",title:"Class: ObjectShapeAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ObjectShapeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ObjectShapeAnalysis",title:"Class: ObjectShapeAnalysis",sidebar_label:"ObjectShapeAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ObjectShallowAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis"},next:{title:"ObjectSizeAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ObjectShapeAnalysis()',id:"new-objectshapeanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],y={toc:p},c="wrapper";function m(e){let{components:a,...n}=e;return(0,t.yg)(c,(0,s.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,t.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,t.yg)("p",{parentName:"li"},"\u21b3 ",(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"ObjectShapeAnalysis"))))),(0,t.yg)("h2",{id:"constructors"},"Constructors"),(0,t.yg)("h3",{id:"new-objectshapeanalysis"},(0,t.yg)("a",{id:"new objectshapeanalysis"}),(0,t.yg)("strong",{parentName:"h3"},"new ObjectShapeAnalysis"),"()"),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,t.yg)("a",{id:"analyzesnapshotfromfile"}),(0,t.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,t.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,t.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,t.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,t.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,t.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Example"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,t.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getcommandname"},(0,t.yg)("a",{id:"getcommandname"}),(0,t.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,t.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,t.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,t.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/ObjectShapeAnalysis.ts#L28"},"heap-analysis/src/plugins/ObjectShapeAnalysis.ts:28"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/98c9c166.6c60ebcf.js b/assets/js/98c9c166.26501a4a.js similarity index 92% rename from assets/js/98c9c166.6c60ebcf.js rename to assets/js/98c9c166.26501a4a.js index 2f168c62..2b3e37fe 100644 --- a/assets/js/98c9c166.6c60ebcf.js +++ b/assets/js/98c9c166.26501a4a.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[984],{5680:(e,n,a)=>{a.d(n,{xA:()=>g,yg:()=>y});var r=a(6540);function t(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function o(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var n=1;n=0||(t[a]=e[a]);return t}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}return t}var p=r.createContext({}),s=function(e){var n=r.useContext(p),a=n;return e&&(a="function"==typeof e?e(n):i(i({},n),e)),a},g=function(e){var n=s(e.components);return r.createElement(p.Provider,{value:n},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var a=e.components,t=e.mdxType,o=e.originalType,p=e.parentName,g=l(e,["components","mdxType","originalType","parentName"]),m=s(a),d=t,y=m["".concat(p,".").concat(d)]||m[d]||c[d]||o;return a?r.createElement(y,i(i({ref:n},g),{},{components:a})):r.createElement(y,i({ref:n},g))}));function y(e,n){var a=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var o=a.length,i=new Array(o);i[0]=d;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l[m]="string"==typeof e?e:t,i[1]=l;for(var s=2;s{a.r(n),a.d(n,{assets:()=>p,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>s});var r=a(8168),t=(a(6540),a(5680));const o={id:"core_src.IHeapEdge",title:"Interface: IHeapEdge",sidebar_label:"IHeapEdge",custom_edit_url:null},i=void 0,l={unversionedId:"api/interfaces/core_src.IHeapEdge",id:"api/interfaces/core_src.IHeapEdge",title:"Interface: IHeapEdge",description:"An IHeapEdge instance represents a JS reference in a heap snapshot.",source:"@site/docs/api/interfaces/core_src.IHeapEdge.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapEdge",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdge",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapEdge",title:"Interface: IHeapEdge",sidebar_label:"IHeapEdge",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IBrowserInfo",permalink:"/memlab/docs/api/interfaces/core_src.IBrowserInfo"},next:{title:"IHeapEdges",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdges"}},p={},s=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:' edgeIndex: number',id:"-edgeindex-number",level:3},{value:' fromNode: IHeapNode',id:"-fromnode-iheapnode",level:3},{value:' is_index: boolean',id:"-is_index-boolean",level:3},{value:' name_or_index: string | number',id:"-name_or_index-string--number",level:3},{value:' snapshot: IHeapSnapshot',id:"-snapshot-iheapsnapshot",level:3},{value:' toNode: IHeapNode',id:"-tonode-iheapnode",level:3},{value:' to_node: number',id:"-to_node-number",level:3},{value:' type: string',id:"-type-string",level:3},{value:"Methods",id:"methods",level:2},{value:'toJSONString(...args)',id:"tojsonstringargs",level:3}],g={toc:s},m="wrapper";function c(e){let{components:n,...a}=e;return(0,t.yg)(m,(0,r.A)({},g,a,{components:n,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"An ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapEdge")," instance represents a JS reference in a heap snapshot.\nA heap snapshot is generally a graph where graph nodes are JS heap objects\nand graph edges are JS references among JS heap objects."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"readonly"))," it is not recommended to modify any ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapEdge")," instance"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),": V8 or hermes heap snapshot can be parsed by the\n",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#getfullheapfromfile"},"getFullHeapFromFile")," API.")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapEdge} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // iterate over each edge (JS reference in heap)\n heap.edges.forEach((edge: IHeapEdge, i: number) => {\n // use the heap edge APIs here\n const nameOrIndex = edge.name_or_index;\n // ...\n });\n})();\n")),(0,t.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("inlineCode",{parentName:"p"},"IHeapEdgeBasic")),(0,t.yg)("p",{parentName:"li"},"\u21b3 ",(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"IHeapEdge"))))),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-edgeindex-number"},(0,t.yg)("a",{id:"edgeindex",name:"edgeindex"})," ",(0,t.yg)("strong",{parentName:"h3"},"edgeIndex"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"index of this JS reference inside the ",(0,t.yg)("inlineCode",{parentName:"p"},"edge.snapshot.edges")," pseudo array"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1660"},"core/src/lib/Types.ts:1660"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-fromnode-iheapnode"},(0,t.yg)("a",{id:"fromnode",name:"fromnode"})," ",(0,t.yg)("strong",{parentName:"h3"},"fromNode"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode"))),(0,t.yg)("p",null,"returns an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")," instance representing the hosting\nJS heap object where this reference starts"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1681"},"core/src/lib/Types.ts:1681"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-is_index-boolean"},(0,t.yg)("a",{id:"is\\_index",name:"is\\_index"})," ",(0,t.yg)("strong",{parentName:"h3"},"is","_","index"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("p",null,"if ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),", means this is a reference to an array element\nor internal table element (",(0,t.yg)("inlineCode",{parentName:"p"},"edge.name_or_index")," will return a number),\notherwise this is a reference with a string name (",(0,t.yg)("inlineCode",{parentName:"p"},"edge.name_or_index"),"\nwill return a string)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1667"},"core/src/lib/Types.ts:1667"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-name_or_index-string--number"},(0,t.yg)("a",{id:"name\\_or\\_index",name:"name\\_or\\_index"})," ",(0,t.yg)("strong",{parentName:"h3"},"name","_","or","_","index"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"name of the JS reference. If this is a reference to an array element\nor internal table element, it is an numeric index"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1616"},"core/src/lib/Types.ts:1616"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-snapshot-iheapsnapshot"},(0,t.yg)("a",{id:"snapshot",name:"snapshot"})," ",(0,t.yg)("strong",{parentName:"h3"},"snapshot"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))),(0,t.yg)("p",null,"get the ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," containing this JS reference"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1656"},"core/src/lib/Types.ts:1656"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-tonode-iheapnode"},(0,t.yg)("a",{id:"tonode",name:"tonode"})," ",(0,t.yg)("strong",{parentName:"h3"},"toNode"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode"))),(0,t.yg)("p",null,"returns an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")," instance representing the JS heap object\npointed to by this reference"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1676"},"core/src/lib/Types.ts:1676"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-to_node-number"},(0,t.yg)("a",{id:"to\\_node",name:"to\\_node"})," ",(0,t.yg)("strong",{parentName:"h3"},"to","_","node"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"the index of the JS heap object pointed to by this reference"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1671"},"core/src/lib/Types.ts:1671"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-type-string"},(0,t.yg)("a",{id:"type",name:"type"})," ",(0,t.yg)("strong",{parentName:"h3"},"type"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"type of the JS reference, all types:\n",(0,t.yg)("inlineCode",{parentName:"p"},"context"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"element"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"property"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"internal"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"hidden"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"shortcut"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"weak")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1621"},"core/src/lib/Types.ts:1621"))))),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"tojsonstringargs"},(0,t.yg)("a",{id:"tojsonstring"}),(0,t.yg)("strong",{parentName:"h3"},"toJSONString"),"(...",(0,t.yg)("inlineCode",{parentName:"h3"},"args"),")"),(0,t.yg)("p",null,"convert to a concise readable string output\n(like calling ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)"),")."),(0,t.yg)("p",null,"Note: Please be aware that using ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)")," is\nnot recommended as it will generate a JSON representation of the host\nobject that is too large to be easily readable due to its connections\nto other parts of the data structures within the heap snapshot."),(0,t.yg)("p",null,"This API does not completely serialize all the information\ncaptured by the hosting object."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"...args"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"any"),"[]"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1694"},"core/src/lib/Types.ts:1694"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[984],{5680:(e,n,a)=>{a.d(n,{xA:()=>g,yg:()=>y});var r=a(6540);function t(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function o(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var n=1;n=0||(t[a]=e[a]);return t}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}return t}var p=r.createContext({}),s=function(e){var n=r.useContext(p),a=n;return e&&(a="function"==typeof e?e(n):i(i({},n),e)),a},g=function(e){var n=s(e.components);return r.createElement(p.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var a=e.components,t=e.mdxType,o=e.originalType,p=e.parentName,g=l(e,["components","mdxType","originalType","parentName"]),c=s(a),d=t,y=c["".concat(p,".").concat(d)]||c[d]||m[d]||o;return a?r.createElement(y,i(i({ref:n},g),{},{components:a})):r.createElement(y,i({ref:n},g))}));function y(e,n){var a=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var o=a.length,i=new Array(o);i[0]=d;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l[c]="string"==typeof e?e:t,i[1]=l;for(var s=2;s{a.r(n),a.d(n,{assets:()=>p,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>s});var r=a(8168),t=(a(6540),a(5680));const o={id:"core_src.IHeapEdge",title:"Interface: IHeapEdge",sidebar_label:"IHeapEdge",custom_edit_url:null},i=void 0,l={unversionedId:"api/interfaces/core_src.IHeapEdge",id:"api/interfaces/core_src.IHeapEdge",title:"Interface: IHeapEdge",description:"An IHeapEdge instance represents a JS reference in a heap snapshot.",source:"@site/docs/api/interfaces/core_src.IHeapEdge.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapEdge",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdge",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapEdge",title:"Interface: IHeapEdge",sidebar_label:"IHeapEdge",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IBrowserInfo",permalink:"/memlab/docs/api/interfaces/core_src.IBrowserInfo"},next:{title:"IHeapEdges",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdges"}},p={},s=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:' edgeIndex: number',id:"-edgeindex-number",level:3},{value:' fromNode: IHeapNode',id:"-fromnode-iheapnode",level:3},{value:' is_index: boolean',id:"-is_index-boolean",level:3},{value:' name_or_index: string | number',id:"-name_or_index-string--number",level:3},{value:' snapshot: IHeapSnapshot',id:"-snapshot-iheapsnapshot",level:3},{value:' toNode: IHeapNode',id:"-tonode-iheapnode",level:3},{value:' to_node: number',id:"-to_node-number",level:3},{value:' type: string',id:"-type-string",level:3},{value:"Methods",id:"methods",level:2},{value:'toJSONString(...args)',id:"tojsonstringargs",level:3}],g={toc:s},c="wrapper";function m(e){let{components:n,...a}=e;return(0,t.yg)(c,(0,r.A)({},g,a,{components:n,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"An ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapEdge")," instance represents a JS reference in a heap snapshot.\nA heap snapshot is generally a graph where graph nodes are JS heap objects\nand graph edges are JS references among JS heap objects."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"readonly"))," it is not recommended to modify any ",(0,t.yg)("inlineCode",{parentName:"p"},"IHeapEdge")," instance"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),": V8 or hermes heap snapshot can be parsed by the\n",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#getfullheapfromfile"},"getFullHeapFromFile")," API.")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapEdge} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // iterate over each edge (JS reference in heap)\n heap.edges.forEach((edge: IHeapEdge, i: number) => {\n // use the heap edge APIs here\n const nameOrIndex = edge.name_or_index;\n // ...\n });\n})();\n")),(0,t.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("inlineCode",{parentName:"p"},"IHeapEdgeBasic")),(0,t.yg)("p",{parentName:"li"},"\u21b3 ",(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"IHeapEdge"))))),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-edgeindex-number"},(0,t.yg)("a",{id:"edgeindex",name:"edgeindex"})," ",(0,t.yg)("strong",{parentName:"h3"},"edgeIndex"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"index of this JS reference inside the ",(0,t.yg)("inlineCode",{parentName:"p"},"edge.snapshot.edges")," pseudo array"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1660"},"core/src/lib/Types.ts:1660"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-fromnode-iheapnode"},(0,t.yg)("a",{id:"fromnode",name:"fromnode"})," ",(0,t.yg)("strong",{parentName:"h3"},"fromNode"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode"))),(0,t.yg)("p",null,"returns an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")," instance representing the hosting\nJS heap object where this reference starts"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1681"},"core/src/lib/Types.ts:1681"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-is_index-boolean"},(0,t.yg)("a",{id:"is\\_index",name:"is\\_index"})," ",(0,t.yg)("strong",{parentName:"h3"},"is","_","index"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"boolean")),(0,t.yg)("p",null,"if ",(0,t.yg)("inlineCode",{parentName:"p"},"true"),", means this is a reference to an array element\nor internal table element (",(0,t.yg)("inlineCode",{parentName:"p"},"edge.name_or_index")," will return a number),\notherwise this is a reference with a string name (",(0,t.yg)("inlineCode",{parentName:"p"},"edge.name_or_index"),"\nwill return a string)"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1667"},"core/src/lib/Types.ts:1667"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-name_or_index-string--number"},(0,t.yg)("a",{id:"name\\_or\\_index",name:"name\\_or\\_index"})," ",(0,t.yg)("strong",{parentName:"h3"},"name","_","or","_","index"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"name of the JS reference. If this is a reference to an array element\nor internal table element, it is an numeric index"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1616"},"core/src/lib/Types.ts:1616"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-snapshot-iheapsnapshot"},(0,t.yg)("a",{id:"snapshot",name:"snapshot"})," ",(0,t.yg)("strong",{parentName:"h3"},"snapshot"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))),(0,t.yg)("p",null,"get the ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," containing this JS reference"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1656"},"core/src/lib/Types.ts:1656"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-tonode-iheapnode"},(0,t.yg)("a",{id:"tonode",name:"tonode"})," ",(0,t.yg)("strong",{parentName:"h3"},"toNode"),": ",(0,t.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode"))),(0,t.yg)("p",null,"returns an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")," instance representing the JS heap object\npointed to by this reference"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1676"},"core/src/lib/Types.ts:1676"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-to_node-number"},(0,t.yg)("a",{id:"to\\_node",name:"to\\_node"})," ",(0,t.yg)("strong",{parentName:"h3"},"to","_","node"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"the index of the JS heap object pointed to by this reference"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1671"},"core/src/lib/Types.ts:1671"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"-type-string"},(0,t.yg)("a",{id:"type",name:"type"})," ",(0,t.yg)("strong",{parentName:"h3"},"type"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"string")),(0,t.yg)("p",null,"type of the JS reference, all types:\n",(0,t.yg)("inlineCode",{parentName:"p"},"context"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"element"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"property"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"internal"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"hidden"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"shortcut"),", ",(0,t.yg)("inlineCode",{parentName:"p"},"weak")),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1621"},"core/src/lib/Types.ts:1621"))))),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"tojsonstringargs"},(0,t.yg)("a",{id:"tojsonstring"}),(0,t.yg)("strong",{parentName:"h3"},"toJSONString"),"(...",(0,t.yg)("inlineCode",{parentName:"h3"},"args"),")"),(0,t.yg)("p",null,"convert to a concise readable string output\n(like calling ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)"),")."),(0,t.yg)("p",null,"Note: Please be aware that using ",(0,t.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)")," is\nnot recommended as it will generate a JSON representation of the host\nobject that is too large to be easily readable due to its connections\nto other parts of the data structures within the heap snapshot."),(0,t.yg)("p",null,"This API does not completely serialize all the information\ncaptured by the hosting object."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"...args"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"any"),"[]"))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"string")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1694"},"core/src/lib/Types.ts:1694"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b53f1d78.45998845.js b/assets/js/b53f1d78.939f703c.js similarity index 95% rename from assets/js/b53f1d78.45998845.js rename to assets/js/b53f1d78.939f703c.js index 27fc386c..4411c2e4 100644 --- a/assets/js/b53f1d78.45998845.js +++ b/assets/js/b53f1d78.939f703c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[3925],{5680:(e,a,n)=>{n.d(a,{xA:()=>c,yg:()=>y});var t=n(6540);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function o(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=t.createContext({}),p=function(e){var a=t.useContext(s),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},c=function(e){var a=p(e.components);return t.createElement(s.Provider,{value:a},e.children)},m="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},u=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=p(n),u=r,y=m["".concat(s,".").concat(u)]||m[u]||g[u]||o;return n?t.createElement(y,i(i({ref:a},c),{},{components:n})):t.createElement(y,i({ref:a},c))}));function y(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=u;var l={};for(var s in a)hasOwnProperty.call(a,s)&&(l[s]=a[s]);l.originalType=e,l[m]="string"==typeof e?e:r,i[1]=l;for(var p=2;p{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>i,default:()=>g,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var t=n(8168),r=(n(6540),n(5680));const o={id:"core_src.IHeapLocation",title:"Interface: IHeapLocation",sidebar_label:"IHeapLocation",custom_edit_url:null},i=void 0,l={unversionedId:"api/interfaces/core_src.IHeapLocation",id:"api/interfaces/core_src.IHeapLocation",title:"Interface: IHeapLocation",description:"An IHeapLocation instance contains a source location information",source:"@site/docs/api/interfaces/core_src.IHeapLocation.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapLocation",permalink:"/memlab/docs/api/interfaces/core_src.IHeapLocation",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapLocation",title:"Interface: IHeapLocation",sidebar_label:"IHeapLocation",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapEdges",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdges"},next:{title:"IHeapNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNode"}},s={},p=[{value:"Properties",id:"properties",level:2},{value:' column: number',id:"-column-number",level:3},{value:' line: number',id:"-line-number",level:3},{value:' node: Nullable<IHeapNode>',id:"-node-nullableiheapnode",level:3},{value:' script_id: number',id:"-script_id-number",level:3},{value:' snapshot: IHeapSnapshot',id:"-snapshot-iheapsnapshot",level:3},{value:"Methods",id:"methods",level:2},{value:'toJSONString(...args)',id:"tojsonstringargs",level:3}],c={toc:p},m="wrapper";function g(e){let{components:a,...n}=e;return(0,r.yg)(m,(0,t.A)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"An ",(0,r.yg)("inlineCode",{parentName:"p"},"IHeapLocation")," instance contains a source location information\nassociated with a JS heap object.\nA heap snapshot is generally a graph where graph nodes are JS heap objects\nand graph edges are JS references among JS heap objects."),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},(0,r.yg)("inlineCode",{parentName:"strong"},"readonly"))," it is not recommended to modify any ",(0,r.yg)("inlineCode",{parentName:"p"},"IHeapLocation")," instance"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),": V8 or hermes heap snapshot can be parsed by the\n",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#getfullheapfromfile"},"getFullHeapFromFile")," API.")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapNode, IHeapLocation} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // iterate over each node (heap object)\n heap.nodes.forEach((node: IHeapNode, i: number) => {\n const location: Nullable = node.location;\n if (location) {\n // use the location API here\n location.line;\n // ...\n }\n });\n})();\n")),(0,r.yg)("h2",{id:"properties"},"Properties"),(0,r.yg)("h3",{id:"-column-number"},(0,r.yg)("a",{id:"column",name:"column"})," ",(0,r.yg)("strong",{parentName:"h3"},"column"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"number")),(0,r.yg)("p",null,"get the column number"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1594"},"core/src/lib/Types.ts:1594"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-line-number"},(0,r.yg)("a",{id:"line",name:"line"})," ",(0,r.yg)("strong",{parentName:"h3"},"line"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"number")),(0,r.yg)("p",null,"get the line number"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1590"},"core/src/lib/Types.ts:1590"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-node-nullableiheapnode"},(0,r.yg)("a",{id:"node",name:"node"})," ",(0,r.yg)("strong",{parentName:"h3"},"node"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#nullable"},(0,r.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"),(0,r.yg)("p",null,"get the heap object this location this location represents"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1582"},"core/src/lib/Types.ts:1582"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-script_id-number"},(0,r.yg)("a",{id:"script\\_id",name:"script\\_id"})," ",(0,r.yg)("strong",{parentName:"h3"},"script","_","id"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"number")),(0,r.yg)("p",null,"get the script ID of the source file"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1586"},"core/src/lib/Types.ts:1586"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-snapshot-iheapsnapshot"},(0,r.yg)("a",{id:"snapshot",name:"snapshot"})," ",(0,r.yg)("strong",{parentName:"h3"},"snapshot"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))),(0,r.yg)("p",null,"get the ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," containing this location instance"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1578"},"core/src/lib/Types.ts:1578"))))),(0,r.yg)("h2",{id:"methods"},"Methods"),(0,r.yg)("h3",{id:"tojsonstringargs"},(0,r.yg)("a",{id:"tojsonstring"}),(0,r.yg)("strong",{parentName:"h3"},"toJSONString"),"(...",(0,r.yg)("inlineCode",{parentName:"h3"},"args"),")"),(0,r.yg)("p",null,"convert to a concise readable string output\n(like calling ",(0,r.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)"),")."),(0,r.yg)("p",null,"Note: Please be aware that using ",(0,r.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)")," is\nnot recommended as it will generate a JSON representation of the host\nobject that is too large to be easily readable due to its connections\nto other parts of the data structures within the heap snapshot."),(0,r.yg)("p",null,"This API does not completely serialize all the information\ncaptured by the hosting object."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"...args"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"any"),"[]"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1607"},"core/src/lib/Types.ts:1607"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[3925],{5680:(e,a,n)=>{n.d(a,{xA:()=>c,yg:()=>y});var t=n(6540);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function o(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=t.createContext({}),p=function(e){var a=t.useContext(s),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},c=function(e){var a=p(e.components);return t.createElement(s.Provider,{value:a},e.children)},m="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},u=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=p(n),u=r,y=m["".concat(s,".").concat(u)]||m[u]||g[u]||o;return n?t.createElement(y,i(i({ref:a},c),{},{components:n})):t.createElement(y,i({ref:a},c))}));function y(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=u;var l={};for(var s in a)hasOwnProperty.call(a,s)&&(l[s]=a[s]);l.originalType=e,l[m]="string"==typeof e?e:r,i[1]=l;for(var p=2;p{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>i,default:()=>g,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var t=n(8168),r=(n(6540),n(5680));const o={id:"core_src.IHeapLocation",title:"Interface: IHeapLocation",sidebar_label:"IHeapLocation",custom_edit_url:null},i=void 0,l={unversionedId:"api/interfaces/core_src.IHeapLocation",id:"api/interfaces/core_src.IHeapLocation",title:"Interface: IHeapLocation",description:"An IHeapLocation instance contains a source location information",source:"@site/docs/api/interfaces/core_src.IHeapLocation.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapLocation",permalink:"/memlab/docs/api/interfaces/core_src.IHeapLocation",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapLocation",title:"Interface: IHeapLocation",sidebar_label:"IHeapLocation",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapEdges",permalink:"/memlab/docs/api/interfaces/core_src.IHeapEdges"},next:{title:"IHeapNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNode"}},s={},p=[{value:"Properties",id:"properties",level:2},{value:' column: number',id:"-column-number",level:3},{value:' line: number',id:"-line-number",level:3},{value:' node: Nullable<IHeapNode>',id:"-node-nullableiheapnode",level:3},{value:' script_id: number',id:"-script_id-number",level:3},{value:' snapshot: IHeapSnapshot',id:"-snapshot-iheapsnapshot",level:3},{value:"Methods",id:"methods",level:2},{value:'toJSONString(...args)',id:"tojsonstringargs",level:3}],c={toc:p},m="wrapper";function g(e){let{components:a,...n}=e;return(0,r.yg)(m,(0,t.A)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"An ",(0,r.yg)("inlineCode",{parentName:"p"},"IHeapLocation")," instance contains a source location information\nassociated with a JS heap object.\nA heap snapshot is generally a graph where graph nodes are JS heap objects\nand graph edges are JS references among JS heap objects."),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},(0,r.yg)("inlineCode",{parentName:"strong"},"readonly"))," it is not recommended to modify any ",(0,r.yg)("inlineCode",{parentName:"p"},"IHeapLocation")," instance"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),": V8 or hermes heap snapshot can be parsed by the\n",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#getfullheapfromfile"},"getFullHeapFromFile")," API.")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapNode, IHeapLocation} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // iterate over each node (heap object)\n heap.nodes.forEach((node: IHeapNode, i: number) => {\n const location: Nullable = node.location;\n if (location) {\n // use the location API here\n location.line;\n // ...\n }\n });\n})();\n")),(0,r.yg)("h2",{id:"properties"},"Properties"),(0,r.yg)("h3",{id:"-column-number"},(0,r.yg)("a",{id:"column",name:"column"})," ",(0,r.yg)("strong",{parentName:"h3"},"column"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"number")),(0,r.yg)("p",null,"get the column number"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1594"},"core/src/lib/Types.ts:1594"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-line-number"},(0,r.yg)("a",{id:"line",name:"line"})," ",(0,r.yg)("strong",{parentName:"h3"},"line"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"number")),(0,r.yg)("p",null,"get the line number"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1590"},"core/src/lib/Types.ts:1590"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-node-nullableiheapnode"},(0,r.yg)("a",{id:"node",name:"node"})," ",(0,r.yg)("strong",{parentName:"h3"},"node"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#nullable"},(0,r.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"),(0,r.yg)("p",null,"get the heap object this location this location represents"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1582"},"core/src/lib/Types.ts:1582"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-script_id-number"},(0,r.yg)("a",{id:"script\\_id",name:"script\\_id"})," ",(0,r.yg)("strong",{parentName:"h3"},"script","_","id"),": ",(0,r.yg)("inlineCode",{parentName:"h3"},"number")),(0,r.yg)("p",null,"get the script ID of the source file"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1586"},"core/src/lib/Types.ts:1586"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-snapshot-iheapsnapshot"},(0,r.yg)("a",{id:"snapshot",name:"snapshot"})," ",(0,r.yg)("strong",{parentName:"h3"},"snapshot"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapSnapshot"))),(0,r.yg)("p",null,"get the ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," containing this location instance"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1578"},"core/src/lib/Types.ts:1578"))))),(0,r.yg)("h2",{id:"methods"},"Methods"),(0,r.yg)("h3",{id:"tojsonstringargs"},(0,r.yg)("a",{id:"tojsonstring"}),(0,r.yg)("strong",{parentName:"h3"},"toJSONString"),"(...",(0,r.yg)("inlineCode",{parentName:"h3"},"args"),")"),(0,r.yg)("p",null,"convert to a concise readable string output\n(like calling ",(0,r.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)"),")."),(0,r.yg)("p",null,"Note: Please be aware that using ",(0,r.yg)("inlineCode",{parentName:"p"},"JSON.stringify(node, ...args)")," is\nnot recommended as it will generate a JSON representation of the host\nobject that is too large to be easily readable due to its connections\nto other parts of the data structures within the heap snapshot."),(0,r.yg)("p",null,"This API does not completely serialize all the information\ncaptured by the hosting object."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"...args"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"any"),"[]"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1607"},"core/src/lib/Types.ts:1607"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c90dd339.45996320.js b/assets/js/c90dd339.21c4989b.js similarity index 97% rename from assets/js/c90dd339.45996320.js rename to assets/js/c90dd339.21c4989b.js index 1989b3e5..bdb7f5bd 100644 --- a/assets/js/c90dd339.45996320.js +++ b/assets/js/c90dd339.21c4989b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[1456],{5680:(e,a,n)=>{n.d(a,{xA:()=>m,yg:()=>d});var t=n(6540);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function o(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var a=1;a=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=t.createContext({}),i=function(e){var a=t.useContext(s),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},m=function(e){var a=i(e.components);return t.createElement(s.Provider,{value:a},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},y=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),c=i(n),y=r,d=c["".concat(s,".").concat(y)]||c[y]||g[y]||o;return n?t.createElement(d,l(l({ref:a},m),{},{components:n})):t.createElement(d,l({ref:a},m))}));function d(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=y;var p={};for(var s in a)hasOwnProperty.call(a,s)&&(p[s]=a[s]);p.originalType=e,p[c]="string"==typeof e?e:r,l[1]=p;for(var i=2;i{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>l,default:()=>g,frontMatter:()=>o,metadata:()=>p,toc:()=>i});var t=n(8168),r=(n(6540),n(5680));const o={id:"core_src.IHeapSnapshot",title:"Interface: IHeapSnapshot",sidebar_label:"IHeapSnapshot",custom_edit_url:null},l=void 0,p={unversionedId:"api/interfaces/core_src.IHeapSnapshot",id:"api/interfaces/core_src.IHeapSnapshot",title:"Interface: IHeapSnapshot",description:"A heap snapshot is generally a graph where graph nodes are JS heap objects",source:"@site/docs/api/interfaces/core_src.IHeapSnapshot.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapSnapshot",permalink:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapSnapshot",title:"Interface: IHeapSnapshot",sidebar_label:"IHeapSnapshot",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapNodes",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNodes"},next:{title:"IHeapStringNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"}},s={},i=[{value:"Properties",id:"properties",level:2},{value:' edges: IHeapEdges',id:"-edges-iheapedges",level:3},{value:' nodes: IHeapNodes',id:"-nodes-iheapnodes",level:3},{value:"Methods",id:"methods",level:2},{value:'getAnyObjectWithClassName(className)',id:"getanyobjectwithclassnameclassname",level:3},{value:'getNodeById(id)',id:"getnodebyidid",level:3},{value:'getNodesByIdSet(ids)',id:"getnodesbyidsetids",level:3},{value:'getNodesByIds(ids)',id:"getnodesbyidsids",level:3},{value:'hasObjectWithClassName(className)',id:"hasobjectwithclassnameclassname",level:3},{value:'hasObjectWithPropertyName(nameOrIndex)',id:"hasobjectwithpropertynamenameorindex",level:3},{value:'hasObjectWithTag(tag)',id:"hasobjectwithtagtag",level:3}],m={toc:i},c="wrapper";function g(e){let{components:a,...n}=e;return(0,r.yg)(c,(0,t.A)({},m,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"A heap snapshot is generally a graph where graph nodes are JS heap objects\nand graph edges are JS references among JS heap objects. For more details\non the structure of nodes and edges in the heap graph, check out\n",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")," and ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},"IHeapEdge"),"."),(0,r.yg)("h2",{id:"properties"},"Properties"),(0,r.yg)("h3",{id:"-edges-iheapedges"},(0,r.yg)("a",{id:"edges",name:"edges"})," ",(0,r.yg)("strong",{parentName:"h3"},"edges"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdges"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapEdges"))),(0,r.yg)("p",null,"A pseudo array containing all heap graph edges (references to heap objects\nin heap). A JS heap could contain millions of references, so memlab uses\na pseudo array as the collection of all the heap edges. The pseudo\narray provides API to query and traverse all heap references."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapEdge} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // get the total number of heap references\n heap.edges.length;\n\n heap.edges.forEach((edge: IHeapEdge) => {\n // traverse each reference in the heap\n });\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1332"},"core/src/lib/Types.ts:1332"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-nodes-iheapnodes"},(0,r.yg)("a",{id:"nodes",name:"nodes"})," ",(0,r.yg)("strong",{parentName:"h3"},"nodes"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNodes"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNodes"))),(0,r.yg)("p",null,"A pseudo array containing all heap graph nodes (JS objects in heap).\nA JS heap could contain millions of heap objects, so memlab uses\na pseudo array as the collection of all the heap objects. The pseudo\narray provides API to query and traverse all heap objects."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapNode} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // get the total number of heap objects\n heap.nodes.length;\n\n heap.nodes.forEach((node: IHeapNode) => {\n // traverse each heap object\n });\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1306"},"core/src/lib/Types.ts:1306"))))),(0,r.yg)("h2",{id:"methods"},"Methods"),(0,r.yg)("h3",{id:"getanyobjectwithclassnameclassname"},(0,r.yg)("a",{id:"getanyobjectwithclassname"}),(0,r.yg)("strong",{parentName:"h3"},"getAnyObjectWithClassName"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"className"),")"),(0,r.yg)("p",null,"Search for the heap and get one of the JS object instances with\na specified constructor name (if there is any)."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"className"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | The constructor name of the object instance"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,r.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | a handle pointing to any one of the object instances, returns\n",(0,r.yg)("inlineCode",{parentName:"p"},"null")," if no such object exists in the heap.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {takeNodeMinimalHeap} from '@memlab/core';\n\nclass TestObject {\n public arr1 = [1, 2, 3];\n public arr2 = ['1', '2', '3'];\n}\n\n(async function () {\n const obj = new TestObject();\n // get a heap snapshot of the current program state\n const heap: IHeapSnapshot = await takeNodeMinimalHeap();\n\n const node = heap.getAnyObjectWithClassName('TestObject');\n console.log(node?.name); // should be 'TestObject'\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1473"},"core/src/lib/Types.ts:1473"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getnodebyidid"},(0,r.yg)("a",{id:"getnodebyid"}),(0,r.yg)("strong",{parentName:"h3"},"getNodeById"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"id"),")"),(0,r.yg)("p",null,"If you have the id of a heap node (JS object in heap), use this API\nto get an ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")," associated with the id."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"id"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"number")," | id of the heap node (JS object in heap) you would like to query"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,r.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the API returns ",(0,r.yg)("inlineCode",{parentName:"p"},"null")," if no heap object has the specified id.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n const node = heap.getNodeById(351);\n node?.id; // should be 351\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1354"},"core/src/lib/Types.ts:1354"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getnodesbyidsetids"},(0,r.yg)("a",{id:"getnodesbyidset"}),(0,r.yg)("strong",{parentName:"h3"},"getNodesByIdSet"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"ids"),")"),(0,r.yg)("p",null,"Given a set of ids of heap nodes (JS objects in heap), use this API\nto get a set of those heap nodes."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"ids"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Set"),"<",(0,r.yg)("inlineCode",{parentName:"li"},"number"),">"," | id set of the heap nodes (JS objects in heap) you would like to query"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"Set"),"<",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | a set of those heap nodes. The set will only include\nnodes that are found in the heap. If none of the input ids are found,\nthis API will return an empty set.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // suppose 1000 is not a valid id in the heap\n const set = heap.getNodesByIdSet(new Set([1, 2, 1000, 3]));\n set // should be Set([node1, node2, node3])\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1406"},"core/src/lib/Types.ts:1406"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getnodesbyidsids"},(0,r.yg)("a",{id:"getnodesbyids"}),(0,r.yg)("strong",{parentName:"h3"},"getNodesByIds"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"ids"),")"),(0,r.yg)("p",null,"Given an array of ids of heap nodes (JS objects in heap), use this API\nto get an array of those heap nodes."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"ids"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"number"),"[] | id array of the heap nodes (JS objects in heap) you would like to query"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,r.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">","[] | an array of those heap nodes. The return array will preserve the\norder of the input array. If an id is not found in the heap, the\ncorresponding element in the return array will be ",(0,r.yg)("inlineCode",{parentName:"p"},"null"),".")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // suppose 1000 is not a valid id in the heap\n const nodes = heap.getNodesByIds([1, 2, 1000, 3]);\n nodes // should be [node1, node2, null, node3]\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1380"},"core/src/lib/Types.ts:1380"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"hasobjectwithclassnameclassname"},(0,r.yg)("a",{id:"hasobjectwithclassname"}),(0,r.yg)("strong",{parentName:"h3"},"hasObjectWithClassName"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"className"),")"),(0,r.yg)("p",null,"Search for the heap and check if there is any JS object instance with\na specified constructor name."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"className"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | The constructor name of the object instance"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"boolean")," | ",(0,r.yg)("inlineCode",{parentName:"p"},"true")," if there is at least one such object in the heap")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),": you can write a jest unit test with memory assertions:"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"// save as example.test.ts\nimport type {IHeapSnapshot, Nullable} from '@memlab/core';\nimport {config, takeNodeMinimalHeap} from '@memlab/core';\n\nclass TestObject {\n public arr1 = [1, 2, 3];\n public arr2 = ['1', '2', '3'];\n}\n\ntest('memory test with heap assertion', async () => {\n config.muteConsole = true; // no console output\n\n let obj: Nullable = new TestObject();\n // get a heap snapshot of the current program state\n let heap: IHeapSnapshot = await takeNodeMinimalHeap();\n\n // call some function that may add references to obj\n rabbitHole(obj)\n\n expect(heap.hasObjectWithClassName('TestObject')).toBe(true);\n obj = null;\n\n heap = await takeNodeMinimalHeap();\n // if rabbitHole does not have any side effect that\n // adds new references to obj, then obj can be GCed\n expect(heap.hasObjectWithClassName('TestObject')).toBe(false);\n\n}, 30000);\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1445"},"core/src/lib/Types.ts:1445"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"hasobjectwithpropertynamenameorindex"},(0,r.yg)("a",{id:"hasobjectwithpropertyname"}),(0,r.yg)("strong",{parentName:"h3"},"hasObjectWithPropertyName"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"nameOrIndex"),")"),(0,r.yg)("p",null,"Search for the heap and check if there is any JS object instance with\na specified property name."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"nameOrIndex"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,r.yg)("inlineCode",{parentName:"li"},"number")," | The property name (string) or element index (number) on the object instance"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"boolean")," | returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true")," if there is at least one such object in the heap")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const object = {'memlab-test-heap-property': 'memlab-test-heap-value'};\n\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // should be true\n console.log(heap.hasObjectWithPropertyName('memlab-test-heap-property'));\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1499"},"core/src/lib/Types.ts:1499"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"hasobjectwithtagtag"},(0,r.yg)("a",{id:"hasobjectwithtag"}),(0,r.yg)("strong",{parentName:"h3"},"hasObjectWithTag"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"tag"),")"),(0,r.yg)("p",null,"Search for the heap and check if there is any JS object instance with\na marker tagged by ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#tagobject"},"tagObject"),"."),(0,r.yg)("p",null,"The ",(0,r.yg)("inlineCode",{parentName:"p"},"tagObject")," API does not modify the object instance in any way\n(e.g., no additional or hidden properties added to the tagged object)."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"tag"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | marker name on the object instances tagged by ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#tagobject"},"tagObject")))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"boolean")," | returns ",(0,r.yg)("inlineCode",{parentName:"li"},"true")," if there is at least one such object in the heap")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, AnyValue} from '@memlab/core';\nimport {config, takeNodeMinimalHeap, tagObject} from '@memlab/core';\n\ntest('memory test', async () => {\n config.muteConsole = true;\n const o1: AnyValue = {};\n let o2: AnyValue = {};\n\n // tag o1 with marker: \"memlab-mark-1\", does not modify o1 in any way\n tagObject(o1, 'memlab-mark-1');\n // tag o2 with marker: \"memlab-mark-2\", does not modify o2 in any way\n tagObject(o2, 'memlab-mark-2');\n\n o2 = null;\n\n const heap: IHeapSnapshot = await takeNodeMinimalHeap();\n\n // expect object with marker \"memlab-mark-1\" exists\n expect(heap.hasObjectWithTag('memlab-mark-1')).toBe(true);\n\n // expect object with marker \"memlab-mark-2\" can be GCed\n expect(heap.hasObjectWithTag('memlab-mark-2')).toBe(false);\n\n}, 30000);\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1537"},"core/src/lib/Types.ts:1537"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[1456],{5680:(e,a,n)=>{n.d(a,{xA:()=>m,yg:()=>d});var t=n(6540);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function o(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var a=1;a=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=t.createContext({}),i=function(e){var a=t.useContext(s),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},m=function(e){var a=i(e.components);return t.createElement(s.Provider,{value:a},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},y=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),c=i(n),y=r,d=c["".concat(s,".").concat(y)]||c[y]||g[y]||o;return n?t.createElement(d,l(l({ref:a},m),{},{components:n})):t.createElement(d,l({ref:a},m))}));function d(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=y;var p={};for(var s in a)hasOwnProperty.call(a,s)&&(p[s]=a[s]);p.originalType=e,p[c]="string"==typeof e?e:r,l[1]=p;for(var i=2;i{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>l,default:()=>g,frontMatter:()=>o,metadata:()=>p,toc:()=>i});var t=n(8168),r=(n(6540),n(5680));const o={id:"core_src.IHeapSnapshot",title:"Interface: IHeapSnapshot",sidebar_label:"IHeapSnapshot",custom_edit_url:null},l=void 0,p={unversionedId:"api/interfaces/core_src.IHeapSnapshot",id:"api/interfaces/core_src.IHeapSnapshot",title:"Interface: IHeapSnapshot",description:"A heap snapshot is generally a graph where graph nodes are JS heap objects",source:"@site/docs/api/interfaces/core_src.IHeapSnapshot.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapSnapshot",permalink:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapSnapshot",title:"Interface: IHeapSnapshot",sidebar_label:"IHeapSnapshot",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapNodes",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNodes"},next:{title:"IHeapStringNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapStringNode"}},s={},i=[{value:"Properties",id:"properties",level:2},{value:' edges: IHeapEdges',id:"-edges-iheapedges",level:3},{value:' nodes: IHeapNodes',id:"-nodes-iheapnodes",level:3},{value:"Methods",id:"methods",level:2},{value:'getAnyObjectWithClassName(className)',id:"getanyobjectwithclassnameclassname",level:3},{value:'getNodeById(id)',id:"getnodebyidid",level:3},{value:'getNodesByIdSet(ids)',id:"getnodesbyidsetids",level:3},{value:'getNodesByIds(ids)',id:"getnodesbyidsids",level:3},{value:'hasObjectWithClassName(className)',id:"hasobjectwithclassnameclassname",level:3},{value:'hasObjectWithPropertyName(nameOrIndex)',id:"hasobjectwithpropertynamenameorindex",level:3},{value:'hasObjectWithTag(tag)',id:"hasobjectwithtagtag",level:3}],m={toc:i},c="wrapper";function g(e){let{components:a,...n}=e;return(0,r.yg)(c,(0,t.A)({},m,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"A heap snapshot is generally a graph where graph nodes are JS heap objects\nand graph edges are JS references among JS heap objects. For more details\non the structure of nodes and edges in the heap graph, check out\n",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")," and ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},"IHeapEdge"),"."),(0,r.yg)("h2",{id:"properties"},"Properties"),(0,r.yg)("h3",{id:"-edges-iheapedges"},(0,r.yg)("a",{id:"edges",name:"edges"})," ",(0,r.yg)("strong",{parentName:"h3"},"edges"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapEdges"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapEdges"))),(0,r.yg)("p",null,"A pseudo array containing all heap graph edges (references to heap objects\nin heap). A JS heap could contain millions of references, so memlab uses\na pseudo array as the collection of all the heap edges. The pseudo\narray provides API to query and traverse all heap references."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapEdge} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // get the total number of heap references\n heap.edges.length;\n\n heap.edges.forEach((edge: IHeapEdge) => {\n // traverse each reference in the heap\n });\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1332"},"core/src/lib/Types.ts:1332"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-nodes-iheapnodes"},(0,r.yg)("a",{id:"nodes",name:"nodes"})," ",(0,r.yg)("strong",{parentName:"h3"},"nodes"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/interfaces/core_src.IHeapNodes"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNodes"))),(0,r.yg)("p",null,"A pseudo array containing all heap graph nodes (JS objects in heap).\nA JS heap could contain millions of heap objects, so memlab uses\na pseudo array as the collection of all the heap objects. The pseudo\narray provides API to query and traverse all heap objects."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapNode} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // get the total number of heap objects\n heap.nodes.length;\n\n heap.nodes.forEach((node: IHeapNode) => {\n // traverse each heap object\n });\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1306"},"core/src/lib/Types.ts:1306"))))),(0,r.yg)("h2",{id:"methods"},"Methods"),(0,r.yg)("h3",{id:"getanyobjectwithclassnameclassname"},(0,r.yg)("a",{id:"getanyobjectwithclassname"}),(0,r.yg)("strong",{parentName:"h3"},"getAnyObjectWithClassName"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"className"),")"),(0,r.yg)("p",null,"Search for the heap and get one of the JS object instances with\na specified constructor name (if there is any)."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"className"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | The constructor name of the object instance"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,r.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | a handle pointing to any one of the object instances, returns\n",(0,r.yg)("inlineCode",{parentName:"p"},"null")," if no such object exists in the heap.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {takeNodeMinimalHeap} from '@memlab/core';\n\nclass TestObject {\n public arr1 = [1, 2, 3];\n public arr2 = ['1', '2', '3'];\n}\n\n(async function () {\n const obj = new TestObject();\n // get a heap snapshot of the current program state\n const heap: IHeapSnapshot = await takeNodeMinimalHeap();\n\n const node = heap.getAnyObjectWithClassName('TestObject');\n console.log(node?.name); // should be 'TestObject'\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1473"},"core/src/lib/Types.ts:1473"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getnodebyidid"},(0,r.yg)("a",{id:"getnodebyid"}),(0,r.yg)("strong",{parentName:"h3"},"getNodeById"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"id"),")"),(0,r.yg)("p",null,"If you have the id of a heap node (JS object in heap), use this API\nto get an ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")," associated with the id."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"id"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"number")," | id of the heap node (JS object in heap) you would like to query"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,r.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | the API returns ",(0,r.yg)("inlineCode",{parentName:"p"},"null")," if no heap object has the specified id.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n const node = heap.getNodeById(351);\n node?.id; // should be 351\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1354"},"core/src/lib/Types.ts:1354"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getnodesbyidsetids"},(0,r.yg)("a",{id:"getnodesbyidset"}),(0,r.yg)("strong",{parentName:"h3"},"getNodesByIdSet"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"ids"),")"),(0,r.yg)("p",null,"Given a set of ids of heap nodes (JS objects in heap), use this API\nto get a set of those heap nodes."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"ids"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Set"),"<",(0,r.yg)("inlineCode",{parentName:"li"},"number"),">"," | id set of the heap nodes (JS objects in heap) you would like to query"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"Set"),"<",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | a set of those heap nodes. The set will only include\nnodes that are found in the heap. If none of the input ids are found,\nthis API will return an empty set.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // suppose 1000 is not a valid id in the heap\n const set = heap.getNodesByIdSet(new Set([1, 2, 1000, 3]));\n set // should be Set([node1, node2, node3])\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1406"},"core/src/lib/Types.ts:1406"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"getnodesbyidsids"},(0,r.yg)("a",{id:"getnodesbyids"}),(0,r.yg)("strong",{parentName:"h3"},"getNodesByIds"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"ids"),")"),(0,r.yg)("p",null,"Given an array of ids of heap nodes (JS objects in heap), use this API\nto get an array of those heap nodes."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"ids"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"number"),"[] | id array of the heap nodes (JS objects in heap) you would like to query"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,r.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,r.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">","[] | an array of those heap nodes. The return array will preserve the\norder of the input array. If an id is not found in the heap, the\ncorresponding element in the return array will be ",(0,r.yg)("inlineCode",{parentName:"p"},"null"),".")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // suppose 1000 is not a valid id in the heap\n const nodes = heap.getNodesByIds([1, 2, 1000, 3]);\n nodes // should be [node1, node2, null, node3]\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1380"},"core/src/lib/Types.ts:1380"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"hasobjectwithclassnameclassname"},(0,r.yg)("a",{id:"hasobjectwithclassname"}),(0,r.yg)("strong",{parentName:"h3"},"hasObjectWithClassName"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"className"),")"),(0,r.yg)("p",null,"Search for the heap and check if there is any JS object instance with\na specified constructor name."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"className"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | The constructor name of the object instance"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"boolean")," | ",(0,r.yg)("inlineCode",{parentName:"p"},"true")," if there is at least one such object in the heap")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),": you can write a jest unit test with memory assertions:"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"// save as example.test.ts\nimport type {IHeapSnapshot, Nullable} from '@memlab/core';\nimport {config, takeNodeMinimalHeap} from '@memlab/core';\n\nclass TestObject {\n public arr1 = [1, 2, 3];\n public arr2 = ['1', '2', '3'];\n}\n\ntest('memory test with heap assertion', async () => {\n config.muteConsole = true; // no console output\n\n let obj: Nullable = new TestObject();\n // get a heap snapshot of the current program state\n let heap: IHeapSnapshot = await takeNodeMinimalHeap();\n\n // call some function that may add references to obj\n rabbitHole(obj)\n\n expect(heap.hasObjectWithClassName('TestObject')).toBe(true);\n obj = null;\n\n heap = await takeNodeMinimalHeap();\n // if rabbitHole does not have any side effect that\n // adds new references to obj, then obj can be GCed\n expect(heap.hasObjectWithClassName('TestObject')).toBe(false);\n\n}, 30000);\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1445"},"core/src/lib/Types.ts:1445"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"hasobjectwithpropertynamenameorindex"},(0,r.yg)("a",{id:"hasobjectwithpropertyname"}),(0,r.yg)("strong",{parentName:"h3"},"hasObjectWithPropertyName"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"nameOrIndex"),")"),(0,r.yg)("p",null,"Search for the heap and check if there is any JS object instance with\na specified property name."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"nameOrIndex"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," ","|"," ",(0,r.yg)("inlineCode",{parentName:"li"},"number")," | The property name (string) or element index (number) on the object instance"))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"p"},"boolean")," | returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true")," if there is at least one such object in the heap")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const object = {'memlab-test-heap-property': 'memlab-test-heap-value'};\n\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n // should be true\n console.log(heap.hasObjectWithPropertyName('memlab-test-heap-property'));\n})();\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1499"},"core/src/lib/Types.ts:1499"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"hasobjectwithtagtag"},(0,r.yg)("a",{id:"hasobjectwithtag"}),(0,r.yg)("strong",{parentName:"h3"},"hasObjectWithTag"),"(",(0,r.yg)("inlineCode",{parentName:"h3"},"tag"),")"),(0,r.yg)("p",null,"Search for the heap and check if there is any JS object instance with\na marker tagged by ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#tagobject"},"tagObject"),"."),(0,r.yg)("p",null,"The ",(0,r.yg)("inlineCode",{parentName:"p"},"tagObject")," API does not modify the object instance in any way\n(e.g., no additional or hidden properties added to the tagged object)."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Parameters"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"tag"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | marker name on the object instances tagged by ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#tagobject"},"tagObject")))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"boolean")," | returns ",(0,r.yg)("inlineCode",{parentName:"li"},"true")," if there is at least one such object in the heap")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, AnyValue} from '@memlab/core';\nimport {config, takeNodeMinimalHeap, tagObject} from '@memlab/core';\n\ntest('memory test', async () => {\n config.muteConsole = true;\n const o1: AnyValue = {};\n let o2: AnyValue = {};\n\n // tag o1 with marker: \"memlab-mark-1\", does not modify o1 in any way\n tagObject(o1, 'memlab-mark-1');\n // tag o2 with marker: \"memlab-mark-2\", does not modify o2 in any way\n tagObject(o2, 'memlab-mark-2');\n\n o2 = null;\n\n const heap: IHeapSnapshot = await takeNodeMinimalHeap();\n\n // expect object with marker \"memlab-mark-1\" exists\n expect(heap.hasObjectWithTag('memlab-mark-1')).toBe(true);\n\n // expect object with marker \"memlab-mark-2\" can be GCed\n expect(heap.hasObjectWithTag('memlab-mark-2')).toBe(false);\n\n}, 30000);\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1537"},"core/src/lib/Types.ts:1537"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e012388a.adb9aff1.js b/assets/js/e012388a.d74272f8.js similarity index 97% rename from assets/js/e012388a.adb9aff1.js rename to assets/js/e012388a.d74272f8.js index 5c97995a..a67e330e 100644 --- a/assets/js/e012388a.adb9aff1.js +++ b/assets/js/e012388a.d74272f8.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8953],{5680:(e,a,n)=>{n.d(a,{xA:()=>c,yg:()=>y});var r=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function o(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var p=r.createContext({}),s=function(e){var a=r.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},c=function(e){var a=s(e.components);return r.createElement(p.Provider,{value:a},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},g=r.forwardRef((function(e,a){var n=e.components,t=e.mdxType,o=e.originalType,p=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=s(n),g=t,y=m["".concat(p,".").concat(g)]||m[g]||d[g]||o;return n?r.createElement(y,l(l({ref:a},c),{},{components:n})):r.createElement(y,l({ref:a},c))}));function y(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var o=n.length,l=new Array(o);l[0]=g;var i={};for(var p in a)hasOwnProperty.call(a,p)&&(i[p]=a[p]);i.originalType=e,i[m]="string"==typeof e?e:t,l[1]=i;for(var s=2;s{n.r(a),n.d(a,{assets:()=>p,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>s});var r=n(8168),t=(n(6540),n(5680));const o={id:"core_src.IHeapNodes",title:"Interface: IHeapNodes",sidebar_label:"IHeapNodes",custom_edit_url:null},l=void 0,i={unversionedId:"api/interfaces/core_src.IHeapNodes",id:"api/interfaces/core_src.IHeapNodes",title:"Interface: IHeapNodes",description:"A pseudo array containing all heap graph nodes (JS objects",source:"@site/docs/api/interfaces/core_src.IHeapNodes.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapNodes",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNodes",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapNodes",title:"Interface: IHeapNodes",sidebar_label:"IHeapNodes",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNode"},next:{title:"IHeapSnapshot",permalink:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"}},p={},s=[{value:"Properties",id:"properties",level:2},{value:' length: number',id:"-length-number",level:3},{value:"Methods",id:"methods",level:2},{value:'forEach(callback)',id:"foreachcallback",level:3},{value:'get(index)',id:"getindex",level:3}],c={toc:s},m="wrapper";function d(e){let{components:a,...n}=e;return(0,t.yg)(m,(0,r.A)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"A pseudo array containing all heap graph nodes (JS objects\nin heap). A JS heap could contain millions of objects, so memlab uses\na pseudo array as the collection of all the heap nodes. The pseudo\narray provides API to query and traverse all heap objects."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"readonly"))," modifying this pseudo array is not recommended"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapNodes} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n const nodes: IHeapNodes = heap.nodes;\n nodes.length;\n nodes.get(0);\n nodes.forEach((node, i) => {\n if (stopIteration) {\n return false;\n }\n });\n})();\n")),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-length-number"},(0,t.yg)("a",{id:"length",name:"length"})," ",(0,t.yg)("strong",{parentName:"h3"},"length"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The total number of nodes in heap graph (or JS objects in heap\nsnapshot)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2238"},"core/src/lib/Types.ts:2238"))))),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"foreachcallback"},(0,t.yg)("a",{id:"foreach"}),(0,t.yg)("strong",{parentName:"h3"},"forEach"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"Iterate over all array elements and apply the callback\nto each element in ascending order of element index."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": (",(0,t.yg)("inlineCode",{parentName:"li"},"node"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),", ",(0,t.yg)("inlineCode",{parentName:"li"},"index"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"number"),") => ",(0,t.yg)("inlineCode",{parentName:"li"},"boolean")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"void")," | the callback does not need to return any value, if the callback returns ",(0,t.yg)("inlineCode",{parentName:"li"},"false")," when iterating on element at index ",(0,t.yg)("inlineCode",{parentName:"li"},"i"),", then all elements after ",(0,t.yg)("inlineCode",{parentName:"li"},"i")," won't be iterated."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2254"},"core/src/lib/Types.ts:2254"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getindex"},(0,t.yg)("a",{id:"get"}),(0,t.yg)("strong",{parentName:"h3"},"get"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"index"),")"),(0,t.yg)("p",null,"get an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")," element at the specified index"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"index"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the index of an element in the pseudo array, the index ranges from 0 to array length - 1. Notice that this is not the heap node id."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | When 0 <= ",(0,t.yg)("inlineCode",{parentName:"p"},"index")," < array.length, this API returns the element\nat the specified index, otherwise it returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null"),".")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L2246"},"core/src/lib/Types.ts:2246"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8953],{5680:(e,a,n)=>{n.d(a,{xA:()=>c,yg:()=>y});var r=n(6540);function t(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function o(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var a=1;a=0||(t[n]=e[n]);return t}(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var p=r.createContext({}),s=function(e){var a=r.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},c=function(e){var a=s(e.components);return r.createElement(p.Provider,{value:a},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var a=e.children;return r.createElement(r.Fragment,{},a)}},g=r.forwardRef((function(e,a){var n=e.components,t=e.mdxType,o=e.originalType,p=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=s(n),g=t,y=m["".concat(p,".").concat(g)]||m[g]||d[g]||o;return n?r.createElement(y,l(l({ref:a},c),{},{components:n})):r.createElement(y,l({ref:a},c))}));function y(e,a){var n=arguments,t=a&&a.mdxType;if("string"==typeof e||t){var o=n.length,l=new Array(o);l[0]=g;var i={};for(var p in a)hasOwnProperty.call(a,p)&&(i[p]=a[p]);i.originalType=e,i[m]="string"==typeof e?e:t,l[1]=i;for(var s=2;s{n.r(a),n.d(a,{assets:()=>p,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>s});var r=n(8168),t=(n(6540),n(5680));const o={id:"core_src.IHeapNodes",title:"Interface: IHeapNodes",sidebar_label:"IHeapNodes",custom_edit_url:null},l=void 0,i={unversionedId:"api/interfaces/core_src.IHeapNodes",id:"api/interfaces/core_src.IHeapNodes",title:"Interface: IHeapNodes",description:"A pseudo array containing all heap graph nodes (JS objects",source:"@site/docs/api/interfaces/core_src.IHeapNodes.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IHeapNodes",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNodes",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IHeapNodes",title:"Interface: IHeapNodes",sidebar_label:"IHeapNodes",custom_edit_url:null},sidebar:"sidebar",previous:{title:"IHeapNode",permalink:"/memlab/docs/api/interfaces/core_src.IHeapNode"},next:{title:"IHeapSnapshot",permalink:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"}},p={},s=[{value:"Properties",id:"properties",level:2},{value:' length: number',id:"-length-number",level:3},{value:"Methods",id:"methods",level:2},{value:'forEach(callback)',id:"foreachcallback",level:3},{value:'get(index)',id:"getindex",level:3}],c={toc:s},m="wrapper";function d(e){let{components:a,...n}=e;return(0,t.yg)(m,(0,r.A)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,t.yg)("p",null,"A pseudo array containing all heap graph nodes (JS objects\nin heap). A JS heap could contain millions of objects, so memlab uses\na pseudo array as the collection of all the heap nodes. The pseudo\narray provides API to query and traverse all heap objects."),(0,t.yg)("p",null,(0,t.yg)("strong",{parentName:"p"},(0,t.yg)("inlineCode",{parentName:"strong"},"readonly"))," modifying this pseudo array is not recommended"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Examples"),":")),(0,t.yg)("pre",null,(0,t.yg)("code",{parentName:"pre",className:"language-typescript"},"import type {IHeapSnapshot, IHeapNodes} from '@memlab/core';\nimport {dumpNodeHeapSnapshot} from '@memlab/core';\nimport {getFullHeapFromFile} from '@memlab/heap-analysis';\n\n(async function () {\n const heapFile = dumpNodeHeapSnapshot();\n const heap: IHeapSnapshot = await getFullHeapFromFile(heapFile);\n\n const nodes: IHeapNodes = heap.nodes;\n nodes.length;\n nodes.get(0);\n nodes.forEach((node, i) => {\n if (stopIteration) {\n return false;\n }\n });\n})();\n")),(0,t.yg)("h2",{id:"properties"},"Properties"),(0,t.yg)("h3",{id:"-length-number"},(0,t.yg)("a",{id:"length",name:"length"})," ",(0,t.yg)("strong",{parentName:"h3"},"length"),": ",(0,t.yg)("inlineCode",{parentName:"h3"},"number")),(0,t.yg)("p",null,"The total number of nodes in heap graph (or JS objects in heap\nsnapshot)."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2238"},"core/src/lib/Types.ts:2238"))))),(0,t.yg)("h2",{id:"methods"},"Methods"),(0,t.yg)("h3",{id:"foreachcallback"},(0,t.yg)("a",{id:"foreach"}),(0,t.yg)("strong",{parentName:"h3"},"forEach"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"callback"),")"),(0,t.yg)("p",null,"Iterate over all array elements and apply the callback\nto each element in ascending order of element index."),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Parameters"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"callback"),": (",(0,t.yg)("inlineCode",{parentName:"li"},"node"),": ",(0,t.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),", ",(0,t.yg)("inlineCode",{parentName:"li"},"index"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"number"),") => ",(0,t.yg)("inlineCode",{parentName:"li"},"boolean")," ","|"," ",(0,t.yg)("inlineCode",{parentName:"li"},"void")," | the callback does not need to return any value, if the callback returns ",(0,t.yg)("inlineCode",{parentName:"li"},"false")," when iterating on element at index ",(0,t.yg)("inlineCode",{parentName:"li"},"i"),", then all elements after ",(0,t.yg)("inlineCode",{parentName:"li"},"i")," won't be iterated."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Returns"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"void")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("strong",{parentName:"li"},"Source"),":",(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2254"},"core/src/lib/Types.ts:2254"))))),(0,t.yg)("hr",null),(0,t.yg)("h3",{id:"getindex"},(0,t.yg)("a",{id:"get"}),(0,t.yg)("strong",{parentName:"h3"},"get"),"(",(0,t.yg)("inlineCode",{parentName:"h3"},"index"),")"),(0,t.yg)("p",null,"get an ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode")," element at the specified index"),(0,t.yg)("ul",null,(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("inlineCode",{parentName:"li"},"index"),": ",(0,t.yg)("inlineCode",{parentName:"li"},"number")," | the index of an element in the pseudo array, the index ranges from 0 to array length - 1. Notice that this is not the heap node id."))),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Returns"),": ",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/core_src#nullable"},(0,t.yg)("inlineCode",{parentName:"a"},"Nullable")),"<",(0,t.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},(0,t.yg)("inlineCode",{parentName:"a"},"IHeapNode")),">"," | When 0 <= ",(0,t.yg)("inlineCode",{parentName:"p"},"index")," < array.length, this API returns the element\nat the specified index, otherwise it returns ",(0,t.yg)("inlineCode",{parentName:"p"},"null"),".")),(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("p",{parentName:"li"},(0,t.yg)("strong",{parentName:"p"},"Source"),":"),(0,t.yg)("ul",{parentName:"li"},(0,t.yg)("li",{parentName:"ul"},(0,t.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L2246"},"core/src/lib/Types.ts:2246"))))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e4c6f3cc.fe6981e7.js b/assets/js/e4c6f3cc.71c80625.js similarity index 97% rename from assets/js/e4c6f3cc.fe6981e7.js rename to assets/js/e4c6f3cc.71c80625.js index b40162f6..c63905cb 100644 --- a/assets/js/e4c6f3cc.fe6981e7.js +++ b/assets/js/e4c6f3cc.71c80625.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9600],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>g});var t=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function r(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},y=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},h=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,r=e.originalType,o=e.parentName,y=i(e,["components","mdxType","originalType","parentName"]),u=p(n),h=s,g=u["".concat(o,".").concat(h)]||u[h]||c[h]||r;return n?t.createElement(g,l(l({ref:a},y),{},{components:n})):t.createElement(g,l({ref:a},y))}));function g(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var r=n.length,l=new Array(r);l[0]=h;var i={};for(var o in a)hasOwnProperty.call(a,o)&&(i[o]=a[o]);i.originalType=e,i[u]="string"==typeof e?e:s,l[1]=i;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>l,default:()=>c,frontMatter:()=>r,metadata:()=>i,toc:()=>p});var t=n(8168),s=(n(6540),n(5680));const r={id:"heap_analysis_src.ShapeUnboundGrowthAnalysis",title:"Class: ShapeUnboundGrowthAnalysis",sidebar_label:"ShapeUnboundGrowthAnalysis",custom_edit_url:null},l=void 0,i={unversionedId:"api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis",id:"api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis",title:"Class: ShapeUnboundGrowthAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ShapeUnboundGrowthAnalysis",title:"Class: ShapeUnboundGrowthAnalysis",sidebar_label:"ShapeUnboundGrowthAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ObjectUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis"},next:{title:"StringAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ShapeUnboundGrowthAnalysis()',id:"new-shapeunboundgrowthanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotsInDirectory(directory, options?)',id:"analyzesnapshotsindirectorydirectory-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3},{value:'getShapesWithUnboundGrowth()',id:"getshapeswithunboundgrowth",level:3}],y={toc:p},u="wrapper";function c(e){let{components:a,...n}=e;return(0,s.yg)(u,(0,t.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"ShapeUnboundGrowthAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-shapeunboundgrowthanalysis"},(0,s.yg)("a",{id:"new shapeunboundgrowthanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new ShapeUnboundGrowthAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotsindirectorydirectory-options"},(0,s.yg)("a",{id:"analyzesnapshotsindirectory"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotsInDirectory"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"directory"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a series of heap snapshot files"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"directory"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the directory holding a series of ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," files, all snapshot files will be loaded and analyzed in the alphanumerically ascending order of those snapshot file names."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory);\n// query analysis-specific and structured results\nconst shapes = analysis.getShapesWithUnboundGrowth();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L148"},"heap-analysis/src/BaseAnalysis.ts:148"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/ShapeUnboundGrowthAnalysis.ts#L43"},"heap-analysis/src/plugins/ShapeUnboundGrowthAnalysis.ts:43"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getshapeswithunboundgrowth"},(0,s.yg)("a",{id:"getshapeswithunboundgrowth"}),(0,s.yg)("strong",{parentName:"h3"},"getShapesWithUnboundGrowth"),"()"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"ShapeSummary"),"[]"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/ShapeUnboundGrowthAnalysis.ts#L71"},"heap-analysis/src/plugins/ShapeUnboundGrowthAnalysis.ts:71"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9600],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>g});var t=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function r(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},y=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},h=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,r=e.originalType,o=e.parentName,y=i(e,["components","mdxType","originalType","parentName"]),u=p(n),h=s,g=u["".concat(o,".").concat(h)]||u[h]||c[h]||r;return n?t.createElement(g,l(l({ref:a},y),{},{components:n})):t.createElement(g,l({ref:a},y))}));function g(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var r=n.length,l=new Array(r);l[0]=h;var i={};for(var o in a)hasOwnProperty.call(a,o)&&(i[o]=a[o]);i.originalType=e,i[u]="string"==typeof e?e:s,l[1]=i;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>l,default:()=>c,frontMatter:()=>r,metadata:()=>i,toc:()=>p});var t=n(8168),s=(n(6540),n(5680));const r={id:"heap_analysis_src.ShapeUnboundGrowthAnalysis",title:"Class: ShapeUnboundGrowthAnalysis",sidebar_label:"ShapeUnboundGrowthAnalysis",custom_edit_url:null},l=void 0,i={unversionedId:"api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis",id:"api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis",title:"Class: ShapeUnboundGrowthAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ShapeUnboundGrowthAnalysis",title:"Class: ShapeUnboundGrowthAnalysis",sidebar_label:"ShapeUnboundGrowthAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ObjectUnboundGrowthAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis"},next:{title:"StringAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ShapeUnboundGrowthAnalysis()',id:"new-shapeunboundgrowthanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotsInDirectory(directory, options?)',id:"analyzesnapshotsindirectorydirectory-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3},{value:'getShapesWithUnboundGrowth()',id:"getshapeswithunboundgrowth",level:3}],y={toc:p},u="wrapper";function c(e){let{components:a,...n}=e;return(0,s.yg)(u,(0,t.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"ShapeUnboundGrowthAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-shapeunboundgrowthanalysis"},(0,s.yg)("a",{id:"new shapeunboundgrowthanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new ShapeUnboundGrowthAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotsindirectorydirectory-options"},(0,s.yg)("a",{id:"analyzesnapshotsindirectory"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotsInDirectory"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"directory"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a series of heap snapshot files"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"directory"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the directory holding a series of ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," files, all snapshot files will be loaded and analyzed in the alphanumerically ascending order of those snapshot file names."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory);\n// query analysis-specific and structured results\nconst shapes = analysis.getShapesWithUnboundGrowth();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new ShapeUnboundGrowthAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotsInDirectory(snapshotDirectory, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L148"},"heap-analysis/src/BaseAnalysis.ts:148"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/ShapeUnboundGrowthAnalysis.ts#L43"},"heap-analysis/src/plugins/ShapeUnboundGrowthAnalysis.ts:43"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getshapeswithunboundgrowth"},(0,s.yg)("a",{id:"getshapeswithunboundgrowth"}),(0,s.yg)("strong",{parentName:"h3"},"getShapesWithUnboundGrowth"),"()"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"ShapeSummary"),"[]"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/ShapeUnboundGrowthAnalysis.ts#L71"},"heap-analysis/src/plugins/ShapeUnboundGrowthAnalysis.ts:71"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f40f92ec.5a565d4e.js b/assets/js/f40f92ec.b0356f82.js similarity index 93% rename from assets/js/f40f92ec.5a565d4e.js rename to assets/js/f40f92ec.b0356f82.js index 871810d6..20d9a6e5 100644 --- a/assets/js/f40f92ec.5a565d4e.js +++ b/assets/js/f40f92ec.b0356f82.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[346],{5680:(e,t,a)=>{a.d(t,{xA:()=>u,yg:()=>y});var r=a(6540);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},u=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},g="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),g=p(a),m=n,y=g["".concat(i,".").concat(m)]||g[m]||c[m]||l;return a?r.createElement(y,s(s({ref:t},u),{},{components:a})):r.createElement(y,s({ref:t},u))}));function y(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,s=new Array(l);s[0]=m;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o[g]="string"==typeof e?e:n,s[1]=o;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>c,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var r=a(8168),n=(a(6540),a(5680));const l={id:"api_src.BrowserInteractionResultReader",title:"Class: BrowserInteractionResultReader",sidebar_label:"BrowserInteractionResultReader",custom_edit_url:null},s=void 0,o={unversionedId:"api/classes/api_src.BrowserInteractionResultReader",id:"api/classes/api_src.BrowserInteractionResultReader",title:"Class: BrowserInteractionResultReader",description:"A utility entity to read all generated files from",source:"@site/docs/api/classes/api_src.BrowserInteractionResultReader.md",sourceDirName:"api/classes",slug:"/api/classes/api_src.BrowserInteractionResultReader",permalink:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"api_src.BrowserInteractionResultReader",title:"Class: BrowserInteractionResultReader",sidebar_label:"BrowserInteractionResultReader",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ConsoleMode",permalink:"/memlab/docs/api/enums/api_src.ConsoleMode"},next:{title:"SnapshotResultReader",permalink:"/memlab/docs/api/classes/api_src.SnapshotResultReader"}},i={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Methods",id:"methods",level:2},{value:'cleanup()',id:"cleanup",level:3},{value:'getConsoleBackupFile()',id:"getconsolebackupfile",level:3},{value:'getInteractionSteps()',id:"getinteractionsteps",level:3},{value:'getRootDirectory()',id:"getrootdirectory",level:3},{value:'getRunMetaInfo()',id:"getrunmetainfo",level:3},{value:'getSnapshotFileDir()',id:"getsnapshotfiledir",level:3},{value:'getSnapshotFiles()',id:"getsnapshotfiles",level:3},{value:'Static from(workDir?)',id:"static-fromworkdir",level:3}],u={toc:p},g="wrapper";function c(e){let{components:t,...a}=e;return(0,n.yg)(g,(0,r.A)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.yg)("p",null,"A utility entity to read all generated files from\nthe directory holding the data and results from the\nlast MemLab browser interaction run"),(0,n.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("p",{parentName:"li"},(0,n.yg)("inlineCode",{parentName:"p"},"default")),(0,n.yg)("p",{parentName:"li"},"\u21b3 ",(0,n.yg)("strong",{parentName:"p"},(0,n.yg)("inlineCode",{parentName:"strong"},"BrowserInteractionResultReader"))))),(0,n.yg)("h2",{id:"methods"},"Methods"),(0,n.yg)("h3",{id:"cleanup"},(0,n.yg)("a",{id:"cleanup"}),(0,n.yg)("strong",{parentName:"h3"},"cleanup"),"()"),(0,n.yg)("p",null,"clean up data/files generated from the memlab browser interaction run"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"void")," | no return value"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n // delete all data/files generated by takeSnapshots\n result.cleanup();\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/BaseResultReader.ts#L122"},"api/src/result-reader/BaseResultReader.ts:122"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getconsolebackupfile"},(0,n.yg)("a",{id:"getconsolebackupfile"}),(0,n.yg)("strong",{parentName:"h3"},"getConsoleBackupFile"),"()"),(0,n.yg)("p",null,"This method gets the backup file of the console output."),(0,n.yg)("p",null,"The memlab CLI commands (e.g., ",(0,n.yg)("inlineCode",{parentName:"p"},"memlab find-leaks"),") outputs a\nnon-structured string representation for easy reading, while the\nAPIs (e.g., ",(0,n.yg)("code",null,(0,n.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#findleaks"},"findLeaks")),") return structured leaks\nrepresentation that is handy for post-processing. If you need to\nobtain all the string output from the CLI in the current working directory,\nyou can read them from the CLI output backup file returned by this method."),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the backup file"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots, findLeaks} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n const leaks = await findLeaks(result);\n\n // get the console output backup file\n const consoleBackupFile = result.getConsoleBackupFile();\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/BaseResultReader.ts#L102"},"api/src/result-reader/BaseResultReader.ts:102"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getinteractionsteps"},(0,n.yg)("a",{id:"getinteractionsteps"}),(0,n.yg)("strong",{parentName:"h3"},"getInteractionSteps"),"()"),(0,n.yg)("p",null,"browser interaction step sequence"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"E2EStepInfo"),"[] | an array of browser interaction step information"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n const steps = result.getInteractionSteps();\n // print each browser interaction's name and JavaScript heap size (in bytes)\n steps.forEach(step => console.log(step.name, step.JSHeapUsedSize))\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/BrowserInteractionResultReader.ts#L106"},"api/src/result-reader/BrowserInteractionResultReader.ts:106"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getrootdirectory"},(0,n.yg)("a",{id:"getrootdirectory"}),(0,n.yg)("strong",{parentName:"h3"},"getRootDirectory"),"()"),(0,n.yg)("p",null,"get the directory where the data and generated files of\nthe memlab run were stored"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"string")," | absolute path of the directory"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n // get the directory that stores all the files\n // generated from the takeSnapshots call\n const dataDir = result.getRootDirectory();\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/BaseResultReader.ts#L72"},"api/src/result-reader/BaseResultReader.ts:72"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getrunmetainfo"},(0,n.yg)("a",{id:"getrunmetainfo"}),(0,n.yg)("strong",{parentName:"h3"},"getRunMetaInfo"),"()"),(0,n.yg)("p",null,"general meta data of the browser interaction run"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"RunMetaInfo")," | meta data about the entire browser interaction"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n const metaInfo = result.getRunMetaInfo();\n // print all browser web console output\n console.log(metaInfo.browserInfo._consoleMessages.join('\\n'));\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/BrowserInteractionResultReader.ts#L131"},"api/src/result-reader/BrowserInteractionResultReader.ts:131"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getsnapshotfiledir"},(0,n.yg)("a",{id:"getsnapshotfiledir"}),(0,n.yg)("strong",{parentName:"h3"},"getSnapshotFileDir"),"()"),(0,n.yg)("p",null,"get the directory holding all snapshot files"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the directory"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n // get the absolute path the directory holding all snapshot files\n const files = result.getSnapshotFileDir();\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/BrowserInteractionResultReader.ts#L84"},"api/src/result-reader/BrowserInteractionResultReader.ts:84"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getsnapshotfiles"},(0,n.yg)("a",{id:"getsnapshotfiles"}),(0,n.yg)("strong",{parentName:"h3"},"getSnapshotFiles"),"()"),(0,n.yg)("p",null,"get all snapshot files generated from last memlab browser interaction"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"string"),"[] | an array of snapshot file's absolute path"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n // get absolute paths of all snapshot files\n const files = result.getSnapshotFiles();\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/BrowserInteractionResultReader.ts#L59"},"api/src/result-reader/BrowserInteractionResultReader.ts:59"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"static-fromworkdir"},(0,n.yg)("a",{id:"from"}),(0,n.yg)("inlineCode",{parentName:"h3"},"Static")," ",(0,n.yg)("strong",{parentName:"h3"},"from"),"(",(0,n.yg)("inlineCode",{parentName:"h3"},"workDir?"),")"),(0,n.yg)("p",null,"build a result reader from a data directory where the data\nand generated files of a memlab run were stored"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("p",{parentName:"li"},(0,n.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("inlineCode",{parentName:"li"},"workDir"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"string")," | ",(0,n.yg)("inlineCode",{parentName:"li"},"''")," | absolute path of the data directory"))),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("p",{parentName:"li"},(0,n.yg)("strong",{parentName:"p"},"Returns"),": ",(0,n.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},(0,n.yg)("inlineCode",{parentName:"a"},"BrowserInteractionResultReader"))," | the ResultReader instance")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("p",{parentName:"li"},(0,n.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {BrowserInteractionResultReader} = require('@memlab/api');\n\nconst dataDir = '/tmp/memlab'; // where the last memlab run stores results\nconst reader = BrowserInteractionResultReader.from(dataDir);\nreader.cleanup(); // clean up the results\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/api/src/result-reader/BrowserInteractionResultReader.ts#L39"},"api/src/result-reader/BrowserInteractionResultReader.ts:39"))))))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[346],{5680:(e,t,a)=>{a.d(t,{xA:()=>u,yg:()=>y});var r=a(6540);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),p=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},u=function(e){var t=p(e.components);return r.createElement(i.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),c=p(a),m=n,y=c["".concat(i,".").concat(m)]||c[m]||g[m]||l;return a?r.createElement(y,s(s({ref:t},u),{},{components:a})):r.createElement(y,s({ref:t},u))}));function y(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,s=new Array(l);s[0]=m;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o[c]="string"==typeof e?e:n,s[1]=o;for(var p=2;p{a.r(t),a.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>g,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var r=a(8168),n=(a(6540),a(5680));const l={id:"api_src.BrowserInteractionResultReader",title:"Class: BrowserInteractionResultReader",sidebar_label:"BrowserInteractionResultReader",custom_edit_url:null},s=void 0,o={unversionedId:"api/classes/api_src.BrowserInteractionResultReader",id:"api/classes/api_src.BrowserInteractionResultReader",title:"Class: BrowserInteractionResultReader",description:"A utility entity to read all generated files from",source:"@site/docs/api/classes/api_src.BrowserInteractionResultReader.md",sourceDirName:"api/classes",slug:"/api/classes/api_src.BrowserInteractionResultReader",permalink:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"api_src.BrowserInteractionResultReader",title:"Class: BrowserInteractionResultReader",sidebar_label:"BrowserInteractionResultReader",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ConsoleMode",permalink:"/memlab/docs/api/enums/api_src.ConsoleMode"},next:{title:"SnapshotResultReader",permalink:"/memlab/docs/api/classes/api_src.SnapshotResultReader"}},i={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Methods",id:"methods",level:2},{value:'cleanup()',id:"cleanup",level:3},{value:'getConsoleBackupFile()',id:"getconsolebackupfile",level:3},{value:'getInteractionSteps()',id:"getinteractionsteps",level:3},{value:'getRootDirectory()',id:"getrootdirectory",level:3},{value:'getRunMetaInfo()',id:"getrunmetainfo",level:3},{value:'getSnapshotFileDir()',id:"getsnapshotfiledir",level:3},{value:'getSnapshotFiles()',id:"getsnapshotfiles",level:3},{value:'Static from(workDir?)',id:"static-fromworkdir",level:3}],u={toc:p},c="wrapper";function g(e){let{components:t,...a}=e;return(0,n.yg)(c,(0,r.A)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.yg)("p",null,"A utility entity to read all generated files from\nthe directory holding the data and results from the\nlast MemLab browser interaction run"),(0,n.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("p",{parentName:"li"},(0,n.yg)("inlineCode",{parentName:"p"},"default")),(0,n.yg)("p",{parentName:"li"},"\u21b3 ",(0,n.yg)("strong",{parentName:"p"},(0,n.yg)("inlineCode",{parentName:"strong"},"BrowserInteractionResultReader"))))),(0,n.yg)("h2",{id:"methods"},"Methods"),(0,n.yg)("h3",{id:"cleanup"},(0,n.yg)("a",{id:"cleanup"}),(0,n.yg)("strong",{parentName:"h3"},"cleanup"),"()"),(0,n.yg)("p",null,"clean up data/files generated from the memlab browser interaction run"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"void")," | no return value"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n // delete all data/files generated by takeSnapshots\n result.cleanup();\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/BaseResultReader.ts#L122"},"api/src/result-reader/BaseResultReader.ts:122"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getconsolebackupfile"},(0,n.yg)("a",{id:"getconsolebackupfile"}),(0,n.yg)("strong",{parentName:"h3"},"getConsoleBackupFile"),"()"),(0,n.yg)("p",null,"This method gets the backup file of the console output."),(0,n.yg)("p",null,"The memlab CLI commands (e.g., ",(0,n.yg)("inlineCode",{parentName:"p"},"memlab find-leaks"),") outputs a\nnon-structured string representation for easy reading, while the\nAPIs (e.g., ",(0,n.yg)("code",null,(0,n.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#findleaks"},"findLeaks")),") return structured leaks\nrepresentation that is handy for post-processing. If you need to\nobtain all the string output from the CLI in the current working directory,\nyou can read them from the CLI output backup file returned by this method."),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the backup file"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots, findLeaks} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n const leaks = await findLeaks(result);\n\n // get the console output backup file\n const consoleBackupFile = result.getConsoleBackupFile();\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/BaseResultReader.ts#L102"},"api/src/result-reader/BaseResultReader.ts:102"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getinteractionsteps"},(0,n.yg)("a",{id:"getinteractionsteps"}),(0,n.yg)("strong",{parentName:"h3"},"getInteractionSteps"),"()"),(0,n.yg)("p",null,"browser interaction step sequence"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"E2EStepInfo"),"[] | an array of browser interaction step information"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n const steps = result.getInteractionSteps();\n // print each browser interaction's name and JavaScript heap size (in bytes)\n steps.forEach(step => console.log(step.name, step.JSHeapUsedSize))\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/BrowserInteractionResultReader.ts#L106"},"api/src/result-reader/BrowserInteractionResultReader.ts:106"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getrootdirectory"},(0,n.yg)("a",{id:"getrootdirectory"}),(0,n.yg)("strong",{parentName:"h3"},"getRootDirectory"),"()"),(0,n.yg)("p",null,"get the directory where the data and generated files of\nthe memlab run were stored"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"string")," | absolute path of the directory"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n // get the directory that stores all the files\n // generated from the takeSnapshots call\n const dataDir = result.getRootDirectory();\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/BaseResultReader.ts#L72"},"api/src/result-reader/BaseResultReader.ts:72"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getrunmetainfo"},(0,n.yg)("a",{id:"getrunmetainfo"}),(0,n.yg)("strong",{parentName:"h3"},"getRunMetaInfo"),"()"),(0,n.yg)("p",null,"general meta data of the browser interaction run"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"RunMetaInfo")," | meta data about the entire browser interaction"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n const metaInfo = result.getRunMetaInfo();\n // print all browser web console output\n console.log(metaInfo.browserInfo._consoleMessages.join('\\n'));\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/BrowserInteractionResultReader.ts#L131"},"api/src/result-reader/BrowserInteractionResultReader.ts:131"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getsnapshotfiledir"},(0,n.yg)("a",{id:"getsnapshotfiledir"}),(0,n.yg)("strong",{parentName:"h3"},"getSnapshotFileDir"),"()"),(0,n.yg)("p",null,"get the directory holding all snapshot files"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of the directory"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n // get the absolute path the directory holding all snapshot files\n const files = result.getSnapshotFileDir();\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/BrowserInteractionResultReader.ts#L84"},"api/src/result-reader/BrowserInteractionResultReader.ts:84"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"getsnapshotfiles"},(0,n.yg)("a",{id:"getsnapshotfiles"}),(0,n.yg)("strong",{parentName:"h3"},"getSnapshotFiles"),"()"),(0,n.yg)("p",null,"get all snapshot files generated from last memlab browser interaction"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Returns"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"string"),"[] | an array of snapshot file's absolute path"),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Examples"),":")),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {takeSnapshots} = require('@memlab/api');\n\n(async function () {\n const scenario = { url: () => 'https://www.npmjs.com'};\n const result = await takeSnapshots({scenario});\n\n // get absolute paths of all snapshot files\n const files = result.getSnapshotFiles();\n})();\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/BrowserInteractionResultReader.ts#L59"},"api/src/result-reader/BrowserInteractionResultReader.ts:59"))))),(0,n.yg)("hr",null),(0,n.yg)("h3",{id:"static-fromworkdir"},(0,n.yg)("a",{id:"from"}),(0,n.yg)("inlineCode",{parentName:"h3"},"Static")," ",(0,n.yg)("strong",{parentName:"h3"},"from"),"(",(0,n.yg)("inlineCode",{parentName:"h3"},"workDir?"),")"),(0,n.yg)("p",null,"build a result reader from a data directory where the data\nand generated files of a memlab run were stored"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("p",{parentName:"li"},(0,n.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("inlineCode",{parentName:"li"},"workDir"),": ",(0,n.yg)("inlineCode",{parentName:"li"},"string")," | ",(0,n.yg)("inlineCode",{parentName:"li"},"''")," | absolute path of the data directory"))),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("p",{parentName:"li"},(0,n.yg)("strong",{parentName:"p"},"Returns"),": ",(0,n.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader"},(0,n.yg)("inlineCode",{parentName:"a"},"BrowserInteractionResultReader"))," | the ResultReader instance")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("p",{parentName:"li"},(0,n.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-javascript"},"const {BrowserInteractionResultReader} = require('@memlab/api');\n\nconst dataDir = '/tmp/memlab'; // where the last memlab run stores results\nconst reader = BrowserInteractionResultReader.from(dataDir);\nreader.cleanup(); // clean up the results\n")),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"Source"),":",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/api/src/result-reader/BrowserInteractionResultReader.ts#L39"},"api/src/result-reader/BrowserInteractionResultReader.ts:39"))))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f8599c11.76e04960.js b/assets/js/f8599c11.6a83db4d.js similarity index 97% rename from assets/js/f8599c11.76e04960.js rename to assets/js/f8599c11.6a83db4d.js index f80e5918..8d26ad74 100644 --- a/assets/js/f8599c11.76e04960.js +++ b/assets/js/f8599c11.6a83db4d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[233],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>g});var t=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},m=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,l=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),m=s,g=c["".concat(o,".").concat(m)]||c[m]||u[m]||l;return n?t.createElement(g,i(i({ref:a},y),{},{components:n})):t.createElement(g,i({ref:a},y))}));function g(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var l=n.length,i=new Array(l);i[0]=m;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:s,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>r,toc:()=>p});var t=n(8168),s=(n(6540),n(5680));const l={id:"heap_analysis_src.ObjectFanoutAnalysis",title:"Class: ObjectFanoutAnalysis",sidebar_label:"ObjectFanoutAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.ObjectFanoutAnalysis",id:"api/classes/heap_analysis_src.ObjectFanoutAnalysis",title:"Class: ObjectFanoutAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ObjectFanoutAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ObjectFanoutAnalysis",title:"Class: ObjectFanoutAnalysis",sidebar_label:"ObjectFanoutAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"GlobalVariableAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis"},next:{title:"ObjectShallowAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ObjectFanoutAnalysis()',id:"new-objectfanoutanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],y={toc:p},c="wrapper";function u(e){let{components:a,...n}=e;return(0,s.yg)(c,(0,t.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"ObjectFanoutAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-objectfanoutanalysis"},(0,s.yg)("a",{id:"new objectfanoutanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new ObjectFanoutAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,s.yg)("a",{id:"analyzesnapshotfromfile"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,s.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/heap-analysis/src/plugins/ObjectFanoutAnalysis.ts#L21"},"heap-analysis/src/plugins/ObjectFanoutAnalysis.ts:21"))))))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[233],{5680:(e,a,n)=>{n.d(a,{xA:()=>y,yg:()=>g});var t=n(6540);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var o=t.createContext({}),p=function(e){var a=t.useContext(o),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},y=function(e){var a=p(e.components);return t.createElement(o.Provider,{value:a},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},m=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,l=e.originalType,o=e.parentName,y=r(e,["components","mdxType","originalType","parentName"]),c=p(n),m=s,g=c["".concat(o,".").concat(m)]||c[m]||u[m]||l;return n?t.createElement(g,i(i({ref:a},y),{},{components:n})):t.createElement(g,i({ref:a},y))}));function g(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var l=n.length,i=new Array(l);i[0]=m;var r={};for(var o in a)hasOwnProperty.call(a,o)&&(r[o]=a[o]);r.originalType=e,r[c]="string"==typeof e?e:s,i[1]=r;for(var p=2;p{n.r(a),n.d(a,{assets:()=>o,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>r,toc:()=>p});var t=n(8168),s=(n(6540),n(5680));const l={id:"heap_analysis_src.ObjectFanoutAnalysis",title:"Class: ObjectFanoutAnalysis",sidebar_label:"ObjectFanoutAnalysis",custom_edit_url:null},i=void 0,r={unversionedId:"api/classes/heap_analysis_src.ObjectFanoutAnalysis",id:"api/classes/heap_analysis_src.ObjectFanoutAnalysis",title:"Class: ObjectFanoutAnalysis",description:"Hierarchy",source:"@site/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis.md",sourceDirName:"api/classes",slug:"/api/classes/heap_analysis_src.ObjectFanoutAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"heap_analysis_src.ObjectFanoutAnalysis",title:"Class: ObjectFanoutAnalysis",sidebar_label:"ObjectFanoutAnalysis",custom_edit_url:null},sidebar:"sidebar",previous:{title:"GlobalVariableAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis"},next:{title:"ObjectShallowAnalysis",permalink:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:'new ObjectFanoutAnalysis()',id:"new-objectfanoutanalysis",level:3},{value:"Methods",id:"methods",level:2},{value:'analyzeSnapshotFromFile(file, options?)',id:"analyzesnapshotfromfilefile-options",level:3},{value:'getCommandName()',id:"getcommandname",level:3}],y={toc:p},c="wrapper";function u(e){let{components:a,...n}=e;return(0,s.yg)(c,(0,t.A)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,s.yg)("h2",{id:"hierarchy"},"Hierarchy"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("p",{parentName:"li"},(0,s.yg)("a",{parentName:"p",href:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis"},(0,s.yg)("inlineCode",{parentName:"a"},"BaseAnalysis"))),(0,s.yg)("p",{parentName:"li"},"\u21b3 ",(0,s.yg)("strong",{parentName:"p"},(0,s.yg)("inlineCode",{parentName:"strong"},"ObjectFanoutAnalysis"))))),(0,s.yg)("h2",{id:"constructors"},"Constructors"),(0,s.yg)("h3",{id:"new-objectfanoutanalysis"},(0,s.yg)("a",{id:"new objectfanoutanalysis"}),(0,s.yg)("strong",{parentName:"h3"},"new ObjectFanoutAnalysis"),"()"),(0,s.yg)("h2",{id:"methods"},"Methods"),(0,s.yg)("h3",{id:"analyzesnapshotfromfilefile-options"},(0,s.yg)("a",{id:"analyzesnapshotfromfile"}),(0,s.yg)("strong",{parentName:"h3"},"analyzeSnapshotFromFile"),"(",(0,s.yg)("inlineCode",{parentName:"h3"},"file"),", ",(0,s.yg)("inlineCode",{parentName:"h3"},"options?"),")"),(0,s.yg)("p",null,"Run heap analysis for a single heap snapshot file"),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Parameters"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"file"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the absolute path of a ",(0,s.yg)("inlineCode",{parentName:"li"},".heapsnapshot")," file."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("inlineCode",{parentName:"li"},"options"),": ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#runheapanalysisoptions"},(0,s.yg)("inlineCode",{parentName:"a"},"RunHeapAnalysisOptions"))," | optional configuration for the heap analysis run"))),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"Promise"),"<",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},(0,s.yg)("inlineCode",{parentName:"a"},"AnalyzeSnapshotResult")),">"," | this API returns ",(0,s.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/heap_analysis_src#analyzesnapshotresult"},"AnalyzeSnapshotResult"),", which contains\nthe logging file of analysis console output. Alternatively, to get more\nstructured analysis results, check out the documentation of the hosting\nheap analysis class and call the analysis-specific API to get results\nafter calling this method."),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Example"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile);\n// query analysis-specific and structured results\nconst stringPatterns = analysis.getTopDuplicatedStringsInCount();\n")),(0,s.yg)("p",null,"Additionally, you can specify a working directory to where\nthe intermediate, logging, and final output files will be dumped:"),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new StringAnalysis();\n// analysis console output is saved in result.analysisOutputFile\n// which is inside the specified working directory\nconst result = await analysis.analyzeSnapshotFromFile(snapshotFile, {\n // if the specified directory doesn't exist, memlab will create it\n workDir: '/tmp/your/work/dir',\n});\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/BaseAnalysis.ts#L95"},"heap-analysis/src/BaseAnalysis.ts:95"))))),(0,s.yg)("hr",null),(0,s.yg)("h3",{id:"getcommandname"},(0,s.yg)("a",{id:"getcommandname"}),(0,s.yg)("strong",{parentName:"h3"},"getCommandName"),"()"),(0,s.yg)("p",null,"Get the name of the heap analysis, which is also used to reference\nthe analysis in memlab command-line tool."),(0,s.yg)("p",null,"The following terminal command will initiate with this analysis:\n",(0,s.yg)("inlineCode",{parentName:"p"},"memlab analyze ")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Returns"),": ",(0,s.yg)("inlineCode",{parentName:"li"},"string")," | the name of the analysis"),(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Examples"),":")),(0,s.yg)("pre",null,(0,s.yg)("code",{parentName:"pre",className:"language-typescript"},"const analysis = new YourAnalysis();\nconst name = analysis.getCommandName();\n")),(0,s.yg)("ul",null,(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("strong",{parentName:"li"},"Source"),":",(0,s.yg)("ul",{parentName:"li"},(0,s.yg)("li",{parentName:"ul"},(0,s.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/heap-analysis/src/plugins/ObjectFanoutAnalysis.ts#L21"},"heap-analysis/src/plugins/ObjectFanoutAnalysis.ts:21"))))))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/fc5c0a35.03d0ab60.js b/assets/js/fc5c0a35.599343a2.js similarity index 97% rename from assets/js/fc5c0a35.03d0ab60.js rename to assets/js/fc5c0a35.599343a2.js index d77ba223..ea7b380d 100644 --- a/assets/js/fc5c0a35.03d0ab60.js +++ b/assets/js/fc5c0a35.599343a2.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9539],{5680:(e,a,n)=>{n.d(a,{xA:()=>s,yg:()=>d});var t=n(6540);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=t.createContext({}),p=function(e){var a=t.useContext(c),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},s=function(e){var a=p(e.components);return t.createElement(c.Provider,{value:a},e.children)},g="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},y=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),g=p(n),y=r,d=g["".concat(c,".").concat(y)]||g[y]||m[y]||l;return n?t.createElement(d,i(i({ref:a},s),{},{components:n})):t.createElement(d,i({ref:a},s))}));function d(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=y;var o={};for(var c in a)hasOwnProperty.call(a,c)&&(o[c]=a[c]);o.originalType=e,o[g]="string"==typeof e?e:r,i[1]=o;for(var p=2;p{n.r(a),n.d(a,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var t=n(8168),r=(n(6540),n(5680));const l={id:"core_src.IScenario",title:"Interface: IScenario",sidebar_label:"IScenario",custom_edit_url:null},i=void 0,o={unversionedId:"api/interfaces/core_src.IScenario",id:"api/interfaces/core_src.IScenario",title:"Interface: IScenario",description:"Test scenario specifies how you want a E2E test to interact with a web browser.",source:"@site/docs/api/interfaces/core_src.IScenario.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IScenario",permalink:"/memlab/docs/api/interfaces/core_src.IScenario",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IScenario",title:"Interface: IScenario",sidebar_label:"IScenario",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ILeakFilter",permalink:"/memlab/docs/api/interfaces/core_src.ILeakFilter"}},c={},p=[{value:"Properties",id:"properties",level:2},{value:' Optional action: InteractionsCallback',id:"-optional-action-interactionscallback",level:3},{value:' Optional back: InteractionsCallback',id:"-optional-back-interactionscallback",level:3},{value:' Optional beforeInitialPageLoad: InteractionsCallback',id:"-optional-beforeinitialpageload-interactionscallback",level:3},{value:' Optional beforeLeakFilter: InitLeakFilterCallback',id:"-optional-beforeleakfilter-initleakfiltercallback",level:3},{value:' Optional isPageLoaded: CheckPageLoadCallback',id:"-optional-ispageloaded-checkpageloadcallback",level:3},{value:' Optional leakFilter: LeakFilterCallback',id:"-optional-leakfilter-leakfiltercallback",level:3},{value:' Optional retainerReferenceFilter: ReferenceFilterCallback',id:"-optional-retainerreferencefilter-referencefiltercallback",level:3},{value:' Optional setup: InteractionsCallback',id:"-optional-setup-interactionscallback",level:3},{value:"Methods",id:"methods",level:2},{value:'Optional cookies()',id:"optional-cookies",level:3},{value:'Optional repeat()',id:"optional-repeat",level:3},{value:'url()',id:"url",level:3}],s={toc:p},g="wrapper";function m(e){let{components:a,...n}=e;return(0,r.yg)(g,(0,t.A)({},s,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"Test scenario specifies how you want a E2E test to interact with a web browser.\nThe test scenario can be saved as a ",(0,r.yg)("inlineCode",{parentName:"p"},".js")," file and passed to the ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab\nrun --scenario")," command:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"// save as test.js and use in terminal:\n// $ memlab run --scenario test.js\n\nmodule.exports = {\n url: () => 'https://www.npmjs.com/',\n action: async () => ... ,\n back: async () => ... ,\n cookies: () => ... , // optional\n repeat: () => ... , // optional\n ...\n};\n")),(0,r.yg)("p",null,"The test scenario instance can also be passed to the\n",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#run"},"run")," API exported by ",(0,r.yg)("inlineCode",{parentName:"p"},"@memlab/api"),"."),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const {run} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n action: async () => ... ,\n back: async () => ... ,\n cookies: () => ... , // optional\n repeat: () => ... , // optional\n ...\n };\n const leaks = await run({scenario});\n})();\n")),(0,r.yg)("h2",{id:"properties"},"Properties"),(0,r.yg)("h3",{id:"-optional-action-interactionscallback"},(0,r.yg)("a",{id:"action",name:"action"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"action"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#interactionscallback"},(0,r.yg)("inlineCode",{parentName:"a"},"InteractionsCallback"))),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"action")," is the callback function that defines the interaction\nwhere you want to trigger memory leaks after the initial page load.\nAll JS objects in browser allocated by the browser interactions triggered\nfrom the ",(0,r.yg)("inlineCode",{parentName:"p"},"action")," callback will be candidates for memory leak filtering."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"))," | the puppeteer\n",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nobject, which provides APIs to interact with the web browser. To import\nthis type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n action: async (page) => {\n await page.click('a[href=\"/link\"]');\n },\n back: async (page) => {\n await page.click('a[href=\"/back\"]');\n },\n}\n\nmodule.exports = scenario;\n")),(0,r.yg)("p",null,"Note: always clean up external puppeteer references to JS objects\nin the browser context."),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n action: async (page) => {\n const elements = await page.$x(\"//button[contains(., 'Text in Button')]\");\n const [button] = elements;\n if (button) {\n await button.click();\n }\n // dispose external references to JS objects in browser context\n await promise.all(elements.map(e => e.dispose()));\n },\n back: async (page) => ... ,\n}\n\nmodule.exports = scenario;\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L841"},"core/src/lib/Types.ts:841"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-back-interactionscallback"},(0,r.yg)("a",{id:"back",name:"back"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"back"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#interactionscallback"},(0,r.yg)("inlineCode",{parentName:"a"},"InteractionsCallback"))),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"back")," is the callback function that specifies how memlab should\nback/revert the ",(0,r.yg)("inlineCode",{parentName:"p"},"action")," callback. Think of it as an undo action."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"))," | the puppeteer\n",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nobject, which provides APIs to interact with the web browser. To import\nthis type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n action: async (page) => {\n await page.click('a[href=\"/link\"]');\n },\n back: async (page) => {\n await page.click('a[href=\"/back\"]');\n },\n}\n")),(0,r.yg)("p",null,"Check out ",(0,r.yg)("a",{parentName:"p",href:"/docs/how-memlab-works"},"this page")," on why\nmemlab needs to undo/revert the ",(0,r.yg)("inlineCode",{parentName:"p"},"action")," callback."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L867"},"core/src/lib/Types.ts:867"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-beforeinitialpageload-interactionscallback"},(0,r.yg)("a",{id:"beforeinitialpageload",name:"beforeinitialpageload"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"beforeInitialPageLoad"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#interactionscallback"},(0,r.yg)("inlineCode",{parentName:"a"},"InteractionsCallback"))),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"beforeInitialPageLoad")," is the callback function that will be called only\nonce before the initial page load. This callback can be used to set up\nthe HTTP headers or to prepare data before loading the web page."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"))," | the puppeteer\n",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nobject, which provides APIs to interact with the web browser. To import\nthis type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n beforeInitialPageLoad: async (page) => {\n // before the initial page load\n },\n action: async (page) => {\n await page.click('a[href=\"/link\"]');\n },\n back: async (page) => {\n await page.click('a[href=\"/back\"]');\n },\n}\n\nmodule.exports = scenario;\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L745"},"core/src/lib/Types.ts:745"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-beforeleakfilter-initleakfiltercallback"},(0,r.yg)("a",{id:"beforeleakfilter",name:"beforeleakfilter"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"beforeLeakFilter"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#initleakfiltercallback"},(0,r.yg)("inlineCode",{parentName:"a"},"InitLeakFilterCallback"))),(0,r.yg)("p",null,"Lifecycle function callback that is invoked initially once before\nthe subsequent ",(0,r.yg)("inlineCode",{parentName:"p"},"leakFilter")," function calls. This callback could\nbe used to initialize some data stores or to any one-off\npreprocessings."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the final heap\nsnapshot taken after all browser interactions are done.\nCheck out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Set")," | the set of ids of all JS heap objects\nallocated by the ",(0,r.yg)("inlineCode",{parentName:"li"},"action")," call but not released after the ",(0,r.yg)("inlineCode",{parentName:"li"},"back")," call\nin browser."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"module.exports = {\n url: () => ... ,\n action: async (page) => ... ,\n back: async (page) => ... ,\n beforeLeakFilter: (snapshot, leakedNodeIds) {\n // initialize some data stores\n },\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L953"},"core/src/lib/Types.ts:953"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-ispageloaded-checkpageloadcallback"},(0,r.yg)("a",{id:"ispageloaded",name:"ispageloaded"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"isPageLoaded"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#checkpageloadcallback"},(0,r.yg)("inlineCode",{parentName:"a"},"CheckPageLoadCallback"))),(0,r.yg)("p",null,"Optional callback function that checks if the web page is loaded\nfor the initial page load and subsequent browser interactions."),(0,r.yg)("p",null,"If this callback is not provided, memlab by default\nconsiders a navigation to be finished when there are no network\nconnections for at least 500ms."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"))," | the puppeteer\n",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nobject, which provides APIs to interact with the web browser. To import\nthis type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": a boolean value, if it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true"),", memlab will consider\nthe navigation completes, if it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"false"),", memlab will keep calling\nthis callback until it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true"),". This is an async callback, you can\nalso ",(0,r.yg)("inlineCode",{parentName:"p"},"await")," and returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true")," until some async logic is resolved.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"module.exports = {\n url: () => ... ,\n action: async (page) => ... ,\n back: async (page) => ... ,\n isPageLoaded: async (page) => {\n await page.waitForNavigation({\n // consider navigation to be finished when there are\n // no more than 2 network connections for at least 500 ms.\n waitUntil: 'networkidle2',\n // Maximum navigation time in milliseconds\n timeout: 5000,\n });\n return true;\n },\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L925"},"core/src/lib/Types.ts:925"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-leakfilter-leakfiltercallback"},(0,r.yg)("a",{id:"leakfilter",name:"leakfilter"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"leakFilter"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#leakfiltercallback"},(0,r.yg)("inlineCode",{parentName:"a"},"LeakFilterCallback"))),(0,r.yg)("p",null,"This callback defines how you want to filter out the\nleaked objects. The callback is called for every node (JS heap\nobject in browser) allocated by the ",(0,r.yg)("inlineCode",{parentName:"p"},"action")," callback, but not\nreleased after the ",(0,r.yg)("inlineCode",{parentName:"p"},"back")," callback. Those objects could be caches\nthat are retained in memory on purpose, or they are memory leaks."),(0,r.yg)("p",null,"This optional callback allows you to define your own algorithm\nto cherry pick memory leaks for specific JS program under test."),(0,r.yg)("p",null,"If this optional callback is not defined, memlab will use its\nbuilt-in leak filter, which considers detached DOM elements\nand unmounted Fiber nodes (detached from React Fiber tree) as\nmemory leaks."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"node"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode"))," | the heap object\nallocated but not released. This filter callback will be applied\nto each node allocated but not released in the heap snapshot."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the final heap\nsnapshot taken after all browser interactions are done.\nCheck out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Set")," | the set of ids of all JS heap objects\nallocated by the ",(0,r.yg)("inlineCode",{parentName:"li"},"action")," call but not released after the ",(0,r.yg)("inlineCode",{parentName:"li"},"back")," call\nin browser."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": the boolean value indicating whether the given node in\nthe snapshot should be considered as leaked.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"module.exports = {\n url: () => ... ,\n action: async (page) => ... ,\n back: async (page) => ... ,\n leakFilter(node, snapshot, leakedNodeIds) {\n // any unreleased node (JS heap object) with 1MB+\n // retained size is considered a memory leak\n return node.retainedSize > 1000000;\n },\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L998"},"core/src/lib/Types.ts:998"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-retainerreferencefilter-referencefiltercallback"},(0,r.yg)("a",{id:"retainerreferencefilter",name:"retainerreferencefilter"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"retainerReferenceFilter"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#referencefiltercallback"},(0,r.yg)("inlineCode",{parentName:"a"},"ReferenceFilterCallback"))),(0,r.yg)("p",null,"Callback that can be used to define a logic to decide whether\na reference should be considered as part of the retainer trace.\nThe callback is called for every reference (edge) in the heap snapshot."),(0,r.yg)("p",null,"For concrete examples, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#leakfilter"},"leakFilter"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"edge")," : ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},"IHeapEdge"))," | the reference (edge)\nthat is considered for calcualting the retainer trace"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the heap snapshot\ntaken after all browser interactions are done.\nCheck out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"isReferenceUsedByDefault"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"boolean")," | MemLab has its own default\nlogic for whether a reference should be considered as part of the\nretainer trace, if this parameter is true, it means MemLab will\nconsider this reference when calculating the retainer trace."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": the value indicating whether the given reference should be\nconsidered when calculating the retainer trace. Note that when this\ncallback returns true, the reference will only be considered as a candidate\nfor retainer trace, so it may or may not be included in the retainer trace;\nhowever, if this callback returns false, the reference will be excluded."))),(0,r.yg)("p",null,"Note that by excluding a dominator reference of an object (i.e., an edge\nthat must be traveled through to reach the heap object from GC roots),\nthe object will be considered as unreachable in the heap graph; and\ntherefore, the reference and heap object will not be included in the\nretainer trace detection and retainer size calculation."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"// save as leak-filter.js\nmodule.exports = {\n retainerReferenceFilter(edge, _snapshot, _leakedNodeIds) {\n // exclude react fiber references\n if (edge.name_or_index.toString().startsWith('__reactFiber$')) {\n return false;\n }\n return true;\n }\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L1044"},"core/src/lib/Types.ts:1044"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-setup-interactionscallback"},(0,r.yg)("a",{id:"setup",name:"setup"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"setup"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#interactionscallback"},(0,r.yg)("inlineCode",{parentName:"a"},"InteractionsCallback"))),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"setup")," is the callback function that will be called only once\nafter the initial page load. This callback can be used to log in\nif you have to (we recommend using ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#cookies"},"cookies"),")\nor to prepare data before the ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#action"},"action")," call."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"))," | the puppeteer\n",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nobject, which provides APIs to interact with the web browser. To import\nthis type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n setup: async (page) => {\n // log in or prepare data for the interaction\n },\n action: async (page) => {\n await page.click('a[href=\"/link\"]');\n },\n back: async (page) => {\n await page.click('a[href=\"/back\"]');\n },\n}\n\nmodule.exports = scenario;\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L794"},"core/src/lib/Types.ts:794"))))),(0,r.yg)("h2",{id:"methods"},"Methods"),(0,r.yg)("h3",{id:"optional-cookies"},(0,r.yg)("a",{id:"cookies"}),(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"cookies"),"()"),(0,r.yg)("p",null,"If the page you are running memlab against requires authentication or\nspecific cookie(s) to be set, you can pass them as\na list of ",(0,r.yg)("inlineCode",{parentName:"p"},"")," tuples."),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"Note"),": please make sure that you provide the correct ",(0,r.yg)("inlineCode",{parentName:"p"},"domain")," field for\nthe cookies tuples. If no ",(0,r.yg)("inlineCode",{parentName:"p"},"domain")," field is specified, memlab will try\nto fill in a domain based on the ",(0,r.yg)("inlineCode",{parentName:"p"},"url")," callback.\nFor example, when the ",(0,r.yg)("inlineCode",{parentName:"p"},"domain")," field is absent,\nmemlab will auto fill in ",(0,r.yg)("inlineCode",{parentName:"p"},".facebook.com")," as domain base\non the initial page load's url: ",(0,r.yg)("inlineCode",{parentName:"p"},"https://www.facebook.com/"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#cookies"},(0,r.yg)("inlineCode",{parentName:"a"},"Cookies"))," | cookie list"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.facebook.com/',\n cookies: () => [\n {name:'cm_j', value: 'none', domain: '.facebook.com'},\n {name:'datr', value: 'yJvIY...', domain: '.facebook.com'},\n {name:'c_user', value: '8917...', domain: '.facebook.com'},\n {name:'xs', value: '95:9WQ...', domain: '.facebook.com'},\n // ...\n ],\n};\n\nmodule.exports = scenario;\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L715"},"core/src/lib/Types.ts:715"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"optional-repeat"},(0,r.yg)("a",{id:"repeat"}),(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"repeat"),"()"),(0,r.yg)("p",null,"Specifies how many ",(0,r.yg)("strong",{parentName:"p"},"extra")," ",(0,r.yg)("inlineCode",{parentName:"p"},"action")," and ",(0,r.yg)("inlineCode",{parentName:"p"},"back")," actions performed\nby memlab."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": a number value specifies the number of extra actions.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"module.exports = {\n url: () => ... ,\n action: async (page) => ... ,\n back: async (page) => ... ,\n // browser interaction: two additional [ action -> back ]\n // init-load -> action -> back -> action -> back -> action -> back\n repeat: () => 2,\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"number")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L886"},"core/src/lib/Types.ts:886"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"url"},(0,r.yg)("a",{id:"url"}),(0,r.yg)("strong",{parentName:"h3"},"url"),"()"),(0,r.yg)("p",null,"String value of the initial url of the page."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | the string value of the initial url"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n};\n\nmodule.exports = scenario;\n")),(0,r.yg)("p",null,"If a test scenario only specifies the ",(0,r.yg)("inlineCode",{parentName:"p"},"url")," callback (without the ",(0,r.yg)("inlineCode",{parentName:"p"},"action"),"\ncallback), memlab will try to detect memory leaks from the initial page\nload. All objects allocated by the initial page load will be candidates\nfor memory leak filtering."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/f2af467/packages/core/src/lib/Types.ts#L763"},"core/src/lib/Types.ts:763"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[9539],{5680:(e,a,n)=>{n.d(a,{xA:()=>s,yg:()=>d});var t=n(6540);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var a=1;a=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=t.createContext({}),p=function(e){var a=t.useContext(c),n=a;return e&&(n="function"==typeof e?e(a):i(i({},a),e)),n},s=function(e){var a=p(e.components);return t.createElement(c.Provider,{value:a},e.children)},g="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},y=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),g=p(n),y=r,d=g["".concat(c,".").concat(y)]||g[y]||m[y]||l;return n?t.createElement(d,i(i({ref:a},s),{},{components:n})):t.createElement(d,i({ref:a},s))}));function d(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=y;var o={};for(var c in a)hasOwnProperty.call(a,c)&&(o[c]=a[c]);o.originalType=e,o[g]="string"==typeof e?e:r,i[1]=o;for(var p=2;p{n.r(a),n.d(a,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var t=n(8168),r=(n(6540),n(5680));const l={id:"core_src.IScenario",title:"Interface: IScenario",sidebar_label:"IScenario",custom_edit_url:null},i=void 0,o={unversionedId:"api/interfaces/core_src.IScenario",id:"api/interfaces/core_src.IScenario",title:"Interface: IScenario",description:"Test scenario specifies how you want a E2E test to interact with a web browser.",source:"@site/docs/api/interfaces/core_src.IScenario.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/core_src.IScenario",permalink:"/memlab/docs/api/interfaces/core_src.IScenario",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"core_src.IScenario",title:"Interface: IScenario",sidebar_label:"IScenario",custom_edit_url:null},sidebar:"sidebar",previous:{title:"ILeakFilter",permalink:"/memlab/docs/api/interfaces/core_src.ILeakFilter"}},c={},p=[{value:"Properties",id:"properties",level:2},{value:' Optional action: InteractionsCallback',id:"-optional-action-interactionscallback",level:3},{value:' Optional back: InteractionsCallback',id:"-optional-back-interactionscallback",level:3},{value:' Optional beforeInitialPageLoad: InteractionsCallback',id:"-optional-beforeinitialpageload-interactionscallback",level:3},{value:' Optional beforeLeakFilter: InitLeakFilterCallback',id:"-optional-beforeleakfilter-initleakfiltercallback",level:3},{value:' Optional isPageLoaded: CheckPageLoadCallback',id:"-optional-ispageloaded-checkpageloadcallback",level:3},{value:' Optional leakFilter: LeakFilterCallback',id:"-optional-leakfilter-leakfiltercallback",level:3},{value:' Optional retainerReferenceFilter: ReferenceFilterCallback',id:"-optional-retainerreferencefilter-referencefiltercallback",level:3},{value:' Optional setup: InteractionsCallback',id:"-optional-setup-interactionscallback",level:3},{value:"Methods",id:"methods",level:2},{value:'Optional cookies()',id:"optional-cookies",level:3},{value:'Optional repeat()',id:"optional-repeat",level:3},{value:'url()',id:"url",level:3}],s={toc:p},g="wrapper";function m(e){let{components:a,...n}=e;return(0,r.yg)(g,(0,t.A)({},s,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"Test scenario specifies how you want a E2E test to interact with a web browser.\nThe test scenario can be saved as a ",(0,r.yg)("inlineCode",{parentName:"p"},".js")," file and passed to the ",(0,r.yg)("inlineCode",{parentName:"p"},"memlab\nrun --scenario")," command:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"// save as test.js and use in terminal:\n// $ memlab run --scenario test.js\n\nmodule.exports = {\n url: () => 'https://www.npmjs.com/',\n action: async () => ... ,\n back: async () => ... ,\n cookies: () => ... , // optional\n repeat: () => ... , // optional\n ...\n};\n")),(0,r.yg)("p",null,"The test scenario instance can also be passed to the\n",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/modules/api_src#run"},"run")," API exported by ",(0,r.yg)("inlineCode",{parentName:"p"},"@memlab/api"),"."),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const {run} = require('@memlab/api');\n\n(async function () {\n const scenario = {\n url: () => 'https://www.facebook.com',\n action: async () => ... ,\n back: async () => ... ,\n cookies: () => ... , // optional\n repeat: () => ... , // optional\n ...\n };\n const leaks = await run({scenario});\n})();\n")),(0,r.yg)("h2",{id:"properties"},"Properties"),(0,r.yg)("h3",{id:"-optional-action-interactionscallback"},(0,r.yg)("a",{id:"action",name:"action"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"action"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#interactionscallback"},(0,r.yg)("inlineCode",{parentName:"a"},"InteractionsCallback"))),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"action")," is the callback function that defines the interaction\nwhere you want to trigger memory leaks after the initial page load.\nAll JS objects in browser allocated by the browser interactions triggered\nfrom the ",(0,r.yg)("inlineCode",{parentName:"p"},"action")," callback will be candidates for memory leak filtering."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"))," | the puppeteer\n",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nobject, which provides APIs to interact with the web browser. To import\nthis type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n action: async (page) => {\n await page.click('a[href=\"/link\"]');\n },\n back: async (page) => {\n await page.click('a[href=\"/back\"]');\n },\n}\n\nmodule.exports = scenario;\n")),(0,r.yg)("p",null,"Note: always clean up external puppeteer references to JS objects\nin the browser context."),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n action: async (page) => {\n const elements = await page.$x(\"//button[contains(., 'Text in Button')]\");\n const [button] = elements;\n if (button) {\n await button.click();\n }\n // dispose external references to JS objects in browser context\n await promise.all(elements.map(e => e.dispose()));\n },\n back: async (page) => ... ,\n}\n\nmodule.exports = scenario;\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L841"},"core/src/lib/Types.ts:841"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-back-interactionscallback"},(0,r.yg)("a",{id:"back",name:"back"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"back"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#interactionscallback"},(0,r.yg)("inlineCode",{parentName:"a"},"InteractionsCallback"))),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"back")," is the callback function that specifies how memlab should\nback/revert the ",(0,r.yg)("inlineCode",{parentName:"p"},"action")," callback. Think of it as an undo action."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"))," | the puppeteer\n",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nobject, which provides APIs to interact with the web browser. To import\nthis type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n action: async (page) => {\n await page.click('a[href=\"/link\"]');\n },\n back: async (page) => {\n await page.click('a[href=\"/back\"]');\n },\n}\n")),(0,r.yg)("p",null,"Check out ",(0,r.yg)("a",{parentName:"p",href:"/docs/how-memlab-works"},"this page")," on why\nmemlab needs to undo/revert the ",(0,r.yg)("inlineCode",{parentName:"p"},"action")," callback."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L867"},"core/src/lib/Types.ts:867"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-beforeinitialpageload-interactionscallback"},(0,r.yg)("a",{id:"beforeinitialpageload",name:"beforeinitialpageload"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"beforeInitialPageLoad"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#interactionscallback"},(0,r.yg)("inlineCode",{parentName:"a"},"InteractionsCallback"))),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"beforeInitialPageLoad")," is the callback function that will be called only\nonce before the initial page load. This callback can be used to set up\nthe HTTP headers or to prepare data before loading the web page."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"))," | the puppeteer\n",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nobject, which provides APIs to interact with the web browser. To import\nthis type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n beforeInitialPageLoad: async (page) => {\n // before the initial page load\n },\n action: async (page) => {\n await page.click('a[href=\"/link\"]');\n },\n back: async (page) => {\n await page.click('a[href=\"/back\"]');\n },\n}\n\nmodule.exports = scenario;\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L745"},"core/src/lib/Types.ts:745"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-beforeleakfilter-initleakfiltercallback"},(0,r.yg)("a",{id:"beforeleakfilter",name:"beforeleakfilter"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"beforeLeakFilter"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#initleakfiltercallback"},(0,r.yg)("inlineCode",{parentName:"a"},"InitLeakFilterCallback"))),(0,r.yg)("p",null,"Lifecycle function callback that is invoked initially once before\nthe subsequent ",(0,r.yg)("inlineCode",{parentName:"p"},"leakFilter")," function calls. This callback could\nbe used to initialize some data stores or to any one-off\npreprocessings."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the final heap\nsnapshot taken after all browser interactions are done.\nCheck out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Set")," | the set of ids of all JS heap objects\nallocated by the ",(0,r.yg)("inlineCode",{parentName:"li"},"action")," call but not released after the ",(0,r.yg)("inlineCode",{parentName:"li"},"back")," call\nin browser."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"module.exports = {\n url: () => ... ,\n action: async (page) => ... ,\n back: async (page) => ... ,\n beforeLeakFilter: (snapshot, leakedNodeIds) {\n // initialize some data stores\n },\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L953"},"core/src/lib/Types.ts:953"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-ispageloaded-checkpageloadcallback"},(0,r.yg)("a",{id:"ispageloaded",name:"ispageloaded"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"isPageLoaded"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#checkpageloadcallback"},(0,r.yg)("inlineCode",{parentName:"a"},"CheckPageLoadCallback"))),(0,r.yg)("p",null,"Optional callback function that checks if the web page is loaded\nfor the initial page load and subsequent browser interactions."),(0,r.yg)("p",null,"If this callback is not provided, memlab by default\nconsiders a navigation to be finished when there are no network\nconnections for at least 500ms."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"))," | the puppeteer\n",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nobject, which provides APIs to interact with the web browser. To import\nthis type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": a boolean value, if it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true"),", memlab will consider\nthe navigation completes, if it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"false"),", memlab will keep calling\nthis callback until it returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true"),". This is an async callback, you can\nalso ",(0,r.yg)("inlineCode",{parentName:"p"},"await")," and returns ",(0,r.yg)("inlineCode",{parentName:"p"},"true")," until some async logic is resolved.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"module.exports = {\n url: () => ... ,\n action: async (page) => ... ,\n back: async (page) => ... ,\n isPageLoaded: async (page) => {\n await page.waitForNavigation({\n // consider navigation to be finished when there are\n // no more than 2 network connections for at least 500 ms.\n waitUntil: 'networkidle2',\n // Maximum navigation time in milliseconds\n timeout: 5000,\n });\n return true;\n },\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L925"},"core/src/lib/Types.ts:925"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-leakfilter-leakfiltercallback"},(0,r.yg)("a",{id:"leakfilter",name:"leakfilter"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"leakFilter"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#leakfiltercallback"},(0,r.yg)("inlineCode",{parentName:"a"},"LeakFilterCallback"))),(0,r.yg)("p",null,"This callback defines how you want to filter out the\nleaked objects. The callback is called for every node (JS heap\nobject in browser) allocated by the ",(0,r.yg)("inlineCode",{parentName:"p"},"action")," callback, but not\nreleased after the ",(0,r.yg)("inlineCode",{parentName:"p"},"back")," callback. Those objects could be caches\nthat are retained in memory on purpose, or they are memory leaks."),(0,r.yg)("p",null,"This optional callback allows you to define your own algorithm\nto cherry pick memory leaks for specific JS program under test."),(0,r.yg)("p",null,"If this optional callback is not defined, memlab will use its\nbuilt-in leak filter, which considers detached DOM elements\nand unmounted Fiber nodes (detached from React Fiber tree) as\nmemory leaks."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"node"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapNode"},"IHeapNode"))," | the heap object\nallocated but not released. This filter callback will be applied\nto each node allocated but not released in the heap snapshot."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the final heap\nsnapshot taken after all browser interactions are done.\nCheck out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"leakedNodeIds"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"Set")," | the set of ids of all JS heap objects\nallocated by the ",(0,r.yg)("inlineCode",{parentName:"li"},"action")," call but not released after the ",(0,r.yg)("inlineCode",{parentName:"li"},"back")," call\nin browser."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": the boolean value indicating whether the given node in\nthe snapshot should be considered as leaked.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"module.exports = {\n url: () => ... ,\n action: async (page) => ... ,\n back: async (page) => ... ,\n leakFilter(node, snapshot, leakedNodeIds) {\n // any unreleased node (JS heap object) with 1MB+\n // retained size is considered a memory leak\n return node.retainedSize > 1000000;\n },\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L998"},"core/src/lib/Types.ts:998"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-retainerreferencefilter-referencefiltercallback"},(0,r.yg)("a",{id:"retainerreferencefilter",name:"retainerreferencefilter"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"retainerReferenceFilter"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#referencefiltercallback"},(0,r.yg)("inlineCode",{parentName:"a"},"ReferenceFilterCallback"))),(0,r.yg)("p",null,"Callback that can be used to define a logic to decide whether\na reference should be considered as part of the retainer trace.\nThe callback is called for every reference (edge) in the heap snapshot."),(0,r.yg)("p",null,"For concrete examples, check out ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#leakfilter"},"leakFilter"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"edge")," : ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapEdge"},"IHeapEdge"))," | the reference (edge)\nthat is considered for calcualting the retainer trace"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"snapshot"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot"))," | the heap snapshot\ntaken after all browser interactions are done.\nCheck out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot"},"IHeapSnapshot")," for more APIs that queries the\nheap snapshot."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"isReferenceUsedByDefault"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"boolean")," | MemLab has its own default\nlogic for whether a reference should be considered as part of the\nretainer trace, if this parameter is true, it means MemLab will\nconsider this reference when calculating the retainer trace."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": the value indicating whether the given reference should be\nconsidered when calculating the retainer trace. Note that when this\ncallback returns true, the reference will only be considered as a candidate\nfor retainer trace, so it may or may not be included in the retainer trace;\nhowever, if this callback returns false, the reference will be excluded."))),(0,r.yg)("p",null,"Note that by excluding a dominator reference of an object (i.e., an edge\nthat must be traveled through to reach the heap object from GC roots),\nthe object will be considered as unreachable in the heap graph; and\ntherefore, the reference and heap object will not be included in the\nretainer trace detection and retainer size calculation."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-javascript"},"// save as leak-filter.js\nmodule.exports = {\n retainerReferenceFilter(edge, _snapshot, _leakedNodeIds) {\n // exclude react fiber references\n if (edge.name_or_index.toString().startsWith('__reactFiber$')) {\n return false;\n }\n return true;\n }\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L1044"},"core/src/lib/Types.ts:1044"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"-optional-setup-interactionscallback"},(0,r.yg)("a",{id:"setup",name:"setup"})," ",(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"setup"),": ",(0,r.yg)("a",{parentName:"h3",href:"/memlab/docs/api/modules/core_src#interactionscallback"},(0,r.yg)("inlineCode",{parentName:"a"},"InteractionsCallback"))),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"setup")," is the callback function that will be called only once\nafter the initial page load. This callback can be used to log in\nif you have to (we recommend using ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#cookies"},"cookies"),")\nor to prepare data before the ",(0,r.yg)("a",{parentName:"p",href:"/memlab/docs/api/interfaces/core_src.IScenario#action"},"action")," call."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Parameters"),":"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"page"),": ",(0,r.yg)("code",null,(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"))," | the puppeteer\n",(0,r.yg)("a",{parentName:"li",href:"https://pptr.dev/api/puppeteer.page"},(0,r.yg)("inlineCode",{parentName:"a"},"Page")),"\nobject, which provides APIs to interact with the web browser. To import\nthis type, check out ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#page"},"Page"),"."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n setup: async (page) => {\n // log in or prepare data for the interaction\n },\n action: async (page) => {\n await page.click('a[href=\"/link\"]');\n },\n back: async (page) => {\n await page.click('a[href=\"/back\"]');\n },\n}\n\nmodule.exports = scenario;\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L794"},"core/src/lib/Types.ts:794"))))),(0,r.yg)("h2",{id:"methods"},"Methods"),(0,r.yg)("h3",{id:"optional-cookies"},(0,r.yg)("a",{id:"cookies"}),(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"cookies"),"()"),(0,r.yg)("p",null,"If the page you are running memlab against requires authentication or\nspecific cookie(s) to be set, you can pass them as\na list of ",(0,r.yg)("inlineCode",{parentName:"p"},"")," tuples."),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"Note"),": please make sure that you provide the correct ",(0,r.yg)("inlineCode",{parentName:"p"},"domain")," field for\nthe cookies tuples. If no ",(0,r.yg)("inlineCode",{parentName:"p"},"domain")," field is specified, memlab will try\nto fill in a domain based on the ",(0,r.yg)("inlineCode",{parentName:"p"},"url")," callback.\nFor example, when the ",(0,r.yg)("inlineCode",{parentName:"p"},"domain")," field is absent,\nmemlab will auto fill in ",(0,r.yg)("inlineCode",{parentName:"p"},".facebook.com")," as domain base\non the initial page load's url: ",(0,r.yg)("inlineCode",{parentName:"p"},"https://www.facebook.com/"),"."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("a",{parentName:"li",href:"/memlab/docs/api/modules/core_src#cookies"},(0,r.yg)("inlineCode",{parentName:"a"},"Cookies"))," | cookie list"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.facebook.com/',\n cookies: () => [\n {name:'cm_j', value: 'none', domain: '.facebook.com'},\n {name:'datr', value: 'yJvIY...', domain: '.facebook.com'},\n {name:'c_user', value: '8917...', domain: '.facebook.com'},\n {name:'xs', value: '95:9WQ...', domain: '.facebook.com'},\n // ...\n ],\n};\n\nmodule.exports = scenario;\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L715"},"core/src/lib/Types.ts:715"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"optional-repeat"},(0,r.yg)("a",{id:"repeat"}),(0,r.yg)("inlineCode",{parentName:"h3"},"Optional")," ",(0,r.yg)("strong",{parentName:"h3"},"repeat"),"()"),(0,r.yg)("p",null,"Specifies how many ",(0,r.yg)("strong",{parentName:"p"},"extra")," ",(0,r.yg)("inlineCode",{parentName:"p"},"action")," and ",(0,r.yg)("inlineCode",{parentName:"p"},"back")," actions performed\nby memlab."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Returns"),": a number value specifies the number of extra actions.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Examples"),":"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"module.exports = {\n url: () => ... ,\n action: async (page) => ... ,\n back: async (page) => ... ,\n // browser interaction: two additional [ action -> back ]\n // init-load -> action -> back -> action -> back -> action -> back\n repeat: () => 2,\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"number")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L886"},"core/src/lib/Types.ts:886"))))),(0,r.yg)("hr",null),(0,r.yg)("h3",{id:"url"},(0,r.yg)("a",{id:"url"}),(0,r.yg)("strong",{parentName:"h3"},"url"),"()"),(0,r.yg)("p",null,"String value of the initial url of the page."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Returns"),": ",(0,r.yg)("inlineCode",{parentName:"li"},"string")," | the string value of the initial url"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Examples"),":")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-typescript"},"const scenario = {\n url: () => 'https://www.npmjs.com/',\n};\n\nmodule.exports = scenario;\n")),(0,r.yg)("p",null,"If a test scenario only specifies the ",(0,r.yg)("inlineCode",{parentName:"p"},"url")," callback (without the ",(0,r.yg)("inlineCode",{parentName:"p"},"action"),"\ncallback), memlab will try to detect memory leaks from the initial page\nload. All objects allocated by the initial page load will be candidates\nfor memory leak filtering."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Source"),":",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://github.com/facebook/memlab/blob/7f6fcee/packages/core/src/lib/Types.ts#L763"},"core/src/lib/Types.ts:763"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/main.0eb61cf8.js b/assets/js/main.0eb61cf8.js new file mode 100644 index 00000000..c46a4bd0 --- /dev/null +++ b/assets/js/main.0eb61cf8.js @@ -0,0 +1,2 @@ +/*! For license information please see main.0eb61cf8.js.LICENSE.txt */ +(self.webpackChunkmemlab_website=self.webpackChunkmemlab_website||[]).push([[8792],{3219:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>g,E8:()=>$n,a1:()=>qn});var r=n(6540);n(961);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t=3||2===n&&r>=4||1===n&&r>=10);function o(t,n,r){if(a&&void 0!==r){var o=r[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":o.appId,"X-Algolia-API-Key":o.apiKey};e.apply(void 0,[t].concat(I(n),[{headers:i}]))}else e.apply(void 0,[t].concat(I(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("clickedObjectIDsAfterSearch",M(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("clickedObjectIDs",M(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("convertedObjectIDsAfterSearch",M(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("convertedObjectIDs",M(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce((function(e,t){var n=t.items,r=N(t,T);return[].concat(I(e),I(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function B(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function U(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function q(e){return function(e){if(Array.isArray(e))return $(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&K({onItemsChange:r,items:n,insights:l,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;i("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:l}}),n((function(e){var t=e.item,n=e.state,r=e.event;U(t)&&a({state:n,event:r,insights:l,item:t,insightsEvents:[G({eventName:"Item Selected"},x({item:t,items:s.current}))]})})),r((function(e){var t=e.item,n=e.state,r=e.event;U(t)&&o({state:n,event:r,insights:l,item:t,insightsEvents:[G({eventName:"Item Active"},x({item:t,items:s.current}))]})}))},onStateChange:function(e){var t=e.state;c({state:t})},__autocomplete_pluginOptions:e}}function Y(e,t){var n=t;return{then:function(t,r){return Y(e.then(J(t,n,e),J(r,n,e)),n)},catch:function(t){return Y(e.catch(J(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),Y(e.finally(J(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function X(e){return Y(e,{isCanceled:!1,onCancelList:[]})}function J(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function Z(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var a=(null===t?-1:t)+e;return a<=-1||a>=n?null===r?null:0:a}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(w++),plugins:a,initialState:ge({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:_,onResolve:_};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=te(te({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return y(e)})).then((function(e){return e.map((function(e){return ge(ge({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:ge({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function ye(e){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(e)}function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,De);Be&&a.environment.clearTimeout(Be);var c=s.setCollections,u=s.setIsOpen,d=s.setQuery,f=s.setActiveItemId,p=s.setStatus;if(d(o),f(a.defaultActiveItemId),!o&&!1===a.openOnFocus){var m,h=l.getState().collections.map((function(e){return Re(Re({},e),{},{items:[]})}));p("idle"),c(h),u(null!==(m=r.isOpen)&&void 0!==m?m:a.shouldPanelOpen({state:l.getState()}));var g=X(Ue(h).then((function(){return Promise.resolve()})));return l.pendingRequests.add(g)}p("loading"),Be=a.environment.setTimeout((function(){p("stalled")}),a.stallThreshold);var b=X(Ue(a.getSources(Re({query:o,refresh:i,state:l.getState()},s)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(Re({query:o,refresh:i,state:l.getState()},s))).then((function(t){return function(e,t,n){if(a=e,Boolean(null==a?void 0:a.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(Ae(Object.keys(n.context).map((function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return Oe(Oe({},e),{},{requests:e.queries.map((function(n){return{query:"algolia"===e.requesterId?Oe(Oe({},n),{},{params:Oe(Oe({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}}))})}var a;return{items:e,sourceId:t}}(t,e.sourceId,l.getState())}))}))).then(Pe).then((function(t){return function(e,t,n){return t.map((function(t){var r,a=e.filter((function(e){return e.sourceId===t.sourceId})),o=a.map((function(e){return e.items})),i=a[0].transformResponse,l=i?i({results:r=o,hits:r.map((function(e){return e.hits})).filter(Boolean),facetHits:r.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):o;return t.onResolve({source:t,results:o,items:l,state:n.getState()}),l.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:l}}))}(t,e,l)})).then((function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce((function(e,t){return Se(Se({},e),{},Ee({},t.source.sourceId,Se(Se({},t.source),{},{getItems:function(){return y(t.items)}})))}),{}),a=t.plugins.reduce((function(e,t){return t.reshape?t.reshape(e):e}),{sourcesBySourceId:r,state:n}).sourcesBySourceId;return y(t.reshape({sourcesBySourceId:a,sources:Object.values(a),state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:a,state:l.getState()})}))})))).then((function(e){var n;p("idle"),c(e);var d=a.shouldPanelOpen({state:l.getState()});u(null!==(n=r.isOpen)&&void 0!==n?n:a.openOnFocus&&!o&&d||d);var f=ae(l.getState());if(null!==l.getState().activeItemId&&f){var m=f.item,h=f.itemInputValue,g=f.itemUrl,b=f.source;b.onActive(Re({event:t,item:m,itemInputValue:h,itemUrl:g,refresh:i,source:b,state:l.getState()},s))}})).finally((function(){p("idle"),Be&&a.environment.clearTimeout(Be)}));return l.pendingRequests.add(b)}function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}var $e=["event","props","refresh","store"];function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ot(e){var t=e.props,n=e.refresh,r=e.store,a=at(e,Ke),o=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var n=e.inputElement,a=e.formElement,o=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[a,o].some((function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return nt({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},at(e,Qe))},getRootProps:function(e){return nt({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){return e.inputElement,nt({action:"",noValidate:!0,role:"search",onSubmit:function(o){var i;o.preventDefault(),t.onSubmit(nt({event:o,refresh:n,state:r.getState()},a)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(o){var i;o.preventDefault(),t.onReset(nt({event:o,refresh:n,state:r.getState()},a)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},at(e,Ye))},getLabelProps:function(e){var n=e||{},r=n.sourceIndex,a=at(n,Je);return nt({htmlFor:"".concat(o(t.id,r),"-input"),id:"".concat(o(t.id,r),"-label")},a)},getInputProps:function(e){var o;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&ze(nt({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},a)),r.dispatch("focus",null)}var l=e||{},s=(l.inputElement,l.maxLength),c=void 0===s?512:s,u=at(l,Xe),d=ae(r.getState()),f=function(e){return Boolean(e&&e.match(oe))}((null===(o=t.environment.navigator)||void 0===o?void 0:o.userAgent)||""),p=null!=d&&d.itemUrl&&!f?"go":"search";return nt({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?"".concat(t.id,"-item-").concat(r.getState().activeItemId):void 0,"aria-controls":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:r.getState().completion||r.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:"search",onChange:function(e){ze(nt({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},a))},onKeyDown:function(e){!function(e){var t=e.event,n=e.props,r=e.refresh,a=e.store,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,$e);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=n.environment.document.getElementById("".concat(n.id,"-item-").concat(a.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},l=function(){var e=ae(a.getState());if(null!==a.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,l=e.itemUrl,s=e.source;s.onActive(Ge({event:t,item:n,itemInputValue:i,itemUrl:l,refresh:r,source:s,state:a.getState()},o))}};t.preventDefault(),!1===a.getState().isOpen&&(n.openOnFocus||Boolean(a.getState().query))?ze(Ge({event:t,props:n,query:a.getState().query,refresh:r,store:a},o)).then((function(){a.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),l(),setTimeout(i,0)})):(a.dispatch(t.key,{}),l(),i())}else if("Escape"===t.key)t.preventDefault(),a.dispatch(t.key,null),a.pendingRequests.cancelAll();else if("Tab"===t.key)a.dispatch("blur",null),a.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===a.getState().activeItemId||a.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||a.pendingRequests.cancelAll());t.preventDefault();var s=ae(a.getState()),c=s.item,u=s.itemInputValue,d=s.itemUrl,f=s.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(f.onSelect(Ge({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:a.getState()},o)),n.navigator.navigateNewTab({itemUrl:d,item:c,state:a.getState()}));else if(t.shiftKey)void 0!==d&&(f.onSelect(Ge({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:a.getState()},o)),n.navigator.navigateNewWindow({itemUrl:d,item:c,state:a.getState()}));else if(t.altKey);else{if(void 0!==d)return f.onSelect(Ge({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:a.getState()},o)),void n.navigator.navigate({itemUrl:d,item:c,state:a.getState()});ze(Ge({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:a},o)).then((function(){f.onSelect(Ge({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:a.getState()},o))}))}}}(nt({event:e,props:t,refresh:n,store:r},a))},onFocus:i,onBlur:_,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},u)},getPanelProps:function(e){return nt({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.sourceIndex,a=at(n,Ze);return nt({role:"listbox","aria-labelledby":"".concat(o(t.id,r),"-label"),id:"".concat(o(t.id,r),"-list")},a)},getItemProps:function(e){var i=e.item,l=e.source,s=e.sourceIndex,c=at(e,et);return nt({id:"".concat(o(t.id,s),"-item-").concat(i.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===i.__autocomplete_id,onMouseMove:function(e){if(i.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",i.__autocomplete_id);var t=ae(r.getState());if(null!==r.getState().activeItemId&&t){var o=t.item,l=t.itemInputValue,s=t.itemUrl,c=t.source;c.onActive(nt({event:e,item:o,itemInputValue:l,itemUrl:s,refresh:n,source:c,state:r.getState()},a))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var o=l.getItemInputValue({item:i,state:r.getState()}),s=l.getItemUrl({item:i,state:r.getState()});(s?Promise.resolve():ze(nt({event:e,nextState:{isOpen:!1},props:t,query:o,refresh:n,store:r},a))).then((function(){l.onSelect(nt({event:e,item:i,itemInputValue:o,itemUrl:s,refresh:n,source:l,state:r.getState()},a))}))}},c)}}}function it(e){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},it(e)}function lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function st(e){for(var t=1;t0&&r.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},r.createElement("p",{className:"DocSearch-Help"},c,":"),r.createElement("ul",null,h.slice(0,3).reduce((function(e,t){return[].concat(u(e),[r.createElement("li",{key:t},r.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){a.setQuery(t.toLowerCase()+" "),a.refresh(),a.inputRef.current.focus()}},t))])}),[]))),a.getMissingResultsUrl&&r.createElement("p",{className:"DocSearch-Help"},"".concat(f," "),r.createElement("a",{href:a.getMissingResultsUrl({query:a.state.query}),target:"_blank",rel:"noopener noreferrer"},m)))}var Ut=["hit","attribute","tagName"];function zt(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function qt(e){var t=e.hit,n=e.attribute,a=e.tagName,i=void 0===a?"span":a,l=s(e,Ut);return(0,r.createElement)(i,o(o({},l),{},{dangerouslySetInnerHTML:{__html:zt(t,"_snippetResult.".concat(n,".value"))||zt(t,n)}}))}function $t(e){return e.collection&&0!==e.collection.items.length?r.createElement("section",{className:"DocSearch-Hits"},r.createElement("div",{className:"DocSearch-Hit-source"},e.title),r.createElement("ul",e.getListProps(),e.collection.items.map((function(t,n){return r.createElement(Ht,l({key:[e.title,t.objectID].join(":"),item:t,index:n},e))})))):null}function Ht(e){var t=e.item,n=e.index,a=e.renderIcon,o=e.renderAction,i=e.getItemProps,s=e.onItemClick,u=e.collection,d=e.hitComponent,f=c(r.useState(!1),2),p=f[0],m=f[1],h=c(r.useState(!1),2),g=h[0],b=h[1],v=r.useRef(null),y=d;return r.createElement("li",l({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",p&&"DocSearch-Hit--deleting",g&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){v.current&&v.current()}},i({item:t,source:u.source,onClick:function(e){s(t,e)}})),r.createElement(y,{hit:t},r.createElement("div",{className:"DocSearch-Hit-Container"},a({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(qt,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&r.createElement(qt,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(qt,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),r.createElement(qt,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement(qt,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),r.createElement(qt,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),o({item:t,runDeleteTransition:function(e){m(!0),v.current=e},runFavoriteTransition:function(e){b(!0),v.current=e}}))))}function Gt(e,t,n){return e.reduce((function(e,r){var a=t(r);return e.hasOwnProperty(a)||(e[a]=[]),e[a].length<(n||5)&&e[a].push(r),e}),{})}function Vt(e){return e}function Wt(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function Kt(){}var Qt=/(|<\/mark>)/g,Yt=RegExp(Qt.source);function Xt(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var a=((r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0)||{}).value;return a&&Yt.test(a)?a.replace(Qt,""):a}function Jt(e){return r.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map((function(t){if(0===t.items.length)return null;var n=Xt(t.items[0]);return r.createElement($t,l({},e,{key:t.source.sourceId,title:n,collection:t,renderIcon:function(e){var n,a=e.item,o=e.index;return r.createElement(r.Fragment,null,a.__docsearch_parent&&r.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.__docsearch_parent!==(null===(n=t.items[o+1])||void 0===n?void 0:n.__docsearch_parent)?r.createElement("path",{d:"M8 6v21M20 27H8.3"}):r.createElement("path",{d:"M8 6v42M20 27H8.3"}))),r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(It,{type:a.type})))},renderAction:function(){return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement(Tt,null))}}))})),e.resultsFooterComponent&&r.createElement("section",{className:"DocSearch-HitsFooter"},r.createElement(e.resultsFooterComponent,{state:e.state})))}var Zt=["translations"];function en(e){var t=e.translations,n=void 0===t?{}:t,a=s(e,Zt),o=n.recentSearchesTitle,i=void 0===o?"Recent":o,c=n.noRecentSearchesText,u=void 0===c?"No recent searches":c,d=n.saveRecentSearchButtonTitle,f=void 0===d?"Save this search":d,p=n.removeRecentSearchButtonTitle,m=void 0===p?"Remove this search from history":p,h=n.favoriteSearchesTitle,g=void 0===h?"Favorite":h,b=n.removeFavoriteSearchButtonTitle,v=void 0===b?"Remove this search from favorites":b;return"idle"===a.state.status&&!1===a.hasCollections?a.disableUserPersonalization?null:r.createElement("div",{className:"DocSearch-StartScreen"},r.createElement("p",{className:"DocSearch-Help"},u)):!1===a.hasCollections?null:r.createElement("div",{className:"DocSearch-Dropdown-Container"},r.createElement($t,l({},a,{title:i,collection:a.state.collections[0],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(At,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,o=e.runDeleteTransition;return r.createElement(r.Fragment,null,r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){a.favoriteSearches.add(t),a.recentSearches.remove(t),a.refresh()}))}},r.createElement(Rt,null))),r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){a.recentSearches.remove(t),a.refresh()}))}},r.createElement(Ct,null))))}})),r.createElement($t,l({},a,{title:g,collection:a.state.collections[1],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Rt,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:v,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){a.favoriteSearches.remove(t),a.refresh()}))}},r.createElement(Ct,null)))}})))}var tn=["translations"],nn=r.memo((function(e){var t=e.translations,n=void 0===t?{}:t,a=s(e,tn);if("error"===a.state.status)return r.createElement(Mt,{translations:null==n?void 0:n.errorScreen});var o=a.state.collections.some((function(e){return e.items.length>0}));return a.state.query?!1===o?r.createElement(Bt,l({},a,{translations:null==n?void 0:n.noResultsScreen})):r.createElement(Jt,a):r.createElement(en,l({},a,{hasCollections:o,translations:null==n?void 0:n.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status})),rn=["translations"];function an(e){var t=e.translations,n=void 0===t?{}:t,a=s(e,rn),o=n.resetButtonTitle,i=void 0===o?"Clear the query":o,c=n.resetButtonAriaLabel,u=void 0===c?"Clear the query":c,d=n.cancelButtonText,f=void 0===d?"Cancel":d,p=n.cancelButtonAriaLabel,h=void 0===p?"Cancel":p,g=n.searchInputLabel,b=void 0===g?"Search":g,v=a.getFormProps({inputElement:a.inputRef.current}).onReset;return r.useEffect((function(){a.autoFocus&&a.inputRef.current&&a.inputRef.current.focus()}),[a.autoFocus,a.inputRef]),r.useEffect((function(){a.isFromSelection&&a.inputRef.current&&a.inputRef.current.select()}),[a.isFromSelection,a.inputRef]),r.createElement(r.Fragment,null,r.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:v},r.createElement("label",l({className:"DocSearch-MagnifierLabel"},a.getLabelProps()),r.createElement(m,null),r.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},b)),r.createElement("div",{className:"DocSearch-LoadingIndicator"},r.createElement(xt,null)),r.createElement("input",l({className:"DocSearch-Input",ref:a.inputRef},a.getInputProps({inputElement:a.inputRef.current,autoFocus:a.autoFocus,maxLength:64}))),r.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":u,hidden:!a.state.query},r.createElement(Ct,null))),r.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":h,onClick:a.onClose},f))}var on=["_highlightResult","_snippetResult"];function ln(e){var t=e.key,n=e.limit,r=void 0===n?5:n,a=function(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}(t),o=a.getItem().slice(0,r);return{add:function(e){var t=e,n=(t._highlightResult,t._snippetResult,s(t,on)),i=o.findIndex((function(e){return e.objectID===n.objectID}));i>-1&&o.splice(i,1),o.unshift(n),o=o.slice(0,r),a.setItem(o)},remove:function(e){o=o.filter((function(t){return t.objectID!==e.objectID})),a.setItem(o)},getAll:function(){return o}}}function sn(e){const t=`algoliasearch-client-js-${e.key}`;let n;const r=()=>(void 0===n&&(n=e.localStorage||window.localStorage),n),a=()=>JSON.parse(r().getItem(t)||"{}"),o=e=>{r().setItem(t,JSON.stringify(e))};return{get:(t,n,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,n=a(),r=Object.fromEntries(Object.entries(n).filter((([,e])=>void 0!==e.timestamp)));if(o(r),!t)return;const i=Object.fromEntries(Object.entries(r).filter((([,e])=>{const n=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:n(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,n)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:n},r().setItem(t,JSON.stringify(o)),n})),delete:e=>Promise.resolve().then((()=>{const n=a();delete n[JSON.stringify(e)],r().setItem(t,JSON.stringify(n))})),clear:()=>Promise.resolve().then((()=>{r().removeItem(t)}))}}function cn(e){const t=[...e.caches],n=t.shift();return void 0===n?{get:(e,t,n={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,n.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,r,a={miss:()=>Promise.resolve()})=>n.get(e,r,a).catch((()=>cn({caches:t}).get(e,r,a))),set:(e,r)=>n.set(e,r).catch((()=>cn({caches:t}).set(e,r))),delete:e=>n.delete(e).catch((()=>cn({caches:t}).delete(e))),clear:()=>n.clear().catch((()=>cn({caches:t}).clear()))}}function un(e={serializable:!0}){let t={};return{get(n,r,a={miss:()=>Promise.resolve()}){const o=JSON.stringify(n);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);const i=r(),l=a&&a.miss||(()=>Promise.resolve());return i.then((e=>l(e))).then((()=>i))},set:(n,r)=>(t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function dn(e){let t=e.length-1;for(;t>0;t--){const n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function fn(e,t){return t?(Object.keys(t).forEach((n=>{e[n]=t[n](e)})),e):e}function pn(e,...t){let n=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[n++])))}const mn={WithinQueryParameters:0,WithinHeaders:1};function hn(e,t){const n=e||{},r=n.data||{};return Object.keys(n).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(r[e]=n[e])})),{data:Object.entries(r).length>0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}const gn={Read:1,Write:2,Any:3},bn=1,vn=3;function yn(e,t=bn){return{...e,status:t,lastUpdate:Date.now()}}function wn(e){return"string"==typeof e?{protocol:"https",url:e,accept:gn.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||gn.Any}}const Sn="GET",En="POST";function kn(e,t,n,r){const a=[],o=function(e,t){if(e.method===Sn||void 0===e.data&&void 0===t.data)return;const n=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(n)}(n,r),i=function(e,t){const n={...e.headers,...t.headers},r={};return Object.keys(n).forEach((e=>{const t=n[e];r[e.toLowerCase()]=t})),r}(e,r),l=n.method,s=n.method!==Sn?{}:{...n.data,...r.data},c={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...s,...r.queryParameters};let u=0;const d=(t,s)=>{const f=t.pop();if(void 0===f)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:An(a)};const p={data:o,headers:i,method:l,url:On(f,n.path,c),connectTimeout:s(u,e.timeouts.connect),responseTimeout:s(u,r.timeout)},m=e=>{const n={request:p,response:e,host:f,triesLeft:t.length};return a.push(n),n},h={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(n){const r=m(n);return n.isTimedOut&&u++,Promise.all([e.logger.info("Retryable failure",Cn(r)),e.hostsCache.set(f,yn(f,n.isTimedOut?vn:2))]).then((()=>d(t,s)))},onFail(e){throw m(e),function({content:e,status:t},n){let r=e;try{r=JSON.parse(e).message}catch(e){}return function(e,t,n){return{name:"ApiError",message:e,status:t,transporterStackTrace:n}}(r,t,n)}(e,An(a))}};return e.requester.send(p).then((e=>((e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&!~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e))(e,h)))};return function(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(yn(t))))))).then((e=>{const n=e.filter((e=>function(e){return e.status===bn||Date.now()-e.lastUpdate>12e4}(e))),r=e.filter((e=>function(e){return e.status===vn&&Date.now()-e.lastUpdate<=12e4}(e))),a=[...n,...r];return{getTimeout:(e,t)=>(0===r.length&&0===e?1:r.length+3+e)*t,statelessHosts:a.length>0?a.map((e=>wn(e))):t}}))}(e.hostsCache,t).then((e=>d([...e.statelessHosts].reverse(),e.getTimeout)))}function _n(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const n=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(n)&&(t.value=`${t.value}${n}`),t}};return t}function On(e,t,n){const r=xn(n);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return r.length&&(a+=`?${r}`),a}function xn(e){return Object.keys(e).map((t=>{return pn("%s=%s",t,(n=e[t],"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n)?JSON.stringify(e[t]):e[t]));var n})).join("&")}function An(e){return e.map((e=>Cn(e)))}function Cn(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const Tn=e=>{const t=e.appId,n=function(e,t,n){const r={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers:()=>e===mn.WithinHeaders?r:{},queryParameters:()=>e===mn.WithinQueryParameters?r:{}}}(void 0!==e.authMode?e.authMode:mn.WithinHeaders,t,e.apiKey),r=function(e){const{hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:o,timeouts:i,userAgent:l,hosts:s,queryParameters:c,headers:u}=e,d={hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:o,timeouts:i,userAgent:l,headers:u,queryParameters:c,hosts:s.map((e=>wn(e))),read(e,t){const n=hn(t,d.timeouts.read),r=()=>kn(d,d.hosts.filter((e=>!!(e.accept&gn.Read))),e,n);if(!0!==(void 0!==n.cacheable?n.cacheable:e.cacheable))return r();const a={request:e,mappedRequestOptions:n,transporter:{queryParameters:d.queryParameters,headers:d.headers}};return d.responsesCache.get(a,(()=>d.requestsCache.get(a,(()=>d.requestsCache.set(a,r()).then((e=>Promise.all([d.requestsCache.delete(a),e])),(e=>Promise.all([d.requestsCache.delete(a),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>d.responsesCache.set(a,e)})},write:(e,t)=>kn(d,d.hosts.filter((e=>!!(e.accept&gn.Write))),e,hn(t,d.timeouts.write))};return d}({hosts:[{url:`${t}-dsn.algolia.net`,accept:gn.Read},{url:`${t}.algolia.net`,accept:gn.Write}].concat(dn([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...n.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...n.queryParameters(),...e.queryParameters}}),a={transporter:r,appId:t,addAlgoliaAgent(e,t){r.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([r.requestsCache.clear(),r.responsesCache.clear()]).then((()=>{}))};return fn(a,e.methods)},Pn=e=>(t,n)=>t.method===Sn?e.transporter.read(t,n):e.transporter.write(t,n),In=e=>(t,n={})=>fn({transporter:e.transporter,appId:e.appId,indexName:t},n.methods),Dn=e=>(t,n)=>{const r=t.map((e=>({...e,params:xn(e.params||{})})));return e.transporter.read({method:En,path:"1/indexes/*/queries",data:{requests:r},cacheable:!0},n)},Nn=e=>(t,n)=>Promise.all(t.map((t=>{const{facetName:r,facetQuery:a,...o}=t.params;return In(e)(t.indexName,{methods:{searchForFacetValues:jn}}).searchForFacetValues(r,a,{...n,...o})}))),Rn=e=>(t,n,r)=>e.transporter.read({method:En,path:pn("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r),Ln=e=>(t,n)=>e.transporter.read({method:En,path:pn("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},n),jn=e=>(t,n,r)=>e.transporter.read({method:En,path:pn("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:n},cacheable:!0},r),Mn=1,Fn=2,Bn=3;function Un(e,t,n){const r={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>n.setRequestHeader(t,e.headers[t])));const r=(e,r)=>setTimeout((()=>{n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e),a=r(e.connectTimeout,"Connection timeout");let o;n.onreadystatechange=()=>{n.readyState>n.OPENED&&void 0===o&&(clearTimeout(a),o=r(e.responseTimeout,"Socket timeout"))},n.onerror=()=>{0===n.status&&(clearTimeout(a),clearTimeout(o),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=()=>{clearTimeout(a),clearTimeout(o),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))},logger:(a=Bn,{debug:(e,t)=>(Mn>=a&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(Fn>=a&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:un(),requestsCache:un({serializable:!1}),hostsCache:cn({caches:[sn({key:`4.19.1-${e}`}),un()]}),userAgent:_n("4.19.1").add({segment:"Browser",version:"lite"}),authMode:mn.WithinQueryParameters};var a;return Tn({...r,...n,methods:{search:Dn,searchForFacetValues:Nn,multipleQueries:Dn,multipleSearchForFacetValues:Nn,customRequest:Pn,initIndex:e=>t=>In(e)(t,{methods:{search:Ln,searchForFacetValues:jn,findAnswers:Rn}})}})}Un.version="4.19.1";var zn=["footer","searchBox"];function qn(e){var t=e.appId,n=e.apiKey,a=e.indexName,i=e.placeholder,u=void 0===i?"Search docs":i,d=e.searchParameters,f=e.maxResultsPerGroup,p=e.onClose,m=void 0===p?Kt:p,h=e.transformItems,g=void 0===h?Vt:h,b=e.hitComponent,v=void 0===b?Ot:b,y=e.resultsFooterComponent,w=void 0===y?function(){return null}:y,S=e.navigator,E=e.initialScrollY,k=void 0===E?0:E,_=e.transformSearchClient,O=void 0===_?Vt:_,x=e.disableUserPersonalization,A=void 0!==x&&x,C=e.initialQuery,T=void 0===C?"":C,P=e.translations,I=void 0===P?{}:P,D=e.getMissingResultsUrl,N=e.insights,R=void 0!==N&&N,L=I.footer,j=I.searchBox,M=s(I,zn),F=c(r.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),B=F[0],U=F[1],z=r.useRef(null),q=r.useRef(null),$=r.useRef(null),H=r.useRef(null),G=r.useRef(null),V=r.useRef(10),W=r.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,K=r.useRef(T||W).current,Q=function(e,t,n){return r.useMemo((function(){var r=Un(e,t);return r.addAlgoliaAgent("docsearch","3.6.1"),!1===/docsearch.js \(.*\)/.test(r.transporter.userAgent.value)&&r.addAlgoliaAgent("docsearch-react","3.6.1"),n(r)}),[e,t,n])}(t,n,O),Y=r.useRef(ln({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(a),limit:10})).current,X=r.useRef(ln({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(a),limit:0===Y.getAll().length?7:4})).current,J=r.useCallback((function(e){if(!A){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===Y.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&X.add(t)}}),[Y,X,A]),Z=r.useCallback((function(e){if(B.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};B.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}}),[B.context.algoliaInsightsPlugin]),ee=r.useMemo((function(){return St({id:"docsearch",defaultActiveItemId:0,placeholder:u,openOnFocus:!0,initialState:{query:K,context:{searchSuggestions:[]}},insights:R,navigator:S,onStateChange:function(e){U(e.state)},getSources:function(e){var r=e.query,i=e.state,l=e.setContext,s=e.setStatus;if(!r)return A?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),Wt(n)||m()},getItemUrl:function(e){return e.item.url},getItems:function(){return X.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),Wt(n)||m()},getItemUrl:function(e){return e.item.url},getItems:function(){return Y.getAll()}}];var c=Boolean(R);return Q.search([{query:r,indexName:a,params:o({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(V.current),"hierarchy.lvl2:".concat(V.current),"hierarchy.lvl3:".concat(V.current),"hierarchy.lvl4:".concat(V.current),"hierarchy.lvl5:".concat(V.current),"hierarchy.lvl6:".concat(V.current),"content:".concat(V.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:c},d)}]).catch((function(e){throw"RetryError"===e.name&&s("error"),e})).then((function(e){var r=e.results[0],s=r.hits,u=r.nbHits,d=Gt(s,(function(e){return Xt(e)}),f);i.context.searchSuggestions.length0&&(re(),G.current&&G.current.focus())}),[K,re]),r.useEffect((function(){function e(){if(q.current){var e=.01*window.innerHeight;q.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),r.createElement("div",l({ref:z},ne({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===B.status&&"DocSearch-Container--Stalled","error"===B.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&m()}}),r.createElement("div",{className:"DocSearch-Modal",ref:q},r.createElement("header",{className:"DocSearch-SearchBar",ref:$},r.createElement(an,l({},ee,{state:B,autoFocus:0===K.length,inputRef:G,isFromSelection:Boolean(K)&&K===W,translations:j,onClose:m}))),r.createElement("div",{className:"DocSearch-Dropdown",ref:H},r.createElement(nn,l({},ee,{indexName:a,state:B,hitComponent:v,resultsFooterComponent:w,disableUserPersonalization:A,recentSearches:X,favoriteSearches:Y,inputRef:G,translations:M,getMissingResultsUrl:D,onItemClick:function(e,t){Z(e),J(e),Wt(t)||m()}}))),r.createElement("footer",{className:"DocSearch-Footer"},r.createElement(_t,{translations:L}))))}function $n(e){var t=e.isOpen,n=e.onOpen,a=e.onClose,o=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){var r;(27===e.keyCode&&t||"k"===(null===(r=e.key)||void 0===r?void 0:r.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?a():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),i&&i.current===document.activeElement&&o&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&o(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,a,o,i])}},8328:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(6540),a=n(8168),o=n(3259),i=n.n(o),l=n(4054);const s={"015e0bf7":[()=>n.e(2775).then(n.bind(n,3635)),"@site/docs/api/classes/heap_analysis_src.StringAnalysis.md",3635],"086eefc4":[()=>n.e(6192).then(n.bind(n,473)),"@site/docs/api/classes/api_src.SnapshotResultReader.md",473],"0d63082f":[()=>n.e(5214).then(n.bind(n,6835)),"@site/docs/api/classes/heap_analysis_src.BaseAnalysis.md",6835],"0e384e19":[()=>n.e(3976).then(n.bind(n,8386)),"@site/docs/intro.md",8386],"0ee6ea57":[()=>n.e(4573).then(n.bind(n,1471)),"@site/docs/api/interfaces/core_src.IHeapNode.md",1471],17896441:[()=>Promise.all([n.e(1869),n.e(2329),n.e(2025),n.e(8401)]).then(n.bind(n,2384)),"@theme/DocItem",2384],"1a4e3797":[()=>Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,6996)),"@theme/SearchPage",6996],"1a5ddf9d":[()=>n.e(2871).then(n.bind(n,3179)),"@site/docs/guides/03-find-leak.md",3179],"1bb76b7a":[()=>n.e(2915).then(n.bind(n,1835)),"@site/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis.md",1835],"1be78505":[()=>Promise.all([n.e(1869),n.e(8714)]).then(n.bind(n,8067)),"@theme/DocPage",8067],"1df93b7f":[()=>Promise.all([n.e(1869),n.e(5491),n.e(4583)]).then(n.bind(n,7379)),"@site/src/pages/index.tsx",7379],"1f391b9e":[()=>Promise.all([n.e(1869),n.e(2329),n.e(2025),n.e(6061)]).then(n.bind(n,7973)),"@theme/MDXPage",7973],"226aeb7c":[()=>n.e(5427).then(n.t.bind(n,1966,19)),"/home/runner/work/memlab/memlab/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",1966],"26eba521":[()=>n.e(6571).then(n.bind(n,7167)),"@site/docs/api/modules/core_src.md",7167],"27652c34":[()=>n.e(8417).then(n.bind(n,7806)),"@site/docs/api/interfaces/core_src.IHeapStringNode.md",7806],"2a2a772b":[()=>n.e(1901).then(n.bind(n,5462)),"@site/docs/cli/CLI-commands.md",5462],"2d8affd8":[()=>n.e(8032).then(n.bind(n,4711)),"@site/docs/api/enums/api_src.ConsoleMode.md",4711],"2ecac66d":[()=>n.e(1797).then(n.bind(n,4236)),"@site/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis.md",4236],"3531de3b":[()=>n.e(9477).then(n.bind(n,205)),"@site/docs/api/interfaces/core_src.IBrowserInfo.md",205],"38ea947a":[()=>n.e(9063).then(n.bind(n,3745)),"@site/src/pages/under-construction.md",3745],"3b8c55ea":[()=>n.e(6803).then(n.bind(n,3414)),"@site/docs/installation.md",3414],"44ba4ae6":[()=>n.e(8796).then(n.bind(n,4976)),"@site/docs/how-memlab-works.md",4976],"4527bbe9":[()=>n.e(2625).then(n.bind(n,5573)),"@site/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis.md",5573],"5a17db6f":[()=>n.e(8807).then(n.bind(n,540)),"@site/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis.md",540],"5b1d4bc5":[()=>n.e(9439).then(n.bind(n,513)),"@site/docs/api/modules/heap_analysis_src.md",513],"5be78946":[()=>n.e(8485).then(n.bind(n,8652)),"@site/docs/api/interfaces/core_src.ILeakFilter.md",8652],"5e82d739":[()=>Promise.all([n.e(1869),n.e(2329),n.e(4612)]).then(n.bind(n,2078)),"@site/docs/guides/01-detached-dom.mdx",2078],"5e8c322a":[()=>n.e(594).then(n.bind(n,4583)),"@site/docs/api/index.md",4583],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"6b5d7254":[()=>n.e(9548).then(n.bind(n,45)),"@site/docs/api/interfaces/core_src.IHeapEdges.md",45],"72eddb53":[()=>n.e(1473).then(n.bind(n,8345)),"@site/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis.md",8345],"8b21a35a":[()=>n.e(6640).then(n.bind(n,1416)),"@site/docs/api/modules/api_src.md",1416],"8ea95162":[()=>Promise.all([n.e(1869),n.e(2329),n.e(3474)]).then(n.bind(n,1208)),"@site/docs/guides/02-detect-oversized-object.mdx",1208],"935f2afb":[()=>n.e(8581).then(n.t.bind(n,5610,19)),"~docs/default/version-current-metadata-prop-751.json",5610],95206942:[()=>n.e(2522).then(n.bind(n,3485)),"@site/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis.md",3485],"95f47cf5":[()=>n.e(7130).then(n.bind(n,6960)),"@site/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis.md",6960],"98c9c166":[()=>n.e(984).then(n.bind(n,2182)),"@site/docs/api/interfaces/core_src.IHeapEdge.md",2182],a3bf9775:[()=>n.e(211).then(n.t.bind(n,7757,19)),"/home/runner/work/memlab/memlab/website/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json",7757],a7a28a68:[()=>n.e(7029).then(n.t.bind(n,4061,19)),"/home/runner/work/memlab/memlab/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",4061],b53f1d78:[()=>n.e(3925).then(n.bind(n,9760)),"@site/docs/api/interfaces/core_src.IHeapLocation.md",9760],c90dd339:[()=>n.e(1456).then(n.bind(n,9511)),"@site/docs/api/interfaces/core_src.IHeapSnapshot.md",9511],d589d3a7:[()=>n.e(7924).then(n.bind(n,380)),"@site/docs/getting-started.md",380],e012388a:[()=>n.e(8953).then(n.bind(n,3938)),"@site/docs/api/interfaces/core_src.IHeapNodes.md",3938],e4c6f3cc:[()=>n.e(9600).then(n.bind(n,9135)),"@site/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis.md",9135],eb14f245:[()=>n.e(2076).then(n.bind(n,6077)),"@site/docs/guides/04-continuous-test.md",6077],f40f92ec:[()=>n.e(346).then(n.bind(n,8857)),"@site/docs/api/classes/api_src.BrowserInteractionResultReader.md",8857],f6f71b0f:[()=>n.e(9901).then(n.bind(n,4369)),"@site/docs/guides/05-integrate-with-E2E-frameworks.md",4369],f8599c11:[()=>n.e(233).then(n.bind(n,4534)),"@site/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis.md",4534],fc5c0a35:[()=>n.e(9539).then(n.bind(n,9319)),"@site/docs/api/interfaces/core_src.IScenario.md",9319]};function c(e){let{error:t,retry:n,pastDelay:a}=e;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var u=n(6921),d=n(3102);function f(e,t){if("*"===e)return i()({loading:c,loader:()=>n.e(1774).then(n.bind(n,1774)),modules:["@theme/NotFound"],webpack:()=>[1774],render(e,t){const n=e.default;return r.createElement(d.W,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});const o=l[`${e}-${t}`],f={},p=[],m=[],h=(0,u.A)(o);return Object.entries(h).forEach((e=>{let[t,n]=e;const r=s[n];r&&(f[t]=r[0],p.push(r[1]),m.push(r[2]))})),i().Map({loading:c,loader:f,modules:p,webpack:()=>m,render(t,n){const i=JSON.parse(JSON.stringify(o));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let o=i;const l=n.split(".");l.slice(0,-1).forEach((e=>{o=o[e]})),o[l[l.length-1]]=a}));const l=i.__comp;delete i.__comp;const s=i.__context;return delete i.__context,r.createElement(d.W,{value:s},r.createElement(l,(0,a.A)({},i,n)))}})}const p=[{path:"/memlab/search",component:f("/memlab/search","9cb"),exact:!0},{path:"/memlab/under-construction",component:f("/memlab/under-construction","92a"),exact:!0},{path:"/memlab/docs",component:f("/memlab/docs","175"),routes:[{path:"/memlab/docs/api/",component:f("/memlab/docs/api/","308"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/api_src.BrowserInteractionResultReader",component:f("/memlab/docs/api/classes/api_src.BrowserInteractionResultReader","433"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/api_src.SnapshotResultReader",component:f("/memlab/docs/api/classes/api_src.SnapshotResultReader","f6c"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.BaseAnalysis","cae"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.CollectionsHoldingStaleAnalysis","2a5"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.DetachedDOMElementAnalysis","18b"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.GlobalVariableAnalysis","0a7"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.ObjectFanoutAnalysis","4bf"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.ObjectShallowAnalysis","d8e"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.ObjectShapeAnalysis","f65"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.ObjectSizeAnalysis","fb4"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.ObjectUnboundGrowthAnalysis","a44"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.ShapeUnboundGrowthAnalysis","283"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/classes/heap_analysis_src.StringAnalysis",component:f("/memlab/docs/api/classes/heap_analysis_src.StringAnalysis","ef6"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/enums/api_src.ConsoleMode",component:f("/memlab/docs/api/enums/api_src.ConsoleMode","9de"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/interfaces/core_src.IBrowserInfo",component:f("/memlab/docs/api/interfaces/core_src.IBrowserInfo","4ba"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/interfaces/core_src.IHeapEdge",component:f("/memlab/docs/api/interfaces/core_src.IHeapEdge","26a"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/interfaces/core_src.IHeapEdges",component:f("/memlab/docs/api/interfaces/core_src.IHeapEdges","d0e"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/interfaces/core_src.IHeapLocation",component:f("/memlab/docs/api/interfaces/core_src.IHeapLocation","0e3"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/interfaces/core_src.IHeapNode",component:f("/memlab/docs/api/interfaces/core_src.IHeapNode","8bb"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/interfaces/core_src.IHeapNodes",component:f("/memlab/docs/api/interfaces/core_src.IHeapNodes","123"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/interfaces/core_src.IHeapSnapshot",component:f("/memlab/docs/api/interfaces/core_src.IHeapSnapshot","c89"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/interfaces/core_src.IHeapStringNode",component:f("/memlab/docs/api/interfaces/core_src.IHeapStringNode","1a5"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/interfaces/core_src.ILeakFilter",component:f("/memlab/docs/api/interfaces/core_src.ILeakFilter","e20"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/interfaces/core_src.IScenario",component:f("/memlab/docs/api/interfaces/core_src.IScenario","b01"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/modules/api_src",component:f("/memlab/docs/api/modules/api_src","e99"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/modules/core_src",component:f("/memlab/docs/api/modules/core_src","7fe"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/api/modules/heap_analysis_src",component:f("/memlab/docs/api/modules/heap_analysis_src","531"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/cli/CLI-commands",component:f("/memlab/docs/cli/CLI-commands","2df"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/getting-started",component:f("/memlab/docs/getting-started","f0e"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/guides/guides-detached-dom",component:f("/memlab/docs/guides/guides-detached-dom","dba"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/guides/guides-detect-oversized-object",component:f("/memlab/docs/guides/guides-detect-oversized-object","507"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/guides/guides-find-leaks",component:f("/memlab/docs/guides/guides-find-leaks","407"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/guides/integrate-with-e2e-frameworks",component:f("/memlab/docs/guides/integrate-with-e2e-frameworks","2c6"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/guides/integration-and-file-structure",component:f("/memlab/docs/guides/integration-and-file-structure","a4b"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/how-memlab-works",component:f("/memlab/docs/how-memlab-works","530"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/installation",component:f("/memlab/docs/installation","d98"),exact:!0,sidebar:"sidebar"},{path:"/memlab/docs/intro",component:f("/memlab/docs/intro","a4c"),exact:!0,sidebar:"sidebar"}]},{path:"/memlab/",component:f("/memlab/","82d"),exact:!0},{path:"*",component:f("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>o});var r=n(6540);const a=r.createContext(!1);function o(e){let{children:t}=e;const[n,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{o(!0)}),[]),r.createElement(a.Provider,{value:n},t)}},5660:(e,t,n)=>{"use strict";var r=n(6540),a=n(961),o=n(4625),i=n(545),l=n(8193);const s=[n(119),n(6134),n(435),n(6294),n(1043),n(1911)];var c=n(8328),u=n(6347),d=n(2831);function f(e){let{children:t}=e;return r.createElement(r.Fragment,null,t)}var p=n(8168),m=n(5260),h=n(4586),g=n(6025),b=n(2131),v=n(6342),y=n(4090),w=n(9024),S=n(2967),E=n(1463);function k(){const{i18n:{defaultLocale:e,localeConfigs:t}}=(0,h.A)(),n=(0,b.o)();return r.createElement(m.A,null,Object.entries(t).map((e=>{let[t,{htmlLang:a}]=e;return r.createElement("link",{key:t,rel:"alternate",href:n.createUrl({locale:t,fullyQualified:!0}),hrefLang:a})})),r.createElement("link",{rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:"x-default"}))}function _(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,h.A)(),a=function(){const{siteConfig:{url:e}}=(0,h.A)(),{pathname:t}=(0,u.zy)();return e+(0,g.A)(t)}(),o=t?`${n}${t}`:a;return r.createElement(m.A,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function O(){const{i18n:{currentLocale:e}}=(0,h.A)(),{metadata:t,image:n}=(0,v.p)();return r.createElement(r.Fragment,null,r.createElement(m.A,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:y.w})),n&&r.createElement(w.be,{image:n}),r.createElement(_,null),r.createElement(k,null),r.createElement(E.A,{tag:S.Cy,locale:e}),r.createElement(m.A,null,t.map(((e,t)=>r.createElement("meta",(0,p.A)({key:t},e))))))}const x=new Map;function A(e){if(x.has(e.pathname))return{...e,pathname:x.get(e.pathname)};if((0,d.u)(c.A,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return x.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return x.set(e.pathname,t),{...e,pathname:t}}var C=n(6125),T=n(6337);function P(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>a.forEach((e=>e?.()))}const I=function(e){let{children:t,location:n,previousLocation:a}=e;return(0,r.useLayoutEffect)((()=>{a!==n&&(a&&function(e){const{hash:t}=e;if(t){const e=decodeURIComponent(t.substring(1)),n=document.getElementById(e);n?.scrollIntoView()}else window.scrollTo(0,0)}(n),P("onRouteDidUpdate",{previousLocation:a,location:n}))}),[a,n]),t};function D(e){const t=(0,d.u)(c.A,e);return Promise.all(t.map((e=>e.route.component.preload?.())))}class N extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=l.A.canUseDOM?P("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=P("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),D(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>console.warn(e))),!1}render(){const{children:e,location:t}=this.props;return r.createElement(I,{previousLocation:this.previousLocation,location:t},r.createElement(u.qh,{location:t,render:()=>e}))}}const R=N,L="docusaurus-base-url-issue-banner-container",j="docusaurus-base-url-issue-banner",M="docusaurus-base-url-issue-banner-suggestion-container",F="__DOCUSAURUS_INSERT_BASEURL_BANNER";function B(e){return`\nwindow['${F}'] = true;\n\ndocument.addEventListener('DOMContentLoaded', maybeInsertBanner);\n\nfunction maybeInsertBanner() {\n var shouldInsert = window['${F}'];\n shouldInsert && insertBanner();\n}\n\nfunction insertBanner() {\n var bannerContainer = document.getElementById('${L}');\n if (!bannerContainer) {\n return;\n }\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{window[F]=!1}),[]),r.createElement(r.Fragment,null,!l.A.canUseDOM&&r.createElement(m.A,null,r.createElement("script",null,B(e))),r.createElement("div",{id:L}))}function z(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,h.A)(),{pathname:n}=(0,u.zy)();return t&&n===e?r.createElement(U,null):null}function q(){const{siteConfig:{favicon:e,title:t},i18n:{currentLocale:n,localeConfigs:a}}=(0,h.A)(),o=(0,g.A)(e),{htmlLang:i,direction:l}=a[n];return r.createElement(m.A,null,r.createElement("html",{lang:i,dir:l}),r.createElement("title",null,t),r.createElement("meta",{property:"og:title",content:t}),e&&r.createElement("link",{rel:"icon",href:o}))}var $=n(7489);function H(){const e=(0,d.v)(c.A),t=(0,u.zy)();return r.createElement($.A,null,r.createElement(T.l,null,r.createElement(C.x,null,r.createElement(f,null,r.createElement(q,null),r.createElement(O,null),r.createElement(z,null),r.createElement(R,{location:A(t)},e)))))}var G=n(4054);const V=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const a=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;a?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var W=n(6921);const K=new Set,Q=new Set,Y=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,X={prefetch(e){if(!(e=>!Y()&&!Q.has(e)&&!K.has(e))(e))return!1;K.add(e);const t=(0,d.u)(c.A,e).flatMap((e=>{return t=e.route.path,Object.entries(G).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,W.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?V(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!Y()&&!Q.has(e))(e)&&(Q.add(e),D(e))},J=Object.freeze(X);if(l.A.canUseDOM){window.docusaurus=J;const e=a.hydrate;D(window.location.pathname).then((()=>{e(r.createElement(i.vd,null,r.createElement(o.Kd,null,r.createElement(H,null))),document.getElementById("__docusaurus"))}))}},6337:(e,t,n)=>{"use strict";n.d(t,{o:()=>u,l:()=>d});var r=n(6540),a=n(4784),o=n(9568);const i=JSON.parse('{"defaultLocale":"en","locales":["en"],"currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"2.0.0-beta.21","siteVersion":"1.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.0.0-beta.21"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"2.0.0-beta.21"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.0.0-beta.21"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.0.0-beta.21"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.0.0-beta.21"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"2.0.0-beta.21"},"docusaurus-plugin-typedoc":{"type":"package","name":"@memlab/memlab-docusaurus-plugin-typedoc","version":"0.17.9"},"docusaurus-plugin-google-gtag":{"type":"package","name":"@docusaurus/plugin-google-gtag","version":"2.0.0-beta.21"}}}'),c={siteConfig:a.default,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},u=r.createContext(c);function d(e){let{children:t}=e;return r.createElement(u.Provider,{value:c},t)}},7489:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(6540),a=n(8193),o=n(5260),i=n(8916);function l(e){let{error:t,tryAgain:n}=e;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"50vh",width:"100%",fontSize:"20px"}},r.createElement("h1",null,"This page crashed."),r.createElement("p",null,t.message),r.createElement("button",{type:"button",onClick:n},"Try again"))}function s(e){let{error:t,tryAgain:n}=e;return r.createElement(u,{fallback:()=>r.createElement(l,{error:t,tryAgain:n})},r.createElement(o.A,null,r.createElement("title",null,"Page Error")),r.createElement(i.A,null,r.createElement(l,{error:t,tryAgain:n})))}const c=e=>r.createElement(s,e);class u extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??c)(e)}return e??null}}},8193:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&!!window.screen}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(545);function o(e){return r.createElement(a.mg,e)}},5489:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(8168),a=n(6540),o=n(4625),i=n(440),l=n(4586),s=n(6654),c=n(8193);const u=a.createContext({collectLink:()=>{}});var d=n(6025);function f(e,t){let{isNavLink:n,to:f,href:p,activeClassName:m,isActive:h,"data-noBrokenLinkCheck":g,autoAddBaseUrl:b=!0,...v}=e;const{siteConfig:{trailingSlash:y,baseUrl:w}}=(0,l.A)(),{withBaseUrl:S}=(0,d.h)(),E=(0,a.useContext)(u),k=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(()=>k.current));const _=f||p;const O=(0,s.A)(_),x=_?.replace("pathname://","");let A=void 0!==x?(C=x,b&&(e=>e.startsWith("/"))(C)?S(C):C):void 0;var C;A&&O&&(A=(0,i.applyTrailingSlash)(A,{trailingSlash:y,baseUrl:w}));const T=(0,a.useRef)(!1),P=n?o.k2:o.N_,I=c.A.canUseIntersectionObserver,D=(0,a.useRef)();(0,a.useEffect)((()=>(!I&&O&&null!=A&&window.docusaurus.prefetch(A),()=>{I&&D.current&&D.current.disconnect()})),[D,A,I,O]);const N=A?.startsWith("#")??!1,R=!A||!O||N;return R||g||E.collectLink(A),R?a.createElement("a",(0,r.A)({ref:k,href:A},_&&!O&&{target:"_blank",rel:"noopener noreferrer"},v)):a.createElement(P,(0,r.A)({},v,{onMouseEnter:()=>{T.current||null==A||(window.docusaurus.preload(A),T.current=!0)},innerRef:e=>{k.current=e,I&&e&&O&&(D.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(D.current.unobserve(e),D.current.disconnect(),null!=A&&window.docusaurus.prefetch(A))}))})),D.current.observe(e))},to:A},n&&{isActive:h,activeClassName:m}))}const p=a.forwardRef(f)},1312:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,T:()=>l});var r=n(6540);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var o=n(2654);function i(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return o[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return a(i({message:n,id:r}),t)}function s(e){let{children:t,id:n,values:o}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const l=i({message:t,id:n});return r.createElement(r.Fragment,null,a(l,o))}},7065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},6654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},6025:(e,t,n)=>{"use strict";n.d(t,{A:()=>i,h:()=>o});var r=n(4586),a=n(6654);function o(){const{siteConfig:{baseUrl:e,url:t}}=(0,r.A)();return{withBaseUrl:(n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:o=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,a.z)(n))return n;if(o)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const l=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+l:l}(t,e,n,r)}}function i(e,t){void 0===t&&(t={});const{withBaseUrl:n}=o();return n(e,t)}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6337);function o(){return(0,r.useContext)(a.o)}},2303:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},6921:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function a(e){const t={};return function e(n,a){Object.entries(n).forEach((n=>{let[o,i]=n;const l=a?`${a}.${o}`:o;r(i)?e(i,l):t[l]=i}))}(e),t}},3102:(e,t,n)=>{"use strict";n.d(t,{W:()=>o,o:()=>a});var r=n(6540);const a=r.createContext(null);function o(e){let{children:t,value:n}=e;const o=r.useContext(a),i=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:o,value:n})),[o,n]);return r.createElement(a.Provider,{value:i},t)}},4070:(e,t,n)=>{"use strict";n.d(t,{zK:()=>b,vT:()=>p,gk:()=>m,Gy:()=>d,HW:()=>v,ht:()=>f,r7:()=>g,jh:()=>h});var r=n(6347),a=n(4586),o=n(7065);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,a.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const l=e=>e.versions.find((e=>e.isLast));function s(e,t){const n=l(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}function c(e,t){const n=s(e,t),a=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const u={},d=()=>i("docusaurus-plugin-content-docs")??u,f=e=>function(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});const r=i(e),a=r?.[t];if(!a&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return a}("docusaurus-plugin-content-docs",e,{failfast:!0});function p(e){void 0===e&&(e={});const t=d(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function m(e){void 0===e&&(e={});const t=p(e),{pathname:n}=(0,r.zy)();if(!t)return;return{activePlugin:t,activeVersion:s(t.pluginData,n)}}function h(e){return f(e).versions}function g(e){const t=f(e);return l(t)}function b(e){const t=f(e),{pathname:n}=(0,r.zy)();return c(t,n)}function v(e){const t=f(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=l(e);return{latestDocSuggestion:c(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},1911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(9568);const{trackingID:a}=r["docusaurus-plugin-google-gtag"].default,o={onRouteDidUpdate(e){let{location:t,previousLocation:n}=e;n&&t.pathname!==n.pathname&&setTimeout((()=>{window.gtag("config",a,{page_path:t.pathname,page_title:document.title}),window.gtag("event","page_view",{page_title:document.title,page_location:window.location.href,page_path:t.pathname})}))}}},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},6134:(e,t,n)=>{"use strict";var r=n(1258),a=n(4784);!function(e){const{themeConfig:{prism:t}}=a.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{n(8692)(`./prism-${e}`)})),delete globalThis.Prism}(r.A)},2523:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const a={iconExternalLink:"iconExternalLink_lCJq"};function o(e){let{width:t=13.5,height:n=13.5}=e;return r.createElement("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:a.iconExternalLink},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},8916:(e,t,n)=>{"use strict";n.d(t,{A:()=>ct});var r=n(6540),a=n(53),o=n(7489),i=n(4090),l=n(9024),s=n(7559),c=n(1312),u=n(6347),d=n(5062);function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}const p={skipToContent:"skipToContent_fXgn"};function m(){const{containerRef:e,handleSkip:t}=function(){const e=(0,r.useRef)(null),{action:t}=(0,u.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.querySelector(`.${s.G.wrapper.main}`);t&&f(t)}),[]);return(0,d.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,handleSkip:n}}();return r.createElement("div",{ref:e,role:"region"},r.createElement("a",{href:"#",className:p.skipToContent,onClick:t},r.createElement(c.A,{id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"},"Skip to main content")))}var h=n(5041),g=n(6342),b=n(8168);function v(e){let{width:t=21,height:n=21,color:a="currentColor",strokeWidth:o=1.2,className:i,...l}=e;return r.createElement("svg",(0,b.A)({viewBox:"0 0 15 15",width:t,height:n},l),r.createElement("g",{stroke:a,strokeWidth:o},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const y={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function w(){const{isActive:e,close:t}=(0,h.Mj)(),{announcementBar:n}=(0,g.p)();if(!e)return null;const{content:o,backgroundColor:i,textColor:l,isCloseable:s}=n;return r.createElement("div",{className:y.announcementBar,style:{backgroundColor:i,color:l},role:"banner"},s&&r.createElement("div",{className:y.announcementBarPlaceholder}),r.createElement("div",{className:y.announcementBarContent,dangerouslySetInnerHTML:{__html:o}}),s?r.createElement("button",{type:"button",className:(0,a.A)("clean-btn close",y.announcementBarClose),onClick:t,"aria-label":(0,c.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},r.createElement(v,{width:14,height:14,strokeWidth:3.1})):null)}var S=n(9876),E=n(3104);var k=n(9532),_=n(5600);const O=r.createContext(null);function x(e){let{children:t}=e;const n=function(){const e=(0,S.M)(),t=(0,_.YL)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,k.ZC)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return r.createElement(O.Provider,{value:n},t)}function A(e){if(e.component){const t=e.component;return r.createElement(t,e.props)}}function C(){const e=(0,r.useContext)(O);if(!e)throw new k.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,_.YL)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:A(o)})),[a,o,t])}function T(e){let{header:t,primaryMenu:n,secondaryMenu:o}=e;const{shown:i}=C();return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var P=n(5293),I=n(2303);function D(e){return r.createElement("svg",(0,b.A)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function N(e){return r.createElement("svg",(0,b.A)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}const R={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function L(e){let{className:t,value:n,onChange:o}=e;const i=(0,I.A)(),l=(0,c.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===n?(0,c.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,c.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,a.A)(R.toggle,t)},r.createElement("button",{className:(0,a.A)("clean-btn",R.toggleButton,!i&&R.toggleButtonDisabled),type:"button",onClick:()=>o("dark"===n?"light":"dark"),disabled:!i,title:l,"aria-label":l},r.createElement(D,{className:(0,a.A)(R.toggleIcon,R.lightToggleIcon)}),r.createElement(N,{className:(0,a.A)(R.toggleIcon,R.darkToggleIcon)})))}const j=r.memo(L);function M(e){let{className:t}=e;const n=(0,g.p)().colorMode.disableSwitch,{colorMode:a,setColorMode:o}=(0,P.G)();return n?null:r.createElement(j,{className:t,value:a,onChange:o})}var F=n(3465);function B(){return r.createElement(F.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function U(){const e=(0,S.M)();return r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle()},r.createElement(v,{color:"var(--ifm-color-emphasis-600)"}))}function z(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(B,null),r.createElement(M,{className:"margin-right--md"}),r.createElement(U,null))}var q=n(5489),$=n(6025),H=n(6654),G=n(1252),V=n(2523);function W(e){let{activeBasePath:t,activeBaseRegex:n,to:a,href:o,label:i,html:l,isDropdownLink:s,prependBaseUrlToHref:c,...u}=e;const d=(0,$.A)(a),f=(0,$.A)(t),p=(0,$.A)(o,{forcePrependBaseUrl:!0}),m=i&&o&&!(0,H.A)(o),h=l?{dangerouslySetInnerHTML:{__html:l}}:{children:r.createElement(r.Fragment,null,i,m&&r.createElement(V.A,s&&{width:12,height:12}))};return o?r.createElement(q.A,(0,b.A)({href:c?p:o},u,h)):r.createElement(q.A,(0,b.A)({to:d,isNavLink:!0},(t||n)&&{isActive:(e,t)=>n?(0,G.G)(n,t.pathname):t.pathname.startsWith(f)},u,h))}function K(e){let{className:t,isDropdownItem:n=!1,...o}=e;const i=r.createElement(W,(0,b.A)({className:(0,a.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n},o));return n?r.createElement("li",null,i):i}function Q(e){let{className:t,isDropdownItem:n,...o}=e;return r.createElement("li",{className:"menu__list-item"},r.createElement(W,(0,b.A)({className:(0,a.A)("menu__link",t)},o)))}function Y(e){let{mobile:t=!1,position:n,...a}=e;const o=t?Q:K;return r.createElement(o,(0,b.A)({},a,{activeClassName:a.activeClassName??(t?"menu__link--active":"navbar__link--active")}))}var X=n(9169),J=n(4586);var Z=n(1422);function ee(e,t){return e.some((e=>function(e,t){return!!(0,X.ys)(e.to,t)||!!(0,G.G)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function te(e){let{items:t,position:n,className:o,onClick:i,...l}=e;const s=(0,r.useRef)(null),[c,u]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&u(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[s]),r.createElement("div",{ref:s,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c})},r.createElement(W,(0,b.A)({"aria-haspopup":"true","aria-expanded":c,role:"button",href:l.to?void 0:"#",className:(0,a.A)("navbar__link",o)},l,{onClick:l.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u(!c))}}),l.children??l.label),r.createElement("ul",{className:"dropdown__menu"},t.map(((e,n)=>r.createElement(_e,(0,b.A)({isDropdownItem:!0,onKeyDown:e=>{if(n===t.length-1&&"Tab"===e.key){e.preventDefault(),u(!1);const t=s.current.nextElementSibling;if(t){(t instanceof HTMLAnchorElement?t:t.querySelector("a")).focus()}}},activeClassName:"dropdown__link--active"},e,{key:n}))))))}function ne(e){let{items:t,className:n,position:o,onClick:i,...l}=e;const s=function(){const{siteConfig:{baseUrl:e}}=(0,J.A)(),{pathname:t}=(0,u.zy)();return t.replace(e,"/")}(),c=ee(t,s),{collapsed:d,toggleCollapsed:f,setCollapsed:p}=(0,Z.u)({initialState:()=>!c});return(0,r.useEffect)((()=>{c&&p(!c)}),[s,c,p]),r.createElement("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":d})},r.createElement(W,(0,b.A)({role:"button",className:(0,a.A)("menu__link menu__link--sublist menu__link--sublist-caret",n)},l,{onClick:e=>{e.preventDefault(),f()}}),l.children??l.label),r.createElement(Z.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:d},t.map(((e,t)=>r.createElement(_e,(0,b.A)({mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active"},e,{key:t}))))))}function re(e){let{mobile:t=!1,...n}=e;const a=t?ne:te;return r.createElement(a,n)}var ae=n(2131);function oe(e){let{width:t=20,height:n=20,...a}=e;return r.createElement("svg",(0,b.A)({viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0},a),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}const ie="iconLanguage_nlXk";var le=n(961),se=n(5260),ce=n(4255),ue=n(3219),de=n(2967);let fe=null;function pe(e){let{hit:t,children:n}=e;return r.createElement(q.A,{to:t.url},n)}function me(e){let{state:t,onClose:n}=e;const{generateSearchPageLink:a}=(0,ce.n)();return r.createElement(q.A,{to:a(t.query),onClick:n},r.createElement(c.A,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits}},"See all {count} results"))}function he(e){let{contextualSearch:t,externalUrlRegex:a,...o}=e;const{siteMetadata:i}=(0,J.A)(),l=function(){const{locale:e,tags:t}=(0,de.af)();return[`language:${e}`,t.map((e=>`docusaurus_tag:${e}`))]}(),s=o.searchParameters?.facetFilters??[],d=t?function(e,t){const n=e=>"string"==typeof e?[e]:e;return[...n(e),...n(t)]}(l,s):s,f={...o.searchParameters,facetFilters:d},{withBaseUrl:p}=(0,$.h)(),m=(0,u.W6)(),h=(0,r.useRef)(null),g=(0,r.useRef)(null),[v,y]=(0,r.useState)(!1),[w,S]=(0,r.useState)(void 0),E=(0,r.useCallback)((()=>fe?Promise.resolve():Promise.all([n.e(8158).then(n.bind(n,8158)),Promise.all([n.e(1869),n.e(8913)]).then(n.bind(n,8913)),Promise.all([n.e(1869),n.e(5049)]).then(n.bind(n,5049))]).then((e=>{let[{DocSearchModal:t}]=e;fe=t}))),[]),k=(0,r.useCallback)((()=>{E().then((()=>{h.current=document.createElement("div"),document.body.insertBefore(h.current,document.body.firstChild),y(!0)}))}),[E,y]),_=(0,r.useCallback)((()=>{y(!1),h.current?.remove()}),[y]),O=(0,r.useCallback)((e=>{E().then((()=>{y(!0),S(e.key)}))}),[E,y,S]),x=(0,r.useRef)({navigate(e){let{itemUrl:t}=e;(0,G.G)(a,t)?window.location.href=t:m.push(t)}}).current,A=(0,r.useRef)((e=>e.map((e=>{if((0,G.G)(a,e.url))return e;const t=new URL(e.url);return{...e,url:p(`${t.pathname}${t.hash}`)}})))).current,C=(0,r.useMemo)((()=>e=>r.createElement(me,(0,b.A)({},e,{onClose:_}))),[_]),T=(0,r.useCallback)((e=>(e.addAlgoliaAgent("docusaurus",i.docusaurusVersion),e)),[i.docusaurusVersion]);(0,ue.E8)({isOpen:v,onOpen:k,onClose:_,onInput:O,searchButtonRef:g});const P=(0,c.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"});return r.createElement(r.Fragment,null,r.createElement(se.A,null,r.createElement("link",{rel:"preconnect",href:`https://${o.appId}-dsn.algolia.net`,crossOrigin:"anonymous"})),r.createElement(ue.Bc,{onTouchStart:E,onFocus:E,onMouseOver:E,onClick:k,ref:g,translations:{buttonText:P,buttonAriaLabel:P}}),v&&fe&&h.current&&(0,le.createPortal)(r.createElement(fe,(0,b.A)({onClose:_,initialScrollY:window.scrollY,initialQuery:w,navigator:x,transformItems:A,hitComponent:pe,transformSearchClient:T},o.searchPagePath&&{resultsFooterComponent:C},o,{searchParameters:f})),h.current))}function ge(){const{siteConfig:e}=(0,J.A)();return r.createElement(he,e.themeConfig.algolia)}const be={searchBox:"searchBox_ZlJk"};function ve(e){let{children:t,className:n}=e;return r.createElement("div",{className:(0,a.A)(n,be.searchBox)},t)}var ye=n(4070),we=n(1754);var Se=n(5597);const Ee=e=>e.docs.find((t=>t.id===e.mainDocId));const ke={default:Y,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:a,...o}=e;const{i18n:{currentLocale:i,locales:l,localeConfigs:s}}=(0,J.A)(),u=(0,ae.o)(),d=[...n,...l.map((e=>{const n=`pathname://${u.createUrl({locale:e,fullyQualified:!1})}`;return{label:s[e].label,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...a],f=t?(0,c.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):s[i].label;return r.createElement(re,(0,b.A)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(oe,{className:ie}),f),items:d}))},search:function(e){let{mobile:t,className:n}=e;return t?null:r.createElement(ve,{className:n},r.createElement(ge,null))},dropdown:re,html:function(e){let{value:t,className:n,mobile:o=!1,isDropdownItem:i=!1}=e;const l=i?"li":"div";return r.createElement(l,{className:(0,a.A)({navbar__item:!o&&!i,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,ye.zK)(a),l=(0,we.QB)(t,a);return null===l?null:r.createElement(Y,(0,b.A)({exact:!0},o,{isActive:()=>i?.path===l.path||!!i?.sidebar&&i.sidebar===l.sidebar,label:n??l.id,to:l.path}))},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,ye.zK)(a),l=(0,we.fW)(t,a).link;if(!l)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return r.createElement(Y,(0,b.A)({exact:!0},o,{isActive:()=>i?.sidebar===t,label:n??l.label,to:l.path}))},docsVersion:function(e){let{label:t,to:n,docsPluginId:a,...o}=e;const i=(0,we.Vd)(a)[0],l=t??i.label,s=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(i).path;return r.createElement(Y,(0,b.A)({},o,{label:l,to:s}))},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:a,dropdownItemsBefore:o,dropdownItemsAfter:i,...l}=e;const s=(0,ye.zK)(n),u=(0,ye.jh)(n),{savePreferredVersionName:d}=(0,Se.g1)(n),f=[...o,...u.map((e=>{const t=s.alternateDocVersions[e.name]??Ee(e);return{label:e.label,to:t.path,isActive:()=>e===s.activeVersion,onClick:()=>d(e.name)}})),...i],p=(0,we.Vd)(n)[0],m=t&&f.length>1?(0,c.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):p.label,h=t&&f.length>1?void 0:Ee(p).path;return f.length<=1?r.createElement(Y,(0,b.A)({},l,{mobile:t,label:m,to:h,isActive:a?()=>!1:void 0})):r.createElement(re,(0,b.A)({},l,{mobile:t,label:m,to:h,items:f,isActive:a?()=>!1:void 0}))}};function _e(e){let{type:t,...n}=e;const a=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=ke[a];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return r.createElement(o,n)}function Oe(){const e=(0,S.M)(),t=(0,g.p)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map(((t,n)=>r.createElement(_e,(0,b.A)({mobile:!0},t,{onClick:()=>e.toggle(),key:n})))))}function xe(e){return r.createElement("button",(0,b.A)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(c.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function Ae(){const e=0===(0,g.p)().navbar.items.length,t=C();return r.createElement(r.Fragment,null,!e&&r.createElement(xe,{onClick:()=>t.hide()}),t.content)}function Ce(){const e=(0,S.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?r.createElement(T,{header:r.createElement(z,null),primaryMenu:r.createElement(Oe,null),secondaryMenu:r.createElement(Ae,null)}):null}const Te={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Pe(e){return r.createElement("div",(0,b.A)({role:"presentation"},e,{className:(0,a.A)("navbar-sidebar__backdrop",e.className)}))}function Ie(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,g.p)(),i=(0,S.M)(),{navbarRef:l,isNavbarVisible:s}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,E.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=l?n(!1):i+c{if(e)return t.location.hash?(a.current=!0,void n(!1)):void n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return r.createElement("nav",{ref:l,className:(0,a.A)("navbar","navbar--fixed-top",n&&[Te.navbarHideable,!s&&Te.navbarHidden],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown})},t,r.createElement(Pe,{onClick:i.toggle}),r.createElement(Ce,null))}const De="right";function Ne(e){let{children:t}=e;return r.createElement(_.y_,null,r.createElement(S.e,null,r.createElement(x,null,t)))}function Re(e){let{width:t=30,height:n=30,className:a,...o}=e;return r.createElement("svg",(0,b.A)({className:a,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true"},o),r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))}function Le(){const e=(0,S.M)();return r.createElement("button",{onClick:e.toggle,onKeyDown:e.toggle,"aria-label":"Navigation bar toggle",className:"navbar__toggle clean-btn",type:"button",tabIndex:0},r.createElement(Re,null))}const je={colorModeToggle:"colorModeToggle_DEke"};function Me(e){let{items:t}=e;return r.createElement(r.Fragment,null,t.map(((e,t)=>r.createElement(_e,(0,b.A)({},e,{key:t})))))}function Fe(e){let{left:t,right:n}=e;return r.createElement("div",{className:"navbar__inner"},r.createElement("div",{className:"navbar__items"},t),r.createElement("div",{className:"navbar__items navbar__items--right"},n))}function Be(){const e=(0,S.M)(),t=(0,g.p)().navbar.items,[n,a]=function(e){function t(e){return"left"===(e.position??De)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return r.createElement(Fe,{left:r.createElement(r.Fragment,null,!e.disabled&&r.createElement(Le,null),r.createElement(B,null),r.createElement(Me,{items:n})),right:r.createElement(r.Fragment,null,r.createElement(Me,{items:a}),r.createElement(M,{className:je.colorModeToggle}),!o&&r.createElement(ve,null,r.createElement(ge,null)))})}function Ue(){return r.createElement(Ie,null,r.createElement(Be,null))}function ze(e){let{item:t}=e;const{to:n,href:a,label:o,prependBaseUrlToHref:i,...l}=t,s=(0,$.A)(n),c=(0,$.A)(a,{forcePrependBaseUrl:!0});return r.createElement(q.A,(0,b.A)({className:"footer__link-item"},a?{href:i?c:a}:{to:s},l),o,a&&!(0,H.A)(a)&&r.createElement(V.A,null))}function qe(e){let{item:t}=e;return t.html?r.createElement("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement("li",{key:t.href??t.to,className:"footer__item"},r.createElement(ze,{item:t}))}function $e(e){let{column:t}=e;return r.createElement("div",{className:"col footer__col"},r.createElement("div",{className:"footer__title"},t.title),r.createElement("ul",{className:"footer__items clean-list"},t.items.map(((e,t)=>r.createElement(qe,{key:t,item:e})))))}function He(e){let{columns:t}=e;return r.createElement("div",{className:"row footer__links"},t.map(((e,t)=>r.createElement($e,{key:t,column:e}))))}function Ge(){return r.createElement("span",{className:"footer__link-separator"},"\xb7")}function Ve(e){let{item:t}=e;return t.html?r.createElement("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement(ze,{item:t})}function We(e){let{links:t}=e;return r.createElement("div",{className:"footer__links text--center"},r.createElement("div",{className:"footer__links"},t.map(((e,n)=>r.createElement(r.Fragment,{key:n},r.createElement(Ve,{item:e}),t.length!==n+1&&r.createElement(Ge,null))))))}function Ke(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?r.createElement(He,{columns:t}):r.createElement(We,{links:t})}var Qe=n(1653);const Ye={footerLogoLink:"footerLogoLink_BH7S"};function Xe(e){let{logo:t}=e;const{withBaseUrl:n}=(0,$.h)(),a={light:n(t.src),dark:n(t.srcDark??t.src)};return r.createElement(Qe.A,{className:"footer__logo",alt:t.alt,sources:a,width:t.width,height:t.height})}function Je(e){let{logo:t}=e;return t.href?r.createElement(q.A,{href:t.href,className:Ye.footerLogoLink},r.createElement(Xe,{logo:t})):r.createElement(Xe,{logo:t})}function Ze(e){let{copyright:t}=e;return r.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function et(e){let{style:t,links:n,logo:o,copyright:i}=e;return r.createElement("footer",{className:(0,a.A)("footer",{"footer--dark":"dark"===t})},r.createElement("div",{className:"container container-fluid"},n,(o||i)&&r.createElement("div",{className:"footer__bottom text--center"},o&&r.createElement("div",{className:"margin-bottom--sm"},o),i)))}function tt(){const{footer:e}=(0,g.p)();if(!e)return null;const{copyright:t,links:n,logo:a,style:o}=e;return r.createElement(et,{style:o,links:n&&n.length>0&&r.createElement(Ke,{links:n}),logo:a&&r.createElement(Je,{logo:a}),copyright:t&&r.createElement(Ze,{copyright:t})})}const nt=r.memo(tt);var rt=n(9466);const at="docusaurus.tab.",ot=r.createContext(void 0);function it(e){let{children:t}=e;const n=function(){const[e,t]=(0,r.useState)({}),n=(0,r.useCallback)(((e,t)=>{(0,rt.W)(`${at}${e}`).set(t)}),[]);(0,r.useEffect)((()=>{try{const e={};(0,rt.E)().forEach((t=>{if(t.startsWith(at)){const n=t.substring(at.length);e[n]=(0,rt.W)(t).get()}})),t(e)}catch(e){console.error(e)}}),[]);const a=(0,r.useCallback)(((e,r)=>{t((t=>({...t,[e]:r}))),n(e,r)}),[n]);return(0,r.useMemo)((()=>({tabGroupChoices:e,setTabGroupChoices:a})),[e,a])}();return r.createElement(ot.Provider,{value:n},t)}function lt(e){let{children:t}=e;return r.createElement(P.a,null,r.createElement(h.oq,null,r.createElement(it,null,r.createElement(E.Tv,null,r.createElement(Se.VQ,null,r.createElement(l.Jx,null,r.createElement(Ne,null,t)))))))}function st(e){let{error:t,tryAgain:n}=e;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(c.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(c.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}function ct(e){const{children:t,noFooter:n,wrapperClassName:c,title:u,description:d}=e;return(0,i.J)(),r.createElement(lt,null,r.createElement(l.be,{title:u,description:d}),r.createElement(m,null),r.createElement(w,null),r.createElement(Ue,null),r.createElement("div",{className:(0,a.A)(s.G.wrapper.main,c)},r.createElement(o.A,{fallback:e=>r.createElement(st,e)},t)),!n&&r.createElement(nt,null))}},3465:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(8168),a=n(6540),o=n(5489),i=n(6025),l=n(4586),s=n(6342),c=n(1653);function u(e){const{siteConfig:{title:t}}=(0,l.A)(),{navbar:{title:n,logo:u={src:""}}}=(0,s.p)(),{imageClassName:d,titleClassName:f,...p}=e,m=(0,i.A)(u.href||"/"),h={light:(0,i.A)(u.src),dark:(0,i.A)(u.srcDark||u.src)},g=a.createElement(c.A,{sources:h,height:u.height,width:u.width,alt:u.alt||n||t});return a.createElement(o.A,(0,r.A)({to:m},p,u.target&&{target:u.target}),u.src&&(d?a.createElement("div",{className:d},g):g),null!=n&&a.createElement("b",{className:f},n))}},1463:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(5260);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return r.createElement(a.A,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},1653:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(8168),a=n(6540),o=n(53),i=n(2303),l=n(5293);const s={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"};function c(e){const t=(0,i.A)(),{colorMode:n}=(0,l.G)(),{sources:c,className:u,alt:d,...f}=e,p=t?"dark"===n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,p.map((e=>a.createElement("img",(0,r.A)({key:e,src:c[e],alt:d,className:(0,o.A)(s.themedImage,s[`themedImage--${e}`],u)},f)))))}},1422:(e,t,n)=>{"use strict";n.d(t,{N:()=>h,u:()=>l});var r=n(8168),a=n(6540),o=n(8193);const i="ease-in-out";function l(e){let{initialState:t}=e;const[n,r]=(0,a.useState)(t??!1),o=(0,a.useCallback)((()=>{r((e=>!e))}),[]);return{collapsed:n,setCollapsed:r,toggleCollapsed:o}}const s={display:"none",overflow:"hidden",height:"0px"},c={display:"block",overflow:"visible",height:"auto"};function u(e,t){const n=t?s:c;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function d(e){let{collapsibleRef:t,collapsed:n,animation:r}=e;const o=(0,a.useRef)(!1);(0,a.useEffect)((()=>{const e=t.current;function a(){const t=e.scrollHeight,n=r?.duration??function(e){const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${r?.easing??i}`,height:`${t}px`}}function l(){const t=a();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return u(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(l(),requestAnimationFrame((()=>{e.style.height=s.height,e.style.overflow=s.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{l()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,r])}function f(e){if(!o.A.canUseDOM)return e?s:c}function p(e){let{as:t="div",collapsed:n,children:r,animation:o,onCollapseTransitionEnd:i,className:l,disableSSRStyle:s}=e;const c=(0,a.useRef)(null);return d({collapsibleRef:c,collapsed:n,animation:o}),a.createElement(t,{ref:c,style:s?void 0:f(n),onTransitionEnd:e=>{"height"===e.propertyName&&(u(c.current,n),i?.(n))},className:l},r)}function m(e){let{collapsed:t,...n}=e;const[o,i]=(0,a.useState)(!t),[l,s]=(0,a.useState)(t);return(0,a.useLayoutEffect)((()=>{t||i(!0)}),[t]),(0,a.useLayoutEffect)((()=>{o&&s(t)}),[o,t]),o?a.createElement(p,(0,r.A)({},n,{collapsed:l})):null}function h(e){let{lazy:t,...n}=e;const r=t?m:p;return a.createElement(r,n)}},5041:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>m,oq:()=>p});var r=n(6540),a=n(2303),o=n(9466),i=n(9532),l=n(6342);const s=(0,o.W)("docusaurus.announcement.dismiss"),c=(0,o.W)("docusaurus.announcement.id"),u=()=>"true"===s.get(),d=e=>s.set(String(e)),f=r.createContext(null);function p(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,l.p)(),t=(0,a.A)(),[n,o]=(0,r.useState)((()=>!!t&&u()));(0,r.useEffect)((()=>{o(u())}),[]);const i=(0,r.useCallback)((()=>{d(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=c.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;c.set(t),r&&d(!1),!r&&u()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return r.createElement(f.Provider,{value:n},t)}function m(){const e=(0,r.useContext)(f);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293:(e,t,n)=>{"use strict";n.d(t,{G:()=>g,a:()=>h});var r=n(6540),a=n(8193),o=n(9532),i=n(9466),l=n(6342);const s=r.createContext(void 0),c="theme",u=(0,i.W)(c),d={light:"light",dark:"dark"},f=e=>e===d.dark?d.dark:d.light,p=e=>a.A.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),m=e=>{u.set(f(e))};function h(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,l.p)(),[a,o]=(0,r.useState)(p(e));(0,r.useEffect)((()=>{t&&u.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(o(t),a&&m(t)):(o(n?window.matchMedia("(prefers-color-scheme: dark)").matches?d.dark:d.light:e),u.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(a))}),[a]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==c)return;const t=u.get();null!==t&&i(f(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const s=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||s.current?s.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:a,setColorMode:i,get isDarkTheme(){return a===d.dark},setLightTheme(){i(d.light)},setDarkTheme(){i(d.dark)}})),[a,i])}();return r.createElement(s.Provider,{value:n},t)}function g(){const e=(0,r.useContext)(s);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},5597:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>g,XK:()=>y,g1:()=>v});var r=n(6540),a=n(4070),o=n(7065),i=n(6342),l=n(1754),s=n(9532),c=n(9466);const u=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,c.W)(u(e),{persistence:t}).set(n)},read:(e,t)=>(0,c.W)(u(e),{persistence:t}).get(),clear:(e,t)=>{(0,c.W)(u(e),{persistence:t}).del()}},f=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const p=r.createContext(null);function m(){const e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,l]=(0,r.useState)((()=>f(n)));(0,r.useEffect)((()=>{l(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),l((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=m();return r.createElement(p.Provider,{value:n},t)}function g(e){let{children:t}=e;return l.C5?r.createElement(h,null,t):t}function b(){const e=(0,r.useContext)(p);if(!e)throw new s.dV("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=o.W);const t=(0,a.ht)(e),[n,i]=b(),{preferredVersionName:l}=n[e];return{preferredVersion:t.versions.find((e=>e.name===l))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}function y(){const e=(0,a.Gy)(),[t]=b();function n(n){const r=e[n],{preferredVersionName:a}=t[n];return r.versions.find((e=>e.name===a))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},6588:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,t:()=>s});var r=n(6540),a=n(9532);const o=Symbol("EmptyContext"),i=r.createContext(o);function l(e){let{children:t,name:n,items:a}=e;const o=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return r.createElement(i.Provider,{value:o},t)}function s(){const e=(0,r.useContext)(i);if(e===o)throw new a.dV("DocsSidebarProvider");return e}},9876:(e,t,n)=>{"use strict";n.d(t,{e:()=>f,M:()=>p});var r=n(6540),a=n(5600),o=n(4581),i=n(6347),l=n(9532);function s(e){!function(e){const{block:t}=(0,i.W6)(),n=(0,l.qd)(e);(0,r.useEffect)((()=>t(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}var c=n(6342);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,a.YL)(),{items:t}=(0,c.p)().navbar;return 0===t.length&&!e.component}(),t=(0,o.l)(),n=!e&&"mobile"===t,[i,l]=(0,r.useState)(!1);s((()=>{if(i)return l(!1),!1}));const u=(0,r.useCallback)((()=>{l((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&l(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:i})),[e,n,u,i])}function f(e){let{children:t}=e;const n=d();return r.createElement(u.Provider,{value:n},t)}function p(){const e=r.useContext(u);if(void 0===e)throw new l.dV("NavbarMobileSidebarProvider");return e}},5600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>s,YL:()=>l,y_:()=>i});var r=n(6540),a=n(9532);const o=r.createContext(null);function i(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function l(){const e=(0,r.useContext)(o);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function s(e){let{component:t,props:n}=e;const i=(0,r.useContext)(o);if(!i)throw new a.dV("NavbarSecondaryMenuContentProvider");const[,l]=i,s=(c=n,(0,r.useMemo)((()=>c),[...Object.keys(c),...Object.values(c)]));var c;return(0,r.useEffect)((()=>{l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((()=>()=>l({component:null,props:null})),[l]),null}},4090:(e,t,n)=>{"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(6540);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},4255:(e,t,n)=>{"use strict";n.d(t,{n:()=>l});var r=n(6540),a=n(6347),o=n(4586);const i="q";function l(){const e=(0,a.W6)(),{siteConfig:{baseUrl:t}}=(0,o.A)(),[n,l]=(0,r.useState)("");(0,r.useEffect)((()=>{const e=new URLSearchParams(window.location.search).get(i)??"";l(e)}),[]);return{searchQuery:n,setSearchQuery:(0,r.useCallback)((t=>{const n=new URLSearchParams(window.location.search);t?n.set(i,t):n.delete(i),e.replace({search:n.toString()}),l(t)}),[e]),generateSearchPageLink:(0,r.useCallback)((e=>`${t}search?${i}=${encodeURIComponent(e)}`),[t])}}},4581:(e,t,n)=>{"use strict";n.d(t,{l:()=>c});var r=n(6540),a=n(8193);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(){return a.A.canUseDOM?window.innerWidth>i?o.desktop:o.mobile:o.ssr}const s=!1;function c(){const[e,t]=(0,r.useState)((()=>s?"ssr":l()));return(0,r.useEffect)((()=>{function e(){t(l())}const n=s?window.setTimeout(e,1e3):void 0;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),clearTimeout(n)}}),[]),e}},7559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block"},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},1754:(e,t,n)=>{"use strict";n.d(t,{_o:()=>f,w8:()=>h,C5:()=>d,mz:()=>w,Vd:()=>b,QB:()=>y,fW:()=>v,OF:()=>g});var r=n(6540),a=n(6347),o=n(2831),i=n(4070),l=n(5597),s=n(6588);function c(e){return Array.from(new Set(e))}var u=n(9169);const d=!!i.Gy;function f(e){if(e.href)return e.href;for(const t of e.items){if("link"===t.type)return t.href;if("category"===t.type){const e=f(t);if(e)return e}}}const p=(e,t)=>void 0!==e&&(0,u.ys)(e,t),m=(e,t)=>e.some((e=>h(e,t)));function h(e,t){return"link"===e.type?p(e.href,t):"category"===e.type&&(p(e.href,t)||m(e.items,t))}function g(){const e=(0,s.t)(),{pathname:t}=(0,a.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;if(!1===n||!e)return null;const r=[];return function e(n){for(const a of n)if("category"===a.type&&((0,u.ys)(a.href,t)||e(a.items))||"link"===a.type&&(0,u.ys)(a.href,t))return r.push(a),!0;return!1}(e.items),r.reverse()}function b(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,l.g1)(e),a=(0,i.r7)(e);return(0,r.useMemo)((()=>c([t,n,a].filter(Boolean))),[t,n,a])}function v(e,t){const n=b(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\n Available sidebar ids are:\n - ${Object.keys(t).join("\n- ")}`);return r[1]}),[e,n])}function y(e,t){const n=b(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`DocNavbarItem: couldn't find any doc with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${c(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function w(e){let{route:t,versionMetadata:n}=e;const r=(0,a.zy)(),i=t.routes,l=i.find((e=>(0,a.B6)(r.pathname,e)));if(!l)return null;const s=l.sidebar,c=s?n.docsSidebars[s]:void 0;return{docElement:(0,o.v)(i,{versionMetadata:n}),sidebarName:s,sidebarItems:c}}},481:(e,t,n)=>{"use strict";n.d(t,{s:()=>a});var r=n(4586);function a(e){const{siteConfig:t}=(0,r.A)(),{title:n,titleDelimiter:a}=t;return e?.trim().length?`${e.trim()} ${a} ${n}`:n}},9024:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>u,Jx:()=>p});var r=n(6540),a=n(53),o=n(5260),i=n(3102);function l(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(6025),c=n(481);function u(e){let{title:t,description:n,keywords:a,image:i,children:l}=e;const u=(0,c.s)(t),{withBaseUrl:d}=(0,s.h)(),f=i?d(i,{absolute:!0}):void 0;return r.createElement(o.A,null,t&&r.createElement("title",null,u),t&&r.createElement("meta",{property:"og:title",content:u}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),a&&r.createElement("meta",{name:"keywords",content:Array.isArray(a)?a.join(","):a}),f&&r.createElement("meta",{property:"og:image",content:f}),f&&r.createElement("meta",{name:"twitter:image",content:f}),l)}const d=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(d),l=(0,a.A)(i,t);return r.createElement(d.Provider,{value:l},r.createElement(o.A,null,r.createElement("html",{className:l})),n)}function p(e){let{children:t}=e;const n=l(),o=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const i=`plugin-id-${n.plugin.id}`;return r.createElement(f,{className:(0,a.A)(o,i)},t)}},9532:(e,t,n)=>{"use strict";n.d(t,{ZC:()=>i,dV:()=>l,qd:()=>o});var r=n(6540);const a=n(8193).A.canUseDOM?r.useLayoutEffect:r.useEffect;function o(e){const t=(0,r.useRef)(e);return a((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function i(e){const t=(0,r.useRef)();return a((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}},1252:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{G:()=>r})},9169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(6540),a=n(8328),o=n(4586);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function l(){const{baseUrl:e}=(0,o.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>e.routes??[])))}(n)}({routes:a.A,baseUrl:e})),[e])}},3104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>d,Tv:()=>s,gk:()=>f});var r=n(6540),a=n(8193),o=n(2303),i=n(9532);const l=r.createContext(void 0);function s(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return r.createElement(l.Provider,{value:n},t)}function c(){const e=(0,r.useContext)(l);if(null==e)throw new i.dV("ScrollControllerProvider");return e}const u=()=>a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function d(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=c(),a=(0,r.useRef)(u()),o=(0,i.qd)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=u();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function f(){const e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&at&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},2967:(e,t,n)=>{"use strict";n.d(t,{Cy:()=>i,af:()=>s,tU:()=>l});var r=n(4070),a=n(4586),o=n(5597);const i="default";function l(e,t){return`docs-${e}-${t}`}function s(){const{i18n:e}=(0,a.A)(),t=(0,r.Gy)(),n=(0,r.gk)(),s=(0,o.XK)();const c=[i,...Object.keys(t).map((function(e){const r=n?.activePlugin.pluginId===e?n.activeVersion:void 0,a=s[e],o=t[e].versions.find((e=>e.isLast));return l(e,(r??a??o).name)}))];return{locale:e.currentLocale,tags:c}}},9466:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,W:()=>l});const r="localStorage";function a(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,o||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),o=!0),null}var t}let o=!1;const i={get:()=>null,set:()=>{},del:()=>{}};function l(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t}}(e);const n=a(t?.persistence);return null===n?i:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{n.setItem(e,t)}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{n.removeItem(e)}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}}}}function s(e){void 0===e&&(e=r);const t=a(e);if(!t)return[];const n=[];for(let r=0;r{"use strict";n.d(t,{o:()=>o});var r=n(4586),a=n(6347);function o(){const{siteConfig:{baseUrl:e,url:t},i18n:{defaultLocale:n,currentLocale:o}}=(0,r.A)(),{pathname:i}=(0,a.zy)(),l=o===n?e:e.replace(`/${o}/`,"/"),s=i.replace(e,"");return{createUrl:function(e){let{locale:r,fullyQualified:a}=e;return`${a?t:""}${function(e){return e===n?`${l}`:`${l}${e}/`}(r)}${s}`}}}},5062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6540),a=n(6347),o=n(9532);function i(e){const t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o.qd)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(4586);function a(){return(0,r.A)().siteConfig.themeConfig}},2983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[a]=e.split(/[#?]/),o="/"===a||a===r?a:(i=a,n?function(e){return e.endsWith("/")?e:`${e}/`}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(a,o)}},440:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="post-content";var a=n(2983);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}})},53:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ta});const a=function(){for(var e,t,n=0,a="";n{"use strict";n.d(t,{zR:()=>w,TM:()=>x,yJ:()=>p,sC:()=>C,AO:()=>f});var r=n(8168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(1561);function s(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=p(e,t,h(),w.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(4363),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var l=s(t),h=s(n),g=0;g{"use strict";e.exports=function(e,t,n,r,a,o,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,o,i,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},435:(e,t,n)=>{"use strict";n.r(t)},119:(e,t,n)=>{"use strict";n.r(t)},1043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),c=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(c,i(e,u,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){s(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function c(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=f(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},5228:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,a){for(var o,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s{"use strict";n.d(t,{A:()=>o});var r=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);k+=E.value.length,E=E.next){var _=E.value;if(t.length>e.length)return;if(!(_ instanceof a)){var O,x=1;if(v){if(!(O=o(S,k,e,b))||O.index>=e.length)break;var A=O.index,C=O.index+O[0].length,T=k;for(T+=E.value.length;A>=T;)T+=(E=E.next).value.length;if(k=T-=E.value.length,E.value instanceof a)continue;for(var P=E;P!==t.tail&&(Td.reach&&(d.reach=R);var L=E.prev;if(D&&(L=s(t,L,D),k+=D.length),c(t,L,x),E=s(t,L,new a(f,g?r.tokenize(I,g):I,y,I)),N&&s(t,E,N),x>1){var j={cause:f+","+m,reach:R};i(e,t,n,E.prev,k,j),d&&j.reach>d.reach&&(d.reach=j.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}(),a=r;r.default=r,a.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),a.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),a.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},a.languages.c.string],char:a.languages.c.char,comment:a.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:a.languages.c}}}}),a.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete a.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(a),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(a),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:a.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),a.languages.js=a.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(a),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(a),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(a),a.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:a.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},a.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var l=f(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s=0&&p(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function c(t){var n={};n["interpolation-punctuation"]=a;var o=e.tokenize(t,n);if(3===o.length){var i=[1,1];i.push.apply(i,s(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,i)}return new e.Token("interpolation",o,r.alias,t)}function u(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),i=0,u={},d=s(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=l(i++,r)););return u[n]=a,n})).join(""),n,r),f=Object.keys(u);return i=0,function e(t){for(var n=0;n=f.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=f[i],o="string"==typeof r?r:r.content,l=o.indexOf(a);if(-1!==l){++i;var s=o.substring(0,l),d=c(u[a]),p=o.substring(l+a.length),m=[];if(s&&m.push(s),m.push(d),p){var h=[p];e(h),m.push.apply(m,h)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var g=r.content;Array.isArray(g)?e(g):e([g])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(a),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return a})),RegExp(e,t)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(a);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}a.content&&"string"!=typeof a.content&&l(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(a),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(a),a.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},a.languages.go=a.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),a.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete a.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=o.length);s++){var c=l[s];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=o[a],d=n.tokenStack[u],f="string"==typeof c?c:c.content,p=t(r,u),m=f.indexOf(p);if(m>-1){++a;var h=f.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=f.substring(m+p.length),v=[];h&&v.push.apply(v,i([h])),v.push(g),b&&v.push.apply(v,i([b])),"string"==typeof c?l.splice.apply(l,[s,1].concat(v)):c.content=v}}else c.content&&i(c.content)}return l}(n.tokens)}}}})}(a),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(a),a.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},a.languages.webmanifest=a.languages.json,a.languages.less=a.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),a.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),a.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},a.languages.objectivec=a.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete a.languages.objectivec["class-name"],a.languages.objc=a.languages.objectivec,a.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,a.languages.reason=a.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),a.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete a.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(a),a.languages.scss=a.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),a.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),a.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),a.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),a.languages.scss.atrule.inside.rest=a.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(a),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(a),a.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const o=a},6969:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},8722:(e,t,n)=>{const r=n(6969),a=n(8380),o=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...o,...Object.keys(Prism.languages)];a(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(3157).resolve(t)],delete Prism.languages[e],n(3157)(t),o.add(e)}))}i.silent=!1,e.exports=i},8692:(e,t,n)=>{var r={"./":8722};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=8692},3157:(e,t,n)=>{var r={"./":8722};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=3157},8380:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var l={},s=e[r];if(s){function c(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in l))for(var i in a(t,o),l[t]=!0,n[t])l[i]=!0}t(s.require,c),t(s.optional,c),t(s.modify,c)}n[r]=l,o.pop()}}return function(e){var t=n[e];return t||(a(e,r),t=n[e]),t}}function a(e){for(var t in e)return!0;return!1}return function(o,i,l){var s=function(e){var t={};for(var n in e){var r=e[n];for(var a in r)if("meta"!=a){var o=r[a];t[a]="string"==typeof o?{title:o}:o}}return t}(o),c=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var a in n={},e){var o=e[a];t(o&&o.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+a+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+a+" because it is a component.");n[t]=a}))}return n[r]||r}}(s);i=i.map(c),l=(l||[]).map(c);var u=n(i),d=n(l);i.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(u[t]=!0,e(t))}))}));for(var f,p=r(s),m=u;a(m);){for(var h in f={},m){var g=s[h];t(g&&g.modify,(function(e){e in d&&(f[e]=!0)}))}for(var b in d)if(!(b in u))for(var v in p(b))if(v in u){f[b]=!0;break}for(var y in m=f)u[y]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,a){var o=a?a.series:void 0,i=a?a.parallel:e,l={},s={};function c(e){if(e in l)return l[e];s[e]=!0;var a,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)a=r(e);else{var f=i(u.map((function(e){var t=c(e);return delete s[e],t})));o?a=o(f,(function(){return r(e)})):r(e)}return l[e]=a}for(var u in n)c(u);var d=[];for(var f in s)d.push(l[f]);return i(d)}(p,u,t,n)}};return w}}();e.exports=t},2694:(e,t,n)=>{"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),a=n(5228),o=n(9982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n