From 898d88222d9f80f8680b7358045535cc5bcccf3b Mon Sep 17 00:00:00 2001 From: Okiki Date: Wed, 28 Apr 2021 01:44:06 +0000 Subject: [PATCH] feat: add support for esbuild and gzip, WIP use WebComponents for UI --- docs/404.html | 2 +- docs/css/app.css | 928 +++++++++++++++++++++++++++++++- docs/css/components/navbar.css | 2 +- docs/index.html | 2 +- docs/js/esbuild.js | 796 +++++++++++++++++++++++++++ docs/js/esbuild.js.map | 7 + docs/js/legacy.min.js | 2 +- docs/js/modern.min.js | 3 +- docs/js/modern.min.js.map | 7 + gulpfile.js | 27 +- package.json | 20 +- pnpm-lock.yaml | 635 +++++++++++++++++++++- repl.js | 4 + shims/node-shim.js | 3 + shims/process.js | 253 +++++++++ src/pug/layouts/layout.pug | 2 +- src/ts/main.ts | 17 +- src/ts/modules/esbuild.ts | 97 +++- src/ts/plugins/bare.ts | 22 + src/ts/plugins/cdn.ts | 31 ++ src/ts/plugins/entry.ts | 18 + src/ts/plugins/external.ts | 25 + src/ts/plugins/http.ts | 50 ++ src/ts/plugins/node-polyfill.ts | 33 ++ src/ts/plugins/virtual-fs.ts | 50 ++ 25 files changed, 2976 insertions(+), 60 deletions(-) create mode 100644 docs/js/esbuild.js create mode 100644 docs/js/esbuild.js.map create mode 100644 docs/js/modern.min.js.map create mode 100644 repl.js create mode 100644 shims/node-shim.js create mode 100644 shims/process.js create mode 100644 src/ts/plugins/bare.ts create mode 100644 src/ts/plugins/cdn.ts create mode 100644 src/ts/plugins/entry.ts create mode 100644 src/ts/plugins/external.ts create mode 100644 src/ts/plugins/http.ts create mode 100644 src/ts/plugins/node-polyfill.ts create mode 100644 src/ts/plugins/virtual-fs.ts diff --git a/docs/404.html b/docs/404.html index 8d8c2aaa..08f3243c 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1 +1 @@ -404 Page

404 Page

You might be lost, wanna go back home?

\ No newline at end of file +404 Page

404 Page

You might be lost, wanna go back home?

\ No newline at end of file diff --git a/docs/css/app.css b/docs/css/app.css index bf9e82a3..06ca8462 100644 --- a/docs/css/app.css +++ b/docs/css/app.css @@ -1,3 +1,925 @@ -/*! tailwindcss v2.1.2 | MIT License | https://tailwindcss.com */ -/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ -:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body,html{line-height:1.5}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}body{margin:0;font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji';transition:color .2s ease-out,background-color .2s ease-out;--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity));font-family:Manrope,Century Gothic,sans-serif;font-size:1rem}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder, textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder, textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a,a:hover{--tw-text-opacity:1}a{color:inherit;color:rgba(59,130,246,var(--tw-text-opacity));text-decoration:none}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*{--tw-shadow:0 0 #0000;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59, 130, 246, 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.container{width:100%;margin-right:auto;margin-left:auto}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-2{margin-bottom:.5rem}.block{display:block}.inline-block{display:inline-block}.self-center{align-self:center}.rounded-md{border-radius:.375rem}.bg-gray-200,.dark body,.theme-toggle:hover{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.px-12{padding-left:3rem;padding-right:3rem}.py-24{padding-top:6rem;padding-bottom:6rem}.px-4{padding-left:1rem;padding-right:1rem}.text-5xl{font-size:3rem;line-height:1}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-light{font-weight:300}.font-semibold{font-weight:600}.font-bold{font-weight:700}.uppercase{text-transform:uppercase}.dark body{background-color:rgba(0,0,0,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(221,221,221,var(--tw-text-opacity))}.no-overflow-x{overflow-x:hidden}.icon{font-feature-settings:"liga","dlig";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-family:"Material Icons Round","Material Icons";vertical-align:middle;letter-spacing:normal;display:inline-block;text-decoration:none;text-transform:none;white-space:nowrap;font-weight:400;position:relative;font-style:normal;word-wrap:normal;font-size:24px;line-height:1;direction:ltr;height:1em;width:1em}a:hover{color:rgba(29,78,216,var(--tw-text-opacity))}.dark a,.dark a:hover{--tw-text-opacity:1;color:rgba(96,165,250,var(--tw-text-opacity))}.dark a:hover{color:rgba(191,219,254,var(--tw-text-opacity))}a,button{transition:color .2s ease-out,box-shadow .2s ease-out;-webkit-tap-highlight-color:transparent}a:focus-visible,button:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(59, 130, 246, var(--tw-ring-opacity));--tw-ring-opacity:0.5}a:focus,button:focus{border-radius:.125rem;outline:2px solid transparent;outline-offset:2px}@media (min-width:640px){.desktop{display:block}.mobile{display:none}}@media (max-width:639px){.mobile{display:block}.desktop{display:none}}.dark .theme-toggle,.theme-toggle{--tw-bg-opacity:1;--tw-text-opacity:1}.theme-toggle{border-radius:.375rem;height:2.5rem;width:2.5rem;background-color:rgba(243,244,246,var(--tw-bg-opacity));color:rgba(59,130,246,var(--tw-text-opacity))}.dark .theme-toggle{background-color:rgba(51,51,51,var(--tw-bg-opacity));color:rgba(96,165,250,var(--tw-text-opacity))}.dark .theme-toggle:hover{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.dark .theme-toggle:active{--tw-bg-opacity:1;background-color:rgba(55,65,81,var(--tw-bg-opacity))}.theme-toggle:focus{border-radius:.375rem}.theme-toggle:focus-visible{--tw-border-opacity:1;border-color:rgba(37,99,235,var(--tw-border-opacity));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.btn{border-radius:.375rem;padding:.5rem .75rem;text-decoration:none}.btn:hover{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.dark .btn{--tw-text-opacity:1;color:rgba(96,165,250,var(--tw-text-opacity))}.btn.active,.dark .btn:hover{--tw-bg-opacity:1;background-color:rgba(51,51,51,var(--tw-bg-opacity))}.btn.active{background-color:rgba(37,99,235,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.btn.active:hover{--tw-bg-opacity:1;background-color:rgba(29,78,216,var(--tw-bg-opacity))}.dark .btn.active{--tw-bg-opacity:1;background-color:rgba(96,165,250,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.dark .btn.active:hover,.search{--tw-bg-opacity:1;background-color:rgba(59,130,246,var(--tw-bg-opacity))}.btn:hover{--tw-bg-opacity:0.6}main .container{padding:.5rem 1.25rem}@media (min-width:640px){main .container{max-width:768px}}main header{padding-top:5rem;padding-bottom:5rem;text-align:center}main header h1{margin-bottom:.5rem;font-size:3rem;line-height:1;font-weight:700}main header p{font-size:1.125rem;line-height:1.75rem;font-weight:500}.search{transition:background-color ease .25s,box-shadow .2s ease-out;border-radius:.5rem;background-color:rgba(229,231,235,var(--tw-bg-opacity));display:flex;align-items:center;padding-left:1rem;padding-right:1rem}.search:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(59, 130, 246, var(--tw-ring-opacity));--tw-ring-opacity:0.5}.dark .search{--tw-bg-opacity:1;background-color:rgba(51,51,51,var(--tw-bg-opacity))}.search input#search-input{margin-left:.5rem;width:100%;background-color:transparent;padding:.5rem;vertical-align:middle;-webkit-tap-highlight-color:transparent}.search input#search-input:focus{outline:2px solid transparent;outline-offset:2px}.card,.dark .card{--tw-border-opacity:1}.card{transition:border-color ease .25s;border-width:1px;border-color:rgba(229,231,235,var(--tw-border-opacity));display:grid;gap:1.5rem}.dark .card{border-color:rgba(51,51,51,var(--tw-border-opacity))}@media (min-width:640px){.card{grid-template-columns:repeat(12,minmax(0,1fr))}}.card{margin-top:1.25rem;margin-bottom:1.25rem;border-radius:.5rem;padding:1.25rem}.card section{grid-column:span 12/span 12}@media (min-width:640px){.card section.content{grid-column:span 9/span 9}}.card section .updated-time,footer.footer{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.card section .updated-time{margin-top:.5rem}.card section.file-size{display:flex}@media (min-width:640px){.card section.file-size{grid-column:span 3/span 3;text-align:center}}footer.footer{transition:color ease .25s,background-color ease .25s;text-align:right}.dark footer.footer{--tw-text-opacity:1;color:rgba(187,187,187,var(--tw-text-opacity))}footer.footer .container{padding:1.25rem;vertical-align:middle}@media (min-width:640px){footer.footer .container{max-width:768px}}.navbar{position:fixed;top:0;left:0;z-index:50;width:100%}@supports ((-webkit-backdrop-filter: blur(5px)) or (backdrop-filter: blur(5px))){.navbar{--tw-backdrop-blur:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-invert:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-opacity:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-sepia:var(--tw-empty,/*!*/ /*!*/);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);--tw-backdrop-blur:blur(8px)}.dark .navbar{--tw-backdrop-blur:blur(12px)}}.navbar .container{position:relative;height:100%;padding-left:1.25rem;padding-right:1.25rem}@media (min-width:640px){.navbar .container{max-width:1024px}}.navbar .navbar-bg{transition:background-color ease .25s;position:absolute;top:0;left:0;height:100%;width:100%;padding-left:1.25rem;padding-right:1.25rem;--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.dark .navbar .navbar-bg{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.dark .navbar.shadow .navbar-bg{--tw-bg-opacity:1;background-color:rgba(28,28,30,var(--tw-bg-opacity))}@supports ((-webkit-backdrop-filter: blur(5px)) or (backdrop-filter: blur(5px))){.dark .navbar .navbar-bg,.dark .navbar.shadow .navbar-bg{--tw-bg-opacity:0.6}}.navbar .navbar-frame{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;width:100%;padding-top:.5rem;padding-bottom:.5rem}.navbar .navbar-border,.navbar .navbar-shadow{position:absolute;top:0;left:0;height:100%;width:100%}.navbar .navbar-shadow{transition:opacity ease .25s;box-shadow:0 4px 15px rgba(0,0,50,.08);opacity:0}.navbar.shadow .navbar-shadow{opacity:1}.navbar .navbar-border{transition:border-color ease .25s;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.dark .navbar .navbar-border{--tw-border-opacity:1;border-color:rgba(28,28,30,var(--tw-border-opacity))}.navbar.shadow .navbar-border{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.dark .navbar.shadow .navbar-border{--tw-border-opacity:1;border-color:rgba(85,85,85,var(--tw-border-opacity))}.navbar-offset{margin-top:4rem}.dark .navbar-logo:hover{--tw-text-opacity:1;color:rgba(59,130,246,var(--tw-text-opacity));--tw-bg-opacity:1;background-color:rgba(51,51,51,var(--tw-bg-opacity))}.navbar-logo{font-size:1.25rem;line-height:1.75rem;font-weight:700;text-decoration:none;border-radius:.375rem;padding:.5rem .75rem}.navbar-logo:hover{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.dark .navbar-logo{--tw-text-opacity:1;color:rgba(96,165,250,var(--tw-text-opacity))}.navbar-logo.active{--tw-bg-opacity:1;background-color:rgba(37,99,235,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.navbar-logo.active:hover{--tw-bg-opacity:1;background-color:rgba(29,78,216,var(--tw-bg-opacity))}.dark .navbar-logo.active{--tw-bg-opacity:1;background-color:rgba(96,165,250,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.dark .navbar-logo.active:hover{--tw-bg-opacity:1;background-color:rgba(59,130,246,var(--tw-bg-opacity))}.navbar-logo:hover{--tw-bg-opacity:0.6}.navbar-logo,.theme-toggle{transition:border-color .25s ease-out,box-shadow .25s ease-out}@media (min-width:640px){.navbar-logo,.theme-toggle{transition:background-color .25s ease-out,color .25s ease-out,border-color .25s ease-out,box-shadow .25s ease-out}}.dark .dark\:bg-quaternary{--tw-bg-opacity:1;background-color:rgba(51,51,51,var(--tw-bg-opacity))}@media (min-width:640px){.sm\:max-w-screen-lg{max-width:1024px}} \ No newline at end of file +/*! tailwindcss v2.1.2 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ + +/* +Document +======== +*/ + +/** +Use a better box model (opinionated). +*/ + +*, +*::before, +*::after { + box-sizing: border-box; +} + +/** +Use a more readable tab size (opinionated). +*/ + +:root { + -moz-tab-size: 4; + tab-size: 4; +} + +/** +1. Correct the line height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +*/ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* +Sections +======== +*/ + +/** +Remove the margin in all browsers. +*/ + +body { + margin: 0; +} + +/** +Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) +*/ + +body { + font-family: + system-ui, + -apple-system, /* Firefox supports this but not yet `system-ui` */ + 'Segoe UI', + Roboto, + Helvetica, + Arial, + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji'; +} + +/* +Grouping content +================ +*/ + +/** +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +*/ + +hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ +} + +/* +Text-level semantics +==================== +*/ + +/** +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr[title] { + text-decoration: underline dotted; +} + +/** +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/** +1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) +2. Correct the odd 'em' font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: + ui-monospace, + SFMono-Regular, + Consolas, + 'Liberation Mono', + Menlo, + monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/** +Prevent 'sub' and 'sup' elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +Tabular data +============ +*/ + +/** +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +*/ + +table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ +} + +/* +Forms +===== +*/ + +/** +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** +Remove the inheritance of text transform in Edge and Firefox. +1. Remove the inheritance of text transform in Firefox. +*/ + +button, +select { /* 1 */ + text-transform: none; +} + +/** +Correct the inability to style clickable types in iOS and Safari. +*/ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; +} + +/** +Remove the inner border and padding in Firefox. +*/ + +::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** +Restore the focus styles unset by the previous rule. +*/ + +:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** +Remove the additional ':invalid' styles in Firefox. +See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737 +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/** +Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers. +*/ + +legend { + padding: 0; +} + +/** +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/** +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/** +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to 'inherit' in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* +Interactive +=========== +*/ + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +}/** + * Manually forked from SUIT CSS Base: https://github.com/suitcss/base + * A thin layer on top of normalize.css that provides a starting point more + * suitable for web applications. + */ + +/** + * Removes the default spacing and border for appropriate elements. + */ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +button { + background-color: transparent; + background-image: none; +} + +/** + * Work around a Firefox/IE bug where the transparent `button` background + * results in a loss of the default `button` focus styles. + */ + +button:focus { + outline: 1px dotted; + outline: 5px auto -webkit-focus-ring-color; +} + +fieldset { + margin: 0; + padding: 0; +} + +ol, +ul { + list-style: none; + margin: 0; + padding: 0; +} + +/** + * Tailwind custom reset styles + */ + +/** + * 1. Use the user's configured `sans` font-family (with Tailwind's default + * sans-serif font stack as a fallback) as a sane default. + * 2. Use Tailwind's default "normal" line-height so the user isn't forced + * to override it to ensure consistency even when using the default theme. + */ + +html { + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 1 */ + line-height: 1.5; /* 2 */ +} + + +/** + * Inherit font-family and line-height from `html` so users can set them as + * a class directly on the `html` element. + */ + +body { + font-family: inherit; + line-height: inherit; +} + +/** + * 1. Prevent padding and border from affecting element width. + * + * We used to set this in the html element and inherit from + * the parent element for everything else. This caused issues + * in shadow-dom-enhanced elements like
where the content + * is wrapped by a div with box-sizing set to `content-box`. + * + * https://github.com/mozdevs/cssremedy/issues/4 + * + * + * 2. Allow adding a border to an element by just adding a border-width. + * + * By default, the way the browser specifies that an element should have no + * border is by setting it's border-style to `none` in the user-agent + * stylesheet. + * + * In order to easily add borders to elements by just setting the `border-width` + * property, we change the default border-style for all elements to `solid`, and + * use border-width to hide them instead. This way our `border` utilities only + * need to set the `border-width` property instead of the entire `border` + * shorthand, making our border utilities much more straightforward to compose. + * + * https://github.com/tailwindcss/tailwindcss/pull/116 + */ + +*, +::before, +::after { + box-sizing: border-box; /* 1 */ + border-width: 0; /* 2 */ + border-style: solid; /* 2 */ + border-color: #e5e7eb; /* 2 */ +} + +/* + * Ensure horizontal rules are visible by default + */ + +hr { + border-top-width: 1px; +} + +/** + * Undo the `border-style: none` reset that Normalize applies to images so that + * our `border-{width}` utilities have the expected effect. + * + * The Normalize reset is unnecessary for us since we default the border-width + * to 0 on all elements. + * + * https://github.com/tailwindcss/tailwindcss/issues/362 + */ + +img { + border-style: solid; +} + +textarea { + resize: vertical; +} + +input::placeholder, +textarea::placeholder { + opacity: 1; + color: #9ca3af; +} + +button, +[role="button"] { + cursor: pointer; +} + +table { + border-collapse: collapse; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/** + * Reset links to optimize for opt-in styling instead of + * opt-out. + */ + +a { + color: inherit; + text-decoration: inherit; +} + +/** + * Reset form element properties that are easy to forget to + * style explicitly so you don't inadvertently introduce + * styles that deviate from your design system. These styles + * supplement a partial reset that is already applied by + * normalize.css. + */ + +button, +input, +optgroup, +select, +textarea { + padding: 0; + line-height: inherit; + color: inherit; +} + +/** + * Use the configured 'mono' font family for elements that + * are expected to be rendered with a monospace font, falling + * back to the system monospace stack if there is no configured + * 'mono' font family. + */ + +pre, +code, +kbd, +samp { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; +} + +/** + * Make replaced elements `display: block` by default as that's + * the behavior you want almost all of the time. Inspired by + * CSS Remedy, with `svg` added as well. + * + * https://github.com/mozdevs/cssremedy/issues/14 + */ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; + vertical-align: middle; +} + +/** + * Constrain images and videos to the parent width and preserve + * their intrinsic aspect ratio. + * + * https://github.com/mozdevs/cssremedy/issues/14 + */ + +img, +video { + max-width: 100%; + height: auto; +} + +* { + --tw-shadow: 0 0 #0000; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgba(59, 130, 246, 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; +}.container { + width: 100%; + margin-right: auto; + margin-left: auto; +}@media (min-width: 640px) { + + .container { + max-width: 640px; + } +}@media (min-width: 768px) { + + .container { + max-width: 768px; + } +}@media (min-width: 1024px) { + + .container { + max-width: 1024px; + } +}@media (min-width: 1280px) { + + .container { + max-width: 1280px; + } +}@media (min-width: 1536px) { + + .container { + max-width: 1536px; + } +}.my-5 { + margin-top: 1.25rem; + margin-bottom: 1.25rem; +}.mb-2 { + margin-bottom: 0.5rem; +}.block { + display: block; +}.inline-block { + display: inline-block; +}.self-center { + align-self: center; +}.rounded-md { + border-radius: 0.375rem; +}.bg-gray-200 { + --tw-bg-opacity: 1; + background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); +}.px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +}.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +}.px-12 { + padding-left: 3rem; + padding-right: 3rem; +}.py-24 { + padding-top: 6rem; + padding-bottom: 6rem; +}.px-4 { + padding-left: 1rem; + padding-right: 1rem; +}.text-5xl { + font-size: 3rem; + line-height: 1; +}.text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +}.font-light { + font-weight: 300; +}.font-semibold { + font-weight: 600; +}.font-bold { + font-weight: 700; +}.uppercase { + text-transform: uppercase; +}body{transition:color .2s ease-out,background-color .2s ease-out;--tw-bg-opacity: 1;background-color: rgba(255, 255, 255, var(--tw-bg-opacity));--tw-text-opacity: 1;color: rgba(0, 0, 0, var(--tw-text-opacity))}.dark body { + --tw-bg-opacity: 1; + background-color: rgba(0, 0, 0, var(--tw-bg-opacity)); + --tw-text-opacity: 1; + color: rgba(221, 221, 221, var(--tw-text-opacity)); +}body { + font-family: Manrope, Century Gothic, sans-serif;font-size:1rem;line-height:1.5; +}.no-overflow-x{overflow-x:hidden}.icon{-webkit-font-feature-settings:"liga" off,"dlig";-moz-font-feature-settings:"liga=0, dlig=1";font-feature-settings:"liga","dlig";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-family:"Material Icons Round","Material Icons";vertical-align:middle;letter-spacing:normal;display:inline-block;text-decoration:none;text-transform:none;white-space:nowrap;font-weight:normal;position:relative;font-style:normal;word-wrap:normal;font-size:24px;line-height:1;direction:ltr;height:1em;width:1em}a { + --tw-text-opacity: 1; + color: rgba(59, 130, 246, var(--tw-text-opacity)); + text-decoration: none; +}a:hover { + --tw-text-opacity: 1; + color: rgba(29, 78, 216, var(--tw-text-opacity)); +}.dark a { + --tw-text-opacity: 1; + color: rgba(96, 165, 250, var(--tw-text-opacity)); +}.dark a:hover { + --tw-text-opacity: 1; + color: rgba(191, 219, 254, var(--tw-text-opacity)); +}button,a{transition:color .2s ease-out,box-shadow .2s ease-out}button:focus-visible, a:focus-visible { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); + --tw-ring-opacity: 1; + --tw-ring-color: rgba(59, 130, 246, var(--tw-ring-opacity)); + --tw-ring-opacity: 0.5; +}button:focus, a:focus { + border-radius: 0.125rem; + outline: 2px solid transparent; + outline-offset: 2px; +}button,a{-webkit-tap-highlight-color:transparent}@media (min-width: 640px){.desktop{display:block}.mobile{display:none}}@media (max-width: 639px){.mobile{display:block}.desktop{display:none}}.theme-toggle { + border-radius: 0.375rem; + height: 2.5rem; + width: 2.5rem; + --tw-bg-opacity: 1; + background-color: rgba(243, 244, 246, var(--tw-bg-opacity)); + --tw-text-opacity: 1; + color: rgba(59, 130, 246, var(--tw-text-opacity)); +}.theme-toggle:hover { + --tw-bg-opacity: 1; + background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); +}.dark .theme-toggle { + --tw-bg-opacity: 1; + background-color: rgba(51, 51, 51, var(--tw-bg-opacity)); + --tw-text-opacity: 1; + color: rgba(96, 165, 250, var(--tw-text-opacity)); +}.dark .theme-toggle:hover { + --tw-bg-opacity: 1; + background-color: rgba(31, 41, 55, var(--tw-bg-opacity)); +}.dark .theme-toggle:active { + --tw-bg-opacity: 1; + background-color: rgba(55, 65, 81, var(--tw-bg-opacity)); +}.theme-toggle:focus { + border-radius: 0.375rem; +}.theme-toggle:focus-visible { + --tw-border-opacity: 1; + border-color: rgba(37, 99, 235, var(--tw-border-opacity)); + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +}.btn { + border-radius: 0.375rem; + padding-left: 0.75rem; + padding-right: 0.75rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + text-decoration: none; +}.btn:hover { + --tw-bg-opacity: 1; + background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); +}.dark .btn { + --tw-text-opacity: 1; + color: rgba(96, 165, 250, var(--tw-text-opacity)); +}.dark .btn:hover { + --tw-bg-opacity: 1; + background-color: rgba(51, 51, 51, var(--tw-bg-opacity)); +}.btn.active { + --tw-bg-opacity: 1; + background-color: rgba(37, 99, 235, var(--tw-bg-opacity)); + --tw-text-opacity: 1; + color: rgba(255, 255, 255, var(--tw-text-opacity)); +}.btn.active:hover { + --tw-bg-opacity: 1; + background-color: rgba(29, 78, 216, var(--tw-bg-opacity)); +}.dark .btn.active { + --tw-bg-opacity: 1; + background-color: rgba(96, 165, 250, var(--tw-bg-opacity)); + --tw-text-opacity: 1; + color: rgba(0, 0, 0, var(--tw-text-opacity)); +}.dark .btn.active:hover { + --tw-bg-opacity: 1; + background-color: rgba(59, 130, 246, var(--tw-bg-opacity)); +}.btn:hover { + --tw-bg-opacity: 0.6; +}main .container { + padding-left: 1.25rem; + padding-right: 1.25rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; +}@media (min-width: 640px) { + + main .container { + max-width: 768px; + } +}main header { + padding-top: 5rem; + padding-bottom: 5rem; + text-align: center; +}main header h1 { + margin-bottom: 0.5rem; + font-size: 3rem; + line-height: 1; + font-weight: 700; +}main header p { + font-size: 1.125rem; + line-height: 1.75rem; + font-weight: 500; +}.search{transition:background-color ease .25s,box-shadow .2s ease-out}.search:focus-within { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); + --tw-ring-opacity: 1; + --tw-ring-color: rgba(59, 130, 246, var(--tw-ring-opacity)); + --tw-ring-opacity: 0.5; +}.search { + border-radius: 0.5rem; + --tw-bg-opacity: 1; + background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); +}.dark .search { + --tw-bg-opacity: 1; + background-color: rgba(51, 51, 51, var(--tw-bg-opacity)); +}.search { + display: flex; + align-items: center; + padding-left: 1rem; + padding-right: 1rem; +}.search input#search-input { + margin-left: 0.5rem; + width: 100%; + background-color: transparent; + padding: 0.5rem; + vertical-align: middle; +}.search input#search-input:focus { + outline: 2px solid transparent; + outline-offset: 2px; +}.search input#search-input{-webkit-tap-highlight-color:transparent}.card{transition:border-color ease .25s;border-width: 1px;--tw-border-opacity: 1;border-color: rgba(229, 231, 235, var(--tw-border-opacity))}.dark .card { + --tw-border-opacity: 1; + border-color: rgba(51, 51, 51, var(--tw-border-opacity)); +}.card { + display: grid; + gap: 1.5rem; +}@media (min-width: 640px) { + + .card { + grid-template-columns: repeat(12, minmax(0, 1fr)); + } +}.card { + margin-top: 1.25rem; + margin-bottom: 1.25rem; + border-radius: 0.5rem; + padding: 1.25rem; +}.card section { + grid-column: span 12 / span 12; +}@media (min-width: 640px) { + + .card section.content { + grid-column: span 9 / span 9; + } +}.card section .updated-time { + margin-top: 0.5rem; + --tw-text-opacity: 1; + color: rgba(107, 114, 128, var(--tw-text-opacity)); +}.card section.file-size { + display: flex; +}@media (min-width: 640px) { + + .card section.file-size { + grid-column: span 3 / span 3; + } + + .card section.file-size { + text-align: center; + } +}footer.footer{transition:color ease .25s,background-color ease .25s;text-align: right;--tw-text-opacity: 1;color: rgba(107, 114, 128, var(--tw-text-opacity))}.dark footer.footer { + --tw-text-opacity: 1; + color: rgba(187, 187, 187, var(--tw-text-opacity)); +}footer.footer .container { + padding: 1.25rem; + vertical-align: middle; +}@media (min-width: 640px) { + + footer.footer .container { + max-width: 768px; + } +}.navbar { + position: fixed; + top: 0px; + left: 0px; + z-index: 50; + width: 100%; +}@supports(backdrop-filter: blur(5px)){.navbar { + --tw-backdrop-blur: var(--tw-empty,/*!*/ /*!*/); + --tw-backdrop-brightness: var(--tw-empty,/*!*/ /*!*/); + --tw-backdrop-contrast: var(--tw-empty,/*!*/ /*!*/); + --tw-backdrop-grayscale: var(--tw-empty,/*!*/ /*!*/); + --tw-backdrop-hue-rotate: var(--tw-empty,/*!*/ /*!*/); + --tw-backdrop-invert: var(--tw-empty,/*!*/ /*!*/); + --tw-backdrop-opacity: var(--tw-empty,/*!*/ /*!*/); + --tw-backdrop-saturate: var(--tw-empty,/*!*/ /*!*/); + --tw-backdrop-sepia: var(--tw-empty,/*!*/ /*!*/); + backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); + }.navbar { + --tw-backdrop-blur: blur(8px); + }.dark .navbar { + --tw-backdrop-blur: blur(12px); + }}.navbar .container { + position: relative; + height: 100%; + padding-left: 1.25rem; + padding-right: 1.25rem; +}@media (min-width: 640px) { + + .navbar .container { + max-width: 1024px; + } +}.navbar .navbar-bg{transition:background-color ease .25s;position: absolute;top: 0px;left: 0px;height: 100%;width: 100%;padding-left: 1.25rem;padding-right: 1.25rem;--tw-bg-opacity: 1;background-color: rgba(255, 255, 255, var(--tw-bg-opacity))}.dark .navbar .navbar-bg { + --tw-bg-opacity: 1; + background-color: rgba(0, 0, 0, var(--tw-bg-opacity)); +}.dark .navbar.shadow .navbar-bg { + --tw-bg-opacity: 1; + background-color: rgba(28, 28, 30, var(--tw-bg-opacity)); +}@supports(backdrop-filter: blur(5px)){.dark .navbar .navbar-bg, .dark .navbar.shadow .navbar-bg { + --tw-bg-opacity: 0.6; + }}.navbar .navbar-frame { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + width: 100%; + padding-top: 0.5rem; + padding-bottom: 0.5rem; +}.navbar .navbar-shadow{transition:opacity ease .25s;box-shadow:0 4px 15px rgba(0,0,50,.08);position: absolute;top: 0px;left: 0px;height: 100%;width: 100%;opacity: 0}.navbar.shadow .navbar-shadow { + opacity: 1; +}.navbar .navbar-border{transition:border-color ease .25s;position: absolute;top: 0px;left: 0px;height: 100%;width: 100%;border-bottom-width: 1px;--tw-border-opacity: 1;border-color: rgba(229, 231, 235, var(--tw-border-opacity))}.dark .navbar .navbar-border { + --tw-border-opacity: 1; + border-color: rgba(28, 28, 30, var(--tw-border-opacity)); +}.navbar.shadow .navbar-border { + --tw-border-opacity: 1; + border-color: rgba(209, 213, 219, var(--tw-border-opacity)); +}.dark .navbar.shadow .navbar-border { + --tw-border-opacity: 1; + border-color: rgba(85, 85, 85, var(--tw-border-opacity)); +}.navbar-offset { + margin-top: 4rem; +}.dark .navbar-logo:hover { + --tw-text-opacity: 1; + color: rgba(59, 130, 246, var(--tw-text-opacity)); +}.navbar-logo { + font-size: 1.25rem; + line-height: 1.75rem; + font-weight: 700; + text-decoration: none; + border-radius: 0.375rem; + padding-left: 0.75rem; + padding-right: 0.75rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; +}.navbar-logo:hover { + --tw-bg-opacity: 1; + background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); +}.dark .navbar-logo { + --tw-text-opacity: 1; + color: rgba(96, 165, 250, var(--tw-text-opacity)); +}.dark .navbar-logo:hover { + --tw-bg-opacity: 1; + background-color: rgba(51, 51, 51, var(--tw-bg-opacity)); +}.navbar-logo.active { + --tw-bg-opacity: 1; + background-color: rgba(37, 99, 235, var(--tw-bg-opacity)); + --tw-text-opacity: 1; + color: rgba(255, 255, 255, var(--tw-text-opacity)); +}.navbar-logo.active:hover { + --tw-bg-opacity: 1; + background-color: rgba(29, 78, 216, var(--tw-bg-opacity)); +}.dark .navbar-logo.active { + --tw-bg-opacity: 1; + background-color: rgba(96, 165, 250, var(--tw-bg-opacity)); + --tw-text-opacity: 1; + color: rgba(0, 0, 0, var(--tw-text-opacity)); +}.dark .navbar-logo.active:hover { + --tw-bg-opacity: 1; + background-color: rgba(59, 130, 246, var(--tw-bg-opacity)); +}.navbar-logo:hover { + --tw-bg-opacity: 0.6; +}.theme-toggle,.navbar-logo{transition:border-color .25s ease-out,box-shadow .25s ease-out}@media (min-width: 640px){.theme-toggle,.navbar-logo{transition:background-color .25s ease-out,color .25s ease-out,border-color .25s ease-out,box-shadow .25s ease-out}}.dark .dark\:bg-quaternary { + --tw-bg-opacity: 1; + background-color: rgba(51, 51, 51, var(--tw-bg-opacity)); +}@media (min-width: 640px) { + + .sm\:max-w-screen-lg { + max-width: 1024px; + } +} \ No newline at end of file diff --git a/docs/css/components/navbar.css b/docs/css/components/navbar.css index fbe3dfb4..6b4f9a33 100644 --- a/docs/css/components/navbar.css +++ b/docs/css/components/navbar.css @@ -1 +1 @@ -.navbar{position:fixed;top:0;left:0;z-index:50;width:100%}@supports ((-webkit-backdrop-filter: blur(5px)) or (backdrop-filter: blur(5px))){.navbar{--tw-backdrop-blur:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-invert:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-opacity:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-sepia:var(--tw-empty,/*!*/ /*!*/);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);--tw-backdrop-blur:blur(8px)}.dark .navbar{--tw-backdrop-blur:blur(12px)}}.navbar .container{position:relative;height:100%;padding-left:1.25rem;padding-right:1.25rem}@media (min-width:640px){.navbar .container{max-width:1024px}}.navbar .navbar-bg{transition:background-color ease .25s;position:absolute;top:0;left:0;height:100%;width:100%;padding-left:1.25rem;padding-right:1.25rem;--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.dark .navbar .navbar-bg{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.dark .navbar.shadow .navbar-bg{--tw-bg-opacity:1;background-color:rgba(28,28,30,var(--tw-bg-opacity))}@supports ((-webkit-backdrop-filter: blur(5px)) or (backdrop-filter: blur(5px))){.dark .navbar .navbar-bg,.dark .navbar.shadow .navbar-bg{--tw-bg-opacity:0.6}}.navbar .navbar-frame{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;width:100%;padding-top:.5rem;padding-bottom:.5rem}.navbar .navbar-border,.navbar .navbar-shadow{position:absolute;top:0;left:0;height:100%;width:100%}.navbar .navbar-shadow{transition:opacity ease .25s;box-shadow:0 4px 15px rgba(0,0,50,.08);opacity:0}.navbar.shadow .navbar-shadow{opacity:1}.navbar .navbar-border{transition:border-color ease .25s;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.dark .navbar .navbar-border{--tw-border-opacity:1;border-color:rgba(28,28,30,var(--tw-border-opacity))}.navbar.shadow .navbar-border{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.dark .navbar.shadow .navbar-border{--tw-border-opacity:1;border-color:rgba(85,85,85,var(--tw-border-opacity))}.navbar-offset{margin-top:4rem}.dark .navbar-logo:hover{--tw-text-opacity:1;color:rgba(59,130,246,var(--tw-text-opacity));--tw-bg-opacity:1;background-color:rgba(51,51,51,var(--tw-bg-opacity))}.navbar-logo{font-size:1.25rem;line-height:1.75rem;font-weight:700;text-decoration:none;border-radius:.375rem;padding:.5rem .75rem}.navbar-logo:hover{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.dark .navbar-logo{--tw-text-opacity:1;color:rgba(96,165,250,var(--tw-text-opacity))}.navbar-logo.active{--tw-bg-opacity:1;background-color:rgba(37,99,235,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.navbar-logo.active:hover{--tw-bg-opacity:1;background-color:rgba(29,78,216,var(--tw-bg-opacity))}.dark .navbar-logo.active{--tw-bg-opacity:1;background-color:rgba(96,165,250,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.dark .navbar-logo.active:hover{--tw-bg-opacity:1;background-color:rgba(59,130,246,var(--tw-bg-opacity))}.navbar-logo:hover{--tw-bg-opacity:0.6}.navbar-logo,.theme-toggle{transition:border-color .25s ease-out,box-shadow .25s ease-out}@media (min-width:640px){.navbar-logo,.theme-toggle{transition:background-color .25s ease-out,color .25s ease-out,border-color .25s ease-out,box-shadow .25s ease-out}} \ No newline at end of file +.navbar{position:fixed;top:0px;left:0px;z-index:50;width:100%}@supports(backdrop-filter: blur(5px)){.navbar{--tw-backdrop-blur:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-invert:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-opacity:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-backdrop-sepia:var(--tw-empty,/*!*/ /*!*/);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.navbar{--tw-backdrop-blur:blur(8px)}.dark .navbar{--tw-backdrop-blur:blur(12px)}}.navbar .container{position:relative;height:100%;padding-left:1.25rem;padding-right:1.25rem}@media (min-width: 640px){.navbar .container{max-width:1024px}}.navbar .navbar-bg{transition:background-color ease .25s;position:absolute;top:0px;left:0px;height:100%;width:100%;padding-left:1.25rem;padding-right:1.25rem;--tw-bg-opacity:1;background-color:rgba(255, 255, 255, var(--tw-bg-opacity))}.dark .navbar .navbar-bg{--tw-bg-opacity:1;background-color:rgba(0, 0, 0, var(--tw-bg-opacity))}.dark .navbar.shadow .navbar-bg{--tw-bg-opacity:1;background-color:rgba(28, 28, 30, var(--tw-bg-opacity))}@supports(backdrop-filter: blur(5px)){.dark .navbar .navbar-bg, .dark .navbar.shadow .navbar-bg{--tw-bg-opacity:0.6}}.navbar .navbar-frame{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;width:100%;padding-top:0.5rem;padding-bottom:0.5rem}.navbar .navbar-shadow{transition:opacity ease .25s;box-shadow:0 4px 15px rgba(0,0,50,.08);position:absolute;top:0px;left:0px;height:100%;width:100%;opacity:0}.navbar.shadow .navbar-shadow{opacity:1}.navbar .navbar-border{transition:border-color ease .25s;position:absolute;top:0px;left:0px;height:100%;width:100%;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgba(229, 231, 235, var(--tw-border-opacity))}.dark .navbar .navbar-border{--tw-border-opacity:1;border-color:rgba(28, 28, 30, var(--tw-border-opacity))}.navbar.shadow .navbar-border{--tw-border-opacity:1;border-color:rgba(209, 213, 219, var(--tw-border-opacity))}.dark .navbar.shadow .navbar-border{--tw-border-opacity:1;border-color:rgba(85, 85, 85, var(--tw-border-opacity))}.navbar-offset{margin-top:4rem}.dark .navbar-logo:hover{--tw-text-opacity:1;color:rgba(59, 130, 246, var(--tw-text-opacity))}.navbar-logo{font-size:1.25rem;line-height:1.75rem;font-weight:700;text-decoration:none;border-radius:0.375rem;padding-left:0.75rem;padding-right:0.75rem;padding-top:0.5rem;padding-bottom:0.5rem}.navbar-logo:hover{--tw-bg-opacity:1;background-color:rgba(229, 231, 235, var(--tw-bg-opacity))}.dark .navbar-logo{--tw-text-opacity:1;color:rgba(96, 165, 250, var(--tw-text-opacity))}.dark .navbar-logo:hover{--tw-bg-opacity:1;background-color:rgba(51, 51, 51, var(--tw-bg-opacity))}.navbar-logo.active{--tw-bg-opacity:1;background-color:rgba(37, 99, 235, var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(255, 255, 255, var(--tw-text-opacity))}.navbar-logo.active:hover{--tw-bg-opacity:1;background-color:rgba(29, 78, 216, var(--tw-bg-opacity))}.dark .navbar-logo.active{--tw-bg-opacity:1;background-color:rgba(96, 165, 250, var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(0, 0, 0, var(--tw-text-opacity))}.dark .navbar-logo.active:hover{--tw-bg-opacity:1;background-color:rgba(59, 130, 246, var(--tw-bg-opacity))}.navbar-logo:hover{--tw-bg-opacity:0.6}.theme-toggle,.navbar-logo{transition:border-color .25s ease-out,box-shadow .25s ease-out}@media (min-width: 640px){.theme-toggle,.navbar-logo{transition:background-color .25s ease-out,color .25s ease-out,border-color .25s ease-out,box-shadow .25s ease-out}} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 6d260400..f3662823 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -Homepage

bundle

a quick npm package size checker

@okikio/native

A framework who's goal is to make it easier to create complex, light-weight, and performant web applications using modern js apis.

Updated January 23, 2021 by @okikio.

7 KB

Minified + Gzipped

\ No newline at end of file +Homepage

bundle

a quick npm package size checker

@okikio/native

A framework who's goal is to make it easier to create complex, light-weight, and performant web applications using modern js apis.

Updated January 23, 2021 by @okikio.

7 KB

Minified + Gzipped

\ No newline at end of file diff --git a/docs/js/esbuild.js b/docs/js/esbuild.js new file mode 100644 index 00000000..2809c8ff --- /dev/null +++ b/docs/js/esbuild.js @@ -0,0 +1,796 @@ +const global = globalThis; +var Ky=Object.create,Ti=Object.defineProperty,Jy=Object.getPrototypeOf,Xy=Object.prototype.hasOwnProperty,Qy=Object.getOwnPropertyNames,eg=Object.getOwnPropertyDescriptor;var tg=e=>Ti(e,"__esModule",{value:!0});var Cf=(e,t)=>()=>(e&&(t=e(e=0)),t),I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rg=(e,t)=>{for(var r in t)Ti(e,r,{get:t[r],enumerable:!0})},ng=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Qy(t))!Xy.call(e,n)&&n!=="default"&&Ti(e,n,{get:()=>t[n],enumerable:!(r=eg(t,n))||r.enumerable});return e},sr=e=>ng(tg(Ti(e!=null?Ky(Jy(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var g={};rg(g,{addListener:()=>Qf,argv:()=>Gf,binding:()=>ol,browser:()=>Hf,chdir:()=>sl,config:()=>Jf,cwd:()=>al,default:()=>lg,emit:()=>il,env:()=>Zf,hrtime:()=>ll,nextTick:()=>zf,off:()=>tl,on:()=>Xf,once:()=>el,platform:()=>Vf,release:()=>Kf,removeAllListeners:()=>nl,removeListener:()=>rl,title:()=>Wf,umask:()=>fl,uptime:()=>ul,version:()=>Yf,versions:()=>wa});function Uf(){throw new Error("setTimeout has not been defined")}function jf(){throw new Error("clearTimeout has not been defined")}function Mf(e){if(Ut===setTimeout)return setTimeout(e,0);if((Ut===Uf||!Ut)&&setTimeout)return Ut=setTimeout,setTimeout(e,0);try{return Ut(e,0)}catch(t){try{return Ut.call(null,e,0)}catch(r){return Ut.call(this,e,0)}}}function ig(e){if(jt===clearTimeout)return clearTimeout(e);if((jt===jf||!jt)&&clearTimeout)return jt=clearTimeout,clearTimeout(e);try{return jt(e)}catch(t){try{return jt.call(null,e)}catch(r){return jt.call(this,e)}}}function og(){!Lr||!fr||(Lr=!1,fr.length?St=fr.concat(St):Fi=-1,St.length&&$f())}function $f(){if(!Lr){var e=Mf(og);Lr=!0;for(var t=St.length;t;){for(fr=St,St=[];++Fi1)for(var r=1;r{d();Ut=Uf,jt=jf;typeof global.setTimeout=="function"&&(Ut=setTimeout);typeof global.clearTimeout=="function"&&(jt=clearTimeout);St=[],Lr=!1,Fi=-1;qf.prototype.run=function(){this.fun.apply(null,this.array)};Wf="browser",Vf="browser",Hf=!0,Zf={},Gf=[],Yf="",wa={},Kf={},Jf={};Xf=lr,Qf=lr,el=lr,tl=lr,rl=lr,nl=lr,il=lr;Cr=global.performance||{},ag=Cr.now||Cr.mozNow||Cr.msNow||Cr.oNow||Cr.webkitNow||function(){return new Date().getTime()};sg=new Date;fg={nextTick:zf,title:Wf,browser:Hf,env:Zf,argv:Gf,version:Yf,versions:wa,on:Xf,addListener:Qf,once:el,off:tl,removeListener:rl,removeAllListeners:nl,emit:il,binding:ol,cwd:al,chdir:sl,umask:fl,hrtime:ll,platform:Vf,release:Kf,config:Jf,uptime:ul},lg=fg;delete wa.node});var pl=I(Ni=>{d();"use strict";Ni.byteLength=ug;Ni.toByteArray=cg;Ni.fromByteArray=hg;var ct=[],He=[],pg=typeof Uint8Array!="undefined"?Uint8Array:Array,_a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ur=0,dg=_a.length;Ur0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function ug(e){var t=hl(e),r=t[0],n=t[1];return(r+n)*3/4-n}function yg(e,t,r){return(t+r)*3/4-r}function cg(e){var t,r=hl(e),n=r[0],i=r[1],o=new pg(yg(e,n,i)),a=0,s=i>0?n-4:n,l;for(l=0;l>16&255,o[a++]=t>>8&255,o[a++]=t&255;return i===2&&(t=He[e.charCodeAt(l)]<<2|He[e.charCodeAt(l+1)]>>4,o[a++]=t&255),i===1&&(t=He[e.charCodeAt(l)]<<10|He[e.charCodeAt(l+1)]<<4|He[e.charCodeAt(l+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function gg(e){return ct[e>>18&63]+ct[e>>12&63]+ct[e>>6&63]+ct[e&63]}function mg(e,t,r){for(var n,i=[],o=t;os?s:a+o));return n===1?(t=e[r-1],i.push(ct[t>>2]+ct[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(ct[t>>10]+ct[t>>4&63]+ct[t<<2&63]+"=")),i.join("")}});var dl=I(va=>{d();va.read=function(e,t,r,n,i){var o,a,s=i*8-n-1,l=(1<>1,u=-7,h=r?i-1:0,p=r?-1:1,c=e[t+h];for(h+=p,o=c&(1<<-u)-1,c>>=-u,u+=s;u>0;o=o*256+e[t+h],h+=p,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=a*256+e[t+h],h+=p,u-=8);if(o===0)o=1-f;else{if(o===l)return a?NaN:(c?-1:1)*Infinity;a=a+Math.pow(2,n),o=o-f}return(c?-1:1)*a*Math.pow(2,o-n)};va.write=function(e,t,r,n,i,o){var a,s,l,f=o*8-i-1,u=(1<>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=n?0:o-1,m=n?1:-1,U=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===Infinity?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+h>=1?t+=p/l:t+=p*Math.pow(2,1-h),t*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a=a+h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+c]=s&255,c+=m,s/=256,i-=8);for(a=a<0;e[r+c]=a&255,c+=m,a/=256,f-=8);e[r+c-m]|=U*128}});var Ia=I(jr=>{d();"use strict";var ba=pl(),Mr=dl(),yl=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;jr.Buffer=y;jr.SlowBuffer=wg;jr.INSPECT_MAX_BYTES=50;var Bi=2147483647;jr.kMaxLength=Bi;y.TYPED_ARRAY_SUPPORT=_g();!y.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function _g(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(y.prototype,"parent",{enumerable:!0,get:function(){if(!!y.isBuffer(this))return this.buffer}});Object.defineProperty(y.prototype,"offset",{enumerable:!0,get:function(){if(!!y.isBuffer(this))return this.byteOffset}});function xt(e){if(e>Bi)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,y.prototype),t}function y(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Ea(e)}return gl(e,t,r)}y.poolSize=8192;function gl(e,t,r){if(typeof e=="string")return vg(e,t);if(ArrayBuffer.isView(e))return bg(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ht(e,ArrayBuffer)||e&&ht(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ht(e,SharedArrayBuffer)||e&&ht(e.buffer,SharedArrayBuffer)))return Sa(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return y.from(n,t,r);let i=Eg(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return y.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}y.from=function(e,t,r){return gl(e,t,r)};Object.setPrototypeOf(y.prototype,Uint8Array.prototype);Object.setPrototypeOf(y,Uint8Array);function ml(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Sg(e,t,r){return ml(e),e<=0?xt(e):t!==void 0?typeof r=="string"?xt(e).fill(t,r):xt(e).fill(t):xt(e)}y.alloc=function(e,t,r){return Sg(e,t,r)};function Ea(e){return ml(e),xt(e<0?0:xa(e)|0)}y.allocUnsafe=function(e){return Ea(e)};y.allocUnsafeSlow=function(e){return Ea(e)};function vg(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!y.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=wl(e,t)|0,n=xt(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Oa(e){let t=e.length<0?0:xa(e.length)|0,r=xt(t);for(let n=0;n=Bi)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Bi.toString(16)+" bytes");return e|0}function wg(e){return+e!=e&&(e=0),y.alloc(+e)}y.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==y.prototype};y.compare=function(t,r){if(ht(t,Uint8Array)&&(t=y.from(t,t.offset,t.byteLength)),ht(r,Uint8Array)&&(r=y.from(r,r.offset,r.byteLength)),!y.isBuffer(t)||!y.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let o=0,a=Math.min(n,i);oi.length?(y.isBuffer(a)||(a=y.from(a)),a.copy(i,o)):Uint8Array.prototype.set.call(i,a,o);else if(y.isBuffer(a))a.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=a.length}return i};function wl(e,t){if(y.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ht(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Ra(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return _l(e).length;default:if(i)return n?-1:Ra(e).length;t=(""+t).toLowerCase(),i=!0}}y.byteLength=wl;function Ig(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Rg(this,t,r);case"utf8":case"utf-8":return vl(this,t,r);case"ascii":return Og(this,t,r);case"latin1":case"binary":return Ag(this,t,r);case"base64":return xg(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kg(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}y.prototype._isBuffer=!0;function ur(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}y.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};yl&&(y.prototype[yl]=y.prototype.inspect);y.prototype.compare=function(t,r,n,i,o){if(ht(t,Uint8Array)&&(t=y.from(t,t.offset,t.byteLength)),!y.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),r<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;let a=o-i,s=n-r,l=Math.min(a,s),f=this.slice(i,o),u=t.slice(r,n);for(let h=0;h2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Aa(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=y.from(t,n)),y.isBuffer(t))return t.length===0?-1:bl(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):bl(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function bl(e,t,r,n,i){let o=1,a=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,a/=2,s/=2,r/=2}function l(u,h){return o===1?u[h]:u.readUInt16BE(h*o)}let f;if(i){let u=-1;for(f=r;fa&&(r=a-s),f=r;f>=0;f--){let u=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let a;for(a=0;a>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-r;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return Tg(this,t,r,n);case"utf8":case"utf-8":return Fg(this,t,r,n);case"ascii":case"latin1":case"binary":return Bg(this,t,r,n);case"base64":return Pg(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lg(this,t,r,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function xg(e,t,r){return t===0&&r===e.length?ba.fromByteArray(e):ba.fromByteArray(e.slice(t,r))}function vl(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+s<=r){let l,f,u,h;switch(s){case 1:o<128&&(a=o);break;case 2:l=e[i+1],(l&192)==128&&(h=(o&31)<<6|l&63,h>127&&(a=h));break;case 3:l=e[i+1],f=e[i+2],(l&192)==128&&(f&192)==128&&(h=(o&15)<<12|(l&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(a=h));break;case 4:l=e[i+1],f=e[i+2],u=e[i+3],(l&192)==128&&(f&192)==128&&(u&192)==128&&(h=(o&15)<<18|(l&63)<<12|(f&63)<<6|u&63,h>65535&&h<1114112&&(a=h))}}a===null?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=s}return Cg(n)}var Sl=4096;function Cg(e){let t=e.length;if(t<=Sl)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;on&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}y.prototype.readUintLE=y.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||Oe(t,r,this.length);let i=this[t],o=1,a=0;for(;++a>>0,r=r>>>0,n||Oe(t,r,this.length);let i=this[t+--r],o=1;for(;r>0&&(o*=256);)i+=this[t+--r]*o;return i};y.prototype.readUint8=y.prototype.readUInt8=function(t,r){return t=t>>>0,r||Oe(t,1,this.length),this[t]};y.prototype.readUint16LE=y.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Oe(t,2,this.length),this[t]|this[t+1]<<8};y.prototype.readUint16BE=y.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Oe(t,2,this.length),this[t]<<8|this[t+1]};y.prototype.readUint32LE=y.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Oe(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};y.prototype.readUint32BE=y.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Oe(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};y.prototype.readBigUInt64LE=Mt(function(t){t=t>>>0,$r(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&In(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,o=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(o)<>>0,$r(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&In(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],o=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<>>0,r=r>>>0,n||Oe(t,r,this.length);let i=this[t],o=1,a=0;for(;++a=o&&(i-=Math.pow(2,8*r)),i};y.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||Oe(t,r,this.length);let i=r,o=1,a=this[t+--i];for(;i>0&&(o*=256);)a+=this[t+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*r)),a};y.prototype.readInt8=function(t,r){return t=t>>>0,r||Oe(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};y.prototype.readInt16LE=function(t,r){t=t>>>0,r||Oe(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};y.prototype.readInt16BE=function(t,r){t=t>>>0,r||Oe(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};y.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Oe(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};y.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Oe(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};y.prototype.readBigInt64LE=Mt(function(t){t=t>>>0,$r(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&In(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<>>0,$r(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&In(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||Oe(t,4,this.length),Mr.read(this,t,!0,23,4)};y.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Oe(t,4,this.length),Mr.read(this,t,!1,23,4)};y.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Oe(t,8,this.length),Mr.read(this,t,!0,52,8)};y.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Oe(t,8,this.length),Mr.read(this,t,!1,52,8)};function Ue(e,t,r,n,i,o){if(!y.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}y.prototype.writeUintLE=y.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Ue(this,t,r,n,s,0)}let o=1,a=0;for(this[r]=t&255;++a>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Ue(this,t,r,n,s,0)}let o=n-1,a=1;for(this[r+o]=t&255;--o>=0&&(a*=256);)this[r+o]=t/a&255;return r+n};y.prototype.writeUint8=y.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Ue(this,t,r,1,255,0),this[r]=t&255,r+1};y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Ue(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Ue(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Ue(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Ue(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Ol(e,t,r,n,i){xl(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,r}function Al(e,t,r,n,i){xl(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a=a>>8,e[r+2]=a,a=a>>8,e[r+1]=a,a=a>>8,e[r]=a,r+8}y.prototype.writeBigUInt64LE=Mt(function(t,r=0){return Ol(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});y.prototype.writeBigUInt64BE=Mt(function(t,r=0){return Al(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});y.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Ue(this,t,r,n,l-1,-l)}let o=0,a=1,s=0;for(this[r]=t&255;++o>0)-s&255;return r+n};y.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Ue(this,t,r,n,l-1,-l)}let o=n-1,a=1,s=0;for(this[r+o]=t&255;--o>=0&&(a*=256);)t<0&&s===0&&this[r+o+1]!==0&&(s=1),this[r+o]=(t/a>>0)-s&255;return r+n};y.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Ue(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};y.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Ue(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};y.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Ue(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};y.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Ue(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};y.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Ue(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};y.prototype.writeBigInt64LE=Mt(function(t,r=0){return Ol(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});y.prototype.writeBigInt64BE=Mt(function(t,r=0){return Al(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Rl(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function kl(e,t,r,n,i){return t=+t,r=r>>>0,i||Rl(e,t,r,4,34028234663852886e22,-34028234663852886e22),Mr.write(e,t,r,n,23,4),r+4}y.prototype.writeFloatLE=function(t,r,n){return kl(this,t,r,!0,n)};y.prototype.writeFloatBE=function(t,r,n){return kl(this,t,r,!1,n)};function Il(e,t,r,n,i){return t=+t,r=r>>>0,i||Rl(e,t,r,8,17976931348623157e292,-17976931348623157e292),Mr.write(e,t,r,n,52,8),r+8}y.prototype.writeDoubleLE=function(t,r,n){return Il(this,t,r,!0,n)};y.prototype.writeDoubleBE=function(t,r,n){return Il(this,t,r,!1,n)};y.prototype.copy=function(t,r,n,i){if(!y.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let o;if(typeof t=="number")for(o=r;o2**32?i=Tl(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Tl(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Tl(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function jg(e,t,r){$r(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&In(t,e.length-(r+1))}function xl(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${a} and < 2${a} ** ${(o+1)*8}${a}`:s=`>= -(2${a} ** ${(o+1)*8-1}${a}) and < 2 ** ${(o+1)*8-1}${a}`:s=`>= ${t}${a} and <= ${r}${a}`,new qr.ERR_OUT_OF_RANGE("value",s,e)}jg(n,i,o)}function $r(e,t){if(typeof e!="number")throw new qr.ERR_INVALID_ARG_TYPE(t,"number",e)}function In(e,t,r){throw Math.floor(e)!==e?($r(e,r),new qr.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new qr.ERR_BUFFER_OUT_OF_BOUNDS:new qr.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Mg=/[^+/0-9A-Za-z-_]/g;function $g(e){if(e=e.split("=")[0],e=e.trim().replace(Mg,""),e.length<2)return"";for(;e.length%4!=0;)e=e+"=";return e}function Ra(e,t){t=t||Infinity;let r,n=e.length,i=null,o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ng(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function _l(e){return ba.toByteArray($g(e))}function Pi(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ht(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Aa(e){return e!==e}var Ug=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Mt(e){return typeof BigInt=="undefined"?qg:e}function qg(){throw new Error("BigInt not supported")}});var O,d=Cf(()=>{cl();O=sr(Ia())});var Hl=I((uS,Vl)=>{d();Vl.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var Zl=I((cS,Da)=>{d();typeof Object.create=="function"?Da.exports=function(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:Da.exports=function(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}});var Jl=I(he=>{d();var o0=/%[sdj%]/g;he.format=function(e){if(!Mi(e)){for(var t=[],r=0;r=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),a=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Ca(t)?r.showHidden=t:t&&he._extend(r,t),Ot(r.showHidden)&&(r.showHidden=!1),Ot(r.depth)&&(r.depth=2),Ot(r.colors)&&(r.colors=!1),Ot(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a0),qi(r,e,r.depth)}he.inspect=$t;$t.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};$t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a0(e,t){var r=$t.styles[t];return r?"["+$t.colors[r][0]+"m"+e+"["+$t.colors[r][1]+"m":e}function s0(e,t){return e}function f0(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function qi(e,t,r){if(e.customInspect&&t&&Vi(t.inspect)&&t.inspect!==he.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Mi(n)||(n=qi(e,n,r)),n}var i=l0(e,t);if(i)return i;var o=Object.keys(t),a=f0(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),Wi(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Ua(t);if(o.length===0){if(Vi(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(zi(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Ma(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Wi(t))return Ua(t)}var l="",f=!1,u=["{","}"];if(Gl(t)&&(f=!0,u=["[","]"]),Vi(t)){var h=t.name?": "+t.name:"";l=" [Function"+h+"]"}if(zi(t)&&(l=" "+RegExp.prototype.toString.call(t)),Ma(t)&&(l=" "+Date.prototype.toUTCString.call(t)),Wi(t)&&(l=" "+Ua(t)),o.length===0&&(!f||t.length==0))return u[0]+l+u[1];if(r<0)return zi(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var p;return f?p=u0(e,t,r,a,o):p=o.map(function(c){return ja(e,t,r,a,c,f)}),e.seen.pop(),c0(p,l,u)}function l0(e,t){if(Ot(t))return e.stylize("undefined","undefined");if(Mi(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(Yl(t))return e.stylize(""+t,"number");if(Ca(t))return e.stylize(""+t,"boolean");if(ji(t))return e.stylize("null","null")}function Ua(e){return"["+Error.prototype.toString.call(e)+"]"}function u0(e,t,r,n,i){for(var o=[],a=0,s=t.length;a-1&&(o?s=s.split(` +`).map(function(f){return" "+f}).join(` +`).substr(2):s=` +`+s.split(` +`).map(function(f){return" "+f}).join(` +`))):s=e.stylize("[Circular]","special")),Ot(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function c0(e,t,r){var n=0,i=e.reduce(function(o,a){return n++,a.indexOf(` +`)>=0&&n++,o+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(t===""?"":t+` + `)+" "+e.join(`, + `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function Gl(e){return Array.isArray(e)}he.isArray=Gl;function Ca(e){return typeof e=="boolean"}he.isBoolean=Ca;function ji(e){return e===null}he.isNull=ji;function h0(e){return e==null}he.isNullOrUndefined=h0;function Yl(e){return typeof e=="number"}he.isNumber=Yl;function Mi(e){return typeof e=="string"}he.isString=Mi;function p0(e){return typeof e=="symbol"}he.isSymbol=p0;function Ot(e){return e===void 0}he.isUndefined=Ot;function zi(e){return Yr(e)&&$a(e)==="[object RegExp]"}he.isRegExp=zi;function Yr(e){return typeof e=="object"&&e!==null}he.isObject=Yr;function Ma(e){return Yr(e)&&$a(e)==="[object Date]"}he.isDate=Ma;function Wi(e){return Yr(e)&&($a(e)==="[object Error]"||e instanceof Error)}he.isError=Wi;function Vi(e){return typeof e=="function"}he.isFunction=Vi;function d0(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}he.isPrimitive=d0;he.isBuffer=Hl();function $a(e){return Object.prototype.toString.call(e)}function qa(e){return e<10?"0"+e.toString(10):e.toString(10)}var y0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function g0(){var e=new Date,t=[qa(e.getHours()),qa(e.getMinutes()),qa(e.getSeconds())].join(":");return[e.getDate(),y0[e.getMonth()],t].join(" ")}he.log=function(){console.log("%s - %s",g0(),he.format.apply(he,arguments))};he.inherits=Zl();he._extend=function(e,t){if(!t||!Yr(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function Kl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var Nn=I((pS,Tn)=>{d();"use strict";var m0=g.platform==="win32",it=Jl();function Hi(e,t){for(var r=[],n=0;n=0&&!e[n];n--);return r===0&&n===t?e:r>n?[]:e.slice(r,n+1)}var Xl=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,w0=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,_e={};function Zi(e){var t=Xl.exec(e),r=(t[1]||"")+(t[2]||""),n=t[3]||"",i=w0.exec(n),o=i[1],a=i[2],s=i[3];return[r,o,a,s]}function za(e){var t=Xl.exec(e),r=t[1]||"",n=!!r&&r[1]!==":";return{device:r,isUnc:n,isAbsolute:n||!!t[2],tail:t[3]}}function Ql(e){return"\\\\"+e.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}_e.resolve=function(){for(var e="",t="",r=!1,n=arguments.length-1;n>=-1;n--){var i;if(n>=0?i=arguments[n]:e?(i=g.env["="+e],(!i||i.substr(0,3).toLowerCase()!==e.toLowerCase()+"\\")&&(i=e+"\\")):i=g.cwd(),it.isString(i)){if(!i)continue}else throw new TypeError("Arguments to path.resolve must be strings");var o=za(i),a=o.device,s=o.isUnc,l=o.isAbsolute,f=o.tail;if(!(a&&e&&a.toLowerCase()!==e.toLowerCase())&&(e||(e=a),r||(t=f+"\\"+t,r=l),e&&r))break}return s&&(e=Ql(e)),t=Hi(t.split(/[\\\/]+/),!r).join("\\"),e+(r?"\\":"")+t||"."};_e.normalize=function(e){var t=za(e),r=t.device,n=t.isUnc,i=t.isAbsolute,o=t.tail,a=/[\\\/]$/.test(o);return o=Hi(o.split(/[\\\/]+/),!i).join("\\"),!o&&!i&&(o="."),o&&a&&(o+="\\"),n&&(r=Ql(r)),r+(i?"\\":"")+o};_e.isAbsolute=function(e){return za(e).isAbsolute};_e.join=function(){for(var e=[],t=0;t=-1&&!t;r--){var n=r>=0?arguments[r]:g.cwd();if(it.isString(n)){if(!n)continue}else throw new TypeError("Arguments to path.resolve must be strings");e=n+"/"+e,t=n[0]==="/"}return e=Hi(e.split("/"),!t).join("/"),(t?"/":"")+e||"."};Se.normalize=function(e){var t=Se.isAbsolute(e),r=e&&e[e.length-1]==="/";return e=Hi(e.split("/"),!t).join("/"),!e&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e};Se.isAbsolute=function(e){return e.charAt(0)==="/"};Se.join=function(){for(var e="",t=0;t{d();"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.constants=void 0;Yi.constants={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:64,O_EXCL:128,O_NOCTTY:256,O_TRUNC:512,O_APPEND:1024,O_DIRECTORY:65536,O_NOATIME:262144,O_NOFOLLOW:131072,O_SYNC:1052672,O_DIRECT:16384,O_NONBLOCK:2048,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,UV_FS_COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,COPYFILE_EXCL:1,COPYFILE_FICLONE:2,COPYFILE_FICLONE_FORCE:4}});var eu=I(Wa=>{d();typeof BigInt=="function"?Wa.default=BigInt:Wa.default=function(){throw new Error("BigInt is not supported in this environment.")}});var Ki=I(Bn=>{d();"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.Stats=void 0;var qt=Kr(),v0=eu(),b0=qt.constants.S_IFMT,E0=qt.constants.S_IFDIR,S0=qt.constants.S_IFREG,x0=qt.constants.S_IFBLK,O0=qt.constants.S_IFCHR,A0=qt.constants.S_IFLNK,R0=qt.constants.S_IFIFO,k0=qt.constants.S_IFSOCK,tu=function(){function e(){}return e.build=function(t,r){r===void 0&&(r=!1);var n=new e,i=t.uid,o=t.gid,a=t.atime,s=t.mtime,l=t.ctime,f=r?v0.default:function(h){return h};n.uid=f(i),n.gid=f(o),n.rdev=f(0),n.blksize=f(4096),n.ino=f(t.ino),n.size=f(t.getSize()),n.blocks=f(1),n.atime=a,n.mtime=s,n.ctime=l,n.birthtime=l,n.atimeMs=f(a.getTime()),n.mtimeMs=f(s.getTime());var u=f(l.getTime());return n.ctimeMs=u,n.birthtimeMs=u,n.dev=f(0),n.mode=f(t.mode),n.nlink=f(t.nlink),n},e.prototype._checkModeProperty=function(t){return(Number(this.mode)&b0)===t},e.prototype.isDirectory=function(){return this._checkModeProperty(E0)},e.prototype.isFile=function(){return this._checkModeProperty(S0)},e.prototype.isBlockDevice=function(){return this._checkModeProperty(x0)},e.prototype.isCharacterDevice=function(){return this._checkModeProperty(O0)},e.prototype.isSymbolicLink=function(){return this._checkModeProperty(A0)},e.prototype.isFIFO=function(){return this._checkModeProperty(R0)},e.prototype.isSocket=function(){return this._checkModeProperty(k0)},e}();Bn.Stats=tu;Bn.default=tu});var Ji=I(pt=>{d();"use strict";var I0=pt&&pt.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r{d();"use strict";nu.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==i||a.enumerable!==!0)return!1}return!0}});var Xi=I((_S,ou)=>{d();"use strict";var au=typeof Symbol!="undefined"&&Symbol,N0=iu();ou.exports=function(){return typeof au!="function"||typeof Symbol!="function"||typeof au("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:N0()}});var fu=I((vS,su)=>{d();"use strict";var B0="Function.prototype.bind called on incompatible ",Va=Array.prototype.slice,P0=Object.prototype.toString,D0="[object Function]";su.exports=function(t){var r=this;if(typeof r!="function"||P0.call(r)!==D0)throw new TypeError(B0+r);for(var n=Va.call(arguments,1),i,o=function(){if(this instanceof i){var u=r.apply(this,n.concat(Va.call(arguments)));return Object(u)===u?u:this}else return r.apply(t,n.concat(Va.call(arguments)))},a=Math.max(0,r.length-n.length),s=[],l=0;l{d();"use strict";var L0=fu();lu.exports=Function.prototype.bind||L0});var cu=I((ES,uu)=>{d();"use strict";var C0=Qi();uu.exports=C0.call(Function.call,Object.prototype.hasOwnProperty)});var no=I((SS,hu)=>{d();"use strict";var se,Dn=SyntaxError,pu=Function,Jr=TypeError,Ha=function(e){try{return pu('"use strict"; return ('+e+").constructor;")()}catch(t){}},dr=Object.getOwnPropertyDescriptor;if(dr)try{dr({},"")}catch(e){dr=null}var Za=function(){throw new Jr},U0=dr?function(){try{return arguments.callee,Za}catch(e){try{return dr(arguments,"callee").get}catch(t){return Za}}}():Za,Xr=Xi()(),zt=Object.getPrototypeOf||function(e){return e.__proto__},Qr={},j0=typeof Uint8Array=="undefined"?se:zt(Uint8Array),en={"%AggregateError%":typeof AggregateError=="undefined"?se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?se:ArrayBuffer,"%ArrayIteratorPrototype%":Xr?zt([][Symbol.iterator]()):se,"%AsyncFromSyncIteratorPrototype%":se,"%AsyncFunction%":Qr,"%AsyncGenerator%":Qr,"%AsyncGeneratorFunction%":Qr,"%AsyncIteratorPrototype%":Qr,"%Atomics%":typeof Atomics=="undefined"?se:Atomics,"%BigInt%":typeof BigInt=="undefined"?se:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?se:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?se:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?se:FinalizationRegistry,"%Function%":pu,"%GeneratorFunction%":Qr,"%Int8Array%":typeof Int8Array=="undefined"?se:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?se:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Xr?zt(zt([][Symbol.iterator]())):se,"%JSON%":typeof JSON=="object"?JSON:se,"%Map%":typeof Map=="undefined"?se:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Xr?se:zt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?se:Promise,"%Proxy%":typeof Proxy=="undefined"?se:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?se:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Xr?se:zt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Xr?zt(""[Symbol.iterator]()):se,"%Symbol%":Xr?Symbol:se,"%SyntaxError%":Dn,"%ThrowTypeError%":U0,"%TypedArray%":j0,"%TypeError%":Jr,"%Uint8Array%":typeof Uint8Array=="undefined"?se:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?se:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?se:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?se:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?se:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?se:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?se:WeakSet},M0=function e(t){var r;if(t==="%AsyncFunction%")r=Ha("async function () {}");else if(t==="%GeneratorFunction%")r=Ha("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Ha("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(r=zt(i.prototype))}return en[t]=r,r},du={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},eo=Qi(),to=cu(),$0=eo.call(Function.call,Array.prototype.concat),q0=eo.call(Function.apply,Array.prototype.splice),yu=eo.call(Function.call,String.prototype.replace),ro=eo.call(Function.call,String.prototype.slice),z0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W0=/\\(\\)?/g,V0=function(t){var r=ro(t,0,1),n=ro(t,-1);if(r==="%"&&n!=="%")throw new Dn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Dn("invalid intrinsic syntax, expected opening `%`");var i=[];return yu(t,z0,function(o,a,s,l){i[i.length]=s?yu(l,W0,"$1"):a||o}),i},H0=function(t,r){var n=t,i;if(to(du,n)&&(i=du[n],n="%"+i[0]+"%"),to(en,n)){var o=en[n];if(o===Qr&&(o=M0(n)),typeof o=="undefined"&&!r)throw new Jr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new Dn("intrinsic "+t+" does not exist!")};hu.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new Jr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Jr('"allowMissing" argument must be a boolean');var n=V0(t),i=n.length>0?n[0]:"",o=H0("%"+i+"%",r),a=o.name,s=o.value,l=!1,f=o.alias;f&&(i=f[0],q0(n,$0([0,1],f)));for(var u=1,h=!0;u=n.length){var U=dr(s,p);h=!!U,h&&"get"in U&&!("originalValue"in U.get)?s=U.get:s=s[p]}else h=to(s,p),s=s[p];h&&!l&&(en[a]=s)}}return s}});var oo=I((xS,io)=>{d();"use strict";var Ga=Qi(),tn=no(),gu=tn("%Function.prototype.apply%"),mu=tn("%Function.prototype.call%"),wu=tn("%Reflect.apply%",!0)||Ga.call(mu,gu),_u=tn("%Object.getOwnPropertyDescriptor%",!0),yr=tn("%Object.defineProperty%",!0),Z0=tn("%Math.max%");if(yr)try{yr({},"a",{value:1})}catch(e){yr=null}io.exports=function(t){var r=wu(Ga,mu,arguments);if(_u&&yr){var n=_u(r,"length");n.configurable&&yr(r,"length",{value:1+Z0(0,t.length-(arguments.length-1))})}return r};var vu=function(){return wu(Ga,gu,arguments)};yr?yr(io.exports,"apply",{value:vu}):io.exports.apply=vu});var ao=I((OS,bu)=>{d();"use strict";var Eu=no(),Su=oo(),G0=Su(Eu("String.prototype.indexOf"));bu.exports=function(t,r){var n=Eu(t,!!r);return typeof n=="function"&&G0(t,".prototype.")>-1?Su(n):n}});var Au=I((AS,xu)=>{d();"use strict";var Y0=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",K0=ao(),Ya=K0("Object.prototype.toString"),so=function(t){return Y0&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Ya(t)==="[object Arguments]"},Ou=function(t){return so(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Ya(t)!=="[object Array]"&&Ya(t.callee)==="[object Function]"},J0=function(){return so(arguments)}();so.isLegacyArguments=Ou;xu.exports=J0?so:Ou});var Tu=I((RS,Ru)=>{d();"use strict";var X0=Object.prototype.toString,Q0=Function.prototype.toString,em=/^\s*(?:function)?\*/,ku=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",fo=Object.getPrototypeOf,tm=function(){if(!ku)return!1;try{return Function("return function*() {}")()}catch(e){}},Iu=tm(),rm=fo&&Iu?fo(Iu):!1;Ru.exports=function(t){if(typeof t!="function")return!1;if(em.test(Q0.call(t)))return!0;if(!ku){var r=X0.call(t);return r==="[object GeneratorFunction]"}return fo&&fo(t)===rm}});var Ka=I((kS,Fu)=>{d();var nm=Object.prototype.hasOwnProperty,im=Object.prototype.toString;Fu.exports=function(t,r,n){if(im.call(r)!=="[object Function]")throw new TypeError("iterator must be a function");var i=t.length;if(i===+i)for(var o=0;o{d();Nu.exports=function(e,t,r){if(e.filter)return e.filter(t,r);if(e==null)throw new TypeError;if(typeof t!="function")throw new TypeError;for(var n=[],i=0;i{d();"use strict";var am=Bu();Pu.exports=function(){return am(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],function(t){return typeof global[t]=="function"})}});var Xa=I((FS,Du)=>{d();"use strict";var sm=no(),lo=sm("%Object.getOwnPropertyDescriptor%");if(lo)try{lo([],"length")}catch(e){lo=null}Du.exports=lo});var ts=I((NS,Lu)=>{d();"use strict";var Cu=Ka(),fm=Ja(),Qa=ao(),lm=Qa("Object.prototype.toString"),um=Xi()(),Uu=um&&typeof Symbol.toStringTag=="symbol",ju=fm(),cm=Qa("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return uo?pm(t):!1}});var Hu=I((BS,$u)=>{d();"use strict";var qu=Ka(),dm=Ja(),zu=ao(),ym=zu("Object.prototype.toString"),gm=Xi()(),Wu=gm&&typeof Symbol.toStringTag=="symbol",mm=dm(),wm=zu("String.prototype.slice"),Vu={},rs=Xa(),ns=Object.getPrototypeOf;Wu&&rs&&ns&&qu(mm,function(e){if(typeof global[e]=="function"){var t=new global[e];if(!(Symbol.toStringTag in t))throw new EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var r=ns(t),n=rs(r,Symbol.toStringTag);if(!n){var i=ns(r);n=rs(i,Symbol.toStringTag)}Vu[e]=n.get}});var _m=function(t){var r=!1;return qu(Vu,function(n,i){if(!r)try{var o=n.call(t);o===i&&(r=o)}catch(a){}}),r},vm=ts();$u.exports=function(t){return vm(t)?Wu?_m(t):wm(ym(t),8,-1):!1}});var ac=I(ee=>{d();"use strict";var bm=Au(),Em=Tu(),ot=Hu(),Zu=ts();function rn(e){return e.call.bind(e)}var Gu=typeof BigInt!="undefined",Yu=typeof Symbol!="undefined",Ze=rn(Object.prototype.toString),Sm=rn(Number.prototype.valueOf),xm=rn(String.prototype.valueOf),Om=rn(Boolean.prototype.valueOf);Gu&&(Ku=rn(BigInt.prototype.valueOf));var Ku;Yu&&(Ju=rn(Symbol.prototype.valueOf));var Ju;function Ln(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}ee.isArgumentsObject=bm;ee.isGeneratorFunction=Em;ee.isTypedArray=Zu;function Am(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}ee.isPromise=Am;function Rm(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):Zu(e)||Xu(e)}ee.isArrayBufferView=Rm;function km(e){return ot(e)==="Uint8Array"}ee.isUint8Array=km;function Im(e){return ot(e)==="Uint8ClampedArray"}ee.isUint8ClampedArray=Im;function Tm(e){return ot(e)==="Uint16Array"}ee.isUint16Array=Tm;function Fm(e){return ot(e)==="Uint32Array"}ee.isUint32Array=Fm;function Nm(e){return ot(e)==="Int8Array"}ee.isInt8Array=Nm;function Bm(e){return ot(e)==="Int16Array"}ee.isInt16Array=Bm;function Pm(e){return ot(e)==="Int32Array"}ee.isInt32Array=Pm;function Dm(e){return ot(e)==="Float32Array"}ee.isFloat32Array=Dm;function Lm(e){return ot(e)==="Float64Array"}ee.isFloat64Array=Lm;function Cm(e){return ot(e)==="BigInt64Array"}ee.isBigInt64Array=Cm;function Um(e){return ot(e)==="BigUint64Array"}ee.isBigUint64Array=Um;function co(e){return Ze(e)==="[object Map]"}co.working=typeof Map!="undefined"&&co(new Map);function jm(e){return typeof Map=="undefined"?!1:co.working?co(e):e instanceof Map}ee.isMap=jm;function ho(e){return Ze(e)==="[object Set]"}ho.working=typeof Set!="undefined"&&ho(new Set);function Mm(e){return typeof Set=="undefined"?!1:ho.working?ho(e):e instanceof Set}ee.isSet=Mm;function po(e){return Ze(e)==="[object WeakMap]"}po.working=typeof WeakMap!="undefined"&&po(new WeakMap);function $m(e){return typeof WeakMap=="undefined"?!1:po.working?po(e):e instanceof WeakMap}ee.isWeakMap=$m;function is(e){return Ze(e)==="[object WeakSet]"}is.working=typeof WeakSet!="undefined"&&is(new WeakSet);function qm(e){return is(e)}ee.isWeakSet=qm;function yo(e){return Ze(e)==="[object ArrayBuffer]"}yo.working=typeof ArrayBuffer!="undefined"&&yo(new ArrayBuffer);function Qu(e){return typeof ArrayBuffer=="undefined"?!1:yo.working?yo(e):e instanceof ArrayBuffer}ee.isArrayBuffer=Qu;function go(e){return Ze(e)==="[object DataView]"}go.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&go(new DataView(new ArrayBuffer(1),0,1));function Xu(e){return typeof DataView=="undefined"?!1:go.working?go(e):e instanceof DataView}ee.isDataView=Xu;function mo(e){return Ze(e)==="[object SharedArrayBuffer]"}mo.working=typeof SharedArrayBuffer!="undefined"&&mo(new SharedArrayBuffer);function ec(e){return typeof SharedArrayBuffer=="undefined"?!1:mo.working?mo(e):e instanceof SharedArrayBuffer}ee.isSharedArrayBuffer=ec;function zm(e){return Ze(e)==="[object AsyncFunction]"}ee.isAsyncFunction=zm;function Wm(e){return Ze(e)==="[object Map Iterator]"}ee.isMapIterator=Wm;function Vm(e){return Ze(e)==="[object Set Iterator]"}ee.isSetIterator=Vm;function Hm(e){return Ze(e)==="[object Generator]"}ee.isGeneratorObject=Hm;function Zm(e){return Ze(e)==="[object WebAssembly.Module]"}ee.isWebAssemblyCompiledModule=Zm;function tc(e){return Ln(e,Sm)}ee.isNumberObject=tc;function rc(e){return Ln(e,xm)}ee.isStringObject=rc;function nc(e){return Ln(e,Om)}ee.isBooleanObject=nc;function ic(e){return Gu&&Ln(e,Ku)}ee.isBigIntObject=ic;function oc(e){return Yu&&Ln(e,Ju)}ee.isSymbolObject=oc;function Gm(e){return tc(e)||rc(e)||nc(e)||ic(e)||oc(e)}ee.isBoxedPrimitive=Gm;function Ym(e){return typeof Uint8Array!="undefined"&&(Qu(e)||ec(e))}ee.isAnyArrayBuffer=Ym;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(ee,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var fc=I((DS,sc)=>{d();sc.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var lc=I((LS,os)=>{d();typeof Object.create=="function"?os.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:os.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var Vt=I(te=>{d();var uc=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),a=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),as(t)?r.showHidden=t:t&&te._extend(r,t),gr(r.showHidden)&&(r.showHidden=!1),gr(r.depth)&&(r.depth=2),gr(r.colors)&&(r.colors=!1),gr(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Jm),Eo(r,e,r.depth)}te.inspect=Wt;Wt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};Wt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Jm(e,t){var r=Wt.styles[t];return r?"["+Wt.colors[r][0]+"m"+e+"["+Wt.colors[r][1]+"m":e}function Xm(e,t){return e}function Qm(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function Eo(e,t,r){if(e.customInspect&&t&&xo(t.inspect)&&t.inspect!==te.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return _o(n)||(n=Eo(e,n,r)),n}var i=ew(e,t);if(i)return i;var o=Object.keys(t),a=Qm(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),Un(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return ss(t);if(o.length===0){if(xo(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(Cn(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(So(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Un(t))return ss(t)}var l="",f=!1,u=["{","}"];if(hc(t)&&(f=!0,u=["[","]"]),xo(t)){var h=t.name?": "+t.name:"";l=" [Function"+h+"]"}if(Cn(t)&&(l=" "+RegExp.prototype.toString.call(t)),So(t)&&(l=" "+Date.prototype.toUTCString.call(t)),Un(t)&&(l=" "+ss(t)),o.length===0&&(!f||t.length==0))return u[0]+l+u[1];if(r<0)return Cn(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var p;return f?p=tw(e,t,r,a,o):p=o.map(function(c){return fs(e,t,r,a,c,f)}),e.seen.pop(),rw(p,l,u)}function ew(e,t){if(gr(t))return e.stylize("undefined","undefined");if(_o(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(pc(t))return e.stylize(""+t,"number");if(as(t))return e.stylize(""+t,"boolean");if(wo(t))return e.stylize("null","null")}function ss(e){return"["+Error.prototype.toString.call(e)+"]"}function tw(e,t,r,n,i){for(var o=[],a=0,s=t.length;a-1&&(o?s=s.split(` +`).map(function(f){return" "+f}).join(` +`).substr(2):s=` +`+s.split(` +`).map(function(f){return" "+f}).join(` +`))):s=e.stylize("[Circular]","special")),gr(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function rw(e,t,r){var n=0,i=e.reduce(function(o,a){return n++,a.indexOf(` +`)>=0&&n++,o+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(t===""?"":t+` + `)+" "+e.join(`, + `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}te.types=ac();function hc(e){return Array.isArray(e)}te.isArray=hc;function as(e){return typeof e=="boolean"}te.isBoolean=as;function wo(e){return e===null}te.isNull=wo;function nw(e){return e==null}te.isNullOrUndefined=nw;function pc(e){return typeof e=="number"}te.isNumber=pc;function _o(e){return typeof e=="string"}te.isString=_o;function iw(e){return typeof e=="symbol"}te.isSymbol=iw;function gr(e){return e===void 0}te.isUndefined=gr;function Cn(e){return nn(e)&&ls(e)==="[object RegExp]"}te.isRegExp=Cn;te.types.isRegExp=Cn;function nn(e){return typeof e=="object"&&e!==null}te.isObject=nn;function So(e){return nn(e)&&ls(e)==="[object Date]"}te.isDate=So;te.types.isDate=So;function Un(e){return nn(e)&&(ls(e)==="[object Error]"||e instanceof Error)}te.isError=Un;te.types.isNativeError=Un;function xo(e){return typeof e=="function"}te.isFunction=xo;function ow(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}te.isPrimitive=ow;te.isBuffer=fc();function ls(e){return Object.prototype.toString.call(e)}function us(e){return e<10?"0"+e.toString(10):e.toString(10)}var aw=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function sw(){var e=new Date,t=[us(e.getHours()),us(e.getMinutes()),us(e.getSeconds())].join(":");return[e.getDate(),aw[e.getMonth()],t].join(" ")}te.log=function(){console.log("%s - %s",sw(),te.format.apply(te,arguments))};te.inherits=lc();te._extend=function(e,t){if(!t||!nn(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function dc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var mr=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;te.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(mr&&t[mr]){var r=t[mr];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,mr,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,o=new Promise(function(l,f){n=l,i=f}),a=[],s=0;s{d();"use strict";function on(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?on=function(r){return typeof r}:on=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},on(e)}function uw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hw(e,t){return t&&(on(t)==="object"||typeof t=="function")?t:cw(e)}function cw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cs(e){return cs=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},cs(e)}function pw(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hs(e,t)}function hs(e,t){return hs=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},hs(e,t)}var gc={},an,ps;function jn(e,t,r){r||(r=Error);function n(o,a,s){return typeof t=="string"?t:t(o,a,s)}var i=function(o){pw(a,o);function a(s,l,f){var u;return uw(this,a),u=hw(this,cs(a).call(this,n(s,l,f))),u.code=e,u}return a}(r);gc[e]=i}function mc(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function dw(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function yw(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function gw(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}jn("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);jn("ERR_INVALID_ARG_TYPE",function(e,t,r){an===void 0&&(an=Oo()),an(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&dw(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(yw(e," argument"))i="The ".concat(e," ").concat(n," ").concat(mc(t,"type"));else{var o=gw(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(n," ").concat(mc(t,"type"))}return i+=". Received type ".concat(on(r)),i},TypeError);jn("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";ps===void 0&&(ps=Vt());var n=ps.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);jn("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(on(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);jn("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",i=t.length;switch(t=t.map(function(o){return'"'.concat(o,'"')}),i){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,i-1).join(", "),n+=", and ".concat(t[i-1]," arguments");break}return"".concat(n," must be specified")},TypeError);yc.exports.codes=gc});var Ec=I((jS,wc)=>{d();"use strict";function ww(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Rw(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var at="",$n="",qn="",Fe="",wr={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},kw=10;function bc(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function zn(e){return ms(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:Infinity,showHidden:!1,breakLength:Infinity,showProxy:!1,sorted:!0,getters:!0})}function Iw(e,t,r){var n="",i="",o=0,a="",s=!1,l=zn(e),f=l.split(` +`),u=zn(t).split(` +`),h=0,p="";if(r==="strictEqual"&&Ge(e)==="object"&&Ge(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),f.length===1&&u.length===1&&f[0]!==u[0]){var c=f[0].length+u[0].length;if(c<=kw){if((Ge(e)!=="object"||e===null)&&(Ge(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(wr[r],` + +`)+"".concat(f[0]," !== ").concat(u[0],` +`)}else if(r!=="strictEqualObject"){var m=g.stderr&&g.stderr.isTTY?g.stderr.columns:80;if(c2&&(p=` + `.concat(Rw(" ",h),"^"),h=0)}}}for(var U=f[f.length-1],T=u[u.length-1];U===T&&(h++<2?a=` + `.concat(U).concat(a):n=U,f.pop(),u.pop(),!(f.length===0||u.length===0));)U=f[f.length-1],T=u[u.length-1];var N=Math.max(f.length,u.length);if(N===0){var E=l.split(` +`);if(E.length>30)for(E[26]="".concat(at,"...").concat(Fe);E.length>27;)E.pop();return"".concat(wr.notIdentical,` + +`).concat(E.join(` +`),` +`)}h>3&&(a=` +`.concat(at,"...").concat(Fe).concat(a),s=!0),n!==""&&(a=` + `.concat(n).concat(a),n="");var S=0,_=wr[r]+` +`.concat($n,"+ actual").concat(Fe," ").concat(qn,"- expected").concat(Fe),$=" ".concat(at,"...").concat(Fe," Lines skipped");for(h=0;h1&&h>2&&(z>4?(i+=` +`.concat(at,"...").concat(Fe),s=!0):z>3&&(i+=` + `.concat(u[h-2]),S++),i+=` + `.concat(u[h-1]),S++),o=h,n+=` +`.concat(qn,"-").concat(Fe," ").concat(u[h]),S++;else if(u.length1&&h>2&&(z>4?(i+=` +`.concat(at,"...").concat(Fe),s=!0):z>3&&(i+=` + `.concat(f[h-2]),S++),i+=` + `.concat(f[h-1]),S++),o=h,i+=` +`.concat($n,"+").concat(Fe," ").concat(f[h]),S++;else{var F=u[h],V=f[h],H=V!==F&&(!vc(V,",")||V.slice(0,-1)!==F);H&&vc(F,",")&&F.slice(0,-1)===V&&(H=!1,V+=","),H?(z>1&&h>2&&(z>4?(i+=` +`.concat(at,"...").concat(Fe),s=!0):z>3&&(i+=` + `.concat(f[h-2]),S++),i+=` + `.concat(f[h-1]),S++),o=h,i+=` +`.concat($n,"+").concat(Fe," ").concat(V),n+=` +`.concat(qn,"-").concat(Fe," ").concat(F),S+=2):(i+=n,n="",(z===1||h===0)&&(i+=` + `.concat(V),S++))}if(S>20&&h30)for(h[26]="".concat(at,"...").concat(Fe);h.length>27;)h.pop();h.length===1?n=sn(this,Ht(t).call(this,"".concat(u," ").concat(h[0]))):n=sn(this,Ht(t).call(this,"".concat(u,` + +`).concat(h.join(` +`),` +`)))}else{var p=zn(s),c="",m=wr[o];o==="notDeepEqual"||o==="notEqual"?(p="".concat(wr[o],` + +`).concat(p),p.length>1024&&(p="".concat(p.slice(0,1021),"..."))):(c="".concat(zn(l)),p.length>512&&(p="".concat(p.slice(0,509),"...")),c.length>512&&(c="".concat(c.slice(0,509),"...")),o==="deepEqual"||o==="equal"?p="".concat(m,` + +`).concat(p,` + +should equal + +`):c=" ".concat(o," ").concat(c)),n=sn(this,Ht(t).call(this,"".concat(p).concat(c)))}return Error.stackTraceLimit=f,n.generatedMessage=!i,Object.defineProperty(ys(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=s,n.expected=l,n.operator=o,Error.captureStackTrace&&Error.captureStackTrace(ys(n),a),n.stack,n.name="AssertionError",sn(n)}return vw(t,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:ms.custom,value:function(n,i){return ms(this,ww({},i,{customInspect:!1,depth:0}))}}]),t}(gs(Error));wc.exports=Tw});var Oc=I((MS,Sc)=>{d();"use strict";function xc(e,t){if(e==null)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n{d();"use strict";var Rc=Object.prototype.toString;Ac.exports=function(t){var r=Rc.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Rc.call(t.callee)==="[object Function]"),n}});var Lc=I((qS,kc)=>{d();"use strict";var Ic;Object.keys||(Wn=Object.prototype.hasOwnProperty,_s=Object.prototype.toString,Tc=ws(),vs=Object.prototype.propertyIsEnumerable,Fc=!vs.call({toString:null},"toString"),Nc=vs.call(function(){},"prototype"),Vn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ro=function(e){var t=e.constructor;return t&&t.prototype===e},Bc={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Pc=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!Bc["$"+e]&&Wn.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Ro(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),Dc=function(e){if(typeof window=="undefined"||!Pc)return Ro(e);try{return Ro(e)}catch(t){return!1}},Ic=function(t){var r=t!==null&&typeof t=="object",n=_s.call(t)==="[object Function]",i=Tc(t),o=r&&_s.call(t)==="[object String]",a=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var s=Nc&&n;if(o&&t.length>0&&!Wn.call(t,0))for(var l=0;l0)for(var f=0;f{d();"use strict";var Nw=Array.prototype.slice,Bw=ws(),Uc=Object.keys,ko=Uc?function(t){return Uc(t)}:Lc(),jc=Object.keys;ko.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return Bw(n)?jc(Nw.call(n)):jc(n)})}else Object.keys=ko;return Object.keys||ko};Cc.exports=ko});var Hn=I((WS,$c)=>{d();"use strict";var Pw=Mc(),Dw=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Lw=Object.prototype.toString,Cw=Array.prototype.concat,bs=Object.defineProperty,Uw=function(e){return typeof e=="function"&&Lw.call(e)==="[object Function]"},jw=function(){var e={};try{bs(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(r){return!1}},qc=bs&&jw(),Mw=function(e,t,r,n){t in e&&(!Uw(n)||!n())||(qc?bs(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},zc=function(e,t){var r=arguments.length>2?arguments[2]:{},n=Pw(t);Dw&&(n=Cw.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i{d();"use strict";var Vc=function(e){return e!==e};Wc.exports=function(t,r){return t===0&&r===0?1/t==1/r:!!(t===r||Vc(t)&&Vc(r))}});var Ss=I((HS,Hc)=>{d();"use strict";var $w=Es();Hc.exports=function(){return typeof Object.is=="function"?Object.is:$w}});var Gc=I((ZS,Zc)=>{d();"use strict";var qw=Ss(),zw=Hn();Zc.exports=function(){var t=qw();return zw(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var xs=I((GS,Yc)=>{d();"use strict";var Ww=Hn(),Vw=oo(),Hw=Es(),Kc=Ss(),Zw=Gc(),Jc=Vw(Kc(),Object);Ww(Jc,{getPolyfill:Kc,implementation:Hw,shim:Zw});Yc.exports=Jc});var Os=I((YS,Xc)=>{d();"use strict";Xc.exports=function(t){return t!==t}});var As=I((KS,Qc)=>{d();"use strict";var Gw=Os();Qc.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:Gw}});var th=I((JS,eh)=>{d();"use strict";var Yw=Hn(),Kw=As();eh.exports=function(){var t=Kw();return Yw(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var oh=I((XS,rh)=>{d();"use strict";var Jw=oo(),Xw=Hn(),Qw=Os(),nh=As(),e_=th(),ih=Jw(nh(),Number);Xw(ih,{getPolyfill:nh,implementation:Qw,shim:e_});rh.exports=ih});var xh=I((QS,ah)=>{d();"use strict";function sh(e,t){return n_(e)||r_(e,t)||t_()}function t_(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r_(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(n=(s=a.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,o=l}finally{try{!n&&a.return!=null&&a.return()}finally{if(i)throw o}}return r}function n_(e){if(Array.isArray(e))return e}function qe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qe=function(r){return typeof r}:qe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qe(e)}var i_=/a/g.flags!==void 0,Io=function(t){var r=[];return t.forEach(function(n){return r.push(n)}),r},fh=function(t){var r=[];return t.forEach(function(n,i){return r.push([i,n])}),r},lh=Object.is?Object.is:xs(),To=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},Rs=Number.isNaN?Number.isNaN:oh();function ks(e){return e.call.bind(e)}var Zn=ks(Object.prototype.hasOwnProperty),Fo=ks(Object.prototype.propertyIsEnumerable),uh=ks(Object.prototype.toString),De=Vt().types,o_=De.isAnyArrayBuffer,a_=De.isArrayBufferView,ch=De.isDate,No=De.isMap,hh=De.isRegExp,Bo=De.isSet,s_=De.isNativeError,f_=De.isBoxedPrimitive,ph=De.isNumberObject,dh=De.isStringObject,yh=De.isBooleanObject,gh=De.isBigIntObject,l_=De.isSymbolObject,u_=De.isFloat32Array,c_=De.isFloat64Array;function h_(e){if(e.length===0||e.length>10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function Po(e){return Object.keys(e).filter(h_).concat(To(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function mh(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i{d();"use strict";function Zt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zt=function(r){return typeof r}:Zt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Zt(e)}function R_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var k_=ds(),Yn=k_.codes,Ah=Yn.ERR_AMBIGUOUS_ARGUMENT,Kn=Yn.ERR_INVALID_ARG_TYPE,I_=Yn.ERR_INVALID_ARG_VALUE,T_=Yn.ERR_INVALID_RETURN_VALUE,Gt=Yn.ERR_MISSING_ARGS,_r=Ec(),F_=Vt(),N_=F_.inspect,Rh=Vt().types,B_=Rh.isPromise,Fs=Rh.isRegExp,P_=Object.assign?Object.assign:Oc().assign,kh=Object.is?Object.is:xs(),ex=new Map,Yt,Lo;function Jn(){var e=xh();Yt=e.isDeepEqual,Lo=e.isDeepStrictEqual}var Ih=!1,ye=Oh.exports=Ns,Co={};function st(e){throw e.message instanceof Error?e.message:new _r(e)}function Th(e,t,r,n,i){var o=arguments.length,a;if(o===0)a="Failed";else if(o===1)r=e,e=void 0;else{if(Ih===!1){Ih=!0;var s=g.emitWarning?g.emitWarning:console.warn.bind(console);s("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}o===2&&(n="!=")}if(r instanceof Error)throw r;var l={actual:e,expected:t,operator:n===void 0?"fail":n,stackStartFn:i||Th};r!==void 0&&(l.message=r);var f=new _r(l);throw a&&(f.message=a,f.generatedMessage=!0),f}ye.fail=Th;ye.AssertionError=_r;function Fh(e,t,r,n){if(!r){var i=!1;if(t===0)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new _r({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function Ns(){for(var e=arguments.length,t=new Array(e),r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{d();"use strict";var $h=Re&&Re.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Re,"__esModule",{value:!0});Re.E=Re.AssertionError=Re.message=Re.RangeError=Re.TypeError=Re.Error=void 0;var Kt=Oo(),Bs=Vt(),qh=typeof Symbol=="undefined"?"_kCode":Symbol("code"),zh={};function Ps(e){return function(t){$h(r,t);function r(n){for(var i=[],o=1;o 0 and < 65536");B("ERR_SOCKET_BAD_TYPE","Bad socket type specified. Valid types are: udp4, udp6");B("ERR_SOCKET_CANNOT_SEND","Unable to send data");B("ERR_SOCKET_CLOSED","Socket is closed");B("ERR_SOCKET_DGRAM_NOT_RUNNING","Not running");B("ERR_STDERR_CLOSE","process.stderr cannot be closed");B("ERR_STDOUT_CLOSE","process.stdout cannot be closed");B("ERR_STREAM_WRAP","Stream has StringDecoder set or is in objectMode");B("ERR_TLS_CERT_ALTNAME_INVALID","Hostname/IP does not match certificate's altnames: %s");B("ERR_TLS_DH_PARAM_SIZE",function(e){return"DH parameter size "+e+" is less than 2048"});B("ERR_TLS_HANDSHAKE_TIMEOUT","TLS handshake timeout");B("ERR_TLS_RENEGOTIATION_FAILED","Failed to renegotiate");B("ERR_TLS_REQUIRED_SERVER_NAME",'"servername" is required parameter for Server.addContext');B("ERR_TLS_SESSION_ATTACK","TSL session renegotiation attack detected");B("ERR_TRANSFORM_ALREADY_TRANSFORMING","Calling transform done when still transforming");B("ERR_TRANSFORM_WITH_LENGTH_0","Calling transform done when writableState.length != 0");B("ERR_UNKNOWN_ENCODING","Unknown encoding: %s");B("ERR_UNKNOWN_SIGNAL","Unknown signal: %s");B("ERR_UNKNOWN_STDIN_TYPE","Unknown stdin file type");B("ERR_UNKNOWN_STREAM_TYPE","Unknown stream file type");B("ERR_V8BREAKITERATOR","Full ICU data not installed. See https://github.com/nodejs/node/wiki/Intl");function U_(e,t,r){Kt(e,"name is required");var n;t.includes("not ")?(n="must not be",t=t.split("not ")[1]):n="must be";var i;if(Array.isArray(e)){var o=e.map(function(s){return'"'+s+'"'}).join(", ");i="The "+o+" arguments "+n+" "+Uo(t,"type")}else if(e.includes(" argument"))i="The "+e+" "+n+" "+Uo(t,"type");else{var a=e.includes(".")?"property":"argument";i='The "'+e+'" '+a+" "+n+" "+Uo(t,"type")}return arguments.length>=3&&(i+=". Received type "+(r!==null?typeof r:"null")),i}function j_(){for(var e=[],t=0;t0,"At least one arg needs to be specified");var r="The ",n=e.length;switch(e=e.map(function(i){return'"'+i+'"'}),n){case 1:r+=e[0]+" argument";break;case 2:r+=e[0]+" and "+e[1]+" arguments";break;default:r+=e.slice(0,n-1).join(", "),r+=", and "+e[n-1]+" arguments";break}return r+" must be specified"}function Uo(e,t){if(Kt(e,"expected is required"),Kt(typeof t=="string","thing is required"),Array.isArray(e)){var r=e.length;return Kt(r>0,"At least one expected value needs to be specified"),e=e.map(function(n){return String(n)}),r>2?"one of "+t+" "+e.slice(0,r-1).join(", ")+", or "+e[r-1]:r===2?"one of "+t+" "+e[0]+" or "+e[1]:"of "+t+" "+e[0]}else return"of "+t+" "+String(e)}function C_(e,t){return t?"Attempt to write outside buffer bounds":'"'+e+'" is outside of buffer bounds'}});var Cs=I(At=>{d();"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.strToEncoding=At.assertEncoding=At.ENCODING_UTF8=void 0;var Ls=Ji(),M_=Ds();At.ENCODING_UTF8="utf8";function $_(e){if(e&&!Ls.Buffer.isEncoding(e))throw new M_.TypeError("ERR_INVALID_OPT_VALUE_ENCODING",e)}At.assertEncoding=$_;function q_(e,t){return!t||t===At.ENCODING_UTF8?e:t==="buffer"?new Ls.Buffer(e):new Ls.Buffer(e).toString(t)}At.strToEncoding=q_});var Us=I(Xn=>{d();"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.Dirent=void 0;var Jt=Kr(),z_=Cs(),W_=Jt.constants.S_IFMT,V_=Jt.constants.S_IFDIR,H_=Jt.constants.S_IFREG,Z_=Jt.constants.S_IFBLK,G_=Jt.constants.S_IFCHR,Y_=Jt.constants.S_IFLNK,K_=Jt.constants.S_IFIFO,J_=Jt.constants.S_IFSOCK,Vh=function(){function e(){this.name="",this.mode=0}return e.build=function(t,r){var n=new e,i=t.getNode().mode;return n.name=z_.strToEncoding(t.getName(),r),n.mode=i,n},e.prototype._checkModeProperty=function(t){return(this.mode&W_)===t},e.prototype.isDirectory=function(){return this._checkModeProperty(V_)},e.prototype.isFile=function(){return this._checkModeProperty(H_)},e.prototype.isBlockDevice=function(){return this._checkModeProperty(Z_)},e.prototype.isCharacterDevice=function(){return this._checkModeProperty(G_)},e.prototype.isSymbolicLink=function(){return this._checkModeProperty(Y_)},e.prototype.isFIFO=function(){return this._checkModeProperty(K_)},e.prototype.isSocket=function(){return this._checkModeProperty(J_)},e}();Xn.Dirent=Vh;Xn.default=Vh});var Kh=I((ox,Hh)=>{d();var ve=Hh.exports={},dt,yt;function js(){throw new Error("setTimeout has not been defined")}function Ms(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?dt=setTimeout:dt=js}catch(e){dt=js}try{typeof clearTimeout=="function"?yt=clearTimeout:yt=Ms}catch(e){yt=Ms}})();function Zh(e){if(dt===setTimeout)return setTimeout(e,0);if((dt===js||!dt)&&setTimeout)return dt=setTimeout,setTimeout(e,0);try{return dt(e,0)}catch(t){try{return dt.call(null,e,0)}catch(r){return dt.call(this,e,0)}}}function X_(e){if(yt===clearTimeout)return clearTimeout(e);if((yt===Ms||!yt)&&clearTimeout)return yt=clearTimeout,clearTimeout(e);try{return yt(e)}catch(t){try{return yt.call(null,e)}catch(r){return yt.call(this,e)}}}var Rt=[],fn=!1,vr,jo=-1;function Q_(){!fn||!vr||(fn=!1,vr.length?Rt=vr.concat(Rt):jo=-1,Rt.length&&Gh())}function Gh(){if(!fn){var e=Zh(Q_);fn=!0;for(var t=Rt.length;t;){for(vr=Rt,Rt=[];++jo1)for(var r=1;r{d();"use strict";Object.defineProperty($s,"__esModule",{value:!0});var qs;typeof setImmediate=="function"?qs=setImmediate.bind(global):qs=setTimeout.bind(global);$s.default=qs});var Ws=I(Qn=>{d();"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.createProcess=void 0;var ev=function(){if(typeof g!="undefined")return g;try{return Kh()}catch(e){return}};function Jh(){var e=ev()||{};return e.getuid||(e.getuid=function(){return 0}),e.getgid||(e.getgid=function(){return 0}),e.cwd||(e.cwd=function(){return"/"}),e.nextTick||(e.nextTick=zs().default),e.emitWarning||(e.emitWarning=function(t,r){console.warn(""+r+(r?": ":"")+t)}),e.env||(e.env={}),e}Qn.createProcess=Jh;Qn.default=Jh()});var Hs=I((fx,Vs)=>{d();"use strict";var ln=typeof Reflect=="object"?Reflect:null,Xh=ln&&typeof ln.apply=="function"?ln.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Mo;ln&&typeof ln.ownKeys=="function"?Mo=ln.ownKeys:Object.getOwnPropertySymbols?Mo=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Mo=function(t){return Object.getOwnPropertyNames(t)};function tv(e){console&&console.warn&&console.warn(e)}var Qh=Number.isNaN||function(t){return t!==t};function pe(){pe.init.call(this)}Vs.exports=pe;Vs.exports.once=rv;pe.EventEmitter=pe;pe.prototype._events=void 0;pe.prototype._eventsCount=0;pe.prototype._maxListeners=void 0;var ep=10;function $o(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(pe,"defaultMaxListeners",{enumerable:!0,get:function(){return ep},set:function(e){if(typeof e!="number"||e<0||Qh(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ep=e}});pe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};pe.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Qh(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function tp(e){return e._maxListeners===void 0?pe.defaultMaxListeners:e._maxListeners}pe.prototype.getMaxListeners=function(){return tp(this)};pe.prototype.emit=function(t){for(var r=[],n=1;n0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[t];if(l===void 0)return!1;if(typeof l=="function")Xh(l,this,r);else for(var f=l.length,u=rp(l,f),n=0;n0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,tv(s)}return e}pe.prototype.addListener=function(t,r){return np(this,t,r,!1)};pe.prototype.on=pe.prototype.addListener;pe.prototype.prependListener=function(t,r){return np(this,t,r,!0)};function nv(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ip(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=nv.bind(n);return i.listener=r,n.wrapFn=i,i}pe.prototype.once=function(t,r){return $o(r),this.on(t,ip(this,t,r)),this};pe.prototype.prependOnceListener=function(t,r){return $o(r),this.prependListener(t,ip(this,t,r)),this};pe.prototype.removeListener=function(t,r){var n,i,o,a,s;if($o(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount==0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,o=a;break}if(o<0)return this;o===0?n.shift():iv(n,o),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};pe.prototype.off=pe.prototype.removeListener;pe.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var o=Object.keys(n),a;for(i=0;i=0;i--)this.removeListener(t,r[i]);return this};function op(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?ov(i):rp(i,i.length)}pe.prototype.listeners=function(t){return op(this,t,!0)};pe.prototype.rawListeners=function(t){return op(this,t,!1)};pe.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):ap.call(e,t)};pe.prototype.listenerCount=ap;function ap(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}pe.prototype.eventNames=function(){return this._eventsCount>0?Mo(this._events):[]};function rp(e,t){for(var r=new Array(t),n=0;n{d();"use strict";var fp=ze&&ze.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ze,"__esModule",{value:!0});ze.File=ze.Link=ze.Node=ze.SEP=void 0;var un=Ws(),gt=Ji(),ei=Kr(),lp=Hs(),sv=Ki(),qo=ei.constants.S_IFMT,up=ei.constants.S_IFDIR,Zs=ei.constants.S_IFREG,cp=ei.constants.S_IFLNK,fv=ei.constants.O_APPEND;ze.SEP="/";var lv=function(e){fp(t,e);function t(r,n){n===void 0&&(n=438);var i=e.call(this)||this;return i.uid=un.default.getuid(),i.gid=un.default.getgid(),i.atime=new Date,i.mtime=new Date,i.ctime=new Date,i.perm=438,i.mode=Zs,i.nlink=1,i.perm=n,i.mode|=n,i.ino=r,i}return t.prototype.getString=function(r){return r===void 0&&(r="utf8"),this.getBuffer().toString(r)},t.prototype.setString=function(r){this.buf=gt.bufferFrom(r,"utf8"),this.touch()},t.prototype.getBuffer=function(){return this.buf||this.setBuffer(gt.bufferAllocUnsafe(0)),gt.bufferFrom(this.buf)},t.prototype.setBuffer=function(r){this.buf=gt.bufferFrom(r),this.touch()},t.prototype.getSize=function(){return this.buf?this.buf.length:0},t.prototype.setModeProperty=function(r){this.mode=this.mode&~qo|r},t.prototype.setIsFile=function(){this.setModeProperty(Zs)},t.prototype.setIsDirectory=function(){this.setModeProperty(up)},t.prototype.setIsSymlink=function(){this.setModeProperty(cp)},t.prototype.isFile=function(){return(this.mode&qo)===Zs},t.prototype.isDirectory=function(){return(this.mode&qo)===up},t.prototype.isSymlink=function(){return(this.mode&qo)===cp},t.prototype.makeSymlink=function(r){this.symlink=r,this.setIsSymlink()},t.prototype.write=function(r,n,i,o){if(n===void 0&&(n=0),i===void 0&&(i=r.length),o===void 0&&(o=0),this.buf||(this.buf=gt.bufferAllocUnsafe(0)),o+i>this.buf.length){var a=gt.bufferAllocUnsafe(o+i);this.buf.copy(a,0,0,this.buf.length),this.buf=a}return r.copy(this.buf,o,n,n+i),this.touch(),i},t.prototype.read=function(r,n,i,o){n===void 0&&(n=0),i===void 0&&(i=r.byteLength),o===void 0&&(o=0),this.buf||(this.buf=gt.bufferAllocUnsafe(0));var a=i;return a>r.byteLength&&(a=r.byteLength),a+o>this.buf.length&&(a=this.buf.length-o),this.buf.copy(r,n,o,o+a),a},t.prototype.truncate=function(r){if(r===void 0&&(r=0),!r)this.buf=gt.bufferAllocUnsafe(0);else if(this.buf||(this.buf=gt.bufferAllocUnsafe(0)),r<=this.buf.length)this.buf=this.buf.slice(0,r);else{var n=gt.bufferAllocUnsafe(0);this.buf.copy(n),n.fill(0,r)}this.touch()},t.prototype.chmod=function(r){this.perm=r,this.mode=this.mode&~511|r,this.touch()},t.prototype.chown=function(r,n){this.uid=r,this.gid=n,this.touch()},t.prototype.touch=function(){this.mtime=new Date,this.emit("change",this)},t.prototype.canRead=function(r,n){return r===void 0&&(r=un.default.getuid()),n===void 0&&(n=un.default.getgid()),!!(this.perm&4||n===this.gid&&this.perm&32||r===this.uid&&this.perm&256)},t.prototype.canWrite=function(r,n){return r===void 0&&(r=un.default.getuid()),n===void 0&&(n=un.default.getgid()),!!(this.perm&2||n===this.gid&&this.perm&16||r===this.uid&&this.perm&128)},t.prototype.del=function(){this.emit("delete",this)},t.prototype.toJSON=function(){return{ino:this.ino,uid:this.uid,gid:this.gid,atime:this.atime.getTime(),mtime:this.mtime.getTime(),ctime:this.ctime.getTime(),perm:this.perm,mode:this.mode,nlink:this.nlink,symlink:this.symlink,data:this.getString()}},t}(lp.EventEmitter);ze.Node=lv;var uv=function(e){fp(t,e);function t(r,n,i){var o=e.call(this)||this;return o.children={},o.steps=[],o.ino=0,o.length=0,o.vol=r,o.parent=n,o.steps=n?n.steps.concat([i]):[i],o}return t.prototype.setNode=function(r){this.node=r,this.ino=r.ino},t.prototype.getNode=function(){return this.node},t.prototype.createChild=function(r,n){n===void 0&&(n=this.vol.createNode());var i=new t(this.vol,this,r);return i.setNode(n),n.isDirectory(),this.setChild(r,i),i},t.prototype.setChild=function(r,n){return n===void 0&&(n=new t(this.vol,this,r)),this.children[r]=n,n.parent=this,this.length++,this.emit("child:add",n,this),n},t.prototype.deleteChild=function(r){delete this.children[r.getName()],this.length--,this.emit("child:delete",r,this)},t.prototype.getChild=function(r){if(Object.hasOwnProperty.call(this.children,r))return this.children[r]},t.prototype.getPath=function(){return this.steps.join(ze.SEP)},t.prototype.getName=function(){return this.steps[this.steps.length-1]},t.prototype.walk=function(r,n,i){if(n===void 0&&(n=r.length),i===void 0&&(i=0),i>=r.length)return this;if(i>=n)return this;var o=r[i],a=this.getChild(o);return a?a.walk(r,n,i+1):null},t.prototype.toJSON=function(){return{steps:this.steps,ino:this.ino,children:Object.keys(this.children)}},t}(lp.EventEmitter);ze.Link=uv;var cv=function(){function e(t,r,n,i){this.position=0,this.link=t,this.node=r,this.flags=n,this.fd=i}return e.prototype.getString=function(t){return t===void 0&&(t="utf8"),this.node.getString()},e.prototype.setString=function(t){this.node.setString(t)},e.prototype.getBuffer=function(){return this.node.getBuffer()},e.prototype.setBuffer=function(t){this.node.setBuffer(t)},e.prototype.getSize=function(){return this.node.getSize()},e.prototype.truncate=function(t){this.node.truncate(t)},e.prototype.seekTo=function(t){this.position=t},e.prototype.stats=function(){return sv.default.build(this.node)},e.prototype.write=function(t,r,n,i){r===void 0&&(r=0),n===void 0&&(n=t.length),typeof i!="number"&&(i=this.position),this.flags&fv&&(i=this.getSize());var o=this.node.write(t,r,n,i);return this.position=i+o,o},e.prototype.read=function(t,r,n,i){r===void 0&&(r=0),n===void 0&&(n=t.byteLength),typeof i!="number"&&(i=this.position);var o=this.node.read(t,r,n,i);return this.position=i+o,o},e.prototype.chmod=function(t){this.node.chmod(t)},e.prototype.chown=function(t,r){this.node.chown(t,r)},e}();ze.File=cv});var pp=I(Gs=>{d();"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});function hv(e,t,r){var n=setTimeout.apply(null,arguments);return n&&typeof n=="object"&&typeof n.unref=="function"&&n.unref(),n}Gs.default=hv});var yp=I((cx,dp)=>{d();dp.exports=We;function We(e){if(e)return pv(e)}function pv(e){for(var t in We.prototype)e[t]=We.prototype[t];return e}We.prototype.on=We.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this};We.prototype.once=function(e,t){var r=this;this._callbacks=this._callbacks||{};function n(){r.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};We.prototype.off=We.prototype.removeListener=We.prototype.removeAllListeners=We.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks[e];if(!r)return this;if(arguments.length==1)return delete this._callbacks[e],this;for(var n,i=0;i{d();var mp=yp();function ti(){mp.call(this)}ti.prototype=new mp;gp.exports=ti;ti.Stream=ti;ti.prototype.pipe=function(e,t){var r=this;function n(u){e.writable&&e.write(u)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function l(u){if(f(),!this.hasListeners("error"))throw u}r.on("error",l),e.on("error",l);function f(){r.off("data",n),e.off("drain",i),r.off("end",a),r.off("close",s),r.off("error",l),e.off("error",l),r.off("end",f),r.off("close",f),e.off("end",f),e.off("close",f)}return r.on("end",f),r.on("close",f),e.on("end",f),e.on("close",f),e.emit("pipe",r),e}});var vp=I(br=>{d();"use strict";var _p=br&&br.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r{d();(function(e){var t=typeof hn=="object"&&hn&&!hn.nodeType&&hn,r=typeof pn=="object"&&pn&&!pn.nodeType&&pn,n=typeof global=="object"&&global;(n.global===n||n.window===n||n.self===n)&&(e=n);var i,o=2147483647,a=36,s=1,l=26,f=38,u=700,h=72,p=128,c="-",m=/^xn--/,U=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,N={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=a-s,S=Math.floor,_=String.fromCharCode,$;function z(A){throw RangeError(N[A])}function F(A,k){for(var q=A.length,G=[];q--;)G[q]=k(A[q]);return G}function V(A,k){var q=A.split("@"),G="";q.length>1&&(G=q[0]+"@",A=q[1]),A=A.replace(T,".");var j=A.split("."),J=F(j,k).join(".");return G+J}function H(A){for(var k=[],q=0,G=A.length,j,J;q=55296&&j<=56319&&q65535&&(k-=65536,q+=_(k>>>10&1023|55296),k=56320|k&1023),q+=_(k),q}).join("")}function v(A){return A-48<10?A-22:A-65<26?A-65:A-97<26?A-97:a}function R(A,k){return A+22+75*(A<26)-((k!=0)<<5)}function P(A,k,q){var G=0;for(A=q?S(A/u):A>>1,A+=S(A/k);A>E*l>>1;G+=a)A=S(A/E);return S(G+(E+1)*A/(A+f))}function ue(A){var k=[],q=A.length,G,j=0,J=p,Y=h,M,W,ae,x,D,L,Z,ne,me;for(M=A.lastIndexOf(c),M<0&&(M=0),W=0;W=128&&z("not-basic"),k.push(A.charCodeAt(W));for(ae=M>0?M+1:0;ae=q&&z("invalid-input"),Z=v(A.charCodeAt(ae++)),(Z>=a||Z>S((o-j)/D))&&z("overflow"),j+=Z*D,ne=L<=Y?s:L>=Y+l?l:L-Y,!(ZS(o/me)&&z("overflow"),D*=me;G=k.length+1,Y=P(j-x,G,x==0),S(j/G)>o-J&&z("overflow"),J+=S(j/G),j%=G,k.splice(j++,0,J)}return b(k)}function oe(A){var k,q,G,j,J,Y,M,W,ae,x,D,L=[],Z,ne,me,we;for(A=H(A),Z=A.length,k=p,q=0,J=h,Y=0;Y=k&&DS((o-q)/ne)&&z("overflow"),q+=(M-k)*ne,k=M,Y=0;Yo&&z("overflow"),D==k){for(W=q,ae=a;x=ae<=J?s:ae>=J+l?l:ae-J,!(W{d();"use strict";Ep.exports={isString:function(e){return typeof e=="string"},isObject:function(e){return typeof e=="object"&&e!==null},isNull:function(e){return e===null},isNullOrUndefined:function(e){return e==null}}});var Op=I((yx,xp)=>{d();"use strict";function yv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}xp.exports=function(e,t,r,n){t=t||"&",r=r||"=";var i={};if(typeof e!="string"||e.length===0)return i;var o=/\+/g;e=e.split(t);var a=1e3;n&&typeof n.maxKeys=="number"&&(a=n.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var l=0;l=0?(h=f.substr(0,u),p=f.substr(u+1)):(h=f,p=""),c=decodeURIComponent(h),m=decodeURIComponent(p),yv(i,c)?Array.isArray(i[c])?i[c].push(m):i[c]=[i[c],m]:i[c]=m}return i}});var Rp=I((gx,Ap)=>{d();"use strict";var ri=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};Ap.exports=function(e,t,r,n){return t=t||"&",r=r||"=",e===null&&(e=void 0),typeof e=="object"?Object.keys(e).map(function(i){var o=encodeURIComponent(ri(i))+r;return Array.isArray(e[i])?e[i].map(function(a){return o+encodeURIComponent(ri(a))}).join(t):o+encodeURIComponent(ri(e[i]))}).join(t):n?encodeURIComponent(ri(n))+r+encodeURIComponent(ri(e)):""}});var kp=I(ni=>{d();"use strict";ni.decode=ni.parse=Op();ni.encode=ni.stringify=Rp()});var Np=I(dn=>{d();"use strict";var gv=bp(),mt=Sp();dn.parse=ii;dn.resolve=mv;dn.resolveObject=wv;dn.format=_v;dn.Url=Ke;function Ke(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var vv=/^([a-z0-9.+-]+:)/i,bv=/:[0-9]*$/,Ev=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Sv=["<",">",'"',"`"," ","\r",` +`," "],xv=["{","}","|","\\","^","`"].concat(Sv),Ys=["'"].concat(xv),Ip=["%","/","?",";","#"].concat(Ys),Tp=["/","?","#"],Ov=255,Fp=/^[+a-z0-9A-Z_-]{0,63}$/,Av=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Rv={javascript:!0,"javascript:":!0},Ks={javascript:!0,"javascript:":!0},yn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Js=kp();function ii(e,t,r){if(e&&mt.isObject(e)&&e instanceof Ke)return e;var n=new Ke;return n.parse(e,t,r),n}Ke.prototype.parse=function(e,t,r){if(!mt.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n127?$+="x":$+=_[z];if(!$.match(Fp)){var V=E.slice(0,c),H=E.slice(c+1),b=_.match(Av);b&&(V.push(b[1]),H.unshift(b[2])),H.length&&(s="/"+H.join(".")+s),this.hostname=V.join(".");break}}}this.hostname.length>Ov?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=gv.toASCII(this.hostname));var v=this.port?":"+this.port:"",R=this.hostname||"";this.host=R+v,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!=="/"&&(s="/"+s))}if(!Rv[u])for(var c=0,S=Ys.length;c0?r.host.split("@"):!1;$&&(r.auth=$.shift(),r.host=r.hostname=$.shift())}return r.search=e.search,r.query=e.query,(!mt.isNull(r.pathname)||!mt.isNull(r.search))&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var z=E.slice(-1)[0],F=(r.host||e.host||E.length>1)&&(z==="."||z==="..")||z==="",V=0,H=E.length;H>=0;H--)z=E[H],z==="."?E.splice(H,1):z===".."?(E.splice(H,1),V++):V&&(E.splice(H,1),V--);if(!T&&!N)for(;V--;V)E.unshift("..");T&&E[0]!==""&&(!E[0]||E[0].charAt(0)!=="/")&&E.unshift(""),F&&E.join("/").substr(-1)!=="/"&&E.push("");var b=E[0]===""||E[0]&&E[0].charAt(0)==="/";if(_){r.hostname=r.host=b?"":E.length?E.shift():"";var $=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;$&&(r.auth=$.shift(),r.host=r.hostname=$.shift())}return T=T||r.host&&E.length,T&&!b&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),(!mt.isNull(r.pathname)||!mt.isNull(r.search))&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r};Ke.prototype.parseHost=function(){var e=this.host,t=bv.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}});var Dp=I(zo=>{d();"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.unixify=Bp;zo.correctPath=kv;var Pp=g.platform==="win32";function Tv(e){var t=e.length-1;if(t<2)return e;for(;Iv(e,t);)t--;return e.substr(0,t+1)}function Iv(e,t){var r=e[t];return t>0&&(r==="/"||Pp&&r==="\\")}function Fv(e,t){if(typeof e!="string")throw new TypeError("expected a string");return e=e.replace(/[\\\/]+/g,"/"),t!==!1&&(e=Tv(e)),e}function Bp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Pp?(e=Fv(e,t),e.replace(/^([a-zA-Z]+:|\.\/)/,"")):e}function kv(e){return Bp(e.replace(/^\\\\\?\\.:\\/,"\\"))}});var ud=I(fe=>{d();"use strict";var gn=fe&&fe.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wo=fe&&fe.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r>>0===e}function ui(e){if(!Ar(e))throw TypeError(Nt.FD)}function Bt(e){if(typeof e=="string"&&+e==e)return+e;if(e instanceof Date)return e.getTime()/1e3;if(isFinite(e))return e<0?Date.now()/1e3:e;throw new Error("Cannot parse time: "+e)}fe.toUnixTimestamp=Bt;function _n(e){if(typeof e!="number")throw TypeError(Nt.UID)}function vn(e){if(typeof e!="number")throw TypeError(Nt.GID)}function nb(e){var t={};function r(n,i){for(var o in i){var a=i[o],s=jv(n,o);typeof a=="string"?t[s]=a:typeof a=="object"&&a!==null&&Object.keys(a).length>0?r(s,a):t[s]=null}}return r("",e),t}var ib=function(){function e(t){t===void 0&&(t={}),this.ino=0,this.inodes={},this.releasedInos=[],this.fds={},this.releasedFds=[],this.maxFiles=1e4,this.openFiles=0,this.promisesApi=Pv.default(this),this.statWatchers={},this.props=Object.assign({Node:Xs.Node,Link:Xs.Link,File:Xs.File},t);var r=this.createLink();r.setNode(this.createNode(!0));var n=this;this.StatWatcher=function(a){gn(s,a);function s(){return a.call(this,n)||this}return s}(fd);var i=lt;this.ReadStream=function(a){gn(s,a);function s(){for(var l=[],f=0;f=this.maxFiles)throw X(qp,"open",t.getPath());var i=t;if(n&&(i=this.resolveSymlinks(t)),!i)throw X(be,"open",t.getPath());var o=i.getNode();if(o.isDirectory()){if((r&(Go|Tt|mn))!==Go)throw X(nf,"open",t.getPath())}else if(r&Lv)throw X(Sr,"open",t.getPath());if(!(r&mn)&&!o.canRead())throw X(zp,"open",t.getPath());r&Tt;var a=new this.props.File(t,o,r,this.newFdNumber());return this.fds[a.fd]=a,this.openFiles++,r&oi&&a.truncate(),a},e.prototype.openFile=function(t,r,n,i){i===void 0&&(i=!0);var o=Ee(t),a=i?this.getResolvedLink(o):this.getLink(o);if(!a&&r&ft){var s=this.getResolvedLink(o.slice(0,o.length-1));if(!s)throw X(be,"open",Ft+o.join(Ft));r&ft&&typeof n=="number"&&(a=this.createLink(s,o[o.length-1],!1,n))}if(a)return this.openLink(a,r,i);throw X(be,"open",t)},e.prototype.openBase=function(t,r,n,i){i===void 0&&(i=!0);var o=this.openFile(t,r,n,i);if(!o)throw X(be,"open",t);return o.fd},e.prototype.openSync=function(t,r,n){n===void 0&&(n=438);var i=Ve(n),o=C(t),a=Or(r);return this.openBase(o,a,i)},e.prototype.open=function(t,r,n,i){var o=n,a=i;typeof n=="function"&&(o=438,a=n),o=o||438;var s=Ve(o),l=C(t),f=Or(r);this.wrapAsync(this.openBase,[l,f,s],a)},e.prototype.closeFile=function(t){!this.fds[t.fd]||(this.openFiles--,delete this.fds[t.fd],this.releasedFds.push(t.fd))},e.prototype.closeSync=function(t){ui(t);var r=this.getFileByFdOrThrow(t,"close");this.closeFile(r)},e.prototype.close=function(t,r){ui(t),this.wrapAsync(this.closeSync,[t],r)},e.prototype.openFileOrGetById=function(t,r,n){if(typeof t=="number"){var i=this.fds[t];if(!i)throw X(be);return i}else return this.openFile(C(t),r,n)},e.prototype.readBase=function(t,r,n,i,o){var a=this.getFileByFdOrThrow(t);return a.read(r,Number(n),Number(i),o)},e.prototype.readSync=function(t,r,n,i,o){return ui(t),this.readBase(t,r,n,i,o)},e.prototype.read=function(t,r,n,i,o,a){var s=this;if(je(a),i===0)return Xt.default.nextTick(function(){a&&a(null,0,r)});Ho.default(function(){try{var l=s.readBase(t,r,n,i,o);a(null,l,r)}catch(f){a(f)}})},e.prototype.readFileBase=function(t,r,n){var i,o=typeof t=="number",a=o&&Ar(t),s;if(a)s=t;else{var l=C(t),f=Ee(l),u=this.getResolvedLink(f);if(u){var h=u.getNode();if(h.isDirectory())throw X(nf,"open",u.getPath())}s=this.openSync(t,r)}try{i=sd(this.getFileByFdOrThrow(s).getBuffer(),n)}finally{a||this.closeSync(s)}return i},e.prototype.readFileSync=function(t,r){var n=Gp(r),i=Or(n.flag);return this.readFileBase(t,i,n.encoding)},e.prototype.readFile=function(t,r,n){var i=si(Gp)(r,n),o=i[0],a=i[1],s=Or(o.flag);this.wrapAsync(this.readFileBase,[t,s,o.encoding],a)},e.prototype.writeBase=function(t,r,n,i,o){var a=this.getFileByFdOrThrow(t,"write");return a.write(r,n,i,o)},e.prototype.writeSync=function(t,r,n,i,o){ui(t);var a,s,l,f,u=typeof r!="string";u?(s=(n||0)|0,l=i,f=o):(f=n,a=i);var h=li(r,a);return u?typeof l=="undefined"&&(l=h.length):(s=0,l=h.length),this.writeBase(t,h,s,l,f)},e.prototype.write=function(t,r,n,i,o,a){var s=this;ui(t);var l,f,u,h,p,c=typeof r,m=typeof n,U=typeof i,T=typeof o;c!=="string"?m==="function"?p=n:U==="function"?(l=n|0,p=i):T==="function"?(l=n|0,f=i,p=o):(l=n|0,f=i,u=o,p=a):m==="function"?p=n:U==="function"?(u=n,p=i):T==="function"&&(u=n,h=i,p=o);var N=li(r,h);c!=="string"?typeof f=="undefined"&&(f=N.length):(l=0,f=N.length);var E=je(p);Ho.default(function(){try{var S=s.writeBase(t,N,l,f,u);c!=="string"?E(null,S,N):E(null,S,r)}catch(_){E(_)}})},e.prototype.writeFileBase=function(t,r,n,i){var o=typeof t=="number",a;o?a=t:a=this.openBase(C(t),n,i);var s=0,l=r.length,f=n&ai?void 0:0;try{for(;l>0;){var u=this.writeSync(a,r,s,l,f);s+=u,l-=u,f!==void 0&&(f+=u)}}finally{o||this.closeSync(a)}},e.prototype.writeFileSync=function(t,r,n){var i=Kp(n),o=Or(i.flag),a=Ve(i.mode),s=li(r,i.encoding);this.writeFileBase(t,s,o,a)},e.prototype.writeFile=function(t,r,n,i){var o=n,a=i;typeof n=="function"&&(o=Yp,a=n);var s=je(a),l=Kp(o),f=Or(l.flag),u=Ve(l.mode),h=li(r,l.encoding);this.wrapAsync(this.writeFileBase,[t,h,f,u],s)},e.prototype.linkBase=function(t,r){var n=Ee(t),i=this.getLink(n);if(!i)throw X(be,"link",t,r);var o=Ee(r),a=this.getLinkParent(o);if(!a)throw X(be,"link",t,r);var s=o[o.length-1];if(a.getChild(s))throw X(Er,"link",t,r);var l=i.getNode();l.nlink++,a.createChild(s,l)},e.prototype.copyFileBase=function(t,r,n){var i=this.readFileSync(t);if(n&Cv&&this.existsSync(r))throw X(Er,"copyFile",t,r);if(n&Uv)throw X(Vp,"copyFile",t,r);this.writeFileBase(r,i,xr.w,438)},e.prototype.copyFileSync=function(t,r,n){var i=C(t),o=C(r);return this.copyFileBase(i,o,(n||0)|0)},e.prototype.copyFile=function(t,r,n,i){var o=C(t),a=C(r),s,l;typeof n=="function"?(s=0,l=n):(s=n,l=i),je(l),this.wrapAsync(this.copyFileBase,[o,a,s],l)},e.prototype.linkSync=function(t,r){var n=C(t),i=C(r);this.linkBase(n,i)},e.prototype.link=function(t,r,n){var i=C(t),o=C(r);this.wrapAsync(this.linkBase,[i,o],n)},e.prototype.unlinkBase=function(t){var r=Ee(t),n=this.getLink(r);if(!n)throw X(be,"unlink",t);if(n.length)throw Error("Dir not empty...");this.deleteLink(n);var i=n.getNode();i.nlink--,i.nlink<=0&&this.deleteNode(i)},e.prototype.unlinkSync=function(t){var r=C(t);this.unlinkBase(r)},e.prototype.unlink=function(t,r){var n=C(t);this.wrapAsync(this.unlinkBase,[n],r)},e.prototype.symlinkBase=function(t,r){var n=Ee(r),i=this.getLinkParent(n);if(!i)throw X(be,"symlink",t,r);var o=n[n.length-1];if(i.getChild(o))throw X(Er,"symlink",t,r);var a=i.createChild(o);return a.getNode().makeSymlink(Ee(t)),a},e.prototype.symlinkSync=function(t,r,n){var i=C(t),o=C(r);this.symlinkBase(i,o)},e.prototype.symlink=function(t,r,n,i){var o=je(typeof n=="function"?n:i),a=C(t),s=C(r);this.wrapAsync(this.symlinkBase,[a,s],o)},e.prototype.realpathBase=function(t,r){var n=Ee(t),i=this.getResolvedLink(n);if(!i)throw X(be,"realpath",t);return wt.strToEncoding(i.getPath(),r)},e.prototype.realpathSync=function(t,r){return this.realpathBase(C(t),Qp(r).encoding)},e.prototype.realpath=function(t,r,n){var i=Yv(r,n),o=i[0],a=i[1],s=C(t);this.wrapAsync(this.realpathBase,[s,o.encoding],a)},e.prototype.lstatBase=function(t,r){r===void 0&&(r=!1);var n=this.getLink(Ee(t));if(!n)throw X(be,"lstat",t);return Qs.default.build(n.getNode(),r)},e.prototype.lstatSync=function(t,r){return this.lstatBase(C(t),fi(r).bigint)},e.prototype.lstat=function(t,r,n){var i=af(r,n),o=i[0],a=i[1];this.wrapAsync(this.lstatBase,[C(t),o.bigint],a)},e.prototype.statBase=function(t,r){r===void 0&&(r=!1);var n=this.getResolvedLink(Ee(t));if(!n)throw X(be,"stat",t);return Qs.default.build(n.getNode(),r)},e.prototype.statSync=function(t,r){return this.statBase(C(t),fi(r).bigint)},e.prototype.stat=function(t,r,n){var i=af(r,n),o=i[0],a=i[1];this.wrapAsync(this.statBase,[C(t),o.bigint],a)},e.prototype.fstatBase=function(t,r){r===void 0&&(r=!1);var n=this.getFileByFd(t);if(!n)throw X(rf,"fstat");return Qs.default.build(n.node,r)},e.prototype.fstatSync=function(t,r){return this.fstatBase(t,fi(r).bigint)},e.prototype.fstat=function(t,r,n){var i=af(r,n),o=i[0],a=i[1];this.wrapAsync(this.fstatBase,[t,o.bigint],a)},e.prototype.renameBase=function(t,r){var n=this.getLink(Ee(t));if(!n)throw X(be,"rename",t,r);var i=Ee(r),o=this.getLinkParent(i);if(!o)throw X(be,"rename",t,r);var a=n.parent;a&&a.deleteChild(n);var s=i[i.length-1];n.steps=Wo(Wo([],o.steps),[s]),o.setChild(n.getName(),n)},e.prototype.renameSync=function(t,r){var n=C(t),i=C(r);this.renameBase(n,i)},e.prototype.rename=function(t,r,n){var i=C(t),o=C(r);this.wrapAsync(this.renameBase,[i,o],n)},e.prototype.existsBase=function(t){return!!this.statBase(t)},e.prototype.existsSync=function(t){try{return this.existsBase(C(t))}catch(r){return!1}},e.prototype.exists=function(t,r){var n=this,i=C(t);if(typeof r!="function")throw Error(Nt.CB);Ho.default(function(){try{r(n.existsBase(i))}catch(o){r(!1)}})},e.prototype.accessBase=function(t,r){var n=this.getLinkOrThrow(t,"access")},e.prototype.accessSync=function(t,r){r===void 0&&(r=jp);var n=C(t);r=r|0,this.accessBase(n,r)},e.prototype.access=function(t,r,n){var i=jp,o;typeof r!="function"?(i=r|0,o=je(n)):o=r;var a=C(t);this.wrapAsync(this.accessBase,[a,i],o)},e.prototype.appendFileSync=function(t,r,n){n===void 0&&(n=Jp);var i=Xp(n);(!i.flag||Ar(t))&&(i.flag="a"),this.writeFileSync(t,r,i)},e.prototype.appendFile=function(t,r,n,i){var o=Zv(n,i),a=o[0],s=o[1];(!a.flag||Ar(t))&&(a.flag="a"),this.writeFile(t,r,a,s)},e.prototype.readdirBase=function(t,r){var n=Ee(t),i=this.getResolvedLink(n);if(!i)throw X(be,"readdir",t);var o=i.getNode();if(!o.isDirectory())throw X(Sr,"scandir",t);if(r.withFileTypes){var a=[];for(var s in i.children){var l=i.getChild(s);!l||a.push(Nv.default.build(l,r.encoding))}return!tf&&r.encoding!=="buffer"&&a.sort(function(h,p){return h.namep.name?1:0}),a}var f=[];for(var u in i.children)f.push(wt.strToEncoding(u,r.encoding));return!tf&&r.encoding!=="buffer"&&f.sort(),f},e.prototype.readdirSync=function(t,r){var n=nd(r),i=C(t);return this.readdirBase(i,n)},e.prototype.readdir=function(t,r,n){var i=Xv(r,n),o=i[0],a=i[1],s=C(t);this.wrapAsync(this.readdirBase,[s,o],a)},e.prototype.readlinkBase=function(t,r){var n=this.getLinkOrThrow(t,"readlink"),i=n.getNode();if(!i.isSymlink())throw X($p,"readlink",t);var o=Ft+i.symlink.join(Ft);return wt.strToEncoding(o,r)},e.prototype.readlinkSync=function(t,r){var n=Jo(r),i=C(t);return this.readlinkBase(i,n.encoding)},e.prototype.readlink=function(t,r,n){var i=Zp(r,n),o=i[0],a=i[1],s=C(t);this.wrapAsync(this.readlinkBase,[s,o.encoding],a)},e.prototype.fsyncBase=function(t){this.getFileByFdOrThrow(t,"fsync")},e.prototype.fsyncSync=function(t){this.fsyncBase(t)},e.prototype.fsync=function(t,r){this.wrapAsync(this.fsyncBase,[t],r)},e.prototype.fdatasyncBase=function(t){this.getFileByFdOrThrow(t,"fdatasync")},e.prototype.fdatasyncSync=function(t){this.fdatasyncBase(t)},e.prototype.fdatasync=function(t,r){this.wrapAsync(this.fdatasyncBase,[t],r)},e.prototype.ftruncateBase=function(t,r){var n=this.getFileByFdOrThrow(t,"ftruncate");n.truncate(r)},e.prototype.ftruncateSync=function(t,r){this.ftruncateBase(t,r)},e.prototype.ftruncate=function(t,r,n){var i=typeof r=="number"?r:0,o=je(typeof r=="number"?n:r);this.wrapAsync(this.ftruncateBase,[t,i],o)},e.prototype.truncateBase=function(t,r){var n=this.openSync(t,"r+");try{this.ftruncateSync(n,r)}finally{this.closeSync(n)}},e.prototype.truncateSync=function(t,r){if(Ar(t))return this.ftruncateSync(t,r);this.truncateBase(t,r)},e.prototype.truncate=function(t,r,n){var i=typeof r=="number"?r:0,o=je(typeof r=="number"?n:r);if(Ar(t))return this.ftruncate(t,i,o);this.wrapAsync(this.truncateBase,[t,i],o)},e.prototype.futimesBase=function(t,r,n){var i=this.getFileByFdOrThrow(t,"futimes"),o=i.node;o.atime=new Date(r*1e3),o.mtime=new Date(n*1e3)},e.prototype.futimesSync=function(t,r,n){this.futimesBase(t,Bt(r),Bt(n))},e.prototype.futimes=function(t,r,n,i){this.wrapAsync(this.futimesBase,[t,Bt(r),Bt(n)],i)},e.prototype.utimesBase=function(t,r,n){var i=this.openSync(t,"r+");try{this.futimesBase(i,r,n)}finally{this.closeSync(i)}},e.prototype.utimesSync=function(t,r,n){this.utimesBase(C(t),Bt(r),Bt(n))},e.prototype.utimes=function(t,r,n,i){this.wrapAsync(this.utimesBase,[C(t),Bt(r),Bt(n)],i)},e.prototype.mkdirBase=function(t,r){var n=Ee(t);if(!n.length)throw X(Er,"mkdir",t);var i=this.getLinkParentAsDirOrThrow(t,"mkdir"),o=n[n.length-1];if(i.getChild(o))throw X(Er,"mkdir",t);i.createChild(o,this.createNode(!0,r))},e.prototype.mkdirpBase=function(t,r){for(var n=Ee(t),i=this.root,o=0;o1)return this.mkdtempBase(t,r,n-1);throw Error("Could not create temp dir.")}else throw o}},e.prototype.mkdtempSync=function(t,r){var n=Jo(r).encoding;if(!t||typeof t!="string")throw new TypeError("filename prefix is required");return sf(t),this.mkdtempBase(t,n)},e.prototype.mkdtemp=function(t,r,n){var i=Zp(r,n),o=i[0].encoding,a=i[1];if(!t||typeof t!="string")throw new TypeError("filename prefix is required");!sf(t)||this.wrapAsync(this.mkdtempBase,[t,o],a)},e.prototype.rmdirBase=function(t,r){var n=rd(r),i=this.getLinkAsDirOrThrow(t,"rmdir");if(i.length&&!n.recursive)throw X(Wp,"rmdir",t);this.deleteLink(i)},e.prototype.rmdirSync=function(t,r){this.rmdirBase(C(t),r)},e.prototype.rmdir=function(t,r,n){var i=rd(r),o=je(typeof r=="function"?r:n);this.wrapAsync(this.rmdirBase,[C(t),i],o)},e.prototype.fchmodBase=function(t,r){var n=this.getFileByFdOrThrow(t,"fchmod");n.chmod(r)},e.prototype.fchmodSync=function(t,r){this.fchmodBase(t,Ve(r))},e.prototype.fchmod=function(t,r,n){this.wrapAsync(this.fchmodBase,[t,Ve(r)],n)},e.prototype.chmodBase=function(t,r){var n=this.openSync(t,"r+");try{this.fchmodBase(n,r)}finally{this.closeSync(n)}},e.prototype.chmodSync=function(t,r){var n=Ve(r),i=C(t);this.chmodBase(i,n)},e.prototype.chmod=function(t,r,n){var i=Ve(r),o=C(t);this.wrapAsync(this.chmodBase,[o,i],n)},e.prototype.lchmodBase=function(t,r){var n=this.openBase(t,Tt,0,!1);try{this.fchmodBase(n,r)}finally{this.closeSync(n)}},e.prototype.lchmodSync=function(t,r){var n=Ve(r),i=C(t);this.lchmodBase(i,n)},e.prototype.lchmod=function(t,r,n){var i=Ve(r),o=C(t);this.wrapAsync(this.lchmodBase,[o,i],n)},e.prototype.fchownBase=function(t,r,n){this.getFileByFdOrThrow(t,"fchown").chown(r,n)},e.prototype.fchownSync=function(t,r,n){_n(r),vn(n),this.fchownBase(t,r,n)},e.prototype.fchown=function(t,r,n,i){_n(r),vn(n),this.wrapAsync(this.fchownBase,[t,r,n],i)},e.prototype.chownBase=function(t,r,n){var i=this.getResolvedLinkOrThrow(t,"chown"),o=i.getNode();o.chown(r,n)},e.prototype.chownSync=function(t,r,n){_n(r),vn(n),this.chownBase(C(t),r,n)},e.prototype.chown=function(t,r,n,i){_n(r),vn(n),this.wrapAsync(this.chownBase,[C(t),r,n],i)},e.prototype.lchownBase=function(t,r,n){this.getLinkOrThrow(t,"lchown").getNode().chown(r,n)},e.prototype.lchownSync=function(t,r,n){_n(r),vn(n),this.lchownBase(C(t),r,n)},e.prototype.lchown=function(t,r,n,i){_n(r),vn(n),this.wrapAsync(this.lchownBase,[C(t),r,n],i)},e.prototype.watchFile=function(t,r,n){var i=C(t),o=r,a=n;if(typeof o=="function"&&(a=r,o=null),typeof a!="function")throw Error('"watchFile()" requires a listener function');var s=5007,l=!0;o&&typeof o=="object"&&(typeof o.interval=="number"&&(s=o.interval),typeof o.persistent=="boolean"&&(l=o.persistent));var f=this.statWatchers[i];return f||(f=new this.StatWatcher,f.start(i,l,s),this.statWatchers[i]=f),f.addListener("change",a),f},e.prototype.unwatchFile=function(t,r){var n=C(t),i=this.statWatchers[n];!i||(typeof r=="function"?i.removeListener("change",r):i.removeAllListeners("change"),i.listenerCount("change")===0&&(i.stop(),delete this.statWatchers[n]))},e.prototype.createReadStream=function(t,r){return new this.ReadStream(t,r)},e.prototype.createWriteStream=function(t,r){return new this.WriteStream(t,r)},e.prototype.watch=function(t,r,n){var i=C(t),o=r;typeof r=="function"&&(n=r,o=null);var a=Jo(o),s=a.persistent,l=a.recursive,f=a.encoding;s===void 0&&(s=!0),l===void 0&&(l=!1);var u=new this.FSWatcher;return u.start(i,s,l,f),n&&u.addListener("change",n),u},e.fd=2147483647,e}();fe.Volume=ib;function ob(e){e.emit("stop")}var fd=function(e){gn(t,e);function t(r){var n=e.call(this)||this;return n.onInterval=function(){try{var i=n.vol.statSync(n.filename);n.hasChanged(i)&&(n.emit("change",i,n.prev),n.prev=i)}finally{n.loop()}},n.vol=r,n}return t.prototype.loop=function(){this.timeoutRef=this.setTimeout(this.onInterval,this.interval)},t.prototype.hasChanged=function(r){return r.mtimeMs>this.prev.mtimeMs||r.nlink!==this.prev.nlink},t.prototype.start=function(r,n,i){n===void 0&&(n=!0),i===void 0&&(i=5007),this.filename=C(r),this.setTimeout=n?setTimeout:Bv.default,this.interval=i,this.prev=this.vol.statSync(this.filename),this.loop()},t.prototype.stop=function(){clearTimeout(this.timeoutRef),Xt.default.nextTick(ob,this)},t}(Lp.EventEmitter);fe.StatWatcher=fd;var Qe;function ab(e){Qe=It.bufferAllocUnsafe(e),Qe.used=0}Cp.inherits(lt,Zo.Readable);fe.ReadStream=lt;function lt(e,t,r){if(!(this instanceof lt))return new lt(e,t,r);if(this._vol=e,r=Object.assign({},of(r,{})),r.highWaterMark===void 0&&(r.highWaterMark=64*1024),Zo.Readable.call(this,r),this.path=C(t),this.fd=r.fd===void 0?null:r.fd,this.flags=r.flags===void 0?"r":r.flags,this.mode=r.mode===void 0?438:r.mode,this.start=r.start,this.end=r.end,this.autoClose=r.autoClose===void 0?!0:r.autoClose,this.pos=void 0,this.bytesRead=0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(this.end===void 0)this.end=Infinity;else if(typeof this.end!="number")throw new TypeError('"end" option must be a Number');if(this.start>this.end)throw new Error('"start" option must be <= "end" option');this.pos=this.start}typeof this.fd!="number"&&this.open(),this.on("end",function(){this.autoClose&&this.destroy&&this.destroy()})}lt.prototype.open=function(){var e=this;this._vol.open(this.path,this.flags,this.mode,function(t,r){if(t){e.autoClose&&e.destroy&&e.destroy(),e.emit("error",t);return}e.fd=r,e.emit("open",r),e.read()})};lt.prototype._read=function(e){if(typeof this.fd!="number")return this.once("open",function(){this._read(e)});if(this.destroyed)return;(!Qe||Qe.length-Qe.used<$v)&&ab(this._readableState.highWaterMark);var t=Qe,r=Math.min(Qe.length-Qe.used,e),n=Qe.used;if(this.pos!==void 0&&(r=Math.min(this.end-this.pos+1,r)),r<=0)return this.push(null);var i=this;this._vol.read(this.fd,Qe,Qe.used,r,this.pos,o),this.pos!==void 0&&(this.pos+=r),Qe.used+=r;function o(a,s){if(a)i.autoClose&&i.destroy&&i.destroy(),i.emit("error",a);else{var l=null;s>0&&(i.bytesRead+=s,l=t.slice(n,n+s)),i.push(l)}}};lt.prototype._destroy=function(e,t){this.close(function(r){t(e||r)})};lt.prototype.close=function(e){var t=this;if(e&&this.once("close",e),this.closed||typeof this.fd!="number"){if(typeof this.fd!="number"){this.once("open",sb);return}return Xt.default.nextTick(function(){return t.emit("close")})}this.closed=!0,this._vol.close(this.fd,function(r){r?t.emit("error",r):t.emit("close")}),this.fd=null};function sb(e){this.close()}Cp.inherits(Xe,Zo.Writable);fe.WriteStream=Xe;function Xe(e,t,r){if(!(this instanceof Xe))return new Xe(e,t,r);if(this._vol=e,r=Object.assign({},of(r,{})),Zo.Writable.call(this,r),this.path=C(t),this.fd=r.fd===void 0?null:r.fd,this.flags=r.flags===void 0?"w":r.flags,this.mode=r.mode===void 0?438:r.mode,this.start=r.start,this.autoClose=r.autoClose===void 0?!0:!!r.autoClose,this.pos=void 0,this.bytesWritten=0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(this.start<0)throw new Error('"start" must be >= zero');this.pos=this.start}r.encoding&&this.setDefaultEncoding(r.encoding),typeof this.fd!="number"&&this.open(),this.once("finish",function(){this.autoClose&&this.close()})}Xe.prototype.open=function(){this._vol.open(this.path,this.flags,this.mode,function(e,t){if(e){this.autoClose&&this.destroy&&this.destroy(),this.emit("error",e);return}this.fd=t,this.emit("open",t)}.bind(this))};Xe.prototype._write=function(e,t,r){if(!(e instanceof It.Buffer))return this.emit("error",new Error("Invalid data"));if(typeof this.fd!="number")return this.once("open",function(){this._write(e,t,r)});var n=this;this._vol.write(this.fd,e,0,e.length,this.pos,function(i,o){if(i)return n.autoClose&&n.destroy&&n.destroy(),r(i);n.bytesWritten+=o,r()}),this.pos!==void 0&&(this.pos+=e.length)};Xe.prototype._writev=function(e,t){if(typeof this.fd!="number")return this.once("open",function(){this._writev(e,t)});for(var r=this,n=e.length,i=new Array(n),o=0,a=0;a{d();"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.fsAsyncMethods=Qt.fsSyncMethods=Qt.fsProps=void 0;var fb=["constants","F_OK","R_OK","W_OK","X_OK","Stats"];Qt.fsProps=fb;var lb=["renameSync","ftruncateSync","truncateSync","chownSync","fchownSync","lchownSync","chmodSync","fchmodSync","lchmodSync","statSync","lstatSync","fstatSync","linkSync","symlinkSync","readlinkSync","realpathSync","unlinkSync","rmdirSync","mkdirSync","mkdirpSync","readdirSync","closeSync","openSync","utimesSync","futimesSync","fsyncSync","writeSync","readSync","readFileSync","writeFileSync","appendFileSync","existsSync","accessSync","fdatasyncSync","mkdtempSync","copyFileSync","createReadStream","createWriteStream"];Qt.fsSyncMethods=lb;var ub=["rename","ftruncate","truncate","chown","fchown","lchown","chmod","fchmod","lchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","mkdirp","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","exists","access","fdatasync","mkdtemp","copyFile","watchFile","unwatchFile","watch"];Qt.fsAsyncMethods=ub});var lf=I((Me,Qo)=>{d();"use strict";var ea=Me&&Me.__assign||function(){return ea=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{d();"use strict";var bb=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Eb=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Sb=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],xb=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Ed=(e,t,r)=>{let n=e;return typeof t=="string"||Array.isArray(t)?n=e.toLocaleString(t,r):(t===!0||r!==void 0)&&(n=e.toLocaleString(void 0,r)),n};bd.exports=(e,t)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t=Object.assign({bits:!1,binary:!1},t);let r=t.bits?t.binary?xb:Sb:t.binary?Eb:bb;if(t.signed&&e===0)return` 0 ${r[0]}`;let n=e<0,i=n?"-":t.signed?"+":"";n&&(e=-e);let o;if(t.minimumFractionDigits!==void 0&&(o={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(o=Object.assign({maximumFractionDigits:t.maximumFractionDigits},o)),e<1){let f=Ed(e,t.locale,o);return i+f+" "+r[0]}let a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),r.length-1);e/=Math.pow(t.binary?1024:1e3,a),o||(e=e.toPrecision(3));let s=Ed(Number(e),t.locale,o),l=r[a];return i+s+" "+l}});d();d();var zg=Object.defineProperty,Wg=Object.prototype.hasOwnProperty,Fl=Object.getOwnPropertySymbols,Vg=Object.prototype.propertyIsEnumerable,Nl=(e,t,r)=>t in e?zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Di=(e,t)=>{for(var r in t||(t={}))Wg.call(t,r)&&Nl(e,r,t[r]);if(Fl)for(var r of Fl(t))Vg.call(t,r)&&Nl(e,r,t[r]);return e};function Pl(e){let t=n=>{if(n===null)r.write8(0);else if(typeof n=="boolean")r.write8(1),r.write8(+n);else if(typeof n=="number")r.write8(2),r.write32(n|0);else if(typeof n=="string")r.write8(3),r.write(cr(n));else if(n instanceof Uint8Array)r.write8(4),r.write(n);else if(n instanceof Array){r.write8(5),r.write32(n.length);for(let i of n)t(i)}else{let i=Object.keys(n);r.write8(6),r.write32(i.length);for(let o of i)r.write(cr(o)),t(n[o])}},r=new Bl;return r.write32(0),r.write32(e.id<<1|+!e.isRequest),t(e.value),Ta(r.buf,r.len-4,0),r.buf.subarray(0,r.len)}function Hg(e){let t=()=>{switch(r.read8()){case 0:return null;case 1:return!!r.read8();case 2:return r.read32();case 3:return zr(r.read());case 4:return r.read();case 5:{let a=r.read32(),s=[];for(let l=0;l>>=1;let o=t();if(r.ptr!==e.length)throw new Error("Invalid packet");return{id:n,isRequest:i,value:o}}var Bl=class{constructor(e=new Uint8Array(1024)){this.buf=e,this.len=0,this.ptr=0}_write(e){if(this.len+e>this.buf.length){let t=new Uint8Array((this.len+e)*2);t.set(this.buf),this.buf=t}return this.len+=e,this.len-e}write8(e){let t=this._write(1);this.buf[t]=e}write32(e){let t=this._write(4);Ta(this.buf,e,t)}write(e){let t=this._write(4+e.length);Ta(this.buf,e.length,t),this.buf.set(e,t+4)}_read(e){if(this.ptr+e>this.buf.length)throw new Error("Invalid packet");return this.ptr+=e,this.ptr-e}read8(){return this.buf[this._read(1)]}read32(){return Dl(this.buf,this._read(4))}read(){let e=this.read32(),t=new Uint8Array(e),r=this._read(t.length);return t.set(this.buf.subarray(r,r+e)),t}},cr,zr;if(typeof TextEncoder!="undefined"&&typeof TextDecoder!="undefined"){let e=new TextEncoder,t=new TextDecoder;cr=r=>e.encode(r),zr=r=>t.decode(r)}else if(typeof O.Buffer!="undefined")cr=e=>{let t=O.Buffer.from(e);return t instanceof Uint8Array||(t=new Uint8Array(t)),t},zr=e=>{let{buffer:t,byteOffset:r,byteLength:n}=e;return O.Buffer.from(t,r,n).toString()};else throw new Error("No UTF-8 codec found");function Dl(e,t){return e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24}function Ta(e,t,r){e[r++]=t,e[r++]=t>>8,e[r++]=t>>16,e[r++]=t>>24}function Ll(e){if(e+="",e.indexOf(",")>=0)throw new Error(`Invalid target: ${e}`);return e}var Fa=()=>null,Te=e=>typeof e=="boolean"?null:"a boolean",Zg=e=>typeof e=="boolean"||typeof e=="object"&&!Array.isArray(e)?null:"a boolean or an object",K=e=>typeof e=="string"?null:"a string",Cl=e=>e instanceof RegExp?null:"a RegExp object",Wr=e=>typeof e=="number"&&e===(e|0)?null:"an integer",Na=e=>typeof e=="function"?null:"a function",Ae=e=>Array.isArray(e)?null:"an array",Vr=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"an object",Gg=e=>typeof e=="object"&&e!==null?null:"an array or an object",Ul=e=>typeof e=="object"&&!Array.isArray(e)?null:"an object or null",Ba=e=>typeof e=="string"||typeof e=="boolean"?null:"a string or a boolean",Yg=e=>typeof e=="string"||typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"a string or an object",Kg=e=>typeof e=="string"||Array.isArray(e)?null:"a string or an array",Jg=e=>typeof e=="string"||e instanceof Uint8Array?null:"a string or a Uint8Array";function w(e,t,r,n){let i=e[r];if(t[r+""]=!0,i===void 0)return;let o=n(i);if(o!==null)throw new Error(`"${r}" must be ${o}`);return i}function Be(e,t,r){for(let n in e)if(!(n in t))throw new Error(`Invalid option ${r}: "${n}"`)}function Xg(e){let t=Object.create(null),r=w(e,t,"wasmURL",K),n=w(e,t,"worker",Te);return Be(e,t,"in startService() call"),{wasmURL:r,worker:n}}function Li(e,t,r,n,i){let o=w(t,r,"color",Te),a=w(t,r,"logLevel",K),s=w(t,r,"logLimit",Wr);o?e.push(`--color=${o}`):n&&e.push("--color=true"),e.push(`--log-level=${a||i}`),e.push(`--log-limit=${s||0}`)}function jl(e,t,r){let n=w(t,r,"legalComments",K),i=w(t,r,"sourceRoot",K),o=w(t,r,"sourcesContent",Te),a=w(t,r,"target",Kg),s=w(t,r,"format",K),l=w(t,r,"globalName",K),f=w(t,r,"minify",Te),u=w(t,r,"minifySyntax",Te),h=w(t,r,"minifyWhitespace",Te),p=w(t,r,"minifyIdentifiers",Te),c=w(t,r,"charset",K),m=w(t,r,"treeShaking",Ba),U=w(t,r,"jsxFactory",K),T=w(t,r,"jsxFragment",K),N=w(t,r,"define",Vr),E=w(t,r,"pure",Ae),S=w(t,r,"keepNames",Te);if(n&&e.push(`--legal-comments=${n}`),i!==void 0&&e.push(`--source-root=${i}`),o!==void 0&&e.push(`--sources-content=${o}`),a&&(Array.isArray(a)?e.push(`--target=${Array.from(a).map(Ll).join(",")}`):e.push(`--target=${Ll(a)}`)),s&&e.push(`--format=${s}`),l&&e.push(`--global-name=${l}`),f&&e.push("--minify"),u&&e.push("--minify-syntax"),h&&e.push("--minify-whitespace"),p&&e.push("--minify-identifiers"),c&&e.push(`--charset=${c}`),m!==void 0&&m!==!0&&e.push(`--tree-shaking=${m}`),U&&e.push(`--jsx-factory=${U}`),T&&e.push(`--jsx-fragment=${T}`),N)for(let _ in N){if(_.indexOf("=")>=0)throw new Error(`Invalid define: ${_}`);e.push(`--define:${_}=${N[_]}`)}if(E)for(let _ of E)e.push(`--pure:${_}`);S&&e.push("--keep-names")}function Qg(e,t,r,n,i){var o;let a=[],s=[],l=Object.create(null),f=null,u=null,h=null;Li(a,t,l,r,n),jl(a,t,l);let p=w(t,l,"sourcemap",Ba),c=w(t,l,"bundle",Te),m=w(t,l,"watch",Zg),U=w(t,l,"splitting",Te),T=w(t,l,"preserveSymlinks",Te),N=w(t,l,"metafile",Te),E=w(t,l,"outfile",K),S=w(t,l,"outdir",K),_=w(t,l,"outbase",K),$=w(t,l,"platform",K),z=w(t,l,"tsconfig",K),F=w(t,l,"resolveExtensions",Ae),V=w(t,l,"nodePaths",Ae),H=w(t,l,"mainFields",Ae),b=w(t,l,"conditions",Ae),v=w(t,l,"external",Ae),R=w(t,l,"loader",Vr),P=w(t,l,"outExtension",Vr),ue=w(t,l,"publicPath",K),oe=w(t,l,"entryNames",K),Q=w(t,l,"chunkNames",K),ce=w(t,l,"assetNames",K),A=w(t,l,"inject",Ae),k=w(t,l,"banner",Vr),q=w(t,l,"footer",Vr),G=w(t,l,"entryPoints",Gg),j=w(t,l,"absWorkingDir",K),J=w(t,l,"stdin",Vr),Y=(o=w(t,l,"write",Te))!=null?o:i,M=w(t,l,"allowOverwrite",Te),W=w(t,l,"incremental",Te)===!0;if(l.plugins=!0,Be(t,l,`in ${e}() call`),p&&a.push(`--sourcemap${p===!0?"":`=${p}`}`),c&&a.push("--bundle"),M&&a.push("--allow-overwrite"),m)if(a.push("--watch"),typeof m=="boolean")h={};else{let x=Object.create(null),D=w(m,x,"onRebuild",Na);Be(m,x,`on "watch" in ${e}() call`),h={onRebuild:D}}if(U&&a.push("--splitting"),T&&a.push("--preserve-symlinks"),N&&a.push("--metafile"),E&&a.push(`--outfile=${E}`),S&&a.push(`--outdir=${S}`),_&&a.push(`--outbase=${_}`),$&&a.push(`--platform=${$}`),z&&a.push(`--tsconfig=${z}`),F){let x=[];for(let D of F){if(D+="",D.indexOf(",")>=0)throw new Error(`Invalid resolve extension: ${D}`);x.push(D)}a.push(`--resolve-extensions=${x.join(",")}`)}if(ue&&a.push(`--public-path=${ue}`),oe&&a.push(`--entry-names=${oe}`),Q&&a.push(`--chunk-names=${Q}`),ce&&a.push(`--asset-names=${ce}`),H){let x=[];for(let D of H){if(D+="",D.indexOf(",")>=0)throw new Error(`Invalid main field: ${D}`);x.push(D)}a.push(`--main-fields=${x.join(",")}`)}if(b){let x=[];for(let D of b){if(D+="",D.indexOf(",")>=0)throw new Error(`Invalid condition: ${D}`);x.push(D)}a.push(`--conditions=${x.join(",")}`)}if(v)for(let x of v)a.push(`--external:${x}`);if(k)for(let x in k){if(x.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${x}`);a.push(`--banner:${x}=${k[x]}`)}if(q)for(let x in q){if(x.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${x}`);a.push(`--footer:${x}=${q[x]}`)}if(A)for(let x of A)a.push(`--inject:${x}`);if(R)for(let x in R){if(x.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${x}`);a.push(`--loader:${x}=${R[x]}`)}if(P)for(let x in P){if(x.indexOf("=")>=0)throw new Error(`Invalid out extension: ${x}`);a.push(`--out-extension:${x}=${P[x]}`)}if(G)if(Array.isArray(G))for(let x of G)s.push(["",x+""]);else for(let[x,D]of Object.entries(G))s.push([x+"",D+""]);if(J){let x=Object.create(null),D=w(J,x,"contents",K),L=w(J,x,"resolveDir",K),Z=w(J,x,"sourcefile",K),ne=w(J,x,"loader",K);Be(J,x,'in "stdin" object'),Z&&a.push(`--sourcefile=${Z}`),ne&&a.push(`--loader=${ne}`),L&&(u=L+""),f=D?D+"":""}let ae=[];if(V)for(let x of V)x+="",ae.push(x);return{entries:s,flags:a,write:Y,stdinContents:f,stdinResolveDir:u,absWorkingDir:j,incremental:W,nodePaths:ae,watch:h}}function e0(e,t,r,n){let i=[],o=Object.create(null);Li(i,t,o,r,n),jl(i,t,o);let a=w(t,o,"sourcemap",Ba),s=w(t,o,"tsconfigRaw",Yg),l=w(t,o,"sourcefile",K),f=w(t,o,"loader",K),u=w(t,o,"banner",K),h=w(t,o,"footer",K);return Be(t,o,`in ${e}() call`),a&&i.push(`--sourcemap=${a===!0?"external":a}`),s&&i.push(`--tsconfig-raw=${typeof s=="string"?s:JSON.stringify(s)}`),l&&i.push(`--sourcefile=${l}`),f&&i.push(`--loader=${f}`),u&&i.push(`--banner=${u}`),h&&i.push(`--footer=${h}`),i}function r0(e){let t=new Map,r=new Map,n=new Map,i=new Map,o=0,a=!1,s=0,l=0,f=new Uint8Array(16*1024),u=0,h=b=>{let v=u+b.length;if(v>f.length){let P=new Uint8Array(v*2);P.set(f),f=P}f.set(b,u),u+=b.length;let R=0;for(;R+4<=u;){let P=Dl(f,R);if(R+4+P>u)break;R+=4,N(f.subarray(R,R+P)),R+=P}R>0&&(f.copyWithin(0,R,u),u-=R)},p=()=>{a=!0;for(let b of t.values())b("The service was stopped",null);t.clear();for(let b of i.values())b.onWait("The service was stopped");i.clear();for(let b of n.values())try{b(new Error("The service was stopped"),null)}catch(v){console.error(v)}n.clear()},c=(b,v,R)=>{if(a)return R("The service is no longer running",null);let P=s++;t.set(P,(ue,oe)=>{try{R(ue,oe)}finally{b&&b.unref()}}),b&&b.ref(),e.writeToStdin(Pl({id:P,isRequest:!0,value:v}))},m=(b,v)=>{if(a)throw new Error("The service is no longer running");e.writeToStdin(Pl({id:b,isRequest:!1,value:v}))},U=async(b,v)=>{try{switch(v.command){case"ping":{m(b,{});break}case"start":{let R=r.get(v.key);R?m(b,await R(v)):m(b,{});break}case"resolve":{let R=r.get(v.key);R?m(b,await R(v)):m(b,{});break}case"load":{let R=r.get(v.key);R?m(b,await R(v)):m(b,{});break}case"serve-request":{let R=i.get(v.serveID);R&&R.onRequest&&R.onRequest(v.args),m(b,{});break}case"serve-wait":{let R=i.get(v.serveID);R&&R.onWait(v.error),m(b,{});break}case"watch-rebuild":{let R=n.get(v.watchID);try{R&&R(null,v.args)}catch(P){console.error(P)}m(b,{});break}default:throw new Error("Invalid command: "+v.command)}}catch(R){m(b,{errors:[hr(R,e,null,void 0,"")]})}},T=!0,N=b=>{if(T){T=!1;let R=String.fromCharCode(...b);if(R!=="0.11.15")throw new Error(`Cannot start service: Host version "0.11.15" does not match binary version ${JSON.stringify(R)}`);return}let v=Hg(b);if(v.isRequest)U(v.id,v.value);else{let R=t.get(v.id);t.delete(v.id),v.value.error?R(v.value.error,{}):R(null,v.value)}},E=async(b,v,R,P)=>{let ue=[],oe=[],Q={},ce={},A=0,k=0,q=[];v=[...v];for(let Y of v){let M={};if(typeof Y!="object")throw new Error(`Plugin at index ${k} must be an object`);let W=w(Y,M,"name",K);if(typeof W!="string"||W==="")throw new Error(`Plugin at index ${k} is missing a name`);try{let ae=w(Y,M,"setup",Na);if(typeof ae!="function")throw new Error("Plugin is missing a setup function");Be(Y,M,`on plugin ${JSON.stringify(W)}`);let x={name:W,onResolve:[],onLoad:[]};k++;let D=ae({initialOptions:b,onStart(L){let Z='This error came from the "onStart" callback registered here',ne=Ci(new Error(Z),e,"onStart");ue.push({name:W,callback:L,note:ne})},onEnd(L){let Z='This error came from the "onEnd" callback registered here',ne=Ci(new Error(Z),e,"onEnd");oe.push({name:W,callback:L,note:ne})},onResolve(L,Z){let ne='This error came from the "onResolve" callback registered here',me=Ci(new Error(ne),e,"onResolve"),we={},Ie=w(L,we,"filter",Cl),Le=w(L,we,"namespace",K);if(Be(L,we,`in onResolve() call for plugin ${JSON.stringify(W)}`),Ie==null)throw new Error("onResolve() call is missing a filter");let Ce=A++;Q[Ce]={name:W,callback:Z,note:me},x.onResolve.push({id:Ce,filter:Ie.source,namespace:Le||""})},onLoad(L,Z){let ne='This error came from the "onLoad" callback registered here',me=Ci(new Error(ne),e,"onLoad"),we={},Ie=w(L,we,"filter",Cl),Le=w(L,we,"namespace",K);if(Be(L,we,`in onLoad() call for plugin ${JSON.stringify(W)}`),Ie==null)throw new Error("onLoad() call is missing a filter");let Ce=A++;ce[Ce]={name:W,callback:Z,note:me},x.onLoad.push({id:Ce,filter:Ie.source,namespace:Le||""})}});D&&await D,q.push(x)}catch(ae){return{ok:!1,error:ae,pluginName:W}}}let G=async Y=>{switch(Y.command){case"start":{let M={errors:[],warnings:[]};return await Promise.all(ue.map(async({name:W,callback:ae,note:x})=>{try{let D=await ae();if(D!=null){if(typeof D!="object")throw new Error(`Expected onStart() callback in plugin ${JSON.stringify(W)} to return an object`);let L={},Z=w(D,L,"errors",Ae),ne=w(D,L,"warnings",Ae);Be(D,L,`from onStart() callback in plugin ${JSON.stringify(W)}`),Z!=null&&M.errors.push(...pr(Z,"errors",P,W)),ne!=null&&M.warnings.push(...pr(ne,"warnings",P,W))}}catch(D){M.errors.push(hr(D,e,P,x&&x(),W))}})),M}case"resolve":{let M={},W="",ae,x;for(let D of Y.ids)try{({name:W,callback:ae,note:x}=Q[D]);let L=await ae({path:Y.path,importer:Y.importer,namespace:Y.namespace,resolveDir:Y.resolveDir,kind:Y.kind,pluginData:P.load(Y.pluginData)});if(L!=null){if(typeof L!="object")throw new Error(`Expected onResolve() callback in plugin ${JSON.stringify(W)} to return an object`);let Z={},ne=w(L,Z,"pluginName",K),me=w(L,Z,"path",K),we=w(L,Z,"namespace",K),Ie=w(L,Z,"external",Te),Le=w(L,Z,"pluginData",Fa),Ce=w(L,Z,"errors",Ae),Ct=w(L,Z,"warnings",Ae),de=w(L,Z,"watchFiles",Ae),Pe=w(L,Z,"watchDirs",Ae);Be(L,Z,`from onResolve() callback in plugin ${JSON.stringify(W)}`),M.id=D,ne!=null&&(M.pluginName=ne),me!=null&&(M.path=me),we!=null&&(M.namespace=we),Ie!=null&&(M.external=Ie),Le!=null&&(M.pluginData=P.store(Le)),Ce!=null&&(M.errors=pr(Ce,"errors",P,W)),Ct!=null&&(M.warnings=pr(Ct,"warnings",P,W)),de!=null&&(M.watchFiles=Ui(de,"watchFiles")),Pe!=null&&(M.watchDirs=Ui(Pe,"watchDirs"));break}}catch(L){return{id:D,errors:[hr(L,e,P,x&&x(),W)]}}return M}case"load":{let M={},W="",ae,x;for(let D of Y.ids)try{({name:W,callback:ae,note:x}=ce[D]);let L=await ae({path:Y.path,namespace:Y.namespace,pluginData:P.load(Y.pluginData)});if(L!=null){if(typeof L!="object")throw new Error(`Expected onLoad() callback in plugin ${JSON.stringify(W)} to return an object`);let Z={},ne=w(L,Z,"pluginName",K),me=w(L,Z,"contents",Jg),we=w(L,Z,"resolveDir",K),Ie=w(L,Z,"pluginData",Fa),Le=w(L,Z,"loader",K),Ce=w(L,Z,"errors",Ae),Ct=w(L,Z,"warnings",Ae),de=w(L,Z,"watchFiles",Ae),Pe=w(L,Z,"watchDirs",Ae);Be(L,Z,`from onLoad() callback in plugin ${JSON.stringify(W)}`),M.id=D,ne!=null&&(M.pluginName=ne),me instanceof Uint8Array?M.contents=me:me!=null&&(M.contents=cr(me)),we!=null&&(M.resolveDir=we),Ie!=null&&(M.pluginData=P.store(Ie)),Le!=null&&(M.loader=Le),Ce!=null&&(M.errors=pr(Ce,"errors",P,W)),Ct!=null&&(M.warnings=pr(Ct,"warnings",P,W)),de!=null&&(M.watchFiles=Ui(de,"watchFiles")),Pe!=null&&(M.watchDirs=Ui(Pe,"watchDirs"));break}}catch(L){return{id:D,errors:[hr(L,e,P,x&&x(),W)]}}return M}default:throw new Error("Invalid command: "+Y.command)}},j=(Y,M)=>M();oe.length>0&&(j=(Y,M)=>{(async()=>{for(let{name:W,callback:ae,note:x}of oe)try{await ae(Y)}catch(D){Y.errors.push(hr(D,e,P,x&&x(),W))}})().then(M)});let J=0;return{ok:!0,requestPlugins:q,runOnEndCallbacks:j,pluginRefs:{ref(){++J==1&&r.set(R,G)},unref(){--J==0&&r.delete(R)}}}},S=(b,v,R)=>{let P={},ue=w(v,P,"port",Wr),oe=w(v,P,"host",K),Q=w(v,P,"servedir",K),ce=w(v,P,"onRequest",Na),A=o++,k,q=new Promise((G,j)=>{k=J=>{i.delete(A),J!==null?j(new Error(J)):G()}});return R.serve={serveID:A},Be(v,P,"in serve() call"),ue!==void 0&&(R.serve.port=ue),oe!==void 0&&(R.serve.host=oe),Q!==void 0&&(R.serve.servedir=Q),i.set(A,{onRequest:ce,onWait:k}),{wait:q,stop(){c(b,{command:"serve-stop",serveID:A},()=>{})}}},_="warning",$="silent",z=b=>{let v=l++,R=Ml(),P,{refs:ue,options:oe,isTTY:Q,callback:ce}=b;if(typeof oe=="object"){let k=oe.plugins;if(k!==void 0){if(!Array.isArray(k))throw new Error('"plugins" must be an array');P=k}}let A=(k,q)=>{let G=[];try{Li(G,oe,{},Q,_)}catch(J){}let j=hr(k,e,R,void 0,q);c(ue,{command:"error",flags:G,error:j},()=>{j.detail=R.load(j.detail),ce(Hr("Build failed",[j],[]),null)})};if(P&&P.length>0){if(e.isSync)return A(new Error("Cannot use plugins in synchronous API calls"),"");E(oe,P,v,R).then(k=>{if(!k.ok)A(k.error,k.pluginName);else try{F(Di(Di({},b),{key:v,details:R,requestPlugins:k.requestPlugins,runOnEndCallbacks:k.runOnEndCallbacks,pluginRefs:k.pluginRefs}))}catch(q){A(q,"")}},k=>A(k,""))}else try{F(Di(Di({},b),{key:v,details:R,requestPlugins:null,runOnEndCallbacks:(k,q)=>q(),pluginRefs:null}))}catch(k){A(k,"")}},F=({callName:b,refs:v,serveOptions:R,options:P,isTTY:ue,defaultWD:oe,callback:Q,key:ce,details:A,requestPlugins:k,runOnEndCallbacks:q,pluginRefs:G})=>{let j={ref(){G&&G.ref(),v&&v.ref()},unref(){G&&G.unref(),v&&v.unref()}},J=!e.isBrowser,{entries:Y,flags:M,write:W,stdinContents:ae,stdinResolveDir:x,absWorkingDir:D,incremental:L,nodePaths:Z,watch:ne}=Qg(b,P,ue,_,J),me={command:"build",key:ce,entries:Y,flags:M,write:W,stdinContents:ae,stdinResolveDir:x,absWorkingDir:D||oe,incremental:L,nodePaths:Z,hasOnRebuild:!!(ne&&ne.onRebuild)};k&&(me.plugins=k);let we=R&&S(j,R,me),Ie,Le,Ce=(de,Pe)=>{de.outputFiles&&(Pe.outputFiles=de.outputFiles.map(t0)),de.metafile&&(Pe.metafile=JSON.parse(de.metafile)),de.writeToStdout!==void 0&&console.log(zr(de.writeToStdout).replace(/\n$/,""))},Ct=(de,Pe)=>{let rt={errors:Zr(de.errors,A),warnings:Zr(de.warnings,A)};Ce(de,rt),q(rt,()=>{if(rt.errors.length>0)return Pe(Hr("Build failed",rt.errors,rt.warnings),null);if(de.rebuildID!==void 0){if(!Ie){let Et=!1;Ie=()=>new Promise((Pr,Dr)=>{if(Et||a)throw new Error("Cannot rebuild");c(j,{command:"rebuild",rebuildID:de.rebuildID},(nt,Gy)=>{if(nt)return Pe(Hr("Build failed",[{pluginName:"",text:nt,location:null,notes:[],detail:void 0}],[]),null);Ct(Gy,(ma,Yy)=>{ma?Dr(ma):Pr(Yy)})})}),j.ref(),Ie.dispose=()=>{Et||(Et=!0,c(j,{command:"rebuild-dispose",rebuildID:de.rebuildID},()=>{}),j.unref())}}rt.rebuild=Ie}if(de.watchID!==void 0){if(!Le){let Et=!1;j.ref(),Le=()=>{Et||(Et=!0,n.delete(de.watchID),c(j,{command:"watch-stop",watchID:de.watchID},()=>{}),j.unref())},ne&&ne.onRebuild&&n.set(de.watchID,(Pr,Dr)=>{if(Pr)return ne.onRebuild(Pr,null);let nt={errors:Zr(Dr.errors,A),warnings:Zr(Dr.warnings,A)};q(nt,()=>{if(nt.errors.length>0)return ne.onRebuild(Hr("Build failed",nt.errors,nt.warnings),null);Ce(Dr,nt),Dr.rebuildID!==void 0&&(nt.rebuild=Ie),nt.stop=Le,ne.onRebuild(null,nt)})})}rt.stop=Le}Pe(null,rt)})};if(W&&e.isBrowser)throw new Error('Cannot enable "write" in the browser');if(L&&e.isSync)throw new Error('Cannot use "incremental" with a synchronous build');c(j,me,(de,Pe)=>{if(de)return Q(new Error(de),null);if(we){let rt=Pe,Et=!1;j.ref();let Pr={port:rt.port,host:rt.host,wait:we.wait,stop(){Et||(Et=!0,we.stop(),j.unref())}};return j.ref(),we.wait.then(j.unref,j.unref),Q(null,Pr)}return Ct(Pe,Q)})};return{readFromStdout:h,afterClose:p,service:{buildOrServe:z,transform:({callName:b,refs:v,input:R,options:P,isTTY:ue,fs:oe,callback:Q})=>{let ce=Ml(),A=k=>{try{if(typeof R!="string")throw new Error('The input to "transform" must be a string');let q=e0(b,P,ue,$);c(v,{command:"transform",flags:q,inputFS:k!==null,input:k!==null?k:R},(j,J)=>{if(j)return Q(new Error(j),null);let Y=Zr(J.errors,ce),M=Zr(J.warnings,ce),W=1,ae=()=>--W==0&&Q(null,{warnings:M,code:J.code,map:J.map});if(Y.length>0)return Q(Hr("Transform failed",Y,M),null);J.codeFS&&(W++,oe.readFile(J.code,(x,D)=>{x!==null?Q(x,null):(J.code=D,ae())})),J.mapFS&&(W++,oe.readFile(J.map,(x,D)=>{x!==null?Q(x,null):(J.map=D,ae())})),ae()})}catch(q){let G=[];try{Li(G,P,{},ue,$)}catch(J){}let j=hr(q,e,ce,void 0,"");c(v,{command:"error",flags:G,error:j},()=>{j.detail=ce.load(j.detail),Q(Hr("Transform failed",[j],[]),null)})}};if(typeof R=="string"&&R.length>1024*1024){let k=A;A=()=>oe.writeFile(R,k)}A(null)},formatMessages:({callName:b,refs:v,messages:R,options:P,callback:ue})=>{let oe=pr(R,"messages",null,"");if(!P)throw new Error(`Missing second argument in ${b}() call`);let Q={},ce=w(P,Q,"kind",K),A=w(P,Q,"color",Te),k=w(P,Q,"terminalWidth",Wr);if(Be(P,Q,`in ${b}() call`),ce===void 0)throw new Error(`Missing "kind" in ${b}() call`);if(ce!=="error"&&ce!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${b}() call`);let q={command:"format-msgs",messages:oe,isWarning:ce==="warning"};A!==void 0&&(q.color=A),k!==void 0&&(q.terminalWidth=k),c(v,q,(G,j)=>{if(G)return ue(new Error(G),null);ue(null,j.messages)})}}}}function Ml(){let e=new Map,t=0;return{load(r){return e.get(r)},store(r){if(r===void 0)return-1;let n=t++;return e.set(n,r),n}}}function Ci(e,t,r){let n,i=!1;return()=>{if(i)return n;i=!0;try{let o=(e.stack+"").split(` +`);o.splice(1,1);let a=$l(t,o,r);if(a)return n={text:e.message,location:a},n}catch(o){}}}function hr(e,t,r,n,i){let o="Internal error",a=null;try{o=(e&&e.message||e)+""}catch(s){}try{a=$l(t,(e.stack+"").split(` +`),"")}catch(s){}return{pluginName:i,text:o,location:a,notes:n?[n]:[],detail:r?r.store(e):-1}}function $l(e,t,r){let n=" at ";if(e.readFileSync&&!t[0].startsWith(n)&&t[1].startsWith(n))for(let i=1;i{if(s===n)return` +...`;if(!a.location)return` +error: ${a.text}`;let{file:l,line:f,column:u}=a.location,h=a.pluginName?`[plugin: ${a.pluginName}] `:"";return` +${l}:${f}:${u}: error: ${h}${a.text}`}).join(""),o=new Error(`${e}${i}`);return o.errors=t,o.warnings=r,o}function Zr(e,t){for(let r of e)r.detail=t.load(r.detail);return e}function ql(e,t){if(e==null)return null;let r={},n=w(e,r,"file",K),i=w(e,r,"namespace",K),o=w(e,r,"line",Wr),a=w(e,r,"column",Wr),s=w(e,r,"length",Wr),l=w(e,r,"lineText",K),f=w(e,r,"suggestion",K);return Be(e,r,t),{file:n||"",namespace:i||"",line:o||0,column:a||0,length:s||0,lineText:l||"",suggestion:f||""}}function pr(e,t,r,n){let i=[],o=0;for(let a of e){let s={},l=w(a,s,"pluginName",K),f=w(a,s,"text",K),u=w(a,s,"location",Ul),h=w(a,s,"notes",Ae),p=w(a,s,"detail",Fa),c=`in element ${o} of "${t}"`;Be(a,s,c);let m=[];if(h)for(let U of h){let T={},N=w(U,T,"text",K),E=w(U,T,"location",Ul);Be(U,T,c),m.push({text:N||"",location:ql(E,c)})}i.push({pluginName:l||n,text:f||"",location:ql(u,c),notes:m,detail:r?r.store(p):-1}),o++}return i}function Ui(e,t){let r=[];for(let n of e){if(typeof n!="string")throw new Error(`${JSON.stringify(t)} must be an array of strings`);r.push(n)}return r}function t0({path:e,contents:t}){let r=null;return{path:e,contents:t,get text(){return r===null&&(r=zr(t)),r}}}var zl=e=>n0().build(e);var Gr,Pa,n0=()=>{if(Pa)return Pa;throw Gr?new Error('You need to wait for the promise returned from "initialize" to be resolved before calling this'):new Error('You need to call "initialize" before calling this')},Wl=e=>{e=Xg(e||{});let t=e.wasmURL,r=e.worker!==!1;if(!t)throw new Error('Must provide the "wasmURL" option');if(t+="",Gr)throw new Error('Cannot call "initialize" more than once');return Gr=i0(t,r),Gr.catch(()=>{Gr=void 0}),Gr},i0=async(e,t)=>{let r=await fetch(e);if(!r.ok)throw new Error(`Failed to download ${JSON.stringify(e)}`);let n=await r.arrayBuffer(),i=`{let global={};for(let o=self;o;o=Object.getPrototypeOf(o))for(let k of Object.getOwnPropertyNames(o))if(!(k in global))Object.defineProperty(global,k,{get:()=>self[k]});// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +(() => { + // Map multiple JavaScript environments to a single common API, + // preferring web standards over Node.js API. + // + // Environments considered: + // - Browsers + // - Node.js + // - Electron + // - Parcel + // - Webpack + + if (typeof global !== "undefined") { + // global already exists + } else if (typeof window !== "undefined") { + window.global = window; + } else if (typeof self !== "undefined") { + self.global = self; + } else { + throw new Error("cannot export Go (neither global, window nor self is defined)"); + } + + if (!global.require && typeof require !== "undefined") { + global.require = require; + } + + if (!global.fs && global.require) { + const fs = require("fs"); + if (typeof fs === "object" && fs !== null && Object.keys(fs).length !== 0) { + + global.fs = Object.assign({}, fs, { + // Hack around a Unicode bug in node: https://github.com/nodejs/node/issues/24550 + write(fd, buf, offset, length, position, callback) { + if (offset === 0 && length === buf.length && position === null) { + if (fd === process.stdout.fd) { + try { + process.stdout.write(buf, err => err ? callback(err, 0, null) : callback(null, length, buf)); + } catch (err) { + callback(err, 0, null); + } + return; + } + if (fd === process.stderr.fd) { + try { + process.stderr.write(buf, err => err ? callback(err, 0, null) : callback(null, length, buf)); + } catch (err) { + callback(err, 0, null); + } + return; + } + } + fs.write(fd, buf, offset, length, position, callback); + }, + }); + + } + } + + const enosys = () => { + const err = new Error("not implemented"); + err.code = "ENOSYS"; + return err; + }; + + if (!global.fs) { + let outputBuf = ""; + global.fs = { + constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused + writeSync(fd, buf) { + outputBuf += decoder.decode(buf); + const nl = outputBuf.lastIndexOf("\\n"); + if (nl != -1) { + console.log(outputBuf.substr(0, nl)); + outputBuf = outputBuf.substr(nl + 1); + } + return buf.length; + }, + write(fd, buf, offset, length, position, callback) { + if (offset !== 0 || length !== buf.length || position !== null) { + callback(enosys()); + return; + } + const n = this.writeSync(fd, buf); + callback(null, n); + }, + chmod(path, mode, callback) { callback(enosys()); }, + chown(path, uid, gid, callback) { callback(enosys()); }, + close(fd, callback) { callback(enosys()); }, + fchmod(fd, mode, callback) { callback(enosys()); }, + fchown(fd, uid, gid, callback) { callback(enosys()); }, + fstat(fd, callback) { callback(enosys()); }, + fsync(fd, callback) { callback(null); }, + ftruncate(fd, length, callback) { callback(enosys()); }, + lchown(path, uid, gid, callback) { callback(enosys()); }, + link(path, link, callback) { callback(enosys()); }, + lstat(path, callback) { callback(enosys()); }, + mkdir(path, perm, callback) { callback(enosys()); }, + open(path, flags, mode, callback) { callback(enosys()); }, + read(fd, buffer, offset, length, position, callback) { callback(enosys()); }, + readdir(path, callback) { callback(enosys()); }, + readlink(path, callback) { callback(enosys()); }, + rename(from, to, callback) { callback(enosys()); }, + rmdir(path, callback) { callback(enosys()); }, + stat(path, callback) { callback(enosys()); }, + symlink(path, link, callback) { callback(enosys()); }, + truncate(path, length, callback) { callback(enosys()); }, + unlink(path, callback) { callback(enosys()); }, + utimes(path, atime, mtime, callback) { callback(enosys()); }, + }; + } + + if (!global.process) { + global.process = { + getuid() { return -1; }, + getgid() { return -1; }, + geteuid() { return -1; }, + getegid() { return -1; }, + getgroups() { throw enosys(); }, + pid: -1, + ppid: -1, + umask() { throw enosys(); }, + cwd() { throw enosys(); }, + chdir() { throw enosys(); }, + } + } + + if (!global.crypto && global.require) { + const nodeCrypto = require("crypto"); + global.crypto = { + getRandomValues(b) { + nodeCrypto.randomFillSync(b); + }, + }; + } + if (!global.crypto) { + throw new Error("global.crypto is not available, polyfill required (getRandomValues only)"); + } + + if (!global.performance) { + global.performance = { + now() { + const [sec, nsec] = process.hrtime(); + return sec * 1000 + nsec / 1000000; + }, + }; + } + + if (!global.TextEncoder && global.require) { + global.TextEncoder = require("util").TextEncoder; + } + if (!global.TextEncoder) { + throw new Error("global.TextEncoder is not available, polyfill required"); + } + + if (!global.TextDecoder && global.require) { + global.TextDecoder = require("util").TextDecoder; + } + if (!global.TextDecoder) { + throw new Error("global.TextDecoder is not available, polyfill required"); + } + + // End of polyfills for common API. + + const encoder = new TextEncoder("utf-8"); + const decoder = new TextDecoder("utf-8"); + + global.Go = class { + constructor() { + this.argv = ["js"]; + this.env = {}; + this.exit = (code) => { + if (code !== 0) { + console.warn("exit code:", code); + } + }; + this._exitPromise = new Promise((resolve) => { + this._resolveExitPromise = resolve; + }); + this._pendingEvent = null; + this._scheduledTimeouts = new Map(); + this._nextCallbackTimeoutID = 1; + + const setInt64 = (addr, v) => { + this.mem.setUint32(addr + 0, v, true); + this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true); + } + + const getInt64 = (addr) => { + const low = this.mem.getUint32(addr + 0, true); + const high = this.mem.getInt32(addr + 4, true); + return low + high * 4294967296; + } + + const loadValue = (addr) => { + const f = this.mem.getFloat64(addr, true); + if (f === 0) { + return undefined; + } + if (!isNaN(f)) { + return f; + } + + const id = this.mem.getUint32(addr, true); + return this._values[id]; + } + + const storeValue = (addr, v) => { + const nanHead = 0x7FF80000; + + if (typeof v === "number" && v !== 0) { + if (isNaN(v)) { + this.mem.setUint32(addr + 4, nanHead, true); + this.mem.setUint32(addr, 0, true); + return; + } + this.mem.setFloat64(addr, v, true); + return; + } + + if (v === undefined) { + this.mem.setFloat64(addr, 0, true); + return; + } + + let id = this._ids.get(v); + if (id === undefined) { + id = this._idPool.pop(); + if (id === undefined) { + id = this._values.length; + } + this._values[id] = v; + this._goRefCounts[id] = 0; + this._ids.set(v, id); + } + this._goRefCounts[id]++; + let typeFlag = 0; + switch (typeof v) { + case "object": + if (v !== null) { + typeFlag = 1; + } + break; + case "string": + typeFlag = 2; + break; + case "symbol": + typeFlag = 3; + break; + case "function": + typeFlag = 4; + break; + } + this.mem.setUint32(addr + 4, nanHead | typeFlag, true); + this.mem.setUint32(addr, id, true); + } + + const loadSlice = (addr) => { + const array = getInt64(addr + 0); + const len = getInt64(addr + 8); + return new Uint8Array(this._inst.exports.mem.buffer, array, len); + } + + const loadSliceOfValues = (addr) => { + const array = getInt64(addr + 0); + const len = getInt64(addr + 8); + const a = new Array(len); + for (let i = 0; i < len; i++) { + a[i] = loadValue(array + i * 8); + } + return a; + } + + const loadString = (addr) => { + const saddr = getInt64(addr + 0); + const len = getInt64(addr + 8); + return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len)); + } + + const timeOrigin = Date.now() - performance.now(); + this.importObject = { + go: { + // Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters) + // may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported + // function. A goroutine can switch to a new stack if the current stack is too small (see morestack function). + // This changes the SP, thus we have to update the SP used by the imported function. + + // func wasmExit(code int32) + "runtime.wasmExit": (sp) => { + sp >>>= 0; + const code = this.mem.getInt32(sp + 8, true); + this.exited = true; + delete this._inst; + delete this._values; + delete this._goRefCounts; + delete this._ids; + delete this._idPool; + this.exit(code); + }, + + // func wasmWrite(fd uintptr, p unsafe.Pointer, n int32) + "runtime.wasmWrite": (sp) => { + sp >>>= 0; + const fd = getInt64(sp + 8); + const p = getInt64(sp + 16); + const n = this.mem.getInt32(sp + 24, true); + fs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n)); + }, + + // func resetMemoryDataView() + "runtime.resetMemoryDataView": (sp) => { + sp >>>= 0; + this.mem = new DataView(this._inst.exports.mem.buffer); + }, + + // func nanotime1() int64 + "runtime.nanotime1": (sp) => { + sp >>>= 0; + setInt64(sp + 8, (timeOrigin + performance.now()) * 1000000); + }, + + // func walltime1() (sec int64, nsec int32) + "runtime.walltime1": (sp) => { + sp >>>= 0; + const msec = (new Date).getTime(); + setInt64(sp + 8, msec / 1000); + this.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true); + }, + + // func scheduleTimeoutEvent(delay int64) int32 + "runtime.scheduleTimeoutEvent": (sp) => { + sp >>>= 0; + const id = this._nextCallbackTimeoutID; + this._nextCallbackTimeoutID++; + this._scheduledTimeouts.set(id, setTimeout( + () => { + this._resume(); + while (this._scheduledTimeouts.has(id)) { + // for some reason Go failed to register the timeout event, log and try again + // (temporary workaround for https://github.com/golang/go/issues/28975) + console.warn("scheduleTimeoutEvent: missed timeout event"); + this._resume(); + } + }, + getInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early + )); + this.mem.setInt32(sp + 16, id, true); + }, + + // func clearTimeoutEvent(id int32) + "runtime.clearTimeoutEvent": (sp) => { + sp >>>= 0; + const id = this.mem.getInt32(sp + 8, true); + clearTimeout(this._scheduledTimeouts.get(id)); + this._scheduledTimeouts.delete(id); + }, + + // func getRandomData(r []byte) + "runtime.getRandomData": (sp) => { + sp >>>= 0; + crypto.getRandomValues(loadSlice(sp + 8)); + }, + + // func finalizeRef(v ref) + "syscall/js.finalizeRef": (sp) => { + sp >>>= 0; + const id = this.mem.getUint32(sp + 8, true); + this._goRefCounts[id]--; + if (this._goRefCounts[id] === 0) { + const v = this._values[id]; + this._values[id] = null; + this._ids.delete(v); + this._idPool.push(id); + } + }, + + // func stringVal(value string) ref + "syscall/js.stringVal": (sp) => { + sp >>>= 0; + storeValue(sp + 24, loadString(sp + 8)); + }, + + // func valueGet(v ref, p string) ref + "syscall/js.valueGet": (sp) => { + sp >>>= 0; + const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16)); + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 32, result); + }, + + // func valueSet(v ref, p string, x ref) + "syscall/js.valueSet": (sp) => { + sp >>>= 0; + Reflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32)); + }, + + // func valueDelete(v ref, p string) + "syscall/js.valueDelete": (sp) => { + sp >>>= 0; + Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16)); + }, + + // func valueIndex(v ref, i int) ref + "syscall/js.valueIndex": (sp) => { + sp >>>= 0; + storeValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16))); + }, + + // valueSetIndex(v ref, i int, x ref) + "syscall/js.valueSetIndex": (sp) => { + sp >>>= 0; + Reflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24)); + }, + + // func valueCall(v ref, m string, args []ref) (ref, bool) + "syscall/js.valueCall": (sp) => { + sp >>>= 0; + try { + const v = loadValue(sp + 8); + const m = Reflect.get(v, loadString(sp + 16)); + const args = loadSliceOfValues(sp + 32); + const result = Reflect.apply(m, v, args); + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 56, result); + this.mem.setUint8(sp + 64, 1); + } catch (err) { + storeValue(sp + 56, err); + this.mem.setUint8(sp + 64, 0); + } + }, + + // func valueInvoke(v ref, args []ref) (ref, bool) + "syscall/js.valueInvoke": (sp) => { + sp >>>= 0; + try { + const v = loadValue(sp + 8); + const args = loadSliceOfValues(sp + 16); + const result = Reflect.apply(v, undefined, args); + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 40, result); + this.mem.setUint8(sp + 48, 1); + } catch (err) { + storeValue(sp + 40, err); + this.mem.setUint8(sp + 48, 0); + } + }, + + // func valueNew(v ref, args []ref) (ref, bool) + "syscall/js.valueNew": (sp) => { + sp >>>= 0; + try { + const v = loadValue(sp + 8); + const args = loadSliceOfValues(sp + 16); + const result = Reflect.construct(v, args); + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 40, result); + this.mem.setUint8(sp + 48, 1); + } catch (err) { + storeValue(sp + 40, err); + this.mem.setUint8(sp + 48, 0); + } + }, + + // func valueLength(v ref) int + "syscall/js.valueLength": (sp) => { + sp >>>= 0; + setInt64(sp + 16, parseInt(loadValue(sp + 8).length)); + }, + + // valuePrepareString(v ref) (ref, int) + "syscall/js.valuePrepareString": (sp) => { + sp >>>= 0; + const str = encoder.encode(String(loadValue(sp + 8))); + storeValue(sp + 16, str); + setInt64(sp + 24, str.length); + }, + + // valueLoadString(v ref, b []byte) + "syscall/js.valueLoadString": (sp) => { + sp >>>= 0; + const str = loadValue(sp + 8); + loadSlice(sp + 16).set(str); + }, + + // func valueInstanceOf(v ref, t ref) bool + "syscall/js.valueInstanceOf": (sp) => { + sp >>>= 0; + this.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0); + }, + + // func copyBytesToGo(dst []byte, src ref) (int, bool) + "syscall/js.copyBytesToGo": (sp) => { + sp >>>= 0; + const dst = loadSlice(sp + 8); + const src = loadValue(sp + 32); + if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) { + this.mem.setUint8(sp + 48, 0); + return; + } + const toCopy = src.subarray(0, dst.length); + dst.set(toCopy); + setInt64(sp + 40, toCopy.length); + this.mem.setUint8(sp + 48, 1); + }, + + // func copyBytesToJS(dst ref, src []byte) (int, bool) + "syscall/js.copyBytesToJS": (sp) => { + sp >>>= 0; + const dst = loadValue(sp + 8); + const src = loadSlice(sp + 16); + if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) { + this.mem.setUint8(sp + 48, 0); + return; + } + const toCopy = src.subarray(0, dst.length); + dst.set(toCopy); + setInt64(sp + 40, toCopy.length); + this.mem.setUint8(sp + 48, 1); + }, + + "debug": (value) => { + console.log(value); + }, + } + }; + } + + async run(instance) { + if (!(instance instanceof WebAssembly.Instance)) { + throw new Error("Go.run: WebAssembly.Instance expected"); + } + this._inst = instance; + this.mem = new DataView(this._inst.exports.mem.buffer); + this._values = [ // JS values that Go currently has references to, indexed by reference id + NaN, + 0, + null, + true, + false, + global, + this, + ]; + this._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id + this._ids = new Map([ // mapping from JS values to reference ids + [0, 1], + [null, 2], + [true, 3], + [false, 4], + [global, 5], + [this, 6], + ]); + this._idPool = []; // unused ids that have been garbage collected + this.exited = false; // whether the Go program has exited + + // Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory. + let offset = 4096; + + const strPtr = (str) => { + const ptr = offset; + const bytes = encoder.encode(str + "\\0"); + new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes); + offset += bytes.length; + if (offset % 8 !== 0) { + offset += 8 - (offset % 8); + } + return ptr; + }; + + const argc = this.argv.length; + + const argvPtrs = []; + this.argv.forEach((arg) => { + argvPtrs.push(strPtr(arg)); + }); + argvPtrs.push(0); + + const keys = Object.keys(this.env).sort(); + keys.forEach((key) => { + argvPtrs.push(strPtr(\`\${key}=\${this.env[key]}\`)); + }); + argvPtrs.push(0); + + const argv = offset; + argvPtrs.forEach((ptr) => { + this.mem.setUint32(offset, ptr, true); + this.mem.setUint32(offset + 4, 0, true); + offset += 8; + }); + + this._inst.exports.run(argc, argv); + if (this.exited) { + this._resolveExitPromise(); + } + await this._exitPromise; + } + + _resume() { + if (this.exited) { + throw new Error("Go program has already exited"); + } + this._inst.exports.resume(); + if (this.exited) { + this._resolveExitPromise(); + } + } + + _makeFuncWrapper(id) { + const go = this; + return function () { + const event = { id: id, this: this, args: arguments }; + go._pendingEvent = event; + go._resume(); + return event.result; + }; + } + } + + if ( + typeof module !== "undefined" && + global.require && + global.require.main === module && + global.process && + global.process.versions && + !global.process.versions.electron + ) { + if (process.argv.length < 3) { + console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"); + process.exit(1); + } + + const go = new Go(); + go.argv = process.argv.slice(2); + go.env = Object.assign({ TMPDIR: require("os").tmpdir() }, process.env); + go.exit = process.exit; + WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => { + process.on("exit", (code) => { // Node.js exits if no event handler is pending + if (code === 0 && !go.exited) { + // deadlock, make Go print error and stack traces + go._pendingEvent = { id: 0 }; + go._resume(); + } + }); + return go.run(result.instance); + }).catch((err) => { + console.error(err); + process.exit(1); + }); + } +})(); +onmessage = ({data: wasm}) => { + let decoder = new TextDecoder(); + let fs = global.fs; + let stderr = ""; + fs.writeSync = (fd, buffer) => { + if (fd === 1) { + postMessage(buffer); + } else if (fd === 2) { + stderr += decoder.decode(buffer); + let parts = stderr.split("\\n"); + if (parts.length > 1) + console.log(parts.slice(0, -1).join("\\n")); + stderr = parts[parts.length - 1]; + } else { + throw new Error("Bad write"); + } + return buffer.length; + }; + let stdin = []; + let resumeStdin; + let stdinPos = 0; + onmessage = ({data}) => { + if (data.length > 0) { + stdin.push(data); + if (resumeStdin) + resumeStdin(); + } + }; + fs.read = (fd, buffer, offset, length, position, callback) => { + if (fd !== 0 || offset !== 0 || length !== buffer.length || position !== null) { + throw new Error("Bad read"); + } + if (stdin.length === 0) { + resumeStdin = () => fs.read(fd, buffer, offset, length, position, callback); + return; + } + let first = stdin[0]; + let count = Math.max(0, Math.min(length, first.length - stdinPos)); + buffer.set(first.subarray(stdinPos, stdinPos + count), offset); + stdinPos += count; + if (stdinPos === first.length) { + stdin.shift(); + stdinPos = 0; + } + callback(null, count); + }; + let go = new global.Go(); + go.argv = ["", \`--service=\${"0.11.15"}\`]; + WebAssembly.instantiate(wasm, go.importObject).then(({instance}) => go.run(instance)); +};}`,o;if(t){let l=new Blob([i],{type:"text/javascript"});o=new Worker(URL.createObjectURL(l))}else{let f=new Function("postMessage",i+"var onmessage; return m => onmessage(m)")(u=>o.onmessage({data:u}));o={onmessage:null,postMessage:u=>f({data:u}),terminate(){}}}o.postMessage(n),o.onmessage=({data:l})=>a(l);let{readFromStdout:a,service:s}=r0({writeToStdin(l){o.postMessage(l)},isSync:!1,isBrowser:!0});Pa={build:l=>new Promise((f,u)=>s.buildOrServe({callName:"build",refs:null,serveOptions:null,options:l,isTTY:!1,defaultWD:"/",callback:(h,p)=>h?u(h):f(p)})),transform:(l,f)=>new Promise((u,h)=>s.transform({callName:"transform",refs:null,input:l,options:f||{},isTTY:!1,fs:{readFile(p,c){c(new Error("Internal error"),null)},writeFile(p,c){c(null)}},callback:(p,c)=>p?h(p):u(c)})),formatMessages:(l,f)=>new Promise((u,h)=>s.formatMessages({callName:"formatMessages",refs:null,messages:l,options:f,callback:(p,c)=>p?h(p):u(c)}))}};var Lf=sr(Nn()),Br=sr(lf());d();var dd=()=>({name:"external-globals",setup(e){e.onResolve({filter:/.*/},t=>{if(["chokidar","yargs","node-fetch"].includes(t.path))return{path:t.path,namespace:"external"}}),e.onLoad({filter:/.*/,namespace:"external"},t=>t.path==="node-fetch"?{contents:"export default fetch"}:{contents:`module.exports = ${t.path}`})}});d();d();var ta=sr(Nn()),uf=sr(lf()),bn="virtualfs",_b=({id:e,importer:t})=>{let r=e;t&&e.startsWith(".")&&(r=ta.default.resolve(ta.default.dirname(t),e));for(let n of["",".ts",".js",".css"]){let i=r+n;if(uf.fs.existsSync(i))return i}throw new Error(`${r} not exists`)},yd=()=>({name:bn,setup(e){e.onResolve({filter:/.*/,namespace:bn},t=>({path:t.path,pluginData:t.pluginData,namespace:bn})),e.onLoad({filter:/.*/,namespace:bn},async t=>{let r=t.path,n=_b({id:t.path,importer:t.pluginData.importer});if(!n)throw new Error("not found");return r=n,{contents:(await uf.fs.promises.readFile(r)).toString(),pluginData:{importer:r},loader:ta.default.extname(r).slice(1)}})}});var gd=e=>({name:"virtual-entry",setup(t){t.onResolve({filter:/^$/},()=>({path:e,namespace:bn,pluginData:{importer:""}}))}});d();d();d();async function cf(e){let t=await fetch(e);return{url:t.url,content:await t.text()}}var md=()=>({name:"http",setup(e){e.onResolve({filter:/^https?:\/\//},t=>({path:new URL(t.path,t.resolveDir.replace(/^\//,"")).toString(),namespace:"http-url"})),e.onResolve({filter:/.*/,namespace:"http-url"},t=>({path:new URL(t.path,t.importer).toString(),namespace:"http-url"})),e.onLoad({filter:/.*/,namespace:"http-url"},async t=>{let{content:r,url:n}=await cf(t.path);return{contents:r,loader:"ts",resolveDir:`/${n}`}})}});var En="cdn",wd=()=>{let e={};return{name:En,setup(t){t.onLoad({namespace:En,filter:/.*/},async r=>{let n=new URL(r.path,r.pluginData.parentUrl).toString(),i=e[n];return i||(i=await cf(n)),e[n]=i,{contents:i.content,pluginData:{parentUrl:i.url}}}),t.onResolve({namespace:En,filter:/.*/},async r=>({namespace:En,path:r.path,pluginData:r.pluginData}))}}};var _d=sr(Nn()),vb="https://unpkg.com/",vd=()=>({name:"bare",setup(e){e.onResolve({filter:/.*/},t=>{if(/^(?!\.).*/.test(t.path)&&!_d.default.isAbsolute(t.path))return{path:t.path,namespace:En,pluginData:{parentUrl:vb}}})}});var Vy=sr(Sd());d();var Ob=4,xd=0,Od=1,Ab=2;function Sn(e){let t=e.length;for(;--t>=0;)e[t]=0}var Rb=0,Ad=1,kb=2,Ib=3,Tb=258,hf=29,hi=256,pi=hi+1+hf,xn=30,pf=19,Rd=2*pi+1,Rr=15,df=16,Fb=7,yf=256,kd=16,Id=17,Td=18,gf=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),ra=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Nb=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Fd=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Bb=512,Pt=new Array((pi+2)*2);Sn(Pt);var di=new Array(xn*2);Sn(di);var yi=new Array(Bb);Sn(yi);var gi=new Array(Tb-Ib+1);Sn(gi);var mf=new Array(hf);Sn(mf);var na=new Array(xn);Sn(na);function wf(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var Nd,Bd,Pd;function _f(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var Dd=e=>e<256?yi[e]:yi[256+(e>>>7)],mi=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},$e=(e,t,r)=>{e.bi_valid>df-r?(e.bi_buf|=t<>df-e.bi_valid,e.bi_valid+=r-df):(e.bi_buf|=t<{$e(e,r[t*2],r[t*2+1])},Ld=(e,t)=>{let r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1},Pb=e=>{e.bi_valid===16?(mi(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},Db=(e,t)=>{let r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,f,u,h,p,c,m,U=0;for(p=0;p<=Rr;p++)e.bl_count[p]=0;for(r[e.heap[e.heap_max]*2+1]=0,f=e.heap_max+1;fl&&(p=l,U++),r[u*2+1]=p,!(u>n)&&(e.bl_count[p]++,c=0,u>=s&&(c=a[u-s]),m=r[u*2],e.opt_len+=m*(p+c),o&&(e.static_len+=m*(i[u*2+1]+c)));if(U!==0){do{for(p=l-1;e.bl_count[p]===0;)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[l]--,U-=2}while(U>0);for(p=l;p!==0;p--)for(u=e.bl_count[p];u!==0;)h=e.heap[--f],!(h>n)&&(r[h*2+1]!==p&&(e.opt_len+=(p-r[h*2+1])*r[h*2],r[h*2+1]=p),u--)}},Cd=(e,t,r)=>{let n=new Array(Rr+1),i=0,o,a;for(o=1;o<=Rr;o++)n[o]=i=i+r[o-1]<<1;for(a=0;a<=t;a++){let s=e[a*2+1];s!==0&&(e[a*2]=Ld(n[s]++,s))}},Lb=()=>{let e,t,r,n,i,o=new Array(Rr+1);for(r=0,n=0;n>=7;n{let t;for(t=0;t{e.bi_valid>8?mi(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Cb=(e,t,r,n)=>{jd(e),n&&(mi(e,r),mi(e,~r)),e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},Md=(e,t,r,n)=>{let i=t*2,o=r*2;return e[i]{let n=e.heap[r],i=r<<1;for(;i<=e.heap_len&&(i{let n,i,o=0,a,s;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,n===0?_t(e,i,t):(a=gi[i],_t(e,a+hi+1,t),s=gf[a],s!==0&&(i-=mf[a],$e(e,i,s)),n--,a=Dd(n),_t(e,a,r),s=ra[a],s!==0&&(n-=na[a],$e(e,n,s)));while(o{let r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,l=-1,f;for(e.heap_len=0,e.heap_max=Rd,a=0;a>1;a>=1;a--)vf(e,r,a);f=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],vf(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[f*2]=r[a*2]+r[s*2],e.depth[f]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[a*2+1]=r[s*2+1]=f,e.heap[1]=f++,vf(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Db(e,t),Cd(r,l,e.bl_count)},qd=(e,t,r)=>{let n,i=-1,o,a=t[0*2+1],s=0,l=7,f=4;for(a===0&&(l=138,f=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++s{let n,i=-1,o,a=t[0*2+1],s=0,l=7,f=4;for(a===0&&(l=138,f=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++s{let t;for(qd(e,e.dyn_ltree,e.l_desc.max_code),qd(e,e.dyn_dtree,e.d_desc.max_code),bf(e,e.bl_desc),t=pf-1;t>=3&&e.bl_tree[Fd[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},jb=(e,t,r,n)=>{let i;for($e(e,t-257,5),$e(e,r-1,5),$e(e,n-4,4),i=0;i{let t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return xd;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Od;for(r=32;r{Wd||(Lb(),Wd=!0),e.l_desc=new _f(e.dyn_ltree,Nd),e.d_desc=new _f(e.dyn_dtree,Bd),e.bl_desc=new _f(e.bl_tree,Pd),e.bi_buf=0,e.bi_valid=0,Ud(e)},Vd=(e,t,r,n)=>{$e(e,(Rb<<1)+(n?1:0),3),Cb(e,t,r,!0)},qb=e=>{$e(e,Ad<<1,3),_t(e,yf,Pt),Pb(e)},zb=(e,t,r,n)=>{let i,o,a=0;e.level>0?(e.strm.data_type===Ab&&(e.strm.data_type=Mb(e)),bf(e,e.l_desc),bf(e,e.d_desc),a=Ub(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?Vd(e,t,r,n):e.strategy===Ob||o===i?($e(e,(Ad<<1)+(n?1:0),3),$d(e,Pt,di)):($e(e,(kb<<1)+(n?1:0),3),jb(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),$d(e,e.dyn_ltree,e.dyn_dtree)),Ud(e),n&&jd(e)},Wb=(e,t,r)=>(e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(gi[r]+hi+1)*2]++,e.dyn_dtree[Dd(t)*2]++),e.last_lit===e.lit_bufsize-1),Vb=$b,Hb=Vd,Zb=zb,Gb=Wb,Yb=qb,Kb={_tr_init:Vb,_tr_stored_block:Hb,_tr_flush_block:Zb,_tr_tally:Gb,_tr_align:Yb},Jb=(e,t,r,n)=>{let i=e&65535|0,o=e>>>16&65535|0,a=0;for(;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+t[n++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0},wi=Jb,Xb=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t},Qb=new Uint32Array(Xb()),e1=(e,t,r,n)=>{let i=Qb,o=n+r;e^=-1;for(let a=n;a>>8^i[(e^t[a])&255];return e^-1},ke=e1,On={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},_i={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:t1,_tr_stored_block:r1,_tr_flush_block:n1,_tr_tally:er,_tr_align:i1}=Kb,{Z_NO_FLUSH:kr,Z_PARTIAL_FLUSH:o1,Z_FULL_FLUSH:a1,Z_FINISH:tr,Z_BLOCK:Hd,Z_OK:vt,Z_STREAM_END:Zd,Z_STREAM_ERROR:et,Z_DATA_ERROR:s1,Z_BUF_ERROR:Ef,Z_DEFAULT_COMPRESSION:f1,Z_FILTERED:l1,Z_HUFFMAN_ONLY:ia,Z_RLE:u1,Z_FIXED:c1,Z_DEFAULT_STRATEGY:h1,Z_UNKNOWN:p1,Z_DEFLATED:oa}=_i,d1=9,y1=15,g1=8,m1=29,w1=256,Sf=w1+1+m1,_1=30,v1=19,b1=2*Sf+1,E1=15,ie=3,rr=258,ut=rr+ie+1,S1=32,aa=42,xf=69,sa=73,fa=91,la=103,Ir=113,vi=666,xe=1,bi=2,Tr=3,An=4,x1=3,nr=(e,t)=>(e.msg=On[t],t),Gd=e=>(e<<1)-(e>4?9:0),ir=e=>{let t=e.length;for(;--t>=0;)e[t]=0},O1=(e,t,r)=>(t<{let t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))},Ne=(e,t)=>{n1(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ar(e.strm)},le=(e,t)=>{e.pending_buf[e.pending++]=t},Ei=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},A1=(e,t,r,n)=>{let i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),e.state.wrap===1?e.adler=wi(e.adler,t,i,r):e.state.wrap===2&&(e.adler=ke(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},Yd=(e,t)=>{let r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-ut?e.strstart-(e.w_size-ut):0,f=e.window,u=e.w_mask,h=e.prev,p=e.strstart+rr,c=f[n+a-1],m=f[n+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(f[i+a]!==m||f[i+a-1]!==c||f[i]!==f[n]||f[++i]!==f[n+1])){n+=2,i++;do;while(f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&na){if(e.match_start=t,a=o,o>=s)break;c=f[n+a-1],m=f[n+a]}}while((t=h[t&u])>l&&--r!=0);return a<=e.lookahead?a:e.lookahead},Fr=e=>{let t=e.w_size,r,n,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-ut)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);o+=t}if(e.strm.avail_in===0)break;if(n=A1(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=ie)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=or(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=or(e,e.ins_h,e.window[a+ie-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert{let r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Fr(e),e.lookahead===0&&t===kr)return xe;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;let n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Ne(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-ut&&(Ne(e,!1),e.strm.avail_out===0))return xe}return e.insert=0,t===tr?(Ne(e,!0),e.strm.avail_out===0?Tr:An):(e.strstart>e.block_start&&(Ne(e,!1),e.strm.avail_out===0),xe)},Of=(e,t)=>{let r,n;for(;;){if(e.lookahead=ie&&(e.ins_h=or(e,e.ins_h,e.window[e.strstart+ie-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-ut&&(e.match_length=Yd(e,r)),e.match_length>=ie)if(n=er(e,e.strstart-e.match_start,e.match_length-ie),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ie){e.match_length--;do e.strstart++,e.ins_h=or(e,e.ins_h,e.window[e.strstart+ie-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!=0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=or(e,e.ins_h,e.window[e.strstart+1]);else n=er(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Ne(e,!1),e.strm.avail_out===0))return xe}return e.insert=e.strstart{let r,n,i;for(;;){if(e.lookahead=ie&&(e.ins_h=or(e,e.ins_h,e.window[e.strstart+ie-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=ie-1,r!==0&&e.prev_length4096)&&(e.match_length=ie-1)),e.prev_length>=ie&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ie,n=er(e,e.strstart-1-e.prev_match,e.prev_length-ie),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=or(e,e.ins_h,e.window[e.strstart+ie-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!=0);if(e.match_available=0,e.match_length=ie-1,e.strstart++,n&&(Ne(e,!1),e.strm.avail_out===0))return xe}else if(e.match_available){if(n=er(e,0,e.window[e.strstart-1]),n&&Ne(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return xe}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=er(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let r,n,i,o,a=e.window;for(;;){if(e.lookahead<=rr){if(Fr(e),e.lookahead<=rr&&t===kr)return xe;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=ie&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+rr;do;while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ie?(r=er(e,1,e.match_length-ie),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=er(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Ne(e,!1),e.strm.avail_out===0))return xe}return e.insert=0,t===tr?(Ne(e,!0),e.strm.avail_out===0?Tr:An):e.last_lit&&(Ne(e,!1),e.strm.avail_out===0)?xe:bi},I1=(e,t)=>{let r;for(;;){if(e.lookahead===0&&(Fr(e),e.lookahead===0)){if(t===kr)return xe;break}if(e.match_length=0,r=er(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Ne(e,!1),e.strm.avail_out===0))return xe}return e.insert=0,t===tr?(Ne(e,!0),e.strm.avail_out===0?Tr:An):e.last_lit&&(Ne(e,!1),e.strm.avail_out===0)?xe:bi};function bt(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var Si=[new bt(0,0,0,0,R1),new bt(4,4,8,4,Of),new bt(4,5,16,8,Of),new bt(4,6,32,32,Of),new bt(4,4,16,16,Rn),new bt(8,16,32,32,Rn),new bt(8,16,128,128,Rn),new bt(8,32,128,256,Rn),new bt(32,128,258,1024,Rn),new bt(32,258,258,4096,Rn)],T1=e=>{e.window_size=2*e.w_size,ir(e.head),e.max_lazy_match=Si[e.level].max_lazy,e.good_match=Si[e.level].good_length,e.nice_match=Si[e.level].nice_length,e.max_chain_length=Si[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ie-1,e.match_available=0,e.ins_h=0};function F1(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=oa,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(b1*2),this.dyn_dtree=new Uint16Array((2*_1+1)*2),this.bl_tree=new Uint16Array((2*v1+1)*2),ir(this.dyn_ltree),ir(this.dyn_dtree),ir(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(E1+1),this.heap=new Uint16Array(2*Sf+1),ir(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Sf+1),ir(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Kd=e=>{if(!e||!e.state)return nr(e,et);e.total_in=e.total_out=0,e.data_type=p1;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?aa:Ir,e.adler=t.wrap===2?0:1,t.last_flush=kr,t1(t),vt},Jd=e=>{let t=Kd(e);return t===vt&&T1(e.state),t},N1=(e,t)=>!e||!e.state||e.state.wrap!==2?et:(e.state.gzhead=t,vt),Xd=(e,t,r,n,i,o)=>{if(!e)return et;let a=1;if(t===f1&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>d1||r!==oa||n<8||n>15||t<0||t>9||o<0||o>c1)return nr(e,et);n===8&&(n=9);let s=new F1;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<Xd(e,t,oa,y1,g1,h1),P1=(e,t)=>{let r,n;if(!e||!e.state||t>Hd||t<0)return e?nr(e,et):et;let i=e.state;if(!e.output||!e.input&&e.avail_in!==0||i.status===vi&&t!==tr)return nr(e,e.avail_out===0?Ef:et);i.strm=e;let o=i.last_flush;if(i.last_flush=t,i.status===aa)if(i.wrap===2)e.adler=0,le(i,31),le(i,139),le(i,8),i.gzhead?(le(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),le(i,i.gzhead.time&255),le(i,i.gzhead.time>>8&255),le(i,i.gzhead.time>>16&255),le(i,i.gzhead.time>>24&255),le(i,i.level===9?2:i.strategy>=ia||i.level<2?4:0),le(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(le(i,i.gzhead.extra.length&255),le(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=ke(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=xf):(le(i,0),le(i,0),le(i,0),le(i,0),le(i,0),le(i,i.level===9?2:i.strategy>=ia||i.level<2?4:0),le(i,x1),i.status=Ir);else{let a=oa+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=ia||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,a|=s<<6,i.strstart!==0&&(a|=S1),a+=31-a%31,i.status=Ir,Ei(i,a),i.strstart!==0&&(Ei(i,e.adler>>>16),Ei(i,e.adler&65535)),e.adler=1}if(i.status===xf)if(i.gzhead.extra){for(r=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(e.adler=ke(e.adler,i.pending_buf,i.pending-r,r)),ar(e),r=i.pending,i.pending===i.pending_buf_size));)le(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>r&&(e.adler=ke(e.adler,i.pending_buf,i.pending-r,r)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=sa)}else i.status=sa;if(i.status===sa)if(i.gzhead.name){r=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(e.adler=ke(e.adler,i.pending_buf,i.pending-r,r)),ar(e),r=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindexr&&(e.adler=ke(e.adler,i.pending_buf,i.pending-r,r)),n===0&&(i.gzindex=0,i.status=fa)}else i.status=fa;if(i.status===fa)if(i.gzhead.comment){r=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(e.adler=ke(e.adler,i.pending_buf,i.pending-r,r)),ar(e),r=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindexr&&(e.adler=ke(e.adler,i.pending_buf,i.pending-r,r)),n===0&&(i.status=la)}else i.status=la;if(i.status===la&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ar(e),i.pending+2<=i.pending_buf_size&&(le(i,e.adler&255),le(i,e.adler>>8&255),e.adler=0,i.status=Ir)):i.status=Ir),i.pending!==0){if(ar(e),e.avail_out===0)return i.last_flush=-1,vt}else if(e.avail_in===0&&Gd(t)<=Gd(o)&&t!==tr)return nr(e,Ef);if(i.status===vi&&e.avail_in!==0)return nr(e,Ef);if(e.avail_in!==0||i.lookahead!==0||t!==kr&&i.status!==vi){let a=i.strategy===ia?I1(i,t):i.strategy===u1?k1(i,t):Si[i.level].func(i,t);if((a===Tr||a===An)&&(i.status=vi),a===xe||a===Tr)return e.avail_out===0&&(i.last_flush=-1),vt;if(a===bi&&(t===o1?i1(i):t!==Hd&&(r1(i,0,0,!1),t===a1&&(ir(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),ar(e),e.avail_out===0))return i.last_flush=-1,vt}return t!==tr?vt:i.wrap<=0?Zd:(i.wrap===2?(le(i,e.adler&255),le(i,e.adler>>8&255),le(i,e.adler>>16&255),le(i,e.adler>>24&255),le(i,e.total_in&255),le(i,e.total_in>>8&255),le(i,e.total_in>>16&255),le(i,e.total_in>>24&255)):(Ei(i,e.adler>>>16),Ei(i,e.adler&65535)),ar(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?vt:Zd)},D1=e=>{if(!e||!e.state)return et;let t=e.state.status;return t!==aa&&t!==xf&&t!==sa&&t!==fa&&t!==la&&t!==Ir&&t!==vi?nr(e,et):(e.state=null,t===Ir?nr(e,s1):vt)},L1=(e,t)=>{let r=t.length;if(!e||!e.state)return et;let n=e.state,i=n.wrap;if(i===2||i===1&&n.status!==aa||n.lookahead)return et;if(i===1&&(e.adler=wi(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){i===0&&(ir(n.head),n.strstart=0,n.block_start=0,n.insert=0);let l=new Uint8Array(n.w_size);l.set(t.subarray(r-n.w_size,r),0),t=l,r=n.w_size}let o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Fr(n);n.lookahead>=ie;){let l=n.strstart,f=n.lookahead-(ie-1);do n.ins_h=or(n,n.ins_h,n.window[l+ie-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++;while(--f);n.strstart=l,n.lookahead=ie-1,Fr(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=ie-1,n.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,n.wrap=i,vt},C1=B1,U1=Xd,j1=Jd,M1=Kd,$1=N1,q1=P1,z1=D1,W1=L1,V1="pako deflate (from Nodeca project)",xi={deflateInit:C1,deflateInit2:U1,deflateReset:j1,deflateResetKeep:M1,deflateSetHeader:$1,deflate:q1,deflateEnd:z1,deflateSetDictionary:W1,deflateInfo:V1},H1=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Z1=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let r=t.shift();if(!!r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(let n in r)H1(r,n)&&(e[n]=r[n])}}return e},G1=e=>{let t=0;for(let n=0,i=e.length;n=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Oi[254]=Oi[254]=1;var Y1=e=>{let t,r,n,i,o,a=e.length,s=0;for(i=0;i>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t},K1=(e,t)=>{if(t<65534&&e.subarray&&Qd)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n{let r,n,i=t||e.length,o=new Array(i*2);for(n=0,r=0;r4){o[n++]=65533,r+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&r1){o[n++]=65533;continue}a<65536?o[n++]=a:(a-=65536,o[n++]=55296|a>>10&1023,o[n++]=56320|a&1023)}return K1(o,n)},X1=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let r=t-1;for(;r>=0&&(e[r]&192)==128;)r--;return r<0||r===0?t:r+Oi[e[r]]>t?r:t},Ai={string2buf:Y1,buf2string:J1,utf8border:X1};function Q1(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var ey=Q1,ty=Object.prototype.toString,{Z_NO_FLUSH:eE,Z_SYNC_FLUSH:tE,Z_FULL_FLUSH:rE,Z_FINISH:nE,Z_OK:ca,Z_STREAM_END:iE,Z_DEFAULT_COMPRESSION:oE,Z_DEFAULT_STRATEGY:aE,Z_DEFLATED:sE}=_i;function Ri(e){this.options=ua.assign({level:oE,method:sE,chunkSize:16384,windowBits:15,memLevel:8,strategy:aE},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ey,this.strm.avail_out=0;let r=xi.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==ca)throw new Error(On[r]);if(t.header&&xi.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=Ai.string2buf(t.dictionary):ty.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=xi.deflateSetDictionary(this.strm,n),r!==ca)throw new Error(On[r]);this._dict_set=!0}}Ri.prototype.push=function(e,t){let r=this.strm,n=this.options.chunkSize,i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?nE:eE,typeof e=="string"?r.input=Ai.string2buf(e):ty.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){if(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===tE||o===rE)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(i=xi.deflate(r,o),i===iE)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=xi.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ca;if(r.avail_out===0){this.onData(r.output);continue}if(o>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(r.avail_in===0)break}return!0};Ri.prototype.onData=function(e){this.chunks.push(e)};Ri.prototype.onEnd=function(e){e===ca&&(this.result=ua.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Af(e,t){let r=new Ri(t);if(r.push(e,!0),r.err)throw r.msg||On[r.err];return r.result}function fE(e,t){return t=t||{},t.raw=!0,Af(e,t)}function lE(e,t){return t=t||{},t.gzip=!0,Af(e,t)}var uE=Ri,cE=Af,hE=fE,pE=lE,dE=_i,yE={Deflate:uE,deflate:cE,deflateRaw:hE,gzip:pE,constants:dE},ha=30,gE=12,mE=function(t,r){let n,i,o,a,s,l,f,u,h,p,c,m,U,T,N,E,S,_,$,z,F,V,H,b,v=t.state;n=t.next_in,H=t.input,i=n+(t.avail_in-5),o=t.next_out,b=t.output,a=o-(r-t.avail_out),s=o+(t.avail_out-257),l=v.dmax,f=v.wsize,u=v.whave,h=v.wnext,p=v.window,c=v.hold,m=v.bits,U=v.lencode,T=v.distcode,N=(1<>>24,c>>>=_,m-=_,_=S>>>16&255,_===0)b[o++]=S&65535;else if(_&16){$=S&65535,_&=15,_&&(m<_&&(c+=H[n++]<>>=_,m-=_),m<15&&(c+=H[n++]<>>24,c>>>=_,m-=_,_=S>>>16&255,_&16){if(z=S&65535,_&=15,m<_&&(c+=H[n++]<l){t.msg="invalid distance too far back",v.mode=ha;break e}if(c>>>=_,m-=_,_=o-a,z>_){if(_=z-_,_>u&&v.sane){t.msg="invalid distance too far back",v.mode=ha;break e}if(F=0,V=p,h===0){if(F+=f-_,_<$){$-=_;do b[o++]=p[F++];while(--_);F=o-z,V=b}}else if(h<_){if(F+=f+h-_,_-=h,_<$){$-=_;do b[o++]=p[F++];while(--_);if(F=0,h<$){_=h,$-=_;do b[o++]=p[F++];while(--_);F=o-z,V=b}}}else if(F+=h-_,_<$){$-=_;do b[o++]=p[F++];while(--_);F=o-z,V=b}for(;$>2;)b[o++]=V[F++],b[o++]=V[F++],b[o++]=V[F++],$-=3;$&&(b[o++]=V[F++],$>1&&(b[o++]=V[F++]))}else{F=o-z;do b[o++]=b[F++],b[o++]=b[F++],b[o++]=b[F++],$-=3;while($>2);$&&(b[o++]=b[F++],$>1&&(b[o++]=b[F++]))}}else if((_&64)==0){S=T[(S&65535)+(c&(1<<_)-1)];continue r}else{t.msg="invalid distance code",v.mode=ha;break e}break}}else if((_&64)==0){S=U[(S&65535)+(c&(1<<_)-1)];continue t}else if(_&32){v.mode=gE;break e}else{t.msg="invalid literal/length code",v.mode=ha;break e}break}}while(n>3,n-=$,m-=$<<3,c&=(1<{let l=s.bits,f=0,u=0,h=0,p=0,c=0,m=0,U=0,T=0,N=0,E=0,S,_,$,z,F,V=null,H=0,b,v=new Uint16Array(kn+1),R=new Uint16Array(kn+1),P=null,ue=0,oe,Q,ce;for(f=0;f<=kn;f++)v[f]=0;for(u=0;u=1&&v[p]===0;p--);if(c>p&&(c=p),p===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(h=1;h0&&(e===iy||p!==1))return-1;for(R[1]=0,f=1;fry||e===oy&&N>ny)return 1;for(;;){oe=f-U,a[u]b?(Q=P[ue+a[u]],ce=V[H+a[u]]):(Q=32+64,ce=0),S=1<>U)+_]=oe<<24|Q<<16|ce|0;while(_!==0);for(S=1<>=1;if(S!==0?(E&=S-1,E+=S):E=0,u++,--v[f]==0){if(f===p)break;f=t[r+a[u]]}if(f>c&&(E&z)!==$){for(U===0&&(U=c),F+=h,m=f-U,T=1<ry||e===oy&&N>ny)return 1;$=E&z,i[$]=c<<24|m<<16|F-o|0}}return E!==0&&(i[F+E]=f-U<<24|64<<16|0),s.bits=c,0},ki=EE,SE=0,ay=1,sy=2,{Z_FINISH:fy,Z_BLOCK:xE,Z_TREES:pa,Z_OK:Nr,Z_STREAM_END:OE,Z_NEED_DICT:AE,Z_STREAM_ERROR:tt,Z_DATA_ERROR:ly,Z_MEM_ERROR:uy,Z_BUF_ERROR:RE,Z_DEFLATED:cy}=_i,hy=1,py=2,dy=3,yy=4,gy=5,my=6,wy=7,_y=8,vy=9,by=10,da=11,Dt=12,kf=13,Ey=14,If=15,Sy=16,xy=17,Oy=18,Ay=19,ya=20,ga=21,Ry=22,ky=23,Iy=24,Ty=25,Fy=26,Tf=27,Ny=28,By=29,ge=30,Py=31,kE=32,IE=852,TE=592,FE=15,NE=FE,Dy=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function BE(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var Ly=e=>{if(!e||!e.state)return tt;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=hy,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(IE),t.distcode=t.distdyn=new Int32Array(TE),t.sane=1,t.back=-1,Nr},Cy=e=>{if(!e||!e.state)return tt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Ly(e)},Uy=(e,t)=>{let r;if(!e||!e.state)return tt;let n=e.state;return t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?tt:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Cy(e))},jy=(e,t)=>{if(!e)return tt;let r=new BE;e.state=r,r.window=null;let n=Uy(e,t);return n!==Nr&&(e.state=null),n},PE=e=>jy(e,NE),My=!0,Ff,Nf,DE=e=>{if(My){Ff=new Int32Array(512),Nf=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ki(ay,e.lens,0,288,Ff,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ki(sy,e.lens,0,32,Nf,0,e.work,{bits:5}),My=!1}e.lencode=Ff,e.lenbits=9,e.distcode=Nf,e.distbits=5},$y=(e,t,r,n)=>{let i,o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(t.subarray(r-n,r-n+i),o.wnext),n-=i,n?(o.window.set(t.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let r,n,i,o,a,s,l,f,u,h,p,c,m,U,T=0,N,E,S,_,$,z,F,V,H=new Uint8Array(4),b,v,R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return tt;r=e.state,r.mode===Dt&&(r.mode=kf),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,f=r.hold,u=r.bits,h=s,p=l,V=Nr;e:for(;;)switch(r.mode){case hy:if(r.wrap===0){r.mode=kf;break}for(;u<16;){if(s===0)break e;s--,f+=n[o++]<>>8&255,r.check=ke(r.check,H,2,0),f=0,u=0,r.mode=py;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((f&255)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=ge;break}if((f&15)!==cy){e.msg="unknown compression method",r.mode=ge;break}if(f>>>=4,u-=4,F=(f&15)+8,r.wbits===0)r.wbits=F;else if(F>r.wbits){e.msg="invalid window size",r.mode=ge;break}r.dmax=1<>8&1),r.flags&512&&(H[0]=f&255,H[1]=f>>>8&255,r.check=ke(r.check,H,2,0)),f=0,u=0,r.mode=dy;case dy:for(;u<32;){if(s===0)break e;s--,f+=n[o++]<>>8&255,H[2]=f>>>16&255,H[3]=f>>>24&255,r.check=ke(r.check,H,4,0)),f=0,u=0,r.mode=yy;case yy:for(;u<16;){if(s===0)break e;s--,f+=n[o++]<>8),r.flags&512&&(H[0]=f&255,H[1]=f>>>8&255,r.check=ke(r.check,H,2,0)),f=0,u=0,r.mode=gy;case gy:if(r.flags&1024){for(;u<16;){if(s===0)break e;s--,f+=n[o++]<>>8&255,r.check=ke(r.check,H,2,0)),f=0,u=0}else r.head&&(r.head.extra=null);r.mode=my;case my:if(r.flags&1024&&(c=r.length,c>s&&(c=s),c&&(r.head&&(F=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+c),F)),r.flags&512&&(r.check=ke(r.check,n,c,o)),s-=c,o+=c,r.length-=c),r.length))break e;r.length=0,r.mode=wy;case wy:if(r.flags&2048){if(s===0)break e;c=0;do F=n[o+c++],r.head&&F&&r.length<65536&&(r.head.name+=String.fromCharCode(F));while(F&&c>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Dt;break;case by:for(;u<32;){if(s===0)break e;s--,f+=n[o++]<>>=u&7,u-=u&7,r.mode=Tf;break}for(;u<3;){if(s===0)break e;s--,f+=n[o++]<>>=1,u-=1,f&3){case 0:r.mode=Ey;break;case 1:if(DE(r),r.mode=ya,t===pa){f>>>=2,u-=2;break e}break;case 2:r.mode=xy;break;case 3:e.msg="invalid block type",r.mode=ge}f>>>=2,u-=2;break;case Ey:for(f>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,f+=n[o++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=ge;break}if(r.length=f&65535,f=0,u=0,r.mode=If,t===pa)break e;case If:r.mode=Sy;case Sy:if(c=r.length,c){if(c>s&&(c=s),c>l&&(c=l),c===0)break e;i.set(n.subarray(o,o+c),a),s-=c,o+=c,l-=c,a+=c,r.length-=c;break}r.mode=Dt;break;case xy:for(;u<14;){if(s===0)break e;s--,f+=n[o++]<>>=5,u-=5,r.ndist=(f&31)+1,f>>>=5,u-=5,r.ncode=(f&15)+4,f>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=ge;break}r.have=0,r.mode=Oy;case Oy:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[R[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,b={bits:r.lenbits},V=ki(SE,r.lens,0,19,r.lencode,0,r.work,b),r.lenbits=b.bits,V){e.msg="invalid code lengths set",r.mode=ge;break}r.have=0,r.mode=Ay;case Ay:for(;r.have>>24,E=T>>>16&255,S=T&65535,!(N<=u);){if(s===0)break e;s--,f+=n[o++]<>>=N,u-=N,r.lens[r.have++]=S;else{if(S===16){for(v=N+2;u>>=N,u-=N,r.have===0){e.msg="invalid bit length repeat",r.mode=ge;break}F=r.lens[r.have-1],c=3+(f&3),f>>>=2,u-=2}else if(S===17){for(v=N+3;u>>=N,u-=N,F=0,c=3+(f&7),f>>>=3,u-=3}else{for(v=N+7;u>>=N,u-=N,F=0,c=11+(f&127),f>>>=7,u-=7}if(r.have+c>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=ge;break}for(;c--;)r.lens[r.have++]=F}}if(r.mode===ge)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=ge;break}if(r.lenbits=9,b={bits:r.lenbits},V=ki(ay,r.lens,0,r.nlen,r.lencode,0,r.work,b),r.lenbits=b.bits,V){e.msg="invalid literal/lengths set",r.mode=ge;break}if(r.distbits=6,r.distcode=r.distdyn,b={bits:r.distbits},V=ki(sy,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,b),r.distbits=b.bits,V){e.msg="invalid distances set",r.mode=ge;break}if(r.mode=ya,t===pa)break e;case ya:r.mode=ga;case ga:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=u,mE(e,p),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,f=r.hold,u=r.bits,r.mode===Dt&&(r.back=-1);break}for(r.back=0;T=r.lencode[f&(1<>>24,E=T>>>16&255,S=T&65535,!(N<=u);){if(s===0)break e;s--,f+=n[o++]<>_)],N=T>>>24,E=T>>>16&255,S=T&65535,!(_+N<=u);){if(s===0)break e;s--,f+=n[o++]<>>=_,u-=_,r.back+=_}if(f>>>=N,u-=N,r.back+=N,r.length=S,E===0){r.mode=Fy;break}if(E&32){r.back=-1,r.mode=Dt;break}if(E&64){e.msg="invalid literal/length code",r.mode=ge;break}r.extra=E&15,r.mode=Ry;case Ry:if(r.extra){for(v=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=ky;case ky:for(;T=r.distcode[f&(1<>>24,E=T>>>16&255,S=T&65535,!(N<=u);){if(s===0)break e;s--,f+=n[o++]<>_)],N=T>>>24,E=T>>>16&255,S=T&65535,!(_+N<=u);){if(s===0)break e;s--,f+=n[o++]<>>=_,u-=_,r.back+=_}if(f>>>=N,u-=N,r.back+=N,E&64){e.msg="invalid distance code",r.mode=ge;break}r.offset=S,r.extra=E&15,r.mode=Iy;case Iy:if(r.extra){for(v=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=ge;break}r.mode=Ty;case Ty:if(l===0)break e;if(c=p-l,r.offset>c){if(c=r.offset-c,c>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=ge;break}c>r.wnext?(c-=r.wnext,m=r.wsize-c):m=r.wnext-c,c>r.length&&(c=r.length),U=r.window}else U=i,m=a-r.offset,c=r.length;c>l&&(c=l),l-=c,r.length-=c;do i[a++]=U[m++];while(--c);r.length===0&&(r.mode=ga);break;case Fy:if(l===0)break e;i[a++]=r.length,l--,r.mode=ga;break;case Tf:if(r.wrap){for(;u<32;){if(s===0)break e;s--,f|=n[o++]<{if(!e||!e.state)return tt;let t=e.state;return t.window&&(t.window=null),e.state=null,Nr},UE=(e,t)=>{if(!e||!e.state)return tt;let r=e.state;return(r.wrap&2)==0?tt:(r.head=t,t.done=!1,Nr)},jE=(e,t)=>{let r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==da)?tt:n.mode===da&&(i=1,i=wi(i,t,r,0),i!==n.check)?ly:(o=$y(e,t,r,r),o?(n.mode=Py,uy):(n.havedict=1,Nr))},ME=Cy,$E=Uy,qE=Ly,zE=PE,WE=jy,VE=LE,HE=CE,ZE=UE,GE=jE,YE="pako inflate (from Nodeca project)",Lt={inflateReset:ME,inflateReset2:$E,inflateResetKeep:qE,inflateInit:zE,inflateInit2:WE,inflate:VE,inflateEnd:HE,inflateGetHeader:ZE,inflateSetDictionary:GE,inflateInfo:YE};function KE(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var JE=KE,qy=Object.prototype.toString,{Z_NO_FLUSH:XE,Z_FINISH:QE,Z_OK:Ii,Z_STREAM_END:Bf,Z_NEED_DICT:Pf,Z_STREAM_ERROR:eS,Z_DATA_ERROR:zy,Z_MEM_ERROR:tS}=_i;function Df(e){this.options=ua.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)==0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ey,this.strm.avail_out=0;let r=Lt.inflateInit2(this.strm,t.windowBits);if(r!==Ii)throw new Error(On[r]);if(this.header=new JE,Lt.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Ai.string2buf(t.dictionary):qy.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Lt.inflateSetDictionary(this.strm,t.dictionary),r!==Ii)))throw new Error(On[r])}Df.prototype.push=function(e,t){let r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,s;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?QE:XE,qy.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=Lt.inflate(r,a),o===Pf&&i&&(o=Lt.inflateSetDictionary(r,i),o===Ii?o=Lt.inflate(r,a):o===zy&&(o=Pf));r.avail_in>0&&o===Bf&&r.state.wrap>0&&e[r.next_in]!==0;)Lt.inflateReset(r),o=Lt.inflate(r,a);switch(o){case eS:case zy:case Pf:case tS:return this.onEnd(o),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(r.avail_out===0||o===Bf))if(this.options.to==="string"){let l=Ai.utf8border(r.output,r.next_out),f=r.next_out-l,u=Ai.buf2string(r.output,l);r.next_out=f,r.avail_out=n-f,f&&r.output.set(r.output.subarray(l,l+f),0),this.onData(u)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(o===Ii&&s===0)){if(o===Bf)return o=Lt.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(r.avail_in===0)break}}return!0};Df.prototype.onData=function(e){this.chunks.push(e)};Df.prototype.onEnd=function(e){e===Ii&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ua.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var{Deflate:Bx,deflate:Px,deflateRaw:Dx,gzip:rS}=yE;var Wy=rS;var Hy=!1,Zy=!1,Vx=async e=>{var r;try{Hy||(await Wl({worker:!0,wasmURL:"https://unpkg.com/esbuild-wasm/esbuild.wasm"}),Hy=!0)}catch(n){console.warn("esbuild initialize error",n)}let t;try{Br.vol.fromJSON({"input.ts":`export * as pkg from "https://cdn.skypack.dev/${e}";`},"/");let n=await zl({entryPoints:[""],bundle:!0,minify:!0,color:!0,target:["es2020"],logLevel:"error",write:!1,outfile:"/bundle.js",external:["esbuild","fsevents","chokidar","yargs"],platform:"browser",format:"esm",banner:{js:"const global = globalThis;"},plugins:[dd(),gd("/input.ts"),vd(),md(),wd(),yd()],globalName:"bundler"});(r=n==null?void 0:n.outputFiles)==null||r.forEach(i=>{Br.fs.existsSync(Lf.default.dirname(i.path))||Br.fs.mkdirSync(Lf.default.dirname(i.path)),Br.fs.writeFileSync(i.path,i.text)}),t=await Br.fs.promises.readFile("/bundle.js","utf-8"),Zy&&console.log(t)}catch(n){console.warn("esbuild build error",n)}try{if(!t)throw`the content of the build is not valid, "${t}"`;let{length:n}=Wy(t,{level:9}),i=(0,Vy.default)(n);return Zy&&console.log(`'${e}' is ${i}`),i}catch(n){console.warn("Error zipping file ",n)}};export{Zy as _DEBUG,Hy as _initialized,Vx as default}; +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/*! https://mths.be/punycode v1.3.2 by @mathias */ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +/*! pako 2.0.3 https://github.com/nodeca/pako @license (MIT AND Zlib) */ +//# sourceMappingURL=esbuild.js.map diff --git a/docs/js/esbuild.js.map b/docs/js/esbuild.js.map new file mode 100644 index 00000000..06c77e1c --- /dev/null +++ b/docs/js/esbuild.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["shims/process.js", "node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js", "node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js", "node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js", "shims/node-shim.js", "node_modules/.pnpm/util@0.10.4/node_modules/util/support/isBufferBrowser.js", "node_modules/.pnpm/inherits@2.0.3/node_modules/inherits/inherits_browser.js", "node_modules/.pnpm/util@0.10.4/node_modules/util/util.js", "node_modules/.pnpm/path@0.12.7/node_modules/path/path.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/constants.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/getBigInt.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/Stats.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/internal/buffer.js", "node_modules/.pnpm/has-symbols@1.0.2/node_modules/has-symbols/shams.js", "node_modules/.pnpm/has-symbols@1.0.2/node_modules/has-symbols/index.js", "node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js", "node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js", "node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js", "node_modules/.pnpm/get-intrinsic@1.1.1/node_modules/get-intrinsic/index.js", "node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js", "node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js", "node_modules/.pnpm/is-arguments@1.1.0/node_modules/is-arguments/index.js", "node_modules/.pnpm/is-generator-function@1.0.8/node_modules/is-generator-function/index.js", "node_modules/.pnpm/foreach@2.0.5/node_modules/foreach/index.js", "node_modules/.pnpm/array-filter@1.0.0/node_modules/array-filter/index.js", "node_modules/.pnpm/available-typed-arrays@1.0.2/node_modules/available-typed-arrays/index.js", "node_modules/.pnpm/es-abstract@1.18.0/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js", "node_modules/.pnpm/is-typed-array@1.1.5/node_modules/is-typed-array/index.js", "node_modules/.pnpm/which-typed-array@1.1.4/node_modules/which-typed-array/index.js", "node_modules/.pnpm/util@0.12.3/node_modules/util/support/types.js", "node_modules/.pnpm/util@0.12.3/node_modules/util/support/isBufferBrowser.js", "node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js", "node_modules/.pnpm/util@0.12.3/node_modules/util/util.js", "node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/internal/errors.js", "node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/internal/assert/assertion_error.js", "node_modules/.pnpm/es6-object-assign@1.1.0/node_modules/es6-object-assign/index.js", "node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js", "node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js", "node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js", "node_modules/.pnpm/define-properties@1.1.3/node_modules/define-properties/index.js", "node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/implementation.js", "node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/polyfill.js", "node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/shim.js", "node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/index.js", "node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/implementation.js", "node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/polyfill.js", "node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/shim.js", "node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/index.js", "node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/internal/util/comparisons.js", "node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/assert.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/internal/errors.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/encoding.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/Dirent.js", "node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/setImmediate.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/process.js", "node_modules/.pnpm/events@3.3.0/node_modules/events/events.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/node.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/setTimeoutUnref.js", "node_modules/.pnpm/emitter-component@1.1.1/node_modules/emitter-component/index.js", "node_modules/.pnpm/stream@0.0.2/node_modules/stream/index.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/promises.js", "node_modules/.pnpm/punycode@1.3.2/node_modules/punycode/punycode.js", "node_modules/.pnpm/url@0.11.0/node_modules/url/util.js", "node_modules/.pnpm/querystring@0.2.0/node_modules/querystring/decode.js", "node_modules/.pnpm/querystring@0.2.0/node_modules/querystring/encode.js", "node_modules/.pnpm/querystring@0.2.0/node_modules/querystring/index.js", "node_modules/.pnpm/url@0.11.0/node_modules/url/url.js", "node_modules/.pnpm/fs-monkey@1.0.3/node_modules/fs-monkey/lib/correctPath.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/volume.js", "node_modules/.pnpm/fs-monkey@1.0.3/node_modules/fs-monkey/lib/util/lists.js", "node_modules/.pnpm/memfs@3.2.2/node_modules/memfs/lib/index.js", "node_modules/.pnpm/pretty-bytes@5.6.0/node_modules/pretty-bytes/index.js", "src/ts/modules/esbuild.ts", "node_modules/.pnpm/esbuild-wasm@0.11.15/node_modules/esbuild-wasm/esm/browser.js", "src/ts/plugins/external.ts", "src/ts/plugins/entry.ts", "src/ts/plugins/virtual-fs.ts", "src/ts/plugins/bare.ts", "src/ts/plugins/cdn.ts", "src/ts/plugins/http.ts", "node_modules/.pnpm/pako@2.0.3/node_modules/pako/dist/pako.esm.mjs"], + "sourcesContent": ["// @ts-nocheck\n// Shim for using process in browser\n// Based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n// Based off https://github.com/hardfist/neo-tools/blob/main/packages/bundler/src/shim/process.js\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\nvar cachedSetTimeout = defaultSetTimout;\nvar cachedClearTimeout = defaultClearTimeout;\nif (typeof global.setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n}\nif (typeof global.clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n}\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nfunction nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nvar title = 'browser';\nvar platform = 'browser';\nvar browser = true;\nvar env = {};\nvar argv = [];\nvar version = ''; // empty string to avoid regexp issues\nvar versions = {};\nvar release = {};\nvar config = {};\n\nfunction noop() { }\n\nvar on = noop;\nvar addListener = noop;\nvar once = noop;\nvar off = noop;\nvar removeListener = noop;\nvar removeAllListeners = noop;\nvar emit = noop;\n\nfunction binding(name) {\n throw new Error('process.binding is not supported');\n}\n\nfunction cwd() {\n return '/';\n}\nfunction chdir(dir) {\n throw new Error('process.chdir is not supported');\n}\nfunction umask() {\n return 0;\n}\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = global.performance || {};\nvar performanceNow =\n performance.now ||\n performance.mozNow ||\n performance.msNow ||\n performance.oNow ||\n performance.webkitNow ||\n function () {\n return new Date().getTime();\n };\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nfunction hrtime(previousTimestamp) {\n var clocktime = performanceNow.call(performance) * 1e-3;\n var seconds = Math.floor(clocktime);\n var nanoseconds = Math.floor((clocktime % 1) * 1e9);\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0];\n nanoseconds = nanoseconds - previousTimestamp[1];\n if (nanoseconds < 0) {\n seconds--;\n nanoseconds += 1e9;\n }\n }\n return [seconds, nanoseconds];\n}\n\nvar startTime = new Date();\nfunction uptime() {\n var currentTime = new Date();\n var dif = currentTime - startTime;\n return dif / 1000;\n}\n\nvar browser$1 = {\n nextTick: nextTick,\n title: title,\n browser: browser,\n env: env,\n argv: argv,\n version: version,\n versions: versions,\n on: on,\n addListener: addListener,\n once: once,\n off: off,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners,\n emit: emit,\n binding: binding,\n cwd: cwd,\n chdir: chdir,\n umask: umask,\n hrtime: hrtime,\n platform: platform,\n release: release,\n config: config,\n uptime: uptime,\n};\n\nexport default browser$1;\ndelete versions['node']; // hack\nexport {\n addListener,\n argv,\n binding,\n browser,\n chdir,\n config,\n cwd,\n emit,\n env,\n hrtime,\n nextTick,\n off,\n on,\n once,\n platform,\n release,\n removeAllListeners,\n removeListener,\n title,\n umask,\n uptime,\n version,\n versions,\n};", "'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n", "/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n", "/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n", "// Based off https://github.com/hardfist/neo-tools/blob/main/packages/bundler/src/shim/node.js\nexport * as process from './process';\nexport { Buffer } from \"buffer/\";", "module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}", "if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n", "// Copyright Joyent, Inc. and other Node contributors.\r\n//\r\n// Permission is hereby granted, free of charge, to any person obtaining a\r\n// copy of this software and associated documentation files (the\r\n// \"Software\"), to deal in the Software without restriction, including\r\n// without limitation the rights to use, copy, modify, merge, publish,\r\n// distribute, sublicense, and/or sell copies of the Software, and to permit\r\n// persons to whom the Software is furnished to do so, subject to the\r\n// following conditions:\r\n//\r\n// The above copyright notice and this permission notice shall be included\r\n// in all copies or substantial portions of the Software.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\r\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\r\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\r\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\r\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n'use strict';\r\n\r\n\r\nvar isWindows = process.platform === 'win32';\r\nvar util = require('util');\r\n\r\n\r\n// resolves . and .. elements in a path array with directory names there\r\n// must be no slashes or device names (c:\\) in the array\r\n// (so also no leading and trailing slashes - it does not distinguish\r\n// relative and absolute paths)\r\nfunction normalizeArray(parts, allowAboveRoot) {\r\n var res = [];\r\n for (var i = 0; i < parts.length; i++) {\r\n var p = parts[i];\r\n\r\n // ignore empty parts\r\n if (!p || p === '.')\r\n continue;\r\n\r\n if (p === '..') {\r\n if (res.length && res[res.length - 1] !== '..') {\r\n res.pop();\r\n } else if (allowAboveRoot) {\r\n res.push('..');\r\n }\r\n } else {\r\n res.push(p);\r\n }\r\n }\r\n\r\n return res;\r\n}\r\n\r\n// returns an array with empty elements removed from either end of the input\r\n// array or the original array if no elements need to be removed\r\nfunction trimArray(arr) {\r\n var lastIndex = arr.length - 1;\r\n var start = 0;\r\n for (; start <= lastIndex; start++) {\r\n if (arr[start])\r\n break;\r\n }\r\n\r\n var end = lastIndex;\r\n for (; end >= 0; end--) {\r\n if (arr[end])\r\n break;\r\n }\r\n\r\n if (start === 0 && end === lastIndex)\r\n return arr;\r\n if (start > end)\r\n return [];\r\n return arr.slice(start, end + 1);\r\n}\r\n\r\n// Regex to split a windows path into three parts: [*, device, slash,\r\n// tail] windows-only\r\nvar splitDeviceRe =\r\n /^([a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/]+[^\\\\\\/]+)?([\\\\\\/])?([\\s\\S]*?)$/;\r\n\r\n// Regex to split the tail part of the above into [*, dir, basename, ext]\r\nvar splitTailRe =\r\n /^([\\s\\S]*?)((?:\\.{1,2}|[^\\\\\\/]+?|)(\\.[^.\\/\\\\]*|))(?:[\\\\\\/]*)$/;\r\n\r\nvar win32 = {};\r\n\r\n// Function to split a filename into [root, dir, basename, ext]\r\nfunction win32SplitPath(filename) {\r\n // Separate device+slash from tail\r\n var result = splitDeviceRe.exec(filename),\r\n device = (result[1] || '') + (result[2] || ''),\r\n tail = result[3] || '';\r\n // Split the tail into dir, basename and extension\r\n var result2 = splitTailRe.exec(tail),\r\n dir = result2[1],\r\n basename = result2[2],\r\n ext = result2[3];\r\n return [device, dir, basename, ext];\r\n}\r\n\r\nfunction win32StatPath(path) {\r\n var result = splitDeviceRe.exec(path),\r\n device = result[1] || '',\r\n isUnc = !!device && device[1] !== ':';\r\n return {\r\n device: device,\r\n isUnc: isUnc,\r\n isAbsolute: isUnc || !!result[2], // UNC paths are always absolute\r\n tail: result[3]\r\n };\r\n}\r\n\r\nfunction normalizeUNCRoot(device) {\r\n return '\\\\\\\\' + device.replace(/^[\\\\\\/]+/, '').replace(/[\\\\\\/]+/g, '\\\\');\r\n}\r\n\r\n// path.resolve([from ...], to)\r\nwin32.resolve = function() {\r\n var resolvedDevice = '',\r\n resolvedTail = '',\r\n resolvedAbsolute = false;\r\n\r\n for (var i = arguments.length - 1; i >= -1; i--) {\r\n var path;\r\n if (i >= 0) {\r\n path = arguments[i];\r\n } else if (!resolvedDevice) {\r\n path = process.cwd();\r\n } else {\r\n // Windows has the concept of drive-specific current working\r\n // directories. If we've resolved a drive letter but not yet an\r\n // absolute path, get cwd for that drive. We're sure the device is not\r\n // an unc path at this points, because unc paths are always absolute.\r\n path = process.env['=' + resolvedDevice];\r\n // Verify that a drive-local cwd was found and that it actually points\r\n // to our drive. If not, default to the drive's root.\r\n if (!path || path.substr(0, 3).toLowerCase() !==\r\n resolvedDevice.toLowerCase() + '\\\\') {\r\n path = resolvedDevice + '\\\\';\r\n }\r\n }\r\n\r\n // Skip empty and invalid entries\r\n if (!util.isString(path)) {\r\n throw new TypeError('Arguments to path.resolve must be strings');\r\n } else if (!path) {\r\n continue;\r\n }\r\n\r\n var result = win32StatPath(path),\r\n device = result.device,\r\n isUnc = result.isUnc,\r\n isAbsolute = result.isAbsolute,\r\n tail = result.tail;\r\n\r\n if (device &&\r\n resolvedDevice &&\r\n device.toLowerCase() !== resolvedDevice.toLowerCase()) {\r\n // This path points to another device so it is not applicable\r\n continue;\r\n }\r\n\r\n if (!resolvedDevice) {\r\n resolvedDevice = device;\r\n }\r\n if (!resolvedAbsolute) {\r\n resolvedTail = tail + '\\\\' + resolvedTail;\r\n resolvedAbsolute = isAbsolute;\r\n }\r\n\r\n if (resolvedDevice && resolvedAbsolute) {\r\n break;\r\n }\r\n }\r\n\r\n // Convert slashes to backslashes when `resolvedDevice` points to an UNC\r\n // root. Also squash multiple slashes into a single one where appropriate.\r\n if (isUnc) {\r\n resolvedDevice = normalizeUNCRoot(resolvedDevice);\r\n }\r\n\r\n // At this point the path should be resolved to a full absolute path,\r\n // but handle relative paths to be safe (might happen when process.cwd()\r\n // fails)\r\n\r\n // Normalize the tail path\r\n resolvedTail = normalizeArray(resolvedTail.split(/[\\\\\\/]+/),\r\n !resolvedAbsolute).join('\\\\');\r\n\r\n return (resolvedDevice + (resolvedAbsolute ? '\\\\' : '') + resolvedTail) ||\r\n '.';\r\n};\r\n\r\n\r\nwin32.normalize = function(path) {\r\n var result = win32StatPath(path),\r\n device = result.device,\r\n isUnc = result.isUnc,\r\n isAbsolute = result.isAbsolute,\r\n tail = result.tail,\r\n trailingSlash = /[\\\\\\/]$/.test(tail);\r\n\r\n // Normalize the tail path\r\n tail = normalizeArray(tail.split(/[\\\\\\/]+/), !isAbsolute).join('\\\\');\r\n\r\n if (!tail && !isAbsolute) {\r\n tail = '.';\r\n }\r\n if (tail && trailingSlash) {\r\n tail += '\\\\';\r\n }\r\n\r\n // Convert slashes to backslashes when `device` points to an UNC root.\r\n // Also squash multiple slashes into a single one where appropriate.\r\n if (isUnc) {\r\n device = normalizeUNCRoot(device);\r\n }\r\n\r\n return device + (isAbsolute ? '\\\\' : '') + tail;\r\n};\r\n\r\n\r\nwin32.isAbsolute = function(path) {\r\n return win32StatPath(path).isAbsolute;\r\n};\r\n\r\nwin32.join = function() {\r\n var paths = [];\r\n for (var i = 0; i < arguments.length; i++) {\r\n var arg = arguments[i];\r\n if (!util.isString(arg)) {\r\n throw new TypeError('Arguments to path.join must be strings');\r\n }\r\n if (arg) {\r\n paths.push(arg);\r\n }\r\n }\r\n\r\n var joined = paths.join('\\\\');\r\n\r\n // Make sure that the joined path doesn't start with two slashes, because\r\n // normalize() will mistake it for an UNC path then.\r\n //\r\n // This step is skipped when it is very clear that the user actually\r\n // intended to point at an UNC path. This is assumed when the first\r\n // non-empty string arguments starts with exactly two slashes followed by\r\n // at least one more non-slash character.\r\n //\r\n // Note that for normalize() to treat a path as an UNC path it needs to\r\n // have at least 2 components, so we don't filter for that here.\r\n // This means that the user can use join to construct UNC paths from\r\n // a server name and a share name; for example:\r\n // path.join('//server', 'share') -> '\\\\\\\\server\\\\share\\')\r\n if (!/^[\\\\\\/]{2}[^\\\\\\/]/.test(paths[0])) {\r\n joined = joined.replace(/^[\\\\\\/]{2,}/, '\\\\');\r\n }\r\n\r\n return win32.normalize(joined);\r\n};\r\n\r\n\r\n// path.relative(from, to)\r\n// it will solve the relative path from 'from' to 'to', for instance:\r\n// from = 'C:\\\\orandea\\\\test\\\\aaa'\r\n// to = 'C:\\\\orandea\\\\impl\\\\bbb'\r\n// The output of the function should be: '..\\\\..\\\\impl\\\\bbb'\r\nwin32.relative = function(from, to) {\r\n from = win32.resolve(from);\r\n to = win32.resolve(to);\r\n\r\n // windows is not case sensitive\r\n var lowerFrom = from.toLowerCase();\r\n var lowerTo = to.toLowerCase();\r\n\r\n var toParts = trimArray(to.split('\\\\'));\r\n\r\n var lowerFromParts = trimArray(lowerFrom.split('\\\\'));\r\n var lowerToParts = trimArray(lowerTo.split('\\\\'));\r\n\r\n var length = Math.min(lowerFromParts.length, lowerToParts.length);\r\n var samePartsLength = length;\r\n for (var i = 0; i < length; i++) {\r\n if (lowerFromParts[i] !== lowerToParts[i]) {\r\n samePartsLength = i;\r\n break;\r\n }\r\n }\r\n\r\n if (samePartsLength == 0) {\r\n return to;\r\n }\r\n\r\n var outputParts = [];\r\n for (var i = samePartsLength; i < lowerFromParts.length; i++) {\r\n outputParts.push('..');\r\n }\r\n\r\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\r\n\r\n return outputParts.join('\\\\');\r\n};\r\n\r\n\r\nwin32._makeLong = function(path) {\r\n // Note: this will *probably* throw somewhere.\r\n if (!util.isString(path))\r\n return path;\r\n\r\n if (!path) {\r\n return '';\r\n }\r\n\r\n var resolvedPath = win32.resolve(path);\r\n\r\n if (/^[a-zA-Z]\\:\\\\/.test(resolvedPath)) {\r\n // path is local filesystem path, which needs to be converted\r\n // to long UNC path.\r\n return '\\\\\\\\?\\\\' + resolvedPath;\r\n } else if (/^\\\\\\\\[^?.]/.test(resolvedPath)) {\r\n // path is network UNC path, which needs to be converted\r\n // to long UNC path.\r\n return '\\\\\\\\?\\\\UNC\\\\' + resolvedPath.substring(2);\r\n }\r\n\r\n return path;\r\n};\r\n\r\n\r\nwin32.dirname = function(path) {\r\n var result = win32SplitPath(path),\r\n root = result[0],\r\n dir = result[1];\r\n\r\n if (!root && !dir) {\r\n // No dirname whatsoever\r\n return '.';\r\n }\r\n\r\n if (dir) {\r\n // It has a dirname, strip trailing slash\r\n dir = dir.substr(0, dir.length - 1);\r\n }\r\n\r\n return root + dir;\r\n};\r\n\r\n\r\nwin32.basename = function(path, ext) {\r\n var f = win32SplitPath(path)[2];\r\n // TODO: make this comparison case-insensitive on windows?\r\n if (ext && f.substr(-1 * ext.length) === ext) {\r\n f = f.substr(0, f.length - ext.length);\r\n }\r\n return f;\r\n};\r\n\r\n\r\nwin32.extname = function(path) {\r\n return win32SplitPath(path)[3];\r\n};\r\n\r\n\r\nwin32.format = function(pathObject) {\r\n if (!util.isObject(pathObject)) {\r\n throw new TypeError(\r\n \"Parameter 'pathObject' must be an object, not \" + typeof pathObject\r\n );\r\n }\r\n\r\n var root = pathObject.root || '';\r\n\r\n if (!util.isString(root)) {\r\n throw new TypeError(\r\n \"'pathObject.root' must be a string or undefined, not \" +\r\n typeof pathObject.root\r\n );\r\n }\r\n\r\n var dir = pathObject.dir;\r\n var base = pathObject.base || '';\r\n if (!dir) {\r\n return base;\r\n }\r\n if (dir[dir.length - 1] === win32.sep) {\r\n return dir + base;\r\n }\r\n return dir + win32.sep + base;\r\n};\r\n\r\n\r\nwin32.parse = function(pathString) {\r\n if (!util.isString(pathString)) {\r\n throw new TypeError(\r\n \"Parameter 'pathString' must be a string, not \" + typeof pathString\r\n );\r\n }\r\n var allParts = win32SplitPath(pathString);\r\n if (!allParts || allParts.length !== 4) {\r\n throw new TypeError(\"Invalid path '\" + pathString + \"'\");\r\n }\r\n return {\r\n root: allParts[0],\r\n dir: allParts[0] + allParts[1].slice(0, -1),\r\n base: allParts[2],\r\n ext: allParts[3],\r\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\r\n };\r\n};\r\n\r\n\r\nwin32.sep = '\\\\';\r\nwin32.delimiter = ';';\r\n\r\n\r\n// Split a filename into [root, dir, basename, ext], unix version\r\n// 'root' is just a slash, or nothing.\r\nvar splitPathRe =\r\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\r\nvar posix = {};\r\n\r\n\r\nfunction posixSplitPath(filename) {\r\n return splitPathRe.exec(filename).slice(1);\r\n}\r\n\r\n\r\n// path.resolve([from ...], to)\r\n// posix version\r\nposix.resolve = function() {\r\n var resolvedPath = '',\r\n resolvedAbsolute = false;\r\n\r\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\r\n var path = (i >= 0) ? arguments[i] : process.cwd();\r\n\r\n // Skip empty and invalid entries\r\n if (!util.isString(path)) {\r\n throw new TypeError('Arguments to path.resolve must be strings');\r\n } else if (!path) {\r\n continue;\r\n }\r\n\r\n resolvedPath = path + '/' + resolvedPath;\r\n resolvedAbsolute = path[0] === '/';\r\n }\r\n\r\n // At this point the path should be resolved to a full absolute path, but\r\n // handle relative paths to be safe (might happen when process.cwd() fails)\r\n\r\n // Normalize the path\r\n resolvedPath = normalizeArray(resolvedPath.split('/'),\r\n !resolvedAbsolute).join('/');\r\n\r\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\r\n};\r\n\r\n// path.normalize(path)\r\n// posix version\r\nposix.normalize = function(path) {\r\n var isAbsolute = posix.isAbsolute(path),\r\n trailingSlash = path && path[path.length - 1] === '/';\r\n\r\n // Normalize the path\r\n path = normalizeArray(path.split('/'), !isAbsolute).join('/');\r\n\r\n if (!path && !isAbsolute) {\r\n path = '.';\r\n }\r\n if (path && trailingSlash) {\r\n path += '/';\r\n }\r\n\r\n return (isAbsolute ? '/' : '') + path;\r\n};\r\n\r\n// posix version\r\nposix.isAbsolute = function(path) {\r\n return path.charAt(0) === '/';\r\n};\r\n\r\n// posix version\r\nposix.join = function() {\r\n var path = '';\r\n for (var i = 0; i < arguments.length; i++) {\r\n var segment = arguments[i];\r\n if (!util.isString(segment)) {\r\n throw new TypeError('Arguments to path.join must be strings');\r\n }\r\n if (segment) {\r\n if (!path) {\r\n path += segment;\r\n } else {\r\n path += '/' + segment;\r\n }\r\n }\r\n }\r\n return posix.normalize(path);\r\n};\r\n\r\n\r\n// path.relative(from, to)\r\n// posix version\r\nposix.relative = function(from, to) {\r\n from = posix.resolve(from).substr(1);\r\n to = posix.resolve(to).substr(1);\r\n\r\n var fromParts = trimArray(from.split('/'));\r\n var toParts = trimArray(to.split('/'));\r\n\r\n var length = Math.min(fromParts.length, toParts.length);\r\n var samePartsLength = length;\r\n for (var i = 0; i < length; i++) {\r\n if (fromParts[i] !== toParts[i]) {\r\n samePartsLength = i;\r\n break;\r\n }\r\n }\r\n\r\n var outputParts = [];\r\n for (var i = samePartsLength; i < fromParts.length; i++) {\r\n outputParts.push('..');\r\n }\r\n\r\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\r\n\r\n return outputParts.join('/');\r\n};\r\n\r\n\r\nposix._makeLong = function(path) {\r\n return path;\r\n};\r\n\r\n\r\nposix.dirname = function(path) {\r\n var result = posixSplitPath(path),\r\n root = result[0],\r\n dir = result[1];\r\n\r\n if (!root && !dir) {\r\n // No dirname whatsoever\r\n return '.';\r\n }\r\n\r\n if (dir) {\r\n // It has a dirname, strip trailing slash\r\n dir = dir.substr(0, dir.length - 1);\r\n }\r\n\r\n return root + dir;\r\n};\r\n\r\n\r\nposix.basename = function(path, ext) {\r\n var f = posixSplitPath(path)[2];\r\n // TODO: make this comparison case-insensitive on windows?\r\n if (ext && f.substr(-1 * ext.length) === ext) {\r\n f = f.substr(0, f.length - ext.length);\r\n }\r\n return f;\r\n};\r\n\r\n\r\nposix.extname = function(path) {\r\n return posixSplitPath(path)[3];\r\n};\r\n\r\n\r\nposix.format = function(pathObject) {\r\n if (!util.isObject(pathObject)) {\r\n throw new TypeError(\r\n \"Parameter 'pathObject' must be an object, not \" + typeof pathObject\r\n );\r\n }\r\n\r\n var root = pathObject.root || '';\r\n\r\n if (!util.isString(root)) {\r\n throw new TypeError(\r\n \"'pathObject.root' must be a string or undefined, not \" +\r\n typeof pathObject.root\r\n );\r\n }\r\n\r\n var dir = pathObject.dir ? pathObject.dir + posix.sep : '';\r\n var base = pathObject.base || '';\r\n return dir + base;\r\n};\r\n\r\n\r\nposix.parse = function(pathString) {\r\n if (!util.isString(pathString)) {\r\n throw new TypeError(\r\n \"Parameter 'pathString' must be a string, not \" + typeof pathString\r\n );\r\n }\r\n var allParts = posixSplitPath(pathString);\r\n if (!allParts || allParts.length !== 4) {\r\n throw new TypeError(\"Invalid path '\" + pathString + \"'\");\r\n }\r\n allParts[1] = allParts[1] || '';\r\n allParts[2] = allParts[2] || '';\r\n allParts[3] = allParts[3] || '';\r\n\r\n return {\r\n root: allParts[0],\r\n dir: allParts[0] + allParts[1].slice(0, -1),\r\n base: allParts[2],\r\n ext: allParts[3],\r\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\r\n };\r\n};\r\n\r\n\r\nposix.sep = '/';\r\nposix.delimiter = ':';\r\n\r\n\r\nif (isWindows)\r\n module.exports = win32;\r\nelse /* posix */\r\n module.exports = posix;\r\n\r\nmodule.exports.posix = posix;\r\nmodule.exports.win32 = win32;\r\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.constants = void 0;\nexports.constants = {\n O_RDONLY: 0,\n O_WRONLY: 1,\n O_RDWR: 2,\n S_IFMT: 61440,\n S_IFREG: 32768,\n S_IFDIR: 16384,\n S_IFCHR: 8192,\n S_IFBLK: 24576,\n S_IFIFO: 4096,\n S_IFLNK: 40960,\n S_IFSOCK: 49152,\n O_CREAT: 64,\n O_EXCL: 128,\n O_NOCTTY: 256,\n O_TRUNC: 512,\n O_APPEND: 1024,\n O_DIRECTORY: 65536,\n O_NOATIME: 262144,\n O_NOFOLLOW: 131072,\n O_SYNC: 1052672,\n O_DIRECT: 16384,\n O_NONBLOCK: 2048,\n S_IRWXU: 448,\n S_IRUSR: 256,\n S_IWUSR: 128,\n S_IXUSR: 64,\n S_IRWXG: 56,\n S_IRGRP: 32,\n S_IWGRP: 16,\n S_IXGRP: 8,\n S_IRWXO: 7,\n S_IROTH: 4,\n S_IWOTH: 2,\n S_IXOTH: 1,\n F_OK: 0,\n R_OK: 4,\n W_OK: 2,\n X_OK: 1,\n UV_FS_SYMLINK_DIR: 1,\n UV_FS_SYMLINK_JUNCTION: 2,\n UV_FS_COPYFILE_EXCL: 1,\n UV_FS_COPYFILE_FICLONE: 2,\n UV_FS_COPYFILE_FICLONE_FORCE: 4,\n COPYFILE_EXCL: 1,\n COPYFILE_FICLONE: 2,\n COPYFILE_FICLONE_FORCE: 4,\n};\n", "if (typeof BigInt === 'function') exports.default = BigInt;\nelse\n exports.default = function BigIntNotSupported() {\n throw new Error('BigInt is not supported in this environment.');\n };\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Stats = void 0;\nvar constants_1 = require(\"./constants\");\nvar getBigInt_1 = require(\"./getBigInt\");\nvar S_IFMT = constants_1.constants.S_IFMT, S_IFDIR = constants_1.constants.S_IFDIR, S_IFREG = constants_1.constants.S_IFREG, S_IFBLK = constants_1.constants.S_IFBLK, S_IFCHR = constants_1.constants.S_IFCHR, S_IFLNK = constants_1.constants.S_IFLNK, S_IFIFO = constants_1.constants.S_IFIFO, S_IFSOCK = constants_1.constants.S_IFSOCK;\n/**\n * Statistics about a file/directory, like `fs.Stats`.\n */\nvar Stats = /** @class */ (function () {\n function Stats() {\n }\n Stats.build = function (node, bigint) {\n if (bigint === void 0) { bigint = false; }\n var stats = new Stats();\n var uid = node.uid, gid = node.gid, atime = node.atime, mtime = node.mtime, ctime = node.ctime;\n var getStatNumber = !bigint ? function (number) { return number; } : getBigInt_1.default;\n // Copy all values on Stats from Node, so that if Node values\n // change, values on Stats would still be the old ones,\n // just like in Node fs.\n stats.uid = getStatNumber(uid);\n stats.gid = getStatNumber(gid);\n stats.rdev = getStatNumber(0);\n stats.blksize = getStatNumber(4096);\n stats.ino = getStatNumber(node.ino);\n stats.size = getStatNumber(node.getSize());\n stats.blocks = getStatNumber(1);\n stats.atime = atime;\n stats.mtime = mtime;\n stats.ctime = ctime;\n stats.birthtime = ctime;\n stats.atimeMs = getStatNumber(atime.getTime());\n stats.mtimeMs = getStatNumber(mtime.getTime());\n var ctimeMs = getStatNumber(ctime.getTime());\n stats.ctimeMs = ctimeMs;\n stats.birthtimeMs = ctimeMs;\n stats.dev = getStatNumber(0);\n stats.mode = getStatNumber(node.mode);\n stats.nlink = getStatNumber(node.nlink);\n return stats;\n };\n Stats.prototype._checkModeProperty = function (property) {\n return (Number(this.mode) & S_IFMT) === property;\n };\n Stats.prototype.isDirectory = function () {\n return this._checkModeProperty(S_IFDIR);\n };\n Stats.prototype.isFile = function () {\n return this._checkModeProperty(S_IFREG);\n };\n Stats.prototype.isBlockDevice = function () {\n return this._checkModeProperty(S_IFBLK);\n };\n Stats.prototype.isCharacterDevice = function () {\n return this._checkModeProperty(S_IFCHR);\n };\n Stats.prototype.isSymbolicLink = function () {\n return this._checkModeProperty(S_IFLNK);\n };\n Stats.prototype.isFIFO = function () {\n return this._checkModeProperty(S_IFIFO);\n };\n Stats.prototype.isSocket = function () {\n return this._checkModeProperty(S_IFSOCK);\n };\n return Stats;\n}());\nexports.Stats = Stats;\nexports.default = Stats;\n", "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bufferFrom = exports.bufferAllocUnsafe = exports.Buffer = void 0;\nvar buffer_1 = require(\"buffer\");\nObject.defineProperty(exports, \"Buffer\", { enumerable: true, get: function () { return buffer_1.Buffer; } });\nfunction bufferV0P12Ponyfill(arg0) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return new (buffer_1.Buffer.bind.apply(buffer_1.Buffer, __spreadArray([void 0, arg0], args)))();\n}\nvar bufferAllocUnsafe = buffer_1.Buffer.allocUnsafe || bufferV0P12Ponyfill;\nexports.bufferAllocUnsafe = bufferAllocUnsafe;\nvar bufferFrom = buffer_1.Buffer.from || bufferV0P12Ponyfill;\nexports.bufferFrom = bufferFrom;\n", "'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n", "'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n", "'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n", "'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n", "'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n", "'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n", "'use strict';\n\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n", "'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar generatorFunc = getGeneratorFunc();\nvar GeneratorFunction = getProto && generatorFunc ? getProto(generatorFunc) : false;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\treturn getProto && getProto(fn) === GeneratorFunction;\n};\n", "\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nmodule.exports = function forEach (obj, fn, ctx) {\n if (toString.call(fn) !== '[object Function]') {\n throw new TypeError('iterator must be a function');\n }\n var l = obj.length;\n if (l === +l) {\n for (var i = 0; i < l; i++) {\n fn.call(ctx, obj[i], i, obj);\n }\n } else {\n for (var k in obj) {\n if (hasOwn.call(obj, k)) {\n fn.call(ctx, obj[k], k, obj);\n }\n }\n }\n};\n\n", "\n/**\n * Array#filter.\n *\n * @param {Array} arr\n * @param {Function} fn\n * @param {Object=} self\n * @return {Array}\n * @throw TypeError\n */\n\nmodule.exports = function (arr, fn, self) {\n if (arr.filter) return arr.filter(fn, self);\n if (void 0 === arr || null === arr) throw new TypeError;\n if ('function' != typeof fn) throw new TypeError;\n var ret = [];\n for (var i = 0; i < arr.length; i++) {\n if (!hasOwn.call(arr, i)) continue;\n var val = arr[i];\n if (fn.call(self, val, i, arr)) ret.push(val);\n }\n return ret;\n};\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n", "'use strict';\n\nvar filter = require('array-filter');\n\nmodule.exports = function availableTypedArrays() {\n\treturn filter([\n\t\t'BigInt64Array',\n\t\t'BigUint64Array',\n\t\t'Float32Array',\n\t\t'Float64Array',\n\t\t'Int16Array',\n\t\t'Int32Array',\n\t\t'Int8Array',\n\t\t'Uint16Array',\n\t\t'Uint32Array',\n\t\t'Uint8Array',\n\t\t'Uint8ClampedArray'\n\t], function (typedArray) {\n\t\treturn typeof global[typedArray] === 'function';\n\t});\n};\n", "'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%');\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n", "'use strict';\n\nvar forEach = require('foreach');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasSymbols = require('has-symbols')();\nvar hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';\n\nvar typedArrays = availableTypedArrays();\n\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\nvar $slice = callBound('String.prototype.slice');\nvar toStrTags = {};\nvar gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new global[typedArray]();\n\t\tif (!(Symbol.toStringTag in arr)) {\n\t\t\tthrow new EvalError('this engine has support for Symbol.toStringTag, but ' + typedArray + ' does not have the property! Please report this.');\n\t\t}\n\t\tvar proto = getPrototypeOf(arr);\n\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\tif (!descriptor) {\n\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t}\n\t\ttoStrTags[typedArray] = descriptor.get;\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar anyTrue = false;\n\tforEach(toStrTags, function (getter, typedArray) {\n\t\tif (!anyTrue) {\n\t\t\ttry {\n\t\t\t\tanyTrue = getter.call(value) === typedArray;\n\t\t\t} catch (e) { /**/ }\n\t\t}\n\t});\n\treturn anyTrue;\n};\n\nmodule.exports = function isTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\treturn $indexOf(typedArrays, tag) > -1;\n\t}\n\tif (!gOPD) { return false; }\n\treturn tryTypedArrays(value);\n};\n", "'use strict';\n\nvar forEach = require('foreach');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasSymbols = require('has-symbols')();\nvar hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';\n\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar toStrTags = {};\nvar gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tif (typeof global[typedArray] === 'function') {\n\t\t\tvar arr = new global[typedArray]();\n\t\t\tif (!(Symbol.toStringTag in arr)) {\n\t\t\t\tthrow new EvalError('this engine has support for Symbol.toStringTag, but ' + typedArray + ' does not have the property! Please report this.');\n\t\t\t}\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\ttoStrTags[typedArray] = descriptor.get;\n\t\t}\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar foundName = false;\n\tforEach(toStrTags, function (getter, typedArray) {\n\t\tif (!foundName) {\n\t\t\ttry {\n\t\t\t\tvar name = getter.call(value);\n\t\t\t\tif (name === typedArray) {\n\t\t\t\t\tfoundName = name;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\t\t}\n\t});\n\treturn foundName;\n};\n\nvar isTypedArray = require('is-typed-array');\n\nmodule.exports = function whichTypedArray(value) {\n\tif (!isTypedArray(value)) { return false; }\n\tif (!hasToStringTag) { return $slice($toString(value), 8, -1); }\n\treturn tryTypedArrays(value);\n};\n", "// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nvar isArgumentsObject = require('is-arguments');\nvar isGeneratorFunction = require('is-generator-function');\nvar whichTypedArray = require('which-typed-array');\nvar isTypedArray = require('is-typed-array');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nisSharedArrayBufferToString.working = (\n typeof SharedArrayBuffer !== 'undefined' &&\n isSharedArrayBufferToString(new SharedArrayBuffer())\n);\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBuffer === 'undefined') {\n return false;\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBuffer;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n", "module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}", "if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = require('./support/types');\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n", "// Currently in sync with Node.js lib/internal/errors.js\n// https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f\n\n/* eslint node-core/documented-errors: \"error\" */\n\n/* eslint node-core/alphabetize-errors: \"error\" */\n\n/* eslint node-core/prefer-util-format-errors: \"error\" */\n'use strict'; // The whole point behind this internal module is to allow Node.js to no\n// longer be forced to treat every error message change as a semver-major\n// change. The NodeError classes here all expose a `code` property whose\n// value statically and permanently identifies the error. While the error\n// message may change, the code should not.\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nvar codes = {}; // Lazy loaded\n\nvar assert;\nvar util;\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inherits(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n var _this;\n\n _classCallCheck(this, NodeError);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(NodeError).call(this, getMessage(arg1, arg2, arg3)));\n _this.code = code;\n return _this;\n }\n\n return NodeError;\n }(Base);\n\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The \"%s\" argument is ambiguous. %s', TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n if (assert === undefined) assert = require('../assert');\n assert(typeof name === 'string', \"'name' must be a string\"); // determiner: 'must be' or 'must not be'\n\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } // TODO(BridgeAR): Improve the output by showing `null` and similar.\n\n\n msg += \". Received type \".concat(_typeof(actual));\n return msg;\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_VALUE', function (name, value) {\n var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid';\n if (util === undefined) util = require('util/');\n var inspected = util.inspect(value);\n\n if (inspected.length > 128) {\n inspected = \"\".concat(inspected.slice(0, 128), \"...\");\n }\n\n return \"The argument '\".concat(name, \"' \").concat(reason, \". Received \").concat(inspected);\n}, TypeError, RangeError);\ncreateErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) {\n var type;\n\n if (value && value.constructor && value.constructor.name) {\n type = \"instance of \".concat(value.constructor.name);\n } else {\n type = \"type \".concat(_typeof(value));\n }\n\n return \"Expected \".concat(input, \" to be returned from the \\\"\").concat(name, \"\\\"\") + \" function but got \".concat(type, \".\");\n}, TypeError);\ncreateErrorType('ERR_MISSING_ARGS', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (assert === undefined) assert = require('../assert');\n assert(args.length > 0, 'At least one arg needs to be specified');\n var msg = 'The ';\n var len = args.length;\n args = args.map(function (a) {\n return \"\\\"\".concat(a, \"\\\"\");\n });\n\n switch (len) {\n case 1:\n msg += \"\".concat(args[0], \" argument\");\n break;\n\n case 2:\n msg += \"\".concat(args[0], \" and \").concat(args[1], \" arguments\");\n break;\n\n default:\n msg += args.slice(0, len - 1).join(', ');\n msg += \", and \".concat(args[len - 1], \" arguments\");\n break;\n }\n\n return \"\".concat(msg, \" must be specified\");\n}, TypeError);\nmodule.exports.codes = codes;", "// Currently in sync with Node.js lib/internal/assert/assertion_error.js\n// https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _require = require('util/'),\n inspect = _require.inspect;\n\nvar _require2 = require('../errors'),\n ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\n\n\nfunction repeat(str, count) {\n count = Math.floor(count);\n if (str.length == 0 || count == 0) return '';\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n\n while (count) {\n str += str;\n count--;\n }\n\n str += str.substring(0, maxCount - str.length);\n return str;\n}\n\nvar blue = '';\nvar green = '';\nvar red = '';\nvar white = '';\nvar kReadableOperator = {\n deepStrictEqual: 'Expected values to be strictly deep-equal:',\n strictEqual: 'Expected values to be strictly equal:',\n strictEqualObject: 'Expected \"actual\" to be reference-equal to \"expected\":',\n deepEqual: 'Expected values to be loosely deep-equal:',\n equal: 'Expected values to be loosely equal:',\n notDeepStrictEqual: 'Expected \"actual\" not to be strictly deep-equal to:',\n notStrictEqual: 'Expected \"actual\" to be strictly unequal to:',\n notStrictEqualObject: 'Expected \"actual\" not to be reference-equal to \"expected\":',\n notDeepEqual: 'Expected \"actual\" not to be loosely deep-equal to:',\n notEqual: 'Expected \"actual\" to be loosely unequal to:',\n notIdentical: 'Values identical but not reference-equal:'\n}; // Comparing short primitives should just show === / !== instead of using the\n// diff.\n\nvar kMaxShortLength = 10;\n\nfunction copyError(source) {\n var keys = Object.keys(source);\n var target = Object.create(Object.getPrototypeOf(source));\n keys.forEach(function (key) {\n target[key] = source[key];\n });\n Object.defineProperty(target, 'message', {\n value: source.message\n });\n return target;\n}\n\nfunction inspectValue(val) {\n // The util.inspect default values could be changed. This makes sure the\n // error messages contain the necessary information nevertheless.\n return inspect(val, {\n compact: false,\n customInspect: false,\n depth: 1000,\n maxArrayLength: Infinity,\n // Assert compares only enumerable properties (with a few exceptions).\n showHidden: false,\n // Having a long line as error is better than wrapping the line for\n // comparison for now.\n // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we\n // have meta information about the inspected properties (i.e., know where\n // in what line the property starts and ends).\n breakLength: Infinity,\n // Assert does not detect proxies currently.\n showProxy: false,\n sorted: true,\n // Inspect getters as we also check them when comparing entries.\n getters: true\n });\n}\n\nfunction createErrDiff(actual, expected, operator) {\n var other = '';\n var res = '';\n var lastPos = 0;\n var end = '';\n var skipped = false;\n var actualInspected = inspectValue(actual);\n var actualLines = actualInspected.split('\\n');\n var expectedLines = inspectValue(expected).split('\\n');\n var i = 0;\n var indicator = ''; // In case both values are objects explicitly mark them as not reference equal\n // for the `strictEqual` operator.\n\n if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) {\n operator = 'strictEqualObject';\n } // If \"actual\" and \"expected\" fit on a single line and they are not strictly\n // equal, check further special handling.\n\n\n if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {\n var inputLength = actualLines[0].length + expectedLines[0].length; // If the character length of \"actual\" and \"expected\" together is less than\n // kMaxShortLength and if neither is an object and at least one of them is\n // not `zero`, use the strict equal comparison to visualize the output.\n\n if (inputLength <= kMaxShortLength) {\n if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) {\n // -0 === +0\n return \"\".concat(kReadableOperator[operator], \"\\n\\n\") + \"\".concat(actualLines[0], \" !== \").concat(expectedLines[0], \"\\n\");\n }\n } else if (operator !== 'strictEqualObject') {\n // If the stderr is a tty and the input length is lower than the current\n // columns per line, add a mismatch indicator below the output. If it is\n // not a tty, use a default value of 80 characters.\n var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;\n\n if (inputLength < maxLength) {\n while (actualLines[0][i] === expectedLines[0][i]) {\n i++;\n } // Ignore the first characters.\n\n\n if (i > 2) {\n // Add position indicator for the first mismatch in case it is a\n // single line and the input length is less than the column length.\n indicator = \"\\n \".concat(repeat(' ', i), \"^\");\n i = 0;\n }\n }\n }\n } // Remove all ending lines that match (this optimizes the output for\n // readability by reducing the number of total changed lines).\n\n\n var a = actualLines[actualLines.length - 1];\n var b = expectedLines[expectedLines.length - 1];\n\n while (a === b) {\n if (i++ < 2) {\n end = \"\\n \".concat(a).concat(end);\n } else {\n other = a;\n }\n\n actualLines.pop();\n expectedLines.pop();\n if (actualLines.length === 0 || expectedLines.length === 0) break;\n a = actualLines[actualLines.length - 1];\n b = expectedLines[expectedLines.length - 1];\n }\n\n var maxLines = Math.max(actualLines.length, expectedLines.length); // Strict equal with identical objects that are not identical by reference.\n // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })\n\n if (maxLines === 0) {\n // We have to get the result again. The lines were all removed before.\n var _actualLines = actualInspected.split('\\n'); // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n\n\n if (_actualLines.length > 30) {\n _actualLines[26] = \"\".concat(blue, \"...\").concat(white);\n\n while (_actualLines.length > 27) {\n _actualLines.pop();\n }\n }\n\n return \"\".concat(kReadableOperator.notIdentical, \"\\n\\n\").concat(_actualLines.join('\\n'), \"\\n\");\n }\n\n if (i > 3) {\n end = \"\\n\".concat(blue, \"...\").concat(white).concat(end);\n skipped = true;\n }\n\n if (other !== '') {\n end = \"\\n \".concat(other).concat(end);\n other = '';\n }\n\n var printedLines = 0;\n var msg = kReadableOperator[operator] + \"\\n\".concat(green, \"+ actual\").concat(white, \" \").concat(red, \"- expected\").concat(white);\n var skippedMsg = \" \".concat(blue, \"...\").concat(white, \" Lines skipped\");\n\n for (i = 0; i < maxLines; i++) {\n // Only extra expected lines exist\n var cur = i - lastPos;\n\n if (actualLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(expectedLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(expectedLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the expected line to the cache.\n\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLines[i]);\n printedLines++; // Only extra actual lines exist\n } else if (expectedLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the actual line to the result.\n\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLines[i]);\n printedLines++; // Lines diverge\n } else {\n var expectedLine = expectedLines[i];\n var actualLine = actualLines[i]; // If the lines diverge, specifically check for lines that only diverge by\n // a trailing comma. In that case it is actually identical and we should\n // mark it as such.\n\n var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine); // If the expected line has a trailing comma but is otherwise identical,\n // add a comma at the end of the actual line. Otherwise the output could\n // look weird as in:\n //\n // [\n // 1 // No comma at the end!\n // + 2\n // ]\n //\n\n if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {\n divergingLines = false;\n actualLine += ',';\n }\n\n if (divergingLines) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the actual line to the result and cache the expected diverging\n // line so consecutive diverging lines show up as +++--- and not +-+-+-.\n\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLine);\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLine);\n printedLines += 2; // Lines are identical\n } else {\n // Add all cached information to the result before adding other things\n // and reset the cache.\n res += other;\n other = ''; // If the last diverging line is exactly one line above or if it is the\n // very first line, add the line to the result.\n\n if (cur === 1 || i === 0) {\n res += \"\\n \".concat(actualLine);\n printedLines++;\n }\n }\n } // Inspected object to big (Show ~20 rows max)\n\n\n if (printedLines > 20 && i < maxLines - 2) {\n return \"\".concat(msg).concat(skippedMsg, \"\\n\").concat(res, \"\\n\").concat(blue, \"...\").concat(white).concat(other, \"\\n\") + \"\".concat(blue, \"...\").concat(white);\n }\n }\n\n return \"\".concat(msg).concat(skipped ? skippedMsg : '', \"\\n\").concat(res).concat(other).concat(end).concat(indicator);\n}\n\nvar AssertionError =\n/*#__PURE__*/\nfunction (_Error) {\n _inherits(AssertionError, _Error);\n\n function AssertionError(options) {\n var _this;\n\n _classCallCheck(this, AssertionError);\n\n if (_typeof(options) !== 'object' || options === null) {\n throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);\n }\n\n var message = options.message,\n operator = options.operator,\n stackStartFn = options.stackStartFn;\n var actual = options.actual,\n expected = options.expected;\n var limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 0;\n\n if (message != null) {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, String(message)));\n } else {\n if (process.stderr && process.stderr.isTTY) {\n // Reset on each call to make sure we handle dynamically set environment\n // variables correct.\n if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {\n blue = \"\\x1B[34m\";\n green = \"\\x1B[32m\";\n white = \"\\x1B[39m\";\n red = \"\\x1B[31m\";\n } else {\n blue = '';\n green = '';\n white = '';\n red = '';\n }\n } // Prevent the error stack from being visible by duplicating the error\n // in a very close way to the original in case both sides are actually\n // instances of Error.\n\n\n if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) {\n actual = copyError(actual);\n expected = copyError(expected);\n }\n\n if (operator === 'deepStrictEqual' || operator === 'strictEqual') {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, createErrDiff(actual, expected, operator)));\n } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') {\n // In case the objects are equal but the operator requires unequal, show\n // the first object and say A equals B\n var base = kReadableOperator[operator];\n var res = inspectValue(actual).split('\\n'); // In case \"actual\" is an object, it should not be reference equal.\n\n if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) {\n base = kReadableOperator.notStrictEqualObject;\n } // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n\n\n if (res.length > 30) {\n res[26] = \"\".concat(blue, \"...\").concat(white);\n\n while (res.length > 27) {\n res.pop();\n }\n } // Only print a single input.\n\n\n if (res.length === 1) {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(base, \" \").concat(res[0])));\n } else {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(base, \"\\n\\n\").concat(res.join('\\n'), \"\\n\")));\n }\n } else {\n var _res = inspectValue(actual);\n\n var other = '';\n var knownOperators = kReadableOperator[operator];\n\n if (operator === 'notDeepEqual' || operator === 'notEqual') {\n _res = \"\".concat(kReadableOperator[operator], \"\\n\\n\").concat(_res);\n\n if (_res.length > 1024) {\n _res = \"\".concat(_res.slice(0, 1021), \"...\");\n }\n } else {\n other = \"\".concat(inspectValue(expected));\n\n if (_res.length > 512) {\n _res = \"\".concat(_res.slice(0, 509), \"...\");\n }\n\n if (other.length > 512) {\n other = \"\".concat(other.slice(0, 509), \"...\");\n }\n\n if (operator === 'deepEqual' || operator === 'equal') {\n _res = \"\".concat(knownOperators, \"\\n\\n\").concat(_res, \"\\n\\nshould equal\\n\\n\");\n } else {\n other = \" \".concat(operator, \" \").concat(other);\n }\n }\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(_res).concat(other)));\n }\n }\n\n Error.stackTraceLimit = limit;\n _this.generatedMessage = !message;\n Object.defineProperty(_assertThisInitialized(_this), 'name', {\n value: 'AssertionError [ERR_ASSERTION]',\n enumerable: false,\n writable: true,\n configurable: true\n });\n _this.code = 'ERR_ASSERTION';\n _this.actual = actual;\n _this.expected = expected;\n _this.operator = operator;\n\n if (Error.captureStackTrace) {\n // eslint-disable-next-line no-restricted-syntax\n Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);\n } // Create error message including the error code in the name.\n\n\n _this.stack; // Reset the name.\n\n _this.name = 'AssertionError';\n return _possibleConstructorReturn(_this);\n }\n\n _createClass(AssertionError, [{\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this.name, \" [\").concat(this.code, \"]: \").concat(this.message);\n }\n }, {\n key: inspect.custom,\n value: function value(recurseTimes, ctx) {\n // This limits the `actual` and `expected` property default inspection to\n // the minimum depth. Otherwise those values would be too verbose compared\n // to the actual error message which contains a combined view of these two\n // input values.\n return inspect(this, _objectSpread({}, ctx, {\n customInspect: false,\n depth: 0\n }));\n }\n }]);\n\n return AssertionError;\n}(_wrapNativeSuper(Error));\n\nmodule.exports = AssertionError;", "/**\n * Code refactored from Mozilla Developer Network:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n */\n\n'use strict';\n\nfunction assign(target, firstSource) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert first argument to object');\n }\n\n var to = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var nextSource = arguments[i];\n if (nextSource === undefined || nextSource === null) {\n continue;\n }\n\n var keysArray = Object.keys(Object(nextSource));\n for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {\n var nextKey = keysArray[nextIndex];\n var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n return to;\n}\n\nfunction polyfill() {\n if (!Object.assign) {\n Object.defineProperty(Object, 'assign', {\n enumerable: false,\n configurable: true,\n writable: true,\n value: assign\n });\n }\n}\n\nmodule.exports = {\n assign: assign,\n polyfill: polyfill\n};\n", "'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n", "'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n", "'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n", "'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\torigDefineProperty(obj, 'x', { enumerable: false, value: obj });\n\t\t// eslint-disable-next-line no-unused-vars, no-restricted-syntax\n\t\tfor (var _ in obj) { // jscs:ignore disallowUnusedVariables\n\t\t\treturn false;\n\t\t}\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\torigDefineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n", "'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n", "'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n", "'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n", "'use strict';\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function isNaN(value) {\n\treturn value !== value;\n};\n", "'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {\n\t\treturn Number.isNaN;\n\t}\n\treturn implementation;\n};\n", "'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function shimNumberIsNaN() {\n\tvar polyfill = getPolyfill();\n\tdefine(Number, { isNaN: polyfill }, {\n\t\tisNaN: function testIsNaN() {\n\t\t\treturn Number.isNaN !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n", "'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Number);\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n", "// Currently in sync with Node.js lib/internal/util/comparisons.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n'use strict';\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar regexFlagsSupported = /a/g.flags !== undefined;\n\nvar arrayFromSet = function arrayFromSet(set) {\n var array = [];\n set.forEach(function (value) {\n return array.push(value);\n });\n return array;\n};\n\nvar arrayFromMap = function arrayFromMap(map) {\n var array = [];\n map.forEach(function (value, key) {\n return array.push([key, value]);\n });\n return array;\n};\n\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () {\n return [];\n};\nvar numberIsNaN = Number.isNaN ? Number.isNaN : require('is-nan');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\nvar propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);\nvar objectToString = uncurryThis(Object.prototype.toString);\n\nvar _require$types = require('util/').types,\n isAnyArrayBuffer = _require$types.isAnyArrayBuffer,\n isArrayBufferView = _require$types.isArrayBufferView,\n isDate = _require$types.isDate,\n isMap = _require$types.isMap,\n isRegExp = _require$types.isRegExp,\n isSet = _require$types.isSet,\n isNativeError = _require$types.isNativeError,\n isBoxedPrimitive = _require$types.isBoxedPrimitive,\n isNumberObject = _require$types.isNumberObject,\n isStringObject = _require$types.isStringObject,\n isBooleanObject = _require$types.isBooleanObject,\n isBigIntObject = _require$types.isBigIntObject,\n isSymbolObject = _require$types.isSymbolObject,\n isFloat32Array = _require$types.isFloat32Array,\n isFloat64Array = _require$types.isFloat64Array;\n\nfunction isNonIndex(key) {\n if (key.length === 0 || key.length > 10) return true;\n\n for (var i = 0; i < key.length; i++) {\n var code = key.charCodeAt(i);\n if (code < 48 || code > 57) return true;\n } // The maximum size for an array is 2 ** 32 -1.\n\n\n return key.length === 10 && key >= Math.pow(2, 32);\n}\n\nfunction getOwnNonIndexProperties(value) {\n return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));\n} // Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n\n if (y < x) {\n return 1;\n }\n\n return 0;\n}\n\nvar ONLY_ENUMERABLE = undefined;\nvar kStrict = true;\nvar kLoose = false;\nvar kNoIterator = 0;\nvar kIsArray = 1;\nvar kIsSet = 2;\nvar kIsMap = 3; // Check if they have the same source and flags\n\nfunction areSimilarRegExps(a, b) {\n return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);\n}\n\nfunction areSimilarFloatArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n\n for (var offset = 0; offset < a.byteLength; offset++) {\n if (a[offset] !== b[offset]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction areSimilarTypedArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n\n return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;\n}\n\nfunction areEqualArrayBuffers(buf1, buf2) {\n return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;\n}\n\nfunction isEqualBoxedPrimitive(val1, val2) {\n if (isNumberObject(val1)) {\n return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));\n }\n\n if (isStringObject(val1)) {\n return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);\n }\n\n if (isBooleanObject(val1)) {\n return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);\n }\n\n if (isBigIntObject(val1)) {\n return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);\n }\n\n return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);\n} // Notes: Type tags are historical [[Class]] properties that can be set by\n// FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS\n// and retrieved using Object.prototype.toString.call(obj) in JS\n// See https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n// for a list of tags pre-defined in the spec.\n// There are some unspecified tags in the wild too (e.g. typed array tags).\n// Since tags can be altered, they only serve fast failures\n//\n// Typed arrays and buffers are checked by comparing the content in their\n// underlying ArrayBuffer. This optimization requires that it's\n// reasonable to interpret their underlying memory in the same way,\n// which is checked by comparing their type tags.\n// (e.g. a Uint8Array and a Uint16Array with the same memory content\n// could still be different because they will be interpreted differently).\n//\n// For strict comparison, objects should have\n// a) The same built-in type tags\n// b) The same prototypes.\n\n\nfunction innerDeepEqual(val1, val2, strict, memos) {\n // All identical values are equivalent, as determined by ===.\n if (val1 === val2) {\n if (val1 !== 0) return true;\n return strict ? objectIs(val1, val2) : true;\n } // Check more closely if val1 and val2 are equal.\n\n\n if (strict) {\n if (_typeof(val1) !== 'object') {\n return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2);\n }\n\n if (_typeof(val2) !== 'object' || val1 === null || val2 === null) {\n return false;\n }\n\n if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {\n return false;\n }\n } else {\n if (val1 === null || _typeof(val1) !== 'object') {\n if (val2 === null || _typeof(val2) !== 'object') {\n // eslint-disable-next-line eqeqeq\n return val1 == val2;\n }\n\n return false;\n }\n\n if (val2 === null || _typeof(val2) !== 'object') {\n return false;\n }\n }\n\n var val1Tag = objectToString(val1);\n var val2Tag = objectToString(val2);\n\n if (val1Tag !== val2Tag) {\n return false;\n }\n\n if (Array.isArray(val1)) {\n // Check for sparse arrays and general fast path\n if (val1.length !== val2.length) {\n return false;\n }\n\n var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsArray, keys1);\n } // [browserify] This triggers on certain types in IE (Map/Set) so we don't\n // wan't to early return out of the rest of the checks. However we can check\n // if the second value is one of these values and the first isn't.\n\n\n if (val1Tag === '[object Object]') {\n // return keyCheck(val1, val2, strict, memos, kNoIterator);\n if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {\n return false;\n }\n }\n\n if (isDate(val1)) {\n if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {\n return false;\n }\n } else if (isRegExp(val1)) {\n if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {\n return false;\n }\n } else if (isNativeError(val1) || val1 instanceof Error) {\n // Do not compare the stack as it might differ even though the error itself\n // is otherwise identical.\n if (val1.message !== val2.message || val1.name !== val2.name) {\n return false;\n }\n } else if (isArrayBufferView(val1)) {\n if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {\n if (!areSimilarFloatArrays(val1, val2)) {\n return false;\n }\n } else if (!areSimilarTypedArrays(val1, val2)) {\n return false;\n } // Buffer.compare returns true, so val1.length === val2.length. If they both\n // only contain numeric keys, we don't need to exam further than checking\n // the symbols.\n\n\n var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n\n var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n\n if (_keys.length !== _keys2.length) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);\n } else if (isSet(val1)) {\n if (!isSet(val2) || val1.size !== val2.size) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsSet);\n } else if (isMap(val1)) {\n if (!isMap(val2) || val1.size !== val2.size) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsMap);\n } else if (isAnyArrayBuffer(val1)) {\n if (!areEqualArrayBuffers(val1, val2)) {\n return false;\n }\n } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kNoIterator);\n}\n\nfunction getEnumerables(val, keys) {\n return keys.filter(function (k) {\n return propertyIsEnumerable(val, k);\n });\n}\n\nfunction keyCheck(val1, val2, strict, memos, iterationType, aKeys) {\n // For all remaining Object pairs, including Array, objects and Maps,\n // equivalence is determined by having:\n // a) The same number of owned enumerable properties\n // b) The same set of keys/indexes (although not necessarily the same order)\n // c) Equivalent values for every corresponding key/index\n // d) For Sets and Maps, equal contents\n // Note: this accounts for both named and indexed properties on Arrays.\n if (arguments.length === 5) {\n aKeys = Object.keys(val1);\n var bKeys = Object.keys(val2); // The pair must have the same number of owned properties.\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n } // Cheap key test\n\n\n var i = 0;\n\n for (; i < aKeys.length; i++) {\n if (!hasOwnProperty(val2, aKeys[i])) {\n return false;\n }\n }\n\n if (strict && arguments.length === 5) {\n var symbolKeysA = objectGetOwnPropertySymbols(val1);\n\n if (symbolKeysA.length !== 0) {\n var count = 0;\n\n for (i = 0; i < symbolKeysA.length; i++) {\n var key = symbolKeysA[i];\n\n if (propertyIsEnumerable(val1, key)) {\n if (!propertyIsEnumerable(val2, key)) {\n return false;\n }\n\n aKeys.push(key);\n count++;\n } else if (propertyIsEnumerable(val2, key)) {\n return false;\n }\n }\n\n var symbolKeysB = objectGetOwnPropertySymbols(val2);\n\n if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {\n return false;\n }\n } else {\n var _symbolKeysB = objectGetOwnPropertySymbols(val2);\n\n if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {\n return false;\n }\n }\n }\n\n if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {\n return true;\n } // Use memos to handle cycles.\n\n\n if (memos === undefined) {\n memos = {\n val1: new Map(),\n val2: new Map(),\n position: 0\n };\n } else {\n // We prevent up to two map.has(x) calls by directly retrieving the value\n // and checking for undefined. The map can only contain numbers, so it is\n // safe to check for undefined only.\n var val2MemoA = memos.val1.get(val1);\n\n if (val2MemoA !== undefined) {\n var val2MemoB = memos.val2.get(val2);\n\n if (val2MemoB !== undefined) {\n return val2MemoA === val2MemoB;\n }\n }\n\n memos.position++;\n }\n\n memos.val1.set(val1, memos.position);\n memos.val2.set(val2, memos.position);\n var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);\n memos.val1.delete(val1);\n memos.val2.delete(val2);\n return areEq;\n}\n\nfunction setHasEqualElement(set, val1, strict, memo) {\n // Go looking.\n var setValues = arrayFromSet(set);\n\n for (var i = 0; i < setValues.length; i++) {\n var val2 = setValues[i];\n\n if (innerDeepEqual(val1, val2, strict, memo)) {\n // Remove the matching element to make sure we do not check that again.\n set.delete(val2);\n return true;\n }\n }\n\n return false;\n} // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using\n// Sadly it is not possible to detect corresponding values properly in case the\n// type is a string, number, bigint or boolean. The reason is that those values\n// can match lots of different string values (e.g., 1n == '+00001').\n\n\nfunction findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n\n case 'object':\n // Only pass in null as object!\n return undefined;\n\n case 'symbol':\n return false;\n\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n\n }\n\n return true;\n}\n\nfunction setMightHaveLoosePrim(a, b, prim) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) return altValue;\n return b.has(altValue) && !a.has(altValue);\n}\n\nfunction mapMightHaveLoosePrim(a, b, prim, item, memo) {\n var altValue = findLooseMatchingPrimitives(prim);\n\n if (altValue != null) {\n return altValue;\n }\n\n var curB = b.get(altValue);\n\n if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {\n return false;\n }\n\n return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);\n}\n\nfunction setEquiv(a, b, strict, memo) {\n // This is a lazily initiated Set of entries which have to be compared\n // pairwise.\n var set = null;\n var aValues = arrayFromSet(a);\n\n for (var i = 0; i < aValues.length; i++) {\n var val = aValues[i]; // Note: Checking for the objects first improves the performance for object\n // heavy sets but it is a minor slow down for primitives. As they are fast\n // to check this improves the worst case scenario instead.\n\n if (_typeof(val) === 'object' && val !== null) {\n if (set === null) {\n set = new Set();\n } // If the specified value doesn't exist in the second set its an not null\n // object (or non strict only: a not matching primitive) we'll need to go\n // hunting for something thats deep-(strict-)equal to it. To make this\n // O(n log n) complexity we have to copy these values in a new set first.\n\n\n set.add(val);\n } else if (!b.has(val)) {\n if (strict) return false; // Fast path to detect missing string, symbol, undefined and null values.\n\n if (!setMightHaveLoosePrim(a, b, val)) {\n return false;\n }\n\n if (set === null) {\n set = new Set();\n }\n\n set.add(val);\n }\n }\n\n if (set !== null) {\n var bValues = arrayFromSet(b);\n\n for (var _i = 0; _i < bValues.length; _i++) {\n var _val = bValues[_i]; // We have to check if a primitive value is already\n // matching and only if it's not, go hunting for it.\n\n if (_typeof(_val) === 'object' && _val !== null) {\n if (!setHasEqualElement(set, _val, strict, memo)) return false;\n } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {\n return false;\n }\n }\n\n return set.size === 0;\n }\n\n return true;\n}\n\nfunction mapHasEqualEntry(set, map, key1, item1, strict, memo) {\n // To be able to handle cases like:\n // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']])\n // ... we need to consider *all* matching keys, not just the first we find.\n var setValues = arrayFromSet(set);\n\n for (var i = 0; i < setValues.length; i++) {\n var key2 = setValues[i];\n\n if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {\n set.delete(key2);\n return true;\n }\n }\n\n return false;\n}\n\nfunction mapEquiv(a, b, strict, memo) {\n var set = null;\n var aEntries = arrayFromMap(a);\n\n for (var i = 0; i < aEntries.length; i++) {\n var _aEntries$i = _slicedToArray(aEntries[i], 2),\n key = _aEntries$i[0],\n item1 = _aEntries$i[1];\n\n if (_typeof(key) === 'object' && key !== null) {\n if (set === null) {\n set = new Set();\n }\n\n set.add(key);\n } else {\n // By directly retrieving the value we prevent another b.has(key) check in\n // almost all possible cases.\n var item2 = b.get(key);\n\n if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {\n if (strict) return false; // Fast path to detect missing string, symbol, undefined and null\n // keys.\n\n if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;\n\n if (set === null) {\n set = new Set();\n }\n\n set.add(key);\n }\n }\n }\n\n if (set !== null) {\n var bEntries = arrayFromMap(b);\n\n for (var _i2 = 0; _i2 < bEntries.length; _i2++) {\n var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),\n key = _bEntries$_i[0],\n item = _bEntries$_i[1];\n\n if (_typeof(key) === 'object' && key !== null) {\n if (!mapHasEqualEntry(set, a, key, item, strict, memo)) return false;\n } else if (!strict && (!a.has(key) || !innerDeepEqual(a.get(key), item, false, memo)) && !mapHasEqualEntry(set, a, key, item, false, memo)) {\n return false;\n }\n }\n\n return set.size === 0;\n }\n\n return true;\n}\n\nfunction objEquiv(a, b, strict, keys, memos, iterationType) {\n // Sets and maps don't have their entries accessible via normal object\n // properties.\n var i = 0;\n\n if (iterationType === kIsSet) {\n if (!setEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsMap) {\n if (!mapEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsArray) {\n for (; i < a.length; i++) {\n if (hasOwnProperty(a, i)) {\n if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {\n return false;\n }\n } else if (hasOwnProperty(b, i)) {\n return false;\n } else {\n // Array is sparse.\n var keysA = Object.keys(a);\n\n for (; i < keysA.length; i++) {\n var key = keysA[i];\n\n if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {\n return false;\n }\n }\n\n if (keysA.length !== Object.keys(b).length) {\n return false;\n }\n\n return true;\n }\n }\n } // The pair must have equivalent values for every corresponding key.\n // Possibly expensive deep test:\n\n\n for (i = 0; i < keys.length; i++) {\n var _key = keys[i];\n\n if (!innerDeepEqual(a[_key], b[_key], strict, memos)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isDeepEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kLoose);\n}\n\nfunction isDeepStrictEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kStrict);\n}\n\nmodule.exports = {\n isDeepEqual: isDeepEqual,\n isDeepStrictEqual: isDeepStrictEqual\n};", "// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar _require = require('./internal/errors'),\n _require$codes = _require.codes,\n ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE,\n ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;\n\nvar AssertionError = require('./internal/assert/assertion_error');\n\nvar _require2 = require('util/'),\n inspect = _require2.inspect;\n\nvar _require$types = require('util/').types,\n isPromise = _require$types.isPromise,\n isRegExp = _require$types.isRegExp;\n\nvar objectAssign = Object.assign ? Object.assign : require('es6-object-assign').assign;\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar errorCache = new Map();\nvar isDeepEqual;\nvar isDeepStrictEqual;\nvar parseExpressionAt;\nvar findNodeAround;\nvar decoder;\n\nfunction lazyLoadComparison() {\n var comparison = require('./internal/util/comparisons');\n\n isDeepEqual = comparison.isDeepEqual;\n isDeepStrictEqual = comparison.isDeepStrictEqual;\n} // Escape control characters but not \\n and \\t to keep the line breaks and\n// indentation intact.\n// eslint-disable-next-line no-control-regex\n\n\nvar escapeSequencesRegExp = /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/g;\nvar meta = [\"\\\\u0000\", \"\\\\u0001\", \"\\\\u0002\", \"\\\\u0003\", \"\\\\u0004\", \"\\\\u0005\", \"\\\\u0006\", \"\\\\u0007\", '\\\\b', '', '', \"\\\\u000b\", '\\\\f', '', \"\\\\u000e\", \"\\\\u000f\", \"\\\\u0010\", \"\\\\u0011\", \"\\\\u0012\", \"\\\\u0013\", \"\\\\u0014\", \"\\\\u0015\", \"\\\\u0016\", \"\\\\u0017\", \"\\\\u0018\", \"\\\\u0019\", \"\\\\u001a\", \"\\\\u001b\", \"\\\\u001c\", \"\\\\u001d\", \"\\\\u001e\", \"\\\\u001f\"];\n\nvar escapeFn = function escapeFn(str) {\n return meta[str.charCodeAt(0)];\n};\n\nvar warned = false; // The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\nvar NO_EXCEPTION_SENTINEL = {}; // All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction innerFail(obj) {\n if (obj.message instanceof Error) throw obj.message;\n throw new AssertionError(obj);\n}\n\nfunction fail(actual, expected, message, operator, stackStartFn) {\n var argsLen = arguments.length;\n var internalMessage;\n\n if (argsLen === 0) {\n internalMessage = 'Failed';\n } else if (argsLen === 1) {\n message = actual;\n actual = undefined;\n } else {\n if (warned === false) {\n warned = true;\n var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);\n warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094');\n }\n\n if (argsLen === 2) operator = '!=';\n }\n\n if (message instanceof Error) throw message;\n var errArgs = {\n actual: actual,\n expected: expected,\n operator: operator === undefined ? 'fail' : operator,\n stackStartFn: stackStartFn || fail\n };\n\n if (message !== undefined) {\n errArgs.message = message;\n }\n\n var err = new AssertionError(errArgs);\n\n if (internalMessage) {\n err.message = internalMessage;\n err.generatedMessage = true;\n }\n\n throw err;\n}\n\nassert.fail = fail; // The AssertionError is defined in internal/error.\n\nassert.AssertionError = AssertionError;\n\nfunction innerOk(fn, argLen, value, message) {\n if (!value) {\n var generatedMessage = false;\n\n if (argLen === 0) {\n generatedMessage = true;\n message = 'No value argument passed to `assert.ok()`';\n } else if (message instanceof Error) {\n throw message;\n }\n\n var err = new AssertionError({\n actual: value,\n expected: true,\n message: message,\n operator: '==',\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n} // Pure assertion tests whether a value is truthy, as determined\n// by !!value.\n\n\nfunction ok() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n innerOk.apply(void 0, [ok, args.length].concat(args));\n}\n\nassert.ok = ok; // The equality assertion tests shallow, coercive equality with ==.\n\n/* eslint-disable no-restricted-properties */\n\nassert.equal = function equal(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n } // eslint-disable-next-line eqeqeq\n\n\n if (actual != expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '==',\n stackStartFn: equal\n });\n }\n}; // The non-equality assertion tests for whether two objects are not\n// equal with !=.\n\n\nassert.notEqual = function notEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n } // eslint-disable-next-line eqeqeq\n\n\n if (actual == expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '!=',\n stackStartFn: notEqual\n });\n }\n}; // The equivalence assertion tests a deep equality relation.\n\n\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (!isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepEqual',\n stackStartFn: deepEqual\n });\n }\n}; // The non-equivalence assertion tests for any deep inequality.\n\n\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepEqual',\n stackStartFn: notDeepEqual\n });\n }\n};\n/* eslint-enable */\n\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (!isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepStrictEqual',\n stackStartFn: deepStrictEqual\n });\n }\n};\n\nassert.notDeepStrictEqual = notDeepStrictEqual;\n\nfunction notDeepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepStrictEqual',\n stackStartFn: notDeepStrictEqual\n });\n }\n}\n\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (!objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'strictEqual',\n stackStartFn: strictEqual\n });\n }\n};\n\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notStrictEqual',\n stackStartFn: notStrictEqual\n });\n }\n};\n\nvar Comparison = function Comparison(obj, keys, actual) {\n var _this = this;\n\n _classCallCheck(this, Comparison);\n\n keys.forEach(function (key) {\n if (key in obj) {\n if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && obj[key].test(actual[key])) {\n _this[key] = actual[key];\n } else {\n _this[key] = obj[key];\n }\n }\n });\n};\n\nfunction compareExceptionKey(actual, expected, key, message, keys, fn) {\n if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {\n if (!message) {\n // Create placeholder objects to create a nice output.\n var a = new Comparison(actual, keys);\n var b = new Comparison(expected, keys, actual);\n var err = new AssertionError({\n actual: a,\n expected: b,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.actual = actual;\n err.expected = expected;\n err.operator = fn.name;\n throw err;\n }\n\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: fn.name,\n stackStartFn: fn\n });\n }\n}\n\nfunction expectedException(actual, expected, msg, fn) {\n if (typeof expected !== 'function') {\n if (isRegExp(expected)) return expected.test(actual); // assert.doesNotThrow does not accept objects.\n\n if (arguments.length === 2) {\n throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected);\n } // Handle primitives properly.\n\n\n if (_typeof(actual) !== 'object' || actual === null) {\n var err = new AssertionError({\n actual: actual,\n expected: expected,\n message: msg,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.operator = fn.name;\n throw err;\n }\n\n var keys = Object.keys(expected); // Special handle errors to make sure the name and the message are compared\n // as well.\n\n if (expected instanceof Error) {\n keys.push('name', 'message');\n } else if (keys.length === 0) {\n throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n keys.forEach(function (key) {\n if (typeof actual[key] === 'string' && isRegExp(expected[key]) && expected[key].test(actual[key])) {\n return;\n }\n\n compareExceptionKey(actual, expected, key, msg, keys, fn);\n });\n return true;\n } // Guard instanceof against arrow functions as they don't have a prototype.\n\n\n if (expected.prototype !== undefined && actual instanceof expected) {\n return true;\n }\n\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n\n return expected.call({}, actual) === true;\n}\n\nfunction getActual(fn) {\n if (typeof fn !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn);\n }\n\n try {\n fn();\n } catch (e) {\n return e;\n }\n\n return NO_EXCEPTION_SENTINEL;\n}\n\nfunction checkIsPromise(obj) {\n // Accept native ES6 promises and promises that are implemented in a similar\n // way. Do not accept thenables that use a function as `obj` and that have no\n // `catch` handler.\n // TODO: thenables are checked up until they have the correct methods,\n // but according to documentation, the `then` method should receive\n // the `fulfill` and `reject` arguments as well or it may be never resolved.\n return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function';\n}\n\nfunction waitForActual(promiseFn) {\n return Promise.resolve().then(function () {\n var resultPromise;\n\n if (typeof promiseFn === 'function') {\n // Return a rejected promise if `promiseFn` throws synchronously.\n resultPromise = promiseFn(); // Fail in case no promise is returned.\n\n if (!checkIsPromise(resultPromise)) {\n throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise);\n }\n } else if (checkIsPromise(promiseFn)) {\n resultPromise = promiseFn;\n } else {\n throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn);\n }\n\n return Promise.resolve().then(function () {\n return resultPromise;\n }).then(function () {\n return NO_EXCEPTION_SENTINEL;\n }).catch(function (e) {\n return e;\n });\n });\n}\n\nfunction expectsError(stackStartFn, actual, error, message) {\n if (typeof error === 'string') {\n if (arguments.length === 4) {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n\n if (_typeof(actual) === 'object' && actual !== null) {\n if (actual.message === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error message \\\"\".concat(actual.message, \"\\\" is identical to the message.\"));\n }\n } else if (actual === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error \\\"\".concat(actual, \"\\\" is identical to the message.\"));\n }\n\n message = error;\n error = undefined;\n } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n\n if (actual === NO_EXCEPTION_SENTINEL) {\n var details = '';\n\n if (error && error.name) {\n details += \" (\".concat(error.name, \")\");\n }\n\n details += message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception';\n innerFail({\n actual: undefined,\n expected: error,\n operator: stackStartFn.name,\n message: \"Missing expected \".concat(fnType).concat(details),\n stackStartFn: stackStartFn\n });\n }\n\n if (error && !expectedException(actual, error, message, stackStartFn)) {\n throw actual;\n }\n}\n\nfunction expectsNoError(stackStartFn, actual, error, message) {\n if (actual === NO_EXCEPTION_SENTINEL) return;\n\n if (typeof error === 'string') {\n message = error;\n error = undefined;\n }\n\n if (!error || expectedException(actual, error)) {\n var details = message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception';\n innerFail({\n actual: actual,\n expected: error,\n operator: stackStartFn.name,\n message: \"Got unwanted \".concat(fnType).concat(details, \"\\n\") + \"Actual message: \\\"\".concat(actual && actual.message, \"\\\"\"),\n stackStartFn: stackStartFn\n });\n }\n\n throw actual;\n}\n\nassert.throws = function throws(promiseFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));\n};\n\nassert.rejects = function rejects(promiseFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n return waitForActual(promiseFn).then(function (result) {\n return expectsError.apply(void 0, [rejects, result].concat(args));\n });\n};\n\nassert.doesNotThrow = function doesNotThrow(fn) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n\n expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));\n};\n\nassert.doesNotReject = function doesNotReject(fn) {\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n\n return waitForActual(fn).then(function (result) {\n return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));\n });\n};\n\nassert.ifError = function ifError(err) {\n if (err !== null && err !== undefined) {\n var message = 'ifError got unwanted exception: ';\n\n if (_typeof(err) === 'object' && typeof err.message === 'string') {\n if (err.message.length === 0 && err.constructor) {\n message += err.constructor.name;\n } else {\n message += err.message;\n }\n } else {\n message += inspect(err);\n }\n\n var newErr = new AssertionError({\n actual: err,\n expected: null,\n operator: 'ifError',\n message: message,\n stackStartFn: ifError\n }); // Make sure we actually have a stack trace!\n\n var origStack = err.stack;\n\n if (typeof origStack === 'string') {\n // This will remove any duplicated frames from the error frames taken\n // from within `ifError` and add the original error frames to the newly\n // created ones.\n var tmp2 = origStack.split('\\n');\n tmp2.shift(); // Filter all frames existing in err.stack.\n\n var tmp1 = newErr.stack.split('\\n');\n\n for (var i = 0; i < tmp2.length; i++) {\n // Find the first occurrence of the frame.\n var pos = tmp1.indexOf(tmp2[i]);\n\n if (pos !== -1) {\n // Only keep new frames.\n tmp1 = tmp1.slice(0, pos);\n break;\n }\n }\n\n newErr.stack = \"\".concat(tmp1.join('\\n'), \"\\n\").concat(tmp2.join('\\n'));\n }\n\n throw newErr;\n }\n}; // Expose a strict only variant of assert\n\n\nfunction strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}\n\nassert.strict = objectAssign(strict, assert, {\n equal: assert.strictEqual,\n deepEqual: assert.deepStrictEqual,\n notEqual: assert.notStrictEqual,\n notDeepEqual: assert.notDeepStrictEqual\n});\nassert.strict.strict = assert.strict;", "\"use strict\";\n// The whole point behind this internal module is to allow Node.js to no\n// longer be forced to treat every error message change as a semver-major\n// change. The NodeError classes here all expose a `code` property whose\n// value statically and permanently identifies the error. While the error\n// message may change, the code should not.\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.E = exports.AssertionError = exports.message = exports.RangeError = exports.TypeError = exports.Error = void 0;\nvar assert = require(\"assert\");\nvar util = require(\"util\");\nvar kCode = typeof Symbol === 'undefined' ? '_kCode' : Symbol('code');\nvar messages = {}; // new Map();\nfunction makeNodeError(Base) {\n return /** @class */ (function (_super) {\n __extends(NodeError, _super);\n function NodeError(key) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var _this = _super.call(this, message(key, args)) || this;\n _this.code = key;\n _this[kCode] = key;\n _this.name = _super.prototype.name + \" [\" + _this[kCode] + \"]\";\n return _this;\n }\n return NodeError;\n }(Base));\n}\nvar AssertionError = /** @class */ (function (_super) {\n __extends(AssertionError, _super);\n function AssertionError(options) {\n var _this = this;\n if (typeof options !== 'object' || options === null) {\n throw new exports.TypeError('ERR_INVALID_ARG_TYPE', 'options', 'object');\n }\n if (options.message) {\n _this = _super.call(this, options.message) || this;\n }\n else {\n _this = _super.call(this, util.inspect(options.actual).slice(0, 128) + \" \" +\n (options.operator + \" \" + util.inspect(options.expected).slice(0, 128))) || this;\n }\n _this.generatedMessage = !options.message;\n _this.name = 'AssertionError [ERR_ASSERTION]';\n _this.code = 'ERR_ASSERTION';\n _this.actual = options.actual;\n _this.expected = options.expected;\n _this.operator = options.operator;\n exports.Error.captureStackTrace(_this, options.stackStartFunction);\n return _this;\n }\n return AssertionError;\n}(global.Error));\nexports.AssertionError = AssertionError;\nfunction message(key, args) {\n assert.strictEqual(typeof key, 'string');\n // const msg = messages.get(key);\n var msg = messages[key];\n assert(msg, \"An invalid error message key was used: \" + key + \".\");\n var fmt;\n if (typeof msg === 'function') {\n fmt = msg;\n }\n else {\n fmt = util.format;\n if (args === undefined || args.length === 0)\n return msg;\n args.unshift(msg);\n }\n return String(fmt.apply(null, args));\n}\nexports.message = message;\n// Utility function for registering the error codes. Only used here. Exported\n// *only* to allow for testing.\nfunction E(sym, val) {\n messages[sym] = typeof val === 'function' ? val : String(val);\n}\nexports.E = E;\nexports.Error = makeNodeError(global.Error);\nexports.TypeError = makeNodeError(global.TypeError);\nexports.RangeError = makeNodeError(global.RangeError);\n// To declare an error message, use the E(sym, val) function above. The sym\n// must be an upper case string. The val can be either a function or a string.\n// The return value of the function must be a string.\n// Examples:\n// E('EXAMPLE_KEY1', 'This is the error value');\n// E('EXAMPLE_KEY2', (a, b) => return `${a} ${b}`);\n//\n// Once an error code has been assigned, the code itself MUST NOT change and\n// any given error code must never be reused to identify a different error.\n//\n// Any error code added here should also be added to the documentation\n//\n// Note: Please try to keep these in alphabetical order\nE('ERR_ARG_NOT_ITERABLE', '%s must be iterable');\nE('ERR_ASSERTION', '%s');\nE('ERR_BUFFER_OUT_OF_BOUNDS', bufferOutOfBounds);\nE('ERR_CHILD_CLOSED_BEFORE_REPLY', 'Child closed before reply received');\nE('ERR_CONSOLE_WRITABLE_STREAM', 'Console expects a writable stream instance for %s');\nE('ERR_CPU_USAGE', 'Unable to obtain cpu usage %s');\nE('ERR_DNS_SET_SERVERS_FAILED', function (err, servers) { return \"c-ares failed to set servers: \\\"\" + err + \"\\\" [\" + servers + \"]\"; });\nE('ERR_FALSY_VALUE_REJECTION', 'Promise was rejected with falsy value');\nE('ERR_ENCODING_NOT_SUPPORTED', function (enc) { return \"The \\\"\" + enc + \"\\\" encoding is not supported\"; });\nE('ERR_ENCODING_INVALID_ENCODED_DATA', function (enc) { return \"The encoded data was not valid for encoding \" + enc; });\nE('ERR_HTTP_HEADERS_SENT', 'Cannot render headers after they are sent to the client');\nE('ERR_HTTP_INVALID_STATUS_CODE', 'Invalid status code: %s');\nE('ERR_HTTP_TRAILER_INVALID', 'Trailers are invalid with this transfer encoding');\nE('ERR_INDEX_OUT_OF_RANGE', 'Index out of range');\nE('ERR_INVALID_ARG_TYPE', invalidArgType);\nE('ERR_INVALID_ARRAY_LENGTH', function (name, len, actual) {\n assert.strictEqual(typeof actual, 'number');\n return \"The array \\\"\" + name + \"\\\" (length \" + actual + \") must be of length \" + len + \".\";\n});\nE('ERR_INVALID_BUFFER_SIZE', 'Buffer size must be a multiple of %s');\nE('ERR_INVALID_CALLBACK', 'Callback must be a function');\nE('ERR_INVALID_CHAR', 'Invalid character in %s');\nE('ERR_INVALID_CURSOR_POS', 'Cannot set cursor row without setting its column');\nE('ERR_INVALID_FD', '\"fd\" must be a positive integer: %s');\nE('ERR_INVALID_FILE_URL_HOST', 'File URL host must be \"localhost\" or empty on %s');\nE('ERR_INVALID_FILE_URL_PATH', 'File URL path %s');\nE('ERR_INVALID_HANDLE_TYPE', 'This handle type cannot be sent');\nE('ERR_INVALID_IP_ADDRESS', 'Invalid IP address: %s');\nE('ERR_INVALID_OPT_VALUE', function (name, value) {\n return \"The value \\\"\" + String(value) + \"\\\" is invalid for option \\\"\" + name + \"\\\"\";\n});\nE('ERR_INVALID_OPT_VALUE_ENCODING', function (value) { return \"The value \\\"\" + String(value) + \"\\\" is invalid for option \\\"encoding\\\"\"; });\nE('ERR_INVALID_REPL_EVAL_CONFIG', 'Cannot specify both \"breakEvalOnSigint\" and \"eval\" for REPL');\nE('ERR_INVALID_SYNC_FORK_INPUT', 'Asynchronous forks do not support Buffer, Uint8Array or string input: %s');\nE('ERR_INVALID_THIS', 'Value of \"this\" must be of type %s');\nE('ERR_INVALID_TUPLE', '%s must be an iterable %s tuple');\nE('ERR_INVALID_URL', 'Invalid URL: %s');\nE('ERR_INVALID_URL_SCHEME', function (expected) { return \"The URL must be \" + oneOf(expected, 'scheme'); });\nE('ERR_IPC_CHANNEL_CLOSED', 'Channel closed');\nE('ERR_IPC_DISCONNECTED', 'IPC channel is already disconnected');\nE('ERR_IPC_ONE_PIPE', 'Child process can have only one IPC pipe');\nE('ERR_IPC_SYNC_FORK', 'IPC cannot be used with synchronous forks');\nE('ERR_MISSING_ARGS', missingArgs);\nE('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\nE('ERR_NAPI_CONS_FUNCTION', 'Constructor must be a function');\nE('ERR_NAPI_CONS_PROTOTYPE_OBJECT', 'Constructor.prototype must be an object');\nE('ERR_NO_CRYPTO', 'Node.js is not compiled with OpenSSL crypto support');\nE('ERR_NO_LONGER_SUPPORTED', '%s is no longer supported');\nE('ERR_PARSE_HISTORY_DATA', 'Could not parse history data in %s');\nE('ERR_SOCKET_ALREADY_BOUND', 'Socket is already bound');\nE('ERR_SOCKET_BAD_PORT', 'Port should be > 0 and < 65536');\nE('ERR_SOCKET_BAD_TYPE', 'Bad socket type specified. Valid types are: udp4, udp6');\nE('ERR_SOCKET_CANNOT_SEND', 'Unable to send data');\nE('ERR_SOCKET_CLOSED', 'Socket is closed');\nE('ERR_SOCKET_DGRAM_NOT_RUNNING', 'Not running');\nE('ERR_STDERR_CLOSE', 'process.stderr cannot be closed');\nE('ERR_STDOUT_CLOSE', 'process.stdout cannot be closed');\nE('ERR_STREAM_WRAP', 'Stream has StringDecoder set or is in objectMode');\nE('ERR_TLS_CERT_ALTNAME_INVALID', \"Hostname/IP does not match certificate's altnames: %s\");\nE('ERR_TLS_DH_PARAM_SIZE', function (size) { return \"DH parameter size \" + size + \" is less than 2048\"; });\nE('ERR_TLS_HANDSHAKE_TIMEOUT', 'TLS handshake timeout');\nE('ERR_TLS_RENEGOTIATION_FAILED', 'Failed to renegotiate');\nE('ERR_TLS_REQUIRED_SERVER_NAME', '\"servername\" is required parameter for Server.addContext');\nE('ERR_TLS_SESSION_ATTACK', 'TSL session renegotiation attack detected');\nE('ERR_TRANSFORM_ALREADY_TRANSFORMING', 'Calling transform done when still transforming');\nE('ERR_TRANSFORM_WITH_LENGTH_0', 'Calling transform done when writableState.length != 0');\nE('ERR_UNKNOWN_ENCODING', 'Unknown encoding: %s');\nE('ERR_UNKNOWN_SIGNAL', 'Unknown signal: %s');\nE('ERR_UNKNOWN_STDIN_TYPE', 'Unknown stdin file type');\nE('ERR_UNKNOWN_STREAM_TYPE', 'Unknown stream file type');\nE('ERR_V8BREAKITERATOR', 'Full ICU data not installed. ' + 'See https://github.com/nodejs/node/wiki/Intl');\nfunction invalidArgType(name, expected, actual) {\n assert(name, 'name is required');\n // determiner: 'must be' or 'must not be'\n var determiner;\n if (expected.includes('not ')) {\n determiner = 'must not be';\n expected = expected.split('not ')[1];\n }\n else {\n determiner = 'must be';\n }\n var msg;\n if (Array.isArray(name)) {\n var names = name.map(function (val) { return \"\\\"\" + val + \"\\\"\"; }).join(', ');\n msg = \"The \" + names + \" arguments \" + determiner + \" \" + oneOf(expected, 'type');\n }\n else if (name.includes(' argument')) {\n // for the case like 'first argument'\n msg = \"The \" + name + \" \" + determiner + \" \" + oneOf(expected, 'type');\n }\n else {\n var type = name.includes('.') ? 'property' : 'argument';\n msg = \"The \\\"\" + name + \"\\\" \" + type + \" \" + determiner + \" \" + oneOf(expected, 'type');\n }\n // if actual value received, output it\n if (arguments.length >= 3) {\n msg += \". Received type \" + (actual !== null ? typeof actual : 'null');\n }\n return msg;\n}\nfunction missingArgs() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n assert(args.length > 0, 'At least one arg needs to be specified');\n var msg = 'The ';\n var len = args.length;\n args = args.map(function (a) { return \"\\\"\" + a + \"\\\"\"; });\n switch (len) {\n case 1:\n msg += args[0] + \" argument\";\n break;\n case 2:\n msg += args[0] + \" and \" + args[1] + \" arguments\";\n break;\n default:\n msg += args.slice(0, len - 1).join(', ');\n msg += \", and \" + args[len - 1] + \" arguments\";\n break;\n }\n return msg + \" must be specified\";\n}\nfunction oneOf(expected, thing) {\n assert(expected, 'expected is required');\n assert(typeof thing === 'string', 'thing is required');\n if (Array.isArray(expected)) {\n var len = expected.length;\n assert(len > 0, 'At least one expected value needs to be specified');\n // tslint:disable-next-line\n expected = expected.map(function (i) { return String(i); });\n if (len > 2) {\n return \"one of \" + thing + \" \" + expected.slice(0, len - 1).join(', ') + \", or \" + expected[len - 1];\n }\n else if (len === 2) {\n return \"one of \" + thing + \" \" + expected[0] + \" or \" + expected[1];\n }\n else {\n return \"of \" + thing + \" \" + expected[0];\n }\n }\n else {\n return \"of \" + thing + \" \" + String(expected);\n }\n}\nfunction bufferOutOfBounds(name, isWriting) {\n if (isWriting) {\n return 'Attempt to write outside buffer bounds';\n }\n else {\n return \"\\\"\" + name + \"\\\" is outside of buffer bounds\";\n }\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.strToEncoding = exports.assertEncoding = exports.ENCODING_UTF8 = void 0;\nvar buffer_1 = require(\"./internal/buffer\");\nvar errors = require(\"./internal/errors\");\nexports.ENCODING_UTF8 = 'utf8';\nfunction assertEncoding(encoding) {\n if (encoding && !buffer_1.Buffer.isEncoding(encoding))\n throw new errors.TypeError('ERR_INVALID_OPT_VALUE_ENCODING', encoding);\n}\nexports.assertEncoding = assertEncoding;\nfunction strToEncoding(str, encoding) {\n if (!encoding || encoding === exports.ENCODING_UTF8)\n return str; // UTF-8\n if (encoding === 'buffer')\n return new buffer_1.Buffer(str); // `buffer` encoding\n return new buffer_1.Buffer(str).toString(encoding); // Custom encoding\n}\nexports.strToEncoding = strToEncoding;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Dirent = void 0;\nvar constants_1 = require(\"./constants\");\nvar encoding_1 = require(\"./encoding\");\nvar S_IFMT = constants_1.constants.S_IFMT, S_IFDIR = constants_1.constants.S_IFDIR, S_IFREG = constants_1.constants.S_IFREG, S_IFBLK = constants_1.constants.S_IFBLK, S_IFCHR = constants_1.constants.S_IFCHR, S_IFLNK = constants_1.constants.S_IFLNK, S_IFIFO = constants_1.constants.S_IFIFO, S_IFSOCK = constants_1.constants.S_IFSOCK;\n/**\n * A directory entry, like `fs.Dirent`.\n */\nvar Dirent = /** @class */ (function () {\n function Dirent() {\n this.name = '';\n this.mode = 0;\n }\n Dirent.build = function (link, encoding) {\n var dirent = new Dirent();\n var mode = link.getNode().mode;\n dirent.name = encoding_1.strToEncoding(link.getName(), encoding);\n dirent.mode = mode;\n return dirent;\n };\n Dirent.prototype._checkModeProperty = function (property) {\n return (this.mode & S_IFMT) === property;\n };\n Dirent.prototype.isDirectory = function () {\n return this._checkModeProperty(S_IFDIR);\n };\n Dirent.prototype.isFile = function () {\n return this._checkModeProperty(S_IFREG);\n };\n Dirent.prototype.isBlockDevice = function () {\n return this._checkModeProperty(S_IFBLK);\n };\n Dirent.prototype.isCharacterDevice = function () {\n return this._checkModeProperty(S_IFCHR);\n };\n Dirent.prototype.isSymbolicLink = function () {\n return this._checkModeProperty(S_IFLNK);\n };\n Dirent.prototype.isFIFO = function () {\n return this._checkModeProperty(S_IFIFO);\n };\n Dirent.prototype.isSocket = function () {\n return this._checkModeProperty(S_IFSOCK);\n };\n return Dirent;\n}());\nexports.Dirent = Dirent;\nexports.default = Dirent;\n", "// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _setImmediate;\nif (typeof setImmediate === 'function')\n _setImmediate = setImmediate.bind(global);\nelse\n _setImmediate = setTimeout.bind(global);\nexports.default = _setImmediate;\n", "\"use strict\";\n// Here we mock the global `process` variable in case we are not in Node's environment.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createProcess = void 0;\n/**\n * Looks to return a `process` object, if one is available.\n *\n * The global `process` is returned if defined;\n * otherwise `require('process')` is attempted.\n *\n * If that fails, `undefined` is returned.\n *\n * @return {IProcess | undefined}\n */\nvar maybeReturnProcess = function () {\n if (typeof process !== 'undefined') {\n return process;\n }\n try {\n return require('process');\n }\n catch (_a) {\n return undefined;\n }\n};\nfunction createProcess() {\n var p = maybeReturnProcess() || {};\n if (!p.getuid)\n p.getuid = function () { return 0; };\n if (!p.getgid)\n p.getgid = function () { return 0; };\n if (!p.cwd)\n p.cwd = function () { return '/'; };\n if (!p.nextTick)\n p.nextTick = require('./setImmediate').default;\n if (!p.emitWarning)\n p.emitWarning = function (message, type) {\n // tslint:disable-next-line:no-console\n console.warn(\"\" + type + (type ? ': ' : '') + message);\n };\n if (!p.env)\n p.env = {};\n return p;\n}\nexports.createProcess = createProcess;\nexports.default = createProcess();\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n", "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.File = exports.Link = exports.Node = exports.SEP = void 0;\nvar process_1 = require(\"./process\");\nvar buffer_1 = require(\"./internal/buffer\");\nvar constants_1 = require(\"./constants\");\nvar events_1 = require(\"events\");\nvar Stats_1 = require(\"./Stats\");\nvar S_IFMT = constants_1.constants.S_IFMT, S_IFDIR = constants_1.constants.S_IFDIR, S_IFREG = constants_1.constants.S_IFREG, S_IFLNK = constants_1.constants.S_IFLNK, O_APPEND = constants_1.constants.O_APPEND;\nexports.SEP = '/';\n/**\n * Node in a file system (like i-node, v-node).\n */\nvar Node = /** @class */ (function (_super) {\n __extends(Node, _super);\n function Node(ino, perm) {\n if (perm === void 0) { perm = 438; }\n var _this = _super.call(this) || this;\n // User ID and group ID.\n _this.uid = process_1.default.getuid();\n _this.gid = process_1.default.getgid();\n _this.atime = new Date();\n _this.mtime = new Date();\n _this.ctime = new Date();\n _this.perm = 438; // Permissions `chmod`, `fchmod`\n _this.mode = S_IFREG; // S_IFDIR, S_IFREG, etc.. (file by default?)\n // Number of hard links pointing at this Node.\n _this.nlink = 1;\n _this.perm = perm;\n _this.mode |= perm;\n _this.ino = ino;\n return _this;\n }\n Node.prototype.getString = function (encoding) {\n if (encoding === void 0) { encoding = 'utf8'; }\n return this.getBuffer().toString(encoding);\n };\n Node.prototype.setString = function (str) {\n // this.setBuffer(bufferFrom(str, 'utf8'));\n this.buf = buffer_1.bufferFrom(str, 'utf8');\n this.touch();\n };\n Node.prototype.getBuffer = function () {\n if (!this.buf)\n this.setBuffer(buffer_1.bufferAllocUnsafe(0));\n return buffer_1.bufferFrom(this.buf); // Return a copy.\n };\n Node.prototype.setBuffer = function (buf) {\n this.buf = buffer_1.bufferFrom(buf); // Creates a copy of data.\n this.touch();\n };\n Node.prototype.getSize = function () {\n return this.buf ? this.buf.length : 0;\n };\n Node.prototype.setModeProperty = function (property) {\n this.mode = (this.mode & ~S_IFMT) | property;\n };\n Node.prototype.setIsFile = function () {\n this.setModeProperty(S_IFREG);\n };\n Node.prototype.setIsDirectory = function () {\n this.setModeProperty(S_IFDIR);\n };\n Node.prototype.setIsSymlink = function () {\n this.setModeProperty(S_IFLNK);\n };\n Node.prototype.isFile = function () {\n return (this.mode & S_IFMT) === S_IFREG;\n };\n Node.prototype.isDirectory = function () {\n return (this.mode & S_IFMT) === S_IFDIR;\n };\n Node.prototype.isSymlink = function () {\n // return !!this.symlink;\n return (this.mode & S_IFMT) === S_IFLNK;\n };\n Node.prototype.makeSymlink = function (steps) {\n this.symlink = steps;\n this.setIsSymlink();\n };\n Node.prototype.write = function (buf, off, len, pos) {\n if (off === void 0) { off = 0; }\n if (len === void 0) { len = buf.length; }\n if (pos === void 0) { pos = 0; }\n if (!this.buf)\n this.buf = buffer_1.bufferAllocUnsafe(0);\n if (pos + len > this.buf.length) {\n var newBuf = buffer_1.bufferAllocUnsafe(pos + len);\n this.buf.copy(newBuf, 0, 0, this.buf.length);\n this.buf = newBuf;\n }\n buf.copy(this.buf, pos, off, off + len);\n this.touch();\n return len;\n };\n // Returns the number of bytes read.\n Node.prototype.read = function (buf, off, len, pos) {\n if (off === void 0) { off = 0; }\n if (len === void 0) { len = buf.byteLength; }\n if (pos === void 0) { pos = 0; }\n if (!this.buf)\n this.buf = buffer_1.bufferAllocUnsafe(0);\n var actualLen = len;\n if (actualLen > buf.byteLength) {\n actualLen = buf.byteLength;\n }\n if (actualLen + pos > this.buf.length) {\n actualLen = this.buf.length - pos;\n }\n this.buf.copy(buf, off, pos, pos + actualLen);\n return actualLen;\n };\n Node.prototype.truncate = function (len) {\n if (len === void 0) { len = 0; }\n if (!len)\n this.buf = buffer_1.bufferAllocUnsafe(0);\n else {\n if (!this.buf)\n this.buf = buffer_1.bufferAllocUnsafe(0);\n if (len <= this.buf.length) {\n this.buf = this.buf.slice(0, len);\n }\n else {\n var buf = buffer_1.bufferAllocUnsafe(0);\n this.buf.copy(buf);\n buf.fill(0, len);\n }\n }\n this.touch();\n };\n Node.prototype.chmod = function (perm) {\n this.perm = perm;\n this.mode = (this.mode & ~511) | perm;\n this.touch();\n };\n Node.prototype.chown = function (uid, gid) {\n this.uid = uid;\n this.gid = gid;\n this.touch();\n };\n Node.prototype.touch = function () {\n this.mtime = new Date();\n this.emit('change', this);\n };\n Node.prototype.canRead = function (uid, gid) {\n if (uid === void 0) { uid = process_1.default.getuid(); }\n if (gid === void 0) { gid = process_1.default.getgid(); }\n if (this.perm & 4 /* IROTH */) {\n return true;\n }\n if (gid === this.gid) {\n if (this.perm & 32 /* IRGRP */) {\n return true;\n }\n }\n if (uid === this.uid) {\n if (this.perm & 256 /* IRUSR */) {\n return true;\n }\n }\n return false;\n };\n Node.prototype.canWrite = function (uid, gid) {\n if (uid === void 0) { uid = process_1.default.getuid(); }\n if (gid === void 0) { gid = process_1.default.getgid(); }\n if (this.perm & 2 /* IWOTH */) {\n return true;\n }\n if (gid === this.gid) {\n if (this.perm & 16 /* IWGRP */) {\n return true;\n }\n }\n if (uid === this.uid) {\n if (this.perm & 128 /* IWUSR */) {\n return true;\n }\n }\n return false;\n };\n Node.prototype.del = function () {\n this.emit('delete', this);\n };\n Node.prototype.toJSON = function () {\n return {\n ino: this.ino,\n uid: this.uid,\n gid: this.gid,\n atime: this.atime.getTime(),\n mtime: this.mtime.getTime(),\n ctime: this.ctime.getTime(),\n perm: this.perm,\n mode: this.mode,\n nlink: this.nlink,\n symlink: this.symlink,\n data: this.getString(),\n };\n };\n return Node;\n}(events_1.EventEmitter));\nexports.Node = Node;\n/**\n * Represents a hard link that points to an i-node `node`.\n */\nvar Link = /** @class */ (function (_super) {\n __extends(Link, _super);\n function Link(vol, parent, name) {\n var _this = _super.call(this) || this;\n _this.children = {};\n // Path to this node as Array: ['usr', 'bin', 'node'].\n _this.steps = [];\n // \"i-node\" number of the node.\n _this.ino = 0;\n // Number of children.\n _this.length = 0;\n _this.vol = vol;\n _this.parent = parent;\n _this.steps = parent ? parent.steps.concat([name]) : [name];\n return _this;\n }\n Link.prototype.setNode = function (node) {\n this.node = node;\n this.ino = node.ino;\n };\n Link.prototype.getNode = function () {\n return this.node;\n };\n Link.prototype.createChild = function (name, node) {\n if (node === void 0) { node = this.vol.createNode(); }\n var link = new Link(this.vol, this, name);\n link.setNode(node);\n if (node.isDirectory()) {\n // link.setChild('.', link);\n // link.getNode().nlink++;\n // link.setChild('..', this);\n // this.getNode().nlink++;\n }\n this.setChild(name, link);\n return link;\n };\n Link.prototype.setChild = function (name, link) {\n if (link === void 0) { link = new Link(this.vol, this, name); }\n this.children[name] = link;\n link.parent = this;\n this.length++;\n this.emit('child:add', link, this);\n return link;\n };\n Link.prototype.deleteChild = function (link) {\n delete this.children[link.getName()];\n this.length--;\n this.emit('child:delete', link, this);\n };\n Link.prototype.getChild = function (name) {\n if (Object.hasOwnProperty.call(this.children, name)) {\n return this.children[name];\n }\n };\n Link.prototype.getPath = function () {\n return this.steps.join(exports.SEP);\n };\n Link.prototype.getName = function () {\n return this.steps[this.steps.length - 1];\n };\n // del() {\n // const parent = this.parent;\n // if(parent) {\n // parent.deleteChild(link);\n // }\n // this.parent = null;\n // this.vol = null;\n // }\n /**\n * Walk the tree path and return the `Link` at that location, if any.\n * @param steps {string[]} Desired location.\n * @param stop {number} Max steps to go into.\n * @param i {number} Current step in the `steps` array.\n *\n * @return {Link|null}\n */\n Link.prototype.walk = function (steps, stop, i) {\n if (stop === void 0) { stop = steps.length; }\n if (i === void 0) { i = 0; }\n if (i >= steps.length)\n return this;\n if (i >= stop)\n return this;\n var step = steps[i];\n var link = this.getChild(step);\n if (!link)\n return null;\n return link.walk(steps, stop, i + 1);\n };\n Link.prototype.toJSON = function () {\n return {\n steps: this.steps,\n ino: this.ino,\n children: Object.keys(this.children),\n };\n };\n return Link;\n}(events_1.EventEmitter));\nexports.Link = Link;\n/**\n * Represents an open file (file descriptor) that points to a `Link` (Hard-link) and a `Node`.\n */\nvar File = /** @class */ (function () {\n /**\n * Open a Link-Node pair. `node` is provided separately as that might be a different node\n * rather the one `link` points to, because it might be a symlink.\n * @param link\n * @param node\n * @param flags\n * @param fd\n */\n function File(link, node, flags, fd) {\n /**\n * A cursor/offset position in a file, where data will be written on write.\n * User can \"seek\" this position.\n */\n this.position = 0;\n this.link = link;\n this.node = node;\n this.flags = flags;\n this.fd = fd;\n }\n File.prototype.getString = function (encoding) {\n if (encoding === void 0) { encoding = 'utf8'; }\n return this.node.getString();\n };\n File.prototype.setString = function (str) {\n this.node.setString(str);\n };\n File.prototype.getBuffer = function () {\n return this.node.getBuffer();\n };\n File.prototype.setBuffer = function (buf) {\n this.node.setBuffer(buf);\n };\n File.prototype.getSize = function () {\n return this.node.getSize();\n };\n File.prototype.truncate = function (len) {\n this.node.truncate(len);\n };\n File.prototype.seekTo = function (position) {\n this.position = position;\n };\n File.prototype.stats = function () {\n return Stats_1.default.build(this.node);\n };\n File.prototype.write = function (buf, offset, length, position) {\n if (offset === void 0) { offset = 0; }\n if (length === void 0) { length = buf.length; }\n if (typeof position !== 'number')\n position = this.position;\n if (this.flags & O_APPEND)\n position = this.getSize();\n var bytes = this.node.write(buf, offset, length, position);\n this.position = position + bytes;\n return bytes;\n };\n File.prototype.read = function (buf, offset, length, position) {\n if (offset === void 0) { offset = 0; }\n if (length === void 0) { length = buf.byteLength; }\n if (typeof position !== 'number')\n position = this.position;\n var bytes = this.node.read(buf, offset, length, position);\n this.position = position + bytes;\n return bytes;\n };\n File.prototype.chmod = function (perm) {\n this.node.chmod(perm);\n };\n File.prototype.chown = function (uid, gid) {\n this.node.chown(uid, gid);\n };\n return File;\n}());\nexports.File = File;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * `setTimeoutUnref` is just like `setTimeout`,\n * only in Node's environment it will \"unref\" its macro task.\n */\nfunction setTimeoutUnref(callback, time, args) {\n var ref = setTimeout.apply(null, arguments);\n if (ref && typeof ref === 'object' && typeof ref.unref === 'function')\n ref.unref();\n return ref;\n}\nexports.default = setTimeoutUnref;\n", "\n/**\n * Expose `Emitter`.\n */\n\nmodule.exports = Emitter;\n\n/**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\nfunction Emitter(obj) {\n if (obj) return mixin(obj);\n};\n\n/**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n return obj;\n}\n\n/**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.on =\nEmitter.prototype.addEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n (this._callbacks[event] = this._callbacks[event] || [])\n .push(fn);\n return this;\n};\n\n/**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.once = function(event, fn){\n var self = this;\n this._callbacks = this._callbacks || {};\n\n function on() {\n self.off(event, on);\n fn.apply(this, arguments);\n }\n\n on.fn = fn;\n this.on(event, on);\n return this;\n};\n\n/**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.off =\nEmitter.prototype.removeListener =\nEmitter.prototype.removeAllListeners =\nEmitter.prototype.removeEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n\n // all\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks[event];\n if (!callbacks) return this;\n\n // remove all handlers\n if (1 == arguments.length) {\n delete this._callbacks[event];\n return this;\n }\n\n // remove specific handler\n var cb;\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n return this;\n};\n\n/**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\nEmitter.prototype.emit = function(event){\n this._callbacks = this._callbacks || {};\n var args = [].slice.call(arguments, 1)\n , callbacks = this._callbacks[event];\n\n if (callbacks) {\n callbacks = callbacks.slice(0);\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n\n return this;\n};\n\n/**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\nEmitter.prototype.listeners = function(event){\n this._callbacks = this._callbacks || {};\n return this._callbacks[event] || [];\n};\n\n/**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\nEmitter.prototype.hasListeners = function(event){\n return !! this.listeners(event).length;\n};\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar Emitter = require('emitter');\n\nfunction Stream() {\n Emitter.call(this);\n}\nStream.prototype = new Emitter();\nmodule.exports = Stream;\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (!this.hasListeners('error')) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.off('data', ondata);\n dest.off('drain', ondrain);\n\n source.off('end', onend);\n source.off('close', onclose);\n\n source.off('error', onerror);\n dest.off('error', onerror);\n\n source.off('end', cleanup);\n source.off('close', cleanup);\n\n dest.off('end', cleanup);\n dest.off('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('end', cleanup);\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n}\n", "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FileHandle = void 0;\nfunction promisify(vol, fn, getResult) {\n if (getResult === void 0) { getResult = function (input) { return input; }; }\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new Promise(function (resolve, reject) {\n vol[fn].bind(vol).apply(void 0, __spreadArray(__spreadArray([], args), [function (error, result) {\n if (error)\n return reject(error);\n return resolve(getResult(result));\n }]));\n });\n };\n}\nvar FileHandle = /** @class */ (function () {\n function FileHandle(vol, fd) {\n this.vol = vol;\n this.fd = fd;\n }\n FileHandle.prototype.appendFile = function (data, options) {\n return promisify(this.vol, 'appendFile')(this.fd, data, options);\n };\n FileHandle.prototype.chmod = function (mode) {\n return promisify(this.vol, 'fchmod')(this.fd, mode);\n };\n FileHandle.prototype.chown = function (uid, gid) {\n return promisify(this.vol, 'fchown')(this.fd, uid, gid);\n };\n FileHandle.prototype.close = function () {\n return promisify(this.vol, 'close')(this.fd);\n };\n FileHandle.prototype.datasync = function () {\n return promisify(this.vol, 'fdatasync')(this.fd);\n };\n FileHandle.prototype.read = function (buffer, offset, length, position) {\n return promisify(this.vol, 'read', function (bytesRead) { return ({ bytesRead: bytesRead, buffer: buffer }); })(this.fd, buffer, offset, length, position);\n };\n FileHandle.prototype.readFile = function (options) {\n return promisify(this.vol, 'readFile')(this.fd, options);\n };\n FileHandle.prototype.stat = function (options) {\n return promisify(this.vol, 'fstat')(this.fd, options);\n };\n FileHandle.prototype.sync = function () {\n return promisify(this.vol, 'fsync')(this.fd);\n };\n FileHandle.prototype.truncate = function (len) {\n return promisify(this.vol, 'ftruncate')(this.fd, len);\n };\n FileHandle.prototype.utimes = function (atime, mtime) {\n return promisify(this.vol, 'futimes')(this.fd, atime, mtime);\n };\n FileHandle.prototype.write = function (buffer, offset, length, position) {\n return promisify(this.vol, 'write', function (bytesWritten) { return ({ bytesWritten: bytesWritten, buffer: buffer }); })(this.fd, buffer, offset, length, position);\n };\n FileHandle.prototype.writeFile = function (data, options) {\n return promisify(this.vol, 'writeFile')(this.fd, data, options);\n };\n return FileHandle;\n}());\nexports.FileHandle = FileHandle;\nfunction createPromisesApi(vol) {\n if (typeof Promise === 'undefined')\n return null;\n return {\n FileHandle: FileHandle,\n access: function (path, mode) {\n return promisify(vol, 'access')(path, mode);\n },\n appendFile: function (path, data, options) {\n return promisify(vol, 'appendFile')(path instanceof FileHandle ? path.fd : path, data, options);\n },\n chmod: function (path, mode) {\n return promisify(vol, 'chmod')(path, mode);\n },\n chown: function (path, uid, gid) {\n return promisify(vol, 'chown')(path, uid, gid);\n },\n copyFile: function (src, dest, flags) {\n return promisify(vol, 'copyFile')(src, dest, flags);\n },\n lchmod: function (path, mode) {\n return promisify(vol, 'lchmod')(path, mode);\n },\n lchown: function (path, uid, gid) {\n return promisify(vol, 'lchown')(path, uid, gid);\n },\n link: function (existingPath, newPath) {\n return promisify(vol, 'link')(existingPath, newPath);\n },\n lstat: function (path, options) {\n return promisify(vol, 'lstat')(path, options);\n },\n mkdir: function (path, options) {\n return promisify(vol, 'mkdir')(path, options);\n },\n mkdtemp: function (prefix, options) {\n return promisify(vol, 'mkdtemp')(prefix, options);\n },\n open: function (path, flags, mode) {\n return promisify(vol, 'open', function (fd) { return new FileHandle(vol, fd); })(path, flags, mode);\n },\n readdir: function (path, options) {\n return promisify(vol, 'readdir')(path, options);\n },\n readFile: function (id, options) {\n return promisify(vol, 'readFile')(id instanceof FileHandle ? id.fd : id, options);\n },\n readlink: function (path, options) {\n return promisify(vol, 'readlink')(path, options);\n },\n realpath: function (path, options) {\n return promisify(vol, 'realpath')(path, options);\n },\n rename: function (oldPath, newPath) {\n return promisify(vol, 'rename')(oldPath, newPath);\n },\n rmdir: function (path) {\n return promisify(vol, 'rmdir')(path);\n },\n stat: function (path, options) {\n return promisify(vol, 'stat')(path, options);\n },\n symlink: function (target, path, type) {\n return promisify(vol, 'symlink')(target, path, type);\n },\n truncate: function (path, len) {\n return promisify(vol, 'truncate')(path, len);\n },\n unlink: function (path) {\n return promisify(vol, 'unlink')(path);\n },\n utimes: function (path, atime, mtime) {\n return promisify(vol, 'utimes')(path, atime, mtime);\n },\n writeFile: function (id, data, options) {\n return promisify(vol, 'writeFile')(id instanceof FileHandle ? id.fd : id, data, options);\n },\n };\n}\nexports.default = createPromisesApi;\n", "/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n", "'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (Array.isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return Object.keys(obj).map(function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (Array.isArray(obj[k])) {\n return obj[k].map(function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n", "'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.unixify = unixify;\nexports.correctPath = correctPath;\nvar isWin = process.platform === 'win32';\n\nfunction removeTrailingSeparator(str) {\n var i = str.length - 1;\n\n if (i < 2) {\n return str;\n }\n\n while (isSeparator(str, i)) {\n i--;\n }\n\n return str.substr(0, i + 1);\n}\n\nfunction isSeparator(str, i) {\n var _char = str[i];\n return i > 0 && (_char === '/' || isWin && _char === '\\\\');\n}\n\nfunction normalizePath(str, stripTrailing) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string');\n }\n\n str = str.replace(/[\\\\\\/]+/g, '/');\n\n if (stripTrailing !== false) {\n str = removeTrailingSeparator(str);\n }\n\n return str;\n}\n\nfunction unixify(filepath) {\n var stripTrailing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (isWin) {\n filepath = normalizePath(filepath, stripTrailing);\n return filepath.replace(/^([a-zA-Z]+:|\\.\\/)/, '');\n }\n\n return filepath;\n}\n\nfunction correctPath(filepath) {\n return unixify(filepath.replace(/^\\\\\\\\\\?\\\\.:\\\\/, '\\\\'));\n}", "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FSWatcher = exports.StatWatcher = exports.Volume = exports.toUnixTimestamp = exports.bufferToEncoding = exports.dataToBuffer = exports.dataToStr = exports.pathToSteps = exports.filenameToSteps = exports.pathToFilename = exports.flagsToNumber = exports.FLAGS = void 0;\nvar pathModule = require(\"path\");\nvar node_1 = require(\"./node\");\nvar Stats_1 = require(\"./Stats\");\nvar Dirent_1 = require(\"./Dirent\");\nvar buffer_1 = require(\"./internal/buffer\");\nvar setImmediate_1 = require(\"./setImmediate\");\nvar process_1 = require(\"./process\");\nvar setTimeoutUnref_1 = require(\"./setTimeoutUnref\");\nvar stream_1 = require(\"stream\");\nvar constants_1 = require(\"./constants\");\nvar events_1 = require(\"events\");\nvar encoding_1 = require(\"./encoding\");\nvar errors = require(\"./internal/errors\");\nvar util = require(\"util\");\nvar promises_1 = require(\"./promises\");\nvar resolveCrossPlatform = pathModule.resolve;\nvar O_RDONLY = constants_1.constants.O_RDONLY, O_WRONLY = constants_1.constants.O_WRONLY, O_RDWR = constants_1.constants.O_RDWR, O_CREAT = constants_1.constants.O_CREAT, O_EXCL = constants_1.constants.O_EXCL, O_TRUNC = constants_1.constants.O_TRUNC, O_APPEND = constants_1.constants.O_APPEND, O_SYNC = constants_1.constants.O_SYNC, O_DIRECTORY = constants_1.constants.O_DIRECTORY, F_OK = constants_1.constants.F_OK, COPYFILE_EXCL = constants_1.constants.COPYFILE_EXCL, COPYFILE_FICLONE_FORCE = constants_1.constants.COPYFILE_FICLONE_FORCE;\nvar _a = pathModule.posix ? pathModule.posix : pathModule, sep = _a.sep, relative = _a.relative, join = _a.join, dirname = _a.dirname;\nvar isWin = process_1.default.platform === 'win32';\nvar kMinPoolSpace = 128;\n// const kMaxLength = require('buffer').kMaxLength;\n// ---------------------------------------- Error messages\n// TODO: Use `internal/errors.js` in the future.\nvar ERRSTR = {\n PATH_STR: 'path must be a string or Buffer',\n // FD: 'file descriptor must be a unsigned 32-bit integer',\n FD: 'fd must be a file descriptor',\n MODE_INT: 'mode must be an int',\n CB: 'callback must be a function',\n UID: 'uid must be an unsigned int',\n GID: 'gid must be an unsigned int',\n LEN: 'len must be an integer',\n ATIME: 'atime must be an integer',\n MTIME: 'mtime must be an integer',\n PREFIX: 'filename prefix is required',\n BUFFER: 'buffer must be an instance of Buffer or StaticBuffer',\n OFFSET: 'offset must be an integer',\n LENGTH: 'length must be an integer',\n POSITION: 'position must be an integer',\n};\nvar ERRSTR_OPTS = function (tipeof) { return \"Expected options to be either an object or a string, but got \" + tipeof + \" instead\"; };\n// const ERRSTR_FLAG = flag => `Unknown file open flag: ${flag}`;\nvar ENOENT = 'ENOENT';\nvar EBADF = 'EBADF';\nvar EINVAL = 'EINVAL';\nvar EPERM = 'EPERM';\nvar EPROTO = 'EPROTO';\nvar EEXIST = 'EEXIST';\nvar ENOTDIR = 'ENOTDIR';\nvar EMFILE = 'EMFILE';\nvar EACCES = 'EACCES';\nvar EISDIR = 'EISDIR';\nvar ENOTEMPTY = 'ENOTEMPTY';\nvar ENOSYS = 'ENOSYS';\nfunction formatError(errorCode, func, path, path2) {\n if (func === void 0) { func = ''; }\n if (path === void 0) { path = ''; }\n if (path2 === void 0) { path2 = ''; }\n var pathFormatted = '';\n if (path)\n pathFormatted = \" '\" + path + \"'\";\n if (path2)\n pathFormatted += \" -> '\" + path2 + \"'\";\n switch (errorCode) {\n case ENOENT:\n return \"ENOENT: no such file or directory, \" + func + pathFormatted;\n case EBADF:\n return \"EBADF: bad file descriptor, \" + func + pathFormatted;\n case EINVAL:\n return \"EINVAL: invalid argument, \" + func + pathFormatted;\n case EPERM:\n return \"EPERM: operation not permitted, \" + func + pathFormatted;\n case EPROTO:\n return \"EPROTO: protocol error, \" + func + pathFormatted;\n case EEXIST:\n return \"EEXIST: file already exists, \" + func + pathFormatted;\n case ENOTDIR:\n return \"ENOTDIR: not a directory, \" + func + pathFormatted;\n case EISDIR:\n return \"EISDIR: illegal operation on a directory, \" + func + pathFormatted;\n case EACCES:\n return \"EACCES: permission denied, \" + func + pathFormatted;\n case ENOTEMPTY:\n return \"ENOTEMPTY: directory not empty, \" + func + pathFormatted;\n case EMFILE:\n return \"EMFILE: too many open files, \" + func + pathFormatted;\n case ENOSYS:\n return \"ENOSYS: function not implemented, \" + func + pathFormatted;\n default:\n return errorCode + \": error occurred, \" + func + pathFormatted;\n }\n}\nfunction createError(errorCode, func, path, path2, Constructor) {\n if (func === void 0) { func = ''; }\n if (path === void 0) { path = ''; }\n if (path2 === void 0) { path2 = ''; }\n if (Constructor === void 0) { Constructor = Error; }\n var error = new Constructor(formatError(errorCode, func, path, path2));\n error.code = errorCode;\n return error;\n}\n// ---------------------------------------- Flags\n// List of file `flags` as defined by Node.\nvar FLAGS;\n(function (FLAGS) {\n // Open file for reading. An exception occurs if the file does not exist.\n FLAGS[FLAGS[\"r\"] = O_RDONLY] = \"r\";\n // Open file for reading and writing. An exception occurs if the file does not exist.\n FLAGS[FLAGS[\"r+\"] = O_RDWR] = \"r+\";\n // Open file for reading in synchronous mode. Instructs the operating system to bypass the local file system cache.\n FLAGS[FLAGS[\"rs\"] = O_RDONLY | O_SYNC] = \"rs\";\n FLAGS[FLAGS[\"sr\"] = FLAGS.rs] = \"sr\";\n // Open file for reading and writing, telling the OS to open it synchronously. See notes for 'rs' about using this with caution.\n FLAGS[FLAGS[\"rs+\"] = O_RDWR | O_SYNC] = \"rs+\";\n FLAGS[FLAGS[\"sr+\"] = FLAGS['rs+']] = \"sr+\";\n // Open file for writing. The file is created (if it does not exist) or truncated (if it exists).\n FLAGS[FLAGS[\"w\"] = O_WRONLY | O_CREAT | O_TRUNC] = \"w\";\n // Like 'w' but fails if path exists.\n FLAGS[FLAGS[\"wx\"] = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL] = \"wx\";\n FLAGS[FLAGS[\"xw\"] = FLAGS.wx] = \"xw\";\n // Open file for reading and writing. The file is created (if it does not exist) or truncated (if it exists).\n FLAGS[FLAGS[\"w+\"] = O_RDWR | O_CREAT | O_TRUNC] = \"w+\";\n // Like 'w+' but fails if path exists.\n FLAGS[FLAGS[\"wx+\"] = O_RDWR | O_CREAT | O_TRUNC | O_EXCL] = \"wx+\";\n FLAGS[FLAGS[\"xw+\"] = FLAGS['wx+']] = \"xw+\";\n // Open file for appending. The file is created if it does not exist.\n FLAGS[FLAGS[\"a\"] = O_WRONLY | O_APPEND | O_CREAT] = \"a\";\n // Like 'a' but fails if path exists.\n FLAGS[FLAGS[\"ax\"] = O_WRONLY | O_APPEND | O_CREAT | O_EXCL] = \"ax\";\n FLAGS[FLAGS[\"xa\"] = FLAGS.ax] = \"xa\";\n // Open file for reading and appending. The file is created if it does not exist.\n FLAGS[FLAGS[\"a+\"] = O_RDWR | O_APPEND | O_CREAT] = \"a+\";\n // Like 'a+' but fails if path exists.\n FLAGS[FLAGS[\"ax+\"] = O_RDWR | O_APPEND | O_CREAT | O_EXCL] = \"ax+\";\n FLAGS[FLAGS[\"xa+\"] = FLAGS['ax+']] = \"xa+\";\n})(FLAGS = exports.FLAGS || (exports.FLAGS = {}));\nfunction flagsToNumber(flags) {\n if (typeof flags === 'number')\n return flags;\n if (typeof flags === 'string') {\n var flagsNum = FLAGS[flags];\n if (typeof flagsNum !== 'undefined')\n return flagsNum;\n }\n // throw new TypeError(formatError(ERRSTR_FLAG(flags)));\n throw new errors.TypeError('ERR_INVALID_OPT_VALUE', 'flags', flags);\n}\nexports.flagsToNumber = flagsToNumber;\n// ---------------------------------------- Options\nfunction getOptions(defaults, options) {\n var opts;\n if (!options)\n return defaults;\n else {\n var tipeof = typeof options;\n switch (tipeof) {\n case 'string':\n opts = Object.assign({}, defaults, { encoding: options });\n break;\n case 'object':\n opts = Object.assign({}, defaults, options);\n break;\n default:\n throw TypeError(ERRSTR_OPTS(tipeof));\n }\n }\n if (opts.encoding !== 'buffer')\n encoding_1.assertEncoding(opts.encoding);\n return opts;\n}\nfunction optsGenerator(defaults) {\n return function (options) { return getOptions(defaults, options); };\n}\nfunction validateCallback(callback) {\n if (typeof callback !== 'function')\n throw TypeError(ERRSTR.CB);\n return callback;\n}\nfunction optsAndCbGenerator(getOpts) {\n return function (options, callback) {\n return typeof options === 'function' ? [getOpts(), options] : [getOpts(options), validateCallback(callback)];\n };\n}\nvar optsDefaults = {\n encoding: 'utf8',\n};\nvar getDefaultOpts = optsGenerator(optsDefaults);\nvar getDefaultOptsAndCb = optsAndCbGenerator(getDefaultOpts);\nvar readFileOptsDefaults = {\n flag: 'r',\n};\nvar getReadFileOptions = optsGenerator(readFileOptsDefaults);\nvar writeFileDefaults = {\n encoding: 'utf8',\n mode: 438 /* DEFAULT */,\n flag: FLAGS[FLAGS.w],\n};\nvar getWriteFileOptions = optsGenerator(writeFileDefaults);\nvar appendFileDefaults = {\n encoding: 'utf8',\n mode: 438 /* DEFAULT */,\n flag: FLAGS[FLAGS.a],\n};\nvar getAppendFileOpts = optsGenerator(appendFileDefaults);\nvar getAppendFileOptsAndCb = optsAndCbGenerator(getAppendFileOpts);\nvar realpathDefaults = optsDefaults;\nvar getRealpathOptions = optsGenerator(realpathDefaults);\nvar getRealpathOptsAndCb = optsAndCbGenerator(getRealpathOptions);\nvar mkdirDefaults = {\n mode: 511 /* DIR */,\n recursive: false,\n};\nvar getMkdirOptions = function (options) {\n if (typeof options === 'number')\n return Object.assign({}, mkdirDefaults, { mode: options });\n return Object.assign({}, mkdirDefaults, options);\n};\nvar rmdirDefaults = {\n recursive: false,\n};\nvar getRmdirOptions = function (options) {\n return Object.assign({}, rmdirDefaults, options);\n};\nvar readdirDefaults = {\n encoding: 'utf8',\n withFileTypes: false,\n};\nvar getReaddirOptions = optsGenerator(readdirDefaults);\nvar getReaddirOptsAndCb = optsAndCbGenerator(getReaddirOptions);\nvar statDefaults = {\n bigint: false,\n};\nvar getStatOptions = function (options) {\n if (options === void 0) { options = {}; }\n return Object.assign({}, statDefaults, options);\n};\nvar getStatOptsAndCb = function (options, callback) {\n return typeof options === 'function' ? [getStatOptions(), options] : [getStatOptions(options), validateCallback(callback)];\n};\n// ---------------------------------------- Utility functions\nfunction getPathFromURLPosix(url) {\n if (url.hostname !== '') {\n throw new errors.TypeError('ERR_INVALID_FILE_URL_HOST', process_1.default.platform);\n }\n var pathname = url.pathname;\n for (var n = 0; n < pathname.length; n++) {\n if (pathname[n] === '%') {\n var third = pathname.codePointAt(n + 2) | 0x20;\n if (pathname[n + 1] === '2' && third === 102) {\n throw new errors.TypeError('ERR_INVALID_FILE_URL_PATH', 'must not include encoded / characters');\n }\n }\n }\n return decodeURIComponent(pathname);\n}\nfunction pathToFilename(path) {\n if (typeof path !== 'string' && !buffer_1.Buffer.isBuffer(path)) {\n try {\n if (!(path instanceof require('url').URL))\n throw new TypeError(ERRSTR.PATH_STR);\n }\n catch (err) {\n throw new TypeError(ERRSTR.PATH_STR);\n }\n path = getPathFromURLPosix(path);\n }\n var pathString = String(path);\n nullCheck(pathString);\n // return slash(pathString);\n return pathString;\n}\nexports.pathToFilename = pathToFilename;\nvar resolve = function (filename, base) {\n if (base === void 0) { base = process_1.default.cwd(); }\n return resolveCrossPlatform(base, filename);\n};\nif (isWin) {\n var _resolve_1 = resolve;\n var unixify_1 = require('fs-monkey/lib/correctPath').unixify;\n resolve = function (filename, base) { return unixify_1(_resolve_1(filename, base)); };\n}\nfunction filenameToSteps(filename, base) {\n var fullPath = resolve(filename, base);\n var fullPathSansSlash = fullPath.substr(1);\n if (!fullPathSansSlash)\n return [];\n return fullPathSansSlash.split(sep);\n}\nexports.filenameToSteps = filenameToSteps;\nfunction pathToSteps(path) {\n return filenameToSteps(pathToFilename(path));\n}\nexports.pathToSteps = pathToSteps;\nfunction dataToStr(data, encoding) {\n if (encoding === void 0) { encoding = encoding_1.ENCODING_UTF8; }\n if (buffer_1.Buffer.isBuffer(data))\n return data.toString(encoding);\n else if (data instanceof Uint8Array)\n return buffer_1.bufferFrom(data).toString(encoding);\n else\n return String(data);\n}\nexports.dataToStr = dataToStr;\nfunction dataToBuffer(data, encoding) {\n if (encoding === void 0) { encoding = encoding_1.ENCODING_UTF8; }\n if (buffer_1.Buffer.isBuffer(data))\n return data;\n else if (data instanceof Uint8Array)\n return buffer_1.bufferFrom(data);\n else\n return buffer_1.bufferFrom(String(data), encoding);\n}\nexports.dataToBuffer = dataToBuffer;\nfunction bufferToEncoding(buffer, encoding) {\n if (!encoding || encoding === 'buffer')\n return buffer;\n else\n return buffer.toString(encoding);\n}\nexports.bufferToEncoding = bufferToEncoding;\nfunction nullCheck(path, callback) {\n if (('' + path).indexOf('\\u0000') !== -1) {\n var er = new Error('Path must be a string without null bytes');\n er.code = ENOENT;\n if (typeof callback !== 'function')\n throw er;\n process_1.default.nextTick(callback, er);\n return false;\n }\n return true;\n}\nfunction _modeToNumber(mode, def) {\n if (typeof mode === 'number')\n return mode;\n if (typeof mode === 'string')\n return parseInt(mode, 8);\n if (def)\n return modeToNumber(def);\n return undefined;\n}\nfunction modeToNumber(mode, def) {\n var result = _modeToNumber(mode, def);\n if (typeof result !== 'number' || isNaN(result))\n throw new TypeError(ERRSTR.MODE_INT);\n return result;\n}\nfunction isFd(path) {\n return path >>> 0 === path;\n}\nfunction validateFd(fd) {\n if (!isFd(fd))\n throw TypeError(ERRSTR.FD);\n}\n// converts Date or number to a fractional UNIX timestamp\nfunction toUnixTimestamp(time) {\n // tslint:disable-next-line triple-equals\n if (typeof time === 'string' && +time == time) {\n return +time;\n }\n if (time instanceof Date) {\n return time.getTime() / 1000;\n }\n if (isFinite(time)) {\n if (time < 0) {\n return Date.now() / 1000;\n }\n return time;\n }\n throw new Error('Cannot parse time: ' + time);\n}\nexports.toUnixTimestamp = toUnixTimestamp;\nfunction validateUid(uid) {\n if (typeof uid !== 'number')\n throw TypeError(ERRSTR.UID);\n}\nfunction validateGid(gid) {\n if (typeof gid !== 'number')\n throw TypeError(ERRSTR.GID);\n}\nfunction flattenJSON(nestedJSON) {\n var flatJSON = {};\n function flatten(pathPrefix, node) {\n for (var path in node) {\n var contentOrNode = node[path];\n var joinedPath = join(pathPrefix, path);\n if (typeof contentOrNode === 'string') {\n flatJSON[joinedPath] = contentOrNode;\n }\n else if (typeof contentOrNode === 'object' && contentOrNode !== null && Object.keys(contentOrNode).length > 0) {\n // empty directories need an explicit entry and therefore get handled in `else`, non-empty ones are implicitly considered\n flatten(joinedPath, contentOrNode);\n }\n else {\n // without this branch null, empty-object or non-object entries would not be handled in the same way\n // by both fromJSON() and fromNestedJSON()\n flatJSON[joinedPath] = null;\n }\n }\n }\n flatten('', nestedJSON);\n return flatJSON;\n}\n/**\n * `Volume` represents a file system.\n */\nvar Volume = /** @class */ (function () {\n function Volume(props) {\n if (props === void 0) { props = {}; }\n // I-node number counter.\n this.ino = 0;\n // A mapping for i-node numbers to i-nodes (`Node`);\n this.inodes = {};\n // List of released i-node numbers, for reuse.\n this.releasedInos = [];\n // A mapping for file descriptors to `File`s.\n this.fds = {};\n // A list of reusable (opened and closed) file descriptors, that should be\n // used first before creating a new file descriptor.\n this.releasedFds = [];\n // Max number of open files.\n this.maxFiles = 10000;\n // Current number of open files.\n this.openFiles = 0;\n this.promisesApi = promises_1.default(this);\n this.statWatchers = {};\n this.props = Object.assign({ Node: node_1.Node, Link: node_1.Link, File: node_1.File }, props);\n var root = this.createLink();\n root.setNode(this.createNode(true));\n var self = this; // tslint:disable-line no-this-assignment\n this.StatWatcher = /** @class */ (function (_super) {\n __extends(StatWatcher, _super);\n function StatWatcher() {\n return _super.call(this, self) || this;\n }\n return StatWatcher;\n }(StatWatcher));\n var _ReadStream = FsReadStream;\n this.ReadStream = /** @class */ (function (_super) {\n __extends(class_1, _super);\n function class_1() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return _super.apply(this, __spreadArray([self], args)) || this;\n }\n return class_1;\n }(_ReadStream));\n var _WriteStream = FsWriteStream;\n this.WriteStream = /** @class */ (function (_super) {\n __extends(class_2, _super);\n function class_2() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return _super.apply(this, __spreadArray([self], args)) || this;\n }\n return class_2;\n }(_WriteStream));\n this.FSWatcher = /** @class */ (function (_super) {\n __extends(FSWatcher, _super);\n function FSWatcher() {\n return _super.call(this, self) || this;\n }\n return FSWatcher;\n }(FSWatcher));\n // root.setChild('.', root);\n // root.getNode().nlink++;\n // root.setChild('..', root);\n // root.getNode().nlink++;\n this.root = root;\n }\n Volume.fromJSON = function (json, cwd) {\n var vol = new Volume();\n vol.fromJSON(json, cwd);\n return vol;\n };\n Volume.fromNestedJSON = function (json, cwd) {\n var vol = new Volume();\n vol.fromNestedJSON(json, cwd);\n return vol;\n };\n Object.defineProperty(Volume.prototype, \"promises\", {\n get: function () {\n if (this.promisesApi === null)\n throw new Error('Promise is not supported in this environment.');\n return this.promisesApi;\n },\n enumerable: false,\n configurable: true\n });\n Volume.prototype.createLink = function (parent, name, isDirectory, perm) {\n if (isDirectory === void 0) { isDirectory = false; }\n if (!parent) {\n return new this.props.Link(this, null, '');\n }\n if (!name) {\n throw new Error('createLink: name cannot be empty');\n }\n return parent.createChild(name, this.createNode(isDirectory, perm));\n };\n Volume.prototype.deleteLink = function (link) {\n var parent = link.parent;\n if (parent) {\n parent.deleteChild(link);\n return true;\n }\n return false;\n };\n Volume.prototype.newInoNumber = function () {\n var releasedFd = this.releasedInos.pop();\n if (releasedFd)\n return releasedFd;\n else {\n this.ino = (this.ino + 1) % 0xffffffff;\n return this.ino;\n }\n };\n Volume.prototype.newFdNumber = function () {\n var releasedFd = this.releasedFds.pop();\n return typeof releasedFd === 'number' ? releasedFd : Volume.fd--;\n };\n Volume.prototype.createNode = function (isDirectory, perm) {\n if (isDirectory === void 0) { isDirectory = false; }\n var node = new this.props.Node(this.newInoNumber(), perm);\n if (isDirectory)\n node.setIsDirectory();\n this.inodes[node.ino] = node;\n return node;\n };\n Volume.prototype.getNode = function (ino) {\n return this.inodes[ino];\n };\n Volume.prototype.deleteNode = function (node) {\n node.del();\n delete this.inodes[node.ino];\n this.releasedInos.push(node.ino);\n };\n // Generates 6 character long random string, used by `mkdtemp`.\n Volume.prototype.genRndStr = function () {\n var str = (Math.random() + 1).toString(36).substr(2, 6);\n if (str.length === 6)\n return str;\n else\n return this.genRndStr();\n };\n // Returns a `Link` (hard link) referenced by path \"split\" into steps.\n Volume.prototype.getLink = function (steps) {\n return this.root.walk(steps);\n };\n // Just link `getLink`, but throws a correct user error, if link to found.\n Volume.prototype.getLinkOrThrow = function (filename, funcName) {\n var steps = filenameToSteps(filename);\n var link = this.getLink(steps);\n if (!link)\n throw createError(ENOENT, funcName, filename);\n return link;\n };\n // Just like `getLink`, but also dereference/resolves symbolic links.\n Volume.prototype.getResolvedLink = function (filenameOrSteps) {\n var steps = typeof filenameOrSteps === 'string' ? filenameToSteps(filenameOrSteps) : filenameOrSteps;\n var link = this.root;\n var i = 0;\n while (i < steps.length) {\n var step = steps[i];\n link = link.getChild(step);\n if (!link)\n return null;\n var node = link.getNode();\n if (node.isSymlink()) {\n steps = node.symlink.concat(steps.slice(i + 1));\n link = this.root;\n i = 0;\n continue;\n }\n i++;\n }\n return link;\n };\n // Just like `getLinkOrThrow`, but also dereference/resolves symbolic links.\n Volume.prototype.getResolvedLinkOrThrow = function (filename, funcName) {\n var link = this.getResolvedLink(filename);\n if (!link)\n throw createError(ENOENT, funcName, filename);\n return link;\n };\n Volume.prototype.resolveSymlinks = function (link) {\n // let node: Node = link.getNode();\n // while(link && node.isSymlink()) {\n // link = this.getLink(node.symlink);\n // if(!link) return null;\n // node = link.getNode();\n // }\n // return link;\n return this.getResolvedLink(link.steps.slice(1));\n };\n // Just like `getLinkOrThrow`, but also verifies that the link is a directory.\n Volume.prototype.getLinkAsDirOrThrow = function (filename, funcName) {\n var link = this.getLinkOrThrow(filename, funcName);\n if (!link.getNode().isDirectory())\n throw createError(ENOTDIR, funcName, filename);\n return link;\n };\n // Get the immediate parent directory of the link.\n Volume.prototype.getLinkParent = function (steps) {\n return this.root.walk(steps, steps.length - 1);\n };\n Volume.prototype.getLinkParentAsDirOrThrow = function (filenameOrSteps, funcName) {\n var steps = filenameOrSteps instanceof Array ? filenameOrSteps : filenameToSteps(filenameOrSteps);\n var link = this.getLinkParent(steps);\n if (!link)\n throw createError(ENOENT, funcName, sep + steps.join(sep));\n if (!link.getNode().isDirectory())\n throw createError(ENOTDIR, funcName, sep + steps.join(sep));\n return link;\n };\n Volume.prototype.getFileByFd = function (fd) {\n return this.fds[String(fd)];\n };\n Volume.prototype.getFileByFdOrThrow = function (fd, funcName) {\n if (!isFd(fd))\n throw TypeError(ERRSTR.FD);\n var file = this.getFileByFd(fd);\n if (!file)\n throw createError(EBADF, funcName);\n return file;\n };\n Volume.prototype.getNodeByIdOrCreate = function (id, flags, perm) {\n if (typeof id === 'number') {\n var file = this.getFileByFd(id);\n if (!file)\n throw Error('File nto found');\n return file.node;\n }\n else {\n var steps = pathToSteps(id);\n var link = this.getLink(steps);\n if (link)\n return link.getNode();\n // Try creating a node if not found.\n if (flags & O_CREAT) {\n var dirLink = this.getLinkParent(steps);\n if (dirLink) {\n var name_1 = steps[steps.length - 1];\n link = this.createLink(dirLink, name_1, false, perm);\n return link.getNode();\n }\n }\n throw createError(ENOENT, 'getNodeByIdOrCreate', pathToFilename(id));\n }\n };\n Volume.prototype.wrapAsync = function (method, args, callback) {\n var _this = this;\n validateCallback(callback);\n setImmediate_1.default(function () {\n try {\n callback(null, method.apply(_this, args));\n }\n catch (err) {\n callback(err);\n }\n });\n };\n Volume.prototype._toJSON = function (link, json, path) {\n var _a;\n if (link === void 0) { link = this.root; }\n if (json === void 0) { json = {}; }\n var isEmpty = true;\n var children = link.children;\n if (link.getNode().isFile()) {\n children = (_a = {}, _a[link.getName()] = link.parent.getChild(link.getName()), _a);\n link = link.parent;\n }\n for (var name_2 in children) {\n isEmpty = false;\n var child = link.getChild(name_2);\n if (!child) {\n throw new Error('_toJSON: unexpected undefined');\n }\n var node = child.getNode();\n if (node.isFile()) {\n var filename = child.getPath();\n if (path)\n filename = relative(path, filename);\n json[filename] = node.getString();\n }\n else if (node.isDirectory()) {\n this._toJSON(child, json, path);\n }\n }\n var dirPath = link.getPath();\n if (path)\n dirPath = relative(path, dirPath);\n if (dirPath && isEmpty) {\n json[dirPath] = null;\n }\n return json;\n };\n Volume.prototype.toJSON = function (paths, json, isRelative) {\n if (json === void 0) { json = {}; }\n if (isRelative === void 0) { isRelative = false; }\n var links = [];\n if (paths) {\n if (!(paths instanceof Array))\n paths = [paths];\n for (var _i = 0, paths_1 = paths; _i < paths_1.length; _i++) {\n var path = paths_1[_i];\n var filename = pathToFilename(path);\n var link = this.getResolvedLink(filename);\n if (!link)\n continue;\n links.push(link);\n }\n }\n else {\n links.push(this.root);\n }\n if (!links.length)\n return json;\n for (var _a = 0, links_1 = links; _a < links_1.length; _a++) {\n var link = links_1[_a];\n this._toJSON(link, json, isRelative ? link.getPath() : '');\n }\n return json;\n };\n Volume.prototype.fromJSON = function (json, cwd) {\n if (cwd === void 0) { cwd = process_1.default.cwd(); }\n for (var filename in json) {\n var data = json[filename];\n filename = resolve(filename, cwd);\n if (typeof data === 'string') {\n var dir = dirname(filename);\n this.mkdirpBase(dir, 511 /* DIR */);\n this.writeFileSync(filename, data);\n }\n else {\n this.mkdirpBase(filename, 511 /* DIR */);\n }\n }\n };\n Volume.prototype.fromNestedJSON = function (json, cwd) {\n this.fromJSON(flattenJSON(json), cwd);\n };\n Volume.prototype.reset = function () {\n this.ino = 0;\n this.inodes = {};\n this.releasedInos = [];\n this.fds = {};\n this.releasedFds = [];\n this.openFiles = 0;\n this.root = this.createLink();\n this.root.setNode(this.createNode(true));\n };\n // Legacy interface\n Volume.prototype.mountSync = function (mountpoint, json) {\n this.fromJSON(json, mountpoint);\n };\n Volume.prototype.openLink = function (link, flagsNum, resolveSymlinks) {\n if (resolveSymlinks === void 0) { resolveSymlinks = true; }\n if (this.openFiles >= this.maxFiles) {\n // Too many open files.\n throw createError(EMFILE, 'open', link.getPath());\n }\n // Resolve symlinks.\n var realLink = link;\n if (resolveSymlinks)\n realLink = this.resolveSymlinks(link);\n if (!realLink)\n throw createError(ENOENT, 'open', link.getPath());\n var node = realLink.getNode();\n // Check whether node is a directory\n if (node.isDirectory()) {\n if ((flagsNum & (O_RDONLY | O_RDWR | O_WRONLY)) !== O_RDONLY)\n throw createError(EISDIR, 'open', link.getPath());\n }\n else {\n if (flagsNum & O_DIRECTORY)\n throw createError(ENOTDIR, 'open', link.getPath());\n }\n // Check node permissions\n if (!(flagsNum & O_WRONLY)) {\n if (!node.canRead()) {\n throw createError(EACCES, 'open', link.getPath());\n }\n }\n if (flagsNum & O_RDWR) {\n }\n var file = new this.props.File(link, node, flagsNum, this.newFdNumber());\n this.fds[file.fd] = file;\n this.openFiles++;\n if (flagsNum & O_TRUNC)\n file.truncate();\n return file;\n };\n Volume.prototype.openFile = function (filename, flagsNum, modeNum, resolveSymlinks) {\n if (resolveSymlinks === void 0) { resolveSymlinks = true; }\n var steps = filenameToSteps(filename);\n var link = resolveSymlinks ? this.getResolvedLink(steps) : this.getLink(steps);\n // Try creating a new file, if it does not exist.\n if (!link && flagsNum & O_CREAT) {\n // const dirLink: Link = this.getLinkParent(steps);\n var dirLink = this.getResolvedLink(steps.slice(0, steps.length - 1));\n // if(!dirLink) throw createError(ENOENT, 'open', filename);\n if (!dirLink)\n throw createError(ENOENT, 'open', sep + steps.join(sep));\n if (flagsNum & O_CREAT && typeof modeNum === 'number') {\n link = this.createLink(dirLink, steps[steps.length - 1], false, modeNum);\n }\n }\n if (link)\n return this.openLink(link, flagsNum, resolveSymlinks);\n throw createError(ENOENT, 'open', filename);\n };\n Volume.prototype.openBase = function (filename, flagsNum, modeNum, resolveSymlinks) {\n if (resolveSymlinks === void 0) { resolveSymlinks = true; }\n var file = this.openFile(filename, flagsNum, modeNum, resolveSymlinks);\n if (!file)\n throw createError(ENOENT, 'open', filename);\n return file.fd;\n };\n Volume.prototype.openSync = function (path, flags, mode) {\n if (mode === void 0) { mode = 438 /* DEFAULT */; }\n // Validate (1) mode; (2) path; (3) flags - in that order.\n var modeNum = modeToNumber(mode);\n var fileName = pathToFilename(path);\n var flagsNum = flagsToNumber(flags);\n return this.openBase(fileName, flagsNum, modeNum);\n };\n Volume.prototype.open = function (path, flags, a, b) {\n var mode = a;\n var callback = b;\n if (typeof a === 'function') {\n mode = 438 /* DEFAULT */;\n callback = a;\n }\n mode = mode || 438 /* DEFAULT */;\n var modeNum = modeToNumber(mode);\n var fileName = pathToFilename(path);\n var flagsNum = flagsToNumber(flags);\n this.wrapAsync(this.openBase, [fileName, flagsNum, modeNum], callback);\n };\n Volume.prototype.closeFile = function (file) {\n if (!this.fds[file.fd])\n return;\n this.openFiles--;\n delete this.fds[file.fd];\n this.releasedFds.push(file.fd);\n };\n Volume.prototype.closeSync = function (fd) {\n validateFd(fd);\n var file = this.getFileByFdOrThrow(fd, 'close');\n this.closeFile(file);\n };\n Volume.prototype.close = function (fd, callback) {\n validateFd(fd);\n this.wrapAsync(this.closeSync, [fd], callback);\n };\n Volume.prototype.openFileOrGetById = function (id, flagsNum, modeNum) {\n if (typeof id === 'number') {\n var file = this.fds[id];\n if (!file)\n throw createError(ENOENT);\n return file;\n }\n else {\n return this.openFile(pathToFilename(id), flagsNum, modeNum);\n }\n };\n Volume.prototype.readBase = function (fd, buffer, offset, length, position) {\n var file = this.getFileByFdOrThrow(fd);\n return file.read(buffer, Number(offset), Number(length), position);\n };\n Volume.prototype.readSync = function (fd, buffer, offset, length, position) {\n validateFd(fd);\n return this.readBase(fd, buffer, offset, length, position);\n };\n Volume.prototype.read = function (fd, buffer, offset, length, position, callback) {\n var _this = this;\n validateCallback(callback);\n // This `if` branch is from Node.js\n if (length === 0) {\n return process_1.default.nextTick(function () {\n if (callback)\n callback(null, 0, buffer);\n });\n }\n setImmediate_1.default(function () {\n try {\n var bytes = _this.readBase(fd, buffer, offset, length, position);\n callback(null, bytes, buffer);\n }\n catch (err) {\n callback(err);\n }\n });\n };\n Volume.prototype.readFileBase = function (id, flagsNum, encoding) {\n var result;\n var isUserFd = typeof id === 'number';\n var userOwnsFd = isUserFd && isFd(id);\n var fd;\n if (userOwnsFd)\n fd = id;\n else {\n var filename = pathToFilename(id);\n var steps = filenameToSteps(filename);\n var link = this.getResolvedLink(steps);\n if (link) {\n var node = link.getNode();\n if (node.isDirectory())\n throw createError(EISDIR, 'open', link.getPath());\n }\n fd = this.openSync(id, flagsNum);\n }\n try {\n result = bufferToEncoding(this.getFileByFdOrThrow(fd).getBuffer(), encoding);\n }\n finally {\n if (!userOwnsFd) {\n this.closeSync(fd);\n }\n }\n return result;\n };\n Volume.prototype.readFileSync = function (file, options) {\n var opts = getReadFileOptions(options);\n var flagsNum = flagsToNumber(opts.flag);\n return this.readFileBase(file, flagsNum, opts.encoding);\n };\n Volume.prototype.readFile = function (id, a, b) {\n var _a = optsAndCbGenerator(getReadFileOptions)(a, b), opts = _a[0], callback = _a[1];\n var flagsNum = flagsToNumber(opts.flag);\n this.wrapAsync(this.readFileBase, [id, flagsNum, opts.encoding], callback);\n };\n Volume.prototype.writeBase = function (fd, buf, offset, length, position) {\n var file = this.getFileByFdOrThrow(fd, 'write');\n return file.write(buf, offset, length, position);\n };\n Volume.prototype.writeSync = function (fd, a, b, c, d) {\n validateFd(fd);\n var encoding;\n var offset;\n var length;\n var position;\n var isBuffer = typeof a !== 'string';\n if (isBuffer) {\n offset = (b || 0) | 0;\n length = c;\n position = d;\n }\n else {\n position = b;\n encoding = c;\n }\n var buf = dataToBuffer(a, encoding);\n if (isBuffer) {\n if (typeof length === 'undefined') {\n length = buf.length;\n }\n }\n else {\n offset = 0;\n length = buf.length;\n }\n return this.writeBase(fd, buf, offset, length, position);\n };\n Volume.prototype.write = function (fd, a, b, c, d, e) {\n var _this = this;\n validateFd(fd);\n var offset;\n var length;\n var position;\n var encoding;\n var callback;\n var tipa = typeof a;\n var tipb = typeof b;\n var tipc = typeof c;\n var tipd = typeof d;\n if (tipa !== 'string') {\n if (tipb === 'function') {\n callback = b;\n }\n else if (tipc === 'function') {\n offset = b | 0;\n callback = c;\n }\n else if (tipd === 'function') {\n offset = b | 0;\n length = c;\n callback = d;\n }\n else {\n offset = b | 0;\n length = c;\n position = d;\n callback = e;\n }\n }\n else {\n if (tipb === 'function') {\n callback = b;\n }\n else if (tipc === 'function') {\n position = b;\n callback = c;\n }\n else if (tipd === 'function') {\n position = b;\n encoding = c;\n callback = d;\n }\n }\n var buf = dataToBuffer(a, encoding);\n if (tipa !== 'string') {\n if (typeof length === 'undefined')\n length = buf.length;\n }\n else {\n offset = 0;\n length = buf.length;\n }\n var cb = validateCallback(callback);\n setImmediate_1.default(function () {\n try {\n var bytes = _this.writeBase(fd, buf, offset, length, position);\n if (tipa !== 'string') {\n cb(null, bytes, buf);\n }\n else {\n cb(null, bytes, a);\n }\n }\n catch (err) {\n cb(err);\n }\n });\n };\n Volume.prototype.writeFileBase = function (id, buf, flagsNum, modeNum) {\n // console.log('writeFileBase', id, buf, flagsNum, modeNum);\n // const node = this.getNodeByIdOrCreate(id, flagsNum, modeNum);\n // node.setBuffer(buf);\n var isUserFd = typeof id === 'number';\n var fd;\n if (isUserFd)\n fd = id;\n else {\n fd = this.openBase(pathToFilename(id), flagsNum, modeNum);\n // fd = this.openSync(id as PathLike, flagsNum, modeNum);\n }\n var offset = 0;\n var length = buf.length;\n var position = flagsNum & O_APPEND ? undefined : 0;\n try {\n while (length > 0) {\n var written = this.writeSync(fd, buf, offset, length, position);\n offset += written;\n length -= written;\n if (position !== undefined)\n position += written;\n }\n }\n finally {\n if (!isUserFd)\n this.closeSync(fd);\n }\n };\n Volume.prototype.writeFileSync = function (id, data, options) {\n var opts = getWriteFileOptions(options);\n var flagsNum = flagsToNumber(opts.flag);\n var modeNum = modeToNumber(opts.mode);\n var buf = dataToBuffer(data, opts.encoding);\n this.writeFileBase(id, buf, flagsNum, modeNum);\n };\n Volume.prototype.writeFile = function (id, data, a, b) {\n var options = a;\n var callback = b;\n if (typeof a === 'function') {\n options = writeFileDefaults;\n callback = a;\n }\n var cb = validateCallback(callback);\n var opts = getWriteFileOptions(options);\n var flagsNum = flagsToNumber(opts.flag);\n var modeNum = modeToNumber(opts.mode);\n var buf = dataToBuffer(data, opts.encoding);\n this.wrapAsync(this.writeFileBase, [id, buf, flagsNum, modeNum], cb);\n };\n Volume.prototype.linkBase = function (filename1, filename2) {\n var steps1 = filenameToSteps(filename1);\n var link1 = this.getLink(steps1);\n if (!link1)\n throw createError(ENOENT, 'link', filename1, filename2);\n var steps2 = filenameToSteps(filename2);\n // Check new link directory exists.\n var dir2 = this.getLinkParent(steps2);\n if (!dir2)\n throw createError(ENOENT, 'link', filename1, filename2);\n var name = steps2[steps2.length - 1];\n // Check if new file already exists.\n if (dir2.getChild(name))\n throw createError(EEXIST, 'link', filename1, filename2);\n var node = link1.getNode();\n node.nlink++;\n dir2.createChild(name, node);\n };\n Volume.prototype.copyFileBase = function (src, dest, flags) {\n var buf = this.readFileSync(src);\n if (flags & COPYFILE_EXCL) {\n if (this.existsSync(dest)) {\n throw createError(EEXIST, 'copyFile', src, dest);\n }\n }\n if (flags & COPYFILE_FICLONE_FORCE) {\n throw createError(ENOSYS, 'copyFile', src, dest);\n }\n this.writeFileBase(dest, buf, FLAGS.w, 438 /* DEFAULT */);\n };\n Volume.prototype.copyFileSync = function (src, dest, flags) {\n var srcFilename = pathToFilename(src);\n var destFilename = pathToFilename(dest);\n return this.copyFileBase(srcFilename, destFilename, (flags || 0) | 0);\n };\n Volume.prototype.copyFile = function (src, dest, a, b) {\n var srcFilename = pathToFilename(src);\n var destFilename = pathToFilename(dest);\n var flags;\n var callback;\n if (typeof a === 'function') {\n flags = 0;\n callback = a;\n }\n else {\n flags = a;\n callback = b;\n }\n validateCallback(callback);\n this.wrapAsync(this.copyFileBase, [srcFilename, destFilename, flags], callback);\n };\n Volume.prototype.linkSync = function (existingPath, newPath) {\n var existingPathFilename = pathToFilename(existingPath);\n var newPathFilename = pathToFilename(newPath);\n this.linkBase(existingPathFilename, newPathFilename);\n };\n Volume.prototype.link = function (existingPath, newPath, callback) {\n var existingPathFilename = pathToFilename(existingPath);\n var newPathFilename = pathToFilename(newPath);\n this.wrapAsync(this.linkBase, [existingPathFilename, newPathFilename], callback);\n };\n Volume.prototype.unlinkBase = function (filename) {\n var steps = filenameToSteps(filename);\n var link = this.getLink(steps);\n if (!link)\n throw createError(ENOENT, 'unlink', filename);\n // TODO: Check if it is file, dir, other...\n if (link.length)\n throw Error('Dir not empty...');\n this.deleteLink(link);\n var node = link.getNode();\n node.nlink--;\n // When all hard links to i-node are deleted, remove the i-node, too.\n if (node.nlink <= 0) {\n this.deleteNode(node);\n }\n };\n Volume.prototype.unlinkSync = function (path) {\n var filename = pathToFilename(path);\n this.unlinkBase(filename);\n };\n Volume.prototype.unlink = function (path, callback) {\n var filename = pathToFilename(path);\n this.wrapAsync(this.unlinkBase, [filename], callback);\n };\n Volume.prototype.symlinkBase = function (targetFilename, pathFilename) {\n var pathSteps = filenameToSteps(pathFilename);\n // Check if directory exists, where we about to create a symlink.\n var dirLink = this.getLinkParent(pathSteps);\n if (!dirLink)\n throw createError(ENOENT, 'symlink', targetFilename, pathFilename);\n var name = pathSteps[pathSteps.length - 1];\n // Check if new file already exists.\n if (dirLink.getChild(name))\n throw createError(EEXIST, 'symlink', targetFilename, pathFilename);\n // Create symlink.\n var symlink = dirLink.createChild(name);\n symlink.getNode().makeSymlink(filenameToSteps(targetFilename));\n return symlink;\n };\n // `type` argument works only on Windows.\n Volume.prototype.symlinkSync = function (target, path, type) {\n var targetFilename = pathToFilename(target);\n var pathFilename = pathToFilename(path);\n this.symlinkBase(targetFilename, pathFilename);\n };\n Volume.prototype.symlink = function (target, path, a, b) {\n var callback = validateCallback(typeof a === 'function' ? a : b);\n var targetFilename = pathToFilename(target);\n var pathFilename = pathToFilename(path);\n this.wrapAsync(this.symlinkBase, [targetFilename, pathFilename], callback);\n };\n Volume.prototype.realpathBase = function (filename, encoding) {\n var steps = filenameToSteps(filename);\n var realLink = this.getResolvedLink(steps);\n if (!realLink)\n throw createError(ENOENT, 'realpath', filename);\n return encoding_1.strToEncoding(realLink.getPath(), encoding);\n };\n Volume.prototype.realpathSync = function (path, options) {\n return this.realpathBase(pathToFilename(path), getRealpathOptions(options).encoding);\n };\n Volume.prototype.realpath = function (path, a, b) {\n var _a = getRealpathOptsAndCb(a, b), opts = _a[0], callback = _a[1];\n var pathFilename = pathToFilename(path);\n this.wrapAsync(this.realpathBase, [pathFilename, opts.encoding], callback);\n };\n Volume.prototype.lstatBase = function (filename, bigint) {\n if (bigint === void 0) { bigint = false; }\n var link = this.getLink(filenameToSteps(filename));\n if (!link)\n throw createError(ENOENT, 'lstat', filename);\n return Stats_1.default.build(link.getNode(), bigint);\n };\n Volume.prototype.lstatSync = function (path, options) {\n return this.lstatBase(pathToFilename(path), getStatOptions(options).bigint);\n };\n Volume.prototype.lstat = function (path, a, b) {\n var _a = getStatOptsAndCb(a, b), opts = _a[0], callback = _a[1];\n this.wrapAsync(this.lstatBase, [pathToFilename(path), opts.bigint], callback);\n };\n Volume.prototype.statBase = function (filename, bigint) {\n if (bigint === void 0) { bigint = false; }\n var link = this.getResolvedLink(filenameToSteps(filename));\n if (!link)\n throw createError(ENOENT, 'stat', filename);\n return Stats_1.default.build(link.getNode(), bigint);\n };\n Volume.prototype.statSync = function (path, options) {\n return this.statBase(pathToFilename(path), getStatOptions(options).bigint);\n };\n Volume.prototype.stat = function (path, a, b) {\n var _a = getStatOptsAndCb(a, b), opts = _a[0], callback = _a[1];\n this.wrapAsync(this.statBase, [pathToFilename(path), opts.bigint], callback);\n };\n Volume.prototype.fstatBase = function (fd, bigint) {\n if (bigint === void 0) { bigint = false; }\n var file = this.getFileByFd(fd);\n if (!file)\n throw createError(EBADF, 'fstat');\n return Stats_1.default.build(file.node, bigint);\n };\n Volume.prototype.fstatSync = function (fd, options) {\n return this.fstatBase(fd, getStatOptions(options).bigint);\n };\n Volume.prototype.fstat = function (fd, a, b) {\n var _a = getStatOptsAndCb(a, b), opts = _a[0], callback = _a[1];\n this.wrapAsync(this.fstatBase, [fd, opts.bigint], callback);\n };\n Volume.prototype.renameBase = function (oldPathFilename, newPathFilename) {\n var link = this.getLink(filenameToSteps(oldPathFilename));\n if (!link)\n throw createError(ENOENT, 'rename', oldPathFilename, newPathFilename);\n // TODO: Check if it is directory, if non-empty, we cannot move it, right?\n var newPathSteps = filenameToSteps(newPathFilename);\n // Check directory exists for the new location.\n var newPathDirLink = this.getLinkParent(newPathSteps);\n if (!newPathDirLink)\n throw createError(ENOENT, 'rename', oldPathFilename, newPathFilename);\n // TODO: Also treat cases with directories and symbolic links.\n // TODO: See: http://man7.org/linux/man-pages/man2/rename.2.html\n // Remove hard link from old folder.\n var oldLinkParent = link.parent;\n if (oldLinkParent) {\n oldLinkParent.deleteChild(link);\n }\n // Rename should overwrite the new path, if that exists.\n var name = newPathSteps[newPathSteps.length - 1];\n link.steps = __spreadArray(__spreadArray([], newPathDirLink.steps), [name]);\n newPathDirLink.setChild(link.getName(), link);\n };\n Volume.prototype.renameSync = function (oldPath, newPath) {\n var oldPathFilename = pathToFilename(oldPath);\n var newPathFilename = pathToFilename(newPath);\n this.renameBase(oldPathFilename, newPathFilename);\n };\n Volume.prototype.rename = function (oldPath, newPath, callback) {\n var oldPathFilename = pathToFilename(oldPath);\n var newPathFilename = pathToFilename(newPath);\n this.wrapAsync(this.renameBase, [oldPathFilename, newPathFilename], callback);\n };\n Volume.prototype.existsBase = function (filename) {\n return !!this.statBase(filename);\n };\n Volume.prototype.existsSync = function (path) {\n try {\n return this.existsBase(pathToFilename(path));\n }\n catch (err) {\n return false;\n }\n };\n Volume.prototype.exists = function (path, callback) {\n var _this = this;\n var filename = pathToFilename(path);\n if (typeof callback !== 'function')\n throw Error(ERRSTR.CB);\n setImmediate_1.default(function () {\n try {\n callback(_this.existsBase(filename));\n }\n catch (err) {\n callback(false);\n }\n });\n };\n Volume.prototype.accessBase = function (filename, mode) {\n var link = this.getLinkOrThrow(filename, 'access');\n // TODO: Verify permissions\n };\n Volume.prototype.accessSync = function (path, mode) {\n if (mode === void 0) { mode = F_OK; }\n var filename = pathToFilename(path);\n mode = mode | 0;\n this.accessBase(filename, mode);\n };\n Volume.prototype.access = function (path, a, b) {\n var mode = F_OK;\n var callback;\n if (typeof a !== 'function') {\n mode = a | 0; // cast to number\n callback = validateCallback(b);\n }\n else {\n callback = a;\n }\n var filename = pathToFilename(path);\n this.wrapAsync(this.accessBase, [filename, mode], callback);\n };\n Volume.prototype.appendFileSync = function (id, data, options) {\n if (options === void 0) { options = appendFileDefaults; }\n var opts = getAppendFileOpts(options);\n // force append behavior when using a supplied file descriptor\n if (!opts.flag || isFd(id))\n opts.flag = 'a';\n this.writeFileSync(id, data, opts);\n };\n Volume.prototype.appendFile = function (id, data, a, b) {\n var _a = getAppendFileOptsAndCb(a, b), opts = _a[0], callback = _a[1];\n // force append behavior when using a supplied file descriptor\n if (!opts.flag || isFd(id))\n opts.flag = 'a';\n this.writeFile(id, data, opts, callback);\n };\n Volume.prototype.readdirBase = function (filename, options) {\n var steps = filenameToSteps(filename);\n var link = this.getResolvedLink(steps);\n if (!link)\n throw createError(ENOENT, 'readdir', filename);\n var node = link.getNode();\n if (!node.isDirectory())\n throw createError(ENOTDIR, 'scandir', filename);\n if (options.withFileTypes) {\n var list_1 = [];\n for (var name_3 in link.children) {\n var child = link.getChild(name_3);\n if (!child) {\n continue;\n }\n list_1.push(Dirent_1.default.build(child, options.encoding));\n }\n if (!isWin && options.encoding !== 'buffer')\n list_1.sort(function (a, b) {\n if (a.name < b.name)\n return -1;\n if (a.name > b.name)\n return 1;\n return 0;\n });\n return list_1;\n }\n var list = [];\n for (var name_4 in link.children) {\n list.push(encoding_1.strToEncoding(name_4, options.encoding));\n }\n if (!isWin && options.encoding !== 'buffer')\n list.sort();\n return list;\n };\n Volume.prototype.readdirSync = function (path, options) {\n var opts = getReaddirOptions(options);\n var filename = pathToFilename(path);\n return this.readdirBase(filename, opts);\n };\n Volume.prototype.readdir = function (path, a, b) {\n var _a = getReaddirOptsAndCb(a, b), options = _a[0], callback = _a[1];\n var filename = pathToFilename(path);\n this.wrapAsync(this.readdirBase, [filename, options], callback);\n };\n Volume.prototype.readlinkBase = function (filename, encoding) {\n var link = this.getLinkOrThrow(filename, 'readlink');\n var node = link.getNode();\n if (!node.isSymlink())\n throw createError(EINVAL, 'readlink', filename);\n var str = sep + node.symlink.join(sep);\n return encoding_1.strToEncoding(str, encoding);\n };\n Volume.prototype.readlinkSync = function (path, options) {\n var opts = getDefaultOpts(options);\n var filename = pathToFilename(path);\n return this.readlinkBase(filename, opts.encoding);\n };\n Volume.prototype.readlink = function (path, a, b) {\n var _a = getDefaultOptsAndCb(a, b), opts = _a[0], callback = _a[1];\n var filename = pathToFilename(path);\n this.wrapAsync(this.readlinkBase, [filename, opts.encoding], callback);\n };\n Volume.prototype.fsyncBase = function (fd) {\n this.getFileByFdOrThrow(fd, 'fsync');\n };\n Volume.prototype.fsyncSync = function (fd) {\n this.fsyncBase(fd);\n };\n Volume.prototype.fsync = function (fd, callback) {\n this.wrapAsync(this.fsyncBase, [fd], callback);\n };\n Volume.prototype.fdatasyncBase = function (fd) {\n this.getFileByFdOrThrow(fd, 'fdatasync');\n };\n Volume.prototype.fdatasyncSync = function (fd) {\n this.fdatasyncBase(fd);\n };\n Volume.prototype.fdatasync = function (fd, callback) {\n this.wrapAsync(this.fdatasyncBase, [fd], callback);\n };\n Volume.prototype.ftruncateBase = function (fd, len) {\n var file = this.getFileByFdOrThrow(fd, 'ftruncate');\n file.truncate(len);\n };\n Volume.prototype.ftruncateSync = function (fd, len) {\n this.ftruncateBase(fd, len);\n };\n Volume.prototype.ftruncate = function (fd, a, b) {\n var len = typeof a === 'number' ? a : 0;\n var callback = validateCallback(typeof a === 'number' ? b : a);\n this.wrapAsync(this.ftruncateBase, [fd, len], callback);\n };\n Volume.prototype.truncateBase = function (path, len) {\n var fd = this.openSync(path, 'r+');\n try {\n this.ftruncateSync(fd, len);\n }\n finally {\n this.closeSync(fd);\n }\n };\n Volume.prototype.truncateSync = function (id, len) {\n if (isFd(id))\n return this.ftruncateSync(id, len);\n this.truncateBase(id, len);\n };\n Volume.prototype.truncate = function (id, a, b) {\n var len = typeof a === 'number' ? a : 0;\n var callback = validateCallback(typeof a === 'number' ? b : a);\n if (isFd(id))\n return this.ftruncate(id, len, callback);\n this.wrapAsync(this.truncateBase, [id, len], callback);\n };\n Volume.prototype.futimesBase = function (fd, atime, mtime) {\n var file = this.getFileByFdOrThrow(fd, 'futimes');\n var node = file.node;\n node.atime = new Date(atime * 1000);\n node.mtime = new Date(mtime * 1000);\n };\n Volume.prototype.futimesSync = function (fd, atime, mtime) {\n this.futimesBase(fd, toUnixTimestamp(atime), toUnixTimestamp(mtime));\n };\n Volume.prototype.futimes = function (fd, atime, mtime, callback) {\n this.wrapAsync(this.futimesBase, [fd, toUnixTimestamp(atime), toUnixTimestamp(mtime)], callback);\n };\n Volume.prototype.utimesBase = function (filename, atime, mtime) {\n var fd = this.openSync(filename, 'r+');\n try {\n this.futimesBase(fd, atime, mtime);\n }\n finally {\n this.closeSync(fd);\n }\n };\n Volume.prototype.utimesSync = function (path, atime, mtime) {\n this.utimesBase(pathToFilename(path), toUnixTimestamp(atime), toUnixTimestamp(mtime));\n };\n Volume.prototype.utimes = function (path, atime, mtime, callback) {\n this.wrapAsync(this.utimesBase, [pathToFilename(path), toUnixTimestamp(atime), toUnixTimestamp(mtime)], callback);\n };\n Volume.prototype.mkdirBase = function (filename, modeNum) {\n var steps = filenameToSteps(filename);\n // This will throw if user tries to create root dir `fs.mkdirSync('/')`.\n if (!steps.length) {\n throw createError(EEXIST, 'mkdir', filename);\n }\n var dir = this.getLinkParentAsDirOrThrow(filename, 'mkdir');\n // Check path already exists.\n var name = steps[steps.length - 1];\n if (dir.getChild(name))\n throw createError(EEXIST, 'mkdir', filename);\n dir.createChild(name, this.createNode(true, modeNum));\n };\n /**\n * Creates directory tree recursively.\n * @param filename\n * @param modeNum\n */\n Volume.prototype.mkdirpBase = function (filename, modeNum) {\n var steps = filenameToSteps(filename);\n var link = this.root;\n for (var i = 0; i < steps.length; i++) {\n var step = steps[i];\n if (!link.getNode().isDirectory())\n throw createError(ENOTDIR, 'mkdir', link.getPath());\n var child = link.getChild(step);\n if (child) {\n if (child.getNode().isDirectory())\n link = child;\n else\n throw createError(ENOTDIR, 'mkdir', child.getPath());\n }\n else {\n link = link.createChild(step, this.createNode(true, modeNum));\n }\n }\n };\n Volume.prototype.mkdirSync = function (path, options) {\n var opts = getMkdirOptions(options);\n var modeNum = modeToNumber(opts.mode, 511);\n var filename = pathToFilename(path);\n if (opts.recursive)\n this.mkdirpBase(filename, modeNum);\n else\n this.mkdirBase(filename, modeNum);\n };\n Volume.prototype.mkdir = function (path, a, b) {\n var opts = getMkdirOptions(a);\n var callback = validateCallback(typeof a === 'function' ? a : b);\n var modeNum = modeToNumber(opts.mode, 511);\n var filename = pathToFilename(path);\n if (opts.recursive)\n this.wrapAsync(this.mkdirpBase, [filename, modeNum], callback);\n else\n this.wrapAsync(this.mkdirBase, [filename, modeNum], callback);\n };\n // legacy interface\n Volume.prototype.mkdirpSync = function (path, mode) {\n this.mkdirSync(path, { mode: mode, recursive: true });\n };\n Volume.prototype.mkdirp = function (path, a, b) {\n var mode = typeof a === 'function' ? undefined : a;\n var callback = validateCallback(typeof a === 'function' ? a : b);\n this.mkdir(path, { mode: mode, recursive: true }, callback);\n };\n Volume.prototype.mkdtempBase = function (prefix, encoding, retry) {\n if (retry === void 0) { retry = 5; }\n var filename = prefix + this.genRndStr();\n try {\n this.mkdirBase(filename, 511 /* DIR */);\n return encoding_1.strToEncoding(filename, encoding);\n }\n catch (err) {\n if (err.code === EEXIST) {\n if (retry > 1)\n return this.mkdtempBase(prefix, encoding, retry - 1);\n else\n throw Error('Could not create temp dir.');\n }\n else\n throw err;\n }\n };\n Volume.prototype.mkdtempSync = function (prefix, options) {\n var encoding = getDefaultOpts(options).encoding;\n if (!prefix || typeof prefix !== 'string')\n throw new TypeError('filename prefix is required');\n nullCheck(prefix);\n return this.mkdtempBase(prefix, encoding);\n };\n Volume.prototype.mkdtemp = function (prefix, a, b) {\n var _a = getDefaultOptsAndCb(a, b), encoding = _a[0].encoding, callback = _a[1];\n if (!prefix || typeof prefix !== 'string')\n throw new TypeError('filename prefix is required');\n if (!nullCheck(prefix))\n return;\n this.wrapAsync(this.mkdtempBase, [prefix, encoding], callback);\n };\n Volume.prototype.rmdirBase = function (filename, options) {\n var opts = getRmdirOptions(options);\n var link = this.getLinkAsDirOrThrow(filename, 'rmdir');\n // Check directory is empty.\n if (link.length && !opts.recursive)\n throw createError(ENOTEMPTY, 'rmdir', filename);\n this.deleteLink(link);\n };\n Volume.prototype.rmdirSync = function (path, options) {\n this.rmdirBase(pathToFilename(path), options);\n };\n Volume.prototype.rmdir = function (path, a, b) {\n var opts = getRmdirOptions(a);\n var callback = validateCallback(typeof a === 'function' ? a : b);\n this.wrapAsync(this.rmdirBase, [pathToFilename(path), opts], callback);\n };\n Volume.prototype.fchmodBase = function (fd, modeNum) {\n var file = this.getFileByFdOrThrow(fd, 'fchmod');\n file.chmod(modeNum);\n };\n Volume.prototype.fchmodSync = function (fd, mode) {\n this.fchmodBase(fd, modeToNumber(mode));\n };\n Volume.prototype.fchmod = function (fd, mode, callback) {\n this.wrapAsync(this.fchmodBase, [fd, modeToNumber(mode)], callback);\n };\n Volume.prototype.chmodBase = function (filename, modeNum) {\n var fd = this.openSync(filename, 'r+');\n try {\n this.fchmodBase(fd, modeNum);\n }\n finally {\n this.closeSync(fd);\n }\n };\n Volume.prototype.chmodSync = function (path, mode) {\n var modeNum = modeToNumber(mode);\n var filename = pathToFilename(path);\n this.chmodBase(filename, modeNum);\n };\n Volume.prototype.chmod = function (path, mode, callback) {\n var modeNum = modeToNumber(mode);\n var filename = pathToFilename(path);\n this.wrapAsync(this.chmodBase, [filename, modeNum], callback);\n };\n Volume.prototype.lchmodBase = function (filename, modeNum) {\n var fd = this.openBase(filename, O_RDWR, 0, false);\n try {\n this.fchmodBase(fd, modeNum);\n }\n finally {\n this.closeSync(fd);\n }\n };\n Volume.prototype.lchmodSync = function (path, mode) {\n var modeNum = modeToNumber(mode);\n var filename = pathToFilename(path);\n this.lchmodBase(filename, modeNum);\n };\n Volume.prototype.lchmod = function (path, mode, callback) {\n var modeNum = modeToNumber(mode);\n var filename = pathToFilename(path);\n this.wrapAsync(this.lchmodBase, [filename, modeNum], callback);\n };\n Volume.prototype.fchownBase = function (fd, uid, gid) {\n this.getFileByFdOrThrow(fd, 'fchown').chown(uid, gid);\n };\n Volume.prototype.fchownSync = function (fd, uid, gid) {\n validateUid(uid);\n validateGid(gid);\n this.fchownBase(fd, uid, gid);\n };\n Volume.prototype.fchown = function (fd, uid, gid, callback) {\n validateUid(uid);\n validateGid(gid);\n this.wrapAsync(this.fchownBase, [fd, uid, gid], callback);\n };\n Volume.prototype.chownBase = function (filename, uid, gid) {\n var link = this.getResolvedLinkOrThrow(filename, 'chown');\n var node = link.getNode();\n node.chown(uid, gid);\n // if(node.isFile() || node.isSymlink()) {\n //\n // } else if(node.isDirectory()) {\n //\n // } else {\n // TODO: What do we do here?\n // }\n };\n Volume.prototype.chownSync = function (path, uid, gid) {\n validateUid(uid);\n validateGid(gid);\n this.chownBase(pathToFilename(path), uid, gid);\n };\n Volume.prototype.chown = function (path, uid, gid, callback) {\n validateUid(uid);\n validateGid(gid);\n this.wrapAsync(this.chownBase, [pathToFilename(path), uid, gid], callback);\n };\n Volume.prototype.lchownBase = function (filename, uid, gid) {\n this.getLinkOrThrow(filename, 'lchown')\n .getNode()\n .chown(uid, gid);\n };\n Volume.prototype.lchownSync = function (path, uid, gid) {\n validateUid(uid);\n validateGid(gid);\n this.lchownBase(pathToFilename(path), uid, gid);\n };\n Volume.prototype.lchown = function (path, uid, gid, callback) {\n validateUid(uid);\n validateGid(gid);\n this.wrapAsync(this.lchownBase, [pathToFilename(path), uid, gid], callback);\n };\n Volume.prototype.watchFile = function (path, a, b) {\n var filename = pathToFilename(path);\n var options = a;\n var listener = b;\n if (typeof options === 'function') {\n listener = a;\n options = null;\n }\n if (typeof listener !== 'function') {\n throw Error('\"watchFile()\" requires a listener function');\n }\n var interval = 5007;\n var persistent = true;\n if (options && typeof options === 'object') {\n if (typeof options.interval === 'number')\n interval = options.interval;\n if (typeof options.persistent === 'boolean')\n persistent = options.persistent;\n }\n var watcher = this.statWatchers[filename];\n if (!watcher) {\n watcher = new this.StatWatcher();\n watcher.start(filename, persistent, interval);\n this.statWatchers[filename] = watcher;\n }\n watcher.addListener('change', listener);\n return watcher;\n };\n Volume.prototype.unwatchFile = function (path, listener) {\n var filename = pathToFilename(path);\n var watcher = this.statWatchers[filename];\n if (!watcher)\n return;\n if (typeof listener === 'function') {\n watcher.removeListener('change', listener);\n }\n else {\n watcher.removeAllListeners('change');\n }\n if (watcher.listenerCount('change') === 0) {\n watcher.stop();\n delete this.statWatchers[filename];\n }\n };\n Volume.prototype.createReadStream = function (path, options) {\n return new this.ReadStream(path, options);\n };\n Volume.prototype.createWriteStream = function (path, options) {\n return new this.WriteStream(path, options);\n };\n // watch(path: PathLike): FSWatcher;\n // watch(path: PathLike, options?: IWatchOptions | string): FSWatcher;\n Volume.prototype.watch = function (path, options, listener) {\n var filename = pathToFilename(path);\n var givenOptions = options;\n if (typeof options === 'function') {\n listener = options;\n givenOptions = null;\n }\n // tslint:disable-next-line prefer-const\n var _a = getDefaultOpts(givenOptions), persistent = _a.persistent, recursive = _a.recursive, encoding = _a.encoding;\n if (persistent === undefined)\n persistent = true;\n if (recursive === undefined)\n recursive = false;\n var watcher = new this.FSWatcher();\n watcher.start(filename, persistent, recursive, encoding);\n if (listener) {\n watcher.addListener('change', listener);\n }\n return watcher;\n };\n /**\n * Global file descriptor counter. UNIX file descriptors start from 0 and go sequentially\n * up, so here, in order not to conflict with them, we choose some big number and descrease\n * the file descriptor of every new opened file.\n * @type {number}\n * @todo This should not be static, right?\n */\n Volume.fd = 0x7fffffff;\n return Volume;\n}());\nexports.Volume = Volume;\nfunction emitStop(self) {\n self.emit('stop');\n}\nvar StatWatcher = /** @class */ (function (_super) {\n __extends(StatWatcher, _super);\n function StatWatcher(vol) {\n var _this = _super.call(this) || this;\n _this.onInterval = function () {\n try {\n var stats = _this.vol.statSync(_this.filename);\n if (_this.hasChanged(stats)) {\n _this.emit('change', stats, _this.prev);\n _this.prev = stats;\n }\n }\n finally {\n _this.loop();\n }\n };\n _this.vol = vol;\n return _this;\n }\n StatWatcher.prototype.loop = function () {\n this.timeoutRef = this.setTimeout(this.onInterval, this.interval);\n };\n StatWatcher.prototype.hasChanged = function (stats) {\n // if(!this.prev) return false;\n if (stats.mtimeMs > this.prev.mtimeMs)\n return true;\n if (stats.nlink !== this.prev.nlink)\n return true;\n return false;\n };\n StatWatcher.prototype.start = function (path, persistent, interval) {\n if (persistent === void 0) { persistent = true; }\n if (interval === void 0) { interval = 5007; }\n this.filename = pathToFilename(path);\n this.setTimeout = persistent ? setTimeout : setTimeoutUnref_1.default;\n this.interval = interval;\n this.prev = this.vol.statSync(this.filename);\n this.loop();\n };\n StatWatcher.prototype.stop = function () {\n clearTimeout(this.timeoutRef);\n process_1.default.nextTick(emitStop, this);\n };\n return StatWatcher;\n}(events_1.EventEmitter));\nexports.StatWatcher = StatWatcher;\nvar pool;\nfunction allocNewPool(poolSize) {\n pool = buffer_1.bufferAllocUnsafe(poolSize);\n pool.used = 0;\n}\nutil.inherits(FsReadStream, stream_1.Readable);\nexports.ReadStream = FsReadStream;\nfunction FsReadStream(vol, path, options) {\n if (!(this instanceof FsReadStream))\n return new FsReadStream(vol, path, options);\n this._vol = vol;\n // a little bit bigger buffer and water marks by default\n options = Object.assign({}, getOptions(options, {}));\n if (options.highWaterMark === undefined)\n options.highWaterMark = 64 * 1024;\n stream_1.Readable.call(this, options);\n this.path = pathToFilename(path);\n this.fd = options.fd === undefined ? null : options.fd;\n this.flags = options.flags === undefined ? 'r' : options.flags;\n this.mode = options.mode === undefined ? 438 : options.mode;\n this.start = options.start;\n this.end = options.end;\n this.autoClose = options.autoClose === undefined ? true : options.autoClose;\n this.pos = undefined;\n this.bytesRead = 0;\n if (this.start !== undefined) {\n if (typeof this.start !== 'number') {\n throw new TypeError('\"start\" option must be a Number');\n }\n if (this.end === undefined) {\n this.end = Infinity;\n }\n else if (typeof this.end !== 'number') {\n throw new TypeError('\"end\" option must be a Number');\n }\n if (this.start > this.end) {\n throw new Error('\"start\" option must be <= \"end\" option');\n }\n this.pos = this.start;\n }\n if (typeof this.fd !== 'number')\n this.open();\n this.on('end', function () {\n if (this.autoClose) {\n if (this.destroy)\n this.destroy();\n }\n });\n}\nFsReadStream.prototype.open = function () {\n var self = this; // tslint:disable-line no-this-assignment\n this._vol.open(this.path, this.flags, this.mode, function (er, fd) {\n if (er) {\n if (self.autoClose) {\n if (self.destroy)\n self.destroy();\n }\n self.emit('error', er);\n return;\n }\n self.fd = fd;\n self.emit('open', fd);\n // start the flow of data.\n self.read();\n });\n};\nFsReadStream.prototype._read = function (n) {\n if (typeof this.fd !== 'number') {\n return this.once('open', function () {\n this._read(n);\n });\n }\n if (this.destroyed)\n return;\n if (!pool || pool.length - pool.used < kMinPoolSpace) {\n // discard the old pool.\n allocNewPool(this._readableState.highWaterMark);\n }\n // Grab another reference to the pool in the case that while we're\n // in the thread pool another read() finishes up the pool, and\n // allocates a new one.\n var thisPool = pool;\n var toRead = Math.min(pool.length - pool.used, n);\n var start = pool.used;\n if (this.pos !== undefined)\n toRead = Math.min(this.end - this.pos + 1, toRead);\n // already read everything we were supposed to read!\n // treat as EOF.\n if (toRead <= 0)\n return this.push(null);\n // the actual read.\n var self = this; // tslint:disable-line no-this-assignment\n this._vol.read(this.fd, pool, pool.used, toRead, this.pos, onread);\n // move the pool positions, and internal position for reading.\n if (this.pos !== undefined)\n this.pos += toRead;\n pool.used += toRead;\n function onread(er, bytesRead) {\n if (er) {\n if (self.autoClose && self.destroy) {\n self.destroy();\n }\n self.emit('error', er);\n }\n else {\n var b = null;\n if (bytesRead > 0) {\n self.bytesRead += bytesRead;\n b = thisPool.slice(start, start + bytesRead);\n }\n self.push(b);\n }\n }\n};\nFsReadStream.prototype._destroy = function (err, cb) {\n this.close(function (err2) {\n cb(err || err2);\n });\n};\nFsReadStream.prototype.close = function (cb) {\n var _this = this;\n if (cb)\n this.once('close', cb);\n if (this.closed || typeof this.fd !== 'number') {\n if (typeof this.fd !== 'number') {\n this.once('open', closeOnOpen);\n return;\n }\n return process_1.default.nextTick(function () { return _this.emit('close'); });\n }\n this.closed = true;\n this._vol.close(this.fd, function (er) {\n if (er)\n _this.emit('error', er);\n else\n _this.emit('close');\n });\n this.fd = null;\n};\n// needed because as it will be called with arguments\n// that does not match this.close() signature\nfunction closeOnOpen(fd) {\n this.close();\n}\nutil.inherits(FsWriteStream, stream_1.Writable);\nexports.WriteStream = FsWriteStream;\nfunction FsWriteStream(vol, path, options) {\n if (!(this instanceof FsWriteStream))\n return new FsWriteStream(vol, path, options);\n this._vol = vol;\n options = Object.assign({}, getOptions(options, {}));\n stream_1.Writable.call(this, options);\n this.path = pathToFilename(path);\n this.fd = options.fd === undefined ? null : options.fd;\n this.flags = options.flags === undefined ? 'w' : options.flags;\n this.mode = options.mode === undefined ? 438 : options.mode;\n this.start = options.start;\n this.autoClose = options.autoClose === undefined ? true : !!options.autoClose;\n this.pos = undefined;\n this.bytesWritten = 0;\n if (this.start !== undefined) {\n if (typeof this.start !== 'number') {\n throw new TypeError('\"start\" option must be a Number');\n }\n if (this.start < 0) {\n throw new Error('\"start\" must be >= zero');\n }\n this.pos = this.start;\n }\n if (options.encoding)\n this.setDefaultEncoding(options.encoding);\n if (typeof this.fd !== 'number')\n this.open();\n // dispose on finish.\n this.once('finish', function () {\n if (this.autoClose) {\n this.close();\n }\n });\n}\nFsWriteStream.prototype.open = function () {\n this._vol.open(this.path, this.flags, this.mode, function (er, fd) {\n if (er) {\n if (this.autoClose && this.destroy) {\n this.destroy();\n }\n this.emit('error', er);\n return;\n }\n this.fd = fd;\n this.emit('open', fd);\n }.bind(this));\n};\nFsWriteStream.prototype._write = function (data, encoding, cb) {\n if (!(data instanceof buffer_1.Buffer))\n return this.emit('error', new Error('Invalid data'));\n if (typeof this.fd !== 'number') {\n return this.once('open', function () {\n this._write(data, encoding, cb);\n });\n }\n var self = this; // tslint:disable-line no-this-assignment\n this._vol.write(this.fd, data, 0, data.length, this.pos, function (er, bytes) {\n if (er) {\n if (self.autoClose && self.destroy) {\n self.destroy();\n }\n return cb(er);\n }\n self.bytesWritten += bytes;\n cb();\n });\n if (this.pos !== undefined)\n this.pos += data.length;\n};\nFsWriteStream.prototype._writev = function (data, cb) {\n if (typeof this.fd !== 'number') {\n return this.once('open', function () {\n this._writev(data, cb);\n });\n }\n var self = this; // tslint:disable-line no-this-assignment\n var len = data.length;\n var chunks = new Array(len);\n var size = 0;\n for (var i = 0; i < len; i++) {\n var chunk = data[i].chunk;\n chunks[i] = chunk;\n size += chunk.length;\n }\n var buf = buffer_1.Buffer.concat(chunks);\n this._vol.write(this.fd, buf, 0, buf.length, this.pos, function (er, bytes) {\n if (er) {\n if (self.destroy)\n self.destroy();\n return cb(er);\n }\n self.bytesWritten += bytes;\n cb();\n });\n if (this.pos !== undefined)\n this.pos += size;\n};\nFsWriteStream.prototype._destroy = FsReadStream.prototype._destroy;\nFsWriteStream.prototype.close = FsReadStream.prototype.close;\n// There is no shutdown() for files.\nFsWriteStream.prototype.destroySoon = FsWriteStream.prototype.end;\n// ---------------------------------------- FSWatcher\nvar FSWatcher = /** @class */ (function (_super) {\n __extends(FSWatcher, _super);\n function FSWatcher(vol) {\n var _this = _super.call(this) || this;\n _this._filename = '';\n _this._filenameEncoded = '';\n // _persistent: boolean = true;\n _this._recursive = false;\n _this._encoding = encoding_1.ENCODING_UTF8;\n _this._onNodeChange = function () {\n _this._emit('change');\n };\n _this._onParentChild = function (link) {\n if (link.getName() === _this._getName()) {\n _this._emit('rename');\n }\n };\n _this._emit = function (type) {\n _this.emit('change', type, _this._filenameEncoded);\n };\n _this._persist = function () {\n _this._timer = setTimeout(_this._persist, 1e6);\n };\n _this._vol = vol;\n return _this;\n // TODO: Emit \"error\" messages when watching.\n // this._handle.onchange = function(status, eventType, filename) {\n // if (status < 0) {\n // self._handle.close();\n // const error = !filename ?\n // errnoException(status, 'Error watching file for changes:') :\n // errnoException(status, `Error watching file ${filename} for changes:`);\n // error.filename = filename;\n // self.emit('error', error);\n // } else {\n // self.emit('change', eventType, filename);\n // }\n // };\n }\n FSWatcher.prototype._getName = function () {\n return this._steps[this._steps.length - 1];\n };\n FSWatcher.prototype.start = function (path, persistent, recursive, encoding) {\n if (persistent === void 0) { persistent = true; }\n if (recursive === void 0) { recursive = false; }\n if (encoding === void 0) { encoding = encoding_1.ENCODING_UTF8; }\n this._filename = pathToFilename(path);\n this._steps = filenameToSteps(this._filename);\n this._filenameEncoded = encoding_1.strToEncoding(this._filename);\n // this._persistent = persistent;\n this._recursive = recursive;\n this._encoding = encoding;\n try {\n this._link = this._vol.getLinkOrThrow(this._filename, 'FSWatcher');\n }\n catch (err) {\n var error = new Error(\"watch \" + this._filename + \" \" + err.code);\n error.code = err.code;\n error.errno = err.code;\n throw error;\n }\n this._link.getNode().on('change', this._onNodeChange);\n this._link.on('child:add', this._onNodeChange);\n this._link.on('child:delete', this._onNodeChange);\n var parent = this._link.parent;\n if (parent) {\n // parent.on('child:add', this._onParentChild);\n parent.setMaxListeners(parent.getMaxListeners() + 1);\n parent.on('child:delete', this._onParentChild);\n }\n if (persistent)\n this._persist();\n };\n FSWatcher.prototype.close = function () {\n clearTimeout(this._timer);\n this._link.getNode().removeListener('change', this._onNodeChange);\n var parent = this._link.parent;\n if (parent) {\n // parent.removeListener('child:add', this._onParentChild);\n parent.removeListener('child:delete', this._onParentChild);\n }\n };\n return FSWatcher;\n}(events_1.EventEmitter));\nexports.FSWatcher = FSWatcher;\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.fsAsyncMethods = exports.fsSyncMethods = exports.fsProps = void 0;\nvar fsProps = ['constants', 'F_OK', 'R_OK', 'W_OK', 'X_OK', 'Stats'];\nexports.fsProps = fsProps;\nvar fsSyncMethods = ['renameSync', 'ftruncateSync', 'truncateSync', 'chownSync', 'fchownSync', 'lchownSync', 'chmodSync', 'fchmodSync', 'lchmodSync', 'statSync', 'lstatSync', 'fstatSync', 'linkSync', 'symlinkSync', 'readlinkSync', 'realpathSync', 'unlinkSync', 'rmdirSync', 'mkdirSync', 'mkdirpSync', 'readdirSync', 'closeSync', 'openSync', 'utimesSync', 'futimesSync', 'fsyncSync', 'writeSync', 'readSync', 'readFileSync', 'writeFileSync', 'appendFileSync', 'existsSync', 'accessSync', 'fdatasyncSync', 'mkdtempSync', 'copyFileSync', 'createReadStream', 'createWriteStream'];\nexports.fsSyncMethods = fsSyncMethods;\nvar fsAsyncMethods = ['rename', 'ftruncate', 'truncate', 'chown', 'fchown', 'lchown', 'chmod', 'fchmod', 'lchmod', 'stat', 'lstat', 'fstat', 'link', 'symlink', 'readlink', 'realpath', 'unlink', 'rmdir', 'mkdir', 'mkdirp', 'readdir', 'close', 'open', 'utimes', 'futimes', 'fsync', 'write', 'read', 'readFile', 'writeFile', 'appendFile', 'exists', 'access', 'fdatasync', 'mkdtemp', 'copyFile', 'watchFile', 'unwatchFile', 'watch'];\nexports.fsAsyncMethods = fsAsyncMethods;", "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fs = exports.createFsFromVolume = exports.vol = exports.Volume = void 0;\nvar Stats_1 = require(\"./Stats\");\nvar Dirent_1 = require(\"./Dirent\");\nvar volume_1 = require(\"./volume\");\nvar _a = require('fs-monkey/lib/util/lists'), fsSyncMethods = _a.fsSyncMethods, fsAsyncMethods = _a.fsAsyncMethods;\nvar constants_1 = require(\"./constants\");\nvar F_OK = constants_1.constants.F_OK, R_OK = constants_1.constants.R_OK, W_OK = constants_1.constants.W_OK, X_OK = constants_1.constants.X_OK;\nexports.Volume = volume_1.Volume;\n// Default volume.\nexports.vol = new volume_1.Volume();\nfunction createFsFromVolume(vol) {\n var fs = { F_OK: F_OK, R_OK: R_OK, W_OK: W_OK, X_OK: X_OK, constants: constants_1.constants, Stats: Stats_1.default, Dirent: Dirent_1.default };\n // Bind FS methods.\n for (var _i = 0, fsSyncMethods_1 = fsSyncMethods; _i < fsSyncMethods_1.length; _i++) {\n var method = fsSyncMethods_1[_i];\n if (typeof vol[method] === 'function')\n fs[method] = vol[method].bind(vol);\n }\n for (var _a = 0, fsAsyncMethods_1 = fsAsyncMethods; _a < fsAsyncMethods_1.length; _a++) {\n var method = fsAsyncMethods_1[_a];\n if (typeof vol[method] === 'function')\n fs[method] = vol[method].bind(vol);\n }\n fs.StatWatcher = vol.StatWatcher;\n fs.FSWatcher = vol.FSWatcher;\n fs.WriteStream = vol.WriteStream;\n fs.ReadStream = vol.ReadStream;\n fs.promises = vol.promises;\n fs._toUnixTimestamp = volume_1.toUnixTimestamp;\n return fs;\n}\nexports.createFsFromVolume = createFsFromVolume;\nexports.fs = createFsFromVolume(exports.vol);\nmodule.exports = __assign(__assign({}, module.exports), exports.fs);\nmodule.exports.semantic = true;\n", "'use strict';\n\nconst BYTE_UNITS = [\n\t'B',\n\t'kB',\n\t'MB',\n\t'GB',\n\t'TB',\n\t'PB',\n\t'EB',\n\t'ZB',\n\t'YB'\n];\n\nconst BIBYTE_UNITS = [\n\t'B',\n\t'kiB',\n\t'MiB',\n\t'GiB',\n\t'TiB',\n\t'PiB',\n\t'EiB',\n\t'ZiB',\n\t'YiB'\n];\n\nconst BIT_UNITS = [\n\t'b',\n\t'kbit',\n\t'Mbit',\n\t'Gbit',\n\t'Tbit',\n\t'Pbit',\n\t'Ebit',\n\t'Zbit',\n\t'Ybit'\n];\n\nconst BIBIT_UNITS = [\n\t'b',\n\t'kibit',\n\t'Mibit',\n\t'Gibit',\n\t'Tibit',\n\t'Pibit',\n\t'Eibit',\n\t'Zibit',\n\t'Yibit'\n];\n\n/*\nFormats the given number using `Number#toLocaleString`.\n- If locale is a string, the value is expected to be a locale-key (for example: `de`).\n- If locale is true, the system default locale is used for translation.\n- If no value for locale is specified, the number is returned unmodified.\n*/\nconst toLocaleString = (number, locale, options) => {\n\tlet result = number;\n\tif (typeof locale === 'string' || Array.isArray(locale)) {\n\t\tresult = number.toLocaleString(locale, options);\n\t} else if (locale === true || options !== undefined) {\n\t\tresult = number.toLocaleString(undefined, options);\n\t}\n\n\treturn result;\n};\n\nmodule.exports = (number, options) => {\n\tif (!Number.isFinite(number)) {\n\t\tthrow new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);\n\t}\n\n\toptions = Object.assign({bits: false, binary: false}, options);\n\n\tconst UNITS = options.bits ?\n\t\t(options.binary ? BIBIT_UNITS : BIT_UNITS) :\n\t\t(options.binary ? BIBYTE_UNITS : BYTE_UNITS);\n\n\tif (options.signed && number === 0) {\n\t\treturn ` 0 ${UNITS[0]}`;\n\t}\n\n\tconst isNegative = number < 0;\n\tconst prefix = isNegative ? '-' : (options.signed ? '+' : '');\n\n\tif (isNegative) {\n\t\tnumber = -number;\n\t}\n\n\tlet localeOptions;\n\n\tif (options.minimumFractionDigits !== undefined) {\n\t\tlocaleOptions = {minimumFractionDigits: options.minimumFractionDigits};\n\t}\n\n\tif (options.maximumFractionDigits !== undefined) {\n\t\tlocaleOptions = Object.assign({maximumFractionDigits: options.maximumFractionDigits}, localeOptions);\n\t}\n\n\tif (number < 1) {\n\t\tconst numberString = toLocaleString(number, options.locale, localeOptions);\n\t\treturn prefix + numberString + ' ' + UNITS[0];\n\t}\n\n\tconst exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1);\n\t// eslint-disable-next-line unicorn/prefer-exponentiation-operator\n\tnumber /= Math.pow(options.binary ? 1024 : 1000, exponent);\n\n\tif (!localeOptions) {\n\t\tnumber = number.toPrecision(3);\n\t}\n\n\tconst numberString = toLocaleString(Number(number), options.locale, localeOptions);\n\n\tconst unit = UNITS[exponent];\n\n\treturn prefix + numberString + ' ' + unit;\n};\n", "import { initialize, build } from \"esbuild-wasm/esm/browser\";\nimport path from \"path\";\nimport { fs, vol } from \"memfs\";\nimport { EXTERNAL } from \"../plugins/external\";\nimport { ENTRY } from \"../plugins/entry\";\nimport { NODE } from \"../plugins/node-polyfill\";\nimport { BARE } from \"../plugins/bare\";\nimport { HTTP } from \"../plugins/http\";\nimport { CDN } from \"../plugins/cdn\";\nimport { VIRTUAL_FS } from \"../plugins/virtual-fs\";\nimport prettyBytes from \"pretty-bytes\";\nimport { gzip } from \"pako\";\n\nexport let _initialized = false;\nexport const _DEBUG = false;\nexport default (async (pkg: string) => {\n try {\n if (!_initialized) {\n await initialize({\n worker: true,\n wasmURL: \"https://unpkg.com/esbuild-wasm/esbuild.wasm\"\n });\n\n _initialized = true;\n }\n } catch (e) {\n console.warn(\"esbuild initialize error\", e);\n\n }\n\n let content: string;\n try {\n vol.fromJSON({\n \"input.ts\": `export * as pkg from \"https://cdn.skypack.dev/${pkg}\";`\n }, '/');\n\n let result = await build({\n entryPoints: [''],\n bundle: true,\n minify: true,\n color: true,\n target: [\"es2020\"],\n logLevel: 'error',\n write: false,\n outfile: \"/bundle.js\",\n external: ['esbuild', 'fsevents', 'chokidar', 'yargs'],\n platform: \"browser\",\n format: \"esm\",\n banner: { js: 'const global = globalThis;' },\n plugins: [\n // NODE(),\n EXTERNAL(),\n ENTRY(`/input.ts`),\n BARE(),\n HTTP(),\n CDN(),\n VIRTUAL_FS()\n ],\n globalName: 'bundler',\n });\n\n result?.outputFiles?.forEach((x) => {\n if (!fs.existsSync(path.dirname(x.path))) {\n fs.mkdirSync(path.dirname(x.path));\n }\n fs.writeFileSync(x.path, x.text);\n });\n\n content = await fs.promises.readFile(\"/bundle.js\", \"utf-8\");\n if (_DEBUG) console.log(content);\n } catch (e) {\n console.warn(`esbuild build error`, e);\n }\n\n try {\n if (!content) throw `the content of the build is not valid, \"${content}\"`;\n let { length } = gzip(content, { level: 9 });\n let size = prettyBytes(length);\n if (_DEBUG) console.log(`\\'${pkg}\\' is ${size}`);\n return size;\n } catch (e) {\n console.warn(\"Error zipping file \", e);\n }\n});", "var __defProp = Object.defineProperty;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;\nvar __objSpread = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\n\n// lib/shared/stdio_protocol.ts\nfunction encodePacket(packet) {\n let visit = (value) => {\n if (value === null) {\n bb.write8(0);\n } else if (typeof value === \"boolean\") {\n bb.write8(1);\n bb.write8(+value);\n } else if (typeof value === \"number\") {\n bb.write8(2);\n bb.write32(value | 0);\n } else if (typeof value === \"string\") {\n bb.write8(3);\n bb.write(encodeUTF8(value));\n } else if (value instanceof Uint8Array) {\n bb.write8(4);\n bb.write(value);\n } else if (value instanceof Array) {\n bb.write8(5);\n bb.write32(value.length);\n for (let item of value) {\n visit(item);\n }\n } else {\n let keys = Object.keys(value);\n bb.write8(6);\n bb.write32(keys.length);\n for (let key of keys) {\n bb.write(encodeUTF8(key));\n visit(value[key]);\n }\n }\n };\n let bb = new ByteBuffer();\n bb.write32(0);\n bb.write32(packet.id << 1 | +!packet.isRequest);\n visit(packet.value);\n writeUInt32LE(bb.buf, bb.len - 4, 0);\n return bb.buf.subarray(0, bb.len);\n}\nfunction decodePacket(bytes) {\n let visit = () => {\n switch (bb.read8()) {\n case 0:\n return null;\n case 1:\n return !!bb.read8();\n case 2:\n return bb.read32();\n case 3:\n return decodeUTF8(bb.read());\n case 4:\n return bb.read();\n case 5: {\n let count = bb.read32();\n let value2 = [];\n for (let i = 0; i < count; i++) {\n value2.push(visit());\n }\n return value2;\n }\n case 6: {\n let count = bb.read32();\n let value2 = {};\n for (let i = 0; i < count; i++) {\n value2[decodeUTF8(bb.read())] = visit();\n }\n return value2;\n }\n default:\n throw new Error(\"Invalid packet\");\n }\n };\n let bb = new ByteBuffer(bytes);\n let id = bb.read32();\n let isRequest = (id & 1) === 0;\n id >>>= 1;\n let value = visit();\n if (bb.ptr !== bytes.length) {\n throw new Error(\"Invalid packet\");\n }\n return {id, isRequest, value};\n}\nvar ByteBuffer = class {\n constructor(buf = new Uint8Array(1024)) {\n this.buf = buf;\n this.len = 0;\n this.ptr = 0;\n }\n _write(delta) {\n if (this.len + delta > this.buf.length) {\n let clone = new Uint8Array((this.len + delta) * 2);\n clone.set(this.buf);\n this.buf = clone;\n }\n this.len += delta;\n return this.len - delta;\n }\n write8(value) {\n let offset = this._write(1);\n this.buf[offset] = value;\n }\n write32(value) {\n let offset = this._write(4);\n writeUInt32LE(this.buf, value, offset);\n }\n write(bytes) {\n let offset = this._write(4 + bytes.length);\n writeUInt32LE(this.buf, bytes.length, offset);\n this.buf.set(bytes, offset + 4);\n }\n _read(delta) {\n if (this.ptr + delta > this.buf.length) {\n throw new Error(\"Invalid packet\");\n }\n this.ptr += delta;\n return this.ptr - delta;\n }\n read8() {\n return this.buf[this._read(1)];\n }\n read32() {\n return readUInt32LE(this.buf, this._read(4));\n }\n read() {\n let length = this.read32();\n let bytes = new Uint8Array(length);\n let ptr = this._read(bytes.length);\n bytes.set(this.buf.subarray(ptr, ptr + length));\n return bytes;\n }\n};\nvar encodeUTF8;\nvar decodeUTF8;\nif (typeof TextEncoder !== \"undefined\" && typeof TextDecoder !== \"undefined\") {\n let encoder = new TextEncoder();\n let decoder = new TextDecoder();\n encodeUTF8 = (text) => encoder.encode(text);\n decodeUTF8 = (bytes) => decoder.decode(bytes);\n} else if (typeof Buffer !== \"undefined\") {\n encodeUTF8 = (text) => {\n let buffer = Buffer.from(text);\n if (!(buffer instanceof Uint8Array)) {\n buffer = new Uint8Array(buffer);\n }\n return buffer;\n };\n decodeUTF8 = (bytes) => {\n let {buffer, byteOffset, byteLength} = bytes;\n return Buffer.from(buffer, byteOffset, byteLength).toString();\n };\n} else {\n throw new Error(\"No UTF-8 codec found\");\n}\nfunction readUInt32LE(buffer, offset) {\n return buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24;\n}\nfunction writeUInt32LE(buffer, value, offset) {\n buffer[offset++] = value;\n buffer[offset++] = value >> 8;\n buffer[offset++] = value >> 16;\n buffer[offset++] = value >> 24;\n}\n\n// lib/shared/common.ts\nfunction validateTarget(target) {\n target += \"\";\n if (target.indexOf(\",\") >= 0)\n throw new Error(`Invalid target: ${target}`);\n return target;\n}\nvar canBeAnything = () => null;\nvar mustBeBoolean = (value) => typeof value === \"boolean\" ? null : \"a boolean\";\nvar mustBeBooleanOrObject = (value) => typeof value === \"boolean\" || typeof value === \"object\" && !Array.isArray(value) ? null : \"a boolean or an object\";\nvar mustBeString = (value) => typeof value === \"string\" ? null : \"a string\";\nvar mustBeRegExp = (value) => value instanceof RegExp ? null : \"a RegExp object\";\nvar mustBeInteger = (value) => typeof value === \"number\" && value === (value | 0) ? null : \"an integer\";\nvar mustBeFunction = (value) => typeof value === \"function\" ? null : \"a function\";\nvar mustBeArray = (value) => Array.isArray(value) ? null : \"an array\";\nvar mustBeObject = (value) => typeof value === \"object\" && value !== null && !Array.isArray(value) ? null : \"an object\";\nvar mustBeArrayOrRecord = (value) => typeof value === \"object\" && value !== null ? null : \"an array or an object\";\nvar mustBeObjectOrNull = (value) => typeof value === \"object\" && !Array.isArray(value) ? null : \"an object or null\";\nvar mustBeStringOrBoolean = (value) => typeof value === \"string\" || typeof value === \"boolean\" ? null : \"a string or a boolean\";\nvar mustBeStringOrObject = (value) => typeof value === \"string\" || typeof value === \"object\" && value !== null && !Array.isArray(value) ? null : \"a string or an object\";\nvar mustBeStringOrArray = (value) => typeof value === \"string\" || Array.isArray(value) ? null : \"a string or an array\";\nvar mustBeStringOrUint8Array = (value) => typeof value === \"string\" || value instanceof Uint8Array ? null : \"a string or a Uint8Array\";\nfunction getFlag(object, keys, key, mustBeFn) {\n let value = object[key];\n keys[key + \"\"] = true;\n if (value === void 0)\n return void 0;\n let mustBe = mustBeFn(value);\n if (mustBe !== null)\n throw new Error(`\"${key}\" must be ${mustBe}`);\n return value;\n}\nfunction checkForInvalidFlags(object, keys, where) {\n for (let key in object) {\n if (!(key in keys)) {\n throw new Error(`Invalid option ${where}: \"${key}\"`);\n }\n }\n}\nfunction validateInitializeOptions(options) {\n let keys = Object.create(null);\n let wasmURL = getFlag(options, keys, \"wasmURL\", mustBeString);\n let worker = getFlag(options, keys, \"worker\", mustBeBoolean);\n checkForInvalidFlags(options, keys, \"in startService() call\");\n return {\n wasmURL,\n worker\n };\n}\nfunction pushLogFlags(flags, options, keys, isTTY, logLevelDefault) {\n let color = getFlag(options, keys, \"color\", mustBeBoolean);\n let logLevel = getFlag(options, keys, \"logLevel\", mustBeString);\n let logLimit = getFlag(options, keys, \"logLimit\", mustBeInteger);\n if (color)\n flags.push(`--color=${color}`);\n else if (isTTY)\n flags.push(`--color=true`);\n flags.push(`--log-level=${logLevel || logLevelDefault}`);\n flags.push(`--log-limit=${logLimit || 0}`);\n}\nfunction pushCommonFlags(flags, options, keys) {\n let legalComments = getFlag(options, keys, \"legalComments\", mustBeString);\n let sourceRoot = getFlag(options, keys, \"sourceRoot\", mustBeString);\n let sourcesContent = getFlag(options, keys, \"sourcesContent\", mustBeBoolean);\n let target = getFlag(options, keys, \"target\", mustBeStringOrArray);\n let format = getFlag(options, keys, \"format\", mustBeString);\n let globalName = getFlag(options, keys, \"globalName\", mustBeString);\n let minify = getFlag(options, keys, \"minify\", mustBeBoolean);\n let minifySyntax = getFlag(options, keys, \"minifySyntax\", mustBeBoolean);\n let minifyWhitespace = getFlag(options, keys, \"minifyWhitespace\", mustBeBoolean);\n let minifyIdentifiers = getFlag(options, keys, \"minifyIdentifiers\", mustBeBoolean);\n let charset = getFlag(options, keys, \"charset\", mustBeString);\n let treeShaking = getFlag(options, keys, \"treeShaking\", mustBeStringOrBoolean);\n let jsxFactory = getFlag(options, keys, \"jsxFactory\", mustBeString);\n let jsxFragment = getFlag(options, keys, \"jsxFragment\", mustBeString);\n let define = getFlag(options, keys, \"define\", mustBeObject);\n let pure = getFlag(options, keys, \"pure\", mustBeArray);\n let keepNames = getFlag(options, keys, \"keepNames\", mustBeBoolean);\n if (legalComments)\n flags.push(`--legal-comments=${legalComments}`);\n if (sourceRoot !== void 0)\n flags.push(`--source-root=${sourceRoot}`);\n if (sourcesContent !== void 0)\n flags.push(`--sources-content=${sourcesContent}`);\n if (target) {\n if (Array.isArray(target))\n flags.push(`--target=${Array.from(target).map(validateTarget).join(\",\")}`);\n else\n flags.push(`--target=${validateTarget(target)}`);\n }\n if (format)\n flags.push(`--format=${format}`);\n if (globalName)\n flags.push(`--global-name=${globalName}`);\n if (minify)\n flags.push(\"--minify\");\n if (minifySyntax)\n flags.push(\"--minify-syntax\");\n if (minifyWhitespace)\n flags.push(\"--minify-whitespace\");\n if (minifyIdentifiers)\n flags.push(\"--minify-identifiers\");\n if (charset)\n flags.push(`--charset=${charset}`);\n if (treeShaking !== void 0 && treeShaking !== true)\n flags.push(`--tree-shaking=${treeShaking}`);\n if (jsxFactory)\n flags.push(`--jsx-factory=${jsxFactory}`);\n if (jsxFragment)\n flags.push(`--jsx-fragment=${jsxFragment}`);\n if (define) {\n for (let key in define) {\n if (key.indexOf(\"=\") >= 0)\n throw new Error(`Invalid define: ${key}`);\n flags.push(`--define:${key}=${define[key]}`);\n }\n }\n if (pure)\n for (let fn of pure)\n flags.push(`--pure:${fn}`);\n if (keepNames)\n flags.push(`--keep-names`);\n}\nfunction flagsForBuildOptions(callName, options, isTTY, logLevelDefault, writeDefault) {\n var _a;\n let flags = [];\n let entries = [];\n let keys = Object.create(null);\n let stdinContents = null;\n let stdinResolveDir = null;\n let watchMode = null;\n pushLogFlags(flags, options, keys, isTTY, logLevelDefault);\n pushCommonFlags(flags, options, keys);\n let sourcemap = getFlag(options, keys, \"sourcemap\", mustBeStringOrBoolean);\n let bundle = getFlag(options, keys, \"bundle\", mustBeBoolean);\n let watch = getFlag(options, keys, \"watch\", mustBeBooleanOrObject);\n let splitting = getFlag(options, keys, \"splitting\", mustBeBoolean);\n let preserveSymlinks = getFlag(options, keys, \"preserveSymlinks\", mustBeBoolean);\n let metafile = getFlag(options, keys, \"metafile\", mustBeBoolean);\n let outfile = getFlag(options, keys, \"outfile\", mustBeString);\n let outdir = getFlag(options, keys, \"outdir\", mustBeString);\n let outbase = getFlag(options, keys, \"outbase\", mustBeString);\n let platform = getFlag(options, keys, \"platform\", mustBeString);\n let tsconfig = getFlag(options, keys, \"tsconfig\", mustBeString);\n let resolveExtensions = getFlag(options, keys, \"resolveExtensions\", mustBeArray);\n let nodePathsInput = getFlag(options, keys, \"nodePaths\", mustBeArray);\n let mainFields = getFlag(options, keys, \"mainFields\", mustBeArray);\n let conditions = getFlag(options, keys, \"conditions\", mustBeArray);\n let external = getFlag(options, keys, \"external\", mustBeArray);\n let loader = getFlag(options, keys, \"loader\", mustBeObject);\n let outExtension = getFlag(options, keys, \"outExtension\", mustBeObject);\n let publicPath = getFlag(options, keys, \"publicPath\", mustBeString);\n let entryNames = getFlag(options, keys, \"entryNames\", mustBeString);\n let chunkNames = getFlag(options, keys, \"chunkNames\", mustBeString);\n let assetNames = getFlag(options, keys, \"assetNames\", mustBeString);\n let inject = getFlag(options, keys, \"inject\", mustBeArray);\n let banner = getFlag(options, keys, \"banner\", mustBeObject);\n let footer = getFlag(options, keys, \"footer\", mustBeObject);\n let entryPoints = getFlag(options, keys, \"entryPoints\", mustBeArrayOrRecord);\n let absWorkingDir = getFlag(options, keys, \"absWorkingDir\", mustBeString);\n let stdin = getFlag(options, keys, \"stdin\", mustBeObject);\n let write = (_a = getFlag(options, keys, \"write\", mustBeBoolean)) != null ? _a : writeDefault;\n let allowOverwrite = getFlag(options, keys, \"allowOverwrite\", mustBeBoolean);\n let incremental = getFlag(options, keys, \"incremental\", mustBeBoolean) === true;\n keys.plugins = true;\n checkForInvalidFlags(options, keys, `in ${callName}() call`);\n if (sourcemap)\n flags.push(`--sourcemap${sourcemap === true ? \"\" : `=${sourcemap}`}`);\n if (bundle)\n flags.push(\"--bundle\");\n if (allowOverwrite)\n flags.push(\"--allow-overwrite\");\n if (watch) {\n flags.push(\"--watch\");\n if (typeof watch === \"boolean\") {\n watchMode = {};\n } else {\n let watchKeys = Object.create(null);\n let onRebuild = getFlag(watch, watchKeys, \"onRebuild\", mustBeFunction);\n checkForInvalidFlags(watch, watchKeys, `on \"watch\" in ${callName}() call`);\n watchMode = {onRebuild};\n }\n }\n if (splitting)\n flags.push(\"--splitting\");\n if (preserveSymlinks)\n flags.push(\"--preserve-symlinks\");\n if (metafile)\n flags.push(`--metafile`);\n if (outfile)\n flags.push(`--outfile=${outfile}`);\n if (outdir)\n flags.push(`--outdir=${outdir}`);\n if (outbase)\n flags.push(`--outbase=${outbase}`);\n if (platform)\n flags.push(`--platform=${platform}`);\n if (tsconfig)\n flags.push(`--tsconfig=${tsconfig}`);\n if (resolveExtensions) {\n let values = [];\n for (let value of resolveExtensions) {\n value += \"\";\n if (value.indexOf(\",\") >= 0)\n throw new Error(`Invalid resolve extension: ${value}`);\n values.push(value);\n }\n flags.push(`--resolve-extensions=${values.join(\",\")}`);\n }\n if (publicPath)\n flags.push(`--public-path=${publicPath}`);\n if (entryNames)\n flags.push(`--entry-names=${entryNames}`);\n if (chunkNames)\n flags.push(`--chunk-names=${chunkNames}`);\n if (assetNames)\n flags.push(`--asset-names=${assetNames}`);\n if (mainFields) {\n let values = [];\n for (let value of mainFields) {\n value += \"\";\n if (value.indexOf(\",\") >= 0)\n throw new Error(`Invalid main field: ${value}`);\n values.push(value);\n }\n flags.push(`--main-fields=${values.join(\",\")}`);\n }\n if (conditions) {\n let values = [];\n for (let value of conditions) {\n value += \"\";\n if (value.indexOf(\",\") >= 0)\n throw new Error(`Invalid condition: ${value}`);\n values.push(value);\n }\n flags.push(`--conditions=${values.join(\",\")}`);\n }\n if (external)\n for (let name of external)\n flags.push(`--external:${name}`);\n if (banner) {\n for (let type in banner) {\n if (type.indexOf(\"=\") >= 0)\n throw new Error(`Invalid banner file type: ${type}`);\n flags.push(`--banner:${type}=${banner[type]}`);\n }\n }\n if (footer) {\n for (let type in footer) {\n if (type.indexOf(\"=\") >= 0)\n throw new Error(`Invalid footer file type: ${type}`);\n flags.push(`--footer:${type}=${footer[type]}`);\n }\n }\n if (inject)\n for (let path of inject)\n flags.push(`--inject:${path}`);\n if (loader) {\n for (let ext in loader) {\n if (ext.indexOf(\"=\") >= 0)\n throw new Error(`Invalid loader extension: ${ext}`);\n flags.push(`--loader:${ext}=${loader[ext]}`);\n }\n }\n if (outExtension) {\n for (let ext in outExtension) {\n if (ext.indexOf(\"=\") >= 0)\n throw new Error(`Invalid out extension: ${ext}`);\n flags.push(`--out-extension:${ext}=${outExtension[ext]}`);\n }\n }\n if (entryPoints) {\n if (Array.isArray(entryPoints)) {\n for (let entryPoint of entryPoints) {\n entries.push([\"\", entryPoint + \"\"]);\n }\n } else {\n for (let [key, value] of Object.entries(entryPoints)) {\n entries.push([key + \"\", value + \"\"]);\n }\n }\n }\n if (stdin) {\n let stdinKeys = Object.create(null);\n let contents = getFlag(stdin, stdinKeys, \"contents\", mustBeString);\n let resolveDir = getFlag(stdin, stdinKeys, \"resolveDir\", mustBeString);\n let sourcefile = getFlag(stdin, stdinKeys, \"sourcefile\", mustBeString);\n let loader2 = getFlag(stdin, stdinKeys, \"loader\", mustBeString);\n checkForInvalidFlags(stdin, stdinKeys, 'in \"stdin\" object');\n if (sourcefile)\n flags.push(`--sourcefile=${sourcefile}`);\n if (loader2)\n flags.push(`--loader=${loader2}`);\n if (resolveDir)\n stdinResolveDir = resolveDir + \"\";\n stdinContents = contents ? contents + \"\" : \"\";\n }\n let nodePaths = [];\n if (nodePathsInput) {\n for (let value of nodePathsInput) {\n value += \"\";\n nodePaths.push(value);\n }\n }\n return {\n entries,\n flags,\n write,\n stdinContents,\n stdinResolveDir,\n absWorkingDir,\n incremental,\n nodePaths,\n watch: watchMode\n };\n}\nfunction flagsForTransformOptions(callName, options, isTTY, logLevelDefault) {\n let flags = [];\n let keys = Object.create(null);\n pushLogFlags(flags, options, keys, isTTY, logLevelDefault);\n pushCommonFlags(flags, options, keys);\n let sourcemap = getFlag(options, keys, \"sourcemap\", mustBeStringOrBoolean);\n let tsconfigRaw = getFlag(options, keys, \"tsconfigRaw\", mustBeStringOrObject);\n let sourcefile = getFlag(options, keys, \"sourcefile\", mustBeString);\n let loader = getFlag(options, keys, \"loader\", mustBeString);\n let banner = getFlag(options, keys, \"banner\", mustBeString);\n let footer = getFlag(options, keys, \"footer\", mustBeString);\n checkForInvalidFlags(options, keys, `in ${callName}() call`);\n if (sourcemap)\n flags.push(`--sourcemap=${sourcemap === true ? \"external\" : sourcemap}`);\n if (tsconfigRaw)\n flags.push(`--tsconfig-raw=${typeof tsconfigRaw === \"string\" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`);\n if (sourcefile)\n flags.push(`--sourcefile=${sourcefile}`);\n if (loader)\n flags.push(`--loader=${loader}`);\n if (banner)\n flags.push(`--banner=${banner}`);\n if (footer)\n flags.push(`--footer=${footer}`);\n return flags;\n}\nfunction createChannel(streamIn) {\n let responseCallbacks = new Map();\n let pluginCallbacks = new Map();\n let watchCallbacks = new Map();\n let serveCallbacks = new Map();\n let nextServeID = 0;\n let isClosed = false;\n let nextRequestID = 0;\n let nextBuildKey = 0;\n let stdout = new Uint8Array(16 * 1024);\n let stdoutUsed = 0;\n let readFromStdout = (chunk) => {\n let limit = stdoutUsed + chunk.length;\n if (limit > stdout.length) {\n let swap = new Uint8Array(limit * 2);\n swap.set(stdout);\n stdout = swap;\n }\n stdout.set(chunk, stdoutUsed);\n stdoutUsed += chunk.length;\n let offset = 0;\n while (offset + 4 <= stdoutUsed) {\n let length = readUInt32LE(stdout, offset);\n if (offset + 4 + length > stdoutUsed) {\n break;\n }\n offset += 4;\n handleIncomingPacket(stdout.subarray(offset, offset + length));\n offset += length;\n }\n if (offset > 0) {\n stdout.copyWithin(0, offset, stdoutUsed);\n stdoutUsed -= offset;\n }\n };\n let afterClose = () => {\n isClosed = true;\n for (let callback of responseCallbacks.values()) {\n callback(\"The service was stopped\", null);\n }\n responseCallbacks.clear();\n for (let callbacks of serveCallbacks.values()) {\n callbacks.onWait(\"The service was stopped\");\n }\n serveCallbacks.clear();\n for (let callback of watchCallbacks.values()) {\n try {\n callback(new Error(\"The service was stopped\"), null);\n } catch (e) {\n console.error(e);\n }\n }\n watchCallbacks.clear();\n };\n let sendRequest = (refs, value, callback) => {\n if (isClosed)\n return callback(\"The service is no longer running\", null);\n let id = nextRequestID++;\n responseCallbacks.set(id, (error, response) => {\n try {\n callback(error, response);\n } finally {\n if (refs)\n refs.unref();\n }\n });\n if (refs)\n refs.ref();\n streamIn.writeToStdin(encodePacket({id, isRequest: true, value}));\n };\n let sendResponse = (id, value) => {\n if (isClosed)\n throw new Error(\"The service is no longer running\");\n streamIn.writeToStdin(encodePacket({id, isRequest: false, value}));\n };\n let handleRequest = async (id, request) => {\n try {\n switch (request.command) {\n case \"ping\": {\n sendResponse(id, {});\n break;\n }\n case \"start\": {\n let callback = pluginCallbacks.get(request.key);\n if (!callback)\n sendResponse(id, {});\n else\n sendResponse(id, await callback(request));\n break;\n }\n case \"resolve\": {\n let callback = pluginCallbacks.get(request.key);\n if (!callback)\n sendResponse(id, {});\n else\n sendResponse(id, await callback(request));\n break;\n }\n case \"load\": {\n let callback = pluginCallbacks.get(request.key);\n if (!callback)\n sendResponse(id, {});\n else\n sendResponse(id, await callback(request));\n break;\n }\n case \"serve-request\": {\n let callbacks = serveCallbacks.get(request.serveID);\n if (callbacks && callbacks.onRequest)\n callbacks.onRequest(request.args);\n sendResponse(id, {});\n break;\n }\n case \"serve-wait\": {\n let callbacks = serveCallbacks.get(request.serveID);\n if (callbacks)\n callbacks.onWait(request.error);\n sendResponse(id, {});\n break;\n }\n case \"watch-rebuild\": {\n let callback = watchCallbacks.get(request.watchID);\n try {\n if (callback)\n callback(null, request.args);\n } catch (err) {\n console.error(err);\n }\n sendResponse(id, {});\n break;\n }\n default:\n throw new Error(`Invalid command: ` + request.command);\n }\n } catch (e) {\n sendResponse(id, {errors: [extractErrorMessageV8(e, streamIn, null, void 0, \"\")]});\n }\n };\n let isFirstPacket = true;\n let handleIncomingPacket = (bytes) => {\n if (isFirstPacket) {\n isFirstPacket = false;\n let binaryVersion = String.fromCharCode(...bytes);\n if (binaryVersion !== \"0.11.15\") {\n throw new Error(`Cannot start service: Host version \"${\"0.11.15\"}\" does not match binary version ${JSON.stringify(binaryVersion)}`);\n }\n return;\n }\n let packet = decodePacket(bytes);\n if (packet.isRequest) {\n handleRequest(packet.id, packet.value);\n } else {\n let callback = responseCallbacks.get(packet.id);\n responseCallbacks.delete(packet.id);\n if (packet.value.error)\n callback(packet.value.error, {});\n else\n callback(null, packet.value);\n }\n };\n let handlePlugins = async (initialOptions, plugins, buildKey, stash) => {\n let onStartCallbacks = [];\n let onEndCallbacks = [];\n let onResolveCallbacks = {};\n let onLoadCallbacks = {};\n let nextCallbackID = 0;\n let i = 0;\n let requestPlugins = [];\n plugins = [...plugins];\n for (let item of plugins) {\n let keys = {};\n if (typeof item !== \"object\")\n throw new Error(`Plugin at index ${i} must be an object`);\n let name = getFlag(item, keys, \"name\", mustBeString);\n if (typeof name !== \"string\" || name === \"\")\n throw new Error(`Plugin at index ${i} is missing a name`);\n try {\n let setup = getFlag(item, keys, \"setup\", mustBeFunction);\n if (typeof setup !== \"function\")\n throw new Error(`Plugin is missing a setup function`);\n checkForInvalidFlags(item, keys, `on plugin ${JSON.stringify(name)}`);\n let plugin = {\n name,\n onResolve: [],\n onLoad: []\n };\n i++;\n let promise = setup({\n initialOptions,\n onStart(callback2) {\n let registeredText = `This error came from the \"onStart\" callback registered here`;\n let registeredNote = extractCallerV8(new Error(registeredText), streamIn, \"onStart\");\n onStartCallbacks.push({name, callback: callback2, note: registeredNote});\n },\n onEnd(callback2) {\n let registeredText = `This error came from the \"onEnd\" callback registered here`;\n let registeredNote = extractCallerV8(new Error(registeredText), streamIn, \"onEnd\");\n onEndCallbacks.push({name, callback: callback2, note: registeredNote});\n },\n onResolve(options, callback2) {\n let registeredText = `This error came from the \"onResolve\" callback registered here`;\n let registeredNote = extractCallerV8(new Error(registeredText), streamIn, \"onResolve\");\n let keys2 = {};\n let filter = getFlag(options, keys2, \"filter\", mustBeRegExp);\n let namespace = getFlag(options, keys2, \"namespace\", mustBeString);\n checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${JSON.stringify(name)}`);\n if (filter == null)\n throw new Error(`onResolve() call is missing a filter`);\n let id = nextCallbackID++;\n onResolveCallbacks[id] = {name, callback: callback2, note: registeredNote};\n plugin.onResolve.push({id, filter: filter.source, namespace: namespace || \"\"});\n },\n onLoad(options, callback2) {\n let registeredText = `This error came from the \"onLoad\" callback registered here`;\n let registeredNote = extractCallerV8(new Error(registeredText), streamIn, \"onLoad\");\n let keys2 = {};\n let filter = getFlag(options, keys2, \"filter\", mustBeRegExp);\n let namespace = getFlag(options, keys2, \"namespace\", mustBeString);\n checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${JSON.stringify(name)}`);\n if (filter == null)\n throw new Error(`onLoad() call is missing a filter`);\n let id = nextCallbackID++;\n onLoadCallbacks[id] = {name, callback: callback2, note: registeredNote};\n plugin.onLoad.push({id, filter: filter.source, namespace: namespace || \"\"});\n }\n });\n if (promise)\n await promise;\n requestPlugins.push(plugin);\n } catch (e) {\n return {ok: false, error: e, pluginName: name};\n }\n }\n const callback = async (request) => {\n switch (request.command) {\n case \"start\": {\n let response = {errors: [], warnings: []};\n await Promise.all(onStartCallbacks.map(async ({name, callback: callback2, note}) => {\n try {\n let result = await callback2();\n if (result != null) {\n if (typeof result !== \"object\")\n throw new Error(`Expected onStart() callback in plugin ${JSON.stringify(name)} to return an object`);\n let keys = {};\n let errors = getFlag(result, keys, \"errors\", mustBeArray);\n let warnings = getFlag(result, keys, \"warnings\", mustBeArray);\n checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${JSON.stringify(name)}`);\n if (errors != null)\n response.errors.push(...sanitizeMessages(errors, \"errors\", stash, name));\n if (warnings != null)\n response.warnings.push(...sanitizeMessages(warnings, \"warnings\", stash, name));\n }\n } catch (e) {\n response.errors.push(extractErrorMessageV8(e, streamIn, stash, note && note(), name));\n }\n }));\n return response;\n }\n case \"resolve\": {\n let response = {}, name = \"\", callback2, note;\n for (let id of request.ids) {\n try {\n ({name, callback: callback2, note} = onResolveCallbacks[id]);\n let result = await callback2({\n path: request.path,\n importer: request.importer,\n namespace: request.namespace,\n resolveDir: request.resolveDir,\n kind: request.kind,\n pluginData: stash.load(request.pluginData)\n });\n if (result != null) {\n if (typeof result !== \"object\")\n throw new Error(`Expected onResolve() callback in plugin ${JSON.stringify(name)} to return an object`);\n let keys = {};\n let pluginName = getFlag(result, keys, \"pluginName\", mustBeString);\n let path = getFlag(result, keys, \"path\", mustBeString);\n let namespace = getFlag(result, keys, \"namespace\", mustBeString);\n let external = getFlag(result, keys, \"external\", mustBeBoolean);\n let pluginData = getFlag(result, keys, \"pluginData\", canBeAnything);\n let errors = getFlag(result, keys, \"errors\", mustBeArray);\n let warnings = getFlag(result, keys, \"warnings\", mustBeArray);\n let watchFiles = getFlag(result, keys, \"watchFiles\", mustBeArray);\n let watchDirs = getFlag(result, keys, \"watchDirs\", mustBeArray);\n checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${JSON.stringify(name)}`);\n response.id = id;\n if (pluginName != null)\n response.pluginName = pluginName;\n if (path != null)\n response.path = path;\n if (namespace != null)\n response.namespace = namespace;\n if (external != null)\n response.external = external;\n if (pluginData != null)\n response.pluginData = stash.store(pluginData);\n if (errors != null)\n response.errors = sanitizeMessages(errors, \"errors\", stash, name);\n if (warnings != null)\n response.warnings = sanitizeMessages(warnings, \"warnings\", stash, name);\n if (watchFiles != null)\n response.watchFiles = sanitizeStringArray(watchFiles, \"watchFiles\");\n if (watchDirs != null)\n response.watchDirs = sanitizeStringArray(watchDirs, \"watchDirs\");\n break;\n }\n } catch (e) {\n return {id, errors: [extractErrorMessageV8(e, streamIn, stash, note && note(), name)]};\n }\n }\n return response;\n }\n case \"load\": {\n let response = {}, name = \"\", callback2, note;\n for (let id of request.ids) {\n try {\n ({name, callback: callback2, note} = onLoadCallbacks[id]);\n let result = await callback2({\n path: request.path,\n namespace: request.namespace,\n pluginData: stash.load(request.pluginData)\n });\n if (result != null) {\n if (typeof result !== \"object\")\n throw new Error(`Expected onLoad() callback in plugin ${JSON.stringify(name)} to return an object`);\n let keys = {};\n let pluginName = getFlag(result, keys, \"pluginName\", mustBeString);\n let contents = getFlag(result, keys, \"contents\", mustBeStringOrUint8Array);\n let resolveDir = getFlag(result, keys, \"resolveDir\", mustBeString);\n let pluginData = getFlag(result, keys, \"pluginData\", canBeAnything);\n let loader = getFlag(result, keys, \"loader\", mustBeString);\n let errors = getFlag(result, keys, \"errors\", mustBeArray);\n let warnings = getFlag(result, keys, \"warnings\", mustBeArray);\n let watchFiles = getFlag(result, keys, \"watchFiles\", mustBeArray);\n let watchDirs = getFlag(result, keys, \"watchDirs\", mustBeArray);\n checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${JSON.stringify(name)}`);\n response.id = id;\n if (pluginName != null)\n response.pluginName = pluginName;\n if (contents instanceof Uint8Array)\n response.contents = contents;\n else if (contents != null)\n response.contents = encodeUTF8(contents);\n if (resolveDir != null)\n response.resolveDir = resolveDir;\n if (pluginData != null)\n response.pluginData = stash.store(pluginData);\n if (loader != null)\n response.loader = loader;\n if (errors != null)\n response.errors = sanitizeMessages(errors, \"errors\", stash, name);\n if (warnings != null)\n response.warnings = sanitizeMessages(warnings, \"warnings\", stash, name);\n if (watchFiles != null)\n response.watchFiles = sanitizeStringArray(watchFiles, \"watchFiles\");\n if (watchDirs != null)\n response.watchDirs = sanitizeStringArray(watchDirs, \"watchDirs\");\n break;\n }\n } catch (e) {\n return {id, errors: [extractErrorMessageV8(e, streamIn, stash, note && note(), name)]};\n }\n }\n return response;\n }\n default:\n throw new Error(`Invalid command: ` + request.command);\n }\n };\n let runOnEndCallbacks = (result, done) => done();\n if (onEndCallbacks.length > 0) {\n runOnEndCallbacks = (result, done) => {\n (async () => {\n for (const {name, callback: callback2, note} of onEndCallbacks) {\n try {\n await callback2(result);\n } catch (e) {\n result.errors.push(extractErrorMessageV8(e, streamIn, stash, note && note(), name));\n }\n }\n })().then(done);\n };\n }\n let refCount = 0;\n return {\n ok: true,\n requestPlugins,\n runOnEndCallbacks,\n pluginRefs: {\n ref() {\n if (++refCount === 1)\n pluginCallbacks.set(buildKey, callback);\n },\n unref() {\n if (--refCount === 0)\n pluginCallbacks.delete(buildKey);\n }\n }\n };\n };\n let buildServeData = (refs, options, request) => {\n let keys = {};\n let port = getFlag(options, keys, \"port\", mustBeInteger);\n let host = getFlag(options, keys, \"host\", mustBeString);\n let servedir = getFlag(options, keys, \"servedir\", mustBeString);\n let onRequest = getFlag(options, keys, \"onRequest\", mustBeFunction);\n let serveID = nextServeID++;\n let onWait;\n let wait = new Promise((resolve, reject) => {\n onWait = (error) => {\n serveCallbacks.delete(serveID);\n if (error !== null)\n reject(new Error(error));\n else\n resolve();\n };\n });\n request.serve = {serveID};\n checkForInvalidFlags(options, keys, `in serve() call`);\n if (port !== void 0)\n request.serve.port = port;\n if (host !== void 0)\n request.serve.host = host;\n if (servedir !== void 0)\n request.serve.servedir = servedir;\n serveCallbacks.set(serveID, {\n onRequest,\n onWait\n });\n return {\n wait,\n stop() {\n sendRequest(refs, {command: \"serve-stop\", serveID}, () => {\n });\n }\n };\n };\n const buildLogLevelDefault = \"warning\";\n const transformLogLevelDefault = \"silent\";\n let buildOrServe = (args) => {\n let key = nextBuildKey++;\n const details = createObjectStash();\n let plugins;\n let {refs, options, isTTY, callback} = args;\n if (typeof options === \"object\") {\n let value = options.plugins;\n if (value !== void 0) {\n if (!Array.isArray(value))\n throw new Error(`\"plugins\" must be an array`);\n plugins = value;\n }\n }\n let handleError = (e, pluginName) => {\n let flags = [];\n try {\n pushLogFlags(flags, options, {}, isTTY, buildLogLevelDefault);\n } catch (e2) {\n }\n const error = extractErrorMessageV8(e, streamIn, details, void 0, pluginName);\n sendRequest(refs, {command: \"error\", flags, error}, () => {\n error.detail = details.load(error.detail);\n callback(failureErrorWithLog(\"Build failed\", [error], []), null);\n });\n };\n if (plugins && plugins.length > 0) {\n if (streamIn.isSync)\n return handleError(new Error(\"Cannot use plugins in synchronous API calls\"), \"\");\n handlePlugins(options, plugins, key, details).then((result) => {\n if (!result.ok) {\n handleError(result.error, result.pluginName);\n } else {\n try {\n buildOrServeContinue(__objSpread(__objSpread({}, args), {\n key,\n details,\n requestPlugins: result.requestPlugins,\n runOnEndCallbacks: result.runOnEndCallbacks,\n pluginRefs: result.pluginRefs\n }));\n } catch (e) {\n handleError(e, \"\");\n }\n }\n }, (e) => handleError(e, \"\"));\n } else {\n try {\n buildOrServeContinue(__objSpread(__objSpread({}, args), {\n key,\n details,\n requestPlugins: null,\n runOnEndCallbacks: (result, done) => done(),\n pluginRefs: null\n }));\n } catch (e) {\n handleError(e, \"\");\n }\n }\n };\n let buildOrServeContinue = ({\n callName,\n refs: callerRefs,\n serveOptions,\n options,\n isTTY,\n defaultWD,\n callback,\n key,\n details,\n requestPlugins,\n runOnEndCallbacks,\n pluginRefs\n }) => {\n const refs = {\n ref() {\n if (pluginRefs)\n pluginRefs.ref();\n if (callerRefs)\n callerRefs.ref();\n },\n unref() {\n if (pluginRefs)\n pluginRefs.unref();\n if (callerRefs)\n callerRefs.unref();\n }\n };\n let writeDefault = !streamIn.isBrowser;\n let {\n entries,\n flags,\n write,\n stdinContents,\n stdinResolveDir,\n absWorkingDir,\n incremental,\n nodePaths,\n watch\n } = flagsForBuildOptions(callName, options, isTTY, buildLogLevelDefault, writeDefault);\n let request = {\n command: \"build\",\n key,\n entries,\n flags,\n write,\n stdinContents,\n stdinResolveDir,\n absWorkingDir: absWorkingDir || defaultWD,\n incremental,\n nodePaths,\n hasOnRebuild: !!(watch && watch.onRebuild)\n };\n if (requestPlugins)\n request.plugins = requestPlugins;\n let serve2 = serveOptions && buildServeData(refs, serveOptions, request);\n let rebuild;\n let stop;\n let copyResponseToResult = (response, result) => {\n if (response.outputFiles)\n result.outputFiles = response.outputFiles.map(convertOutputFiles);\n if (response.metafile)\n result.metafile = JSON.parse(response.metafile);\n if (response.writeToStdout !== void 0)\n console.log(decodeUTF8(response.writeToStdout).replace(/\\n$/, \"\"));\n };\n let buildResponseToResult = (response, callback2) => {\n let result = {\n errors: replaceDetailsInMessages(response.errors, details),\n warnings: replaceDetailsInMessages(response.warnings, details)\n };\n copyResponseToResult(response, result);\n runOnEndCallbacks(result, () => {\n if (result.errors.length > 0) {\n return callback2(failureErrorWithLog(\"Build failed\", result.errors, result.warnings), null);\n }\n if (response.rebuildID !== void 0) {\n if (!rebuild) {\n let isDisposed = false;\n rebuild = () => new Promise((resolve, reject) => {\n if (isDisposed || isClosed)\n throw new Error(\"Cannot rebuild\");\n sendRequest(refs, {command: \"rebuild\", rebuildID: response.rebuildID}, (error2, response2) => {\n if (error2) {\n const message = {pluginName: \"\", text: error2, location: null, notes: [], detail: void 0};\n return callback2(failureErrorWithLog(\"Build failed\", [message], []), null);\n }\n buildResponseToResult(response2, (error3, result3) => {\n if (error3)\n reject(error3);\n else\n resolve(result3);\n });\n });\n });\n refs.ref();\n rebuild.dispose = () => {\n if (isDisposed)\n return;\n isDisposed = true;\n sendRequest(refs, {command: \"rebuild-dispose\", rebuildID: response.rebuildID}, () => {\n });\n refs.unref();\n };\n }\n result.rebuild = rebuild;\n }\n if (response.watchID !== void 0) {\n if (!stop) {\n let isStopped = false;\n refs.ref();\n stop = () => {\n if (isStopped)\n return;\n isStopped = true;\n watchCallbacks.delete(response.watchID);\n sendRequest(refs, {command: \"watch-stop\", watchID: response.watchID}, () => {\n });\n refs.unref();\n };\n if (watch && watch.onRebuild) {\n watchCallbacks.set(response.watchID, (serviceStopError, watchResponse) => {\n if (serviceStopError)\n return watch.onRebuild(serviceStopError, null);\n let result2 = {\n errors: replaceDetailsInMessages(watchResponse.errors, details),\n warnings: replaceDetailsInMessages(watchResponse.warnings, details)\n };\n runOnEndCallbacks(result2, () => {\n if (result2.errors.length > 0) {\n return watch.onRebuild(failureErrorWithLog(\"Build failed\", result2.errors, result2.warnings), null);\n }\n copyResponseToResult(watchResponse, result2);\n if (watchResponse.rebuildID !== void 0)\n result2.rebuild = rebuild;\n result2.stop = stop;\n watch.onRebuild(null, result2);\n });\n });\n }\n }\n result.stop = stop;\n }\n callback2(null, result);\n });\n };\n if (write && streamIn.isBrowser)\n throw new Error(`Cannot enable \"write\" in the browser`);\n if (incremental && streamIn.isSync)\n throw new Error(`Cannot use \"incremental\" with a synchronous build`);\n sendRequest(refs, request, (error, response) => {\n if (error)\n return callback(new Error(error), null);\n if (serve2) {\n let serveResponse = response;\n let isStopped = false;\n refs.ref();\n let result = {\n port: serveResponse.port,\n host: serveResponse.host,\n wait: serve2.wait,\n stop() {\n if (isStopped)\n return;\n isStopped = true;\n serve2.stop();\n refs.unref();\n }\n };\n refs.ref();\n serve2.wait.then(refs.unref, refs.unref);\n return callback(null, result);\n }\n return buildResponseToResult(response, callback);\n });\n };\n let transform2 = ({callName, refs, input, options, isTTY, fs, callback}) => {\n const details = createObjectStash();\n let start = (inputPath) => {\n try {\n if (typeof input !== \"string\")\n throw new Error('The input to \"transform\" must be a string');\n let flags = flagsForTransformOptions(callName, options, isTTY, transformLogLevelDefault);\n let request = {\n command: \"transform\",\n flags,\n inputFS: inputPath !== null,\n input: inputPath !== null ? inputPath : input\n };\n sendRequest(refs, request, (error, response) => {\n if (error)\n return callback(new Error(error), null);\n let errors = replaceDetailsInMessages(response.errors, details);\n let warnings = replaceDetailsInMessages(response.warnings, details);\n let outstanding = 1;\n let next = () => --outstanding === 0 && callback(null, {warnings, code: response.code, map: response.map});\n if (errors.length > 0)\n return callback(failureErrorWithLog(\"Transform failed\", errors, warnings), null);\n if (response.codeFS) {\n outstanding++;\n fs.readFile(response.code, (err, contents) => {\n if (err !== null) {\n callback(err, null);\n } else {\n response.code = contents;\n next();\n }\n });\n }\n if (response.mapFS) {\n outstanding++;\n fs.readFile(response.map, (err, contents) => {\n if (err !== null) {\n callback(err, null);\n } else {\n response.map = contents;\n next();\n }\n });\n }\n next();\n });\n } catch (e) {\n let flags = [];\n try {\n pushLogFlags(flags, options, {}, isTTY, transformLogLevelDefault);\n } catch (e2) {\n }\n const error = extractErrorMessageV8(e, streamIn, details, void 0, \"\");\n sendRequest(refs, {command: \"error\", flags, error}, () => {\n error.detail = details.load(error.detail);\n callback(failureErrorWithLog(\"Transform failed\", [error], []), null);\n });\n }\n };\n if (typeof input === \"string\" && input.length > 1024 * 1024) {\n let next = start;\n start = () => fs.writeFile(input, next);\n }\n start(null);\n };\n let formatMessages2 = ({callName, refs, messages, options, callback}) => {\n let result = sanitizeMessages(messages, \"messages\", null, \"\");\n if (!options)\n throw new Error(`Missing second argument in ${callName}() call`);\n let keys = {};\n let kind = getFlag(options, keys, \"kind\", mustBeString);\n let color = getFlag(options, keys, \"color\", mustBeBoolean);\n let terminalWidth = getFlag(options, keys, \"terminalWidth\", mustBeInteger);\n checkForInvalidFlags(options, keys, `in ${callName}() call`);\n if (kind === void 0)\n throw new Error(`Missing \"kind\" in ${callName}() call`);\n if (kind !== \"error\" && kind !== \"warning\")\n throw new Error(`Expected \"kind\" to be \"error\" or \"warning\" in ${callName}() call`);\n let request = {\n command: \"format-msgs\",\n messages: result,\n isWarning: kind === \"warning\"\n };\n if (color !== void 0)\n request.color = color;\n if (terminalWidth !== void 0)\n request.terminalWidth = terminalWidth;\n sendRequest(refs, request, (error, response) => {\n if (error)\n return callback(new Error(error), null);\n callback(null, response.messages);\n });\n };\n return {\n readFromStdout,\n afterClose,\n service: {\n buildOrServe,\n transform: transform2,\n formatMessages: formatMessages2\n }\n };\n}\nfunction createObjectStash() {\n const map = new Map();\n let nextID = 0;\n return {\n load(id) {\n return map.get(id);\n },\n store(value) {\n if (value === void 0)\n return -1;\n const id = nextID++;\n map.set(id, value);\n return id;\n }\n };\n}\nfunction extractCallerV8(e, streamIn, ident) {\n let note;\n let tried = false;\n return () => {\n if (tried)\n return note;\n tried = true;\n try {\n let lines = (e.stack + \"\").split(\"\\n\");\n lines.splice(1, 1);\n let location = parseStackLinesV8(streamIn, lines, ident);\n if (location) {\n note = {text: e.message, location};\n return note;\n }\n } catch (e2) {\n }\n };\n}\nfunction extractErrorMessageV8(e, streamIn, stash, note, pluginName) {\n let text = \"Internal error\";\n let location = null;\n try {\n text = (e && e.message || e) + \"\";\n } catch (e2) {\n }\n try {\n location = parseStackLinesV8(streamIn, (e.stack + \"\").split(\"\\n\"), \"\");\n } catch (e2) {\n }\n return {pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1};\n}\nfunction parseStackLinesV8(streamIn, lines, ident) {\n let at = \" at \";\n if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) {\n for (let i = 1; i < lines.length; i++) {\n let line = lines[i];\n if (!line.startsWith(at))\n continue;\n line = line.slice(at.length);\n while (true) {\n let match = /^(?:new |async )?\\S+ \\((.*)\\)$/.exec(line);\n if (match) {\n line = match[1];\n continue;\n }\n match = /^eval at \\S+ \\((.*)\\)(?:, \\S+:\\d+:\\d+)?$/.exec(line);\n if (match) {\n line = match[1];\n continue;\n }\n match = /^(\\S+):(\\d+):(\\d+)$/.exec(line);\n if (match) {\n let contents;\n try {\n contents = streamIn.readFileSync(match[1], \"utf8\");\n } catch (e) {\n break;\n }\n let lineText = contents.split(/\\r\\n|\\r|\\n|\\u2028|\\u2029/)[+match[2] - 1] || \"\";\n let column = +match[3] - 1;\n let length = lineText.slice(column, column + ident.length) === ident ? ident.length : 0;\n return {\n file: match[1],\n namespace: \"file\",\n line: +match[2],\n column: encodeUTF8(lineText.slice(0, column)).length,\n length: encodeUTF8(lineText.slice(column, column + length)).length,\n lineText: lineText + \"\\n\" + lines.slice(1).join(\"\\n\"),\n suggestion: \"\"\n };\n }\n break;\n }\n }\n }\n return null;\n}\nfunction failureErrorWithLog(text, errors, warnings) {\n let limit = 5;\n let summary = errors.length < 1 ? \"\" : ` with ${errors.length} error${errors.length < 2 ? \"\" : \"s\"}:` + errors.slice(0, limit + 1).map((e, i) => {\n if (i === limit)\n return \"\\n...\";\n if (!e.location)\n return `\nerror: ${e.text}`;\n let {file, line, column} = e.location;\n let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : \"\";\n return `\n${file}:${line}:${column}: error: ${pluginText}${e.text}`;\n }).join(\"\");\n let error = new Error(`${text}${summary}`);\n error.errors = errors;\n error.warnings = warnings;\n return error;\n}\nfunction replaceDetailsInMessages(messages, stash) {\n for (const message of messages) {\n message.detail = stash.load(message.detail);\n }\n return messages;\n}\nfunction sanitizeLocation(location, where) {\n if (location == null)\n return null;\n let keys = {};\n let file = getFlag(location, keys, \"file\", mustBeString);\n let namespace = getFlag(location, keys, \"namespace\", mustBeString);\n let line = getFlag(location, keys, \"line\", mustBeInteger);\n let column = getFlag(location, keys, \"column\", mustBeInteger);\n let length = getFlag(location, keys, \"length\", mustBeInteger);\n let lineText = getFlag(location, keys, \"lineText\", mustBeString);\n let suggestion = getFlag(location, keys, \"suggestion\", mustBeString);\n checkForInvalidFlags(location, keys, where);\n return {\n file: file || \"\",\n namespace: namespace || \"\",\n line: line || 0,\n column: column || 0,\n length: length || 0,\n lineText: lineText || \"\",\n suggestion: suggestion || \"\"\n };\n}\nfunction sanitizeMessages(messages, property, stash, fallbackPluginName) {\n let messagesClone = [];\n let index = 0;\n for (const message of messages) {\n let keys = {};\n let pluginName = getFlag(message, keys, \"pluginName\", mustBeString);\n let text = getFlag(message, keys, \"text\", mustBeString);\n let location = getFlag(message, keys, \"location\", mustBeObjectOrNull);\n let notes = getFlag(message, keys, \"notes\", mustBeArray);\n let detail = getFlag(message, keys, \"detail\", canBeAnything);\n let where = `in element ${index} of \"${property}\"`;\n checkForInvalidFlags(message, keys, where);\n let notesClone = [];\n if (notes) {\n for (const note of notes) {\n let noteKeys = {};\n let noteText = getFlag(note, noteKeys, \"text\", mustBeString);\n let noteLocation = getFlag(note, noteKeys, \"location\", mustBeObjectOrNull);\n checkForInvalidFlags(note, noteKeys, where);\n notesClone.push({\n text: noteText || \"\",\n location: sanitizeLocation(noteLocation, where)\n });\n }\n }\n messagesClone.push({\n pluginName: pluginName || fallbackPluginName,\n text: text || \"\",\n location: sanitizeLocation(location, where),\n notes: notesClone,\n detail: stash ? stash.store(detail) : -1\n });\n index++;\n }\n return messagesClone;\n}\nfunction sanitizeStringArray(values, property) {\n const result = [];\n for (const value of values) {\n if (typeof value !== \"string\")\n throw new Error(`${JSON.stringify(property)} must be an array of strings`);\n result.push(value);\n }\n return result;\n}\nfunction convertOutputFiles({path, contents}) {\n let text = null;\n return {\n path,\n contents,\n get text() {\n if (text === null)\n text = decodeUTF8(contents);\n return text;\n }\n };\n}\n\n// lib/npm/browser.ts\nvar version = \"0.11.15\";\nvar build = (options) => ensureServiceIsRunning().build(options);\nvar serve = () => {\n throw new Error(`The \"serve\" API only works in node`);\n};\nvar transform = (input, options) => ensureServiceIsRunning().transform(input, options);\nvar formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options);\nvar buildSync = () => {\n throw new Error(`The \"buildSync\" API only works in node`);\n};\nvar transformSync = () => {\n throw new Error(`The \"transformSync\" API only works in node`);\n};\nvar formatMessagesSync = () => {\n throw new Error(`The \"formatMessagesSync\" API only works in node`);\n};\nvar initializePromise;\nvar longLivedService;\nvar ensureServiceIsRunning = () => {\n if (longLivedService)\n return longLivedService;\n if (initializePromise)\n throw new Error('You need to wait for the promise returned from \"initialize\" to be resolved before calling this');\n throw new Error('You need to call \"initialize\" before calling this');\n};\nvar initialize = (options) => {\n options = validateInitializeOptions(options || {});\n let wasmURL = options.wasmURL;\n let useWorker = options.worker !== false;\n if (!wasmURL)\n throw new Error('Must provide the \"wasmURL\" option');\n wasmURL += \"\";\n if (initializePromise)\n throw new Error('Cannot call \"initialize\" more than once');\n initializePromise = startRunningService(wasmURL, useWorker);\n initializePromise.catch(() => {\n initializePromise = void 0;\n });\n return initializePromise;\n};\nvar startRunningService = async (wasmURL, useWorker) => {\n let res = await fetch(wasmURL);\n if (!res.ok)\n throw new Error(`Failed to download ${JSON.stringify(wasmURL)}`);\n let wasm = await res.arrayBuffer();\n let code = `{let global={};for(let o=self;o;o=Object.getPrototypeOf(o))for(let k of Object.getOwnPropertyNames(o))if(!(k in global))Object.defineProperty(global,k,{get:()=>self[k]});// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n(() => {\n\t// Map multiple JavaScript environments to a single common API,\n\t// preferring web standards over Node.js API.\n\t//\n\t// Environments considered:\n\t// - Browsers\n\t// - Node.js\n\t// - Electron\n\t// - Parcel\n\t// - Webpack\n\n\tif (typeof global !== \"undefined\") {\n\t\t// global already exists\n\t} else if (typeof window !== \"undefined\") {\n\t\twindow.global = window;\n\t} else if (typeof self !== \"undefined\") {\n\t\tself.global = self;\n\t} else {\n\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t}\n\n\tif (!global.require && typeof require !== \"undefined\") {\n\t\tglobal.require = require;\n\t}\n\n\tif (!global.fs && global.require) {\n\t\tconst fs = require(\"fs\");\n\t\tif (typeof fs === \"object\" && fs !== null && Object.keys(fs).length !== 0) {\n\t\t\t\n global.fs = Object.assign({}, fs, {\n // Hack around a Unicode bug in node: https://github.com/nodejs/node/issues/24550\n write(fd, buf, offset, length, position, callback) {\n if (offset === 0 && length === buf.length && position === null) {\n if (fd === process.stdout.fd) {\n try {\n process.stdout.write(buf, err => err ? callback(err, 0, null) : callback(null, length, buf));\n } catch (err) {\n callback(err, 0, null);\n }\n return;\n }\n if (fd === process.stderr.fd) {\n try {\n process.stderr.write(buf, err => err ? callback(err, 0, null) : callback(null, length, buf));\n } catch (err) {\n callback(err, 0, null);\n }\n return;\n }\n }\n fs.write(fd, buf, offset, length, position, callback);\n },\n });\n \n\t\t}\n\t}\n\n\tconst enosys = () => {\n\t\tconst err = new Error(\"not implemented\");\n\t\terr.code = \"ENOSYS\";\n\t\treturn err;\n\t};\n\n\tif (!global.fs) {\n\t\tlet outputBuf = \"\";\n\t\tglobal.fs = {\n\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\twriteSync(fd, buf) {\n\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\\\n\");\n\t\t\t\tif (nl != -1) {\n\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t}\n\t\t\t\treturn buf.length;\n\t\t\t},\n\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\tcallback(enosys());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\tcallback(null, n);\n\t\t\t},\n\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t};\n\t}\n\n\tif (!global.process) {\n\t\tglobal.process = {\n\t\t\tgetuid() { return -1; },\n\t\t\tgetgid() { return -1; },\n\t\t\tgeteuid() { return -1; },\n\t\t\tgetegid() { return -1; },\n\t\t\tgetgroups() { throw enosys(); },\n\t\t\tpid: -1,\n\t\t\tppid: -1,\n\t\t\tumask() { throw enosys(); },\n\t\t\tcwd() { throw enosys(); },\n\t\t\tchdir() { throw enosys(); },\n\t\t}\n\t}\n\n\tif (!global.crypto && global.require) {\n\t\tconst nodeCrypto = require(\"crypto\");\n\t\tglobal.crypto = {\n\t\t\tgetRandomValues(b) {\n\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t},\n\t\t};\n\t}\n\tif (!global.crypto) {\n\t\tthrow new Error(\"global.crypto is not available, polyfill required (getRandomValues only)\");\n\t}\n\n\tif (!global.performance) {\n\t\tglobal.performance = {\n\t\t\tnow() {\n\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t},\n\t\t};\n\t}\n\n\tif (!global.TextEncoder && global.require) {\n\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t}\n\tif (!global.TextEncoder) {\n\t\tthrow new Error(\"global.TextEncoder is not available, polyfill required\");\n\t}\n\n\tif (!global.TextDecoder && global.require) {\n\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t}\n\tif (!global.TextDecoder) {\n\t\tthrow new Error(\"global.TextDecoder is not available, polyfill required\");\n\t}\n\n\t// End of polyfills for common API.\n\n\tconst encoder = new TextEncoder(\"utf-8\");\n\tconst decoder = new TextDecoder(\"utf-8\");\n\n\tglobal.Go = class {\n\t\tconstructor() {\n\t\t\tthis.argv = [\"js\"];\n\t\t\tthis.env = {};\n\t\t\tthis.exit = (code) => {\n\t\t\t\tif (code !== 0) {\n\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t});\n\t\t\tthis._pendingEvent = null;\n\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\tthis._nextCallbackTimeoutID = 1;\n\n\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t}\n\n\t\t\tconst getInt64 = (addr) => {\n\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\treturn low + high * 4294967296;\n\t\t\t}\n\n\t\t\tconst loadValue = (addr) => {\n\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\tif (f === 0) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\treturn f;\n\t\t\t\t}\n\n\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\treturn this._values[id];\n\t\t\t}\n\n\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\tconst nanHead = 0x7FF80000;\n\n\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (v === undefined) {\n\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\tif (id === undefined) {\n\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t}\n\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t}\n\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\tlet typeFlag = 0;\n\t\t\t\tswitch (typeof v) {\n\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t}\n\n\t\t\tconst loadSlice = (addr) => {\n\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t}\n\n\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\tconst a = new Array(len);\n\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t}\n\t\t\t\treturn a;\n\t\t\t}\n\n\t\t\tconst loadString = (addr) => {\n\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t}\n\n\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\tthis.importObject = {\n\t\t\t\tgo: {\n\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\n\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t},\n\n\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t},\n\n\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t},\n\n\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t},\n\n\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t},\n\n\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t));\n\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t},\n\n\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t},\n\n\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t},\n\n\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\n\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t},\n\n\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\tsp = this._inst.exports.getsp() >>> 0; // see comment above\n\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t},\n\n\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t},\n\n\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t},\n\n\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t},\n\n\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t},\n\n\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp() >>> 0; // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\n\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp() >>> 0; // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\n\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp() >>> 0; // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\n\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t},\n\n\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t},\n\n\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t},\n\n\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t},\n\n\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t},\n\n\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\tsp >>>= 0;\n\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t},\n\n\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tasync run(instance) {\n\t\t\tif (!(instance instanceof WebAssembly.Instance)) {\n\t\t\t\tthrow new Error(\"Go.run: WebAssembly.Instance expected\");\n\t\t\t}\n\t\t\tthis._inst = instance;\n\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\tNaN,\n\t\t\t\t0,\n\t\t\t\tnull,\n\t\t\t\ttrue,\n\t\t\t\tfalse,\n\t\t\t\tglobal,\n\t\t\t\tthis,\n\t\t\t];\n\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t[0, 1],\n\t\t\t\t[null, 2],\n\t\t\t\t[true, 3],\n\t\t\t\t[false, 4],\n\t\t\t\t[global, 5],\n\t\t\t\t[this, 6],\n\t\t\t]);\n\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\tthis.exited = false; // whether the Go program has exited\n\n\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\tlet offset = 4096;\n\n\t\t\tconst strPtr = (str) => {\n\t\t\t\tconst ptr = offset;\n\t\t\t\tconst bytes = encoder.encode(str + \"\\\\0\");\n\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\toffset += bytes.length;\n\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t}\n\t\t\t\treturn ptr;\n\t\t\t};\n\n\t\t\tconst argc = this.argv.length;\n\n\t\t\tconst argvPtrs = [];\n\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t});\n\t\t\targvPtrs.push(0);\n\n\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\tkeys.forEach((key) => {\n\t\t\t\targvPtrs.push(strPtr(\\`\\${key}=\\${this.env[key]}\\`));\n\t\t\t});\n\t\t\targvPtrs.push(0);\n\n\t\t\tconst argv = offset;\n\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\toffset += 8;\n\t\t\t});\n\n\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\tif (this.exited) {\n\t\t\t\tthis._resolveExitPromise();\n\t\t\t}\n\t\t\tawait this._exitPromise;\n\t\t}\n\n\t\t_resume() {\n\t\t\tif (this.exited) {\n\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t}\n\t\t\tthis._inst.exports.resume();\n\t\t\tif (this.exited) {\n\t\t\t\tthis._resolveExitPromise();\n\t\t\t}\n\t\t}\n\n\t\t_makeFuncWrapper(id) {\n\t\t\tconst go = this;\n\t\t\treturn function () {\n\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\tgo._pendingEvent = event;\n\t\t\t\tgo._resume();\n\t\t\t\treturn event.result;\n\t\t\t};\n\t\t}\n\t}\n\n\tif (\n\t\ttypeof module !== \"undefined\" &&\n\t\tglobal.require &&\n\t\tglobal.require.main === module &&\n\t\tglobal.process &&\n\t\tglobal.process.versions &&\n\t\t!global.process.versions.electron\n\t) {\n\t\tif (process.argv.length < 3) {\n\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tconst go = new Go();\n\t\tgo.argv = process.argv.slice(2);\n\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\tgo.exit = process.exit;\n\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\tgo._resume();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn go.run(result.instance);\n\t\t}).catch((err) => {\n\t\t\tconsole.error(err);\n\t\t\tprocess.exit(1);\n\t\t});\n\t}\n})();\nonmessage = ({data: wasm}) => {\n let decoder = new TextDecoder();\n let fs = global.fs;\n let stderr = \"\";\n fs.writeSync = (fd, buffer) => {\n if (fd === 1) {\n postMessage(buffer);\n } else if (fd === 2) {\n stderr += decoder.decode(buffer);\n let parts = stderr.split(\"\\\\n\");\n if (parts.length > 1)\n console.log(parts.slice(0, -1).join(\"\\\\n\"));\n stderr = parts[parts.length - 1];\n } else {\n throw new Error(\"Bad write\");\n }\n return buffer.length;\n };\n let stdin = [];\n let resumeStdin;\n let stdinPos = 0;\n onmessage = ({data}) => {\n if (data.length > 0) {\n stdin.push(data);\n if (resumeStdin)\n resumeStdin();\n }\n };\n fs.read = (fd, buffer, offset, length, position, callback) => {\n if (fd !== 0 || offset !== 0 || length !== buffer.length || position !== null) {\n throw new Error(\"Bad read\");\n }\n if (stdin.length === 0) {\n resumeStdin = () => fs.read(fd, buffer, offset, length, position, callback);\n return;\n }\n let first = stdin[0];\n let count = Math.max(0, Math.min(length, first.length - stdinPos));\n buffer.set(first.subarray(stdinPos, stdinPos + count), offset);\n stdinPos += count;\n if (stdinPos === first.length) {\n stdin.shift();\n stdinPos = 0;\n }\n callback(null, count);\n };\n let go = new global.Go();\n go.argv = [\"\", \\`--service=\\${\"0.11.15\"}\\`];\n WebAssembly.instantiate(wasm, go.importObject).then(({instance}) => go.run(instance));\n};}`;\n let worker;\n if (useWorker) {\n let blob = new Blob([code], {type: \"text/javascript\"});\n worker = new Worker(URL.createObjectURL(blob));\n } else {\n let fn = new Function(\"postMessage\", code + `var onmessage; return m => onmessage(m)`);\n let onmessage = fn((data) => worker.onmessage({data}));\n worker = {\n onmessage: null,\n postMessage: (data) => onmessage({data}),\n terminate() {\n }\n };\n }\n worker.postMessage(wasm);\n worker.onmessage = ({data}) => readFromStdout(data);\n let {readFromStdout, service} = createChannel({\n writeToStdin(bytes) {\n worker.postMessage(bytes);\n },\n isSync: false,\n isBrowser: true\n });\n longLivedService = {\n build: (options) => new Promise((resolve, reject) => service.buildOrServe({\n callName: \"build\",\n refs: null,\n serveOptions: null,\n options,\n isTTY: false,\n defaultWD: \"/\",\n callback: (err, res2) => err ? reject(err) : resolve(res2)\n })),\n transform: (input, options) => new Promise((resolve, reject) => service.transform({\n callName: \"transform\",\n refs: null,\n input,\n options: options || {},\n isTTY: false,\n fs: {\n readFile(_, callback) {\n callback(new Error(\"Internal error\"), null);\n },\n writeFile(_, callback) {\n callback(null);\n }\n },\n callback: (err, res2) => err ? reject(err) : resolve(res2)\n })),\n formatMessages: (messages, options) => new Promise((resolve, reject) => service.formatMessages({\n callName: \"formatMessages\",\n refs: null,\n messages,\n options,\n callback: (err, res2) => err ? reject(err) : resolve(res2)\n }))\n };\n};\nexport {\n build,\n buildSync,\n formatMessages,\n formatMessagesSync,\n initialize,\n serve,\n transform,\n transformSync,\n version\n};\n", "import type { Plugin } from 'esbuild';\nexport const EXTERNAL = (): Plugin => {\n return {\n name: 'external-globals',\n setup(build) {\n build.onResolve({ filter: /.*/ }, (args) => {\n if (['chokidar', 'yargs', 'node-fetch'].includes(args.path)) {\n return {\n path: args.path,\n namespace: 'external',\n };\n }\n });\n\n build.onLoad({ filter: /.*/, namespace: 'external' }, (args) => {\n if (args.path === 'node-fetch') \n return { contents: 'export default fetch' };\n \n return {\n contents: `module.exports = ${args.path}`,\n };\n });\n },\n };\n};", "import type { Plugin } from 'esbuild';\nimport { VIRTUAL_FS_NAMESPACE } from \"./virtual-fs\";\nexport const ENTRY = (input: string): Plugin => {\n return {\n name: 'virtual-entry',\n setup(build) {\n build.onResolve({ filter: /^$/ }, () => {\n return {\n path: input,\n namespace: VIRTUAL_FS_NAMESPACE,\n pluginData: {\n importer: '',\n },\n };\n });\n },\n };\n};", "import { Plugin } from 'esbuild';\nimport path from 'path';\nimport { fs } from \"memfs\";\n\nexport const VIRTUAL_FS_NAMESPACE = 'virtualfs';\nexport const resolve = ({ id, importer }: { id: string; importer: string }) => {\n let resolvedPath = id;\n if (importer && id.startsWith('.'))\n resolvedPath = path.resolve(path.dirname(importer), id);\n for (const x of ['', '.ts', '.js', '.css']) {\n const realPath = resolvedPath + x;\n if (fs.existsSync(realPath)) return realPath;\n }\n\n throw new Error(`${resolvedPath} not exists`);\n};\n\nexport const VIRTUAL_FS = (): Plugin => {\n return {\n name: VIRTUAL_FS_NAMESPACE,\n setup(build) {\n build.onResolve({ filter: /.*/, namespace: VIRTUAL_FS_NAMESPACE }, (args) => {\n return {\n path: args.path,\n pluginData: args.pluginData,\n namespace: VIRTUAL_FS_NAMESPACE,\n };\n });\n\n build.onLoad({ filter: /.*/, namespace: VIRTUAL_FS_NAMESPACE }, async (args) => {\n let realPath = args.path;\n const resolvePath = resolve({\n id: args.path,\n importer: args.pluginData.importer\n });\n if (!resolvePath) throw new Error('not found');\n realPath = resolvePath;\n \n const content = (await fs.promises.readFile(realPath)).toString();\n return {\n contents: content,\n pluginData: {\n importer: realPath,\n },\n loader: path.extname(realPath).slice(1) as 'js',\n };\n });\n },\n };\n};", "import { Plugin } from 'esbuild';\nimport { CDN_NAMESPACE } from './cdn';\nexport const UnpkgHost = 'https://unpkg.com/';\nimport path from 'path';\nexport const BARE = (): Plugin => {\n return {\n name: 'bare',\n setup(build) {\n build.onResolve({ filter: /.*/ }, (args) => {\n if (/^(?!\\.).*/.test(args.path) && !path.isAbsolute(args.path)) {\n return {\n path: args.path,\n namespace: CDN_NAMESPACE,\n pluginData: {\n parentUrl: UnpkgHost,\n },\n };\n }\n });\n },\n };\n};", "import { Plugin } from 'esbuild';\nimport { fetchPkg } from './http';\nexport const CDN_NAMESPACE = 'cdn';\nexport const CDN = (): Plugin => {\n const cache: Record = {};\n return {\n name: CDN_NAMESPACE,\n setup(build) {\n build.onLoad({ namespace: CDN_NAMESPACE, filter: /.*/ }, async (args) => {\n const pathUrl = new URL(args.path, args.pluginData.parentUrl).toString();\n let value = cache[pathUrl];\n if (!value) value = await fetchPkg(pathUrl);\n cache[pathUrl] = value;\n return {\n contents: value.content,\n pluginData: {\n parentUrl: value.url,\n },\n };\n });\n\n build.onResolve({ namespace: CDN_NAMESPACE, filter: /.*/ }, async (args) => {\n return {\n namespace: CDN_NAMESPACE,\n path: args.path,\n pluginData: args.pluginData,\n };\n });\n },\n };\n};", "// Based on https://github.com/hardfist/neo-tools/blob/main/packages/bundler/src/plugins/http.ts\nimport { Plugin } from 'esbuild';\n\nexport async function fetchPkg(url: string) {\n const res = await fetch(url);\n return {\n url: res.url,\n content: await res.text(),\n };\n}\n\nexport const HTTP = (): Plugin => {\n return {\n name: 'http',\n setup(build) {\n // Intercept import paths starting with \"http:\" and \"https:\" so\n // esbuild doesn't attempt to map them to a file system location.\n // Tag them with the \"http-url\" namespace to associate them with\n // this plugin.\n build.onResolve({ filter: /^https?:\\/\\// }, args => ({\n path: new URL(args.path, args.resolveDir.replace(/^\\//, '')).toString(),\n namespace: 'http-url',\n }))\n\n // We also want to intercept all import paths inside downloaded\n // files and resolve them against the original URL. All of these\n // files will be in the \"http-url\" namespace. Make sure to keep\n // the newly resolved URL in the \"http-url\" namespace so imports\n // inside it will also be resolved as URLs recursively.\n build.onResolve({ filter: /.*/, namespace: 'http-url' }, args => ({\n path: new URL(args.path, args.importer).toString(),\n namespace: 'http-url',\n }))\n\n // When a URL is loaded, we want to actually download the content\n // from the internet. This has just enough logic to be able to\n // handle the example import from unpkg.com but in reality this\n // would probably need to be more complex.\n build.onLoad({ filter: /.*/, namespace: 'http-url' }, async (args) => {\n const { content, url } = await fetchPkg(args.path);\n\n return {\n contents: content,\n loader: 'ts',\n resolveDir: `/${url}`, // a hack fix resolveDir problem\n };\n });\n },\n };\n};", "\n/*! pako 2.0.3 https://github.com/nodeca/pako @license (MIT AND Zlib) */\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED = 1;\n//const Z_HUFFMAN_ONLY = 2;\n//const Z_RLE = 3;\nconst Z_FIXED = 4;\n//const Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY = 0;\nconst Z_TEXT = 1;\n//const Z_ASCII = 1; // = Z_TEXT\nconst Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES = 30;\n/* number of distance codes */\n\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK = 256;\n/* end of block literal code */\n\nconst REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits = /* extra bits for each length code */\n new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);\n\nconst extra_dbits = /* extra bits for each distance code */\n new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);\n\nconst extra_blbits = /* extra bits for each bit length code */\n new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n let res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nconst gen_bitlen = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const max_code = desc.max_code;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const extra = desc.stat_desc.extra_bits;\n const base = desc.stat_desc.extra_base;\n const max_length = desc.stat_desc.max_length;\n let h; /* heap index */\n let n, m; /* iterate over the tree elements */\n let bits; /* bit length */\n let xbits; /* extra bits */\n let f; /* frequency */\n let overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) =>\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n const next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n let code = 0; /* running code value */\n let bits; /* bit index */\n let n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< {\n\n let n; /* iterates over tree elements */\n let bits; /* bit counter */\n let length; /* length value */\n let code; /* code value */\n let dist; /* distance index */\n const bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n let n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nconst copy_block = (s, buf, len, header) =>\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n s.pending_buf.set(s.window.subarray(buf, buf + len), s.pending);\n s.pending += len;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n const _n2 = n * 2;\n const _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n const v = s.heap[k];\n let j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) =>\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n let dist; /* distance of matched string */\n let lc; /* match length or unmatched char (if dist == 0) */\n let lx = 0; /* running index in l_buf */\n let code; /* the code to send */\n let extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const elems = desc.stat_desc.elems;\n let n, m; /* iterate over heap elements */\n let max_code = -1; /* largest code with non zero frequency */\n let node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n let max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) =>\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n let rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n let black_mask = 0xf3ffc07f;\n let n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init = (s) =>\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align = (s) => {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nconst _tr_flush_block = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n let opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n let max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally = (s, dist, lc) =>\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //let out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n};\n\nvar _tr_init_1 = _tr_init;\nvar _tr_stored_block_1 = _tr_stored_block;\nvar _tr_flush_block_1 = _tr_flush_block;\nvar _tr_tally_1 = _tr_tally;\nvar _tr_align_1 = _tr_align;\n\nvar trees = {\n\t_tr_init: _tr_init_1,\n\t_tr_stored_block: _tr_stored_block_1,\n\t_tr_flush_block: _tr_flush_block_1,\n\t_tr_tally: _tr_tally_1,\n\t_tr_align: _tr_align_1\n};\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n};\n\n\nvar adler32_1 = adler32;\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n};\n\n\nvar crc32_1 = crc32;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar messages = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar constants = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init: _tr_init$1, _tr_stored_block: _tr_stored_block$1, _tr_flush_block: _tr_flush_block$1, _tr_tally: _tr_tally$1, _tr_align: _tr_align$1 } = trees;\n\n\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_PARTIAL_FLUSH, Z_FULL_FLUSH, Z_FINISH, Z_BLOCK,\n Z_OK, Z_STREAM_END, Z_STREAM_ERROR, Z_DATA_ERROR, Z_BUF_ERROR,\n Z_DEFAULT_COMPRESSION,\n Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED: Z_FIXED$1, Z_DEFAULT_STRATEGY,\n Z_UNKNOWN: Z_UNKNOWN$1,\n Z_DEFLATED\n} = constants;\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES$1 = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS$1 = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES$1 = LITERALS$1 + 1 + LENGTH_CODES$1;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES$1 = 30;\n/* number of distance codes */\nconst BL_CODES$1 = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE$1 = 2 * L_CODES$1 + 1;\n/* maximum heap size */\nconst MAX_BITS$1 = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH$1 = 3;\nconst MAX_MATCH$1 = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH$1 + MIN_MATCH$1 + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst EXTRA_STATE = 69;\nconst NAME_STATE = 73;\nconst COMMENT_STATE = 91;\nconst HCRC_STATE = 103;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\nconst BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n strm.msg = messages[errorCode];\n return errorCode;\n};\n\nconst rank = (f) => {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero$1 = (buf) => {\n let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n const s = strm.state;\n\n //_tr_flush_bits(s);\n let len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n};\n\n\nconst flush_block_only = (s, last) => {\n _tr_flush_block$1(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n // put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n let len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32_1(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32_1(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n let chain_length = s.max_chain_length; /* max hash chain length */\n let scan = s.strstart; /* current string */\n let match; /* matched string */\n let len; /* length of current match */\n let best_len = s.prev_length; /* best match length so far */\n let nice_match = s.nice_match; /* stop if match long enough */\n const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n const _win = s.window; // shortcut\n\n const wmask = s.w_mask;\n const prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n const strend = s.strstart + MAX_MATCH$1;\n let scan_end1 = _win[scan + best_len - 1];\n let scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH$1 - (strend - scan);\n scan = strend - MAX_MATCH$1;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nconst fill_window = (s) => {\n\n const _w_size = s.w_size;\n let p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n s.window.set(s.window.subarray(_w_size, _w_size + _w_size), 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH$1) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH$1 - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH$1) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// const curr = s.strstart + s.lookahead;\n// let init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nconst deflate_stored = (s, flush) => {\n\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n let max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n const max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n};\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n let hash_head; /* head of the hash chain */\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH$1) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH$1) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally$1(s, s.strstart - s.match_start, s.match_length - MIN_MATCH$1);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH$1) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH$1 - 1)) ? s.strstart : MIN_MATCH$1 - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n let hash_head; /* head of hash chain */\n let bflush; /* set if current block must be flushed */\n\n let max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH$1) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH$1 - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH$1 && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH$1 - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH$1 && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH$1;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally$1(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH$1);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH$1 - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH$1 - 1 ? s.strstart : MIN_MATCH$1 - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n let prev; /* byte at distance one to match */\n let scan, strend; /* scan goes up to strend for length of run */\n\n const _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH$1) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH$1 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH$1 && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH$1;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH$1 - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH$1) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally$1(s, 1, s.match_length - MIN_MATCH$1);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nconst configuration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero$1(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH$1 - 1;\n s.match_available = 0;\n s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Uint16Array(HEAP_SIZE$1 * 2);\n this.dyn_dtree = new Uint16Array((2 * D_CODES$1 + 1) * 2);\n this.bl_tree = new Uint16Array((2 * BL_CODES$1 + 1) * 2);\n zero$1(this.dyn_ltree);\n zero$1(this.dyn_dtree);\n zero$1(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Uint16Array(MAX_BITS$1 + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Uint16Array(2 * L_CODES$1 + 1); /* heap used to build the Huffman trees */\n zero$1(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new Uint16Array(2 * L_CODES$1 + 1); //uch depth[2*L_CODES+1];\n zero$1(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nconst deflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN$1;\n\n const s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n _tr_init$1(s);\n return Z_OK;\n};\n\n\nconst deflateReset = (strm) => {\n\n const ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n let wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED$1) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n const s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH$1 - 1) / MIN_MATCH$1);\n\n s.window = new Uint8Array(s.w_size * 2);\n s.head = new Uint16Array(s.hash_size);\n s.prev = new Uint16Array(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n};\n\n\nconst deflate = (strm, flush) => {\n\n let beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n const old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n let header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n let level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n let bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align$1(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block$1(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero$1(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n};\n\n\nconst deflateEnd = (strm) => {\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n const status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n let dictLength = dictionary.length;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n const wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32_1(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero$1(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n let tmpDict = new Uint8Array(s.w_size);\n tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n const avail = strm.avail_in;\n const next = strm.next_in;\n const input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH$1) {\n let str = s.strstart;\n let n = s.lookahead - (MIN_MATCH$1 - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH$1 - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH$1 - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH$1 - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n};\n\n\nvar deflateInit_1 = deflateInit;\nvar deflateInit2_1 = deflateInit2;\nvar deflateReset_1 = deflateReset;\nvar deflateResetKeep_1 = deflateResetKeep;\nvar deflateSetHeader_1 = deflateSetHeader;\nvar deflate_2 = deflate;\nvar deflateEnd_1 = deflateEnd;\nvar deflateSetDictionary_1 = deflateSetDictionary;\nvar deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n\nvar deflate_1 = {\n\tdeflateInit: deflateInit_1,\n\tdeflateInit2: deflateInit2_1,\n\tdeflateReset: deflateReset_1,\n\tdeflateResetKeep: deflateResetKeep_1,\n\tdeflateSetHeader: deflateSetHeader_1,\n\tdeflate: deflate_2,\n\tdeflateEnd: deflateEnd_1,\n\tdeflateSetDictionary: deflateSetDictionary_1,\n\tdeflateInfo: deflateInfo\n};\n\nconst _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nvar assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// Join array of chunks to single array.\nvar flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n};\n\nvar common = {\n\tassign: assign,\n\tflattenChunks: flattenChunks\n};\n\n// String encode/decode helpers\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nvar string2buf = (str) => {\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n};\n\n\n// convert array to string\nvar buf2string = (buf, max) => {\n let i, out;\n const len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nvar utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\nvar strings = {\n\tstring2buf: string2buf,\n\tbuf2string: buf2string,\n\tutf8border: utf8border\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nvar zstream = ZStream;\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$1, Z_SYNC_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$1,\n Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1,\n Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,\n Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,\n Z_DEFLATED: Z_DEFLATED$1\n} = constants;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n this.options = common.assign({\n level: Z_DEFAULT_COMPRESSION$1,\n method: Z_DEFLATED$1,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY$1\n }, options || {});\n\n let opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = deflate_1.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK$1) {\n throw new Error(messages[status]);\n }\n\n if (opt.header) {\n deflate_1.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n let dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = deflate_1.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK$1) {\n throw new Error(messages[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n let status, _flush_mode;\n\n if (this.ended) { return false; }\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH$1 : Z_NO_FLUSH$1;\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n // Make sure avail_out > 6 to avoid repeating markers\n if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH$1) && strm.avail_out <= 6) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n status = deflate_1.deflate(strm, _flush_mode);\n\n // Ended => flush and finish\n if (status === Z_STREAM_END$1) {\n if (strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n }\n status = deflate_1.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK$1;\n }\n\n // Flush if out buffer full\n if (strm.avail_out === 0) {\n this.onData(strm.output);\n continue;\n }\n\n // Flush if requested and has data\n if (_flush_mode > 0 && strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK$1) {\n this.result = common.flattenChunks(this.chunks);\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate$1(input, options) {\n const deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || messages[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate$1(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate$1(input, options);\n}\n\n\nvar Deflate_1 = Deflate;\nvar deflate_2$1 = deflate$1;\nvar deflateRaw_1 = deflateRaw;\nvar gzip_1 = gzip;\nvar constants$1 = constants;\n\nvar deflate_1$1 = {\n\tDeflate: Deflate_1,\n\tdeflate: deflate_2$1,\n\tdeflateRaw: deflateRaw_1,\n\tgzip: gzip_1,\n\tconstants: constants$1\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD = 30; /* got a data error -- remain here until reset */\nconst TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nvar inffast = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n//#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n let base_index = 0;\n// let shoextra; /* extra bits table to use */\n let end; /* use base and extra for symbol > end */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n let extra_index = 0;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\nvar inftrees = inflate_table;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\nconst CODES$1 = 0;\nconst LENS$1 = 1;\nconst DISTS$1 = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_FINISH: Z_FINISH$2, Z_BLOCK: Z_BLOCK$1, Z_TREES,\n Z_OK: Z_OK$2, Z_STREAM_END: Z_STREAM_END$2, Z_NEED_DICT, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR, Z_BUF_ERROR: Z_BUF_ERROR$1,\n Z_DEFLATED: Z_DEFLATED$2\n} = constants;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst HEAD = 1; /* i: waiting for magic header */\nconst FLAGS = 2; /* i: waiting for method and flags (gzip) */\nconst TIME = 3; /* i: waiting for modification time (gzip) */\nconst OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nconst EXLEN = 5; /* i: waiting for extra length (gzip) */\nconst EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nconst NAME = 7; /* i: waiting for end of file name (gzip) */\nconst COMMENT = 8; /* i: waiting for end of comment (gzip) */\nconst HCRC = 9; /* i: waiting for header crc (gzip) */\nconst DICTID = 10; /* i: waiting for dictionary check value */\nconst DICT = 11; /* waiting for inflateSetDictionary() call */\nconst TYPE$1 = 12; /* i: waiting for type bits, including last-flag bit */\nconst TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nconst STORED = 14; /* i: waiting for stored size (length and complement) */\nconst COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nconst COPY = 16; /* i/o: waiting for input or output to copy stored block */\nconst TABLE = 17; /* i: waiting for dynamic block table lengths */\nconst LENLENS = 18; /* i: waiting for code length code lengths */\nconst CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nconst LEN_ = 20; /* i: same as LEN below, but only first time in */\nconst LEN = 21; /* i: waiting for length/lit/eob code */\nconst LENEXT = 22; /* i: waiting for length extra bits */\nconst DIST = 23; /* i: waiting for distance code */\nconst DISTEXT = 24; /* i: waiting for distance extra bits */\nconst MATCH = 25; /* o: waiting for output space to copy string */\nconst LIT = 26; /* o: waiting for output space to write literal */\nconst CHECK = 27; /* i: waiting for 32-bit check value */\nconst LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nconst DONE = 29; /* finished check, done -- remain here until reset */\nconst BAD$1 = 30; /* got a data error -- remain here until reset */\nconst MEM = 31; /* got an inflate() memory error -- remain here until reset */\nconst SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS$1 = 852;\nconst ENOUGH_DISTS$1 = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS$1 = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS$1;\n\n\nconst zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\n\nconst inflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS$1);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS$1);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK$2;\n};\n\n\nconst inflateReset = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR$1;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR$1; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK$2) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inftrees(LENS$1, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inftrees(DISTS$1, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n};\n\n\nconst inflate = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR$1;\n }\n\n state = strm.state;\n if (state.mode === TYPE$1) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK$2;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD$1;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED$2) {\n strm.msg = 'unknown compression method';\n state.mode = BAD$1;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD$1;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE$1;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED$2) {\n strm.msg = 'unknown compression method';\n state.mode = BAD$1;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD$1;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32_1(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD$1;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE$1;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE$1;\n /* falls through */\n case TYPE$1:\n if (flush === Z_BLOCK$1 || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD$1;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD$1;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE$1;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD$1;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inftrees(CODES$1, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD$1;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD$1;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD$1;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD$1) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD$1;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inftrees(LENS$1, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD$1;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inftrees(DISTS$1, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD$1;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inffast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE$1) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE$1;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD$1;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD$1;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD$1;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD$1;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END$2;\n break inf_leave;\n case BAD$1:\n ret = Z_DATA_ERROR$1;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR$1;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD$1 &&\n (state.mode < CHECK || flush !== Z_FINISH$2))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE$1 ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH$2) && ret === Z_OK$2) {\n ret = Z_BUF_ERROR$1;\n }\n return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR$1;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK$2;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK$2;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR$1; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR$1;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32_1(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR$1;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK$2;\n};\n\n\nvar inflateReset_1 = inflateReset;\nvar inflateReset2_1 = inflateReset2;\nvar inflateResetKeep_1 = inflateResetKeep;\nvar inflateInit_1 = inflateInit;\nvar inflateInit2_1 = inflateInit2;\nvar inflate_2 = inflate;\nvar inflateEnd_1 = inflateEnd;\nvar inflateGetHeader_1 = inflateGetHeader;\nvar inflateSetDictionary_1 = inflateSetDictionary;\nvar inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\n*/\n\nvar inflate_1 = {\n\tinflateReset: inflateReset_1,\n\tinflateReset2: inflateReset2_1,\n\tinflateResetKeep: inflateResetKeep_1,\n\tinflateInit: inflateInit_1,\n\tinflateInit2: inflateInit2_1,\n\tinflate: inflate_2,\n\tinflateEnd: inflateEnd_1,\n\tinflateGetHeader: inflateGetHeader_1,\n\tinflateSetDictionary: inflateSetDictionary_1,\n\tinflateInfo: inflateInfo\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nvar gzheader = GZheader;\n\nconst toString$1 = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$2, Z_FINISH: Z_FINISH$3,\n Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_MEM_ERROR: Z_MEM_ERROR$1\n} = constants;\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n this.options = common.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = inflate_1.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK$3) {\n throw new Error(messages[status]);\n }\n\n this.header = new gzheader();\n\n inflate_1.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = inflate_1.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK$3) {\n throw new Error(messages[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH$3 : Z_NO_FLUSH$2;\n\n // Convert data if needed\n if (toString$1.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = inflate_1.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT$1 && dictionary) {\n status = inflate_1.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK$3) {\n status = inflate_1.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR$2) {\n // Replace code with more verbose\n status = Z_NEED_DICT$1;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END$3 &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n inflate_1.inflateReset(strm);\n status = inflate_1.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR$2:\n case Z_DATA_ERROR$2:\n case Z_NEED_DICT$1:\n case Z_MEM_ERROR$1:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END$3) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK$3 && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END$3) {\n status = inflate_1.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK$3) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = common.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate$1(input, options) {\n const inflator = new Inflate(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || messages[inflator.err];\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate$1(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nvar Inflate_1 = Inflate;\nvar inflate_2$1 = inflate$1;\nvar inflateRaw_1 = inflateRaw;\nvar ungzip = inflate$1;\nvar constants$2 = constants;\n\nvar inflate_1$1 = {\n\tInflate: Inflate_1,\n\tinflate: inflate_2$1,\n\tinflateRaw: inflateRaw_1,\n\tungzip: ungzip,\n\tconstants: constants$2\n};\n\nconst { Deflate: Deflate$1, deflate: deflate$2, deflateRaw: deflateRaw$1, gzip: gzip$1 } = deflate_1$1;\n\nconst { Inflate: Inflate$1, inflate: inflate$2, inflateRaw: inflateRaw$1, ungzip: ungzip$1 } = inflate_1$1;\n\n\n\nvar Deflate_1$1 = Deflate$1;\nvar deflate_1$2 = deflate$2;\nvar deflateRaw_1$1 = deflateRaw$1;\nvar gzip_1$1 = gzip$1;\nvar Inflate_1$1 = Inflate$1;\nvar inflate_1$2 = inflate$2;\nvar inflateRaw_1$1 = inflateRaw$1;\nvar ungzip_1 = ungzip$1;\nvar constants_1 = constants;\n\nvar pako = {\n\tDeflate: Deflate_1$1,\n\tdeflate: deflate_1$2,\n\tdeflateRaw: deflateRaw_1$1,\n\tgzip: gzip_1$1,\n\tInflate: Inflate_1$1,\n\tinflate: inflate_1$2,\n\tinflateRaw: inflateRaw_1$1,\n\tungzip: ungzip_1,\n\tconstants: constants_1\n};\n\nexport default pako;\nexport { Deflate_1$1 as Deflate, Inflate_1$1 as Inflate, constants_1 as constants, deflate_1$2 as deflate, deflateRaw_1$1 as deflateRaw, gzip_1$1 as gzip, inflate_1$2 as inflate, inflateRaw_1$1 as inflateRaw, ungzip_1 as ungzip };\n"], + "mappings": ";6qBAAA,+WAKA,aAA4B,CACxB,KAAM,IAAI,OAAM,mCAEpB,aAA+B,CAC3B,KAAM,IAAI,OAAM,qCAWpB,YAAoB,EAAK,CACrB,GAAI,KAAqB,WAErB,MAAO,YAAW,EAAK,GAG3B,GAAK,MAAqB,IAAoB,CAAC,KAAqB,WAChE,UAAmB,WACZ,WAAW,EAAK,GAE3B,GAAI,CAEA,MAAO,IAAiB,EAAK,SACxB,EAAP,CACE,GAAI,CAEA,MAAO,IAAiB,KAAK,KAAM,EAAK,SACnC,EAAP,CAEE,MAAO,IAAiB,KAAK,KAAM,EAAK,KAIpD,YAAyB,EAAQ,CAC7B,GAAI,KAAuB,aAEvB,MAAO,cAAa,GAGxB,GAAK,MAAuB,IAAuB,CAAC,KAAuB,aACvE,UAAqB,aACd,aAAa,GAExB,GAAI,CAEA,MAAO,IAAmB,SACrB,EAAP,CACE,GAAI,CAEA,MAAO,IAAmB,KAAK,KAAM,SAChC,EAAP,CAGE,MAAO,IAAmB,KAAK,KAAM,KASjD,aAA2B,CACvB,AAAI,CAAC,IAAY,CAAC,IAGlB,IAAW,GACX,AAAI,GAAa,OACb,GAAQ,GAAa,OAAO,IAE5B,GAAa,GAEb,GAAM,QACN,MAIR,aAAsB,CAClB,GAAI,IAGJ,IAAI,GAAU,GAAW,IACzB,GAAW,GAGX,OADI,GAAM,GAAM,OACT,GAAK,CAGR,IAFA,GAAe,GACf,GAAQ,GACD,EAAE,GAAa,GAClB,AAAI,IACA,GAAa,IAAY,MAGjC,GAAa,GACb,EAAM,GAAM,OAEhB,GAAe,KACf,GAAW,GACX,GAAgB,IAEpB,YAAkB,EAAK,CACnB,GAAI,GAAO,GAAI,OAAM,UA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C,KAC/D,GAAI,CAAE,UAAW,GAAK,EAAS,CAAE,MAAO,IACpC,EAAO,eAAY,GACvB,MAAI,KAAQ,QAAQ,IAAI,IAAK,SAAY,KAClC,QACF,EAAP,CACE,QAAQ,KAAK,sBAAuB", + "names": [] +} diff --git a/docs/js/legacy.min.js b/docs/js/legacy.min.js index 0f61e234..1ec8eaa4 100644 --- a/docs/js/legacy.min.js +++ b/docs/js/legacy.min.js @@ -1 +1 @@ -(()=>{var o=document.querySelector(".navbar"),r=!0,t=()=>{if(r){let e;r=!1,e=requestAnimationFrame(()=>{o.classList.toggle("shadow",window.scrollY>=5),r=!0,e=window.cancelAnimationFrame(e)})}};window.addEventListener("scroll",t,{passive:!0});})(); +(()=>{var p=Object.create,a=Object.defineProperty,w=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,b=Object.getOwnPropertyNames,L=Object.getOwnPropertyDescriptor;var v=e=>a(e,"__esModule",{value:!0});var y=(e,t,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of b(t))!f.call(e,r)&&r!=="default"&&a(e,r,{get:()=>t[r],enumerable:!(n=L(t,r))||n.enumerable});return e},c=e=>y(v(a(e!=null?p(w(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);function h(e){let t=document.createElement("a");return t.setAttribute("href",e),t.cloneNode(!1).href}function g(e){return new Promise((t,n)=>{let r="$importModule$"+Math.random().toString(32).slice(2),o=document.createElement("script"),s=()=>{delete window[r],o.onerror=null,o.onload=null,o.remove(),URL.revokeObjectURL(o.src),o.src=""};o.defer="defer",o.type="module",o.onerror=()=>{n(new Error(`Failed to import: ${e}`)),s()},o.onload=()=>{t(window[r]),s()};let d=`import * as m from "${h(e)}"; window.${r} = m;`,u=new Blob([d],{type:"text/javascript"});o.src=URL.createObjectURL(u),document.head.appendChild(o)})}var i=g;var R={},U=document.querySelector(".navbar"),l=!0,E=()=>{if(l){let e;l=!1,e=requestAnimationFrame(()=>{U.classList.toggle("shadow",window.scrollY>=5),l=!0,e=window.cancelAnimationFrame(e)})}},m=!1;try{let e=R;m=!0}catch(e){}var M=async e=>await(m?Promise.resolve().then(()=>c(require(e))):i(e));(async()=>{let{default:e}=await M("./esbuild.js");console.log(await e("pako")),console.log(await e("@okikio/manager"))})();window.addEventListener("scroll",E,{passive:!0});})(); diff --git a/docs/js/modern.min.js b/docs/js/modern.min.js index 90c7f1a7..2645c50c 100644 --- a/docs/js/modern.min.js +++ b/docs/js/modern.min.js @@ -1 +1,2 @@ -var o=document.querySelector(".navbar"),r=!0,t=()=>{if(r){let e;r=!1,e=requestAnimationFrame(()=>{o.classList.toggle("shadow",window.scrollY>=5),r=!0,e=window.cancelAnimationFrame(e)})}};window.addEventListener("scroll",t,{passive:!0}); +function d(e){let o=document.createElement("a");return o.setAttribute("href",e),o.cloneNode(!1).href}function u(e){return new Promise((o,c)=>{let r="$importModule$"+Math.random().toString(32).slice(2),t=document.createElement("script"),a=()=>{delete window[r],t.onerror=null,t.onload=null,t.remove(),URL.revokeObjectURL(t.src),t.src=""};t.defer="defer",t.type="module",t.onerror=()=>{c(new Error(`Failed to import: ${e}`)),a()},t.onload=()=>{o(window[r]),a()};let i=`import * as m from "${d(e)}"; window.${r} = m;`,m=new Blob([i],{type:"text/javascript"});t.src=URL.createObjectURL(m),document.head.appendChild(t)})}var l=u;var p=document.querySelector(".navbar"),n=!0,w=()=>{if(n){let e;n=!1,e=requestAnimationFrame(()=>{p.classList.toggle("shadow",window.scrollY>=5),n=!0,e=window.cancelAnimationFrame(e)})}},s=!1;try{let e=import.meta;s=!0}catch(e){}var f=async e=>await(s?import(e):l(e));(async()=>{let{default:e}=await f("./esbuild.js");console.log(await e("pako")),console.log(await e("@okikio/manager"))})();window.addEventListener("scroll",w,{passive:!0}); +//# sourceMappingURL=modern.min.js.map diff --git a/docs/js/modern.min.js.map b/docs/js/modern.min.js.map new file mode 100644 index 00000000..43d76b7d --- /dev/null +++ b/docs/js/modern.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["node_modules/.pnpm/@uupaa+dynamic-import-polyfill@1.0.2/node_modules/@uupaa/dynamic-import-polyfill/importModule.js", "src/ts/main.ts"], + "sourcesContent": ["function toAbsoluteURL(url) {\n const a = document.createElement(\"a\");\n a.setAttribute(\"href\", url); // \n return a.cloneNode(false).href; // -> \"http://example.com/hoge.html\"\n}\n\nexport function importModule(url) {\n return new Promise((resolve, reject) => {\n const vector = \"$importModule$\" + Math.random().toString(32).slice(2);\n const script = document.createElement(\"script\");\n const destructor = () => {\n delete window[vector];\n script.onerror = null;\n script.onload = null;\n script.remove();\n URL.revokeObjectURL(script.src);\n script.src = \"\";\n };\n script.defer = \"defer\";\n script.type = \"module\";\n script.onerror = () => {\n reject(new Error(`Failed to import: ${url}`));\n destructor();\n };\n script.onload = () => {\n resolve(window[vector]);\n destructor();\n };\n const absURL = toAbsoluteURL(url);\n const loader = `import * as m from \"${absURL}\"; window.${vector} = m;`; // export Module\n const blob = new Blob([loader], { type: \"text/javascript\" });\n script.src = URL.createObjectURL(blob);\n\n document.head.appendChild(script);\n });\n}\n\nexport default importModule;\n\n", "import importModule from \"@uupaa/dynamic-import-polyfill\";\nconst navbar = document.querySelector(\".navbar\") as HTMLElement;\nlet canScroll = true;\n\nconst scroll = () => {\n if (canScroll) {\n let raf: number | void;\n canScroll = false;\n raf = requestAnimationFrame(() => {\n navbar.classList.toggle(\"shadow\", window.scrollY >= 5);\n\n canScroll = true;\n raf = window.cancelAnimationFrame(raf as number);\n });\n }\n};\n\nlet supportDynamicImport = false;\ntry {\n let meta = import.meta;\n supportDynamicImport = true;\n} catch (e) { }\n\nconst importShim = async (id: string) => await (supportDynamicImport ? import(id) : importModule(id));\n\n(async () => {\n const { default: size } = await importShim(\"./esbuild.js\");\n console.log(await size(\"pako\"));\n console.log(await size(\"@okikio/manager\"));\n})();\n\nwindow.addEventListener(\"scroll\", scroll, { passive: true });\n\n"], + "mappings": "AAAA,WAAuB,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c0d890 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -3,6 +3,8 @@ const mode = process.argv.includes("--watch") ? "watch" : "build"; // Gulp utilities import { watch, task, series, parallel, stream, streamList } from "./util.js"; +import { createRequire } from 'module'; +const require = createRequire(import.meta.url); // Origin folders (source and destination folders) const srcFolder = `src`; @@ -98,11 +100,11 @@ task("js", async () => { const [ { default: gulpEsBuild, createGulpEsbuild }, { default: gzipSize }, - { default: prettyBytes }, + { default: prettyBytes } ] = await Promise.all([ import("gulp-esbuild"), import("gzip-size"), - import("pretty-bytes"), + import("pretty-bytes") ]); const esbuild = mode == "watch" ? createGulpEsbuild() : gulpEsBuild; @@ -119,6 +121,7 @@ task("js", async () => { // Bundle Modules esbuild({ ...esbuildConfig, + sourcemap: true, format: "esm", target: ["chrome83"], outfile: "modern.min.js" @@ -129,7 +132,7 @@ task("js", async () => { console.log( `=> \`modern\` Gzip size - ${prettyBytes( await gzipSize.file(`${jsFolder}/modern.min.js`) - )}\n` + )}` ); }, }), @@ -150,11 +153,27 @@ task("js", async () => { console.log( `=> \`legacy\` Gzip size - ${prettyBytes( await gzipSize.file(`${jsFolder}/legacy.min.js`) - )}\n` + )}` ); }, }), + // Modules js + stream(`${tsFolder}/modules/*.ts`, { + pipes: [ + // Bundle Modules + esbuild({ + ...esbuildConfig, + sourcemap: true, + banner: { js: 'const global = globalThis;' }, + inject: ["./shims/node-shim.js"], + format: "esm", + target: ["chrome62"] + }), + ], + dest: jsFolder, // Output + }), + // Other js stream([`${tsFolder}/*.ts`, `!${tsFolder}/main.ts`], { pipes: [ diff --git a/package.json b/package.json index 21ebb37a..dc05068f 100644 --- a/package.json +++ b/package.json @@ -30,12 +30,29 @@ } }, "dependencies": { - "esbuild-wasm": "^0.11.15" + "@uupaa/dynamic-import-polyfill": "^1.0.2", + "assert": "^2.0.0", + "buffer": "^6.0.3", + "crypto-browserify": "^3.12.0", + "esbuild-wasm": "^0.11.15", + "events": "^3.3.0", + "memfs": "^3.2.2", + "os-browserify": "^0.3.0", + "pako": "^2.0.3", + "path": "^0.12.7", + "path-browserify": "^1.0.1", + "pretty-bytes": "^5.6.0", + "stream": "^0.0.2", + "stream-browserify": "^3.0.0", + "tty-browserify": "^0.0.1", + "url": "^0.11.0", + "vm-browserify": "^1.1.2" }, "devDependencies": { "@commitlint/cli": "^12.1.1", "@commitlint/config-conventional": "^12.1.1", "@csstools/postcss-sass": "^4.0.0", + "@types/node": "^15.0.1", "autoprefixer": "^10.2.5", "browser-sync": "^2.26.14", "commitizen": "^4.2.3", @@ -54,7 +71,6 @@ "postcss-cli": "^8.3.1", "postcss-csso": "^5.0.1", "postcss-scss": "^3.0.5", - "pretty-bytes": "^5.6.0", "sass": "^1.32.11", "standard-version": "^9.2.0", "tailwindcss": "^2.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index edeb6318..85db241d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,12 +4,18 @@ specifiers: '@commitlint/cli': ^12.1.1 '@commitlint/config-conventional': ^12.1.1 '@csstools/postcss-sass': ^4.0.0 + '@types/node': ^15.0.1 + '@uupaa/dynamic-import-polyfill': ^1.0.2 + assert: ^2.0.0 autoprefixer: ^10.2.5 browser-sync: ^2.26.14 + buffer: ^6.0.3 commitizen: ^4.2.3 + crypto-browserify: ^3.12.0 del: ^6.0.0 esbuild: ^0.11.14 esbuild-wasm: ^0.11.15 + events: ^3.3.0 gulp: ^4.0.2 gulp-esbuild: ^0.7.4 gulp-plumber: ^1.2.1 @@ -18,6 +24,11 @@ specifiers: gulp-rename: ^2.0.0 gzip-size: ^6.0.0 husky: ^6.0.0 + memfs: ^3.2.2 + os-browserify: ^0.3.0 + pako: ^2.0.3 + path: ^0.12.7 + path-browserify: ^1.0.1 pnpm: ^6.2.1 postcss: ^8.2.12 postcss-cli: ^8.3.1 @@ -26,16 +37,38 @@ specifiers: pretty-bytes: ^5.6.0 sass: ^1.32.11 standard-version: ^9.2.0 + stream: ^0.0.2 + stream-browserify: ^3.0.0 tailwindcss: ^2.1.2 + tty-browserify: ^0.0.1 ultra-runner: ^3.10.5 + url: ^0.11.0 + vm-browserify: ^1.1.2 dependencies: + '@uupaa/dynamic-import-polyfill': 1.0.2 + assert: 2.0.0 + buffer: 6.0.3 + crypto-browserify: 3.12.0 esbuild-wasm: 0.11.15 + events: 3.3.0 + memfs: 3.2.2 + os-browserify: 0.3.0 + pako: 2.0.3 + path: 0.12.7 + path-browserify: 1.0.1 + pretty-bytes: 5.6.0 + stream: 0.0.2 + stream-browserify: 3.0.0 + tty-browserify: 0.0.1 + url: 0.11.0 + vm-browserify: 1.1.2 devDependencies: '@commitlint/cli': 12.1.1 '@commitlint/config-conventional': 12.1.1 '@csstools/postcss-sass': 4.0.0 + '@types/node': 15.0.1 autoprefixer: 10.2.5_postcss@8.2.13 browser-sync: 2.26.14 commitizen: 4.2.3 @@ -54,7 +87,6 @@ devDependencies: postcss-cli: 8.3.1_postcss@8.2.13 postcss-csso: 5.0.1_postcss@8.2.13 postcss-scss: 3.0.5 - pretty-bytes: 5.6.0 sass: 1.32.11 standard-version: 9.2.0 tailwindcss: 2.1.2_941a81a5c9afb5d3c8bce0db60f786b1 @@ -275,6 +307,10 @@ packages: resolution: {integrity: sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==} dev: true + /@types/node/15.0.1: + resolution: {integrity: sha512-TMkXt0Ck1y0KKsGr9gJtWGjttxlZnnvDtphxUOSd0bfaR6Q1jle+sPvrzNR1urqYTWMinoKvjKfXUGsumaO1PA==} + dev: true + /@types/normalize-package-data/2.4.0: resolution: {integrity: sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==} dev: true @@ -287,6 +323,10 @@ packages: resolution: {integrity: sha1-h3L80EGOPNLMFxVV1zAHQVBR9LI=} dev: true + /@uupaa/dynamic-import-polyfill/1.0.2: + resolution: {integrity: sha512-V3vzdXunOKKob1F+2ldv/4iGQoQA/iyqtW8PVlr1v16xCCKL831pGUubT+vs5/9wxTE/zBKEhjIjmmpK6nqw2A==} + dev: false + /JSONStream/1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true @@ -527,6 +567,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /array-filter/1.0.0: + resolution: {integrity: sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=} + dev: false + /array-find-index/1.0.2: resolution: {integrity: sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=} engines: {node: '>=0.10.0'} @@ -593,6 +637,24 @@ packages: resolution: {integrity: sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=} dev: true + /asn1.js/5.4.1: + resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==} + dependencies: + bn.js: 4.12.0 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + safer-buffer: 2.1.2 + dev: false + + /assert/2.0.0: + resolution: {integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==} + dependencies: + es6-object-assign: 1.1.0 + is-nan: 1.3.2 + object-is: 1.1.5 + util: 0.12.3 + dev: false + /assign-symbols/1.0.0: resolution: {integrity: sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=} engines: {node: '>=0.10.0'} @@ -655,6 +717,13 @@ packages: postcss-value-parser: 4.1.0 dev: true + /available-typed-arrays/1.0.2: + resolution: {integrity: sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==} + engines: {node: '>= 0.4'} + dependencies: + array-filter: 1.0.0 + dev: false + /axios/0.21.1_debug@4.3.1: resolution: {integrity: sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==} dependencies: @@ -725,6 +794,10 @@ packages: engines: {node: '>= 0.6.0'} dev: true + /base64-js/1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + dev: false + /base64id/2.0.0: resolution: {integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==} engines: {node: ^4.5.0 || >= 5.9} @@ -755,6 +828,14 @@ packages: resolution: {integrity: sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==} dev: true + /bn.js/4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + dev: false + + /bn.js/5.2.0: + resolution: {integrity: sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==} + dev: false + /brace-expansion/1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -785,6 +866,10 @@ packages: fill-range: 7.0.1 dev: true + /brorand/1.1.0: + resolution: {integrity: sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=} + dev: false + /browser-sync-client/2.26.14: resolution: {integrity: sha512-be0m1MchmKv/26r/yyyolxXcBi052aYrmaQep5nm8YNMjFcEyzv0ZoOKn/c3WEXNlEB/KeXWaw70fAOJ+/F1zQ==} engines: {node: '>=8.0.0'} @@ -851,6 +936,55 @@ packages: - utf-8-validate dev: true + /browserify-aes/1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + dependencies: + buffer-xor: 1.0.3 + cipher-base: 1.0.4 + create-hash: 1.2.0 + evp_bytestokey: 1.0.3 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + + /browserify-cipher/1.0.1: + resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} + dependencies: + browserify-aes: 1.2.0 + browserify-des: 1.0.2 + evp_bytestokey: 1.0.3 + dev: false + + /browserify-des/1.0.2: + resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} + dependencies: + cipher-base: 1.0.4 + des.js: 1.0.1 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + + /browserify-rsa/4.1.0: + resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} + dependencies: + bn.js: 5.2.0 + randombytes: 2.1.0 + dev: false + + /browserify-sign/4.2.1: + resolution: {integrity: sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==} + dependencies: + bn.js: 5.2.0 + browserify-rsa: 4.1.0 + create-hash: 1.2.0 + create-hmac: 1.1.7 + elliptic: 6.5.4 + inherits: 2.0.4 + parse-asn1: 5.1.6 + readable-stream: 3.6.0 + safe-buffer: 5.2.1 + dev: false + /browserslist/4.16.5: resolution: {integrity: sha512-C2HAjrM1AI/djrpAUU/tr4pml1DqLIzJKSLDBXBrNErl9ZCCTXdhwxdJjYc16953+mBWf7Lw+uUJgpgb8cN71A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -880,6 +1014,17 @@ packages: resolution: {integrity: sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==} dev: true + /buffer-xor/1.0.3: + resolution: {integrity: sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=} + dev: false + + /buffer/6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: false + /bytes/3.1.0: resolution: {integrity: sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==} engines: {node: '>= 0.8'} @@ -910,7 +1055,6 @@ packages: dependencies: function-bind: 1.1.1 get-intrinsic: 1.1.1 - dev: true /caller-callsite/2.0.0: resolution: {integrity: sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=} @@ -1062,6 +1206,13 @@ packages: fsevents: 2.3.2 dev: true + /cipher-base/1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + /class-utils/0.3.6: resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} engines: {node: '>=0.10.0'} @@ -1542,6 +1693,34 @@ packages: yaml: 1.10.2 dev: true + /create-ecdh/4.0.4: + resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} + dependencies: + bn.js: 4.12.0 + elliptic: 6.5.4 + dev: false + + /create-hash/1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + dependencies: + cipher-base: 1.0.4 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.2 + sha.js: 2.4.11 + dev: false + + /create-hmac/1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + dependencies: + cipher-base: 1.0.4 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: false + /cross-spawn/7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -1551,6 +1730,22 @@ packages: which: 2.0.2 dev: true + /crypto-browserify/3.12.0: + resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} + dependencies: + browserify-cipher: 1.0.1 + browserify-sign: 4.2.1 + create-ecdh: 4.0.4 + create-hash: 1.2.0 + create-hmac: 1.1.7 + diffie-hellman: 5.0.3 + inherits: 2.0.4 + pbkdf2: 3.1.2 + public-encrypt: 4.0.3 + randombytes: 2.1.0 + randomfill: 1.0.4 + dev: false + /css-tree/1.1.3: resolution: {integrity: sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==} engines: {node: '>=8.0.0'} @@ -1683,7 +1878,6 @@ packages: engines: {node: '>= 0.4'} dependencies: object-keys: 1.1.1 - dev: true /define-property/0.2.5: resolution: {integrity: sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=} @@ -1735,6 +1929,13 @@ packages: engines: {node: '>= 0.6.0'} dev: true + /des.js/1.0.1: + resolution: {integrity: sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: false + /destroy/1.0.4: resolution: {integrity: sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=} dev: true @@ -1774,6 +1975,14 @@ packages: resolution: {integrity: sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=} dev: true + /diffie-hellman/5.0.3: + resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + dependencies: + bn.js: 4.12.0 + miller-rabin: 4.0.1 + randombytes: 2.1.0 + dev: false + /dir-glob/3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1846,6 +2055,22 @@ packages: resolution: {integrity: sha512-aAsc906l0RBsVTsGTK+KirVfey9eNtxyejdkbNzkISGxb7AFna3Kf0qvsp8tMttzBt9Bz3HddtYQ+++/PZtRYA==} dev: true + /elliptic/6.5.4: + resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: false + + /emitter-component/1.1.1: + resolution: {integrity: sha1-Bl4tvtaVm/RwZ57avq95gdEAOrY=} + dev: false + /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true @@ -1911,6 +2136,37 @@ packages: is-arrayish: 0.2.1 dev: true + /es-abstract/1.18.0: + resolution: {integrity: sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + es-to-primitive: 1.2.1 + function-bind: 1.1.1 + get-intrinsic: 1.1.1 + has: 1.0.3 + has-symbols: 1.0.2 + is-callable: 1.2.3 + is-negative-zero: 2.0.1 + is-regex: 1.1.2 + is-string: 1.0.5 + object-inspect: 1.10.2 + object-keys: 1.1.1 + object.assign: 4.1.2 + string.prototype.trimend: 1.0.4 + string.prototype.trimstart: 1.0.4 + unbox-primitive: 1.0.1 + dev: false + + /es-to-primitive/1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + dependencies: + is-callable: 1.2.3 + is-date-object: 1.0.2 + is-symbol: 1.0.3 + dev: false + /es5-ext/0.10.53: resolution: {integrity: sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==} dependencies: @@ -1927,6 +2183,10 @@ packages: es6-symbol: 3.1.3 dev: true + /es6-object-assign/1.1.0: + resolution: {integrity: sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=} + dev: false + /es6-symbol/3.1.3: resolution: {integrity: sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==} dependencies: @@ -1989,6 +2249,18 @@ packages: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} dev: true + /events/3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + dev: false + + /evp_bytestokey/1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + dependencies: + md5.js: 1.3.5 + safe-buffer: 5.2.1 + dev: false + /expand-brackets/2.1.4: resolution: {integrity: sha1-t3c14xXOMPa27/D4OwQVGiJEliI=} engines: {node: '>=0.10.0'} @@ -2261,6 +2533,10 @@ packages: for-in: 1.0.2 dev: true + /foreach/2.0.5: + resolution: {integrity: sha1-C+4AUBiusmDQo6865ljdATbsG5k=} + dev: false + /fraction.js/4.0.13: resolution: {integrity: sha512-E1fz2Xs9ltlUp+qbiyx9wmt2n9dRzPsS11Jtdb8D2o+cC7wr9xkkKsVKJuBX0ST+LVS+LhLO+SbLJNtfWcJvXA==} dev: true @@ -2319,6 +2595,10 @@ packages: through2: 2.0.5 dev: true + /fs-monkey/1.0.3: + resolution: {integrity: sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==} + dev: false + /fs.realpath/1.0.0: resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} dev: true @@ -2344,7 +2624,6 @@ packages: /function-bind/1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: true /get-caller-file/1.0.3: resolution: {integrity: sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==} @@ -2361,7 +2640,6 @@ packages: function-bind: 1.1.1 has: 1.0.3 has-symbols: 1.0.2 - dev: true /get-pkg-repo/1.4.0: resolution: {integrity: sha1-xztInAbYDMVTbCyFP54FIyBWly0=} @@ -2681,6 +2959,10 @@ packages: ansi-regex: 2.1.1 dev: true + /has-bigints/1.0.1: + resolution: {integrity: sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==} + dev: false + /has-binary2/1.0.3: resolution: {integrity: sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==} dependencies: @@ -2704,7 +2986,6 @@ packages: /has-symbols/1.0.2: resolution: {integrity: sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==} engines: {node: '>= 0.4'} - dev: true /has-value/0.3.1: resolution: {integrity: sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=} @@ -2742,7 +3023,30 @@ packages: engines: {node: '>= 0.4.0'} dependencies: function-bind: 1.1.1 - dev: true + + /hash-base/3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.0 + safe-buffer: 5.2.1 + dev: false + + /hash.js/1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: false + + /hmac-drbg/1.0.1: + resolution: {integrity: sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=} + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: false /homedir-polyfill/1.0.3: resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} @@ -2811,6 +3115,10 @@ packages: safer-buffer: 2.1.2 dev: true + /ieee754/1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + dev: false + /ignore/5.1.8: resolution: {integrity: sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==} engines: {node: '>= 4'} @@ -2890,11 +3198,9 @@ packages: /inherits/2.0.3: resolution: {integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=} - dev: true /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true /ini/1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} @@ -2951,6 +3257,13 @@ packages: kind-of: 6.0.3 dev: true + /is-arguments/1.1.0: + resolution: {integrity: sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + dev: false + /is-arrayish/0.2.1: resolution: {integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=} dev: true @@ -2959,6 +3272,10 @@ packages: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} dev: true + /is-bigint/1.0.1: + resolution: {integrity: sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==} + dev: false + /is-binary-path/1.0.1: resolution: {integrity: sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=} engines: {node: '>=0.10.0'} @@ -2973,10 +3290,22 @@ packages: binary-extensions: 2.2.0 dev: true + /is-boolean-object/1.1.0: + resolution: {integrity: sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + dev: false + /is-buffer/1.1.6: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} dev: true + /is-callable/1.2.3: + resolution: {integrity: sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==} + engines: {node: '>= 0.4'} + dev: false + /is-core-module/2.3.0: resolution: {integrity: sha512-xSphU2KG9867tsYdLD4RWQ1VqdFl4HTO9Thf3I/3dLEfr0dbPTWKsuCKrgqMljg4nPE+Gq0VCnzT3gr0CyBmsw==} dependencies: @@ -2997,6 +3326,11 @@ packages: kind-of: 6.0.3 dev: true + /is-date-object/1.0.2: + resolution: {integrity: sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==} + engines: {node: '>= 0.4'} + dev: false + /is-descriptor/0.1.6: resolution: {integrity: sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==} engines: {node: '>=0.10.0'} @@ -3076,6 +3410,11 @@ packages: engines: {node: '>=8'} dev: true + /is-generator-function/1.0.8: + resolution: {integrity: sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ==} + engines: {node: '>= 0.4'} + dev: false + /is-glob/2.0.1: resolution: {integrity: sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=} engines: {node: '>=0.10.0'} @@ -3097,17 +3436,35 @@ packages: is-extglob: 2.1.1 dev: true + /is-nan/1.3.2: + resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.3 + dev: false + /is-negated-glob/1.0.0: resolution: {integrity: sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=} engines: {node: '>=0.10.0'} dev: true + /is-negative-zero/2.0.1: + resolution: {integrity: sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==} + engines: {node: '>= 0.4'} + dev: false + /is-number-like/1.0.8: resolution: {integrity: sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==} dependencies: lodash.isfinite: 3.3.2 dev: true + /is-number-object/1.0.4: + resolution: {integrity: sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==} + engines: {node: '>= 0.4'} + dev: false + /is-number/3.0.0: resolution: {integrity: sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=} engines: {node: '>=0.10.0'} @@ -3167,7 +3524,6 @@ packages: dependencies: call-bind: 1.0.2 has-symbols: 1.0.2 - dev: true /is-relative/1.0.0: resolution: {integrity: sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==} @@ -3176,6 +3532,18 @@ packages: is-unc-path: 1.0.0 dev: true + /is-string/1.0.5: + resolution: {integrity: sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==} + engines: {node: '>= 0.4'} + dev: false + + /is-symbol/1.0.3: + resolution: {integrity: sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.2 + dev: false + /is-text-path/1.0.1: resolution: {integrity: sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=} engines: {node: '>=0.10.0'} @@ -3183,6 +3551,17 @@ packages: text-extensions: 1.9.0 dev: true + /is-typed-array/1.1.5: + resolution: {integrity: sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.2 + call-bind: 1.0.2 + es-abstract: 1.18.0 + foreach: 2.0.5 + has-symbols: 1.0.2 + dev: false + /is-unc-path/1.0.0: resolution: {integrity: sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==} engines: {node: '>=0.10.0'} @@ -3566,10 +3945,25 @@ packages: stack-trace: 0.0.10 dev: true + /md5.js/1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + /mdn-data/2.0.14: resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} dev: true + /memfs/3.2.2: + resolution: {integrity: sha512-RE0CwmIM3CEvpcdK3rZ19BC4E6hv9kADkMN5rPduRak58cNArWLi/9jFLsa4rhsjfVxMP3v0jO7FHXq7SvFY5Q==} + engines: {node: '>= 4.0.0'} + dependencies: + fs-monkey: 1.0.3 + dev: false + /meow/3.7.0: resolution: {integrity: sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=} engines: {node: '>=0.10.0'} @@ -3643,6 +4037,14 @@ packages: picomatch: 2.2.3 dev: true + /miller-rabin/4.0.1: + resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} + hasBin: true + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + dev: false + /mime-db/1.47.0: resolution: {integrity: sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==} engines: {node: '>= 0.6'} @@ -3670,6 +4072,14 @@ packages: engines: {node: '>=4'} dev: true + /minimalistic-assert/1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + dev: false + + /minimalistic-crypto-utils/1.0.1: + resolution: {integrity: sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=} + dev: false + /minimatch/3.0.4: resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} dependencies: @@ -3862,10 +4272,21 @@ packages: engines: {node: '>= 6'} dev: true + /object-inspect/1.10.2: + resolution: {integrity: sha512-gz58rdPpadwztRrPjZE9DZLOABUpTGdcANUgOwBFO1C+HZZhePoP83M65WGDmbpwFYJSWqavbl4SgDn4k8RYTA==} + dev: false + + /object-is/1.1.5: + resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.3 + dev: false + /object-keys/1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} - dev: true /object-visit/1.0.1: resolution: {integrity: sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=} @@ -3882,7 +4303,6 @@ packages: define-properties: 1.1.3 has-symbols: 1.0.2 object-keys: 1.1.1 - dev: true /object.defaults/1.1.0: resolution: {integrity: sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=} @@ -3954,6 +4374,10 @@ packages: readable-stream: 2.3.7 dev: true + /os-browserify/0.3.0: + resolution: {integrity: sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=} + dev: false + /os-locale/1.4.0: resolution: {integrity: sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=} engines: {node: '>=0.10.0'} @@ -4032,6 +4456,10 @@ packages: engines: {node: '>=6'} dev: true + /pako/2.0.3: + resolution: {integrity: sha512-WjR1hOeg+kki3ZIOjaf4b5WVcay1jaliKSYiEaB1XzwhMQZJxRdQRv0V31EKBYlxb4T7SK3hjfc/jxyU64BoSw==} + dev: false + /parent-module/1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -4039,6 +4467,16 @@ packages: callsites: 3.1.0 dev: true + /parse-asn1/5.1.6: + resolution: {integrity: sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==} + dependencies: + asn1.js: 5.4.1 + browserify-aes: 1.2.0 + evp_bytestokey: 1.0.3 + pbkdf2: 3.1.2 + safe-buffer: 5.2.1 + dev: false + /parse-filepath/1.0.2: resolution: {integrity: sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=} engines: {node: '>=0.8'} @@ -4115,6 +4553,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /path-browserify/1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + dev: false + /path-dirname/1.0.2: resolution: {integrity: sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=} dev: true @@ -4183,6 +4625,24 @@ packages: engines: {node: '>=8'} dev: true + /path/0.12.7: + resolution: {integrity: sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=} + dependencies: + process: 0.11.10 + util: 0.10.4 + dev: false + + /pbkdf2/3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: false + /picomatch/2.2.3: resolution: {integrity: sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==} engines: {node: '>=8.6'} @@ -4397,7 +4857,7 @@ packages: /pretty-bytes/5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} - dev: true + dev: false /pretty-hrtime/1.0.3: resolution: {integrity: sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=} @@ -4408,6 +4868,11 @@ packages: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true + /process/0.11.10: + resolution: {integrity: sha1-czIwDoQBYb2j5podHZGn1LwW8YI=} + engines: {node: '>= 0.6.0'} + dev: false + /promise/7.3.1: resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==} dependencies: @@ -4419,6 +4884,17 @@ packages: engines: {node: '>=10'} dev: true + /public-encrypt/4.0.3: + resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + dependencies: + bn.js: 4.12.0 + browserify-rsa: 4.1.0 + create-hash: 1.2.0 + parse-asn1: 5.1.6 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: false + /pug-attrs/2.0.4: resolution: {integrity: sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ==} dependencies: @@ -4527,6 +5003,10 @@ packages: pump: 2.0.1 dev: true + /punycode/1.3.2: + resolution: {integrity: sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=} + dev: false + /purgecss/3.1.3: resolution: {integrity: sha512-hRSLN9mguJ2lzlIQtW4qmPS2kh6oMnA9RxdIYK8sz18QYqd6ePp4GNDl18oWHA1f2v2NEQIh51CO8s/E3YGckQ==} hasBin: true @@ -4547,6 +5027,11 @@ packages: engines: {node: '>=0.6'} dev: true + /querystring/0.2.0: + resolution: {integrity: sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=} + engines: {node: '>=0.4.x'} + dev: false + /queue-microtask/1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true @@ -4561,6 +5046,19 @@ packages: engines: {node: '>=10'} dev: true + /randombytes/2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + dependencies: + safe-buffer: 5.2.1 + dev: false + + /randomfill/1.0.4: + resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + dependencies: + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: false + /range-parser/1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} @@ -4654,7 +5152,6 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - dev: true /readdirp/2.2.1: resolution: {integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==} @@ -4872,6 +5369,13 @@ packages: glob: 7.1.6 dev: true + /ripemd160/2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + dev: false + /run-async/2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -4907,7 +5411,6 @@ packages: /safe-buffer/5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true /safe-regex/1.1.0: resolution: {integrity: sha1-QKNmnzsHfR6UPURinhV91IAjvy4=} @@ -4917,7 +5420,6 @@ packages: /safer-buffer/2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - dev: true /sass/1.32.11: resolution: {integrity: sha512-O9tRcob/fegUVSIV1ihLLZcftIOh0AF1VpKgusUfLqnb2jQ0GLDwI5ivv1FYWivGv8eZ/AwntTyTzjcHu0c/qw==} @@ -5020,6 +5522,14 @@ packages: resolution: {integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==} dev: true + /sha.js/2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: false + /shebang-command/2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -5272,6 +5782,13 @@ packages: engines: {node: '>= 0.6'} dev: true + /stream-browserify/3.0.0: + resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.0 + dev: false + /stream-exhaust/1.0.2: resolution: {integrity: sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==} dev: true @@ -5289,6 +5806,12 @@ packages: limiter: 1.1.5 dev: true + /stream/0.0.2: + resolution: {integrity: sha1-f1Nj8Ff2WSxVlfALyAon9c7B8O8=} + dependencies: + emitter-component: 1.1.1 + dev: false + /string-width/1.0.2: resolution: {integrity: sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=} engines: {node: '>=0.10.0'} @@ -5315,6 +5838,20 @@ packages: strip-ansi: 6.0.0 dev: true + /string.prototype.trimend/1.0.4: + resolution: {integrity: sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.3 + dev: false + + /string.prototype.trimstart/1.0.4: + resolution: {integrity: sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.3 + dev: false + /string_decoder/1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: @@ -5325,7 +5862,6 @@ packages: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 - dev: true /stringify-package/1.0.1: resolution: {integrity: sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg==} @@ -5609,6 +6145,10 @@ packages: resolution: {integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==} dev: true + /tty-browserify/0.0.1: + resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} + dev: false + /type-fest/0.18.1: resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} engines: {node: '>=10'} @@ -5693,6 +6233,15 @@ packages: yargs: 16.2.0 dev: true + /unbox-primitive/1.0.1: + resolution: {integrity: sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==} + dependencies: + function-bind: 1.1.1 + has-bigints: 1.0.1 + has-symbols: 1.0.2 + which-boxed-primitive: 1.0.2 + dev: false + /unc-path-regex/0.1.2: resolution: {integrity: sha1-5z3T17DXxe2G+6xrCufYxqadUPo=} engines: {node: '>=0.10.0'} @@ -5769,6 +6318,13 @@ packages: deprecated: Please see https://github.com/lydell/urix#deprecated dev: true + /url/0.11.0: + resolution: {integrity: sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=} + dependencies: + punycode: 1.3.2 + querystring: 0.2.0 + dev: false + /use/3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} engines: {node: '>=0.10.0'} @@ -5776,7 +6332,23 @@ packages: /util-deprecate/1.0.2: resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} - dev: true + + /util/0.10.4: + resolution: {integrity: sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==} + dependencies: + inherits: 2.0.3 + dev: false + + /util/0.12.3: + resolution: {integrity: sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==} + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.0 + is-generator-function: 1.0.8 + is-typed-array: 1.1.5 + safe-buffer: 5.2.1 + which-typed-array: 1.1.4 + dev: false /utils-merge/1.0.1: resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} @@ -5856,11 +6428,25 @@ packages: replace-ext: 1.0.1 dev: true + /vm-browserify/1.1.2: + resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} + dev: false + /void-elements/2.0.1: resolution: {integrity: sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=} engines: {node: '>=0.10.0'} dev: true + /which-boxed-primitive/1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + dependencies: + is-bigint: 1.0.1 + is-boolean-object: 1.1.0 + is-number-object: 1.0.4 + is-string: 1.0.5 + is-symbol: 1.0.3 + dev: false + /which-module/1.0.0: resolution: {integrity: sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=} dev: true @@ -5869,6 +6455,19 @@ packages: resolution: {integrity: sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=} dev: true + /which-typed-array/1.1.4: + resolution: {integrity: sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.2 + call-bind: 1.0.2 + es-abstract: 1.18.0 + foreach: 2.0.5 + function-bind: 1.1.1 + has-symbols: 1.0.2 + is-typed-array: 1.1.5 + dev: false + /which/1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true diff --git a/repl.js b/repl.js new file mode 100644 index 00000000..b7438eb0 --- /dev/null +++ b/repl.js @@ -0,0 +1,4 @@ +import path from "path"; +import { createRequire } from 'module'; +const require = createRequire(import.meta.url); +console.log(require.resolve('memfs')); \ No newline at end of file diff --git a/shims/node-shim.js b/shims/node-shim.js new file mode 100644 index 00000000..961cc648 --- /dev/null +++ b/shims/node-shim.js @@ -0,0 +1,3 @@ +// Based off https://github.com/hardfist/neo-tools/blob/main/packages/bundler/src/shim/node.js +export * as process from './process'; +export { Buffer } from "buffer/"; \ No newline at end of file diff --git a/shims/process.js b/shims/process.js new file mode 100644 index 00000000..75f1b087 --- /dev/null +++ b/shims/process.js @@ -0,0 +1,253 @@ +// @ts-nocheck +// Shim for using process in browser +// Based off https://github.com/defunctzombie/node-process/blob/master/browser.js +// Based off https://github.com/hardfist/neo-tools/blob/main/packages/bundler/src/shim/process.js + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); +} +var cachedSetTimeout = defaultSetTimout; +var cachedClearTimeout = defaultClearTimeout; +if (typeof global.setTimeout === 'function') { + cachedSetTimeout = setTimeout; +} +if (typeof global.clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; +} + +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while (len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} +function nextTick(fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +} +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +var title = 'browser'; +var platform = 'browser'; +var browser = true; +var env = {}; +var argv = []; +var version = ''; // empty string to avoid regexp issues +var versions = {}; +var release = {}; +var config = {}; + +function noop() { } + +var on = noop; +var addListener = noop; +var once = noop; +var off = noop; +var removeListener = noop; +var removeAllListeners = noop; +var emit = noop; + +function binding(name) { + throw new Error('process.binding is not supported'); +} + +function cwd() { + return '/'; +} +function chdir(dir) { + throw new Error('process.chdir is not supported'); +} +function umask() { + return 0; +} + +// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js +var performance = global.performance || {}; +var performanceNow = + performance.now || + performance.mozNow || + performance.msNow || + performance.oNow || + performance.webkitNow || + function () { + return new Date().getTime(); + }; + +// generate timestamp or delta +// see http://nodejs.org/api/process.html#process_process_hrtime +function hrtime(previousTimestamp) { + var clocktime = performanceNow.call(performance) * 1e-3; + var seconds = Math.floor(clocktime); + var nanoseconds = Math.floor((clocktime % 1) * 1e9); + if (previousTimestamp) { + seconds = seconds - previousTimestamp[0]; + nanoseconds = nanoseconds - previousTimestamp[1]; + if (nanoseconds < 0) { + seconds--; + nanoseconds += 1e9; + } + } + return [seconds, nanoseconds]; +} + +var startTime = new Date(); +function uptime() { + var currentTime = new Date(); + var dif = currentTime - startTime; + return dif / 1000; +} + +var browser$1 = { + nextTick: nextTick, + title: title, + browser: browser, + env: env, + argv: argv, + version: version, + versions: versions, + on: on, + addListener: addListener, + once: once, + off: off, + removeListener: removeListener, + removeAllListeners: removeAllListeners, + emit: emit, + binding: binding, + cwd: cwd, + chdir: chdir, + umask: umask, + hrtime: hrtime, + platform: platform, + release: release, + config: config, + uptime: uptime, +}; + +export default browser$1; +delete versions['node']; // hack +export { + addListener, + argv, + binding, + browser, + chdir, + config, + cwd, + emit, + env, + hrtime, + nextTick, + off, + on, + once, + platform, + release, + removeAllListeners, + removeListener, + title, + umask, + uptime, + version, + versions, +}; \ No newline at end of file diff --git a/src/pug/layouts/layout.pug b/src/pug/layouts/layout.pug index 462e439f..5814df57 100644 --- a/src/pug/layouts/layout.pug +++ b/src/pug/layouts/layout.pug @@ -26,5 +26,5 @@ body block content +footer - script(src='./js/legacy.min.js' nomodule defer) + script(src='./js/legacy.min.js' nomodule) script(src='./js/modern.min.js' type='module' async) diff --git a/src/ts/main.ts b/src/ts/main.ts index c9f45dee..71a18164 100644 --- a/src/ts/main.ts +++ b/src/ts/main.ts @@ -1,5 +1,4 @@ -import { toArr } from "./toArr"; - +import importModule from "@uupaa/dynamic-import-polyfill"; const navbar = document.querySelector(".navbar") as HTMLElement; let canScroll = true; @@ -16,5 +15,19 @@ const scroll = () => { } }; +let supportDynamicImport = false; +try { + let meta = import.meta; + supportDynamicImport = true; +} catch (e) { } + +const importShim = async (id: string) => await (supportDynamicImport ? import(id) : importModule(id)); + +(async () => { + const { default: size } = await importShim("./esbuild.js"); + console.log(await size("pako")); + console.log(await size("@okikio/manager")); +})(); + window.addEventListener("scroll", scroll, { passive: true }); diff --git a/src/ts/modules/esbuild.ts b/src/ts/modules/esbuild.ts index 66701ad4..87f8f1f7 100644 --- a/src/ts/modules/esbuild.ts +++ b/src/ts/modules/esbuild.ts @@ -1,37 +1,84 @@ import { initialize, build } from "esbuild-wasm/esm/browser"; +import path from "path"; +import { fs, vol } from "memfs"; +import { EXTERNAL } from "../plugins/external"; +import { ENTRY } from "../plugins/entry"; +import { NODE } from "../plugins/node-polyfill"; +import { BARE } from "../plugins/bare"; +import { HTTP } from "../plugins/http"; +import { CDN } from "../plugins/cdn"; +import { VIRTUAL_FS } from "../plugins/virtual-fs"; +import prettyBytes from "pretty-bytes"; +import { gzip } from "pako"; -(async () => { +export let _initialized = false; +export const _DEBUG = false; +export default (async (pkg: string) => { try { - const options = { + if (!_initialized) { + await initialize({ + worker: true, + wasmURL: "https://unpkg.com/esbuild-wasm/esbuild.wasm" + }); + + _initialized = true; + } + } catch (e) { + console.warn("esbuild initialize error", e); + + } + + let content: string; + try { + vol.fromJSON({ + "input.ts": `export * as pkg from "https://cdn.skypack.dev/${pkg}";` + }, '/'); + + let result = await build({ entryPoints: [''], - incremental: true, + bundle: true, + minify: true, + color: true, + target: ["es2020"], logLevel: 'error', write: false, - // outfile: this.options.output, - // format: context.options.format, - banner: 'global = globalThis', - // inject: this.options.platform === 'node' ? [] : [path.join(__dirname, '../shim/node.js')], - // plugins: [ - // context.options.platform === 'browser' && pluginNodePolyfill(), - // context.options.platform === 'browser' && pluginGlobalExternal(), - // pluginEntry(context), - // rollupProxyPlugin(plugins, context), - // pluginBareModule(context), - // context.options.http && pluginHttp(), - // context.options.unpkg && pluginUnpkg(), - // context.options.memfs && pluginMemfs(context), - // ].filter(Boolean), + outfile: "/bundle.js", + external: ['esbuild', 'fsevents', 'chokidar', 'yargs'], + platform: "browser", + format: "esm", + banner: { js: 'const global = globalThis;' }, + plugins: [ + // NODE(), + EXTERNAL(), + ENTRY(`/input.ts`), + BARE(), + HTTP(), + CDN(), + VIRTUAL_FS() + ], globalName: 'bundler', + }); - }; - - await initialize({ - worker: true, - wasmURL: "https://unpkg.com/esbuild-wasm/esbuild.wasm" + result?.outputFiles?.forEach((x) => { + if (!fs.existsSync(path.dirname(x.path))) { + fs.mkdirSync(path.dirname(x.path)); + } + fs.writeFileSync(x.path, x.text); }); - await build(options); + content = await fs.promises.readFile("/bundle.js", "utf-8"); + if (_DEBUG) console.log(content); + } catch (e) { + console.warn(`esbuild build error`, e); + } + + try { + if (!content) throw `the content of the build is not valid, "${content}"`; + let { length } = gzip(content, { level: 9 }); + let size = prettyBytes(length); + if (_DEBUG) console.log(`\'${pkg}\' is ${size}`); + return size; } catch (e) { - console.warn(`esbuild error`, e); + console.warn("Error zipping file ", e); } -})(); \ No newline at end of file +}); \ No newline at end of file diff --git a/src/ts/plugins/bare.ts b/src/ts/plugins/bare.ts new file mode 100644 index 00000000..50ab7ef0 --- /dev/null +++ b/src/ts/plugins/bare.ts @@ -0,0 +1,22 @@ +import { Plugin } from 'esbuild'; +import { CDN_NAMESPACE } from './cdn'; +export const UnpkgHost = 'https://unpkg.com/'; +import path from 'path'; +export const BARE = (): Plugin => { + return { + name: 'bare', + setup(build) { + build.onResolve({ filter: /.*/ }, (args) => { + if (/^(?!\.).*/.test(args.path) && !path.isAbsolute(args.path)) { + return { + path: args.path, + namespace: CDN_NAMESPACE, + pluginData: { + parentUrl: UnpkgHost, + }, + }; + } + }); + }, + }; +}; \ No newline at end of file diff --git a/src/ts/plugins/cdn.ts b/src/ts/plugins/cdn.ts new file mode 100644 index 00000000..cda01567 --- /dev/null +++ b/src/ts/plugins/cdn.ts @@ -0,0 +1,31 @@ +import { Plugin } from 'esbuild'; +import { fetchPkg } from './http'; +export const CDN_NAMESPACE = 'cdn'; +export const CDN = (): Plugin => { + const cache: Record = {}; + return { + name: CDN_NAMESPACE, + setup(build) { + build.onLoad({ namespace: CDN_NAMESPACE, filter: /.*/ }, async (args) => { + const pathUrl = new URL(args.path, args.pluginData.parentUrl).toString(); + let value = cache[pathUrl]; + if (!value) value = await fetchPkg(pathUrl); + cache[pathUrl] = value; + return { + contents: value.content, + pluginData: { + parentUrl: value.url, + }, + }; + }); + + build.onResolve({ namespace: CDN_NAMESPACE, filter: /.*/ }, async (args) => { + return { + namespace: CDN_NAMESPACE, + path: args.path, + pluginData: args.pluginData, + }; + }); + }, + }; +}; \ No newline at end of file diff --git a/src/ts/plugins/entry.ts b/src/ts/plugins/entry.ts new file mode 100644 index 00000000..745b0284 --- /dev/null +++ b/src/ts/plugins/entry.ts @@ -0,0 +1,18 @@ +import type { Plugin } from 'esbuild'; +import { VIRTUAL_FS_NAMESPACE } from "./virtual-fs"; +export const ENTRY = (input: string): Plugin => { + return { + name: 'virtual-entry', + setup(build) { + build.onResolve({ filter: /^$/ }, () => { + return { + path: input, + namespace: VIRTUAL_FS_NAMESPACE, + pluginData: { + importer: '', + }, + }; + }); + }, + }; +}; \ No newline at end of file diff --git a/src/ts/plugins/external.ts b/src/ts/plugins/external.ts new file mode 100644 index 00000000..dcd17ab6 --- /dev/null +++ b/src/ts/plugins/external.ts @@ -0,0 +1,25 @@ +import type { Plugin } from 'esbuild'; +export const EXTERNAL = (): Plugin => { + return { + name: 'external-globals', + setup(build) { + build.onResolve({ filter: /.*/ }, (args) => { + if (['chokidar', 'yargs', 'node-fetch'].includes(args.path)) { + return { + path: args.path, + namespace: 'external', + }; + } + }); + + build.onLoad({ filter: /.*/, namespace: 'external' }, (args) => { + if (args.path === 'node-fetch') + return { contents: 'export default fetch' }; + + return { + contents: `module.exports = ${args.path}`, + }; + }); + }, + }; +}; \ No newline at end of file diff --git a/src/ts/plugins/http.ts b/src/ts/plugins/http.ts new file mode 100644 index 00000000..4898d8ad --- /dev/null +++ b/src/ts/plugins/http.ts @@ -0,0 +1,50 @@ +// Based on https://github.com/hardfist/neo-tools/blob/main/packages/bundler/src/plugins/http.ts +import { Plugin } from 'esbuild'; + +export async function fetchPkg(url: string) { + const res = await fetch(url); + return { + url: res.url, + content: await res.text(), + }; +} + +export const HTTP = (): Plugin => { + return { + name: 'http', + setup(build) { + // Intercept import paths starting with "http:" and "https:" so + // esbuild doesn't attempt to map them to a file system location. + // Tag them with the "http-url" namespace to associate them with + // this plugin. + build.onResolve({ filter: /^https?:\/\// }, args => ({ + path: new URL(args.path, args.resolveDir.replace(/^\//, '')).toString(), + namespace: 'http-url', + })) + + // We also want to intercept all import paths inside downloaded + // files and resolve them against the original URL. All of these + // files will be in the "http-url" namespace. Make sure to keep + // the newly resolved URL in the "http-url" namespace so imports + // inside it will also be resolved as URLs recursively. + build.onResolve({ filter: /.*/, namespace: 'http-url' }, args => ({ + path: new URL(args.path, args.importer).toString(), + namespace: 'http-url', + })) + + // When a URL is loaded, we want to actually download the content + // from the internet. This has just enough logic to be able to + // handle the example import from unpkg.com but in reality this + // would probably need to be more complex. + build.onLoad({ filter: /.*/, namespace: 'http-url' }, async (args) => { + const { content, url } = await fetchPkg(args.path); + + return { + contents: content, + loader: 'ts', + resolveDir: `/${url}`, // a hack fix resolveDir problem + }; + }); + }, + }; +}; \ No newline at end of file diff --git a/src/ts/plugins/node-polyfill.ts b/src/ts/plugins/node-polyfill.ts new file mode 100644 index 00000000..584ef17c --- /dev/null +++ b/src/ts/plugins/node-polyfill.ts @@ -0,0 +1,33 @@ +import type { Plugin } from 'esbuild'; +export const resolve = (id: string) => { + return `https://cdn.skypack.dev/${id}` +}; + +export const NODE = (): Plugin => { + return { + name: 'node-polyfill', + setup(build) { + build.onResolve({ filter: /.*/ }, async (args) => { + // Remap builtins + const polyfillMap = { + url: resolve('url/'), + assert: resolve('assert/'), + buffer: resolve('buffer/'), + fs: resolve('memfs'), + path: resolve('path-browserify'), + stream: resolve('stream-browserify'), + os: resolve('os-browserify/browser'), + crypto: resolve('crypto-browserify'), + vm: resolve('vm-browserify'), + tty: resolve('tty-browserify'), + }; + + if (Object.keys(polyfillMap).includes(args.path)) { + return { + path: polyfillMap[args.path as 'os'], + }; + } + }); + }, + }; +}; \ No newline at end of file diff --git a/src/ts/plugins/virtual-fs.ts b/src/ts/plugins/virtual-fs.ts new file mode 100644 index 00000000..1ac1e940 --- /dev/null +++ b/src/ts/plugins/virtual-fs.ts @@ -0,0 +1,50 @@ +import { Plugin } from 'esbuild'; +import path from 'path'; +import { fs } from "memfs"; + +export const VIRTUAL_FS_NAMESPACE = 'virtualfs'; +export const resolve = ({ id, importer }: { id: string; importer: string }) => { + let resolvedPath = id; + if (importer && id.startsWith('.')) + resolvedPath = path.resolve(path.dirname(importer), id); + for (const x of ['', '.ts', '.js', '.css']) { + const realPath = resolvedPath + x; + if (fs.existsSync(realPath)) return realPath; + } + + throw new Error(`${resolvedPath} not exists`); +}; + +export const VIRTUAL_FS = (): Plugin => { + return { + name: VIRTUAL_FS_NAMESPACE, + setup(build) { + build.onResolve({ filter: /.*/, namespace: VIRTUAL_FS_NAMESPACE }, (args) => { + return { + path: args.path, + pluginData: args.pluginData, + namespace: VIRTUAL_FS_NAMESPACE, + }; + }); + + build.onLoad({ filter: /.*/, namespace: VIRTUAL_FS_NAMESPACE }, async (args) => { + let realPath = args.path; + const resolvePath = resolve({ + id: args.path, + importer: args.pluginData.importer + }); + if (!resolvePath) throw new Error('not found'); + realPath = resolvePath; + + const content = (await fs.promises.readFile(realPath)).toString(); + return { + contents: content, + pluginData: { + importer: realPath, + }, + loader: path.extname(realPath).slice(1) as 'js', + }; + }); + }, + }; +}; \ No newline at end of file