diff --git a/asset-manifest.json b/asset-manifest.json index 61aa5bf..d73cb96 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { - "main.css": "/groundhog/static/css/main.59bb2f1c.css", - "main.js": "/groundhog/static/js/main.b497b6ff.js", + "main.css": "/groundhog/static/css/main.5435b5e4.css", + "main.js": "/groundhog/static/js/main.d4e37d27.js", "index.html": "/groundhog/index.html", - "main.59bb2f1c.css.map": "/groundhog/static/css/main.59bb2f1c.css.map", - "main.b497b6ff.js.map": "/groundhog/static/js/main.b497b6ff.js.map" + "main.5435b5e4.css.map": "/groundhog/static/css/main.5435b5e4.css.map", + "main.d4e37d27.js.map": "/groundhog/static/js/main.d4e37d27.js.map" }, "entrypoints": [ - "static/css/main.59bb2f1c.css", - "static/js/main.b497b6ff.js" + "static/css/main.5435b5e4.css", + "static/js/main.d4e37d27.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 0758f21..7eafa10 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -groundHog
\ No newline at end of file +groundHog
\ No newline at end of file diff --git a/static/css/main.59bb2f1c.css b/static/css/main.5435b5e4.css similarity index 65% rename from static/css/main.59bb2f1c.css rename to static/css/main.5435b5e4.css index 915e554..19a1b68 100644 --- a/static/css/main.59bb2f1c.css +++ b/static/css/main.5435b5e4.css @@ -1,2 +1,2 @@ -@import url(https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,1,0&family=Russo+One&family=Outfit:wght@500&family=Silkscreen:wght@400;700&family=IBM+Plex+Mono:wght@400&display=swap);body{margin:0}.style_contextInput__1OoGc{height:100%;overflow-x:hidden;overflow-y:scroll;scrollbar-color:var(--palette-fg) #0000;scrollbar-width:thin}.style_contextInput__1OoGc>*{padding:0 8px}.style_contextInput__1OoGc>:first-child{margin-top:48px}.style_contextInput__1OoGc>:last-child{margin-bottom:200px}.style_contextInput__1OoGc .style_section__UU5kL .style_subsection__V6nKB:after{background:var(--palette-fg);content:" ";display:block;height:1px;margin-bottom:8px;width:100%}.style_contextInput__1OoGc h2{height:36px;line-height:28px;margin:0 0 -8px;top:0;z-index:2}.style_contextInput__1OoGc h2,.style_contextInput__1OoGc h3{background:linear-gradient(0deg,#0000,var(--palette-settings-bg) 8px,var(--palette-settings-bg));position:-webkit-sticky;position:sticky}.style_contextInput__1OoGc h3{height:24px;margin:0;padding-bottom:8px;top:28px;z-index:1}.style_contextInput__1OoGc h3:before{content:"subdirectory_arrow_right";font-family:Material Symbols Outlined}.style_contextInput__1OoGc p{margin:0}.style_contextInput__1OoGc .style_inputRow__e-kmi{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:8px}.style_contextInput__1OoGc .style_inputRow__e-kmi>:not([type=range]){background:none;border:1px solid var(--palette-lines);border-radius:8px;box-sizing:border-box;color:var(--palette-fg);font-family:var(--font-body);height:36px;line-height:34px;margin:0;padding:0;text-align:center;width:100%}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_icon__w\+PGc{flex-shrink:0;font-family:Material Symbols Outlined;font-size:24px;width:36px}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_inactive__-rc9v{border-style:dashed;color:var(--palette-lines)}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_invisible__I4pew{opacity:0}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_override__ZXWWz{background:#ff0;color:#000}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_seed__gS1FQ{font-size:24px}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_showAdvanced__sTHS2{display:flex;font-size:18px;height:24px;justify-content:center;line-height:22px;width:100%}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_curve__v3DHl{border:none;display:flex;flex-direction:column;gap:6px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:6px 0}.style_contextInput__1OoGc .style_inputRow__e-kmi button{cursor:pointer}.style_contextInput__1OoGc .style_inputRow__e-kmi button:active{background:var(--palette-fg);color:#000}.style_contextInput__1OoGc .style_inputRow__e-kmi input[type=range]{-webkit-appearance:none;appearance:none;background:linear-gradient(to right,var(--palette-accent) 4px,var(--palette-accent) var(--completion),var(--palette-fg) var(--completion),var(--palette-fg) 100%);border-radius:2px;cursor:pointer;height:6px;outline:none;width:100%}.style_contextInput__1OoGc .style_inputRow__e-kmi input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:var(--palette-accent);border:none;border-radius:2px;height:14px;width:8px}.style_contextInput__1OoGc .style_inputRow__e-kmi input[type=range]::-moz-range-thumb{background-color:var(--palette-accent);border:none;border-radius:2px;height:14px;width:8px}@property --pvw-yaw{syntax:"";inherits:true;initial-value:0deg}@property --pvw-pitch{syntax:"";inherits:true;initial-value:0deg}@property --pvw-tr-x{syntax:"";inherits:true;initial-value:0}@property --pvw-tr-y{syntax:"";inherits:true;initial-value:0}@property --pvw-scale{syntax:"";inherits:true;initial-value:1}.style_cavernPreview__xf6rH{--pvw-bpak:#222;--pvw-bpck:#2d004b;--pvw-bphk:#166921;--pvw-pathspan:#ff0;--pvw-pathaux:#24b136;--pvw-entfriend:#ff0;--pvw-entenemy:red;--pvw-dfluid:#080022;--pvw-dfloor:#180032;--pvw-dwall:#2d004b;--pvw-scale0:#554;--pvw-scale1:#774;--pvw-scale2:#994;--pvw-scale3:#bb4;--pvw-scale4:#dd4;--pvw-scale5:#ff4;--pvw-scale6:#ff6;--pvw-scale7:#ff8;--pvw-tile1:#2d004b;--pvw-tile2:#180032;--pvw-tile3:#180032;--pvw-tile4:#180032;--pvw-tile5:#180032;--pvw-tile6:#ff5a00;--pvw-tile11:#002fb5;--pvw-tile12:#166921;--pvw-tile14:#bfbfbf;--pvw-tile24:#9d9b00;--pvw-tile26:#ad59ef;--pvw-tile30:#943cc3;--pvw-tile34:#731cad;--pvw-tile38:purple;--pvw-tile42:#b5ff00;--pvw-tile46:#9c4108;--pvw-tile50:#ff0;--pvw-tile60:#180032;--pvw-tile61:#180032;--pvw-tile62:#180032;--pvw-tile63:#180032;--pvw-disco0:#ff4;--pvw-disco1:#822;--pvw-oxex:#553;--pvw-oxhc:var(--pvw-tile42);display:flex;height:100%;overflow:hidden;position:absolute;width:100%}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe{position:relative;width:100%}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU{position:absolute;transform:rotateX(var(--pvw-pitch)) rotate(var(--pvw-yaw)) matrix(var(--pvw-scale),0,0,var(--pvw-scale),calc(var(--pvw-tr-x)*var(--pvw-scale)),calc(var(--pvw-tr-y)*var(--pvw-scale)));transition:transform .5s linear}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU.style_void__RvJKA{transition:none}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_baseplate__p03X2{font-family:var(--font-tiny);font-size:8px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_baseplate__p03X2 .style_fg__nlyiJ{fill:#fff}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_baseplate__p03X2.style_ambiguousKind__Pm08h .style_bg__N5lpK{fill:var(--pvw-bpak)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_baseplate__p03X2.style_caveKind__x9Yy5 .style_bg__N5lpK{fill:var(--pvw-bpck)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_baseplate__p03X2.style_hallKind__H\+yre .style_bg__N5lpK{fill:var(--pvw-bphk)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H{stroke-linecap:round;stroke-dasharray:2,3}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H.style_ambiguousKind__Pm08h{--fg-color:#fff;--fg-opacity:0.3}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H.style_spanningKind__cv5st{--fg-color:var(--pvw-pathspan)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H.style_auxiliaryKind__FSAib{--fg-color:var(--pvw-pathaux)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H>path{stroke:var(--fg-color);stroke-opacity:var(--fg-opacity);stroke-width:2px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H>text{fill:var(--fg-color);font-family:var(--font-tiny);font-size:12px;opacity:var(--fg-opacity)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv{--color-bg:#444;--color-fg:#fff}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_caveKind__x9Yy5 .style_bg__N5lpK{stroke-width:2px;fill:none}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_hallKind__H\+yre .style_bg__N5lpK{stroke-linecap:round;opacity:.4}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_hallKind__H\+yre.style_spanningPathKind__dvMVJ{--color-fg:var(--pvw-pathspan)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_hallKind__H\+yre.style_auxiliaryPathKind__rGxFg{--color-fg:var(--pvw-pathaux)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_fluid6__Oqtv2{--color-bg:var(--pvw-tile6)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_fluid11__7ylOY{--color-bg:var(--pvw-tile11)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_left__Yyqc4 .style_label__vGz9Y{text-anchor:end}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_inline__9fTzz .style_label__vGz9Y{text-anchor:middle;font-size:6px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv .style_label__vGz9Y{fill:var(--color-fg);font-size:12px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv .style_pointer__-G8l\+{fill:none;stroke-width:1px;stroke:var(--color-fg)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv .style_bg__N5lpK{stroke:var(--color-bg)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C.style_innerPearl__APwPv{stroke-width:1px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C.style_innerPearl__APwPv.style_caveKind__x9Yy5{--color0:#40ffff;--color1:#40dddd;--color2:#40bbbb;--color3:#409999}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C.style_innerPearl__APwPv.style_hallKind__H\+yre{--color0:#ffff20;--color1:#dddd20;--color2:#bbbb20;--color3:#999920}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C.style_outerPearl__MxT-o{stroke-width:.5px;--color0:#999;--color1:#888;--color2:#777;--color3:#666}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C .style_layer__Gfelc.style_layer0__tooG-{stroke:var(--color0)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C .style_layer__Gfelc.style_layer1__XpKZy{stroke:var(--color1)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C .style_layer__Gfelc.style_layer2__2BD4B{stroke:var(--color2)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C .style_layer__Gfelc.style_layer3__3Kn4w{stroke:var(--color3)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_tiles__iaD7a{shape-rendering:crispEdges}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_tiles__iaD7a .style_tile__mcUC8{transition:fill .5s ease-out}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_height__e764C{shape-rendering:crispEdges}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_entity__p\+Wtq{--color-fg:var(--pvw-entfriend)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_entity__p\+Wtq.style_enemy__z8gSd{--color-fg:var(--pvw-entenemy)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_entity__p\+Wtq .style_marker__n7Zau{fill:var(--color-fg);stroke:#000;stroke-width:.5px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_entity__p\+Wtq .style_label__vGz9Y{fill:#000;text-anchor:middle;font-family:Outfit;font-size:2px;pointer-events:none}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_openCaveFlag__kH4fE{stroke:red;fill:#fff}.style_cavernPreview__xf6rH .style_stats__bR5t1{background:var(--palette-bg);border:1px solid var(--palette-settings-bg);bottom:0;color:var(--palette-accent);font-family:var(--font-body);font-size:12px;left:0;margin:16px;max-width:calc(100% - 200px);padding:4px 14px;position:absolute}.style_cavernPreview__xf6rH .style_stats__bR5t1>*{margin:4px 0}.style_cavernPreview__xf6rH .style_stats__bR5t1 h1{font-family:var(--font-cyber);font-size:18px}.style_cavernPreview__xf6rH .style_stats__bR5t1>ul{padding:0}.style_cavernPreview__xf6rH .style_stats__bR5t1>ul>li{display:inline}.style_cavernPreview__xf6rH .style_stats__bR5t1>ul>li:not(:first-child){padding-left:16px}.style_cavernPreview__xf6rH .style_error__Oe9Pd{color:#f18686;font-family:var(--font-body);font-size:24px;left:0;line-break:anywhere;position:absolute;right:0;text-align:center;top:50%}.styles_script__wlFev{background:var(--palette-bg);border-right:1px solid var(--palette-settings-bg);overflow-x:hidden;overflow-y:scroll;position:relative;width:450px;z-index:1}.styles_script__wlFev>h2{padding:0 12px}.styles_script__wlFev .styles_src__D5r4o{word-wrap:break-word;font-family:var(--font-mono);font-size:12px}.styles_script__wlFev .styles_src__D5r4o .styles_line__DUONY{color:var(--color-codehlt);padding:0 12px}.styles_script__wlFev .styles_src__D5r4o .styles_line__DUONY.styles_hovered__IuDHx{background:var(--color-codehlt);color:#000}.styles_scriptOverlay__itjxQ .styles_tile__\+On\+N{fill:var(--color-codehlt)}.styles_scriptOverlay__itjxQ .styles_arrow__BwPCK{fill:none;stroke:var(--color-codehlt);stroke-width:2px}.styles_scriptOverlay__itjxQ .styles_arrowhead__VEozU{fill:var(--palette-bg);stroke:var(--color-codehlt);stroke-width:2px}.styles_misc__Oi8T3{--color-codehlt:var(--palette-fg)}.styles_condition__-r6Ai{--color-codehlt:#ff0}.styles_event__jROkn{--color-codehlt:cyan}.styles_popoverWrapper__re-vG{bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;right:0;top:0}.styles_popoverWrapper__re-vG>div{background:var(--palette-bg);border:1px solid var(--palette-settings-bg);margin:0 auto;max-height:calc(100% - 100px);max-width:500px;overflow-x:hidden;overflow-y:scroll;padding:12px 24px}.styles_popoverWrapper__re-vG>div h1,.styles_popoverWrapper__re-vG>div h2,.styles_popoverWrapper__re-vG>div h3,.styles_popoverWrapper__re-vG>div p{margin:4px 0}.styles_popoverWrapper__re-vG>div h1,.styles_popoverWrapper__re-vG>div h2,.styles_popoverWrapper__re-vG>div h3{color:var(--palette-accent)}.styles_popoverWrapper__re-vG>div a,.styles_popoverWrapper__re-vG>div button{background:none;border:none;color:var(--palette-accent);cursor:pointer;font-family:var(--font-body);font-size:1em;padding:0;text-decoration:underline}.styles_popoverWrapper__re-vG>div>ul{padding-left:0}.styles_popoverWrapper__re-vG>div .styles_subhead__tl6JE{font-size:.5em}.styles_popoverWrapper__re-vG>div h3:before{content:"subdirectory_arrow_right";font-family:Material Symbols Outlined}.styles_popoverWrapper__re-vG>div.styles_lore__aBk0G p{white-space-collapse:preserve-breaks}.styles_popoverWrapper__re-vG>div.styles_error__o6NAs{--palette-settings-bg:#ff0;--palette-accent:#ff0}.styles_popoverWrapper__re-vG>div.styles_error__o6NAs .styles_message__dHlbe{white-space:pre}.styles_popoverWrapper__re-vG>div.styles_error__o6NAs .styles_stack__6jNum{font-size:8px;white-space:pre}.styles_popoverWrapper__re-vG>div.styles_error__o6NAs .styles_context__tmsQi{font-size:8px;line-break:anywhere}@keyframes App_scan-scrim__73gMX{0%{background-position-x:-800px}to{background-position-x:0}}.App_App__HX9JK{--font-body:"Outfit";--font-cyber:"Russo One";--font-tiny:"Silkscreen";--font-mono:"IBM Plex Mono";--palette-fg:#fff;--palette-bg:#121212;--palette-lines:#999;--palette-disabled:#999;--palette-settings-bg:#333;--palette-accent:#c96f12;background:var(--palette-bg);color:var(--palette-fg);display:flex;font-family:var(--font-body);height:100%;overflow:hidden;position:absolute;width:100%}.App_App__HX9JK.App_iceBiome__TxzIK{--palette-bg:#060716;--palette-settings-bg:#224659;--palette-accent:#03c7dd}.App_App__HX9JK.App_lavaBiome__Je2vq{--palette-bg:#140b05;--palette-settings-bg:#4d2114;--palette-accent:#ca0b0b}.App_App__HX9JK .App_settingsPanel__5OsgF{background:var(--palette-settings-bg);flex-grow:1;flex-shrink:0;width:240px}.App_App__HX9JK .App_mainPanel__vxyPC{overflow:hidden;position:relative;width:75%}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE{background:var(--palette-settings-bg);bottom:0;left:0;position:absolute;right:0;top:0}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE:before{animation:App_scan-scrim__73gMX 3s linear infinite;background-image:linear-gradient(to left,#0000 0,var(--palette-accent) 25px,#0000 400px);background-size:800px 100%;bottom:0;content:"";left:0;opacity:0;position:absolute;right:0;top:0;transition:opacity 3s ease-in}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE.App_loading__XtoTg:before{opacity:1;transition:opacity .25s ease-out}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE:after{background:var(--palette-bg);bottom:0;content:"";left:0;-webkit-mask-composite:source-out;mask-composite:subtract;-webkit-mask-image:linear-gradient(90deg,#fff 16px,#0000 0,#0000 17px,#fff 0),linear-gradient(#0000 16px,#000 0,#000 17px,#0000 0);mask-image:linear-gradient(90deg,#fff 16px,#0000 0,#0000 17px,#fff 0),linear-gradient(#0000 16px,#000 0,#000 17px,#0000 0);-webkit-mask-size:32px 32px;mask-size:32px 32px;position:absolute;right:0;top:0}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE.App_hasError__ajbuN{background:#bebe13;-webkit-mask-image:linear-gradient(120deg,#fff 25%,#0000 0,#0000 50%,#fff 0,#fff 75%,#0000 0,#0000);mask-image:linear-gradient(120deg,#fff 25%,#0000 0,#0000 50%,#fff 0,#fff 75%,#0000 0,#0000);-webkit-mask-size:46.19px 80px;mask-size:46.19px 80px}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE.App_hasError__ajbuN:after,.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE.App_hasError__ajbuN:before{content:none}.App_App__HX9JK .App_mainPanel__vxyPC .App_stepName__nVlPC{font-feature-settings:"tnum";font-size:16px;font-variant-numeric:tabular-nums;left:16px;position:absolute;top:16px}.App_App__HX9JK .App_mainPanel__vxyPC .App_progressBar__ABZI2{background:linear-gradient(90deg,var(--palette-accent) 0,var(--palette-accent) var(--progress),#0000 var(--progress),#0000 100%);bottom:0;height:8px;position:absolute;transition:height .2s ease-out;width:100%}.App_App__HX9JK .App_mainPanel__vxyPC .App_progressBar__ABZI2.App_complete__bL2eM{height:0}.App_App__HX9JK .App_mainPanel__vxyPC .App_controls__arkPS{bottom:0;display:flex;gap:8px;margin:16px;position:absolute;right:0}.App_App__HX9JK .App_mainPanel__vxyPC .App_controls__arkPS .App_button__nYXNW,.App_App__HX9JK .App_mainPanel__vxyPC .App_controls__arkPS button{background:var(--palette-bg);border:1px solid var(--palette-lines);box-sizing:border-box;color:var(--palette-fg);display:block;font-family:Material Symbols Outlined;font-size:36px;height:48px;line-height:46px;margin:0;padding:0;text-align:center;text-decoration:none;width:48px}.App_App__HX9JK .App_mainPanel__vxyPC .App_controls__arkPS .App_button__nYXNW.App_disabled__fR4wn,.App_App__HX9JK .App_mainPanel__vxyPC .App_controls__arkPS button.App_disabled__fR4wn{border-style:dashed;color:var(--palette-lines)}.App_App__HX9JK .App_vizOptsPanel__EvGsa{background-image:linear-gradient(var(--palette-lines) 1px,#0000 1px),linear-gradient(to right,var(--palette-lines) 1px,#0000 1px);background-size:16px 16px;flex-grow:0;flex-shrink:0;font-family:var(--font-cyber);position:relative;width:128px}.App_App__HX9JK .App_vizOptsPanel__EvGsa h1{font-weight:400;margin:4px 0;text-align:center}.App_App__HX9JK .App_vizOptsPanel__EvGsa button{background:var(--palette-bg);border:1px solid var(--palette-lines);border-bottom-left-radius:8px;border-top-left-radius:8px;box-sizing:border-box;color:var(--palette-fg);font-family:var(--font-cyber);height:24px;left:-8px;margin-bottom:8px;padding:0 16px 0 8px;position:relative;transition:left .2s ease-out;width:152px}.App_App__HX9JK .App_vizOptsPanel__EvGsa button:hover{left:-14px}.App_App__HX9JK .App_vizOptsPanel__EvGsa button.App_active__57U0p{background:var(--palette-fg);color:var(--palette-bg);left:-16px}.App_App__HX9JK .App_vizOptsPanel__EvGsa button.App_disabled__fR4wn{color:var(--palette-disabled)} -/*# sourceMappingURL=main.59bb2f1c.css.map*/ \ No newline at end of file +@import url(https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,1,0&family=Russo+One&family=Outfit:wght@500&family=Silkscreen:wght@400;700&family=IBM+Plex+Mono:wght@400&display=swap);body{margin:0}.style_contextInput__1OoGc{height:100%;overflow-x:hidden;overflow-y:scroll;scrollbar-color:var(--palette-fg) #0000;scrollbar-width:thin}.style_contextInput__1OoGc>*{padding:0 8px}.style_contextInput__1OoGc>:first-child{margin-top:48px}.style_contextInput__1OoGc>:last-child{margin-bottom:200px}.style_contextInput__1OoGc .style_section__UU5kL .style_subsection__V6nKB:after{background:var(--palette-fg);content:" ";display:block;height:1px;margin-bottom:8px;width:100%}.style_contextInput__1OoGc h2{height:36px;line-height:28px;margin:0 0 -8px;top:0;z-index:2}.style_contextInput__1OoGc h2,.style_contextInput__1OoGc h3{background:linear-gradient(0deg,#0000,var(--palette-settings-bg) 8px,var(--palette-settings-bg));position:-webkit-sticky;position:sticky}.style_contextInput__1OoGc h3{height:24px;margin:0;padding-bottom:8px;top:28px;z-index:1}.style_contextInput__1OoGc h3:before{content:"subdirectory_arrow_right";font-family:Material Symbols Outlined}.style_contextInput__1OoGc p{margin:0}.style_contextInput__1OoGc .style_inputRow__e-kmi{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:8px}.style_contextInput__1OoGc .style_inputRow__e-kmi>:not([type=range]){background:none;border:1px solid var(--palette-lines);border-radius:8px;box-sizing:border-box;color:var(--palette-fg);font-family:var(--font-body);height:36px;line-height:34px;margin:0;padding:0;text-align:center;width:100%}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_icon__w\+PGc{flex-shrink:0;font-family:Material Symbols Outlined;font-size:24px;width:36px}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_inactive__-rc9v{border-style:dashed;color:var(--palette-lines)}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_invisible__I4pew{opacity:0}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_override__ZXWWz{background:#ff0;color:#000}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_seed__gS1FQ{font-size:24px}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_showAdvanced__sTHS2{display:flex;font-size:18px;height:24px;justify-content:center;line-height:22px;width:100%}.style_contextInput__1OoGc .style_inputRow__e-kmi .style_curve__v3DHl{border:none;display:flex;flex-direction:column;gap:6px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:6px 0}.style_contextInput__1OoGc .style_inputRow__e-kmi button{cursor:pointer}.style_contextInput__1OoGc .style_inputRow__e-kmi button:active{background:var(--palette-fg);color:#000}.style_contextInput__1OoGc .style_inputRow__e-kmi input[type=range]{-webkit-appearance:none;appearance:none;background:linear-gradient(to right,var(--palette-accent) 4px,var(--palette-accent) var(--completion),var(--palette-fg) var(--completion),var(--palette-fg) 100%);border-radius:2px;cursor:pointer;height:6px;outline:none;width:100%}.style_contextInput__1OoGc .style_inputRow__e-kmi input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:var(--palette-accent);border:none;border-radius:2px;height:14px;width:8px}.style_contextInput__1OoGc .style_inputRow__e-kmi input[type=range]::-moz-range-thumb{background-color:var(--palette-accent);border:none;border-radius:2px;height:14px;width:8px}@property --pvw-yaw{syntax:"";inherits:true;initial-value:0deg}@property --pvw-pitch{syntax:"";inherits:true;initial-value:0deg}@property --pvw-tr-x{syntax:"";inherits:true;initial-value:0}@property --pvw-tr-y{syntax:"";inherits:true;initial-value:0}@property --pvw-scale{syntax:"";inherits:true;initial-value:1}.style_cavernPreview__xf6rH{--pvw-bpak:#222;--pvw-bpck:#2d004b;--pvw-bphk:#166921;--pvw-pathspan:#ff0;--pvw-pathaux:#24b136;--pvw-entfriend:#ff0;--pvw-entenemy:red;--pvw-dfluid:#080022;--pvw-dfloor:#180032;--pvw-dwall:#2d004b;--pvw-scale0:#554;--pvw-scale1:#774;--pvw-scale2:#994;--pvw-scale3:#bb4;--pvw-scale4:#dd4;--pvw-scale5:#ff4;--pvw-scale6:#ff6;--pvw-scale7:#ff8;--pvw-tile1:#2d004b;--pvw-tile2:#180032;--pvw-tile3:#180032;--pvw-tile4:#180032;--pvw-tile5:#180032;--pvw-tile6:#ff5a00;--pvw-tile11:#002fb5;--pvw-tile12:#166921;--pvw-tile14:#bfbfbf;--pvw-tile24:#9d9b00;--pvw-tile26:#ad59ef;--pvw-tile30:#943cc3;--pvw-tile34:#731cad;--pvw-tile38:purple;--pvw-tile42:#b5ff00;--pvw-tile46:#9c4108;--pvw-tile50:#ff0;--pvw-tile60:#180032;--pvw-tile61:#180032;--pvw-tile62:#180032;--pvw-tile63:#180032;--pvw-disco0:#ff4;--pvw-disco1:#822;--pvw-oxex:#553;--pvw-oxhc:var(--pvw-tile42);display:flex;height:100%;overflow:hidden;position:absolute;width:100%}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe{position:relative;width:100%}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU{position:absolute;transform:rotateX(var(--pvw-pitch)) rotate(var(--pvw-yaw)) matrix(var(--pvw-scale),0,0,var(--pvw-scale),calc(var(--pvw-tr-x)*var(--pvw-scale)),calc(var(--pvw-tr-y)*var(--pvw-scale)));transition:transform .5s linear}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU.style_void__RvJKA{transition:none}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_baseplate__p03X2{font-family:var(--font-tiny);font-size:8px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_baseplate__p03X2 .style_fg__nlyiJ{fill:#fff}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_baseplate__p03X2.style_ambiguousKind__Pm08h .style_bg__N5lpK{fill:var(--pvw-bpak)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_baseplate__p03X2.style_caveKind__x9Yy5 .style_bg__N5lpK{fill:var(--pvw-bpck)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_baseplate__p03X2.style_hallKind__H\+yre .style_bg__N5lpK{fill:var(--pvw-bphk)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H{stroke-linecap:round;stroke-dasharray:2,3}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H.style_ambiguousKind__Pm08h{--fg-color:#fff;--fg-opacity:0.3}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H.style_spanningKind__cv5st{--fg-color:var(--pvw-pathspan)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H.style_auxiliaryKind__FSAib{--fg-color:var(--pvw-pathaux)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H>path{stroke:var(--fg-color);stroke-opacity:var(--fg-opacity);stroke-width:2px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_path__HXk6H>text{fill:var(--fg-color);font-family:var(--font-tiny);font-size:12px;opacity:var(--fg-opacity)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv{--color-bg:#444;--color-fg:#fff}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_caveKind__x9Yy5 .style_bg__N5lpK{stroke-width:2px;fill:none}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_hallKind__H\+yre .style_bg__N5lpK{stroke-linecap:round;opacity:.4}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_hallKind__H\+yre.style_spanningPathKind__dvMVJ{--color-fg:var(--pvw-pathspan)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_hallKind__H\+yre.style_auxiliaryPathKind__rGxFg{--color-fg:var(--pvw-pathaux)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_fluid6__Oqtv2{--color-bg:var(--pvw-tile6)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_fluid11__7ylOY{--color-bg:var(--pvw-tile11)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_left__Yyqc4 .style_label__vGz9Y{text-anchor:end}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv.style_inline__9fTzz .style_label__vGz9Y{text-anchor:middle;font-size:6px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv .style_label__vGz9Y{fill:var(--color-fg);font-size:12px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv .style_pointer__-G8l\+{fill:none;stroke-width:1px;stroke:var(--color-fg)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_plan__QISwv .style_bg__N5lpK{stroke:var(--color-bg)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C.style_innerPearl__APwPv{stroke-width:1px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C.style_innerPearl__APwPv.style_caveKind__x9Yy5{--color0:#40ffff;--color1:#40dddd;--color2:#40bbbb;--color3:#409999}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C.style_innerPearl__APwPv.style_hallKind__H\+yre{--color0:#ffff20;--color1:#dddd20;--color2:#bbbb20;--color3:#999920}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C.style_outerPearl__MxT-o{stroke-width:.5px;--color0:#999;--color1:#888;--color2:#777;--color3:#666}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C .style_layer__Gfelc.style_layer0__tooG-{stroke:var(--color0)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C .style_layer__Gfelc.style_layer1__XpKZy{stroke:var(--color1)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C .style_layer__Gfelc.style_layer2__2BD4B{stroke:var(--color2)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_pearl__std\+C .style_layer__Gfelc.style_layer3__3Kn4w{stroke:var(--color3)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_tiles__iaD7a{shape-rendering:crispEdges}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_tiles__iaD7a .style_tile__mcUC8{transition:fill .5s ease-out}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_height__e764C{shape-rendering:crispEdges}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_entity__p\+Wtq{--color-fg:var(--pvw-entfriend)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_entity__p\+Wtq.style_enemy__z8gSd{--color-fg:var(--pvw-entenemy)}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_entity__p\+Wtq .style_marker__n7Zau{fill:var(--color-fg);stroke:#000;stroke-width:.5px}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_entity__p\+Wtq .style_label__vGz9Y{fill:#000;text-anchor:middle;font-family:Outfit;font-size:2px;pointer-events:none}.style_cavernPreview__xf6rH .style_mapWrapper__l0TEe .style_map__o4nZU .style_openCaveFlag__kH4fE{stroke:red;fill:#fff}.style_cavernPreview__xf6rH .style_stats__bR5t1{background:var(--palette-bg);border:1px solid var(--palette-settings-bg);bottom:0;color:var(--palette-accent);font-family:var(--font-body);font-size:12px;left:0;margin:16px;max-width:calc(100% - 200px);padding:4px 14px;position:absolute}.style_cavernPreview__xf6rH .style_stats__bR5t1>*{margin:4px 0}.style_cavernPreview__xf6rH .style_stats__bR5t1 h1{font-family:var(--font-cyber);font-size:18px}.style_cavernPreview__xf6rH .style_stats__bR5t1>ul{padding:0}.style_cavernPreview__xf6rH .style_stats__bR5t1>ul>li{display:inline}.style_cavernPreview__xf6rH .style_stats__bR5t1>ul>li:not(:first-child){padding-left:16px}.style_cavernPreview__xf6rH .style_error__Oe9Pd{color:#f18686;font-family:var(--font-body);font-size:24px;left:0;line-break:anywhere;position:absolute;right:0;text-align:center;top:50%}.styles_script__wlFev{background:var(--palette-bg);border-right:1px solid var(--palette-settings-bg);overflow-x:hidden;overflow-y:scroll;position:relative;width:450px;z-index:1}.styles_script__wlFev>h2{padding:0 12px}.styles_script__wlFev .styles_src__D5r4o{word-wrap:break-word;font-family:var(--font-mono);font-size:12px}.styles_script__wlFev .styles_src__D5r4o .styles_line__DUONY{color:var(--color-codehlt);padding:0 12px}.styles_script__wlFev .styles_src__D5r4o .styles_line__DUONY.styles_hovered__IuDHx{background:var(--color-codehlt);color:#000}.styles_scriptOverlay__itjxQ .styles_tile__\+On\+N{fill:var(--color-codehlt)}.styles_scriptOverlay__itjxQ .styles_arrow__BwPCK{fill:none;stroke:var(--color-codehlt);stroke-width:2px}.styles_scriptOverlay__itjxQ .styles_arrowhead__VEozU{fill:var(--palette-bg);stroke:var(--color-codehlt);stroke-width:2px}.styles_h3__EDfli{font-family:var(--font-body);font-size:20px}.styles_h4__4XasX{font-family:var(--font-body);font-size:14px}.styles_misc__Oi8T3{--color-codehlt:var(--palette-fg)}.styles_condition__-r6Ai{--color-codehlt:#ff0}.styles_event__jROkn{--color-codehlt:cyan}.styles_popoverWrapper__re-vG{bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;right:0;top:0}.styles_popoverWrapper__re-vG>div{background:var(--palette-bg);border:1px solid var(--palette-settings-bg);margin:0 auto;max-height:calc(100% - 100px);max-width:500px;overflow-x:hidden;overflow-y:scroll;padding:12px 24px}.styles_popoverWrapper__re-vG>div h1,.styles_popoverWrapper__re-vG>div h2,.styles_popoverWrapper__re-vG>div h3,.styles_popoverWrapper__re-vG>div p{margin:4px 0}.styles_popoverWrapper__re-vG>div h1,.styles_popoverWrapper__re-vG>div h2,.styles_popoverWrapper__re-vG>div h3{color:var(--palette-accent)}.styles_popoverWrapper__re-vG>div a,.styles_popoverWrapper__re-vG>div button{background:none;border:none;color:var(--palette-accent);cursor:pointer;font-family:var(--font-body);font-size:1em;padding:0;text-decoration:underline}.styles_popoverWrapper__re-vG>div>ul{padding-left:0}.styles_popoverWrapper__re-vG>div .styles_subhead__tl6JE{font-size:.5em}.styles_popoverWrapper__re-vG>div h3:before{content:"subdirectory_arrow_right";font-family:Material Symbols Outlined}.styles_popoverWrapper__re-vG>div.styles_lore__aBk0G p{white-space-collapse:preserve-breaks}.styles_popoverWrapper__re-vG>div.styles_error__o6NAs{--palette-settings-bg:#ff0;--palette-accent:#ff0}.styles_popoverWrapper__re-vG>div.styles_error__o6NAs .styles_message__dHlbe{white-space:pre}.styles_popoverWrapper__re-vG>div.styles_error__o6NAs .styles_stack__6jNum{font-size:8px;white-space:pre}.styles_popoverWrapper__re-vG>div.styles_error__o6NAs .styles_context__tmsQi{font-size:8px;line-break:anywhere}@keyframes App_scan-scrim__73gMX{0%{background-position-x:-800px}to{background-position-x:0}}.App_App__HX9JK{--font-body:"Outfit";--font-cyber:"Russo One";--font-tiny:"Silkscreen";--font-mono:"IBM Plex Mono";--palette-fg:#fff;--palette-bg:#121212;--palette-lines:#999;--palette-disabled:#999;--palette-settings-bg:#333;--palette-accent:#c96f12;background:var(--palette-bg);color:var(--palette-fg);display:flex;font-family:var(--font-body);height:100%;overflow:hidden;position:absolute;width:100%}.App_App__HX9JK.App_iceBiome__TxzIK{--palette-bg:#060716;--palette-settings-bg:#224659;--palette-accent:#03c7dd}.App_App__HX9JK.App_lavaBiome__Je2vq{--palette-bg:#140b05;--palette-settings-bg:#4d2114;--palette-accent:#ca0b0b}.App_App__HX9JK .App_settingsPanel__5OsgF{background:var(--palette-settings-bg);flex-grow:1;flex-shrink:0;width:240px}.App_App__HX9JK .App_mainPanel__vxyPC{overflow:hidden;position:relative;width:75%}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE{background:var(--palette-settings-bg);bottom:0;left:0;position:absolute;right:0;top:0}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE:before{animation:App_scan-scrim__73gMX 3s linear infinite;background-image:linear-gradient(to left,#0000 0,var(--palette-accent) 25px,#0000 400px);background-size:800px 100%;bottom:0;content:"";left:0;opacity:0;position:absolute;right:0;top:0;transition:opacity 3s ease-in}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE.App_loading__XtoTg:before{opacity:1;transition:opacity .25s ease-out}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE:after{background:var(--palette-bg);bottom:0;content:"";left:0;-webkit-mask-composite:source-out;mask-composite:subtract;-webkit-mask-image:linear-gradient(90deg,#fff 16px,#0000 0,#0000 17px,#fff 0),linear-gradient(#0000 16px,#000 0,#000 17px,#0000 0);mask-image:linear-gradient(90deg,#fff 16px,#0000 0,#0000 17px,#fff 0),linear-gradient(#0000 16px,#000 0,#000 17px,#0000 0);-webkit-mask-size:32px 32px;mask-size:32px 32px;position:absolute;right:0;top:0}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE.App_hasError__ajbuN{background:#bebe13;-webkit-mask-image:linear-gradient(120deg,#fff 25%,#0000 0,#0000 50%,#fff 0,#fff 75%,#0000 0,#0000);mask-image:linear-gradient(120deg,#fff 25%,#0000 0,#0000 50%,#fff 0,#fff 75%,#0000 0,#0000);-webkit-mask-size:46.19px 80px;mask-size:46.19px 80px}.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE.App_hasError__ajbuN:after,.App_App__HX9JK .App_mainPanel__vxyPC .App_grid__p-lsE.App_hasError__ajbuN:before{content:none}.App_App__HX9JK .App_mainPanel__vxyPC .App_stepName__nVlPC{font-feature-settings:"tnum";font-size:16px;font-variant-numeric:tabular-nums;left:16px;position:absolute;top:16px}.App_App__HX9JK .App_mainPanel__vxyPC .App_progressBar__ABZI2{background:linear-gradient(90deg,var(--palette-accent) 0,var(--palette-accent) var(--progress),#0000 var(--progress),#0000 100%);bottom:0;height:8px;position:absolute;transition:height .2s ease-out;width:100%}.App_App__HX9JK .App_mainPanel__vxyPC .App_progressBar__ABZI2.App_complete__bL2eM{height:0}.App_App__HX9JK .App_mainPanel__vxyPC .App_controls__arkPS{bottom:0;display:flex;gap:8px;margin:16px;position:absolute;right:0}.App_App__HX9JK .App_mainPanel__vxyPC .App_controls__arkPS .App_button__nYXNW,.App_App__HX9JK .App_mainPanel__vxyPC .App_controls__arkPS button{background:var(--palette-bg);border:1px solid var(--palette-lines);box-sizing:border-box;color:var(--palette-fg);display:block;font-family:Material Symbols Outlined;font-size:36px;height:48px;line-height:46px;margin:0;padding:0;text-align:center;text-decoration:none;width:48px}.App_App__HX9JK .App_mainPanel__vxyPC .App_controls__arkPS .App_button__nYXNW.App_disabled__fR4wn,.App_App__HX9JK .App_mainPanel__vxyPC .App_controls__arkPS button.App_disabled__fR4wn{border-style:dashed;color:var(--palette-lines)}.App_App__HX9JK .App_vizOptsPanel__EvGsa{background-image:linear-gradient(var(--palette-lines) 1px,#0000 1px),linear-gradient(to right,var(--palette-lines) 1px,#0000 1px);background-size:16px 16px;flex-grow:0;flex-shrink:0;font-family:var(--font-cyber);position:relative;width:128px}.App_App__HX9JK .App_vizOptsPanel__EvGsa h1{font-weight:400;margin:4px 0;text-align:center}.App_App__HX9JK .App_vizOptsPanel__EvGsa button{background:var(--palette-bg);border:1px solid var(--palette-lines);border-bottom-left-radius:8px;border-top-left-radius:8px;box-sizing:border-box;color:var(--palette-fg);font-family:var(--font-cyber);height:24px;left:-8px;margin-bottom:8px;padding:0 16px 0 8px;position:relative;transition:left .2s ease-out;width:152px}.App_App__HX9JK .App_vizOptsPanel__EvGsa button:hover{left:-14px}.App_App__HX9JK .App_vizOptsPanel__EvGsa button.App_active__57U0p{background:var(--palette-fg);color:var(--palette-bg);left:-16px}.App_App__HX9JK .App_vizOptsPanel__EvGsa button.App_disabled__fR4wn{color:var(--palette-disabled)} +/*# sourceMappingURL=main.5435b5e4.css.map*/ \ No newline at end of file diff --git a/static/css/main.5435b5e4.css.map b/static/css/main.5435b5e4.css.map new file mode 100644 index 0000000..0d2d73c --- /dev/null +++ b/static/css/main.5435b5e4.css.map @@ -0,0 +1 @@ +{"version":3,"file":"static/css/main.5435b5e4.css","mappings":"iOAEA,KACE,QACF,CCJA,2BAGE,YAFA,kBACA,kBAGA,wCACA,qBAEA,6BACE,cAEA,wCACE,gBAGF,uCACE,oBAMA,gFAME,6BALA,YACA,cAEA,WACA,kBAFA,UAGA,CAKN,8BAKE,YACA,iBAFA,gBAFA,MAKA,SACA,CAQF,4DARE,iGAPA,uCAsBA,CAPF,8BAIE,YADA,SAEA,mBAHA,SAIA,SACA,CAMA,qCAEE,mCADA,qCACA,CAIJ,6BACE,SAGF,kDAIE,mBAHA,aACA,QACA,8BAEA,kBAEA,qEAUE,gBALA,sCAMA,kBAPA,sBAKA,wBAGA,6BAXA,YAEA,iBAIA,SADA,UAOA,kBAXA,UAWA,CAGF,sEAGE,cAFA,sCACA,eAEA,WAGF,yEAEE,oBADA,0BACA,CAGF,0EACE,UAGF,yEAEE,gBADA,UACA,CAGF,qEACE,eAGF,6EACE,aAKA,eAFA,YAFA,uBAKA,iBAJA,UAIA,CAGF,sEAIE,YAHA,aAEA,sBAGA,QAJA,sEAGA,aACA,CAGF,yDACE,eAEA,gEACE,6BACA,WAIJ,oEACE,wBACA,gBAMA,kKAFA,kBAFA,eAGA,WAFA,aAFA,UAKA,CAQA,0FACE,wBACA,gBAGA,uCAEA,YADA,kBAHA,YACA,SAGA,CAGF,sFAGE,uCAEA,YADA,kBAHA,YACA,SAGA,CCnLR,oBACE,iBACA,cACA,m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ACA,8BAVA,YAFA,UAKA,kBACA,qBAPA,kBAcA,6BAZA,WAYA,CAEA,sDACE,WAGF,kEAGE,6BADA,wBADA,UAEA,CAGF,oEACE","sources":["index.css","webui/components/context_editor/style.module.scss","webui/components/map_preview/style.module.scss","webui/components/map_preview/script_preview/styles.module.scss","webui/components/popovers/styles.module.scss","webui/App.module.scss"],"sourcesContent":["@import url(\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,1,0&family=Russo+One&family=Outfit:wght@500&family=Silkscreen:wght@400;700&family=IBM+Plex+Mono:wght@400&display=swap\");\n\nbody {\n margin: 0;\n}\n",".contextInput {\n overflow-x: hidden;\n overflow-y: scroll;\n height: 100%;\n\n scrollbar-color: var(--palette-fg) transparent;\n scrollbar-width: thin;\n\n & > * {\n padding: 0 8px;\n\n &:first-child {\n margin-top: 48px;\n }\n\n &:last-child {\n margin-bottom: 200px;\n }\n }\n\n .section {\n .subsection {\n &::after {\n content: \" \";\n display: block;\n width: 100%;\n height: 1px;\n margin-bottom: 8px;\n background: var(--palette-fg);\n }\n }\n }\n\n h2 {\n position: sticky;\n top: 0;\n margin: 0;\n margin-bottom: -8px;\n height: 36px;\n line-height: 28px;\n z-index: 2;\n background: linear-gradient(\n 0deg,\n transparent,\n var(--palette-settings-bg) 8px,\n var(--palette-settings-bg)\n );\n }\n\n h3 {\n position: sticky;\n top: 28px;\n margin: 0;\n height: 24px;\n padding-bottom: 8px;\n z-index: 1;\n background: linear-gradient(\n 0deg,\n transparent,\n var(--palette-settings-bg) 8px,\n var(--palette-settings-bg)\n );\n &::before {\n font-family: \"Material Symbols Outlined\";\n content: \"subdirectory_arrow_right\";\n }\n }\n\n p {\n margin: 0;\n }\n\n .inputRow {\n display: flex;\n gap: 8px;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 8px;\n\n > *:not([type=\"range\"]) {\n height: 36px;\n width: 100%;\n line-height: 34px;\n box-sizing: border-box;\n border: 1px solid var(--palette-lines);\n padding: 0;\n margin: 0;\n\n color: var(--palette-fg);\n background: none;\n border-radius: 8px;\n font-family: var(--font-body);\n text-align: center;\n }\n\n .icon {\n font-family: \"Material Symbols Outlined\";\n font-size: 24px;\n flex-shrink: 0;\n width: 36px;\n }\n\n .inactive {\n color: var(--palette-lines);\n border-style: dashed;\n }\n\n .invisible {\n opacity: 0;\n }\n\n .override {\n color: black;\n background: yellow;\n }\n\n .seed {\n font-size: 24px;\n }\n\n .showAdvanced {\n display: flex;\n justify-content: center;\n width: 100%;\n height: 24px;\n\n font-size: 18px;\n line-height: 22px;\n }\n\n .curve {\n display: flex;\n height: fit-content;\n flex-direction: column;\n border: none;\n padding: 6px 0;\n gap: 6px;\n }\n\n button {\n cursor: pointer;\n\n &:active {\n background: var(--palette-fg);\n color: black;\n }\n }\n\n input[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n cursor: pointer;\n outline: none;\n border-radius: 2px;\n height: 6px;\n background: linear-gradient(\n to right,\n var(--palette-accent) 4px,\n var(--palette-accent) var(--completion),\n var(--palette-fg) var(--completion),\n var(--palette-fg) 100%\n );\n\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n height: 14px;\n width: 8px;\n background-color: var(--palette-accent);\n border-radius: 2px;\n border: none;\n }\n\n &::-moz-range-thumb {\n height: 14px;\n width: 8px;\n background-color: var(--palette-accent);\n border-radius: 2px;\n border: none;\n }\n }\n }\n}\n","@property --pvw-yaw {\n syntax: \"\";\n inherits: true;\n initial-value: 0deg;\n}\n@property --pvw-pitch {\n syntax: \"\";\n inherits: true;\n initial-value: 0deg;\n}\n@property --pvw-tr-x {\n syntax: \"\";\n inherits: true;\n initial-value: 0;\n}\n@property --pvw-tr-y {\n syntax: \"\";\n inherits: true;\n initial-value: 0;\n}\n@property --pvw-scale {\n syntax: \"\";\n inherits: true;\n initial-value: 1;\n}\n\n.cavernPreview {\n position: absolute;\n overflow: hidden;\n width: 100%;\n height: 100%;\n\n display: flex;\n\n // Blueprints\n --pvw-bpak: #222222;\n --pvw-bpck: #2d004b;\n --pvw-bphk: #166921;\n // Paths\n --pvw-pathspan: yellow;\n --pvw-pathaux: #24b136;\n // Entites\n --pvw-entfriend: yellow;\n --pvw-entenemy: red;\n // Default tile overlays\n --pvw-dfluid: #080022;\n --pvw-dfloor: #180032;\n --pvw-dwall: #2d004b;\n // Tile overlays indicating numeric qty (ore, ec, landslideness...)\n --pvw-scale0: #555544;\n --pvw-scale1: #777744;\n --pvw-scale2: #999944;\n --pvw-scale3: #bbbb44;\n --pvw-scale4: #dddd44;\n --pvw-scale5: #ffff44;\n --pvw-scale6: #ffff66;\n --pvw-scale7: #ffff88;\n // Specific tile IDs\n --pvw-tile1: #2d004b;\n --pvw-tile2: #180032;\n --pvw-tile3: #180032;\n --pvw-tile4: #180032;\n --pvw-tile5: #180032;\n --pvw-tile6: #ff5a00;\n --pvw-tile11: #002fb5;\n --pvw-tile12: #166921;\n --pvw-tile14: #bfbfbf;\n --pvw-tile24: #9d9b00;\n --pvw-tile26: #ad59ef;\n --pvw-tile30: #943cc3;\n --pvw-tile34: #731cad;\n --pvw-tile38: #800080;\n --pvw-tile42: #b5ff00;\n --pvw-tile46: #9c4108;\n --pvw-tile50: #ffff00;\n --pvw-tile60: #180032;\n --pvw-tile61: #180032;\n --pvw-tile62: #180032;\n --pvw-tile63: #180032;\n // Cavern Discovery\n --pvw-disco0: #ffff44;\n --pvw-disco1: #882222;\n // Oxygen\n --pvw-oxex: #555533;\n --pvw-oxhc: var(--pvw-tile42);\n\n .mapWrapper {\n position: relative;\n width: 100%;\n\n .map {\n position: absolute;\n transition: transform 500ms linear;\n transform: rotate3d(1, 0, 0, var(--pvw-pitch)) rotate(var(--pvw-yaw))\n matrix(\n var(--pvw-scale),\n 0,\n 0,\n var(--pvw-scale),\n calc(var(--pvw-tr-x) * var(--pvw-scale)),\n calc(var(--pvw-tr-y) * var(--pvw-scale))\n );\n\n &.void {\n transition: none;\n }\n\n .baseplate {\n font-family: var(--font-tiny);\n font-size: 8px;\n\n .fg {\n fill: white;\n }\n\n &.ambiguousKind .bg {\n fill: var(--pvw-bpak);\n }\n\n &.caveKind .bg {\n fill: var(--pvw-bpck);\n }\n\n &.hallKind .bg {\n fill: var(--pvw-bphk);\n }\n }\n\n .path {\n stroke-linecap: round;\n stroke-dasharray: 2, 3;\n\n &.ambiguousKind {\n --fg-color: white;\n --fg-opacity: 0.3;\n }\n\n &.spanningKind {\n --fg-color: var(--pvw-pathspan);\n }\n\n &.auxiliaryKind {\n --fg-color: var(--pvw-pathaux);\n }\n\n & > path {\n stroke: var(--fg-color);\n stroke-opacity: var(--fg-opacity);\n stroke-width: 2px;\n }\n\n & > text {\n fill: var(--fg-color);\n opacity: var(--fg-opacity);\n font-family: var(--font-tiny);\n font-size: 12px;\n }\n }\n\n .plan {\n --color-bg: #444444;\n --color-fg: white;\n &.caveKind .bg {\n stroke-width: 2px;\n fill: none;\n }\n &.hallKind {\n .bg {\n stroke-linecap: round;\n opacity: 0.4;\n }\n &.spanningPathKind {\n --color-fg: var(--pvw-pathspan);\n }\n &.auxiliaryPathKind {\n --color-fg: var(--pvw-pathaux);\n }\n }\n &.fluid6 {\n --color-bg: var(--pvw-tile6);\n }\n &.fluid11 {\n --color-bg: var(--pvw-tile11);\n }\n &.left .label {\n text-anchor: end;\n }\n &.inline .label {\n text-anchor: middle;\n font-size: 6px;\n }\n .label {\n fill: var(--color-fg);\n font-size: 12px;\n }\n .pointer {\n fill: none;\n stroke-width: 1px;\n stroke: var(--color-fg);\n }\n .bg {\n stroke: var(--color-bg);\n }\n }\n\n .pearl {\n &.innerPearl {\n stroke-width: 1px;\n &.caveKind {\n --color0: #40ffff;\n --color1: #40dddd;\n --color2: #40bbbb;\n --color3: #409999;\n }\n &.hallKind {\n --color0: #ffff20;\n --color1: #dddd20;\n --color2: #bbbb20;\n --color3: #999920;\n }\n }\n &.outerPearl {\n stroke-width: 0.5px;\n --color0: #999999;\n --color1: #888888;\n --color2: #777777;\n --color3: #666666;\n }\n .layer {\n &.layer0 {\n stroke: var(--color0);\n }\n &.layer1 {\n stroke: var(--color1);\n }\n &.layer2 {\n stroke: var(--color2);\n }\n &.layer3 {\n stroke: var(--color3);\n }\n }\n }\n\n .tiles {\n shape-rendering: crispEdges;\n .tile {\n transition: fill 500ms ease-out;\n }\n }\n\n .height {\n shape-rendering: crispEdges;\n }\n\n .entity {\n --color-fg: var(--pvw-entfriend);\n &.enemy {\n --color-fg: var(--pvw-entenemy);\n }\n .marker {\n fill: var(--color-fg);\n stroke: black;\n stroke-width: 0.5px;\n }\n .label {\n fill: black;\n font-family: \"Outfit\";\n font-size: 2px;\n text-anchor: middle;\n pointer-events: none;\n }\n }\n\n .openCaveFlag {\n stroke: red;\n fill: white;\n }\n }\n }\n\n .stats {\n position: absolute;\n left: 0;\n bottom: 0;\n color: var(--palette-accent);\n background: var(--palette-bg);\n font-family: var(--font-body);\n font-size: 12px;\n max-width: calc(100% - 200px);\n border: 1px solid var(--palette-settings-bg);\n padding: 4px 14px;\n margin: 16px;\n\n > * {\n margin: 4px 0;\n }\n\n h1 {\n font-family: var(--font-cyber);\n font-size: 18px;\n }\n\n > ul {\n padding: 0;\n\n > li {\n display: inline;\n\n &:not(:first-child) {\n padding-left: 16px;\n }\n }\n }\n }\n\n .error {\n position: absolute;\n left: 0;\n right: 0;\n top: 50%;\n font-size: 24px;\n color: #f18686;\n font-family: var(--font-body);\n text-align: center;\n line-break: anywhere;\n }\n}\n",".script {\n position: relative;\n background: var(--palette-bg);\n border-right: 1px solid var(--palette-settings-bg);\n width: 450px;\n overflow-x: hidden;\n overflow-y: scroll;\n z-index: 1;\n\n > h2 {\n padding: 0 12px;\n }\n\n .src {\n font-family: var(--font-mono);\n font-size: 12px;\n word-wrap: break-word;\n\n .line {\n color: var(--color-codehlt);\n padding: 0 12px;\n\n &.hovered {\n color: black;\n background: var(--color-codehlt);\n }\n }\n }\n}\n\n.scriptOverlay {\n .tile {\n fill: var(--color-codehlt);\n }\n\n .arrow {\n fill: none;\n stroke: var(--color-codehlt);\n stroke-width: 2px;\n }\n\n .arrowhead {\n fill: var(--palette-bg);\n stroke: var(--color-codehlt);\n stroke-width: 2px;\n }\n}\n\n.h3 {\n font-size: 20px;\n font-family: var(--font-body);\n}\n.h4 {\n font-size: 14px;\n font-family: var(--font-body);\n}\n.misc {\n --color-codehlt: var(--palette-fg);\n}\n.condition {\n --color-codehlt: yellow;\n}\n.event {\n --color-codehlt: cyan;\n}\n",".popoverWrapper {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n > div {\n background: var(--palette-bg);\n border: 1px solid var(--palette-settings-bg);\n margin: 0 auto;\n padding: 12px 24px;\n max-width: 500px;\n max-height: calc(100% - 100px);\n overflow-x: hidden;\n overflow-y: scroll;\n\n h1,\n h2,\n h3,\n p {\n margin: 4px 0;\n }\n\n h1,\n h2,\n h3 {\n color: var(--palette-accent);\n }\n\n a,\n button {\n border: none;\n padding: 0;\n font-size: 1em;\n background: none;\n color: var(--palette-accent);\n cursor: pointer;\n font-family: var(--font-body);\n text-decoration: underline;\n }\n\n > ul {\n padding-left: 0;\n }\n\n .subhead {\n font-size: 0.5em;\n }\n\n h3::before {\n font-family: \"Material Symbols Outlined\";\n content: \"subdirectory_arrow_right\";\n }\n\n &.lore {\n p {\n white-space-collapse: preserve-breaks;\n }\n }\n\n &.error {\n --palette-settings-bg: yellow;\n --palette-accent: yellow;\n\n .message {\n white-space: pre;\n }\n\n .stack {\n font-size: 8px;\n white-space: pre;\n }\n\n .context {\n font-size: 8px;\n line-break: anywhere;\n }\n }\n }\n}\n","@keyframes scan-scrim {\n 0% {\n background-position-x: -800px;\n }\n 100% {\n background-position-x: 0;\n }\n}\n\n.App {\n --font-body: \"Outfit\";\n --font-cyber: \"Russo One\";\n --font-tiny: \"Silkscreen\";\n --font-mono: \"IBM Plex Mono\";\n\n --palette-fg: white;\n --palette-bg: #121212;\n --palette-lines: #999999;\n --palette-disabled: #999999;\n --palette-settings-bg: #333333;\n --palette-accent: #c96f12;\n\n &.iceBiome {\n --palette-bg: #060716;\n --palette-settings-bg: hsl(200, 45%, 24%);\n --palette-accent: hsl(186, 97%, 44%);\n }\n\n &.lavaBiome {\n --palette-bg: #140b05;\n --palette-settings-bg: #4d2114;\n --palette-accent: #ca0b0b;\n }\n\n display: flex;\n position: absolute;\n overflow: hidden;\n width: 100%;\n height: 100%;\n\n color: var(--palette-fg);\n background: var(--palette-bg);\n font-family: var(--font-body);\n\n .settingsPanel {\n width: 240px;\n flex-shrink: 0;\n flex-grow: 1;\n background: var(--palette-settings-bg);\n }\n\n .mainPanel {\n position: relative;\n width: 75%;\n overflow: hidden;\n\n .grid {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n\n background: var(--palette-settings-bg);\n\n &::before {\n content: \"\";\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n\n background-image: linear-gradient(\n to left,\n transparent 0px,\n var(--palette-accent) 25px,\n transparent 400px\n );\n background-size: 800px 100%;\n animation: scan-scrim 3s infinite linear;\n opacity: 0;\n transition: opacity 3000ms ease-in;\n }\n\n &.loading::before {\n opacity: 1;\n transition: opacity 250ms ease-out;\n }\n\n &::after {\n content: \"\";\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n\n background: var(--palette-bg);\n mask-composite: subtract;\n mask-image: linear-gradient(\n to right,\n white 16px,\n transparent 16px,\n transparent 17px,\n white 17px\n ),\n linear-gradient(\n transparent 16px,\n black 16px,\n black 17px,\n transparent 17px\n );\n mask-size: 32px 32px;\n }\n\n &.hasError {\n background: #bebe13;\n mask-image: linear-gradient(\n 120deg,\n white 25%,\n transparent 25%,\n transparent 50%,\n white 50%,\n white 75%,\n transparent 75%,\n transparent 100%\n );\n mask-size: 46.19px 80px;\n\n &::before,\n &::after {\n content: none;\n }\n }\n }\n\n .stepName {\n position: absolute;\n top: 16px;\n left: 16px;\n font-size: 16px;\n font-variant-numeric: tabular-nums;\n }\n\n .progressBar {\n position: absolute;\n width: 100%;\n height: 8px;\n bottom: 0;\n background: linear-gradient(\n 90deg,\n var(--palette-accent) 0%,\n var(--palette-accent) var(--progress),\n transparent var(--progress),\n transparent 100%\n );\n transition: height 200ms ease-out;\n &.complete {\n height: 0;\n }\n }\n\n .controls {\n display: flex;\n gap: 8px;\n margin: 16px;\n position: absolute;\n bottom: 0;\n right: 0;\n\n button,\n .button {\n display: block;\n height: 48px;\n width: 48px;\n font-size: 36px;\n line-height: 46px;\n box-sizing: border-box;\n border: 1px solid var(--palette-lines);\n padding: 0;\n margin: 0;\n\n color: var(--palette-fg);\n background: var(--palette-bg);\n font-family: \"Material Symbols Outlined\";\n text-align: center;\n text-decoration: none;\n\n &.disabled {\n border-style: dashed;\n color: var(--palette-lines);\n }\n }\n }\n }\n\n .vizOptsPanel {\n position: relative;\n width: 128px;\n flex-shrink: 0;\n flex-grow: 0;\n\n background-image: linear-gradient(var(--palette-lines) 1px, transparent 1px),\n linear-gradient(to right, var(--palette-lines) 1px, transparent 1px);\n background-size: 16px 16px;\n font-family: var(--font-cyber);\n\n h1 {\n font-weight: normal;\n margin: 4px 0;\n text-align: center;\n }\n\n button {\n position: relative;\n left: -8px;\n width: 152px;\n height: 24px;\n box-sizing: border-box;\n border: 1px solid var(--palette-lines);\n margin-bottom: 8px;\n padding: 0 16px 0 8px;\n\n background: var(--palette-bg);\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n color: var(--palette-fg);\n font-family: var(--font-cyber);\n transition: left 200ms ease-out;\n\n &:hover {\n left: -14px;\n }\n\n &.active {\n left: -16px;\n color: var(--palette-bg);\n background: var(--palette-fg);\n }\n\n &.disabled {\n color: var(--palette-disabled);\n }\n }\n }\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/css/main.59bb2f1c.css.map b/static/css/main.59bb2f1c.css.map deleted file mode 100644 index df09d7b..0000000 --- a/static/css/main.59bb2f1c.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/css/main.59bb2f1c.css","mappings":"iOAEA,KACE,QACF,CCJA,2BAGE,YAFA,kBACA,kBAGA,wCACA,qBAEA,6BACE,cAEA,wCACE,gBAGF,uCACE,oBAMA,gFAME,6BALA,YACA,cAEA,WACA,kBAFA,UAGA,CAKN,8BAKE,YACA,iBAFA,gBAFA,MAKA,SACA,CAQF,4DARE,iGAPA,uCAsBA,CAPF,8BAIE,YADA,SAEA,mBAHA,SAIA,SACA,CAMA,qCAEE,mCADA,qCACA,CAIJ,6BACE,SAGF,kDAIE,mBAHA,aACA,QACA,8BAEA,kBAEA,qEAUE,gBALA,sCAMA,kBAPA,sBAKA,wBAGA,6BAXA,YAEA,iBAIA,SADA,UAOA,kBAXA,UAWA,CAGF,sEAGE,cAFA,sCACA,eAEA,WAGF,yEAEE,oBADA,0BACA,CAGF,0EACE,UAGF,yEAEE,gBADA,UACA,CAGF,qEACE,eAGF,6EACE,aAKA,eAFA,YAFA,uBAKA,iBAJA,UAIA,CAGF,sEAIE,YAHA,aAEA,sBAGA,QAJA,sEAGA,aACA,CAGF,yDACE,eAEA,gEACE,6BACA,WAIJ,oEACE,wBACA,gBAMA,kKAFA,kBAFA,eAGA,WAFA,aAFA,UAKA,CAQA,0FACE,wBACA,gBAGA,uCAEA,YADA,kBAHA,YACA,SAGA,CAGF,sFAGE,uCAEA,YADA,kBAHA,YACA,SAGA,CCnLR,oBACE,iBACA,cACA,mBAEF,sBACE,iBACA,cACA,mBAEF,qBACE,kBACA,cACA,gBAEF,qBACE,kBACA,cACA,gBAEF,sBACE,kBACA,cACA,gBAGF,4BASE,eAAmB,CACnB,kBAAmB,CACnB,kBAAmB,CAEnB,mBAAsB,CACtB,qBAAsB,CAEtB,oBAAuB,CACvB,kBAAmB,CAEnB,oBAAqB,CACrB,oBAAqB,CACrB,mBAAoB,CAEpB,iBAAqB,CACrB,iBAAqB,CACrB,iBAAqB,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,CAqBzB,6BADA,wBANA,aAQA,6BAJA,YAFA,gBADA,kBAEA,UAKA,CApBA,oCACE,oBAAqB,CACrB,6BAAyC,CACzC,wBAAoC,CAGtC,qCACE,oBAAqB,CACrB,6BAA8B,CAC9B,wBAAyB,CAa3B,0CAIE,sCADA,YADA,cADA,WAGA,CAGF,sCAGE,gBAFA,kBACA,SACA,CAEA,uDAOE,sCAFA,SAHA,OADA,kBAGA,QADA,KAIA,CAEA,8DAeE,mDAPA,yFAMA,2BARA,SALA,WAEA,OAaA,UAdA,kBAGA,QADA,MAaA,8BAGF,iFACE,UACA,iCAGF,6DAQE,6BAFA,SALA,WAEA,OAMA,0DACA,8PAaA,gDArBA,kBAGA,QADA,KAmBA,CAGF,2EACE,mBACA,gMAUA,sDAEA,mKAEE,aAKN,2DAKE,6BADA,eACA,kCAFA,UAFA,kBACA,QAGA,CAGF,8DAKE,iIADA,SADA,WAFA,kBAWA,+BAVA,UAUA,CACA,kFACE,SAIJ,2DAKE,SAJA,aACA,QACA,YACA,kBAEA,QAEA,gJAaE,6BALA,sCADA,sBAKA,wBAVA,cAYA,sCATA,eAFA,YAGA,iBAIA,SADA,UAMA,kBACA,qBAZA,UAYA,CAEA,wLACE,oBACA,2BAMR,yCAME,kIAEA,0BAJA,YADA,cAMA,8BARA,kBACA,WAOA,CAEA,4CACE,gBACA,aACA,kBAGF,gDAUE,6BAJA,sCAMA,8BADA,2BANA,sBAQA,wBACA,8BAVA,YAFA,UAKA,kBACA,qBAPA,kBAcA,6BAZA,WAYA,CAEA,sDACE,WAGF,kEAGE,6BADA,wBADA,UAEA,CAGF,oEACE","sources":["index.css","webui/components/context_editor/style.module.scss","webui/components/map_preview/style.module.scss","webui/components/map_preview/script_preview/styles.module.scss","webui/components/popovers/styles.module.scss","webui/App.module.scss"],"sourcesContent":["@import url(\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,1,0&family=Russo+One&family=Outfit:wght@500&family=Silkscreen:wght@400;700&family=IBM+Plex+Mono:wght@400&display=swap\");\n\nbody {\n margin: 0;\n}\n",".contextInput {\n overflow-x: hidden;\n overflow-y: scroll;\n height: 100%;\n\n scrollbar-color: var(--palette-fg) transparent;\n scrollbar-width: thin;\n\n & > * {\n padding: 0 8px;\n\n &:first-child {\n margin-top: 48px;\n }\n\n &:last-child {\n margin-bottom: 200px;\n }\n }\n\n .section {\n .subsection {\n &::after {\n content: \" \";\n display: block;\n width: 100%;\n height: 1px;\n margin-bottom: 8px;\n background: var(--palette-fg);\n }\n }\n }\n\n h2 {\n position: sticky;\n top: 0;\n margin: 0;\n margin-bottom: -8px;\n height: 36px;\n line-height: 28px;\n z-index: 2;\n background: linear-gradient(\n 0deg,\n transparent,\n var(--palette-settings-bg) 8px,\n var(--palette-settings-bg)\n );\n }\n\n h3 {\n position: sticky;\n top: 28px;\n margin: 0;\n height: 24px;\n padding-bottom: 8px;\n z-index: 1;\n background: linear-gradient(\n 0deg,\n transparent,\n var(--palette-settings-bg) 8px,\n var(--palette-settings-bg)\n );\n &::before {\n font-family: \"Material Symbols Outlined\";\n content: \"subdirectory_arrow_right\";\n }\n }\n\n p {\n margin: 0;\n }\n\n .inputRow {\n display: flex;\n gap: 8px;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 8px;\n\n > *:not([type=\"range\"]) {\n height: 36px;\n width: 100%;\n line-height: 34px;\n box-sizing: border-box;\n border: 1px solid var(--palette-lines);\n padding: 0;\n margin: 0;\n\n color: var(--palette-fg);\n background: none;\n border-radius: 8px;\n font-family: var(--font-body);\n text-align: center;\n }\n\n .icon {\n font-family: \"Material Symbols Outlined\";\n font-size: 24px;\n flex-shrink: 0;\n width: 36px;\n }\n\n .inactive {\n color: var(--palette-lines);\n border-style: dashed;\n }\n\n .invisible {\n opacity: 0;\n }\n\n .override {\n color: black;\n background: yellow;\n }\n\n .seed {\n font-size: 24px;\n }\n\n .showAdvanced {\n display: flex;\n justify-content: center;\n width: 100%;\n height: 24px;\n\n font-size: 18px;\n line-height: 22px;\n }\n\n .curve {\n display: flex;\n height: fit-content;\n flex-direction: column;\n border: none;\n padding: 6px 0;\n gap: 6px;\n }\n\n button {\n cursor: pointer;\n\n &:active {\n background: var(--palette-fg);\n color: black;\n }\n }\n\n input[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n cursor: pointer;\n outline: none;\n border-radius: 2px;\n height: 6px;\n background: linear-gradient(\n to right,\n var(--palette-accent) 4px,\n var(--palette-accent) var(--completion),\n var(--palette-fg) var(--completion),\n var(--palette-fg) 100%\n );\n\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n height: 14px;\n width: 8px;\n background-color: var(--palette-accent);\n border-radius: 2px;\n border: none;\n }\n\n &::-moz-range-thumb {\n height: 14px;\n width: 8px;\n background-color: var(--palette-accent);\n border-radius: 2px;\n border: none;\n }\n }\n }\n}\n","@property --pvw-yaw {\n syntax: \"\";\n inherits: true;\n initial-value: 0deg;\n}\n@property --pvw-pitch {\n syntax: \"\";\n inherits: true;\n initial-value: 0deg;\n}\n@property --pvw-tr-x {\n syntax: \"\";\n inherits: true;\n initial-value: 0;\n}\n@property --pvw-tr-y {\n syntax: \"\";\n inherits: true;\n initial-value: 0;\n}\n@property --pvw-scale {\n syntax: \"\";\n inherits: true;\n initial-value: 1;\n}\n\n.cavernPreview {\n position: absolute;\n overflow: hidden;\n width: 100%;\n height: 100%;\n\n display: flex;\n\n // Blueprints\n --pvw-bpak: #222222;\n --pvw-bpck: #2d004b;\n --pvw-bphk: #166921;\n // Paths\n --pvw-pathspan: yellow;\n --pvw-pathaux: #24b136;\n // Entites\n --pvw-entfriend: yellow;\n --pvw-entenemy: red;\n // Default tile overlays\n --pvw-dfluid: #080022;\n --pvw-dfloor: #180032;\n --pvw-dwall: #2d004b;\n // Tile overlays indicating numeric qty (ore, ec, landslideness...)\n --pvw-scale0: #555544;\n --pvw-scale1: #777744;\n --pvw-scale2: #999944;\n --pvw-scale3: #bbbb44;\n --pvw-scale4: #dddd44;\n --pvw-scale5: #ffff44;\n --pvw-scale6: #ffff66;\n --pvw-scale7: #ffff88;\n // Specific tile IDs\n --pvw-tile1: #2d004b;\n --pvw-tile2: #180032;\n --pvw-tile3: #180032;\n --pvw-tile4: #180032;\n --pvw-tile5: #180032;\n --pvw-tile6: #ff5a00;\n --pvw-tile11: #002fb5;\n --pvw-tile12: #166921;\n --pvw-tile14: #bfbfbf;\n --pvw-tile24: #9d9b00;\n --pvw-tile26: #ad59ef;\n --pvw-tile30: #943cc3;\n --pvw-tile34: #731cad;\n --pvw-tile38: #800080;\n --pvw-tile42: #b5ff00;\n --pvw-tile46: #9c4108;\n --pvw-tile50: #ffff00;\n --pvw-tile60: #180032;\n --pvw-tile61: #180032;\n --pvw-tile62: #180032;\n --pvw-tile63: #180032;\n // Cavern Discovery\n --pvw-disco0: #ffff44;\n --pvw-disco1: #882222;\n // Oxygen\n --pvw-oxex: #555533;\n --pvw-oxhc: var(--pvw-tile42);\n\n .mapWrapper {\n position: relative;\n width: 100%;\n\n .map {\n position: absolute;\n transition: transform 500ms linear;\n transform: rotate3d(1, 0, 0, var(--pvw-pitch)) rotate(var(--pvw-yaw))\n matrix(\n var(--pvw-scale),\n 0,\n 0,\n var(--pvw-scale),\n calc(var(--pvw-tr-x) * var(--pvw-scale)),\n calc(var(--pvw-tr-y) * var(--pvw-scale))\n );\n\n &.void {\n transition: none;\n }\n\n .baseplate {\n font-family: var(--font-tiny);\n font-size: 8px;\n\n .fg {\n fill: white;\n }\n\n &.ambiguousKind .bg {\n fill: var(--pvw-bpak);\n }\n\n &.caveKind .bg {\n fill: var(--pvw-bpck);\n }\n\n &.hallKind .bg {\n fill: var(--pvw-bphk);\n }\n }\n\n .path {\n stroke-linecap: round;\n stroke-dasharray: 2, 3;\n\n &.ambiguousKind {\n --fg-color: white;\n --fg-opacity: 0.3;\n }\n\n &.spanningKind {\n --fg-color: var(--pvw-pathspan);\n }\n\n &.auxiliaryKind {\n --fg-color: var(--pvw-pathaux);\n }\n\n & > path {\n stroke: var(--fg-color);\n stroke-opacity: var(--fg-opacity);\n stroke-width: 2px;\n }\n\n & > text {\n fill: var(--fg-color);\n opacity: var(--fg-opacity);\n font-family: var(--font-tiny);\n font-size: 12px;\n }\n }\n\n .plan {\n --color-bg: #444444;\n --color-fg: white;\n &.caveKind .bg {\n stroke-width: 2px;\n fill: none;\n }\n &.hallKind {\n .bg {\n stroke-linecap: round;\n opacity: 0.4;\n }\n &.spanningPathKind {\n --color-fg: var(--pvw-pathspan);\n }\n &.auxiliaryPathKind {\n --color-fg: var(--pvw-pathaux);\n }\n }\n &.fluid6 {\n --color-bg: var(--pvw-tile6);\n }\n &.fluid11 {\n --color-bg: var(--pvw-tile11);\n }\n &.left .label {\n text-anchor: end;\n }\n &.inline .label {\n text-anchor: middle;\n font-size: 6px;\n }\n .label {\n fill: var(--color-fg);\n font-size: 12px;\n }\n .pointer {\n fill: none;\n stroke-width: 1px;\n stroke: var(--color-fg);\n }\n .bg {\n stroke: var(--color-bg);\n }\n }\n\n .pearl {\n &.innerPearl {\n stroke-width: 1px;\n &.caveKind {\n --color0: #40ffff;\n --color1: #40dddd;\n --color2: #40bbbb;\n --color3: #409999;\n }\n &.hallKind {\n --color0: #ffff20;\n --color1: #dddd20;\n --color2: #bbbb20;\n --color3: #999920;\n }\n }\n &.outerPearl {\n stroke-width: 0.5px;\n --color0: #999999;\n --color1: #888888;\n --color2: #777777;\n --color3: #666666;\n }\n .layer {\n &.layer0 {\n stroke: var(--color0);\n }\n &.layer1 {\n stroke: var(--color1);\n }\n &.layer2 {\n stroke: var(--color2);\n }\n &.layer3 {\n stroke: var(--color3);\n }\n }\n }\n\n .tiles {\n shape-rendering: crispEdges;\n .tile {\n transition: fill 500ms ease-out;\n }\n }\n\n .height {\n shape-rendering: crispEdges;\n }\n\n .entity {\n --color-fg: var(--pvw-entfriend);\n &.enemy {\n --color-fg: var(--pvw-entenemy);\n }\n .marker {\n fill: var(--color-fg);\n stroke: black;\n stroke-width: 0.5px;\n }\n .label {\n fill: black;\n font-family: \"Outfit\";\n font-size: 2px;\n text-anchor: middle;\n pointer-events: none;\n }\n }\n\n .openCaveFlag {\n stroke: red;\n fill: white;\n }\n }\n }\n\n .stats {\n position: absolute;\n left: 0;\n bottom: 0;\n color: var(--palette-accent);\n background: var(--palette-bg);\n font-family: var(--font-body);\n font-size: 12px;\n max-width: calc(100% - 200px);\n border: 1px solid var(--palette-settings-bg);\n padding: 4px 14px;\n margin: 16px;\n\n > * {\n margin: 4px 0;\n }\n\n h1 {\n font-family: var(--font-cyber);\n font-size: 18px;\n }\n\n > ul {\n padding: 0;\n\n > li {\n display: inline;\n\n &:not(:first-child) {\n padding-left: 16px;\n }\n }\n }\n }\n\n .error {\n position: absolute;\n left: 0;\n right: 0;\n top: 50%;\n font-size: 24px;\n color: #f18686;\n font-family: var(--font-body);\n text-align: center;\n line-break: anywhere;\n }\n}\n",".script {\n position: relative;\n background: var(--palette-bg);\n border-right: 1px solid var(--palette-settings-bg);\n width: 450px;\n overflow-x: hidden;\n overflow-y: scroll;\n z-index: 1;\n\n > h2 {\n padding: 0 12px;\n }\n\n .src {\n font-family: var(--font-mono);\n font-size: 12px;\n word-wrap: break-word;\n\n .line {\n color: var(--color-codehlt);\n padding: 0 12px;\n\n &.hovered {\n color: black;\n background: var(--color-codehlt);\n }\n }\n }\n}\n\n.scriptOverlay {\n .tile {\n fill: var(--color-codehlt);\n }\n\n .arrow {\n fill: none;\n stroke: var(--color-codehlt);\n stroke-width: 2px;\n }\n\n .arrowhead {\n fill: var(--palette-bg);\n stroke: var(--color-codehlt);\n stroke-width: 2px;\n }\n}\n\n.misc {\n --color-codehlt: var(--palette-fg);\n}\n.condition {\n --color-codehlt: yellow;\n}\n.event {\n --color-codehlt: cyan;\n}\n",".popoverWrapper {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n > div {\n background: var(--palette-bg);\n border: 1px solid var(--palette-settings-bg);\n margin: 0 auto;\n padding: 12px 24px;\n max-width: 500px;\n max-height: calc(100% - 100px);\n overflow-x: hidden;\n overflow-y: scroll;\n\n h1,\n h2,\n h3,\n p {\n margin: 4px 0;\n }\n\n h1,\n h2,\n h3 {\n color: var(--palette-accent);\n }\n\n a,\n button {\n border: none;\n padding: 0;\n font-size: 1em;\n background: none;\n color: var(--palette-accent);\n cursor: pointer;\n font-family: var(--font-body);\n text-decoration: underline;\n }\n\n > ul {\n padding-left: 0;\n }\n\n .subhead {\n font-size: 0.5em;\n }\n\n h3::before {\n font-family: \"Material Symbols Outlined\";\n content: \"subdirectory_arrow_right\";\n }\n\n &.lore {\n p {\n white-space-collapse: preserve-breaks;\n }\n }\n\n &.error {\n --palette-settings-bg: yellow;\n --palette-accent: yellow;\n\n .message {\n white-space: pre;\n }\n\n .stack {\n font-size: 8px;\n white-space: pre;\n }\n\n .context {\n font-size: 8px;\n line-break: anywhere;\n }\n }\n }\n}\n","@keyframes scan-scrim {\n 0% {\n background-position-x: -800px;\n }\n 100% {\n background-position-x: 0;\n }\n}\n\n.App {\n --font-body: \"Outfit\";\n --font-cyber: \"Russo One\";\n --font-tiny: \"Silkscreen\";\n --font-mono: \"IBM Plex Mono\";\n\n --palette-fg: white;\n --palette-bg: #121212;\n --palette-lines: #999999;\n --palette-disabled: #999999;\n --palette-settings-bg: #333333;\n --palette-accent: #c96f12;\n\n &.iceBiome {\n --palette-bg: #060716;\n --palette-settings-bg: hsl(200, 45%, 24%);\n --palette-accent: hsl(186, 97%, 44%);\n }\n\n &.lavaBiome {\n --palette-bg: #140b05;\n --palette-settings-bg: #4d2114;\n --palette-accent: #ca0b0b;\n }\n\n display: flex;\n position: absolute;\n overflow: hidden;\n width: 100%;\n height: 100%;\n\n color: var(--palette-fg);\n background: var(--palette-bg);\n font-family: var(--font-body);\n\n .settingsPanel {\n width: 240px;\n flex-shrink: 0;\n flex-grow: 1;\n background: var(--palette-settings-bg);\n }\n\n .mainPanel {\n position: relative;\n width: 75%;\n overflow: hidden;\n\n .grid {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n\n background: var(--palette-settings-bg);\n\n &::before {\n content: \"\";\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n\n background-image: linear-gradient(\n to left,\n transparent 0px,\n var(--palette-accent) 25px,\n transparent 400px\n );\n background-size: 800px 100%;\n animation: scan-scrim 3s infinite linear;\n opacity: 0;\n transition: opacity 3000ms ease-in;\n }\n\n &.loading::before {\n opacity: 1;\n transition: opacity 250ms ease-out;\n }\n\n &::after {\n content: \"\";\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n\n background: var(--palette-bg);\n mask-composite: subtract;\n mask-image: linear-gradient(\n to right,\n white 16px,\n transparent 16px,\n transparent 17px,\n white 17px\n ),\n linear-gradient(\n transparent 16px,\n black 16px,\n black 17px,\n transparent 17px\n );\n mask-size: 32px 32px;\n }\n\n &.hasError {\n background: #bebe13;\n mask-image: linear-gradient(\n 120deg,\n white 25%,\n transparent 25%,\n transparent 50%,\n white 50%,\n white 75%,\n transparent 75%,\n transparent 100%\n );\n mask-size: 46.19px 80px;\n\n &::before,\n &::after {\n content: none;\n }\n }\n }\n\n .stepName {\n position: absolute;\n top: 16px;\n left: 16px;\n font-size: 16px;\n font-variant-numeric: tabular-nums;\n }\n\n .progressBar {\n position: absolute;\n width: 100%;\n height: 8px;\n bottom: 0;\n background: linear-gradient(\n 90deg,\n var(--palette-accent) 0%,\n var(--palette-accent) var(--progress),\n transparent var(--progress),\n transparent 100%\n );\n transition: height 200ms ease-out;\n &.complete {\n height: 0;\n }\n }\n\n .controls {\n display: flex;\n gap: 8px;\n margin: 16px;\n position: absolute;\n bottom: 0;\n right: 0;\n\n button,\n .button {\n display: block;\n height: 48px;\n width: 48px;\n font-size: 36px;\n line-height: 46px;\n box-sizing: border-box;\n border: 1px solid var(--palette-lines);\n padding: 0;\n margin: 0;\n\n color: var(--palette-fg);\n background: var(--palette-bg);\n font-family: \"Material Symbols Outlined\";\n text-align: center;\n text-decoration: none;\n\n &.disabled {\n border-style: dashed;\n color: var(--palette-lines);\n }\n }\n }\n }\n\n .vizOptsPanel {\n position: relative;\n width: 128px;\n flex-shrink: 0;\n flex-grow: 0;\n\n background-image: linear-gradient(var(--palette-lines) 1px, transparent 1px),\n linear-gradient(to right, var(--palette-lines) 1px, transparent 1px);\n background-size: 16px 16px;\n font-family: var(--font-cyber);\n\n h1 {\n font-weight: normal;\n margin: 4px 0;\n text-align: center;\n }\n\n button {\n position: relative;\n left: -8px;\n width: 152px;\n height: 24px;\n box-sizing: border-box;\n border: 1px solid var(--palette-lines);\n margin-bottom: 8px;\n padding: 0 16px 0 8px;\n\n background: var(--palette-bg);\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n color: var(--palette-fg);\n font-family: var(--font-cyber);\n transition: left 200ms ease-out;\n\n &:hover {\n left: -14px;\n }\n\n &.active {\n left: -16px;\n color: var(--palette-bg);\n background: var(--palette-fg);\n }\n\n &.disabled {\n color: var(--palette-disabled);\n }\n }\n }\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/main.b497b6ff.js.map b/static/js/main.b497b6ff.js.map deleted file mode 100644 index ec30826..0000000 --- a/static/js/main.b497b6ff.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/main.b497b6ff.js","mappings":";yCA+CA,IAAIA,EAAOC,EAAS,MAKpBC,EAAOC,QAAUH,YC9BjB,IAAII,EAAU,CACb,WAgCD,SAAwBC,EAAKC,GAC5B,OAAOD,EAAIE,IAAKD,EACjB,EAjCC,UA2DD,SAAuBD,EAAKC,GAC3B,OAAOD,EAAIE,IAAKD,EACjB,EA5DC,QAuFD,SAAuBD,EAAKC,GAC3B,OAAOD,EAAIE,IAAKD,EACjB,GAwCAJ,EAAOC,QAXP,SAAiBK,GAChB,IAAIC,EAAIL,EAASI,GACjB,MAAkB,oB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AAImE,EAAKnE,EACTsO,EAAInK,EAAKmK,EACV,IACDs5D,MAAiB,QAAZL,EAAEpjE,EAAKyjE,aAAK,IAAAL,EAAAA,EAAI,EACrBM,YAA6B,QAAlBL,EAAErjE,EAAK0jE,mBAAW,IAAAL,GAAAA,EAC7BM,gBAAqC,QAAtBL,EAAEtjE,EAAK2jE,uBAAe,IAAAL,GAAAA,EACtC,EAzBC7jE,KAAK61B,GAAKA,EACV71B,KAAKxD,KAAOA,EACZwD,KAAKsjE,cAAgBA,EACrBtjE,KAAKujE,SAAWA,EAChBvjE,KAAKwjE,IAAMA,EACXxjE,KAAKyjE,SAAWA,EAChBzjE,KAAKojE,UAAYA,EACjBpjE,KAAKktC,aAAeA,CACtB,EAoBK,MAAMi3B,GAAa,IAAId,GAC5B,sBACA,aACA,KACA,EACA,EACA,EACAN,GACA,IAEWqB,GAAe,IAAIf,GAC9B,wBACA,eACA,KACA,EACA,EACA,EACAN,GACA,CAACoB,KAIUE,GAAQ,IAAIhB,GACvB,kBACA,QACA,KACA,EACA,EACA,EACAN,GACA,CAACoB,KAIUG,GAAU,IAAIjB,GACzB,oBACA,UACA,KACA,EACA,GACA,EACAL,GACA,CAACmB,KAIUI,GAAgB,IAAIlB,GAC/B,yBACA,gBACA,KACA,EACA,GACA,EACAJ,GACA,CAACkB,GAAYC,KAEFI,GAAkB,IAAInB,GACjC,2BACA,kBACA,KACA,EACA,GACA,EACAN,GACA,CAACoB,GAAYC,GAAcG,KAEhBE,GAAkB,IAAIpB,GACjC,2BACA,kBACA,KACA,EACA,GACA,EACAN,GACA,CAACoB,GAAYC,GAAcG,KAGhBG,GAAoB,IAAIrB,GACnC,6BACA,oBACA,KACA,EACA,GACA,EACAN,GACA,CAACoB,GAAYC,GAAcG,KAGhBI,GAAe,IAAItB,GAC9B,wBACA,eACA,KACA,EACA,GACA,EACAL,GACA,CAACmB,GAAYC,GAAcG,KAEhBK,GAAe,IAAIvB,GAC9B,wBACA,eACA,KACA,EACA,GACA,E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C,UAAWG,SAAC,oBAM7D6tC,EAAAA,EAAAA,MAAA,OAAKG,UAAWC,GAAOwtC,aAAaz7E,SAAA,EAClC+tC,EAAAA,EAAAA,KAAA,MAAA/tC,SAAI,UACJ+tC,EAAAA,EAAAA,KAAA,UACEC,UAAW+0B,EAAe90B,GAAOK,OAASL,GAAOM,SACjDrZ,QAASA,IAAMwlD,GAAiB7lG,IAAOA,IAAGmrB,SAC3C,cAGD+tC,EAAAA,EAAAA,KAAA,UACEC,UAAWg1B,EAAa/0B,GAAOK,OAASL,GAAOM,SAC/CrZ,QAASA,IAAMylD,GAAe9lG,IAAOA,IAAGmrB,SACzC,WAGAg6E,GAAoB14C,KAAIgE,IAAA,IAAC,GAAEtoB,EAAE,MAAE6/C,EAAK,QAAEod,GAAS30C,EAAA,OAC9CyI,EAAAA,EAAAA,KAAA,UAEEC,UACEysB,IAAez9C,EACXixB,GAAOK,OACP2rC,EAAQ3tF,EAAM0zD,QACZ/R,GAAOM,SACPN,GAAOpuC,SAEfq1B,QAASA,IAAMulD,GAAe5lG,GAAOA,IAAMmoC,EAAK,WAAaA,IAAKhd,SAEjE68D,GAVI7/C,EAWE,UAlLnB,IAAyBu+D,CAuLzB,EC1NaG,EAAAA,WAAoB5iF,SAAS6iF,eAAe,SACpDt+E,QACH0wC,EAAAA,EAAAA,KAAC0qB,EAAAA,WAAgB,CAAAz4D,UACf+tC,EAAAA,EAAAA,KAAC+sC,GAAG","sources":["../node_modules/@stdlib/array-base-accessor-getter/lib/index.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-setter/lib/index.js","../node_modules/@stdlib/array-base-accessor-setter/lib/main.js","../node_modules/@stdlib/array-base-arraylike2object/lib/index.js","../node_modules/@stdlib/array-base-arraylike2object/lib/main.js","../node_modules/@stdlib/array-base-assert-is-accessor-array/lib/index.js","../node_modules/@stdlib/array-base-assert-is-accessor-array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/index.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/index.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/index.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-setter/lib/index.js","../node_modules/@stdlib/array-base-setter/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/index.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/index.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-dtype/lib/ctor2dtype.js","../node_modules/@stdlib/array-dtype/lib/ctors.js","../node_modules/@stdlib/array-dtype/lib/dtypes.js","../node_modules/@stdlib/array-dtype/lib/index.js","../node_modules/@stdlib/array-dtype/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/array-to-json/lib/ctors.js","../node_modules/@stdlib/array-to-json/lib/index.js","../node_modules/@stdlib/array-to-json/lib/main.js","../node_modules/@stdlib/array-to-json/lib/type.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/assert-has-float32array-support/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/assert-has-float64array-support/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/assert-has-function-name-support/lib/foo.js","../node_modules/@stdlib/assert-has-function-name-support/lib/index.js","../node_modules/@stdlib/assert-has-function-name-support/lib/main.js","../node_modules/@stdlib/assert-has-int16array-support/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/assert-has-int32array-support/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/assert-has-int8array-support/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/index.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/assert-has-own-property/lib/index.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/index.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/index.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/assert-instance-of/lib/index.js","../node_modules/@stdlib/assert-instance-of/lib/main.js","../node_modules/@stdlib/assert-is-arguments/lib/detect.js","../node_modules/@stdlib/assert-is-arguments/lib/index.js","../node_modules/@stdlib/assert-is-arguments/lib/main.js","../node_modules/@stdlib/assert-is-arguments/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/index.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-buffer/lib/index.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/assert-is-collection/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/index.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/assert-is-complex-typed-array/lib/ctors.js","../node_modules/@stdlib/assert-is-complex-typed-array/lib/index.js","../node_modules/@stdlib/assert-is-complex-typed-array/lib/main.js","../node_modules/@stdlib/assert-is-enumerable-property/lib/has_string_enumerability_bug.js","../node_modules/@stdlib/assert-is-enumerable-property/lib/index.js","../node_modules/@stdlib/assert-is-enumerable-property/lib/main.js","../node_modules/@stdlib/assert-is-enumerable-property/lib/native.js","../node_modules/@stdlib/assert-is-float32array/lib/index.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-is-float64array/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/index.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/assert-is-int16array/lib/index.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/assert-is-int32array/lib/index.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/assert-is-int8array/lib/index.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-little-endian/lib/ctors.js","../node_modules/@stdlib/assert-is-little-endian/lib/index.js","../node_modules/@stdlib/assert-is-little-endian/lib/main.js","../node_modules/@stdlib/assert-is-nan/lib/index.js","../node_modules/@stdlib/assert-is-nan/lib/main.js","../node_modules/@stdlib/assert-is-nan/lib/object.js","../node_modules/@stdlib/assert-is-nan/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/index.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-plain-object/lib/index.js","../node_modules/@stdlib/assert-is-plain-object/lib/main.js","../node_modules/@stdlib/assert-is-positive-integer/lib/index.js","../node_modules/@stdlib/assert-is-positive-integer/lib/main.js","../node_modules/@stdlib/assert-is-positive-integer/lib/object.js","../node_modules/@stdlib/assert-is-positive-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-positive-number/lib/index.js","../node_modules/@stdlib/assert-is-positive-number/lib/main.js","../node_modules/@stdlib/assert-is-positive-number/lib/object.js","../node_modules/@stdlib/assert-is-positive-number/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-typed-array/lib/ctors.js","../node_modules/@stdlib/assert-is-typed-array/lib/index.js","../node_modules/@stdlib/assert-is-typed-array/lib/main.js","../node_modules/@stdlib/assert-is-uint16array/lib/index.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/assert-is-uint32array/lib/index.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/assert-is-uint8array/lib/index.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/index.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-tools-array-function/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/blas-base-gcopy/lib/accessors.js","../node_modules/@stdlib/blas-base-gcopy/lib/index.js","../node_modules/@stdlib/blas-base-gcopy/lib/main.js","../node_modules/@stdlib/blas-base-gcopy/lib/ndarray.js","../node_modules/@stdlib/boolean-ctor/lib/index.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/complex-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/index.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-imag/lib/index.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/index.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/complex-real/lib/index.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-realf/lib/index.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/constants-float64-exponent-bias/lib/index.js","../node_modules/@stdlib/constants-float64-high-word-abs-mask/lib/index.js","../node_modules/@stdlib/constants-float64-high-word-exponent-mask/lib/index.js","../node_modules/@stdlib/constants-float64-high-word-sign-mask/lib/index.js","../node_modules/@stdlib/constants-float64-high-word-significand-mask/lib/index.js","../node_modules/@stdlib/constants-float64-ln-two/lib/index.js","../node_modules/@stdlib/constants-float64-max-base2-exponent-subnormal/lib/index.js","../node_modules/@stdlib/constants-float64-max-base2-exponent/lib/index.js","../node_modules/@stdlib/constants-float64-max-safe-integer/lib/index.js","../node_modules/@stdlib/constants-float64-min-base2-exponent-subnormal/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-smallest-normal/lib/index.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/math-base-assert-is-even/lib/index.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/math-base-assert-is-infinite/lib/index.js","../node_modules/@stdlib/math-base-assert-is-infinite/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/index.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/math-base-assert-is-nan/lib/index.js","../node_modules/@stdlib/math-base-assert-is-nan/lib/main.js","../node_modules/@stdlib/math-base-assert-is-odd/lib/index.js","../node_modules/@stdlib/math-base-assert-is-odd/lib/main.js","../node_modules/@stdlib/math-base-assert-is-positive-zero/lib/index.js","../node_modules/@stdlib/math-base-assert-is-positive-zero/lib/main.js","../node_modules/@stdlib/math-base-ops-umul/lib/index.js","../node_modules/@stdlib/math-base-ops-umul/lib/main.js","../node_modules/@stdlib/math-base-special-abs/lib/index.js","../node_modules/@stdlib/math-base-special-abs/lib/main.js","../node_modules/@stdlib/math-base-special-ceil/lib/index.js","../node_modules/@stdlib/math-base-special-ceil/lib/main.js","../node_modules/@stdlib/math-base-special-copysign/lib/index.js","../node_modules/@stdlib/math-base-special-copysign/lib/main.js","../node_modules/@stdlib/math-base-special-exp/lib/expmulti.js","../node_modules/@stdlib/math-base-special-exp/lib/index.js","../node_modules/@stdlib/math-base-special-exp/lib/main.js","../node_modules/@stdlib/math-base-special-exp/lib/polyval_p.js","../node_modules/@stdlib/math-base-special-floor/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-special-ldexp/lib/index.js","../node_modules/@stdlib/math-base-special-ldexp/lib/main.js","../node_modules/@stdlib/math-base-special-ln/lib/index.js","../node_modules/@stdlib/math-base-special-ln/lib/main.js","../node_modules/@stdlib/math-base-special-ln/lib/polyval_p.js","../node_modules/@stdlib/math-base-special-ln/lib/polyval_q.js","../node_modules/@stdlib/math-base-special-max/lib/index.js","../node_modules/@stdlib/math-base-special-max/lib/main.js","../node_modules/@stdlib/math-base-special-pow/lib/index.js","../node_modules/@stdlib/math-base-special-pow/lib/log2ax.js","../node_modules/@stdlib/math-base-special-pow/lib/logx.js","../node_modules/@stdlib/math-base-special-pow/lib/main.js","../node_modules/@stdlib/math-base-special-pow/lib/polyval_l.js","../node_modules/@stdlib/math-base-special-pow/lib/polyval_p.js","../node_modules/@stdlib/math-base-special-pow/lib/polyval_w.js","../node_modules/@stdlib/math-base-special-pow/lib/pow2.js","../node_modules/@stdlib/math-base-special-pow/lib/x_is_zero.js","../node_modules/@stdlib/math-base-special-pow/lib/y_is_huge.js","../node_modules/@stdlib/math-base-special-pow/lib/y_is_infinite.js","../node_modules/@stdlib/math-base-special-sqrt/lib/index.js","../node_modules/@stdlib/math-base-special-sqrt/lib/main.js","../node_modules/@stdlib/math-base-special-trunc/lib/index.js","../node_modules/@stdlib/math-base-special-trunc/lib/main.js","../node_modules/@stdlib/number-ctor/lib/index.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/number-float64-base-exponent/lib/index.js","../node_modules/@stdlib/number-float64-base-exponent/lib/main.js","../node_modules/@stdlib/number-float64-base-from-words/lib/index.js","../node_modules/@stdlib/number-float64-base-from-words/lib/indices.js","../node_modules/@stdlib/number-float64-base-from-words/lib/main.js","../node_modules/@stdlib/number-float64-base-get-high-word/lib/high.js","../node_modules/@stdlib/number-float64-base-get-high-word/lib/index.js","../node_modules/@stdlib/number-float64-base-get-high-word/lib/main.js","../node_modules/@stdlib/number-float64-base-normalize/lib/assign.js","../node_modules/@stdlib/number-float64-base-normalize/lib/index.js","../node_modules/@stdlib/number-float64-base-normalize/lib/main.js","../node_modules/@stdlib/number-float64-base-set-high-word/lib/high.js","../node_modules/@stdlib/number-float64-base-set-high-word/lib/index.js","../node_modules/@stdlib/number-float64-base-set-high-word/lib/main.js","../node_modules/@stdlib/number-float64-base-set-low-word/lib/index.js","../node_modules/@stdlib/number-float64-base-set-low-word/lib/low.js","../node_modules/@stdlib/number-float64-base-set-low-word/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-words/lib/assign.js","../node_modules/@stdlib/number-float64-base-to-words/lib/index.js","../node_modules/@stdlib/number-float64-base-to-words/lib/indices.js","../node_modules/@stdlib/number-float64-base-to-words/lib/main.js","../node_modules/@stdlib/number-uint32-base-to-int32/lib/index.js","../node_modules/@stdlib/number-uint32-base-to-int32/lib/main.js","../node_modules/@stdlib/object-assign/lib/builtin.js","../node_modules/@stdlib/object-assign/lib/has_object_assign.js","../node_modules/@stdlib/object-assign/lib/index.js","../node_modules/@stdlib/object-assign/lib/polyfill.js","../node_modules/@stdlib/object-ctor/lib/index.js","../node_modules/@stdlib/object-ctor/lib/main.js","../node_modules/@stdlib/random-base-beta/lib/beta.js","../node_modules/@stdlib/random-base-beta/lib/factory.js","../node_modules/@stdlib/random-base-beta/lib/index.js","../node_modules/@stdlib/random-base-beta/lib/main.js","../node_modules/@stdlib/random-base-beta/lib/sample1.js","../node_modules/@stdlib/random-base-beta/lib/sample2.js","../node_modules/@stdlib/random-base-beta/lib/sample3.js","../node_modules/@stdlib/random-base-beta/lib/standard_gamma.js","../node_modules/@stdlib/random-base-beta/lib/validate.js","../node_modules/@stdlib/random-base-improved-ziggurat/lib/coords_array.js","../node_modules/@stdlib/random-base-improved-ziggurat/lib/factory.js","../node_modules/@stdlib/random-base-improved-ziggurat/lib/improved_ziggurat.js","../node_modules/@stdlib/random-base-improved-ziggurat/lib/index.js","../node_modules/@stdlib/random-base-improved-ziggurat/lib/main.js","../node_modules/@stdlib/random-base-improved-ziggurat/lib/ratio_array.js","../node_modules/@stdlib/random-base-improved-ziggurat/lib/sample_tail.js","../node_modules/@stdlib/random-base-mt19937/lib/factory.js","../node_modules/@stdlib/random-base-mt19937/lib/index.js","../node_modules/@stdlib/random-base-mt19937/lib/main.js","../node_modules/@stdlib/random-base-mt19937/lib/rand_uint32.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/index.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/index.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/index.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-tokenize/lib/index.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/index.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/index.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/index.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-constant-function/lib/index.js","../node_modules/@stdlib/utils-constant-function/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/index.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/index.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/index.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-write-accessor/lib/index.js","../node_modules/@stdlib/utils-define-nonenumerable-read-write-accessor/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-enumerable-properties/lib/index.js","../node_modules/@stdlib/utils-enumerable-properties/lib/main.js","../node_modules/@stdlib/utils-function-name/lib/index.js","../node_modules/@stdlib/utils-function-name/lib/main.js","../node_modules/@stdlib/utils-get-prototype-of/lib/detect.js","../node_modules/@stdlib/utils-get-prototype-of/lib/index.js","../node_modules/@stdlib/utils-get-prototype-of/lib/main.js","../node_modules/@stdlib/utils-get-prototype-of/lib/native.js","../node_modules/@stdlib/utils-get-prototype-of/lib/polyfill.js","../node_modules/@stdlib/utils-get-prototype-of/lib/proto.js","../node_modules/@stdlib/utils-global/lib/browser.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-index-of/lib/index.js","../node_modules/@stdlib/utils-index-of/lib/main.js","../node_modules/@stdlib/utils-keys/lib/builtin.js","../node_modules/@stdlib/utils-keys/lib/builtin_wrapper.js","../node_modules/@stdlib/utils-keys/lib/has_arguments_bug.js","../node_modules/@stdlib/utils-keys/lib/has_automation_equality_bug.js","../node_modules/@stdlib/utils-keys/lib/has_builtin.js","../node_modules/@stdlib/utils-keys/lib/has_enumerable_prototype_bug.js","../node_modules/@stdlib/utils-keys/lib/has_non_enumerable_properties_bug.js","../node_modules/@stdlib/utils-keys/lib/has_window.js","../node_modules/@stdlib/utils-keys/lib/index.js","../node_modules/@stdlib/utils-keys/lib/is_constructor_prototype.js","../node_modules/@stdlib/utils-keys/lib/is_constructor_prototype_wrapper.js","../node_modules/@stdlib/utils-keys/lib/main.js","../node_modules/@stdlib/utils-keys/lib/polyfill.js","../node_modules/@stdlib/utils-keys/lib/window.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-noop/lib/index.js","../node_modules/@stdlib/utils-noop/lib/main.js","../node_modules/@stdlib/utils-property-symbols/lib/builtin.js","../node_modules/@stdlib/utils-property-symbols/lib/has_builtin.js","../node_modules/@stdlib/utils-property-symbols/lib/index.js","../node_modules/@stdlib/utils-property-symbols/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/react-dom/client.js","../node_modules/react-dom/index.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react.production.min.js","../node_modules/react/index.js","../node_modules/react/jsx-runtime.js","../node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/scheduler/index.js","../webpack/bootstrap","../webpack/runtime/compat get default export","../webpack/runtime/define property getters","../webpack/runtime/hasOwnProperty shorthand","core/common/prng.ts","core/common/context.ts","webpack://groundhog/./src/webui/components/context_editor/style.module.scss?ad05","core/common/geometry.ts","webui/components/context_editor/controls.tsx","../node_modules/robust-predicates/esm/util.js","../node_modules/robust-predicates/esm/orient2d.js","../node_modules/robust-predicates/esm/orient3d.js","../node_modules/robust-predicates/esm/incircle.js","../node_modules/robust-predicates/esm/insphere.js","../node_modules/delaunator/index.js","core/models/position.ts","core/models/building.ts","core/models/tiles.ts","core/models/creature.ts","core/common/utils.ts","core/architects/utils/placement.ts","core/architects/utils/creatures.ts","core/models/hazards.ts","core/architects/utils/hazards.ts","core/architects/utils/resources.ts","core/architects/default.ts","core/common/grid.ts","core/architects/utils/buildings.ts","core/architects/utils/oyster.ts","core/architects/utils/rough.ts","core/architects/utils/script.ts","core/architects/utils/discovery.ts","core/architects/established_hq.ts","core/architects/utils/creature_spawners.ts","core/architects/fissure.ts","core/architects/utils/intersects.ts","core/architects/flooded.ts","core/architects/loopback.ts","core/models/vehicle.ts","core/architects/lost_miners.ts","core/architects/nomads.ts","core/architects/simple_cave.ts","core/architects/simple_hall.ts","core/architects/simple_spawn.ts","core/architects/slugs.ts","core/architects/thin_hall.ts","core/architects/treasure.ts","core/architects/index.ts","webui/components/context_editor/architects.tsx","webui/components/context_editor/index.tsx","webpack://groundhog/./src/webui/components/map_preview/style.module.scss?c9d1","webui/components/map_preview/baseplate.tsx","webui/components/map_preview/path.tsx","webui/components/map_preview/pearl.tsx","webui/components/map_preview/tiles.tsx","webui/components/map_preview/entity.tsx","webui/components/map_preview/open_cave_flag.tsx","core/transformers/03_plastic/03_strataflux/base.ts","webui/components/map_preview/height.tsx","webui/components/map_preview/stats.tsx","webui/components/map_preview/plan.tsx","webpack://groundhog/./src/webui/components/map_preview/script_preview/styles.module.scss?0993","webui/components/map_preview/script_preview/index.tsx","webui/components/map_preview/index.tsx","core/common/transform.ts","core/models/baseplate.ts","core/transformers/00_outlines/00_partition.ts","core/models/path.ts","core/transformers/00_outlines/index.ts","core/transformers/00_outlines/01_discriminate.ts","core/transformers/00_outlines/02_triangulate.ts","core/transformers/00_outlines/03_span.ts","core/transformers/00_outlines/04_clip.ts","core/transformers/00_outlines/05_bore.ts","core/transformers/00_outlines/06_weave.ts","core/transformers/01_planning/00_negotiate.ts","core/transformers/01_planning/03_establish.ts","core/transformers/01_planning/04_pearl.ts","core/transformers/01_planning/index.ts","core/transformers/01_planning/01_measure.ts","core/transformers/01_planning/02_flood.ts","core/models/discovery_zone.ts","core/transformers/02_masonry/03_grout.ts","core/transformers/02_masonry/06_annex.ts","core/transformers/02_masonry/index.ts","core/transformers/02_masonry/00_foundation.ts","core/transformers/02_masonry/01_rough.ts","core/transformers/02_masonry/02_brace.ts","core/transformers/02_masonry/04_sand.ts","core/transformers/02_masonry/05_fine.ts","core/models/miner.ts","core/transformers/03_plastic/02_strataform.ts","core/transformers/03_plastic/03_strataflux/edges.ts","core/transformers/03_plastic/03_strataflux/nodes.ts","core/transformers/03_plastic/03_strataflux/index.ts","core/transformers/03_plastic/index.ts","core/transformers/03_plastic/00_fence.ts","core/transformers/03_plastic/01_discover.ts","core/transformers/03_plastic/04_populate.ts","core/transformers/04_ephemera/00_aerate.ts","core/lore/builder.ts","core/lore/graphs/conclusions.ts","core/lore/graphs/events.ts","core/lore/graphs/names.ts","core/lore/graphs/orders.ts","core/lore/graphs/premise.ts","core/lore/graphs/seismic.ts","core/lore/lore.ts","core/transformers/04_ephemera/02_enscribe.ts","core/transformers/04_ephemera/04_serialize.ts","core/transformers/04_ephemera/index.ts","core/transformers/04_ephemera/01_adjure.ts","core/transformers/04_ephemera/03_program.ts","core/models/objectives.ts","core/transformers/index.ts","webpack://groundhog/./src/webui/components/popovers/styles.module.scss?55be","webui/components/popovers/lore.tsx","webui/components/popovers/about.tsx","webpack://groundhog/./src/webui/App.module.scss?9a46","webui/components/popovers/error.tsx","webui/App.tsx","index.tsx"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @module @stdlib/array-base-accessor-getter\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var dtype = require( '@stdlib/array-dtype' );\n* var getter = require( '@stdlib/array-base-accessor-getter' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var dtype = require( '@stdlib/array-dtype' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nmodule.exports = getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an accessor function for setting an element in an array-like object supporting the get/set protocol.\n*\n* @module @stdlib/array-base-accessor-setter\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var dtype = require( '@stdlib/array-dtype' );\n* var setter = require( '@stdlib/array-base-accessor-setter' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 1, new Complex64( 10.0, 11.0 ) );\n*\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar SETTERS = {\n\t'complex128': setComplex128,\n\t'complex64': setComplex64,\n\t'default': setArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Sets an element in a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n* var Complex128 = require( '@stdlib/complex-float64' );\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* setComplex128( arr, 1, new Complex128( 10.0, 11.0 ) );\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns 11.0\n*/\nfunction setComplex128( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n/**\n* Sets an element in a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* setComplex64( arr, 1, new Complex64( 10.0, 11.0 ) );\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\nfunction setComplex64( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n/**\n* Sets an element in an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* setArrayLike( arr, 2, 10 );\n*\n* var v = arr[ 2 ];\n* // returns 10\n*/\nfunction setArrayLike( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for setting an element in an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var dtype = require( '@stdlib/array-dtype' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 1, new Complex64( 10.0, 11.0 ) );\n*\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\nfunction setter( dtype ) {\n\tvar f = SETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn SETTERS.default;\n}\n\n\n// EXPORTS //\n\nmodule.exports = setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert an array-like object to an object likely to have the same \"shape\".\n*\n* @module @stdlib/array-base-arraylike2object\n*\n* @example\n* var arraylike2object = require( '@stdlib/array-base-arraylike2object' );\n*\n* var obj = arraylike2object( [ 1, 2, 3, 4 ] );\n* // returns {...}\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' );\nvar getter = require( '@stdlib/array-base-getter' );\nvar setter = require( '@stdlib/array-base-setter' );\nvar accessorGetter = require( '@stdlib/array-base-accessor-getter' );\nvar accessorSetter = require( '@stdlib/array-base-accessor-setter' );\nvar dtype = require( '@stdlib/array-dtype' );\n\n\n// MAIN //\n\n/**\n* Converts an array-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding array meta data to ensure that internal functions operating on arrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **data**: reference to the input array.\n* - **dtype**: array data type.\n* - **accessorProtocol**: `boolean` indicating whether the input array uses accessors for getting and setting elements.\n* - **accessors**: a two-element array whose first element is an accessor for retrieving an array element and whose second element is an accessor for setting an array element.\n*\n* @param {Collection} x - array-like object\n* @returns {Object} object containing array meta data\n*\n* @example\n* var obj = arraylike2object( [ 1, 2, 3, 4 ] );\n* // returns {...}\n*/\nfunction arraylike2object( x ) {\n\tvar dt = dtype( x );\n\tif ( isAccessorArray( x ) ) {\n\t\treturn {\n\t\t\t'data': x,\n\t\t\t'dtype': dt,\n\t\t\t'accessorProtocol': true,\n\t\t\t'accessors': [\n\t\t\t\taccessorGetter( dt ),\n\t\t\t\taccessorSetter( dt )\n\t\t\t]\n\t\t};\n\t}\n\treturn {\n\t\t'data': x,\n\t\t'dtype': dt,\n\t\t'accessorProtocol': false,\n\t\t'accessors': [\n\t\t\tgetter( dt ),\n\t\t\tsetter( dt )\n\t\t]\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = arraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if an array-like object supports the accessor (get/set) protocol.\n*\n* @module @stdlib/array-base-assert-is-accessor-array\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128array' );\n* var isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' );\n*\n* var bool = isAccessorArray( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isAccessorArray( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar TYPE = 'function';\n\n\n// MAIN //\n\n/**\n* Tests if an array-like object supports the accessor (get/set) protocol.\n*\n* @param {Object} value - value to test\n* @returns {boolean} boolean indicating whether a value is an accessor array\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n*\n* var bool = isAccessorArray( new Complex128Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isAccessorArray( [] );\n* // returns false\n*/\nfunction isAccessorArray( value ) {\n\treturn ( typeof value.get === TYPE && typeof value.set === TYPE ); // eslint-disable-line valid-typeof\n}\n\n\n// EXPORTS //\n\nmodule.exports = isAccessorArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a `Complex128Array`.\n*\n* @module @stdlib/array-base-assert-is-complex128array\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n* var isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' );\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a `Complex64Array`.\n*\n* @module @stdlib/array-base-assert-is-complex64array\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' );\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an accessor function for retrieving an element from an indexed array-like object.\n*\n* @module @stdlib/array-base-getter\n*\n* @example\n* var dtype = require( '@stdlib/array-dtype' );\n* var getter = require( '@stdlib/array-base-getter' );\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Int32Array = require( '@stdlib/array-int32' );\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Int16Array = require( '@stdlib/array-int16' );\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Int8Array = require( '@stdlib/array-int8' );\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Uint32Array = require( '@stdlib/array-uint32' );\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Uint16Array = require( '@stdlib/array-uint16' );\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Uint8ClampedArray = require( '@stdlib/array-uint8c' );\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* var dtype = require( '@stdlib/array-dtype' );\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nmodule.exports = getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an accessor function for setting an element in an indexed array-like object.\n*\n* @module @stdlib/array-base-setter\n*\n* @example\n* var dtype = require( '@stdlib/array-dtype' );\n* var set = require( '@stdlib/array-base-setter' );\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 2, 10 );\n*\n* var v = arr[ 2 ];\n* // returns 10\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar SETTERS = {\n\t'float64': setFloat64,\n\t'float32': setFloat32,\n\t'int32': setInt32,\n\t'int16': setInt16,\n\t'int8': setInt8,\n\t'uint32': setUint32,\n\t'uint16': setUint16,\n\t'uint8': setUint8,\n\t'uint8c': setUint8c,\n\t'generic': setGeneric,\n\t'default': setArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Sets an element in a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* var arr = new Float64Array( 4 );\n*\n* setFloat64( arr, 2, 3.0 );\n*\n* var v = arr[ 2 ];\n* // returns 3.0\n*/\nfunction setFloat64( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n*\n* var arr = new Float32Array( 4 );\n*\n* setFloat32( arr, 2, 3.0 );\n*\n* var v = arr[ 2 ];\n* // returns 3.0\n*/\nfunction setFloat32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Int32Array = require( '@stdlib/array-int32' );\n*\n* var arr = new Int32Array( 4 );\n*\n* setInt32( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Int16Array = require( '@stdlib/array-int16' );\n*\n* var arr = new Int16Array( 4 );\n*\n* setInt16( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt16( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Int8Array = require( '@stdlib/array-int8' );\n*\n* var arr = new Int8Array( 4 );\n*\n* setInt8( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt8( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Uint32Array = require( '@stdlib/array-uint32' );\n*\n* var arr = new Uint32Array( 4 );\n*\n* setUint32( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Uint16Array = require( '@stdlib/array-uint16' );\n*\n* var arr = new Uint16Array( 4 );\n*\n* setUint16( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint16( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* var arr = new Uint8Array( 4 );\n*\n* setUint8( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint8( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Uint8ClampedArray = require( '@stdlib/array-uint8c' );\n*\n* var arr = new Uint8ClampedArray( 4 );\n*\n* setUint8c( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint8c( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* setGeneric( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setGeneric( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* setArrayLike( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setArrayLike( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for setting an element in an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* var dtype = require( '@stdlib/array-dtype' );\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setter( dtype ) {\n\tvar f = SETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn SETTERS.default;\n}\n\n\n// EXPORTS //\n\nmodule.exports = setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isComplexLike = require( '@stdlib/assert-is-complex-like' );\nvar real = require( '@stdlib/complex-real' );\nvar imag = require( '@stdlib/complex-imag' );\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArrayLikeObject = require( '@stdlib/assert-is-array-like-object' );\nvar isComplexLike = require( '@stdlib/assert-is-complex-like' );\nvar format = require( '@stdlib/string-format' );\nvar real = require( '@stdlib/complex-real' );\nvar imag = require( '@stdlib/complex-imag' );\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArrayLikeObject = require( '@stdlib/assert-is-array-like-object' );\nvar isComplexLike = require( '@stdlib/assert-is-complex-like' );\nvar format = require( '@stdlib/string-format' );\nvar real = require( '@stdlib/complex-real' );\nvar imag = require( '@stdlib/complex-imag' );\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* 128-bit complex number array.\n*\n* @module @stdlib/array-complex128\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n*\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n*\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n*\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var Complex128Array = require( '@stdlib/array-complex128' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var Complex128Array = require( '@stdlib/array-complex128' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var Complex128Array = require( '@stdlib/array-complex128' );\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;\nvar isArrayLikeObject = require( '@stdlib/assert-is-array-like-object' );\nvar isCollection = require( '@stdlib/assert-is-collection' );\nvar isArrayBuffer = require( '@stdlib/assert-is-arraybuffer' );\nvar isObject = require( '@stdlib/assert-is-object' );\nvar isArray = require( '@stdlib/assert-is-array' );\nvar isString = require( '@stdlib/assert-is-string' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar isComplexLike = require( '@stdlib/assert-is-complex-like' );\nvar isEven = require( '@stdlib/math-base-assert-is-even' );\nvar isInteger = require( '@stdlib/math-base-assert-is-integer' );\nvar isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' );\nvar isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' );\nvar hasIteratorSymbolSupport = require( '@stdlib/assert-has-iterator-symbol-support' );\nvar ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' );\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar Complex128 = require( '@stdlib/complex-float64' );\nvar real = require( '@stdlib/complex-real' );\nvar imag = require( '@stdlib/complex-imag' );\nvar floor = require( '@stdlib/math-base-special-floor' );\nvar reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' );\nvar reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' );\nvar getter = require( '@stdlib/array-base-getter' );\nvar accessorGetter = require( '@stdlib/array-base-accessor-getter' );\nvar format = require( '@stdlib/string-format' );\nvar fromIterator = require( './from_iterator.js' );\nvar fromIteratorMap = require( './from_iterator_map.js' );\nvar fromArray = require( './from_array.js' );\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n* var cadd = require( '@stdlib/math-base-ops-cadd' );\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* var real = require( '@stdlib/complex-real' );\n* var imag = require( '@stdlib/complex-imag' );\n* var Complex128 = require( '@stdlib/complex-float64' );\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nmodule.exports = Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isComplexLike = require( '@stdlib/assert-is-complex-like' );\nvar realf = require( '@stdlib/complex-realf' );\nvar imagf = require( '@stdlib/complex-imagf' );\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArrayLikeObject = require( '@stdlib/assert-is-array-like-object' );\nvar isComplexLike = require( '@stdlib/assert-is-complex-like' );\nvar realf = require( '@stdlib/complex-realf' );\nvar imagf = require( '@stdlib/complex-imagf' );\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArrayLikeObject = require( '@stdlib/assert-is-array-like-object' );\nvar isComplexLike = require( '@stdlib/assert-is-complex-like' );\nvar realf = require( '@stdlib/complex-realf' );\nvar imagf = require( '@stdlib/complex-imagf' );\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* 64-bit complex number array.\n*\n* @module @stdlib/array-complex64\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n*\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n*\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n*\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var Complex64Array = require( '@stdlib/array-complex64' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var Complex64Array = require( '@stdlib/array-complex64' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var Complex64Array = require( '@stdlib/array-complex64' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;\nvar isArrayLikeObject = require( '@stdlib/assert-is-array-like-object' );\nvar isCollection = require( '@stdlib/assert-is-collection' );\nvar isArrayBuffer = require( '@stdlib/assert-is-arraybuffer' );\nvar isObject = require( '@stdlib/assert-is-object' );\nvar isArray = require( '@stdlib/assert-is-array' );\nvar isString = require( '@stdlib/assert-is-string' ).isPrimitive;\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar isComplexLike = require( '@stdlib/assert-is-complex-like' );\nvar isEven = require( '@stdlib/math-base-assert-is-even' );\nvar isInteger = require( '@stdlib/math-base-assert-is-integer' );\nvar isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' );\nvar isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' );\nvar hasIteratorSymbolSupport = require( '@stdlib/assert-has-iterator-symbol-support' );\nvar ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' );\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' );\nvar Float32Array = require( '@stdlib/array-float32' );\nvar Complex64 = require( '@stdlib/complex-float32' );\nvar format = require( '@stdlib/string-format' );\nvar realf = require( '@stdlib/complex-realf' );\nvar imagf = require( '@stdlib/complex-imagf' );\nvar floor = require( '@stdlib/math-base-special-floor' );\nvar reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' );\nvar reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' );\nvar getter = require( '@stdlib/array-base-getter' );\nvar accessorGetter = require( '@stdlib/array-base-accessor-getter' );\nvar fromIterator = require( './from_iterator.js' );\nvar fromIteratorMap = require( './from_iterator_map.js' );\nvar fromArray = require( './from_array.js' );\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var caddf = require( '@stdlib/math-base-ops-caddf' );\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nmodule.exports = Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Mapping from array constructors to data types...\nvar ctor2dtypes = {\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128'\n};\n\n\n// EXPORTS //\n\nmodule.exports = ctor2dtypes;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Float64Array = require( '@stdlib/array-float64' );\nvar Float32Array = require( '@stdlib/array-float32' );\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Int32Array = require( '@stdlib/array-int32' );\nvar Uint16Array = require( '@stdlib/array-uint16' );\nvar Int16Array = require( '@stdlib/array-int16' );\nvar Uint8Array = require( '@stdlib/array-uint8' );\nvar Uint8ClampedArray = require( '@stdlib/array-uint8c' );\nvar Int8Array = require( '@stdlib/array-int8' );\nvar Complex64Array = require( '@stdlib/array-complex64' );\nvar Complex128Array = require( '@stdlib/array-complex128' );\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array\n];\n\n\n// EXPORTS //\n\nmodule.exports = CTORS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128'\n];\n\n\n// EXPORTS //\n\nmodule.exports = DTYPES;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type of an array.\n*\n* @module @stdlib/array-dtype\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var dtype = require( '@stdlib/array-dtype' );\n*\n* var arr = new Float64Array( 10 );\n*\n* var dt = dtype( arr );\n* // returns 'float64'\n*\n* dt = dtype( {} );\n* // returns null\n*\n* dt = dtype( 'beep' );\n* // returns null\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isBuffer = require( '@stdlib/assert-is-buffer' );\nvar isArray = require( '@stdlib/assert-is-array' );\nvar constructorName = require( '@stdlib/utils-constructor-name' );\nvar ctor2dtype = require( './ctor2dtype.js' );\nvar CTORS = require( './ctors.js' );\nvar DTYPES = require( './dtypes.js' );\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an array.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn null;\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* var ctor = require( '@stdlib/array-float32' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasFloat32ArraySupport = require( '@stdlib/assert-has-float32array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* var ctor = require( '@stdlib/array-float64' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasFloat64ArraySupport = require( '@stdlib/assert-has-float64array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* var ctor = require( '@stdlib/array-int16' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasInt16ArraySupport = require( '@stdlib/assert-has-int16array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* var ctor = require( '@stdlib/array-int32' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasInt32ArraySupport = require( '@stdlib/assert-has-int32array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* var ctor = require( '@stdlib/array-int8' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasInt8ArraySupport = require( '@stdlib/assert-has-int8array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Int8Array = require( '@stdlib/array-int8' );\nvar Uint8Array = require( '@stdlib/array-uint8' );\nvar Uint8ClampedArray = require( '@stdlib/array-uint8c' );\nvar Int16Array = require( '@stdlib/array-int16' );\nvar Uint16Array = require( '@stdlib/array-uint16' );\nvar Int32Array = require( '@stdlib/array-int32' );\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float32Array = require( '@stdlib/array-float32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar Complex64Array = require( '@stdlib/array-complex64' );\nvar Complex128Array = require( '@stdlib/array-complex128' );\n\n\n// MAIN //\n\nvar CTORS = [\n\t[ Float64Array, 'Float64Array' ],\n\t[ Float32Array, 'Float32Array' ],\n\t[ Int32Array, 'Int32Array' ],\n\t[ Uint32Array, 'Uint32Array' ],\n\t[ Int16Array, 'Int16Array' ],\n\t[ Uint16Array, 'Uint16Array' ],\n\t[ Int8Array, 'Int8Array' ],\n\t[ Uint8Array, 'Uint8Array' ],\n\t[ Uint8ClampedArray, 'Uint8ClampedArray' ],\n\t[ Complex64Array, 'Complex64Array' ],\n\t[ Complex128Array, 'Complex128Array' ]\n];\n\n\n// EXPORTS //\n\nmodule.exports = CTORS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a JSON representation of a typed array.\n*\n* @module @stdlib/array-to-json\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var typedarray2json = require( '@stdlib/array-to-json' );\n*\n* var arr = new Float64Array( [ 5.0, 3.0 ] );\n* var json = typedarray2json( arr );\n* // returns { 'type': 'Float64Array', 'data': [ 5.0, 3.0 ] }\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isTypedArray = require( '@stdlib/assert-is-typed-array' );\nvar isComplexTypedArray = require( '@stdlib/assert-is-complex-typed-array' );\nvar reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' );\nvar reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' );\nvar format = require( '@stdlib/string-format' );\nvar typeName = require( './type.js' );\n\n\n// MAIN //\n\n/**\n* Returns a JSON representation of a typed array.\n*\n* ## Notes\n*\n* - We build a JSON object representing a typed array similar to how Node.js `Buffer` objects are represented. See [Buffer][1].\n*\n* [1]: https://nodejs.org/api/buffer.html#buffer_buf_tojson\n*\n* @param {TypedArray} arr - typed array to serialize\n* @throws {TypeError} first argument must be a typed array\n* @returns {Object} JSON representation\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* var arr = new Float64Array( [ 5.0, 3.0 ] );\n* var json = typedarray2json( arr );\n* // returns { 'type': 'Float64Array', 'data': [ 5.0, 3.0 ] }\n*/\nfunction typedarray2json( arr ) {\n\tvar data;\n\tvar out;\n\tvar i;\n\n\tif ( isTypedArray( arr ) ) {\n\t\tdata = arr;\n\t} else if ( isComplexTypedArray( arr ) ) {\n\t\tif ( arr.BYTES_PER_ELEMENT === 8 ) {\n\t\t\tdata = reinterpret64( arr, 0 );\n\t\t} else { // arr.BYTES_PER_ELEMENT === 16\n\t\t\tdata = reinterpret128( arr, 0 );\n\t\t}\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a typed array. Value: `%s`.', arr ) );\n\t}\n\tout = {\n\t\t'type': typeName( arr ),\n\t\t'data': []\n\t};\n\tfor ( i = 0; i < data.length; i++ ) {\n\t\tout.data.push( data[ i ] );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = typedarray2json;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar instanceOf = require( '@stdlib/assert-instance-of' );\nvar ctorName = require( '@stdlib/utils-constructor-name' );\nvar getPrototypeOf = require( '@stdlib/utils-get-prototype-of' );\nvar CTORS = require( './ctors.js' );\n\n\n// MAIN //\n\n/**\n* Returns the typed array type.\n*\n* @private\n* @param {TypedArray} arr - typed array\n* @returns {(string|void)} typed array type\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* var arr = new Float64Array( 5 );\n* var str = typeName( arr );\n* // returns 'Float64Array'\n*/\nfunction typeName( arr ) {\n\tvar v;\n\tvar i;\n\n\t// Check for typed array objects from the same realm (same Node.js `vm` or same `Window` object)...\n\tfor ( i = 0; i < CTORS.length; i++ ) {\n\t\tif ( instanceOf( arr, CTORS[ i ][ 0 ] ) ) {\n\t\t\treturn CTORS[ i ][ 1 ];\n\t\t}\n\t}\n\t// Walk the prototype tree until we find an object having a desired native class...\n\twhile ( arr ) {\n\t\tv = ctorName( arr );\n\t\tfor ( i = 0; i < CTORS.length; i++ ) {\n\t\t\tif ( v === CTORS[ i ][ 1 ] ) {\n\t\t\t\treturn CTORS[ i ][ 1 ];\n\t\t\t}\n\t\t}\n\t\tarr = getPrototypeOf( arr );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = typeName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* var ctor = require( '@stdlib/array-uint16' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint16ArraySupport = require( '@stdlib/assert-has-uint16array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* var ctor = require( '@stdlib/array-uint32' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint32ArraySupport = require( '@stdlib/assert-has-uint32array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* var ctor = require( '@stdlib/array-uint8' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint8ArraySupport = require( '@stdlib/assert-has-uint8array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* var ctor = require( '@stdlib/array-uint8c' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint8ClampedArraySupport = require( '@stdlib/assert-has-uint8clampedarray-support' ); // eslint-disable-line id-length\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Float32Array` support.\n*\n* @module @stdlib/assert-has-float32array-support\n*\n* @example\n* var hasFloat32ArraySupport = require( '@stdlib/assert-has-float32array-support' );\n*\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\n\n// MODULES //\n\nvar hasFloat32ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFloat32Array = require( '@stdlib/assert-is-float32array' );\nvar PINF = require( '@stdlib/constants-float64-pinf' );\nvar GlobalFloat32Array = require( './float32array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Float64Array` support.\n*\n* @module @stdlib/assert-has-float64array-support\n*\n* @example\n* var hasFloat64ArraySupport = require( '@stdlib/assert-has-float64array-support' );\n*\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\n\n// MODULES //\n\nvar hasFloat64ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFloat64Array = require( '@stdlib/assert-is-float64array' );\nvar GlobalFloat64Array = require( './float64array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Dummy function.\n*\n* @private\n*/\nfunction foo() {\n\t// No-op...\n}\n\n\n// EXPORTS //\n\nmodule.exports = foo;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native function `name` support.\n*\n* @module @stdlib/assert-has-function-name-support\n*\n* @example\n* var hasFunctionNameSupport = require( '@stdlib/assert-has-function-name-support' );\n*\n* var bool = hasFunctionNameSupport();\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar foo = require( './foo.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native function `name` support.\n*\n* @returns {boolean} boolean indicating if an environment has function `name` support\n*\n* @example\n* var bool = hasFunctionNameSupport();\n* // returns \n*/\nfunction hasFunctionNameSupport() {\n\treturn ( foo.name === 'foo' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasFunctionNameSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Int16Array` support.\n*\n* @module @stdlib/assert-has-int16array-support\n*\n* @example\n* var hasInt16ArraySupport = require( '@stdlib/assert-has-int16array-support' );\n*\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\n\n// MODULES //\n\nvar hasInt16ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInt16Array = require( '@stdlib/assert-is-int16array' );\nvar INT16_MAX = require( '@stdlib/constants-int16-max' );\nvar INT16_MIN = require( '@stdlib/constants-int16-min' );\nvar GlobalInt16Array = require( './int16array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Int32Array` support.\n*\n* @module @stdlib/assert-has-int32array-support\n*\n* @example\n* var hasInt32ArraySupport = require( '@stdlib/assert-has-int32array-support' );\n*\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\n\n// MODULES //\n\nvar hasInt32ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInt32Array = require( '@stdlib/assert-is-int32array' );\nvar INT32_MAX = require( '@stdlib/constants-int32-max' );\nvar INT32_MIN = require( '@stdlib/constants-int32-min' );\nvar GlobalInt32Array = require( './int32array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Int8Array` support.\n*\n* @module @stdlib/assert-has-int8array-support\n*\n* @example\n* var hasInt8ArraySupport = require( '@stdlib/assert-has-int8array-support' );\n*\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\n\n// MODULES //\n\nvar hasInt8ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInt8Array = require( '@stdlib/assert-is-int8array' );\nvar INT8_MAX = require( '@stdlib/constants-int8-max' );\nvar INT8_MIN = require( '@stdlib/constants-int8-min' );\nvar GlobalInt8Array = require( './int8array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Symbol.iterator` support.\n*\n* @module @stdlib/assert-has-iterator-symbol-support\n*\n* @example\n* var hasIteratorSymbolSupport = require( '@stdlib/assert-has-iterator-symbol-support' );\n*\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar Symbol = require( '@stdlib/symbol-ctor' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an object has a specified property.\n*\n* @module @stdlib/assert-has-own-property\n*\n* @example\n* var hasOwnProp = require( '@stdlib/assert-has-own-property' );\n*\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* bool = hasOwnProp( beep, 'bop' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Symbol` support.\n*\n* @module @stdlib/assert-has-symbol-support\n*\n* @example\n* var hasSymbolSupport = require( '@stdlib/assert-has-symbol-support' );\n*\n* var bool = hasSymbolSupport();\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `toStringTag` support.\n*\n* @module @stdlib/assert-has-tostringtag-support\n*\n* @example\n* var hasToStringTagSupport = require( '@stdlib/assert-has-tostringtag-support' );\n*\n* var bool = hasToStringTagSupport();\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasSymbols = require( '@stdlib/assert-has-symbol-support' );\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Uint16Array` support.\n*\n* @module @stdlib/assert-has-uint16array-support\n*\n* @example\n* var hasUint16ArraySupport = require( '@stdlib/assert-has-uint16array-support' );\n*\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint16ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isUint16Array = require( '@stdlib/assert-is-uint16array' );\nvar UINT16_MAX = require( '@stdlib/constants-uint16-max' );\nvar GlobalUint16Array = require( './uint16array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Uint32Array` support.\n*\n* @module @stdlib/assert-has-uint32array-support\n*\n* @example\n* var hasUint32ArraySupport = require( '@stdlib/assert-has-uint32array-support' );\n*\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint32ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isUint32Array = require( '@stdlib/assert-is-uint32array' );\nvar UINT32_MAX = require( '@stdlib/constants-uint32-max' );\nvar GlobalUint32Array = require( './uint32array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Uint8Array` support.\n*\n* @module @stdlib/assert-has-uint8array-support\n*\n* @example\n* var hasUint8ArraySupport = require( '@stdlib/assert-has-uint8array-support' );\n*\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint8ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isUint8Array = require( '@stdlib/assert-is-uint8array' );\nvar UINT8_MAX = require( '@stdlib/constants-uint8-max' );\nvar GlobalUint8Array = require( './uint8array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Uint8ClampedArray` support.\n*\n* @module @stdlib/assert-has-uint8clampedarray-support\n*\n* @example\n* var hasUint8ClampedArraySupport = require( '@stdlib/assert-has-uint8clampedarray-support' );\n*\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint8ClampedArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isUint8ClampedArray = require( '@stdlib/assert-is-uint8clampedarray' );\nvar GlobalUint8ClampedArray = require( './uint8clampedarray.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether a value has in its prototype chain a specified constructor as a prototype property.\n*\n* @module @stdlib/assert-instance-of\n*\n* @example\n* var instanceOf = require( '@stdlib/assert-instance-of' );\n*\n* var bool = instanceOf( [], Array );\n* // returns true\n*\n* bool = instanceOf( {}, Object ); // exception\n* // returns true\n*\n* bool = instanceOf( 'beep', String );\n* // returns false\n*\n* bool = instanceOf( null, Object );\n* // returns false\n*\n* bool = instanceOf( 5, Object );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Tests whether a value has in its prototype chain a specified constructor as a prototype property.\n*\n* @param {*} value - value to test\n* @param {Function} constructor - constructor to test against\n* @throws {TypeError} constructor must be callable\n* @returns {boolean} boolean indicating whether a value is an instance of a provided constructor\n*\n* @example\n* var bool = instanceOf( [], Array );\n* // returns true\n*\n* @example\n* var bool = instanceOf( {}, Object ); // exception\n* // returns true\n*\n* @example\n* var bool = instanceOf( 'beep', String );\n* // returns false\n*\n* @example\n* var bool = instanceOf( null, Object );\n* // returns false\n*\n* @example\n* var bool = instanceOf( 5, Object );\n* // returns false\n*/\nfunction instanceOf( value, constructor ) {\n\t// TODO: replace with `isCallable` check\n\tif ( typeof constructor !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be callable. Value: `%s`.', constructor ) );\n\t}\n\treturn ( value instanceof constructor );\n}\n\n\n// EXPORTS //\n\nmodule.exports = instanceOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArguments = require( './main.js' );\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Detects whether an environment returns the expected internal class of the `arguments` object.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment behaves as expected\n*\n* @example\n* var bool = detect();\n* // returns \n*/\nfunction detect() {\n\treturn isArguments( arguments );\n}\n\n\n// MAIN //\n\nbool = detect();\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an `arguments` object.\n*\n* @module @stdlib/assert-is-arguments\n*\n* @example\n* var isArguments = require( '@stdlib/assert-is-arguments' );\n*\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* bool = isArguments( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar hasArgumentsClass = require( './detect.js' );\nvar main = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar isArguments;\nif ( hasArgumentsClass ) {\n\tisArguments = main;\n} else {\n\tisArguments = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArguments;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// MAIN //\n\n/**\n* Tests whether a value is an `arguments` object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is an `arguments` object\n*\n* @example\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* @example\n* var bool = isArguments( [] );\n* // returns false\n*/\nfunction isArguments( value ) {\n\treturn ( nativeClass( value ) === '[object Arguments]' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArguments;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar isEnumerableProperty = require( '@stdlib/assert-is-enumerable-property' );\nvar isArray = require( '@stdlib/assert-is-array' );\nvar isInteger = require( '@stdlib/math-base-assert-is-integer' );\nvar MAX_LENGTH = require( '@stdlib/constants-uint32-max' );\n\n\n// MAIN //\n\n/**\n* Tests whether a value is an `arguments` object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is an `arguments` object\n*\n* @example\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* @example\n* var bool = isArguments( [] );\n* // returns false\n*/\nfunction isArguments( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object' &&\n\t\t!isArray( value ) &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH &&\n\t\thasOwnProp( value, 'callee' ) &&\n\t\t!isEnumerableProperty( value, 'callee' )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArguments;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an array-like object.\n*\n* @module @stdlib/assert-is-array-like-object\n*\n* @example\n* var isArrayLikeObject = require( '@stdlib/assert-is-array-like-object' );\n*\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/math-base-assert-is-integer' );\nvar MAX_LENGTH = require( '@stdlib/constants-array-max-array-length' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an array.\n*\n* @module @stdlib/assert-is-array\n*\n* @example\n* var isArray = require( '@stdlib/assert-is-array' );\n*\n* var bool = isArray( [] );\n* // returns true\n*\n* bool = isArray( {} );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nmodule.exports = f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an ArrayBuffer.\n*\n* @module @stdlib/assert-is-arraybuffer\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var isArrayBuffer = require( '@stdlib/assert-is-arraybuffer' );\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* bool = isArrayBuffer( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* var Boolean = require( '@stdlib/boolean-ctor' );\n* var isBoolean = require( '@stdlib/assert-is-boolean' );\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* var Boolean = require( '@stdlib/boolean-ctor' );\n* var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* var Boolean = require( '@stdlib/boolean-ctor' );\n* var isBoolean = require( '@stdlib/assert-is-boolean' ).isObject;\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var Boolean = require( '@stdlib/boolean-ctor' );\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* var Boolean = require( '@stdlib/boolean-ctor' );\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasToStringTag = require( '@stdlib/assert-has-tostringtag-support' );\nvar nativeClass = require( '@stdlib/utils-native-class' );\nvar Boolean = require( '@stdlib/boolean-ctor' );\nvar test = require( './try2serialize.js' );\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* var Boolean = require( '@stdlib/boolean-ctor' );\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var Boolean = require( '@stdlib/boolean-ctor' );\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nmodule.exports = toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar toString = require( './tostring.js' ); // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Buffer instance.\n*\n* @module @stdlib/assert-is-buffer\n*\n* @example\n* var isBuffer = require( '@stdlib/assert-is-buffer' );\n*\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* v = isBuffer( {} );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObjectLike = require( '@stdlib/assert-is-object-like' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a collection.\n*\n* @module @stdlib/assert-is-collection\n*\n* @example\n* var isCollection = require( '@stdlib/assert-is-collection' );\n*\n* var bool = isCollection( [] );\n* // returns true\n*\n* bool = isCollection( {} );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/math-base-assert-is-integer' );\nvar MAX_LENGTH = require( '@stdlib/constants-array-max-typed-array-length' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a complex number-like object.\n*\n* @module @stdlib/assert-is-complex-like\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var isComplexLike = require( '@stdlib/assert-is-complex-like' );\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Complex128 = require( '@stdlib/complex-float64' );\nvar Complex64 = require( '@stdlib/complex-float32' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Complex64Array = require( '@stdlib/array-complex64' );\nvar Complex128Array = require( '@stdlib/array-complex128' );\n\n\n// MAIN //\n\nvar CTORS = [\n\tComplex128Array,\n\tComplex64Array\n];\n\n\n// EXPORTS //\n\nmodule.exports = CTORS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a complex typed array.\n*\n* @module @stdlib/assert-is-complex-typed-array\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n* var isComplexTypedArray = require( '@stdlib/assert-is-complex-typed-array' );\n*\n* var bool = isComplexTypedArray( new Complex128Array( 10 ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ctorName = require( '@stdlib/utils-constructor-name' );\nvar getPrototypeOf = require( '@stdlib/utils-get-prototype-of' );\nvar CTORS = require( './ctors.js' );\nvar NAMES = require( './names.json' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex typed array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n*\n* var bool = isComplexTypedArray( new Complex128Array( 10 ) );\n* // returns true\n*/\nfunction isComplexTypedArray( value ) {\n\tvar v;\n\tvar i;\n\n\tif ( typeof value !== 'object' || value === null ) {\n\t\treturn false;\n\t}\n\t// Check for complex typed array objects from the same realm (same Node.js `vm` or same `Window` object)...\n\tfor ( i = 0; i < CTORS.length; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\t// Walk the prototype tree until we find an object having a desired class...\n\twhile ( value ) {\n\t\tv = ctorName( value );\n\t\tfor ( i = 0; i < NAMES.length; i++ ) {\n\t\t\tif ( NAMES[ i ] === v ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tvalue = getPrototypeOf( value );\n\t}\n\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isComplexTypedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isEnum = require( './native.js' );\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Detects whether an environment has a bug where String indices are not detected as \"enumerable\" properties. Observed in Node v0.10.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment has the bug\n*/\nfunction detect() {\n\treturn !isEnum.call( 'beep', '0' );\n}\n\n\n// MAIN //\n\nbool = detect();\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an object's own property is enumerable.\n*\n* @module @stdlib/assert-is-enumerable-property\n*\n* @example\n* var isEnumerableProperty = require( '@stdlib/assert-is-enumerable-property' );\n*\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isString = require( '@stdlib/assert-is-string' );\nvar isnan = require( '@stdlib/assert-is-nan' ).isPrimitive;\nvar isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;\nvar isEnum = require( './native.js' );\nvar hasStringEnumBug = require( './has_string_enumerability_bug.js' );\n\n\n// MAIN //\n\n/**\n* Tests if an object's own property is enumerable.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object property is enumerable\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\nfunction isEnumerableProperty( value, property ) {\n\tvar bool;\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\tbool = isEnum.call( value, property );\n\tif ( !bool && hasStringEnumBug && isString( value ) ) {\n\t\t// Note: we only check for indices, as properties attached to a `String` object are properly detected as enumerable above.\n\t\tproperty = +property;\n\t\treturn (\n\t\t\t!isnan( property ) &&\n\t\t\tisInteger( property ) &&\n\t\t\tproperty >= 0 &&\n\t\t\tproperty < value.length\n\t\t);\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isEnumerableProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests if an object's own property is enumerable.\n*\n* @private\n* @name isEnumerableProperty\n* @type {Function}\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object property is enumerable\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\nvar isEnumerableProperty = Object.prototype.propertyIsEnumerable;\n\n\n// EXPORTS //\n\nmodule.exports = isEnumerableProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Float32Array.\n*\n* @module @stdlib/assert-is-float32array\n*\n* @example\n* var isFloat32Array = require( '@stdlib/assert-is-float32array' );\n*\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* bool = isFloat32Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isFloat32Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Float64Array.\n*\n* @module @stdlib/assert-is-float64array\n*\n* @example\n* var isFloat64Array = require( '@stdlib/assert-is-float64array' );\n*\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* bool = isFloat64Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isFloat64Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a function.\n*\n* @module @stdlib/assert-is-function\n*\n* @example\n* var isFunction = require( '@stdlib/assert-is-function' );\n*\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar typeOf = require( '@stdlib/utils-type-of' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an Int16Array.\n*\n* @module @stdlib/assert-is-int16array\n*\n* @example\n* var isInt16Array = require( '@stdlib/assert-is-int16array' );\n*\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* bool = isInt16Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isInt16Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an Int32Array.\n*\n* @module @stdlib/assert-is-int32array\n*\n* @example\n* var isInt32Array = require( '@stdlib/assert-is-int32array' );\n*\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* bool = isInt32Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isInt32Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an Int8Array.\n*\n* @module @stdlib/assert-is-int8array\n*\n* @example\n* var isInt8Array = require( '@stdlib/assert-is-int8array' );\n*\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* bool = isInt8Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isInt8Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* var isInteger = require( '@stdlib/assert-is-integer' );\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* var isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* var isInteger = require( '@stdlib/assert-is-integer' ).isObject;\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar PINF = require( '@stdlib/constants-float64-pinf' );\nvar NINF = require( '@stdlib/constants-float64-ninf' );\nvar isInt = require( '@stdlib/math-base-assert-is-integer' );\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( '@stdlib/assert-is-number' ).isObject;\nvar isInt = require( './integer.js' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;\nvar isInt = require( './integer.js' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint8Array = require( '@stdlib/array-uint8' );\nvar Uint16Array = require( '@stdlib/array-uint16' );\n\n\n// MAIN //\n\nvar ctors = {\n\t'uint16': Uint16Array,\n\t'uint8': Uint8Array\n};\n\n\n// EXPORTS //\n\nmodule.exports = ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a boolean indicating if an environment is little endian.\n*\n* @module @stdlib/assert-is-little-endian\n*\n* @example\n* var IS_LITTLE_ENDIAN = require( '@stdlib/assert-is-little-endian' );\n*\n* var bool = IS_LITTLE_ENDIAN;\n* // returns \n*/\n\n// MODULES //\n\nvar IS_LITTLE_ENDIAN = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = IS_LITTLE_ENDIAN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ctors = require( './ctors.js' );\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if an environment is little endian.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment is little endian\n*\n* @example\n* var bool = isLittleEndian();\n* // returns \n*/\nfunction isLittleEndian() {\n\tvar uint16view;\n\tvar uint8view;\n\n\tuint16view = new ctors[ 'uint16' ]( 1 );\n\n\t/*\n\t* Set the uint16 view to a value having distinguishable lower and higher order words.\n\t*\n\t* 4660 => 0x1234 => 0x12 0x34 => '00010010 00110100' => (0x12,0x34) == (18,52)\n\t*/\n\tuint16view[ 0 ] = 0x1234;\n\n\t// Create a uint8 view on top of the uint16 buffer:\n\tuint8view = new ctors[ 'uint8' ]( uint16view.buffer );\n\n\t// If little endian, the least significant byte will be first...\n\treturn ( uint8view[ 0 ] === 0x34 );\n}\n\n\n// MAIN //\n\nbool = isLittleEndian();\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is `NaN`.\n*\n* @module @stdlib/assert-is-nan\n*\n* @example\n* var isnan = require( '@stdlib/assert-is-nan' );\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( null );\n* // returns false\n*\n* @example\n* var isnan = require( '@stdlib/assert-is-nan' ).isPrimitive;\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns false\n*\n* @example\n* var isnan = require( '@stdlib/assert-is-nan' ).isObject;\n*\n* var bool = isnan( NaN );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( null );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( '@stdlib/assert-is-number' ).isObject;\nvar isNan = require( '@stdlib/math-base-assert-is-nan' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a value of `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a value of `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;\nvar isNan = require( '@stdlib/math-base-assert-is-nan' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a `NaN` number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `NaN` number primitive\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* var isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' );\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* var isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* var isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isObject;\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert-is-integer' ).isObject;\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* var isNumber = require( '@stdlib/assert-is-number' );\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* var isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* var isNumber = require( '@stdlib/assert-is-number' ).isObject;\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasToStringTag = require( '@stdlib/assert-has-tostringtag-support' );\nvar nativeClass = require( '@stdlib/utils-native-class' );\nvar Number = require( '@stdlib/number-ctor' );\nvar test = require( './try2serialize.js' );\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Number = require( '@stdlib/number-ctor' );\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nmodule.exports = toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar toString = require( './tostring.js' ); // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* var isObjectLike = require( '@stdlib/assert-is-object-like' );\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* var isObjectLike = require( '@stdlib/assert-is-object-like' ).isObjectLikeArray;\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar arrayfun = require( '@stdlib/assert-tools-array-function' );\nvar main = require( './main.js' );\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an object.\n*\n* @module @stdlib/assert-is-object\n*\n* @example\n* var isObject = require( '@stdlib/assert-is-object' );\n*\n* var bool = isObject( {} );\n* // returns true\n*\n* bool = isObject( true );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArray = require( '@stdlib/assert-is-array' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a plain object.\n*\n* @module @stdlib/assert-is-plain-object\n*\n* @example\n* var isPlainObject = require( '@stdlib/assert-is-plain-object' );\n*\n* var bool = isPlainObject( {} );\n* // returns true\n*\n* bool = isPlainObject( null );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert-is-object' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar getPrototypeOf = require( '@stdlib/utils-get-prototype-of' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar objectPrototype = Object.prototype;\n\n\n// FUNCTIONS //\n\n/**\n* Tests that an object only has own properties.\n*\n* @private\n* @param {Object} obj - value to test\n* @returns {boolean} boolean indicating if an object only has own properties\n*/\nfunction ownProps( obj ) {\n\tvar key;\n\n\t// NOTE: possibility of perf boost if key enumeration order is known (see http://stackoverflow.com/questions/18531624/isplainobject-thing).\n\tfor ( key in obj ) {\n\t\tif ( !hasOwnProp( obj, key ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n\n// MAIN //\n\n/**\n* Tests if a value is a plain object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a plain object\n*\n* @example\n* var bool = isPlainObject( {} );\n* // returns true\n*\n* @example\n* var bool = isPlainObject( null );\n* // returns false\n*/\nfunction isPlainObject( value ) {\n\tvar proto;\n\n\t// Screen for obvious non-objects...\n\tif ( !isObject( value ) ) {\n\t\treturn false;\n\t}\n\t// Objects with no prototype (e.g., `Object.create( null )`) are plain...\n\tproto = getPrototypeOf( value );\n\tif ( !proto ) {\n\t\treturn true;\n\t}\n\t// Objects having a prototype are plain if and only if they are constructed with a global `Object` function and the prototype points to the prototype of a plain object...\n\treturn (\n\t\t// Cannot have own `constructor` property:\n\t\t!hasOwnProp( value, 'constructor' ) &&\n\n\t\t// Prototype `constructor` property must be a function (see also https://bugs.jquery.com/ticket/9897 and http://stackoverflow.com/questions/18531624/isplainobject-thing):\n\t\thasOwnProp( proto, 'constructor' ) &&\n\t\tisFunction( proto.constructor ) &&\n\t\tnativeClass( proto.constructor ) === '[object Function]' &&\n\n\t\t// Test for object-specific method:\n\t\thasOwnProp( proto, 'isPrototypeOf' ) &&\n\t\tisFunction( proto.isPrototypeOf ) &&\n\n\t\t(\n\t\t\t// Test if the prototype matches the global `Object` prototype (same realm):\n\t\t\tproto === objectPrototype ||\n\n\t\t\t// Test that all properties are own properties (cross-realm; *most* likely a plain object):\n\t\t\townProps( value )\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isPlainObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a positive integer.\n*\n* @module @stdlib/assert-is-positive-integer\n*\n* @example\n* var isPositiveInteger = require( '@stdlib/assert-is-positive-integer' );\n*\n* var bool = isPositiveInteger( 5.0 );\n* // returns true\n*\n* bool = isPositiveInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isPositiveInteger( -5.0 );\n* // returns false\n*\n* bool = isPositiveInteger( 3.14 );\n* // returns false\n*\n* bool = isPositiveInteger( null );\n* // returns false\n*\n* @example\n* var isPositiveInteger = require( '@stdlib/assert-is-positive-integer' ).isPrimitive;\n*\n* var bool = isPositiveInteger( 3.0 );\n* // returns true\n*\n* bool = isPositiveInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* var isPositiveInteger = require( '@stdlib/assert-is-positive-integer' ).isObject;\n*\n* var bool = isPositiveInteger( 3.0 );\n* // returns false\n*\n* bool = isPositiveInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a positive integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a positive integer\n*\n* @example\n* var bool = isPositiveInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isPositiveInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isPositiveInteger( 0.0 );\n* // returns false\n*\n* @example\n* var bool = isPositiveInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isPositiveInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isPositiveInteger( null );\n* // returns false\n*/\nfunction isPositiveInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isPositiveInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert-is-integer' ).isObject;\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a positive integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a positive integer value\n*\n* @example\n* var bool = isPositiveInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isPositiveInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isPositiveInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() > 0.0\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isPositiveInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a positive integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a positive integer value\n*\n* @example\n* var bool = isPositiveInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isPositiveInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isPositiveInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue > 0.0\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isPositiveInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a positive number.\n*\n* @module @stdlib/assert-is-positive-number\n*\n* @example\n* var isPositiveNumber = require( '@stdlib/assert-is-positive-number' );\n*\n* var bool = isPositiveNumber( 5.0 );\n* // returns true\n*\n* bool = isPositiveNumber( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isPositiveNumber( 3.14 );\n* // returns true\n*\n* bool = isPositiveNumber( -5.0 );\n* // returns false\n*\n* bool = isPositiveNumber( null );\n* // returns false\n*\n* @example\n* var isPositiveNumber = require( '@stdlib/assert-is-positive-number' ).isPrimitive;\n*\n* var bool = isPositiveNumber( 3.0 );\n* // returns true\n*\n* bool = isPositiveNumber( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* var isPositiveNumber = require( '@stdlib/assert-is-positive-number' ).isObject;\n*\n* var bool = isPositiveNumber( 3.0 );\n* // returns false\n*\n* bool = isPositiveNumber( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a positive number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a positive number\n*\n* @example\n* var bool = isPositiveNumber( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isPositiveNumber( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isPositiveNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isPositiveNumber( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isPositiveNumber( null );\n* // returns false\n*/\nfunction isPositiveNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isPositiveNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( '@stdlib/assert-is-number' ).isObject;\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a positive value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a positive value\n*\n* @example\n* var bool = isPositiveNumber( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isPositiveNumber( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isPositiveNumber( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tvalue.valueOf() > 0.0\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isPositiveNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a positive value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a positive value\n*\n* @example\n* var bool = isPositiveNumber( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isPositiveNumber( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isPositiveNumber( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tvalue > 0.0\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isPositiveNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* var isString = require( '@stdlib/assert-is-string' );\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* var isString = require( '@stdlib/assert-is-string' ).isObject;\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* var isString = require( '@stdlib/assert-is-string' ).isPrimitive;\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasToStringTag = require( '@stdlib/assert-has-tostringtag-support' );\nvar nativeClass = require( '@stdlib/utils-native-class' );\nvar test = require( './try2valueof.js' );\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar valueOf = require( './valueof.js' ); // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nmodule.exports = valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Int8Array = require( '@stdlib/array-int8' );\nvar Uint8Array = require( '@stdlib/array-uint8' );\nvar Uint8ClampedArray = require( '@stdlib/array-uint8c' );\nvar Int16Array = require( '@stdlib/array-int16' );\nvar Uint16Array = require( '@stdlib/array-uint16' );\nvar Int32Array = require( '@stdlib/array-int32' );\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float32Array = require( '@stdlib/array-float32' );\nvar Float64Array = require( '@stdlib/array-float64' );\n\n\n// MAIN //\n\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray\n];\n\n\n// EXPORTS //\n\nmodule.exports = CTORS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a typed array.\n*\n* @module @stdlib/assert-is-typed-array\n*\n* @example\n* var Int8Array = require( '@stdlib/array-int8' );\n* var isTypedArray = require( '@stdlib/assert-is-typed-array' );\n*\n* var bool = isTypedArray( new Int8Array( 10 ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ctorName = require( '@stdlib/utils-constructor-name' );\nvar fcnName = require( '@stdlib/utils-function-name' );\nvar getPrototypeOf = require( '@stdlib/utils-get-prototype-of' );\nvar hasFloat64ArraySupport = require( '@stdlib/assert-has-float64array-support' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar CTORS = require( './ctors.js' );\nvar NAMES = require( './names.json' );\n\n\n// VARIABLES //\n\n// Abstract `TypedArray` class:\nvar TypedArray = ( hasFloat64ArraySupport() ) ? getPrototypeOf( Float64Array ) : Dummy; // eslint-disable-line max-len\n\n// Ensure abstract typed array class has expected name:\nTypedArray = ( fcnName( TypedArray ) === 'TypedArray' ) ? TypedArray : Dummy;\n\n\n// FUNCTIONS //\n\n/**\n* Dummy constructor.\n*\n* @private\n*/\nfunction Dummy() {} // eslint-disable-line no-empty-function\n\n\n// MAIN //\n\n/**\n* Tests if a value is a typed array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a typed array\n*\n* @example\n* var Int8Array = require( '@stdlib/array-int8' );\n*\n* var bool = isTypedArray( new Int8Array( 10 ) );\n* // returns true\n*/\nfunction isTypedArray( value ) {\n\tvar v;\n\tvar i;\n\n\tif ( typeof value !== 'object' || value === null ) {\n\t\treturn false;\n\t}\n\t// Check for the abstract class...\n\tif ( value instanceof TypedArray ) {\n\t\treturn true;\n\t}\n\t// Check for typed array objects from the same realm (same Node.js `vm` or same `Window` object)...\n\tfor ( i = 0; i < CTORS.length; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\t// Walk the prototype tree until we find an object having a desired class...\n\twhile ( value ) {\n\t\tv = ctorName( value );\n\t\tfor ( i = 0; i < NAMES.length; i++ ) {\n\t\t\tif ( NAMES[ i ] === v ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tvalue = getPrototypeOf( value );\n\t}\n\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isTypedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Uint16Array.\n*\n* @module @stdlib/assert-is-uint16array\n*\n* @example\n* var isUint16Array = require( '@stdlib/assert-is-uint16array' );\n*\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* bool = isUint16Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isUint16Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Uint32Array.\n*\n* @module @stdlib/assert-is-uint32array\n*\n* @example\n* var isUint32Array = require( '@stdlib/assert-is-uint32array' );\n*\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* bool = isUint32Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isUint32Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Uint8Array.\n*\n* @module @stdlib/assert-is-uint8array\n*\n* @example\n* var isUint8Array = require( '@stdlib/assert-is-uint8array' );\n*\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* bool = isUint8Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isUint8Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Uint8ClampedArray.\n*\n* @module @stdlib/assert-is-uint8clampedarray\n*\n* @example\n* var isUint8ClampedArray = require( '@stdlib/assert-is-uint8clampedarray' );\n*\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* bool = isUint8ClampedArray( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isUint8ClampedArray = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a function which tests if every element in an array passes a test condition.\n*\n* @module @stdlib/assert-tools-array-function\n*\n* @example\n* var isOdd = require( '@stdlib/assert-is-odd' );\n* var arrayfcn = require( '@stdlib/assert-tools-array-function' );\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArray = require( '@stdlib/assert-is-array' );\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* var isOdd = require( '@stdlib/assert-is-odd' );\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @private\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Object} x - input array object\n* @param {Collection} x.data - input array data\n* @param {Array} x.accessors - array element accessors\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Object} y - output array object\n* @param {Collection} y.data - output array data\n* @param {Array} y.accessors - array element accessors\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Object} output array object\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' );\n*\n* function setter( data, idx, value ) {\n* data.set( value, idx );\n* }\n*\n* function getter( data, idx ) {\n* return data.get( idx );\n* }\n*\n* var x = {\n* 'data': new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* var y = {\n* 'data': new Complex64Array( [ 5.0, 6.0, 7.0, 8.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* gcopy( x.data.length, x, 1, 0, y, 1, 0 );\n*\n* var view = reinterpret64( y.data, 0 );\n* // view => [ 1.0, 2.0, 3.0, 4.0 ]\n*/\nfunction gcopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar set;\n\tvar get;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\t// Cache references to array data:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache a reference to the element accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tset( ybuf, iy, get( xbuf, ix ) );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcopy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to copy values from `x` into `y`.\n*\n* @module @stdlib/blas-base-gcopy\n*\n* @example\n* var gcopy = require( '@stdlib/blas-base-gcopy' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var gcopy = require( '@stdlib/blas-base-gcopy' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar arraylike2object = require( '@stdlib/array-base-arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Collection} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Collection} output array\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gcopy( N, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\tif ( strideX < 0 ) {\n\t\t\tix = (1-N) * strideX;\n\t\t} else {\n\t\t\tix = 0;\n\t\t}\n\t\tif ( strideY < 0 ) {\n\t\t\tiy = (1-N) * strideY;\n\t\t} else {\n\t\t\tiy = 0;\n\t\t}\n\t\taccessors( N, ox, strideX, ix, oy, strideY, iy );\n\t\treturn oy.data;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] = x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] = x[ i ];\n\t\t\ty[ i+1 ] = x[ i+1 ];\n\t\t\ty[ i+2 ] = x[ i+2 ];\n\t\t\ty[ i+3 ] = x[ i+3 ];\n\t\t\ty[ i+4 ] = x[ i+4 ];\n\t\t\ty[ i+5 ] = x[ i+5 ];\n\t\t\ty[ i+6 ] = x[ i+6 ];\n\t\t\ty[ i+7 ] = x[ i+7 ];\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcopy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar arraylike2object = require( '@stdlib/array-base-arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Collection} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Collection} output array\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gcopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\taccessors( N, ox, strideX, offsetX, oy, strideY, offsetY );\n\t\treturn oy.data;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] = x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] = x[ ix ];\n\t\t\ty[ iy+1 ] = x[ ix+1 ];\n\t\t\ty[ iy+2 ] = x[ ix+2 ];\n\t\t\ty[ iy+3 ] = x[ ix+3 ];\n\t\t\ty[ iy+4 ] = x[ ix+4 ];\n\t\t\ty[ iy+5 ] = x[ ix+5 ];\n\t\t\ty[ iy+6 ] = x[ ix+6 ];\n\t\t\ty[ iy+7 ] = x[ ix+7 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcopy;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Boolean constructor.\n*\n* @module @stdlib/boolean-ctor\n*\n* @example\n* var Boolean = require( '@stdlib/boolean-ctor' );\n*\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var Boolean = require( '@stdlib/boolean-ctor' );\n*\n* var b = new Boolean( false );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* 64-bit complex number constructor.\n*\n* @module @stdlib/complex-float32\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;\nvar defineProperty = require( '@stdlib/utils-define-property' );\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar float64ToFloat32 = require( '@stdlib/number-float64-base-to-float32' );\nvar format = require( '@stdlib/string-format' );\nvar toStr = require( './tostring.js' );\nvar toJSON = require( './tojson.js' );\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nmodule.exports = Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nmodule.exports = toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* 128-bit complex number constructor.\n*\n* @module @stdlib/complex-float64\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n*\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;\nvar defineProperty = require( '@stdlib/utils-define-property' );\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar format = require( '@stdlib/string-format' );\nvar toStr = require( './tostring.js' );\nvar toJSON = require( './tojson.js' );\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nmodule.exports = Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nmodule.exports = toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the imaginary component of a double-precision complex floating-point number.\n*\n* @module @stdlib/complex-imag\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n* var imag = require( '@stdlib/complex-imag' );\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nmodule.exports = imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the imaginary component of a single-precision complex floating-point number.\n*\n* @module @stdlib/complex-imagf\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nmodule.exports = imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the real component of a double-precision complex floating-point number.\n*\n* @module @stdlib/complex-real\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n* var real = require( '@stdlib/complex-real' );\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* var Complex128 = require( '@stdlib/complex-float64' );\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nmodule.exports = real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the real component of a single-precision complex floating-point number.\n*\n* @module @stdlib/complex-realf\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n* var realf = require( '@stdlib/complex-realf' );\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nmodule.exports = realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* var MAX_ARRAY_LENGTH = require( '@stdlib/constants-array-max-array-length' );\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* var MAX_TYPED_ARRAY_LENGTH = require( '@stdlib/constants-array-max-typed-array-length' );\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nmodule.exports = MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* The bias of a double-precision floating-point number's exponent.\n*\n* @module @stdlib/constants-float64-exponent-bias\n* @type {integer32}\n*\n* @example\n* var FLOAT64_EXPONENT_BIAS = require( '@stdlib/constants-float64-exponent-bias' );\n* // returns 1023\n*/\n\n\n// MAIN //\n\n/**\n* Bias of a double-precision floating-point number's exponent.\n*\n* ## Notes\n*\n* The bias can be computed via\n*\n* ```tex\n* \\mathrm{bias} = 2^{k-1} - 1\n* ```\n*\n* where \\\\(k\\\\) is the number of bits in the exponent; here, \\\\(k = 11\\\\).\n*\n* @constant\n* @type {integer32}\n* @default 1023\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_EXPONENT_BIAS = 1023|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_EXPONENT_BIAS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* High word mask for excluding the sign bit of a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-high-word-abs-mask\n* @type {uinteger32}\n*\n* @example\n* var FLOAT64_HIGH_WORD_ABS_MASK = require( '@stdlib/constants-float64-high-word-abs-mask' );\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* High word mask for excluding the sign bit of a double-precision floating-point number.\n*\n* ## Notes\n*\n* The high word mask for excluding the sign bit of a double-precision floating-point number is an unsigned 32-bit integer with the value \\\\( 2147483647 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 11111111111 11111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 0x7fffffff\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_HIGH_WORD_ABS_MASK = 0x7fffffff>>>0; // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_HIGH_WORD_ABS_MASK;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* High word mask for the exponent of a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-high-word-exponent-mask\n* @type {uinteger32}\n*\n* @example\n* var FLOAT64_HIGH_WORD_EXPONENT_MASK = require( '@stdlib/constants-float64-high-word-exponent-mask' );\n* // returns 2146435072\n*/\n\n\n// MAIN //\n\n/**\n* High word mask for the exponent of a double-precision floating-point number.\n*\n* ## Notes\n*\n* The high word mask for the exponent of a double-precision floating-point number is an unsigned 32-bit integer with the value \\\\( 2146435072 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 0x7ff00000\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_HIGH_WORD_EXPONENT_MASK = 0x7ff00000;\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_HIGH_WORD_EXPONENT_MASK;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* High word mask for the sign bit of a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-high-word-sign-mask\n* @type {uinteger32}\n*\n* @example\n* var FLOAT64_HIGH_WORD_SIGN_MASK = require( '@stdlib/constants-float64-high-word-sign-mask' );\n* // returns 2147483648\n*/\n\n\n// MAIN //\n\n/**\n* High word mask for the sign bit of a double-precision floating-point number.\n*\n* ## Notes\n*\n* The high word mask for the sign bit of a double-precision floating-point number is an unsigned 32-bit integer with the value \\\\( 2147483648 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 1 00000000000 00000000000000000000\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 0x80000000\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_HIGH_WORD_SIGN_MASK = 0x80000000>>>0; // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_HIGH_WORD_SIGN_MASK;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* High word mask for the significand of a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-high-word-significand-mask\n* @type {uinteger32}\n*\n* @example\n* var FLOAT64_HIGH_WORD_SIGNIFICAND_MASK = require( '@stdlib/constants-float64-high-word-significand-mask' );\n* // returns 1048575\n*/\n\n\n// MAIN //\n\n/**\n* High word mask for the significand of a double-precision floating-point number.\n*\n* ## Notes\n*\n* The high word mask for the significand of a double-precision floating-point number is an unsigned 32-bit integer with the value \\\\( 1048575 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 00000000000 11111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 0x000fffff\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_HIGH_WORD_SIGNIFICAND_MASK = 0x000fffff;\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_HIGH_WORD_SIGNIFICAND_MASK;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Natural logarithm of `2`.\n*\n* @module @stdlib/constants-float64-ln-two\n* @type {number}\n*\n* @example\n* var LN2 = require( '@stdlib/constants-float64-ln-two' );\n* // returns 0.6931471805599453\n*/\n\n\n// MAIN //\n\n/**\n* Natural logarithm of `2`.\n*\n* ```tex\n* \\ln 2\n* ```\n*\n* @constant\n* @type {number}\n* @default 0.6931471805599453\n*/\nvar LN2 = 6.93147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687542001481021e-01; // eslint-disable-line max-len\n\n\n// EXPORTS //\n\nmodule.exports = LN2;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* The maximum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-max-base2-exponent-subnormal\n* @type {integer32}\n*\n* @example\n* var FLOAT64_MAX_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants-float64-max-base2-exponent-subnormal' );\n* // returns -1023\n*/\n\n\n// MAIN //\n\n/**\n* The maximum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* ```text\n* 00000000000 => 0 - BIAS = -1023\n* ```\n*\n* where `BIAS = 1023`.\n*\n* @constant\n* @type {integer32}\n* @default -1023\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MAX_BASE2_EXPONENT_SUBNORMAL = -1023|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_MAX_BASE2_EXPONENT_SUBNORMAL;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* The maximum biased base 2 exponent for a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-max-base2-exponent\n* @type {integer32}\n*\n* @example\n* var FLOAT64_MAX_BASE2_EXPONENT = require( '@stdlib/constants-float64-max-base2-exponent' );\n* // returns 1023\n*/\n\n\n// MAIN //\n\n/**\n* The maximum biased base 2 exponent for a double-precision floating-point number.\n*\n* ```text\n* 11111111110 => 2046 - BIAS = 1023\n* ```\n*\n* where `BIAS = 1023`.\n*\n* @constant\n* @type {integer32}\n* @default 1023\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MAX_BASE2_EXPONENT = 1023|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_MAX_BASE2_EXPONENT;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum safe double-precision floating-point integer.\n*\n* @module @stdlib/constants-float64-max-safe-integer\n* @type {number}\n*\n* @example\n* var FLOAT64_MAX_SAFE_INTEGER = require( '@stdlib/constants-float64-max-safe-integer' );\n* // returns 9007199254740991\n*/\n\n\n// MAIN //\n\n/**\n* Maximum safe double-precision floating-point integer.\n*\n* ## Notes\n*\n* The integer has the value\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n* @see [Safe Integers]{@link http://www.2ality.com/2013/10/safe-integers.html}\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MAX_SAFE_INTEGER = 9007199254740991;\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_MAX_SAFE_INTEGER;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* The minimum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-min-base2-exponent-subnormal\n* @type {integer32}\n*\n* @example\n* var FLOAT64_MIN_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants-float64-min-base2-exponent-subnormal' );\n* // returns -1074\n*/\n\n\n// MAIN //\n\n/**\n* The minimum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* ```text\n* -(BIAS+(52-1)) = -(1023+51) = -1074\n* ```\n*\n* where `BIAS = 1023` and `52` is the number of digits in the significand.\n*\n* @constant\n* @type {integer32}\n* @default -1074\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MIN_BASE2_EXPONENT_SUBNORMAL = -1074|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_MIN_BASE2_EXPONENT_SUBNORMAL;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* var FLOAT64_NINF = require( '@stdlib/constants-float64-ninf' );\n* // returns -Infinity\n*/\n\n// MODULES //\n\nvar Number = require( '@stdlib/number-ctor' );\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* var FLOAT64_PINF = require( '@stdlib/constants-float64-pinf' );\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Smallest positive double-precision floating-point normal number.\n*\n* @module @stdlib/constants-float64-smallest-normal\n* @type {number}\n*\n* @example\n* var FLOAT64_SMALLEST_NORMAL = require( '@stdlib/constants-float64-smallest-normal' );\n* // returns 2.2250738585072014e-308\n*/\n\n\n// MAIN //\n\n/**\n* The smallest positive double-precision floating-point normal number.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* \\frac{1}{2^{1023-1}}\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 00000000001 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default 2.2250738585072014e-308\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_SMALLEST_NORMAL = 2.2250738585072014e-308;\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_SMALLEST_NORMAL;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* var INT16_MAX = require( '@stdlib/constants-int16-max' );\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* var INT16_MIN = require( '@stdlib/constants-int16-min' );\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* var INT32_MAX = require( '@stdlib/constants-int32-max' );\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* var INT32_MIN = require( '@stdlib/constants-int32-min' );\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* var INT8_MAX = require( '@stdlib/constants-int8-max' );\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* var INT8_MIN = require( '@stdlib/constants-int8-min' );\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* var UINT16_MAX = require( '@stdlib/constants-uint16-max' );\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* var UINT32_MAX = require( '@stdlib/constants-uint32-max' );\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nmodule.exports = UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* var UINT8_MAX = require( '@stdlib/constants-uint8-max' );\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a finite numeric value is an even number.\n*\n* @module @stdlib/math-base-assert-is-even\n*\n* @example\n* var isEven = require( '@stdlib/math-base-assert-is-even' );\n*\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* bool = isEven( -2.0 );\n* // returns true\n*\n* bool = isEven( 0.0 );\n* // returns true\n*\n* bool = isEven( NaN );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/math-base-assert-is-integer' );\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a double-precision floating-point numeric value is infinite.\n*\n* @module @stdlib/math-base-assert-is-infinite\n*\n* @example\n* var isInfinite = require( '@stdlib/math-base-assert-is-infinite' );\n*\n* var bool = isInfinite( Infinity );\n* // returns true\n*\n* bool = isInfinite( -Infinity );\n* // returns true\n*\n* bool = isInfinite( 5.0 );\n* // returns false\n*\n* bool = isInfinite( NaN );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar PINF = require( '@stdlib/constants-float64-pinf' );\nvar NINF = require( '@stdlib/constants-float64-ninf' );\n\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is infinite.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is infinite\n*\n* @example\n* var bool = isInfinite( Infinity );\n* // returns true\n*\n* @example\n* var bool = isInfinite( -Infinity );\n* // returns true\n*\n* @example\n* var bool = isInfinite( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isInfinite( NaN );\n* // returns false\n*/\nfunction isInfinite( x ) {\n\treturn (x === PINF || x === NINF);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isInfinite;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a finite double-precision floating-point number is an integer.\n*\n* @module @stdlib/math-base-assert-is-integer\n*\n* @example\n* var isInteger = require( '@stdlib/math-base-assert-is-integer' );\n*\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* bool = isInteger( 3.14 );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar floor = require( '@stdlib/math-base-special-floor' );\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a double-precision floating-point numeric value is `NaN`.\n*\n* @module @stdlib/math-base-assert-is-nan\n*\n* @example\n* var isnan = require( '@stdlib/math-base-assert-is-nan' );\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( 7.0 );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is `NaN`.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 7.0 );\n* // returns false\n*/\nfunction isnan( x ) {\n\treturn ( x !== x );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a finite numeric value is an odd number.\n*\n* @module @stdlib/math-base-assert-is-odd\n*\n* @example\n* var isOdd = require( '@stdlib/math-base-assert-is-odd' );\n*\n* var bool = isOdd( 5.0 );\n* // returns true\n*\n* bool = isOdd( -2.0 );\n* // returns false\n*\n* bool = isOdd( 0.0 );\n* // returns false\n*\n* bool = isOdd( NaN );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isEven = require( '@stdlib/math-base-assert-is-even' );\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an odd number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an odd number\n*\n* @example\n* var bool = isOdd( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isOdd( -2.0 );\n* // returns false\n*\n* @example\n* var bool = isOdd( 0.0 );\n* // returns false\n*\n* @example\n* var bool = isOdd( NaN );\n* // returns false\n*/\nfunction isOdd( x ) {\n\t// Check sign to prevent overflow...\n\tif ( x > 0.0 ) {\n\t\treturn isEven( x-1.0 );\n\t}\n\treturn isEven( x+1.0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isOdd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a double-precision floating-point numeric value is positive zero.\n*\n* @module @stdlib/math-base-assert-is-positive-zero\n*\n* @example\n* var isPositiveZero = require( '@stdlib/math-base-assert-is-positive-zero' );\n*\n* var bool = isPositiveZero( 0.0 );\n* // returns true\n*\n* bool = isPositiveZero( -0.0 );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar PINF = require( '@stdlib/constants-float64-pinf' );\n\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is positive zero.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is positive zero\n*\n* @example\n* var bool = isPositiveZero( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isPositiveZero( -0.0 );\n* // returns false\n*/\nfunction isPositiveZero( x ) {\n\treturn (x === 0.0 && 1.0/x === PINF);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isPositiveZero;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Perform C-like multiplication of two unsigned 32-bit integers.\n*\n* @module @stdlib/math-base-ops-umul\n*\n* @example\n* var umul = require( '@stdlib/math-base-ops-umul' );\n*\n* var v = umul( 10>>>0, 4>>>0 );\n* // returns 40\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\n// Define a mask for the least significant 16 bits (low word): 65535 => 0x0000ffff => 00000000000000001111111111111111\nvar LOW_WORD_MASK = 0x0000ffff>>>0; // asm type annotation\n\n\n// MAIN //\n\n/**\n* Performs C-like multiplication of two unsigned 32-bit integers.\n*\n* ## Method\n*\n* - To emulate C-like multiplication without the aid of 64-bit integers, we recognize that a 32-bit integer can be split into two 16-bit words\n*\n* ```tex\n* a = w_h*2^{16} + w_l\n* ```\n*\n* where \\\\( w_h \\\\) is the most significant 16 bits and \\\\( w_l \\\\) is the least significant 16 bits. For example, consider the maximum unsigned 32-bit integer \\\\( 2^{32}-1 \\\\)\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* The 16-bit high word is then\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* and the 16-bit low word\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* If we cast the high word to 32-bit precision and multiply by \\\\( 2^{16} \\\\) (equivalent to a 16-bit left shift), then the bit sequence is\n*\n* ```binarystring\n* 11111111111111110000000000000000\n* ```\n*\n* Similarly, upon casting the low word to 32-bit precision, the bit sequence is\n*\n* ```binarystring\n* 00000000000000001111111111111111\n* ```\n*\n* From the rules of binary addition, we recognize that adding the two 32-bit values for the high and low words will return our original value \\\\( 2^{32}-1 \\\\).\n*\n* - Accordingly, the multiplication of two 32-bit integers can be expressed\n*\n* ```tex\n* \\begin{align*}\n* a \\cdot b &= ( a_h \\cdot 2^{16} + a_l) \\cdot ( b_h \\cdot 2^{16} + b_l) \\\\\n* &= a_l \\cdot b_l + a_h \\cdot b_l \\cdot 2^{16} + a_l \\cdot b_h \\cdot 2^{16} + (a_h \\cdot b_h) \\cdot 2^{32} \\\\\n* &= a_l \\cdot b_l + (a_h \\cdot b_l + a_l \\cdot b_h) \\cdot 2^{16} + (a_h \\cdot b_h) \\cdot 2^{32}\n* \\end{align*}\n* ```\n*\n* - We note that multiplying (dividing) an integer by \\\\( 2^n \\\\) is equivalent to performing a left (right) shift of \\\\( n \\\\) bits.\n*\n* - Further, as we want to return an integer of the same precision, for a 32-bit integer, the return value will be modulo \\\\( 2^{32} \\\\). Stated another way, we only care about the low word of a 64-bit result.\n*\n* - Accordingly, the last term, being evenly divisible by \\\\( 2^{32} \\\\), drops from the equation leaving the remaining two terms as the remainder.\n*\n* ```tex\n* a \\cdot b = a_l \\cdot b_l + (a_h \\cdot b_l + a_l \\cdot b_h) << 16\n* ```\n*\n* - Lastly, the second term in the above equation contributes to the middle bits and may cause the product to \"overflow\". However, we can disregard (`>>>0`) overflow bits due to modulo arithmetic, as discussed earlier with regard to the term involving the partial product of high words.\n*\n* @param {uinteger32} a - integer\n* @param {uinteger32} b - integer\n* @returns {uinteger32} product\n*\n* @example\n* var v = umul( 10>>>0, 4>>>0 );\n* // returns 40\n*/\nfunction umul( a, b ) {\n\tvar lbits;\n\tvar mbits;\n\tvar ha;\n\tvar hb;\n\tvar la;\n\tvar lb;\n\n\ta >>>= 0; // asm type annotation\n\tb >>>= 0; // asm type annotation\n\n\t// Isolate the most significant 16-bits:\n\tha = ( a>>>16 )>>>0; // asm type annotation\n\thb = ( b>>>16 )>>>0; // asm type annotation\n\n\t// Isolate the least significant 16-bits:\n\tla = ( a&LOW_WORD_MASK )>>>0; // asm type annotation\n\tlb = ( b&LOW_WORD_MASK )>>>0; // asm type annotation\n\n\t// Compute partial sums:\n\tlbits = ( la*lb )>>>0; // asm type annotation; no integer overflow possible\n\tmbits = ( ((ha*lb) + (la*hb))<<16 )>>>0; // asm type annotation; possible integer overflow\n\n\t// The final `>>>0` converts the intermediate sum to an unsigned integer (possible integer overflow during sum):\n\treturn ( lbits + mbits )>>>0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = umul;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute an absolute value of a double-precision floating-point number.\n*\n* @module @stdlib/math-base-special-abs\n*\n* @example\n* var abs = require( '@stdlib/math-base-special-abs' );\n*\n* var v = abs( -1.0 );\n* // returns 1.0\n*\n* v = abs( 2.0 );\n* // returns 2.0\n*\n* v = abs( 0.0 );\n* // returns 0.0\n*\n* v = abs( -0.0 );\n* // returns 0.0\n*\n* v = abs( NaN );\n* // returns NaN\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the absolute value of a double-precision floating-point number `x`.\n*\n* @param {number} x - input value\n* @returns {number} absolute value\n*\n* @example\n* var v = abs( -1.0 );\n* // returns 1.0\n*\n* @example\n* var v = abs( 2.0 );\n* // returns 2.0\n*\n* @example\n* var v = abs( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( -0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( NaN );\n* // returns NaN\n*/\nfunction abs( x ) {\n\treturn Math.abs( x ); // eslint-disable-line stdlib/no-builtin-math\n}\n\n\n// EXPORTS //\n\nmodule.exports = abs;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Round a double-precision floating-point number toward positive infinity.\n*\n* @module @stdlib/math-base-special-ceil\n*\n* @example\n* var ceil = require( '@stdlib/math-base-special-ceil' );\n*\n* var v = ceil( -4.2 );\n* // returns -4.0\n*\n* v = ceil( 9.99999 );\n* // returns 10.0\n*\n* v = ceil( 0.0 );\n* // returns 0.0\n*\n* v = ceil( NaN );\n* // returns NaN\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward positive infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = ceil( -4.2 );\n* // returns -4.0\n*\n* @example\n* var v = ceil( 9.99999 );\n* // returns 10.0\n*\n* @example\n* var v = ceil( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = ceil( NaN );\n* // returns NaN\n*/\nvar ceil = Math.ceil; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nmodule.exports = ceil;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a double-precision floating-point number with the magnitude of `x` and the sign of `y`.\n*\n* @module @stdlib/math-base-special-copysign\n*\n* @example\n* var copysign = require( '@stdlib/math-base-special-copysign' );\n*\n* var z = copysign( -3.14, 10.0 );\n* // returns 3.14\n*\n* z = copysign( 3.14, -1.0 );\n* // returns -3.14\n*\n* z = copysign( 1.0, -0.0 );\n* // returns -1.0\n*\n* z = copysign( -3.14, -0.0 );\n* // returns -3.14\n*\n* z = copysign( -0.0, 1.0 );\n* // returns 0.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar SIGN_MASK = require( '@stdlib/constants-float64-high-word-sign-mask' );\nvar ABS_MASK = require( '@stdlib/constants-float64-high-word-abs-mask' );\nvar toWords = require( '@stdlib/number-float64-base-to-words' );\nvar getHighWord = require( '@stdlib/number-float64-base-get-high-word' );\nvar fromWords = require( '@stdlib/number-float64-base-from-words' );\n\n\n// VARIABLES //\n\n// High/low words workspace:\nvar WORDS = [ 0, 0 ];\n\n\n// MAIN //\n\n/**\n* Returns a double-precision floating-point number with the magnitude of `x` and the sign of `y`.\n*\n* @param {number} x - number from which to derive a magnitude\n* @param {number} y - number from which to derive a sign\n* @returns {number} a double-precision floating-point number\n*\n* @example\n* var z = copysign( -3.14, 10.0 );\n* // returns 3.14\n*\n* @example\n* var z = copysign( 3.14, -1.0 );\n* // returns -3.14\n*\n* @example\n* var z = copysign( 1.0, -0.0 );\n* // returns -1.0\n*\n* @example\n* var z = copysign( -3.14, -0.0 );\n* // returns -3.14\n*\n* @example\n* var z = copysign( -0.0, 1.0 );\n* // returns 0.0\n*/\nfunction copysign( x, y ) {\n\tvar hx;\n\tvar hy;\n\n\t// Split `x` into higher and lower order words:\n\ttoWords.assign( x, WORDS, 1, 0 );\n\thx = WORDS[ 0 ];\n\n\t// Turn off the sign bit of `x`:\n\thx &= ABS_MASK;\n\n\t// Extract the higher order word from `y`:\n\thy = getHighWord( y );\n\n\t// Leave only the sign bit of `y` turned on:\n\thy &= SIGN_MASK;\n\n\t// Copy the sign bit of `y` to `x`:\n\thx |= hy;\n\n\t// Return a new value having the same magnitude as `x`, but with the sign of `y`:\n\treturn fromWords( hx, WORDS[ 1 ] );\n}\n\n\n// EXPORTS //\n\nmodule.exports = copysign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*\n*\n* ## Notice\n*\n* The following copyrights, licenses, and long comment were part of the original implementation available as part of [Go]{@link https://github.com/golang/go/blob/cb07765045aed5104a3df31507564ac99e6ddce8/src/math/exp.go}, which in turn was based on an implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/e_exp.c}. The implementation follows the original, but has been modified for JavaScript.\n*\n* ```text\n* Copyright (c) 2009 The Go Authors. All rights reserved.\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are\n* met:\n*\n* * Redistributions of source code must retain the above copyright\n* notice, this list of conditions and the following disclaimer.\n* * Redistributions in binary form must reproduce the above\n* copyright notice, this list of conditions and the following disclaimer\n* in the documentation and/or other materials provided with the\n* distribution.\n* * Neither the name of Google Inc. nor the names of its\n* contributors may be used to endorse or promote products derived from\n* this software without specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n* \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n* ```\n*\n* ```text\n* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n*\n* Developed at SunPro, a Sun Microsystems, Inc. business.\n* Permission to use, copy, modify, and distribute this\n* software is freely granted, provided that this notice\n* is preserved.\n* ```\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ldexp = require( '@stdlib/math-base-special-ldexp' );\nvar polyvalP = require( './polyval_p.js' );\n\n\n// MAIN //\n\n/**\n* Computes \\\\(e^{r} 2^k\\\\) where \\\\(r = \\mathrm{hi} - \\mathrm{lo}\\\\) and \\\\(|r| \\leq \\ln(2)/2\\\\).\n*\n* @private\n* @param {number} hi - upper bound\n* @param {number} lo - lower bound\n* @param {integer} k - power of 2\n* @returns {number} function value\n*/\nfunction expmulti( hi, lo, k ) {\n\tvar r;\n\tvar t;\n\tvar c;\n\tvar y;\n\n\tr = hi - lo;\n\tt = r * r;\n\tc = r - ( t*polyvalP( t ) );\n\ty = 1.0 - ( lo - ( (r*c)/(2.0-c) ) - hi);\n\n\treturn ldexp( y, k );\n}\n\n\n// EXPORTS //\n\nmodule.exports = expmulti;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Evaluate the natural exponential function.\n*\n* @module @stdlib/math-base-special-exp\n*\n* @example\n* var exp = require( '@stdlib/math-base-special-exp' );\n*\n* var v = exp( 4.0 );\n* // returns ~54.5982\n*\n* v = exp( -9.0 );\n* // returns ~1.234e-4\n*\n* v = exp( 0.0 );\n* // returns 1.0\n*\n* v = exp( NaN );\n* // returns NaN\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*\n*\n* ## Notice\n*\n* The following copyrights, licenses, and long comment were part of the original implementation available as part of [Go]{@link https://github.com/golang/go/blob/cb07765045aed5104a3df31507564ac99e6ddce8/src/math/exp.go}, which in turn was based on an implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/e_exp.c}. The implementation follows the original, but has been modified for JavaScript.\n*\n* ```text\n* Copyright (c) 2009 The Go Authors. All rights reserved.\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are\n* met:\n*\n* * Redistributions of source code must retain the above copyright\n* notice, this list of conditions and the following disclaimer.\n* * Redistributions in binary form must reproduce the above\n* copyright notice, this list of conditions and the following disclaimer\n* in the documentation and/or other materials provided with the\n* distribution.\n* * Neither the name of Google Inc. nor the names of its\n* contributors may be used to endorse or promote products derived from\n* this software without specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n* \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n* ```\n*\n* ```text\n* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n*\n* Developed at SunPro, a Sun Microsystems, Inc. business.\n* Permission to use, copy, modify, and distribute this\n* software is freely granted, provided that this notice\n* is preserved.\n* ```\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar trunc = require( '@stdlib/math-base-special-trunc' );\nvar NINF = require( '@stdlib/constants-float64-ninf' );\nvar PINF = require( '@stdlib/constants-float64-pinf' );\nvar expmulti = require( './expmulti.js' );\n\n\n// VARIABLES //\n\nvar LN2_HI = 6.93147180369123816490e-01;\nvar LN2_LO = 1.90821492927058770002e-10;\nvar LOG2_E = 1.44269504088896338700e+00;\nvar OVERFLOW = 7.09782712893383973096e+02;\nvar UNDERFLOW = -7.45133219101941108420e+02;\nvar NEARZERO = 1.0 / (1 << 28); // 2^-28\nvar NEG_NEARZERO = -NEARZERO;\n\n\n// MAIN //\n\n/**\n* Evaluates the natural exponential function.\n*\n* ## Method\n*\n* 1. We reduce \\\\( x \\\\) to an \\\\( r \\\\) so that \\\\( |r| \\leq 0.5 \\cdot \\ln(2) \\approx 0.34658 \\\\). Given \\\\( x \\\\), we find an \\\\( r \\\\) and integer \\\\( k \\\\) such that\n*\n* ```tex\n* \\begin{align*}\n* x &= k \\cdot \\ln(2) + r \\\\\n* |r| &\\leq 0.5 \\cdot \\ln(2)\n* \\end{align*}\n* ```\n*\n* \n*\n* \\\\( r \\\\) can be represented as \\\\( r = \\mathrm{hi} - \\mathrm{lo} \\\\) for better accuracy.\n*\n* \n*\n* 2. We approximate of \\\\( e^{r} \\\\) by a special rational function on the interval \\\\(\\[0,0.34658]\\\\):\n*\n* ```tex\n* \\begin{align*}\n* R\\left(r^2\\right) &= r \\cdot \\frac{ e^{r}+1 }{ e^{r}-1 } \\\\\n* &= 2 + \\frac{r^2}{6} - \\frac{r^4}{360} + \\ldots\n* \\end{align*}\n* ```\n*\n* We use a special Remes algorithm on \\\\(\\[0,0.34658]\\\\) to generate a polynomial of degree \\\\(5\\\\) to approximate \\\\(R\\\\). The maximum error of this polynomial approximation is bounded by \\\\(2^{-59}\\\\). In other words,\n*\n* ```tex\n* R(z) \\sim 2 + P_1 z + P_2 z^2 + P_3 z^3 + P_4 z^4 + P_5 z^5\n* ```\n*\n* where \\\\( z = r^2 \\\\) and\n*\n* ```tex\n* \\left| 2 + P_1 z + \\ldots + P_5 z^5 - R(z) \\right| \\leq 2^{-59}\n* ```\n*\n* \n*\n* The values of \\\\( P_1 \\\\) to \\\\( P_5 \\\\) are listed in the source code.\n*\n* \n*\n* The computation of \\\\( e^{r} \\\\) thus becomes\n*\n* ```tex\n* \\begin{align*}\n* e^{r} &= 1 + \\frac{2r}{R-r} \\\\\n* &= 1 + r + \\frac{r \\cdot R_1(r)}{2 - R_1(r)}\\ \\text{for better accuracy}\n* \\end{align*}\n* ```\n*\n* where\n*\n* ```tex\n* R_1(r) = r - P_1\\ r^2 + P_2\\ r^4 + \\ldots + P_5\\ r^{10}\n* ```\n*\n* 3. We scale back to obtain \\\\( e^{x} \\\\). From step 1, we have\n*\n* ```tex\n* e^{x} = 2^k e^{r}\n* ```\n*\n* ## Special Cases\n*\n* ```tex\n* \\begin{align*}\n* e^\\infty &= \\infty \\\\\n* e^{-\\infty} &= 0 \\\\\n* e^{\\mathrm{NaN}} &= \\mathrm{NaN} \\\\\n* e^0 &= 1\\ \\mathrm{is\\ exact\\ for\\ finite\\ argument\\ only}\n* \\end{align*}\n* ```\n*\n* ## Notes\n*\n* - According to an error analysis, the error is always less than \\\\(1\\\\) ulp (unit in the last place).\n*\n* - For an IEEE double,\n*\n* - if \\\\(x > 7.09782712893383973096\\mbox{e+}02\\\\), then \\\\(e^{x}\\\\) overflows\n* - if \\\\(x < -7.45133219101941108420\\mbox{e+}02\\\\), then \\\\(e^{x}\\\\) underflows\n*\n* - The hexadecimal values included in the source code are the intended ones for the used constants. Decimal values may be used, provided that the compiler will convert from decimal to binary accurately enough to produce the intended hexadecimal values.\n*\n* @param {number} x - input value\n* @returns {number} function value\n*\n* @example\n* var v = exp( 4.0 );\n* // returns ~54.5982\n*\n* @example\n* var v = exp( -9.0 );\n* // returns ~1.234e-4\n*\n* @example\n* var v = exp( 0.0 );\n* // returns 1.0\n*\n* @example\n* var v = exp( NaN );\n* // returns NaN\n*/\nfunction exp( x ) {\n\tvar hi;\n\tvar lo;\n\tvar k;\n\n\tif ( isnan( x ) || x === PINF ) {\n\t\treturn x;\n\t}\n\tif ( x === NINF ) {\n\t\treturn 0.0;\n\t}\n\tif ( x > OVERFLOW ) {\n\t\treturn PINF;\n\t}\n\tif ( x < UNDERFLOW ) {\n\t\treturn 0.0;\n\t}\n\tif (\n\t\tx > NEG_NEARZERO &&\n\t\tx < NEARZERO\n\t) {\n\t\treturn 1.0 + x;\n\t}\n\t// Reduce and compute `r = hi - lo` for extra precision...\n\tif ( x < 0.0 ) {\n\t\tk = trunc( (LOG2_E*x) - 0.5 );\n\t} else {\n\t\tk = trunc( (LOG2_E*x) + 0.5 );\n\t}\n\thi = x - (k*LN2_HI);\n\tlo = k * LN2_LO;\n\n\treturn expmulti( hi, lo, k );\n}\n\n\n// EXPORTS //\n\nmodule.exports = exp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* This is a generated file. Do not edit directly. */\n'use strict';\n\n// MAIN //\n\n/**\n* Evaluates a polynomial.\n*\n* ## Notes\n*\n* - The implementation uses [Horner's rule][horners-method] for efficient computation.\n*\n* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method\n*\n* @private\n* @param {number} x - value at which to evaluate the polynomial\n* @returns {number} evaluated polynomial\n*/\nfunction evalpoly( x ) {\n\tif ( x === 0.0 ) {\n\t\treturn 0.16666666666666602;\n\t}\n\treturn 0.16666666666666602 + (x * (-0.0027777777777015593 + (x * (0.00006613756321437934 + (x * (-0.0000016533902205465252 + (x * 4.1381367970572385e-8))))))); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = evalpoly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Round a double-precision floating-point number toward negative infinity.\n*\n* @module @stdlib/math-base-special-floor\n*\n* @example\n* var floor = require( '@stdlib/math-base-special-floor' );\n*\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* v = floor( 9.99999 );\n* // returns 9.0\n*\n* v = floor( 0.0 );\n* // returns 0.0\n*\n* v = floor( NaN );\n* // returns NaN\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nmodule.exports = floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Multiply a double-precision floating-point number by an integer power of two.\n*\n* @module @stdlib/math-base-special-ldexp\n*\n* @example\n* var ldexp = require( '@stdlib/math-base-special-ldexp' );\n*\n* var x = ldexp( 0.5, 3 ); // => 0.5 * 2^3 = 0.5 * 8\n* // returns 4.0\n*\n* x = ldexp( 4.0, -2 ); // => 4 * 2^(-2) = 4 * (1/4)\n* // returns 1.0\n*\n* x = ldexp( 0.0, 20 );\n* // returns 0.0\n*\n* x = ldexp( -0.0, 39 );\n* // returns -0.0\n*\n* x = ldexp( NaN, -101 );\n* // returns NaN\n*\n* x = ldexp( Infinity, 11 );\n* // returns Infinity\n*\n* x = ldexp( -Infinity, -118 );\n* // returns -Infinity\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// NOTES //\n\n/*\n* => ldexp: load exponent (see [The Open Group]{@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/ldexp.html} and [cppreference]{@link http://en.cppreference.com/w/c/numeric/math/ldexp}).\n*/\n\n\n// MODULES //\n\nvar PINF = require( '@stdlib/constants-float64-pinf' );\nvar NINF = require( '@stdlib/constants-float64-ninf' );\nvar BIAS = require( '@stdlib/constants-float64-exponent-bias' );\nvar MAX_EXPONENT = require( '@stdlib/constants-float64-max-base2-exponent' );\nvar MAX_SUBNORMAL_EXPONENT = require( '@stdlib/constants-float64-max-base2-exponent-subnormal' );\nvar MIN_SUBNORMAL_EXPONENT = require( '@stdlib/constants-float64-min-base2-exponent-subnormal' );\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar isInfinite = require( '@stdlib/math-base-assert-is-infinite' );\nvar copysign = require( '@stdlib/math-base-special-copysign' );\nvar normalize = require( '@stdlib/number-float64-base-normalize' ).assign;\nvar floatExp = require( '@stdlib/number-float64-base-exponent' );\nvar toWords = require( '@stdlib/number-float64-base-to-words' );\nvar fromWords = require( '@stdlib/number-float64-base-from-words' );\n\n\n// VARIABLES //\n\n// 1/(1<<52) = 1/(2**52) = 1/4503599627370496\nvar TWO52_INV = 2.220446049250313e-16;\n\n// Exponent all 0s: 1 00000000000 11111111111111111111 => 2148532223\nvar CLEAR_EXP_MASK = 0x800fffff>>>0; // asm type annotation\n\n// Normalization workspace:\nvar FRAC = [ 0.0, 0.0 ];\n\n// High/low words workspace:\nvar WORDS = [ 0, 0 ];\n\n\n// MAIN //\n\n/**\n* Multiplies a double-precision floating-point number by an integer power of two.\n*\n* @param {number} frac - fraction\n* @param {integer} exp - exponent\n* @returns {number} double-precision floating-point number\n*\n* @example\n* var x = ldexp( 0.5, 3 ); // => 0.5 * 2^3 = 0.5 * 8\n* // returns 4.0\n*\n* @example\n* var x = ldexp( 4.0, -2 ); // => 4 * 2^(-2) = 4 * (1/4)\n* // returns 1.0\n*\n* @example\n* var x = ldexp( 0.0, 20 );\n* // returns 0.0\n*\n* @example\n* var x = ldexp( -0.0, 39 );\n* // returns -0.0\n*\n* @example\n* var x = ldexp( NaN, -101 );\n* // returns NaN\n*\n* @example\n* var x = ldexp( Infinity, 11 );\n* // returns Infinity\n*\n* @example\n* var x = ldexp( -Infinity, -118 );\n* // returns -Infinity\n*/\nfunction ldexp( frac, exp ) {\n\tvar high;\n\tvar m;\n\tif (\n\t\texp === 0 ||\n\t\tfrac === 0.0 || // handles +-0\n\t\tisnan( frac ) ||\n\t\tisInfinite( frac )\n\t) {\n\t\treturn frac;\n\t}\n\t// Normalize the input fraction:\n\tnormalize( frac, FRAC, 1, 0 );\n\tfrac = FRAC[ 0 ];\n\texp += FRAC[ 1 ];\n\n\t// Extract the exponent from `frac` and add it to `exp`:\n\texp += floatExp( frac );\n\n\t// Check for underflow/overflow...\n\tif ( exp < MIN_SUBNORMAL_EXPONENT ) {\n\t\treturn copysign( 0.0, frac );\n\t}\n\tif ( exp > MAX_EXPONENT ) {\n\t\tif ( frac < 0.0 ) {\n\t\t\treturn NINF;\n\t\t}\n\t\treturn PINF;\n\t}\n\t// Check for a subnormal and scale accordingly to retain precision...\n\tif ( exp <= MAX_SUBNORMAL_EXPONENT ) {\n\t\texp += 52;\n\t\tm = TWO52_INV;\n\t} else {\n\t\tm = 1.0;\n\t}\n\t// Split the fraction into higher and lower order words:\n\ttoWords.assign( frac, WORDS, 1, 0 );\n\thigh = WORDS[ 0 ];\n\n\t// Clear the exponent bits within the higher order word:\n\thigh &= CLEAR_EXP_MASK;\n\n\t// Set the exponent bits to the new exponent:\n\thigh |= ((exp+BIAS) << 20);\n\n\t// Create a new floating-point number:\n\treturn m * fromWords( high, WORDS[ 1 ] );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ldexp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Evaluate the natural logarithm of a double-precision floating-point number.\n*\n* @module @stdlib/math-base-special-ln\n*\n* @example\n* var ln = require( '@stdlib/math-base-special-ln' );\n*\n* var v = ln( 4.0 );\n* // returns ~1.386\n*\n* v = ln( 0.0 );\n* // returns -Infinity\n*\n* v = ln( Infinity );\n* // returns Infinity\n*\n* v = ln( NaN );\n* // returns NaN\n*\n* v = ln( -4.0 );\n* // returns NaN\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*\n*\n* ## Notice\n*\n* The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/e_log.c}. The implementation follows the original, but has been modified for JavaScript.\n*\n* ```text\n* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n*\n* Developed at SunPro, a Sun Microsystems, Inc. business.\n* Permission to use, copy, modify, and distribute this\n* software is freely granted, provided that this notice\n* is preserved.\n* ```\n*/\n\n'use strict';\n\n// MODULES //\n\nvar getHighWord = require( '@stdlib/number-float64-base-get-high-word' );\nvar setHighWord = require( '@stdlib/number-float64-base-set-high-word' );\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar BIAS = require( '@stdlib/constants-float64-exponent-bias' );\nvar NINF = require( '@stdlib/constants-float64-ninf' );\nvar polyvalP = require( './polyval_p.js' );\nvar polyvalQ = require( './polyval_q.js' );\n\n\n// VARIABLES //\n\nvar LN2_HI = 6.93147180369123816490e-01; // 3FE62E42 FEE00000\nvar LN2_LO = 1.90821492927058770002e-10; // 3DEA39EF 35793C76\nvar TWO54 = 1.80143985094819840000e+16; // 0x43500000, 0x00000000\nvar ONE_THIRD = 0.33333333333333333;\n\n// 0x000fffff = 1048575 => 0 00000000000 11111111111111111111\nvar HIGH_SIGNIFICAND_MASK = 0x000fffff|0; // asm type annotation\n\n// 0x7ff00000 = 2146435072 => 0 11111111111 00000000000000000000 => biased exponent: 2047 = 1023+1023 => 2^1023\nvar HIGH_MAX_NORMAL_EXP = 0x7ff00000|0; // asm type annotation\n\n// 0x00100000 = 1048576 => 0 00000000001 00000000000000000000 => biased exponent: 1 = -1022+1023 => 2^-1022\nvar HIGH_MIN_NORMAL_EXP = 0x00100000|0; // asm type annotation\n\n// 0x3ff00000 = 1072693248 => 0 01111111111 00000000000000000000 => biased exponent: 1023 = 0+1023 => 2^0 = 1\nvar HIGH_BIASED_EXP_0 = 0x3ff00000|0; // asm type annotation\n\n\n// MAIN //\n\n/**\n* Evaluates the natural logarithm of a double-precision floating-point number.\n*\n* @param {NonNegativeNumber} x - input value\n* @returns {number} function value\n*\n* @example\n* var v = ln( 4.0 );\n* // returns ~1.386\n*\n* @example\n* var v = ln( 0.0 );\n* // returns -Infinity\n*\n* @example\n* var v = ln( Infinity );\n* // returns Infinity\n*\n* @example\n* var v = ln( NaN );\n* // returns NaN\n*\n* @example\n* var v = ln( -4.0 );\n* // returns NaN\n*/\nfunction ln( x ) {\n\tvar hfsq;\n\tvar hx;\n\tvar t2;\n\tvar t1;\n\tvar k;\n\tvar R;\n\tvar f;\n\tvar i;\n\tvar j;\n\tvar s;\n\tvar w;\n\tvar z;\n\n\tif ( x === 0.0 ) {\n\t\treturn NINF;\n\t}\n\tif ( isnan( x ) || x < 0.0 ) {\n\t\treturn NaN;\n\t}\n\thx = getHighWord( x );\n\tk = 0|0; // asm type annotation\n\tif ( hx < HIGH_MIN_NORMAL_EXP ) {\n\t\t// Case: 0 < x < 2**-1022\n\t\tk -= 54|0; // asm type annotation\n\n\t\t// Subnormal number, scale up `x`:\n\t\tx *= TWO54;\n\t\thx = getHighWord( x );\n\t}\n\tif ( hx >= HIGH_MAX_NORMAL_EXP ) {\n\t\treturn x + x;\n\t}\n\tk += ( ( hx>>20 ) - BIAS )|0; // asm type annotation\n\thx &= HIGH_SIGNIFICAND_MASK;\n\ti = ( (hx+0x95f64) & 0x100000 )|0; // asm type annotation\n\n\t// Normalize `x` or `x/2`...\n\tx = setHighWord( x, hx|(i^HIGH_BIASED_EXP_0) );\n\tk += ( i>>20 )|0; // asm type annotation\n\tf = x - 1.0;\n\tif ( (HIGH_SIGNIFICAND_MASK&(2+hx)) < 3 ) {\n\t\t// Case: -2**-20 <= f < 2**-20\n\t\tif ( f === 0.0 ) {\n\t\t\tif ( k === 0 ) {\n\t\t\t\treturn 0.0;\n\t\t\t}\n\t\t\treturn (k * LN2_HI) + (k * LN2_LO);\n\t\t}\n\t\tR = f * f * ( 0.5 - (ONE_THIRD*f) );\n\t\tif ( k === 0 ) {\n\t\t\treturn f - R;\n\t\t}\n\t\treturn (k * LN2_HI) - ( (R-(k*LN2_LO)) - f );\n\t}\n\ts = f / (2.0 + f);\n\tz = s * s;\n\ti = ( hx - 0x6147a )|0; // asm type annotation\n\tw = z * z;\n\tj = ( 0x6b851 - hx )|0; // asm type annotation\n\tt1 = w * polyvalP( w );\n\tt2 = z * polyvalQ( w );\n\ti |= j;\n\tR = t2 + t1;\n\tif ( i > 0 ) {\n\t\thfsq = 0.5 * f * f;\n\t\tif ( k === 0 ) {\n\t\t\treturn f - ( hfsq - (s * (hfsq+R)) );\n\t\t}\n\t\treturn (k * LN2_HI) - ( hfsq - ((s*(hfsq+R))+(k*LN2_LO)) - f );\n\t}\n\tif ( k === 0 ) {\n\t\treturn f - (s*(f-R));\n\t}\n\treturn (k * LN2_HI) - ( ( (s*(f-R)) - (k*LN2_LO) ) - f );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ln;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* This is a generated file. Do not edit directly. */\n'use strict';\n\n// MAIN //\n\n/**\n* Evaluates a polynomial.\n*\n* ## Notes\n*\n* - The implementation uses [Horner's rule][horners-method] for efficient computation.\n*\n* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method\n*\n* @private\n* @param {number} x - value at which to evaluate the polynomial\n* @returns {number} evaluated polynomial\n*/\nfunction evalpoly( x ) {\n\tif ( x === 0.0 ) {\n\t\treturn 0.3999999999940942;\n\t}\n\treturn 0.3999999999940942 + (x * (0.22222198432149784 + (x * 0.15313837699209373))); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = evalpoly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* This is a generated file. Do not edit directly. */\n'use strict';\n\n// MAIN //\n\n/**\n* Evaluates a polynomial.\n*\n* ## Notes\n*\n* - The implementation uses [Horner's rule][horners-method] for efficient computation.\n*\n* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method\n*\n* @private\n* @param {number} x - value at which to evaluate the polynomial\n* @returns {number} evaluated polynomial\n*/\nfunction evalpoly( x ) {\n\tif ( x === 0.0 ) {\n\t\treturn 0.6666666666666735;\n\t}\n\treturn 0.6666666666666735 + (x * (0.2857142874366239 + (x * (0.1818357216161805 + (x * 0.14798198605116586))))); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = evalpoly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the maximum value.\n*\n* @module @stdlib/math-base-special-max\n*\n* @example\n* var max = require( '@stdlib/math-base-special-max' );\n*\n* var v = max( 3.14, 4.2 );\n* // returns 4.2\n*\n* v = max( 3.14, NaN );\n* // returns NaN\n*\n* v = max( +0.0, -0.0 );\n* // returns +0.0\n*/\n\n// MODULES //\n\nvar max = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = max;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPositiveZero = require( '@stdlib/math-base-assert-is-positive-zero' );\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar PINF = require( '@stdlib/constants-float64-pinf' );\n\n\n// MAIN //\n\n/**\n* Returns the maximum value.\n*\n* @param {number} x - first number\n* @param {number} y - second number\n* @returns {number} maximum value\n*\n* @example\n* var v = max( 3.14, 4.2 );\n* // returns 4.2\n*\n* @example\n* var v = max( 3.14, NaN );\n* // returns NaN\n*\n* @example\n* var v = max( +0.0, -0.0 );\n* // returns +0.0\n*/\nfunction max( x, y ) {\n\tif ( isnan( x ) || isnan( y ) ) {\n\t\treturn NaN;\n\t}\n\tif ( x === PINF || y === PINF ) {\n\t\treturn PINF;\n\t}\n\tif ( x === y && x === 0.0 ) {\n\t\tif ( isPositiveZero( x ) ) {\n\t\t\treturn x;\n\t\t}\n\t\treturn y;\n\t}\n\tif ( x > y ) {\n\t\treturn x;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = max;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Evaluate the exponential function.\n*\n* @module @stdlib/math-base-special-pow\n*\n* @example\n* var pow = require( '@stdlib/math-base-special-pow' );\n*\n* var v = pow( 2.0, 3.0 );\n* // returns 8.0\n*\n* v = pow( 4.0, 0.5 );\n* // returns 2.0\n*\n* v = pow( 100.0, 0.0 );\n* // returns 1.0\n*\n* v = pow( 3.141592653589793, 5.0 );\n* // returns ~306.0197\n*\n* v = pow( 3.141592653589793, -0.2 );\n* // returns ~0.7954\n*\n* v = pow( NaN, 3.0 );\n* // returns NaN\n*\n* v = pow( 5.0, NaN );\n* // returns NaN\n*\n* v = pow( NaN, NaN );\n* // returns NaN\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*\n*\n* ## Notice\n*\n* The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/s_pow.c}. The implementation follows the original, but has been modified for JavaScript.\n*\n* ```text\n* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n*\n* Developed at SunPro, a Sun Microsystems, Inc. business.\n* Permission to use, copy, modify, and distribute this\n* software is freely granted, provided that this notice\n* is preserved.\n* ```\n*/\n\n'use strict';\n\n// MODULES //\n\nvar getHighWord = require( '@stdlib/number-float64-base-get-high-word' );\nvar setLowWord = require( '@stdlib/number-float64-base-set-low-word' );\nvar setHighWord = require( '@stdlib/number-float64-base-set-high-word' );\nvar BIAS = require( '@stdlib/constants-float64-exponent-bias' );\nvar polyvalL = require( './polyval_l.js' );\n\n\n// VARIABLES //\n\n// 0x000fffff = 1048575 => 0 00000000000 11111111111111111111\nvar HIGH_SIGNIFICAND_MASK = 0x000fffff|0; // asm type annotation\n\n// 0x00100000 = 1048576 => 0 00000000001 00000000000000000000 => biased exponent: 1 = -1022+1023 => 2^-1022\nvar HIGH_MIN_NORMAL_EXP = 0x00100000|0; // asm type annotation\n\n// 0x3ff00000 = 1072693248 => 0 01111111111 00000000000000000000 => biased exponent: 1023 = 0+1023 => 2^0 = 1\nvar HIGH_BIASED_EXP_0 = 0x3ff00000|0; // asm type annotation\n\n// 0x20000000 = 536870912 => 0 01000000000 00000000000000000000 => biased exponent: 512 = -511+1023\nvar HIGH_BIASED_EXP_NEG_512 = 0x20000000|0; // asm type annotation\n\n// 0x00080000 = 524288 => 0 00000000000 10000000000000000000\nvar HIGH_SIGNIFICAND_HALF = 0x00080000|0; // asm type annotation\n\n// TODO: consider making an external constant\nvar HIGH_NUM_SIGNIFICAND_BITS = 20|0; // asm type annotation\n\nvar TWO53 = 9007199254740992.0;\t// 0x43400000, 0x00000000\n\n// 2/(3*LN2)\nvar CP = 9.61796693925975554329e-01; // 0x3FEEC709, 0xDC3A03FD\n\n// (float)CP\nvar CP_HI = 9.61796700954437255859e-01; // 0x3FEEC709, 0xE0000000\n\n// Low: CP_HI\nvar CP_LO = -7.02846165095275826516e-09; // 0xBE3E2FE0, 0x145B01F5\n\nvar BP = [\n\t1.0,\n\t1.5\n];\nvar DP_HI = [\n\t0.0,\n\t5.84962487220764160156e-01 // 0x3FE2B803, 0x40000000\n];\nvar DP_LO = [\n\t0.0,\n\t1.35003920212974897128e-08 // 0x3E4CFDEB, 0x43CFD006\n];\n\n\n// MAIN //\n\n/**\n* Computes \\\\(\\operatorname{log2}(ax)\\\\).\n*\n* @private\n* @param {Array} out - output array\n* @param {number} ax - absolute value of `x`\n* @param {number} ahx - high word of `ax`\n* @returns {Array} output array containing a tuple comprised of high and low parts\n*\n* @example\n* var t = log2ax( [ 0.0, 0.0 ], 9.0, 1075970048 ); // => [ t1, t2 ]\n* // returns [ 3.169923782348633, 0.0000012190936795504075 ]\n*/\nfunction log2ax( out, ax, ahx ) {\n\tvar tmp;\n\tvar ss; // `hs + ls`\n\tvar s2; // `ss` squared\n\tvar hs;\n\tvar ls;\n\tvar ht;\n\tvar lt;\n\tvar bp; // `BP` constant\n\tvar dp; // `DP` constant\n\tvar hp;\n\tvar lp;\n\tvar hz;\n\tvar lz;\n\tvar t1;\n\tvar t2;\n\tvar t;\n\tvar r;\n\tvar u;\n\tvar v;\n\tvar n;\n\tvar j;\n\tvar k;\n\n\tn = 0|0; // asm type annotation\n\n\t// Check if `x` is subnormal...\n\tif ( ahx < HIGH_MIN_NORMAL_EXP ) {\n\t\tax *= TWO53;\n\t\tn -= 53|0; // asm type annotation\n\t\tahx = getHighWord( ax );\n\t}\n\t// Extract the unbiased exponent of `x`:\n\tn += ((ahx >> HIGH_NUM_SIGNIFICAND_BITS) - BIAS)|0; // asm type annotation\n\n\t// Isolate the significand bits of `x`:\n\tj = (ahx & HIGH_SIGNIFICAND_MASK)|0; // asm type annotation\n\n\t// Normalize `ahx` by setting the (biased) exponent to `1023`:\n\tahx = (j | HIGH_BIASED_EXP_0)|0; // asm type annotation\n\n\t// Determine the interval of `|x|` by comparing significand bits...\n\n\t// |x| < sqrt(3/2)\n\tif ( j <= 0x3988E ) { // 0 00000000000 00111001100010001110\n\t\tk = 0;\n\t}\n\t// |x| < sqrt(3)\n\telse if ( j < 0xBB67A ) { // 0 00000000000 10111011011001111010\n\t\tk = 1;\n\t}\n\t// |x| >= sqrt(3)\n\telse {\n\t\tk = 0;\n\t\tn += 1|0; // asm type annotation\n\t\tahx -= HIGH_MIN_NORMAL_EXP;\n\t}\n\t// Load the normalized high word into `|x|`:\n\tax = setHighWord( ax, ahx );\n\n\t// Compute `ss = hs + ls = (x-1)/(x+1)` or `(x-1.5)/(x+1.5)`:\n\tbp = BP[ k ]; // BP[0] = 1.0, BP[1] = 1.5\n\tu = ax - bp; // (x-1) || (x-1.5)\n\tv = 1.0 / (ax + bp); // 1/(x+1) || 1/(x+1.5)\n\tss = u * v;\n\ths = setLowWord( ss, 0 ); // set all low word (less significant significand) bits to 0s\n\n\t// Compute `ht = ax + bp` (via manipulation, i.e., bit flipping, of the high word):\n\ttmp = ((ahx>>1) | HIGH_BIASED_EXP_NEG_512) + HIGH_SIGNIFICAND_HALF;\n\ttmp += (k << 18); // `(k<<18)` can be considered the word equivalent of `1.0` or `1.5`\n\tht = setHighWord( 0.0, tmp );\n\tlt = ax - (ht - bp);\n\tls = v * ( ( u - (hs*ht) ) - ( hs*lt ) );\n\n\t// Compute `log(ax)`...\n\n\ts2 = ss * ss;\n\tr = s2 * s2 * polyvalL( s2 );\n\tr += ls * (hs + ss);\n\ts2 = hs * hs;\n\tht = 3.0 + s2 + r;\n\tht = setLowWord( ht, 0 );\n\tlt = r - ((ht-3.0) - s2);\n\n\t// u+v = ss*(1+...):\n\tu = hs * ht;\n\tv = ( ls*ht ) + ( lt*ss );\n\n\t// 2/(3LN2) * (ss+...):\n\thp = u + v;\n\thp = setLowWord( hp, 0 );\n\tlp = v - (hp - u);\n\thz = CP_HI * hp; // CP_HI+CP_LO = 2/(3*LN2)\n\tlz = ( CP_LO*hp ) + ( lp*CP ) + DP_LO[ k ];\n\n\t// log2(ax) = (ss+...)*2/(3*LN2) = n + dp + hz + lz\n\tdp = DP_HI[ k ];\n\tt = n;\n\tt1 = ((hz+lz) + dp) + t; // log2(ax)\n\tt1 = setLowWord( t1, 0 );\n\tt2 = lz - (((t1-t) - dp) - hz);\n\n\tout[ 0 ] = t1;\n\tout[ 1 ] = t2;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = log2ax;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*\n*\n* ## Notice\n*\n* The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/s_pow.c}. The implementation follows the original, but has been modified for JavaScript.\n*\n* ```text\n* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n*\n* Developed at SunPro, a Sun Microsystems, Inc. business.\n* Permission to use, copy, modify, and distribute this\n* software is freely granted, provided that this notice\n* is preserved.\n* ```\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setLowWord = require( '@stdlib/number-float64-base-set-low-word' );\nvar polyvalW = require( './polyval_w.js' );\n\n\n// VARIABLES //\n\n// 1/LN2\nvar INV_LN2 = 1.44269504088896338700e+00; // 0x3FF71547, 0x652B82FE\n\n// High (24 bits): 1/LN2\nvar INV_LN2_HI = 1.44269502162933349609e+00; // 0x3FF71547, 0x60000000\n\n// Low: 1/LN2\nvar INV_LN2_LO = 1.92596299112661746887e-08; // 0x3E54AE0B, 0xF85DDF44\n\n\n// MAIN //\n\n/**\n* Computes \\\\(\\operatorname{log}(x)\\\\) assuming \\\\(|1-x|\\\\) is small and using the approximation \\\\(x - x^2/2 + x^3/3 - x^4/4\\\\).\n*\n* @private\n* @param {Array} out - output array\n* @param {number} ax - absolute value of `x`\n* @returns {Array} output array containing a tuple comprised of high and low parts\n*\n* @example\n* var t = logx( [ 0.0, 0.0 ], 9.0 ); // => [ t1, t2 ]\n* // returns [ -1265.7236328125, -0.0008163940840404393 ]\n*/\nfunction logx( out, ax ) {\n\tvar t2;\n\tvar t1;\n\tvar t;\n\tvar w;\n\tvar u;\n\tvar v;\n\n\tt = ax - 1.0; // `t` has `20` trailing zeros\n\tw = t * t * polyvalW( t );\n\tu = INV_LN2_HI * t; // `INV_LN2_HI` has `21` significant bits\n\tv = ( t*INV_LN2_LO ) - ( w*INV_LN2 );\n\tt1 = u + v;\n\tt1 = setLowWord( t1, 0 );\n\tt2 = v - (t1 - u);\n\n\tout[ 0 ] = t1;\n\tout[ 1 ] = t2;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = logx;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*\n*\n* ## Notice\n*\n* The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/s_pow.c}. The implementation follows the original, but has been modified for JavaScript.\n*\n* ```text\n* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n*\n* Developed at SunPro, a Sun Microsystems, Inc. business.\n* Permission to use, copy, modify, and distribute this\n* software is freely granted, provided that this notice\n* is preserved.\n* ```\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar isOdd = require( '@stdlib/math-base-assert-is-odd' );\nvar isInfinite = require( '@stdlib/math-base-assert-is-infinite' );\nvar isInteger = require( '@stdlib/math-base-assert-is-integer' );\nvar sqrt = require( '@stdlib/math-base-special-sqrt' );\nvar abs = require( '@stdlib/math-base-special-abs' );\nvar toWords = require( '@stdlib/number-float64-base-to-words' );\nvar setLowWord = require( '@stdlib/number-float64-base-set-low-word' );\nvar uint32ToInt32 = require( '@stdlib/number-uint32-base-to-int32' );\nvar NINF = require( '@stdlib/constants-float64-ninf' );\nvar PINF = require( '@stdlib/constants-float64-pinf' );\nvar ABS_MASK = require( '@stdlib/constants-float64-high-word-abs-mask' );\nvar xIsZero = require( './x_is_zero.js' );\nvar yIsHuge = require( './y_is_huge.js' );\nvar yIsInfinite = require( './y_is_infinite.js' );\nvar log2ax = require( './log2ax.js' );\nvar logx = require( './logx.js' );\nvar pow2 = require( './pow2.js' );\n\n\n// VARIABLES //\n\n// 0x3fefffff = 1072693247 => 0 01111111110 11111111111111111111 => biased exponent: 1022 = -1+1023 => 2^-1\nvar HIGH_MAX_NEAR_UNITY = 0x3fefffff|0; // asm type annotation\n\n// 0x41e00000 = 1105199104 => 0 10000011110 00000000000000000000 => biased exponent: 1054 = 31+1023 => 2^31\nvar HIGH_BIASED_EXP_31 = 0x41e00000|0; // asm type annotation\n\n// 0x43f00000 = 1139802112 => 0 10000111111 00000000000000000000 => biased exponent: 1087 = 64+1023 => 2^64\nvar HIGH_BIASED_EXP_64 = 0x43f00000|0; // asm type annotation\n\n// 0x40900000 = 1083179008 => 0 10000001001 00000000000000000000 => biased exponent: 1033 = 10+1023 => 2^10 = 1024\nvar HIGH_BIASED_EXP_10 = 0x40900000|0; // asm type annotation\n\n// 0x3ff00000 = 1072693248 => 0 01111111111 00000000000000000000 => biased exponent: 1023 = 0+1023 => 2^0 = 1\nvar HIGH_BIASED_EXP_0 = 0x3ff00000|0; // asm type annotation\n\n// 0x4090cc00 = 1083231232 => 0 10000001001 00001100110000000000\nvar HIGH_1075 = 0x4090cc00|0; // asm type annotation\n\n// 0xc090cc00 = 3230714880 => 1 10000001001 00001100110000000000\nvar HIGH_NEG_1075 = 0xc090cc00>>>0; // asm type annotation\n\nvar HIGH_NUM_NONSIGN_BITS = 31|0; // asm type annotation\n\nvar HUGE = 1.0e300;\nvar TINY = 1.0e-300;\n\n// -(1024-log2(ovfl+.5ulp))\nvar OVT = 8.0085662595372944372e-17;\n\n// High/low words workspace:\nvar WORDS = [ 0|0, 0|0 ];\n\n// Log workspace:\nvar LOG_WORKSPACE = [ 0.0, 0.0 ];\n\n\n// MAIN //\n\n/**\n* Evaluates the exponential function.\n*\n* ## Method\n*\n* 1. Let \\\\(x = 2^n (1+f)\\\\).\n*\n* 2. Compute \\\\(\\operatorname{log2}(x)\\\\) as\n*\n* ```tex\n* \\operatorname{log2}(x) = w_1 + w_2\n* ```\n*\n* where \\\\(w_1\\\\) has \\\\(53 - 24 = 29\\\\) bit trailing zeros.\n*\n* 3. Compute\n*\n* ```tex\n* y \\cdot \\operatorname{log2}(x) = n + y^\\prime\n* ```\n*\n* by simulating multi-precision arithmetic, where \\\\(|y^\\prime| \\leq 0.5\\\\).\n*\n* 4. Return\n*\n* ```tex\n* x^y = 2^n e^{y^\\prime \\cdot \\mathrm{log2}}\n* ```\n*\n* ## Special Cases\n*\n* ```tex\n* \\begin{align*}\n* x^{\\mathrm{NaN}} &= \\mathrm{NaN} & \\\\\n* (\\mathrm{NaN})^y &= \\mathrm{NaN} & \\\\\n* 1^y &= 1 & \\\\\n* x^0 &= 1 & \\\\\n* x^1 &= x & \\\\\n* (\\pm 0)^\\infty &= +0 & \\\\\n* (\\pm 0)^{-\\infty} &= +\\infty & \\\\\n* (+0)^y &= +0 & \\mathrm{if}\\ y > 0 \\\\\n* (+0)^y &= +\\infty & \\mathrm{if}\\ y < 0 \\\\\n* (-0)^y &= -\\infty & \\mathrm{if}\\ y\\ \\mathrm{is\\ an\\ odd\\ integer\\ and}\\ y < 0 \\\\\n* (-0)^y &= +\\infty & \\mathrm{if}\\ y\\ \\mathrm{is\\ not\\ an\\ odd\\ integer\\ and}\\ y < 0 \\\\\n* (-0)^y &= -0 & \\mathrm{if}\\ y\\ \\mathrm{is\\ an\\ odd\\ integer\\ and}\\ y > 0 \\\\\n* (-0)^y &= +0 & \\mathrm{if}\\ y\\ \\mathrm{is\\ not\\ an\\ odd\\ integer\\ and}\\ y > 0 \\\\\n* (-1)^{\\pm\\infty} &= \\mathrm{NaN} & \\\\\n* x^{\\infty} &= +\\infty & |x| > 1 \\\\\n* x^{\\infty} &= +0 & |x| < 1 \\\\\n* x^{-\\infty} &= +0 & |x| > 1 \\\\\n* x^{-\\infty} &= +\\infty & |x| < 1 \\\\\n* (-\\infty)^y &= (-0)^y & \\\\\n* \\infty^y &= +0 & y < 0 \\\\\n* \\infty^y &= +\\infty & y > 0 \\\\\n* x^y &= \\mathrm{NaN} & \\mathrm{if}\\ y\\ \\mathrm{is\\ not\\ a\\ finite\\ integer\\ and}\\ x < 0\n* \\end{align*}\n* ```\n*\n* ## Notes\n*\n* - \\\\(\\operatorname{pow}(x,y)\\\\) returns \\\\(x^y\\\\) nearly rounded. In particular, \\\\(\\operatorname{pow}(<\\mathrm{integer}>,<\\mathrm{integer}>)\\\\) **always** returns the correct integer, provided the value is representable.\n* - The hexadecimal values shown in the source code are the intended values for used constants. Decimal values may be used, provided the compiler will accurately convert decimal to binary in order to produce the hexadecimal values.\n*\n* @param {number} x - base\n* @param {number} y - exponent\n* @returns {number} function value\n*\n* @example\n* var v = pow( 2.0, 3.0 );\n* // returns 8.0\n*\n* @example\n* var v = pow( 4.0, 0.5 );\n* // returns 2.0\n*\n* @example\n* var v = pow( 100.0, 0.0 );\n* // returns 1.0\n*\n* @example\n* var v = pow( 3.141592653589793, 5.0 );\n* // returns ~306.0197\n*\n* @example\n* var v = pow( 3.141592653589793, -0.2 );\n* // returns ~0.7954\n*\n* @example\n* var v = pow( NaN, 3.0 );\n* // returns NaN\n*\n* @example\n* var v = pow( 5.0, NaN );\n* // returns NaN\n*\n* @example\n* var v = pow( NaN, NaN );\n* // returns NaN\n*/\nfunction pow( x, y ) {\n\tvar ahx; // absolute value high word `x`\n\tvar ahy; // absolute value high word `y`\n\tvar ax; // absolute value `x`\n\tvar hx; // high word `x`\n\tvar lx; // low word `x`\n\tvar hy; // high word `y`\n\tvar ly; // low word `y`\n\tvar sx; // sign `x`\n\tvar sy; // sign `y`\n\tvar y1;\n\tvar hp;\n\tvar lp;\n\tvar t;\n\tvar z; // y prime\n\tvar j;\n\tvar i;\n\tif ( isnan( x ) || isnan( y ) ) {\n\t\treturn NaN;\n\t}\n\t// Split `y` into high and low words:\n\ttoWords.assign( y, WORDS, 1, 0 );\n\thy = WORDS[ 0 ];\n\tly = WORDS[ 1 ];\n\n\t// Special cases `y`...\n\tif ( ly === 0 ) {\n\t\tif ( y === 0.0 ) {\n\t\t\treturn 1.0;\n\t\t}\n\t\tif ( y === 1.0 ) {\n\t\t\treturn x;\n\t\t}\n\t\tif ( y === -1.0 ) {\n\t\t\treturn 1.0 / x;\n\t\t}\n\t\tif ( y === 0.5 ) {\n\t\t\treturn sqrt( x );\n\t\t}\n\t\tif ( y === -0.5 ) {\n\t\t\treturn 1.0 / sqrt( x );\n\t\t}\n\t\tif ( y === 2.0 ) {\n\t\t\treturn x * x;\n\t\t}\n\t\tif ( y === 3.0 ) {\n\t\t\treturn x * x * x;\n\t\t}\n\t\tif ( y === 4.0 ) {\n\t\t\tx *= x;\n\t\t\treturn x * x;\n\t\t}\n\t\tif ( isInfinite( y ) ) {\n\t\t\treturn yIsInfinite( x, y );\n\t\t}\n\t}\n\t// Split `x` into high and low words:\n\ttoWords.assign( x, WORDS, 1, 0 );\n\thx = WORDS[ 0 ];\n\tlx = WORDS[ 1 ];\n\n\t// Special cases `x`...\n\tif ( lx === 0 ) {\n\t\tif ( hx === 0 ) {\n\t\t\treturn xIsZero( x, y );\n\t\t}\n\t\tif ( x === 1.0 ) {\n\t\t\treturn 1.0;\n\t\t}\n\t\tif (\n\t\t\tx === -1.0 &&\n\t\t\tisOdd( y )\n\t\t) {\n\t\t\treturn -1.0;\n\t\t}\n\t\tif ( isInfinite( x ) ) {\n\t\t\tif ( x === NINF ) {\n\t\t\t\t// `pow( 1/x, -y )`\n\t\t\t\treturn pow( -0.0, -y );\n\t\t\t}\n\t\t\tif ( y < 0.0 ) {\n\t\t\t\treturn 0.0;\n\t\t\t}\n\t\t\treturn PINF;\n\t\t}\n\t}\n\tif (\n\t\tx < 0.0 &&\n\t\tisInteger( y ) === false\n\t) {\n\t\t// Signal NaN...\n\t\treturn (x-x)/(x-x);\n\t}\n\tax = abs( x );\n\n\t// Remove the sign bits (i.e., get absolute values):\n\tahx = (hx & ABS_MASK)|0; // asm type annotation\n\tahy = (hy & ABS_MASK)|0; // asm type annotation\n\n\t// Extract the sign bits:\n\tsx = (hx >>> HIGH_NUM_NONSIGN_BITS)|0; // asm type annotation\n\tsy = (hy >>> HIGH_NUM_NONSIGN_BITS)|0; // asm type annotation\n\n\t// Determine the sign of the result...\n\tif ( sx && isOdd( y ) ) {\n\t\tsx = -1.0;\n\t} else {\n\t\tsx = 1.0;\n\t}\n\t// Case 1: `|y|` is huge...\n\n\t// |y| > 2^31\n\tif ( ahy > HIGH_BIASED_EXP_31 ) {\n\t\t// `|y| > 2^64`, then must over- or underflow...\n\t\tif ( ahy > HIGH_BIASED_EXP_64 ) {\n\t\t\treturn yIsHuge( x, y );\n\t\t}\n\t\t// Over- or underflow if `x` is not close to unity...\n\n\t\tif ( ahx < HIGH_MAX_NEAR_UNITY ) {\n\t\t\t// y < 0\n\t\t\tif ( sy === 1 ) {\n\t\t\t\t// Signal overflow...\n\t\t\t\treturn sx * HUGE * HUGE;\n\t\t\t}\n\t\t\t// Signal underflow...\n\t\t\treturn sx * TINY * TINY;\n\t\t}\n\t\tif ( ahx > HIGH_BIASED_EXP_0 ) {\n\t\t\t// y > 0\n\t\t\tif ( sy === 0 ) {\n\t\t\t\t// Signal overflow...\n\t\t\t\treturn sx * HUGE * HUGE;\n\t\t\t}\n\t\t\t// Signal underflow...\n\t\t\treturn sx * TINY * TINY;\n\t\t}\n\t\t// At this point, `|1-x|` is tiny (`<= 2^-20`). Suffice to compute `log(x)` by `x - x^2/2 + x^3/3 - x^4/4`.\n\t\tt = logx( LOG_WORKSPACE, ax );\n\t}\n\t// Case 2: `|y|` is not huge...\n\telse {\n\t\tt = log2ax( LOG_WORKSPACE, ax, ahx );\n\t}\n\t// Split `y` into `y1 + y2` and compute `(y1+y2) * (t1+t2)`...\n\ty1 = setLowWord( y, 0 );\n\tlp = ( (y-y1)*t[0] ) + ( y*t[1] );\n\thp = y1 * t[0];\n\tz = lp + hp;\n\n\t// Note: *can* be more performant to use `getHighWord` and `getLowWord` directly, but using `toWords` looks cleaner.\n\ttoWords.assign( z, WORDS, 1, 0 );\n\tj = uint32ToInt32( WORDS[0] );\n\ti = uint32ToInt32( WORDS[1] );\n\n\t// z >= 1024\n\tif ( j >= HIGH_BIASED_EXP_10 ) {\n\t\t// z > 1024\n\t\tif ( ((j-HIGH_BIASED_EXP_10)|i) !== 0 ) {\n\t\t\t// Signal overflow...\n\t\t\treturn sx * HUGE * HUGE;\n\t\t}\n\t\tif ( (lp+OVT) > (z-hp) ) {\n\t\t\t// Signal overflow...\n\t\t\treturn sx * HUGE * HUGE;\n\t\t}\n\t}\n\t// z <= -1075\n\telse if ( (j&ABS_MASK) >= HIGH_1075 ) {\n\t\t// z < -1075\n\t\tif ( ((j-HIGH_NEG_1075)|i) !== 0 ) {\n\t\t\t// Signal underflow...\n\t\t\treturn sx * TINY * TINY;\n\t\t}\n\t\tif ( lp <= (z-hp) ) {\n\t\t\t// Signal underflow...\n\t\t\treturn sx * TINY * TINY;\n\t\t}\n\t}\n\t// Compute `2^(hp+lp)`...\n\tz = pow2( j, hp, lp );\n\n\treturn sx * z;\n}\n\n\n// EXPORTS //\n\nmodule.exports = pow;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* This is a generated file. Do not edit directly. */\n'use strict';\n\n// MAIN //\n\n/**\n* Evaluates a polynomial.\n*\n* ## Notes\n*\n* - The implementation uses [Horner's rule][horners-method] for efficient computation.\n*\n* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method\n*\n* @private\n* @param {number} x - value at which to evaluate the polynomial\n* @returns {number} evaluated polynomial\n*/\nfunction evalpoly( x ) {\n\tif ( x === 0.0 ) {\n\t\treturn 0.5999999999999946;\n\t}\n\treturn 0.5999999999999946 + (x * (0.4285714285785502 + (x * (0.33333332981837743 + (x * (0.272728123808534 + (x * (0.23066074577556175 + (x * 0.20697501780033842))))))))); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = evalpoly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* This is a generated file. Do not edit directly. */\n'use strict';\n\n// MAIN //\n\n/**\n* Evaluates a polynomial.\n*\n* ## Notes\n*\n* - The implementation uses [Horner's rule][horners-method] for efficient computation.\n*\n* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method\n*\n* @private\n* @param {number} x - value at which to evaluate the polynomial\n* @returns {number} evaluated polynomial\n*/\nfunction evalpoly( x ) {\n\tif ( x === 0.0 ) {\n\t\treturn 0.16666666666666602;\n\t}\n\treturn 0.16666666666666602 + (x * (-0.0027777777777015593 + (x * (0.00006613756321437934 + (x * (-0.0000016533902205465252 + (x * 4.1381367970572385e-8))))))); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = evalpoly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* This is a generated file. Do not edit directly. */\n'use strict';\n\n// MAIN //\n\n/**\n* Evaluates a polynomial.\n*\n* ## Notes\n*\n* - The implementation uses [Horner's rule][horners-method] for efficient computation.\n*\n* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method\n*\n* @private\n* @param {number} x - value at which to evaluate the polynomial\n* @returns {number} evaluated polynomial\n*/\nfunction evalpoly( x ) {\n\tif ( x === 0.0 ) {\n\t\treturn 0.5;\n\t}\n\treturn 0.5 + (x * (-0.3333333333333333 + (x * 0.25)));\n}\n\n\n// EXPORTS //\n\nmodule.exports = evalpoly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*\n*\n* ## Notice\n*\n* The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/s_pow.c}. The implementation follows the original, but has been modified for JavaScript.\n*\n* ```text\n* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n*\n* Developed at SunPro, a Sun Microsystems, Inc. business.\n* Permission to use, copy, modify, and distribute this\n* software is freely granted, provided that this notice\n* is preserved.\n* ```\n*/\n\n'use strict';\n\n// MODULES //\n\nvar getHighWord = require( '@stdlib/number-float64-base-get-high-word' );\nvar setHighWord = require( '@stdlib/number-float64-base-set-high-word' );\nvar setLowWord = require( '@stdlib/number-float64-base-set-low-word' );\nvar uint32ToInt32 = require( '@stdlib/number-uint32-base-to-int32' );\nvar ldexp = require( '@stdlib/math-base-special-ldexp' );\nvar LN2 = require( '@stdlib/constants-float64-ln-two' );\nvar BIAS = require( '@stdlib/constants-float64-exponent-bias' );\nvar ABS_MASK = require( '@stdlib/constants-float64-high-word-abs-mask' );\nvar HIGH_SIGNIFICAND_MASK = require( '@stdlib/constants-float64-high-word-significand-mask' );\nvar polyvalP = require( './polyval_p.js' );\n\n\n// VARIABLES //\n\n// 0x00100000 = 1048576 => 0 00000000001 00000000000000000000 => biased exponent: 1 = -1022+1023 => 2^-1022\nvar HIGH_MIN_NORMAL_EXP = 0x00100000|0; // asm type annotation\n\n// 0x3fe00000 = 1071644672 => 0 01111111110 00000000000000000000 => biased exponent: 1022 = -1+1023 => 2^-1\nvar HIGH_BIASED_EXP_NEG_1 = 0x3fe00000|0; // asm type annotation\n\n// TODO: consider making into an external constant\nvar HIGH_NUM_SIGNIFICAND_BITS = 20|0; // asm type annotation\n\n// High: LN2\nvar LN2_HI = 6.93147182464599609375e-01; // 0x3FE62E43, 0x00000000\n\n// Low: LN2\nvar LN2_LO = -1.90465429995776804525e-09; // 0xBE205C61, 0x0CA86C39\n\n\n// MAIN //\n\n/**\n* Computes \\\\(2^{\\mathrm{hp} + \\mathrm{lp}\\\\).\n*\n* @private\n* @param {number} j - high word of `hp + lp`\n* @param {number} hp - first power summand\n* @param {number} lp - second power summand\n* @returns {number} function value\n*\n* @example\n* var z = pow2( 1065961648, -0.3398475646972656, -0.000002438187359100815 );\n* // returns ~0.79\n*/\nfunction pow2( j, hp, lp ) {\n\tvar tmp;\n\tvar t1;\n\tvar t;\n\tvar r;\n\tvar u;\n\tvar v;\n\tvar w;\n\tvar z;\n\tvar n;\n\tvar i;\n\tvar k;\n\n\ti = (j & ABS_MASK)|0; // asm type annotation\n\tk = ((i>>HIGH_NUM_SIGNIFICAND_BITS) - BIAS)|0; // asm type annotation\n\tn = 0;\n\n\t// `|z| > 0.5`, set `n = z+0.5`\n\tif ( i > HIGH_BIASED_EXP_NEG_1 ) {\n\t\tn = (j + (HIGH_MIN_NORMAL_EXP>>(k+1)))>>>0; // asm type annotation\n\t\tk = (((n & ABS_MASK)>>HIGH_NUM_SIGNIFICAND_BITS) - BIAS)|0; // new k for n\n\t\ttmp = ((n & ~(HIGH_SIGNIFICAND_MASK >> k)))>>>0; // asm type annotation\n\t\tt = setHighWord( 0.0, tmp );\n\t\tn = (((n & HIGH_SIGNIFICAND_MASK)|HIGH_MIN_NORMAL_EXP) >> (HIGH_NUM_SIGNIFICAND_BITS-k))>>>0; // eslint-disable-line max-len\n\t\tif ( j < 0 ) {\n\t\t\tn = -n;\n\t\t}\n\t\thp -= t;\n\t}\n\tt = lp + hp;\n\tt = setLowWord( t, 0 );\n\tu = t * LN2_HI;\n\tv = ( (lp - (t-hp))*LN2 ) + ( t*LN2_LO );\n\tz = u + v;\n\tw = v - (z - u);\n\tt = z * z;\n\tt1 = z - ( t*polyvalP( t ) );\n\tr = ( (z*t1) / (t1-2.0) ) - ( w + (z*w) );\n\tz = 1.0 - (r - z);\n\tj = getHighWord( z );\n\tj = uint32ToInt32( j );\n\tj += (n << HIGH_NUM_SIGNIFICAND_BITS)>>>0; // asm type annotation\n\n\t// Check for subnormal output...\n\tif ( (j>>HIGH_NUM_SIGNIFICAND_BITS) <= 0 ) {\n\t\tz = ldexp( z, n );\n\t} else {\n\t\tz = setHighWord( z, j );\n\t}\n\treturn z;\n}\n\n\n// EXPORTS //\n\nmodule.exports = pow2;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*\n*\n* ## Notice\n*\n* The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/s_pow.c}. The implementation follows the original, but has been modified for JavaScript.\n*\n* ```text\n* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n*\n* Developed at SunPro, a Sun Microsystems, Inc. business.\n* Permission to use, copy, modify, and distribute this\n* software is freely granted, provided that this notice\n* is preserved.\n* ```\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isOdd = require( '@stdlib/math-base-assert-is-odd' );\nvar copysign = require( '@stdlib/math-base-special-copysign' );\nvar NINF = require( '@stdlib/constants-float64-ninf' );\nvar PINF = require( '@stdlib/constants-float64-pinf' );\n\n\n// MAIN //\n\n/**\n* Evaluates the exponential function when \\\\(|x| = 0\\\\).\n*\n* @private\n* @param {number} x - base\n* @param {number} y - exponent\n* @returns {number} function value\n*\n* @example\n* var v = pow( 0.0, 2 );\n* // returns 0.0\n*\n* @example\n* var v = pow( -0.0, -9 );\n* // returns -Infinity\n*\n* @example\n* var v = pow( 0.0, -9 );\n* // returns Infinity\n*\n* @example\n* var v = pow( -0.0, 9 );\n* // returns 0.0\n*\n* @example\n* var v = pow( 0.0, -Infinity );\n* // returns Infinity\n*\n* @example\n* var v = pow( 0.0, Infinity );\n* // returns 0.0\n*/\nfunction pow( x, y ) {\n\tif ( y === NINF ) {\n\t\treturn PINF;\n\t}\n\tif ( y === PINF ) {\n\t\treturn 0.0;\n\t}\n\tif ( y > 0.0 ) {\n\t\tif ( isOdd( y ) ) {\n\t\t\treturn x; // handles +-0\n\t\t}\n\t\treturn 0.0;\n\t}\n\t// y < 0.0\n\tif ( isOdd( y ) ) {\n\t\treturn copysign( PINF, x ); // handles +-0\n\t}\n\treturn PINF;\n}\n\n\n// EXPORTS //\n\nmodule.exports = pow;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*\n*\n* ## Notice\n*\n* The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/s_pow.c}. The implementation follows the original, but has been modified for JavaScript.\n*\n* ```text\n* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n*\n* Developed at SunPro, a Sun Microsystems, Inc. business.\n* Permission to use, copy, modify, and distribute this\n* software is freely granted, provided that this notice\n* is preserved.\n* ```\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ABS_MASK = require( '@stdlib/constants-float64-high-word-abs-mask' );\nvar getHighWord = require( '@stdlib/number-float64-base-get-high-word' );\n\n\n// VARIABLES //\n\n// 0x3fefffff = 1072693247 => 0 01111111110 11111111111111111111 => biased exponent: 1022 = -1+1023 => 2^-1\nvar HIGH_MAX_NEAR_UNITY = 0x3fefffff|0; // asm type annotation\n\nvar HUGE = 1.0e300;\nvar TINY = 1.0e-300;\n\n\n// MAIN //\n\n/**\n* Evaluates the exponential function when \\\\(|y| > 2^64\\\\).\n*\n* @private\n* @param {number} x - base\n* @param {number} y - exponent\n* @returns {number} overflow or underflow result\n*\n* @example\n* var v = pow( 9.0, 3.6893488147419103e19 );\n* // returns Infinity\n*\n* @example\n* var v = pow( -3.14, -3.6893488147419103e19 );\n* // returns 0.0\n*/\nfunction pow( x, y ) {\n\tvar ahx;\n\tvar hx;\n\n\thx = getHighWord( x );\n\tahx = (hx & ABS_MASK);\n\n\tif ( ahx <= HIGH_MAX_NEAR_UNITY ) {\n\t\tif ( y < 0 ) {\n\t\t\t// Signal overflow...\n\t\t\treturn HUGE * HUGE;\n\t\t}\n\t\t// Signal underflow...\n\t\treturn TINY * TINY;\n\t}\n\t// `x` has a biased exponent greater than or equal to `0`...\n\n\tif ( y > 0 ) {\n\t\t// Signal overflow...\n\t\treturn HUGE * HUGE;\n\t}\n\t// Signal underflow...\n\treturn TINY * TINY;\n}\n\n\n// EXPORTS //\n\nmodule.exports = pow;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math-base-special-abs' );\nvar PINF = require( '@stdlib/constants-float64-pinf' );\n\n\n// MAIN //\n\n/**\n* Evaluates the exponential function when \\\\( y = \\pm \\infty\\\\).\n*\n* @private\n* @param {number} x - base\n* @param {number} y - exponent\n* @returns {number} function value\n*\n* @example\n* var v = pow( -1.0, Infinity );\n* // returns NaN\n*\n* @example\n* var v = pow( -1.0, -Infinity );\n* // returns NaN\n*\n* @example\n* var v = pow( 1.0, Infinity );\n* // returns 1.0\n*\n* @example\n* var v = pow( 1.0, -Infinity );\n* // returns 1.0\n*\n* @example\n* var v = pow( 0.5, Infinity );\n* // returns 0.0\n*\n* @example\n* var v = pow( 0.5, -Infinity );\n* // returns Infinity\n*\n* @example\n* var v = pow( 1.5, -Infinity );\n* // returns 0.0\n*\n* @example\n* var v = pow( 1.5, Infinity );\n* // returns Infinity\n*/\nfunction pow( x, y ) {\n\tif ( x === -1.0 ) {\n\t\t// Julia (0.4.2) and Python (2.7.9) return `1.0` (WTF???). JavaScript (`Math.pow`), R, and libm return `NaN`. We choose `NaN`, as the value is indeterminate; i.e., we cannot determine whether `y` is odd, even, or somewhere in between.\n\t\treturn (x-x)/(x-x); // signal NaN\n\t}\n\tif ( x === 1.0 ) {\n\t\treturn 1.0;\n\t}\n\t// (|x| > 1 && y === NINF) || (|x| < 1 && y === PINF)\n\tif ( (abs(x) < 1.0) === (y === PINF) ) {\n\t\treturn 0.0;\n\t}\n\t// (|x| > 1 && y === PINF) || (|x| < 1 && y === NINF)\n\treturn PINF;\n}\n\n\n// EXPORTS //\n\nmodule.exports = pow;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the principal square root of a double-precision floating-point number.\n*\n* @module @stdlib/math-base-special-sqrt\n*\n* @example\n* var sqrt = require( '@stdlib/math-base-special-sqrt' );\n*\n* var v = sqrt( 4.0 );\n* // returns 2.0\n*\n* v = sqrt( 9.0 );\n* // returns 3.0\n*\n* v = sqrt( 0.0 );\n* // returns 0.0\n*\n* v = sqrt( -4.0 );\n* // returns NaN\n*\n* v = sqrt( NaN );\n* // returns NaN\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Compute the principal square root of a double-precision floating-point number.\n*\n* @type {Function}\n* @param {number} x - input value\n* @returns {number} principal square root\n*\n* @example\n* var v = sqrt( 4.0 );\n* // returns 2.0\n*\n* v = sqrt( 9.0 );\n* // returns 3.0\n*\n* v = sqrt( 0.0 );\n* // returns 0.0\n*\n* v = sqrt( -4.0 );\n* // returns NaN\n*\n* v = sqrt( NaN );\n* // returns NaN\n*/\nvar sqrt = Math.sqrt; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nmodule.exports = sqrt;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Round a double-precision floating-point number toward zero.\n*\n* @module @stdlib/math-base-special-trunc\n*\n* @example\n* var trunc = require( '@stdlib/math-base-special-trunc' );\n*\n* var v = trunc( -4.2 );\n* // returns -4.0\n*\n* v = trunc( 9.99999 );\n* // returns 9.0\n*\n* v = trunc( 0.0 );\n* // returns 0.0\n*\n* v = trunc( -0.0 );\n* // returns -0.0\n*\n* v = trunc( NaN );\n* // returns NaN\n*\n* v = trunc( Infinity );\n* // returns Infinity\n*\n* v = trunc( -Infinity );\n* // returns -Infinity\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar floor = require( '@stdlib/math-base-special-floor' );\nvar ceil = require( '@stdlib/math-base-special-ceil' );\n\n\n// MAIN //\n\n/**\n* Rounds a double-precision floating-point number toward zero.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = trunc( -4.2 );\n* // returns -4.0\n*\n* @example\n* var v = trunc( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = trunc( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = trunc( -0.0 );\n* // returns -0.0\n*\n* @example\n* var v = trunc( NaN );\n* // returns NaN\n*\n* @example\n* var v = trunc( Infinity );\n* // returns Infinity\n*\n* @example\n* var v = trunc( -Infinity );\n* // returns -Infinity\n*/\nfunction trunc( x ) {\n\tif ( x < 0.0 ) {\n\t\treturn ceil( x );\n\t}\n\treturn floor( x );\n}\n\n\n// EXPORTS //\n\nmodule.exports = trunc;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Constructor which returns a `Number` object.\n*\n* @module @stdlib/number-ctor\n*\n* @example\n* var Number = require( '@stdlib/number-ctor' );\n*\n* var v = new Number( 10.0 );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nmodule.exports = Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an integer corresponding to the unbiased exponent of a double-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-exponent\n*\n* @example\n* var exponent = require( '@stdlib/number-float64-base-exponent' );\n*\n* var exp = exponent( 3.14e-307 ); // => 2**-1019 ~ 1e-307\n* // returns -1019\n*\n* exp = exponent( -3.14 );\n* // returns 1\n*\n* exp = exponent( 0.0 );\n* // returns -1023\n*\n* exp = exponent( NaN );\n* // returns 1024\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar getHighWord = require( '@stdlib/number-float64-base-get-high-word' );\nvar EXP_MASK = require( '@stdlib/constants-float64-high-word-exponent-mask' );\nvar BIAS = require( '@stdlib/constants-float64-exponent-bias' );\n\n\n// MAIN //\n\n/**\n* Returns an integer corresponding to the unbiased exponent of a double-precision floating-point number.\n*\n* @param {number} x - input value\n* @returns {integer32} unbiased exponent\n*\n* @example\n* var exp = exponent( 3.14e-307 ); // => 2**-1019 ~ 1e-307\n* // returns -1019\n*\n* @example\n* var exp = exponent( -3.14 );\n* // returns 1\n*\n* @example\n* var exp = exponent( 0.0 );\n* // returns -1023\n*\n* @example\n* var exp = exponent( NaN );\n* // returns 1024\n*/\nfunction exponent( x ) {\n\t// Extract from the input value a higher order word (unsigned 32-bit integer) which contains the exponent:\n\tvar high = getHighWord( x );\n\n\t// Apply a mask to isolate only the exponent bits and then shift off all bits which are part of the fraction:\n\thigh = ( high & EXP_MASK ) >>> 20;\n\n\t// Remove the bias and return:\n\treturn (high - BIAS)|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = exponent;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a double-precision floating-point number from a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* @module @stdlib/number-float64-base-from-words\n*\n* @example\n* var fromWords = require( '@stdlib/number-float64-base-from-words' );\n*\n* var v = fromWords( 1774486211, 2479577218 );\n* // returns 3.14e201\n*\n* v = fromWords( 3221823995, 1413754136 );\n* // returns -3.141592653589793\n*\n* v = fromWords( 0, 0 );\n* // returns 0.0\n*\n* v = fromWords( 2147483648, 0 );\n* // returns -0.0\n*\n* v = fromWords( 2146959360, 0 );\n* // returns NaN\n*\n* v = fromWords( 2146435072, 0 );\n* // returns Infinity\n*\n* v = fromWords( 4293918720, 0 );\n* // returns -Infinity\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isLittleEndian = require( '@stdlib/assert-is-little-endian' );\n\n\n// MAIN //\n\nvar indices;\nvar HIGH;\nvar LOW;\n\nif ( isLittleEndian === true ) {\n\tHIGH = 1; // second index\n\tLOW = 0; // first index\n} else {\n\tHIGH = 0; // first index\n\tLOW = 1; // second index\n}\nindices = {\n\t'HIGH': HIGH,\n\t'LOW': LOW\n};\n\n\n// EXPORTS //\n\nmodule.exports = indices;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar indices = require( './indices.js' );\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\nvar HIGH = indices.HIGH;\nvar LOW = indices.LOW;\n\n\n// MAIN //\n\n/**\n* Creates a double-precision floating-point number from a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 should we place the higher order bits? If little endian, the second; if big endian, the first.\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @param {uinteger32} high - higher order word (unsigned 32-bit integer)\n* @param {uinteger32} low - lower order word (unsigned 32-bit integer)\n* @returns {number} floating-point number\n*\n* @example\n* var v = fromWords( 1774486211, 2479577218 );\n* // returns 3.14e201\n*\n* @example\n* var v = fromWords( 3221823995, 1413754136 );\n* // returns -3.141592653589793\n*\n* @example\n* var v = fromWords( 0, 0 );\n* // returns 0.0\n*\n* @example\n* var v = fromWords( 2147483648, 0 );\n* // returns -0.0\n*\n* @example\n* var v = fromWords( 2146959360, 0 );\n* // returns NaN\n*\n* @example\n* var v = fromWords( 2146435072, 0 );\n* // returns Infinity\n*\n* @example\n* var v = fromWords( 4293918720, 0 );\n* // returns -Infinity\n*/\nfunction fromWords( high, low ) {\n\tUINT32_VIEW[ HIGH ] = high;\n\tUINT32_VIEW[ LOW ] = low;\n\treturn FLOAT64_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromWords;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isLittleEndian = require( '@stdlib/assert-is-little-endian' );\n\n\n// MAIN //\n\nvar HIGH;\nif ( isLittleEndian === true ) {\n\tHIGH = 1; // second index\n} else {\n\tHIGH = 0; // first index\n}\n\n\n// EXPORTS //\n\nmodule.exports = HIGH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an unsigned 32-bit integer corresponding to the more significant 32 bits of a double-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-get-high-word\n*\n* @example\n* var getHighWord = require( '@stdlib/number-float64-base-get-high-word' );\n*\n* var w = getHighWord( 3.14e201 ); // => 01101001110001001000001011000011\n* // returns 1774486211\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar HIGH = require( './high.js' );\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\n\n// MAIN //\n\n/**\n* Returns an unsigned 32-bit integer corresponding to the more significant 32 bits of a double-precision floating-point number.\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 can we find the higher order bits? If little endian, the second; if big endian, the first.\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @param {number} x - input value\n* @returns {uinteger32} higher order word\n*\n* @example\n* var w = getHighWord( 3.14e201 ); // => 01101001110001001000001011000011\n* // returns 1774486211\n*/\nfunction getHighWord( x ) {\n\tFLOAT64_VIEW[ 0 ] = x;\n\treturn UINT32_VIEW[ HIGH ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = getHighWord;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar FLOAT64_SMALLEST_NORMAL = require( '@stdlib/constants-float64-smallest-normal' );\nvar isInfinite = require( '@stdlib/math-base-assert-is-infinite' );\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar abs = require( '@stdlib/math-base-special-abs' );\n\n\n// VARIABLES //\n\n// (1<<52)\nvar SCALAR = 4503599627370496;\n\n\n// MAIN //\n\n/**\n* Returns a normal number `y` and exponent `exp` satisfying \\\\(x = y \\cdot 2^\\mathrm{exp}\\\\) and assigns results to a provided output array.\n*\n* @param {number} x - input value\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* var pow = require( '@stdlib/math-base-special-pow' );\n*\n* var out = normalize( 3.14e-319, [ 0.0, 0 ], 1, 0 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var y = out[ 0 ];\n* var exp = out[ 1 ];\n*\n* var bool = ( y*pow(2.0,exp) === 3.14e-319 );\n* // returns true\n*\n* @example\n* var out = normalize( 0.0, [ 0.0, 0 ], 1, 0 );\n* // returns [ 0.0, 0 ];\n*\n* @example\n* var PINF = require( '@stdlib/constants-float64-pinf' );\n*\n* var out = normalize( PINF, [ 0.0, 0 ], 1, 0 );\n* // returns [ Infinity, 0 ]\n*\n* @example\n* var NINF = require( '@stdlib/constants-float64-ninf' );\n*\n* var out = normalize( NINF, [ 0.0, 0 ], 1, 0 );\n* // returns [ -Infinity, 0 ]\n*\n* @example\n* var out = normalize( NaN, [ 0.0, 0 ], 1, 0 );\n* // returns [ NaN, 0 ]\n*/\nfunction normalize( x, out, stride, offset ) {\n\tif ( isnan( x ) || isInfinite( x ) ) {\n\t\tout[ offset ] = x;\n\t\tout[ offset + stride ] = 0;\n\t\treturn out;\n\t}\n\tif ( x !== 0.0 && abs( x ) < FLOAT64_SMALLEST_NORMAL ) {\n\t\tout[ offset ] = x * SCALAR;\n\t\tout[ offset + stride ] = -52;\n\t\treturn out;\n\t}\n\tout[ offset ] = x;\n\tout[ offset + stride ] = 0;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = normalize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a normal number `y` and exponent `exp` satisfying \\\\(x = y \\cdot 2^\\mathrm{exp}\\\\).\n*\n* @module @stdlib/number-float64-base-normalize\n*\n* @example\n* var normalize = require( '@stdlib/number-float64-base-normalize' );\n* var pow = require( '@stdlib/math-base-special-pow' );\n*\n* var out = normalize( 3.14e-319 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var y = out[ 0 ];\n* var exp = out[ 1 ];\n*\n* var bool = ( y*pow(2.0, exp) === 3.14e-319 );\n* // returns true\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var normalize = require( '@stdlib/number-float64-base-normalize' );\n*\n* var out = new Float64Array( 2 );\n*\n* var v = normalize.assign( 3.14e-319, out, 1, 0 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var bool = ( v === out );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar fcn = require( './assign.js' );\n\n\n// MAIN //\n\n/**\n* Returns a normal number `y` and exponent `exp` satisfying \\\\(x = y \\cdot 2^\\mathrm{exp}\\\\).\n*\n* @param {number} x - input value\n* @returns {NumberArray} output array\n*\n* @example\n* var pow = require( '@stdlib/math-base-special-pow' );\n*\n* var out = normalize( 3.14e-319 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var y = out[ 0 ];\n* var exp = out[ 1 ];\n*\n* var bool = ( y*pow(2.0,exp) === 3.14e-319 );\n* // returns true\n*\n* @example\n* var out = normalize( 0.0 );\n* // returns [ 0.0, 0 ]\n*\n* @example\n* var PINF = require( '@stdlib/constants-float64-pinf' );\n*\n* var out = normalize( PINF );\n* // returns [ Infinity, 0 ]\n*\n* @example\n* var NINF = require( '@stdlib/constants-float64-ninf' );\n*\n* var out = normalize( NINF );\n* // returns [ -Infinity, 0 ]\n*\n* @example\n* var out = normalize( NaN );\n* // returns [ NaN, 0 ]\n*/\nfunction normalize( x ) {\n\treturn fcn( x, [ 0.0, 0 ], 1, 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = normalize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isLittleEndian = require( '@stdlib/assert-is-little-endian' );\n\n\n// MAIN //\n\nvar HIGH;\nif ( isLittleEndian === true ) {\n\tHIGH = 1; // second index\n} else {\n\tHIGH = 0; // first index\n}\n\n\n// EXPORTS //\n\nmodule.exports = HIGH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Set the more significant 32 bits of a double-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-set-high-word\n*\n* @example\n* var setHighWord = require( '@stdlib/number-float64-base-set-high-word' );\n*\n* var high = 5 >>> 0; // => 0 00000000000 00000000000000000101\n*\n* var y = setHighWord( 3.14e201, high ); // => 0 00000000000 0000000000000000010110010011110010110101100010000010\n* // returns 1.18350528745e-313\n*\n* @example\n* var setHighWord = require( '@stdlib/number-float64-base-set-high-word' );\n* var PINF = require( '@stdlib/constants-float64-pinf' ); // => 0 11111111111 00000000000000000000 00000000000000000000000000000000\n*\n* var high = 1072693248 >>> 0; // => 0 01111111111 00000000000000000000\n*\n* // Set the higher order bits of `+infinity` to return `1`:\n* var y = setHighWord( PINF, high ); => 0 01111111111 0000000000000000000000000000000000000000000000000000\n* // returns 1.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar HIGH = require( './high.js' );\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\n\n// MAIN //\n\n/**\n* Sets the more significant 32 bits of a double-precision floating-point number.\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 can we find the higher order bits? If little endian, the second; if big endian, the first.\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @param {number} x - double\n* @param {uinteger32} high - unsigned 32-bit integer to replace the higher order word of `x`\n* @returns {number} double having the same lower order word as `x`\n*\n* @example\n* var high = 5 >>> 0; // => 0 00000000000 00000000000000000101\n*\n* var y = setHighWord( 3.14e201, high ); // => 0 00000000000 0000000000000000010110010011110010110101100010000010\n* // returns 1.18350528745e-313\n*\n* @example\n* var PINF = require( '@stdlib/constants-float64-pinf' ); // => 0 11111111111 00000000000000000000 00000000000000000000000000000000\n*\n* var high = 1072693248 >>> 0; // => 0 01111111111 00000000000000000000\n*\n* // Set the higher order bits of `+infinity` to return `1`:\n* var y = setHighWord( PINF, high ); // => 0 01111111111 0000000000000000000000000000000000000000000000000000\n* // returns 1.0\n*/\nfunction setHighWord( x, high ) {\n\tFLOAT64_VIEW[ 0 ] = x;\n\tUINT32_VIEW[ HIGH ] = ( high >>> 0 ); // identity bit shift to ensure integer\n\treturn FLOAT64_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = setHighWord;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Set the less significant 32 bits of a double-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-set-low-word\n*\n* @example\n* var setLowWord = require( '@stdlib/number-float64-base-set-low-word' );\n*\n* var low = 5 >>> 0; // => 00000000000000000000000000000101\n*\n* var x = 3.14e201; // => 0 11010011100 01001000001011000011 10010011110010110101100010000010\n*\n* var y = setLowWord( x, low ); // => 0 11010011100 01001000001011000011 00000000000000000000000000000101\n* // returns 3.139998651394392e+201\n*\n* @example\n* var setLowWord = require( '@stdlib/number-float64-base-set-low-word' );\n* var PINF = require( '@stdlib/constants-float64-pinf' );\n* var NINF = require( '@stdlib/constants-float64-ninf' );\n*\n* var low = 12345678;\n*\n* var y = setLowWord( PINF, low );\n* // returns NaN\n*\n* y = setLowWord( NINF, low );\n* // returns NaN\n*\n* y = setLowWord( NaN, low );\n* // returns NaN\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isLittleEndian = require( '@stdlib/assert-is-little-endian' );\n\n\n// MAIN //\n\nvar LOW;\nif ( isLittleEndian === true ) {\n\tLOW = 0; // first index\n} else {\n\tLOW = 1; // second index\n}\n\n\n// EXPORTS //\n\nmodule.exports = LOW;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar LOW = require( './low.js' );\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\n\n// MAIN //\n\n/**\n* Sets the less significant 32 bits of a double-precision floating-point number.\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 can we find the lower order bits? If little endian, the first; if big endian, the second.\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @param {number} x - double\n* @param {uinteger32} low - unsigned 32-bit integer to replace the lower order word of `x`\n* @returns {number} double having the same higher order word as `x`\n*\n* @example\n* var low = 5 >>> 0; // => 00000000000000000000000000000101\n*\n* var x = 3.14e201; // => 0 11010011100 01001000001011000011 10010011110010110101100010000010\n*\n* var y = setLowWord( x, low ); // => 0 11010011100 01001000001011000011 00000000000000000000000000000101\n* // returns 3.139998651394392e+201\n*\n* @example\n* var PINF = require( '@stdlib/constants-float64-pinf' );\n* var NINF = require( '@stdlib/constants-float64-ninf' );\n*\n* var low = 12345678;\n*\n* var y = setLowWord( PINF, low );\n* // returns NaN\n*\n* y = setLowWord( NINF, low );\n* // returns NaN\n*\n* y = setLowWord( NaN, low );\n* // returns NaN\n*/\nfunction setLowWord( x, low ) {\n\tFLOAT64_VIEW[ 0 ] = x;\n\tUINT32_VIEW[ LOW ] = ( low >>> 0 ); // identity bit shift to ensure integer\n\treturn FLOAT64_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = setLowWord;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* var float64ToFloat32 = require( '@stdlib/number-float64-base-to-float32' );\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nmodule.exports = fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Float32Array = require( '@stdlib/array-float32' );\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar indices = require( './indices.js' );\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\nvar HIGH = indices.HIGH;\nvar LOW = indices.LOW;\n\n\n// MAIN //\n\n/**\n* Splits a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 can we find the higher order bits? If little endian, the second; if big endian, the first.\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @private\n* @param {number} x - input value\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* var Uint32Array = require( '@stdlib/array-uint32' );\n*\n* var out = new Uint32Array( 2 );\n*\n* var w = toWords( 3.14e201, out, 1, 0 );\n* // returns [ 1774486211, 2479577218 ]\n*\n* var bool = ( w === out );\n* // returns true\n*/\nfunction toWords( x, out, stride, offset ) {\n\tFLOAT64_VIEW[ 0 ] = x;\n\tout[ offset ] = UINT32_VIEW[ HIGH ];\n\tout[ offset + stride ] = UINT32_VIEW[ LOW ];\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = toWords;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Split a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* @module @stdlib/number-float64-base-to-words\n*\n* @example\n* var toWords = require( '@stdlib/number-float64-base-to-words' );\n*\n* var w = toWords( 3.14e201 );\n* // returns [ 1774486211, 2479577218 ]\n*\n* @example\n* var Uint32Array = require( '@stdlib/array-uint32' );\n* var toWords = require( '@stdlib/number-float64-base-to-words' );\n*\n* var out = new Uint32Array( 2 );\n*\n* var w = toWords.assign( 3.14e201, out, 1, 0 );\n* // returns [ 1774486211, 2479577218 ]\n*\n* var bool = ( w === out );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isLittleEndian = require( '@stdlib/assert-is-little-endian' );\n\n\n// MAIN //\n\nvar indices;\nvar HIGH;\nvar LOW;\n\nif ( isLittleEndian === true ) {\n\tHIGH = 1; // second index\n\tLOW = 0; // first index\n} else {\n\tHIGH = 0; // first index\n\tLOW = 1; // second index\n}\nindices = {\n\t'HIGH': HIGH,\n\t'LOW': LOW\n};\n\n\n// EXPORTS //\n\nmodule.exports = indices;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar fcn = require( './assign.js' );\n\n\n// MAIN //\n\n/**\n* Splits a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* @param {number} x - input value\n* @returns {Array} output array\n*\n* @example\n* var w = toWords( 3.14e201 );\n* // returns [ 1774486211, 2479577218 ]\n*/\nfunction toWords( x ) {\n\treturn fcn( x, [ 0>>>0, 0>>>0 ], 1, 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = toWords;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert an unsigned 32-bit integer to a signed 32-bit integer.\n*\n* @module @stdlib/number-uint32-base-to-int32\n*\n* @example\n* var float64ToUint32 = require( '@stdlib/number-float64-base-to-uint32' );\n* var uint32ToInt32 = require( '@stdlib/number-uint32-base-to-int32' );\n*\n* var y = uint32ToInt32( float64ToUint32( 4294967295 ) );\n* // returns -1\n*\n* y = uint32ToInt32( float64ToUint32( 3 ) );\n* // returns 3\n*/\n\n// MODULES //\n\nvar uint32ToInt32 = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = uint32ToInt32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Converts an unsigned 32-bit integer to a signed 32-bit integer.\n*\n* @param {uinteger32} x - unsigned 32-bit integer\n* @returns {integer32} signed 32-bit integer\n*\n* @example\n* var float64ToUint32 = require( '@stdlib/number-float64-base-to-uint32' );\n* var y = uint32ToInt32( float64ToUint32( 4294967295 ) );\n* // returns -1\n*\n* @example\n* var float64ToUint32 = require( '@stdlib/number-float64-base-to-uint32' );\n* var y = uint32ToInt32( float64ToUint32( 3 ) );\n* // returns 3\n*/\nfunction uint32ToInt32( x ) {\n\t// NOTE: we could also use typed-arrays to achieve the same end.\n\treturn x|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = uint32ToInt32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies own enumerable properties from source objects to a target object.\n*\n* ## Notes\n*\n* - If a property key is present in multiple sources, the property from the last source that defines the key prevails.\n* - The target object is mutated.\n*\n* @name assign\n* @type {Function}\n* @param {Object} target - target object\n* @param {...Object} source - source object(s)\n* @throws {TypeError} first argument must not be null or undefined\n* @returns {Object} target object\n*\n* @example\n* var obj1 = {\n* 'a': 'beep'\n* };\n* var obj2 = {\n* 'b': 'boop'\n* };\n*\n* var out = assign( obj1, obj2 );\n* // returns { 'a': 'beep', 'b': 'boop' }\n*/\nvar assign = Object.assign; // eslint-disable-line node/no-unsupported-features/es-builtins\n\n\n// EXPORTS //\n\nmodule.exports = assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFunction = require( '@stdlib/assert-is-function' );\n\n\n// MAIN //\n\nvar bool = isFunction( Object.assign ); // eslint-disable-line node/no-unsupported-features/es-builtins\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Copy enumerable own properties from one or more source objects to a target object.\n*\n* @module @stdlib/object-assign\n*\n* @example\n* var assign = require( '@stdlib/object-assign' );\n*\n* var out = assign( {}, { 'foo': 'bar' }, { 'baz': 'beep' } );\n* // returns { 'foo': 'bar', 'baz': 'beep' }\n*/\n\n// MODULES //\n\nvar hasObjectAssign = require( './has_object_assign.js' );\nvar main = require( './builtin.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar assign;\nif ( hasObjectAssign ) {\n\tassign = main;\n} else {\n\tassign = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enumerableProperties = require( '@stdlib/utils-enumerable-properties' );\nvar Object = require( '@stdlib/object-ctor' );\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Copies own enumerable properties from source objects to a target object.\n*\n* ## Notes\n*\n* - If a property key is present in multiple sources, the property from the last source that defines the key prevails.\n* - The target object is mutated.\n*\n* @param {Object} target - target object\n* @param {...Object} source - source object(s)\n* @throws {TypeError} first argument must not be null or undefined\n* @returns {Object} target object\n*\n* @example\n* var obj1 = {\n* 'a': 'beep'\n* };\n* var obj2 = {\n* 'b': 'boop'\n* };\n*\n* var out = assign( obj1, obj2 );\n* // returns { 'a': 'beep', 'b': 'boop' }\n*/\nfunction assign( target ) {\n\tvar source;\n\tvar keys;\n\tvar key;\n\tvar len;\n\tvar to;\n\tvar i;\n\tvar j;\n\tif ( target === void 0 || target === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a non-null object. Value: `%s`.', target ) );\n\t}\n\tto = Object( target );\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\tsource = arguments[ i ];\n\t\tif ( source === void 0 || source === null ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tkeys = enumerableProperties( Object( source ) );\n\t\tlen = keys.length;\n\t\tfor ( j = 0; j < len; j++ ) {\n\t\t\tkey = keys[ j ];\n\t\t\tto[ key ] = source[ key ];\n\t\t}\n\t}\n\treturn to;\n}\n\n\n// EXPORTS //\n\nmodule.exports = assign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Object constructor.\n*\n* @module @stdlib/object-ctor\n*\n* @example\n* var Object = require( '@stdlib/object-ctor' );\n*\n* var o = new Object( null );\n* // returns {}\n*\n* o = new Object( 5.0 );\n* // returns \n*\n* o = new Object( 'beep' );\n* // returns \n*\n* var o1 = {};\n*\n* var o2 = new Object( o1 );\n* // returns {}\n*\n* var bool = ( o1 === o2 );\n* // returns true\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object.\n*\n* @name Object\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {Object} object\n*\n* @example\n* var o = new Object( null );\n* // returns {}\n*\n* @example\n* var o = new Object( 5.0 );\n* // returns \n*\n* @example\n* var o = new Object( 'beep' );\n* // returns \n*\n* @example\n* var o1 = {};\n*\n* var o2 = new Object( o1 );\n* // returns {}\n*\n* var bool = ( o1 === o2 );\n* // returns true\n*/\nvar Obj = Object; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = Obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar standardGamma = require( './standard_gamma.js' );\nvar sample1 = require( './sample1.js' );\nvar sample2 = require( './sample2.js' );\nvar sample3 = require( './sample3.js' );\n\n\n// MAIN //\n\n/**\n* Returns a random number drawn from a beta distribution.\n*\n* @private\n* @param {PRNG} randu - pseudorandom number generator for uniformly distributed numbers\n* @param {PRNG} randn - pseudorandom number generator for normally distributed numbers\n* @param {PositiveNumber} alpha - first shape parameter\n* @param {PositiveNumber} beta - second shape parameter\n* @returns {Probability} pseudorandom number\n*/\nfunction sample( randu, randn, alpha, beta ) {\n\tvar ga;\n\tvar gb;\n\tif ( alpha === beta && alpha > 1.5 ) {\n\t\treturn sample1( randu, randn, alpha );\n\t}\n\tif ( alpha > 1.0 && beta > 1.0 ) {\n\t\treturn sample2( randu, randn, alpha, beta );\n\t}\n\tif ( alpha < 1.0 && beta < 1.0 ) {\n\t\treturn sample3( randu, alpha, beta );\n\t}\n\t// General case of using two gamma random variates:\n\tga = standardGamma( randu, randn, alpha );\n\tgb = standardGamma( randu, randn, beta );\n\treturn ga / ( ga + gb );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sample;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' );\nvar setReadWriteAccessor = require( '@stdlib/utils-define-nonenumerable-read-write-accessor' );\nvar isObject = require( '@stdlib/assert-is-plain-object' );\nvar isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar constantFunction = require( '@stdlib/utils-constant-function' );\nvar noop = require( '@stdlib/utils-noop' );\nvar randn = require( '@stdlib/random-base-improved-ziggurat' ).factory;\nvar randu = require( '@stdlib/random-base-mt19937' ).factory;\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar gcopy = require( '@stdlib/blas-base-gcopy' );\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar isUint32Array = require( '@stdlib/assert-is-uint32array' );\nvar assign = require( '@stdlib/object-assign' );\nvar typedarray2json = require( '@stdlib/array-to-json' );\nvar format = require( '@stdlib/string-format' );\nvar validate = require( './validate.js' );\nvar beta0 = require( './beta.js' );\n\n\n// MAIN //\n\n/**\n* Returns a pseudorandom number generator for generating beta distributed random numbers.\n*\n* @param {PositiveNumber} [alpha] - first shape parameter\n* @param {PositiveNumber} [beta] - second shape parameter\n* @param {Options} [options] - function options\n* @param {PRNG} [options.prng] - pseudorandom number generator which generates uniformly distributed pseudorandom numbers\n* @param {PRNGSeedMT19937} [options.seed] - pseudorandom number generator seed\n* @param {PRNGStateMT19937} [options.state] - pseudorandom number generator state\n* @param {boolean} [options.copy=true] - boolean indicating whether to copy a provided pseudorandom number generator state\n* @throws {TypeError} `alpha` must be a positive number\n* @throws {TypeError} `beta` must be a positive number\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} must provide a valid state\n* @returns {PRNG} pseudorandom number generator\n*\n* @example\n* var beta = factory( 2.0, 1.0 );\n* var v = beta();\n* // returns \n*\n* @example\n* var beta = factory( 2.0, 2.0, {\n* 'seed': 297\n* });\n* var v = beta();\n* // returns \n*/\nfunction factory() {\n\tvar STATE;\n\tvar rnorm;\n\tvar alpha;\n\tvar beta;\n\tvar opts;\n\tvar rand;\n\tvar prng;\n\tvar FLG;\n\tvar err;\n\n\tFLG = true;\n\tif ( arguments.length === 0 ) {\n\t\topts = {\n\t\t\t'copy': false\n\t\t};\n\t\trand = randu( opts );\n\t} else if ( arguments.length === 1 ) {\n\t\topts = arguments[ 0 ];\n\t\tif ( !isObject( opts ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', opts ) );\n\t\t}\n\t\tif ( hasOwnProp( opts, 'copy' ) && !isBoolean( opts.copy ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'copy', opts.copy ) );\n\t\t}\n\t\tif ( hasOwnProp( opts, 'prng' ) ) {\n\t\t\tif ( !isFunction( opts.prng ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.', 'prng', opts.prng ) );\n\t\t\t}\n\t\t\trand = opts.prng;\n\t\t} else {\n\t\t\tif ( hasOwnProp( opts, 'state' ) && !isUint32Array( opts.state ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a Uint32Array. Option: `%s`.', 'state', opts.state ) );\n\t\t\t}\n\t\t\topts = assign( {}, opts );\n\t\t\tif ( opts.copy === false ) {\n\t\t\t\tFLG = false;\n\t\t\t} else if ( opts.state ) {\n\t\t\t\topts.state = gcopy( opts.state.length, opts.state, 1, new Uint32Array( opts.state.length ), 1 ); // eslint-disable-line max-len\n\t\t\t}\n\t\t\topts.copy = false;\n\t\t\trand = randu( opts );\n\t\t}\n\t} else {\n\t\talpha = arguments[ 0 ];\n\t\tbeta = arguments[ 1 ];\n\t\terr = validate( alpha, beta );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\topts = arguments[ 2 ];\n\t\t\tif ( !isObject( opts ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', opts ) );\n\t\t\t}\n\t\t\tif ( hasOwnProp( opts, 'copy' ) && !isBoolean( opts.copy ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'copy', opts.copy ) );\n\t\t\t}\n\t\t\tif ( hasOwnProp( opts, 'prng' ) ) {\n\t\t\t\tif ( !isFunction( opts.prng ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.', 'prng', opts.prng ) );\n\t\t\t\t}\n\t\t\t\trand = opts.prng;\n\t\t\t} else {\n\t\t\t\tif ( hasOwnProp( opts, 'state' ) && !isUint32Array( opts.state ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a Uint32Array. Option: `%s`.', 'state', opts.state ) );\n\t\t\t\t}\n\t\t\t\topts = assign( {}, opts );\n\t\t\t\tif ( opts.copy === false ) {\n\t\t\t\t\tFLG = false;\n\t\t\t\t} else if ( opts.state ) {\n\t\t\t\t\topts.state = gcopy( opts.state.length, opts.state, 1, new Uint32Array( opts.state.length ), 1 ); // eslint-disable-line max-len\n\t\t\t\t}\n\t\t\t\topts.copy = false;\n\t\t\t\trand = randu( opts );\n\t\t\t}\n\t\t} else {\n\t\t\topts = {\n\t\t\t\t'copy': false\n\t\t\t};\n\t\t\trand = randu( opts );\n\t\t}\n\t}\n\tif ( opts && opts.prng ) {\n\t\trnorm = randn({\n\t\t\t'prng': opts.prng\n\t\t});\n\t} else {\n\t\tif ( opts.state ) {\n\t\t\tSTATE = opts.state;\n\t\t} else {\n\t\t\tSTATE = rand.state;\n\t\t\trand.state = STATE; // updates the underlying PRNG to point to a shared state\n\t\t}\n\t\trnorm = randn({\n\t\t\t'state': STATE,\n\t\t\t'copy': false\n\t\t});\n\t}\n\tif ( alpha === void 0 ) {\n\t\tprng = beta2;\n\t} else {\n\t\tprng = beta1;\n\t}\n\tsetReadOnly( prng, 'NAME', 'beta' );\n\n\t// If we are provided an \"external\" PRNG, we don't support getting or setting PRNG state, as we'd need to check for compatible state value types, etc, entailing considerable complexity.\n\tif ( opts && opts.prng ) {\n\t\tsetReadOnly( prng, 'seed', null );\n\t\tsetReadOnly( prng, 'seedLength', null );\n\t\tsetReadWriteAccessor( prng, 'state', constantFunction( null ), noop );\n\t\tsetReadOnly( prng, 'stateLength', null );\n\t\tsetReadOnly( prng, 'byteLength', null );\n\t\tsetReadOnly( prng, 'toJSON', constantFunction( null ) );\n\t\tsetReadOnly( prng, 'PRNG', rand );\n\t} else {\n\t\tsetReadOnlyAccessor( prng, 'seed', getSeed );\n\t\tsetReadOnlyAccessor( prng, 'seedLength', getSeedLength );\n\t\tsetReadWriteAccessor( prng, 'state', getState, setState );\n\t\tsetReadOnlyAccessor( prng, 'stateLength', getStateLength );\n\t\tsetReadOnlyAccessor( prng, 'byteLength', getStateSize );\n\t\tsetReadOnly( prng, 'toJSON', toJSON );\n\t\tsetReadOnly( prng, 'PRNG', rand );\n\t\trand = rand.normalized;\n\t}\n\treturn prng;\n\n\t/**\n\t* Returns the PRNG seed.\n\t*\n\t* @private\n\t* @returns {PRNGSeedMT19937} seed\n\t*/\n\tfunction getSeed() {\n\t\treturn rand.seed;\n\t}\n\n\t/**\n\t* Returns the PRNG seed length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} seed length\n\t*/\n\tfunction getSeedLength() {\n\t\treturn rand.seedLength;\n\t}\n\n\t/**\n\t* Returns the PRNG state length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state length\n\t*/\n\tfunction getStateLength() {\n\t\treturn rand.stateLength;\n\t}\n\n\t/**\n\t* Returns the PRNG state size (in bytes).\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state size (in bytes)\n\t*/\n\tfunction getStateSize() {\n\t\treturn rand.byteLength;\n\t}\n\n\t/**\n\t* Returns the current pseudorandom number generator state.\n\t*\n\t* @private\n\t* @returns {PRNGStateMT19937} current state\n\t*/\n\tfunction getState() {\n\t\treturn rand.state;\n\t}\n\n\t/**\n\t* Sets the pseudorandom number generator state.\n\t*\n\t* @private\n\t* @param {PRNGStateMT19937} s - generator state\n\t* @throws {TypeError} must provide a `Uint32Array`\n\t* @throws {Error} must provide a valid state\n\t*/\n\tfunction setState( s ) {\n\t\tif ( !isUint32Array( s ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a Uint32Array. Value: `%s`.', s ) );\n\t\t}\n\t\tif ( FLG ) {\n\t\t\ts = gcopy( s.length, s, 1, new Uint32Array( s.length ), 1 );\n\t\t}\n\t\trand.state = s;\n\t}\n\n\t/**\n\t* Serializes the pseudorandom number generator as a JSON object.\n\t*\n\t* ## Notes\n\t*\n\t* - `JSON.stringify()` implicitly calls this method when stringifying a PRNG.\n\t*\n\t* @private\n\t* @returns {Object} JSON representation\n\t*/\n\tfunction toJSON() {\n\t\tvar out = {};\n\t\tout.type = 'PRNG';\n\t\tout.name = prng.NAME;\n\t\tout.state = typedarray2json( rand.state );\n\t\tif ( alpha === void 0 ) {\n\t\t\tout.params = [];\n\t\t} else {\n\t\t\tout.params = [ alpha, beta ];\n\t\t}\n\t\treturn out;\n\t}\n\n\t/**\n\t* Returns a random number drawn from a beta distribution with bound parameter values.\n\t*\n\t* @private\n\t* @returns {Probability} pseudorandom number\n\t*\n\t* @example\n\t* var v = beta1();\n\t* // returns \n\t*/\n\tfunction beta1() {\n\t\treturn beta0( rand, rnorm, alpha, beta );\n\t}\n\n\t/**\n\t* Returns a random number drawn from a beta distribution.\n\t*\n\t* @private\n\t* @param {PositiveNumber} alpha - first shape parameter\n\t* @param {PositiveNumber} beta - second shape parameter\n\t* @returns {Probability} pseudorandom number\n\t*\n\t* @example\n\t* var v = beta2( 2.0, 3.0 );\n\t* // returns \n\t*/\n\tfunction beta2( alpha, beta ) {\n\t\tif (\n\t\t\tisnan( alpha ) ||\n\t\t\tisnan( beta ) ||\n\t\t\talpha <= 0.0 ||\n\t\t\tbeta <= 0.0\n\t\t) {\n\t\t\treturn NaN;\n\t\t}\n\t\treturn beta0( rand, rnorm, alpha, beta );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Beta distributed pseudorandom numbers.\n*\n* @module @stdlib/random-base-beta\n*\n* @example\n* var beta = require( '@stdlib/random-base-beta' );\n*\n* var v = beta( 2.0, 3.0 );\n* // returns \n*\n* @example\n* var factory = require( '@stdlib/random-base-beta' ).factory;\n*\n* var beta = factory( 3.0, 2.0, {\n* 'seed': 297\n* });\n*\n* var v = beta();\n* // returns \n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\n/**\n* Generates a beta distributed random number.\n*\n* ## References\n*\n* - Ahrens, J.H., and U. Dieter. 1974. \"Computer methods for sampling from gamma, beta, poisson and bionomial distributions.\" _Computing_ 12 (3): 223–46. doi:[10.1007/BF02293108](http://dx.doi.org/10.1007/BF02293108).\n* - Jöhnk, M.D. 1964. \"Erzeugung von Betaverteilten Und Gammaverteilten Zufallszahlen.\" _Metrika_ 8: 5–15. .\n*\n* @name beta\n* @type {PRNG}\n* @param {PositiveNumber} alpha - first shape parameter\n* @param {PositiveNumber} beta - second shape parameter\n* @returns {Probability} pseudorandom number\n*\n* @example\n* var r = beta( 2.0, 5.0 );\n* // returns \n*\n* @example\n* var r = beta( -2.0, 5.0 );\n* // returns NaN\n*/\nvar beta = factory();\n\n\n// EXPORTS //\n\nmodule.exports = beta;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar pow = require( '@stdlib/math-base-special-pow' );\nvar ln = require( '@stdlib/math-base-special-ln' );\n\n\n// MAIN //\n\n/**\n* Handles case where `alpha` and `beta` are equal and greater than `1.5`.\n*\n* @private\n* @param {PRNG} randu - PRNG for uniformly distributed numbers\n* @param {PRNG} randn - PRNG for normally distributed numbers\n* @param {PositiveNumber} alpha - first shape parameter\n* @returns {Probability} pseudorandom number\n*/\nfunction sample( randu, randn, alpha ) {\n\tvar flg;\n\tvar s4;\n\tvar A;\n\tvar s;\n\tvar t;\n\tvar u;\n\tvar x;\n\tvar y;\n\n\tA = alpha - 1.0;\n\tt = pow( A+A, 0.5 );\n\n\tflg = true;\n\twhile ( flg === true ) {\n\t\ts = randn();\n\t\tx = 0.5 * ( 1.0+(s/t) );\n\t\tif ( x >= 0.0 && x <= 1.0 ) {\n\t\t\tu = randu();\n\t\t\ts4 = pow( s, 4.0 );\n\t\t\ty = (8.0*alpha) - 12.0;\n\t\t\ty = 1.0 - (s4 / y);\n\t\t\tif ( u <= y ) {\n\t\t\t\tflg = false;\n\t\t\t} else {\n\t\t\t\ty += 0.5 * pow( s4/((8.0*alpha)-8.0), 2.0 );\n\t\t\t\tif ( u < y ) {\n\t\t\t\t\ty = A * ln( 4.0*x*(1.0-x) );\n\t\t\t\t\ty += s*s / 2.0;\n\t\t\t\t\tif ( y >= ln( u ) ) {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sample;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar pow = require( '@stdlib/math-base-special-pow' );\nvar ln = require( '@stdlib/math-base-special-ln' );\n\n\n// MAIN //\n\n/**\n* Handles case where both `alpha` and `beta` are greater than `1.0`.\n*\n* @private\n* @param {PRNG} randu - PRNG for uniformly distributed numbers\n* @param {PRNG} randn - PRNG for normally distributed numbers\n* @param {PositiveNumber} alpha - first shape parameter\n* @param {PositiveNumber} beta - second shape parameter\n* @returns {Probability} pseudorandom number\n*/\nfunction sample( randu, randn, alpha, beta ) {\n\tvar sigma;\n\tvar flg;\n\tvar mu;\n\tvar A;\n\tvar B;\n\tvar C;\n\tvar L;\n\tvar s;\n\tvar u;\n\tvar x;\n\tvar y;\n\n\tA = alpha - 1.0;\n\tB = beta - 1.0;\n\tC = A + B;\n\tL = C * ln( C );\n\tmu = A / C;\n\tsigma = 0.5 / pow( C, 0.5 );\n\n\tflg = true;\n\twhile ( flg === true ) {\n\t\ts = randn();\n\t\tx = mu + (s*sigma);\n\t\tif ( x >= 0.0 && x <= 1.0 ) {\n\t\t\tu = randu();\n\t\t\ty = A * ln( x/A );\n\t\t\ty += B * ln((1.0-x) / B);\n\t\t\ty += L + (0.5*s*s);\n\t\t\tif ( y >= ln( u ) ) {\n\t\t\t\tflg = false;\n\t\t\t}\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sample;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar exp = require( '@stdlib/math-base-special-exp' );\nvar pow = require( '@stdlib/math-base-special-pow' );\nvar ln = require( '@stdlib/math-base-special-ln' );\n\n\n// MAIN //\n\n/**\n* Handles general case.\n*\n* @private\n* @param {PRNG} rand - PRNG for uniformly distributed numbers\n* @param {PositiveNumber} alpha - first shape parameter\n* @param {PositiveNumber} beta - second shape parameter\n* @returns {Probability} pseudorandom number\n*/\nfunction sample( rand, alpha, beta ) {\n\tvar lx;\n\tvar ly;\n\tvar xy;\n\tvar u;\n\tvar v;\n\tvar x;\n\tvar y;\n\twhile ( true ) {\n\t\tu = rand();\n\t\tv = rand();\n\t\tx = pow( u, 1.0/alpha );\n\t\ty = pow( v, 1.0/beta );\n\t\txy = x + y;\n\t\tif ( xy <= 1.0 ) {\n\t\t\tif ( xy > 0.0 ) {\n\t\t\t\treturn x / ( xy );\n\t\t\t}\n\t\t\tlx = ln( u ) / alpha;\n\t\t\tly = ln( v ) / beta;\n\t\t\tif ( lx > ly ) {\n\t\t\t\tly -= lx;\n\t\t\t\tlx = 0.0;\n\t\t\t} else {\n\t\t\t\tlx -= ly;\n\t\t\t\tly = 0.0;\n\t\t\t}\n\t\t\treturn exp( lx - ln( exp(lx) + exp(ly) ) );\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = sample;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ln = require( '@stdlib/math-base-special-ln' );\nvar sqrt = require( '@stdlib/math-base-special-sqrt' );\nvar pow = require( '@stdlib/math-base-special-pow' );\n\n\n// VARIABLES //\n\nvar ONE_THIRD = 1.0 / 3.0;\n\n\n// MAIN //\n\n/**\n* Returns a pseudorandom number drawn from a gamma distribution with rate parameter equal to 1.0 and shape parameter equal to `alpha`.\n*\n* @private\n* @param {PRNG} randu - PRNG for uniformly distributed numbers\n* @param {PRNG} randn - PRNG for standard normally distributed numbers\n* @param {PositiveNumber} alpha - shape parameter\n* @returns {PositiveNumber} pseudorandom number\n*/\nfunction standardGamma( randu, randn, alpha ) {\n\tvar flg;\n\tvar x2;\n\tvar v0;\n\tvar v1;\n\tvar c;\n\tvar d;\n\tvar x;\n\tvar s;\n\tvar u;\n\tvar v;\n\n\tif ( alpha < 1.0 ) {\n\t\td = alpha + 1.0 - ONE_THIRD;\n\t\tc = 1.0 / sqrt( 9.0*d );\n\t\ts = pow( randu(), 1.0/alpha );\n\t} else {\n\t\td = alpha - ONE_THIRD;\n\t\tc = 1.0 / sqrt( 9.0*d );\n\t\ts = 1.0;\n\t}\n\tflg = true;\n\twhile ( flg ) {\n\t\tdo {\n\t\t\tx = randn();\n\t\t\tv = 1.0 + (c*x);\n\t\t} while ( v <= 0.0 );\n\t\tv *= v * v;\n\t\tx2 = x * x;\n\t\tv0 = 1.0 - (0.331*x2*x2);\n\t\tv1 = (0.5*x2) + (d*( 1.0-v+ln(v) ));\n\t\tu = randu();\n\t\tif ( u < v0 || ln( u ) < v1 ) {\n\t\t\tflg = false;\n\t\t}\n\t}\n\treturn d * v * s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = standardGamma;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPositive = require( '@stdlib/assert-is-positive-number' ).isPrimitive;\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Validates parameters.\n*\n* @private\n* @param {PositiveNumber} alpha - first shape parameter\n* @param {PositiveNumber} beta - second shape parameter\n* @returns {(Error|null)} error or null\n*\n* @example\n* var err = validate( 1.0, 2.0 );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( alpha, beta ) {\n\tif ( !isPositive( alpha ) ) {\n\t\treturn new TypeError( format( 'invalid argument. First argument must be a positive number. Value: `%s`.', alpha ) );\n\t}\n\tif ( !isPositive( beta ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Second argument must be a positive number. Value: `%s`.', beta ) );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sqrt = require( '@stdlib/math-base-special-sqrt' );\nvar exp = require( '@stdlib/math-base-special-exp' );\nvar ln = require( '@stdlib/math-base-special-ln' );\n\n\n// VARIABLES //\n\n// (R*phi(R) + Pr(X>=R))*sqrt(2\\pi)\nvar V = 9.91256303526217e-3;\n\n\n// MAIN //\n\n/**\n* Returns an array containing coordinates such that each rectangle has the same area.\n*\n* @private\n* @param {PositiveInteger} N - number of rectangles\n* @param {number} rTail - start of right tail\n* @returns {NumberArray} coordinate array\n*\n* @example\n* var X = coordsArray( 128, 3.44 );\n* // returns \n*/\nfunction coordsArray( N, rTail ) {\n\tvar X;\n\tvar f;\n\tvar i;\n\n\tf = exp( -0.5 * rTail * rTail );\n\n\tX = [];\n\tX.push( V/f ); // bottom block: V / f(R)\n\tX.push( rTail );\n\tfor ( i = 2; i < N; i++ ) {\n\t\tX[ i ] = sqrt( -2.0 * ln( ( V/X[i-1] ) + f ) );\n\t\tf = exp( -0.5 * X[ i ] * X[ i ] );\n\t}\n\tX.push( 0.0 );\n\treturn X;\n}\n\n\n// EXPORTS //\n\nmodule.exports = coordsArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' );\nvar setReadWriteAccessor = require( '@stdlib/utils-define-nonenumerable-read-write-accessor' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar isObject = require( '@stdlib/assert-is-plain-object' );\nvar isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar isUint32Array = require( '@stdlib/assert-is-uint32array' );\nvar mt19937 = require( '@stdlib/random-base-mt19937' ).factory;\nvar constantFunction = require( '@stdlib/utils-constant-function' );\nvar noop = require( '@stdlib/utils-noop' );\nvar floor = require( '@stdlib/math-base-special-floor' );\nvar UINT32_MAX = require( '@stdlib/constants-uint32-max' );\nvar typedarray2json = require( '@stdlib/array-to-json' );\nvar format = require( '@stdlib/string-format' );\nvar improvedZiggurat = require( './improved_ziggurat.js' );\n\n\n// MAIN //\n\n/**\n* Returns a pseudorandom number generator which implements the improved Ziggurat method to generate normally distributed pseudorandom numbers.\n*\n* @param {Options} [options] - function options\n* @param {PRNG} [options.prng] - pseudorandom number generator which generates uniformly distributed pseudorandom numbers\n* @param {PRNGSeedMT19937} [options.seed] - pseudorandom number generator seed\n* @param {PRNGStateMT19937} [options.state] - pseudorandom number generator state\n* @param {boolean} [options.copy=true] - boolean indicating whether to copy a provided pseudorandom number generator state\n* @throws {TypeError} must provide an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} must provide a valid state\n* @returns {PRNG} pseudorandom number generator\n*\n* @example\n* var randn = factory();\n*\n* var r = randn();\n* // returns \n*\n* @example\n* // Return a seeded PRNG:\n* var randn = factory({\n* 'seed': 12345\n* });\n*\n* var r = randn();\n* // returns \n*/\nfunction factory( options ) {\n\tvar randu;\n\tvar randi;\n\tvar randn;\n\tvar opts;\n\n\topts = {\n\t\t'copy': true\n\t};\n\tif ( arguments.length ) {\n\t\tif ( !isObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'copy' ) ) {\n\t\t\topts.copy = options.copy;\n\t\t\tif ( !isBoolean( options.copy ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'copy', options.copy ) );\n\t\t\t}\n\t\t}\n\t\tif ( hasOwnProp( options, 'prng' ) ) {\n\t\t\tif ( !isFunction( options.prng ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.', 'prng', options.prng ) );\n\t\t\t}\n\t\t\trandu = options.prng;\n\t\t}\n\t\t// If provided a PRNG, ignore the `state` option, as we don't support getting or setting PRNG state.\n\t\telse if ( hasOwnProp( options, 'state' ) ) {\n\t\t\topts.state = options.state;\n\t\t\tif ( !isUint32Array( options.state ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a Uint32Array. Option: `%s`.', 'state', options.state ) );\n\t\t\t}\n\t\t}\n\t\t// If provided a PRNG, ignore the `seed` option, as a `seed`, by itself, is insufficient to guarantee reproducibility. If provided a state, ignore the `seed` option, as a PRNG state should contain seed information.\n\t\telse if ( hasOwnProp( options, 'seed' ) ) {\n\t\t\topts.seed = options.seed;\n\t\t\tif ( options.seed === void 0 ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.', 'seed', options.seed ) );\n\t\t\t}\n\t\t}\n\t}\n\tif ( opts.state === void 0 ) {\n\t\tif ( randu === void 0 ) {\n\t\t\trandi = mt19937( opts );\n\t\t\trandu = randi.normalized;\n\t\t} else {\n\t\t\trandi = mt19937({\n\t\t\t\t'seed': floor( 1.0 + ( UINT32_MAX*randu() ) ), // allows seeding via an externally seeded PRNG\n\t\t\t\t'copy': opts.copy\n\t\t\t});\n\t\t\topts.seed = null;\n\t\t}\n\t} else {\n\t\trandi = mt19937( opts );\n\t\trandu = randi.normalized;\n\t}\n\trandn = improvedZiggurat( randu, randi );\n\n\tsetReadOnly( randn, 'NAME', 'improved-ziggurat' );\n\tif ( opts.seed === null ) {\n\t\tsetReadOnly( randn, 'seed', null );\n\t\tsetReadOnly( randn, 'seedLength', null );\n\t} else {\n\t\tsetReadOnlyAccessor( randn, 'seed', getSeed );\n\t\tsetReadOnlyAccessor( randn, 'seedLength', getSeedLength );\n\t}\n\t// If we are provided an \"external\" PRNG, we don't support getting or setting PRNG state, as we'd need to check for compatible state value types, etc, entailing considerable complexity.\n\tif ( options && options.prng ) {\n\t\tsetReadWriteAccessor( randn, 'state', constantFunction( null ), noop );\n\t\tsetReadOnly( randn, 'stateLength', null );\n\t\tsetReadOnly( randn, 'byteLength', null );\n\t\tsetReadOnly( randn, 'toJSON', constantFunction( null ) );\n\t} else {\n\t\tsetReadWriteAccessor( randn, 'state', getState, setState );\n\t\tsetReadOnlyAccessor( randn, 'stateLength', getStateLength );\n\t\tsetReadOnlyAccessor( randn, 'byteLength', getStateSize );\n\t\tsetReadOnly( randn, 'toJSON', toJSON );\n\t}\n\tsetReadOnly( randn, 'PRNG', randu );\n\n\treturn randn;\n\n\t/**\n\t* Returns the PRNG seed.\n\t*\n\t* @private\n\t* @returns {PRNGSeedMT19937} seed\n\t*/\n\tfunction getSeed() {\n\t\treturn randi.seed;\n\t}\n\n\t/**\n\t* Returns the PRNG seed length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} seed length\n\t*/\n\tfunction getSeedLength() {\n\t\treturn randi.seedLength;\n\t}\n\n\t/**\n\t* Returns the PRNG state length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state length\n\t*/\n\tfunction getStateLength() {\n\t\treturn randi.stateLength;\n\t}\n\n\t/**\n\t* Returns the PRNG state size (in bytes).\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state size (in bytes)\n\t*/\n\tfunction getStateSize() {\n\t\treturn randi.byteLength;\n\t}\n\n\t/**\n\t* Returns the current PRNG state.\n\t*\n\t* @private\n\t* @returns {PRNGStateMT19937} current state\n\t*/\n\tfunction getState() {\n\t\treturn randi.state;\n\t}\n\n\t/**\n\t* Sets the PRNG state.\n\t*\n\t* @private\n\t* @param {PRNGStateMT19937} s - generator state\n\t* @throws {Error} must provide a valid state\n\t*/\n\tfunction setState( s ) {\n\t\trandi.state = s;\n\t}\n\n\t/**\n\t* Serializes the pseudorandom number generator as a JSON object.\n\t*\n\t* ## Notes\n\t*\n\t* - `JSON.stringify()` implicitly calls this method when stringifying a PRNG.\n\t*\n\t* @private\n\t* @returns {Object} JSON representation\n\t*/\n\tfunction toJSON() {\n\t\tvar out = {};\n\t\tout.type = 'PRNG';\n\t\tout.name = randn.NAME;\n\t\tout.state = typedarray2json( randi.state );\n\t\tout.params = [];\n\t\treturn out;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math-base-special-abs' );\nvar exp = require( '@stdlib/math-base-special-exp' );\nvar coordsArray = require( './coords_array.js' );\nvar ratioArray = require( './ratio_array.js' );\nvar sampleTail = require( './sample_tail.js' );\n\n\n// VARIABLES //\n\n// Number of blocks:\nvar NUM_BLOCKS = 128;\n\n// Start of right tail (R):\nvar START_RIGHT_TAIL = 3.442619855899;\n\n// `X` holds coordinates, such that each rectangle has same area:\nvar X = coordsArray( NUM_BLOCKS, START_RIGHT_TAIL );\n\n// `R` holds `X[ i+1 ] / X[ i ]`:\nvar R = ratioArray( X );\n\n// 127 => 0x7F => 00000000000000000000000001111111\nvar LAST_7_BITS_MASK = 127|0; // asm type annotation\n\n\n// MAIN //\n\n/**\n* Returns a pseudorandom number generator which implements the improved Ziggurat algorithm for generating normally distributed pseudorandom numbers.\n*\n* @private\n* @param {PRNG} randu - PRNG for generating uniformly distributed numbers\n* @param {PRNG} randi - PRNG for generating uniformly distributed integers\n* @returns {number} pseudorandom number\n*/\nfunction wrap( randu, randi ) {\n\treturn randn;\n\n\t/**\n\t* Generates a normally distributed pseudorandom number.\n\t*\n\t* @private\n\t* @returns {number} pseudorandom number\n\t*\n\t* @example\n\t* var r = randn();\n\t* // returns \n\t*/\n\tfunction randn() {\n\t\tvar f0;\n\t\tvar f1;\n\t\tvar x2;\n\t\tvar x;\n\t\tvar u;\n\t\tvar i;\n\t\tvar j;\n\t\twhile ( true ) {\n\t\t\tu = ( 2.0*randu() ) - 1.0;\n\t\t\ti = randi() & LAST_7_BITS_MASK;\n\n\t\t\t// First try the rectangular boxes...\n\t\t\tif ( abs( u ) < R[ i ] ) {\n\t\t\t\treturn u * X[ i ];\n\t\t\t}\n\t\t\t// If bottom box, sample from the tail...\n\t\t\tif ( i === 0 ) {\n\t\t\t\treturn sampleTail( randu, START_RIGHT_TAIL, u < 0.0 );\n\t\t\t}\n\t\t\t// Is this a sample from the wedges?\n\t\t\tx = u * X[ i ];\n\t\t\tx2 = x * x;\n\t\t\tj = i + 1;\n\t\t\tf0 = exp( -0.5 * ( (X[ i ]*X[ i ]) - x2 ) );\n\t\t\tf1 = exp( -0.5 * ( (X[ j ]*X[ j ]) - x2 ) );\n\t\t\tif ( f1 + (randu()*(f0-f1)) < 1.0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = wrap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Normally distributed pseudorandom numbers using the improved Ziggurat method.\n*\n* @module @stdlib/random-base-improved-ziggurat\n*\n* @example\n* var randn = require( '@stdlib/random-base-improved-ziggurat' );\n*\n* var r = randn();\n* // returns \n*\n* @example\n* var factory = require( '@stdlib/random-base-improved-ziggurat' ).factory;\n*\n* var randn = factory({\n* 'seed': 12345\n* });\n*\n* var r = randn();\n* // returns \n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\n/**\n* Generates a standard normally distributed random number.\n*\n* ## Method\n*\n* The basic Ziggurat method works as follows:\n*\n* ```tex\n* x_{C-1}(r) \\left[ f(0) - f\\left( x_{C-1}(r) \\right) \\right] - V(r) = 0\n* ```\n*\n* where\n*\n* ```tex\n* V(r) = r \\; f(r) + \\int_r^\\infty \\; f(x) \\; dx\n* ```\n*\n* and \\\\( r \\\\) denotes the right-most \\\\( x_1 \\\\).\n*\n* - We then use the following rejection algorithm:\n*\n* - Draw a box \\\\( B_i \\\\) at random with probability \\\\( \\tfrac{1}{C} \\\\).\n* - Draw a random number from the box as \\\\( z = U_0 x_i \\\\) for \\\\( i > 0 \\\\) and \\\\( z = U_0 V / f(x_1) \\\\).\n* - If \\\\( z < x_{i+1} \\\\), accept \\\\( z \\\\).\n* - If \\\\( i = 0 \\\\), accept a \\\\( v \\\\) by transforming the tail of the normal distribution to the unit interval and then use rejection technique by Marsaglia, G. (1964) to generate a standard normal variable. Otherwise, if \\\\( i > 0 \\\\) and \\\\( U_1 \\left[ f(x_i) - f(x_{i+1})\\right] < f(z) - f(x_{i+1}) \\\\) accept \\\\( z \\\\).\n* - Go back to the first step.\n*\n* - The improved version by Doornik (2005) changes step four in order to correct a deficiency of the original Ziggurat algorithm. The updated version requires the generation of two random numbers, a uniform variable drawn from \\\\( U(-1,1) \\\\) and the last seven bits of a random integer.\n*\n* ## References\n*\n* - Doornik, Jurgen A. 2005. \"An Improved Ziggurat Method to Generate Normal Random Samples.\" .\n* - Marsaglia, George, and Wai Wan Tsang. 2000. \"The Ziggurat Method for Generating Random Variables.\" _Journal of Statistical Software_ 5 (1): 1–7. doi:[10.18637/jss.v005.i08](http://dx.doi.org/10.18637/jss.v005.i08).\n* - Marsaglia, George. 1964. \"Generating a Variable from the Tail of the Normal Distribution.\" _Technometrics_ 6 (1): 101–2. doi:[10.1080/00401706.1964.10490150](http://dx.doi.org/10.1080/00401706.1964.10490150).\n*\n* @name randn\n* @type {PRNG}\n* @returns {number} pseudorandom number\n*\n* @example\n* var r = randn();\n* // returns \n*/\nvar randn = factory();\n\n\n// EXPORTS //\n\nmodule.exports = randn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array containing the ratio of each pair of consecutive elements in order: `X[ i+1 ] / X[ i ]`.\n*\n* @private\n* @param {NumberArray} X - input array\n* @returns {NumberArray} ratio array\n*\n* @example\n* var R = ratioArray( [ 1.0, 2.0, 5.0 ] );\n* // returns [ 2.0, 2.5 ]\n*/\nfunction ratioArray( X ) {\n\tvar R;\n\tvar i;\n\n\tR = [];\n\tfor ( i = 0; i < X.length-1; i++ ) {\n\t\tR.push( X[ i+1 ] / X[ i ] );\n\t}\n\treturn R;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ratioArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ln = require( '@stdlib/math-base-special-ln' );\n\n\n// MAIN //\n\n/**\n* Transforms the tail of the normal distribution to the unit interval and then uses rejection technique to generate standard normal variable.\n*\n* ## References\n*\n* - Marsaglia, George. 1964. \"Generating a Variable from the Tail of the Normal Distribution.\" _Technometrics_ 6 (1): 101–2. doi:[10.1080/00401706.1964.10490150](http://dx.doi.org/10.1080/00401706.1964.10490150).\n*\n* @private\n* @param {PRNG} rand - pseudorandom number generator\n* @param {number} rTail - start value of the right tail\n* @param {boolean} isNegative - boolean indicating which side to evaluate\n* @returns {number} standard normal variable\n*/\nfunction sampleTail( rand, rTail, isNegative ) {\n\tvar x;\n\tvar y;\n\tdo {\n\t\tx = ln( rand() ) / rTail;\n\t\ty = ln( rand() );\n\t} while ( -2.0*y < x*x );\n\treturn ( isNegative ) ? x-rTail : rTail-x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sampleTail;\n","/* eslint-disable max-lines, max-len */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*\n*\n* ## Notice\n*\n* The original C code and copyright notice are from the [source implementation][mt19937]. The implementation has been modified for JavaScript.\n*\n* ```text\n* Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,\n* All rights reserved.\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions\n* are met:\n*\n* 1. Redistributions of source code must retain the above copyright\n* notice, this list of conditions and the following disclaimer.\n*\n* 2. Redistributions in binary form must reproduce the above copyright\n* notice, this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n*\n* 3. The names of its contributors may not be used to endorse or promote\n* products derived from this software without specific prior written\n* permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n* \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n* ```\n*\n* [mt19937]: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' );\nvar setReadWriteAccessor = require( '@stdlib/utils-define-nonenumerable-read-write-accessor' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar isObject = require( '@stdlib/assert-is-plain-object' );\nvar isCollection = require( '@stdlib/assert-is-collection' );\nvar isUint32Array = require( '@stdlib/assert-is-uint32array' );\nvar isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;\nvar isPositiveInteger = require( '@stdlib/assert-is-positive-integer' ).isPrimitive;\nvar FLOAT64_MAX_SAFE_INTEGER = require( '@stdlib/constants-float64-max-safe-integer' );\nvar UINT32_MAX = require( '@stdlib/constants-uint32-max' );\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar max = require( '@stdlib/math-base-special-max' );\nvar umul = require( '@stdlib/math-base-ops-umul' );\nvar gcopy = require( '@stdlib/blas-base-gcopy' );\nvar typedarray2json = require( '@stdlib/array-to-json' );\nvar format = require( '@stdlib/string-format' );\nvar randuint32 = require( './rand_uint32.js' );\n\n\n// VARIABLES //\n\n// Define the size of the state array (see refs):\nvar N = 624;\n\n// Define a (magic) constant used for indexing into the state array:\nvar M = 397;\n\n// Define the maximum seed: 11111111111111111111111111111111\nvar MAX_SEED = UINT32_MAX >>> 0; // asm type annotation\n\n// For seed arrays, define an initial state (magic) constant: 19650218 => 00000001001010111101011010101010\nvar SEED_ARRAY_INIT_STATE = 19650218 >>> 0; // asm type annotation\n\n// Define a mask for the most significant `w-r` bits, where `w` is the word size (32 bits) and `r` is the separation point of one word (see refs): 2147483648 => 0x80000000 => 10000000000000000000000000000000\nvar UPPER_MASK = 0x80000000 >>> 0; // asm type annotation\n\n// Define a mask for the least significant `r` bits (see refs): 2147483647 => 0x7fffffff => 01111111111111111111111111111111\nvar LOWER_MASK = 0x7fffffff >>> 0; // asm type annotation\n\n// Define a multiplier (see Knuth TAOCP Vol2. 3rd Ed. P.106): 1812433253 => 01101100000001111000100101100101\nvar KNUTH_MULTIPLIER = 1812433253 >>> 0; // asm type annotation\n\n// Define a (magic) multiplier: 1664525 => 00000000000110010110011000001101\nvar MAGIC_MULTIPLIER_1 = 1664525 >>> 0; // asm type annotation\n\n// Define a (magic) multiplier: 1566083941 => 01011101010110001000101101100101\nvar MAGIC_MULTIPLIER_2 = 1566083941 >>> 0; // asm type annotation\n\n// Define a tempering coefficient: 2636928640 => 0x9d2c5680 => 10011101001011000101011010000000\nvar TEMPERING_COEFFICIENT_1 = 0x9d2c5680 >>> 0; // asm type annotation\n\n// Define a tempering coefficient: 4022730752 => 0xefc60000 => 11101111110001100000000000000000\nvar TEMPERING_COEFFICIENT_2 = 0xefc60000 >>> 0; // asm type annotation\n\n// Define a constant vector `a` (see refs): 2567483615 => 0x9908b0df => 10011001000010001011000011011111\nvar MATRIX_A = 0x9908b0df >>> 0; // asm type annotation\n\n// MAG01[x] = x * MATRIX_A; for x = {0,1}\nvar MAG01 = [ 0x0 >>> 0, MATRIX_A >>> 0 ]; // asm type annotation\n\n// Define a normalization constant when generating double-precision floating-point numbers: 2^53 => 9007199254740992\nvar FLOAT64_NORMALIZATION_CONSTANT = 1.0 / ( FLOAT64_MAX_SAFE_INTEGER+1.0 ); // eslint-disable-line id-length\n\n// 2^26: 67108864\nvar TWO_26 = 67108864 >>> 0; // asm type annotation\n\n// 2^32: 2147483648 => 0x80000000 => 10000000000000000000000000000000\nvar TWO_32 = 0x80000000 >>> 0; // asm type annotation\n\n// 1 (as a 32-bit unsigned integer): 1 => 0x1 => 00000000000000000000000000000001\nvar ONE = 0x1 >>> 0; // asm type annotation\n\n// Define the maximum normalized pseudorandom double-precision floating-point number: ( (((2^32-1)>>>5)*2^26)+( (2^32-1)>>>6) ) / 2^53\nvar MAX_NORMALIZED = FLOAT64_MAX_SAFE_INTEGER * FLOAT64_NORMALIZATION_CONSTANT;\n\n// Define the state array schema version:\nvar STATE_ARRAY_VERSION = 1; // NOTE: anytime the state array schema changes, this value should be incremented!!!\n\n// Define the number of sections in the state array:\nvar NUM_STATE_SECTIONS = 3; // state, other, seed\n\n// Define the index offset of the \"state\" section in the state array:\nvar STATE_SECTION_OFFSET = 2; // | version | num_sections | state_length | ...state | other_length | state_index | seed_length | ...seed |\n\n// Define the index offset of the \"other\" section in the state array:\nvar OTHER_SECTION_OFFSET = N + 3; // | version | num_sections | state_length | ...state | other_length | state_index | seed_length | ...seed |\n\n// Define the index offset of the seed section in the state array:\nvar SEED_SECTION_OFFSET = N + 5; // | version | num_sections | state_length | ...state | other_length | state_index | seed_length | ...seed |\n\n// Define the length of the \"fixed\" length portion of the state array:\nvar STATE_FIXED_LENGTH = N + 6; // 1 (version) + 1 (num_sections) + 1 (state_length) + N (state) + 1 (other_length) + 1 (state_index) + 1 (seed_length)\n\n\n// FUNCTIONS //\n\n/**\n* Verifies state array integrity.\n*\n* @private\n* @param {Uint32Array} state - state array\n* @param {boolean} FLG - flag indicating whether the state array was provided as an option (true) or an argument (false)\n* @returns {(Error|null)} an error or `null`\n*/\nfunction verifyState( state, FLG ) {\n\tvar s1;\n\tif ( FLG ) {\n\t\ts1 = 'option';\n\t} else {\n\t\ts1 = 'argument';\n\t}\n\t// The state array must have a minimum length...\n\tif ( state.length < STATE_FIXED_LENGTH+1 ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array has insufficient length.', s1 ) );\n\t}\n\t// The first element of the state array must equal the supported state array schema version...\n\tif ( state[ 0 ] !== STATE_ARRAY_VERSION ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array has an incompatible schema version. Expected: `%s`. Actual: `%s.`', s1, STATE_ARRAY_VERSION, state[ 0 ] ) );\n\t}\n\t// The second element of the state array must contain the number of sections...\n\tif ( state[ 1 ] !== NUM_STATE_SECTIONS ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array has an incompatible number of sections. Expected: `%s`. Actual: `%s`.', s1, NUM_STATE_SECTIONS, state[ 1 ] ) );\n\t}\n\t// The length of the \"state\" section must equal `N`...\n\tif ( state[ STATE_SECTION_OFFSET ] !== N ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array has an incompatible state length. Expected: `%u`. Actual: `%u`.', s1, N, state[ STATE_SECTION_OFFSET ] ) );\n\t}\n\t// The length of the \"other\" section must equal `1`...\n\tif ( state[ OTHER_SECTION_OFFSET ] !== 1 ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array has an incompatible section length. Expected: `%u`. Actual: `%u`.', s1, 1, state[ OTHER_SECTION_OFFSET ] ) );\n\t}\n\t// The length of the \"seed\" section much match the empirical length...\n\tif ( state[ SEED_SECTION_OFFSET ] !== state.length-STATE_FIXED_LENGTH ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array length is incompatible with seed section length. Expected: `%u`. Actual: `%u`.', s1, state.length-STATE_FIXED_LENGTH, state[ SEED_SECTION_OFFSET ] ) );\n\t}\n\treturn null;\n}\n\n/**\n* Returns an initial PRNG state.\n*\n* @private\n* @param {Uint32Array} state - state array\n* @param {PositiveInteger} N - state size\n* @param {uinteger32} s - seed\n* @returns {Uint32Array} state array\n*/\nfunction createState( state, N, s ) {\n\tvar i;\n\n\t// Set the first element of the state array to the provided seed:\n\tstate[ 0 ] = s >>> 0; // equivalent to `s & 0xffffffffUL` in original C implementation\n\n\t// Initialize the remaining state array elements:\n\tfor ( i = 1; i < N; i++ ) {\n\t\t/*\n\t\t* In the original C implementation (see `init_genrand()`),\n\t\t*\n\t\t* ```c\n\t\t* mt[i] = (KNUTH_MULTIPLIER * (mt[i-1] ^ (mt[i-1] >> 30)) + i)\n\t\t* ```\n\t\t*\n\t\t* In order to replicate this in JavaScript, we must emulate C-like multiplication of unsigned 32-bit integers.\n\t\t*/\n\t\ts = state[ i-1 ]>>>0; // asm type annotation\n\t\ts = ( s^(s>>>30) )>>>0; // asm type annotation\n\t\tstate[ i ] = ( umul( s, KNUTH_MULTIPLIER ) + i )>>>0; // asm type annotation\n\t}\n\treturn state;\n}\n\n/**\n* Initializes a PRNG state array according to a seed array.\n*\n* @private\n* @param {Uint32Array} state - state array\n* @param {NonNegativeInteger} N - state array length\n* @param {Collection} seed - seed array\n* @param {NonNegativeInteger} M - seed array length\n* @returns {Uint32Array} state array\n*/\nfunction initState( state, N, seed, M ) {\n\tvar s;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\ti = 1;\n\tj = 0;\n\tfor ( k = max( N, M ); k > 0; k-- ) {\n\t\t/*\n\t\t* In the original C implementation (see `init_by_array()`),\n\t\t*\n\t\t* ```c\n\t\t* mt[i] = (mt[i]^((mt[i-1]^(mt[i-1]>>30))*1664525UL)) + seed[j] + j;\n\t\t* ```\n\t\t*\n\t\t* In order to replicate this in JavaScript, we must emulate C-like multiplication of unsigned 32-bit integers.\n\t\t*/\n\t\ts = state[ i-1 ]>>>0; // asm type annotation\n\t\ts = ( s^(s>>>30) )>>>0; // asm type annotation\n\t\ts = ( umul( s, MAGIC_MULTIPLIER_1 ) )>>>0; // asm type annotation\n\t\tstate[ i ] = ( ((state[i]>>>0)^s) + seed[j] + j )>>>0; /* non-linear */ // asm type annotation\n\n\t\ti += 1;\n\t\tj += 1;\n\t\tif ( i >= N ) {\n\t\t\tstate[ 0 ] = state[ N-1 ];\n\t\t\ti = 1;\n\t\t}\n\t\tif ( j >= M ) {\n\t\t\tj = 0;\n\t\t}\n\t}\n\tfor ( k = N-1; k > 0; k-- ) {\n\t\t/*\n\t\t* In the original C implementation (see `init_by_array()`),\n\t\t*\n\t\t* ```c\n\t\t* mt[i] = (mt[i]^((mt[i-1]^(mt[i-1]>>30))*1566083941UL)) - i;\n\t\t* ```\n\t\t*\n\t\t* In order to replicate this in JavaScript, we must emulate C-like multiplication of unsigned 32-bit integers.\n\t\t*/\n\t\ts = state[ i-1 ]>>>0; // asm type annotation\n\t\ts = ( s^(s>>>30) )>>>0; // asm type annotation\n\t\ts = ( umul( s, MAGIC_MULTIPLIER_2 ) )>>>0; // asm type annotation\n\t\tstate[ i ] = ( ((state[i]>>>0)^s) - i )>>>0; /* non-linear */ // asm type annotation\n\n\t\ti += 1;\n\t\tif ( i >= N ) {\n\t\t\tstate[ 0 ] = state[ N-1 ];\n\t\t\ti = 1;\n\t\t}\n\t}\n\t// Ensure a non-zero initial state array:\n\tstate[ 0 ] = TWO_32; // MSB (most significant bit) is 1\n\n\treturn state;\n}\n\n/**\n* Updates a PRNG's internal state by generating the next `N` words.\n*\n* @private\n* @param {Uint32Array} state - state array\n* @returns {Uint32Array} state array\n*/\nfunction twist( state ) {\n\tvar w;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tk = N - M;\n\tfor ( i = 0; i < k; i++ ) {\n\t\tw = ( state[i]&UPPER_MASK ) | ( state[i+1]&LOWER_MASK );\n\t\tstate[ i ] = state[ i+M ] ^ ( w>>>1 ) ^ MAG01[ w&ONE ];\n\t}\n\tj = N - 1;\n\tfor ( ; i < j; i++ ) {\n\t\tw = ( state[i]&UPPER_MASK ) | ( state[i+1]&LOWER_MASK );\n\t\tstate[ i ] = state[ i-k ] ^ ( w>>>1 ) ^ MAG01[ w&ONE ];\n\t}\n\tw = ( state[j]&UPPER_MASK ) | ( state[0]&LOWER_MASK );\n\tstate[ j ] = state[ M-1 ] ^ ( w>>>1 ) ^ MAG01[ w&ONE ];\n\treturn state;\n}\n\n\n// MAIN //\n\n/**\n* Returns a 32-bit Mersenne Twister pseudorandom number generator.\n*\n* ## Notes\n*\n* - In contrast to the original C implementation, array seeds of length `1` are considered integer seeds. This ensures that the seed `[ 1234 ]` generates the same output as the seed `1234`. In the original C implementation, the two seeds would yield different output, which is **not** obvious from a user perspective.\n*\n* @param {Options} [options] - options\n* @param {PRNGSeedMT19937} [options.seed] - pseudorandom number generator seed\n* @param {PRNGStateMT19937} [options.state] - pseudorandom number generator state\n* @param {boolean} [options.copy=true] - boolean indicating whether to copy a provided pseudorandom number generator state\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} a seed must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integers less than or equal to the maximum unsigned 32-bit integer\n* @throws {RangeError} a numeric seed must be a positive integer less than or equal to the maximum unsigned 32-bit integer\n* @throws {TypeError} state must be a `Uint32Array`\n* @throws {Error} must provide a valid state\n* @throws {TypeError} `copy` option must be a boolean\n* @returns {PRNG} Mersenne Twister PRNG\n*\n* @example\n* var mt19937 = factory();\n*\n* var v = mt19937();\n* // returns \n*\n* @example\n* // Return a seeded Mersenne Twister PRNG:\n* var mt19937 = factory({\n* 'seed': 1234\n* });\n*\n* var v = mt19937();\n* // returns 822569775\n*/\nfunction factory( options ) {\n\tvar STATE;\n\tvar state;\n\tvar opts;\n\tvar seed;\n\tvar slen;\n\tvar err;\n\n\topts = {};\n\tif ( arguments.length ) {\n\t\tif ( !isObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'copy' ) ) {\n\t\t\topts.copy = options.copy;\n\t\t\tif ( !isBoolean( options.copy ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'copy', options.copy ) );\n\t\t\t}\n\t\t}\n\t\tif ( hasOwnProp( options, 'state' ) ) {\n\t\t\tstate = options.state;\n\t\t\topts.state = true;\n\t\t\tif ( !isUint32Array( state ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a Uint32Array. Option: `%s`.', 'state', state ) );\n\t\t\t}\n\t\t\terr = verifyState( state, true );\n\t\t\tif ( err ) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tif ( opts.copy === false ) {\n\t\t\t\tSTATE = state;\n\t\t\t} else {\n\t\t\t\tSTATE = new Uint32Array( state.length );\n\t\t\t\tgcopy( state.length, state, 1, STATE, 1 );\n\t\t\t}\n\t\t\t// Create a state \"view\":\n\t\t\tstate = new Uint32Array( STATE.buffer, STATE.byteOffset+((STATE_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), N );\n\n\t\t\t// Create a seed \"view\":\n\t\t\tseed = new Uint32Array( STATE.buffer, STATE.byteOffset+((SEED_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), state[ SEED_SECTION_OFFSET ] );\n\t\t}\n\t\t// If provided a PRNG state, we ignore the `seed` option...\n\t\tif ( seed === void 0 ) {\n\t\t\tif ( hasOwnProp( options, 'seed' ) ) {\n\t\t\t\tseed = options.seed;\n\t\t\t\topts.seed = true;\n\t\t\t\tif ( isPositiveInteger( seed ) ) {\n\t\t\t\t\tif ( seed > MAX_SEED ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid option. `%s` option must be a positive integer less than or equal to the maximum unsigned 32-bit integer. Option: `%u`.', 'seed', seed ) );\n\t\t\t\t\t}\n\t\t\t\t\tseed >>>= 0; // asm type annotation\n\t\t\t\t} else if ( isCollection( seed ) === false || seed.length < 1 ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.', 'seed', seed ) );\n\t\t\t\t} else if ( seed.length === 1 ) {\n\t\t\t\t\tseed = seed[ 0 ];\n\t\t\t\t\tif ( !isPositiveInteger( seed ) ) {\n\t\t\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.', 'seed', seed ) );\n\t\t\t\t\t}\n\t\t\t\t\tif ( seed > MAX_SEED ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%u`.', 'seed', seed ) );\n\t\t\t\t\t}\n\t\t\t\t\tseed >>>= 0; // asm type annotation\n\t\t\t\t} else {\n\t\t\t\t\tslen = seed.length;\n\t\t\t\t\tSTATE = new Uint32Array( STATE_FIXED_LENGTH+slen );\n\n\t\t\t\t\t// Initialize sections:\n\t\t\t\t\tSTATE[ 0 ] = STATE_ARRAY_VERSION;\n\t\t\t\t\tSTATE[ 1 ] = NUM_STATE_SECTIONS;\n\t\t\t\t\tSTATE[ STATE_SECTION_OFFSET ] = N;\n\t\t\t\t\tSTATE[ OTHER_SECTION_OFFSET ] = 1;\n\t\t\t\t\tSTATE[ OTHER_SECTION_OFFSET+1 ] = N; // state index\n\t\t\t\t\tSTATE[ SEED_SECTION_OFFSET ] = slen;\n\n\t\t\t\t\t// Copy the provided seed array to prevent external mutation, as mutation would lead to an inability to reproduce PRNG values according to the PRNG's stated seed:\n\t\t\t\t\tgcopy.ndarray( slen, seed, 1, 0, STATE, 1, SEED_SECTION_OFFSET+1 );\n\n\t\t\t\t\t// Create a state \"view\":\n\t\t\t\t\tstate = new Uint32Array( STATE.buffer, STATE.byteOffset+((STATE_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), N );\n\n\t\t\t\t\t// Create a seed \"view\":\n\t\t\t\t\tseed = new Uint32Array( STATE.buffer, STATE.byteOffset+((SEED_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), slen );\n\n\t\t\t\t\t// Initialize the internal PRNG state:\n\t\t\t\t\tstate = createState( state, N, SEED_ARRAY_INIT_STATE );\n\t\t\t\t\tstate = initState( state, N, seed, slen );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tseed = randuint32() >>> 0; // asm type annotation\n\t\t\t}\n\t\t}\n\t} else {\n\t\tseed = randuint32() >>> 0; // asm type annotation\n\t}\n\tif ( state === void 0 ) {\n\t\tSTATE = new Uint32Array( STATE_FIXED_LENGTH+1 );\n\n\t\t// Initialize sections:\n\t\tSTATE[ 0 ] = STATE_ARRAY_VERSION;\n\t\tSTATE[ 1 ] = NUM_STATE_SECTIONS;\n\t\tSTATE[ STATE_SECTION_OFFSET ] = N;\n\t\tSTATE[ OTHER_SECTION_OFFSET ] = 1;\n\t\tSTATE[ OTHER_SECTION_OFFSET+1 ] = N; // state index\n\t\tSTATE[ SEED_SECTION_OFFSET ] = 1;\n\t\tSTATE[ SEED_SECTION_OFFSET+1 ] = seed;\n\n\t\t// Create a state \"view\":\n\t\tstate = new Uint32Array( STATE.buffer, STATE.byteOffset+((STATE_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), N );\n\n\t\t// Create a seed \"view\":\n\t\tseed = new Uint32Array( STATE.buffer, STATE.byteOffset+((SEED_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), 1 );\n\n\t\t// Initialize the internal PRNG state:\n\t\tstate = createState( state, N, seed );\n\t}\n\t// Note: property order matters in order to maintain consistency of PRNG \"shape\" (hidden classes).\n\tsetReadOnly( mt19937, 'NAME', 'mt19937' );\n\tsetReadOnlyAccessor( mt19937, 'seed', getSeed );\n\tsetReadOnlyAccessor( mt19937, 'seedLength', getSeedLength );\n\tsetReadWriteAccessor( mt19937, 'state', getState, setState );\n\tsetReadOnlyAccessor( mt19937, 'stateLength', getStateLength );\n\tsetReadOnlyAccessor( mt19937, 'byteLength', getStateSize );\n\tsetReadOnly( mt19937, 'toJSON', toJSON );\n\tsetReadOnly( mt19937, 'MIN', 0 );\n\tsetReadOnly( mt19937, 'MAX', UINT32_MAX );\n\tsetReadOnly( mt19937, 'normalized', normalized );\n\n\tsetReadOnly( normalized, 'NAME', mt19937.NAME );\n\tsetReadOnlyAccessor( normalized, 'seed', getSeed );\n\tsetReadOnlyAccessor( normalized, 'seedLength', getSeedLength );\n\tsetReadWriteAccessor( normalized, 'state', getState, setState );\n\tsetReadOnlyAccessor( normalized, 'stateLength', getStateLength );\n\tsetReadOnlyAccessor( normalized, 'byteLength', getStateSize );\n\tsetReadOnly( normalized, 'toJSON', toJSON );\n\tsetReadOnly( normalized, 'MIN', 0.0 );\n\tsetReadOnly( normalized, 'MAX', MAX_NORMALIZED );\n\n\treturn mt19937;\n\n\t/**\n\t* Returns the PRNG seed.\n\t*\n\t* @private\n\t* @returns {PRNGSeedMT19937} seed\n\t*/\n\tfunction getSeed() {\n\t\tvar len = STATE[ SEED_SECTION_OFFSET ];\n\t\treturn gcopy( len, seed, 1, new Uint32Array( len ), 1 );\n\t}\n\n\t/**\n\t* Returns the PRNG seed length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} seed length\n\t*/\n\tfunction getSeedLength() {\n\t\treturn STATE[ SEED_SECTION_OFFSET ];\n\t}\n\n\t/**\n\t* Returns the PRNG state length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state length\n\t*/\n\tfunction getStateLength() {\n\t\treturn STATE.length;\n\t}\n\n\t/**\n\t* Returns the PRNG state size (in bytes).\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state size (in bytes)\n\t*/\n\tfunction getStateSize() {\n\t\treturn STATE.byteLength;\n\t}\n\n\t/**\n\t* Returns the current PRNG state.\n\t*\n\t* ## Notes\n\t*\n\t* - The PRNG state array is comprised of a preamble followed by `3` sections:\n\t*\n\t* 0. preamble (version + number of sections)\n\t* 1. internal PRNG state\n\t* 2. auxiliary state information\n\t* 3. PRNG seed\n\t*\n\t* - The first element of the PRNG state array preamble is the state array schema version.\n\t*\n\t* - The second element of the PRNG state array preamble is the number of state array sections (i.e., `3`).\n\t*\n\t* - The first element of each section following the preamble specifies the section length. The remaining section elements comprise the section contents.\n\t*\n\t* @private\n\t* @returns {PRNGStateMT19937} current state\n\t*/\n\tfunction getState() {\n\t\tvar len = STATE.length;\n\t\treturn gcopy( len, STATE, 1, new Uint32Array( len ), 1 );\n\t}\n\n\t/**\n\t* Sets the PRNG state.\n\t*\n\t* ## Notes\n\t*\n\t* - If PRNG state is \"shared\" (meaning a state array was provided during PRNG creation and **not** copied) and one sets the generator state to a state array having a different length, the PRNG does **not** update the existing shared state and, instead, points to the newly provided state array. In order to synchronize PRNG output according to the new shared state array, the state array for **each** relevant PRNG must be **explicitly** set.\n\t* - If PRNG state is \"shared\" and one sets the generator state to a state array of the same length, the PRNG state is updated (along with the state of all other PRNGs sharing the PRNG's state array).\n\t*\n\t* @private\n\t* @param {PRNGStateMT19937} s - generator state\n\t* @throws {TypeError} must provide a `Uint32Array`\n\t* @throws {Error} must provide a valid state\n\t*/\n\tfunction setState( s ) {\n\t\tvar err;\n\t\tif ( !isUint32Array( s ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a Uint32Array. Value: `%s`.', s ) );\n\t\t}\n\t\terr = verifyState( s, false );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t\tif ( opts.copy === false ) {\n\t\t\tif ( opts.state && s.length === STATE.length ) {\n\t\t\t\tgcopy( s.length, s, 1, STATE, 1 ); // update current shared state\n\t\t\t} else {\n\t\t\t\tSTATE = s; // point to new shared state\n\t\t\t\topts.state = true; // setting this flag allows updating a shared state even if a state array was not provided at PRNG creation\n\t\t\t}\n\t\t} else {\n\t\t\t// Check if we can reuse allocated memory...\n\t\t\tif ( s.length !== STATE.length ) {\n\t\t\t\tSTATE = new Uint32Array( s.length ); // reallocate\n\t\t\t}\n\t\t\tgcopy( s.length, s, 1, STATE, 1 );\n\t\t}\n\t\t// Create a new state \"view\":\n\t\tstate = new Uint32Array( STATE.buffer, STATE.byteOffset+((STATE_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), N );\n\n\t\t// Create a new seed \"view\":\n\t\tseed = new Uint32Array( STATE.buffer, STATE.byteOffset+((SEED_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), STATE[ SEED_SECTION_OFFSET ] );\n\t}\n\n\t/**\n\t* Serializes the pseudorandom number generator as a JSON object.\n\t*\n\t* ## Notes\n\t*\n\t* - `JSON.stringify()` implicitly calls this method when stringifying a PRNG.\n\t*\n\t* @private\n\t* @returns {Object} JSON representation\n\t*/\n\tfunction toJSON() {\n\t\tvar out = {};\n\t\tout.type = 'PRNG';\n\t\tout.name = mt19937.NAME;\n\t\tout.state = typedarray2json( STATE );\n\t\tout.params = [];\n\t\treturn out;\n\t}\n\n\t/**\n\t* Generates a pseudorandom integer on the interval \\\\( [0, 2^{32}) \\\\).\n\t*\n\t* @private\n\t* @returns {uinteger32} pseudorandom integer\n\t*\n\t* @example\n\t* var r = mt19937();\n\t* // returns \n\t*/\n\tfunction mt19937() {\n\t\tvar r;\n\t\tvar i;\n\n\t\t// Retrieve the current state index:\n\t\ti = STATE[ OTHER_SECTION_OFFSET+1 ];\n\n\t\t// Determine whether we need to update the PRNG state:\n\t\tif ( i >= N ) {\n\t\t\tstate = twist( state );\n\t\t\ti = 0;\n\t\t}\n\t\t// Get the next word of \"raw\"/untempered state:\n\t\tr = state[ i ];\n\n\t\t// Update the state index:\n\t\tSTATE[ OTHER_SECTION_OFFSET+1 ] = i + 1;\n\n\t\t// Tempering transform to compensate for the reduced dimensionality of equidistribution:\n\t\tr ^= r >>> 11;\n\t\tr ^= ( r << 7 ) & TEMPERING_COEFFICIENT_1;\n\t\tr ^= ( r << 15 ) & TEMPERING_COEFFICIENT_2;\n\t\tr ^= r >>> 18;\n\n\t\treturn r >>> 0;\n\t}\n\n\t/**\n\t* Generates a pseudorandom number on the interval \\\\( [0, 1) \\\\).\n\t*\n\t* ## Notes\n\t*\n\t* - The original C implementation credits Isaku Wada for this algorithm (2002/01/09).\n\t*\n\t* @private\n\t* @returns {number} pseudorandom number\n\t*\n\t* @example\n\t* var r = normalized();\n\t* // returns \n\t*/\n\tfunction normalized() {\n\t\tvar x = mt19937() >>> 5;\n\t\tvar y = mt19937() >>> 6;\n\t\treturn ( (x*TWO_26)+y ) * FLOAT64_NORMALIZATION_CONSTANT;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* A 32-bit Mersenne Twister pseudorandom number generator.\n*\n* @module @stdlib/random-base-mt19937\n*\n* @example\n* var mt19937 = require( '@stdlib/random-base-mt19937' );\n*\n* var v = mt19937();\n* // returns \n*\n* @example\n* var factory = require( '@stdlib/random-base-mt19937' ).factory;\n*\n* var mt19937 = factory({\n* 'seed': 1234\n* });\n*\n* var v = mt19937();\n* // returns 822569775\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar factory = require( './factory.js' );\nvar randuint32 = require( './rand_uint32.js' );\n\n\n// MAIN //\n\n/**\n* Generates a pseudorandom integer on the interval \\\\( [0, 2^{32}) \\\\).\n*\n* ## Method\n*\n* - When generating normalized double-precision floating-point numbers, we first generate two pseudorandom integers \\\\( x \\\\) and \\\\( y \\\\) on the interval \\\\( [0, 2^{32}) \\\\) for a combined \\\\( 64 \\\\) random bits.\n*\n* - We would like \\\\( 53 \\\\) random bits to generate a 53-bit precision integer and, thus, want to discard \\\\( 11 \\\\) of the generated bits.\n*\n* - We do so by discarding \\\\( 5 \\\\) bits from \\\\( x \\\\) and \\\\( 6 \\\\) bits from \\\\( y \\\\).\n*\n* - Accordingly, \\\\( x \\\\) contains \\\\( 27 \\\\) random bits, which are subsequently shifted left \\\\( 26 \\\\) bits (multiplied by \\\\( 2^{26} \\\\), and \\\\( y \\\\) contains \\\\( 26 \\\\) random bits to fill in the lower \\\\( 26 \\\\) bits. When summed, they combine to comprise \\\\( 53 \\\\) random bits of a double-precision floating-point integer.\n*\n* - As an example, suppose, for the sake of argument, the 32-bit PRNG generates the maximum unsigned 32-bit integer \\\\( 2^{32}-1 \\\\) twice in a row. Then,\n*\n* ```javascript\n* x = 4294967295 >>> 5; // 00000111111111111111111111111111\n* y = 4294967295 >>> 6; // 00000011111111111111111111111111\n* ```\n*\n* Multiplying \\\\( x \\\\) by \\\\( 2^{26} \\\\) returns \\\\( 9007199187632128 \\\\), which, in binary, is\n*\n* ```binarystring\n* 0 10000110011 11111111111111111111 11111100000000000000000000000000\n* ```\n*\n* Adding \\\\( y \\\\) yields \\\\( 9007199254740991 \\\\) (the maximum \"safe\" double-precision floating-point integer value), which, in binary, is\n*\n* ```binarystring\n* 0 10000110011 11111111111111111111 11111111111111111111111111111111\n* ```\n*\n* - Similarly, suppose the 32-bit PRNG generates the following values\n*\n* ```javascript\n* x = 1 >>> 5; // 0 => 00000000000000000000000000000000\n* y = 64 >>> 6; // 1 => 00000000000000000000000000000001\n* ```\n*\n* Multiplying \\\\( x \\\\) by \\\\( 2^{26} \\\\) returns \\\\( 0 \\\\), which, in binary, is\n*\n* ```binarystring\n* 0 00000000000 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* Adding \\\\( y \\\\) yields \\\\( 1 \\\\), which, in binary, is\n*\n* ```binarystring\n* 0 01111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* - As different combinations of \\\\( x \\\\) and \\\\( y \\\\) are generated, different combinations of double-precision floating-point exponent and significand bits will be toggled, thus generating pseudorandom double-precision floating-point numbers.\n*\n* ## References\n*\n* - Matsumoto, Makoto, and Takuji Nishimura. 1998. \"Mersenne Twister: A 623-dimensionally Equidistributed Uniform Pseudo-random Number Generator.\" _ACM Transactions on Modeling and Computer Simulation_ 8 (1). New York, NY, USA: ACM: 3–30. doi:[10.1145/272991.272995][@matsumoto:1998a].\n* - Harase, Shin. 2017. \"Conversion of Mersenne Twister to double-precision floating-point numbers.\" _ArXiv_ abs/1708.06018 (September). .\n*\n* [@matsumoto:1998a]: https://doi.org/10.1145/272991.272995\n*\n* @function mt19937\n* @type {PRNG}\n* @returns {PositiveInteger} pseudorandom integer\n*\n* @example\n* var v = mt19937();\n* // returns \n*/\nvar mt19937 = factory({\n\t'seed': randuint32()\n});\n\n\n// EXPORTS //\n\nmodule.exports = mt19937;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar UINT32_MAX = require( '@stdlib/constants-uint32-max' );\nvar floor = require( '@stdlib/math-base-special-floor' );\n\n\n// VARIABLES //\n\nvar MAX = UINT32_MAX - 1;\n\n\n// MAIN //\n\n/**\n* Returns a pseudorandom integer on the interval \\\\( [1, 2^{32}-1) \\\\).\n*\n* @private\n* @returns {PositiveInteger} pseudorandom integer\n*\n* @example\n* var v = randuint32();\n* // returns \n*/\nfunction randuint32() {\n\tvar v = floor( 1.0 + (MAX*Math.random()) ); // eslint-disable-line stdlib/no-builtin-math\n\treturn v >>> 0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = randuint32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* var reFunctionName = require( '@stdlib/regexp-function-name' );\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar REGEXP = require( './regexp.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nmodule.exports = reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar reFunctionName = require( './main.js' );\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nmodule.exports = RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Reinterpret a `Complex128Array` as a `Float64Array`.\n*\n* @module @stdlib/strided-base-reinterpret-complex128\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n* var reinterpret = require( '@stdlib/strided-base-reinterpret-complex128' );\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Float64Array = require( '@stdlib/array-float64' );\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* var Complex128Array = require( '@stdlib/array-complex128' );\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Reinterpret a `Complex64Array` as a `Float32Array`.\n*\n* @module @stdlib/strided-base-reinterpret-complex64\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var reinterpret = require( '@stdlib/strided-base-reinterpret-complex64' );\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Float32Array = require( '@stdlib/array-float32' );\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( './is_number.js' );\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( './is_number.js' );\nvar zeroPad = require( './zero_pad.js' );\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Generate string from a token array by interpolating values.\n*\n* @module @stdlib/string-base-format-interpolate\n*\n* @example\n* var formatInterpolate = require( '@stdlib/string-base-format-interpolate' );\n*\n* var tokens = ['Hello ', { 'specifier': 's' }, '!' ];\n* var out = formatInterpolate( tokens, 'World' );\n* // returns 'Hello World!'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nmodule.exports = isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nmodule.exports = isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar formatInteger = require( './format_integer.js' );\nvar isString = require( './is_string.js' );\nvar formatDouble = require( './format_double.js' );\nvar spacePad = require( './space_pad.js' );\nvar zeroPad = require( './zero_pad.js' );\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nmodule.exports = spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nmodule.exports = zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tokenize a string into an array of string parts and format identifier objects.\n*\n* @module @stdlib/string-base-format-tokenize\n*\n* @example\n* var formatTokenize = require( '@stdlib/string-base-format-tokenize' );\n*\n* var str = 'Hello %s!';\n* var tokens = formatTokenize( str );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nmodule.exports = formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Insert supplied variable values into a format string.\n*\n* @module @stdlib/string-format\n*\n* @example\n* var format = require( '@stdlib/string-format' );\n*\n* var out = format( '%s %s!', 'Hello', 'World' );\n* // returns 'Hello World!'\n*\n* out = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nmodule.exports = isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar interpolate = require( '@stdlib/string-base-format-interpolate' );\nvar tokenize = require( '@stdlib/string-base-format-tokenize' );\nvar isString = require( './is_string.js' );\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nmodule.exports = format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Symbol factory.\n*\n* @module @stdlib/symbol-ctor\n*\n* @example\n* var Symbol = require( '@stdlib/symbol-ctor' );\n*\n* var s = Symbol( 'beep' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Iterator symbol.\n*\n* @module @stdlib/symbol-iterator\n*\n* @example\n* var IteratorSymbol = require( '@stdlib/symbol-iterator' );\n*\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\n\n// MAIN //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasIteratorSymbolSupport = require( '@stdlib/assert-has-iterator-symbol-support' );\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nmodule.exports = IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a constant function.\n*\n* @module @stdlib/utils-constant-function\n*\n* @example\n* var constantFunction = require( '@stdlib/utils-constant-function' );\n*\n* var fcn = constantFunction( 3.14 );\n*\n* var v = fcn();\n* // returns 3.14\n*\n* v = fcn();\n* // returns 3.14\n*\n* v = fcn();\n* // returns 3.14\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Creates a function which always returns the same value.\n*\n* @param {*} [value] - value to always return\n* @returns {Function} constant function\n*\n* @example\n* var fcn = wrap( 3.14 );\n*\n* var v = fcn();\n* // returns 3.14\n*\n* v = fcn();\n* // returns 3.14\n*\n* v = fcn();\n* // returns 3.14\n*/\nfunction wrap( value ) {\n\treturn constantFunction;\n\n\t/**\n\t* Constant function.\n\t*\n\t* @private\n\t* @returns {*} constant value\n\t*/\n\tfunction constantFunction() {\n\t\treturn value;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = wrap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine the name of a value's constructor.\n*\n* @module @stdlib/utils-constructor-name\n*\n* @example\n* var constructorName = require( '@stdlib/utils-constructor-name' );\n*\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* v = constructorName( {} );\n* // returns 'Object'\n*\n* v = constructorName( true );\n* // returns 'Boolean'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\nvar RE = require( '@stdlib/regexp-function-name' ).REGEXP;\nvar isBuffer = require( '@stdlib/assert-is-buffer' );\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nmodule.exports = constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define a non-enumerable read-only accessor.\n*\n* @module @stdlib/utils-define-nonenumerable-read-only-accessor\n*\n* @example\n* var setNonEnumerableReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' );\n*\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar defineProperty = require( '@stdlib/utils-define-property' );\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nmodule.exports = setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define a non-enumerable read-only property.\n*\n* @module @stdlib/utils-define-nonenumerable-read-only-property\n*\n* @example\n* var setNonEnumerableReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar defineProperty = require( '@stdlib/utils-define-property' );\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nmodule.exports = setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define a non-enumerable read-write accessor.\n*\n* @module @stdlib/utils-define-nonenumerable-read-write-accessor\n*\n* @example\n* var setNonEnumerableReadWriteAccessor = require( '@stdlib/utils-define-nonenumerable-read-write-accessor' );\n*\n* function getter() {\n* return name + ' foo';\n* }\n*\n* function setter( v ) {\n* name = v;\n* }\n*\n* var name = 'bar';\n* var obj = {};\n*\n* setNonEnumerableReadWriteAccessor( obj, 'foo', getter, setter );\n*\n* var v = obj.foo;\n* // returns 'bar foo'\n*\n* obj.foo = 'beep';\n*\n* v = obj.foo;\n* // returns 'beep foo'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar defineProperty = require( '@stdlib/utils-define-property' );\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-write accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - get accessor\n* @param {Function} setter - set accessor\n*\n* @example\n* function getter() {\n* return name + ' foo';\n* }\n*\n* function setter( v ) {\n* name = v;\n* }\n*\n* var name = 'bar';\n* var obj = {};\n*\n* setNonEnumerableReadWriteAccessor( obj, 'foo', getter, setter );\n*\n* var v = obj.foo;\n* // returns 'bar foo'\n*\n* obj.foo = 'beep';\n*\n* v = obj.foo;\n* // returns 'beep foo'\n*/\nfunction setNonEnumerableReadWriteAccessor( obj, prop, getter, setter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter,\n\t\t'set': setter\n\t});\n}\n\n\n// EXPORTS //\n\nmodule.exports = setNonEnumerableReadWriteAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nmodule.exports = defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar defineProperty = require( './define_property.js' );\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* var defineProperty = require( '@stdlib/utils-define-property' );\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nvar hasDefinePropertySupport = require( './has_define_property_support.js' );\nvar builtin = require( './builtin.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nvar format = require( '@stdlib/string-format' );\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nmodule.exports = defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an array of an object's own enumerable property names and symbols.\n*\n* @module @stdlib/utils-enumerable-properties\n*\n* @example\n* var enumerableProperties = require( '@stdlib/utils-enumerable-properties' );\n*\n* var props = enumerableProperties({\n* 'foo': 'bar',\n* 'beep': 'boop'\n* });\n* // e.g., returns [ 'foo', 'beep' ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar keys = require( '@stdlib/utils-keys' );\nvar propertySymbols = require( '@stdlib/utils-property-symbols' );\nvar isEnumerable = require( '@stdlib/assert-is-enumerable-property' );\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names and symbols.\n*\n* @param {*} value - input object\n* @returns {Array} a list of own property enumerable names and symbols\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var props = enumerableProperties( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction enumerableProperties( value ) {\n\tvar out;\n\tvar tmp;\n\tvar i;\n\n\tout = keys( value );\n\ttmp = propertySymbols( value );\n\tfor ( i = 0; i < tmp.length; i++ ) {\n\t\tif ( isEnumerable( value, tmp[ i ] ) ) {\n\t\t\tout.push( tmp[ i ] );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumerableProperties;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the name of a function.\n*\n* @module @stdlib/utils-function-name\n*\n* @example\n* var functionName = require( '@stdlib/utils-function-name' );\n*\n* var v = functionName( String );\n* // returns 'String'\n*\n* v = functionName( function foo(){} );\n* // returns 'foo'\n*\n* v = functionName( function(){} );\n* // returns '' || 'anonymous'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar hasFunctionNameSupport = require( '@stdlib/assert-has-function-name-support' );\nvar format = require( '@stdlib/string-format' );\nvar RE = require( '@stdlib/regexp-function-name' ).REGEXP;\n\n\n// VARIABLES //\n\nvar isFunctionNameSupported = hasFunctionNameSupport();\n\n\n// MAIN //\n\n/**\n* Returns the name of a function.\n*\n* @param {Function} fcn - input function\n* @throws {TypeError} must provide a function\n* @returns {string} function name\n*\n* @example\n* var v = functionName( Math.sqrt );\n* // returns 'sqrt'\n*\n* @example\n* var v = functionName( function foo(){} );\n* // returns 'foo'\n*\n* @example\n* var v = functionName( function(){} );\n* // returns '' || 'anonymous'\n*\n* @example\n* var v = functionName( String );\n* // returns 'String'\n*/\nfunction functionName( fcn ) {\n\t// TODO: add support for generator functions?\n\tif ( isFunction( fcn ) === false ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', fcn ) );\n\t}\n\tif ( isFunctionNameSupported ) {\n\t\treturn fcn.name;\n\t}\n\treturn RE.exec( fcn.toString() )[ 1 ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = functionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar builtin = require( './native.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar getProto;\nif ( isFunction( Object.getPrototypeOf ) ) {\n\tgetProto = builtin;\n} else {\n\tgetProto = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = getProto;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the prototype of a provided object.\n*\n* @module @stdlib/utils-get-prototype-of\n*\n* @example\n* var getPrototype = require( '@stdlib/utils-get-prototype-of' );\n*\n* var proto = getPrototype( {} );\n* // returns {}\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Object = require( '@stdlib/object-ctor' );\nvar getProto = require( './detect.js' );\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @param {*} value - input value\n* @returns {(Object|null)} prototype\n*\n* @example\n* var proto = getPrototypeOf( {} );\n* // returns {}\n*/\nfunction getPrototypeOf( value ) {\n\tif (\n\t\tvalue === null ||\n\t\tvalue === void 0\n\t) {\n\t\treturn null;\n\t}\n\t// In order to ensure consistent ES5/ES6 behavior, cast input value to an object (strings, numbers, booleans); ES5 `Object.getPrototypeOf` throws when provided primitives and ES6 `Object.getPrototypeOf` casts:\n\tvalue = Object( value );\n\n\treturn getProto( value );\n}\n\n\n// EXPORTS //\n\nmodule.exports = getPrototypeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar getProto = Object.getPrototypeOf;\n\n\n// EXPORTS //\n\nmodule.exports = getProto;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\nvar getProto = require( './proto.js' );\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {(Object|null)} prototype\n*/\nfunction getPrototypeOf( obj ) {\n\tvar proto = getProto( obj );\n\tif ( proto || proto === null ) {\n\t\treturn proto;\n\t}\n\tif ( nativeClass( obj.constructor ) === '[object Function]' ) {\n\t\t// May break if the constructor has been tampered with...\n\t\treturn obj.constructor.prototype;\n\t}\n\tif ( obj instanceof Object ) {\n\t\treturn Object.prototype;\n\t}\n\t// Return `null` for objects created via `Object.create( null )`. Also return `null` for cross-realm objects on browsers that lack `__proto__` support, such as IE < 11.\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = getPrototypeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the value of the `__proto__` property.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {*} value of `__proto__` property\n*/\nfunction getProto( obj ) {\n\t// eslint-disable-next-line no-proto\n\treturn obj.__proto__;\n}\n\n\n// EXPORTS //\n\nmodule.exports = getProto;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;\nvar format = require( '@stdlib/string-format' );\nvar getThis = require( './codegen.js' );\nvar Self = require( './self.js' );\nvar Win = require( './window.js' );\nvar GlobalThis = require( './global_this.js' );\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @private\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nmodule.exports = getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nmodule.exports = obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nmodule.exports = obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nmodule.exports = obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the first index at which a given element can be found.\n*\n* @module @stdlib/utils-index-of\n*\n* @example\n* var indexOf = require( '@stdlib/utils-index-of' );\n*\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 3 );\n* // returns 1\n*\n* arr = [ 4, 3, 2, 1 ];\n* idx = indexOf( arr, 5 );\n* // returns -1\n*\n* // Using a `fromIndex`:\n* arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* idx = indexOf( arr, 2, 3 );\n* // returns 5\n*\n* // `fromIndex` which exceeds `array` length:\n* arr = [ 1, 2, 3, 4, 2, 5 ];\n* idx = indexOf( arr, 2, 10 );\n* // returns -1\n*\n* // Negative `fromIndex`:\n* arr = [ 1, 2, 3, 4, 5, 2, 6, 2 ];\n* idx = indexOf( arr, 2, -4 );\n* // returns 5\n*\n* idx = indexOf( arr, 2, -1 );\n* // returns 7\n*\n* // Negative `fromIndex` exceeding input `array` length:\n* arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* idx = indexOf( arr, 2, -10 );\n* // returns 1\n*\n* // Array-like objects:\n* var str = 'bebop';\n* idx = indexOf( str, 'o' );\n* // returns 3\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isnan = require( '@stdlib/assert-is-nan' );\nvar isCollection = require( '@stdlib/assert-is-collection' );\nvar isString = require( '@stdlib/assert-is-string' ).isPrimitive;\nvar isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @param {ArrayLike} arr - array-like object\n* @param {*} searchElement - element to find\n* @param {integer} [fromIndex] - starting index (if negative, the start index is determined relative to last element)\n* @throws {TypeError} must provide an array-like object\n* @throws {TypeError} third argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 3 );\n* // returns 1\n*\n* @example\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 5 );\n* // returns -1\n*\n* @example\n* // Using a `fromIndex`:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* var idx = indexOf( arr, 2, 3 );\n* // returns 5\n*\n* @example\n* // `fromIndex` which exceeds `array` length:\n* var arr = [ 1, 2, 3, 4, 2, 5 ];\n* var idx = indexOf( arr, 2, 10 );\n* // returns -1\n*\n* @example\n* // Negative `fromIndex`:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6, 2 ];\n* var idx = indexOf( arr, 2, -4 );\n* // returns 5\n*\n* idx = indexOf( arr, 2, -1 );\n* // returns 7\n*\n* @example\n* // Negative `fromIndex` exceeding input `array` length:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* var idx = indexOf( arr, 2, -10 );\n* // returns 1\n*\n* @example\n* // Array-like objects:\n* var str = 'bebop';\n* var idx = indexOf( str, 'o' );\n* // returns 3\n*/\nfunction indexOf( arr, searchElement, fromIndex ) {\n\tvar len;\n\tvar i;\n\tif ( !isCollection( arr ) && !isString( arr ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object. Value: `%s`.', arr ) );\n\t}\n\tlen = arr.length;\n\tif ( len === 0 ) {\n\t\treturn -1;\n\t}\n\tif ( arguments.length === 3 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= 0 ) {\n\t\t\tif ( fromIndex >= len ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\ti = fromIndex;\n\t\t} else {\n\t\t\ti = len + fromIndex;\n\t\t\tif ( i < 0 ) {\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\ti = 0;\n\t}\n\t// Check for `NaN`...\n\tif ( isnan( searchElement ) ) {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( isnan( arr[i] ) ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( arr[ i ] === searchElement ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\treturn -1;\n}\n\n\n// EXPORTS //\n\nmodule.exports = indexOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.keys()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\treturn Object.keys( Object( value ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArguments = require( '@stdlib/assert-is-arguments' );\nvar builtin = require( './builtin.js' );\n\n\n// VARIABLES //\n\nvar slice = Array.prototype.slice;\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\tif ( isArguments( value ) ) {\n\t\treturn builtin( slice.call( value ) );\n\t}\n\treturn builtin( value );\n}\n\n\n// EXPORTS //\n\nmodule.exports = keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar keys = require( './builtin.js' );\n\n\n// FUNCTIONS //\n\n/**\n* Tests the built-in `Object.keys()` implementation when provided `arguments`.\n*\n* @private\n* @returns {boolean} boolean indicating whether the built-in implementation returns the expected number of keys\n*/\nfunction test() {\n\treturn ( keys( arguments ) || '' ).length !== 2;\n}\n\n\n// MAIN //\n\n/**\n* Tests whether the built-in `Object.keys()` implementation supports providing `arguments` as an input value.\n*\n* ## Notes\n*\n* - Safari 5.0 does **not** support `arguments` as an input value.\n*\n* @private\n* @returns {boolean} boolean indicating whether a built-in implementation supports `arguments`\n*/\nfunction check() {\n\treturn test( 1, 2 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar indexOf = require( '@stdlib/utils-index-of' );\nvar typeOf = require( '@stdlib/utils-type-of' );\nvar isConstructorPrototype = require( './is_constructor_prototype.js' );\nvar EXCLUDED_KEYS = require( './excluded_keys.json' );\nvar win = require( './window.js' );\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Determines whether an environment throws when comparing to the prototype of a value's constructor (e.g., [IE9][1]).\n*\n* [1]: https://stackoverflow.com/questions/7688070/why-is-comparing-the-constructor-property-of-two-windows-unreliable\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment is buggy\n*/\nfunction check() {\n\tvar k;\n\tif ( typeOf( win ) === 'undefined' ) {\n\t\treturn false;\n\t}\n\tfor ( k in win ) { // eslint-disable-line guard-for-in\n\t\ttry {\n\t\t\tif (\n\t\t\t\tindexOf( EXCLUDED_KEYS, k ) === -1 &&\n\t\t\t\thasOwnProp( win, k ) &&\n\t\t\t\twin[ k ] !== null &&\n\t\t\t\ttypeOf( win[ k ] ) === 'object'\n\t\t\t) {\n\t\t\t\tisConstructorPrototype( win[ k ] );\n\t\t\t}\n\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// MAIN //\n\nbool = check();\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar bool = ( typeof Object.keys !== 'undefined' );\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isEnumerableProperty = require( '@stdlib/assert-is-enumerable-property' );\nvar noop = require( '@stdlib/utils-noop' );\n\n\n// MAIN //\n\n// Note: certain environments treat an object's prototype as enumerable, which, as a matter of convention, it shouldn't be...\nvar bool = isEnumerableProperty( noop, 'prototype' );\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isEnumerableProperty = require( '@stdlib/assert-is-enumerable-property' );\n\n\n// VARIABLES //\n\nvar obj = {\n\t'toString': null\n};\n\n\n// MAIN //\n\n// Note: certain environments don't allow enumeration of overwritten properties which are considered non-enumerable...\nvar bool = !isEnumerableProperty( obj, 'toString' );\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar bool = ( typeof window !== 'undefined' );\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an array of an object's own enumerable property names.\n*\n* @module @stdlib/utils-keys\n*\n* @example\n* var keys = require( '@stdlib/utils-keys' );\n*\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests whether a value equals the prototype of its constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value equals the prototype of its constructor\n*/\nfunction isConstructorPrototype( value ) {\n\treturn ( value.constructor && value.constructor.prototype === value );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isConstructorPrototype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasAutomationEqualityBug = require( './has_automation_equality_bug.js' );\nvar isConstructorPrototype = require( './is_constructor_prototype.js' );\nvar HAS_WINDOW = require( './has_window.js' );\n\n\n// MAIN //\n\n/**\n* Wraps the test for constructor prototype equality to accommodate buggy environments (e.g., environments which throw when testing equality).\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value equals the prototype of its constructor\n*/\nfunction wrapper( value ) {\n\tif ( HAS_WINDOW === false && !hasAutomationEqualityBug ) {\n\t\treturn isConstructorPrototype( value );\n\t}\n\ttry {\n\t\treturn isConstructorPrototype( value );\n\t} catch ( error ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = wrapper;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasArgumentsBug = require( './has_arguments_bug.js' );\nvar HAS_BUILTIN = require( './has_builtin.js' );\nvar builtin = require( './builtin.js' );\nvar wrapper = require( './builtin_wrapper.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @name keys\n* @type {Function}\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nvar keys;\nif ( HAS_BUILTIN ) {\n\tif ( hasArgumentsBug() ) {\n\t\tkeys = wrapper;\n\t} else {\n\t\tkeys = builtin;\n\t}\n} else {\n\tkeys = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObjectLike = require( '@stdlib/assert-is-object-like' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar isArguments = require( '@stdlib/assert-is-arguments' );\nvar HAS_ENUM_PROTO_BUG = require( './has_enumerable_prototype_bug.js' );\nvar HAS_NON_ENUM_PROPS_BUG = require( './has_non_enumerable_properties_bug.js' );\nvar isConstructorPrototype = require( './is_constructor_prototype_wrapper.js' );\nvar NON_ENUMERABLE = require( './non_enumerable.json' );\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\tvar skipConstructor;\n\tvar skipPrototype;\n\tvar isFcn;\n\tvar out;\n\tvar k;\n\tvar p;\n\tvar i;\n\n\tout = [];\n\tif ( isArguments( value ) ) {\n\t\t// Account for environments which treat `arguments` differently...\n\t\tfor ( i = 0; i < value.length; i++ ) {\n\t\t\tout.push( i.toString() );\n\t\t}\n\t\t// Note: yes, we are precluding the `arguments` array-like object from having other enumerable properties; however, this should (1) be very rare and (2) not be encouraged (e.g., doing something like `arguments.a = 'b'`; in certain engines directly manipulating the `arguments` value results in automatic de-optimization).\n\t\treturn out;\n\t}\n\tif ( typeof value === 'string' ) {\n\t\t// Account for environments which do not treat string character indices as \"own\" properties...\n\t\tif ( value.length > 0 && !hasOwnProp( value, '0' ) ) {\n\t\t\tfor ( i = 0; i < value.length; i++ ) {\n\t\t\t\tout.push( i.toString() );\n\t\t\t}\n\t\t}\n\t} else {\n\t\tisFcn = ( typeof value === 'function' );\n\t\tif ( isFcn === false && !isObjectLike( value ) ) {\n\t\t\treturn out;\n\t\t}\n\t\tskipPrototype = ( HAS_ENUM_PROTO_BUG && isFcn );\n\t}\n\tfor ( k in value ) {\n\t\tif ( !( skipPrototype && k === 'prototype' ) && hasOwnProp( value, k ) ) {\n\t\t\tout.push( String( k ) );\n\t\t}\n\t}\n\tif ( HAS_NON_ENUM_PROPS_BUG ) {\n\t\tskipConstructor = isConstructorPrototype( value );\n\t\tfor ( i = 0; i < NON_ENUMERABLE.length; i++ ) {\n\t\t\tp = NON_ENUMERABLE[ i ];\n\t\t\tif ( !( skipConstructor && p === 'constructor' ) && hasOwnProp( value, p ) ) {\n\t\t\t\tout.push( String( p ) );\n\t\t\t}\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = keys;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar w = ( typeof window === 'undefined' ) ? void 0 : window;\n\n\n// EXPORTS //\n\nmodule.exports = w;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* var nativeClass = require( '@stdlib/utils-native-class' );\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nvar hasToStringTag = require( '@stdlib/assert-has-tostringtag-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar toStr = require( './tostring.js' );\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar toStringTag = require( './tostringtag.js' );\nvar toStr = require( './tostring.js' );\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nmodule.exports = toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Symbol = require( '@stdlib/symbol-ctor' );\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nmodule.exports = toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* No operation.\n*\n* @module @stdlib/utils-noop\n*\n* @example\n* var noop = require( '@stdlib/utils-noop' );\n*\n* noop();\n* // ...does nothing.\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* No operation.\n*\n* @example\n* noop();\n* // ...does nothing.\n*/\nfunction noop() {\n\t// Empty function...\n}\n\n\n// EXPORTS //\n\nmodule.exports = noop;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Object = require( '@stdlib/object-ctor' );\n\n\n// VARIABLES //\n\nvar propertySymbols = Object.getOwnPropertySymbols;\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own symbol properties.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.getOwnPropertySymbols()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own symbol properties\n*\n* @example\n* var symbols = getOwnPropertySymbols( {} );\n*/\nfunction getOwnPropertySymbols( value ) {\n\treturn propertySymbols( Object( value ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = getOwnPropertySymbols;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar bool = ( typeof Object.getOwnPropertySymbols !== 'undefined' );\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an array of an object's own symbol properties.\n*\n* @module @stdlib/utils-property-symbols\n*\n* @example\n* var getOwnPropertySymbols = require( '@stdlib/utils-property-symbols' );\n*\n* var symbols = getOwnPropertySymbols( {} );\n*/\n\n// MODULES //\n\nvar HAS_BUILTIN = require( './has_builtin.js' );\nvar builtin = require( './builtin.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar main;\nif ( HAS_BUILTIN ) {\n\tmain = builtin;\n} else {\n\tmain = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array of an object's own symbol properties.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.getOwnPropertySymbols()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {EmptyArray} a list of own symbol properties\n*\n* @example\n* var symbols = getOwnPropertySymbols( {} );\n* // returns []\n*/\nfunction getOwnPropertySymbols() {\n\treturn [];\n}\n\n\n// EXPORTS //\n\nmodule.exports = getOwnPropertySymbols;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar RE = require( './fixtures/re.js' );\nvar nodeList = require( './fixtures/nodelist.js' );\nvar typedarray = require( './fixtures/typedarray.js' );\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar getGlobal = require( '@stdlib/utils-global' );\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nmodule.exports = nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nmodule.exports = RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* var typeOf = require( '@stdlib/utils-type-of' );\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nvar usePolyfill = require( './check.js' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ctorName = require( '@stdlib/utils-constructor-name' );\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nmodule.exports = typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ctorName = require( '@stdlib/utils-constructor-name' );\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nmodule.exports = typeOf;\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import beta from \"@stdlib/random-base-beta\";\nimport mt19937 from \"@stdlib/random-base-mt19937\";\nimport { Mutable } from \"./utils\";\n\nexport type Seed = number;\n\nexport const MAX_PLUS_ONE = mt19937.MAX + 1;\n\nexport class PseudorandomStream {\n private mt;\n private bt;\n\n constructor(seed: Seed) {\n this.mt = mt19937.factory({ seed });\n this.bt = beta.factory({ state: this.mt.state, copy: false });\n }\n\n chance(chance: number): boolean {\n return this.mt() < chance * MAX_PLUS_ONE;\n }\n\n uniform({ min = 0, max = 1 }): number {\n return min + (this.mt() * (max - min)) / MAX_PLUS_ONE;\n }\n\n beta({\n a,\n b,\n min = 0,\n max = 1,\n }: {\n a: number;\n b: number;\n min?: number;\n max?: number;\n }): number {\n return min + this.bt(a, b) * (max - min);\n }\n\n uniformInt(args: { min?: number; max: number }) {\n return Math.floor(this.uniform(args));\n }\n\n betaInt(args: { a: number; b: number; min?: number; max?: number }): number {\n return Math.floor(this.beta(args));\n }\n\n uniformChoice(choices: readonly T[]): T {\n return choices[this.uniformInt({ max: choices.length })];\n }\n\n betaChoice(choices: readonly T[], { a, b }: { a: number; b: number }): T {\n return choices[this.betaInt({ a: a, b: b, max: choices.length })];\n }\n\n weightedChoice(bids: readonly { bid: number; item: T }[]): T {\n const b = bids.filter((bid) => bid.bid > 0);\n const totalWeight = b.reduce((acc, bid) => acc + bid.bid, 0);\n let randomValue = this.uniform({ max: totalWeight });\n\n for (const { bid, item } of b) {\n randomValue -= bid;\n if (randomValue <= 0) {\n return item;\n }\n }\n return b[b.length - 1].item;\n }\n\n shuffle(choices: readonly T[]): T[] {\n const r: T[] = [];\n for (let i = 0; i < choices.length; i++) {\n const j = Math.floor((this.mt() * i) / MAX_PLUS_ONE);\n if (i !== j) {\n r[i] = r[j];\n }\n r[j] = choices[i];\n }\n return r;\n }\n}\n\n/**\n * DO NOT RE-ORDER THIS ENUM!\n * ALWAYS APPEND NEW ENTRIES TO THE END!\n *\n * Otherwise, new versions of groundHog will generate wildly different caverns\n * from the same seeds in a previous version.\n */\nenum Die {\n init = 0,\n partition,\n weave,\n flood,\n pickSpawn,\n pickArchitect,\n pearl,\n prime,\n rough,\n placeRechargeSeam,\n placeBuildings,\n placeCrystals,\n placeOre,\n placeLandslides,\n placeErosion,\n placeEntities,\n lore,\n scriptGlobals,\n script,\n monsterSpawnScript,\n brace,\n height,\n placeSlugHoles,\n slugSpawnScript,\n}\n\n/**\n * A box of pseudo-random streams. Streams are separated into \"kinds\" - each one\n * having its own root seed. Some kinds are further separated by applying\n * a fixed numerical offset to these root seeds. The result is a pile of consistent\n * but mostly independent pseudo-random number generators that should prevent\n * independent changes in one area of cavern generation from affecting other areas.\n */\nexport class DiceBox {\n seed: number;\n private boxes: readonly {\n seed: Seed;\n rngs: Array;\n }[];\n\n constructor(seed: Seed) {\n this.seed = seed;\n // Patch for https://github.com/stdlib-js/stdlib/issues/1963\n if (seed === 0) {\n seed = 1999;\n }\n const mt = mt19937.factory({ seed });\n const boxesLength = Object.keys(Die).length;\n const boxes: Mutable = [];\n for (let i = 0; i < boxesLength; i++) {\n boxes[i] = { seed: mt(), rngs: [] };\n }\n this.boxes = boxes;\n }\n\n private prng(die: Die, offset: number): PseudorandomStream {\n const box = this.boxes[die];\n let r = box.rngs[offset];\n if (!r) {\n const seed = (box.seed + offset * 1999 + MAX_PLUS_ONE) % MAX_PLUS_ONE;\n r = new PseudorandomStream(seed);\n box.rngs[offset] = r;\n }\n return r;\n }\n\n init(id: number) {\n return this.prng(Die.init, id);\n }\n\n get partition() {\n return this.prng(Die.partition, 0);\n }\n\n get weave() {\n return this.prng(Die.weave, 0);\n }\n\n get flood() {\n return this.prng(Die.flood, 0);\n }\n\n get pickSpawn() {\n return this.prng(Die.pickSpawn, 0);\n }\n\n pickArchitect = (id: number) => this.prng(Die.pickArchitect, id);\n prime = (id: number) => this.prng(Die.prime, id);\n pearl = (id: number) => this.prng(Die.pearl, id);\n rough = (id: number) => this.prng(Die.rough, id);\n\n get brace() {\n return this.prng(Die.brace, 0);\n }\n\n placeRechargeSeam = (id: number) => this.prng(Die.placeRechargeSeam, id);\n placeBuildings = (id: number) => this.prng(Die.placeBuildings, id);\n placeCrystals = (id: number) => this.prng(Die.placeCrystals, id);\n placeOre = (id: number) => this.prng(Die.placeOre, id);\n placeSlugHoles = (id: number) => this.prng(Die.placeSlugHoles, id);\n\n placeLandslides = (id: number) => this.prng(Die.placeLandslides, id);\n placeErosion = (id: number) => this.prng(Die.placeErosion, id);\n placeEntities = (id: number) => this.prng(Die.placeEntities, id);\n\n lore = (id: number) => this.prng(Die.lore, id);\n\n get height() {\n return this.prng(Die.height, 0);\n }\n\n get scriptGlobals() {\n return this.prng(Die.scriptGlobals, 0);\n }\n\n script = (id: number) => this.prng(Die.script, id);\n monsterSpawnScript = (id: number) => this.prng(Die.monsterSpawnScript, id);\n slugSpawnScript = (id: number) => this.prng(Die.slugSpawnScript, id);\n}\n","import { DiceBox } from \"./prng\";\n\nexport type Biome = \"rock\" | \"ice\" | \"lava\";\n\n/**\n * Some values are \"curved\" so they change based on distance from spawn.\n * These values can be negative to decrease a value away from spawn.\n */\nexport type Curve = {\n /** The base value at spawn. */\n readonly base: number;\n /**\n * This value is multiplied by a number from 0 to 1 depending on the ratio\n * of the maximum possible distance away from spawn.\n */\n readonly hops: number;\n /**\n * This value is multiplied by a number from 0 to 1 depending on the order\n * the caves / halls are visited in.\n */\n readonly order: number;\n};\n\nexport type CavernContext = {\n /** The root seed for the dice box. */\n seed: number;\n\n /** Any values not infered directly from the seed. */\n overrides: readonly (keyof CavernContext)[];\n /**\n * Which biome this map is in. Biome affects the default setting for some\n * other context values, such as how much water or lava a map has.\n */\n biome: Biome;\n\n /**\n * The \"target\" final size for the cavern.\n * The final size may be larger or smaller due to random fluctuations -\n * larger caverns will not be explicitly cropped to fit this value.\n */\n targetSize: number;\n /**\n * The maximum aspect ratio baseplates can have.\n */\n baseplateMaxOblongness: number;\n /**\n * Baseplates may be at most this ratio of the target size.\n */\n baseplateMaxRatioOfSize: number;\n /**\n * Promote this many baseplates to become caves.\n * The higher this number is, the more \"busy\" the final map will be.\n */\n caveCount: number;\n /**\n * Add at most this many extra redundant paths.\n */\n optimalAuxiliaryPathCount: number;\n /**\n * Add at most this many extra redundant paths.\n */\n randomAuxiliaryPathCount: number;\n /**\n * Auxiliary paths will not be chosen if they make an angle less than this\n * against another path.\n */\n auxiliaryPathMinAngle: number;\n /**\n * How many plans to flood with water.\n */\n waterPlans: number;\n /**\n * How many plans to flood with lava.\n */\n lavaPlans: number;\n /**\n * How many contiguous water \"lakes\" to generate.\n */\n waterLakes: number;\n /**\n * How many contiguous lava \"lakes\" to generate.\n */\n lavaLakes: number;\n /**\n * How many plans will have erosion? Note that lava-flooded plans do not\n * necessarily have erosion, so this number has some overlap with that.\n */\n erosionPlans: number;\n /**\n * Does this cavern have monsters in it?\n */\n hasMonsters: boolean;\n /**\n * Does this cavern have slugs in it?\n */\n hasSlugs: boolean;\n /**\n * Does this cavern have limited air?\n */\n hasAirLimit: boolean;\n /**\n * How blobby and jagged caves should be.\n * 0 results in perfectly squashed octagons.\n * Larger values can result in oversized spaces or extremely jagged caves, up\n * to about 70% where caves start to get simpler and smaller.\n */\n caveBaroqueness: number;\n /**\n * How blobby and jagged halls should be.\n * 0 results in perfect squashed octagons.\n * Larger values can result in oversized spaces or extremely jagged halls, up\n * to about 70% where caves start to get simpler and smaller.\n */\n hallBaroqueness: number;\n\n /**\n * Curve for determining how many crystals each cave will have.\n * This is roughly measured by crystals per unit of perimeter of the cave.\n */\n caveCrystalRichness: Curve;\n /**\n * Curve for determining how many crystals each hall will have.\n * This is roughly measured by crystals per unit of perimeter of the hall.\n */\n hallCrystalRichness: Curve;\n /**\n * Curve for determining how much additional ore each cave will have.\n * This is roughly measured by ore per unit of perimeter of the cave, and\n * does not include the 4 ore yielded by clearing rubble.\n */\n caveOreRichness: Curve;\n /**\n * Curve for determining how much additional ore each hall will have.\n * This is roughly measured by ore per unit of perimeter of the hall, and\n * does not include the 4 ore yielded by clearing rubble.\n */\n hallOreRichness: Curve;\n\n /**\n * How many monsters to spawn per minute in a cave, if monsters are enabled.\n */\n monsterSpawnRate: Curve;\n /**\n * How many monsters to spawn at a time in a cave, if monsters are enabled.\n */\n monsterWaveSize: Curve;\n /**\n * Adjusts the likelihood of architects appearing.\n * Architects that are \"encouraged\" have their chance multiplied by a high\n * number to make them appear wherever they are applicable.\n * Architects that are \"discouraged\" have a 0 chance of appearing, which may\n * cause a crash if that was the only architect possible for a cave or hall.\n * Note that adjusting this may cause other seemingly unrelated caves to use\n * different architects as the probabilities shift.\n */\n architects: { [key: string]: \"encourage\" | \"disable\" };\n /**\n * The chance each cave will have a recharge seam. Some caves (such as spawn)\n * will always have a recharge seam.\n */\n caveHasRechargeSeamChance: number;\n /** The chance each hall will have a recharge seam. */\n hallHasRechargeSeamChance: number;\n /**\n * The chance each crystal placed will immediately place a seam instead,\n * assuming it is possible to do so. When this is set to 0, seams may still\n * appear since any wall with 4 or more crystals will be automatically\n * upgraded to a seam.\n */\n caveCrystalSeamBias: number;\n /**\n * The chance each crystal placed will immediately place a seam instead,\n * assuming it is possible to do so. When this is set to 0, seams may still\n * appear since any wall with 4 or more crystals will be automatically\n * upgraded to a seam.\n */\n hallCrystalSeamBias: number;\n /**\n * The chance each ore placed will immediately place a seam instead,\n * assuming it is possible to do so. When this is set to 0, seams may still\n * appear since any wall with 4 or more ore will be automatically\n * upgraded to a seam.\n */\n caveOreSeamBias: number;\n /**\n * The chance each ore placed will immediately place a seam instead,\n * assuming it is possible to do so. When this is set to 0, seams may still\n * appear since any wall with 4 or more ore will be automatically\n * upgraded to a seam.\n */\n hallOreSeamBias: number;\n /**\n * The chance each normal cave will have a slug hole, regardless of whether\n * Slimy Slugs are enabled in this level.\n */\n caveHasSlugHoleChance: number;\n /**\n * The chance each normal hall will have a slug hole, regardless of whether\n * Slimy Slugs are enabled in this level.\n */\n hallHasSlugHoleChance: number;\n /** The chance each cave will have landslides at all. */\n caveHasLandslidesChance: number;\n /** The chance each hall will have landslides at all. */\n hallHasLandslidesChance: number;\n /** The range of cooldowns to use in caves that have landslides. */\n caveLandslideCooldownRange: { min: number; max: number };\n /** The range of cooldowns to use in halls that have landslides. */\n hallLandslideCooldownRange: { min: number; max: number };\n /**\n * Approximately what portion of all the Energy Crystals available in the\n * level should be used as the goal, if there is a crystal goal.\n * For most Rock Raiders levels, this tends to be about 20%.\n */\n crystalGoalRatio: number;\n /**\n * The heightmap will try to generate caves at a height that is +/- this\n * number. If this is set to 0, height generation will be skipped and the\n * entire map will be flat.\n */\n heightTargetRange: number;\n /**\n * The number of passes to spread cave target heights into the void.\n */\n stratascosity: number;\n /**\n * How closely the strataflux step should adhere to target heights.\n */\n strataplanity: number;\n /**\n * The maximum height difference between two points on the side of any tile\n * that is part of an arbitrary cave. Some tiles (like water) and caves (like\n * those intended to be built in) will be further restricted.\n */\n caveMaxSlope: number;\n /**\n * The maximum height difference between two points on the side of any tile\n * that is part of an arbitrary hall. Some tiles (like water) will be further\n * restricted.\n */\n hallMaxSlope: number;\n /**\n * The maximum height difference between two points on the side of any tile\n * that is outside the playable area - that is, undrillable solid rock.\n */\n voidMaxSlope: number;\n /**\n * The maximum height difference between two points on the side of any tile\n * that is out of play on the border of the map.\n */\n borderMaxSlope: number;\n /**\n * GroundHog attempts to calculate how much air is needed to build a Support\n * Station by playing perfectly through a (rough) simulation of the level.\n * In theory, it should be possible for a very good player to match or beat\n * this simulation - but that's not going to be fun. Multiply the estimate by\n * the safety factor to get the final air number.\n */\n airSafetyFactor: number;\n};\n\nenum Die {\n biome = 0,\n targetSize,\n hasMonsters,\n flood,\n heightTargetRange,\n hasSlugs,\n hasAirLimit,\n}\n\nconst STANDARD_DEFAULTS = {\n baseplateMaxOblongness: 3,\n baseplateMaxRatioOfSize: 0.33,\n caveCount: 20,\n optimalAuxiliaryPathCount: 2,\n randomAuxiliaryPathCount: 3,\n auxiliaryPathMinAngle: Math.PI / 4,\n caveBaroqueness: 0.16,\n hallBaroqueness: 0.07,\n caveCrystalRichness: { base: 0.16, hops: 0.32, order: 0.32 },\n hallCrystalRichness: { base: 0.07, hops: 0, order: 0 },\n caveOreRichness: { base: 1.19, hops: -0.16, order: -0.08 },\n hallOreRichness: { base: 0.12, hops: 0, order: 0 },\n monsterSpawnRate: { base: 0.3, hops: 0.56, order: 0.6 },\n monsterWaveSize: { base: 1.75, hops: 2.0, order: 3.0 },\n architects: {},\n caveCrystalSeamBias: 0.05,\n hallCrystalSeamBias: 0.05,\n caveOreSeamBias: 0.05,\n hallOreSeamBias: 0.05,\n hallHasSlugHoleChance: 0,\n stratascosity: 0,\n strataplanity: 3,\n caveHasLandslidesChance: 0.4,\n hallHasLandslidesChance: 0.8,\n caveLandslideCooldownRange: { min: 15, max: 120 },\n hallLandslideCooldownRange: { min: 30, max: 150 },\n airSafetyFactor: 2,\n crystalGoalRatio: 0.2,\n} as const satisfies Partial;\n\nconst DEFAULTS_FOR_BIOME = {\n rock: {\n caveHasRechargeSeamChance: 0.07,\n hallHasRechargeSeamChance: 0.02,\n caveHasSlugHoleChance: 0.05,\n caveMaxSlope: 75,\n hallMaxSlope: 90,\n voidMaxSlope: 120,\n borderMaxSlope: 200,\n },\n ice: {\n caveHasRechargeSeamChance: 0.07,\n hallHasRechargeSeamChance: 0.07,\n caveHasSlugHoleChance: 0,\n caveMaxSlope: 30,\n hallMaxSlope: 30,\n voidMaxSlope: 40,\n borderMaxSlope: 100,\n },\n lava: {\n caveHasRechargeSeamChance: 0.1,\n hallHasRechargeSeamChance: 0.04,\n caveHasSlugHoleChance: 0.01,\n caveMaxSlope: 60,\n hallMaxSlope: 90,\n voidMaxSlope: 120,\n borderMaxSlope: 200,\n },\n} as const satisfies { [K in Biome]: Partial };\n\nfunction getDefaultFlooding(dice: DiceBox, biome: Biome) {\n const rng = dice.init(Die.flood);\n const waterPlans = rng.betaInt({\n a: 1.4,\n b: 1.4,\n ...{\n rock: { min: 0, max: 8 },\n ice: { min: 0, max: 20 },\n lava: { min: 0, max: 4 },\n }[biome],\n });\n const waterLakes =\n waterPlans > 3 ? rng.uniformInt({ min: 1, max: waterPlans / 2 }) : 1;\n const lavaPlans = rng.betaInt({\n a: 1.4,\n b: 1.4,\n ...{\n rock: { min: 0, max: 4 },\n ice: { min: 0, max: 2 },\n lava: { min: 4, max: 16 },\n }[biome],\n });\n const lavaLakes =\n lavaPlans > 3\n ? rng.uniformInt({ min: 1, max: Math.min(lavaPlans / 2, 3) })\n : 1;\n const erosionPlans =\n lavaPlans > 0\n ? rng.betaInt(\n {\n rock: { a: 0.8, b: 1.4, min: 0, max: 6 },\n ice: { a: 0.5, b: 1.8, min: 0, max: 4 },\n lava: { a: 1.4, b: 1.4, min: 0, max: 16 },\n }[biome],\n )\n : 0;\n return { waterPlans, waterLakes, lavaPlans, lavaLakes, erosionPlans };\n}\n\nexport function inferContextDefaults(\n args: Partial> & Pick,\n): CavernContext {\n const dice = new DiceBox(args.seed);\n const r = {\n biome: dice\n .init(Die.biome)\n .uniformChoice([\"rock\", \"ice\", \"lava\"] as Biome[]),\n hasMonsters: dice.init(Die.hasMonsters).chance(0.75),\n targetSize: dice.init(Die.targetSize).uniformInt({ min: 50, max: 78 }),\n ...args,\n };\n const hasAirLimit = dice.init(Die.hasAirLimit).chance(0.75);\n const hasSlugs = dice.init(Die.hasSlugs).chance(\n {\n rock: 0.25,\n ice: 0.01,\n lava: 0.05,\n }[r.biome],\n );\n const heightTargetRange = dice.init(Die.heightTargetRange).betaInt(\n {\n rock: { a: 3, b: 1, min: 100, max: 500 },\n ice: { a: 1, b: 3, min: 100, max: 500 },\n lava: { a: 2, b: 1.5, min: 100, max: 500 },\n }[r.biome],\n );\n return {\n ...STANDARD_DEFAULTS,\n ...DEFAULTS_FOR_BIOME[r.biome],\n ...getDefaultFlooding(dice, r.biome),\n hasAirLimit,\n hasSlugs,\n heightTargetRange,\n ...r,\n overrides: Object.keys(args)\n .filter((k) => k !== \"seed\")\n .sort() as (keyof CavernContext)[],\n };\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"contextInput\":\"style_contextInput__1OoGc\",\"section\":\"style_section__UU5kL\",\"subsection\":\"style_subsection__V6nKB\",\"inputRow\":\"style_inputRow__e-kmi\",\"icon\":\"style_icon__w+PGc\",\"inactive\":\"style_inactive__-rc9v\",\"invisible\":\"style_invisible__I4pew\",\"override\":\"style_override__ZXWWz\",\"seed\":\"style_seed__gS1FQ\",\"showAdvanced\":\"style_showAdvanced__sTHS2\",\"curve\":\"style_curve__v3DHl\"};","export type Point = readonly [number, number];\nexport type Cardinal4 = typeof NORTH | typeof EAST | typeof SOUTH | typeof WEST;\nexport type Cardinal8 =\n | Cardinal4\n | typeof NORTH_EAST\n | typeof SOUTH_EAST\n | typeof SOUTH_WEST\n | typeof NORTH_WEST;\n\nexport const ORIGIN = [0, 0] as const;\nexport const NORTH = [0, -1] as const;\nexport const NORTH_EAST = [1, -1] as const;\nexport const EAST = [1, 0] as const;\nexport const SOUTH_EAST = [1, 1] as const;\nexport const SOUTH = [0, 1] as const;\nexport const SOUTH_WEST = [-1, 1] as const;\nexport const WEST = [-1, 0] as const;\nexport const NORTH_WEST = [-1, -1] as const;\n\nexport const NSEW = [NORTH, SOUTH, EAST, WEST] as const;\nexport const NEIGHBORS8 = [\n NORTH,\n NORTH_EAST,\n EAST,\n SOUTH_EAST,\n SOUTH,\n SOUTH_WEST,\n WEST,\n NORTH_WEST,\n] as const;\n\nexport function isAdjacent4(a: Point, b: Point) {\n return (\n (a[0] === b[0] && Math.abs(a[1] - b[1]) <= 1) ||\n (a[1] === b[1] && Math.abs(a[0] - b[0]) <= 1)\n );\n}\n\nexport function isAdjacent8(a: Point, b: Point) {\n return Math.abs(a[0] - b[0]) <= 1 && Math.abs(a[1] - b[1]) <= 1;\n}\n\nexport function offsetBy([x, y]: Point, [ox, oy]: Point): Point {\n return [x + ox, y + oy];\n}\n\nexport function* plotLine(a: Point, b: Point): IterableIterator {\n let x = Math.floor(a[0]);\n let y = Math.floor(a[1]);\n const destX = Math.floor(b[0]);\n const destY = Math.floor(b[1]);\n\n const dx = Math.abs(destX - x);\n const sx = destX > x ? 1 : -1;\n const dy = -Math.abs(destY - y);\n const sy = destY > y ? 1 : -1;\n\n let error = dx + dy;\n\n while (true) {\n yield [x, y];\n\n if (x === destX && y === destY) {\n break;\n }\n\n const e2 = 2 * error;\n const moveX = e2 >= dy;\n const moveY = e2 <= dx;\n\n if (moveX) {\n if (x === destX) {\n break;\n }\n error += dy;\n x += sx;\n }\n\n if (moveY) {\n if (moveX) {\n yield [x, y];\n }\n if (y === destY) {\n break;\n }\n error += dx;\n y += sy;\n }\n }\n}\n\nexport function radsToDegrees(rads: number) {\n return (((rads * 180) / Math.PI + 180) % 360) - 180;\n}\n\nexport function rotateAround([x, y]: Point): Point {\n return [-x, -y];\n}\n\nexport function rotateLeft([x, y]: Point): Point {\n return [y, -x];\n}\n\nexport function rotateRight([x, y]: Point): Point {\n return [-y, x];\n}\n","import React, { CSSProperties } from \"react\";\nimport styles from \"./style.module.scss\";\nimport { CavernContext, Curve } from \"../../../core/common\";\nimport { radsToDegrees } from \"../../../core/common/geometry\";\n\nexport type UpdateData = {\n update: React.Dispatch>;\n context: Partial;\n contextWithDefaults: CavernContext | undefined;\n};\ntype KeysMatching = {\n [K in keyof T]-?: T[K] extends V ? K : never;\n}[keyof T];\n\nexport const Choice = ({\n of,\n choices,\n update,\n context,\n contextWithDefaults,\n}: {\n of: K;\n choices: CavernContext[K][];\n} & UpdateData) => (\n <>\n

{of}

\n
\n {choices.map((choice) => {\n const classes = [styles.choice];\n const selected = context[of] === choice;\n if (selected) {\n classes.push(styles.override);\n }\n const active = contextWithDefaults?.[of] === choice;\n classes.push(active ? styles.active : styles.inactive);\n\n return (\n {\n update({ [of]: selected ? undefined : choice });\n }}\n >\n {`${choice}`}\n \n );\n })}\n
\n \n);\n\nexport const CurveSliders = ({\n of,\n min,\n max,\n step,\n update,\n context,\n contextWithDefaults,\n}: {\n of: KeysMatching;\n min: number;\n max: number;\n step: number;\n} & UpdateData) => {\n function updateCurve(key: \"base\" | \"hops\" | \"order\", value: number) {\n update({\n [of]: { ...contextWithDefaults?.[of], ...context?.[of], [key]: value },\n });\n }\n\n return (\n <>\n

{of}:

\n

\n {contextWithDefaults?.[of]?.base?.toFixed(2)},{\" \"}\n {contextWithDefaults?.[of]?.hops?.toFixed(2)},{\" \"}\n {contextWithDefaults?.[of]?.order?.toFixed(2)}\n

\n
\n
\n {([\"base\", \"hops\", \"order\"] as const).map((key) => {\n const value = contextWithDefaults?.[of]?.[key] ?? min;\n return (\n updateCurve(key, ev.target.valueAsNumber)}\n />\n );\n })}\n
\n {of in context ? (\n update({ [of]: undefined })}\n >\n undo\n \n ) : (\n
\n )}\n
\n \n );\n};\n\nexport const Slider = ({\n of,\n min,\n max,\n percent,\n angle,\n step,\n update,\n context,\n contextWithDefaults,\n}: {\n of: KeysMatching;\n min: number;\n max: number;\n percent?: boolean;\n angle?: boolean;\n step?: number;\n} & UpdateData) => {\n const value = context[of] ?? contextWithDefaults?.[of] ?? min;\n return (\n <>\n

\n {of}:{\" \"}\n {percent ? (\n <>{(value * 100).toFixed()}%\n ) : angle ? (\n <>{radsToDegrees(value).toFixed()}°\n ) : (\n value\n )}\n

\n
\n update({ [of]: ev.target.valueAsNumber })}\n />\n {context[of] === undefined ? (\n
\n ) : (\n update({ [of]: undefined })}\n >\n undo\n \n )}\n
\n \n );\n};\n","export const epsilon = 1.1102230246251565e-16;\nexport const splitter = 134217729;\nexport const resulterrbound = (3 + 8 * epsilon) * epsilon;\n\n// fast_expansion_sum_zeroelim routine from oritinal code\nexport function sum(elen, e, flen, f, h) {\n let Q, Qnew, hh, bvirt;\n let enow = e[0];\n let fnow = f[0];\n let eindex = 0;\n let findex = 0;\n if ((fnow > enow) === (fnow > -enow)) {\n Q = enow;\n enow = e[++eindex];\n } else {\n Q = fnow;\n fnow = f[++findex];\n }\n let hindex = 0;\n if (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = enow + Q;\n hh = Q - (Qnew - enow);\n enow = e[++eindex];\n } else {\n Qnew = fnow + Q;\n hh = Q - (Qnew - fnow);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n while (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n } else {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n }\n while (eindex < elen) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n while (findex < flen) {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function sum_three(alen, a, blen, b, clen, c, tmp, out) {\n return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out);\n}\n\n// scale_expansion_zeroelim routine from oritinal code\nexport function scale(elen, e, b, h) {\n let Q, sum, hh, product1, product0;\n let bvirt, c, ahi, alo, bhi, blo;\n\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n let enow = e[0];\n Q = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo);\n let hindex = 0;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n for (let i = 1; i < elen; i++) {\n enow = e[i];\n product1 = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo);\n sum = Q + product0;\n bvirt = sum - Q;\n hh = Q - (sum - bvirt) + (product0 - bvirt);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n Q = product1 + sum;\n hh = sum - (Q - product1);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function negate(elen, e) {\n for (let i = 0; i < elen; i++) e[i] = -e[i];\n return elen;\n}\n\nexport function estimate(elen, e) {\n let Q = e[0];\n for (let i = 1; i < elen; i++) Q += e[i];\n return Q;\n}\n\nexport function vec(n) {\n return new Float64Array(n);\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum} from './util.js';\n\nconst ccwerrboundA = (3 + 16 * epsilon) * epsilon;\nconst ccwerrboundB = (2 + 12 * epsilon) * epsilon;\nconst ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon;\n\nconst B = vec(4);\nconst C1 = vec(8);\nconst C2 = vec(12);\nconst D = vec(16);\nconst u = vec(4);\n\nfunction orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {\n let acxtail, acytail, bcxtail, bcytail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const acx = ax - cx;\n const bcx = bx - cx;\n const acy = ay - cy;\n const bcy = by - cy;\n\n s1 = acx * bcy;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcx;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n B[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n B[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n B[2] = _j - (u3 - bvirt) + (_i - bvirt);\n B[3] = u3;\n\n let det = estimate(4, B);\n let errbound = ccwerrboundB * detsum;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - acx;\n acxtail = ax - (acx + bvirt) + (bvirt - cx);\n bvirt = bx - bcx;\n bcxtail = bx - (bcx + bvirt) + (bvirt - cx);\n bvirt = ay - acy;\n acytail = ay - (acy + bvirt) + (bvirt - cy);\n bvirt = by - bcy;\n bcytail = by - (bcy + bvirt) + (bvirt - cy);\n\n if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) {\n return det;\n }\n\n errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det);\n det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);\n if (det >= errbound || -det >= errbound) return det;\n\n s1 = acxtail * bcy;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcx;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C1len = sum(4, B, 4, u, C1);\n\n s1 = acx * bcytail;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcxtail;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C2len = sum(C1len, C1, 4, u, C2);\n\n s1 = acxtail * bcytail;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcxtail;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const Dlen = sum(C2len, C2, 4, u, D);\n\n return D[Dlen - 1];\n}\n\nexport function orient2d(ax, ay, bx, by, cx, cy) {\n const detleft = (ay - cy) * (bx - cx);\n const detright = (ax - cx) * (by - cy);\n const det = detleft - detright;\n\n const detsum = Math.abs(detleft + detright);\n if (Math.abs(det) >= ccwerrboundA * detsum) return det;\n\n return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);\n}\n\nexport function orient2dfast(ax, ay, bx, by, cx, cy) {\n return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy);\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum, scale} from './util.js';\n\nconst o3derrboundA = (7 + 56 * epsilon) * epsilon;\nconst o3derrboundB = (3 + 28 * epsilon) * epsilon;\nconst o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst at_b = vec(4);\nconst at_c = vec(4);\nconst bt_c = vec(4);\nconst bt_a = vec(4);\nconst ct_a = vec(4);\nconst ct_b = vec(4);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abt = vec(8);\nconst u = vec(4);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _16 = vec(8);\nconst _12 = vec(12);\n\nlet fin = vec(192);\nlet fin2 = vec(192);\n\nfunction finadd(finlen, alen, a) {\n finlen = sum(finlen, fin, alen, a, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction tailinit(xtail, ytail, ax, ay, bx, by, a, b) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3, negate;\n if (xtail === 0) {\n if (ytail === 0) {\n a[0] = 0;\n b[0] = 0;\n return 1;\n } else {\n negate = -ytail;\n s1 = negate * ax;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n }\n } else {\n if (ytail === 0) {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n negate = -xtail;\n s1 = negate * by;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n } else {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ytail * ax;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n a[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n a[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n a[2] = _j - (u3 - bvirt) + (_i - bvirt);\n a[3] = u3;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = xtail * by;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n b[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n b[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n b[2] = _j - (u3 - bvirt) + (_i - bvirt);\n b[3] = u3;\n return 4;\n }\n }\n}\n\nfunction tailadd(finlen, a, b, k, z) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3;\n s1 = a * b;\n c = splitter * a;\n ahi = c - (c - a);\n alo = a - ahi;\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n c = splitter * k;\n bhi = c - (c - k);\n blo = k - bhi;\n _i = s0 * k;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * k;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n if (z !== 0) {\n c = splitter * z;\n bhi = c - (c - z);\n blo = z - bhi;\n _i = s0 * z;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * z;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n }\n return finlen;\n}\n\nfunction orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail;\n let adytail, bdytail, cdytail;\n let adztail, bdztail, cdztail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n scale(4, bc, adz, _8), _8,\n scale(4, ca, bdz, _8b), _8b, _16), _16,\n scale(4, ab, cdz, _8), _8, fin);\n\n let det = estimate(finlen, fin);\n let errbound = o3derrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n bvirt = az - adz;\n adztail = az - (adz + bvirt) + (bvirt - dz);\n bvirt = bz - bdz;\n bdztail = bz - (bdz + bvirt) + (bvirt - dz);\n bvirt = cz - cdz;\n cdztail = cz - (cdz + bvirt) + (bvirt - dz);\n\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 &&\n adytail === 0 && bdytail === 0 && cdytail === 0 &&\n adztail === 0 && bdztail === 0 && cdztail === 0) {\n return det;\n }\n\n errbound = o3derrboundC * permanent + resulterrbound * Math.abs(det);\n det +=\n adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) +\n bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) +\n cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx);\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c);\n const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a);\n const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b);\n\n const bctlen = sum(bt_len, bt_c, ct_len, ct_b, bct);\n finlen = finadd(finlen, scale(bctlen, bct, adz, _16), _16);\n\n const catlen = sum(ct_len, ct_a, at_len, at_c, cat);\n finlen = finadd(finlen, scale(catlen, cat, bdz, _16), _16);\n\n const abtlen = sum(at_len, at_b, bt_len, bt_a, abt);\n finlen = finadd(finlen, scale(abtlen, abt, cdz, _16), _16);\n\n if (adztail !== 0) {\n finlen = finadd(finlen, scale(4, bc, adztail, _12), _12);\n finlen = finadd(finlen, scale(bctlen, bct, adztail, _16), _16);\n }\n if (bdztail !== 0) {\n finlen = finadd(finlen, scale(4, ca, bdztail, _12), _12);\n finlen = finadd(finlen, scale(catlen, cat, bdztail, _16), _16);\n }\n if (cdztail !== 0) {\n finlen = finadd(finlen, scale(4, ab, cdztail, _12), _12);\n finlen = finadd(finlen, scale(abtlen, abt, cdztail, _16), _16);\n }\n\n if (adxtail !== 0) {\n if (bdytail !== 0) {\n finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail);\n }\n if (cdytail !== 0) {\n finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail);\n }\n }\n if (bdxtail !== 0) {\n if (cdytail !== 0) {\n finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail);\n }\n if (adytail !== 0) {\n finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail);\n }\n }\n if (cdxtail !== 0) {\n if (adytail !== 0) {\n finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail);\n }\n if (bdytail !== 0) {\n finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n\n const det =\n adz * (bdxcdy - cdxbdy) +\n bdz * (cdxady - adxcdy) +\n cdz * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz);\n\n const errbound = o3derrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n\n return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent);\n}\n\nexport function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n return adx * (bdy * cdz - bdz * cdy) +\n bdx * (cdy * adz - cdz * ady) +\n cdx * (ady * bdz - adz * bdy);\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale} from './util.js';\n\nconst iccerrboundA = (10 + 96 * epsilon) * epsilon;\nconst iccerrboundB = (4 + 48 * epsilon) * epsilon;\nconst iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst aa = vec(4);\nconst bb = vec(4);\nconst cc = vec(4);\nconst u = vec(4);\nconst v = vec(4);\nconst axtbc = vec(8);\nconst aytbc = vec(8);\nconst bxtca = vec(8);\nconst bytca = vec(8);\nconst cxtab = vec(8);\nconst cytab = vec(8);\nconst abt = vec(8);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abtt = vec(4);\nconst bctt = vec(4);\nconst catt = vec(4);\n\nconst _8 = vec(8);\nconst _16 = vec(16);\nconst _16b = vec(16);\nconst _16c = vec(16);\nconst _32 = vec(32);\nconst _32b = vec(32);\nconst _48 = vec(48);\nconst _64 = vec(64);\n\nlet fin = vec(1152);\nlet fin2 = vec(1152);\n\nfunction finadd(finlen, a, alen) {\n finlen = sum(finlen, fin, a, alen, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;\n let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen;\n let abtlen, bctlen, catlen;\n let abttlen, bcttlen, cattlen;\n let n1, n0;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n sum(\n scale(scale(4, bc, adx, _8), _8, adx, _16), _16,\n scale(scale(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32,\n sum(\n scale(scale(4, ca, bdx, _8), _8, bdx, _16), _16,\n scale(scale(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64,\n sum(\n scale(scale(4, ab, cdx, _8), _8, cdx, _16), _16,\n scale(scale(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin);\n\n let det = estimate(finlen, fin);\n let errbound = iccerrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) {\n return det;\n }\n\n errbound = iccerrboundC * permanent + resulterrbound * Math.abs(det);\n det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) +\n 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx)) +\n ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) +\n 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) +\n ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) +\n 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = adx * adx;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = ady * ady;\n c = splitter * ady;\n ahi = c - (c - ady);\n alo = ady - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n aa[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n aa[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n aa[2] = _j - (u3 - bvirt) + (_i - bvirt);\n aa[3] = u3;\n }\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = bdx * bdx;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = bdy * bdy;\n c = splitter * bdy;\n ahi = c - (c - bdy);\n alo = bdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n bb[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n bb[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bb[3] = u3;\n }\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = cdx * cdx;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = cdy * cdy;\n c = splitter * cdy;\n ahi = c - (c - cdy);\n alo = cdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n cc[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n cc[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cc[3] = u3;\n }\n\n if (adxtail !== 0) {\n axtbclen = scale(4, bc, adxtail, axtbc);\n finlen = finadd(finlen, sum_three(\n scale(axtbclen, axtbc, 2 * adx, _16), _16,\n scale(scale(4, cc, adxtail, _8), _8, bdy, _16b), _16b,\n scale(scale(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48);\n }\n if (adytail !== 0) {\n aytbclen = scale(4, bc, adytail, aytbc);\n finlen = finadd(finlen, sum_three(\n scale(aytbclen, aytbc, 2 * ady, _16), _16,\n scale(scale(4, bb, adytail, _8), _8, cdx, _16b), _16b,\n scale(scale(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48);\n }\n if (bdxtail !== 0) {\n bxtcalen = scale(4, ca, bdxtail, bxtca);\n finlen = finadd(finlen, sum_three(\n scale(bxtcalen, bxtca, 2 * bdx, _16), _16,\n scale(scale(4, aa, bdxtail, _8), _8, cdy, _16b), _16b,\n scale(scale(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48);\n }\n if (bdytail !== 0) {\n bytcalen = scale(4, ca, bdytail, bytca);\n finlen = finadd(finlen, sum_three(\n scale(bytcalen, bytca, 2 * bdy, _16), _16,\n scale(scale(4, cc, bdytail, _8), _8, adx, _16b), _16b,\n scale(scale(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48);\n }\n if (cdxtail !== 0) {\n cxtablen = scale(4, ab, cdxtail, cxtab);\n finlen = finadd(finlen, sum_three(\n scale(cxtablen, cxtab, 2 * cdx, _16), _16,\n scale(scale(4, bb, cdxtail, _8), _8, ady, _16b), _16b,\n scale(scale(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48);\n }\n if (cdytail !== 0) {\n cytablen = scale(4, ab, cdytail, cytab);\n finlen = finadd(finlen, sum_three(\n scale(cytablen, cytab, 2 * cdy, _16), _16,\n scale(scale(4, aa, cdytail, _8), _8, bdx, _16b), _16b,\n scale(scale(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48);\n }\n\n if (adxtail !== 0 || adytail !== 0) {\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = bdxtail * cdy;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * cdytail;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n s1 = cdxtail * -bdy;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * -bdy;\n bhi = c - (c - -bdy);\n blo = -bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * -bdytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * -bdytail;\n bhi = c - (c - -bdytail);\n blo = -bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n bctlen = sum(4, u, 4, v, bct);\n s1 = bdxtail * cdytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdxtail * bdytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bctt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bctt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bctt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bctt[3] = u3;\n bcttlen = 4;\n } else {\n bct[0] = 0;\n bctlen = 1;\n bctt[0] = 0;\n bcttlen = 1;\n }\n if (adxtail !== 0) {\n const len = scale(bctlen, bct, adxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(axtbclen, axtbc, adxtail, _16), _16,\n scale(len, _16c, 2 * adx, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * adx, _16), _16,\n scale(len2, _8, adxtail, _16b), _16b,\n scale(len, _16c, adxtail, _32), _32, _32b, _64), _64);\n\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, adxtail, _8), _8, bdytail, _16), _16);\n }\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, -adxtail, _8), _8, cdytail, _16), _16);\n }\n }\n if (adytail !== 0) {\n const len = scale(bctlen, bct, adytail, _16c);\n finlen = finadd(finlen, sum(\n scale(aytbclen, aytbc, adytail, _16), _16,\n scale(len, _16c, 2 * ady, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * ady, _16), _16,\n scale(len2, _8, adytail, _16b), _16b,\n scale(len, _16c, adytail, _32), _32, _32b, _64), _64);\n }\n }\n if (bdxtail !== 0 || bdytail !== 0) {\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = cdxtail * ady;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * adytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -cdy;\n n0 = -cdytail;\n s1 = adxtail * n1;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * n0;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n catlen = sum(4, u, 4, v, cat);\n s1 = cdxtail * adytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adxtail * cdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n catt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n catt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n catt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n catt[3] = u3;\n cattlen = 4;\n } else {\n cat[0] = 0;\n catlen = 1;\n catt[0] = 0;\n cattlen = 1;\n }\n if (bdxtail !== 0) {\n const len = scale(catlen, cat, bdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(bxtcalen, bxtca, bdxtail, _16), _16,\n scale(len, _16c, 2 * bdx, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdx, _16), _16,\n scale(len2, _8, bdxtail, _16b), _16b,\n scale(len, _16c, bdxtail, _32), _32, _32b, _64), _64);\n\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, bdxtail, _8), _8, cdytail, _16), _16);\n }\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, -bdxtail, _8), _8, adytail, _16), _16);\n }\n }\n if (bdytail !== 0) {\n const len = scale(catlen, cat, bdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(bytcalen, bytca, bdytail, _16), _16,\n scale(len, _16c, 2 * bdy, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdy, _16), _16,\n scale(len2, _8, bdytail, _16b), _16b,\n scale(len, _16c, bdytail, _32), _32, _32b, _64), _64);\n }\n }\n if (cdxtail !== 0 || cdytail !== 0) {\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = adxtail * bdy;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * bdytail;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -ady;\n n0 = -adytail;\n s1 = bdxtail * n1;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * n0;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n abtlen = sum(4, u, 4, v, abt);\n s1 = adxtail * bdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdxtail * adytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n abtt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n abtt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n abtt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n abtt[3] = u3;\n abttlen = 4;\n } else {\n abt[0] = 0;\n abtlen = 1;\n abtt[0] = 0;\n abttlen = 1;\n }\n if (cdxtail !== 0) {\n const len = scale(abtlen, abt, cdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(cxtablen, cxtab, cdxtail, _16), _16,\n scale(len, _16c, 2 * cdx, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdx, _16), _16,\n scale(len2, _8, cdxtail, _16b), _16b,\n scale(len, _16c, cdxtail, _32), _32, _32b, _64), _64);\n\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, cdxtail, _8), _8, adytail, _16), _16);\n }\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, -cdxtail, _8), _8, bdytail, _16), _16);\n }\n }\n if (cdytail !== 0) {\n const len = scale(abtlen, abt, cdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(cytablen, cytab, cdytail, _16), _16,\n scale(len, _16c, 2 * cdy, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdy, _16), _16,\n scale(len2, _8, cdytail, _16b), _16b,\n scale(len, _16c, cdytail, _32), _32, _32b, _64), _64);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function incircle(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n const alift = adx * adx + ady * ady;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n const blift = bdx * bdx + bdy * bdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n const clift = cdx * cdx + cdy * cdy;\n\n const det =\n alift * (bdxcdy - cdxbdy) +\n blift * (cdxady - adxcdy) +\n clift * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * blift +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * clift;\n\n const errbound = iccerrboundA * permanent;\n\n if (det > errbound || -det > errbound) {\n return det;\n }\n return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent);\n}\n\nexport function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const ady = ay - dy;\n const bdx = bx - dx;\n const bdy = by - dy;\n const cdx = cx - dx;\n const cdy = cy - dy;\n\n const abdet = adx * bdy - bdx * ady;\n const bcdet = bdx * cdy - cdx * bdy;\n const cadet = cdx * ady - adx * cdy;\n const alift = adx * adx + ady * ady;\n const blift = bdx * bdx + bdy * bdy;\n const clift = cdx * cdx + cdy * cdy;\n\n return alift * bcdet + blift * cadet + clift * abdet;\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale, negate} from './util.js';\n\nconst isperrboundA = (16 + 224 * epsilon) * epsilon;\nconst isperrboundB = (5 + 72 * epsilon) * epsilon;\nconst isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon;\n\nconst ab = vec(4);\nconst bc = vec(4);\nconst cd = vec(4);\nconst de = vec(4);\nconst ea = vec(4);\nconst ac = vec(4);\nconst bd = vec(4);\nconst ce = vec(4);\nconst da = vec(4);\nconst eb = vec(4);\n\nconst abc = vec(24);\nconst bcd = vec(24);\nconst cde = vec(24);\nconst dea = vec(24);\nconst eab = vec(24);\nconst abd = vec(24);\nconst bce = vec(24);\nconst cda = vec(24);\nconst deb = vec(24);\nconst eac = vec(24);\n\nconst adet = vec(1152);\nconst bdet = vec(1152);\nconst cdet = vec(1152);\nconst ddet = vec(1152);\nconst edet = vec(1152);\nconst abdet = vec(2304);\nconst cddet = vec(2304);\nconst cdedet = vec(3456);\nconst deter = vec(5760);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _8c = vec(8);\nconst _16 = vec(16);\nconst _24 = vec(24);\nconst _48 = vec(48);\nconst _48b = vec(48);\nconst _96 = vec(96);\nconst _192 = vec(192);\nconst _384x = vec(384);\nconst _384y = vec(384);\nconst _384z = vec(384);\nconst _768 = vec(768);\n\nfunction sum_three_scale(a, b, c, az, bz, cz, out) {\n return sum_three(\n scale(4, a, az, _8), _8,\n scale(4, b, bz, _8b), _8b,\n scale(4, c, cz, _8c), _8c, _16, out);\n}\n\nfunction liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) {\n const len = sum(\n sum(alen, a, blen, b, _48), _48,\n negate(sum(clen, c, dlen, d, _48b), _48b), _48b, _96);\n\n return sum_three(\n scale(scale(len, _96, x, _192), _192, x, _384x), _384x,\n scale(scale(len, _96, y, _192), _192, y, _384y), _384y,\n scale(scale(len, _96, z, _192), _192, z, _384z), _384z, _768, out);\n}\n\nfunction insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n s1 = ax * by;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ay;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n s1 = bx * cy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * by;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cx * dy;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * cy;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cd[3] = u3;\n s1 = dx * ey;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * dy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n de[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n de[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n de[2] = _j - (u3 - bvirt) + (_i - bvirt);\n de[3] = u3;\n s1 = ex * ay;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * ey;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ea[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ea[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ea[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ea[3] = u3;\n s1 = ax * cy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * ay;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ac[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ac[3] = u3;\n s1 = bx * dy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * by;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bd[3] = u3;\n s1 = cx * ey;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * cy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ce[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ce[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ce[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ce[3] = u3;\n s1 = dx * ay;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * dy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n da[2] = _j - (u3 - bvirt) + (_i - bvirt);\n da[3] = u3;\n s1 = ex * by;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ey;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n eb[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n eb[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n eb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n eb[3] = u3;\n\n const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc);\n const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd);\n const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde);\n const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea);\n const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab);\n const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd);\n const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce);\n const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda);\n const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb);\n const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac);\n\n const deterlen = sum_three(\n liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet,\n liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet,\n sum_three(\n liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet,\n liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet,\n liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter);\n\n return deter[deterlen - 1];\n}\n\nconst xdet = vec(96);\nconst ydet = vec(96);\nconst zdet = vec(96);\nconst fin = vec(1152);\n\nfunction liftadapt(a, b, c, az, bz, cz, x, y, z, out) {\n const len = sum_three_scale(a, b, c, az, bz, cz, _24);\n return sum_three(\n scale(scale(len, _24, x, _48), _48, x, xdet), xdet,\n scale(scale(len, _24, y, _48), _48, y, ydet), ydet,\n scale(scale(len, _24, z, _48), _48, z, zdet), zdet, _192, out);\n}\n\nfunction insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) {\n let ab3, bc3, cd3, da3, ac3, bd3;\n\n let aextail, bextail, cextail, dextail;\n let aeytail, beytail, ceytail, deytail;\n let aeztail, beztail, ceztail, deztail;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0;\n\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n s1 = aex * bey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bex * aey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ab3 = _j + _i;\n bvirt = ab3 - _j;\n ab[2] = _j - (ab3 - bvirt) + (_i - bvirt);\n ab[3] = ab3;\n s1 = bex * cey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * bey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bc3 = _j + _i;\n bvirt = bc3 - _j;\n bc[2] = _j - (bc3 - bvirt) + (_i - bvirt);\n bc[3] = bc3;\n s1 = cex * dey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * cey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n cd3 = _j + _i;\n bvirt = cd3 - _j;\n cd[2] = _j - (cd3 - bvirt) + (_i - bvirt);\n cd[3] = cd3;\n s1 = dex * aey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = aex * dey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n da3 = _j + _i;\n bvirt = da3 - _j;\n da[2] = _j - (da3 - bvirt) + (_i - bvirt);\n da[3] = da3;\n s1 = aex * cey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * aey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ac3 = _j + _i;\n bvirt = ac3 - _j;\n ac[2] = _j - (ac3 - bvirt) + (_i - bvirt);\n ac[3] = ac3;\n s1 = bex * dey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * bey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bd3 = _j + _i;\n bvirt = bd3 - _j;\n bd[2] = _j - (bd3 - bvirt) + (_i - bvirt);\n bd[3] = bd3;\n\n const finlen = sum(\n sum(\n negate(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet,\n liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet,\n sum(\n negate(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet,\n liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin);\n\n let det = estimate(finlen, fin);\n let errbound = isperrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - aex;\n aextail = ax - (aex + bvirt) + (bvirt - ex);\n bvirt = ay - aey;\n aeytail = ay - (aey + bvirt) + (bvirt - ey);\n bvirt = az - aez;\n aeztail = az - (aez + bvirt) + (bvirt - ez);\n bvirt = bx - bex;\n bextail = bx - (bex + bvirt) + (bvirt - ex);\n bvirt = by - bey;\n beytail = by - (bey + bvirt) + (bvirt - ey);\n bvirt = bz - bez;\n beztail = bz - (bez + bvirt) + (bvirt - ez);\n bvirt = cx - cex;\n cextail = cx - (cex + bvirt) + (bvirt - ex);\n bvirt = cy - cey;\n ceytail = cy - (cey + bvirt) + (bvirt - ey);\n bvirt = cz - cez;\n ceztail = cz - (cez + bvirt) + (bvirt - ez);\n bvirt = dx - dex;\n dextail = dx - (dex + bvirt) + (bvirt - ex);\n bvirt = dy - dey;\n deytail = dy - (dey + bvirt) + (bvirt - ey);\n bvirt = dz - dez;\n deztail = dz - (dez + bvirt) + (bvirt - ez);\n if (aextail === 0 && aeytail === 0 && aeztail === 0 &&\n bextail === 0 && beytail === 0 && beztail === 0 &&\n cextail === 0 && ceytail === 0 && ceztail === 0 &&\n dextail === 0 && deytail === 0 && deztail === 0) {\n return det;\n }\n\n errbound = isperrboundC * permanent + resulterrbound * Math.abs(det);\n\n const abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail);\n const bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail);\n const cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail);\n const daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail);\n const aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail);\n const bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail);\n det +=\n (((bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) +\n (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) *\n ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3))) -\n ((aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) +\n (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) *\n ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)))) +\n 2 * (((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) +\n (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3)) -\n ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) +\n (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3)));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez);\n}\n\nexport function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n const aexbey = aex * bey;\n const bexaey = bex * aey;\n const ab = aexbey - bexaey;\n const bexcey = bex * cey;\n const cexbey = cex * bey;\n const bc = bexcey - cexbey;\n const cexdey = cex * dey;\n const dexcey = dex * cey;\n const cd = cexdey - dexcey;\n const dexaey = dex * aey;\n const aexdey = aex * dey;\n const da = dexaey - aexdey;\n const aexcey = aex * cey;\n const cexaey = cex * aey;\n const ac = aexcey - cexaey;\n const bexdey = bex * dey;\n const dexbey = dex * bey;\n const bd = bexdey - dexbey;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n const det =\n (clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab)) +\n (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd));\n\n const aezplus = Math.abs(aez);\n const bezplus = Math.abs(bez);\n const cezplus = Math.abs(cez);\n const dezplus = Math.abs(dez);\n const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey);\n const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey);\n const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey);\n const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey);\n const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey);\n const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey);\n const permanent =\n (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift +\n (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift +\n (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift +\n (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift;\n\n const errbound = isperrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent);\n}\n\nexport function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) {\n const aex = pax - pex;\n const bex = pbx - pex;\n const cex = pcx - pex;\n const dex = pdx - pex;\n const aey = pay - pey;\n const bey = pby - pey;\n const cey = pcy - pey;\n const dey = pdy - pey;\n const aez = paz - pez;\n const bez = pbz - pez;\n const cez = pcz - pez;\n const dez = pdz - pez;\n\n const ab = aex * bey - bex * aey;\n const bc = bex * cey - cex * bey;\n const cd = cex * dey - dex * cey;\n const da = dex * aey - aex * dey;\n const ac = aex * cey - cex * aey;\n const bd = bex * dey - dex * bey;\n\n const abc = aez * bc - bez * ac + cez * ab;\n const bcd = bez * cd - cez * bd + dez * bc;\n const cda = cez * da + dez * ac + aez * cd;\n const dab = dez * ab + aez * bd + bez * da;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n return (clift * dab - dlift * abc) + (alift * bcd - blift * cda);\n}\n","\nconst EPSILON = Math.pow(2, -52);\nconst EDGE_STACK = new Uint32Array(512);\n\nimport {orient2d} from 'robust-predicates';\n\nexport default class Delaunator {\n\n static from(points, getX = defaultGetX, getY = defaultGetY) {\n const n = points.length;\n const coords = new Float64Array(n * 2);\n\n for (let i = 0; i < n; i++) {\n const p = points[i];\n coords[2 * i] = getX(p);\n coords[2 * i + 1] = getY(p);\n }\n\n return new Delaunator(coords);\n }\n\n constructor(coords) {\n const n = coords.length >> 1;\n if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.');\n\n this.coords = coords;\n\n // arrays that will store the triangulation graph\n const maxTriangles = Math.max(2 * n - 5, 0);\n this._triangles = new Uint32Array(maxTriangles * 3);\n this._halfedges = new Int32Array(maxTriangles * 3);\n\n // temporary arrays for tracking the edges of the advancing convex hull\n this._hashSize = Math.ceil(Math.sqrt(n));\n this._hullPrev = new Uint32Array(n); // edge to prev edge\n this._hullNext = new Uint32Array(n); // edge to next edge\n this._hullTri = new Uint32Array(n); // edge to adjacent triangle\n this._hullHash = new Int32Array(this._hashSize); // angular edge hash\n\n // temporary arrays for sorting points\n this._ids = new Uint32Array(n);\n this._dists = new Float64Array(n);\n\n this.update();\n }\n\n update() {\n const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this;\n const n = coords.length >> 1;\n\n // populate an array of point indices; calculate input data bbox\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n for (let i = 0; i < n; i++) {\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n this._ids[i] = i;\n }\n const cx = (minX + maxX) / 2;\n const cy = (minY + maxY) / 2;\n\n let i0, i1, i2;\n\n // pick a seed point close to the center\n for (let i = 0, minDist = Infinity; i < n; i++) {\n const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]);\n if (d < minDist) {\n i0 = i;\n minDist = d;\n }\n }\n const i0x = coords[2 * i0];\n const i0y = coords[2 * i0 + 1];\n\n // find the point closest to the seed\n for (let i = 0, minDist = Infinity; i < n; i++) {\n if (i === i0) continue;\n const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]);\n if (d < minDist && d > 0) {\n i1 = i;\n minDist = d;\n }\n }\n let i1x = coords[2 * i1];\n let i1y = coords[2 * i1 + 1];\n\n let minRadius = Infinity;\n\n // find the third point which forms the smallest circumcircle with the first two\n for (let i = 0; i < n; i++) {\n if (i === i0 || i === i1) continue;\n const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]);\n if (r < minRadius) {\n i2 = i;\n minRadius = r;\n }\n }\n let i2x = coords[2 * i2];\n let i2y = coords[2 * i2 + 1];\n\n if (minRadius === Infinity) {\n // order collinear points by dx (or dy if all x are identical)\n // and return the list as a hull\n for (let i = 0; i < n; i++) {\n this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]);\n }\n quicksort(this._ids, this._dists, 0, n - 1);\n const hull = new Uint32Array(n);\n let j = 0;\n for (let i = 0, d0 = -Infinity; i < n; i++) {\n const id = this._ids[i];\n const d = this._dists[id];\n if (d > d0) {\n hull[j++] = id;\n d0 = d;\n }\n }\n this.hull = hull.subarray(0, j);\n this.triangles = new Uint32Array(0);\n this.halfedges = new Uint32Array(0);\n return;\n }\n\n // swap the order of the seed points for counter-clockwise orientation\n if (orient2d(i0x, i0y, i1x, i1y, i2x, i2y) < 0) {\n const i = i1;\n const x = i1x;\n const y = i1y;\n i1 = i2;\n i1x = i2x;\n i1y = i2y;\n i2 = i;\n i2x = x;\n i2y = y;\n }\n\n const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y);\n this._cx = center.x;\n this._cy = center.y;\n\n for (let i = 0; i < n; i++) {\n this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y);\n }\n\n // sort the points by distance from the seed triangle circumcenter\n quicksort(this._ids, this._dists, 0, n - 1);\n\n // set up the seed triangle as the starting hull\n this._hullStart = i0;\n let hullSize = 3;\n\n hullNext[i0] = hullPrev[i2] = i1;\n hullNext[i1] = hullPrev[i0] = i2;\n hullNext[i2] = hullPrev[i1] = i0;\n\n hullTri[i0] = 0;\n hullTri[i1] = 1;\n hullTri[i2] = 2;\n\n hullHash.fill(-1);\n hullHash[this._hashKey(i0x, i0y)] = i0;\n hullHash[this._hashKey(i1x, i1y)] = i1;\n hullHash[this._hashKey(i2x, i2y)] = i2;\n\n this.trianglesLen = 0;\n this._addTriangle(i0, i1, i2, -1, -1, -1);\n\n for (let k = 0, xp, yp; k < this._ids.length; k++) {\n const i = this._ids[k];\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n\n // skip near-duplicate points\n if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue;\n xp = x;\n yp = y;\n\n // skip seed triangle points\n if (i === i0 || i === i1 || i === i2) continue;\n\n // find a visible edge on the convex hull using edge hash\n let start = 0;\n for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) {\n start = hullHash[(key + j) % this._hashSize];\n if (start !== -1 && start !== hullNext[start]) break;\n }\n\n start = hullPrev[start];\n let e = start, q;\n while (q = hullNext[e], orient2d(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1]) >= 0) {\n e = q;\n if (e === start) {\n e = -1;\n break;\n }\n }\n if (e === -1) continue; // likely a near-duplicate point; skip it\n\n // add the first triangle from the point\n let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]);\n\n // recursively flip triangles from the point until they satisfy the Delaunay condition\n hullTri[i] = this._legalize(t + 2);\n hullTri[e] = t; // keep track of boundary triangles on the hull\n hullSize++;\n\n // walk forward through the hull, adding more triangles and flipping recursively\n let n = hullNext[e];\n while (q = hullNext[n], orient2d(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1]) < 0) {\n t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]);\n hullTri[i] = this._legalize(t + 2);\n hullNext[n] = n; // mark as removed\n hullSize--;\n n = q;\n }\n\n // walk backward from the other side, adding more triangles and flipping\n if (e === start) {\n while (q = hullPrev[e], orient2d(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1]) < 0) {\n t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]);\n this._legalize(t + 2);\n hullTri[q] = t;\n hullNext[e] = e; // mark as removed\n hullSize--;\n e = q;\n }\n }\n\n // update the hull indices\n this._hullStart = hullPrev[i] = e;\n hullNext[e] = hullPrev[n] = i;\n hullNext[i] = n;\n\n // save the two new edges in the hash table\n hullHash[this._hashKey(x, y)] = i;\n hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e;\n }\n\n this.hull = new Uint32Array(hullSize);\n for (let i = 0, e = this._hullStart; i < hullSize; i++) {\n this.hull[i] = e;\n e = hullNext[e];\n }\n\n // trim typed triangle mesh arrays\n this.triangles = this._triangles.subarray(0, this.trianglesLen);\n this.halfedges = this._halfedges.subarray(0, this.trianglesLen);\n }\n\n _hashKey(x, y) {\n return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize;\n }\n\n _legalize(a) {\n const {_triangles: triangles, _halfedges: halfedges, coords} = this;\n\n let i = 0;\n let ar = 0;\n\n // recursion eliminated with a fixed-size stack\n while (true) {\n const b = halfedges[a];\n\n /* if the pair of triangles doesn't satisfy the Delaunay condition\n * (p1 is inside the circumcircle of [p0, pl, pr]), flip them,\n * then do the same check/flip recursively for the new pair of triangles\n *\n * pl pl\n * /||\\ / \\\n * al/ || \\bl al/ \\a\n * / || \\ / \\\n * / a||b \\ flip /___ar___\\\n * p0\\ || /p1 => p0\\---bl---/p1\n * \\ || / \\ /\n * ar\\ || /br b\\ /br\n * \\||/ \\ /\n * pr pr\n */\n const a0 = a - a % 3;\n ar = a0 + (a + 2) % 3;\n\n if (b === -1) { // convex hull edge\n if (i === 0) break;\n a = EDGE_STACK[--i];\n continue;\n }\n\n const b0 = b - b % 3;\n const al = a0 + (a + 1) % 3;\n const bl = b0 + (b + 2) % 3;\n\n const p0 = triangles[ar];\n const pr = triangles[a];\n const pl = triangles[al];\n const p1 = triangles[bl];\n\n const illegal = inCircle(\n coords[2 * p0], coords[2 * p0 + 1],\n coords[2 * pr], coords[2 * pr + 1],\n coords[2 * pl], coords[2 * pl + 1],\n coords[2 * p1], coords[2 * p1 + 1]);\n\n if (illegal) {\n triangles[a] = p1;\n triangles[b] = p0;\n\n const hbl = halfedges[bl];\n\n // edge swapped on the other side of the hull (rare); fix the halfedge reference\n if (hbl === -1) {\n let e = this._hullStart;\n do {\n if (this._hullTri[e] === bl) {\n this._hullTri[e] = a;\n break;\n }\n e = this._hullPrev[e];\n } while (e !== this._hullStart);\n }\n this._link(a, hbl);\n this._link(b, halfedges[ar]);\n this._link(ar, bl);\n\n const br = b0 + (b + 1) % 3;\n\n // don't worry about hitting the cap: it can only happen on extremely degenerate input\n if (i < EDGE_STACK.length) {\n EDGE_STACK[i++] = br;\n }\n } else {\n if (i === 0) break;\n a = EDGE_STACK[--i];\n }\n }\n\n return ar;\n }\n\n _link(a, b) {\n this._halfedges[a] = b;\n if (b !== -1) this._halfedges[b] = a;\n }\n\n // add a new triangle given vertex indices and adjacent half-edge ids\n _addTriangle(i0, i1, i2, a, b, c) {\n const t = this.trianglesLen;\n\n this._triangles[t] = i0;\n this._triangles[t + 1] = i1;\n this._triangles[t + 2] = i2;\n\n this._link(t, a);\n this._link(t + 1, b);\n this._link(t + 2, c);\n\n this.trianglesLen += 3;\n\n return t;\n }\n}\n\n// monotonically increases with real angle, but doesn't need expensive trigonometry\nfunction pseudoAngle(dx, dy) {\n const p = dx / (Math.abs(dx) + Math.abs(dy));\n return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1]\n}\n\nfunction dist(ax, ay, bx, by) {\n const dx = ax - bx;\n const dy = ay - by;\n return dx * dx + dy * dy;\n}\n\nfunction inCircle(ax, ay, bx, by, cx, cy, px, py) {\n const dx = ax - px;\n const dy = ay - py;\n const ex = bx - px;\n const ey = by - py;\n const fx = cx - px;\n const fy = cy - py;\n\n const ap = dx * dx + dy * dy;\n const bp = ex * ex + ey * ey;\n const cp = fx * fx + fy * fy;\n\n return dx * (ey * cp - bp * fy) -\n dy * (ex * cp - bp * fx) +\n ap * (ex * fy - ey * fx) < 0;\n}\n\nfunction circumradius(ax, ay, bx, by, cx, cy) {\n const dx = bx - ax;\n const dy = by - ay;\n const ex = cx - ax;\n const ey = cy - ay;\n\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const d = 0.5 / (dx * ey - dy * ex);\n\n const x = (ey * bl - dy * cl) * d;\n const y = (dx * cl - ex * bl) * d;\n\n return x * x + y * y;\n}\n\nfunction circumcenter(ax, ay, bx, by, cx, cy) {\n const dx = bx - ax;\n const dy = by - ay;\n const ex = cx - ax;\n const ey = cy - ay;\n\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const d = 0.5 / (dx * ey - dy * ex);\n\n const x = ax + (ey * bl - dy * cl) * d;\n const y = ay + (dx * cl - ex * bl) * d;\n\n return {x, y};\n}\n\nfunction quicksort(ids, dists, left, right) {\n if (right - left <= 20) {\n for (let i = left + 1; i <= right; i++) {\n const temp = ids[i];\n const tempDist = dists[temp];\n let j = i - 1;\n while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--];\n ids[j + 1] = temp;\n }\n } else {\n const median = (left + right) >> 1;\n let i = left + 1;\n let j = right;\n swap(ids, median, i);\n if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right);\n if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right);\n if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i);\n\n const temp = ids[i];\n const tempDist = dists[temp];\n while (true) {\n do i++; while (dists[ids[i]] < tempDist);\n do j--; while (dists[ids[j]] > tempDist);\n if (j < i) break;\n swap(ids, i, j);\n }\n ids[left + 1] = ids[j];\n ids[j] = temp;\n\n if (right - i + 1 >= j - left) {\n quicksort(ids, dists, i, right);\n quicksort(ids, dists, left, j - 1);\n } else {\n quicksort(ids, dists, left, j - 1);\n quicksort(ids, dists, i, right);\n }\n }\n}\n\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultGetX(p) {\n return p[0];\n}\nfunction defaultGetY(p) {\n return p[1];\n}\n","import { PseudorandomStream } from \"../common\";\nimport { Cardinal8, Point, radsToDegrees } from \"../common/geometry\";\nimport { Grid } from \"../common/grid\";\n\ntype EntityPositionArgs = {\n x: number;\n y: number;\n} & ({ aimedAt: Point } | { facing: Cardinal8 } | { yaw: number } | {});\n\nfunction getYaw(args: EntityPositionArgs): number | undefined {\n if (\"aimedAt\" in args) {\n return Math.atan2(args.aimedAt[1] - args.y, args.aimedAt[0] - args.x);\n }\n if (\"facing\" in args) {\n return Math.atan2(args.facing[1], args.facing[0]);\n }\n if (\"yaw\" in args) {\n return args.yaw;\n }\n return undefined;\n}\n\nconst ENTITY_SCALE = 300;\n\nexport type EntityPosition = {\n readonly x: number;\n readonly y: number;\n readonly z: number;\n readonly pitch: number;\n readonly yaw: number;\n readonly roll: number;\n readonly scaleX: number;\n readonly scaleY: number;\n readonly scaleZ: number;\n};\n\nconst POSITION_DEFAULTS = {\n z: 0,\n pitch: 0,\n yaw: 0,\n roll: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n} as const;\n\nexport function position(\n args: EntityPositionArgs & Partial,\n): EntityPosition {\n return {\n x: args.x,\n y: args.y,\n z: args.z ?? POSITION_DEFAULTS.z,\n pitch: args.pitch ?? POSITION_DEFAULTS.pitch,\n yaw: getYaw(args) ?? POSITION_DEFAULTS.yaw,\n roll: args.roll ?? POSITION_DEFAULTS.roll,\n scaleX: args.scaleX ?? POSITION_DEFAULTS.scaleX,\n scaleY: args.scaleY ?? POSITION_DEFAULTS.scaleY,\n scaleZ: args.scaleZ ?? POSITION_DEFAULTS.scaleZ,\n };\n}\n\nexport const atCenterOfTile: (args: EntityPositionArgs) => EntityPosition = (\n args,\n) => position({ ...args, x: args.x + 0.5, y: args.y + 0.5 });\n\nexport function randomlyInTile(\n args: EntityPositionArgs & { rng: PseudorandomStream },\n): EntityPosition {\n const x = args.rng.uniform({}) + args.x;\n const y = args.rng.uniform({}) + args.y;\n const yaw = getYaw(args) ?? args.rng.uniform({ min: -Math.PI, max: Math.PI });\n return { ...POSITION_DEFAULTS, x, y, yaw };\n}\n\nfunction zOffsetForBuilding(\n unused_x: number,\n unused_y: number,\n nw: number,\n ne: number,\n sw: number,\n se: number,\n): number {\n return (Math.max(nw, ne, sw, se) + Math.min(nw, ne, sw, se)) / 2;\n}\n\nfunction zOffsetForEntity(\n x: number,\n y: number,\n nw: number,\n ne: number,\n sw: number,\n se: number,\n): number {\n // Manic Miners reliably clips tiles into two triangles this way.\n if (y <= 1 - x) {\n // First triangle (nw, ne, sw)\n const wx = (ne - nw) * x;\n const wy = (sw - nw) * y;\n return nw + wx + wy;\n } else {\n // Second triangle (se, ne, sw)\n const wx = (sw - se) * (x - 1);\n const wy = (ne - se) * (y - 1);\n return se + wx + wy;\n }\n}\n\nfunction zOffset(\n x: number,\n y: number,\n heightMap: Grid,\n method: \"entity\" | \"building\",\n): number {\n const tileX = Math.floor(x);\n const tileY = Math.floor(y);\n const fn = { entity: zOffsetForEntity, building: zOffsetForBuilding }[method];\n return fn(\n x - tileX,\n y - tileY,\n heightMap.get(tileX, tileY)!,\n heightMap.get(tileX + 1, tileY)!,\n heightMap.get(tileX, tileY + 1)!,\n heightMap.get(tileX + 1, tileY + 1)!,\n );\n}\n\nexport function serializePosition(\n position: EntityPosition,\n [ox, oy]: Point,\n heightMap: Grid,\n yawOffset: number,\n zOffsetMethod: \"entity\" | \"building\",\n): string {\n const x = (position.x + ox) * ENTITY_SCALE;\n const y = (position.y + oy) * ENTITY_SCALE;\n const z =\n position.z + zOffset(position.x, position.y, heightMap, zOffsetMethod);\n const pitch = radsToDegrees(position.pitch);\n const yaw = radsToDegrees(position.yaw + yawOffset);\n const roll = radsToDegrees(position.roll);\n const { scaleX, scaleY, scaleZ } = position;\n return (\n `Translation: X=${x.toFixed(3)} Y=${y.toFixed(3)} Z=${z.toFixed(3)} ` +\n `Rotation: P=${pitch.toFixed(6)} Y=${yaw.toFixed(6)} R=${roll.toFixed(6)} ` +\n `Scale X=${scaleX.toFixed(3)} Y=${scaleY.toFixed(3)} Z=${scaleZ.toFixed(3)}`\n );\n}\n","import {\n Cardinal4,\n EAST,\n NORTH,\n NORTH_WEST,\n ORIGIN,\n Point,\n SOUTH,\n WEST,\n rotateAround,\n rotateLeft,\n rotateRight,\n} from \"../common/geometry\";\nimport { Grid } from \"../common/grid\";\nimport { EntityPosition, atCenterOfTile, serializePosition } from \"./position\";\n\ntype Footprint = readonly [readonly [0, 0], ...Point[]];\n\n// There are five unique footprints for buildings available.\n// Assuming the building itself has its entity origin at [0, 0], and is facing\n// NORTH, these tiles become the foundation tiles for buildings with that\n// footprint.\nconst F_MINING_LASER: Footprint = [ORIGIN];\nconst F_DEFAULT: Footprint = [ORIGIN, NORTH];\nconst F_CANTEEN_REFINERY: Footprint = [ORIGIN, SOUTH, NORTH];\nconst F_POWER_STATION: Footprint = [ORIGIN, EAST, NORTH];\nconst F_SUPER_TELEPORT: Footprint = [ORIGIN, NORTH_WEST, WEST, NORTH];\n\n/** Rotates the given footprint to match the given cardinal offset facing. */\nfunction rotateFootprint(footprint: Footprint, [ox, oy]: Cardinal4) {\n if (oy === -1) {\n return footprint;\n }\n if (ox === 1) {\n return footprint.map(rotateRight);\n }\n if (oy === 1) {\n return footprint.map(rotateAround);\n }\n // Assume ox === -1\n return footprint.map(rotateLeft);\n}\n\ntype Level = 0 | 1 | 2 | 3 | 4 | 5;\nexport type BuildingExtraArgs = {\n level?: Level;\n isEssential?: boolean;\n teleportAtStart?: boolean;\n};\n\nclass BuildingTemplate {\n readonly id: string;\n readonly name: string;\n readonly inspectAbbrev: string;\n readonly maxLevel: Level;\n readonly ore: number;\n readonly crystals: number;\n readonly footprint: Footprint;\n readonly dependencies: readonly BuildingTemplate[];\n constructor(\n id: string,\n name: string,\n inspectAbbrev: string,\n maxLevel: Level,\n ore: number,\n crystals: number,\n footprint: Footprint,\n dependencies: readonly BuildingTemplate[],\n ) {\n this.id = id;\n this.name = name;\n this.inspectAbbrev = inspectAbbrev;\n this.maxLevel = maxLevel;\n this.ore = ore;\n this.crystals = crystals;\n this.footprint = footprint;\n this.dependencies = dependencies;\n }\n atTile: (\n args: {\n x: number;\n y: number;\n facing: Cardinal4;\n } & BuildingExtraArgs,\n ) => Building = (args) => ({\n ...atCenterOfTile(args),\n template: this,\n foundation: rotateFootprint(this.footprint, args.facing).map(([x, y]) => [\n x + args.x,\n y + args.y,\n ]),\n level: args.level ?? 1,\n isEssential: args.isEssential ?? false,\n teleportAtStart: args.teleportAtStart ?? false,\n });\n}\n\nexport const TOOL_STORE = new BuildingTemplate(\n \"BuildingToolStore_C\",\n \"Tool Store\",\n \"Ts\",\n 3,\n 0,\n 0,\n F_DEFAULT,\n [],\n);\nexport const TELEPORT_PAD = new BuildingTemplate(\n \"BuildingTeleportPad_C\",\n \"Teleport Pad\",\n \"Tp\",\n 2,\n 8,\n 0,\n F_DEFAULT,\n [TOOL_STORE],\n);\n// The Docks faces the LAND tile with the water BEHIND it.\n// Note the water tile is not counted as part of the foundation\nexport const DOCKS = new BuildingTemplate(\n \"BuildingDocks_C\",\n \"Docks\",\n \"Dk\",\n 1,\n 8,\n 0,\n F_DEFAULT,\n [TOOL_STORE],\n);\n// The Canteen is functionally symmetrical, but if you care, the end with\n// the yellow/black chevron piece is the FRONT.\nexport const CANTEEN = new BuildingTemplate(\n \"BuildingCanteen_C\",\n \"Canteen\",\n \"Cn\",\n 1,\n 10,\n 1,\n F_CANTEEN_REFINERY,\n [TOOL_STORE],\n);\n// Power Station origin is the RIGHT side of the building where miners put\n// the crystals in.\nexport const POWER_STATION = new BuildingTemplate(\n \"BuildingPowerStation_C\",\n \"Power Station\",\n \"Ps\",\n 2,\n 12,\n 2,\n F_POWER_STATION,\n [TOOL_STORE, TELEPORT_PAD],\n);\nexport const SUPPORT_STATION = new BuildingTemplate(\n \"BuildingSupportStation_C\",\n \"Support Station\",\n \"Ss\",\n 2,\n 15,\n 3,\n F_DEFAULT,\n [TOOL_STORE, TELEPORT_PAD, POWER_STATION],\n);\nexport const UPGRADE_STATION = new BuildingTemplate(\n \"BuildingUpgradeStation_C\",\n \"Upgrade Station\",\n \"Us\",\n 3,\n 20,\n 3,\n F_DEFAULT,\n [TOOL_STORE, TELEPORT_PAD, POWER_STATION],\n);\n// Geological Center origin is the BACK of the building.\nexport const GEOLOGICAL_CENTER = new BuildingTemplate(\n \"BuildingGeologicalCenter_C\",\n \"Geological Center\",\n \"Gc\",\n 5,\n 20,\n 2,\n F_DEFAULT,\n [TOOL_STORE, TELEPORT_PAD, POWER_STATION],\n);\n// Ore Refinery origin is the FRONT of the building were miners put ore in.\nexport const ORE_REFINERY = new BuildingTemplate(\n \"BuildingOreRefinery_C\",\n \"Ore Refinery\",\n \"Or\",\n 4,\n 20,\n 3,\n F_CANTEEN_REFINERY,\n [TOOL_STORE, TELEPORT_PAD, POWER_STATION],\n);\nexport const MINING_LASER = new BuildingTemplate(\n \"BuildingMiningLaser_C\",\n \"Mining Laser\",\n \"Ml\",\n 1,\n 10,\n 1,\n F_MINING_LASER,\n [TOOL_STORE, TELEPORT_PAD, POWER_STATION, SUPPORT_STATION],\n);\n// Super teleport origin is the LEFT side of the building when facing it.\nexport const SUPER_TELEPORT = new BuildingTemplate(\n \"BuildingSuperTeleport_C\",\n \"Super Teleport\",\n \"St\",\n 2,\n 20,\n 4,\n F_SUPER_TELEPORT,\n [TOOL_STORE, TELEPORT_PAD, POWER_STATION, SUPPORT_STATION],\n);\n\nexport class BuildingDoesNotFitException extends Error {}\n\nexport type Building = EntityPosition & {\n readonly template: BuildingTemplate;\n readonly foundation: readonly Point[];\n readonly level: Level;\n readonly isEssential: boolean;\n readonly teleportAtStart: boolean;\n};\n\nexport function serializeBuilding(\n building: Building,\n offset: Point,\n heightMap: Grid,\n) {\n return [\n building.template.id,\n serializePosition(building, offset, heightMap, Math.PI / 2, \"building\"),\n building.level > 1 && `Level=${building.level.toFixed()}`,\n building.isEssential && \"Essential=True\",\n building.teleportAtStart && \"Teleport=True\",\n ]\n .filter((n) => n)\n .join(\",\");\n}\n","export enum Hardness {\n NONE = 0,\n RUBBLE,\n DIRT,\n LOOSE,\n SEAM,\n HARD,\n SOLID,\n}\n\ntype BaseTile = {\n id: number;\n name: string;\n hardness: Hardness;\n isWall: boolean;\n isFluid: boolean;\n maxSlope: number | undefined;\n crystalYield: number;\n oreYield: number;\n};\n\n// prettier-ignore\nconst TILES = {\n FLOOR: {id: 1, name: \"Cavern Floor\", crystalYield: 0, hardness: Hardness.NONE, isFluid: false, isWall: false, maxSlope: undefined, oreYield: 0},\n LAVA: {id: 6, name: \"Lava\", crystalYield: 0, hardness: Hardness.NONE, isFluid: true, isWall: false, maxSlope: 0, oreYield: 0},\n WATER: {id: 11, name: \"Water\", crystalYield: 0, hardness: Hardness.NONE, isFluid: true, isWall: false, maxSlope: 0, oreYield: 0},\n DIRT: {id: 26, name: \"Dirt\", crystalYield: 0, hardness: Hardness.DIRT, isFluid: false, isWall: true, maxSlope: undefined, oreYield: 4},\n LOOSE_ROCK: {id: 30, name: \"Loose Rock\", crystalYield: 0, hardness: Hardness.LOOSE, isFluid: false, isWall: true, maxSlope: undefined, oreYield: 4},\n HARD_ROCK: {id: 34, name: \"Hard Rock\", crystalYield: 0, hardness: Hardness.HARD, isFluid: false, isWall: true, maxSlope: undefined, oreYield: 4},\n SOLID_ROCK: {id: 38, name: \"Solid Rock\", crystalYield: 0, hardness: Hardness.SOLID, isFluid: false, isWall: true, maxSlope: undefined, oreYield: 4},\n RUBBLE_1: {id: 2, name: \"Rubble\", crystalYield: 0, hardness: Hardness.RUBBLE, isFluid: false, isWall: false, maxSlope: undefined, oreYield: 1},\n RUBBLE_2: {id: 3, name: \"Rubble\", crystalYield: 0, hardness: Hardness.RUBBLE, isFluid: false, isWall: false, maxSlope: undefined, oreYield: 2},\n RUBBLE_3: {id: 4, name: \"Rubble\", crystalYield: 0, hardness: Hardness.RUBBLE, isFluid: false, isWall: false, maxSlope: undefined, oreYield: 3},\n RUBBLE_4: {id: 5, name: \"Rubble\", crystalYield: 0, hardness: Hardness.RUBBLE, isFluid: false, isWall: false, maxSlope: undefined, oreYield: 4},\n SLUG_HOLE: {id: 12, name: \"Slimy Slug Hole\", crystalYield: 0, hardness: Hardness.NONE, isFluid: false, isWall: false, maxSlope: 15, oreYield: 0},\n FOUNDATION: {id: 14, name: \"Foundation\", crystalYield: 0, hardness: Hardness.NONE, isFluid: false, isWall: false, maxSlope: 15, oreYield: 0},\n POWER_PATH: {id: 24, name: \"Power Path\", crystalYield: 0, hardness: Hardness.NONE, isFluid: false, isWall: false, maxSlope: undefined, oreYield: 0},\n LANDSLIDE_RUBBLE_4: {id: 60, name: \"Rubble\", crystalYield: 0, hardness: Hardness.RUBBLE, isFluid: false, isWall: false, maxSlope: undefined, oreYield: 0},\n LANDSLIDE_RUBBLE_3: {id: 61, name: \"Rubble\", crystalYield: 0, hardness: Hardness.RUBBLE, isFluid: false, isWall: false, maxSlope: undefined, oreYield: 0},\n LANDSLIDE_RUBBLE_2: {id: 62, name: \"Rubble\", crystalYield: 0, hardness: Hardness.RUBBLE, isFluid: false, isWall: false, maxSlope: undefined, oreYield: 0},\n LANDSLIDE_RUBBLE_1: {id: 63, name: \"Rubble\", crystalYield: 0, hardness: Hardness.RUBBLE, isFluid: false, isWall: false, maxSlope: undefined, oreYield: 0},\n CRYSTAL_SEAM: {id: 42, name: \"Energy Crystal Seam\", crystalYield: 4, hardness: Hardness.SEAM, isFluid: false, isWall: true, maxSlope: undefined, oreYield: 4},\n ORE_SEAM: {id: 46, name: \"Ore Seam\", crystalYield: 0, hardness: Hardness.SEAM, isFluid: false, isWall: true, maxSlope: undefined, oreYield: 8},\n RECHARGE_SEAM: {id: 50, name: \"Recharge Seam\", crystalYield: 0, hardness: Hardness.SOLID, isFluid: false, isWall: true, maxSlope: undefined, oreYield: 0},\n} as const satisfies { [K in any]: BaseTile };\n\nexport const Tile = TILES;\nexport type Tile = (typeof TILES)[keyof typeof TILES]; // eslint-disable-line @typescript-eslint/no-redeclare\n\nexport type RoughTile =\n | typeof TILES.FLOOR\n | typeof TILES.LAVA\n | typeof TILES.WATER\n | typeof TILES.DIRT\n | typeof TILES.LOOSE_ROCK\n | typeof TILES.HARD_ROCK\n | typeof TILES.SOLID_ROCK;\nexport type FluidType = typeof TILES.LAVA | typeof TILES.WATER | null;\n","import { Biome } from \"../common\";\nimport { Point } from \"../common/geometry\";\nimport { Grid } from \"../common/grid\";\nimport { EntityPosition, serializePosition } from \"./position\";\n\nexport class CreatureTemplate {\n readonly id: string;\n readonly name: string;\n readonly inspectAbbrev: string;\n constructor(id: string, name: string, inspectAbbrev: string) {\n this.id = id;\n this.name = name;\n this.inspectAbbrev = inspectAbbrev;\n }\n}\n\nexport const ROCK_MONSTER = new CreatureTemplate(\n \"CreatureRockMonster_C\",\n \"Rock Monster\",\n \"Rm\",\n);\nexport const ICE_MONSTER = new CreatureTemplate(\n \"CreatureIceMonster_C\",\n \"Ice Monster\",\n \"Im\",\n);\nexport const LAVA_MONSTER = new CreatureTemplate(\n \"CreatureLavaMonster_C\",\n \"Lava Monster\",\n \"Lm\",\n);\nexport const SLIMY_SLUG = new CreatureTemplate(\n \"CreatureSlimySlug_C\",\n \"Slimy Slug\",\n \"Sg\",\n);\nexport const SMALL_SPIDER = new CreatureTemplate(\n \"CreatureSmallSpider_C\",\n \"Small Spider\",\n \"Sr\",\n);\nexport const BAT = new CreatureTemplate(\"CreatureBat_C\", \"Bat\", \"Bt\");\n\nexport function monsterForBiome(biome: Biome): CreatureTemplate {\n switch (biome) {\n case \"rock\":\n return ROCK_MONSTER;\n case \"ice\":\n return ICE_MONSTER;\n case \"lava\":\n return LAVA_MONSTER;\n }\n}\n\nexport type Creature = EntityPosition & {\n readonly id: number;\n readonly template: CreatureTemplate;\n readonly sleep: boolean;\n};\n\nexport class CreatureFactory {\n private id: number = 0;\n create(\n args: EntityPosition & { template: CreatureTemplate; sleep?: boolean },\n ): Creature {\n return { sleep: false, ...args, id: this.id++ };\n }\n}\n\nexport function serializeCreature(\n creature: Creature,\n offset: Point,\n heightMap: Grid,\n) {\n return `${creature.template.id}\n${serializePosition(creature, offset, heightMap, 0, \"entity\")}\nID=${creature.id.toFixed()}${creature.sleep ? \",Sleep=true\" : \"\"}`;\n}\n","export type Mutable = { -readonly [P in keyof T]: T[P] };\n\ntype GetOrUndefined<\n T extends object,\n K extends string | number | symbol,\n> = T extends T ? (K extends keyof T ? T[K] : undefined) : never;\ntype KeyOfUnion = T extends T ? keyof T : never;\ntype UndefinedToOptional = {\n [K in keyof T]-?: (\n x: undefined extends T[K] ? { [P in K]?: T[K] } : { [P in K]: T[K] },\n ) => void;\n}[keyof T] extends (x: infer I) => void\n ? I extends infer U\n ? { [K in keyof U]: U[K] }\n : never\n : never;\nexport type CollapseUnion = UndefinedToOptional<{\n [K in KeyOfUnion]: GetOrUndefined;\n}>;\n\nexport function pairEach(\n it: readonly T[],\n fn: (a: T, b: T, i: number) => void,\n) {\n for (let i = 0; i < it.length - 1; i++) {\n fn(it[i], it[i + 1], i);\n }\n}\nexport function pairMap(\n it: readonly U[],\n fn: (a: U, b: U, i: number) => V,\n): V[] {\n const result: V[] = [];\n pairEach(it, (a, b, i) => result.push(fn(a, b, i)));\n return result;\n}\n\nexport function filterTruthy(it: (T | null | false | undefined)[]): T[] {\n return it.filter((n) => n) as T[];\n}\n","import { PseudorandomStream } from \"../../common\";\nimport { NSEW } from \"../../common/geometry\";\nimport { filterTruthy } from \"../../common/utils\";\nimport { Plan } from \"../../models/plan\";\nimport { EntityPosition, position } from \"../../models/position\";\nimport { Tile } from \"../../models/tiles\";\nimport { StrataformedCavern } from \"../../transformers/03_plastic/02_strataform\";\n\nexport function pickPoint(\n plan: Plan,\n filter: (x: number, y: number) => boolean,\n) {\n for (let ly = 0; ly < plan.innerPearl.length; ly++) {\n const layer = plan.innerPearl[ly];\n const start = plan.id % (layer.length - 1);\n for (let i = start; i < layer.length; i++) {\n if (filter(...layer[i])) {\n return layer[i];\n }\n }\n for (let i = 0; i < start; i++) {\n if (filter(...layer[i])) {\n return layer[i];\n }\n }\n }\n return undefined;\n}\n\nexport function circumferencePositions(\n cavern: StrataformedCavern,\n plan: Plan,\n count: number,\n rng: PseudorandomStream,\n filterFn: (x: number, y: number, t: Tile) => boolean,\n): EntityPosition[] {\n for (let ly = plan.innerPearl.length - 2; ly >= 0; ly--) {\n const r = positionsHelper(cavern, plan, count, rng, filterFn, ly, ly + 1);\n if (r.length) {\n return r;\n }\n }\n return [];\n}\n\nexport function innerPositions(\n cavern: StrataformedCavern,\n plan: Plan,\n count: number,\n rng: PseudorandomStream,\n filterFn: (x: number, y: number, t: Tile) => boolean,\n): EntityPosition[] {\n for (let ly = 1; ly < plan.innerPearl.length; ly++) {\n const r = positionsHelper(cavern, plan, count, rng, filterFn, ly, ly - 1);\n if (r.length) {\n return r;\n }\n }\n return [];\n}\n\nfunction positionsHelper(\n cavern: StrataformedCavern,\n plan: Plan,\n count: number,\n rng: PseudorandomStream,\n filterFn: (x: number, y: number, t: Tile) => boolean,\n ly: number,\n aly: number,\n): EntityPosition[] {\n const placements = filterTruthy(\n plan.innerPearl[ly].map(([x, y]) => {\n const t = cavern.tiles.get(x, y);\n if (\n t?.isWall !== false ||\n !filterFn(x, y, t) ||\n cavern.pearlInnerDex\n .get(x, y)\n ?.some((_, i) => i !== plan.id && cavern.plans[i].kind !== \"hall\")\n ) {\n return null;\n }\n const anchor = NSEW.find(\n ([ox, oy]) =>\n cavern.tiles.get(x + ox, y + oy)?.isWall &&\n cavern.pearlInnerDex.get(x + ox, y + oy)?.[plan.id] === aly,\n );\n if (!anchor) {\n return null;\n }\n return [x, y, anchor] as const;\n }),\n );\n return rng\n .shuffle(placements)\n .filter((_, i) => i < count)\n .map(([tx, ty, [ax, ay]]) => {\n const x =\n tx + rng.uniform({ max: ax === 0 ? 1 : 0.25 }) + (ax > 0 ? 0.75 : 0);\n const y =\n ty + rng.uniform({ max: ay === 0 ? 1 : 0.25 }) + (ay > 0 ? 0.75 : 0);\n const fx = tx + (ax === 0 ? rng.uniform({ min: -2, max: 2 }) : ax * -5);\n const fy = ty + (ay === 0 ? rng.uniform({ min: -2, max: 2 }) : ay * -5);\n return position({ x, y, aimedAt: [fx, fy] });\n });\n}\n","import { Biome, PseudorandomStream } from \"../../common\";\nimport { Point } from \"../../common/geometry\";\nimport { Architect } from \"../../models/architect\";\nimport { monsterForBiome } from \"../../models/creature\";\nimport { Tile } from \"../../models/tiles\";\nimport { circumferencePositions, innerPositions } from \"./placement\";\n\nconst TILE_CAN_HAVE_MONSTER = {\n rock: (_, __, t) => !t.isFluid,\n ice: (_, __, t) => t !== Tile.LAVA,\n lava: (_, __, t) => t !== Tile.WATER,\n} as const satisfies {\n [K in Biome]: (x: number, y: number, t: Tile) => boolean;\n};\n\nconst PLACEMENT_FN = {\n inner: innerPositions,\n outer: circumferencePositions,\n} as const;\n\nexport function placeSleepingMonsters(\n args: Parameters[\"placeEntities\"]>[0],\n rng: PseudorandomStream,\n count: number,\n placement: \"outer\" | \"inner\" = \"outer\",\n) {\n if (!args.cavern.context.hasMonsters) {\n return;\n }\n const template = monsterForBiome(args.cavern.context.biome);\n const filterFn = TILE_CAN_HAVE_MONSTER[args.cavern.context.biome];\n const r = PLACEMENT_FN[placement](\n args.cavern,\n args.plan,\n count,\n rng,\n filterFn,\n ).map((pos) =>\n args.creatureFactory.create({ ...pos, template, sleep: true }),\n );\n args.creatures.push(...r);\n}\n\nexport function sprinkleSlugHoles(\n args: Parameters[\"placeSlugHoles\"]>[0],\n opts?: {\n count?: number;\n placements?: readonly Point[];\n },\n) {\n const rng = args.cavern.dice.placeSlugHoles(args.plan.id);\n const c =\n opts?.count ??\n (rng.chance(args.cavern.context[`${args.plan.kind}HasSlugHoleChance`])\n ? 1\n : 0);\n var placements =\n opts?.placements ??\n args.plan.innerPearl.flatMap((layer) =>\n layer.filter((pos) => args.tiles.get(...pos) === Tile.FLOOR),\n );\n for (var i = 1; i <= c && !!placements.length; i++) {\n const [x, y] = rng.uniformChoice(placements);\n args.tiles.set(x, y, Tile.SLUG_HOLE);\n if (i === c) {\n return;\n }\n // Don't place another slug hole on or adjacent to this one.\n placements = placements.filter(\n ([x1, y1]) => x1 < x - 1 || x1 > x + 1 || y1 < y - 1 || y1 > y + 1,\n );\n }\n}\n","export class Landslide {\n readonly cooldown: number;\n constructor(cooldown: number) {\n this.cooldown = cooldown;\n }\n\n get key() {\n return this.cooldown.toFixed(1);\n }\n}\n\nexport class Erosion {\n readonly cooldown: number;\n readonly initialDelay: number;\n constructor(cooldown: number, initialDelay: number) {\n this.cooldown = cooldown;\n this.initialDelay = initialDelay;\n }\n\n get key() {\n return `${this.cooldown.toFixed(1)}/${this.initialDelay.toFixed(1)}`;\n }\n}\n","import { MutableGrid } from \"../../common/grid\";\nimport { Erosion, Landslide } from \"../../models/hazards\";\nimport { Plan } from \"../../models/plan\";\nimport { Tile } from \"../../models/tiles\";\nimport { DiscoveredCavern } from \"../../transformers/03_plastic/01_discover\";\n\nconst LANDSLIDABLE_TILES: readonly true[] = (() => {\n const r: true[] = [];\n r[Tile.DIRT.id] = true;\n r[Tile.LOOSE_ROCK.id] = true;\n r[Tile.HARD_ROCK.id] = true;\n return r;\n})();\n\nconst BETA_SUM = 10;\n\nexport function placeLandslides(\n cooldownRange: { min: number; max: number },\n {\n cavern,\n plan,\n landslides,\n }: {\n cavern: DiscoveredCavern;\n plan: Plan;\n landslides: MutableGrid;\n },\n) {\n const rng = cavern.dice.placeLandslides(plan.id);\n\n // A spread closer to 1 means more landslide tiles, but they will tend to\n // trigger less frequently.\n const spread = rng.uniform({ min: 0.2, max: 0.8 });\n\n plan.innerPearl\n .flatMap((layer) => layer)\n .filter(\n (point) =>\n !landslides.get(...point) &&\n LANDSLIDABLE_TILES[cavern.tiles.get(...point)?.id ?? -1] &&\n rng.chance(spread),\n )\n .forEach((point) => {\n const cooldown = rng.betaInt({\n ...cooldownRange,\n a: BETA_SUM * spread,\n b: BETA_SUM * (1 - spread),\n });\n landslides.set(...point, new Landslide(cooldown));\n });\n}\n\nexport function placeErosion(\n cooldown: number,\n initialDelay: number,\n {\n cavern,\n plan,\n erosion,\n }: {\n cavern: DiscoveredCavern;\n plan: Plan;\n erosion: MutableGrid;\n },\n) {\n if (plan.hasErosion) {\n const event = new Erosion(cooldown, initialDelay);\n plan.innerPearl.forEach((layer) =>\n layer.forEach((point) => {\n if (cavern.tiles.get(...point)?.isFluid === false) {\n erosion.set(...point, event);\n }\n }),\n );\n }\n}\n","import { PseudorandomStream } from \"../../common\";\nimport { MutableGrid, Grid } from \"../../common/grid\";\nimport { Architect } from \"../../models/architect\";\nimport { Plan } from \"../../models/plan\";\nimport { Tile } from \"../../models/tiles\";\nimport { RoughPlasticCavern } from \"../../transformers/02_masonry/01_rough\";\nimport { NSEW, Point, offsetBy } from \"../../common/geometry\";\nimport { Vehicle } from \"../../models/vehicle\";\nimport { Building } from \"../../models/building\";\n\nconst SEAMABLE = {\n [Tile.SOLID_ROCK.id]: true,\n [Tile.HARD_ROCK.id]: true,\n [Tile.LOOSE_ROCK.id]: true,\n [Tile.DIRT.id]: true,\n} as const;\n\n/** Sprinkles resources throughout the tiles given by getRandomTile. */\nfunction sprinkle(\n getRandomTile: () => Point,\n seamBias: number,\n rng: PseudorandomStream,\n tiles: MutableGrid,\n resource: MutableGrid,\n seam: Tile,\n count: number,\n) {\n for (let remaining = count; remaining > 0; remaining--) {\n const [x, y] = getRandomTile();\n const t = tiles.get(x, y) ?? Tile.SOLID_ROCK;\n if (\n remaining >= 4 &&\n (t === Tile.SOLID_ROCK ||\n (t.id in SEAMABLE && seamBias > 0 && rng.chance(seamBias)))\n ) {\n tiles.set(x, y, seam);\n remaining -= 3;\n continue;\n }\n if (t === Tile.SOLID_ROCK) {\n tiles.set(x, y, Tile.LOOSE_ROCK);\n }\n const r = resource.get(x, y) ?? 0;\n if (r >= 3 && t.id in SEAMABLE) {\n tiles.set(x, y, seam);\n resource.set(x, y, r - 3);\n } else {\n resource.set(x, y, r + 1);\n }\n }\n}\n\nexport function sprinkleCrystals(\n args: Parameters[\"placeCrystals\"]>[0],\n opts?: {\n count?: number;\n getRandomTile?: () => Point;\n seamBias?: number;\n },\n) {\n const rng = args.cavern.dice.placeCrystals(args.plan.id);\n return sprinkle(\n opts?.getRandomTile ?? defaultGetRandomTile(rng, args),\n opts?.seamBias ?? args.cavern.context[`${args.plan.kind}CrystalSeamBias`],\n rng,\n args.tiles,\n args.crystals,\n Tile.CRYSTAL_SEAM,\n opts?.count ??\n args.plan.crystals -\n args.plan.architect.crystalsFromMetadata(args.plan.metadata),\n );\n}\n\nexport function sprinkleOre(\n args: Parameters[\"placeOre\"]>[0],\n opts?: {\n count?: number;\n getRandomTile?: () => Point;\n seamBias?: number;\n },\n) {\n const rng = args.cavern.dice.placeOre(args.plan.id);\n return sprinkle(\n opts?.getRandomTile ?? defaultGetRandomTile(rng, args),\n opts?.seamBias ?? args.cavern.context[`${args.plan.kind}OreSeamBias`],\n rng,\n args.tiles,\n args.ore,\n Tile.ORE_SEAM,\n opts?.count ?? args.plan.ore,\n );\n}\n\nexport function bidsForOuterPearl(args: {\n cavern: RoughPlasticCavern;\n plan: Plan;\n tiles: Grid;\n}): { item: Point; bid: number }[] {\n return args.plan.outerPearl.flatMap((layer) =>\n layer\n .map((item) => {\n const tile = args.tiles.get(...item) ?? Tile.SOLID_ROCK;\n if (tile === Tile.SOLID_ROCK) {\n let rechargeSeamCount = 0;\n let solidRockCount = 0;\n for (const offset of NSEW) {\n const neighbor =\n args.tiles.get(...offsetBy(item, offset)) ?? Tile.SOLID_ROCK;\n if (neighbor === Tile.RECHARGE_SEAM) {\n rechargeSeamCount++;\n } else if (neighbor === Tile.SOLID_ROCK) {\n solidRockCount++;\n }\n }\n const bid =\n rechargeSeamCount + solidRockCount >= 4 ? 0 : solidRockCount;\n return { item, bid };\n }\n if (\n tile === Tile.DIRT ||\n tile === Tile.LOOSE_ROCK ||\n tile === Tile.HARD_ROCK\n ) {\n return { item, bid: 1 };\n }\n return { item, bid: 0 };\n })\n .filter(({ bid }) => bid > 0)\n .map(({ item, bid }) => {\n const innerPlansAtTile =\n args.cavern.pearlInnerDex.get(...item)?.reduce((n) => n + 1, 0) ?? 0;\n const outerPlansAtTile =\n args.cavern.pearlOuterDex.get(...item)?.reduce((n) => n + 1, 0) ?? 0;\n return { item, bid: bid / (innerPlansAtTile + outerPlansAtTile) };\n }),\n );\n}\n\nexport function bidsForOrdinaryWalls(\n positions: readonly Point[],\n tiles: Grid,\n) {\n return positions.filter(([x, y]) => {\n const t = tiles.get(x, y);\n return t === Tile.DIRT || t === Tile.LOOSE_ROCK || t === Tile.HARD_ROCK;\n });\n}\n\nexport function defaultGetRandomTile(\n rng: PseudorandomStream,\n args: {\n cavern: RoughPlasticCavern;\n plan: Plan;\n tiles: MutableGrid;\n },\n) {\n const bids = bidsForOrdinaryWalls(\n args.plan.innerPearl.flatMap((layer) => layer),\n args.tiles,\n );\n if (bids.length > 0) {\n return () => rng.uniformChoice(bids);\n }\n const bids2 = bidsForOuterPearl(args);\n if (bids2) {\n return () => rng.weightedChoice(bids2);\n }\n throw new Error(\"No place to put resource!\");\n}\n\nexport function getPlaceRechargeSeams(\n count?: number,\n): Architect[\"placeRechargeSeam\"] {\n return (args) => {\n const rng = args.cavern.dice.placeRechargeSeam(args.plan.id);\n const c =\n count ??\n (rng.chance(\n args.plan.kind === \"cave\"\n ? args.cavern.context.caveHasRechargeSeamChance\n : args.cavern.context.hallHasRechargeSeamChance,\n )\n ? 1\n : 0);\n if (c > 0) {\n for (let i = 0; i < c; i++) {\n const bids = bidsForOuterPearl(args).filter(({ bid }) => bid >= 1);\n if (bids.length === 0) {\n console.log(\"FAILED to place recharge seam in plan: %o\", args.plan);\n } else {\n const [x, y] = rng.weightedChoice(bids);\n args.tiles.set(x, y, Tile.RECHARGE_SEAM);\n }\n }\n }\n };\n}\n\nexport function getTotalCrystals({\n tiles,\n crystals,\n buildings,\n vehicles,\n}: {\n tiles?: Grid;\n crystals?: Grid;\n buildings?: readonly Building[];\n vehicles?: readonly Vehicle[];\n}) {\n let r = 0;\n tiles?.forEach((t) => (r += t.crystalYield));\n crystals?.forEach((ct) => (r += ct));\n buildings?.forEach((b) => (r += b.template.crystals));\n vehicles?.forEach((v) => (r += v.template.crystals));\n return r;\n}\n\nexport function getTotalOre({\n tiles,\n ore,\n}: {\n tiles?: Grid | undefined;\n ore?: Grid | undefined;\n}) {\n let r = 0;\n tiles?.forEach((t) => (r += t.oreYield));\n ore?.forEach((ct) => (r += ct));\n return r;\n}\n","import { Architect, BaseMetadata } from \"../models/architect\";\nimport { sprinkleSlugHoles } from \"./utils/creatures\";\nimport { placeErosion, placeLandslides } from \"./utils/hazards\";\nimport {\n getPlaceRechargeSeams,\n sprinkleCrystals,\n sprinkleOre,\n} from \"./utils/resources\";\n\nexport type PartialArchitect = Omit<\n Architect,\n \"name\" | \"rough\" | \"roughExtent\"\n>;\n\nexport const [DefaultCaveArchitect, DefaultHallArchitect] = (\n [\n {\n hasLandslidesChance: \"caveHasLandslidesChance\",\n landslideCooldownRange: \"caveLandslideCooldownRange\",\n baroqueness: \"caveBaroqueness\",\n },\n {\n hasLandslidesChance: \"hallHasLandslidesChance\",\n landslideCooldownRange: \"hallLandslideCooldownRange\",\n baroqueness: \"hallBaroqueness\",\n },\n ] as const\n).map(\n ({ hasLandslidesChance, landslideCooldownRange, baroqueness }) =>\n ({\n baroqueness: ({ cavern }) => cavern.context[baroqueness],\n crystalsToPlace: ({ plan }) => plan.crystalRichness * plan.perimeter,\n crystalsFromMetadata: () => 0,\n ore: ({ plan }) => plan.oreRichness * plan.perimeter,\n prime: () => undefined,\n placeRechargeSeam: getPlaceRechargeSeams(),\n placeBuildings: () => {},\n placeCrystals: (args) => {\n return sprinkleCrystals(args);\n },\n placeOre: (args) => {\n return sprinkleOre(args);\n },\n placeSlugHoles(args) {\n return sprinkleSlugHoles(args);\n },\n placeLandslides: (args) => {\n if (\n args.cavern.dice\n .placeLandslides(args.plan.id)\n .chance(args.cavern.context[hasLandslidesChance])\n ) {\n placeLandslides(args.cavern.context[landslideCooldownRange], args);\n }\n },\n placeErosion: (args) => placeErosion(30, 10, args),\n placeEntities: () => {},\n objectives: () => undefined,\n maxSlope: undefined,\n scriptGlobals: () => undefined,\n script: () => undefined,\n monsterSpawnScript: () => undefined,\n slugSpawnScript: () => undefined,\n }) as PartialArchitect,\n);\n","type Bounds = {\n left: number;\n top: number;\n right: number;\n bottom: number;\n};\n\nexport class MutableGrid {\n private data: Map<`${number},${number}`, T>;\n\n constructor(data?: Map<`${number},${number}`, T>) {\n this.data = new Map(data);\n }\n\n copy(): MutableGrid {\n return new MutableGrid(this.data);\n }\n\n get(x: number, y: number): T | undefined {\n return this.data.get(`${x},${y}`);\n }\n\n set(x: number, y: number, value: T) {\n this.data.set(`${x},${y}`, value);\n }\n\n get size(): number {\n return this.data.size;\n }\n\n get bounds(): Bounds {\n const r: Partial = {};\n this.forEach((_, x, y) => {\n if (!(x >= r.left!)) {\n r.left = x;\n } else if (!(x + 1 <= r.right!)) {\n r.right = x + 1;\n }\n if (!(y >= r.top!)) {\n r.top = y;\n } else if (!(y + 1 <= r.bottom!)) {\n r.bottom = y + 1;\n }\n });\n return r as Bounds;\n }\n\n forEach(fn: (value: T, x: number, y: number) => void) {\n this.data.forEach((v, k) => {\n const [x, y] = k.split(\",\");\n fn(v, parseInt(x), parseInt(y));\n });\n }\n\n map(fn: (value: T, x: number, y: number) => V) {\n const result: V[] = [];\n this.forEach((...args) => result.push(fn(...args)));\n return result;\n }\n\n flatMap(fn: (value: T, x: number, y: number) => V[]) {\n const result: V[] = [];\n this.forEach((...args) => result.push(...fn(...args)));\n return result;\n }\n\n reduce(\n fn: (previousValue: V, currentValue: T, x: number, y: number) => V,\n initialValue: V,\n ) {\n let result: V = initialValue;\n this.forEach((...args) => (result = fn(result, ...args)));\n return result;\n }\n}\n\nexport type Grid = Omit, \"set\">;\n","import { Cardinal4, NSEW } from \"../../common/geometry\";\nimport { MutableGrid } from \"../../common/grid\";\nimport { Architect } from \"../../models/architect\";\nimport { Building, DOCKS } from \"../../models/building\";\nimport { Tile } from \"../../models/tiles\";\n\nexport type MakeBuildingFn = (a: {\n x: number;\n y: number;\n facing: Cardinal4;\n}) => Building;\n\n/**\n * Returns an array of Building objects positioned within the given Plan\n * according to the given rules.\n *\n * Buildings are placed between the given from and to layers of the Plan's\n * innerPearl. The queue is an array of functions that return a building at\n * that point and facing direction. This function will check whether that\n * building fits in that space and does not overlap any other buildings.\n * If it does, that building will be added to the return value.\n *\n * The given queue will be modified - so anything left in it on return\n * means those buildings could not be placed.\n *\n * This function will not add buildings to the cavern or place any foundation\n * tiles, so it is the caller's responsibility to do that.\n */\nexport function getBuildings(\n {\n from,\n to,\n queue,\n }: {\n from?: number;\n to?: number;\n queue: MakeBuildingFn[];\n },\n { cavern, plan, tiles }: Parameters[\"placeBuildings\"]>[0],\n) {\n const placed = new MutableGrid();\n const porches = new MutableGrid();\n const rng = cavern.dice.placeBuildings(plan.id);\n const result: Building[] = [];\n // For each layer of the pearl\n done: for (let ly = from ?? 1; ly < (to ?? plan.innerPearl.length); ly++) {\n plan.innerPearl[ly - 1].forEach(([x, y]) => porches.set(x, y, ly));\n // For each point in the layer\n for (const [x, y] of rng.shuffle(plan.innerPearl[ly].slice())) {\n // For each building that can be built\n point: for (let i = 0; i < queue.length; i++) {\n const fn = queue[i];\n // For each possible orientation\n for (const facing of NSEW) {\n const [ox, oy] = facing;\n // Continue if this is an unacceptable porch location\n if (porches.get(x + ox, y + oy) !== ly) {\n continue;\n }\n // Make the building\n const b = fn({ x, y, facing });\n // Continue if the foundation overlaps any used or non floor tile\n if (\n b.foundation.some(\n ([x, y]) => placed.get(x, y) || tiles.get(x, y) !== Tile.FLOOR,\n )\n ) {\n continue;\n }\n // Continue if this is a docks not on water\n if (\n b.template === DOCKS &&\n tiles.get(x - ox, y - oy) !== Tile.WATER\n ) {\n continue;\n }\n // Keep this building\n result.push(b);\n b.foundation.forEach(([x, y]) => placed.set(x, y, true));\n queue.splice(i, 1);\n if (queue.length === 0) {\n break done;\n }\n break point;\n }\n }\n }\n }\n return result;\n}\n","type _Layer = {\n of: T;\n width: number;\n shrink: number;\n grow: number;\n};\n\nexport type Layer = {\n of: T;\n width?: number;\n shrink?: number;\n grow?: number;\n};\n\nexport function fixLayers(layers: Layer[]): _Layer[] {\n return layers.map((ly) => ({ width: 1, shrink: 0, grow: 0, ...ly }));\n}\n\nexport function expand(layers: readonly _Layer[], radius: number): T[] {\n radius = radius + 1;\n const totalWidth = layers.reduce((t, { width }) => t + width, 0);\n const totalShrink = layers.reduce((t, { shrink }) => t + shrink, 0);\n const totalGrow = layers.reduce((t, { grow }) => t + grow, 0);\n let growFactor = 0;\n let shrinkFactor = 0;\n if (radius < totalWidth && totalShrink > 0) {\n // For the shrink case,\n // r = (w0 * (1 - s0 * sf)) + (w1 * (1 - s1 * sf)) + ...\n // + (wn * (1 - sn * sf))\n\n // Solve for sf\n // r = w0 - w0 * s0 * sf + w1 - w1 * s1 * sf + ... + wn - wn * sn * sf\n // r = (w0 + w1 + ... + wn) - (w0 * s0 + w1 * s1 + ... + wn * sn) * sf\n // (w0 * s0 + w1 * s1 + ... + wn * sn) * sf = (w0 + w1 + ... + wn) - r\n // sf = ((w0 + w1 + ... + wn) - r) / (w0 * s0 + w1 * s1 + ... + wn * sn)\n\n shrinkFactor =\n (totalWidth - radius) /\n layers.reduce((t, { width, shrink }) => t + width * shrink, 0);\n } else if (radius > totalWidth && totalGrow > 0) {\n // For the growth case,\n // r = (w0 + g0 * gf) + (w1 + g1 * gf) + ... + (wn + gn * gf)\n\n // Solve for gf\n // r = (w0 + w1 + ... + wn) + (g0 + g1 + ... + gn) * gf\n // (r - (w0 + w1 + ... + wn)) / (g0 + g1 + ... + gn) = gf\n growFactor = (radius - totalWidth) / totalGrow;\n }\n\n let result = [];\n let w = 0;\n for (const { of, width, shrink, grow } of layers) {\n w = w + width * Math.max(0, 1 - shrink * shrinkFactor) + grow * growFactor;\n while (Math.round(w) > 0) {\n result.push(of);\n w -= 1;\n }\n }\n\n return result;\n}\n","import { PseudorandomStream } from \"../../common\";\nimport { Architect } from \"../../models/architect\";\nimport { RoughTile, Tile } from \"../../models/tiles\";\nimport { Layer, expand, fixLayers } from \"./oyster\";\n\nfunction rr({\n floor,\n dirt,\n looseRock,\n hardRock,\n solidRock,\n water,\n lava,\n}: {\n floor?: RoughTile;\n dirt?: RoughTile;\n looseRock?: RoughTile;\n hardRock?: RoughTile;\n solidRock?: RoughTile;\n water?: RoughTile;\n lava?: RoughTile;\n}): ReplaceFn {\n const r: RoughTile[] = [];\n if (floor) {\n r[Tile.FLOOR.id] = floor;\n }\n if (dirt) {\n r[Tile.DIRT.id] = dirt;\n }\n if (looseRock) {\n r[Tile.LOOSE_ROCK.id] = looseRock;\n }\n if (hardRock) {\n r[Tile.HARD_ROCK.id] = hardRock;\n }\n if (solidRock) {\n r[Tile.SOLID_ROCK.id] = solidRock;\n }\n if (water) {\n r[Tile.WATER.id] = water;\n }\n if (lava) {\n r[Tile.LAVA.id] = lava;\n }\n return (has: Tile) => r[has.id] ?? null;\n}\n\nfunction roughNotFloodedTo(to: RoughTile) {\n return rr({\n floor: to,\n dirt: to,\n looseRock: to,\n hardRock: to,\n solidRock: to,\n });\n}\n\nexport const uniformSprinkle =\n (...args: ReplaceFn[]) =>\n (has: T, rng: PseudorandomStream) =>\n rng.uniformChoice(args)(has, rng);\n\nexport const weightedSprinkle =\n (...args: { bid: number; item: ReplaceFn }[]) =>\n (has: T, rng: PseudorandomStream) =>\n rng.weightedChoice(args)(has, rng);\n\nconst _Rough = {\n // VOID: No effect whatsoever\n VOID: () => null,\n // ALWAYS_*: Ignores existing tile\n ALWAYS_FLOOR: () => Tile.FLOOR,\n ALWAYS_DIRT: () => Tile.DIRT,\n ALWAYS_LOOSE_ROCK: () => Tile.LOOSE_ROCK,\n ALWAYS_HARD_ROCK: () => Tile.HARD_ROCK,\n ALWAYS_SOLID_ROCK: () => Tile.SOLID_ROCK,\n ALWAYS_WATER: () => Tile.WATER,\n ALWAYS_LAVA: () => Tile.LAVA,\n // AT_MOST_*: Replaces only if the existing tile is harder rock\n AT_MOST_DIRT: rr({\n looseRock: Tile.DIRT,\n hardRock: Tile.DIRT,\n solidRock: Tile.DIRT,\n }),\n AT_MOST_LOOSE_ROCK: rr({\n hardRock: Tile.LOOSE_ROCK,\n solidRock: Tile.LOOSE_ROCK,\n }),\n AT_MOST_HARD_ROCK: rr({ solidRock: Tile.HARD_ROCK }),\n // No prefix: Replaces any non-flooded tile with the given tile\n FLOOR: roughNotFloodedTo(Tile.FLOOR),\n DIRT: roughNotFloodedTo(Tile.DIRT),\n LOOSE_ROCK: roughNotFloodedTo(Tile.LOOSE_ROCK),\n HARD_ROCK: roughNotFloodedTo(Tile.HARD_ROCK),\n SOLID_ROCK: roughNotFloodedTo(Tile.SOLID_ROCK),\n WATER: roughNotFloodedTo(Tile.WATER),\n LAVA: roughNotFloodedTo(Tile.LAVA),\n // Replaces floor -> dirt / loose rock <- hard rock, solid rock\n DIRT_OR_LOOSE_ROCK: rr({\n floor: Tile.DIRT,\n hardRock: Tile.LOOSE_ROCK,\n solidRock: Tile.LOOSE_ROCK,\n }),\n // Replaces floor, dirt -> loose rock / hard rock <- solid rock\n LOOSE_OR_HARD_ROCK: rr({\n floor: Tile.LOOSE_ROCK,\n dirt: Tile.LOOSE_ROCK,\n solidRock: Tile.HARD_ROCK,\n }),\n // Bridges - Replaces placed rock with floor and floods solid rock\n // This can be used by caves to create a path to an island.\n // Avoid using these if the cave intersects halls with fluid as the results\n // will look extremely strange.\n BRIDGE_ON_WATER: rr({\n dirt: Tile.FLOOR,\n looseRock: Tile.FLOOR,\n hardRock: Tile.FLOOR,\n solidRock: Tile.WATER,\n }),\n BRIDGE_ON_LAVA: rr({\n dirt: Tile.FLOOR,\n looseRock: Tile.FLOOR,\n hardRock: Tile.FLOOR,\n solidRock: Tile.LAVA,\n }),\n // Solid becomes dirt, other rock becomes floor.\n INVERT_TO_DIRT: rr({\n dirt: Tile.FLOOR,\n looseRock: Tile.FLOOR,\n hardRock: Tile.FLOOR,\n solidRock: Tile.DIRT,\n }),\n // Solid becomes loose rock, other rock becomes floor.\n INVERT_TO_LOOSE_ROCK: rr({\n dirt: Tile.FLOOR,\n looseRock: Tile.FLOOR,\n hardRock: Tile.FLOOR,\n solidRock: Tile.LOOSE_ROCK,\n }),\n};\n\nexport const Rough = {\n ..._Rough,\n MIX_DIRT_LOOSE_ROCK: weightedSprinkle(\n { item: _Rough.DIRT, bid: 1 },\n { item: _Rough.LOOSE_ROCK, bid: 4 },\n ),\n MIX_LOOSE_HARD_ROCK: weightedSprinkle(\n { item: _Rough.LOOSE_ROCK, bid: 4 },\n { item: _Rough.LOOSE_OR_HARD_ROCK, bid: 1 },\n ),\n MIX_FRINGE: weightedSprinkle(\n { item: _Rough.AT_MOST_LOOSE_ROCK, bid: 10 },\n { item: _Rough.AT_MOST_HARD_ROCK, bid: 1 },\n { item: _Rough.VOID, bid: 4 },\n ),\n} as const;\n\nexport type ReplaceFn = (\n has: T,\n rng: PseudorandomStream,\n) => T | null;\n\nexport function mkRough(\n ...args: Layer>[]\n): Pick, \"roughExtent\" | \"rough\"> {\n const layers = fixLayers(args);\n\n const roughExtent: Architect[\"roughExtent\"] =\n layers[layers.length - 1].of === Rough.VOID\n ? (plan) => {\n const ly = expand(layers, plan.pearlRadius);\n for (let i = ly.length - 1; i > 0; i--) {\n if (ly[i] !== Rough.VOID) {\n return i;\n }\n }\n return 0;\n }\n : (plan) => plan.pearlRadius;\n\n const rough: Architect[\"rough\"] = ({ cavern, plan, tiles }) => {\n const rng = cavern.dice.rough(plan.id);\n const replacements = expand(layers, plan.pearlRadius);\n plan.innerPearl.forEach((layer, i) => {\n layer.forEach(([x, y]) => {\n const r = replacements[i](tiles.get(x, y) ?? Tile.SOLID_ROCK, rng);\n if (r) {\n tiles.set(x, y, r);\n }\n });\n });\n };\n\n return { roughExtent, rough };\n}\n","import { Point } from \"../../common/geometry\";\nimport { FencedCavern } from \"../../transformers/03_plastic/00_fence\";\n\ntype VarType = {\n [p in T]: string;\n};\n\nexport function mkVars(\n prefix: string,\n keys: readonly T[],\n): VarType {\n const r: Partial> = {};\n keys.forEach((k) => (r[k] = `${prefix}_${k}`));\n return r as VarType;\n}\n\nexport function transformPoint(\n cavern: FencedCavern,\n [x, y]: Point,\n): `${number},${number}` {\n return `${y - cavern.top},${x - cavern.left}`;\n}\n\ntype Falsy = false | null | undefined;\n\nexport function scriptFragment(...rest: (string | Falsy)[]) {\n return rest.filter((s) => s).join(\"\\n\");\n}\n\nexport function eventChain(name: string, ...rest: (`${string};` | Falsy)[]) {\n return `${name}::;\\n${scriptFragment(...rest)}\\n`;\n}\n\nexport function escapeString(s: string) {\n return s.replace(/\\\\/g, \"\").replace(/\"/g, '\\\\\"');\n}\n","import { Point } from \"../../common/geometry\";\nimport { Plan } from \"../../models/plan\";\nimport { DiscoveredCavern } from \"../../transformers/03_plastic/01_discover\";\n\nexport function getDiscoveryPoint(\n cavern: DiscoveredCavern,\n plan: Plan,\n): Point | undefined {\n for (let i = 0; i < plan.innerPearl.length; i++) {\n const layer = plan.innerPearl[i];\n for (let j = 0; j < layer.length; j++) {\n const point = layer[j];\n const dz = cavern.discoveryZones.get(...point);\n if (dz) {\n return dz.openOnSpawn ? undefined : point;\n }\n }\n }\n}\n","import Delaunator from \"delaunator\";\nimport { Point, plotLine } from \"../common/geometry\";\nimport { Architect } from \"../models/architect\";\nimport {\n Building,\n CANTEEN,\n DOCKS,\n GEOLOGICAL_CENTER,\n MINING_LASER,\n POWER_STATION,\n SUPPORT_STATION,\n TELEPORT_PAD,\n TOOL_STORE,\n UPGRADE_STATION,\n} from \"../models/building\";\nimport { Tile } from \"../models/tiles\";\nimport { DefaultCaveArchitect, PartialArchitect } from \"./default\";\nimport { MakeBuildingFn, getBuildings } from \"./utils/buildings\";\nimport { mkRough, Rough } from \"./utils/rough\";\nimport { position } from \"../models/position\";\nimport { getPlaceRechargeSeams, sprinkleCrystals } from \"./utils/resources\";\nimport { placeLandslides } from \"./utils/hazards\";\nimport {\n escapeString,\n eventChain,\n mkVars,\n scriptFragment,\n transformPoint,\n} from \"./utils/script\";\nimport { getDiscoveryPoint } from \"./utils/discovery\";\n\nconst DESTROY_PATH_CHANCE = 0.62;\n\nconst T0_BUILDINGS = [TOOL_STORE] as const;\nconst T1_BUILDINGS = [TELEPORT_PAD, POWER_STATION, SUPPORT_STATION] as const;\nconst T2_BUILDINGS = [UPGRADE_STATION, GEOLOGICAL_CENTER, DOCKS] as const;\nconst T3_BUILDINGS = [\n CANTEEN,\n MINING_LASER,\n MINING_LASER,\n MINING_LASER,\n] as const;\n\nconst OMIT_T1 = T0_BUILDINGS.length;\nconst MAX_HOPS = 3;\n\nexport type HqMetadata = {\n readonly tag: \"hq\";\n readonly ruin: boolean;\n readonly crystalsInBuildings: number;\n};\n\nfunction getPrime(\n maxCrystals: number,\n ruin: boolean,\n): Architect[\"prime\"] {\n return ({ cavern, plan }) => {\n const rng = cavern.dice.prime(plan.id);\n const crystalsInBuildings = rng.betaInt({\n a: 1,\n b: 1.75,\n min: 3,\n max: maxCrystals,\n });\n return { crystalsInBuildings, ruin, tag: \"hq\" };\n };\n}\n\nfunction getPlaceBuildings({\n discovered = false,\n from = 2,\n}): Architect[\"placeBuildings\"] {\n return (args) => {\n const asRuin = args.plan.metadata.ruin;\n const asSpawn = !args.plan.hops.length;\n\n // Determine the order templates will be applied.\n const rng = args.cavern.dice.placeBuildings(args.plan.id);\n const tq = [\n ...T0_BUILDINGS,\n ...(asSpawn && !asRuin ? T1_BUILDINGS : rng.shuffle(T1_BUILDINGS)),\n ...rng.shuffle(T2_BUILDINGS),\n ...rng.shuffle(T3_BUILDINGS),\n ];\n\n // Choose which buildings will be created based on total crystal budget.\n let crystalBudget = args.plan.metadata.crystalsInBuildings;\n const bq: MakeBuildingFn[] = [];\n tq.some((bt, i) => {\n const include = (() => {\n if (bt === TOOL_STORE) {\n return true;\n }\n if (crystalBudget < bt.crystals) {\n return false;\n }\n if (\n bt === DOCKS &&\n !args.plan.intersects.some(\n (_, i) => args.cavern.plans[i].fluid === Tile.WATER,\n )\n ) {\n return false;\n }\n if (asRuin && i === OMIT_T1) {\n return false;\n }\n return true;\n })();\n if (include) {\n bq.push((pos) => bt.atTile(pos));\n crystalBudget -= bt.crystals;\n if (crystalBudget <= 0) {\n return true;\n }\n } else if (asRuin) {\n bq.push((pos) => ({ ...bt.atTile(pos), isRuinAtSpawn: true }));\n }\n return false;\n });\n\n // Fit the buildings.\n const buildings = getBuildings({ from, queue: bq }, args);\n\n const dependencies = new Set(\n buildings.flatMap((b) => b.template.dependencies),\n );\n\n // Place the buildings.\n for (let i = 0; i < buildings.length; i++) {\n const building = buildings[i];\n let fTile: Tile;\n if (\"isRuinAtSpawn\" in building) {\n fTile = Tile.RUBBLE_4;\n } else {\n fTile = Tile.FOUNDATION;\n if (dependencies.has(building.template)) {\n args.buildings.push({ ...building, level: 2 });\n } else {\n args.buildings.push(building);\n }\n }\n building.foundation.forEach(([x, y]) => args.tiles.set(x, y, fTile));\n }\n\n // Place power path trails between the buildings.\n const getPorch: (b: Building) => Point = (b) =>\n b.foundation[b.foundation.length - 1];\n const addPath = (source: Building, dest: Building) => {\n for (const point of plotLine(getPorch(source), getPorch(dest))) {\n if (args.tiles.get(...point) === Tile.FLOOR) {\n args.tiles.set(\n ...point,\n asRuin && rng.chance(DESTROY_PATH_CHANCE)\n ? Tile.LANDSLIDE_RUBBLE_4\n : Tile.POWER_PATH,\n );\n }\n }\n };\n if (buildings.length > 2) {\n const points = buildings.flatMap(getPorch);\n const delaunay = new Delaunator(points);\n for (let i = 0; i < delaunay.triangles.length; i++) {\n if (i > delaunay.halfedges[i]) {\n const source = buildings[delaunay.triangles[i]];\n const dest =\n buildings[delaunay.triangles[i + (i % 3 === 2 ? -2 : 1)]];\n addPath(source, dest);\n }\n }\n } else if (buildings.length > 1) {\n addPath(buildings[0], buildings[1]);\n }\n\n // Place more rubble if this is ruin.\n if (asRuin) {\n args.plan.innerPearl.forEach((layer) =>\n layer.forEach((point) => {\n if (args.tiles.get(...point) === Tile.FLOOR) {\n args.tiles.set(\n ...point,\n rng.betaChoice(\n [\n Tile.FLOOR,\n Tile.LANDSLIDE_RUBBLE_1,\n Tile.LANDSLIDE_RUBBLE_2,\n Tile.LANDSLIDE_RUBBLE_3,\n Tile.LANDSLIDE_RUBBLE_4,\n ],\n { a: 1, b: 4 },\n ),\n );\n }\n }),\n );\n }\n\n // Place open cave flag if this is discovered.\n if (discovered) {\n args.openCaveFlags.set(...buildings[0].foundation[0], true);\n }\n\n // Set initial camera if this is spawn.\n if (asSpawn) {\n const [xt, yt] = buildings.reduce(\n ([x, y], b) => [x + b.x, y + b.y],\n [0, 0],\n );\n args.setCameraPosition(\n position({\n x: buildings[0].x,\n y: buildings[0].y,\n aimedAt: [xt / buildings.length, yt / buildings.length],\n pitch: Math.PI / 4,\n }),\n );\n }\n\n // Some crystals remain that were not used.\n if (crystalBudget > 0) {\n sprinkleCrystals(args, { count: crystalBudget, seamBias: 0 });\n }\n };\n}\n\nexport const gLostHq = mkVars(\"gLostHq\", [\"foundHq\"]);\n\nconst WITH_FIND_OBJECTIVE: Pick<\n Architect,\n \"objectives\" | \"scriptGlobals\" | \"script\"\n> = {\n objectives: () => ({\n variables: [\n {\n condition: `${gLostHq.foundHq}>0`,\n description: \"Find the lost Rock Raider HQ\",\n },\n ],\n sufficient: false,\n }),\n scriptGlobals: () =>\n scriptFragment(\"# Globals: Lost HQ\", `int ${gLostHq.foundHq}=0`),\n script({ cavern, plan }) {\n const discoPoint = getDiscoveryPoint(cavern, plan);\n if (!discoPoint) {\n throw new Error(\"Cave has Find HQ objective but no undiscovered points.\");\n }\n\n const camPoint = plan.path.baseplates.reduce((r, p) => {\n return r.pearlRadius > p.pearlRadius ? r : p;\n }).center;\n\n const v = mkVars(`p${plan.id}LostHq`, [\"messageDiscover\", \"onDiscover\"]);\n const message = cavern.lore.foundHq(cavern.dice).text;\n\n return scriptFragment(\n `# P${plan.id}: Lost HQ`,\n `string ${v.messageDiscover}=\"${escapeString(message)}\"`,\n `if(change:${transformPoint(cavern, discoPoint)})[${v.onDiscover}]`,\n eventChain(\n v.onDiscover,\n `msg:${v.messageDiscover};`,\n `pan:${transformPoint(cavern, camPoint)};`,\n `wait:1;`,\n `${gLostHq.foundHq}=1;`,\n ),\n );\n },\n};\n\nconst BASE: Omit, \"prime\"> &\n Pick, \"rough\" | \"roughExtent\"> = {\n ...DefaultCaveArchitect,\n ...mkRough(\n { of: Rough.ALWAYS_FLOOR, width: 2, grow: 2 },\n { of: Rough.FLOOR, width: 0, grow: 2 },\n { of: Rough.DIRT, width: 0, grow: 0.5 },\n { of: Rough.DIRT_OR_LOOSE_ROCK, grow: 0.25 },\n { of: Rough.MIX_LOOSE_HARD_ROCK, grow: 0.25 },\n ),\n crystalsFromMetadata: (metadata) => metadata.crystalsInBuildings,\n placeRechargeSeam: getPlaceRechargeSeams(1),\n maxSlope: 15,\n};\n\nexport const ESTABLISHED_HQ = [\n {\n name: \"Established HQ Spawn\",\n ...BASE,\n prime: getPrime(10, false),\n placeBuildings: getPlaceBuildings({ discovered: true }),\n spawnBid: ({ plan }) => !plan.fluid && plan.pearlRadius > 5 && 0.5,\n },\n {\n name: \"Ruined HQ Spawn\",\n ...BASE,\n prime: getPrime(12, true),\n placeBuildings: getPlaceBuildings({\n discovered: true,\n from: 3,\n }),\n placeLandslides: (args) => placeLandslides({ min: 15, max: 60 }, args),\n spawnBid: ({ plan }) => !plan.fluid && plan.pearlRadius > 6 && 0.5,\n },\n {\n name: \"Find Established HQ\",\n ...BASE,\n prime: getPrime(15, false),\n placeBuildings: getPlaceBuildings({}),\n caveBid: ({ plan, hops, plans }) =>\n !plan.fluid &&\n plan.pearlRadius > 5 &&\n hops.length <= MAX_HOPS &&\n !hops.some((id) => plans[id].fluid) &&\n !plans.some((p) => p.metadata?.tag === \"hq\") &&\n 0.5,\n ...WITH_FIND_OBJECTIVE,\n },\n {\n name: \"Find Ruined HQ\",\n ...BASE,\n prime: getPrime(15, true),\n placeBuildings: getPlaceBuildings({ from: 3 }),\n placeLandslides: (args) => placeLandslides({ min: 15, max: 100 }, args),\n caveBid: ({ plan, hops, plans }) =>\n !plan.fluid &&\n plan.pearlRadius > 6 &&\n hops.length <= MAX_HOPS &&\n !plans.some((p) => p.metadata?.tag === \"hq\") &&\n (plans[hops[0]].metadata?.tag === \"nomads\" ? 5 : 0.5),\n ...WITH_FIND_OBJECTIVE,\n },\n] as const satisfies readonly Architect[];\n\nexport default ESTABLISHED_HQ;\n","import { PseudorandomStream } from \"../../common\";\nimport { Point } from \"../../common/geometry\";\nimport {\n CreatureTemplate,\n SLIMY_SLUG,\n monsterForBiome,\n} from \"../../models/creature\";\nimport { Plan } from \"../../models/plan\";\nimport { EnscribedCavern } from \"../../transformers/04_ephemera/02_enscribe\";\nimport { getDiscoveryPoint } from \"./discovery\";\nimport { eventChain, mkVars, scriptFragment, transformPoint } from \"./script\";\n\ntype CreatureSpawnerArgs = {\n readonly armEvent?: string;\n readonly creature: CreatureTemplate;\n readonly emerges?: readonly Emerge[];\n readonly initialCooldown?: { min: number; max: number };\n readonly maxTriggerCount?: number;\n readonly meanWaveSize?: number;\n readonly needCrystals?: { base: number; increment?: number };\n readonly retriggerMode: RetriggerMode;\n readonly rng: PseudorandomStream;\n readonly spawnRate?: number;\n readonly triggerOnFirstArmed: boolean;\n readonly triggerPoints?: readonly Point[];\n readonly waveSize?: number;\n};\n\nconst STATE = {\n /** This spawner is deactivated and can't be reactivated. */\n EXHAUSTED: 0,\n /** This spawner has not been activated yet. */\n INITIAL: 1,\n /** This spawner is waiting to be reactivated by some trigger. */\n AWAITING_REARM: 2,\n /** This spawner just activated and is waiting for time to pass. */\n COOLDOWN: 3,\n /** This spawner is ready to activate. */\n ARMED: 4,\n} as const;\n\nconst RETRIGGER_MODES = {\n automatic: { afterTriggerState: STATE.COOLDOWN },\n hoard: { afterTriggerState: STATE.AWAITING_REARM },\n} as const;\n\nexport type RetriggerMode = keyof typeof RETRIGGER_MODES;\n\ntype Emerge = {\n readonly x: number;\n readonly y: number;\n readonly radius: number;\n};\n\nfunction getEmerges(plan: Plan): Emerge[] {\n return plan.path.baseplates.map((bp) => {\n const [x, y] = bp.center;\n return { x: Math.floor(x), y: Math.floor(y), radius: bp.pearlRadius };\n });\n}\n\nfunction cycleEmerges(\n emerges: readonly Emerge[],\n rng: PseudorandomStream,\n waveSize: number,\n) {\n const result: Emerge[] = [];\n while (result.length < waveSize) {\n result.push(...rng.shuffle(emerges));\n }\n result.length = waveSize;\n return result;\n}\n\nfunction getArmTriggers(\n cavern: EnscribedCavern,\n plan: Plan,\n armFn: string,\n) {\n const discoveryPoint = getDiscoveryPoint(cavern, plan);\n if (discoveryPoint) {\n // There is a non-wall tile that starts undiscovered.\n // Enable when it is discovered.\n return [`if(change:${transformPoint(cavern, discoveryPoint)})[${armFn}]`];\n }\n // Just enable on init.\n return [`if(time:0)[${armFn}]`];\n}\n\nfunction getTriggerPoints(cavern: EnscribedCavern, plan: Plan): Point[] {\n // Pick any tile that was set with a value, even if it is solid rock.\n return plan.outerPearl[0].filter((point) => cavern.tiles.get(...point));\n}\n\nexport function monsterSpawnScript(\n args: { cavern: EnscribedCavern; plan: Plan },\n opts?: Partial,\n) {\n return creatureSpawnScript(args, {\n creature: monsterForBiome(args.cavern.context.biome),\n retriggerMode: \"automatic\",\n rng: args.cavern.dice.monsterSpawnScript(args.plan.id),\n triggerOnFirstArmed: false,\n ...opts,\n });\n}\n\nexport function slugSpawnScript(\n args: { cavern: EnscribedCavern; plan: Plan },\n opts?: Partial,\n) {\n return creatureSpawnScript(args, {\n creature: SLIMY_SLUG,\n needCrystals: { base: 1 },\n retriggerMode: \"automatic\",\n rng: args.cavern.dice.slugSpawnScript(args.plan.id),\n triggerOnFirstArmed: false,\n ...opts,\n });\n}\n\nfunction creatureSpawnScript(\n { cavern, plan }: { cavern: EnscribedCavern; plan: Plan },\n opts: CreatureSpawnerArgs,\n) {\n const v = mkVars(`p${plan.id}${opts.creature.inspectAbbrev}Sp`, [\n \"doArm\",\n \"doRetrigger\",\n \"doSpawn\",\n \"needCrystals\",\n \"state\",\n \"triggerCount\",\n ]);\n\n const waveSize =\n opts.waveSize ??\n opts.rng.betaInt({\n a: 5,\n b: 2,\n min: 1,\n max: (opts.meanWaveSize ?? plan.monsterWaveSize) * 1.25,\n });\n const delay = { min: 2 / waveSize, max: 15 / waveSize };\n const spawnRate = opts.spawnRate ?? plan.monsterSpawnRate;\n const meanCooldown = (60 * waveSize) / spawnRate;\n\n const armEvent = opts.armEvent ?? v.doArm;\n const armTriggers = opts.armEvent\n ? []\n : getArmTriggers(cavern, plan, armEvent);\n const cooldownOffset = meanCooldown / 4;\n const cooldown = {\n min: meanCooldown - cooldownOffset,\n max: meanCooldown + cooldownOffset,\n };\n const emerges = cycleEmerges(\n opts.emerges ?? getEmerges(plan),\n opts.rng,\n waveSize,\n );\n const once = opts.maxTriggerCount === 1;\n const triggerPoints = opts.triggerPoints ?? getTriggerPoints(cavern, plan);\n\n const needCountTriggerEvents = !once && opts.maxTriggerCount !== undefined;\n const needTriggerPoints = !(once && opts.triggerOnFirstArmed);\n\n return scriptFragment(\n `# P${plan.id}: Spawn ${opts.creature.name} x${waveSize}`,\n\n // Declare variables\n `int ${v.state}=${STATE.INITIAL}`,\n needCountTriggerEvents && `int ${v.triggerCount}=0`,\n opts.needCrystals?.increment !== undefined &&\n `int ${v.needCrystals}=${opts.needCrystals.base}`,\n\n // Enable\n ...armTriggers,\n eventChain(\n armEvent,\n opts.initialCooldown &&\n `wait:random(${opts.initialCooldown.min.toFixed(2)})(${opts.initialCooldown.max.toFixed(2)});`,\n armTriggers.length !== 1 && `((${v.state}>${STATE.INITIAL}))return;`,\n `${v.state}=${STATE.ARMED};`,\n opts.triggerOnFirstArmed && `${v.doSpawn};`,\n ),\n\n // Do the actual spawning.\n ...(needTriggerPoints\n ? triggerPoints.map(\n (point) =>\n `when(enter:${transformPoint(cavern, point)})[${v.doSpawn}]`,\n )\n : []),\n eventChain(\n v.doSpawn,\n\n // Check conditions to reject.\n `((${v.state}<${STATE.ARMED}))return;`,\n opts.needCrystals &&\n `((crystals<${opts.needCrystals.increment ? v.needCrystals : opts.needCrystals.base}))return;`,\n\n // Update variables before triggering.\n `${v.state}=${RETRIGGER_MODES[opts.retriggerMode].afterTriggerState};`,\n needCountTriggerEvents && `${v.triggerCount}+=1;`,\n opts.needCrystals?.increment !== undefined &&\n `${v.needCrystals}=crystals+${opts.needCrystals.increment};`,\n\n // Trigger all the spawns.\n ...(emerges.flatMap((emerge) => [\n `wait:random(${delay.min.toFixed(2)})(${delay.max.toFixed(2)});`,\n `emerge:${transformPoint(cavern, [emerge.x, emerge.y])},A,${opts.creature.id},${emerge.radius};`,\n ]) as `${string};`[]),\n\n // Update the counter.\n once\n ? `${v.state}=${STATE.EXHAUSTED};`\n : opts.maxTriggerCount !== undefined &&\n `((${v.triggerCount}>=${opts.maxTriggerCount}))${v.state}=${STATE.EXHAUSTED};`,\n // Wait for the cooldown period.\n !once &&\n `wait:random(${cooldown.min.toFixed(2)})(${cooldown.max.toFixed(2)});`,\n // Re-arm if in cooldown.\n !once &&\n `((${v.state}>=${STATE.COOLDOWN}))[${v.state}=${STATE.ARMED}][${v.state}=${STATE.EXHAUSTED}];`,\n ),\n\n // Hoard mode must be \"manually\" re-armed by a monster visiting the hoard\n // within cooldown.\n ...(!once && opts.retriggerMode === \"hoard\"\n ? [\n ...plan.innerPearl[0].map(\n (point) =>\n `when(enter:${transformPoint(cavern, point)},${opts.creature.id})[${v.doRetrigger}]`,\n ),\n eventChain(\n v.doRetrigger,\n `((${v.state}==${STATE.AWAITING_REARM}))${v.state}=${STATE.COOLDOWN};`,\n ),\n ]\n : []),\n );\n}\n","import { Architect, BaseMetadata } from \"../models/architect\";\nimport { DefaultHallArchitect, PartialArchitect } from \"./default\";\nimport { mkRough, Rough } from \"./utils/rough\";\nimport {\n escapeString,\n eventChain,\n mkVars,\n scriptFragment,\n transformPoint,\n} from \"./utils/script\";\nimport { DiscoveredCavern } from \"../transformers/03_plastic/01_discover\";\nimport { Plan } from \"../models/plan\";\nimport { monsterSpawnScript } from \"./utils/creature_spawners\";\nimport { Hardness, Tile } from \"../models/tiles\";\n\n// Fissure halls are not drillable, but suddenly crack open without any player\n// involvement after being discovered.\n\nconst METADATA = { tag: \"fissure\" } as const satisfies BaseMetadata;\n\nfunction getDiscoveryPoints(cavern: DiscoveredCavern, plan: Plan) {\n const used: true[] = [];\n return plan.innerPearl[0].filter((pos) => {\n const dz = cavern.discoveryZones.get(...pos);\n if (!dz || dz.openOnSpawn || used[dz.id]) {\n return false;\n }\n used[dz.id] = true;\n return true;\n });\n}\n\nconst sVars = (plan: Plan) =>\n mkVars(`p${plan.id}Fissure`, [\n \"onDiscover\",\n `onTrip`,\n `msgForeshadow`,\n `spawn`,\n \"tripCount\",\n ]);\n\nconst BASE: PartialArchitect = {\n ...DefaultHallArchitect,\n prime: () => METADATA,\n script: ({ cavern, plan }) => {\n const v = sVars(plan);\n const discoveryPoints = getDiscoveryPoints(cavern, plan);\n const panTo = plan.innerPearl[0][Math.floor(plan.innerPearl[0].length / 2)];\n const rng = cavern.dice.script(plan.id);\n\n const drillPoints = plan.innerPearl[0].filter((pos) => {\n const t = cavern.tiles.get(...pos) ?? Tile.SOLID_ROCK;\n return t.isWall && t.hardness < Hardness.SOLID;\n });\n const trips = Math.ceil((discoveryPoints.length + drillPoints.length) / 4);\n\n return scriptFragment(\n `# P${plan.id}: Fissure`,\n `int ${v.tripCount}=0`,\n `string ${v.msgForeshadow}=\"${escapeString(cavern.lore.generateSeismicForeshadow(rng).text)}\"`,\n ...discoveryPoints.map(\n (pos) => `if(change:${transformPoint(cavern, pos)})[${v.onTrip}]`,\n ),\n ...drillPoints.map(\n (pos) => `if(drill:${transformPoint(cavern, pos)})[${v.onTrip}]`,\n ),\n eventChain(\n v.onTrip,\n `${v.tripCount}+=1;`,\n `((${v.tripCount}!=${trips}))return;`,\n `wait:random(5)(30);`,\n `shake:1;`,\n `msg:${v.msgForeshadow};`,\n `wait:random(30)(150);`,\n `shake:2;`,\n `pan:${transformPoint(cavern, panTo)};`,\n `wait:1;`,\n `shake:4;`,\n ...plan.innerPearl[0]\n .filter((pos) => cavern.tiles.get(...pos)?.isWall)\n .map(\n (pos) => `drill:${transformPoint(cavern, pos)};` as `${string};`,\n ),\n cavern.context.hasMonsters && `${v.spawn};`,\n ),\n );\n },\n monsterSpawnScript: (args) => {\n const bps = args.plan.path.baseplates;\n const ebps = [bps[0], bps[bps.length - 1]];\n return monsterSpawnScript(args, {\n armEvent: sVars(args.plan).spawn,\n emerges: ebps.map((bp) => {\n const [x, y] = bp.center;\n return { x: Math.floor(x), y: Math.floor(y), radius: bp.pearlRadius };\n }),\n maxTriggerCount: 1,\n triggerOnFirstArmed: true,\n });\n },\n};\n\nconst FISSURE = [\n {\n name: \"Fissure Hall\",\n ...BASE,\n ...mkRough({ of: Rough.SOLID_ROCK }, { of: Rough.VOID, grow: 1 }),\n hallBid: ({ plan, plans }) =>\n !plan.fluid &&\n plan.path.kind === \"auxiliary\" &&\n plan.path.exclusiveSnakeDistance > 1 &&\n !plan.intersects.some((_, i) => plans[i].metadata?.tag === \"fissure\") &&\n 1,\n },\n] as const satisfies readonly Architect[];\n\nexport default FISSURE;\n","import { FluidType } from \"../../models/tiles\";\nimport { FloodedPlan } from \"../../transformers/01_planning/02_flood\";\n\nexport function intersectsAny(\n plans: readonly FloodedPlan[],\n plan: FloodedPlan,\n fluid: FluidType,\n) {\n return plans.some((p) => plan.intersects[p.id] && p.fluid === fluid);\n}\n\nexport function intersectsOnly(\n plans: readonly FloodedPlan[],\n plan: FloodedPlan,\n fluid: FluidType,\n) {\n return !plans.some((p) => plan.intersects[p.id] && p.fluid !== fluid);\n}\n\nexport function isDeadEnd(plan: FloodedPlan) {\n return plan.intersects.reduce((r, n) => r + (n ? 1 : 0), 0) <= 1;\n}\n","import { Architect } from \"../models/architect\";\nimport { Tile } from \"../models/tiles\";\nimport { DefaultCaveArchitect, PartialArchitect } from \"./default\";\nimport { mkRough, Rough, weightedSprinkle } from \"./utils/rough\";\nimport { intersectsOnly, isDeadEnd } from \"./utils/intersects\";\nimport { monsterSpawnScript } from \"./utils/creature_spawners\";\nimport { sprinkleCrystals } from \"./utils/resources\";\nimport { placeSleepingMonsters } from \"./utils/creatures\";\n\nconst BASE: PartialArchitect = {\n ...DefaultCaveArchitect,\n placeSlugHoles() {},\n monsterSpawnScript(args) {\n if (args.cavern.context.biome === \"ice\" && args.plan.fluid === Tile.LAVA) {\n return undefined;\n }\n if (args.cavern.context.biome === \"lava\" && args.plan.fluid !== Tile.LAVA) {\n return undefined;\n }\n return monsterSpawnScript(args);\n },\n};\n\nconst FLOODED = [\n {\n name: \"Lake\",\n ...BASE,\n ...mkRough(\n { of: Rough.WATER, grow: 2 },\n { of: Rough.FLOOR, shrink: 1, grow: 1 },\n { of: Rough.LOOSE_ROCK },\n {\n of: weightedSprinkle(\n { item: Rough.LOOSE_ROCK, bid: 10 },\n { item: Rough.LOOSE_OR_HARD_ROCK, bid: 1 },\n ),\n },\n ),\n caveBid: ({ plan }) =>\n plan.fluid === Tile.WATER && plan.pearlRadius < 10 && 1,\n },\n {\n name: \"Lake With Sleeping Monsters\",\n ...BASE,\n ...mkRough(\n { of: Rough.WATER, grow: 2 },\n { of: Rough.FLOOR, grow: 1 },\n { of: Rough.LOOSE_ROCK },\n { of: Rough.LOOSE_OR_HARD_ROCK },\n ),\n caveBid: ({ cavern, plan }) =>\n cavern.context.hasMonsters &&\n cavern.context.biome === \"ice\" &&\n plan.fluid === Tile.WATER &&\n plan.path.baseplates.length > 1 &&\n plan.pearlRadius > 3 &&\n plan.pearlRadius < 10 &&\n 1,\n placeEntities(args) {\n const rng = args.cavern.dice.placeEntities(args.plan.id);\n const count = Math.ceil(args.plan.monsterWaveSize * 1.2);\n placeSleepingMonsters(args, rng, count);\n },\n },\n {\n name: \"Island\",\n ...BASE,\n ...mkRough(\n { of: Rough.ALWAYS_SOLID_ROCK, width: 0, grow: 0.7 },\n { of: Rough.ALWAYS_HARD_ROCK, width: 0, grow: 0.2 },\n { of: Rough.ALWAYS_LOOSE_ROCK, width: 0, grow: 0.2 },\n { of: Rough.ALWAYS_DIRT, grow: 0.5 },\n { of: Rough.ALWAYS_FLOOR, grow: 0.1 },\n { of: Rough.WATER, grow: 2 },\n { of: Rough.FLOOR, grow: 1 },\n { of: Rough.LOOSE_ROCK },\n { of: Rough.MIX_FRINGE },\n ),\n caveBid: ({ plan }) =>\n plan.fluid === Tile.WATER && plan.pearlRadius > 5 && 2,\n },\n {\n name: \"Lava Lake\",\n ...BASE,\n ...mkRough(\n { of: Rough.LAVA, grow: 2 },\n { of: Rough.FLOOR, grow: 1 },\n { of: Rough.LOOSE_ROCK, shrink: 1 },\n { of: Rough.LOOSE_OR_HARD_ROCK },\n ),\n caveBid: ({ plan }) =>\n plan.fluid === Tile.LAVA && plan.pearlRadius < 10 && 1,\n },\n {\n name: \"Lava Island\",\n ...BASE,\n ...mkRough(\n { of: Rough.ALWAYS_SOLID_ROCK, width: 0, grow: 0.7 },\n { of: Rough.ALWAYS_HARD_ROCK, width: 0, grow: 0.2 },\n { of: Rough.ALWAYS_LOOSE_ROCK, width: 0, grow: 0.2 },\n { of: Rough.ALWAYS_FLOOR, width: 2, grow: 0.1 },\n { of: Rough.LAVA, grow: 2 },\n { of: Rough.FLOOR, grow: 0.5 },\n { of: Rough.LOOSE_ROCK },\n { of: Rough.LOOSE_OR_HARD_ROCK },\n ),\n caveBid: ({ plan }) =>\n plan.fluid === Tile.LAVA && plan.pearlRadius > 5 && 1,\n },\n {\n name: \"Peninsula\",\n ...BASE,\n ...mkRough(\n { of: Rough.ALWAYS_SOLID_ROCK, width: 0, grow: 0.7 },\n { of: Rough.ALWAYS_HARD_ROCK, width: 0, grow: 0.2 },\n { of: Rough.ALWAYS_LOOSE_ROCK, width: 0, grow: 0.2 },\n { of: Rough.ALWAYS_DIRT, width: 0, grow: 0.5 },\n { of: Rough.ALWAYS_FLOOR, width: 2, grow: 0.1 },\n { of: Rough.BRIDGE_ON_WATER, grow: 2 },\n { of: Rough.LOOSE_ROCK },\n { of: Rough.MIX_FRINGE },\n ),\n caveBid: ({ plans, plan }) =>\n plan.fluid === Tile.WATER &&\n plan.pearlRadius > 5 &&\n isDeadEnd(plan) &&\n intersectsOnly(plans, plan, null) &&\n 1,\n },\n {\n name: \"Lava Peninsula\",\n ...BASE,\n ...mkRough(\n { of: Rough.ALWAYS_SOLID_ROCK, width: 0, grow: 0.7 },\n { of: Rough.ALWAYS_HARD_ROCK, width: 0, grow: 0.2 },\n { of: Rough.ALWAYS_LOOSE_ROCK, grow: 0.2 },\n { of: Rough.ALWAYS_FLOOR, grow: 0.1 },\n { of: Rough.BRIDGE_ON_LAVA, grow: 2 },\n { of: Rough.AT_MOST_HARD_ROCK },\n ),\n caveBid: ({ plans, plan }) =>\n plan.fluid === Tile.LAVA &&\n plan.pearlRadius > 5 &&\n isDeadEnd(plan) &&\n intersectsOnly(plans, plan, null) &&\n 1,\n },\n {\n name: \"Lava Stalagmite Cave\",\n ...BASE,\n crystalsToPlace: ({ plan }) => plan.crystalRichness * plan.perimeter * 2,\n ...mkRough(\n {\n of: weightedSprinkle(\n { item: Rough.ALWAYS_DIRT, bid: 0.01 },\n { item: Rough.ALWAYS_LOOSE_ROCK, bid: 0.1 },\n { item: Rough.LAVA, bid: 1 },\n ),\n width: 4,\n grow: 1,\n },\n {\n of: weightedSprinkle(\n { item: Rough.AT_MOST_DIRT, bid: 0.25 },\n { item: Rough.AT_MOST_LOOSE_ROCK, bid: 1 },\n ),\n },\n { of: Rough.AT_MOST_HARD_ROCK },\n ),\n placeCrystals(args) {\n sprinkleCrystals(args, {\n seamBias: Math.max(args.cavern.context.caveCrystalSeamBias, 0.6),\n });\n },\n caveBid: ({ plan }) =>\n plan.fluid === Tile.LAVA &&\n plan.hasErosion &&\n plan.pearlRadius > 5 &&\n 0.4,\n },\n] as const satisfies readonly Architect[];\nexport default FLOODED;\n","import { Architect } from \"../models/architect\";\nimport { Tile } from \"../models/tiles\";\nimport { DefaultHallArchitect } from \"./default\";\nimport { mkRough, Rough } from \"./utils/rough\";\nimport { NSEW, Point } from \"../common/geometry\";\n\n// Loopback halls use solid rock to ensure they can only be accessed after\n// excavating both ends. Note: This algorithm is a bit weak in that it can err\n// in both directions - Sometimes, it generates a hall that isn't completely\n// sealed off (particularly where multiple halls intersect one of the ends)\n// and, while this hasn't come up in testing yet, it's possible for this to\n// generate a pair of dead ends that don't open properly.\n\nconst BASE: typeof DefaultHallArchitect = {\n ...DefaultHallArchitect,\n};\n\nfunction withBarrier({\n roughExtent,\n rough,\n}: Pick, \"roughExtent\" | \"rough\">): Pick<\n Architect,\n \"roughExtent\" | \"rough\"\n> {\n const roughWithBarrier: Architect[\"rough\"] = (args) => {\n rough(args);\n\n // Is this hall allowed to place solid rock here?\n function overlaps(pos: Point) {\n const idx = args.cavern.pearlInnerDex.get(...pos);\n // The position must ONLY overlap this hall. Otherwise, this might block\n // another hall, which could make the level unplayable.\n return idx && !idx.some((_, i) => i !== args.plan.id);\n }\n\n const tipPlans = args.plan.intersects\n .map((_, id) => args.cavern.plans[id])\n .filter((p) => p.kind === \"cave\")\n .sort((a, b) => a.hops.length - b.hops.length);\n\n const op = Math.min(...tipPlans.map((tp) => tp.outerPearl.length)) - 1;\n for (let i = 0; i < op; i++) {\n for (const tipPlan of tipPlans) {\n // Add a \"crust\" of solid rock on the first layer of the outer pearl.\n const crust = tipPlan.outerPearl[i].filter(overlaps);\n if (crust.length < args.plan.pearlRadius) {\n continue;\n }\n crust.forEach((pos) => args.tiles.set(...pos, Tile.SOLID_ROCK));\n // For the second layer, add solid rock wherever it borders at least two\n // solid rock.\n tipPlan.outerPearl[i + 1]\n .filter(overlaps)\n .filter(\n ([x, y]) =>\n NSEW.reduce(\n (r, [ox, oy]) =>\n (args.tiles.get(x + ox, y + oy) ?? Tile.SOLID_ROCK) ===\n Tile.SOLID_ROCK\n ? r + 1\n : r,\n 0,\n ) > 1,\n )\n .forEach((pos) => args.tiles.set(...pos, Tile.SOLID_ROCK));\n return;\n }\n }\n };\n return { roughExtent, rough: roughWithBarrier };\n}\n\nconst LOOPBACK = [\n {\n name: \"Loopback Hall\",\n ...BASE,\n ...withBarrier(\n mkRough(\n { of: Rough.FLOOR, grow: 2 },\n { of: Rough.AT_MOST_LOOSE_ROCK, grow: 1 },\n { of: Rough.AT_MOST_HARD_ROCK },\n { of: Rough.VOID, grow: 1 },\n ),\n ),\n hallBid: ({ plan }) =>\n !plan.fluid &&\n plan.pearlRadius > 1 &&\n plan.path.kind === \"auxiliary\" &&\n plan.path.exclusiveSnakeDistance > 5 &&\n 2,\n },\n] as const satisfies readonly Architect[];\n\nexport default LOOPBACK;\n","import { Point } from \"../common/geometry\";\nimport { Grid } from \"../common/grid\";\nimport { EntityPosition, serializePosition } from \"./position\";\n\ntype Upgrade =\n | \"UpEngine\"\n | \"UpDrill\"\n | \"UpAddDrill\"\n | \"UpCargoHold\"\n | \"UpScanner\"\n | \"UpLaser\"\n | \"UpAddNav\";\n\nconst JOBS = {\n land: \"JobDriver\",\n air: \"JobPilot\",\n sea: \"JobSailor\",\n} as const;\n\nexport class VehicleTemplate {\n readonly id: string;\n readonly name: string;\n readonly inspectAbbrev: string;\n readonly frame: \"small\" | \"large\";\n readonly kind: \"land\" | \"sea\" | \"air\";\n readonly crystals: number;\n readonly upgrades: readonly Upgrade[];\n constructor(\n id: string,\n name: string,\n inspectAbbrev: string,\n frame: \"small\" | \"large\",\n kind: \"land\" | \"sea\" | \"air\",\n crystals: number,\n upgrades: readonly Upgrade[],\n ) {\n this.id = id;\n this.name = name;\n this.inspectAbbrev = inspectAbbrev;\n this.frame = frame;\n this.kind = kind;\n this.crystals = crystals;\n this.upgrades = upgrades;\n }\n\n get job() {\n return JOBS[this.kind];\n }\n}\n\nexport const HOVER_SCOUT = new VehicleTemplate(\n \"VehicleHoverScout_C\",\n \"Hover Scout\",\n \"HoSc\",\n \"small\",\n \"land\",\n 1,\n [\"UpEngine\"],\n);\nexport const SMALL_DIGGER = new VehicleTemplate(\n \"VehicleSmallDigger_C\",\n \"Small Digger\",\n \"SmDi\",\n \"small\",\n \"land\",\n 1,\n [\"UpEngine\", \"UpDrill\"],\n);\nexport const SMALL_TRANSPORT_TRUCK = new VehicleTemplate(\n \"VehicleSmallTransportTruck_C\",\n \"Small Transport Truck\",\n \"SmTT\",\n \"small\",\n \"land\",\n 2,\n [\"UpEngine\", \"UpCargoHold\"],\n);\nexport const RAPID_RIDER = new VehicleTemplate(\n \"VehicleRapidRider_C\",\n \"Rapid Rider\",\n \"RaRr\",\n \"small\",\n \"sea\",\n 2,\n [\"UpAddDrill\", \"UpCargoHold\"],\n);\nexport const SMLC = new VehicleTemplate(\n \"VehicleSMLC_C\",\n \"Small Mobile Laser Cutter\",\n \"SMLC\",\n \"small\",\n \"land\",\n 3,\n [\"UpEngine\", \"UpLaser\"],\n);\nexport const TUNNEL_SCOUT = new VehicleTemplate(\n \"VehicleTunnelScout_C\",\n \"Tunnel Scout\",\n \"TuSc\",\n \"small\",\n \"air\",\n 3,\n [\"UpAddDrill\"],\n);\nexport const LOADER_DOZER = new VehicleTemplate(\n \"VehicleLoaderDozer_C\",\n \"Loader Dozer\",\n \"LoDz\",\n \"large\",\n \"land\",\n 5,\n [\"UpEngine\"],\n);\nexport const GRANITE_GRINDER = new VehicleTemplate(\n \"VehicleGraniteGrinder_C\",\n \"Granite Grinder\",\n \"GrGr\",\n \"large\",\n \"land\",\n 5,\n [\"UpEngine\", \"UpDrill\"],\n);\nexport const CARGO_CARRIER = new VehicleTemplate(\n \"VehicleCargoCarrier_C\",\n \"Cargo Carrier\",\n \"CaCa\",\n \"large\",\n \"sea\",\n 5,\n [\"UpAddNav\"],\n);\nexport const LMLC = new VehicleTemplate(\n \"VehicleLMLC_C\",\n \"Large Mobile Laser Cutter\",\n \"LMLC\",\n \"large\",\n \"land\",\n 8,\n [\"UpEngine\", \"UpLaser\", \"UpAddNav\"],\n);\nexport const CHROME_CRUSHER = new VehicleTemplate(\n \"VehicleChromeCrusher_C\",\n \"Chrome Crusher\",\n \"CrCr\",\n \"large\",\n \"land\",\n 8,\n [\"UpEngine\", \"UpDrill\", \"UpLaser\", \"UpScanner\"],\n);\nexport const TUNNEL_TRANSPORT = new VehicleTemplate(\n \"VehicleTunnelTransport_C\",\n \"Tunnel Transport\",\n \"TuTr\",\n \"large\",\n \"air\",\n 10,\n [],\n);\n\nexport type Vehicle = EntityPosition & {\n readonly id: number;\n readonly template: VehicleTemplate;\n readonly essential: boolean;\n readonly driverId: number | null;\n readonly upgrades: Upgrade[];\n};\n\nexport class VehicleFactory {\n private id: number = 0;\n create(\n args: EntityPosition & {\n template: T;\n upgrades?: T[\"upgrades\"][number][];\n } & Partial>,\n ): Vehicle {\n return {\n essential: false,\n driverId: null,\n upgrades: [],\n ...args,\n id: this.id++,\n };\n }\n}\n\nexport function serializeVehicle(\n vehicle: Vehicle,\n offset: Point,\n heightMap: Grid,\n) {\n return [\n vehicle.template.id,\n serializePosition(vehicle, offset, heightMap, 0, \"entity\"),\n vehicle.upgrades.map((u) => `${u}/`).join(\"\"),\n vehicle.driverId !== null && `driver=${vehicle.driverId.toFixed()}`,\n vehicle.essential && \"Essential=true\",\n `ID=${vehicle.id.toFixed()}`,\n ]\n .filter((n) => n)\n .join(\",\");\n}\n","import { PseudorandomStream } from \"../common\";\nimport { Point } from \"../common/geometry\";\nimport { Grid } from \"../common/grid\";\nimport { Architect } from \"../models/architect\";\nimport { PlannedCavern } from \"../models/cavern\";\nimport { DiscoveryZone } from \"../models/discovery_zone\";\nimport { Plan } from \"../models/plan\";\nimport { randomlyInTile } from \"../models/position\";\nimport { Tile } from \"../models/tiles\";\nimport {\n Vehicle,\n VehicleFactory,\n VehicleTemplate,\n HOVER_SCOUT,\n RAPID_RIDER,\n SMALL_DIGGER,\n SMALL_TRANSPORT_TRUCK,\n TUNNEL_SCOUT,\n} from \"../models/vehicle\";\nimport { DiscoveredCavern } from \"../transformers/03_plastic/01_discover\";\nimport { StrataformedCavern } from \"../transformers/03_plastic/02_strataform\";\nimport { DefaultCaveArchitect, PartialArchitect } from \"./default\";\nimport { isDeadEnd } from \"./utils/intersects\";\nimport { mkRough, Rough } from \"./utils/rough\";\nimport { pickPoint } from \"./utils/placement\";\nimport {\n escapeString,\n eventChain,\n mkVars,\n scriptFragment,\n transformPoint,\n} from \"./utils/script\";\n\nexport type LostMinersMetadata = {\n readonly tag: \"lostMiners\";\n readonly minersCount: number;\n};\n\nexport const gLostMiners = mkVars(\"gLostMiners\", [\n \"remainingCaves\",\n \"onFoundAll\",\n \"messageFoundAll\",\n \"done\",\n]);\n\nexport function countLostMiners(cavern: PlannedCavern) {\n let lostMiners: number = 0;\n let lostMinerCaves: number = 0;\n cavern.plans.forEach((plan) => {\n if (plan.metadata?.tag === \"lostMiners\") {\n lostMinerCaves++;\n lostMiners += plan.metadata.minersCount;\n }\n });\n return { lostMiners, lostMinerCaves };\n}\n\nfunction getBreadcrumbPoint(\n cavern: DiscoveredCavern,\n [minersX, minersY]: Point,\n minersDz: DiscoveryZone,\n plan: Plan,\n): Point {\n if (!plan.hops.length) {\n throw new Error(\"Reached spawn without a breadcrumb\");\n }\n\n // Choose the neighboring plan which is closest to spawn (fewest hops).\n const neighborPlan = cavern.plans[plan.hops[plan.hops.length - 1]];\n\n const result = neighborPlan.innerPearl\n .flatMap((layer) => layer)\n // Find all the points in the inner pearl that are not walls and are in a\n // different discovery zone from the miners.\n .filter(([x, y]) => {\n const dz = cavern.discoveryZones.get(x, y);\n return dz && dz !== minersDz;\n })\n // Compute a^2 + b^2 for these points to get their relative distance and\n // choose the closest point to the miners.\n .map(\n ([x, y]) =>\n [x, y, (x - minersX) ** 2 + (y - minersY) ** 2] as [\n number,\n number,\n number,\n ],\n )\n .reduce(\n (r: [number, number, number] | null, p) => (r && r[2] < p[2] ? r : p),\n null,\n );\n\n // If such a point exists, return it.\n if (result) {\n return [result[0], result[1]];\n }\n\n // If no points exist, recurse.\n return getBreadcrumbPoint(cavern, [minersX, minersY], minersDz, neighborPlan);\n}\n\nfunction placeBreadcrumbVehicle(\n cavern: StrataformedCavern,\n plan: Plan,\n [x, y]: Point,\n vehicles: Vehicle[],\n vehicleFactory: VehicleFactory,\n rng: PseudorandomStream,\n) {\n const tile = cavern.tiles.get(x, y);\n const fluid = tile === Tile.LAVA || tile === Tile.WATER ? tile : null;\n const template = rng.weightedChoice([\n { item: HOVER_SCOUT, bid: fluid ? 0 : 2 },\n { item: SMALL_DIGGER, bid: fluid ? 0 : 0.5 },\n { item: SMALL_TRANSPORT_TRUCK, bid: fluid ? 0 : 0.75 },\n { item: RAPID_RIDER, bid: fluid === Tile.WATER ? 1 : 0 },\n { item: TUNNEL_SCOUT, bid: 0.25 },\n { item: null, bid: 0.0025 },\n ]);\n if (template) {\n vehicles.push(\n vehicleFactory.create({\n ...randomlyInTile({\n x,\n y,\n aimedAt: plan.path.baseplates[0].center,\n rng,\n }),\n template,\n }),\n );\n }\n}\n\nconst pickMinerPoint = (\n plan: Plan,\n {\n tiles,\n discoveryZones,\n }: {\n tiles: Grid;\n discoveryZones: Grid;\n },\n) =>\n pickPoint(plan, (x, y) => {\n const t = tiles.get(x, y);\n return !t?.isWall && !t?.isFluid && !discoveryZones.get(x, y)?.openOnSpawn;\n });\n\nconst BASE: PartialArchitect = {\n ...DefaultCaveArchitect,\n prime: ({ cavern, plan }) => {\n const rng = cavern.dice.prime(plan.id);\n const minersCount = rng.betaInt({ a: 1, b: 2, min: 1, max: 5 });\n return { tag: \"lostMiners\", minersCount };\n },\n placeEntities: ({\n cavern,\n plan,\n miners,\n minerFactory,\n vehicles,\n vehicleFactory,\n }) => {\n const rng = cavern.dice.placeEntities(plan.id);\n // Place the lost miners\n const [x, y] =\n pickMinerPoint(plan, cavern) ??\n (() => {\n throw new Error(\"Nowhere to place lost miners\");\n })();\n const dz = cavern.discoveryZones.get(x, y);\n if (!dz) {\n throw new Error(\"Lost Miners point is not discoverable\");\n }\n if (dz.openOnSpawn) {\n throw new Error(\"Lost Miners point is discovered on spawn\");\n }\n for (let i = 0; i < plan.metadata.minersCount; i++) {\n miners.push(minerFactory.create({ ...randomlyInTile({ x, y, rng }) }));\n }\n // Place a breadcrumb vehicle\n const breadcrumbPoint = getBreadcrumbPoint(cavern, [x, y], dz, plan);\n placeBreadcrumbVehicle(\n cavern,\n plan,\n breadcrumbPoint,\n vehicles,\n vehicleFactory,\n rng,\n );\n },\n objectives: ({ cavern }) => {\n const { lostMiners, lostMinerCaves } = countLostMiners(cavern);\n const description =\n lostMiners === 1\n ? \"Find the lost Rock Raider\"\n : lostMinerCaves === 1\n ? \"Find the cave with the lost Rock Radiers\"\n : `Find ${lostMiners} lost Rock Raiders`;\n return {\n variables: [{ condition: `${gLostMiners.done}>0`, description }],\n sufficient: true,\n };\n },\n scriptGlobals({ cavern }) {\n const { lostMinerCaves } = countLostMiners(cavern);\n const message = cavern.lore.foundAllLostMiners(cavern.dice).text;\n return scriptFragment(\n `# Globals: Lost Miners`,\n lostMinerCaves > 1 &&\n `int ${gLostMiners.remainingCaves}=${lostMinerCaves}`,\n `int ${gLostMiners.done}=0`,\n `string ${gLostMiners.messageFoundAll}=\"${escapeString(message)}\"`,\n eventChain(\n gLostMiners.onFoundAll,\n `msg:${gLostMiners.messageFoundAll};`,\n `wait:3;`,\n `${gLostMiners.done}=1;`,\n ),\n );\n },\n script({ cavern, plan }) {\n const lostMinersPoint = transformPoint(\n cavern,\n pickMinerPoint(plan, cavern)!,\n );\n const { lostMinerCaves } = countLostMiners(cavern);\n const v = mkVars(`p${plan.id}LostMiners`, [\n \"messageDiscover\",\n \"onDiscover\",\n \"onIncomplete\",\n ]);\n if (lostMinerCaves === 1) {\n return scriptFragment(\n `# P${plan.id}: Lost Miners in One Cave`,\n `if(change:${lostMinersPoint})[${v.onDiscover}]`,\n eventChain(\n v.onDiscover,\n `pan:${lostMinersPoint};`,\n `${gLostMiners.onFoundAll};`,\n ),\n );\n }\n const rng = cavern.dice.script(plan.id);\n const message = cavern.lore.foundLostMiners(\n rng,\n plan.metadata.minersCount,\n ).text;\n return scriptFragment(\n `# P${plan.id}: Lost Miners in Multiple Caves`,\n `string ${v.messageDiscover}=\"${escapeString(message)}\"`,\n `if(change:${lostMinersPoint})[${v.onDiscover}]`,\n eventChain(\n v.onDiscover,\n `pan:${lostMinersPoint};`,\n `${gLostMiners.remainingCaves}-=1;`,\n `((${gLostMiners.remainingCaves}>0))[${v.onIncomplete}][${gLostMiners.onFoundAll}];`,\n ),\n eventChain(v.onIncomplete, `msg:${v.messageDiscover};`),\n );\n },\n};\n\n// The L.M.S. Explorer's teleporters just seem to be real lousy in ice\n// caverns for some reason.\nconst MULTIPLIERS = { rock: 1.0, ice: 1.4, lava: 0.7 } as const;\n\nconst LOST_MINERS = [\n {\n name: \"Lost Miners\",\n ...BASE,\n ...mkRough(\n { of: Rough.ALWAYS_FLOOR, width: 2, grow: 2 },\n { of: Rough.ALWAYS_LOOSE_ROCK, grow: 1 },\n { of: Rough.HARD_ROCK, grow: 0.5 },\n ),\n caveBid: ({ cavern, hops, plans, plan }) =>\n !plan.fluid &&\n plan.pearlRadius > 2 &&\n plan.pearlRadius < 10 &&\n hops.length > 3 &&\n hops.length <= 8 &&\n isDeadEnd(plan) &&\n plans.reduce(\n (r, p) => (p.metadata?.tag === \"lostMiners\" ? r + 1 : r),\n 0,\n ) < 4 &&\n MULTIPLIERS[cavern.context.biome],\n },\n] as const satisfies readonly Architect[];\nexport default LOST_MINERS;\n","import { Architect } from \"../models/architect\";\nimport { DefaultCaveArchitect, PartialArchitect } from \"./default\";\nimport { mkRough, Rough } from \"./utils/rough\";\nimport { intersectsAny, intersectsOnly, isDeadEnd } from \"./utils/intersects\";\nimport { getPlaceRechargeSeams, sprinkleOre } from \"./utils/resources\";\nimport { position, randomlyInTile } from \"../models/position\";\nimport { pickPoint } from \"./utils/placement\";\nimport {\n escapeString,\n eventChain,\n mkVars,\n scriptFragment,\n} from \"./utils/script\";\nimport { SUPPORT_STATION } from \"../models/building\";\nimport { Tile } from \"../models/tiles\";\nimport {\n VehicleTemplate,\n HOVER_SCOUT,\n RAPID_RIDER,\n SMALL_DIGGER,\n SMALL_TRANSPORT_TRUCK,\n SMLC,\n TUNNEL_SCOUT,\n Vehicle,\n} from \"../models/vehicle\";\nimport { Loadout, Miner } from \"../models/miner\";\nimport { filterTruthy, pairEach } from \"../common/utils\";\nimport { plotLine } from \"../common/geometry\";\nimport { gLostHq } from \"./established_hq\";\n\nexport type NomadsMetadata = {\n readonly tag: \"nomads\";\n readonly minersCount: number;\n readonly vehicles: readonly VehicleTemplate[];\n};\n\nconst VEHICLE_BIDS = [\n { item: HOVER_SCOUT, bid: 1 },\n { item: SMALL_DIGGER, bid: 4 },\n { item: SMALL_TRANSPORT_TRUCK, bid: 1 },\n { item: SMLC, bid: 2 },\n { item: TUNNEL_SCOUT, bid: 1 },\n { item: null, bid: 1 },\n] as const;\n\nexport const gNomads = mkVars(\"gNomads\", [\n \"messageBuiltBase\",\n \"onBuiltBase\",\n \"onInit\",\n \"onFoundHq\",\n]);\n\nconst BASE: PartialArchitect = {\n ...DefaultCaveArchitect,\n crystalsToPlace: () => 5,\n crystalsFromMetadata: (metadata) =>\n metadata.vehicles.reduce((r, v) => r + v.crystals, 0),\n prime: ({ cavern, plan }) => {\n const rng = cavern.dice.prime(plan.id);\n const minersCount = rng.betaInt({ a: 1, b: 3, min: 1, max: 4 });\n const vehicles = filterTruthy([rng.weightedChoice(VEHICLE_BIDS)]);\n return { tag: \"nomads\", minersCount, vehicles };\n },\n placeRechargeSeam: getPlaceRechargeSeams(1),\n placeBuildings: ({ cavern, plan, tiles, openCaveFlags }) => {\n openCaveFlags.set(\n ...pickPoint(plan, (x, y) => {\n const t = tiles.get(x, y);\n return !!t && !t.isWall;\n })!,\n true,\n );\n // If there is an HQ, ensure it is accessible to the nomads.\n cavern.plans\n .find((p) => p.metadata?.tag === \"hq\")\n ?.hops.forEach((hopId) => {\n pairEach(cavern.plans[hopId].path.baseplates, (a, b) => {\n for (const pos of plotLine(a.center, b.center)) {\n if (tiles.get(...pos) === Tile.HARD_ROCK) {\n tiles.set(...pos, Tile.LOOSE_ROCK);\n }\n }\n });\n });\n },\n placeEntities: ({\n cavern,\n plan,\n miners,\n minerFactory,\n vehicles,\n vehicleFactory,\n setCameraPosition,\n }) => {\n const rng = cavern.dice.placeEntities(plan.id);\n const [x, y] = pickPoint(\n plan,\n (x, y) =>\n !!(\n cavern.discoveryZones.get(x, y)?.openOnSpawn &&\n !cavern.tiles.get(x, y)!.isFluid\n ),\n )!;\n const placedVehicles = plan.metadata.vehicles.map((template) => {\n if (template.kind === \"sea\") {\n const p = pickPoint(\n plan,\n (x, y) =>\n !!(\n cavern.discoveryZones.get(x, y)?.openOnSpawn &&\n cavern.tiles.get(x, y) === Tile.WATER\n ),\n );\n if (!p) {\n throw new Error(`Failed to place sea vehicle in plan ${plan.id}`);\n }\n return vehicleFactory.create({\n ...randomlyInTile({ x: p[0], y: p[1], rng }),\n template,\n });\n }\n return vehicleFactory.create({\n ...randomlyInTile({ x, y, rng }),\n template,\n });\n });\n const placedMiners: Miner[] = [];\n for (let i = 0; i < plan.metadata.minersCount; i++) {\n const driving = placedVehicles[i] as Vehicle | undefined;\n const pos = driving ? position(driving) : randomlyInTile({ x, y, rng });\n const loadout: Loadout[] = filterTruthy([\n \"Drill\",\n (i === 0 || rng.chance(0.25)) && \"JobGeologist\",\n driving?.template.job,\n ]);\n const miner = minerFactory.create({\n ...pos,\n loadout,\n });\n if (placedVehicles[i]) {\n placedVehicles[i] = { ...placedVehicles[i], driverId: miner.id };\n }\n placedMiners.push(miner);\n }\n vehicles.push(...placedVehicles);\n miners.push(...placedMiners);\n setCameraPosition(\n position({\n x: placedMiners[0].x,\n y: placedMiners[0].y,\n aimedAt: plan.path.baseplates[0].center,\n pitch: Math.PI / 4,\n }),\n );\n },\n scriptGlobals({ cavern }) {\n if (cavern.plans.some((plan) => plan.metadata?.tag === \"hq\")) {\n // Has HQ: Disable everything until it's found.\n return scriptFragment(\n \"# Globals: Nomads with Lost HQ\",\n `if(time:0)[${gNomads.onInit}]`,\n eventChain(\n gNomads.onInit,\n \"disable:miners;\",\n \"disable:buildings;\",\n \"disable:vehicles;\",\n ),\n `if(${gLostHq.foundHq}>0)[${gNomads.onFoundHq}]`,\n eventChain(\n gNomads.onFoundHq,\n \"enable:miners;\",\n \"enable:buildings;\",\n \"enable:vehicles;\",\n ),\n );\n }\n\n // Acknowledge the construction of a Support Station.\n const msg = escapeString(cavern.lore.nomadsSettled(cavern.dice).text);\n\n return scriptFragment(\n \"# Globals: Nomads, no HQ\",\n `string ${gNomads.messageBuiltBase}=\"${msg}\"`,\n `if(${SUPPORT_STATION.id}.new)[${gNomads.onBuiltBase}]`,\n eventChain(gNomads.onBuiltBase, `msg:${gNomads.messageBuiltBase};`),\n );\n },\n};\n\nconst NOMAD_SPAWN = [\n {\n name: \"Nomad Spawn\",\n ...BASE,\n ...mkRough(\n { of: Rough.ALWAYS_FLOOR, width: 2, grow: 2 },\n { of: Rough.AT_MOST_LOOSE_ROCK, grow: 1 },\n { of: Rough.MIX_FRINGE },\n ),\n crystalsToPlace: ({ plan }) =>\n Math.max(plan.crystalRichness * plan.perimeter, 5),\n ore: ({ plan }) => Math.max(plan.oreRichness * plan.perimeter, 10),\n placeOre: (args) => {\n return sprinkleOre(args, { seamBias: 1 });\n },\n spawnBid: ({ cavern, plan }) =>\n !plan.fluid &&\n plan.pearlRadius > 0 &&\n intersectsOnly(cavern.plans, plan, null) &&\n (isDeadEnd(plan) ? 1 : 0.1),\n },\n {\n name: \"Nomad Spawn Peninsula\",\n ...BASE,\n ...mkRough(\n { of: Rough.ALWAYS_FLOOR, grow: 2 },\n { of: Rough.BRIDGE_ON_WATER, width: 2, grow: 0.5 },\n { of: Rough.FLOOR },\n { of: Rough.AT_MOST_LOOSE_ROCK, grow: 1 },\n { of: Rough.MIX_FRINGE },\n ),\n prime: () => ({ tag: \"nomads\", minersCount: 1, vehicles: [RAPID_RIDER] }),\n spawnBid: ({ cavern, plan }) =>\n plan.fluid === Tile.WATER &&\n plan.pearlRadius > 4 &&\n intersectsAny(cavern.plans, plan, null) &&\n 0.5,\n },\n {\n name: \"Nomad Spawn Lava Peninsula\",\n ...BASE,\n ...mkRough(\n { of: Rough.ALWAYS_FLOOR, grow: 2 },\n { of: Rough.BRIDGE_ON_LAVA, width: 2, grow: 0.5 },\n { of: Rough.FLOOR },\n { of: Rough.AT_MOST_LOOSE_ROCK, grow: 1 },\n { of: Rough.AT_MOST_HARD_ROCK },\n ),\n prime: () => ({ tag: \"nomads\", minersCount: 1, vehicles: [TUNNEL_SCOUT] }),\n spawnBid: ({ cavern, plan }) =>\n plan.fluid === Tile.LAVA &&\n plan.pearlRadius > 4 &&\n intersectsAny(cavern.plans, plan, null) &&\n 0.5,\n },\n] as const satisfies readonly Architect[];\nexport default NOMAD_SPAWN;\n","import { Architect } from \"../models/architect\";\nimport { DefaultCaveArchitect, PartialArchitect } from \"./default\";\nimport { mkRough, Rough, weightedSprinkle } from \"./utils/rough\";\nimport { intersectsOnly } from \"./utils/intersects\";\nimport { monsterSpawnScript } from \"./utils/creature_spawners\";\n\nconst BASE: PartialArchitect = {\n ...DefaultCaveArchitect,\n monsterSpawnScript: (args) => monsterSpawnScript(args),\n};\n\nconst SIMPLE_CAVE = [\n {\n name: \"Filled Cave\",\n ...BASE,\n ...mkRough(\n { of: Rough.DIRT, width: 0, grow: 0.25 },\n {\n of: weightedSprinkle(\n { item: Rough.DIRT, bid: 0.25 },\n { item: Rough.LOOSE_ROCK, bid: 0.25 },\n { item: Rough.DIRT_OR_LOOSE_ROCK, bid: 0.5 },\n ),\n grow: 1,\n },\n { of: Rough.LOOSE_OR_HARD_ROCK },\n ),\n caveBid: ({ plan }) => !plan.fluid && plan.pearlRadius < 4 && 0.04,\n },\n {\n name: \"Open Cave\",\n ...BASE,\n ...mkRough(\n { of: Rough.FLOOR, grow: 2 },\n { of: Rough.AT_MOST_DIRT, width: 0, grow: 0.5 },\n {\n of: weightedSprinkle(\n { item: Rough.AT_MOST_DIRT, bid: 0.25 },\n { item: Rough.AT_MOST_LOOSE_ROCK, bid: 1 },\n ),\n grow: 1,\n },\n { of: Rough.MIX_FRINGE },\n { of: Rough.VOID, width: 0, grow: 0.5 },\n ),\n caveBid: ({ plans, plan }) =>\n !plan.fluid &&\n plan.pearlRadius < 10 &&\n intersectsOnly(plans, plan, null) &&\n 2,\n },\n {\n name: \"Empty Cave\",\n ...BASE,\n ...mkRough(\n { of: Rough.FLOOR, grow: 2 },\n { of: Rough.DIRT, width: 0, grow: 0.1 },\n {\n of: weightedSprinkle(\n { item: Rough.DIRT, bid: 0.25 },\n { item: Rough.LOOSE_ROCK, bid: 1 },\n ),\n grow: 1,\n },\n { of: Rough.MIX_LOOSE_HARD_ROCK, grow: 0.5 },\n { of: Rough.VOID, width: 0, grow: 0.5 },\n ),\n caveBid: ({ plan }) => !plan.fluid && plan.pearlRadius < 10 && 1,\n },\n {\n name: \"Filled Cave with Paths\",\n ...BASE,\n ...mkRough(\n { of: Rough.FLOOR, width: 0, grow: 0.5 },\n { of: Rough.INVERT_TO_LOOSE_ROCK, grow: 0.5 },\n { of: Rough.INVERT_TO_DIRT, grow: 1 },\n { of: Rough.AT_MOST_LOOSE_ROCK },\n { of: Rough.AT_MOST_HARD_ROCK },\n { of: Rough.VOID, width: 0, grow: 0.5 },\n ),\n caveBid: ({ plans, plan }) =>\n !plan.fluid &&\n plan.pearlRadius > 4 &&\n plan.path.baseplates.length === 1 &&\n plans.some((p) => plan.intersects[p.id] && p.fluid) &&\n 1,\n },\n {\n name: \"Doughnut Cave\",\n ...BASE,\n ...mkRough(\n { of: Rough.ALWAYS_SOLID_ROCK, grow: 0.2 },\n { of: Rough.ALWAYS_HARD_ROCK, grow: 0.3 },\n { of: Rough.LOOSE_ROCK, width: 0, grow: 0.5 },\n { of: Rough.FLOOR, width: 2, grow: 1 },\n { of: Rough.DIRT, width: 0, grow: 0.5 },\n { of: Rough.LOOSE_ROCK },\n { of: Rough.AT_MOST_HARD_ROCK },\n ),\n caveBid: ({ plan }) => !plan.fluid && plan.pearlRadius > 5 && 0.5,\n },\n {\n name: \"Stalagmite Cave\",\n ...BASE,\n ...mkRough(\n {\n of: weightedSprinkle(\n { item: Rough.ALWAYS_DIRT, bid: 0.01 },\n { item: Rough.ALWAYS_LOOSE_ROCK, bid: 0.04 },\n { item: Rough.FLOOR, bid: 1 },\n ),\n width: 4,\n grow: 3,\n },\n { of: Rough.MIX_DIRT_LOOSE_ROCK, grow: 1 },\n { of: Rough.MIX_LOOSE_HARD_ROCK, grow: 0.25 },\n ),\n caveBid: ({ plan }) => !plan.fluid && plan.pearlRadius > 5 && 0.2,\n },\n] as const satisfies readonly Architect[];\nexport default SIMPLE_CAVE;\n","import { Architect } from \"../models/architect\";\nimport { Tile } from \"../models/tiles\";\nimport { DefaultHallArchitect, PartialArchitect } from \"./default\";\nimport { mkRough, Rough, weightedSprinkle } from \"./utils/rough\";\nimport { intersectsOnly } from \"./utils/intersects\";\nimport { sprinkleCrystals } from \"./utils/resources\";\nimport { placeSleepingMonsters } from \"./utils/creatures\";\n\nconst BASE: PartialArchitect = {\n ...DefaultHallArchitect,\n};\n\nconst SIMPLE_HALL = [\n {\n name: \"Open Hall\",\n ...BASE,\n ...mkRough(\n { of: Rough.FLOOR, grow: 2 },\n { of: Rough.AT_MOST_LOOSE_ROCK, grow: 1 },\n { of: Rough.AT_MOST_HARD_ROCK },\n { of: Rough.VOID, grow: 1 },\n ),\n hallBid: ({ plan }) => !plan.fluid && plan.pearlRadius > 0 && 1,\n },\n {\n name: \"Wide Hall With Monsters\",\n ...BASE,\n ...mkRough(\n { of: Rough.FLOOR, grow: 1 },\n { of: Rough.AT_MOST_HARD_ROCK },\n { of: Rough.VOID },\n ),\n hallBid: ({ cavern, plan }) =>\n cavern.context.hasMonsters &&\n !plan.fluid &&\n plan.pearlRadius > 3 &&\n plan.path.exclusiveSnakeDistance > 0 &&\n 0.5,\n placeEntities(args) {\n const rng = args.cavern.dice.placeEntities(args.plan.id);\n const count = Math.ceil(args.plan.monsterWaveSize / 2);\n placeSleepingMonsters(args, rng, count);\n },\n },\n {\n name: \"Filled Hall\",\n ...BASE,\n ...mkRough(\n {\n of: weightedSprinkle(\n { item: Rough.FLOOR, bid: 1 },\n { item: Rough.DIRT, bid: 0.4 },\n { item: Rough.LOOSE_ROCK, bid: 0.1 },\n ),\n },\n { of: Rough.MIX_FRINGE },\n { of: Rough.VOID, grow: 1 },\n ),\n hallBid: ({ plan }) => !plan.fluid && plan.pearlRadius > 0 && 1,\n },\n {\n name: \"River\",\n ...BASE,\n crystalsToPlace: ({ plan }) => 3 * plan.crystalRichness * plan.perimeter,\n ...mkRough(\n { of: Rough.WATER, width: 2, grow: 1 },\n {\n of: weightedSprinkle(\n { item: Rough.AT_MOST_HARD_ROCK, bid: 1 },\n { item: Rough.VOID, bid: 0.5 },\n ),\n },\n { of: Rough.VOID, grow: 1 },\n ),\n placeCrystals(args) {\n sprinkleCrystals(args, {\n seamBias: Math.max(args.cavern.context.hallCrystalSeamBias, 0.75),\n });\n },\n hallBid: ({ plan }) => plan.fluid === Tile.WATER && 1,\n },\n {\n name: \"Stream\",\n ...BASE,\n ...mkRough(\n { of: Rough.WATER, grow: 0.5 },\n { of: Rough.FLOOR, grow: 0.25, shrink: 1 },\n { of: Rough.DIRT_OR_LOOSE_ROCK, grow: 1 },\n { of: Rough.AT_MOST_HARD_ROCK, shrink: 1 },\n ),\n hallBid: ({ plans, plan }) =>\n plan.fluid === Tile.WATER && intersectsOnly(plans, plan, Tile.WATER) && 1,\n },\n {\n name: \"Lava River\",\n ...BASE,\n ...mkRough(\n { of: Rough.LAVA, width: 2, grow: 1 },\n { of: Rough.AT_MOST_HARD_ROCK, width: 0, grow: 1 },\n { of: Rough.VOID, grow: 1 },\n ),\n hallBid: ({ plan }) => plan.fluid === Tile.LAVA && 1,\n },\n {\n name: \"Wide Lava River with Monsters\",\n ...BASE,\n ...mkRough(\n { of: Rough.LAVA, width: 2, grow: 1 },\n { of: Rough.AT_MOST_HARD_ROCK },\n { of: Rough.VOID },\n ),\n hallBid: ({ cavern, plan }) =>\n cavern.context.hasMonsters &&\n cavern.context.biome === \"lava\" &&\n plan.fluid === Tile.LAVA &&\n plan.pearlRadius > 3 &&\n plan.path.exclusiveSnakeDistance > 0 &&\n 1,\n placeEntities(args) {\n const rng = args.cavern.dice.placeEntities(args.plan.id);\n const count = Math.ceil(args.plan.monsterWaveSize / 2);\n placeSleepingMonsters(args, rng, count);\n },\n },\n] as const satisfies readonly Architect[];\nexport default SIMPLE_HALL;\n","import { Architect } from \"../models/architect\";\nimport { TOOL_STORE } from \"../models/building\";\nimport { Tile } from \"../models/tiles\";\nimport { DefaultCaveArchitect, PartialArchitect } from \"./default\";\nimport { mkRough, Rough } from \"./utils/rough\";\nimport { getBuildings } from \"./utils/buildings\";\nimport { intersectsOnly } from \"./utils/intersects\";\nimport { getPlaceRechargeSeams } from \"./utils/resources\";\nimport { position } from \"../models/position\";\nimport { sprinkleSlugHoles } from \"./utils/creatures\";\nimport { slugSpawnScript } from \"./utils/creature_spawners\";\n\nconst BASE: PartialArchitect = {\n ...DefaultCaveArchitect,\n crystalsToPlace: () => 5,\n placeRechargeSeam: getPlaceRechargeSeams(1),\n placeBuildings: (args) => {\n const [toolStore] = getBuildings(\n {\n queue: [(pos) => TOOL_STORE.atTile({ ...pos, teleportAtStart: true })],\n },\n args,\n );\n toolStore.foundation.forEach(([x, y]) =>\n args.tiles.set(x, y, Tile.FOUNDATION),\n );\n args.buildings.push(toolStore);\n args.openCaveFlags.set(...toolStore.foundation[0], true);\n args.setCameraPosition(\n position({\n x: toolStore.x,\n y: toolStore.y,\n yaw: toolStore.yaw + Math.PI * 0.75,\n pitch: Math.PI / 4,\n }),\n );\n },\n placeSlugHoles: (args) => {\n const count = args.cavern.context.hasSlugs\n ? args.cavern.dice\n .placeSlugHoles(args.plan.id)\n .betaInt({ a: 1.5, b: 2, min: 1, max: 4 })\n : undefined;\n sprinkleSlugHoles(args, { count });\n },\n slugSpawnScript: (args) =>\n slugSpawnScript(args, {\n initialCooldown: { min: 120, max: 240 },\n needCrystals: { base: 5, increment: 4 },\n spawnRate: 0.2,\n waveSize: 1,\n }),\n maxSlope: 15,\n};\n\nconst OPEN = mkRough(\n { of: Rough.ALWAYS_FLOOR, width: 2, grow: 2 },\n { of: Rough.AT_MOST_LOOSE_ROCK, grow: 1 },\n { of: Rough.MIX_FRINGE },\n);\n\nconst SIMPLE_SPAWN = [\n {\n name: \"Open Spawn\",\n ...BASE,\n ...OPEN,\n spawnBid: ({ cavern, plan }) =>\n !plan.fluid &&\n plan.pearlRadius > 0 &&\n intersectsOnly(cavern.plans, plan, null) &&\n 1,\n },\n {\n name: \"Spawn\",\n ...BASE,\n ...mkRough(\n { of: Rough.ALWAYS_FLOOR, width: 2, grow: 2 },\n { of: Rough.LOOSE_ROCK, grow: 1 },\n { of: Rough.MIX_FRINGE },\n ),\n spawnBid: ({ cavern, plan }) =>\n !plan.fluid &&\n plan.pearlRadius > 0 &&\n intersectsOnly(cavern.plans, plan, null) &&\n 1,\n },\n {\n // This is mostly a fallback in case there's no other viable spawn cave\n // that isn't entirely surrounded by fluid. 9 crystals should be enough to\n // ensure an escape route.\n name: \"Open Spawn with Bonus Crystals\",\n ...BASE,\n ...OPEN,\n crystalsToPlace: () => 9,\n spawnBid: ({ plan }) => !plan.fluid && plan.pearlRadius >= 2 && 0.01,\n },\n] as const satisfies readonly Architect[];\nexport default SIMPLE_SPAWN;\n","import { Architect, BaseMetadata } from \"../models/architect\";\nimport { Tile } from \"../models/tiles\";\nimport {\n PartialArchitect,\n DefaultCaveArchitect,\n DefaultHallArchitect,\n} from \"./default\";\nimport { slugSpawnScript } from \"./utils/creature_spawners\";\nimport { sprinkleSlugHoles } from \"./utils/creatures\";\nimport { intersectsOnly } from \"./utils/intersects\";\nimport { mkRough, Rough, weightedSprinkle } from \"./utils/rough\";\nimport { getTotalCrystals, sprinkleCrystals } from \"./utils/resources\";\nimport { getDiscoveryPoint } from \"./utils/discovery\";\nimport {\n escapeString,\n eventChain,\n mkVars,\n scriptFragment,\n transformPoint,\n} from \"./utils/script\";\n\nconst getSlugHoles = (args: Parameters[\"slugSpawnScript\"]>[0]) =>\n args.plan.innerPearl.flatMap((layer) =>\n layer.filter((pos) => args.cavern.tiles.get(...pos) === Tile.SLUG_HOLE),\n );\n\nconst SLUG_NEST_METADATA = {\n tag: \"slugNest\",\n} as const satisfies BaseMetadata;\n\nconst SLUG_NEST: PartialArchitect = {\n ...DefaultCaveArchitect,\n prime: () => SLUG_NEST_METADATA,\n placeCrystals(args) {\n sprinkleCrystals(args, {\n seamBias: Math.max(args.cavern.context.caveCrystalSeamBias, 0.5),\n });\n },\n placeSlugHoles(args) {\n const count = args.cavern.dice\n .placeSlugHoles(args.plan.id)\n .betaInt({ a: 2, b: 2, min: 4, max: 8 });\n sprinkleSlugHoles(args, { count });\n },\n slugSpawnScript: (args) => {\n const holeCount = getSlugHoles(args).length;\n return slugSpawnScript(args, {\n initialCooldown: { min: 20, max: 60 },\n maxTriggerCount: 1,\n needCrystals: { base: Math.floor(getTotalCrystals(args.cavern) / 10) },\n triggerOnFirstArmed: true,\n waveSize: holeCount,\n });\n },\n script: ({ cavern, plan }) => {\n const discoPoint = getDiscoveryPoint(cavern, plan);\n if (!discoPoint) {\n return undefined;\n }\n\n const v = mkVars(`p${plan.id}SgNest`, [\"messageDiscover\", \"onDiscover\"]);\n const message = cavern.lore.generateFoundSlugNest(cavern.dice).text;\n\n return scriptFragment(\n `# P${plan.id}: Slug Nest`,\n `string ${v.messageDiscover}=\"${escapeString(message)}\"`,\n `if(change:${transformPoint(cavern, discoPoint)})[${v.onDiscover}]`,\n eventChain(\n v.onDiscover,\n `msg:${v.messageDiscover};`,\n `pan:${transformPoint(cavern, discoPoint)};`,\n ),\n );\n },\n};\n\nconst SLUG_HALL: PartialArchitect = {\n ...DefaultHallArchitect,\n crystalsToPlace: ({ plan }) =>\n Math.max(plan.crystalRichness * plan.perimeter, 5),\n placeCrystals(args) {\n sprinkleCrystals(args, {\n seamBias: Math.max(args.cavern.context.hallCrystalSeamBias, 0.75),\n });\n },\n placeSlugHoles(args) {\n const count = args.cavern.dice\n .placeSlugHoles(args.plan.id)\n .betaInt({ a: 2, b: 2, min: 1, max: 3 });\n const placements = args.plan.innerPearl.flatMap((layer) =>\n layer.filter(\n (pos) =>\n args.tiles.get(...pos) === Tile.FLOOR &&\n !args.cavern.pearlInnerDex\n .get(...pos)\n ?.some((_, i) => i !== args.plan.id),\n ),\n );\n sprinkleSlugHoles(args, { count, placements });\n },\n slugSpawnScript: (args) => {\n const holes = getSlugHoles(args);\n return slugSpawnScript(args, {\n emerges: holes.map(([x, y]) => ({ x, y, radius: 1 })),\n initialCooldown: { min: 60, max: 120 },\n needCrystals: {\n base: args.plan.crystals * 2,\n increment: args.plan.crystals,\n },\n triggerPoints: holes,\n waveSize: holes.length,\n });\n },\n};\n\nconst SLUGS = [\n {\n name: \"Slug Nest\",\n ...SLUG_NEST,\n ...mkRough(\n { of: Rough.FLOOR, width: 3, grow: 1 },\n { of: Rough.AT_MOST_DIRT, width: 0, grow: 0.5 },\n {\n of: weightedSprinkle(\n { item: Rough.DIRT, bid: 0.25 },\n { item: Rough.LOOSE_ROCK, bid: 1 },\n ),\n grow: 1,\n },\n { of: Rough.MIX_LOOSE_HARD_ROCK, grow: 0.25 },\n ),\n caveBid: ({ cavern, plans, plan }) =>\n cavern.context.hasSlugs &&\n plan.pearlRadius >= 5 &&\n plan.path.baseplates.length === 1 &&\n !plan.fluid &&\n !plan.hasErosion &&\n intersectsOnly(plans, plan, null) &&\n !plans.some((p) => p.metadata?.tag === \"slugNest\") &&\n 0.25,\n },\n {\n name: \"Slug Hall\",\n ...SLUG_HALL,\n ...mkRough(\n { of: Rough.FLOOR },\n {\n of: weightedSprinkle(\n { item: Rough.LOOSE_OR_HARD_ROCK, bid: 1 },\n { item: Rough.HARD_ROCK, bid: 2 },\n ),\n },\n { of: Rough.VOID, grow: 1 },\n ),\n hallBid: ({ cavern, plan }) =>\n cavern.context.hasSlugs &&\n plan.path.exclusiveSnakeDistance > 5 &&\n !plan.fluid &&\n !plan.hasErosion &&\n 1,\n },\n] as const satisfies readonly Architect[];\nexport default SLUGS;\n","import { Architect } from \"../models/architect\";\nimport {\n POWER_STATION,\n SUPER_TELEPORT,\n SUPPORT_STATION,\n} from \"../models/building\";\nimport { DefaultHallArchitect, PartialArchitect } from \"./default\";\nimport { mkRough, Rough, weightedSprinkle } from \"./utils/rough\";\n\nconst BASE: PartialArchitect = {\n ...DefaultHallArchitect,\n};\n\nconst HARD_ROCK_MIN_CRYSTALS =\n POWER_STATION.crystals +\n SUPPORT_STATION.crystals +\n 1 +\n SUPER_TELEPORT.crystals +\n 1 +\n 5;\n\nconst THIN_HALL = [\n {\n name: \"Thin Open Hall\",\n ...BASE,\n ...mkRough(\n { of: Rough.FLOOR },\n {\n of: weightedSprinkle(\n { item: Rough.AT_MOST_HARD_ROCK, bid: 1 },\n { item: Rough.VOID, bid: 10 },\n ),\n },\n { of: Rough.VOID, grow: 1 },\n ),\n hallBid: ({ plan }) => !plan.fluid && 0.2,\n },\n {\n name: \"Thin Filled Hall\",\n ...BASE,\n ...mkRough(\n {\n of: weightedSprinkle(\n { item: Rough.FLOOR, bid: 1 },\n { item: Rough.LOOSE_ROCK, bid: 0.5 },\n ),\n },\n { of: Rough.VOID, grow: 1 },\n ),\n hallBid: ({ plan }) => !plan.fluid && 0.1,\n },\n {\n name: \"Thin Hard Rock Hall\",\n ...BASE,\n ...mkRough({ of: Rough.HARD_ROCK }, { of: Rough.VOID, grow: 1 }),\n hallBid: ({ plan, totalCrystals }) =>\n !plan.fluid &&\n totalCrystals >= HARD_ROCK_MIN_CRYSTALS &&\n plan.path.exclusiveSnakeDistance < 10 &&\n 0.7,\n },\n] as const satisfies readonly Architect[];\nexport default THIN_HALL;\n","import { Architect, BaseMetadata } from \"../models/architect\";\nimport { Tile } from \"../models/tiles\";\nimport { DefaultCaveArchitect, PartialArchitect } from \"./default\";\nimport { mkRough, Rough } from \"./utils/rough\";\nimport { intersectsOnly, isDeadEnd } from \"./utils/intersects\";\nimport {\n eventChain,\n mkVars,\n scriptFragment,\n transformPoint,\n} from \"./utils/script\";\nimport { monsterSpawnScript } from \"./utils/creature_spawners\";\nimport { bidsForOrdinaryWalls, sprinkleCrystals } from \"./utils/resources\";\nimport { placeSleepingMonsters } from \"./utils/creatures\";\nimport { gLostMiners } from \"./lost_miners\";\n\nconst METADATA = {\n tag: \"treasure\",\n} as const satisfies BaseMetadata;\n\nconst BASE: PartialArchitect = {\n ...DefaultCaveArchitect,\n prime: () => METADATA,\n objectives: ({ cavern }) => {\n const crystals = cavern.plans\n .filter((plan) => plan.metadata?.tag === \"treasure\")\n .reduce((r, plan) => Math.max(r, plan.crystals), 0);\n if (crystals < 15) {\n return undefined;\n }\n return { crystals: Math.floor(crystals / 5) * 5, sufficient: false };\n },\n};\n\nconst g = mkVars(\"gHoard\", [\"wasTriggered\", \"message\", \"crystalsAvailable\"]);\n\nconst HOARD: typeof BASE = {\n ...BASE,\n crystalsToPlace: ({ plan }) => plan.crystalRichness * plan.perimeter * 3,\n placeCrystals(args) {\n const wallBids = bidsForOrdinaryWalls(\n args.plan.innerPearl.flatMap((layer) => layer),\n args.tiles,\n );\n const centerPoints =\n args.plan.innerPearl[0].length > 1\n ? args.plan.innerPearl[0]\n : [...args.plan.innerPearl[0], ...args.plan.innerPearl[1]];\n const bids = [\n ...wallBids.map((item) => ({ bid: 1 / wallBids.length, item })),\n ...centerPoints.map((item) => ({ bid: 3 / centerPoints.length, item })),\n ];\n const rng = args.cavern.dice.placeCrystals(args.plan.id);\n sprinkleCrystals(args, {\n getRandomTile: () => rng.weightedChoice(bids),\n seamBias: 0,\n });\n },\n placeSlugHoles() {},\n placeEntities(args) {\n if (args.plan.pearlRadius > 3) {\n const rng = args.cavern.dice.placeEntities(args.plan.id);\n const count = Math.ceil(args.plan.monsterWaveSize / 2);\n placeSleepingMonsters(args, rng, count);\n }\n },\n monsterSpawnScript: (args) =>\n monsterSpawnScript(args, {\n meanWaveSize: args.plan.monsterWaveSize * 1.5,\n retriggerMode: \"hoard\",\n rng: args.cavern.dice.monsterSpawnScript(args.plan.id),\n spawnRate: args.plan.monsterSpawnRate * 3.5,\n }),\n scriptGlobals({ cavern }) {\n if (!cavern.objectives.crystals) {\n return undefined;\n }\n return scriptFragment(\n \"# Globals: Hoard\",\n `bool ${g.wasTriggered}=false`,\n `string ${g.message}=\"${cavern.lore.foundHoard(cavern.dice).text}\"`,\n `int ${g.crystalsAvailable}=0`,\n );\n },\n script({ cavern, plan }) {\n if (!cavern.objectives.crystals) {\n return undefined;\n }\n const hasLostMiners = cavern.plans.some(\n (p) => p.metadata?.tag === \"lostMiners\",\n );\n\n // Generate a script that pans to this cave on discovery if collecting all\n // of the crystals would win the level.\n const centerPoint = transformPoint(cavern, plan.innerPearl[0][0]);\n const v = mkVars(`p${plan.id}Hoard`, [\"onDiscovered\", \"go\"]);\n\n return scriptFragment(\n `# P${plan.id}: Hoard`,\n `if(change:${centerPoint})[${v.onDiscovered}]`,\n eventChain(\n v.onDiscovered,\n `((${g.wasTriggered}))return;`,\n `${g.wasTriggered}=true;`,\n `wait:1;`,\n `${g.wasTriggered}=false;`,\n // If there's a lost miners objective that isn't fulfilled, don't\n // act like the level is done.\n hasLostMiners && `((${gLostMiners.done}<1))return;`,\n // Count all the crystals in storage and on the floor.\n `${g.crystalsAvailable}=crystals+Crystal_C;`,\n // If this is enough to win the level, alert the player.\n `((${g.crystalsAvailable}>=${cavern.objectives.crystals}))${v.go};`,\n ),\n eventChain(v.go, `msg:${g.message};`, `pan:${centerPoint};`),\n );\n },\n};\n\nconst RICH: typeof BASE = {\n ...BASE,\n monsterSpawnScript: (args) =>\n monsterSpawnScript(args, {\n meanWaveSize: args.plan.monsterWaveSize * 1.5,\n spawnRate: args.plan.monsterSpawnRate * 2,\n }),\n};\n\nconst TREASURE = [\n {\n name: \"Open Hoard\",\n ...HOARD,\n ...mkRough(\n { of: Rough.ALWAYS_FLOOR, width: 2, grow: 3 },\n { of: Rough.LOOSE_ROCK, shrink: 1 },\n { of: Rough.HARD_ROCK, grow: 0.5 },\n ),\n caveBid: ({ plans, plan }) =>\n !plan.fluid &&\n plan.path.baseplates.length === 1 &&\n isDeadEnd(plan) &&\n intersectsOnly(plans, plan, null) &&\n 0.5,\n },\n {\n name: \"Sealed Hoard\",\n ...HOARD,\n ...mkRough(\n { of: Rough.ALWAYS_FLOOR, width: 1, grow: 3 },\n { of: Rough.ALWAYS_LOOSE_ROCK },\n { of: Rough.ALWAYS_HARD_ROCK, grow: 0.5 },\n ),\n caveBid: ({ plan }) =>\n !plan.fluid &&\n plan.path.baseplates.length === 1 &&\n isDeadEnd(plan) &&\n 0.5,\n },\n {\n name: \"Open Rich Cave\",\n ...RICH,\n ...mkRough(\n { of: Rough.ALWAYS_SOLID_ROCK, width: 0, grow: 1 },\n { of: Rough.ALWAYS_HARD_ROCK, width: 0, grow: 0.5 },\n { of: Rough.LOOSE_ROCK, grow: 2 },\n { of: Rough.FLOOR, width: 2, shrink: 1, grow: 3 },\n { of: Rough.LOOSE_ROCK, shrink: 1 },\n { of: Rough.HARD_ROCK, grow: 0.5 },\n ),\n caveBid: ({ plan }) =>\n !plan.fluid && plan.path.baseplates.length >= 1 && isDeadEnd(plan) && 1,\n },\n {\n name: \"Rich Island\",\n ...RICH,\n ...mkRough(\n { of: Rough.ALWAYS_SOLID_ROCK, width: 0, grow: 1 },\n { of: Rough.ALWAYS_HARD_ROCK, width: 0, grow: 0.5 },\n { of: Rough.ALWAYS_LOOSE_ROCK, grow: 2 },\n { of: Rough.WATER, width: 2, grow: 3 },\n { of: Rough.LOOSE_ROCK, shrink: 1 },\n { of: Rough.HARD_ROCK, grow: 0.5 },\n ),\n caveBid: ({ plan }) =>\n plan.fluid === Tile.WATER &&\n plan.pearlRadius > 3 &&\n plan.path.baseplates.length >= 1 &&\n isDeadEnd(plan) &&\n 0.5,\n placeEntities(args) {\n const rng = args.cavern.dice.placeEntities(args.plan.id);\n if (args.cavern.context.biome === \"ice\" && rng.chance(0.5)) {\n const count = Math.ceil(args.plan.monsterWaveSize / 2);\n placeSleepingMonsters(args, rng, count, \"inner\");\n }\n },\n },\n {\n name: \"Peninsula Hoard\",\n ...HOARD,\n ...mkRough(\n { of: Rough.ALWAYS_FLOOR, width: 2, grow: 1 },\n { of: Rough.BRIDGE_ON_WATER, width: 2, grow: 3 },\n { of: Rough.LOOSE_ROCK, shrink: 1 },\n { of: Rough.HARD_ROCK, grow: 0.5 },\n ),\n caveBid: ({ plans, plan }) =>\n plan.fluid === Tile.WATER &&\n plan.pearlRadius > 3 &&\n plan.path.baseplates.length >= 1 &&\n isDeadEnd(plan) &&\n intersectsOnly(plans, plan, null) &&\n 0.5,\n },\n {\n name: \"Rich Lava Island\",\n ...RICH,\n ...mkRough(\n { of: Rough.ALWAYS_SOLID_ROCK, width: 0, grow: 1 },\n { of: Rough.ALWAYS_HARD_ROCK, width: 0, grow: 0.5 },\n { of: Rough.ALWAYS_LOOSE_ROCK, grow: 2 },\n { of: Rough.LAVA, width: 2, grow: 3 },\n { of: Rough.HARD_ROCK, grow: 0.5 },\n ),\n caveBid: ({ plan }) =>\n plan.fluid === Tile.LAVA &&\n plan.pearlRadius > 3 &&\n plan.path.baseplates.length >= 1 &&\n isDeadEnd(plan) &&\n 0.5,\n },\n {\n name: \"Lava Peninsula Hoard\",\n ...HOARD,\n ...mkRough(\n { of: Rough.ALWAYS_FLOOR, width: 2, grow: 1 },\n { of: Rough.BRIDGE_ON_LAVA, width: 2, grow: 3 },\n { of: Rough.HARD_ROCK, grow: 0.5 },\n ),\n caveBid: ({ plans, plan }) =>\n plan.fluid === Tile.LAVA &&\n plan.pearlRadius > 3 &&\n plan.path.baseplates.length >= 1 &&\n isDeadEnd(plan) &&\n intersectsOnly(plans, plan, null) &&\n 0.5,\n },\n] as const satisfies readonly Architect[];\nexport default TREASURE;\n","import { Architect } from \"../models/architect\";\nimport ESTABLISHED_HQ, { HqMetadata } from \"./established_hq\";\nimport FISSURE from \"./fissure\";\nimport FLOODED from \"./flooded\";\nimport LOOPBACK from \"./loopback\";\nimport LOST_MINERS, { LostMinersMetadata } from \"./lost_miners\";\nimport NOMAD_SPAWN, { NomadsMetadata } from \"./nomads\";\nimport SIMPLE_CAVE from \"./simple_cave\";\nimport SIMPLE_HALL from \"./simple_hall\";\nimport SIMPLE_SPAWN from \"./simple_spawn\";\nimport SLUGS from \"./slugs\";\nimport THIN_HALL from \"./thin_hall\";\nimport TREASURE from \"./treasure\";\n\nexport type AnyMetadata =\n | undefined\n | HqMetadata\n | LostMinersMetadata\n | NomadsMetadata\n | { tag: \"fissure\" | \"slugNest\" | \"treasure\" };\n\nexport const ARCHITECTS = [\n ...ESTABLISHED_HQ,\n ...FISSURE,\n ...FLOODED,\n ...LOOPBACK,\n ...LOST_MINERS,\n ...NOMAD_SPAWN,\n ...SIMPLE_CAVE,\n ...SIMPLE_HALL,\n ...SIMPLE_SPAWN,\n ...SLUGS,\n ...THIN_HALL,\n ...TREASURE,\n] as const satisfies readonly Architect[];\n","import { UpdateData } from \"./controls\";\nimport { ARCHITECTS } from \"../../../core/architects\";\nimport styles from \"./style.module.scss\";\nimport React from \"react\";\n\nexport const ArchitectsInput = ({ update, context }: UpdateData) => {\n function updateArchitects(\n key: string,\n value: \"encourage\" | \"disable\" | undefined,\n ) {\n const r = { ...context.architects };\n if (value === undefined) {\n if (key in r) {\n delete r[key];\n }\n if (Object.keys(r).length === 0) {\n update({ architects: undefined });\n return;\n }\n } else {\n if (r[key] !== value) {\n r[key] = value;\n }\n }\n update({ architects: r });\n }\n\n return [...ARCHITECTS]\n .sort((a, b) => a.name.localeCompare(b.name))\n .map((a) => {\n const state = context.architects?.[a.name];\n return (\n \n

{a.name}

\n
\n \n updateArchitects(\n a.name,\n state === \"encourage\" ? undefined : \"encourage\",\n )\n }\n >\n Encourage\n \n \n updateArchitects(\n a.name,\n state === \"disable\" ? undefined : \"disable\",\n )\n }\n >\n Disable\n \n
\n
\n );\n });\n};\n","import React, { useEffect, useReducer, useState } from \"react\";\nimport { CavernContext, inferContextDefaults } from \"../../../core/common\";\nimport { MAX_PLUS_ONE } from \"../../../core/common/prng\";\nimport styles from \"./style.module.scss\";\nimport { Choice, CurveSliders, Slider } from \"./controls\";\nimport { ArchitectsInput } from \"./architects\";\n\nconst INITIAL_SEED = Date.now() % MAX_PLUS_ONE;\n\nfunction parseSeed(v: string) {\n const s = v.replace(/[^0-9a-fA-F]+/g, \"\");\n const seed = s === \"\" ? -1 : parseInt(s, 16);\n return seed >= 0 && seed < MAX_PLUS_ONE ? seed : undefined;\n}\n\nfunction unparseSeed(v: number, split: boolean) {\n const s = v.toString(16).padStart(8, \"0\").toUpperCase();\n return split\n ? `${s.substring(0, 3)} ${s.substring(3, 6)} ${s.substring(6)}`\n : s;\n}\n\nconst expectedTotalPlans = (contextWithDefaults: CavernContext) => {\n const caves = contextWithDefaults.caveCount;\n const spanHalls = contextWithDefaults.caveCount - 1;\n const auxHalls =\n contextWithDefaults.optimalAuxiliaryPathCount +\n contextWithDefaults.randomAuxiliaryPathCount;\n return caves + spanHalls + auxHalls;\n};\n\ntype PartialContext = Partial & Pick;\n\nexport function CavernContextInput({\n dispatchState,\n}: {\n dispatchState: (args: { context: CavernContext }) => void;\n}) {\n const [showAdvanced, setShowAdvanced] = useState(false);\n const [context, update] = useReducer(\n (\n was: PartialContext,\n args:\n | { [K in keyof CavernContext]?: CavernContext[K] | undefined }\n | \"reset\",\n ): PartialContext => {\n if (args === \"reset\") {\n return { seed: was.seed };\n }\n const r = { ...was, ...args };\n for (const key of Object.keys(r) as (keyof typeof r)[]) {\n if (r[key] === undefined) {\n if (key in r) {\n delete r[key];\n }\n }\n }\n return r;\n },\n { seed: parseSeed(window.location.hash) ?? INITIAL_SEED },\n );\n\n useEffect(() => {\n const fn = () => {\n const seed = parseSeed(window.location.hash);\n if (seed !== undefined) {\n update({ seed: seed });\n }\n };\n window.addEventListener(\"hashchange\", fn);\n return () => {\n window.removeEventListener(\"hashchange\", fn);\n };\n }, []);\n\n useEffect(() => {\n window.location.hash = unparseSeed(context.seed, false);\n }, [context.seed]);\n\n useEffect(\n () => dispatchState({ context: inferContextDefaults(context) }),\n [context, dispatchState],\n );\n const contextWithDefaults = inferContextDefaults(context);\n const rest = { update, context, contextWithDefaults };\n\n return (\n
\n
\n {\n const seed = parseSeed(ev.target.value);\n if (seed !== undefined) {\n update({ seed: seed });\n }\n }}\n spellCheck={false}\n />\n \n update({ seed: Math.floor(Math.random() * MAX_PLUS_ONE) })\n }\n >\n ifl\n \n
\n
\n 1 && !showAdvanced ? styles.override : \"\"}`}\n onClick={() => setShowAdvanced((v) => !v)}\n >\n Advanced\n \n {showAdvanced ? \"expand_less\" : \"expand_more\"}\n \n \n
\n {showAdvanced && (\n <>\n
\n
\n
\n {contextWithDefaults.overrides.length ? (\n update(\"reset\")}\n >\n Clear All Overrides\n \n ) : (\n
\n )}\n
\n \n \n \n \n
\n
\n
\n

Outlines

\n
\n

Partition

\n \n \n \n
\n
\n

Discriminate

\n \n
\n
\n

Weave

\n \n \n \n
\n
\n
\n

Planning

\n
\n

Flood

\n \n \n \n \n \n
\n
\n

Establish

\n {(\n [\n \"caveCrystalRichness\",\n \"hallCrystalRichness\",\n \"caveOreRichness\",\n \"hallOreRichness\",\n \"monsterSpawnRate\",\n ] as const\n ).map((of) => (\n \n ))}\n \n \n
\n
\n

Pearl

\n \n \n
\n
\n
\n

Masonry

\n
\n

Fine

\n {(\n [\n \"caveHasRechargeSeamChance\",\n \"hallHasRechargeSeamChance\",\n \"caveCrystalSeamBias\",\n \"hallCrystalSeamBias\",\n \"caveOreSeamBias\",\n \"hallOreSeamBias\",\n \"caveHasSlugHoleChance\",\n \"hallHasSlugHoleChance\",\n ] as const\n ).map((of) => (\n \n ))}\n
\n
\n
\n

Plastic

\n
\n

Strataform

\n \n \n
\n
\n

Strataflux

\n \n {(\n [\n \"caveMaxSlope\",\n \"hallMaxSlope\",\n \"voidMaxSlope\",\n \"borderMaxSlope\",\n ] as const\n ).map((of) => (\n \n ))}\n
\n
\n

Populate

\n {(\n [\"caveHasLandslidesChance\", \"hallHasLandslidesChance\"] as const\n ).map((of) => (\n \n ))}\n
\n
\n
\n

Ephemera

\n
\n

Aerate

\n \n
\n
\n

Adjure

\n \n
\n
\n \n )}\n
\n );\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"cavernPreview\":\"style_cavernPreview__xf6rH\",\"mapWrapper\":\"style_mapWrapper__l0TEe\",\"map\":\"style_map__o4nZU\",\"void\":\"style_void__RvJKA\",\"baseplate\":\"style_baseplate__p03X2\",\"fg\":\"style_fg__nlyiJ\",\"ambiguousKind\":\"style_ambiguousKind__Pm08h\",\"bg\":\"style_bg__N5lpK\",\"caveKind\":\"style_caveKind__x9Yy5\",\"hallKind\":\"style_hallKind__H+yre\",\"path\":\"style_path__HXk6H\",\"spanningKind\":\"style_spanningKind__cv5st\",\"auxiliaryKind\":\"style_auxiliaryKind__FSAib\",\"plan\":\"style_plan__QISwv\",\"spanningPathKind\":\"style_spanningPathKind__dvMVJ\",\"auxiliaryPathKind\":\"style_auxiliaryPathKind__rGxFg\",\"fluid6\":\"style_fluid6__Oqtv2\",\"fluid11\":\"style_fluid11__7ylOY\",\"left\":\"style_left__Yyqc4\",\"label\":\"style_label__vGz9Y\",\"inline\":\"style_inline__9fTzz\",\"pointer\":\"style_pointer__-G8l+\",\"pearl\":\"style_pearl__std+C\",\"innerPearl\":\"style_innerPearl__APwPv\",\"outerPearl\":\"style_outerPearl__MxT-o\",\"layer\":\"style_layer__Gfelc\",\"layer0\":\"style_layer0__tooG-\",\"layer1\":\"style_layer1__XpKZy\",\"layer2\":\"style_layer2__2BD4B\",\"layer3\":\"style_layer3__3Kn4w\",\"tiles\":\"style_tiles__iaD7a\",\"tile\":\"style_tile__mcUC8\",\"height\":\"style_height__e764C\",\"entity\":\"style_entity__p+Wtq\",\"enemy\":\"style_enemy__z8gSd\",\"marker\":\"style_marker__n7Zau\",\"openCaveFlag\":\"style_openCaveFlag__kH4fE\",\"stats\":\"style_stats__bR5t1\",\"error\":\"style_error__Oe9Pd\"};","import React from \"react\";\nimport { Baseplate } from \"../../../core/models/baseplate\";\nimport styles from \"./style.module.scss\";\n\nconst SCALE = 6;\n\nexport default function BaseplatePreview({\n baseplate,\n}: {\n baseplate: Baseplate;\n}) {\n return (\n \n \n \n {baseplate.id}\n \n \n );\n}\n","import React from \"react\";\nimport { Path } from \"../../../core/models/path\";\nimport styles from \"./style.module.scss\";\n\nconst SCALE = 6;\n\nexport default function PathPreview({ path }: { path: Path }) {\n const d = path.baseplates\n .map((bp, i) => {\n const [x, y] = bp.center;\n return `${i === 0 ? \"M\" : \"L\"}${x * SCALE} ${y * SCALE}`;\n })\n .join(\" \");\n return (\n \n \n \n \n {path.id}\n \n \n \n );\n}\n","import React from \"react\";\nimport { Point, isAdjacent8 } from \"../../../core/common/geometry\";\nimport { pairMap } from \"../../../core/common/utils\";\nimport { PearledPlan } from \"../../../core/transformers/01_planning/04_pearl\";\nimport styles from \"./style.module.scss\";\n\nconst SCALE = 6;\n\nfunction dPearl(layer: readonly Point[]) {\n if (layer.length === 0) {\n return \"\";\n }\n const result = pairMap(layer, ([x1, y1], [x2, y2]) => {\n const cmd = isAdjacent8([x1, y1], [x2, y2]) ? \"L\" : \"M\";\n return `${cmd}${(x2 + 0.5) * SCALE} ${(y2 + 0.5) * SCALE}`;\n });\n const [x0, y0] = layer[0];\n return `M${(x0 + 0.5) * SCALE} ${(y0 + 0.5) * SCALE} ${result.join(\" \")}`;\n}\n\nexport default function PearlPreview({\n plan,\n pearl,\n}: {\n plan: PearledPlan;\n pearl: \"innerPearl\" | \"outerPearl\";\n}) {\n const io = pearl === \"outerPearl\" ? plan.innerPearl.length : 0;\n return (\n \n {plan[pearl].map((layer, i) => (\n \n ))}\n \n );\n}\n","import React, { ReactNode } from \"react\";\nimport { Tile } from \"../../../core/models/tiles\";\nimport { Cavern } from \"../../../core/models/cavern\";\nimport { MapOverlay } from \".\";\nimport styles from \"./style.module.scss\";\n\nconst SCALE = 6;\n\nconst SCALE_COLORS = 8;\n\nconst MAX_COOLDOWN = {\n landslides: 300,\n erosion: 100,\n} as const;\n\nfunction tk(t: Tile) {\n return `tile${t.id}`;\n}\n\nfunction dk(t: Tile) {\n if (t === Tile.WATER || t === Tile.LAVA) {\n return \"dfluid\";\n }\n return t.isWall ? \"dwall\" : \"dfloor\";\n}\n\nfunction sk(s: number) {\n return `scale${Math.min(Math.floor(s), SCALE_COLORS - 1)}`;\n}\n\nfunction getFill(\n cavern: Cavern,\n mapOverlay: MapOverlay,\n t: Tile,\n x: number,\n y: number,\n): string | null {\n switch (mapOverlay) {\n case \"overview\": {\n for (let ox = -1; ox <= 1; ox++) {\n for (let oy = -1; oy <= 1; oy++) {\n if (cavern.discoveryZones?.get(x + ox, y + oy)?.openOnSpawn) {\n return tk(t);\n }\n }\n }\n return null;\n }\n case \"entities\":\n if (t === Tile.FOUNDATION || t === Tile.POWER_PATH) {\n return tk(t);\n }\n return dk(t);\n case \"tiles\":\n return tk(t);\n case \"crystals\": {\n if (t.crystalYield > 0) {\n return tk(t);\n }\n const c = cavern.crystals?.get(x, y) ?? 0;\n if (c > 0) {\n return sk(c - 1);\n }\n return dk(t);\n }\n case \"ore\": {\n if (t.oreYield > 4) {\n return tk(t);\n }\n const o = (cavern.ore?.get(x, y) ?? 0) + t.oreYield;\n if (o > 0) {\n return sk(o - 1);\n }\n return dk(t);\n }\n case \"discovery\": {\n const dz = cavern.discoveryZones?.get(x, y);\n if (dz) {\n return dz.openOnSpawn ? \"disco0\" : \"disco1\";\n }\n return dk(t);\n }\n case \"erosion\":\n if (t === Tile.WATER || t === Tile.LAVA) {\n return tk(t);\n }\n // Fall through\n case \"landslides\":\n const cooldown = cavern[mapOverlay]?.get(x, y)?.cooldown;\n if (cooldown) {\n return sk(\n (SCALE_COLORS - 1) *\n Math.max(0, 1 - cooldown / MAX_COOLDOWN[mapOverlay]),\n );\n }\n return dk(t);\n case \"oxygen\": {\n const aeration = cavern.aerationLog?.get(x, y);\n if (!aeration) {\n return dk(t);\n }\n if (cavern.crystals?.get(x, y)) {\n return \"oxhc\";\n }\n return t.isWall ? tk(t) : \"oxex\";\n }\n case \"script\":\n return dk(t);\n }\n return null;\n}\n\nfunction getTitle(\n cavern: Cavern,\n mapOverlay: MapOverlay,\n t: Tile,\n x: number,\n y: number,\n): ReactNode {\n switch (mapOverlay) {\n case \"crystals\": {\n const c = cavern.crystals?.get(x, y) ?? 0;\n const d = t.crystalYield;\n return (\n c + d > 0 &&\n `${t.isWall ? \"Yields \" : \"\"}${c}${d > 0 ? ` + ${d} from ${t.name}` : \"\"}`\n );\n }\n case \"ore\": {\n const o = cavern.ore?.get(x, y) ?? 0;\n const d = t.oreYield;\n return (\n o + d > 0 &&\n `${t.isWall ? \"Yields \" : \"\"}${o}${d > 0 ? ` + ${d} from ${t.name}` : \"\"}`\n );\n }\n case \"landslides\": {\n const ls = cavern.landslides?.get(x, y);\n return ls && `${ls.cooldown} sec cooldown`;\n }\n case \"erosion\": {\n const er = cavern.erosion?.get(x, y);\n return (\n er &&\n `${er.cooldown} sec cooldown + ${er.initialDelay} sec initial delay`\n );\n }\n case \"discovery\":\n const dz = cavern.discoveryZones?.get(x, y);\n return (\n dz && `${dz.openOnSpawn ? \"Cavern\" : \"Undiscovered cavern\"} ${dz.id}`\n );\n case \"overview\":\n case \"tiles\":\n return t.name;\n default:\n return null;\n }\n}\n\nexport default function TilesPreview({\n cavern,\n mapOverlay,\n}: {\n cavern: Cavern;\n mapOverlay: MapOverlay;\n}) {\n if (!cavern.tiles || !mapOverlay) {\n return null;\n }\n return (\n \n {cavern.tiles.map((t, x, y) => {\n const fill = getFill(cavern, mapOverlay, t, x, y);\n if (!fill) {\n return null;\n }\n const title = getTitle(cavern, mapOverlay, t, x, y);\n return (\n \n {title && {title}}\n \n );\n })}\n \n );\n}\n","import React, { useMemo } from \"react\";\nimport {\n Building,\n CANTEEN,\n DOCKS,\n GEOLOGICAL_CENTER,\n MINING_LASER,\n ORE_REFINERY,\n POWER_STATION,\n SUPER_TELEPORT,\n} from \"../../../core/models/building\";\nimport { Creature } from \"../../../core/models/creature\";\nimport { Miner } from \"../../../core/models/miner\";\nimport { radsToDegrees } from \"../../../core/common/geometry\";\nimport styles from \"./style.module.scss\";\nimport { Vehicle } from \"../../../core/models/vehicle\";\nimport { MapOverlay } from \".\";\nimport { Cavern } from \"../../../core/models/cavern\";\nimport { CollapseUnion, filterTruthy } from \"../../../core/common/utils\";\n\nconst SCALE = 6;\n\ntype Params = {\n entity: CollapseUnion;\n mapOverlay: MapOverlay;\n cavern: Cavern;\n};\n\nfunction getMarkerD(\n template:\n | CollapseUnion<\n Building[\"template\"] | Creature[\"template\"] | Vehicle[\"template\"]\n >\n | undefined,\n) {\n const building = !!template?.footprint;\n const vehicle = !!template?.frame;\n const hasText = building || vehicle;\n\n const oy = building ? SCALE / 3 : SCALE / 4;\n const top = template === SUPER_TELEPORT ? -oy - SCALE : -oy;\n const bottom = template === POWER_STATION ? oy + SCALE : oy;\n\n const ox = vehicle ? SCALE / 2 : oy;\n const left = template === ORE_REFINERY ? -ox - SCALE : -ox;\n const right = template === GEOLOGICAL_CENTER ? ox + SCALE : ox;\n\n return filterTruthy([\n `M${left} ${top}`,\n hasText && `L${right} ${top}`,\n top !== -oy && `L${right + SCALE / 4}, ${-SCALE}`,\n template !== MINING_LASER && `L${right + SCALE / 4} 0`,\n hasText && `L${right} ${oy}`,\n bottom !== oy && `L${right} ${bottom}`,\n `L${left} ${bottom}`,\n !hasText && `L${-SCALE / 4} 0`,\n (template === DOCKS || template === CANTEEN) && `L${left - SCALE / 4} 0`,\n `Z`,\n ]).join(\"\");\n}\n\nfunction getTitle(entity: Params[\"entity\"]) {\n return filterTruthy([\n entity.template?.name,\n entity.unique || (entity.loadout && \"Rock Raider\"),\n entity.level && `Lv${entity.level}`,\n ((s) => s && `(${s})`)(\n filterTruthy([\n entity.sleep && \"Sleeping\",\n entity.essential && \"VIP\",\n ...(entity.loadout ?? []),\n ...(entity.upgrades ?? []),\n ]).join(\", \"),\n ),\n ]).join(\" \");\n}\n\nexport default function EntityPreview({ entity, cavern, mapOverlay }: Params) {\n const d = useMemo(() => getMarkerD(entity.template), [entity.template]);\n if (mapOverlay === \"overview\") {\n if (\n !cavern.discoveryZones?.get(Math.floor(entity.x), Math.floor(entity.y))\n ?.openOnSpawn\n ) {\n return null;\n }\n } else if (mapOverlay !== \"entities\") {\n return null;\n }\n return (\n \n \n {getTitle(entity)}\n \n {entity.template?.inspectAbbrev && (\n \n {entity.template?.inspectAbbrev}\n \n )}\n \n );\n}\n","import React from \"react\";\nimport styles from \"./style.module.scss\";\n\nconst SCALE = 6;\n\nexport default function OpenCaveFlagPreview({\n x,\n y,\n}: {\n x: number;\n y: number;\n}) {\n return (\n \n );\n}\n","export const CORNER_OFFSETS = [\n [-1, -1],\n [0, -1],\n [-1, 0],\n [0, 0],\n] as const;\n\nexport const HEIGHT_MIN = -600;\nexport const HEIGHT_MAX = 600;\n","import React from \"react\";\nimport { Grid } from \"../../../core/common/grid\";\nimport styles from \"./style.module.scss\";\nimport {\n HEIGHT_MAX,\n HEIGHT_MIN,\n} from \"../../../core/transformers/03_plastic/03_strataflux/base\";\n\nconst SCALE = 6;\n\nfunction toColor(h: number) {\n const v = (h - HEIGHT_MIN) / (HEIGHT_MAX - HEIGHT_MIN);\n const lum = v * 100;\n const hue = 50 + 200 * (1 - v);\n return `hsl(${hue.toFixed()} 50% ${lum.toFixed()}%)`;\n}\n\nexport default function HeightPreview({ height }: { height: Grid }) {\n return (\n \n {height.map((h, x, y) => {\n return (\n \n {h}\n \n );\n })}\n \n );\n}\n","import { MapOverlay } from \".\";\nimport {\n getTotalCrystals,\n getTotalOre,\n} from \"../../../core/architects/utils/resources\";\nimport { Cavern } from \"../../../core/models/cavern\";\nimport React from \"react\";\nimport styles from \"./style.module.scss\";\nimport { Tile } from \"../../../core/models/tiles\";\nimport { Building } from \"../../../core/models/building\";\nimport { Vehicle } from \"../../../core/models/vehicle\";\nimport { Creature } from \"../../../core/models/creature\";\n\nfunction EntitySummary({\n entities,\n}: {\n entities: readonly (Building | Vehicle | Creature)[] | undefined;\n}) {\n const counts: { [K: string]: number } = {};\n entities?.forEach((e) => {\n const s = e.template.inspectAbbrev;\n counts[s] = (counts[s] ?? 0) + 1;\n });\n\n return (\n <>\n {!Object.entries(counts).length && \"n/a\"}\n {Object.entries(counts)\n .map(([k, v]) => `${k}${v > 1 ? `x${v}` : \"\"}`)\n .join(\" \")}\n \n );\n}\n\nexport default function Stats({\n cavern,\n mapOverlay,\n}: {\n cavern: Cavern;\n mapOverlay: MapOverlay;\n}) {\n const content = (() => {\n switch (mapOverlay) {\n case \"overview\":\n return (\n <>\n {cavern.levelName && (\n

\n {cavern.fileName} {cavern.levelName}\n

\n )}\n {cavern.briefing?.intro && (\n

{cavern.briefing.intro.replace(/\\n/g, \"\\u00B6\")}

\n )}\n \n );\n case \"tiles\":\n return (\n
    \n
  • Playable area: {cavern.tiles?.size ?? 0}
  • \n
  • \n Walls: {cavern.tiles?.reduce((r, t) => (t.isWall ? r + 1 : r), 0)}\n
  • \n
\n );\n case \"entities\": {\n return (\n
    \n
  • Miners: {cavern.miners?.length ?? 0}
  • \n
  • \n Buildings: \n
  • \n
  • \n Vehicles: \n
  • \n
  • \n Creatures: \n
  • \n
\n );\n }\n case \"crystals\":\n return (\n
    \n
  • Total EC: {getTotalCrystals(cavern)}
  • \n {cavern.objectives?.crystals ? (\n
  • Goal: {cavern.objectives?.crystals}
  • \n ) : null}\n
\n );\n case \"ore\":\n return (\n
    \n
  • Total Ore: {getTotalOre(cavern)}
  • \n {cavern.objectives?.ore ? (\n
  • Goal: {cavern.objectives?.ore}
  • \n ) : null}\n
\n );\n case \"landslides\": {\n if (!cavern.landslides?.size) {\n return null;\n }\n const count = cavern.landslides.size;\n const avgCooldown =\n cavern.landslides.reduce((r, ls) => r + ls.cooldown, 0) / count;\n return (\n
    \n
  • Landslides: {count}
  • \n {avgCooldown && (\n
  • Avg Cooldown: {avgCooldown.toFixed(2)} seconds
  • \n )}\n
\n );\n }\n case \"erosion\": {\n const count = cavern.erosion?.size ?? 0;\n const avgCooldown = cavern.erosion\n ? cavern.erosion.reduce((r, ls) => r + ls.cooldown, 0) / count\n : null;\n return (\n
    \n
  • \n Water:{\" \"}\n {cavern.tiles?.reduce(\n (r, t) => (t === Tile.WATER ? r + 1 : r),\n 0,\n )}\n
  • \n
  • \n Lava:{\" \"}\n {cavern.tiles?.reduce((r, t) => (t === Tile.LAVA ? r + 1 : r), 0)}\n
  • \n
  • Erosion: {count}
  • \n {avgCooldown && (\n
  • Avg Cooldown: {avgCooldown.toFixed(2)} seconds
  • \n )}\n
\n );\n }\n case \"height\": {\n if (!cavern.height) {\n return null;\n }\n return (\n
    \n
  • \n min:{\" \"}\n {cavern.height.reduce((r, h) => (h < r ? h : r), 0).toFixed()}\n
  • \n
  • \n mean:{\" \"}\n {(() => {\n let sum = 0;\n let count = 0;\n cavern.height.forEach((h) => {\n sum += h;\n count += 1;\n });\n return (sum / count).toFixed(1);\n })()}\n
  • \n
  • \n max:{\" \"}\n {cavern.height.reduce((r, h) => (h > r ? h : r), 0).toFixed()}\n
  • \n
\n );\n }\n case \"oxygen\": {\n return

Oxygen: {cavern.oxygen?.join(\"/\") ?? \"Infinity\"}

;\n }\n default:\n return null;\n }\n })();\n return content &&
{content}
;\n}\n","import React, { ReactNode } from \"react\";\nimport { Plan } from \"../../../core/models/plan\";\nimport PathPreview from \"./path\";\nimport styles from \"./style.module.scss\";\nimport { Cavern } from \"../../../core/models/cavern\";\nimport { Point } from \"../../../core/common/geometry\";\nimport { filterTruthy } from \"../../../core/common/utils\";\nimport { MapOverlay } from \".\";\n\nconst SCALE = 6;\n\nfunction getGClassName(plan: Partial>) {\n const r = [styles.plan];\n plan.kind && r.push(styles[`${plan.kind}Kind`]);\n plan.path?.kind && r.push(styles[`${plan.path.kind}PathKind`]);\n plan.fluid && r.push(styles[`fluid${plan.fluid.id}`]);\n plan.hasErosion && r.push(\"hasErosion\");\n return r.join(\" \");\n}\n\nfunction drawRadius(pearlRadius: number) {\n return pearlRadius + 1;\n}\n\nfunction caveWithOneBaseplate(plan: Partial>) {\n const [x, y] = plan.path!.baseplates[0].center;\n return (\n \n );\n}\n\nfunction dWrapping(\n a: { x: number; y: number; radius: number },\n b: { x: number; y: number; radius: number },\n): string {\n // There's no \"picture\" comments here, so accept this explanation that\n // vaguely resembles the geometry proofs I literally haven't had to deal\n // with in like 20 years.\n\n // Given: Two circles with centers A and B.\n // Given: Point A' which is on the circumference of A\n // Given: Point A'' which is the reflection of A' over line AB\n // Given: Point B' which is on the circumference of B\n // Given: Point B'' which is the reflection of B' over line AB\n // Given: The radius of A is greater than B\n if (a.radius < b.radius) {\n [a, b] = [b, a];\n }\n // First, get the polar coordinates of B relative to A.\n const [dx, dy] = [b.x - a.x, b.y - a.y];\n const lengthAB = Math.hypot(dx, dy);\n const angleAB = Math.atan2(dy, dx);\n\n // Create point C on AA'\n // Create a line BC which is perpendicular to AA'\n // ABC is a right triangle with hypotenuse AB\n // We know the length of AB and AC. Find angle BAC\n const lengthAC = a.radius - b.radius;\n const angleBAC = Math.acos(lengthAC / lengthAB);\n\n // This is enough to determine the locations of all the points.\n const prime1 = {\n x: Math.cos(angleAB - angleBAC),\n y: Math.sin(angleAB - angleBAC),\n };\n const prime2 = {\n x: Math.cos(angleAB + angleBAC),\n y: Math.sin(angleAB + angleBAC),\n };\n const aPrime1 = [a.x + a.radius * prime1.x, a.y + a.radius * prime1.y];\n const aPrime2 = [a.x + a.radius * prime2.x, a.y + a.radius * prime2.y];\n const bPrime1 = [b.x + b.radius * prime1.x, b.y + b.radius * prime1.y];\n const bPrime2 = [b.x + b.radius * prime2.x, b.y + b.radius * prime2.y];\n\n // Create SVG path segments\n return [\n `M ${aPrime2.join(\",\")}`,\n `A ${a.radius},${a.radius} 0 1 1 ${aPrime1.join(\",\")}`,\n `L ${bPrime1.join(\",\")}`,\n `A ${b.radius},${b.radius} 0 0 1 ${bPrime2.join(\",\")} Z`,\n ].join(\"\");\n}\n\nfunction caveWithTwoBaseplates(plan: Partial>) {\n const [a, b] = plan.path!.baseplates.map((bp) => {\n const [x, y] = bp.center;\n return {\n x: x * SCALE,\n y: y * SCALE,\n radius: drawRadius(bp.pearlRadius) * SCALE,\n };\n });\n\n return ;\n}\n\nfunction hall(plan: Partial>) {\n const bps = plan.path!.baseplates;\n const d = bps\n .map((bp, i) => {\n const [x, y] = bp.center;\n return `${i === 0 ? \"M\" : \"L\"}${x * SCALE} ${y * SCALE}`;\n })\n .join(\" \");\n return (\n \n );\n}\n\nexport default function PlansPreview({\n cavern,\n mapOverlay,\n}: {\n cavern: Cavern;\n mapOverlay: MapOverlay;\n}) {\n if (!cavern.plans) {\n return null;\n }\n\n const planCoords: Point[] = [];\n cavern.plans.forEach((plan) => {\n const bp = plan.path.baseplates;\n\n const i = Math.floor((bp.length - 1) / 2);\n const j = Math.floor(bp.length / 2);\n if (i === j) {\n planCoords[plan.id] = bp[i].center;\n } else {\n const [ix, iy] = bp[i].center;\n const [jx, jy] = bp[j].center;\n planCoords[plan.id] = [(ix + jx) / 2, (iy + jy) / 2];\n }\n });\n\n const right = [...cavern.plans];\n right.sort((a, b) => planCoords[b.id][0] - planCoords[a.id][0]);\n const left = right.splice(Math.floor(right.length / 2));\n right.sort((a, b) => planCoords[a.id][1] - planCoords[b.id][1]);\n left.sort(\n (a, b) =>\n planCoords[a.id][1] - planCoords[b.id][1] ||\n planCoords[a.id][0] - planCoords[b.id][0],\n );\n\n function drawLabels(\n plans: NonNullable,\n sign: -1 | 1,\n className: string,\n ): ReactNode {\n if (mapOverlay === \"script\") {\n return null;\n }\n if (mapOverlay === \"overview\") {\n return plans.map((plan) => {\n const bps = plan.path.baseplates;\n if (bps.length <= 1) {\n const [x, y] = bps[0].center;\n return (\n \n \n {\"architect\" in plan && plan.architect.name} {plan.id}\n \n \n );\n }\n const d = bps\n .map((bp, i) => {\n const [x, y] = bp.center;\n return `${i === 0 ? \"M\" : \"L\"}${x * SCALE} ${y * SCALE}`;\n })\n .join(\" \");\n return (\n \n \n \n \n {\"architect\" in plan && plan.architect.name} {plan.id}\n \n \n \n );\n });\n }\n let py = -Infinity;\n return plans.map((plan, i) => {\n const px = SCALE * planCoords[plan.id][0];\n py = Math.max(SCALE * planCoords[plan.id][1], py + 4);\n const lx = ((SCALE * cavern.context.targetSize) / 2 + 50) * sign;\n const ly =\n SCALE * cavern.context.targetSize * ((i + 1) / plans.length - 0.5);\n const bx = lx - Math.abs(py - ly) * 0.56 * sign;\n const d = filterTruthy([\n `M ${lx + 25 * sign} ${ly}`,\n `L ${lx} ${ly}`,\n bx * sign > px * sign && `L ${bx} ${py}`,\n `L ${px} ${py}`,\n ]).join(\"\");\n return (\n \n \n \n {\"architect\" in plan ? (\n <>\n {plan.architect.name}\n {!plan.hops.length && \"*\"} {plan.id}\n \n ) : (\n <>{plan.id}\n )}\n \n \n );\n });\n }\n\n return (\n <>\n {cavern.plans.map((plan) => {\n if (\"pearlRadius\" in plan) {\n return (\n \n {plan.kind === \"cave\"\n ? plan.path.baseplates.length === 2\n ? caveWithTwoBaseplates(plan)\n : caveWithOneBaseplate(plan)\n : hall(plan)}\n \n );\n }\n if (plan.path.baseplates.length ?? 0 > 1) {\n return ;\n }\n return null;\n })}\n {drawLabels(left, -1, styles.left)}\n {drawLabels(right, 1, styles.right)}\n \n );\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"script\":\"styles_script__wlFev\",\"src\":\"styles_src__D5r4o\",\"line\":\"styles_line__DUONY\",\"hovered\":\"styles_hovered__IuDHx\",\"scriptOverlay\":\"styles_scriptOverlay__itjxQ\",\"tile\":\"styles_tile__+On+N\",\"arrow\":\"styles_arrow__BwPCK\",\"arrowhead\":\"styles_arrowhead__VEozU\",\"misc\":\"styles_misc__Oi8T3\",\"condition\":\"styles_condition__-r6Ai\",\"event\":\"styles_event__jROkn\"};","import React, { Fragment, createRef, useLayoutEffect, useMemo } from \"react\";\nimport { Cavern } from \"../../../../core/models/cavern\";\nimport styles from \"./styles.module.scss\";\nimport { Point } from \"../../../../core/common/geometry\";\nimport { filterTruthy } from \"../../../../core/common/utils\";\n\ntype Statement = {\n kind: string;\n code: string;\n pos?: Point;\n};\n\nconst SCALE = 6;\n\nfunction parse(script: string): Statement[] {\n return script.split(\"\\n\").map((line) => {\n if (line.startsWith(\"#\")) {\n return { kind: \"misc\", code: line };\n }\n if (!line) {\n return { kind: \"misc\", code: \"\\u00A0\" };\n }\n const m = line.match(/(?(^|\\())[a-z]+:(?\\d+),(?\\d+)/);\n if (m) {\n const kind = m.groups!.prefix === \"(\" ? \"condition\" : \"event\";\n return {\n kind: kind,\n code: line,\n pos: [parseInt(m.groups!.x, 10), parseInt(m.groups!.y)],\n };\n }\n return { kind: \"misc\", code: line };\n });\n}\n\nfunction getLineOffsets(container: HTMLDivElement) {\n const result = [];\n const lines = Array.from(\n container.getElementsByClassName(styles.line),\n ) as HTMLElement[];\n let i = 0;\n for (; i < lines.length; i++) {\n if (lines[i].offsetTop + lines[i].clientHeight >= container.scrollTop) {\n break;\n }\n }\n for (; i < lines.length; i++) {\n if (lines[i].offsetTop >= container.scrollTop + container.clientHeight) {\n break;\n }\n result[i] =\n lines[i].offsetTop +\n lines[i].clientHeight / 2 -\n container.clientHeight / 2 -\n container.scrollTop;\n }\n return result;\n}\n\nexport default function ScriptPreview({\n cavern,\n setScriptLineOffsets,\n scriptLineHovered,\n setScriptLineHovered,\n}: {\n cavern: Cavern | undefined;\n setScriptLineOffsets: (v: number[]) => void;\n scriptLineHovered: number;\n setScriptLineHovered: (v: number) => void;\n}) {\n const ref = createRef();\n useLayoutEffect(() => {\n const container = ref.current;\n if (!container) {\n return;\n }\n setScriptLineOffsets(getLineOffsets(container));\n }, [ref, setScriptLineOffsets]);\n const statements = useMemo(\n () => (cavern?.script ? parse(cavern.script) : undefined),\n [cavern],\n );\n return (\n setScriptLineOffsets(getLineOffsets(ref.current!))}\n >\n

Script

\n
\n {statements?.map(({ code, pos, kind }, i) => {\n const className = filterTruthy([\n styles.line,\n scriptLineHovered === i && styles.hovered,\n styles[kind],\n ]).join(\" \");\n return (\n setScriptLineHovered(i) : undefined}\n >\n {code}\n
\n );\n })}\n
\n
\n );\n}\n\nexport function ScriptOverlay({\n cavern,\n scriptLineOffsets,\n scriptLineHovered,\n scale,\n}: {\n cavern: Cavern | undefined;\n scriptLineOffsets: number[];\n scriptLineHovered: number;\n scale: number;\n}) {\n const statements = useMemo(\n () => (cavern?.script ? parse(cavern.script) : undefined),\n [cavern],\n );\n if (!cavern?.script) {\n return null;\n }\n const ox = cavern.left!;\n const oy = cavern.top!;\n return (\n \n {statements!.map(({ kind, pos }, i) => {\n if (!pos || scriptLineOffsets[i] === undefined) {\n return null;\n }\n const className = filterTruthy([\n styles.tile,\n scriptLineHovered === i && styles.hovered,\n styles[kind],\n ]).join(\" \");\n return (\n \n );\n })}\n {parse(cavern.script).map(({ kind, pos }, i) => {\n if (\n !pos ||\n scriptLineHovered !== i ||\n scriptLineOffsets[i] === undefined\n ) {\n return null;\n }\n const lx = -9999;\n const ly = scriptLineOffsets[i] / scale;\n const px = (pos[0] + ox + 0.5) * SCALE;\n const py = (pos[1] + oy + 0.5) * SCALE;\n const bx = px - Math.abs(py - ly) * 0.3;\n const d = filterTruthy([\n `M ${px} ${py}`,\n `L ${bx} ${ly}`,\n `L ${lx} ${ly}`,\n ]).join(\"\");\n const cr = 10;\n const tr = 4;\n return (\n \n \n \n \n \n );\n })}\n \n );\n}\n","import React, {\n CSSProperties,\n createRef,\n useLayoutEffect,\n useReducer,\n useState,\n} from \"react\";\nimport { Cavern } from \"../../../core/models/cavern\";\nimport BaseplatePreview from \"./baseplate\";\nimport PathPreview from \"./path\";\nimport PearlPreview from \"./pearl\";\nimport { PearledPlan } from \"../../../core/transformers/01_planning/04_pearl\";\nimport TilesPreview from \"./tiles\";\nimport EntityPreview from \"./entity\";\nimport OpenCaveFlagPreview from \"./open_cave_flag\";\nimport styles from \"./style.module.scss\";\nimport HeightPreview from \"./height\";\nimport Stats from \"./stats\";\nimport PlansPreview from \"./plan\";\nimport ScriptPreview, { ScriptOverlay } from \"./script_preview\";\n\nexport type MapOverlay =\n | \"about\"\n | \"crystals\"\n | \"discovery\"\n | \"entities\"\n | \"erosion\"\n | \"height\"\n | \"landslides\"\n | \"lore\"\n | \"ore\"\n | \"overview\"\n | \"oxygen\"\n | \"script\"\n | \"tiles\"\n | null;\n\nfunction getScale(\n cavern: Cavern,\n mapOverlay: MapOverlay,\n showOutlines: boolean,\n mapWrapper: HTMLDivElement | null,\n) {\n if (!mapWrapper || cavern.left === undefined) {\n return 1;\n }\n const tw = Math.max(-1 * (cavern.left ?? 0), 1 + (cavern.right ?? 0)) + 1;\n const th = Math.max(-1 * (cavern.top ?? 0), 1 + (cavern.bottom ?? 0)) + 1;\n const overlayMargin =\n cavern.plans && showOutlines && mapOverlay !== \"script\" ? 400 : 0;\n const mw = 6 * 2 * tw + overlayMargin;\n const mh = 6 * 2 * th;\n return Math.max(\n Math.floor(\n Math.min(mapWrapper.clientWidth / mw, mapWrapper.clientHeight / mh) * 2,\n ) / 2,\n 0.5,\n );\n}\n\nfunction getTransform(cavern: Cavern, mapOverlay: MapOverlay, scale: number) {\n if (mapOverlay !== \"overview\" || !cavern.cameraPosition) {\n return {\n \"--pvw-scale\": scale,\n } as CSSProperties;\n }\n const { x, y, yaw, pitch } = cavern.cameraPosition;\n return {\n \"--pvw-scale\": 6,\n \"--pvw-pitch\": `${pitch}rad`,\n \"--pvw-yaw\": `${Math.PI - ((yaw + Math.PI * 1.5) % (Math.PI * 2))}rad`,\n \"--pvw-tr-x\": -x * 6,\n \"--pvw-tr-y\": -y * 6,\n } as CSSProperties;\n}\n\nexport default function CavernPreview({\n cavern,\n mapOverlay,\n showOutlines,\n showPearls,\n}: {\n cavern: Cavern;\n mapOverlay: MapOverlay;\n showOutlines: boolean;\n showPearls: boolean;\n}) {\n const [scriptLineHovered, setScriptLineHovered] = useState(-1);\n const [scriptLineOffsets, setScriptLineOffsets] = useReducer(\n (was: number[], now: number[]) => {\n if (was.length !== now.length) {\n return now;\n }\n for (let i = 0; i < was.length; i++) {\n if (was[i] !== now[i]) {\n return now;\n }\n }\n return was;\n },\n [],\n );\n\n const mapWrapperRef = createRef();\n const [scale, setScale] = useState(1);\n\n useLayoutEffect(() => {\n const fn = () =>\n setScale(\n getScale(cavern, mapOverlay, showOutlines, mapWrapperRef.current),\n );\n window.addEventListener(\"resize\", fn);\n fn();\n return () => window.removeEventListener(\"resize\", fn);\n }, [cavern, mapOverlay, showOutlines, mapWrapperRef]);\n\n switch (mapOverlay) {\n case \"about\":\n case \"lore\":\n return null;\n default:\n }\n\n const height = cavern.context.targetSize * 2 * 6;\n const width = Math.max(height, cavern.context.targetSize * 6 + 600);\n\n return (\n \n {mapOverlay === \"script\" && (\n \n )}\n
\n \n {}\n {mapOverlay === \"height\" && cavern.height && (\n \n )}\n {showOutlines &&\n cavern.baseplates?.map((bp) => (\n \n ))}\n {showOutlines &&\n cavern.paths?.map((pa) => )}\n {cavern.buildings?.map((b, i) => (\n \n ))}\n {cavern.creatures?.map((c) => (\n \n ))}\n {cavern.miners?.map((m) => (\n \n ))}\n {cavern.vehicles?.map((v) => (\n \n ))}\n {mapOverlay === \"discovery\" &&\n cavern.openCaveFlags?.map((_, x, y) => (\n \n ))}\n {mapOverlay === \"script\" && (\n \n )}\n {showOutlines && cavern.plans && (\n \n )}\n {showPearls &&\n cavern.plans\n ?.filter((pl) => \"outerPearl\" in pl)\n .map((pl) => (\n }\n pearl={\"outerPearl\"}\n />\n ))}\n {showPearls &&\n cavern.plans\n ?.filter((pl) => \"innerPearl\" in pl)\n .map((pl) => (\n }\n pearl={\"innerPearl\"}\n />\n ))}\n \n
\n \n
\n );\n}\n","type TfResult = {\n result: Current;\n name: string;\n progress: number;\n next: (() => TfResult) | null;\n};\n\nexport type TransformResult = TfResult;\n\nexport type AnyTfResultOf> =\n BT extends TfBuilder ? T : unknown;\n\nclass TfBuilder {\n private fns: ((it: T) => T)[];\n constructor(fns: ((it: T) => T)[]) {\n this.fns = fns;\n }\n private mkResult(\n result: Current,\n i: number,\n ): TfResult {\n const name = [\n `${i}/${this.fns.length}`,\n this.fns[i - 1]?.name ?? \"init\",\n i < this.fns.length ? `(next: ${this.fns[i].name})` : undefined,\n ].join(\" \");\n const progress = i / this.fns.length;\n const next =\n i < this.fns.length\n ? () => this.mkResult(this.fns[i](result), i + 1)\n : null;\n return { result, name, progress, next };\n }\n first(result: In): TfResult {\n return this.mkResult(result, 0);\n }\n chain(\n that: TfBuilder,\n ): TfBuilder {\n return new TfBuilder([\n ...(this.fns as ((it: T | ThatT) => T | ThatT)[]),\n ...(that.fns as ((it: T | ThatT) => T | ThatT)[]),\n ]);\n }\n then(fn: (it: Out) => ThatOut): TfBuilder {\n return new TfBuilder([\n ...(this.fns as ((it: T | ThatOut) => T | ThatOut)[]),\n fn as (it: T | ThatOut) => T | ThatOut,\n ]);\n }\n}\n\nexport function tf(fn: (it: TIn) => TOut) {\n const fns = [fn as (it: TIn | TOut) => TIn | TOut];\n return new TfBuilder(fns);\n}\n","import { Point } from \"../common/geometry\";\n\nexport type BaseplateKind = \"stock\" | \"ambiguous\" | \"cave\" | \"hall\";\n\n/* A rectangular space that we can build on. */\nexport class Baseplate {\n readonly id: number;\n readonly left: number;\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n readonly kind: BaseplateKind;\n\n constructor(\n id: number,\n left: number,\n top: number,\n right: number,\n bottom: number,\n kind: BaseplateKind,\n ) {\n this.id = id;\n this.left = left;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n this.kind = kind;\n }\n\n get width(): number {\n return this.right - this.left;\n }\n\n get height(): number {\n return this.bottom - this.top;\n }\n\n get area(): number {\n return this.width * this.height;\n }\n\n get center(): Point {\n return [this.left + this.width / 2, this.top + this.height / 2];\n }\n\n withKind(kind: BaseplateKind): Baseplate {\n return new Baseplate(\n this.id,\n this.left,\n this.top,\n this.right,\n this.bottom,\n kind,\n );\n }\n\n get pearlRadius(): number {\n return Math.min(this.width, this.height) >> 1;\n }\n}\n","import { CavernContext, DiceBox, PseudorandomStream } from \"../../common\";\nimport { Baseplate } from \"../../models/baseplate\";\nimport { BaseCavern } from \"../../models/cavern\";\n\nexport type PartitionedCavern = BaseCavern & {\n baseplates: readonly Baseplate[];\n};\n\nconst BASEPLATE_MIN_SIZE = 3;\n\n// Cuts the space into Baseplates.\nclass Partitioner {\n private readonly context: CavernContext;\n private readonly baseplateMaxSize: number;\n private readonly rng: PseudorandomStream;\n private readonly queue: Baseplate[];\n private readonly outbox: Baseplate[];\n private nextId: number = 0;\n\n constructor({ context, dice }: { context: CavernContext; dice: DiceBox }) {\n this.context = context;\n this.rng = dice.partition;\n this.baseplateMaxSize = Math.max(\n Math.round(context.targetSize * context.baseplateMaxRatioOfSize),\n 3,\n );\n\n const bound = context.targetSize >> 1;\n this.queue = [\n new Baseplate(this.id(), -bound, -bound, bound, bound, \"stock\"),\n ];\n this.outbox = [];\n }\n\n private id(): number {\n return this.nextId++;\n }\n\n private clone(\n bp: Baseplate,\n id: number,\n args: {\n left?: number;\n top?: number;\n right?: number;\n bottom?: number;\n },\n ) {\n const r = new Baseplate(\n id,\n args.left ?? bp.left,\n args.top ?? bp.top,\n args.right ?? bp.right,\n args.bottom ?? bp.bottom,\n \"stock\",\n );\n if (Math.min(r.width, r.height) >= BASEPLATE_MIN_SIZE) {\n this.queue.push(r);\n }\n }\n\n public get baseplates(): readonly Baseplate[] {\n return [...this.queue, ...this.outbox];\n }\n\n public get done(): boolean {\n return this.queue.length === 0;\n }\n\n // Perform one step of partitioning.\n public step(): void {\n const queue = [...this.queue];\n this.queue.length = 0;\n for (const bp of queue) {\n this.split(bp);\n }\n }\n\n private split(bp: Baseplate) {\n if (bp.width > bp.height * 2) {\n // Cut vertically\n const x = this.rng.betaInt({\n a: 5,\n b: 5,\n min: bp.left + 1,\n max: bp.right,\n });\n this.clone(bp, bp.id, { right: x });\n this.clone(bp, this.id(), { left: x });\n } else if (bp.height > bp.width * 2) {\n // Cut horizontally\n const y = this.rng.betaInt({\n a: 5,\n b: 5,\n min: bp.top + 1,\n max: bp.bottom,\n });\n this.clone(bp, bp.id, { bottom: y });\n this.clone(bp, this.id(), { top: y });\n } else {\n // Determine size to clip from center\n let w = this.rng.betaInt({\n a: 5,\n b: 2.5,\n min: 3,\n max: Math.min(this.baseplateMaxSize, bp.width),\n });\n let h = this.rng.betaInt({\n a: 5,\n b: 2.5,\n min: 3,\n max: Math.min(this.baseplateMaxSize, bp.height),\n });\n // Limit to max oblongness\n w = Math.min(w, h + this.context.baseplateMaxOblongness);\n h = Math.min(h, w + this.context.baseplateMaxOblongness);\n // Determine where to place this baseplate in the open space\n const x1 = this.rng.uniformInt({ min: bp.left, max: bp.right - w });\n const y1 = this.rng.uniformInt({ min: bp.top, max: bp.bottom - h });\n const x2 = x1 + w;\n const y2 = y1 + h;\n // Clip the baseplate itself from the center\n if (Math.min(w, h) >= BASEPLATE_MIN_SIZE) {\n if (Math.max(w, h) <= this.baseplateMaxSize) {\n this.outbox.push(new Baseplate(bp.id, x1, y1, x2, y2, \"ambiguous\"));\n } else {\n this.queue.push(new Baseplate(bp.id, x1, y1, x2, y2, \"stock\"));\n }\n }\n // Randomly clip the four pieces around clockwise or counterclockwise\n if (this.rng.chance(0.5)) {\n this.clone(bp, this.id(), { right: x1, bottom: y2 });\n this.clone(bp, this.id(), { left: x1, bottom: y1 });\n this.clone(bp, this.id(), { left: x2, top: y1 });\n this.clone(bp, this.id(), { right: x2, top: y2 });\n } else {\n this.clone(bp, this.id(), { right: x2, bottom: y1 });\n this.clone(bp, this.id(), { left: x2, bottom: y2 });\n this.clone(bp, this.id(), { left: x1, top: y2 });\n this.clone(bp, this.id(), { right: x1, top: y1 });\n }\n }\n }\n}\n\nexport default function partition(cavern: BaseCavern): PartitionedCavern {\n const partitioner = new Partitioner(cavern);\n while (!partitioner.done) {\n partitioner.step();\n }\n return { ...cavern, baseplates: partitioner.baseplates };\n}\n","import { pairMap } from \"../common/utils\";\nimport { Baseplate } from \"./baseplate\";\n\nexport type PathKind = \"ambiguous\" | \"spanning\" | \"auxiliary\" | \"single\";\n\nfunction distance(a: Baseplate, b: Baseplate): number {\n const [x1, y1] = a.center;\n const [x2, y2] = b.center;\n const dx = x1 - x2;\n const dy = y1 - y2;\n return Math.hypot(dx, dy);\n}\n\n/* A path through a series of Baseplates. */\nexport class Path {\n readonly id: number;\n readonly kind: PathKind;\n readonly baseplates: readonly Baseplate[];\n\n constructor(id: number, kind: PathKind, baseplates: readonly Baseplate[]) {\n this.id = id;\n this.kind = kind;\n this.baseplates = baseplates;\n }\n\n public get origin(): Baseplate {\n return this.baseplates[0];\n }\n\n public get destination(): Baseplate {\n return this.baseplates[this.baseplates.length - 1];\n }\n\n /** The distance directly from the origin to destination. */\n public get batDistance(): number {\n return distance(this.origin, this.destination);\n }\n\n /** The distance along the path from the origin to the destination. */\n public get snakeDistance(): number {\n return pairMap(this.baseplates, distance).reduce((a, b) => a + b, 0);\n }\n\n public get exclusiveSnakeDistance(): number {\n return Math.max(\n this.snakeDistance -\n this.origin.pearlRadius -\n this.destination.pearlRadius,\n 0,\n );\n }\n}\n","import { tf } from \"../../common/transform\";\nimport partition from \"./00_partition\";\nimport discriminate from \"./01_discriminate\";\nimport triangulate from \"./02_triangulate\";\nimport span from \"./03_span\";\nimport clip from \"./04_clip\";\nimport bore from \"./05_bore\";\nimport weave from \"./06_weave\";\n\nexport const OUTLINE_TF = tf(partition)\n .then(discriminate)\n .then(triangulate)\n .then(span)\n .then(clip)\n .then(bore)\n .then(weave);\n","import { PartitionedCavern } from \"./00_partition\";\n\nexport default function discriminate(\n cavern: PartitionedCavern,\n): PartitionedCavern {\n const baseplates = [...cavern.baseplates];\n const dexes = cavern.baseplates\n .map((bp, i) => [bp.area, i])\n .sort(([a], [b]) => b - a);\n const count = Math.min(cavern.context.caveCount, baseplates.length - 1);\n for (let i = 0; i < count; i++) {\n const j = dexes[i][1];\n baseplates[j] = baseplates[j].withKind(\"cave\");\n }\n return { ...cavern, baseplates };\n}\n","import Delaunator from \"delaunator\";\nimport { Path } from \"../../models/path\";\nimport { PartitionedCavern } from \"./00_partition\";\n\nexport type TriangulatedCavern = PartitionedCavern & {\n paths: readonly Path[];\n};\n\n/**\n * Performs Delaunay triangulation over all the baseplates with the 'cave' kind to generate\n * ambiguous paths.\n */\nexport default function triangulate(\n cavern: PartitionedCavern,\n): TriangulatedCavern {\n const caveBaseplates = cavern.baseplates.filter((bp) => bp.kind === \"cave\");\n const points = caveBaseplates.flatMap((bp) => bp.center);\n const delaunay = new Delaunator(points);\n const paths: Path[] = [];\n for (let i = 0; i < delaunay.triangles.length; i++) {\n if (i > delaunay.halfedges[i]) {\n const id = paths.length;\n const source = caveBaseplates[delaunay.triangles[i]];\n const dest =\n caveBaseplates[delaunay.triangles[i + (i % 3 === 2 ? -2 : 1)]];\n paths[id] = new Path(id, \"ambiguous\", [source, dest]);\n }\n }\n return { ...cavern, paths };\n}\n","import { TriangulatedCavern } from \"./02_triangulate\";\nimport { Path } from \"../../models/path\";\n\n/*\n * Returns an array of paths filtered from the input.\n * Some paths returned will have the kind 'spanning' - this set of paths comprises the\n * minimum spanning tree of the graph.\n *\n * It is assumed the ids of the paths are sequential, starting from 0.\n */\nexport default function span(cavern: TriangulatedCavern): TriangulatedCavern {\n const clusters: number[] = [];\n let nextCluster = 1;\n\n const paths = [];\n\n for (const path of [...cavern.paths].sort(\n (a, b) => a.batDistance - b.batDistance,\n )) {\n const oi = path.origin.id;\n const di = path.destination.id;\n const oc = clusters[oi];\n const dc = clusters[di];\n if (oc && dc) {\n if (oc === dc) {\n // Cycle detected (This path is not spanning)\n paths[path.id] = path;\n continue;\n }\n // Merge clusters\n clusters.forEach((c, i) => {\n if (c === dc) {\n clusters[i] = oc;\n }\n });\n } else if (oc) {\n // Add destination to existing cluster\n clusters[di] = oc;\n } else if (dc) {\n // Add origin to existing cluster\n clusters[oi] = dc;\n } else {\n // Create a new cluster for both\n clusters[oi] = nextCluster;\n clusters[di] = nextCluster;\n nextCluster++;\n }\n paths[path.id] = new Path(path.id, \"spanning\", path.baseplates);\n }\n return { ...cavern, paths: paths.filter((p) => p) };\n}\n","import { TriangulatedCavern } from \"./02_triangulate\";\nimport { Path } from \"../../models/path\";\n\n/**\n * Remove any ambiguous paths on baseplates that exist outside the clip radius.\n * The halls on the outside edges tend to be long, thin, straight, cardinal,\n * and boring.\n */\nexport default function clip(cavern: TriangulatedCavern): TriangulatedCavern {\n const radius = cavern.context.targetSize / 2;\n const rSquared = radius * radius;\n const paths: Path[] = cavern.paths.filter(\n (path) =>\n path.kind === \"spanning\" ||\n !path.baseplates.some((bp) => {\n const [x, y] = bp.center;\n return x * x + y * y > rSquared;\n }),\n );\n return { ...cavern, paths };\n}\n","import { plotLine } from \"../../common/geometry\";\nimport { Baseplate } from \"../../models/baseplate\";\nimport { TriangulatedCavern } from \"./02_triangulate\";\nimport { Path } from \"../../models/path\";\n\n/**\n * Add ambiguous baseplates to paths that intersect them.\n */\nexport default function bore(cavern: TriangulatedCavern): TriangulatedCavern {\n const bpAtTile: { [tile: string]: Baseplate } = {};\n\n for (const bp of cavern.baseplates) {\n for (let x = bp.left; x < bp.right; x++) {\n for (let y = bp.top; y < bp.bottom; y++) {\n bpAtTile[`${x},${y}`] = bp;\n }\n }\n }\n\n function* genPathPlates(path: Path): IterableIterator {\n let last = path.origin;\n const seen = new Set([last]);\n\n yield last;\n\n while (true) {\n for (const [x, y] of plotLine(last.center, path.destination.center)) {\n const bp = bpAtTile[`${x},${y}`];\n if (bp === path.destination) {\n yield bp;\n return;\n }\n if (bp && !seen.has(bp)) {\n seen.add(bp);\n if (bp.kind !== \"cave\") {\n last = bp;\n yield last;\n break;\n }\n }\n }\n }\n }\n\n const paths = cavern.paths.map((path) => {\n return new Path(path.id, path.kind, Array.from(genPathPlates(path)));\n });\n return { ...cavern, paths };\n}\n","import { Baseplate } from \"../../models/baseplate\";\nimport { TriangulatedCavern } from \"./02_triangulate\";\nimport { Path } from \"../../models/path\";\n\ntype GraphNode = {\n src: Baseplate;\n edges: { theta: number; distance: number; dest: Baseplate }[];\n};\n\nfunction getGraph(paths: readonly Path[]): GraphNode[] {\n const result: GraphNode[] = [];\n const push = (\n path: Path,\n src: Baseplate,\n next: Baseplate,\n dest: Baseplate,\n ) => {\n const [ax, ay] = src.center;\n const [bx, by] = next.center;\n const theta = Math.atan2(by - ay, bx - ax);\n const distance = path.snakeDistance;\n (result[src.id] ||= { src, edges: [] }).edges[path.id] = {\n theta,\n distance,\n dest,\n };\n };\n paths.forEach((path) => {\n const bps = path.baseplates;\n push(path, bps[0], bps[1], bps[bps.length - 1]);\n push(path, bps[bps.length - 1], bps[bps.length - 2], bps[0]);\n });\n return result;\n}\n\nfunction getAllDistances(graph: GraphNode[], paths: Path[], src: Baseplate) {\n const distances: number[] = [];\n const queue: Baseplate[] = [];\n const result: { src: Baseplate; dest: Baseplate; distance: number }[] = [];\n\n distances[src.id] = 0;\n queue.push(src);\n\n // Dijkstra's algorithm\n while (queue.length) {\n const node = queue.shift()!;\n result.unshift({ src, dest: node, distance: distances[node.id] });\n graph[node.id].edges.forEach(({ distance, dest }, pathId) => {\n const pathKind = paths[pathId]?.kind;\n if (pathKind === \"spanning\" || pathKind === \"auxiliary\") {\n const d = distances[node.id] + distance;\n if (distances[dest.id] === undefined) {\n queue.push(dest);\n distances[dest.id] = d;\n } else if (d < distances[dest.id]) {\n distances[dest.id] = d;\n }\n }\n });\n queue.sort((a, b) => distances[a.id] - distances[b.id]);\n }\n\n return result;\n}\n\n/** Returns the angle between two absolute angles. */\nfunction getOffset(t1: number, t2: number): number {\n const r = Math.abs(t1 - t2);\n // Invert reflex angles\n return r > Math.PI ? 2 * Math.PI - r : r;\n}\n\nexport default function weave(cavern: TriangulatedCavern): TriangulatedCavern {\n const rng = cavern.dice.weave;\n const graph = getGraph(cavern.paths);\n const paths: Path[] = [];\n const pathIdsByEnds: number[][] = [];\n cavern.paths.forEach((path) => {\n paths[path.id] = path;\n (pathIdsByEnds[path.origin.id] ||= [])[path.destination.id] = path.id;\n (pathIdsByEnds[path.destination.id] ||= [])[path.origin.id] = path.id;\n });\n\n function minAngle(path: Path, node: GraphNode) {\n const theta = node.edges[path.id].theta;\n return node.edges.reduce((r, { theta: t }, pathId) => {\n const pathKind = paths[pathId]?.kind;\n if (pathKind === \"spanning\" || pathKind === \"auxiliary\") {\n return Math.min(getOffset(theta, t), r);\n }\n return r;\n }, Infinity);\n }\n\n // Delete any paths that don't form a minimum angle\n function pruneByAngle() {\n let ok = false;\n paths\n .filter((path) => path.kind === \"ambiguous\")\n .forEach((path) => {\n if (\n Math.min(\n minAngle(path, graph[path.origin.id]),\n minAngle(path, graph[path.destination.id]),\n ) < cavern.context.auxiliaryPathMinAngle\n ) {\n delete paths[path.id];\n } else {\n ok = true;\n }\n });\n return ok;\n }\n\n // Find the largest distance shortcut\n function addBestShortcut() {\n const distances = graph.map(({ src }) =>\n getAllDistances(graph, paths, src),\n );\n while (true) {\n const { src, dest } = distances\n .reduce((p, c) => (p[0].distance > c[0].distance ? p : c))\n .shift()!;\n const path = paths[pathIdsByEnds[src.id][dest.id]];\n if (path?.kind === \"ambiguous\") {\n paths[path.id] = new Path(path.id, \"auxiliary\", path.baseplates);\n break;\n }\n }\n }\n\n function addRandomShortcut() {\n const path = rng.betaChoice(\n paths\n .filter((path) => path.kind === \"ambiguous\")\n .map((path) => ({\n path,\n oa: minAngle(path, graph[path.origin.id]),\n da: minAngle(path, graph[path.destination.id]),\n }))\n .sort((a, b) => a.oa + a.da - b.oa - b.da),\n { a: 1, b: 5 },\n ).path;\n paths[path.id] = new Path(path.id, \"auxiliary\", path.baseplates);\n }\n\n for (let i = 0; i < cavern.context.optimalAuxiliaryPathCount; i++) {\n pruneByAngle() && addBestShortcut();\n }\n for (let i = 0; i < cavern.context.randomAuxiliaryPathCount; i++) {\n pruneByAngle() && addRandomShortcut();\n }\n\n return { ...cavern, paths: paths.filter((path) => path) };\n}\n","import { Baseplate } from \"../../models/baseplate\";\nimport { BaseCavern } from \"../../models/cavern\";\nimport { TriangulatedCavern } from \"../00_outlines/02_triangulate\";\nimport { Path } from \"../../models/path\";\nimport { Plan } from \"../../models/plan\";\nimport { AnyMetadata } from \"../../architects\";\n\nexport type PartialPlannedCavern>> =\n BaseCavern & {\n readonly plans: readonly T[];\n };\n\nexport type NegotiatedPlan = {\n /** Unique ID of the Plan, used for RNG and indexing. */\n readonly id: number;\n /** Is this a cave or a hall? */\n readonly kind: \"cave\" | \"hall\";\n /** The Path this Plan is built on. */\n readonly path: Path;\n};\n\n/*\n * Returns whether these Baseplates can be combined into one big Cave.\n * Must call this both ways.\n */\nfunction isMergeable(a: Baseplate, b: Baseplate): boolean {\n for (const [ua, ub, va1, va2, vb1, vb2] of [\n [a.right, b.left, a.top, a.bottom, b.top, b.bottom],\n [a.bottom, b.top, a.left, a.right, b.left, b.right],\n ]) {\n if (\n ua === ub &&\n Math.min(va2, vb2) - Math.max(va1, vb1) >\n Math.max(va2 - va1, vb2 - vb1) / 2\n ) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Assign Baseplates and Paths to Plans.\n */\nexport default function negotiate(\n cavern: TriangulatedCavern,\n): PartialPlannedCavern {\n const bpIsInBigCave: true[] = [];\n const queue: Pick, \"kind\" | \"path\">[][] = [[], [], []];\n\n const paths: Path[] = [\n ...cavern.paths.filter((path) => path.kind === \"spanning\"),\n ...cavern.paths.filter((path) => path.kind === \"auxiliary\"),\n ];\n\n paths.forEach((path) => {\n if (path.baseplates.length === 2) {\n const [a, b] = path.baseplates;\n if (\n !bpIsInBigCave[a.id] &&\n !bpIsInBigCave[b.id] &&\n (isMergeable(a, b) || isMergeable(b, a))\n ) {\n bpIsInBigCave[a.id] = true;\n bpIsInBigCave[b.id] = true;\n queue[2].push({ path, kind: \"cave\" });\n return;\n }\n }\n queue[0].push({ path, kind: \"hall\" });\n });\n\n queue[1] = cavern.baseplates\n .filter((bp) => bp.kind === \"cave\" && !bpIsInBigCave[bp.id])\n .map((bp) => ({ path: new Path(-1, \"single\", [bp]), kind: \"cave\" }));\n\n const plans: NegotiatedPlan[] = queue\n .flatMap((a) => a)\n .map((plan, id) => ({ ...plan, id }));\n\n return { context: cavern.context, dice: cavern.dice, plans };\n}\n","import { ARCHITECTS, AnyMetadata } from \"../../architects\";\nimport { Curve } from \"../../common\";\nimport { CollapseUnion } from \"../../common/utils\";\nimport { Architect, BaseMetadata } from \"../../models/architect\";\nimport { PartialPlannedCavern } from \"./00_negotiate\";\nimport { FloodedPlan } from \"./02_flood\";\n\ntype SortedPlan = {\n plan: FloodedPlan & { architect?: Architect };\n hops: readonly number[];\n index: number;\n};\nexport type ArchitectedPlan = FloodedPlan & {\n readonly hops: readonly number[];\n /** The architect to use to build out the plan. */\n readonly architect: Architect;\n readonly metadata: T;\n readonly crystalRichness: number;\n readonly oreRichness: number;\n readonly monsterSpawnRate: number;\n readonly monsterWaveSize: number;\n};\nexport type EstablishedPlan = ArchitectedPlan & {\n /** How blobby the pearl should be. */\n readonly baroqueness: number;\n /** How many crystals the Plan will add. */\n readonly crystals: number;\n /** How many ore the Plan will add. */\n readonly ore: number;\n};\n\ntype CurveProps = { hops: number; order: number };\n\nfunction curved(curve: Curve, props: CurveProps): number {\n return curve.base + curve.hops * props.hops + curve.order * props.order;\n}\n\nfunction encourageDisable>(\n architects: readonly T[],\n cavern: PartialPlannedCavern,\n): T[] {\n return architects\n .filter((a) => cavern.context.architects?.[a.name] !== \"disable\")\n .map((a) => {\n if (cavern.context.architects?.[a.name] === \"encourage\") {\n const r = { ...a };\n r.caveBid = (args) => !!a.caveBid?.(args) && 999999;\n r.hallBid = (args) => !!a.hallBid?.(args) && 999999;\n r.spawnBid = (args) => !!a.spawnBid?.(args) && 999999;\n return r;\n }\n return a;\n });\n}\n\nexport default function establish(\n cavern: PartialPlannedCavern,\n): PartialPlannedCavern> {\n const architects = encourageDisable(ARCHITECTS, cavern);\n\n // Choose a spawn and an architect for that spawn.\n const spawn = cavern.dice.pickSpawn.weightedChoice(\n architects\n .filter((architect) => architect.spawnBid)\n .flatMap((architect) =>\n cavern.plans\n .filter((p) => p.kind === \"cave\")\n .map((plan) => ({\n item: { ...plan, architect },\n bid: architect.spawnBid!({ cavern, plan }) || 0,\n })),\n ),\n );\n\n // Sort the plans in a breadth-first search order, starting from spawn and\n // annotating each with the index and the hops it takes to get here from spawn.\n function sortPlans(): SortedPlan[] {\n const isQueued: true[] = [];\n isQueued[spawn.id] = true;\n const queue: { plan: FloodedPlan; hops: readonly number[] }[] = [\n { plan: spawn, hops: [] },\n ];\n const result: SortedPlan[] = [];\n\n for (let index = 0; queue.length > 0; index++) {\n const { plan, hops } = queue.shift()!;\n\n const neighbors = plan.intersects\n .map((b, id) => (b ? id : -1))\n .filter(\n (id) =>\n id >= 0 && !isQueued[id] && cavern.plans[id].kind !== plan.kind,\n );\n neighbors.forEach((id) => (isQueued[id] = true));\n queue.push(\n ...neighbors.map((id) => ({\n plan: cavern.plans[id],\n hops: [...hops, plan.id],\n })),\n );\n result.push({ plan, hops, index });\n }\n return result;\n }\n const inOrder = sortPlans();\n\n const plans: CollapseUnion>[] =\n cavern.plans.slice();\n let totalCrystals = 0;\n\n const maxIndex = inOrder.length - 1;\n const maxHops = inOrder[inOrder.length - 1].hops.length;\n function doArchitect({\n plan,\n hops,\n index,\n }: SortedPlan): ArchitectedPlan {\n const props = { hops: hops.length / maxHops, order: index / maxIndex };\n const architect =\n plan.architect ||\n cavern.dice.pickArchitect(plan.id).weightedChoice(\n architects.map((architect) => {\n const bid =\n plan.kind === \"cave\" ? architect.caveBid : architect.hallBid;\n return {\n item: architect,\n bid: bid?.({ cavern, plan, plans, hops, totalCrystals }) || 0,\n };\n }),\n );\n const metadata = architect.prime({ cavern, plan });\n const crystalRichness = curved(\n plan.kind === \"cave\"\n ? cavern.context.caveCrystalRichness\n : cavern.context.hallCrystalRichness,\n props,\n );\n const oreRichness = curved(\n plan.kind === \"cave\"\n ? cavern.context.caveOreRichness\n : cavern.context.hallOreRichness,\n props,\n );\n const monsterSpawnRate = curved(cavern.context.monsterSpawnRate, props);\n const monsterWaveSize = curved(cavern.context.monsterWaveSize, props);\n return {\n ...plan,\n hops,\n architect,\n metadata,\n crystalRichness,\n oreRichness,\n monsterSpawnRate,\n monsterWaveSize,\n };\n }\n function doEstablish(plan: ArchitectedPlan) {\n const args = { cavern, plan, totalCrystals };\n const baroqueness = plan.architect.baroqueness(args);\n const crystals = Math.round(\n plan.architect.crystalsToPlace(args) +\n plan.architect.crystalsFromMetadata(plan.metadata),\n );\n totalCrystals += crystals;\n const ore = Math.round(plan.architect.ore(args));\n const established: EstablishedPlan = {\n ...plan,\n baroqueness,\n crystals,\n ore,\n };\n plans[plan.id] = established;\n }\n inOrder.forEach((plan) => doEstablish(doArchitect(plan)));\n\n return { ...cavern, plans: plans as EstablishedPlan[] };\n}\n","import { AnyMetadata } from \"../../architects\";\nimport { PseudorandomStream } from \"../../common\";\nimport { NSEW, Point, plotLine } from \"../../common/geometry\";\nimport { MutableGrid } from \"../../common/grid\";\nimport { pairEach } from \"../../common/utils\";\nimport { BaseMetadata } from \"../../models/architect\";\nimport { PartialPlannedCavern } from \"./00_negotiate\";\nimport { EstablishedPlan } from \"./03_establish\";\n\ntype Layer = readonly Point[];\nexport type Pearl = readonly Layer[];\n\nexport type PearledPlan = EstablishedPlan & {\n /**\n * A pearl is an array of layers (from innermost to out).\n * Each layer contains an array of [x, y] coordinates in that layer.\n * innerPearl[layer][sequence] = [x, y]\n */\n readonly innerPearl: Pearl;\n readonly outerPearl: Pearl;\n};\n\nexport class LayerGrid extends MutableGrid {\n atLayer(layer: number): Point[] {\n const result: Point[] = [];\n this.forEach((ly, x, y) => {\n if (ly === layer) {\n result.push([x, y]);\n }\n });\n return result;\n }\n\n set(x: number, y: number, layer: number) {\n const has = this.get(x, y);\n if (has === undefined || layer < has) {\n super.set(x, y, layer);\n }\n }\n}\n\nexport function hallNucleus(grid: LayerGrid, plan: EstablishedPlan) {\n pairEach(plan.path.baseplates, (a, b) => {\n for (const [x, y] of plotLine(a.center, b.center)) {\n grid.set(x, y, 0);\n }\n });\n}\n\nexport function caveNucleus(grid: LayerGrid, plan: EstablishedPlan) {\n // The cave nucleus is less straightforward.\n\n plan.path.baseplates.forEach((bp) => {\n const layer = plan.pearlRadius - bp.pearlRadius;\n // The offset is half the size of the pearl in that direction.\n // This creates a dot or rectangle depending on how oblong the baseplate is.\n const ox = Math.min(bp.pearlRadius, (bp.width - 1) >> 1);\n const oy = Math.min(bp.pearlRadius, (bp.height - 1) >> 1);\n for (let x = bp.left + ox; x < bp.right - ox; x++) {\n for (let y = bp.top + oy; y < bp.bottom - oy; y++) {\n grid.set(x, y, layer);\n }\n }\n });\n\n pairEach(plan.path.baseplates, (a, b) => {\n const layer = plan.pearlRadius - Math.min(a.pearlRadius, b.pearlRadius);\n for (const [x, y] of plotLine(a.center, b.center)) {\n grid.set(x, y, layer);\n }\n });\n}\n\nexport function trail(\n grid: LayerGrid,\n rng: PseudorandomStream,\n baroqueness: number,\n layer: number,\n cp: { x: number; y: number; vx: number; vy: number } | undefined,\n): Point[] {\n const result: Point[] = [];\n while (cp) {\n const { x, y, vx, vy } = cp;\n\n // Push the point to both the grid and result\n grid.set(x, y, layer);\n result.push([x, y]);\n\n // As it turns right, (vx, vy) cycles between:\n // (1, 0) -> (0, 1) -> (-1, 0) -> (0, -1) -> ...\n // Try each of these possible movements\n // prettier-ignore\n const nextPoints = [\n {ox: 0, oy: 0, vx: -vy, vy: vx}, // Right turn\n {ox: -vy, oy: vx, vx: vx, vy: vy}, // Straight, but drift right\n {ox: 0, oy: 0, vx: vx, vy: vy}, // Straight\n {ox: vy, oy: -vx, vx: vx, vy: vy}, // Straight, but drift left\n {ox: 0, oy: 0, vx: vy, vy: -vx}, // Left turn\n ].map((np) => ({...np, x: x + np.ox + np.vx, y: y + np.oy + np.vy}))\n\n const halt = nextPoints.some(({ x, y }) => {\n // First, determine if the trail has looped back around on itself.\n // This can mean that it either went all the way around to its start\n // or that it has escaped and is forming a loop on this loose tendril.\n if ((grid.get(x, y) ?? -1) < layer) {\n // This point is unoccupied or on an earlier layer. Ignore it.\n return false;\n }\n for (let i = result.length - 2; i > Math.max(result.length - 4, 0); i--) {\n const [rx, ry] = result[i];\n if (rx === x && ry === y) {\n // This point was visited recently. Ignore it.\n return false;\n }\n }\n // This point was on this layer but not visited recently. Halt.\n return true;\n });\n if (halt) {\n break;\n }\n\n cp = nextPoints.find(({ x, y }) => {\n // Next, try to find an acceptable next point to visit.\n // The point must not be already visited.\n if ((grid.get(x, y) ?? -1) >= 0) {\n return false;\n }\n // The RNG may veto.\n if (baroqueness > 0 && rng.chance(baroqueness)) {\n return false;\n }\n // Otherwise, This is the next point to visit.\n return true;\n });\n }\n return result;\n}\n\nfunction addLayer(\n grid: LayerGrid,\n rng: PseudorandomStream,\n baroqueness: number,\n layer: number,\n): Point[] {\n return grid.atLayer(layer - 1).flatMap(([x, y]) =>\n NSEW.flatMap(([ox, oy]) => {\n if ((grid.get(x + ox, y + oy) ?? -1) >= 0) {\n return [];\n } else {\n return trail(grid, rng, baroqueness, layer, {\n x: x + ox,\n y: y + oy,\n vx: -oy,\n vy: ox,\n });\n }\n }),\n );\n}\n\nexport default function pearl(\n cavern: PartialPlannedCavern>,\n): PartialPlannedCavern> {\n const plans = cavern.plans.map((plan) => {\n const rng = cavern.dice.pearl(plan.id);\n const grid: LayerGrid = new LayerGrid();\n (plan.kind === \"cave\" ? caveNucleus : hallNucleus)(grid, plan);\n const innerPearl: Point[][] = [grid.map((_, x, y) => [x, y])];\n const outerPearl: Point[][] = [];\n const pearlRadius = plan.architect.roughExtent(plan);\n for (let i = 1; i < pearlRadius; i++) {\n innerPearl.push(addLayer(grid, rng, plan.baroqueness, i));\n }\n if (pearlRadius > 0) {\n innerPearl.push(addLayer(grid, rng, 0, pearlRadius));\n }\n for (let i = 1; i < 4; i++) {\n outerPearl.push(addLayer(grid, rng, 0, i + pearlRadius));\n }\n return { ...plan, innerPearl, outerPearl };\n });\n return { ...cavern, plans };\n}\n","import { tf } from \"../../common/transform\";\nimport negotiate from \"./00_negotiate\";\nimport measure from \"./01_measure\";\nimport flood from \"./02_flood\";\nimport establish from \"./03_establish\";\nimport pearl from \"./04_pearl\";\n\nexport const PLANNING_TF = tf(negotiate)\n .then(measure)\n .then(flood)\n .then(establish)\n .then(pearl);\n","import { PartialPlannedCavern } from \"./00_negotiate\";\nimport { NegotiatedPlan } from \"./00_negotiate\";\n\nexport type MeasuredPlan = NegotiatedPlan & {\n /**\n * If intersects[id] is true, this plan intersects the plan with the given id.\n * Plans do not intersect themselves.\n */\n readonly intersects: readonly true[];\n /** How many layers of different tiles can be added to this Plan? */\n readonly pearlRadius: number;\n readonly perimeter: number;\n};\n\nexport default function measure(\n cavern: PartialPlannedCavern,\n): PartialPlannedCavern {\n const planIdsByBp: number[][] = [];\n cavern.plans.forEach((plan) => {\n plan.path.baseplates.forEach((bp) =>\n (planIdsByBp[bp.id] ||= []).push(plan.id),\n );\n });\n const plans = cavern.plans.map((plan) => {\n const intersects: true[] = [];\n plan.path.baseplates\n .flatMap((bp) => planIdsByBp[bp.id])\n .filter((plid) => plid !== plan.id)\n .forEach((plid) => (intersects[plid] = true));\n\n const pearlRadius = (plan.kind === \"cave\" ? Math.max : Math.min)(\n ...plan.path.baseplates.map((bp) => bp.pearlRadius),\n );\n\n /*\n * For caves, estimate the perimeter to be half the circumference of each\n * end plus twice the length of the path:\n * (2*pi*a.pr) / 2 + (2*pi*b.pr) / 2 + pd * 2\n * pi * (a.pr + b.pr) + 2 * pd\n *\n * For halls, it's just double the length of the hall that isn't part of\n * some cave.\n *\n * This doesn't need to be super accurate because:\n * 1. It's only used as a multiplier for values from context, not any\n * actually important geometry.\n * 2. Later steps are going to make blobby shapes anyway.\n */\n const perimeter = Math.round(\n plan.kind === \"cave\"\n ? Math.PI *\n (Math.min(pearlRadius, plan.path.origin.pearlRadius) +\n Math.min(pearlRadius, plan.path.destination.pearlRadius)) +\n plan.path.snakeDistance * 2\n : 2 * plan.path.exclusiveSnakeDistance,\n );\n return { ...plan, intersects, pearlRadius, perimeter };\n });\n return { ...cavern, plans };\n}\n","import { PartialPlannedCavern } from \"./00_negotiate\";\nimport { FluidType, Tile } from \"../../models/tiles\";\nimport { MeasuredPlan } from \"./01_measure\";\nimport { PseudorandomStream } from \"../../common\";\nimport { pairMap } from \"../../common/utils\";\n\nexport type FloodedPlan = MeasuredPlan & {\n /** What kind of fluid is present in this plan. */\n readonly fluid: FluidType;\n /** Should this plan contain erosion? */\n readonly hasErosion: boolean;\n};\n\ntype Lake = {\n readonly fluid: FluidType;\n readonly skipChance: number;\n remaining: number;\n stack: MeasuredPlan[];\n};\n\nfunction getLakes(\n cavern: PartialPlannedCavern,\n rng: PseudorandomStream,\n): readonly Lake[] {\n const plans = rng.shuffle(\n cavern.plans.filter((plan) => plan.kind === \"cave\"),\n );\n\n const h = (\n fluid: FluidType,\n planCount: number,\n lakeCount: number,\n skipChance: number,\n ) => {\n if (planCount < 1) {\n return [];\n }\n const stops = rng\n .shuffle(new Array(planCount - 1).fill(0).map((_, i) => i + 1))\n .filter((_, i) => i < lakeCount - 1)\n .sort();\n return pairMap([0, ...stops, planCount], (a, b) => ({\n fluid,\n remaining: b - a,\n skipChance,\n stack: [plans.pop()!],\n }));\n };\n\n return [\n ...h(Tile.WATER, cavern.context.waterPlans, cavern.context.waterLakes, 0.2),\n ...h(Tile.LAVA, cavern.context.lavaPlans, cavern.context.lavaLakes, 0.2),\n ];\n}\n\nexport default function flood(\n cavern: PartialPlannedCavern,\n): PartialPlannedCavern {\n const rng = cavern.dice.flood;\n const lakes = getLakes(cavern, rng);\n const fluids: (FluidType | undefined)[] = [];\n const claims: (Lake | \"none\" | \"erosion\" | undefined)[] = [];\n for (const lake of lakes) {\n claims[lake.stack[0].id] = lake;\n }\n let working = true;\n while (working) {\n working = false;\n for (const lake of lakes) {\n if (lake.remaining <= 0 || lake.stack.length === 0) {\n continue;\n }\n const plan = lake.stack.pop()!;\n if (claims[plan.id] !== lake) {\n continue;\n }\n working = true;\n if (lake.stack.length > 0 && rng.chance(lake.skipChance)) {\n lake.stack.unshift(plan);\n continue;\n }\n lake.remaining--;\n fluids[plan.id] = lake.fluid;\n plan.intersects\n .map((_, i) => cavern.plans[i])\n .filter((p) => p.kind !== plan.kind)\n .forEach((p) => {\n if (claims[p.id]) {\n if (claims[p.id] !== lake) {\n claims[p.id] = \"none\";\n }\n } else {\n claims[p.id] = lake;\n lake.stack.push(p);\n }\n });\n }\n }\n const erosion: true[] = [];\n const erodeQueue: MeasuredPlan[] = [\n ...lakes.flatMap((lake) => (lake.fluid === Tile.LAVA ? lake.stack : [])),\n ...fluids.flatMap((f, i) => (f === Tile.LAVA ? [cavern.plans[i]] : [])),\n ];\n for (\n let remaining = cavern.context.erosionPlans;\n remaining >= 0 && erodeQueue.length > 0;\n remaining--\n ) {\n const [plan] = erodeQueue.splice(\n rng.uniformInt({ min: 0, max: erodeQueue.length }),\n 1,\n );\n erosion[plan.id] = true;\n plan.intersects\n .map((_, i) => cavern.plans[i])\n .filter((p) => p.kind !== plan.kind)\n .forEach((p) => {\n if (!claims[p.id]) {\n claims[p.id] = \"erosion\";\n erodeQueue.push(p);\n }\n });\n }\n\n const plans = cavern.plans.map((plan) => ({\n ...plan,\n fluid: fluids[plan.id] ?? null,\n hasErosion: !!erosion[plan.id],\n }));\n return { ...cavern, plans };\n}\n","import { Mutable } from \"../common\";\nimport { NEIGHBORS8 } from \"../common/geometry\";\nimport { Grid, MutableGrid } from \"../common/grid\";\nimport { Tile } from \"./tiles\";\n\nexport type DiscoveryZone = {\n readonly id: number;\n readonly openOnSpawn: boolean;\n};\n\nexport function getDiscoveryZones(tiles: Grid) {\n const result = new MutableGrid>();\n const queue: { x: number; y: number; zone: Mutable | null }[] =\n tiles.map((_, x, y) => ({ x, y, zone: null }));\n let nextZone = 0;\n while (queue.length > 0) {\n let { x, y, zone } = queue.shift()!;\n if (result.get(x, y) === undefined && tiles.get(x, y)?.isWall === false) {\n if (!zone) {\n zone = { id: nextZone++, openOnSpawn: false };\n }\n result.set(x, y, zone);\n const neighbors = NEIGHBORS8.map(([ox, oy]) => ({\n x: x + ox,\n y: y + oy,\n zone,\n }));\n queue.unshift(...neighbors);\n }\n }\n return result;\n}\n","import {\n EAST,\n NORTH,\n NORTH_EAST,\n NORTH_WEST,\n NSEW,\n SOUTH,\n SOUTH_EAST,\n SOUTH_WEST,\n WEST,\n} from \"../../common/geometry\";\nimport { Grid } from \"../../common/grid\";\nimport { Tile } from \"../../models/tiles\";\nimport { RoughPlasticCavern } from \"./01_rough\";\n\nconst HOLE_MAP = [\n [...NORTH, 2],\n [...NORTH_EAST, 1],\n [...EAST, 2],\n [...SOUTH_EAST, 1],\n [...SOUTH, 2],\n [...SOUTH_WEST, 1],\n [...WEST, 2],\n [...NORTH_WEST, 1],\n] as const;\n\nfunction isHole(tiles: Grid, x: number, y: number) {\n let r = 0;\n for (let i = 0; i < HOLE_MAP.length; i++) {\n const [ox, oy, v] = HOLE_MAP[i];\n if (tiles.get(x + ox, y + oy)?.isWall === false) {\n r += v;\n }\n if (r >= 2) {\n return false;\n }\n }\n return true;\n}\n\nexport default function grout(cavern: RoughPlasticCavern): RoughPlasticCavern {\n const tiles = cavern.tiles.copy();\n cavern.tiles.forEach((t, x, y) => {\n if (\n // If the point is surrounded by hard or solid rock, make it hard rock\n t !== Tile.SOLID_ROCK &&\n !NSEW.some(([ox, oy]) => {\n const ot = tiles.get(x + ox, y + oy);\n return ot && ot !== Tile.HARD_ROCK && ot !== Tile.SOLID_ROCK;\n })\n ) {\n tiles.set(x, y, Tile.HARD_ROCK);\n } else if (\n // If the point is not wall and should be, make it dirt\n !t.isWall &&\n isHole(tiles, x, y)\n ) {\n tiles.set(x, y, Tile.DIRT);\n } else if (\n // If the point is fluid and not connected to other fluid, make it floor\n t.isFluid &&\n !NSEW.some(([ox, oy]) => tiles.get(x + ox, y + oy)?.isFluid)\n ) {\n tiles.set(x, y, Tile.FLOOR);\n }\n });\n return { ...cavern, tiles };\n}\n","import { NSEW, Point } from \"../../common/geometry\";\nimport { Tile } from \"../../models/tiles\";\nimport { FinePlasticCavern } from \"./05_fine\";\n\nfunction isInPlay(voidNeighbors: Point[]) {\n if (voidNeighbors.length === 2) {\n const [a, b] = voidNeighbors;\n return a[0] === b[0] || a[1] === b[1];\n }\n return voidNeighbors.length < 2;\n}\n\nexport default function annex(cavern: FinePlasticCavern): FinePlasticCavern {\n const tiles = cavern.tiles.copy();\n const queue = cavern.tiles.flatMap((_, x, y) =>\n NSEW.map(([ox, oy]) => [x + ox, y + oy] as Point),\n );\n while (queue.length) {\n const [x, y] = queue.shift()!;\n if (tiles.get(x, y)) {\n continue;\n }\n const voidNeighbors = NSEW.map(\n ([ox, oy]) => [x + ox, y + oy] as Point,\n ).filter((pos) => !tiles.get(...pos));\n if (isInPlay(voidNeighbors)) {\n // This tile is potentially destroyable.\n tiles.set(x, y, Tile.SOLID_ROCK);\n queue.push(...voidNeighbors);\n }\n }\n return { ...cavern, tiles };\n}\n","import { tf } from \"../../common/transform\";\nimport foundation from \"./00_foundation\";\nimport rough from \"./01_rough\";\nimport brace from \"./02_brace\";\nimport grout from \"./03_grout\";\nimport sand from \"./04_sand\";\nimport fine from \"./05_fine\";\nimport annex from \"./06_annex\";\n\nexport const MASONRY_TF = tf(foundation)\n .then(rough)\n .then(brace)\n .then(grout)\n .then(sand)\n .then(fine)\n .then(annex);\n","import { MutableGrid, Grid } from \"../../common/grid\";\nimport { PlannedCavern } from \"../../models/cavern\";\n\nexport type FoundationPlasticCavern = PlannedCavern & {\n readonly pearlInnerDex: Grid;\n readonly pearlOuterDex: Grid;\n};\n\nexport default function foundation(\n cavern: PlannedCavern,\n): FoundationPlasticCavern {\n const pearlInnerDex = new MutableGrid();\n const pearlOuterDex = new MutableGrid();\n cavern.plans.forEach((plan) => {\n plan.innerPearl.forEach((layer, i) =>\n layer.forEach(([x, y]) => {\n const v = pearlInnerDex.get(x, y) || [];\n v[plan.id] = i;\n pearlInnerDex.set(x, y, v);\n }),\n );\n plan.outerPearl.forEach((layer, i) =>\n layer.forEach(([x, y]) => {\n const v = pearlOuterDex.get(x, y) || [];\n v[plan.id] = i;\n pearlOuterDex.set(x, y, v);\n }),\n );\n });\n return { ...cavern, pearlInnerDex, pearlOuterDex };\n}\n","import { FoundationPlasticCavern } from \"./00_foundation\";\nimport { MutableGrid, Grid } from \"../../common/grid\";\nimport { RoughTile } from \"../../models/tiles\";\n\nexport type RoughPlasticCavern = FoundationPlasticCavern & {\n readonly tiles: Grid;\n};\n\nexport default function rough(\n cavern: FoundationPlasticCavern,\n): RoughPlasticCavern {\n const tiles = new MutableGrid();\n cavern.plans.forEach((plan) => {\n plan.architect.rough({ cavern, plan, tiles });\n });\n return { ...cavern, tiles };\n}\n","import { MutableGrid } from \"../../common/grid\";\nimport { RoughPlasticCavern } from \"./01_rough\";\nimport { Tile } from \"../../models/tiles\";\nimport { Cardinal4, NSEW } from \"../../common/geometry\";\nimport { getDiscoveryZones } from \"../../models/discovery_zone\";\n\nexport default function brace(cavern: RoughPlasticCavern): RoughPlasticCavern {\n const rng = cavern.dice.brace;\n const tiles = cavern.tiles.copy();\n const discoveryZones = getDiscoveryZones(tiles);\n const visited: MutableGrid = new MutableGrid();\n const queue: { x: number; y: number; facing: Cardinal4 | null }[] =\n tiles.flatMap((_, x, y) => [\n { x, y, facing: null },\n ...NSEW.map((f) => ({ x: x + f[0], y: y + f[1], facing: null })),\n ]);\n while (queue.length) {\n const { x, y, facing } = queue.pop()!;\n if (!visited.get(x, y) && (tiles.get(x, y)?.isWall ?? true)) {\n const neighbors = NSEW.map((f) => ({\n x: x + f[0],\n y: y + f[1],\n facing: f,\n }));\n const wallNeighbors = neighbors.filter(\n ({ x, y }) => tiles.get(x, y)?.isWall ?? true,\n );\n\n if (!wallNeighbors.length) {\n const n = rng.uniformChoice(neighbors);\n tiles.set(n.x, n.y, Tile.DIRT);\n wallNeighbors.push(n);\n }\n\n const needsBrace = () => {\n if (wallNeighbors.length === 2) {\n const [a, b] = wallNeighbors;\n return (\n (a.x === b.x || a.y === b.y) &&\n discoveryZones.get(a.x, a.y) === discoveryZones.get(b.x, b.y)\n );\n }\n return wallNeighbors.length < 2;\n };\n\n if (needsBrace()) {\n const [ox, oy] = facing || wallNeighbors[0].facing.map((v) => -v);\n const n = { x: x - oy, y: y + ox, facing: [-oy, ox] as Cardinal4 };\n tiles.set(n.x, n.y, Tile.DIRT);\n wallNeighbors.push(n);\n }\n\n visited.set(x, y, true);\n queue.push(...wallNeighbors.filter(({ x, y }) => tiles.get(x, y)));\n }\n }\n return { ...cavern, tiles };\n}\n","import { NSEW } from \"../../common/geometry\";\nimport { Tile } from \"../../models/tiles\";\nimport { RoughPlasticCavern } from \"./01_rough\";\n\nexport default function sand(cavern: RoughPlasticCavern): RoughPlasticCavern {\n const tiles = cavern.tiles.copy();\n cavern.tiles.forEach((t, x, y) => {\n if (\n // Shave down any hard rock that doesn't border other hard rock\n t === Tile.HARD_ROCK &&\n !NSEW.some(([ox, oy]) => {\n const ot = tiles.get(x + ox, y + oy);\n return !ot || ot === Tile.HARD_ROCK || ot === Tile.SOLID_ROCK;\n })\n ) {\n tiles.set(x, y, Tile.LOOSE_ROCK);\n }\n });\n return { ...cavern, tiles };\n}\n","import { RoughPlasticCavern } from \"./01_rough\";\nimport { MutableGrid, Grid } from \"../../common/grid\";\nimport { Tile } from \"../../models/tiles\";\nimport { Building } from \"../../models/building\";\nimport { Plan } from \"../../models/plan\";\nimport { EntityPosition } from \"../../models/position\";\nimport { AnyMetadata } from \"../../architects\";\n\nexport type FinePlasticCavern = Omit & {\n readonly tiles: Grid;\n readonly crystals: Grid;\n readonly ore: Grid;\n readonly buildings: readonly Building[];\n readonly openCaveFlags: Grid;\n readonly cameraPosition: EntityPosition | undefined;\n};\n\nexport default function fine(cavern: RoughPlasticCavern): FinePlasticCavern {\n let cameraPosition: EntityPosition | undefined = undefined;\n const setCameraPosition = (pos: EntityPosition) => (cameraPosition = pos);\n const diorama = {\n cavern,\n tiles: cavern.tiles.copy(),\n crystals: new MutableGrid(),\n ore: new MutableGrid(),\n buildings: [] as Building[],\n openCaveFlags: new MutableGrid(),\n };\n cavern.plans.forEach((plan: Plan) => {\n const args = { ...diorama, setCameraPosition, plan };\n plan.architect.placeRechargeSeam(args);\n plan.architect.placeBuildings(args);\n plan.architect.placeCrystals(args);\n plan.architect.placeOre(args);\n plan.architect.placeSlugHoles(args);\n });\n return { ...cavern, ...diorama, cameraPosition };\n}\n","import { Point } from \"../common/geometry\";\nimport { Grid } from \"../common/grid\";\nimport { EntityPosition, serializePosition } from \"./position\";\n\nexport type Unique =\n | \"OFFICER\"\n | \"Axle\"\n | \"Bandit\"\n | \"Chief\"\n | \"Docs\"\n | \"Jet\"\n | \"Sparks\";\n\nexport type Loadout =\n | \"Drill\"\n | \"JobExplosivesExpert\"\n | \"JobDriver\"\n | \"JobPilot\"\n | \"JobEngineer\"\n | \"JobGeologist\"\n | \"JobSailor\";\n\nexport type Miner = EntityPosition & {\n readonly id: number;\n readonly essential: boolean;\n readonly level: 1 | 2 | 3 | 4 | 5;\n readonly loadout: readonly Loadout[];\n readonly unique: Unique | null;\n};\n\nexport class MinerFactory {\n private id: number = 0;\n create(\n args: EntityPosition &\n Partial>,\n ): Miner {\n return {\n essential: false,\n level: 1,\n loadout: [\"Drill\"],\n unique: null,\n ...args,\n id: this.id++,\n };\n }\n}\n\nexport function serializeMiner(\n miner: Miner,\n offset: Point,\n heightMap: Grid,\n) {\n return [\n `ID=${miner.id.toFixed()}${miner.unique ? `/${miner.unique}` : \"\"}`,\n serializePosition(miner, offset, heightMap, 0, \"entity\"),\n [...miner.loadout, ...new Array(miner.level - 1).fill(\"Level\")]\n .map((l) => `${l}/`)\n .join(\"\"),\n miner.essential && \"Essential=true\",\n ]\n .filter((n) => n)\n .join(\",\");\n}\n","import { NSEW } from \"../../common/geometry\";\nimport { Grid, MutableGrid } from \"../../common/grid\";\nimport { DiscoveredCavern } from \"./01_discover\";\n\nconst FENCES = [\n [-1, -1],\n [-1, 0],\n [0, -1],\n [0, 0],\n] as const;\n\nexport type StrataformedCavern = DiscoveredCavern & {\n readonly height: Grid;\n};\n\n/**\n * Choose a random target height for each plan.\n */\nfunction getPlanHeight(cavern: DiscoveredCavern): readonly (number | null)[] {\n const heightTargetRange = {\n min: -cavern.context.heightTargetRange,\n max: cavern.context.heightTargetRange,\n };\n\n const queued: true[] = [];\n const result: number[] = [];\n const rng = cavern.dice.height;\n\n const queue = cavern.plans.filter((plan) => !plan.hops.length);\n queue.forEach((plan) => (queued[plan.id] = true));\n while (queue.length) {\n const plan = queue.shift()!;\n const h =\n result[plan.id] ??\n (plan.kind === \"cave\" ? rng.uniformInt(heightTargetRange) : null);\n result[plan.id] = h;\n plan.intersects.forEach((v, i) => {\n const p = cavern.plans[i];\n if (queued[i] || p.kind === plan.kind) {\n return;\n }\n if (plan.fluid || p.fluid) {\n result[i] = h;\n }\n queued[i] = true;\n queue.push(p);\n });\n }\n return result;\n}\n\nfunction getTileHeight(cavern: DiscoveredCavern): Grid {\n const planHeight = getPlanHeight(cavern);\n const fluidOffset = cavern.context.heightTargetRange / -5;\n const result = new MutableGrid();\n for (let x = cavern.left; x < cavern.right; x++) {\n for (let y = cavern.top; y < cavern.bottom; y++) {\n let sum = 0;\n let count = 0;\n let isFluid = !!cavern.tiles.get(x, y)?.isFluid;\n cavern.pearlInnerDex.get(x, y)?.forEach((_, i) => {\n const h = planHeight[i];\n if (h != null) {\n sum += h;\n count++;\n }\n isFluid ||= cavern.plans[i].hasErosion;\n });\n if (count) {\n result.set(x, y, Math.round(sum / count) + (isFluid ? fluidOffset : 0));\n }\n }\n }\n return result;\n}\n\nfunction getCornerHeight(cavern: DiscoveredCavern, tileHeight: Grid) {\n const result = new MutableGrid();\n for (let x = cavern.left; x <= cavern.right; x++) {\n for (let y = cavern.top; y <= cavern.bottom; y++) {\n let sum = 0;\n let count = 0;\n FENCES.forEach(([ox, oy]) => {\n const h = tileHeight.get(x + ox, y + oy);\n if (h !== undefined) {\n sum += h;\n count++;\n }\n });\n if (count) {\n result.set(x, y, sum / count);\n }\n }\n }\n return result;\n}\n\nfunction spread(cavern: DiscoveredCavern, height: Grid) {\n const result = new MutableGrid();\n for (let x = cavern.left + 1; x < cavern.right; x++) {\n for (let y = cavern.top + 1; y < cavern.bottom; y++) {\n const ht = height.get(x, y);\n if (ht) {\n result.set(x, y, ht);\n } else {\n let sum = 0;\n let count = 0;\n NSEW.forEach(([ox, oy]) => {\n const h = height.get(x + ox, y + oy);\n if (h !== undefined) {\n sum += h;\n count++;\n }\n });\n if (count) {\n result.set(x, y, sum / count);\n }\n }\n }\n }\n return result;\n}\n\nexport default function strataform(\n cavern: DiscoveredCavern,\n): StrataformedCavern {\n if (cavern.context.heightTargetRange <= 0) {\n return { ...cavern, height: new MutableGrid() };\n }\n let height = getTileHeight(cavern);\n height = getCornerHeight(cavern, height);\n for (let i = 0; i < cavern.context.stratascosity; i++) {\n height = spread(cavern, height);\n }\n\n return { ...cavern, height };\n}\n","import { Grid, MutableGrid } from \"../../../common/grid\";\nimport { StrataformedCavern } from \"../02_strataform\";\n\ntype Edge = {\n readonly to: readonly [number, number];\n readonly ascent: number;\n readonly descent: number;\n};\n\ntype EdgeData = {\n readonly x1: number;\n readonly y1: number;\n readonly x2: number;\n readonly y2: number;\n forward: number;\n backward: number;\n};\n\nclass EdgeMap {\n private readonly data = new Map<\n `${number},${number},${number},${number}`,\n EdgeData\n >();\n\n get(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n ): { ascent: number; descent: number } | undefined {\n if (x1 < x2 || (x1 === x2 && y1 <= y2)) {\n const r = this.data.get(`${x1},${y1},${x2},${y2}`);\n return r && { ascent: r.forward, descent: r.backward };\n }\n const r = this.data.get(`${x2},${y2},${x1},${y1}`);\n return r && { ascent: r.backward, descent: r.forward };\n }\n set(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n ascent: number,\n descent: number,\n ) {\n if (x1 === x2 && y1 === y2) {\n return;\n }\n if (x1 < x2 || (x1 === x2 && y1 < y2)) {\n const r = this.data.get(`${x1},${y1},${x2},${y2}`);\n if (r) {\n r.forward = Math.min(r.forward, ascent);\n r.backward = Math.min(r.backward, descent);\n } else {\n this.data.set(`${x1},${y1},${x2},${y2}`, {\n x1,\n y1,\n x2,\n y2,\n forward: ascent,\n backward: descent,\n });\n }\n } else {\n const r = this.data.get(`${x2},${y2},${x1},${y1}`);\n if (r) {\n r.forward = Math.min(r.forward, descent);\n r.backward = Math.min(r.backward, ascent);\n } else {\n this.data.set(`${x2},${y2},${x1},${y1}`, {\n x1: x2,\n y1: y2,\n x2: x1,\n y2: y1,\n forward: descent,\n backward: ascent,\n });\n }\n }\n }\n edges(): Grid {\n const result = new MutableGrid();\n function get(x: number, y: number) {\n let r = result.get(x, y);\n if (!r) {\n r = [];\n result.set(x, y, r);\n }\n return r;\n }\n this.data.forEach(({ x1, y1, x2, y2, forward, backward }) => {\n get(x1, y1).push({ to: [x2, y2], ascent: forward, descent: backward });\n get(x2, y2).push({ to: [x1, y1], ascent: backward, descent: forward });\n });\n return result;\n }\n}\n\n// Each tile has a maximum slope its edges are allowed to have.\n// A variety of attributes are allowed to influence this slope, so combine them\n// here into a single grid of max slopes.\nfunction getTileSlopes(cavern: StrataformedCavern): Grid {\n const result = new MutableGrid();\n // The max slope allowed for tile types that are within the play area but\n // don't define a specific slope.\n const planlessSlope = Math.max(\n cavern.context.caveMaxSlope,\n cavern.context.hallMaxSlope,\n );\n const maxSlopeForPlan = cavern.plans.map((plan) =>\n Math.min(\n plan.hasErosion ? 0 : Infinity,\n plan.architect.maxSlope ?? Infinity,\n plan.kind === \"cave\"\n ? cavern.context.caveMaxSlope\n : cavern.context.hallMaxSlope,\n ),\n );\n for (let x = cavern.left; x < cavern.right; x++) {\n for (let y = cavern.top; y < cavern.bottom; y++) {\n let slope = Infinity;\n const tile = cavern.tiles.get(x, y);\n if (tile) {\n // Determine the max slope for the specific tile placed here.\n slope = Math.min(slope, tile.maxSlope ?? Infinity);\n } else {\n // Determine the max slope for this tile in the void.\n if (\n x < cavern.left ||\n x >= cavern.right ||\n y < cavern.top ||\n y >= cavern.bottom\n ) {\n slope = Math.min(slope, cavern.context.borderMaxSlope);\n } else {\n slope = Math.min(slope, cavern.context.voidMaxSlope);\n }\n }\n // Determine the max slope for the plans at this tile.\n slope = Math.min(\n slope,\n cavern.pearlInnerDex\n .get(x, y)\n ?.reduce(\n (r: number | undefined, _, i) =>\n Math.min(r ?? Infinity, maxSlopeForPlan[i]),\n undefined,\n ) ?? planlessSlope,\n );\n result.set(x, y, slope);\n }\n }\n return result;\n}\n\nexport default function getEdgeMap(cavern: StrataformedCavern): EdgeMap {\n const edges = new EdgeMap();\n\n getTileSlopes(cavern).forEach((slope, x1, y1) => {\n const x2 = x1 + 1;\n const y2 = y1 + 1;\n edges.set(x1, y1, x2, y1, slope, slope);\n edges.set(x1, y1, x1, y2, slope, slope);\n edges.set(x2, y1, x2, y2, slope, slope);\n edges.set(x1, y2, x2, y2, slope, slope);\n });\n\n return edges;\n}\n","import { Mutable } from \"../../../common\";\nimport { NSEW, Point } from \"../../../common/geometry\";\nimport { Grid, MutableGrid } from \"../../../common/grid\";\nimport { Tile } from \"../../../models/tiles\";\nimport { StrataformedCavern } from \"../02_strataform\";\nimport { CORNER_OFFSETS, HEIGHT_MAX, HEIGHT_MIN } from \"./base\";\nimport getEdgeMap from \"./edges\";\n\nexport type HeightNode = {\n readonly target: number | undefined;\n readonly neighbors: readonly {\n readonly node: HeightNode;\n // The maximum upward slope moving from here to the neighbor.\n readonly ascent: number;\n // The maximum downward slope moving from here to the neighbor.\n readonly descent: number;\n }[];\n readonly corners: Point[];\n collapseQueued: boolean;\n min: number;\n max: number;\n range: number;\n};\n\nfunction getBowls(cavern: StrataformedCavern) {\n const result = new MutableGrid();\n cavern.tiles.forEach((tile, x, y) => {\n let size;\n if (tile === Tile.WATER) {\n size = 2;\n } else if (tile === Tile.LAVA) {\n size = 2;\n } else if (\n cavern.pearlInnerDex.get(x, y)?.some((_, i) => cavern.plans[i].hasErosion)\n ) {\n size = 0;\n } else {\n return;\n }\n CORNER_OFFSETS.forEach(([ox, oy]) => {\n result.set(\n x + ox,\n y + oy,\n Math.max(size, result.get(x + ox, y + oy) ?? 0),\n );\n });\n });\n return result;\n}\n\nfunction mkNode(cavern: StrataformedCavern, x: number, y: number): HeightNode {\n const target = cavern.height.get(x, y);\n // Corners on the border are adjusted to a height of 0 when loaded in Manic\n // Miners. This means they should be compressed here, but this also gives\n // strataflux a starting point for which corners have known heights.\n const isBorder =\n x === cavern.left ||\n x === cavern.right ||\n y === cavern.top ||\n y === cavern.bottom;\n return {\n target,\n neighbors: [],\n corners: [[x, y]],\n collapseQueued: isBorder,\n min: isBorder ? 0 : HEIGHT_MIN,\n max: isBorder ? 0 : HEIGHT_MAX,\n range: isBorder ? 0 : HEIGHT_MAX - HEIGHT_MIN,\n };\n}\n\nfunction getNodesForBowls(cavern: StrataformedCavern, bowls: Grid) {\n const result = new MutableGrid();\n // oh hey look it's the same algorithm from discovery zones\n const queue: { x: number; y: number; node: HeightNode | null }[] = bowls.map(\n (_, x, y) => ({ x, y, node: null }),\n );\n while (queue.length > 0) {\n let { x, y, node } = queue.shift()!;\n if (!result.get(x, y)) {\n if (!node) {\n node = mkNode(cavern, x, y);\n }\n result.set(x, y, node);\n const neighbors = NSEW.map(([ox, oy]) => ({\n x: x + ox,\n y: y + oy,\n node,\n })).filter(({ x: x2, y: y2 }) => bowls.get(x2, y2));\n queue.unshift(...neighbors);\n }\n }\n return result;\n}\n\nexport default function getNodes(cavern: StrataformedCavern): Grid {\n // First handle \"bowls\" - these are the places that need to be at a lower\n // elevation than their surroundings. Adjacent bowls must be at the same\n // height, so just use the same node for the whole contiguous bowl.\n const bowls = getBowls(cavern);\n const nodes = getNodesForBowls(cavern, bowls);\n\n // Now create the rest of the node objects.\n for (let x = cavern.left; x <= cavern.right; x++) {\n for (let y = cavern.top; y <= cavern.bottom; y++) {\n const node = nodes.get(x, y);\n if (node) {\n node.corners.push([x, y]);\n } else {\n nodes.set(x, y, mkNode(cavern, x, y));\n }\n }\n }\n\n // Get the edge map with tile slopes precomputed.\n const edges = getEdgeMap(cavern);\n\n // Add edges for bowls.\n bowls.forEach((size, x, y) => {\n const s = size + 1;\n for (let ox = -s; ox <= s; ox++) {\n for (let oy = -s; oy <= s; oy++) {\n edges.set(x, y, x + ox, y + oy, Infinity, 0);\n }\n }\n });\n\n // Convert edges to neighbors, linking them together.\n edges.edges().forEach((e, x1, y1) => {\n const node = nodes.get(x1, y1);\n if (node) {\n const neighbors = e\n .map(({ to, ascent, descent }) => ({\n node: nodes.get(...to),\n ascent,\n descent,\n }))\n .filter(({ node: n }) => n && n !== node) as HeightNode[\"neighbors\"];\n (node.neighbors as Mutable).push(...neighbors);\n }\n });\n\n return nodes;\n}\n","import { PseudorandomStream } from \"../../../common\";\nimport { Grid, MutableGrid } from \"../../../common/grid\";\nimport { StrataformedCavern } from \"../02_strataform\";\nimport getNodes, { HeightNode } from \"./nodes\";\n\n// The \"strataflux\" algorithm is particularly complex mostly because it\n// involves many data structures and concepts that are not really used\n// elsewhere. The bulk of the code is simply generating the data structures\n// needed to perform the algorithm, which work as follows:\n//\n// This algorithm deals with Tiles, Corners, and Edges - Tiles meaning the same\n// thing as in the rest of this project and the others defined thusly:\n//\n// EdgeH [x, y] =====v\n// Corner [x, y] => +--------+ <= Corner [x + 1, y]\n// | |\n// EdgeV [x, y] => | Tile | <= EdgeV [x + 1, y]\n// | [x, y] |\n// | |\n// Corner [x, y + 1] => +--------+ <= Corner [x + 1, y + 1]\n// ^===== EdgeH [x, y + 1]\n\n// Superflat: Just return a cavern where all the heights are 0\nfunction superflat(cavern: StrataformedCavern): Grid {\n const result = new MutableGrid();\n for (let x = cavern.left; x <= cavern.right; x++) {\n for (let y = cavern.top; y <= cavern.bottom; y++) {\n result.set(x, y, 0);\n }\n }\n return result;\n}\n\nfunction getRandomHeight(\n node: HeightNode,\n rng: PseudorandomStream,\n strataplanity: number,\n): number {\n if (node.min === node.max) {\n return node.min;\n }\n const targetInRange = (() => {\n if (node.target === undefined) {\n return 0.5;\n }\n if (node.target <= node.min) {\n return 0;\n }\n if (node.target >= node.max) {\n return 1;\n }\n return (node.target - node.min) / (node.max - node.min);\n })();\n return rng.betaInt({\n a: 1 + strataplanity * targetInRange,\n b: 1 + strataplanity * (1 - targetInRange),\n min: node.min,\n max: node.max + 1,\n });\n}\n\nexport default function strataflux(\n cavern: StrataformedCavern,\n): StrataformedCavern {\n // If height is disabled, just return a superflat map.\n if (cavern.context.heightTargetRange <= 0) {\n return { ...cavern, height: superflat(cavern) };\n }\n\n const nodes = getNodes(cavern);\n const height = new MutableGrid();\n const rng = cavern.dice.height;\n\n // The collapse queue is a priority queue. The algorithm will always take the\n // node with the smallest possible range of values.\n const collapseQueue: HeightNode[] = nodes\n .map((c) => c)\n .filter((c) => c.collapseQueued);\n\n const strataplanity = cavern.context.strataplanity;\n\n const pop = () => {\n let r = 0;\n for (let i = 1; i < collapseQueue.length; i++) {\n if (collapseQueue[i].range <= collapseQueue[r].range) {\n r = i;\n }\n }\n return collapseQueue.splice(r, 1)[0];\n };\n\n // Collapsing a node means picking a specific height in range for that node.\n const collapse = () => {\n const node = pop();\n const h = getRandomHeight(node, rng, strataplanity);\n for (let i = 0; i < node.corners.length; i++) {\n height.set(...node.corners[i], h);\n }\n node.min = h;\n node.max = h;\n node.range = 0;\n return node;\n };\n\n // I think this algorithm is like O(n^4) where N is the size of the cavern,\n // so try to save some performance where possible.\n\n while (collapseQueue.length) {\n // Take a node off the collapse queue and collapse it.\n // Then, put it on the spread queue.\n const spreadQueue = [collapse()];\n while (spreadQueue.length) {\n // Take a node off the spread queue.\n const node = spreadQueue.shift()!;\n // Spread to each of this node's neighbors.\n for (let i = 0; i < node.neighbors.length; i++) {\n const neighbor = node.neighbors[i];\n // If the neighbor is already collapsed, nothing to do.\n if (!neighbor.node.range) {\n continue;\n }\n // Pull the neighbor's minimum up and maximum down to fit within the\n // allowed ascent/descent slope for this edge.\n neighbor.node.min = Math.max(\n neighbor.node.min,\n node.min - neighbor.descent,\n );\n neighbor.node.max = Math.min(\n neighbor.node.max,\n node.max + neighbor.ascent,\n );\n const range = neighbor.node.max - neighbor.node.min;\n // If the neighbor's range has shrunk,\n if (range < neighbor.node.range) {\n neighbor.node.range = range;\n // put it on the spread queue\n spreadQueue.push(neighbor.node);\n // and put it on the collapse queue if it wasn't already.\n if (!neighbor.node.collapseQueued) {\n neighbor.node.collapseQueued = true;\n collapseQueue.push(neighbor.node);\n }\n }\n }\n }\n }\n\n return { ...cavern, height };\n}\n","import { tf } from \"../../common/transform\";\nimport discover from \"./01_discover\";\nimport populate from \"./04_populate\";\nimport fence from \"./00_fence\";\nimport strataform from \"./02_strataform\";\nimport strataflux from \"./03_strataflux\";\n\nexport const PLASTIC_TF = tf(fence)\n .then(discover)\n .then(strataform)\n .then(strataflux)\n .then(populate);\n","import { FinePlasticCavern } from \"../02_masonry/05_fine\";\n\nexport type FencedCavern = FinePlasticCavern & {\n left: number;\n top: number;\n right: number;\n bottom: number;\n};\n\nexport default function fence(cavern: FinePlasticCavern): FencedCavern {\n let { left, top, right, bottom } = cavern.tiles.bounds;\n const width = right - left;\n const height = bottom - top;\n const size = Math.max(width, height);\n\n left = left - Math.floor((size - width) / 2) - 1;\n top = top - Math.floor((size - height) / 2) - 1;\n right = left + size + 2;\n bottom = top + size + 2;\n\n return { ...cavern, left, top, right, bottom };\n}\n","import { Grid } from \"../../common/grid\";\nimport { DiscoveryZone, getDiscoveryZones } from \"../../models/discovery_zone\";\nimport { FencedCavern } from \"./00_fence\";\n\nexport type DiscoveredCavern = FencedCavern & {\n readonly discoveryZones: Grid;\n};\n\nexport default function discover(cavern: FencedCavern): DiscoveredCavern {\n const discoveryZones = getDiscoveryZones(cavern.tiles);\n cavern.openCaveFlags.forEach(\n (_, x, y) => (discoveryZones.get(x, y)!.openOnSpawn = true),\n );\n return { ...cavern, discoveryZones };\n}\n","import { MutableGrid, Grid } from \"../../common/grid\";\nimport { Erosion, Landslide } from \"../../models/hazards\";\nimport { Creature, CreatureFactory } from \"../../models/creature\";\nimport { Miner, MinerFactory } from \"../../models/miner\";\nimport { Plan } from \"../../models/plan\";\nimport { Vehicle, VehicleFactory } from \"../../models/vehicle\";\nimport { StrataformedCavern } from \"./02_strataform\";\nimport { EntityPosition } from \"../../models/position\";\nimport { AnyMetadata } from \"../../architects\";\n\nexport type PopulatedCavern = StrataformedCavern & {\n readonly landslides: Grid;\n readonly erosion: Grid;\n readonly creatures: readonly Creature[];\n readonly miners: readonly Miner[];\n readonly vehicles: readonly Vehicle[];\n readonly cameraPosition: EntityPosition;\n};\n\nexport default function populate(cavern: StrataformedCavern): PopulatedCavern {\n let cameraPosition: EntityPosition | undefined = cavern.cameraPosition;\n const setCameraPosition = (pos: EntityPosition) => (cameraPosition = pos);\n const diorama = {\n cavern,\n landslides: new MutableGrid(),\n erosion: new MutableGrid(),\n creatureFactory: new CreatureFactory(),\n creatures: [] as Creature[],\n minerFactory: new MinerFactory(),\n miners: [] as Miner[],\n vehicleFactory: new VehicleFactory(),\n vehicles: [] as Vehicle[],\n };\n cavern.plans.forEach((plan: Plan) => {\n const args = { ...diorama, setCameraPosition, plan };\n plan.architect.placeLandslides(args);\n plan.architect.placeErosion(args);\n plan.architect.placeEntities(args);\n });\n if (!cameraPosition) {\n throw new Error(\n \"No architect set a camera position! The spawn cave was expected to \" +\n \"do this during either the populate or fine step.\",\n );\n }\n return { ...cavern, ...diorama, cameraPosition };\n}\n","import { NSEW, Point } from \"../../common/geometry\";\nimport { Grid, MutableGrid } from \"../../common/grid\";\nimport {\n POWER_STATION,\n SUPPORT_STATION,\n TELEPORT_PAD,\n TOOL_STORE,\n} from \"../../models/building\";\nimport { EntityPosition } from \"../../models/position\";\nimport { Tile } from \"../../models/tiles\";\nimport { PopulatedCavern } from \"../03_plastic/04_populate\";\n\nexport type AeratedCavern = PopulatedCavern & {\n readonly oxygen: null | readonly [number, number];\n readonly aerationLog: null | Grid;\n};\n\nconst MIN_STARTING_AIR = 1000;\nconst MIN_AIR_CAP = 3000;\nconst FALLBACK_AIR = 8000;\nconst AIR_STEP = 250;\n\n// Some timing stats\nconst TIMING = {\n // Time required to walk across 1 tile.\n WALK: 1,\n WALK_ENCUMBERED: 1.6,\n // WALK_RUBBLE: 2.6,\n // WALK_RUBBLE_ENCUMBERED: 3.8,\n DRILL_DIRT: 4,\n DRILL_LOOSE_ROCK: 8,\n DRILL_SEAM: 25,\n CLEAR_RUBBLE: 10,\n // Dynamite is fast but requires an encumbered journey.\n DYNAMITE: 6,\n // Time to kill monsters\n KILL_MONSTER: 20,\n // Time to build each of these assuming resources were already collected.\n BUILD_POWER_PATH: 15,\n BUILD_TELEPORT_PAD: 125,\n BUILD_POWER_STATION: 210,\n BUILD_SUPPORT_STATION: 215,\n} as const satisfies { [key: string]: number };\n\nfunction getOrigin(cavern: PopulatedCavern): Point {\n const entities = [\n ...cavern.buildings.filter((b) => b.template === TOOL_STORE),\n ...cavern.buildings,\n ...cavern.miners,\n ...cavern.vehicles,\n ];\n for (const e of entities) {\n const pos = [Math.floor(e.x), Math.floor(e.y)] as Point;\n if (cavern.discoveryZones.get(...pos)?.openOnSpawn) {\n return pos;\n }\n }\n throw new Error(\"No discovered entities. Is this level even playable?\");\n}\n\nexport default function aerate(cavern: PopulatedCavern): AeratedCavern {\n if (!cavern.context.hasAirLimit) {\n return { ...cavern, oxygen: null, aerationLog: null };\n }\n\n const presentAtSpawn = (e: EntityPosition) =>\n cavern.discoveryZones.get(Math.floor(e.x), Math.floor(e.y))?.openOnSpawn;\n\n const buildings = cavern.buildings.filter(presentAtSpawn);\n const vehicles = cavern.vehicles.filter(presentAtSpawn);\n\n let hasTeleportPad = false;\n let hasPowerStation = false;\n let hasSupportStation = false;\n\n let air = 0;\n let ore = 0;\n let crystals = 0;\n\n const aerationLog = new MutableGrid();\n\n buildings.forEach((b) => {\n hasTeleportPad ||= b.template === TELEPORT_PAD;\n hasPowerStation ||= b.template === POWER_STATION;\n hasSupportStation ||= b.template === SUPPORT_STATION;\n // Any building can be scrapped for crystals.\n crystals += b.template.crystals;\n });\n vehicles.forEach((v) => {\n // Any vehicle can be scrapped for crystals.\n crystals += v.template.crystals;\n });\n\n // Assume the player has to build 2 power paths.\n air += 2 * TIMING.BUILD_POWER_PATH;\n ore -= 4;\n\n // The player needs crystals to build the power and support stations plus\n // one extra for power.\n crystals -= POWER_STATION.crystals + SUPPORT_STATION.crystals + 1;\n\n // The player must build these buildings if not built, and needs ore for them.\n if (!hasTeleportPad) {\n air += TIMING.BUILD_TELEPORT_PAD;\n ore -= 5 + TELEPORT_PAD.ore;\n }\n if (!hasPowerStation) {\n air += TIMING.BUILD_POWER_STATION;\n ore -= 5 + POWER_STATION.ore;\n }\n if (!hasSupportStation) {\n air += TIMING.BUILD_SUPPORT_STATION;\n ore -= 5 + SUPPORT_STATION.ore;\n }\n\n crystals = Math.min(crystals, -1);\n\n const origin = getOrigin(cavern);\n\n function drillTiming(t: Tile) {\n if (t === Tile.DIRT) {\n return TIMING.DRILL_DIRT;\n }\n if (t === Tile.LOOSE_ROCK) {\n return TIMING.DRILL_LOOSE_ROCK;\n }\n if (t === Tile.CRYSTAL_SEAM || t === Tile.ORE_SEAM) {\n return TIMING.DRILL_SEAM;\n }\n return undefined;\n }\n\n {\n const distance = new MutableGrid();\n distance.set(...origin, 0);\n\n const walkQueue: Point[] = [origin];\n const drillQueue: Point[] = [];\n const dynamiteQueue: Point[] = [];\n\n function enqueue(x: number, y: number, d: number) {\n if (distance.get(x, y) === undefined) {\n distance.set(x, y, d);\n const t = cavern.tiles.get(x, y);\n if (t && !t.isFluid) {\n if (!t.isWall) {\n walkQueue.push([x, y]);\n } else if (drillTiming(t)) {\n drillQueue.push([x, y]);\n } else if (t === Tile.HARD_ROCK) {\n dynamiteQueue.push([x, y]);\n }\n }\n }\n }\n\n while (ore < 0 || crystals < 0) {\n if (walkQueue.length) {\n const [x, y] = walkQueue.shift()!;\n aerationLog.set(x, y, true);\n const d = distance.get(x, y)!;\n\n NSEW.forEach(([ox, oy]) => enqueue(x + ox, y + oy, d + 1));\n } else if (drillQueue.length || dynamiteQueue.length) {\n const useDynamite = !drillQueue.length;\n const [x, y] = (useDynamite ? dynamiteQueue : drillQueue).shift()!;\n aerationLog.set(x, y, true);\n const d = distance.get(x, y)!;\n const t = cavern.tiles.get(x, y)!;\n if (useDynamite) {\n // Add the time to walk back and carry dynamite there, and run away\n // while the wall explodes.\n air += d * (TIMING.WALK + TIMING.WALK_ENCUMBERED) + TIMING.DYNAMITE;\n } else {\n // Add the time to drill the wall.\n air += drillTiming(t)!;\n }\n if (ore < 0) {\n const oreYield = t.oreYield + (cavern.ore.get(x, y) ?? 0);\n ore += oreYield;\n air +=\n oreYield * d * (TIMING.WALK + TIMING.WALK_ENCUMBERED) +\n TIMING.CLEAR_RUBBLE;\n }\n if (crystals < 0) {\n const crystalYield =\n t.crystalYield + (cavern.crystals.get(x, y) ?? 0);\n crystals += crystalYield;\n air += crystalYield * d * (TIMING.WALK + TIMING.WALK_ENCUMBERED);\n }\n // If the wall doesn't have any useful resources, don't count the time to walk\n // to it. That will be counted when walls behind it get drilled.\n\n // The wall is now floor, so make it floor.\n walkQueue.push([x, y]);\n } else {\n // Failure mode: This simulation can't figure out how to build a\n // Support Station. Use an arbitrary high air quantity.\n console.log(\"Unable to playtest this level for air consumption.\");\n return { ...cavern, oxygen: [FALLBACK_AIR, FALLBACK_AIR], aerationLog };\n }\n }\n }\n\n const spawn = cavern.plans.find((plan) => !plan.hops.length)!;\n\n if (cavern.context.hasMonsters) {\n air += ((TIMING.KILL_MONSTER * spawn.monsterSpawnRate) / 60) * (air / 5);\n }\n\n // Multiply by safety factor and round up to the nearest 250.\n air *= cavern.context.airSafetyFactor;\n air = Math.max(MIN_STARTING_AIR, Math.ceil(air / AIR_STEP) * AIR_STEP);\n\n // Larger caverns should have more max air, even if the starting air is low.\n const maxAir = Math.max(\n air,\n MIN_AIR_CAP,\n Math.ceil((cavern.context.targetSize * 80) / AIR_STEP) * AIR_STEP,\n );\n\n return { ...cavern, oxygen: [air, maxAir], aerationLog };\n}\n","import { Mutable, PseudorandomStream } from \"../common\";\n\ntype State = { [key: string]: boolean };\ntype FormatVars = { [key: string]: string };\n\nexport type Phrase = {\n readonly id: number;\n readonly text: readonly string[];\n readonly after: Phrase[];\n readonly before: Phrase[];\n readonly requires: (string & keyof T) | \"start\" | \"end\" | null;\n readonly reachableStates: { [key: string]: boolean };\n readonly lane: number;\n};\n\ntype PgNodeArgs = (PgNode | string)[];\n\nclass PgBuilder {\n readonly phrases: Phrase[] = [];\n readonly states = new Set();\n\n phrase(\n text: readonly string[],\n requires?: (string & keyof T) | \"start\" | \"end\",\n ): Phrase {\n const phrase = {\n id: this.phrases.length,\n text: text,\n requires: requires ?? null,\n after: [],\n before: [],\n reachableStates: {},\n lane: -1,\n };\n this.phrases.push(phrase);\n if (requires && requires !== \"start\" && requires !== \"end\") {\n this.states.add(requires);\n }\n return phrase;\n }\n}\n\nfunction join(a: Phrase, b: Phrase) {\n a.after.push(b);\n b.before.push(a);\n}\n\nfunction merge(\n a: readonly Phrase[],\n b: readonly Phrase[],\n): Phrase[] {\n let i = 0;\n let j = 0;\n let r = [];\n while (true) {\n if (i >= a.length) {\n if (j >= b.length) {\n return r;\n }\n r.push(b[j++]);\n } else if (j >= b.length || a[i].id < b[j].id) {\n r.push(a[i++]);\n } else if (a[i].id > b[j].id) {\n r.push(b[j++]);\n } else {\n r.push(a[i++]);\n j++;\n }\n }\n}\n\nclass PgNode {\n private readonly v: PgBuilder;\n private readonly heads: readonly Phrase[];\n private readonly tails: readonly Phrase[];\n private readonly skip: boolean;\n\n constructor(\n v: PgBuilder,\n heads: readonly Phrase[],\n tails: readonly Phrase[],\n skip: boolean,\n ) {\n this.v = v;\n this.heads = heads;\n this.tails = tails;\n this.skip = skip;\n }\n\n static coerce(\n pgBuilder: PgBuilder,\n args: PgNodeArgs,\n ): PgNode {\n const text: string[] = [];\n const nodes: PgNode[] = [];\n for (const arg of args) {\n (arg instanceof PgNode ? nodes : text).push(arg as any);\n }\n if (nodes.length === 0) {\n const p = [pgBuilder.phrase(text)];\n return new PgNode(pgBuilder, p, p, false);\n }\n const heads = nodes.flatMap((n) => n.heads).sort((a, b) => a.id - b.id);\n const tails = nodes.flatMap((n) => n.tails).sort((a, b) => a.id - b.id);\n const skip = nodes.some((n) => n.skip);\n if (text.length > 0) {\n const phrase = pgBuilder.phrase(text);\n heads.push(phrase);\n tails.push(phrase);\n }\n return new PgNode(pgBuilder, heads, tails, skip);\n }\n\n then(...args: PgNodeArgs): PgNode {\n const that = PgNode.coerce(this.v, args);\n for (const t of this.tails) {\n for (const h of that.heads) {\n join(t, h);\n }\n }\n return new PgNode(\n this.v,\n this.skip ? merge(this.heads, that.heads) : this.heads,\n that.skip ? merge(this.tails, that.tails) : that.tails,\n this.skip && that.skip,\n );\n }\n}\n\n/** Assuming the input is a DAG, returns new phrases in a topological order. */\nfunction sort(\n phrases: readonly Phrase[],\n): readonly Phrase[] {\n const newIndex: (number | undefined)[] = [];\n const stack = phrases.filter((phrase) => phrase.before.length === 0);\n const inOrder: Mutable>[] = [];\n\n while (stack.length > 0) {\n const phrase = stack.shift()!;\n if (newIndex[phrase.id] !== undefined) {\n continue;\n }\n const before = phrase.before.filter((b) => !(newIndex[b.id] !== undefined));\n if (before.length > 0) {\n stack.unshift(...before, phrase);\n } else {\n newIndex[phrase.id] = inOrder.length;\n inOrder.push({ ...phrase, id: inOrder.length });\n stack.unshift(...phrase.after);\n }\n }\n\n // inOrder now contains new Phrases with new ids that are copies of the existing\n // phrases, but their after and before values are still pointing to the old ones.\n\n inOrder.forEach((phrase) => {\n phrase.after = phrase.after\n .map((a) => inOrder[newIndex[a.id]!])\n .sort((a, b) => a.id - b.id);\n phrase.before = phrase.before\n .map((b) => inOrder[newIndex[b.id]!])\n .sort((a, b) => a.id - b.id);\n });\n\n return inOrder;\n}\n\n/** Assign phrases to lanes. This serves no purpose other than display. */\nfunction align(phrases: readonly Phrase[]) {\n const stack: Mutable>[] = phrases.filter(\n (node) => node.before.length === 0,\n );\n const occupiedLanes: true[][] = [];\n for (let i = 0; i < phrases.length; i++) {\n occupiedLanes[i] = [];\n }\n\n function findLane(phrase: Phrase): number {\n lane: for (let lane = 0; ; lane++) {\n if (phrase.before.length > 0) {\n for (let i = phrase.before[0].id + 1; i <= phrase.id; i++) {\n if (occupiedLanes[i][lane]) {\n continue lane;\n }\n }\n }\n return lane;\n }\n }\n\n while (stack.length > 0) {\n const phrase = stack.shift()!;\n if (phrase.lane >= 0) {\n continue;\n }\n const lane = findLane(phrase);\n if (phrase.before.length > 0) {\n for (let i = phrase.before[0].id + 1; i < phrase.id; i++) {\n occupiedLanes[i][lane] = true;\n }\n stack.unshift(...phrase.before);\n }\n occupiedLanes[phrase.id][lane] = true;\n phrase.lane = lane;\n stack.unshift(...phrase.after);\n }\n}\n\nfunction getReachableStates(phrase: Phrase) {\n const reachableAfter: { [key: string]: true } = {};\n for (const a of phrase.after) {\n Object.assign(reachableAfter, a.reachableStates);\n }\n\n if (Object.keys(reachableAfter).length === 0) {\n return phrase.requires ? { [phrase.requires]: true } : {};\n }\n\n if (!phrase.requires) {\n return reachableAfter;\n }\n\n const reachable: { [key: string]: true } = {};\n for (const ra in reachableAfter) {\n const states = ra.split(\",\");\n if (!states.some((s) => s === phrase.requires)) {\n states.push(phrase.requires);\n states.sort();\n reachable[states.join(\",\")] = true;\n }\n }\n return reachable;\n}\n\nfunction traverse(phrases: readonly Phrase[]) {\n for (let i = phrases.length - 1; i >= 0; i--) {\n const phrase = phrases[i] as Mutable>;\n phrase.reachableStates = getReachableStates(phrase);\n }\n}\n\nexport type GenerateResult = {\n readonly chosen: readonly {\n readonly phrase: Phrase;\n readonly textIndex: number;\n }[];\n readonly text: string;\n};\n\nconst CAPITALIZE_AFTER = {\n \".\": true,\n \"!\": true,\n \"?\": true,\n \"\\n\": true,\n} as const;\n\nconst NO_SPACE_AFTER = {\n \"\\n\": true,\n} as const;\n\nconst NO_SPACE_BEFORE = {\n \",\": true,\n \".\": true,\n \"!\": true,\n \"?\": true,\n \"\\n\": true,\n} as const;\n\nfunction joinTexts(\n chosen: readonly { readonly phrase: Phrase; readonly textIndex: number }[],\n): string {\n const r: string[] = [];\n let capitalizeNext = true;\n let spaceBeforeNext = false;\n for (const { phrase, textIndex } of chosen) {\n const text = phrase.text[textIndex];\n if (!text) {\n continue;\n }\n if (spaceBeforeNext && !(text.charAt(0) in NO_SPACE_BEFORE)) {\n r.push(\" \");\n }\n if (capitalizeNext) {\n r.push(text[0].toUpperCase());\n r.push(text.slice(1));\n } else {\n r.push(text);\n }\n const endsWith = text.charAt(text.length - 1);\n capitalizeNext = endsWith in CAPITALIZE_AFTER;\n spaceBeforeNext = !(endsWith in NO_SPACE_AFTER);\n }\n return r.join(\"\");\n}\n\nconst format = (text: string, formatVars: FormatVars) =>\n text.replace(/\\$\\{([a-zA-Z0-9_]+)\\}/g, (_, key) => formatVars[key]);\n\nexport class PhraseGraph {\n private start: Phrase;\n readonly phrases: readonly Phrase[];\n readonly states: readonly (string & keyof T)[];\n\n constructor(\n start: Phrase,\n phrases: readonly Phrase[],\n states: readonly (string & keyof T)[],\n ) {\n this.start = start;\n this.phrases = phrases;\n this.states = states;\n }\n\n generate(\n rng: PseudorandomStream,\n requireState: T,\n formatVars: FormatVars,\n ): GenerateResult {\n const states = [...this.states, \"start\", \"end\"];\n const stateRemaining: { [key: string]: boolean } = {\n start: true,\n end: true,\n };\n for (const s of this.states) {\n if (requireState[s]) {\n stateRemaining[s] = true;\n }\n }\n const chosenPhrases: Phrase[] = [this.start];\n while (true) {\n const phrase = chosenPhrases[chosenPhrases.length - 1];\n if (phrase.requires === \"end\") {\n break;\n } else if (phrase.requires) {\n stateRemaining[phrase.requires] = false;\n }\n const reachedState = states\n .filter((s) => stateRemaining[s])\n .sort()\n .join(\",\");\n const continuations = phrase.after.filter(\n (a) => reachedState in a.reachableStates,\n );\n if (continuations.length === 0) {\n console.log(\n \"No continutation has %s at phrase %o\",\n reachedState,\n phrase,\n );\n throw new Error(\n `No continuation has ${reachedState} at phrase ${phrase.id}`,\n );\n }\n chosenPhrases.push(rng.uniformChoice(continuations));\n }\n const chosen = chosenPhrases.map((phrase) => ({\n phrase,\n textIndex:\n phrase.text.length > 0\n ? rng.uniformInt({ max: phrase.text.length })\n : -1,\n }));\n const text = format(joinTexts(chosen), formatVars);\n return { chosen, text };\n }\n}\n\nexport type PgArgs = {\n pg: (...args: PgNodeArgs) => PgNode;\n state: (...args: (string & keyof T)[]) => PgNode;\n start: PgNode;\n end: PgNode;\n cut: PgNode;\n skip: PgNode;\n};\n\nexport default function phraseGraph(\n fn: (args: PgArgs) => void,\n): PhraseGraph {\n const pgBuilder = new PgBuilder();\n\n const pg = (...args: PgNodeArgs): PgNode =>\n PgNode.coerce(pgBuilder, args);\n const state = (...args: (string & keyof T)[]): PgNode => {\n const phrases = args.map((arg) => pgBuilder.phrase([], arg));\n return new PgNode(pgBuilder, phrases, phrases, false);\n };\n const start = new PgNode(\n pgBuilder,\n [],\n [pgBuilder.phrase([], \"start\")],\n false,\n );\n const end = new PgNode(pgBuilder, [pgBuilder.phrase([], \"end\")], [], false);\n const cut = new PgNode(pgBuilder, [], [], false);\n const skip = new PgNode(pgBuilder, [], [], true);\n\n fn({ pg, state, start, end, cut, skip });\n\n const phrases = sort(pgBuilder.phrases);\n align(phrases);\n traverse(phrases);\n const newStart = phrases.find((phrase) => phrase.requires === \"start\")!;\n const states = Array.from(pgBuilder.states.values()).sort();\n\n return new PhraseGraph(newStart, phrases, states);\n}\n\nexport const _forTests = { merge };\n","/* eslint-disable no-template-curly-in-string */\n\nimport phraseGraph, { PgArgs } from \"../builder\";\nimport { State } from \"../lore\";\n\nfunction objectives({\n pg,\n state,\n}: Pick, \"pg\" | \"state\">) {\n const find_lost_miners = pg(\n state(\"lostMinersOne\").then(\"find the lost Rock Raider\"),\n state(\"lostMinersTogether\", \"lostMinersApart\").then(\n \"find the lost Rock Raiders\",\n ),\n );\n\n const get_resources = state(\"resourceObjective\").then(\n \"collect all ${resourceGoal}\",\n \"get the ${resourceGoal} we needed\",\n );\n\n find_lost_miners.then(\"and\").then(get_resources);\n\n return pg(find_lost_miners, get_resources).then();\n}\n\nconst COMMENDATIONS = [\n \"Well done!\",\n \"Good work!\",\n \"Outstanding!\",\n \"I knew you could do it, Cadet!\",\n \"You're very good at this, Cadet!\",\n \"Your efforts have been outstanding!\",\n \"We were right to count on you, Cadet!\",\n] as const;\n\nexport const SUCCESS = phraseGraph(\n ({ pg, state, start, end, cut, skip }) => {\n (() => {\n const commend = state(\"commend\").then(\"Wow!\", ...COMMENDATIONS);\n const hasMonsters = state(\"hasMonsters\").then(\n \"Those ${enemies} were no match for you!\",\n \"You had nothing to fear from those ${enemies}!\",\n );\n const despiteTheOdds = pg(\n \"Despite the odds,\",\n \"In the face of danger,\",\n \"Even with the odds against you,\",\n );\n hasMonsters.then(despiteTheOdds);\n return start\n .then(skip, commend, hasMonsters)\n .then(\n skip,\n state(\"hasMonsters\", \"spawnHasErosion\").then(despiteTheOdds),\n );\n })()\n .then(\"you\")\n .then(\n pg(\"managed to\", \"were able to\")\n .then(objectives({ pg, state }))\n .then(\n \".\",\n state(\"hasMonsters\").then(\"despite that horde of ${enemies}!\"),\n ),\n (() => {\n const foundTheBase = state(\"findHq\").then(\"found the base\");\n const hqIsRuin = state(\"hqIsRuin\").then(\n \"repaired the Rock Raider HQ\",\n \"restored our mining operations\",\n );\n foundTheBase.then(hqIsRuin);\n return pg()\n .then(foundTheBase, hqIsRuin)\n .then(\"and\")\n .then(\n pg(\n state(\"lostMinersOne\").then(\n \"found the lost Rock Raider\",\n \"located the lost Rock Raider\",\n ),\n state(\"lostMinersTogether\", \"lostMinersApart\").then(\n \"found the lost Rock Raiders\",\n \"located the lost Rock Raiders\",\n ),\n ).then(\n \", safe and sound.\",\n \"before anything could happen to them.\",\n state(\"resourceObjective\").then(\n \". You even collected ${resourceGoal}!\",\n \"- and salvaged the operation with those ${resourceGoal}.\",\n \". Collecting ${resourceGoal} was no small feat either!\",\n ),\n ),\n state(\"resourceObjective\").then(\n \"collected ${resourceGoal}.\",\n \"collected all ${resourceGoal}.\",\n \"got all ${resourceGoal}.\",\n ),\n );\n })(),\n )\n .then(\"\\n\\n\")\n .then(\n skip,\n state(\"commend\").then(\n \"Keep up the good work, Cadet!\",\n \"You make this look rather easy, Cadet!\",\n ...COMMENDATIONS,\n ),\n )\n .then(\"Mission Complete!\")\n .then(skip, state(\"hasMonsters\"))\n .then(skip, state(\"spawnHasErosion\"))\n .then(end);\n },\n);\n\nexport const FAILURE = phraseGraph(\n ({ pg, state, start, end, cut, skip }) => {\n start\n .then(skip, \"Oh, dear.\", \"Bad luck!\")\n .then(\n \"You didn't\",\n \"You couldn't\",\n \"You were unable to\",\n \"We were counting on you to\",\n )\n .then(objectives({ pg, state }))\n .then(\".\")\n .then(\n skip,\n \"You must succeed, Cadet!\",\n pg(skip, \"Chin up, Cadet!\").then(\"You'll do better next time.\"),\n )\n .then(\"\\n\\nMission Failed!\")\n .then(end);\n },\n);\n","/* eslint-disable no-template-curly-in-string */\n\nimport { FoundLostMinersState, State } from \"../lore\";\nimport phraseGraph from \"../builder\";\n\nexport const FOUND_HOARD = phraseGraph(\n ({ pg, state, start, end, cut, skip }) => {\n // Assume there is a collect_resources goal, and assume that goal requires\n // collecting crystals. This event will only be triggered if there are enough\n // crystals on the floor to complete the level.\n\n start\n .then(\n \"Wow! This ought to do it!\",\n \"You've found quite the haul here.\",\n \"Our intel was accurate. Look at all those Energy Crystals!\",\n )\n .then(\n pg(\n \"Now, transport these Energy Crystals back to your base.\",\n \"Bring this to your base to complete our mission!\",\n \"Get this back to your base.\",\n ),\n state(\"treasureCaveMany\").then(\n \"With this, we have enough to complete our mission!\",\n \"Collect all the Energy Crystals you've found and complete our mission!\",\n ),\n state(\"hasMonsters\").then(\n \"I hope we can collect these without attracting too much attention.\",\n \"Be careful, Cadet! This is surely enough to attract those ${enemies}.\",\n ),\n )\n .then(state(\"treasureCaveOne\", \"treasureCaveMany\"), skip)\n .then(state(\"hasMonsters\"), skip)\n .then(end);\n },\n);\n\nexport const FOUND_HQ = phraseGraph(\n ({ pg, state, start, end, cut, skip }) => {\n const positive_greeting = start.then(\n \"Our Rock Raider HQ is safe and sound!\",\n \"Way to go, Cadet!\",\n );\n\n const neutral_greeting = start.then(\n \"You found the Rock Raider HQ.\",\n \"There it is!\",\n );\n\n const tail = pg(skip, state(\"resourceObjective\")).then(end);\n\n pg(\n pg(positive_greeting, neutral_greeting).then(\n \"Now, \",\n \"Now you should be able to\",\n ),\n neutral_greeting\n .then(\n state(\"hasMonsters\").then(\n \"Shore up the base defenses\",\n \"Now, get some Electric Fences up\",\n ),\n )\n .then(\n \". We need this base secure if we're going to\",\n \". Once the base is safe,\",\n pg(\n \"before the monsters find it too!\",\n \"and keep it safe from those ${enemies}!\",\n \"and hope those monsters don't cause any more damage!\",\n )\n .then(\n skip,\n state(\"lostMinersOne\", \"lostMinersTogether\", \"lostMinersApart\"),\n )\n .then(tail),\n ),\n ).then(\n pg(\n state(\"lostMinersOne\").then(\"find the lost Rock Raider!\"),\n state(\"lostMinersTogether\", \"lostMinersApart\").then(\n \"find those lost Rock Raiders!\",\n ),\n ).then(tail),\n state(\"resourceObjective\")\n .then(\"collect ${resourceGoal}.\", \"get those ${resourceGoalNamesOnly}.\")\n .then(end),\n );\n },\n);\n\nexport const FOUND_LOST_MINERS = phraseGraph(\n ({ pg, state, start, end, cut, skip }) => {\n start\n .then(\n state(\"foundMinersOne\").then(\n \"Look! It's one of the lost Rock Radiers!\",\n \"You found a lost Rock Raider!\",\n \"You found one of the lost Rock Raiders!\",\n ),\n state(\"foundMinersTogether\").then(\n \"Look at that! ${foundMinersCount} of the lost Rock Raiders are here, safely together.\",\n \"That's ${foundMinersCount} Rock Raiders found!\",\n \"You found ${foundMinersCount} of them here!\",\n ),\n )\n .then(skip, \"Keep going!\", \"Keep searching, Cadet.\")\n .then(\"We need to find all ${lostMinersCount} before we can leave.\")\n .then(end);\n },\n);\n\nexport const FOUND_ALL_LOST_MINERS = phraseGraph(\n ({ pg, state, start, end, cut, skip }) => {\n start\n .then(\n \"And that makes ${lostMinersCount} Rock Raiders found!\",\n \"You found all ${lostMinersCount} Rock Raiders!\",\n \"That's all ${lostMinersCount} Rock Raiders found!\",\n state(\"lostMinersOne\").then(\n \"Look! It's the lost Rock Raider!\",\n \"You found the missing Rock Raider!\",\n ),\n state(\"lostMinersTogether\").then(\n \"The ${lostMinersCount} Rock Raiders are right here, safe and sound!\",\n \"You found all ${lostMinersCount} Rock Raiders!\",\n \"That's all of the missing Rock Raiders found!\",\n ),\n )\n .then(\n skip,\n state(\"resourceObjective\").then(\"Now, collect ${resourceGoal}.\"),\n )\n .then(end);\n },\n);\n\nexport const NOMADS_SETTLED = phraseGraph(\n ({ pg, state, start, end, cut, skip }) => {\n start\n .then(\"This seems like as good a place as any.\", \"Well done, Cadet.\")\n .then(\n state(\"lostMinersOne\")\n .then(skip, state(\"resourceObjective\"))\n .then(\"Now, go find that lost Rock Raider!\"),\n state(\"lostMinersTogether\", \"lostMinersApart\")\n .then(skip, state(\"resourceObjective\"))\n .then(\"Now, go find those lost Rock Raiders!\"),\n state(\"resourceObjective\").then(\n \"Now, collect ${resourceGoal}.\",\n \"Those ${resourceGoalNamesOnly} are as good as ours!\",\n ),\n )\n .then(skip, state(\"hasMonsters\"))\n .then(end);\n\n start\n .then(\"With your base constructed, you should now have no problem\")\n .then(\n state(\"lostMinersOne\")\n .then(skip, state(\"resourceObjective\"))\n .then(\"finding that lost Rock Raider!\"),\n state(\"lostMinersTogether\", \"lostMinersApart\")\n .then(skip, state(\"resourceObjective\"))\n .then(\"finding those lost Rock Raiders!\"),\n state(\"resourceObjective\").then(\"collecting ${resourceGoal}!\"),\n )\n .then(\n skip,\n state(\"hasMonsters\").then(\n skip,\n \"Don't forget to build plenty of Electric Fences in case those \" +\n \"${enemies} come.\",\n \"Just keep an eye out for those ${enemies}.\",\n ),\n )\n .then(end);\n },\n);\n\nexport const FOUND_SLUG_NEST = phraseGraph(\n ({ pg, state, start, end, cut, skip }) => {\n start\n .then(\n \"I don't like the look of this.\",\n \"Look at that!\",\n \"Oh, dear.\",\n \"This could be a problem!\",\n )\n .then(\n \"It must be a nest of Slimy Slugs!\",\n \"We need to keep these Slimy Slugs at bay.\",\n )\n .then(end);\n },\n);\n","import phraseGraph from \"../builder\";\nimport { State } from \"../lore\";\n\nexport const NAME = phraseGraph(\n ({ pg, state, start, end, cut, skip }) => {\n function f({\n rock,\n ice,\n lava,\n mid,\n last,\n }: {\n rock: string[];\n ice?: string[];\n lava?: string[];\n mid?: string[];\n last: string[];\n }) {\n start\n .then(\n state(\"rockBiome\").then(...rock),\n ice ? state(\"iceBiome\").then(...ice) : cut,\n lava ? state(\"lavaBiome\").then(...lava) : cut,\n )\n .then(skip, ...(mid || []))\n .then(...last)\n .then(end);\n }\n\n f({\n rock: [\"Andesite\", \"Anthracite\", \"Argillite\"],\n ice: [\"Arctic\", \"Avalanche\"],\n lava: [\"Asbestos\", \"Ashen\"],\n last: [\"Abyss\", \"Action\", \"Alley\", \"Attack\"],\n });\n\n f({\n rock: [\"Basalt\", \"Basanite\", \"Bauxite\", \"Boulder\", \"Breccia\", \"Bullion\"],\n ice: [\"Blizzard\"],\n last: [\"Balance\", \"Blitz\", \"Breach\", \"Break\", \"Bonanza\", \"Burrow\"],\n });\n\n f({\n rock: [\"Chalk\", \"Claystone\", \"Core\", \"Crystal\"],\n lava: [\"Caldera\", \"Cinder\"],\n last: [\n \"Calamity\",\n \"Caper\",\n \"Cavern\",\n \"Chaos\",\n \"Conflict\",\n \"Conundrum\",\n \"Cruise\",\n ],\n });\n\n f({\n rock: [\"Diamond\", \"Diorite\", \"Dolomite\", \"Dunite\"],\n ice: [\"Drift\"],\n last: [\"Depths\", \"Dash\", \"Descent\", \"Despair\", \"Drive\"],\n });\n\n f({\n rock: [\"Emerald\", \"Evaporite\"],\n lava: [\"Ember\"],\n last: [\"Enigma\", \"Eruption\", \"Excavation\", \"Express\"],\n });\n\n f({\n rock: [\"Fault Line\", \"Fissure\", \"Flint\"],\n ice: [\"Frostbite\", \"Frosty\"],\n last: [\"Folly\", \"Frenzy\", \"Fury\"],\n });\n\n f({\n rock: [\"Gneiss\", \"Granite\", \"Gritstone\", \"Gypsum\"],\n ice: [\"Glacier\"],\n last: [\"Gauntlet\", \"Getaway\"],\n });\n\n f({\n rock: [\"Lapis Lazuli\", \"Laterite\", \"Lignite\", \"Limestone\"],\n lava: [\"Lava\", \"Lava Lake\"],\n last: [\"Labyrinth\", \"Lair\", \"Lure\"],\n });\n\n f({\n rock: [\"Marble\", \"Metamorphic\", \"Mineral\", \"Mudstone\"],\n ice: [\"Mammoth\"],\n lava: [\"Magma\", \"Mantle\", \"Molten\"],\n mid: [\"Mine\", \"Moon\"],\n last: [\"Mayhem\", \"Maze\", \"Meltdown\", \"Menace\", \"Mishap\"],\n });\n\n f({\n rock: [\"Phosphorite\", \"Pumice\"],\n ice: [\"Permafrost\", \"Polar\"],\n lava: [\"Pyroclastic\", \"Pyrolite\"],\n last: [\"Passage\", \"Peril\", \"Pit\", \"Plunge\", \"Puzzle\"],\n });\n\n f({\n rock: [\n \"Sandstone\",\n \"Schist\",\n \"Sedimentary\",\n \"Shale\",\n \"Silica\",\n \"Silt\",\n \"Slate\",\n \"Stalactite\",\n ],\n ice: [\"Snowdrift\", \"Subzero\"],\n mid: [\"Shaft\"],\n last: [\"Scramble\", \"Shock\", \"Showdown\", \"Slide\"],\n });\n\n f({\n rock: [\"Tuff\", \"Turbidite\", \"Twilight\"],\n ice: [\"Taiga\", \"Titanic\", \"Tundra\"],\n mid: [\"Tunnel\"],\n last: [\"Tempest\", \"Terror\", \"Trouble\"],\n });\n },\n);\n","/* eslint-disable no-template-curly-in-string */\n\nimport { State } from \"../lore\";\nimport phraseGraph from \"../builder\";\n\nconst ORDERS = phraseGraph(({ pg, state, start, end, cut, skip }) => {\n const collect_resources = pg(\n \"collect ${resourceGoal}.\",\n \"continue our mining operation by collecting ${resourceGoal}.\",\n );\n\n const we_need = pg(\n \"we need ${resourceGoal}.\",\n \"you need to collect ${resourceGoal}.\",\n );\n\n const tail = pg(\n skip,\n \"Best of luck!\",\n \"Good luck out there!\",\n \"We're counting on you!\",\n ).then(end);\n\n start\n .then(\n state(\"hasMonsters\")\n .then(skip, state(\"hasSlugs\"))\n .then(\n \"defend the Rock Radier HQ\",\n \"build up your defenses\",\n \"arm your Rock Raiders\",\n )\n .then(\"and\"),\n state(\"hasSlugs\")\n .then(\"defend the Rock Radier HQ\", \"arm your Rock Raiders\")\n .then(\"and\"),\n pg(\n skip,\n state(\"spawnHasErosion\").then(\n \"get your Rock Raiders to safety,\",\n \"make sure your Rock Raiders are safe,\",\n ),\n state(\"spawnIsHq\")\n .then(state(\"hqIsRuin\", \"spawnHasErosion\"))\n .then(\"move to a safer cavern,\", \"find a more suitable location,\"),\n )\n .then(\n \"build the Rock Raider HQ\",\n \"build up your base\",\n state(\"spawnIsHq\").then(\n \"send some Rock Raiders down to this base\",\n pg(\"resume mining operations and\")\n .then(collect_resources)\n .then(cut),\n state(\"hqIsRuin\").then(\n \"clean up this mess\",\n \"get the Rock Raider HQ back in operation\",\n ),\n ),\n state(\"findHq\")\n .then(\"reach the Rock Raider HQ\", \"locate the base\")\n .then(\n skip,\n state(\"hqIsRuin\").then(\n \", salvage what's left\",\n \", repair it\",\n \", get it back in working order\",\n ),\n ),\n )\n .then(\n \"and\",\n \"and use it to\",\n \", and when you are ready,\",\n pg(\n state(\"hasMonsters\").then(state(\"hasSlugs\"), skip),\n state(\"hasSlugs\"),\n )\n .then(\"and keep it safe.\", \"and make sure it is heavily defended.\")\n .then(\"Then,\", we_need.then(cut)),\n ),\n )\n .then(\n collect_resources,\n pg(\n \"continue mining operations.\",\n \"explore the cavern.\",\n \"resume our mining operation.\",\n \"search the cavern.\",\n )\n .then(we_need)\n .then(cut),\n pg(\"find\", \"locate\", \"search the cavern for\")\n .then(\n state(\"lostMinersOne\")\n .then(\"the\", \"that\")\n .then(\"lost Rock Raider\", \"missing Rock Raider\"),\n state(\"lostMinersTogether\")\n .then(\"the\", \"that\")\n .then(\n \"cavern with the lost Rock Raiders\",\n \"missing group of Rock Raiders\",\n ),\n state(\"lostMinersApart\")\n .then(\"the\", \"those\")\n .then(\"lost Rock Raiders\", \"missing Rock Raiders\"),\n )\n .then(\".\", state(\"hasMonsters\").then(\"before the ${enemies} do!\"))\n .then(\n tail,\n pg(\n \"Once you've found them,\",\n \"With them safe,\",\n \"When they are safe,\",\n ).then(we_need, collect_resources),\n ),\n );\n\n pg(we_need, collect_resources).then(state(\"resourceObjective\")).then(tail);\n});\n\nexport default ORDERS;\n","/* eslint-disable no-template-curly-in-string */\n\nimport { State } from \"../lore\";\nimport phraseGraph from \"../builder\";\n\nconst PREMISE = phraseGraph(({ pg, state, start, end, cut, skip }) => {\n // Complete, fully-constructed premises in one line.\n start\n .then(\n \"Our mining operations have been going smoothly, and we are ready to \" +\n \"move on to the next cavern.\",\n \"There is nothing out of the ordinary to report today.\",\n \"Things have been quiet and I hope they should remain that way, Cadet!\",\n )\n .then(end);\n\n const greeting = start.then(\n pg(\n \"Are you ready for the next mission?\",\n \"Welcome back, Cadet.\",\n \"I hope you're prepared for this one, Cadet.\",\n \"Up and at 'em, Cadet!\",\n \"Cadet, are you up for some more action?\",\n state(\"floodedWithWater\").then(\n \"Are you ready to set sail?\",\n \"I hope you packed your lifejacket, Cadet.\",\n ),\n state(\"floodedWithLava\").then(\n \"I hope you're not afraid of a little heat!\",\n \"You'd better keep your cool with this one!\",\n ),\n ).then(\"\\n\\n\"),\n skip,\n );\n\n const additionalHardship = (() => {\n const spawnHasErosion = state(\"spawnHasErosion\").then(\n \"we are dangerously close to a cavern full of lava\",\n \"we are concerned about nearby lava flows that could engulf this cavern\",\n \"you will need to keep an eye on the volcanic activity in this cavern to avoid being buried in lava\",\n );\n\n const hasMonstersTexts = pg(\n state(\"hasMonsters\").then(skip, state(\"hasSlugs\")),\n state(\"hasSlugs\"),\n ).then(\n \"the tunnels here are full of large creatures that threaten our operations\",\n \"we are picking up signs of large creatures in the area\",\n \"this cavern is inhabited by nests of ${enemies}\",\n \"we have reason to believe there are dozens of ${enemies} just out of sight\",\n );\n\n spawnHasErosion.then(\", and\").then(hasMonstersTexts);\n return pg(spawnHasErosion, hasMonstersTexts).then(\".\").then(end);\n })();\n\n // Weird case to explain: Find HQ, but the HQ is intact and there are no lost miners.\n // Blame Canada... or bureaucracy.\n greeting\n .then(state(\"findHq\"))\n .then(skip, state(\"spawnHasErosion\"))\n .then(skip, state(\"treasureCaveOne\", \"treasureCaveMany\"))\n .then(skip, state(\"spawnIsNomadOne\", \"spawnIsNomadsTogether\"))\n .then(\n \"A forward team has established Rock Raider HQ in the viscinity, but \" +\n \"we haven't had the means to use it yet.\",\n \"There should be a base near here primed and ready for our mining \" +\n \"operations, but our teleporters are unable to get a lock on it for \" +\n \"some reason.\",\n \"We've had our eyes on this region and were all set to mine here. \" +\n \"Unfortunately, the signed copy of Form 27b-6 went missing below a \" +\n \"desk, we forgot about it, and now we aren't exactly sure where that \" +\n \"base is.\",\n state(\"hasMonsters\")\n .then(skip, state(\"hasSlugs\"))\n .then(\n \"We were all set to mine this cavern, but the team was scared off \" +\n \"by readings of ${enemies} in the area. They left in such a hurry \" +\n \"that they forgot to record where exactly the Rock Raider HQ is.\",\n \"There should be a base near here, but it's not showing up on our \" +\n \"scanners. We hope it hasn't been destroyed by ${enemies}, but to \" +\n \"be safe, we're sending you to a nearby cavern instead.\",\n ),\n state(\"hasSlugs\").then(\n \"We were all set to mine this cavern, but the team was scared off \" +\n \"by a Slimy Slug that suddenly appeared in the middle of our HQ. \" +\n \"They even left without recording their location properly.\",\n \"There should be a base near here, but it's not showing up on our \" +\n \"scanners. Some interference from ${enemies} must have shut off \" +\n \"its location beacon! To be safe, we're sending you to a nearby \" +\n \"cavern instead.\",\n ),\n )\n .then(end);\n\n // Maybe treasure, maybe spawn is HQ.\n greeting\n .then(\n pg(\"A recent scan\", \"Our most recent geological survey\").then(\n \"found\",\n \"has discovered\",\n \"has indicated\",\n ),\n pg(\"We\", \"The scanners\", \"The scanners aboard the L.M.S. Explorer\").then(\n \"have found\",\n \"have located\",\n \"have discovered\",\n ),\n )\n .then(\n state(\"treasureCaveOne\").then(\n \"a large Energy Crystal signature near here\",\n \"a nearby cave with an abundance of Energy Crystals\",\n ),\n state(\"treasureCaveMany\").then(\n \"large deposits of Energy Crystals in this cavern\",\n \"a cave system with an abundance of Energy Crystals\",\n ),\n \"another cavern where we can continue our mining operations\",\n )\n .then(\n pg(\".\").then(end),\n pg(\n \". \\n\\nHowever,\",\n \". \\n\\nUnfortunately,\",\n \". \\n\\nUnfortunately for us,\",\n \". \\n\\nThe bad news?\",\n \". Use caution!\",\n \", but proceed with caution!\\n\\n\",\n \", but this is no walk in the park.\",\n ).then(additionalHardship),\n state(\"spawnIsHq\")\n .then(\n \", and we have established our Rock Raider HQ.\",\n \", and our HQ is ready to go!\",\n )\n .then(\n pg(\n \"\\n\\nHowever,\",\n \"\\n\\nUnfortunately,\",\n \"\\n\\nUnfortunately for us,\",\n \"\\n\\nThe bad news?\",\n \"Don't be fooled, though.\",\n \"I do ask that you be careful down there!\",\n ).then(additionalHardship),\n end,\n ),\n pg(\n state(\"spawnIsNomadOne\").then(\n \". Your mission is to find a suitable location for our Rock Raider \" +\n \"HQ.\",\n ),\n state(\"spawnIsNomadsTogether\").then(\n \". We haven't yet chosen where to establish our base, so I'm \" +\n \"leaving that decision to you.\",\n \", and I've picked this team to decide where to build our HQ.\",\n ),\n )\n .then(\n skip,\n pg(\n state(\"hasMonsters\").then(skip, state(\"hasSlugs\")),\n state(\"hasSlugs\"),\n ).then(\n \"\\n\\nBe on the lookout for ${enemies}, especially once you start \" +\n \"construction.\",\n \"Use caution! There may be ${enemies} afoot and I don't want you \" +\n \"taking any unnecessary risk.\",\n ),\n )\n .then(skip, state(\"spawnHasErosion\"))\n .then(end),\n );\n\n const negativeGreeting = pg(\n greeting,\n start\n .then(\n \"Things have been going smoothly... until now!\",\n \"Bad news, Cadet!\",\n \"We need your help, Cadet.\",\n \"Oh, dear.\",\n )\n .then(\"\\n\\n\"),\n );\n\n const alsoAdditionalHardship = pg(\n \"Also,\",\n \"If that wasn't hard enough,\",\n \"It gets worse:\",\n ).then(additionalHardship);\n\n const findThem = pg(\n \"we're counting on you to find them!\",\n \"we don't know how long they'll last out there.\",\n state(\"hasMonsters\").then(\n \"we need to find them before the ${enemies} do.\",\n \"I hope they don't meet any of the ${enemies} roaming this cavern.\",\n ),\n )\n .then(state(\"spawnHasErosion\"), skip)\n .then(end);\n\n const findTheOthers = pg(\n \"we're counting on you to find the others!\",\n state(\"hasMonsters\").then(\n \"you need to find the others before the ${enemies} do.\",\n ),\n )\n .then(state(\"spawnHasErosion\"), skip)\n .then(end);\n\n // A teleporter accident caused lost miners or nomad spawn.\n // Maybe treasure, maybe find spawn or spawn is HQ.\n negativeGreeting\n .then(state(\"treasureCaveOne\", \"treasureCaveMany\"), skip)\n .then(\n skip,\n state(\"spawnIsHq\", \"findHq\").then(\n \"We established our Rock Raider HQ, but\",\n \"We constructed our base and were ready to begin mining. \" +\n \"Unfortunately,\",\n ),\n )\n .then(\n state(\"spawnIsNomadOne\").then(\n \"a teleporter malfunction sent this Rock Raider to an uncharted cavern.\",\n \"the teleporter on the L.M.S. Explorer has been acting up again and \" +\n \"one of our Rock Raiders is trapped in an uncharted cavern.\",\n \"one of our Rock Raiders was accidentally sent to the wrong cavern!\",\n ),\n state(\"spawnIsNomadsTogether\").then(\n \"a teleporter malfunction sent a group of our Rock Raiders to an \" +\n \"uncharted cavern.\",\n \"the teleporter on the L.M.S. Explorer has been acting up again and \" +\n \"a group of our Rock Raiders ended up in an uncharted cavern.\",\n ),\n pg(\n state(\"lostMinersOne\").then(\n \"a teleporter malfunction sent one of our Rock Raiders to a cavern \" +\n \"near here.\",\n \"the teleporter on the L.M.S. Explorer has been acting up again and \" +\n \"one of our Rock Raiders is trapped in an uncharted cavern.\",\n \"one of our Rock Raiders was accidentally sent to the wrong cavern!\",\n ),\n state(\"lostMinersTogether\").then(\n \"a teleporter malfunction sent a group of our Rock Raiders to a \" +\n \"cavern near here.\",\n \"the teleporter on the L.M.S. Explorer has been acting up again and \" +\n \"a group of our Rock Raiders ended up in an uncharted cavern.\",\n ),\n state(\"lostMinersApart\").then(\n \"a teleporter malfunction scattered ${lostMinersCount} of our Rock \" +\n \"Raiders throughout this cavern.\",\n \"the teleporters have failed again and ${lostMinerCavesCount} \" +\n \"groups of Rock Raiders are lost somewhere in this cavern.\",\n ),\n ).then(skip, findThem.then(cut)),\n state(\"spawnIsNomadOne\", \"spawnIsNomadsTogether\")\n .then(state(\"lostMinersOne\", \"lostMinersTogether\", \"lostMinersApart\"))\n .then(\n \"a teleporter malfunction left our Rock Raiders scattered throughout \" +\n \"this cavern.\",\n )\n .then(skip, findTheOthers.then(cut)),\n )\n .then(\n pg(\n \"Our engineers have assured us the teleporters have been repaired, \" +\n \"but\",\n \"While the teleporters are back in working order,\",\n ).then(additionalHardship),\n alsoAdditionalHardship,\n );\n\n // Earthquakes or raids destroyed HQ.\n // HQ is ruin, maybe treasure, spawn is HQ or find HQ, maybe lost miners.\n negativeGreeting\n .then(state(\"hqIsRuin\"))\n .then(state(\"treasureCaveOne\", \"treasureCaveMany\"), skip)\n .then(state(\"hasSlugs\"), skip)\n .then(\n \"Recent seismic activity has damaged our Rock Raider HQ\",\n \"An earthquake in this area has caused several cave-ins and destroyed \" +\n \"part of our Rock Raider HQ\",\n state(\"hasMonsters\").then(\n \"A horde of ${enemies} attacked our Rock Raider HQ\",\n ),\n )\n .then(\n pg(\", and\")\n .then(skip, state(\"spawnIsHq\", \"findHq\"))\n .then(\n pg(\n state(\"lostMinersOne\").then(\"one of our Rock Raiders is missing.\"),\n state(\"lostMinersTogether\").then(\n \"a group of Rock Raidiers are missing.\",\n \"a group of Rock Raidiers are trapped somewhere in the cavern.\",\n ),\n state(\"lostMinersApart\").then(\n \"some of our Rock Raidiers are missing.\",\n \"our Rock Raiders are trapped throughout the cavern.\",\n ),\n ).then(skip, findThem.then(cut)),\n state(\"spawnIsNomadOne\", \"spawnIsNomadsTogether\")\n .then(\n state(\"lostMinersOne\", \"lostMinersTogether\", \"lostMinersApart\"),\n )\n .then(\n \"our Rock Raiders have been scattered throughout this cavern.\",\n )\n .then(skip, findTheOthers.then(cut)),\n )\n .then(alsoAdditionalHardship, additionalHardship),\n pg(\n \". We were able to evacuate in time\",\n \". All of our Rock Raiders made it out\",\n \". We evacuated the cavern\",\n \". Everyone evacuated safely\",\n )\n .then(\n state(\"findHq\").then(\n \", but this is as close as we can get for now.\",\n \", but without the homing beacon we don't want to risk \" +\n \"teleporting anyone directly inside.\",\n state(\"spawnIsNomadOne\").then(\n \", but we can't get you any closer than this.\",\n \", but we cannot risk teleporting you in any closer than this.\",\n \", and we want you to return to the base and salvage what's \" +\n \"left of it.\",\n ),\n state(\"spawnIsNomadsTogether\").then(\n \", and you'll be leading the salvage team.\",\n \", and this is the team that will restore our operations.\",\n ),\n ),\n state(\"spawnIsHq\").then(\n \", but this is all that's left.\",\n \"and now we need to pick up the pieces and try again.\",\n ),\n )\n .then(additionalHardship, end),\n );\n});\nexport default PREMISE;\n","import phraseGraph from \"../builder\";\nimport { State } from \"../lore\";\n\nexport const SEISMIC_FORESHADOW = phraseGraph(\n ({ pg, state, start, end, cut, skip }) => {\n start\n .then(\"I don't like the look of this.\", \"This could be a problem.\", skip)\n .then(\n \"Our scanners are picking up seismic activity in the area.\",\n \"We're detecting an increase in geological activity nearby.\",\n )\n .then(\n \"Be careful down there!\",\n \"Keep an eye out for anything unusual.\",\n \"Stay sharp and keep your Rock Raiders safe.\",\n )\n .then(end);\n },\n);\n","import { HqMetadata } from \"../architects/established_hq\";\nimport { countLostMiners } from \"../architects/lost_miners\";\nimport { DiceBox, PseudorandomStream } from \"../common\";\nimport { filterTruthy } from \"../common/utils\";\nimport { Plan } from \"../models/plan\";\nimport { FluidType, Tile } from \"../models/tiles\";\nimport { AdjuredCavern } from \"../transformers/04_ephemera/01_adjure\";\nimport { FAILURE, SUCCESS } from \"./graphs/conclusions\";\nimport {\n FOUND_ALL_LOST_MINERS,\n FOUND_HOARD,\n FOUND_HQ,\n FOUND_LOST_MINERS,\n FOUND_SLUG_NEST,\n NOMADS_SETTLED,\n} from \"./graphs/events\";\nimport { NAME } from \"./graphs/names\";\nimport ORDERS from \"./graphs/orders\";\nimport PREMISE from \"./graphs/premise\";\nimport { SEISMIC_FORESHADOW } from \"./graphs/seismic\";\n\nexport type State = {\n readonly floodedWithWater: boolean;\n readonly floodedWithLava: boolean;\n readonly lostMinersOne: boolean;\n readonly lostMinersTogether: boolean;\n readonly lostMinersApart: boolean;\n readonly resourceObjective: boolean;\n readonly hasMonsters: boolean;\n readonly hasSlugs: boolean;\n readonly spawnHasErosion: boolean;\n readonly spawnIsHq: boolean;\n readonly spawnIsNomadOne: boolean;\n readonly spawnIsNomadsTogether: boolean;\n readonly findHq: boolean;\n readonly hqIsRuin: boolean;\n readonly treasureCaveOne: boolean;\n readonly treasureCaveMany: boolean;\n readonly rockBiome: boolean;\n readonly iceBiome: boolean;\n readonly lavaBiome: boolean;\n};\n\nexport type FoundLostMinersState = State & {\n readonly foundMinersOne: boolean;\n readonly foundMinersTogether: boolean;\n};\n\ntype ReplaceStrings = {\n readonly lostMinersCount: string;\n readonly lostMinerCavesCount: string;\n readonly enemies: string;\n readonly resourceGoal: string;\n readonly resourceGoalNamesOnly: string;\n};\n\nenum Die {\n premise = 0,\n orders,\n success,\n failure,\n foundHoard,\n foundHq,\n foundAllLostMiners,\n nomadsSettled,\n foundSlugNest,\n name,\n}\n\nfunction floodedWith(cavern: AdjuredCavern): FluidType {\n let lava = 0;\n let water = 0;\n for (const plan of cavern.plans) {\n if (plan.fluid === Tile.LAVA) {\n lava++;\n } else if (plan.fluid === Tile.WATER) {\n water++;\n }\n }\n if (lava / cavern.plans.length > 0.4) {\n return Tile.LAVA;\n }\n if (water / cavern.plans.length > 0.4) {\n return Tile.WATER;\n }\n return null;\n}\n\nfunction joinHuman(things: string[], conjunction: string = \"and\"): string {\n if (things.length === 0) {\n return \"\";\n }\n if (things.length === 1) {\n return things[0];\n }\n return `${things.slice(0, -1).join(\", \")} ${conjunction} ${things[things.length - 1]}`;\n}\n\nconst ONES = [\n \"one\",\n \"two\",\n \"three\",\n \"four\",\n \"five\",\n \"six\",\n \"seven\",\n \"eight\",\n \"nine\",\n \"ten\",\n \"eleven\",\n \"twelve\",\n \"thirteen\",\n \"fourteen\",\n \"fifteen\",\n \"sixteen\",\n \"seventeen\",\n \"eighteen\",\n \"nineteen\",\n];\nconst TENS = [\n \"twenty\",\n \"thirty\",\n \"forty\",\n \"fifty\",\n \"sixty\",\n \"seventy\",\n \"eighty\",\n \"ninety\",\n];\n\nfunction spellNumber(n: number): string {\n if (n > 999 || n < 0) {\n return n.toString();\n }\n if (n === 0) {\n return \"zero\";\n }\n const result: string[] = [];\n if (n >= 100) {\n result.push(`${spellNumber(Math.floor(n / 100))} hundred`);\n n %= 100;\n }\n if (n >= 20) {\n result.push(TENS[Math.floor(n / 10) - 2]);\n n %= 10;\n }\n if (n > 0) {\n result.push(ONES[n - 1]);\n n = 0;\n }\n return result.join(\" \");\n}\n\nfunction spellResourceGoal(cavern: AdjuredCavern) {\n const a = [\n { count: cavern.objectives.crystals, name: \"Energy Crystals\" },\n { count: cavern.objectives.ore, name: \"Ore\" },\n { count: cavern.objectives.studs, name: \"Building Studs\" },\n ].filter(({ count }) => count > 0);\n return {\n resourceGoal: joinHuman(\n a.map(({ count, name }) => `${spellNumber(count)} ${name}`),\n ),\n resourceGoalNamesOnly: joinHuman(a.map(({ name }) => name)),\n };\n}\n\nexport class Lore {\n readonly state: State;\n readonly vars: ReplaceStrings;\n constructor(cavern: AdjuredCavern) {\n const fluidType = floodedWith(cavern);\n\n const { lostMiners, lostMinerCaves } = countLostMiners(cavern);\n\n const spawn = cavern.plans.find((p) => !p.hops.length)!;\n\n const hq = cavern.plans.find(\n (p) => p.metadata?.tag === \"hq\",\n ) as Plan;\n const spawnIsHq = spawn === hq;\n const findHq = !!hq && !spawnIsHq;\n const hqIsRuin = !!hq?.metadata.ruin;\n\n const nomads =\n spawn.metadata?.tag === \"nomads\"\n ? (spawn.metadata.minersCount as number)\n : 0;\n\n const treasures = cavern.plans.reduce(\n (r, plan) => (plan.metadata?.tag === \"treasure\" ? r + 1 : r),\n 0,\n );\n\n this.state = {\n floodedWithWater: fluidType === Tile.WATER,\n floodedWithLava: fluidType === Tile.LAVA,\n lostMinersOne: lostMiners === 1,\n lostMinersTogether: lostMiners > 1 && lostMinerCaves === 1,\n lostMinersApart: lostMinerCaves > 1,\n resourceObjective:\n cavern.objectives.crystals > 0 ||\n cavern.objectives.ore > 0 ||\n cavern.objectives.studs > 0,\n hasMonsters: cavern.context.hasMonsters,\n hasSlugs: cavern.context.hasSlugs,\n spawnHasErosion: spawn.hasErosion,\n spawnIsHq,\n findHq,\n hqIsRuin,\n spawnIsNomadOne: nomads === 1,\n spawnIsNomadsTogether: nomads > 1,\n treasureCaveOne: treasures === 1,\n treasureCaveMany: treasures > 1,\n rockBiome: cavern.context.biome === \"rock\",\n iceBiome: cavern.context.biome === \"ice\",\n lavaBiome: cavern.context.biome === \"lava\",\n };\n\n const enemies = filterTruthy([\n cavern.context.hasMonsters &&\n {\n rock: \"Rock Monsters\",\n ice: \"Ice Monsters\",\n lava: \"Lava Monsters\",\n }[cavern.context.biome],\n cavern.context.hasSlugs && \"Slimy Slugs\",\n ]).join(\" and \");\n\n this.vars = {\n enemies,\n lostMinersCount: spellNumber(lostMiners),\n lostMinerCavesCount: spellNumber(lostMinerCaves),\n ...spellResourceGoal(cavern),\n };\n }\n\n briefings(dice: DiceBox) {\n return {\n name: NAME.generate(dice.lore(Die.name), this.state, this.vars),\n premise: PREMISE.generate(dice.lore(Die.premise), this.state, this.vars),\n orders: ORDERS.generate(dice.lore(Die.orders), this.state, this.vars),\n success: SUCCESS.generate(\n dice.lore(Die.success),\n { ...this.state, commend: true },\n this.vars,\n ),\n failure: FAILURE.generate(dice.lore(Die.failure), this.state, this.vars),\n };\n }\n\n foundHoard(dice: DiceBox) {\n return FOUND_HOARD.generate(\n dice.lore(Die.foundHoard),\n this.state,\n this.vars,\n );\n }\n\n foundHq(dice: DiceBox) {\n return FOUND_HQ.generate(dice.lore(Die.foundHq), this.state, this.vars);\n }\n\n foundLostMiners(rng: PseudorandomStream, foundMinersCount: number) {\n return FOUND_LOST_MINERS.generate(\n rng,\n {\n ...this.state,\n foundMinersOne: foundMinersCount <= 1,\n foundMinersTogether: foundMinersCount > 1,\n },\n {\n ...this.vars,\n foundMinersCount: foundMinersCount.toFixed(),\n },\n );\n }\n\n foundAllLostMiners(dice: DiceBox) {\n return FOUND_ALL_LOST_MINERS.generate(\n dice.lore(Die.foundAllLostMiners),\n this.state,\n this.vars,\n );\n }\n\n nomadsSettled(dice: DiceBox) {\n return NOMADS_SETTLED.generate(\n dice.lore(Die.nomadsSettled),\n this.state,\n this.vars,\n );\n }\n\n generateFoundSlugNest(dice: DiceBox) {\n return FOUND_SLUG_NEST.generate(\n dice.lore(Die.foundSlugNest),\n this.state,\n this.vars,\n );\n }\n\n generateSeismicForeshadow(rng: PseudorandomStream) {\n return SEISMIC_FORESHADOW.generate(rng, this.state, this.vars);\n }\n}\n","import { CavernContext } from \"../../common\";\nimport { Lore } from \"../../lore/lore\";\nimport { AdjuredCavern } from \"./01_adjure\";\n\nexport type EnscribedCavern = AdjuredCavern & {\n fileName: string;\n lore: Lore;\n levelName: string;\n briefing: {\n intro: string;\n success: string;\n failure: string;\n };\n};\n\nconst OVERRIDE_SUFFIXES = [\n \"Ablated\",\n \"Boosted\",\n \"Chief's Version\",\n \"Chrome Edition\",\n \"Diamond Edition\",\n \"Director's Cut\",\n \"Emerald Edition\",\n \"Enhanced\",\n \"Extended\",\n \"Gold Edition\",\n \"HD\",\n \"HD 1.5 Remix\",\n \"Millenium Edition\",\n \"Planet U Remix\",\n \"Platinum Edition\",\n \"Rebirthed\",\n \"Reborn\",\n \"Recoded\",\n \"Rectified\",\n \"Recycled\",\n \"Redux\",\n \"Reimagined\",\n \"Reloaded\",\n \"Remixed\",\n \"Ressurection\",\n \"Retooled\",\n \"Revenant\",\n \"Revolutions\",\n \"Ruby Edition\",\n \"Sapphire Edition\",\n \"Silver Edition\",\n \"Special Edition\",\n \"Ungrounded\",\n \"Unleashed\",\n \"Unlocked\",\n \"Unplugged\",\n \"Uranium Edition\",\n];\n\nfunction overrideSuffix(context: CavernContext) {\n const s = [...context.overrides]\n .sort()\n .map((k) => `${k}:${JSON.stringify(context[k])}`)\n .join(\",\");\n // https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript\n let v = 0;\n for (let i = 0; i < s.length; i++) {\n v = (v << 5) - v + s.charCodeAt(i);\n v |= 0;\n }\n v = Math.abs(v) % OVERRIDE_SUFFIXES.length;\n return OVERRIDE_SUFFIXES[v];\n}\n\nexport default function enscribe(cavern: AdjuredCavern): EnscribedCavern {\n const hasOverrides = cavern.context.overrides.length;\n\n const fileName = (() => {\n const seed = cavern.context.seed.toString(16).padStart(8, \"0\");\n return [\n \"gh\",\n seed.substring(0, 3),\n seed.substring(3, 6),\n [\n seed.substring(6),\n { rock: \"k\", ice: \"e\", lava: \"a\" }[cavern.context.biome],\n hasOverrides ? \"x\" : \"\",\n ].join(\"\"),\n ].join(\"-\");\n })();\n\n const lore = new Lore(cavern);\n const { name, premise, orders, success, failure } = lore.briefings(\n cavern.dice,\n );\n const levelName = hasOverrides\n ? `${name.text} (${overrideSuffix(cavern.context)})`\n : name.text;\n const briefing = {\n intro: `${premise.text}\\n\\n${orders.text}`,\n success: success.text,\n failure: failure.text,\n };\n return { ...cavern, fileName, lore, levelName, briefing };\n}\n","import { Point } from \"../../common/geometry\";\nimport { Grid } from \"../../common/grid\";\nimport { serializeBuilding } from \"../../models/building\";\nimport { serializeCreature } from \"../../models/creature\";\nimport { Erosion, Landslide } from \"../../models/hazards\";\nimport { serializeMiner } from \"../../models/miner\";\nimport { serializeObjectives } from \"../../models/objectives\";\nimport { serializePosition } from \"../../models/position\";\nimport { Tile } from \"../../models/tiles\";\nimport { serializeVehicle } from \"../../models/vehicle\";\nimport { ProgrammedCavern } from \"./03_program\";\n\nexport type SerializedCavern = ProgrammedCavern & {\n serialized: string;\n};\n\n// If any of these are found in the level output, assume JavaScript did\n// something stupid and throw an error.\nconst RESTRICTED_STRINGS = [\"[object Object]\", \"undefined\", \"NaN\"] as const;\n\nfunction indent(it: string, prefix: string) {\n return it\n .split(/\\r?\\n/)\n .map((line) => `${prefix}${line}`)\n .join(\"\\n\");\n}\n\nfunction comments(cavern: ProgrammedCavern) {\n return `Cavern generated by groundHog v${process.env.REACT_APP_VERSION}\nhttps://github.com/charredUtensil/groundhog\ncontext = ${JSON.stringify(cavern.context, null, 2)}`;\n}\n\n/**\n * Coordinate data for anything that uses 'x,y/' or 'y,x/' format.\n * Unfortunately, MM is inconsistent and uses both.\n */\nfunction pointSet(points: Point[], [ox, oy]: Point, mode: \"xy\" | \"yx\"): string {\n return points\n .map(([x, y]) => {\n const xs = (x + ox).toFixed();\n const ys = (y + oy).toFixed();\n return mode === \"xy\" ? `${xs},${ys}/` : `${ys},${xs}/`;\n })\n .join();\n}\n\nfunction grid(\n cavern: ProgrammedCavern,\n fencepost: 0 | 1,\n fn: (x: number, y: number) => string,\n): string {\n const result: string[] = [];\n for (let y = cavern.top; y < cavern.bottom + fencepost; y++) {\n const row: string[] = [];\n for (let x = cavern.left; x < cavern.right + fencepost; x++) {\n row.push(`${fn(x, y)},`);\n }\n result.push(row.join(\"\"));\n }\n return result.join(\"\\n\");\n}\n\nexport function serializeHazards(\n hazards: Grid,\n offset: Point,\n): string {\n const out = new Map();\n hazards.forEach((h, x, y) => {\n const key = h.key;\n if (out.has(key)) {\n out.get(key)!.push([x, y]);\n } else {\n out.set(key, [[x, y]]);\n }\n });\n return Array.from(out.entries())\n .sort(([a], [b]) => parseInt(b) - parseInt(a))\n .map(([key, points]) => `${key}:${pointSet(points, offset, \"xy\")}`)\n .join(\"\\n\");\n}\n\nfunction performErrorChecking(serialized: string) {\n serialized.split(\"\\n\").forEach((line, i) => {\n RESTRICTED_STRINGS.forEach((restricted) => {\n if (line.includes(restricted)) {\n throw new Error(\n `Found restricted string ${JSON.stringify(restricted)} on line ${i}:\\n${line}`,\n );\n }\n });\n });\n}\n\nexport default function serialize(cavern: ProgrammedCavern): SerializedCavern {\n const offset: Point = [-cavern.left, -cavern.top];\n\n const serialized = `comments{\n${indent(comments(cavern), \" \")}\n}\ninfo{\nrowcount:${(cavern.right - cavern.left).toFixed()}\ncolcount:${(cavern.bottom - cavern.top).toFixed()}\ncamerapos:${serializePosition(cavern.cameraPosition, offset, cavern.height, 0, \"entity\")}\nbiome:${cavern.context.biome}\ncreator:groundHog\nlevelname:${cavern.levelName}\nopencaves:${pointSet(\n cavern.openCaveFlags.map((_, x, y) => [x, y]),\n offset,\n \"yx\",\n )}\n${cavern.oxygen ? `oxygen:${cavern.oxygen.join(\"/\")}` : \"\"}\nspiderrate:10\nspidermin:2\nspidermax:4\n${\n // Version is the version of MM the level was \"made by\".\n (() => \"version:2023-08-14-1\")()\n}\n}\ntiles{\n${grid(cavern, 0, (x, y) => {\n const tile = cavern.tiles.get(x, y) ?? Tile.SOLID_ROCK;\n const offset =\n !tile.isWall && !cavern.discoveryZones.get(x, y)?.openOnSpawn ? 100 : 0;\n return (tile.id + offset).toFixed();\n})}\n}\nheight{\n${grid(cavern, 1, (x, y) => cavern.height.get(x, y)!.toFixed())}\n}\nresources{\ncrystals:\n${grid(cavern, 0, (x, y) => (cavern.crystals.get(x, y) ?? 0).toFixed())}\nore:\n${grid(cavern, 0, (x, y) => (cavern.ore.get(x, y) ?? 0).toFixed())}\n}\nobjectives{\n${serializeObjectives(cavern.objectives)}\n}\nbuildings{\n${cavern.buildings.map((b) => serializeBuilding(b, offset, cavern.height)).join(\"\\n\")}\n}\nlandslidefrequency{\n${serializeHazards(cavern.landslides, offset)}\n}\nlavaspread{\n${serializeHazards(cavern.erosion, offset)}\n}\ncreatures{\n${cavern.creatures.map((c) => serializeCreature(c, offset, cavern.height)).join(\"\\n\")}\n}\nminers{\n${cavern.miners.map((m) => serializeMiner(m, offset, cavern.height)).join(\"\\n\")}\n}\nvehicles{\n${cavern.vehicles.map((v) => serializeVehicle(v, offset, cavern.height)).join(\"\\n\")}\n}\nbriefing{\n${cavern.briefing.intro}\n}\nbriefingsuccess{\n${cavern.briefing.success}\n}\nbriefingfailure{\n${cavern.briefing.failure}\n}\nblocks{\n}\nscript{\n${\n // Script is done after fence, so it doesn't need any offsetting.\n cavern.script\n}\n\n}`;\n\n performErrorChecking(serialized);\n return { ...cavern, serialized };\n}\n","import { tf } from \"../../common/transform\";\nimport adjure from \"./01_adjure\";\nimport aerate from \"./00_aerate\";\nimport enscribe from \"./02_enscribe\";\nimport program from \"./03_program\";\nimport serialize from \"./04_serialize\";\n\nexport const EPHEMERA_TF = tf(aerate)\n .then(adjure)\n .then(enscribe)\n .then(program)\n .then(serialize);\n","import { getTotalCrystals } from \"../../architects/utils/resources\";\nimport { Architect } from \"../../models/architect\";\nimport { Objectives } from \"../../models/objectives\";\nimport { AeratedCavern } from \"./00_aerate\";\n\nexport type AdjuredCavern = AeratedCavern & {\n objectives: Objectives;\n};\n\nexport default function adjure(cavern: AeratedCavern): AdjuredCavern {\n const objectives = cavern.plans\n .reduce((r: Architect[\"objectives\"][], plan) => {\n const fn = plan.architect.objectives;\n if (!r.some((f) => Object.is(fn, f))) {\n r.push(fn);\n }\n return r;\n }, [])\n .map((fn) => fn({ cavern }))\n .reduce(\n (r: Objectives & { sufficient: boolean }, obj) => ({\n crystals: Math.max(r.crystals ?? 0, obj?.crystals ?? 0),\n ore: Math.max(r.ore ?? 0, obj?.ore ?? 0),\n studs: Math.max(r.studs ?? 0, obj?.studs ?? 0),\n variables: [...r.variables, ...(obj?.variables ?? [])],\n sufficient: !!(r.sufficient || obj?.sufficient),\n }),\n {\n crystals: 0,\n ore: 0,\n studs: 0,\n variables: [],\n sufficient: false,\n },\n );\n // If no architects produced sufficient objectives, use crystal goal ratio.\n if (!objectives.sufficient) {\n objectives.crystals = Math.max(\n objectives.crystals,\n Math.floor(\n (getTotalCrystals(cavern) * cavern.context.crystalGoalRatio) / 5,\n ) * 5,\n );\n }\n return { ...cavern, objectives };\n}\n","import { filterTruthy } from \"../../common/utils\";\nimport { Architect } from \"../../models/architect\";\nimport { EnscribedCavern } from \"./02_enscribe\";\n\nexport type ProgrammedCavern = EnscribedCavern & {\n readonly script: string;\n};\n\nexport default function program(cavern: EnscribedCavern): ProgrammedCavern {\n // All unique globals function objects\n const globalsFns = Array.from(\n cavern.plans.reduce((r: Architect[\"scriptGlobals\"][], plan) => {\n const fn = plan.architect.scriptGlobals;\n if (!r.some((f) => Object.is(fn, f))) {\n r.push(fn);\n }\n return r;\n }, []),\n );\n const archGlobals = filterTruthy(globalsFns.map((fn) => fn({ cavern })));\n const archScripts = filterTruthy(\n cavern.plans.map((plan) => plan.architect.script({ cavern, plan })),\n );\n const monsters = cavern.context.hasMonsters\n ? filterTruthy(\n cavern.plans.map((plan) =>\n plan.architect.monsterSpawnScript({ cavern, plan }),\n ),\n )\n : [];\n const slugs = cavern.context.hasSlugs\n ? filterTruthy(\n cavern.plans.map((plan) =>\n plan.architect.slugSpawnScript({ cavern, plan }),\n ),\n )\n : [];\n const na = [\"# n/a\", \"\"];\n const script = [\n \"# I. Architect Globals\",\n ...(archGlobals.length ? archGlobals : na),\n \"# II. Architect Scripts\",\n ...(archScripts.length ? archScripts : na),\n \"# III. Spawn Monsters\",\n ...(monsters.length ? monsters : na),\n \"# IV. Spawn Slugs\",\n ...(slugs.length ? slugs : na),\n ].join(\"\\n\");\n\n return { ...cavern, script };\n}\n","export type Objectives = {\n readonly crystals: number;\n readonly ore: number;\n readonly studs: number;\n readonly variables: readonly {\n readonly condition: string;\n readonly description: string;\n }[];\n};\n\nexport function serializeObjectives({\n crystals,\n ore,\n studs,\n variables,\n}: Objectives): string {\n const result = variables.map(\n ({ condition, description }) => `variable:${condition}/${description}`,\n );\n if (crystals || ore || studs) {\n result.push(\n `resources: ${crystals.toFixed()},${ore.toFixed()},${studs.toFixed()}`,\n );\n }\n return result.join(\"\\n\");\n}\n","import { OUTLINE_TF } from \"./00_outlines\";\nimport { PLANNING_TF } from \"./01_planning\";\nimport { MASONRY_TF } from \"./02_masonry\";\nimport { PLASTIC_TF } from \"./03_plastic\";\nimport { EPHEMERA_TF } from \"./04_ephemera\";\n\nexport const CAVERN_TF = OUTLINE_TF.chain(PLANNING_TF)\n .chain(MASONRY_TF)\n .chain(PLASTIC_TF)\n .chain(EPHEMERA_TF);\n","// extracted by mini-css-extract-plugin\nexport default {\"popoverWrapper\":\"styles_popoverWrapper__re-vG\",\"subhead\":\"styles_subhead__tl6JE\",\"lore\":\"styles_lore__aBk0G\",\"error\":\"styles_error__o6NAs\",\"message\":\"styles_message__dHlbe\",\"stack\":\"styles_stack__6jNum\",\"context\":\"styles_context__tmsQi\"};","import React, { Fragment } from \"react\";\nimport styles from \"./styles.module.scss\";\nimport { Cavern } from \"../../../core/models/cavern\";\n\nexport default function LorePreview({\n fileName,\n levelName,\n briefing,\n script,\n}: Pick) {\n const scriptStrings = script\n ?.split(\"\\n\")\n .map((s) =>\n s.match(\n /^string\\s+(?[a-zA-Z_][a-zA-Z0-9_]*)\\s*=\\s*\"(?.*)\"$/,\n ),\n );\n if (!(briefing || script)) {\n return null;\n }\n return (\n
\n
\n

{levelName}

\n

Briefing

\n

Introduction

\n

{briefing?.intro}

\n

Success

\n

{briefing?.success}

\n

Failure

\n

{briefing?.failure}

\n {scriptStrings &&

Scripted Events

}\n {scriptStrings?.map((m) => {\n if (!m) {\n return null;\n }\n const { name, value } = m.groups!;\n return (\n \n

{name}

\n

{value}

\n
\n );\n })}\n
\n
\n );\n}\n","import React from \"react\";\nimport styles from \"./styles.module.scss\";\n\nconst About = () => (\n
\n
\n

groundHog v{process.env.REACT_APP_VERSION}

\n

By Christopher Dollard (aka charredUtensil)

\n

\n See{\" \"}\n \n documentation\n {\" \"}\n and{\" \"}\n \n report issues\n {\" \"}\n on GitHub.\n

\n

\n LEGO® is a trademark of the LEGO Group of companies which does not\n sponsor, authorize or endorse this site.\n

\n
\n
\n);\nexport default About;\n","// extracted by mini-css-extract-plugin\nexport default {\"App\":\"App_App__HX9JK\",\"iceBiome\":\"App_iceBiome__TxzIK\",\"lavaBiome\":\"App_lavaBiome__Je2vq\",\"settingsPanel\":\"App_settingsPanel__5OsgF\",\"mainPanel\":\"App_mainPanel__vxyPC\",\"grid\":\"App_grid__p-lsE\",\"scan-scrim\":\"App_scan-scrim__73gMX\",\"loading\":\"App_loading__XtoTg\",\"hasError\":\"App_hasError__ajbuN\",\"stepName\":\"App_stepName__nVlPC\",\"progressBar\":\"App_progressBar__ABZI2\",\"complete\":\"App_complete__bL2eM\",\"controls\":\"App_controls__arkPS\",\"button\":\"App_button__nYXNW\",\"disabled\":\"App_disabled__fR4wn\",\"vizOptsPanel\":\"App_vizOptsPanel__EvGsa\",\"active\":\"App_active__57U0p\"};","import React, { useState } from \"react\";\nimport styles from \"./styles.module.scss\";\nimport { CavernContext } from \"../../../core/common\";\n\nconst GITHUB_ISSUE = \"https://github.com/charredUtensil/groundhog/issues/new\";\n\nexport default function ErrorPreview({\n error,\n context,\n}: {\n error: Error;\n context: CavernContext | undefined;\n}) {\n const [show, setShow] = useState(true);\n const [wasCopied, setWasCopied] = useState(false);\n if (!show) {\n return null;\n }\n const debugInfo = [\n `error: ${error.message}`,\n `groundHog version: ${process.env.REACT_APP_VERSION}`,\n `seed: ${context?.seed.toString(16).padStart(8, \"0\").toUpperCase()}`,\n `overrides: ${context?.overrides.join(\", \") || \"[none]\"}`,\n `stack: ${error.stack}`,\n `context: ${JSON.stringify(context)}`,\n ].join(\"\\n\");\n const bugLink = `${GITHUB_ISSUE}?body=${encodeURIComponent(`Add any relevant info here:\\n\\n\\n${debugInfo}`)}`;\n return (\n
\n
\n

Cavern generation failed

\n

{error.message}

\n

\n This isn't supposed to happen. Please consider{\" \"}\n \n filing a bug\n \n .\n

\n
    \n
  • groundHog version: {process.env.REACT_APP_VERSION}
  • \n
  • \n seed: {context?.seed.toString(16).padStart(8, \"0\").toUpperCase()}\n
  • \n
  • overrides: {context?.overrides.join(\", \") || \"[none]\"}
  • \n
  • \n \n Report issue on GitHub (Requires GitHub account)\n \n
  • \n
  • \n \n navigator.clipboard\n .writeText(debugInfo)\n .then(() => setWasCopied(true))\n }\n >\n Copy Bug Report\n {wasCopied && \" [ Copied! ]\"}\n \n
  • \n
  • \n \n
  • \n
\n {error.stack && (\n <>\n

Stack

\n

{error.stack}

\n \n )}\n {context && (\n <>\n

Context

\n

{JSON.stringify(context)}

\n \n )}\n
\n
\n );\n}\n","import React, {\n CSSProperties,\n useCallback,\n useEffect,\n useReducer,\n useState,\n} from \"react\";\n\nimport { CavernContext, DiceBox } from \"../core/common\";\nimport { CavernContextInput } from \"./components/context_editor\";\nimport { Cavern } from \"../core/models/cavern\";\nimport CavernPreview, { MapOverlay } from \"./components/map_preview\";\nimport { CAVERN_TF } from \"../core/transformers\";\nimport { TransformResult } from \"../core/common/transform\";\nimport LorePreview from \"./components/popovers/lore\";\nimport About from \"./components/popovers/about\";\nimport styles from \"./App.module.scss\";\nimport ErrorPreview from \"./components/popovers/error\";\nimport { filterTruthy } from \"../core/common/utils\";\n\nconst MAP_OVERLAY_BUTTONS: readonly {\n of: MapOverlay;\n label: String;\n enabled: (cavern: Cavern | undefined) => boolean;\n}[] = [\n { of: \"overview\", label: \"Overview\", enabled: (c) => true },\n { of: \"tiles\", label: \"Tiles\", enabled: (c) => !!c?.tiles },\n { of: \"crystals\", label: \"Crystals\", enabled: (c) => !!c?.crystals },\n { of: \"ore\", label: \"Ore\", enabled: (c) => !!c?.ore },\n { of: \"entities\", label: \"Entities\", enabled: (c) => !!c?.buildings },\n { of: \"discovery\", label: \"Discovery\", enabled: (c) => !!c?.discoveryZones },\n { of: \"height\", label: \"Height\", enabled: (c) => !!c?.height },\n { of: \"landslides\", label: \"Landslides\", enabled: (c) => !!c?.landslides },\n { of: \"erosion\", label: \"Erosion\", enabled: (c) => !!c?.erosion },\n { of: \"oxygen\", label: \"Oxygen\", enabled: (c) => c?.oxygen !== undefined },\n { of: \"lore\", label: \"Lore\", enabled: (c) => !!c?.lore },\n { of: \"script\", label: \"Script\", enabled: (c) => !!c?.script },\n { of: \"about\", label: \"About\", enabled: (c) => true },\n];\n\nfunction getDownloadLink(serializedData: string) {\n return `data:text/plain;charset=utf-8,${encodeURIComponent(serializedData)}`;\n}\n\ntype State = {\n cavern?: Cavern;\n name?: string;\n progress?: number;\n next?: () => TransformResult;\n error?: Error;\n};\n\nfunction App() {\n const [state, dispatchState] = useReducer(\n (was: State, action: State | { context: CavernContext }) => {\n if (\"context\" in action) {\n const cavern = {\n context: action.context,\n dice: new DiceBox(action.context.seed),\n };\n const r = CAVERN_TF.first(cavern);\n return {\n cavern: r.result,\n name: r.name,\n next: r.next || undefined,\n } as State;\n } else if (\"error\" in action) {\n return { cavern: was.cavern, ...action };\n }\n return action;\n },\n {},\n );\n\n const [autoGenerate, setAutoGenerate] = useState(true);\n const [mapOverlay, setMapOverlay] = useState(\"overview\");\n const [showOutlines, setShowOutlines] = useState(false);\n const [showPearls, setShowPearls] = useState(false);\n\n const biome = state?.cavern?.context.biome;\n\n function playPause() {\n if (autoGenerate) {\n setAutoGenerate(false);\n } else {\n setAutoGenerate(true);\n }\n }\n\n const step = useCallback(() => {\n try {\n const r = state.next!();\n dispatchState({\n cavern: r.result,\n name: r.name,\n progress: r.progress,\n next: r.next || undefined,\n });\n } catch (error: unknown) {\n console.error(error);\n if (error instanceof Error) {\n dispatchState({ error });\n }\n }\n }, [state]);\n\n const reset = useCallback(() => {\n setAutoGenerate(false);\n if (state.cavern) {\n dispatchState({ context: state.cavern.context });\n }\n }, [state]);\n\n useEffect(() => {\n if (state.next && autoGenerate) {\n step();\n }\n }, [autoGenerate, state, step]);\n\n useEffect(() => {\n (window as any).cavern = state.cavern;\n }, [state]);\n\n const isLoading =\n (autoGenerate && !state.cavern?.serialized) || mapOverlay === \"about\";\n\n return (\n
\n
\n \n
\n
\n \n {state.cavern && (\n \n )}\n {autoGenerate && state.progress !== undefined && (\n \n )}\n {mapOverlay === \"about\" && }\n {mapOverlay === \"lore\" && }\n {state.error && (\n \n )}\n {!autoGenerate && state.name && (\n
{state.name}
\n )}\n
\n {state.next ? (\n <>\n {!autoGenerate && }\n \n \n ) : (\n \n )}\n {state.cavern?.serialized ? (\n \n download\n \n ) : (\n
\n download\n
\n )}\n
\n
\n
\n

Show

\n setShowOutlines((v) => !v)}\n >\n Outlines\n \n setShowPearls((v) => !v)}\n >\n Pearls\n \n {MAP_OVERLAY_BUTTONS.map(({ of, label, enabled }) => (\n setMapOverlay((v) => (v === of ? \"overview\" : of))}\n >\n {label}\n \n ))}\n
\n
\n );\n}\n\nexport default App;\n","import React from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport \"./index.css\";\nimport App from \"./webui/App\";\n\nconst root = ReactDOM.createRoot(document.getElementById(\"root\")!);\nroot.render(\n \n \n ,\n);\n"],"names":["main","require","module","exports","GETTERS","arr","idx","get","dtype","f","default","SETTERS","value","set","isAccessorArray","getter","setter","accessorGetter","accessorSetter","x","dt","TYPE","constructor","name","BYTES_PER_ELEMENT","isComplexLike","real","imag","buf","len","v","i","j","length","isArrayLikeObject","format","it","out","z","next","done","push","TypeError","clbk","thisArg","call","isNonNegativeInteger","isCollection","isArrayBuffer","isObject","isArray","isString","isFunction","isEven","isInteger","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","ITERATOR_SYMBOL","setReadOnly","setReadOnlyAccessor","Float64Array","Complex128","floor","reinterpret64","reinterpret128","fromIterator","fromIteratorMap","fromArray","HAS_ITERATOR_SYMBOL","isComplexArray","Complex128Array","_length","_buffer","isComplexArrayConstructor","getComplex128","byteOffset","nargs","arguments","this","RangeError","byteLength","Error","src","tmp","flg","args","prototype","buffer","target","start","copyWithin","self","iter","FLG","entries","predicate","end","re","im","fcn","searchElement","fromIndex","separator","sep","toString","join","outbuf","reducer","initialValue","acc","N","sbuf","outlen","begin","offset","index","realf","imagf","Float32Array","Complex64","Complex64Array","getComplex64","Uint32Array","Int32Array","Uint16Array","Int16Array","Uint8Array","Uint8ClampedArray","CTORS","isBuffer","constructorName","ctor2dtype","DTYPES","NTYPES","ctor","hasFloat32ArraySupport","builtin","polyfill","hasFloat64ArraySupport","hasInt16ArraySupport","hasInt32ArraySupport","hasInt8ArraySupport","Int8Array","isTypedArray","isComplexTypedArray","typeName","data","instanceOf","ctorName","getPrototypeOf","hasUint16ArraySupport","hasUint32ArraySupport","hasUint8ArraySupport","hasUint8ClampedArraySupport","isFloat32Array","PINF","GlobalFloat32Array","bool","err","isFloat64Array","GlobalFloat64Array","NaN","foo","isInt16Array","INT16_MAX","INT16_MIN","GlobalInt16Array","isInt32Array","INT32_MAX","INT32_MIN","GlobalInt32Array","isInt8Array","INT8_MAX","INT8_MIN","GlobalInt8Array","hasOwnProp","Symbol","iterator","has","Object","hasOwnProperty","property","hasSymbols","toStringTag","isUint16Array","UINT16_MAX","GlobalUint16Array","isUint32Array","UINT32_MAX","GlobalUint32Array","isUint8Array","UINT8_MAX","GlobalUint8Array","isUint8ClampedArray","GlobalUint8ClampedArray","isArguments","detect","hasArgumentsClass","nativeClass","isEnumerableProperty","MAX_LENGTH","Array","hasArrayBuffer","ArrayBuffer","isPrimitive","hasToStringTag","Boolean","test","isObjectLike","_isBuffer","NAMES","isnan","isEnum","hasStringEnumBug","propertyIsEnumerable","hasFloat32Array","hasFloat64Array","typeOf","hasInt16Array","hasInt32Array","hasInt8Array","NINF","isInt","isNumber","valueOf","ctors","IS_LITTLE_ENDIAN","uint16view","isLittleEndian","isNan","Number","arrayfun","objectPrototype","proto","isPrototypeOf","obj","key","ownProps","String","fcnName","TypedArray","Dummy","hasUint16Array","hasUint32Array","hasUint8Array","hasUint8ClampedArray","strideX","offsetX","y","strideY","offsetY","xbuf","ybuf","ix","iy","accessors","arraylike2object","ox","oy","m","accessorProtocol","Bool","defineProperty","float64ToFloat32","toStr","toJSON","str","FLOAT64_NINF","NEGATIVE_INFINITY","FLOAT64_PINF","POSITIVE_INFINITY","a","b","la","lb","Math","abs","ceil","SIGN_MASK","ABS_MASK","toWords","getHighWord","fromWords","WORDS","hx","hy","assign","ldexp","polyvalP","hi","lo","k","r","t","c","trunc","expmulti","LOG2_E","NEARZERO","NEG_NEARZERO","BIAS","MAX_EXPONENT","MAX_SUBNORMAL_EXPONENT","MIN_SUBNORMAL_EXPONENT","isInfinite","copysign","normalize","floatExp","FRAC","frac","exp","high","setHighWord","polyvalQ","LN2_HI","LN2_LO","HIGH_SIGNIFICAND_MASK","hfsq","t1","R","s","w","max","isPositiveZero","setLowWord","polyvalL","HIGH_MIN_NORMAL_EXP","BP","DP_HI","DP_LO","ax","ahx","ss","s2","hs","ls","ht","bp","dp","hp","hz","lz","t2","u","n","polyvalW","isOdd","sqrt","uint32ToInt32","xIsZero","yIsHuge","yIsInfinite","log2ax","logx","pow2","HIGH_BIASED_EXP_10","HUGE","TINY","LOG_WORKSPACE","pow","ahy","sx","sy","y1","lp","LN2","EXP_MASK","indices","HIGH","LOW","FLOAT64_VIEW","UINT32_VIEW","low","FLOAT64_SMALLEST_NORMAL","stride","fround","FLOAT32_VIEW","hasObjectAssign","enumerableProperties","source","keys","to","Obj","standardGamma","sample1","sample2","sample3","randu","randn","alpha","beta","ga","setReadWriteAccessor","isBoolean","constantFunction","noop","gcopy","typedarray2json","validate","beta0","STATE","rnorm","opts","rand","prng","copy","state","seed","seedLength","stateLength","NAME","params","normalized","factory","ln","s4","A","sigma","mu","B","C","L","lx","ly","xy","ONE_THIRD","x2","v0","v1","d","isPositive","V","rTail","X","mt19937","improvedZiggurat","options","randi","coordsArray","ratioArray","sampleTail","START_RIGHT_TAIL","f0","f1","isNegative","isPositiveInteger","FLOAT64_MAX_SAFE_INTEGER","umul","randuint32","M","MAX_SEED","UPPER_MASK","LOWER_MASK","KNUTH_MULTIPLIER","MAGIC_MULTIPLIER_1","MAGIC_MULTIPLIER_2","MAG01","MATRIX_A","FLOAT64_NORMALIZATION_CONSTANT","TWO_32","ONE","MAX_NORMALIZED","STATE_ARRAY_VERSION","NUM_STATE_SECTIONS","STATE_SECTION_OFFSET","OTHER_SECTION_OFFSET","SEED_SECTION_OFFSET","STATE_FIXED_LENGTH","verifyState","s1","createState","slen","ndarray","initState","getSeed","getSeedLength","getState","setState","getStateLength","getStateSize","twist","MAX","random","RE_FUNCTION_NAME","reFunctionName","lowercase","toLowerCase","uppercase","toUpperCase","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","token","digits","parseFloat","arg","isFinite","specifier","toExponential","precision","toFixed","toPrecision","alternate","sign","zeroPad","base","parseInt","padRight","charAt","formatInteger","formatDouble","spacePad","fromCharCode","isNaN","initialize","width","flags","mapping","tokens","hasPeriod","flag","num","pos","padZeros","indexOf","maxWidth","substring","spaces","right","pad","zeros","negative","startsWithMinus","substr","RE","parse","match","content","prev","exec","slice","lastIndex","interpolate","tokenize","apply","Sym","IteratorSymbol","prop","hasDefinePropertySupport","objectProtoype","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","descriptor","hasValue","hasGet","hasSet","__proto__","propertySymbols","isEnumerable","hasFunctionNameSupport","isFunctionNameSupported","getProto","getThis","Self","Win","GlobalThis","codegen","Function","globalThis","window","isConstructorPrototype","EXCLUDED_KEYS","win","check","hasAutomationEqualityBug","HAS_WINDOW","error","hasArgumentsBug","HAS_BUILTIN","wrapper","HAS_ENUM_PROTO_BUG","HAS_NON_ENUM_PROPS_BUG","NON_ENUMERABLE","skipConstructor","skipPrototype","isFcn","p","isOwn","tag","toStrTag","getOwnPropertySymbols","nodeList","typedarray","root","getGlobal","document","childNodes","usePolyfill","type","aa","ca","encodeURIComponent","da","Set","ea","fa","ha","add","ia","createElement","ja","ka","ma","e","g","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","propertyName","sanitizeURL","removeEmptyString","split","forEach","ra","sa","ta","pa","qa","oa","removeAttribute","setAttribute","setAttributeNS","xlinkHref","ua","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","va","for","wa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ka","La","Ma","stack","trim","Na","Oa","prepareStackTrace","Reflect","construct","l","h","displayName","includes","Pa","render","Qa","$$typeof","_context","_payload","_init","Ra","Sa","Ta","nodeName","Va","_valueTracker","getOwnPropertyDescriptor","configurable","enumerable","getValue","setValue","stopTracking","Ua","Wa","checked","Xa","activeElement","body","Ya","defaultChecked","defaultValue","_wrapperState","initialChecked","Za","controlled","ab","bb","cb","db","ownerDocument","eb","fb","selected","defaultSelected","disabled","gb","dangerouslySetInnerHTML","children","hb","ib","jb","textContent","kb","mb","nb","namespaceURI","innerHTML","firstChild","removeChild","appendChild","MSApp","execUnsafeLocalFunction","ob","lastChild","nodeType","nodeValue","pb","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","qb","rb","sb","style","setProperty","tb","menuitem","area","br","col","embed","hr","img","input","keygen","link","meta","param","track","wbr","ub","vb","is","wb","xb","srcElement","correspondingUseElement","parentNode","yb","zb","Ab","Bb","Cb","stateNode","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","addEventListener","removeEventListener","Nb","onError","Ob","Pb","Qb","Rb","Sb","Tb","Vb","return","Wb","memoizedState","dehydrated","Xb","Zb","child","sibling","current","Yb","$b","ac","unstable_scheduleCallback","bc","unstable_cancelCallback","cc","unstable_shouldYield","dc","unstable_requestPaint","unstable_now","ec","unstable_getCurrentPriorityLevel","fc","unstable_ImmediatePriority","gc","unstable_UserBlockingPriority","hc","unstable_NormalPriority","ic","unstable_LowPriority","jc","unstable_IdlePriority","kc","lc","oc","clz32","pc","qc","log","rc","sc","tc","uc","pendingLanes","suspendedLanes","pingedLanes","entangledLanes","entanglements","vc","xc","yc","zc","Ac","eventTimes","Cc","Dc","Ec","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Map","Pc","Qc","Rc","Sc","delete","pointerId","Tc","nativeEvent","blockedOn","domEventName","eventSystemFlags","targetContainers","Vc","Wc","priority","isDehydrated","containerInfo","Xc","Yc","dispatchEvent","shift","Zc","$c","ad","bd","cd","ReactCurrentBatchConfig","dd","ed","transition","fd","gd","hd","id","Uc","stopPropagation","jd","kd","ld","md","nd","od","keyCode","charCode","pd","qd","rd","_reactName","_targetInst","currentTarget","isDefaultPrevented","defaultPrevented","returnValue","isPropagationStopped","preventDefault","cancelBubble","persist","isPersistent","wd","xd","yd","sd","eventPhase","bubbles","cancelable","timeStamp","Date","now","isTrusted","td","ud","view","detail","vd","Ad","screenX","screenY","clientX","clientY","pageX","pageY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","zd","button","buttons","relatedTarget","fromElement","toElement","movementX","movementY","Bd","Dd","dataTransfer","Fd","Hd","animationName","elapsedTime","pseudoElement","Id","clipboardData","Jd","Ld","Md","Esc","Spacebar","Left","Up","Right","Down","Del","Menu","Apps","Scroll","MozPrintableKey","Nd","Od","Alt","Control","Meta","Shift","Pd","Qd","code","location","repeat","locale","which","Rd","Td","height","pressure","tangentialPressure","tiltX","tiltY","pointerType","isPrimary","Vd","touches","targetTouches","changedTouches","Xd","Yd","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","Zd","$d","ae","be","documentMode","ce","de","ee","fe","ge","he","ie","le","color","date","datetime","email","month","number","password","range","search","tel","text","time","url","week","me","ne","oe","event","listeners","pe","qe","se","te","ue","ve","we","xe","ye","ze","oninput","Ae","detachEvent","Be","Ce","attachEvent","De","Ee","Fe","He","Ie","Je","Ke","node","nextSibling","Le","contains","compareDocumentPosition","Me","HTMLIFrameElement","contentWindow","href","Ne","contentEditable","Oe","focusedElem","selectionRange","documentElement","selectionStart","selectionEnd","min","defaultView","getSelection","extend","rangeCount","anchorNode","anchorOffset","focusNode","focusOffset","createRange","setStart","removeAllRanges","addRange","setEnd","element","left","scrollLeft","top","scrollTop","focus","Pe","Qe","Re","Se","Te","Ue","Ve","We","animationend","animationiteration","animationstart","transitionend","Xe","Ye","Ze","animation","$e","af","bf","cf","df","ef","ff","gf","hf","lf","mf","concat","nf","Ub","instance","listener","D","of","pf","qf","rf","sf","bind","capture","passive","J","F","tf","uf","parentWindow","vf","wf","na","xa","$a","ba","je","char","ke","unshift","xf","yf","zf","Af","Bf","Cf","Df","Ef","__html","Ff","setTimeout","Gf","clearTimeout","Hf","Promise","Jf","queueMicrotask","resolve","then","catch","If","Kf","Lf","Mf","previousSibling","Nf","Of","Pf","Qf","Rf","Sf","Tf","Uf","E","G","Vf","H","Wf","Xf","Yf","contextTypes","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Zf","childContextTypes","$f","ag","bg","getChildContext","cg","__reactInternalMemoizedMergedChildContext","dg","eg","fg","gg","hg","jg","kg","lg","mg","ng","og","pg","qg","rg","sg","tg","ug","vg","wg","xg","yg","I","zg","Ag","Bg","elementType","deletions","Cg","pendingProps","overflow","treeContext","retryLane","Dg","mode","Eg","Fg","Gg","memoizedProps","Hg","Ig","Jg","Kg","Lg","defaultProps","Mg","Ng","Og","Pg","Qg","Rg","_currentValue","Sg","childLanes","Tg","dependencies","firstContext","lanes","Ug","Vg","context","memoizedValue","Wg","Xg","Yg","interleaved","Zg","$g","ah","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","shared","pending","effects","bh","ch","eventTime","lane","payload","callback","dh","K","eh","fh","gh","q","hh","ih","jh","Component","refs","kh","nh","isMounted","_reactInternals","enqueueSetState","lh","mh","enqueueReplaceState","enqueueForceUpdate","oh","shouldComponentUpdate","isPureReactComponent","ph","contextType","updater","qh","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","rh","props","getDerivedStateFromProps","getSnapshotBeforeUpdate","UNSAFE_componentWillMount","componentWillMount","componentDidMount","sh","ref","_owner","_stringRef","th","uh","vh","wh","xh","yh","implementation","zh","Ah","Bh","Ch","Dh","Eh","Fh","Gh","Hh","Ih","tagName","Jh","Kh","Lh","Mh","revealOrder","Nh","Oh","_workInProgressVersionPrimary","Ph","ReactCurrentDispatcher","Qh","Rh","O","P","Sh","Th","Uh","Vh","Q","Wh","Xh","Yh","Zh","$h","ai","bi","ci","baseQueue","queue","di","ei","fi","lastRenderedReducer","action","hasEagerState","eagerState","lastRenderedState","dispatch","gi","ii","ji","ki","getSnapshot","li","mi","ni","lastEffect","stores","oi","pi","qi","ri","create","destroy","deps","si","ti","ui","vi","wi","xi","yi","zi","Ai","Bi","Ci","Di","Ei","Fi","Gi","Hi","Ii","Ji","readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","identifierPrefix","Ki","message","digest","Li","Mi","console","Ni","WeakMap","Oi","Pi","Qi","Ri","getDerivedStateFromError","componentDidCatch","Si","componentStack","Ti","pingCache","Ui","Vi","Wi","Xi","ReactCurrentOwner","Yi","Zi","$i","aj","bj","compare","cj","dj","ej","baseLanes","cachePool","transitions","fj","gj","hj","ij","jj","UNSAFE_componentWillUpdate","componentWillUpdate","componentDidUpdate","kj","lj","pendingContext","mj","Aj","Bj","Cj","Dj","nj","oj","pj","fallback","qj","rj","tj","dataset","dgst","uj","vj","_reactRetry","sj","subtreeFlags","wj","xj","isBackwards","rendering","renderingStartTime","last","tail","tailMode","yj","Ej","S","Fj","Gj","wasMultiple","multiple","suppressHydrationWarning","onClick","onclick","size","createElementNS","autoFocus","createTextNode","T","Hj","Ij","Jj","Kj","U","Lj","WeakSet","Mj","W","Nj","Oj","Qj","Rj","Sj","Tj","Uj","Vj","Wj","insertBefore","_reactRootContainer","Xj","Yj","Zj","ak","onCommitFiberUnmount","componentWillUnmount","bk","ck","dk","ek","fk","isHidden","gk","hk","display","ik","jk","kk","lk","__reactInternalSnapshotBeforeUpdate","Wk","mk","nk","ok","pk","Y","Z","qk","rk","sk","tk","uk","Infinity","vk","wk","xk","yk","zk","Ak","Bk","Ck","Dk","Ek","callbackNode","expirationTimes","expiredLanes","wc","callbackPriority","ig","Fk","Gk","Hk","Ik","Jk","Kk","Lk","Mk","Nk","Ok","Pk","finishedWork","finishedLanes","Qk","timeoutHandle","Rk","Sk","Tk","Uk","Vk","mutableReadLanes","Bc","Pj","onCommitFiberRoot","mc","onRecoverableError","Xk","onPostCommitFiberRoot","Yk","Zk","al","isReactComponent","pendingChildren","bl","mutableSourceEagerHydrationData","cl","cache","pendingSuspenseBoundaries","el","fl","gl","hl","il","jl","zj","$k","ll","reportError","ml","_internalRoot","nl","ol","pl","ql","sl","rl","unmount","unstable_scheduleHydration","splice","querySelectorAll","JSON","stringify","form","tl","usingClientEntryPoint","Events","ul","findFiberByHostInstance","bundleType","version","rendererPackageName","vl","rendererConfig","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setErrorHandler","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","reconcilerVersion","__REACT_DEVTOOLS_GLOBAL_HOOK__","wl","isDisabled","supportsFiber","inject","createPortal","dl","createRoot","unstable_strictMode","findDOMNode","flushSync","hydrate","hydrateRoot","hydratedSources","_getVersion","_source","unmountComponentAtNode","unstable_batchedUpdates","unstable_renderSubtreeIntoContainer","checkDCE","__self","__source","Fragment","jsx","jsxs","forceUpdate","escape","_status","_result","Children","map","count","toArray","only","Profiler","PureComponent","StrictMode","Suspense","cloneElement","createContext","_currentValue2","_threadCount","Provider","Consumer","_defaultValue","_globalName","createFactory","createRef","forwardRef","isValidElement","lazy","memo","startTransition","unstable_act","pop","sortIndex","performance","setImmediate","startTime","expirationTime","priorityLevel","navigator","scheduling","isInputPending","MessageChannel","port2","port1","onmessage","postMessage","unstable_Profiling","unstable_continueExecution","unstable_forceFrameRate","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_runWithPriority","delay","unstable_wrapCallback","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","__esModule","definition","o","MAX_PLUS_ONE","PseudorandomStream","mt","bt","chance","uniform","_ref","_ref2","uniformInt","betaInt","uniformChoice","choices","betaChoice","_ref3","weightedChoice","bids","filter","bid","totalWeight","reduce","randomValue","item","shuffle","Die","DiceBox","boxes","pickArchitect","prime","pearl","rough","placeRechargeSeam","placeBuildings","placeCrystals","placeOre","placeSlugHoles","placeLandslides","placeErosion","placeEntities","lore","script","monsterSpawnScript","slugSpawnScript","boxesLength","rngs","die","box","init","partition","weave","flood","pickSpawn","brace","scriptGlobals","STANDARD_DEFAULTS","baseplateMaxOblongness","baseplateMaxRatioOfSize","caveCount","optimalAuxiliaryPathCount","randomAuxiliaryPathCount","auxiliaryPathMinAngle","PI","caveBaroqueness","hallBaroqueness","caveCrystalRichness","hops","hallCrystalRichness","caveOreRichness","hallOreRichness","monsterSpawnRate","monsterWaveSize","architects","caveCrystalSeamBias","hallCrystalSeamBias","caveOreSeamBias","hallOreSeamBias","hallHasSlugHoleChance","stratascosity","strataplanity","caveHasLandslidesChance","hallHasLandslidesChance","caveLandslideCooldownRange","hallLandslideCooldownRange","airSafetyFactor","crystalGoalRatio","DEFAULTS_FOR_BIOME","rock","caveHasRechargeSeamChance","hallHasRechargeSeamChance","caveHasSlugHoleChance","caveMaxSlope","hallMaxSlope","voidMaxSlope","borderMaxSlope","ice","lava","getDefaultFlooding","dice","biome","rng","waterPlans","waterLakes","lavaPlans","lavaLakes","erosionPlans","inferContextDefaults","hasMonsters","targetSize","hasAirLimit","hasSlugs","heightTargetRange","overrides","sort","ORIGIN","NORTH","NORTH_EAST","EAST","SOUTH_EAST","SOUTH","SOUTH_WEST","WEST","NORTH_WEST","NSEW","NEIGHBORS8","offsetBy","plotLine","destX","destY","dx","dy","e2","moveX","moveY","radsToDegrees","rads","rotateAround","rotateLeft","_ref4","rotateRight","_ref5","Choice","update","contextWithDefaults","_jsxs","_Fragment","_jsx","className","styles","inputRow","choice","classes","override","active","inactive","CurveSliders","_contextWithDefaults$","_contextWithDefaults$2","_contextWithDefaults$3","_contextWithDefaults$4","_contextWithDefaults$5","_contextWithDefaults$6","step","curve","_contextWithDefaults$7","_contextWithDefaults$8","slider","onChange","ev","updateCurve","valueAsNumber","icon","invisible","Slider","_context$of","percent","angle","epsilon","splitter","resulterrbound","sum","elen","flen","Qnew","bvirt","enow","fnow","eindex","findex","hindex","vec","ccwerrboundB","ccwerrboundC","C1","C2","orient2d","ay","bx","by","cx","cy","detleft","detright","det","detsum","acxtail","acytail","bcxtail","bcytail","ahi","alo","bhi","blo","_i","_j","_0","s0","t0","u3","acx","bcx","acy","bcy","estimate","errbound","C1len","C2len","Dlen","orient2dadapt","EPSILON","EDGE_STACK","Delaunator","from","points","getX","defaultGetX","getY","defaultGetY","coords","maxTriangles","_triangles","_halfedges","_hashSize","_hullPrev","_hullNext","_hullTri","_hullHash","_ids","_dists","hullPrev","hullNext","hullTri","hullHash","minX","minY","maxX","maxY","i0","i1","i2","minDist","dist","i0x","i0y","i1x","i1y","minRadius","circumradius","i2x","i2y","quicksort","hull","d0","subarray","triangles","halfedges","center","ex","ey","circumcenter","_cx","_cy","_hullStart","hullSize","fill","_hashKey","trianglesLen","_addTriangle","xp","yp","_legalize","pseudoAngle","ar","a0","b0","p0","pr","p1","inCircle","hbl","_link","px","py","fx","fy","cp","ids","dists","temp","tempDist","swap","getYaw","atan2","aimedAt","facing","yaw","ENTITY_SCALE","POSITION_DEFAULTS","pitch","roll","scaleX","scaleY","scaleZ","position","_args$z","_args$pitch","_getYaw","_args$roll","_args$scaleX","_args$scaleY","_args$scaleZ","atCenterOfTile","randomlyInTile","_getYaw2","zOffsetForBuilding","unused_x","unused_y","nw","sw","zOffsetForEntity","serializePosition","heightMap","yawOffset","zOffsetMethod","method","tileX","tileY","fn","entity","building","zOffset","F_MINING_LASER","F_DEFAULT","F_CANTEEN_REFINERY","F_POWER_STATION","F_SUPER_TELEPORT","rotateFootprint","footprint","BuildingTemplate","inspectAbbrev","maxLevel","ore","crystals","atTile","_args$level","_args$isEssential","_args$teleportAtStart","template","foundation","level","isEssential","teleportAtStart","TOOL_STORE","TELEPORT_PAD","DOCKS","CANTEEN","POWER_STATION","SUPPORT_STATION","UPGRADE_STATION","GEOLOGICAL_CENTER","ORE_REFINERY","MINING_LASER","SUPER_TELEPORT","Hardness","Tile","FLOOR","crystalYield","hardness","NONE","isFluid","isWall","maxSlope","oreYield","LAVA","WATER","DIRT","LOOSE_ROCK","LOOSE","HARD_ROCK","HARD","SOLID_ROCK","SOLID","RUBBLE_1","RUBBLE","RUBBLE_2","RUBBLE_3","RUBBLE_4","SLUG_HOLE","FOUNDATION","POWER_PATH","LANDSLIDE_RUBBLE_4","LANDSLIDE_RUBBLE_3","LANDSLIDE_RUBBLE_2","LANDSLIDE_RUBBLE_1","CRYSTAL_SEAM","SEAM","ORE_SEAM","RECHARGE_SEAM","CreatureTemplate","ROCK_MONSTER","ICE_MONSTER","LAVA_MONSTER","SLIMY_SLUG","monsterForBiome","CreatureFactory","sleep","pairEach","pairMap","result","filterTruthy","pickPoint","plan","innerPearl","layer","positionsHelper","cavern","filterFn","aly","placements","_cavern$pearlInnerDex","tiles","pearlInnerDex","some","_","plans","kind","anchor","find","_cavern$tiles$get","_cavern$pearlInnerDex2","tx","ty","TILE_CAN_HAVE_MONSTER","__","PLACEMENT_FN","inner","outer","placeSleepingMonsters","placement","creatureFactory","creatures","sprinkleSlugHoles","_opts$count","_opts$placements","flatMap","x1","Landslide","cooldown","Erosion","initialDelay","LANDSLIDABLE_TILES","cooldownRange","landslides","spread","point","_cavern$tiles$get$id","SEAMABLE","sprinkle","getRandomTile","seamBias","resource","seam","remaining","_tiles$get","_resource$get","sprinkleCrystals","_opts$getRandomTile","_opts$seamBias","defaultGetRandomTile","architect","crystalsFromMetadata","metadata","sprinkleOre","_opts$getRandomTile2","_opts$seamBias2","_opts$count2","bidsForOuterPearl","outerPearl","_args$tiles$get","tile","rechargeSeamCount","solidRockCount","_args$tiles$get2","neighbor","_args$cavern$pearlInn","_args$cavern$pearlInn2","_args$cavern$pearlOut","_args$cavern$pearlOut2","pearlOuterDex","bidsForOrdinaryWalls","positions","bids2","getPlaceRechargeSeams","getTotalCrystals","buildings","vehicles","ct","getTotalOre","_ref6","DefaultCaveArchitect","DefaultHallArchitect","hasLandslidesChance","landslideCooldownRange","baroqueness","crystalsToPlace","crystalRichness","perimeter","oreRichness","erosion","hasErosion","_cavern$tiles$get2","objectives","MutableGrid","bounds","bottom","_len","_key","getBuildings","placed","porches","expand","layers","radius","totalWidth","totalShrink","shrink","totalGrow","grow","growFactor","shrinkFactor","round","rr","dirt","looseRock","hardRock","solidRock","water","_r$has$id","roughNotFloodedTo","weightedSprinkle","_len2","_key2","_Rough","VOID","ALWAYS_FLOOR","ALWAYS_DIRT","ALWAYS_LOOSE_ROCK","ALWAYS_HARD_ROCK","ALWAYS_SOLID_ROCK","ALWAYS_WATER","ALWAYS_LAVA","AT_MOST_DIRT","AT_MOST_LOOSE_ROCK","AT_MOST_HARD_ROCK","DIRT_OR_LOOSE_ROCK","LOOSE_OR_HARD_ROCK","BRIDGE_ON_WATER","BRIDGE_ON_LAVA","INVERT_TO_DIRT","INVERT_TO_LOOSE_ROCK","Rough","MIX_DIRT_LOOSE_ROCK","MIX_LOOSE_HARD_ROCK","MIX_FRINGE","mkRough","_len3","_key3","fixLayers","roughExtent","pearlRadius","replacements","mkVars","prefix","transformPoint","scriptFragment","rest","eventChain","escapeString","getDiscoveryPoint","dz","discoveryZones","openOnSpawn","T0_BUILDINGS","T1_BUILDINGS","T2_BUILDINGS","T3_BUILDINGS","OMIT_T1","getPrime","maxCrystals","ruin","crystalsInBuildings","getPlaceBuildings","discovered","asRuin","asSpawn","tq","crystalBudget","bq","intersects","fluid","isRuinAtSpawn","fTile","getPorch","addPath","dest","delaunay","openCaveFlags","xt","yt","setCameraPosition","gLostHq","WITH_FIND_OBJECTIVE","variables","condition","foundHq","description","sufficient","discoPoint","camPoint","path","baseplates","messageDiscover","onDiscover","BASE","spawnBid","_ref7","caveBid","_ref8","_p$metadata","_ref9","_plans$hops$0$metadat","_p$metadata2","EXHAUSTED","INITIAL","AWAITING_REARM","COOLDOWN","ARMED","RETRIGGER_MODES","automatic","afterTriggerState","hoard","creatureSpawnScript","creature","retriggerMode","triggerOnFirstArmed","needCrystals","_opts$waveSize","_opts$meanWaveSize","_opts$spawnRate","_opts$armEvent","_opts$emerges","_opts$triggerPoints","_opts$needCrystals","_opts$needCrystals2","waveSize","meanWaveSize","meanCooldown","spawnRate","armEvent","doArm","armTriggers","armFn","discoveryPoint","getArmTriggers","cooldownOffset","emerges","cycleEmerges","getEmerges","once","maxTriggerCount","triggerPoints","getTriggerPoints","needCountTriggerEvents","needTriggerPoints","triggerCount","increment","initialCooldown","doSpawn","emerge","doRetrigger","METADATA","sVars","discoveryPoints","used","getDiscoveryPoints","panTo","drillPoints","trips","tripCount","msgForeshadow","generateSeismicForeshadow","onTrip","spawn","bps","ebps","hallBid","exclusiveSnakeDistance","_plans$i$metadata","intersectsAny","intersectsOnly","isDeadEnd","LOOPBACK","overlaps","tipPlans","op","tp","tipPlan","crust","withBarrier","JOBS","land","air","sea","VehicleTemplate","frame","upgrades","job","HOVER_SCOUT","SMALL_DIGGER","SMALL_TRANSPORT_TRUCK","RAPID_RIDER","SMLC","TUNNEL_SCOUT","VehicleFactory","essential","driverId","gLostMiners","countLostMiners","lostMiners","lostMinerCaves","_plan$metadata","minersCount","getBreadcrumbPoint","minersDz","minersX","minersY","neighborPlan","pickMinerPoint","_discoveryZones$get","_pickMinerPoint","miners","minerFactory","vehicleFactory","placeBreadcrumbVehicle","foundAllLostMiners","remainingCaves","messageFoundAll","onFoundAll","_ref10","lostMinersPoint","foundLostMiners","onIncomplete","MULTIPLIERS","_ref11","VEHICLE_BIDS","gNomads","_cavern$plans$find","hopId","_cavern$discoveryZone","placedVehicles","_cavern$discoveryZone2","placedMiners","driving","loadout","miner","onInit","onFoundHq","msg","nomadsSettled","messageBuiltBase","onBuiltBase","toolStore","OPEN","getSlugHoles","SLUG_NEST_METADATA","SLUG_NEST","holeCount","generateFoundSlugNest","SLUG_HALL","holes","HARD_ROCK_MIN_CRYSTALS","totalCrystals","HOARD","wallBids","centerPoints","wasTriggered","foundHoard","crystalsAvailable","hasLostMiners","centerPoint","onDiscovered","go","RICH","ARCHITECTS","ESTABLISHED_HQ","FISSURE","FLOODED","LOST_MINERS","NOMAD_SPAWN","SIMPLE_CAVE","SIMPLE_HALL","SIMPLE_SPAWN","SLUGS","THIN_HALL","ArchitectsInput","updateArchitects","localeCompare","_context$architects","React","INITIAL_SEED","parseSeed","unparseSeed","padStart","expectedTotalPlans","CavernContextInput","_parseSeed","dispatchState","showAdvanced","setShowAdvanced","was","hash","contextInput","spellCheck","section","subsection","SCALE","BaseplatePreview","baseplate","PathPreview","startOffset","dPearl","y2","cmd","x0","y0","PearlPreview","io","SCALE_COLORS","MAX_COOLDOWN","TilesPreview","mapOverlay","scale","_cavern$mapOverlay","_cavern$mapOverlay$ge","_cavern$crystals$get","_cavern$crystals","_cavern$ore$get","_cavern$ore","_cavern$discoveryZone3","_cavern$aerationLog","_cavern$crystals2","aerationLog","getFill","title","_cavern$discoveryZone4","_cavern$crystals$get2","_cavern$crystals3","_cavern$ore$get2","_cavern$ore2","_cavern$landslides","_cavern$erosion","er","getTitle","_entity$template","_entity$loadout","_entity$upgrades","unique","EntityPreview","_entity$template2","_entity$template3","vehicle","hasText","getMarkerD","enemy","transform","marker","label","OpenCaveFlagPreview","openCaveFlag","CORNER_OFFSETS","HEIGHT_MIN","HEIGHT_MAX","toColor","lum","HeightPreview","EntitySummary","entities","counts","_counts$s","Stats","_cavern$briefing","_cavern$tiles$size","_cavern$tiles","_cavern$tiles2","_cavern$objectives","_cavern$objectives2","_cavern$objectives3","_cavern$objectives4","levelName","fileName","briefing","intro","_cavern$miners$length","_cavern$miners","avgCooldown","_cavern$erosion$size","_cavern$tiles3","_cavern$tiles4","_cavern$oxygen$join","_cavern$oxygen","oxygen","stats","getGClassName","_plan$path","drawRadius","caveWithOneBaseplate","dWrapping","lengthAB","hypot","angleAB","lengthAC","angleBAC","acos","prime1","cos","sin","prime2","aPrime1","aPrime2","bPrime1","bPrime2","caveWithTwoBaseplates","hall","PlansPreview","planCoords","jx","jy","drawLabels","inline","pointer","_plan$path$baseplates","line","startsWith","groups","getLineOffsets","container","lines","getElementsByClassName","offsetTop","clientHeight","ScriptPreview","setScriptLineOffsets","scriptLineHovered","setScriptLineHovered","statements","onScroll","hovered","onMouseOver","ScriptOverlay","scriptLineOffsets","scriptOverlay","arrow","arrowhead","getTransform","cameraPosition","CavernPreview","_cavern$baseplates","_cavern$paths","_cavern$buildings","_cavern$creatures","_cavern$vehicles","_cavern$openCaveFlags","_cavern$plans","_cavern$plans2","showOutlines","showPearls","mapWrapperRef","setScale","mapWrapper","_cavern$left","_cavern$right","_cavern$top","_cavern$bottom","tw","mw","clientWidth","getScale","cavernPreview","void","viewBox","xmlns","paths","TfBuilder","fns","mkResult","_this$fns$name","_this$fns","progress","first","chain","that","Baseplate","withKind","Partitioner","baseplateMaxSize","outbox","nextId","bound","clone","_args$left","_args$top","_args$right","_args$bottom","distance","Path","origin","destination","batDistance","snakeDistance","OUTLINE_TF","partitioner","dexes","caveBaseplates","clusters","nextCluster","rSquared","bpAtTile","seen","genPathPlates","graph","_src$id","theta","edges","getGraph","pathIdsByEnds","minAngle","pathId","_paths$pathId2","pathKind","getOffset","pruneByAngle","addBestShortcut","distances","_paths$pathId","getAllDistances","addRandomShortcut","_path$origin$id","_path$destination$id","isMergeable","va1","va2","vb1","vb2","curved","LayerGrid","atLayer","super","hallNucleus","grid","caveNucleus","addLayer","_grid$get3","vx","vy","nextPoints","np","halt","_grid$get","rx","ry","_grid$get2","trail","PLANNING_TF","bpIsInBigCave","planIdsByBp","_bp$id","plid","lakes","planCount","lakeCount","skipChance","getLakes","fluids","claims","lake","working","erodeQueue","_fluids$plan$id","_cavern$context$archi","_cavern$context$archi2","_a$caveBid","_a$hallBid","_a$spawnBid","encourageDisable","inOrder","isQueued","neighbors","sortPlans","maxIndex","maxHops","established","doEstablish","doArchitect","getDiscoveryZones","zone","nextZone","HOLE_MAP","isInPlay","voidNeighbors","MASONRY_TF","visited","_tiles$get$isWall","wallNeighbors","_tiles$get$isWall2","_tiles$get2","needsBrace","ot","isHole","diorama","MinerFactory","FENCES","EdgeMap","ascent","forward","descent","backward","getEdgeMap","planlessSlope","maxSlopeForPlan","_plan$architect$maxSl","slope","_tile$maxSlope","getTileSlopes","mkNode","isBorder","corners","collapseQueued","getNodes","bowls","_result$get","getBowls","nodes","getNodesForBowls","superflat","PLASTIC_TF","planHeight","queued","_result$plan$id","getPlanHeight","fluidOffset","getTileHeight","tileHeight","getCornerHeight","collapseQueue","collapse","targetInRange","getRandomHeight","spreadQueue","AIR_STEP","TIMING","PgBuilder","phrases","states","phrase","requires","after","before","reachableStates","merge","PgNode","heads","tails","skip","coerce","pgBuilder","getReachableStates","reachableAfter","reachable","CAPITALIZE_AFTER","NO_SPACE_AFTER","NO_SPACE_BEFORE","PhraseGraph","generate","requireState","formatVars","stateRemaining","chosenPhrases","reachedState","continuations","chosen","textIndex","capitalizeNext","spaceBeforeNext","endsWith","joinTexts","phraseGraph","cut","newIndex","occupiedLanes","findLane","align","traverse","newStart","values","find_lost_miners","get_resources","COMMENDATIONS","SUCCESS","commend","despiteTheOdds","foundTheBase","hqIsRuin","FAILURE","FOUND_HOARD","FOUND_HQ","positive_greeting","neutral_greeting","FOUND_LOST_MINERS","FOUND_ALL_LOST_MINERS","NOMADS_SETTLED","FOUND_SLUG_NEST","mid","collect_resources","we_need","greeting","additionalHardship","spawnHasErosion","hasMonstersTexts","negativeGreeting","alsoAdditionalHardship","findThem","findTheOthers","SEISMIC_FORESHADOW","joinHuman","things","conjunction","ONES","TENS","spellNumber","spellResourceGoal","studs","resourceGoal","resourceGoalNamesOnly","Lore","_spawn$metadata","vars","fluidType","floodedWith","hq","spawnIsHq","findHq","nomads","treasures","floodedWithWater","floodedWithLava","lostMinersOne","lostMinersTogether","lostMinersApart","resourceObjective","spawnIsNomadOne","spawnIsNomadsTogether","treasureCaveOne","treasureCaveMany","rockBiome","iceBiome","lavaBiome","enemies","lostMinersCount","lostMinerCavesCount","briefings","premise","PREMISE","orders","ORDERS","success","failure","foundMinersCount","foundMinersOne","foundMinersTogether","foundSlugNest","OVERRIDE_SUFFIXES","RESTRICTED_STRINGS","pointSet","xs","ys","fencepost","row","serializeHazards","hazards","EPHEMERA_TF","presentAtSpawn","hasTeleportPad","hasPowerStation","hasSupportStation","getOrigin","drillTiming","walkQueue","drillQueue","dynamiteQueue","enqueue","useDynamite","maxAir","_r$crystals","_obj$crystals","_r$ore","_obj$ore","_r$studs","_obj$studs","_obj$variables","hasOverrides","charCodeAt","overrideSuffix","archGlobals","archScripts","monsters","slugs","serialized","process","comments","serializeObjectives","serializeBuilding","serializeCreature","serializeMiner","serializeVehicle","restricted","performErrorChecking","CAVERN_TF","LorePreview","scriptStrings","popoverWrapper","About","about","rel","GITHUB_ISSUE","ErrorPreview","show","setShow","wasCopied","setWasCopied","debugInfo","bugLink","clipboard","writeText","MAP_OVERLAY_BUTTONS","enabled","_state$cavern","_state$cavern2","_state$cavern3","_state$cavern4","_state$cavern$fileNam","autoGenerate","setAutoGenerate","setMapOverlay","setShowOutlines","setShowPearls","reset","isLoading","App","settingsPanel","mainPanel","loading","hasError","progressBar","complete","stepName","controls","serializedData","download","vizOptsPanel","ReactDOM","getElementById"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/main.b497b6ff.js b/static/js/main.d4e37d27.js similarity index 57% rename from static/js/main.b497b6ff.js rename to static/js/main.d4e37d27.js index 300c90a..c7bfe16 100644 --- a/static/js/main.b497b6ff.js +++ b/static/js/main.d4e37d27.js @@ -1,3 +1,3 @@ -/*! For license information please see main.b497b6ff.js.LICENSE.txt */ -(()=>{"use strict";var e={6264:(e,t,n)=>{var r=n(2604);e.exports=r},2604:e=>{var t={complex128:function(e,t){return e.get(t)},complex64:function(e,t){return e.get(t)},default:function(e,t){return e.get(t)}};e.exports=function(e){var n=t[e];return"function"===typeof n?n:t.default}},6572:(e,t,n)=>{var r=n(1923);e.exports=r},1923:e=>{var t={complex128:function(e,t,n){e.set(n,t)},complex64:function(e,t,n){e.set(n,t)},default:function(e,t,n){e.set(n,t)}};e.exports=function(e){var n=t[e];return"function"===typeof n?n:t.default}},2508:(e,t,n)=>{var r=n(5603);e.exports=r},5603:(e,t,n)=>{var r=n(6908),a=n(6148),o=n(1056),i=n(6264),l=n(6572),s=n(435);e.exports=function(e){var t=s(e);return r(e)?{data:e,dtype:t,accessorProtocol:!0,accessors:[i(t),l(t)]}:{data:e,dtype:t,accessorProtocol:!1,accessors:[a(t),o(t)]}}},6908:(e,t,n)=>{var r=n(9459);e.exports=r},9459:e=>{var t="function";e.exports=function(e){return typeof e.get===t&&typeof e.set===t}},2771:(e,t,n)=>{var r=n(9582);e.exports=r},9582:e=>{e.exports=function(e){return"object"===typeof e&&null!==e&&"Complex128Array"===e.constructor.name&&16===e.BYTES_PER_ELEMENT}},4792:(e,t,n)=>{var r=n(4479);e.exports=r},4479:e=>{e.exports=function(e){return"object"===typeof e&&null!==e&&"Complex64Array"===e.constructor.name&&8===e.BYTES_PER_ELEMENT}},6148:(e,t,n)=>{var r=n(3147);e.exports=r},3147:e=>{var t={float64:function(e,t){return e[t]},float32:function(e,t){return e[t]},int32:function(e,t){return e[t]},int16:function(e,t){return e[t]},int8:function(e,t){return e[t]},uint32:function(e,t){return e[t]},uint16:function(e,t){return e[t]},uint8:function(e,t){return e[t]},uint8c:function(e,t){return e[t]},generic:function(e,t){return e[t]},default:function(e,t){return e[t]}};e.exports=function(e){var n=t[e];return"function"===typeof n?n:t.default}},1056:(e,t,n)=>{var r=n(9527);e.exports=r},9527:e=>{var t={float64:function(e,t,n){e[t]=n},float32:function(e,t,n){e[t]=n},int32:function(e,t,n){e[t]=n},int16:function(e,t,n){e[t]=n},int8:function(e,t,n){e[t]=n},uint32:function(e,t,n){e[t]=n},uint16:function(e,t,n){e[t]=n},uint8:function(e,t,n){e[t]=n},uint8c:function(e,t,n){e[t]=n},generic:function(e,t,n){e[t]=n},default:function(e,t,n){e[t]=n}};e.exports=function(e){var n=t[e];return"function"===typeof n?n:t.default}},3500:(e,t,n)=>{var r=n(1697),a=n(1886),o=n(7400);e.exports=function(e,t){var n,i,l,s;for(n=t.length,s=0,l=0;l{var r=n(9014),a=n(1697),o=n(6132),i=n(1886),l=n(7400);e.exports=function(e){var t,n,s;for(t=[];!(n=e.next()).done;)if(s=n.value,r(s)&&s.length>=2)t.push(s[0],s[1]);else{if(!a(s))return new TypeError(o("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));t.push(i(s),l(s))}return t}},8846:(e,t,n)=>{var r=n(9014),a=n(1697),o=n(6132),i=n(1886),l=n(7400);e.exports=function(e,t,n){var s,u,c,d;for(s=[],d=-1;!(u=e.next()).done;)if(d+=1,c=t.call(n,u.value,d),r(c)&&c.length>=2)s.push(c[0],c[1]);else{if(!a(c))return new TypeError(o("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));s.push(i(c),l(c))}return s}},200:(e,t,n)=>{var r=n(5071);e.exports=r},5071:(e,t,n)=>{var r=n(5180).isPrimitive,a=n(9014),o=n(1317),i=n(6312),l=n(4750),s=n(258),u=n(3408),c=n(3629),d=n(1697),f=n(6246),h=n(872),p=n(4792),v=n(2771),m=n(7128),g=n(2510),y=n(404),b=n(9274),w=n(4023),x=n(2254),_=n(1886),S=n(7400),E=n(7730),R=n(5506),k=n(3193),O=n(6148),C=n(6264),A=n(6132),L=n(4936),T=n(8846),M=n(3500),j=2*w.BYTES_PER_ELEMENT,N=m();function I(e){return e instanceof D||"object"===typeof e&&null!==e&&("Complex64Array"===e.constructor.name||"Complex128Array"===e.constructor.name)&&"number"===typeof e._length&&"object"===typeof e._buffer}function P(e){return e===D||"Complex64Array"===e.name}function F(e,t){return new x(e[t*=2],e[t+1])}function D(){var e,t,n,a;if(t=arguments.length,!(this instanceof D))return 0===t?new D:1===t?new D(arguments[0]):2===t?new D(arguments[0],arguments[1]):new D(arguments[0],arguments[1],arguments[2]);if(0===t)n=new w(0);else if(1===t)if(r(arguments[0]))n=new w(2*arguments[0]);else if(o(arguments[0]))if((a=(n=arguments[0]).length)&&s(n)&&d(n[0])){if(null===(n=M(new w(2*a),n))){if(!f(a))throw new RangeError(A("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));n=new w(arguments[0])}}else{if(p(n))n=R(n,0);else if(v(n))n=k(n,0);else if(!f(a))throw new RangeError(A("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",a));n=new w(n)}else if(i(arguments[0])){if(!h((n=arguments[0]).byteLength/j))throw new RangeError(A("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",j,n.byteLength));n=new w(n)}else{if(!l(arguments[0]))throw new TypeError(A("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(n=arguments[0],!1===N)throw new TypeError(A("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",n));if(!c(n[g]))throw new TypeError(A("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if(n=n[g](),!c(n.next))throw new TypeError(A("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if((n=L(n))instanceof Error)throw n;n=new w(n)}else{if(!i(n=arguments[0]))throw new TypeError(A("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!r(e=arguments[1]))throw new TypeError(A("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",e));if(!h(e/j))throw new RangeError(A("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",j,e));if(2===t){if(a=n.byteLength-e,!h(a/j))throw new RangeError(A("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",j,a));n=new w(n,e)}else{if(!r(a=arguments[2]))throw new TypeError(A("invalid argument. Length must be a nonnegative integer. Value: `%s`.",a));if(a*j>n.byteLength-e)throw new RangeError(A("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",a*j));n=new w(n,e,2*a)}}return y(this,"_buffer",n),y(this,"_length",n.length/2),this}y(D,"BYTES_PER_ELEMENT",j),y(D,"name","Complex128Array"),y(D,"from",(function(e){var t,n,r,i,s,u,h,p,v,m,y,b;if(!c(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!P(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((n=arguments.length)>1){if(!c(r=arguments[1]))throw new TypeError(A("invalid argument. Second argument must be a function. Value: `%s`.",r));n>2&&(t=arguments[2])}if(I(e)){if(p=e.length,r){for(s=(i=new this(p))._buffer,b=0,y=0;y=2))throw new TypeError(A("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",m));s[b]=m[0],s[b+1]=m[1]}b+=2}return i}return new this(e)}if(o(e)){if(r){for(p=e.length,h=e.get&&e.set?C("default"):O("default"),y=0;y=2))throw new TypeError(A("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",m));s[b]=m[0],s[b+1]=m[1]}b+=2}return i}return new this(e)}if(l(e)&&N&&c(e[g])){if(s=e[g](),!c(s.next))throw new TypeError(A("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((u=r?T(s,r,t):L(s))instanceof Error)throw u;for(s=(i=new this(p=u.length/2))._buffer,y=0;y=this._length))return F(this._buffer,e)})),b(D.prototype,"buffer",(function(){return this._buffer.buffer})),b(D.prototype,"byteLength",(function(){return this._buffer.byteLength})),b(D.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),y(D.prototype,"BYTES_PER_ELEMENT",D.BYTES_PER_ELEMENT),y(D.prototype,"copyWithin",(function(e,t){if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*e,2*t):this._buffer.copyWithin(2*e,2*t,2*arguments[2]),this})),y(D.prototype,"entries",(function(){var e,t,n,r,a,o,i;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,e=this._buffer,r=this._length,o=-1,i=-2,y(n={},"next",(function(){var t;if(o+=1,a||o>=r)return{done:!0};return t=new x(e[i+=2],e[i+1]),{value:[o,t],done:!1}})),y(n,"return",(function(e){if(a=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),g&&y(n,g,(function(){return t.entries()})),n})),y(D.prototype,"every",(function(e,t){var n,r;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!c(e))throw new TypeError(A("invalid argument. First argument must be a function. Value: `%s`.",e));for(n=this._buffer,r=0;r1){if(!h(t))throw new TypeError(A("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=a)<0&&(t=0),arguments.length>2){if(!h(n))throw new TypeError(A("invalid argument. Third argument must be an integer. Value: `%s`.",n));n<0&&(n+=a)<0&&(n=0),n>a&&(n=a)}else n=a}else t=0,n=a;for(i=_(e),l=S(e),s=t;s=0;r--)if(a=F(n,r),e.call(t,a,r,this))return a})),y(D.prototype,"findLastIndex",(function(e,t){var n,r,a;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!c(e))throw new TypeError(A("invalid argument. First argument must be a function. Value: `%s`.",e));for(n=this._buffer,r=this._length-1;r>=0;r--)if(a=F(n,r),e.call(t,a,r,this))return r;return-1})),y(D.prototype,"forEach",(function(e,t){var n,r,a;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!c(e))throw new TypeError(A("invalid argument. First argument must be a function. Value: `%s`.",e));for(n=this._buffer,r=0;r=this._length))return F(this._buffer,e)})),b(D.prototype,"length",(function(){return this._length})),y(D.prototype,"includes",(function(e,t){var n,r,a,o,i;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!d(e))throw new TypeError(A("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!h(t))throw new TypeError(A("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(a=_(e),o=S(e),n=this._buffer,i=t;i1){if(!h(t))throw new TypeError(A("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(a=_(e),o=S(e),n=this._buffer,i=t;i1){if(!h(t))throw new TypeError(A("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(a=_(e),o=S(e),n=this._buffer,i=t;i>=0;i--)if(a===n[r=2*i]&&o===n[r+1])return i;return-1})),y(D.prototype,"map",(function(e,t){var n,r,o,i,l;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!c(e))throw new TypeError(A("invalid argument. First argument must be a function. Value: `%s`.",e));for(r=this._buffer,n=(o=new this.constructor(this._length))._buffer,i=0;i1)r=t,o=0;else{if(0===a)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");r=F(n,0),o=1}for(;o1){if(!r(n=arguments[1]))throw new TypeError(A("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",n))}else n=0;if(d(e)){if(n>=this._length)throw new RangeError(A("invalid argument. Index argument is out-of-bounds. Value: `%u`.",n));return a[n*=2]=_(e),void(a[n+1]=S(e))}if(I(e)){if(n+(s=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e._buffer,h=a.byteOffset+n*j,t.buffer===a.buffer&&t.byteOffseth){for(i=new w(t.length),c=0;cthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e,h=a.byteOffset+n*j,t.buffer===a.buffer&&t.byteOffseth){for(i=new w(s),c=0;cthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(n*=2,c=0;cl&&(t=l)}}for(n=ea&&(t=a)}}return e>=a?(a=0,n=r.byteLength):e>=t?(a=0,n=r.byteOffset+e*j):(a=t-e,n=r.byteOffset+e*j),new this.constructor(r.buffer,n,a<0?0:a)})),y(D.prototype,"toReversed",(function(){var e,t,n,r,a,o;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(n=this._length,t=new this.constructor(n),r=this._buffer,e=t._buffer,a=0;a=a)throw new RangeError(A("invalid argument. Index argument is out-of-bounds. Value: `%s`.",e));if(!d(t))throw new TypeError(A("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(n=(r=new this.constructor(this._buffer))._buffer)[2*e]=_(t),n[2*e+1]=S(t),r})),e.exports=D},4647:(e,t,n)=>{var r=n(1697),a=n(8212),o=n(3494);e.exports=function(e,t){var n,i,l,s;for(n=t.length,s=0,l=0;l{var r=n(9014),a=n(1697),o=n(8212),i=n(3494),l=n(6132);e.exports=function(e){var t,n,s;for(t=[];!(n=e.next()).done;)if(s=n.value,r(s)&&s.length>=2)t.push(s[0],s[1]);else{if(!a(s))return new TypeError(l("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));t.push(o(s),i(s))}return t}},2555:(e,t,n)=>{var r=n(9014),a=n(1697),o=n(8212),i=n(3494),l=n(6132);e.exports=function(e,t,n){var s,u,c,d;for(s=[],d=-1;!(u=e.next()).done;)if(d+=1,c=t.call(n,u.value,d),r(c)&&c.length>=2)s.push(c[0],c[1]);else{if(!a(c))return new TypeError(l("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));s.push(o(c),i(c))}return s}},9705:(e,t,n)=>{var r=n(3800);e.exports=r},3800:(e,t,n)=>{var r=n(5180).isPrimitive,a=n(9014),o=n(1317),i=n(6312),l=n(4750),s=n(258),u=n(3408).isPrimitive,c=n(3629),d=n(1697),f=n(6246),h=n(872),p=n(4792),v=n(2771),m=n(7128),g=n(2510),y=n(404),b=n(9274),w=n(3872),x=n(9341),_=n(6132),S=n(8212),E=n(3494),R=n(7730),k=n(5506),O=n(3193),C=n(6148),A=n(6264),L=n(522),T=n(2555),M=n(4647),j=2*w.BYTES_PER_ELEMENT,N=m();function I(e){return e instanceof D||"object"===typeof e&&null!==e&&("Complex64Array"===e.constructor.name||"Complex128Array"===e.constructor.name)&&"number"===typeof e._length&&"object"===typeof e._buffer}function P(e){return e===D||"Complex128Array"===e.name}function F(e,t){return new x(e[t*=2],e[t+1])}function D(){var e,t,n,a;if(t=arguments.length,!(this instanceof D))return 0===t?new D:1===t?new D(arguments[0]):2===t?new D(arguments[0],arguments[1]):new D(arguments[0],arguments[1],arguments[2]);if(0===t)n=new w(0);else if(1===t)if(r(arguments[0]))n=new w(2*arguments[0]);else if(o(arguments[0]))if((a=(n=arguments[0]).length)&&s(n)&&d(n[0])){if(null===(n=M(new w(2*a),n))){if(!f(a))throw new RangeError(_("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));n=new w(arguments[0])}}else{if(p(n))n=k(n,0);else if(v(n))n=O(n,0);else if(!f(a))throw new RangeError(_("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",a));n=new w(n)}else if(i(arguments[0])){if(!h((n=arguments[0]).byteLength/j))throw new RangeError(_("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",j,n.byteLength));n=new w(n)}else{if(!l(arguments[0]))throw new TypeError(_("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(n=arguments[0],!1===N)throw new TypeError(_("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",n));if(!c(n[g]))throw new TypeError(_("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if(n=n[g](),!c(n.next))throw new TypeError(_("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if((n=L(n))instanceof Error)throw n;n=new w(n)}else{if(!i(n=arguments[0]))throw new TypeError(_("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!r(e=arguments[1]))throw new TypeError(_("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",e));if(!h(e/j))throw new RangeError(_("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",j,e));if(2===t){if(a=n.byteLength-e,!h(a/j))throw new RangeError(_("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",j,a));n=new w(n,e)}else{if(!r(a=arguments[2]))throw new TypeError(_("invalid argument. Length must be a nonnegative integer. Value: `%s`.",a));if(a*j>n.byteLength-e)throw new RangeError(_("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",a*j));n=new w(n,e,2*a)}}return y(this,"_buffer",n),y(this,"_length",n.length/2),this}y(D,"BYTES_PER_ELEMENT",j),y(D,"name","Complex64Array"),y(D,"from",(function(e){var t,n,r,i,s,u,h,p,v,m,y,b;if(!c(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!P(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((n=arguments.length)>1){if(!c(r=arguments[1]))throw new TypeError(_("invalid argument. Second argument must be a function. Value: `%s`.",r));n>2&&(t=arguments[2])}if(I(e)){if(p=e.length,r){for(s=(i=new this(p))._buffer,b=0,y=0;y=2))throw new TypeError(_("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",m));s[b]=m[0],s[b+1]=m[1]}b+=2}return i}return new this(e)}if(o(e)){if(r){for(p=e.length,h=e.get&&e.set?A("default"):C("default"),y=0;y=2))throw new TypeError(_("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",m));s[b]=m[0],s[b+1]=m[1]}b+=2}return i}return new this(e)}if(l(e)&&N&&c(e[g])){if(s=e[g](),!c(s.next))throw new TypeError(_("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((u=r?T(s,r,t):L(s))instanceof Error)throw u;for(s=(i=new this(p=u.length/2))._buffer,y=0;y=this._length))return F(this._buffer,e)})),b(D.prototype,"buffer",(function(){return this._buffer.buffer})),b(D.prototype,"byteLength",(function(){return this._buffer.byteLength})),b(D.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),y(D.prototype,"BYTES_PER_ELEMENT",D.BYTES_PER_ELEMENT),y(D.prototype,"copyWithin",(function(e,t){if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*e,2*t):this._buffer.copyWithin(2*e,2*t,2*arguments[2]),this})),y(D.prototype,"entries",(function(){var e,t,n,r,a,o,i;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,e=this._buffer,r=this._length,o=-1,i=-2,y(n={},"next",(function(){var t;if(o+=1,a||o>=r)return{done:!0};return t=new x(e[i+=2],e[i+1]),{value:[o,t],done:!1}})),y(n,"return",(function(e){if(a=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),g&&y(n,g,(function(){return t.entries()})),n})),y(D.prototype,"every",(function(e,t){var n,r;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!c(e))throw new TypeError(_("invalid argument. First argument must be a function. Value: `%s`.",e));for(n=this._buffer,r=0;r1){if(!h(t))throw new TypeError(_("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=a)<0&&(t=0),arguments.length>2){if(!h(n))throw new TypeError(_("invalid argument. Third argument must be an integer. Value: `%s`.",n));n<0&&(n+=a)<0&&(n=0),n>a&&(n=a)}else n=a}else t=0,n=a;for(i=S(e),l=E(e),s=t;s=0;r--)if(a=F(n,r),e.call(t,a,r,this))return a})),y(D.prototype,"findLastIndex",(function(e,t){var n,r,a;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!c(e))throw new TypeError(_("invalid argument. First argument must be a function. Value: `%s`.",e));for(n=this._buffer,r=this._length-1;r>=0;r--)if(a=F(n,r),e.call(t,a,r,this))return r;return-1})),y(D.prototype,"forEach",(function(e,t){var n,r,a;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!c(e))throw new TypeError(_("invalid argument. First argument must be a function. Value: `%s`.",e));for(n=this._buffer,r=0;r=this._length))return F(this._buffer,e)})),y(D.prototype,"includes",(function(e,t){var n,r,a,o,i;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!d(e))throw new TypeError(_("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!h(t))throw new TypeError(_("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(a=S(e),o=E(e),n=this._buffer,i=t;i1){if(!h(t))throw new TypeError(_("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(a=S(e),o=E(e),n=this._buffer,i=t;i1){if(!h(t))throw new TypeError(_("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(a=S(e),o=E(e),n=this._buffer,i=t;i>=0;i--)if(a===n[r=2*i]&&o===n[r+1])return i;return-1})),b(D.prototype,"length",(function(){return this._length})),y(D.prototype,"map",(function(e,t){var n,r,o,i,l;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!c(e))throw new TypeError(_("invalid argument. First argument must be a function. Value: `%s`.",e));for(r=this._buffer,n=(o=new this.constructor(this._length))._buffer,i=0;i1)r=t,o=0;else{if(0===a)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");r=F(n,0),o=1}for(;o1){if(!r(n=arguments[1]))throw new TypeError(_("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",n))}else n=0;if(d(e)){if(n>=this._length)throw new RangeError(_("invalid argument. Index argument is out-of-bounds. Value: `%u`.",n));return a[n*=2]=S(e),void(a[n+1]=E(e))}if(I(e)){if(n+(s=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e._buffer,h=a.byteOffset+n*j,t.buffer===a.buffer&&t.byteOffseth){for(i=new w(t.length),c=0;cthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e,h=a.byteOffset+n*j,t.buffer===a.buffer&&t.byteOffseth){for(i=new w(s),c=0;cthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(n*=2,c=0;cl&&(t=l)}}for(n=ea&&(t=a)}}return e>=a?(a=0,n=r.byteLength):e>=t?(a=0,n=r.byteOffset+e*j):(a=t-e,n=r.byteOffset+e*j),new this.constructor(r.buffer,n,a<0?0:a)})),y(D.prototype,"toReversed",(function(){var e,t,n,r,a,o;if(!I(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(n=this._length,t=new this.constructor(n),r=this._buffer,e=t._buffer,a=0;a=a)throw new RangeError(_("invalid argument. Index argument is out-of-bounds. Value: `%s`.",e));if(!d(t))throw new TypeError(_("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(n=(r=new this.constructor(this._buffer))._buffer)[2*e]=S(t),n[2*e+1]=E(t),r})),e.exports=D},8639:e=>{e.exports={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128"}},6556:(e,t,n)=>{var r=n(4023),a=n(3872),o=n(6532),i=n(8271),l=n(6990),s=n(6461),u=n(9475),c=n(7720),d=[r,a,i,o,s,l,n(9518),u,c,n(9705),n(200)];e.exports=d},4046:e=>{e.exports=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128"]},435:(e,t,n)=>{var r=n(3822);e.exports=r},3822:(e,t,n)=>{var r=n(971),a=n(258),o=n(2793),i=n(8639),l=n(6556),s=n(4046),u=s.length;e.exports=function(e){var t;if(a(e))return"generic";if(r(e))return null;for(t=0;t{var r,a=n(3539),o=n(9959),i=n(6321);r=a()?o:i,e.exports=r},9959:e=>{var t="function"===typeof Float32Array?Float32Array:void 0;e.exports=t},6321:e=>{e.exports=function(){throw new Error("not implemented")}},4023:(e,t,n)=>{var r,a=n(7750),o=n(1170),i=n(4892);r=a()?o:i,e.exports=r},1170:e=>{var t="function"===typeof Float64Array?Float64Array:void 0;e.exports=t},4892:e=>{e.exports=function(){throw new Error("not implemented")}},6461:(e,t,n)=>{var r,a=n(9612),o=n(7842),i=n(6714);r=a()?o:i,e.exports=r},7842:e=>{var t="function"===typeof Int16Array?Int16Array:void 0;e.exports=t},6714:e=>{e.exports=function(){throw new Error("not implemented")}},8271:(e,t,n)=>{var r,a=n(1758),o=n(4330),i=n(6020);r=a()?o:i,e.exports=r},4330:e=>{var t="function"===typeof Int32Array?Int32Array:void 0;e.exports=t},6020:e=>{e.exports=function(){throw new Error("not implemented")}},9518:(e,t,n)=>{var r,a=n(3689),o=n(2049),i=n(3447);r=a()?o:i,e.exports=r},2049:e=>{var t="function"===typeof Int8Array?Int8Array:void 0;e.exports=t},3447:e=>{e.exports=function(){throw new Error("not implemented")}},1338:(e,t,n)=>{var r=n(9518),a=n(9475),o=n(7720),i=n(6461),l=n(6990),s=n(8271),u=n(6532),c=n(3872),d=[[n(4023),"Float64Array"],[c,"Float32Array"],[s,"Int32Array"],[u,"Uint32Array"],[i,"Int16Array"],[l,"Uint16Array"],[r,"Int8Array"],[a,"Uint8Array"],[o,"Uint8ClampedArray"],[n(9705),"Complex64Array"],[n(200),"Complex128Array"]];e.exports=d},9573:(e,t,n)=>{var r=n(6388);e.exports=r},6388:(e,t,n)=>{var r=n(3107),a=n(8374),o=n(5506),i=n(3193),l=n(6132),s=n(4537);e.exports=function(e){var t,n,u;if(r(e))t=e;else{if(!a(e))throw new TypeError(l("invalid argument. Must provide a typed array. Value: `%s`.",e));t=8===e.BYTES_PER_ELEMENT?o(e,0):i(e,0)}for(n={type:s(e),data:[]},u=0;u{var r=n(6993),a=n(2793),o=n(9578),i=n(1338);e.exports=function(e){var t,n;for(n=0;n{var r,a=n(7945),o=n(1489),i=n(3719);r=a()?o:i,e.exports=r},1489:e=>{var t="function"===typeof Uint16Array?Uint16Array:void 0;e.exports=t},3719:e=>{e.exports=function(){throw new Error("not implemented")}},6532:(e,t,n)=>{var r,a=n(6863),o=n(7019),i=n(9437);r=a()?o:i,e.exports=r},7019:e=>{var t="function"===typeof Uint32Array?Uint32Array:void 0;e.exports=t},9437:e=>{e.exports=function(){throw new Error("not implemented")}},9475:(e,t,n)=>{var r,a=n(5954),o=n(7086),i=n(4336);r=a()?o:i,e.exports=r},7086:e=>{var t="function"===typeof Uint8Array?Uint8Array:void 0;e.exports=t},4336:e=>{e.exports=function(){throw new Error("not implemented")}},7720:(e,t,n)=>{var r,a=n(3978),o=n(3391),i=n(1241);r=a()?o:i,e.exports=r},3391:e=>{var t="function"===typeof Uint8ClampedArray?Uint8ClampedArray:void 0;e.exports=t},1241:e=>{e.exports=function(){throw new Error("not implemented")}},9567:e=>{var t="function"===typeof Float32Array?Float32Array:null;e.exports=t},3539:(e,t,n)=>{var r=n(1534);e.exports=r},1534:(e,t,n)=>{var r=n(2825),a=n(2857),o=n(9567);e.exports=function(){var e,t;if("function"!==typeof o)return!1;try{t=new o([1,3.14,-3.14,5e40]),e=r(t)&&1===t[0]&&3.140000104904175===t[1]&&-3.140000104904175===t[2]&&t[3]===a}catch(n){e=!1}return e}},5829:e=>{var t="function"===typeof Float64Array?Float64Array:null;e.exports=t},7750:(e,t,n)=>{var r=n(8265);e.exports=r},8265:(e,t,n)=>{var r=n(9220),a=n(5829);e.exports=function(){var e,t;if("function"!==typeof a)return!1;try{t=new a([1,3.14,-3.14,NaN]),e=r(t)&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!==t[3]}catch(n){e=!1}return e}},6745:e=>{e.exports=function(){}},2357:(e,t,n)=>{var r=n(9076);e.exports=r},9076:(e,t,n)=>{var r=n(6745);e.exports=function(){return"foo"===r.name}},9612:(e,t,n)=>{var r=n(1011);e.exports=r},953:e=>{var t="function"===typeof Int16Array?Int16Array:null;e.exports=t},1011:(e,t,n)=>{var r=n(7646),a=n(9530),o=n(380),i=n(953);e.exports=function(){var e,t;if("function"!==typeof i)return!1;try{t=new i([1,3.14,-3.14,a+1]),e=r(t)&&1===t[0]&&3===t[1]&&-3===t[2]&&t[3]===o}catch(n){e=!1}return e}},1758:(e,t,n)=>{var r=n(5409);e.exports=r},6901:e=>{var t="function"===typeof Int32Array?Int32Array:null;e.exports=t},5409:(e,t,n)=>{var r=n(6668),a=n(780),o=n(2042),i=n(6901);e.exports=function(){var e,t;if("function"!==typeof i)return!1;try{t=new i([1,3.14,-3.14,a+1]),e=r(t)&&1===t[0]&&3===t[1]&&-3===t[2]&&t[3]===o}catch(n){e=!1}return e}},3689:(e,t,n)=>{var r=n(1048);e.exports=r},8533:e=>{var t="function"===typeof Int8Array?Int8Array:null;e.exports=t},1048:(e,t,n)=>{var r=n(6195),a=n(3033),o=n(2403),i=n(8533);e.exports=function(){var e,t;if("function"!==typeof i)return!1;try{t=new i([1,3.14,-3.14,a+1]),e=r(t)&&1===t[0]&&3===t[1]&&-3===t[2]&&t[3]===o}catch(n){e=!1}return e}},7128:(e,t,n)=>{var r=n(2703);e.exports=r},2703:(e,t,n)=>{var r=n(7615),a=n(2490);e.exports=function(){return"function"===typeof a&&"symbol"===typeof a("foo")&&r(a,"iterator")&&"symbol"===typeof a.iterator}},7615:(e,t,n)=>{var r=n(2010);e.exports=r},2010:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return void 0!==e&&null!==e&&t.call(e,n)}},1767:(e,t,n)=>{var r=n(2322);e.exports=r},2322:e=>{e.exports=function(){return"function"===typeof Symbol&&"symbol"===typeof Symbol("foo")}},9681:(e,t,n)=>{var r=n(5376);e.exports=r},5376:(e,t,n)=>{var r=n(1767)();e.exports=function(){return r&&"symbol"===typeof Symbol.toStringTag}},7945:(e,t,n)=>{var r=n(7336);e.exports=r},7336:(e,t,n)=>{var r=n(8563),a=n(2761),o=n(4845);e.exports=function(){var e,t;if("function"!==typeof o)return!1;try{t=new o(t=[1,3.14,-3.14,a+1,a+2]),e=r(t)&&1===t[0]&&3===t[1]&&t[2]===a-2&&0===t[3]&&1===t[4]}catch(n){e=!1}return e}},4845:e=>{var t="function"===typeof Uint16Array?Uint16Array:null;e.exports=t},6863:(e,t,n)=>{var r=n(6890);e.exports=r},6890:(e,t,n)=>{var r=n(3973),a=n(3335),o=n(633);e.exports=function(){var e,t;if("function"!==typeof o)return!1;try{t=new o(t=[1,3.14,-3.14,a+1,a+2]),e=r(t)&&1===t[0]&&3===t[1]&&t[2]===a-2&&0===t[3]&&1===t[4]}catch(n){e=!1}return e}},633:e=>{var t="function"===typeof Uint32Array?Uint32Array:null;e.exports=t},5954:(e,t,n)=>{var r=n(5349);e.exports=r},5349:(e,t,n)=>{var r=n(6424),a=n(4264),o=n(7869);e.exports=function(){var e,t;if("function"!==typeof o)return!1;try{t=new o(t=[1,3.14,-3.14,a+1,a+2]),e=r(t)&&1===t[0]&&3===t[1]&&t[2]===a-2&&0===t[3]&&1===t[4]}catch(n){e=!1}return e}},7869:e=>{var t="function"===typeof Uint8Array?Uint8Array:null;e.exports=t},3978:(e,t,n)=>{var r=n(3517);e.exports=r},3517:(e,t,n)=>{var r=n(5336),a=n(541);e.exports=function(){var e,t;if("function"!==typeof a)return!1;try{t=new a([-1,0,1,3.14,4.99,255,256]),e=r(t)&&0===t[0]&&0===t[1]&&1===t[2]&&3===t[3]&&5===t[4]&&255===t[5]&&255===t[6]}catch(n){e=!1}return e}},541:e=>{var t="function"===typeof Uint8ClampedArray?Uint8ClampedArray:null;e.exports=t},6993:(e,t,n)=>{var r=n(2512);e.exports=r},2512:(e,t,n)=>{var r=n(6132);e.exports=function(e,t){if("function"!==typeof t)throw new TypeError(r("invalid argument. Second argument must be callable. Value: `%s`.",t));return e instanceof t}},9568:(e,t,n)=>{var r,a=n(994);r=function(){return a(arguments)}(),e.exports=r},6631:(e,t,n)=>{var r,a=n(9568),o=n(994),i=n(2524);r=a?o:i,e.exports=r},994:(e,t,n)=>{var r=n(9359);e.exports=function(e){return"[object Arguments]"===r(e)}},2524:(e,t,n)=>{var r=n(7615),a=n(9767),o=n(258),i=n(872),l=n(3335);e.exports=function(e){return null!==e&&"object"===typeof e&&!o(e)&&"number"===typeof e.length&&i(e.length)&&e.length>=0&&e.length<=l&&r(e,"callee")&&!a(e,"callee")}},9014:(e,t,n)=>{var r=n(4313);e.exports=r},4313:(e,t,n)=>{var r=n(872),a=n(5680);e.exports=function(e){return"object"===typeof e&&null!==e&&"number"===typeof e.length&&r(e.length)&&e.length>=0&&e.length<=a}},258:(e,t,n)=>{var r=n(8517);e.exports=r},8517:(e,t,n)=>{var r,a=n(9359);r=Array.isArray?Array.isArray:function(e){return"[object Array]"===a(e)},e.exports=r},6312:(e,t,n)=>{var r=n(3983);e.exports=r},3983:(e,t,n)=>{var r=n(9359),a="function"===typeof ArrayBuffer;e.exports=function(e){return a&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===r(e)}},5111:(e,t,n)=>{var r=n(404),a=n(2194),o=n(2542),i=n(6488);r(a,"isPrimitive",o),r(a,"isObject",i),e.exports=a},2194:(e,t,n)=>{var r=n(2542),a=n(6488);e.exports=function(e){return r(e)||a(e)}},6488:(e,t,n)=>{var r=n(9681),a=n(9359),o=n(844),i=n(7810),l=r();e.exports=function(e){return"object"===typeof e&&(e instanceof o||(l?i(e):"[object Boolean]"===a(e)))}},2542:e=>{e.exports=function(e){return"boolean"===typeof e}},3711:e=>{var t=Boolean.prototype.toString;e.exports=t},7810:(e,t,n)=>{var r=n(3711);e.exports=function(e){try{return r.call(e),!0}catch(t){return!1}}},971:(e,t,n)=>{var r=n(8806);e.exports=r},8806:(e,t,n)=>{var r=n(4242);e.exports=function(e){return r(e)&&(e._isBuffer||e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))}},1317:(e,t,n)=>{var r=n(8292);e.exports=r},8292:(e,t,n)=>{var r=n(872),a=n(1747);e.exports=function(e){return"object"===typeof e&&null!==e&&"number"===typeof e.length&&r(e.length)&&e.length>=0&&e.length<=a}},1697:(e,t,n)=>{var r=n(8480);e.exports=r},8480:(e,t,n)=>{var r=n(2254),a=n(9341);e.exports=function(e){return e instanceof r||e instanceof a||"object"===typeof e&&null!==e&&"number"===typeof e.re&&"number"===typeof e.im}},6437:(e,t,n)=>{var r=n(9705),a=[n(200),r];e.exports=a},8374:(e,t,n)=>{var r=n(8281);e.exports=r},8281:(e,t,n)=>{var r=n(2793),a=n(9578),o=n(6437),i=n(2722);e.exports=function(e){var t,n;if("object"!==typeof e||null===e)return!1;for(n=0;n{var r;r=!n(6484).call("beep","0"),e.exports=r},9767:(e,t,n)=>{var r=n(8578);e.exports=r},8578:(e,t,n)=>{var r=n(3408),a=n(830).isPrimitive,o=n(4689).isPrimitive,i=n(6484),l=n(5053);e.exports=function(e,t){var n;return void 0!==e&&null!==e&&(!(n=i.call(e,t))&&l&&r(e)?!a(t=+t)&&o(t)&&t>=0&&t{var t=Object.prototype.propertyIsEnumerable;e.exports=t},2825:(e,t,n)=>{var r=n(3736);e.exports=r},3736:(e,t,n)=>{var r=n(9359),a="function"===typeof Float32Array;e.exports=function(e){return a&&e instanceof Float32Array||"[object Float32Array]"===r(e)}},9220:(e,t,n)=>{var r=n(27);e.exports=r},27:(e,t,n)=>{var r=n(9359),a="function"===typeof Float64Array;e.exports=function(e){return a&&e instanceof Float64Array||"[object Float64Array]"===r(e)}},3629:(e,t,n)=>{var r=n(8236);e.exports=r},8236:(e,t,n)=>{var r=n(6253);e.exports=function(e){return"function"===r(e)}},7646:(e,t,n)=>{var r=n(9905);e.exports=r},9905:(e,t,n)=>{var r=n(9359),a="function"===typeof Int16Array;e.exports=function(e){return a&&e instanceof Int16Array||"[object Int16Array]"===r(e)}},6668:(e,t,n)=>{var r=n(6259);e.exports=r},6259:(e,t,n)=>{var r=n(9359),a="function"===typeof Int32Array;e.exports=function(e){return a&&e instanceof Int32Array||"[object Int32Array]"===r(e)}},6195:(e,t,n)=>{var r=n(9870);e.exports=r},9870:(e,t,n)=>{var r=n(9359),a="function"===typeof Int8Array;e.exports=function(e){return a&&e instanceof Int8Array||"[object Int8Array]"===r(e)}},4689:(e,t,n)=>{var r=n(404),a=n(3360),o=n(7588),i=n(3674);r(a,"isPrimitive",o),r(a,"isObject",i),e.exports=a},7987:(e,t,n)=>{var r=n(2857),a=n(8239),o=n(872);e.exports=function(e){return ea&&o(e)}},3360:(e,t,n)=>{var r=n(7588),a=n(3674);e.exports=function(e){return r(e)||a(e)}},3674:(e,t,n)=>{var r=n(2280).isObject,a=n(7987);e.exports=function(e){return r(e)&&a(e.valueOf())}},7588:(e,t,n)=>{var r=n(2280).isPrimitive,a=n(7987);e.exports=function(e){return r(e)&&a(e)}},7536:(e,t,n)=>{var r=n(9475),a={uint16:n(6990),uint8:r};e.exports=a},735:(e,t,n)=>{var r=n(5498);e.exports=r},5498:(e,t,n)=>{var r,a=n(7536);r=function(){var e;return(e=new a.uint16(1))[0]=4660,52===new a.uint8(e.buffer)[0]}(),e.exports=r},830:(e,t,n)=>{var r=n(404),a=n(8625),o=n(8859),i=n(2131);r(a,"isPrimitive",o),r(a,"isObject",i),e.exports=a},8625:(e,t,n)=>{var r=n(8859),a=n(2131);e.exports=function(e){return r(e)||a(e)}},2131:(e,t,n)=>{var r=n(2280).isObject,a=n(6679);e.exports=function(e){return r(e)&&a(e.valueOf())}},8859:(e,t,n)=>{var r=n(2280).isPrimitive,a=n(6679);e.exports=function(e){return r(e)&&a(e)}},5180:(e,t,n)=>{var r=n(404),a=n(483),o=n(6605),i=n(6057);r(a,"isPrimitive",o),r(a,"isObject",i),e.exports=a},483:(e,t,n)=>{var r=n(6605),a=n(6057);e.exports=function(e){return r(e)||a(e)}},6057:(e,t,n)=>{var r=n(4689).isObject;e.exports=function(e){return r(e)&&e.valueOf()>=0}},6605:(e,t,n)=>{var r=n(4689).isPrimitive;e.exports=function(e){return r(e)&&e>=0}},2280:(e,t,n)=>{var r=n(404),a=n(223),o=n(1905),i=n(3117);r(a,"isPrimitive",o),r(a,"isObject",i),e.exports=a},223:(e,t,n)=>{var r=n(1905),a=n(3117);e.exports=function(e){return r(e)||a(e)}},3117:(e,t,n)=>{var r=n(9681),a=n(9359),o=n(2125),i=n(8253),l=r();e.exports=function(e){return"object"===typeof e&&(e instanceof o||(l?i(e):"[object Number]"===a(e)))}},1905:e=>{e.exports=function(e){return"number"===typeof e}},3318:(e,t,n)=>{var r=n(2125).prototype.toString;e.exports=r},8253:(e,t,n)=>{var r=n(3318);e.exports=function(e){try{return r.call(e),!0}catch(t){return!1}}},4242:(e,t,n)=>{var r=n(404),a=n(6188),o=n(7349);r(o,"isObjectLikeArray",a(o)),e.exports=o},7349:e=>{e.exports=function(e){return null!==e&&"object"===typeof e}},4750:(e,t,n)=>{var r=n(3633);e.exports=r},3633:(e,t,n)=>{var r=n(258);e.exports=function(e){return"object"===typeof e&&null!==e&&!r(e)}},5417:(e,t,n)=>{var r=n(1640);e.exports=r},1640:(e,t,n)=>{var r=n(4750),a=n(3629),o=n(9578),i=n(7615),l=n(9359),s=Object.prototype;e.exports=function(e){var t;return!!r(e)&&(!(t=o(e))||!i(e,"constructor")&&i(t,"constructor")&&a(t.constructor)&&"[object Function]"===l(t.constructor)&&i(t,"isPrototypeOf")&&a(t.isPrototypeOf)&&(t===s||function(e){var t;for(t in e)if(!i(e,t))return!1;return!0}(e)))}},2001:(e,t,n)=>{var r=n(404),a=n(7968),o=n(5460),i=n(810);r(a,"isPrimitive",o),r(a,"isObject",i),e.exports=a},7968:(e,t,n)=>{var r=n(5460),a=n(810);e.exports=function(e){return r(e)||a(e)}},810:(e,t,n)=>{var r=n(4689).isObject;e.exports=function(e){return r(e)&&e.valueOf()>0}},5460:(e,t,n)=>{var r=n(4689).isPrimitive;e.exports=function(e){return r(e)&&e>0}},280:(e,t,n)=>{var r=n(404),a=n(7775),o=n(4337),i=n(6109);r(a,"isPrimitive",o),r(a,"isObject",i),e.exports=a},7775:(e,t,n)=>{var r=n(4337),a=n(6109);e.exports=function(e){return r(e)||a(e)}},6109:(e,t,n)=>{var r=n(2280).isObject;e.exports=function(e){return r(e)&&e.valueOf()>0}},4337:(e,t,n)=>{var r=n(2280).isPrimitive;e.exports=function(e){return r(e)&&e>0}},3408:(e,t,n)=>{var r=n(404),a=n(6263),o=n(6473),i=n(3909);r(a,"isPrimitive",o),r(a,"isObject",i),e.exports=a},6263:(e,t,n)=>{var r=n(6473),a=n(3909);e.exports=function(e){return r(e)||a(e)}},3909:(e,t,n)=>{var r=n(9681),a=n(9359),o=n(1679),i=r();e.exports=function(e){return"object"===typeof e&&(e instanceof String||(i?o(e):"[object String]"===a(e)))}},6473:e=>{e.exports=function(e){return"string"===typeof e}},1679:(e,t,n)=>{var r=n(3960);e.exports=function(e){try{return r.call(e),!0}catch(t){return!1}}},3960:e=>{var t=String.prototype.valueOf;e.exports=t},5580:(e,t,n)=>{var r=n(9518),a=n(9475),o=n(7720),i=n(6461),l=n(6990),s=n(8271),u=n(6532),c=n(3872),d=[n(4023),c,s,u,i,l,r,a,o];e.exports=d},3107:(e,t,n)=>{var r=n(4174);e.exports=r},4174:(e,t,n)=>{var r=n(2793),a=n(5527),o=n(9578),i=n(7750),l=n(4023),s=n(5580),u=n(2447),c=i()?o(l):d;function d(){}c="TypedArray"===a(c)?c:d,e.exports=function(e){var t,n;if("object"!==typeof e||null===e)return!1;if(e instanceof c)return!0;for(n=0;n{var r=n(4590);e.exports=r},4590:(e,t,n)=>{var r=n(9359),a="function"===typeof Uint16Array;e.exports=function(e){return a&&e instanceof Uint16Array||"[object Uint16Array]"===r(e)}},3973:(e,t,n)=>{var r=n(9636);e.exports=r},9636:(e,t,n)=>{var r=n(9359),a="function"===typeof Uint32Array;e.exports=function(e){return a&&e instanceof Uint32Array||"[object Uint32Array]"===r(e)}},6424:(e,t,n)=>{var r=n(5231);e.exports=r},5231:(e,t,n)=>{var r=n(9359),a="function"===typeof Uint8Array;e.exports=function(e){return a&&e instanceof Uint8Array||"[object Uint8Array]"===r(e)}},5336:(e,t,n)=>{var r=n(9996);e.exports=r},9996:(e,t,n)=>{var r=n(9359),a="function"===typeof Uint8ClampedArray;e.exports=function(e){return a&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===r(e)}},6188:(e,t,n)=>{var r=n(1907);e.exports=r},1907:(e,t,n)=>{var r=n(258),a=n(6132);e.exports=function(e){if("function"!==typeof e)throw new TypeError(a("invalid argument. Must provide a function. Value: `%s`.",e));return function(t){var n,a;if(!r(t))return!1;if(0===(n=t.length))return!1;for(a=0;a{e.exports=function(e,t,n,r,a,o,i){var l,s,u,c,d,f,h;for(l=t.data,s=a.data,c=t.accessors[0],u=a.accessors[1],d=r,f=i,h=0;h{var r=n(404),a=n(4441);r(a,"ndarray",n(713)),e.exports=a},4441:(e,t,n)=>{var r=n(2508),a=n(6438);e.exports=function(e,t,n,o,i){var l,s,u,c,d,f;if(e<=0)return o;if(u=r(t),c=r(o),u.accessorProtocol||c.accessorProtocol)return a(e,u,n,l=n<0?(1-e)*n:0,c,i,s=i<0?(1-e)*i:0),c.data;if(1===n&&1===i){if((d=e%8)>0)for(f=0;f{var r=n(2508),a=n(6438);e.exports=function(e,t,n,o,i,l,s){var u,c,d,f,h,p;if(e<=0)return i;if(d=r(t),f=r(i),d.accessorProtocol||f.accessorProtocol)return a(e,d,n,o,f,l,s),f.data;if(u=o,c=s,1===n&&1===l){if((h=e%8)>0)for(p=0;p{var r=n(9347);e.exports=r},9347:e=>{var t=Boolean;e.exports=t},9341:(e,t,n)=>{var r=n(3372);e.exports=r},3372:(e,t,n)=>{var r=n(2280).isPrimitive,a=n(9872),o=n(404),i=n(3887),l=n(6132),s=n(7345),u=n(5810);function c(e,t){if(!(this instanceof c))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!r(e))throw new TypeError(l("invalid argument. Real component must be a number. Value: `%s`.",e));if(!r(t))throw new TypeError(l("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return a(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:i(e)}),a(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:i(t)}),this}o(c,"BYTES_PER_ELEMENT",4),o(c.prototype,"BYTES_PER_ELEMENT",4),o(c.prototype,"byteLength",8),o(c.prototype,"toString",s),o(c.prototype,"toJSON",u),e.exports=c},5810:e=>{e.exports=function(){var e={type:"Complex64"};return e.re=this.re,e.im=this.im,e}},7345:e=>{e.exports=function(){var e=""+this.re;return this.im<0?e+=" - "+-this.im:e+=" + "+this.im,e+="i"}},2254:(e,t,n)=>{var r=n(4737);e.exports=r},4737:(e,t,n)=>{var r=n(2280).isPrimitive,a=n(9872),o=n(404),i=n(6132),l=n(7736),s=n(2019);function u(e,t){if(!(this instanceof u))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!r(e))throw new TypeError(i("invalid argument. Real component must be a number. Value: `%s`.",e));if(!r(t))throw new TypeError(i("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return a(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:e}),a(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:t}),this}o(u,"BYTES_PER_ELEMENT",8),o(u.prototype,"BYTES_PER_ELEMENT",8),o(u.prototype,"byteLength",16),o(u.prototype,"toString",l),o(u.prototype,"toJSON",s),e.exports=u},2019:e=>{e.exports=function(){var e={type:"Complex128"};return e.re=this.re,e.im=this.im,e}},7736:e=>{e.exports=function(){var e=""+this.re;return this.im<0?e+=" - "+-this.im:e+=" + "+this.im,e+="i"}},7400:(e,t,n)=>{var r=n(4015);e.exports=r},4015:e=>{e.exports=function(e){return e.im}},3494:(e,t,n)=>{var r=n(6678);e.exports=r},6678:e=>{e.exports=function(e){return e.im}},1886:(e,t,n)=>{var r=n(7537);e.exports=r},7537:e=>{e.exports=function(e){return e.re}},8212:(e,t,n)=>{var r=n(2955);e.exports=r},2955:e=>{e.exports=function(e){return e.re}},5680:e=>{e.exports=4294967295},1747:e=>{e.exports=9007199254740991},5129:e=>{e.exports=1023},1955:e=>{e.exports=2147483647},8666:e=>{e.exports=2146435072},4004:e=>{e.exports=2147483648},1850:e=>{e.exports=1048575},2587:e=>{e.exports=.6931471805599453},5748:e=>{e.exports=-1023},1384:e=>{e.exports=1023},3285:e=>{e.exports=9007199254740991},3210:e=>{e.exports=-1074},8239:(e,t,n)=>{var r=n(2125).NEGATIVE_INFINITY;e.exports=r},2857:e=>{var t=Number.POSITIVE_INFINITY;e.exports=t},7013:e=>{e.exports=22250738585072014e-324},9530:e=>{e.exports=32767},380:e=>{e.exports=-32768},780:e=>{e.exports=2147483647},2042:e=>{e.exports=-2147483648},3033:e=>{e.exports=127},2403:e=>{e.exports=-128},2761:e=>{e.exports=65535},3335:e=>{e.exports=4294967295},4264:e=>{e.exports=255},6246:(e,t,n)=>{var r=n(9897);e.exports=r},9897:(e,t,n)=>{var r=n(872);e.exports=function(e){return r(e/2)}},7182:(e,t,n)=>{var r=n(2801);e.exports=r},2801:(e,t,n)=>{var r=n(2857),a=n(8239);e.exports=function(e){return e===r||e===a}},872:(e,t,n)=>{var r=n(2927);e.exports=r},2927:(e,t,n)=>{var r=n(7730);e.exports=function(e){return r(e)===e}},6679:(e,t,n)=>{var r=n(7970);e.exports=r},7970:e=>{e.exports=function(e){return e!==e}},411:(e,t,n)=>{var r=n(8694);e.exports=r},8694:(e,t,n)=>{var r=n(6246);e.exports=function(e){return r(e>0?e-1:e+1)}},5542:(e,t,n)=>{var r=n(5737);e.exports=r},5737:(e,t,n)=>{var r=n(2857);e.exports=function(e){return 0===e&&1/e===r}},5350:(e,t,n)=>{var r=n(4297);e.exports=r},4297:e=>{e.exports=function(e,t){var n,r;return((n=(65535&(e>>>=0))>>>0)*(r=(65535&(t>>>=0))>>>0)>>>0)+((e>>>16>>>0)*r+n*(t>>>16>>>0)<<16>>>0)>>>0}},2712:(e,t,n)=>{var r=n(5023);e.exports=r},5023:e=>{e.exports=function(e){return Math.abs(e)}},4037:(e,t,n)=>{var r=n(8932);e.exports=r},8932:e=>{var t=Math.ceil;e.exports=t},940:(e,t,n)=>{var r=n(2243);e.exports=r},2243:(e,t,n)=>{var r=n(4004),a=n(1955),o=n(2105),i=n(4126),l=n(6056),s=[0,0];e.exports=function(e,t){var n,u;return o.assign(e,s,1,0),n=s[0],n&=a,u=i(t),l(n|=u&=r,s[1])}},331:(e,t,n)=>{var r=n(1127),a=n(7713);e.exports=function(e,t,n){var o,i,l;return l=(o=e-t)-(i=o*o)*a(i),r(1-(t-o*l/(2-l)-e),n)}},375:(e,t,n)=>{var r=n(4466);e.exports=r},4466:(e,t,n)=>{var r=n(6679),a=n(7882),o=n(8239),i=n(2857),l=n(331),s=1.4426950408889634,u=1/(1<<28),c=-u;e.exports=function(e){var t;return r(e)||e===i?e:e===o?0:e>709.782712893384?i:e<-745.1332191019411?0:e>c&&e{e.exports=function(e){return 0===e?.16666666666666602:.16666666666666602+e*(e*(6613756321437934e-20+e*(4.1381367970572385e-8*e-16533902205465252e-22))-.0027777777777015593)}},7730:(e,t,n)=>{var r=n(8885);e.exports=r},8885:e=>{var t=Math.floor;e.exports=t},1127:(e,t,n)=>{var r=n(3266);e.exports=r},3266:(e,t,n)=>{var r=n(2857),a=n(8239),o=n(5129),i=n(1384),l=n(5748),s=n(3210),u=n(6679),c=n(7182),d=n(940),f=n(99).assign,h=n(3015),p=n(2105),v=n(6056),m=[0,0],g=[0,0];e.exports=function(e,t){var n,y;return 0===t||0===e||u(e)||c(e)?e:(f(e,m,1,0),t+=m[1],(t+=h(e=m[0]))i?e<0?a:r:(t<=l?(t+=52,y=2220446049250313e-31):y=1,p.assign(e,g,1,0),n=g[0],n&=2148532223,y*v(n|=t+o<<20,g[1])))}},2522:(e,t,n)=>{var r=n(9117);e.exports=r},9117:(e,t,n)=>{var r=n(4126),a=n(730),o=n(6679),i=n(5129),l=n(8239),s=n(3908),u=n(1851),c=.6931471803691238,d=1.9082149292705877e-10,f=1048575;e.exports=function(e){var t,n,h,p,v,m,g,y,b,w,x;return 0===e?l:o(e)||e<0?NaN:(p=0,(n=r(e))<1048576&&(p-=54,n=r(e*=0x40000000000000)),n>=2146435072?e+e:(p+=(n>>20)-i|0,p+=(g=(n&=f)+614244&1048576)>>20,m=(e=a(e,n|1072693248^g))-1,(f&2+n)<3?0===m?0===p?0:p*c+p*d:(v=m*m*(.5-.3333333333333333*m),0===p?m-v:p*c-(v-p*d-m)):(g=n-398458|0,y=440401-n|0,h=(w=(x=(b=m/(2+m))*b)*x)*s(w),v=x*u(w)+h,(g|=y)>0?(t=.5*m*m,0===p?m-(t-b*(t+v)):p*c-(t-(b*(t+v)+p*d)-m)):0===p?m-b*(m-v):p*c-(b*(m-v)-p*d-m))))}},3908:e=>{e.exports=function(e){return 0===e?.3999999999940942:.3999999999940942+e*(.22222198432149784+.15313837699209373*e)}},1851:e=>{e.exports=function(e){return 0===e?.6666666666666735:.6666666666666735+e*(.2857142874366239+e*(.1818357216161805+.14798198605116586*e))}},6666:(e,t,n)=>{var r=n(1885);e.exports=r},1885:(e,t,n)=>{var r=n(5542),a=n(6679),o=n(2857);e.exports=function(e,t){return a(e)||a(t)?NaN:e===o||t===o?o:e===t&&0===e?r(e)?e:t:e>t?e:t}},3898:(e,t,n)=>{var r=n(189);e.exports=r},4173:(e,t,n)=>{var r=n(4126),a=n(4422),o=n(730),i=n(5129),l=n(2448),s=1048576,u=[1,1.5],c=[0,.5849624872207642],d=[0,1.350039202129749e-8];e.exports=function(e,t,n){var f,h,p,v,m,g,y,b,w,x,_,S,E,R,k,O,C,A,L,T;return A=0,n>20)-i|0,n=1072693248|(L=1048575&n),L<=235662?T=0:L<767610?T=1:(T=0,A+=1,n-=s),f=524288+(n>>1|536870912),m=(C=1/((t=o(t,n))+(y=u[T])))*((O=t-y)-(v=a(h=O*C,0))*(g=o(0,f+=T<<18))-v*(t-(g-y))),k=(p=h*h)*p*l(p),g=a(g=3+(p=v*v)+(k+=m*(v+h)),0),E=(_=-7.028461650952758e-9*(w=a(w=(O=v*g)+(C=m*g+(k-(g-3-p))*h),0))+.9617966939259756*(C-(w-O))+d[T])-((S=a(S=(x=.9617967009544373*w)+_+(b=c[T])+(R=A),0))-R-b-x),e[0]=S,e[1]=E,e}},4490:(e,t,n)=>{var r=n(4422),a=n(6049);e.exports=function(e,t){var n,o,i,l,s;return n=(s=1.9259629911266175e-8*(i=t-1)-1.4426950408889634*(i*i*a(i)))-((o=r(o=(l=1.4426950216293335*i)+s,0))-l),e[0]=o,e[1]=n,e}},189:(e,t,n)=>{var r=n(6679),a=n(411),o=n(7182),i=n(872),l=n(2314),s=n(2712),u=n(2105),c=n(4422),d=n(5163),f=n(8239),h=n(2857),p=n(1955),v=n(6950),m=n(9788),g=n(1167),y=n(4173),b=n(4490),w=n(4383),x=1083179008,_=1e300,S=1e-300,E=[0,0],R=[0,0];e.exports=function e(t,n){var k,O,C,A,L,T,M,j,N,I,P,F,D,B;if(r(t)||r(n))return NaN;if(u.assign(n,E,1,0),L=E[0],0===E[1]){if(0===n)return 1;if(1===n)return t;if(-1===n)return 1/t;if(.5===n)return l(t);if(-.5===n)return 1/l(t);if(2===n)return t*t;if(3===n)return t*t*t;if(4===n)return(t*=t)*t;if(o(n))return g(t,n)}if(u.assign(t,E,1,0),A=E[0],0===E[1]){if(0===A)return v(t,n);if(1===t)return 1;if(-1===t&&a(n))return-1;if(o(t))return t===f?e(-0,-n):n<0?0:h}if(t<0&&!1===i(n))return(t-t)/(t-t);if(C=s(t),k=A&p,O=L&p,M=L>>>31|0,T=(T=A>>>31|0)&&a(n)?-1:1,O>1105199104){if(O>1139802112)return m(t,n);if(k<1072693247)return 1===M?T*_*_:T*S*S;if(k>1072693248)return 0===M?T*_*_:T*S*S;P=b(R,C)}else P=y(R,C,k);if(F=(I=(n-(j=c(n,0)))*P[0]+n*P[1])+(N=j*P[0]),u.assign(F,E,1,0),D=d(E[0]),B=d(E[1]),D>=x){if(0!==(D-x|B))return T*_*_;if(I+8008566259537294e-32>F-N)return T*_*_}else if((D&p)>=1083231232){if(0!==(D-3230714880|B))return T*S*S;if(I<=F-N)return T*S*S}return T*(F=w(D,N,I))}},2448:e=>{e.exports=function(e){return 0===e?.5999999999999946:.5999999999999946+e*(.4285714285785502+e*(.33333332981837743+e*(.272728123808534+e*(.23066074577556175+.20697501780033842*e))))}},1748:e=>{e.exports=function(e){return 0===e?.16666666666666602:.16666666666666602+e*(e*(6613756321437934e-20+e*(4.1381367970572385e-8*e-16533902205465252e-22))-.0027777777777015593)}},6049:e=>{e.exports=function(e){return 0===e?.5:.5+e*(.25*e-.3333333333333333)}},4383:(e,t,n)=>{var r=n(4126),a=n(730),o=n(4422),i=n(5163),l=n(1127),s=n(2587),u=n(5129),c=n(1955),d=n(1850),f=n(1748),h=1048576;e.exports=function(e,t,n){var p,v,m,g,y,b,w,x,_;return _=((x=e&c)>>20)-u|0,w=0,x>1071644672&&(v=a(0,((w=e+(h>>_+1)>>>0)&~(d>>(_=((w&c)>>20)-u|0)))>>>0),w=(w&d|h)>>20-_>>>0,e<0&&(w=-w),t-=v),y=(g=(n-((v=o(v=n+t,0))-t))*s+-1.904654299957768e-9*v)-((b=(m=.6931471824645996*v)+g)-m),p=b-(v=b*b)*f(v),e=r(b=1-(b*p/(p-2)-(y+b*y)-b)),e=i(e),b=(e+=w<<20>>>0)>>20<=0?l(b,w):a(b,e)}},6950:(e,t,n)=>{var r=n(411),a=n(940),o=n(8239),i=n(2857);e.exports=function(e,t){return t===o?i:t===i?0:t>0?r(t)?e:0:r(t)?a(i,e):i}},9788:(e,t,n)=>{var r=n(1955),a=n(4126);e.exports=function(e,t){return(a(e)&r)<=1072693247?t<0?1/0:0:t>0?1/0:0}},1167:(e,t,n)=>{var r=n(2712),a=n(2857);e.exports=function(e,t){return-1===e?(e-e)/(e-e):1===e?1:r(e)<1===(t===a)?0:a}},2314:(e,t,n)=>{var r=n(4557);e.exports=r},4557:e=>{var t=Math.sqrt;e.exports=t},7882:(e,t,n)=>{var r=n(7917);e.exports=r},7917:(e,t,n)=>{var r=n(7730),a=n(4037);e.exports=function(e){return e<0?a(e):r(e)}},2125:(e,t,n)=>{var r=n(8828);e.exports=r},8828:e=>{e.exports=Number},3015:(e,t,n)=>{var r=n(3186);e.exports=r},3186:(e,t,n)=>{var r=n(4126),a=n(8666),o=n(5129);e.exports=function(e){var t=r(e);return(t=(t&a)>>>20)-o|0}},6056:(e,t,n)=>{var r=n(9887);e.exports=r},4381:(e,t,n)=>{var r,a,o;!0===n(735)?(a=1,o=0):(a=0,o=1),r={HIGH:a,LOW:o},e.exports=r},9887:(e,t,n)=>{var r=n(6532),a=n(4023),o=n(4381),i=new a(1),l=new r(i.buffer),s=o.HIGH,u=o.LOW;e.exports=function(e,t){return l[s]=e,l[u]=t,i[0]}},9176:(e,t,n)=>{var r;r=!0===n(735)?1:0,e.exports=r},4126:(e,t,n)=>{var r=n(3281);e.exports=r},3281:(e,t,n)=>{var r=n(6532),a=n(4023),o=n(9176),i=new a(1),l=new r(i.buffer);e.exports=function(e){return i[0]=e,l[o]}},5050:(e,t,n)=>{var r=n(7013),a=n(7182),o=n(6679),i=n(2712);e.exports=function(e,t,n,l){return o(e)||a(e)?(t[l]=e,t[l+n]=0,t):0!==e&&i(e){var r=n(404),a=n(1966);r(a,"assign",n(5050)),e.exports=a},1966:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(e,[0,0],1,0)}},6588:(e,t,n)=>{var r;r=!0===n(735)?1:0,e.exports=r},730:(e,t,n)=>{var r=n(6157);e.exports=r},6157:(e,t,n)=>{var r=n(6532),a=n(4023),o=n(6588),i=new a(1),l=new r(i.buffer);e.exports=function(e,t){return i[0]=e,l[o]=t>>>0,i[0]}},4422:(e,t,n)=>{var r=n(233);e.exports=r},6636:(e,t,n)=>{var r;r=!0===n(735)?0:1,e.exports=r},233:(e,t,n)=>{var r=n(6532),a=n(4023),o=n(6636),i=new a(1),l=new r(i.buffer);e.exports=function(e,t){return i[0]=e,l[o]=t>>>0,i[0]}},3887:(e,t,n)=>{var r,a=n(7002),o=n(9284);r="function"===typeof a?a:o,e.exports=r},7002:e=>{var t="function"===typeof Math.fround?Math.fround:null;e.exports=t},9284:(e,t,n)=>{var r=new(n(3872))(1);e.exports=function(e){return r[0]=e,r[0]}},6248:(e,t,n)=>{var r=n(6532),a=n(4023),o=n(4316),i=new a(1),l=new r(i.buffer),s=o.HIGH,u=o.LOW;e.exports=function(e,t,n,r){return i[0]=e,t[r]=l[s],t[r+n]=l[u],t}},2105:(e,t,n)=>{var r=n(404),a=n(9592);r(a,"assign",n(6248)),e.exports=a},4316:(e,t,n)=>{var r,a,o;!0===n(735)?(a=1,o=0):(a=0,o=1),r={HIGH:a,LOW:o},e.exports=r},9592:(e,t,n)=>{var r=n(6248);e.exports=function(e){return r(e,[0,0],1,0)}},5163:(e,t,n)=>{var r=n(5798);e.exports=r},5798:e=>{e.exports=function(e){return 0|e}},3815:e=>{var t=Object.assign;e.exports=t},4374:(e,t,n)=>{var r=n(3629)(Object.assign);e.exports=r},8832:(e,t,n)=>{var r,a=n(4374),o=n(3815),i=n(5457);r=a?o:i,e.exports=r},5457:(e,t,n)=>{var r=n(167),a=n(2107),o=n(6132);e.exports=function(e){var t,n,i,l,s,u,c;if(void 0===e||null===e)throw new TypeError(o("invalid argument. First argument must be a non-null object. Value: `%s`.",e));for(s=a(e),u=1;u{var r=n(8502);e.exports=r},8502:e=>{var t=Object;e.exports=t},5115:(e,t,n)=>{var r=n(7586),a=n(5068),o=n(2021),i=n(1302);e.exports=function(e,t,n,l){var s;return n===l&&n>1.5?a(e,t,n):n>1&&l>1?o(e,t,n,l):n<1&&l<1?i(e,n,l):(s=r(e,t,n))/(s+r(e,t,l))}},4951:(e,t,n)=>{var r=n(404),a=n(9274),o=n(9333),i=n(5417),l=n(5111).isPrimitive,s=n(3629),u=n(7615),c=n(2672),d=n(7521),f=n(7379).factory,h=n(9121).factory,p=n(6679),v=n(870),m=n(6532),g=n(3973),y=n(8832),b=n(9573),w=n(6132),x=n(2383),_=n(5115);e.exports=function(){var e,t,n,S,E,R,k,O,C;if(O=!0,0===arguments.length)R=h(E={copy:!1});else if(1===arguments.length){if(!i(E=arguments[0]))throw new TypeError(w("invalid argument. Options argument must be an object. Value: `%s`.",E));if(u(E,"copy")&&!l(E.copy))throw new TypeError(w("invalid option. `%s` option must be a boolean. Option: `%s`.","copy",E.copy));if(u(E,"prng")){if(!s(E.prng))throw new TypeError(w("invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.","prng",E.prng));R=E.prng}else{if(u(E,"state")&&!g(E.state))throw new TypeError(w("invalid option. `%s` option must be a Uint32Array. Option: `%s`.","state",E.state));!1===(E=y({},E)).copy?O=!1:E.state&&(E.state=v(E.state.length,E.state,1,new m(E.state.length),1)),E.copy=!1,R=h(E)}}else{if(C=x(n=arguments[0],S=arguments[1]))throw C;if(arguments.length>2){if(!i(E=arguments[2]))throw new TypeError(w("invalid argument. Options argument must be an object. Value: `%s`.",E));if(u(E,"copy")&&!l(E.copy))throw new TypeError(w("invalid option. `%s` option must be a boolean. Option: `%s`.","copy",E.copy));if(u(E,"prng")){if(!s(E.prng))throw new TypeError(w("invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.","prng",E.prng));R=E.prng}else{if(u(E,"state")&&!g(E.state))throw new TypeError(w("invalid option. `%s` option must be a Uint32Array. Option: `%s`.","state",E.state));!1===(E=y({},E)).copy?O=!1:E.state&&(E.state=v(E.state.length,E.state,1,new m(E.state.length),1)),E.copy=!1,R=h(E)}}else R=h(E={copy:!1})}return E&&E.prng?t=f({prng:E.prng}):(E.state?e=E.state:(e=R.state,R.state=e),t=f({state:e,copy:!1})),r(k=void 0===n?function(e,n){if(p(e)||p(n)||e<=0||n<=0)return NaN;return _(R,t,e,n)}:function(){return _(R,t,n,S)},"NAME","beta"),E&&E.prng?(r(k,"seed",null),r(k,"seedLength",null),o(k,"state",c(null),d),r(k,"stateLength",null),r(k,"byteLength",null),r(k,"toJSON",c(null)),r(k,"PRNG",R)):(a(k,"seed",(function(){return R.seed})),a(k,"seedLength",(function(){return R.seedLength})),o(k,"state",(function(){return R.state}),(function(e){if(!g(e))throw new TypeError(w("invalid argument. Must provide a Uint32Array. Value: `%s`.",e));O&&(e=v(e.length,e,1,new m(e.length),1));R.state=e})),a(k,"stateLength",(function(){return R.stateLength})),a(k,"byteLength",(function(){return R.byteLength})),r(k,"toJSON",(function(){var e={type:"PRNG"};e.name=k.NAME,e.state=b(R.state),e.params=void 0===n?[]:[n,S];return e})),r(k,"PRNG",R),R=R.normalized),k}},3789:(e,t,n)=>{var r=n(404),a=n(9516);r(a,"factory",n(4951)),e.exports=a},9516:(e,t,n)=>{var r=n(4951)();e.exports=r},5068:(e,t,n)=>{var r=n(3898),a=n(2522);e.exports=function(e,t,n){var o,i,l,s,u,c,d,f;for(u=r((l=n-1)+l,.5),o=!0;!0===o;)(d=.5*(1+(s=t())/u))>=0&&d<=1&&((c=e())<=(f=1-(i=r(s,4))/(f=8*n-12))?o=!1:c<(f+=.5*r(i/(8*n-8),2))&&(f=l*a(4*d*(1-d)),(f+=s*s/2)>=a(c)&&(o=!1)));return d}},2021:(e,t,n)=>{var r=n(3898),a=n(2522);e.exports=function(e,t,n,o){var i,l,s,u,c,d,f,h,p,v,m;for(f=(d=(u=n-1)+(c=o-1))*a(d),s=u/d,i=.5/r(d,.5),l=!0;!0===l;)(v=s+(h=t())*i)>=0&&v<=1&&(p=e(),m=u*a(v/u),m+=c*a((1-v)/c),(m+=f+.5*h*h)>=a(p)&&(l=!1));return v}},1302:(e,t,n)=>{var r=n(375),a=n(3898),o=n(2522);e.exports=function(e,t,n){for(var i,l,s,u,c,d;;)if(u=e(),c=e(),(s=(d=a(u,1/t))+a(c,1/n))<=1)return s>0?d/s:((i=o(u)/t)>(l=o(c)/n)?(l-=i,i=0):(i-=l,l=0),r(i-o(r(i)+r(l))))}},7586:(e,t,n)=>{var r=n(2522),a=n(2314),o=n(3898),i=1/3;e.exports=function(e,t,n){var l,s,u,c,d,f,h,p,v,m;for(n<1?(d=1/a(9*(f=n+1-i)),p=o(e(),1/n)):(d=1/a(9*(f=n-i)),p=1),l=!0;l;){do{m=1+d*(h=t())}while(m<=0);u=1-.331*(s=h*h)*s,c=.5*s+f*(1-(m*=m*m)+r(m)),((v=e()){var r=n(280).isPrimitive,a=n(6132);e.exports=function(e,t){return r(e)?r(t)?null:new TypeError(a("invalid argument. Second argument must be a positive number. Value: `%s`.",t)):new TypeError(a("invalid argument. First argument must be a positive number. Value: `%s`.",e))}},911:(e,t,n)=>{var r=n(2314),a=n(375),o=n(2522),i=.00991256303526217;e.exports=function(e,t){var n,l,s;for(l=a(-.5*t*t),(n=[]).push(i/l),n.push(t),s=2;s{var r=n(404),a=n(9274),o=n(9333),i=n(3629),l=n(5417),s=n(5111).isPrimitive,u=n(7615),c=n(3973),d=n(9121).factory,f=n(2672),h=n(7521),p=n(7730),v=n(3335),m=n(9573),g=n(6132),y=n(3363);e.exports=function(e){var t,n,b,w;if(w={copy:!0},arguments.length){if(!l(e))throw new TypeError(g("invalid argument. Must provide an object. Value: `%s`.",e));if(u(e,"copy")&&(w.copy=e.copy,!s(e.copy)))throw new TypeError(g("invalid option. `%s` option must be a boolean. Option: `%s`.","copy",e.copy));if(u(e,"prng")){if(!i(e.prng))throw new TypeError(g("invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.","prng",e.prng));t=e.prng}else if(u(e,"state")){if(w.state=e.state,!c(e.state))throw new TypeError(g("invalid option. `%s` option must be a Uint32Array. Option: `%s`.","state",e.state))}else if(u(e,"seed")&&(w.seed=e.seed,void 0===e.seed))throw new TypeError(g("invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.","seed",e.seed))}return void 0===w.state?void 0===t?t=(n=d(w)).normalized:(n=d({seed:p(1+v*t()),copy:w.copy}),w.seed=null):t=(n=d(w)).normalized,b=y(t,n),r(b,"NAME","improved-ziggurat"),null===w.seed?(r(b,"seed",null),r(b,"seedLength",null)):(a(b,"seed",(function(){return n.seed})),a(b,"seedLength",(function(){return n.seedLength}))),e&&e.prng?(o(b,"state",f(null),h),r(b,"stateLength",null),r(b,"byteLength",null),r(b,"toJSON",f(null))):(o(b,"state",(function(){return n.state}),(function(e){n.state=e})),a(b,"stateLength",(function(){return n.stateLength})),a(b,"byteLength",(function(){return n.byteLength})),r(b,"toJSON",(function(){var e={type:"PRNG"};return e.name=b.NAME,e.state=m(n.state),e.params=[],e}))),r(b,"PRNG",t),b}},3363:(e,t,n)=>{var r=n(2712),a=n(375),o=n(911),i=n(7170),l=n(5590),s=3.442619855899,u=o(128,s),c=i(u);e.exports=function(e,t){return function(){var n,o,i,d,f,h,p;for(;;){if(f=2*e()-1,h=127&t(),r(f){var r=n(404),a=n(6302);r(a,"factory",n(5833)),e.exports=a},6302:(e,t,n)=>{var r=n(5833)();e.exports=r},7170:e=>{e.exports=function(e){var t,n;for(t=[],n=0;n{var r=n(2522);e.exports=function(e,t,n){var a,o;do{a=r(e())/t,o=r(e())}while(-2*o{var r=n(404),a=n(9274),o=n(9333),i=n(7615),l=n(5417),s=n(1317),u=n(3973),c=n(5111).isPrimitive,d=n(2001).isPrimitive,f=n(3285),h=n(3335),p=n(6532),v=n(6666),m=n(5350),g=n(870),y=n(9573),b=n(6132),w=n(4068),x=624,_=397,S=h>>>0,E=2147483648,R=2147483647,k=1812433253,O=1664525,C=1566083941,A=[0,2567483615],L=1/(f+1),T=2147483648,M=1,j=f*L,N=1,I=3,P=2,F=x+3,D=x+5,B=x+6;function H(e,t){var n;return n=t?"option":"argument",e.length>>0,r=1;r>>0)^n>>>30)>>>0,e[r]=m(n,k)+r>>>0;return e}e.exports=function(e){var t,n,f,k,W,V;if(f={},arguments.length){if(!l(e))throw new TypeError(b("invalid argument. Options argument must be an object. Value: `%s`.",e));if(i(e,"copy")&&(f.copy=e.copy,!c(e.copy)))throw new TypeError(b("invalid option. `%s` option must be a boolean. Option: `%s`.","copy",e.copy));if(i(e,"state")){if(n=e.state,f.state=!0,!u(n))throw new TypeError(b("invalid option. `%s` option must be a Uint32Array. Option: `%s`.","state",n));if(V=H(n,!0))throw V;!1===f.copy?t=n:(t=new p(n.length),g(n.length,n,1,t,1)),n=new p(t.buffer,t.byteOffset+(P+1)*t.BYTES_PER_ELEMENT,x),k=new p(t.buffer,t.byteOffset+(D+1)*t.BYTES_PER_ELEMENT,n[D])}if(void 0===k)if(i(e,"seed"))if(k=e.seed,f.seed=!0,d(k)){if(k>S)throw new RangeError(b("invalid option. `%s` option must be a positive integer less than or equal to the maximum unsigned 32-bit integer. Option: `%u`.","seed",k));k>>>=0}else{if(!1===s(k)||k.length<1)throw new TypeError(b("invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.","seed",k));if(1===k.length){if(k=k[0],!d(k))throw new TypeError(b("invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.","seed",k));if(k>S)throw new RangeError(b("invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%u`.","seed",k));k>>>=0}else W=k.length,(t=new p(B+W))[0]=N,t[1]=I,t[P]=x,t[F]=1,t[F+1]=x,t[D]=W,g.ndarray(W,k,1,0,t,1,D+1),n=new p(t.buffer,t.byteOffset+(P+1)*t.BYTES_PER_ELEMENT,x),k=new p(t.buffer,t.byteOffset+(D+1)*t.BYTES_PER_ELEMENT,W),n=function(e,t,n,r){var a,o,i,l;for(o=1,i=0,l=v(t,r);l>0;l--)a=e[o-1]>>>0,a=m(a=(a^a>>>30)>>>0,O)>>>0,e[o]=(e[o]>>>0^a)+n[i]+i>>>0,i+=1,(o+=1)>=t&&(e[0]=e[t-1],o=1),i>=r&&(i=0);for(l=t-1;l>0;l--)a=e[o-1]>>>0,a=m(a=(a^a>>>30)>>>0,C)>>>0,e[o]=(e[o]>>>0^a)-o>>>0,(o+=1)>=t&&(e[0]=e[t-1],o=1);return e[0]=T,e}(n=z(n,x,19650218),x,k,W)}else k=w()>>>0}else k=w()>>>0;return void 0===n&&((t=new p(B+1))[0]=N,t[1]=I,t[P]=x,t[F]=1,t[F+1]=x,t[D]=1,t[D+1]=k,n=new p(t.buffer,t.byteOffset+(P+1)*t.BYTES_PER_ELEMENT,x),k=new p(t.buffer,t.byteOffset+(D+1)*t.BYTES_PER_ELEMENT,1),n=z(n,x,k)),r(X,"NAME","mt19937"),a(X,"seed",U),a(X,"seedLength",K),o(X,"state",G,q),a(X,"stateLength",Y),a(X,"byteLength",$),r(X,"toJSON",Q),r(X,"MIN",0),r(X,"MAX",h),r(X,"normalized",Z),r(Z,"NAME",X.NAME),a(Z,"seed",U),a(Z,"seedLength",K),o(Z,"state",G,q),a(Z,"stateLength",Y),a(Z,"byteLength",$),r(Z,"toJSON",Q),r(Z,"MIN",0),r(Z,"MAX",j),X;function U(){var e=t[D];return g(e,k,1,new p(e),1)}function K(){return t[D]}function Y(){return t.length}function $(){return t.byteLength}function G(){var e=t.length;return g(e,t,1,new p(e),1)}function q(e){var r;if(!u(e))throw new TypeError(b("invalid argument. Must provide a Uint32Array. Value: `%s`.",e));if(r=H(e,!1))throw r;!1===f.copy?f.state&&e.length===t.length?g(e.length,e,1,t,1):(t=e,f.state=!0):(e.length!==t.length&&(t=new p(e.length)),g(e.length,e,1,t,1)),n=new p(t.buffer,t.byteOffset+(P+1)*t.BYTES_PER_ELEMENT,x),k=new p(t.buffer,t.byteOffset+(D+1)*t.BYTES_PER_ELEMENT,t[D])}function Q(){var e={type:"PRNG"};return e.name=X.NAME,e.state=y(t),e.params=[],e}function X(){var e,r;return(r=t[F+1])>=x&&(n=function(e){var t,n,r,a;for(a=x-_,n=0;n>>1^A[t&M];for(r=x-1;n>>1^A[t&M];return t=e[r]&E|e[0]&R,e[r]=e[_-1]^t>>>1^A[t&M],e}(n),r=0),e=n[r],t[F+1]=r+1,e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0}function Z(){return(67108864*(X()>>>5)+(X()>>>6))*L}}},9121:(e,t,n)=>{var r=n(404),a=n(3344);r(a,"factory",n(1867)),e.exports=a},3344:(e,t,n)=>{var r=n(1867)({seed:n(4068)()});e.exports=r},4068:(e,t,n)=>{var r=n(3335),a=n(7730),o=r-1;e.exports=function(){return a(1+o*Math.random())>>>0}},8893:(e,t,n)=>{var r=n(404),a=n(4124);r(a,"REGEXP",n(7680)),e.exports=a},4124:e=>{e.exports=function(){return/^\s*function\s*([^(]*)/i}},7680:(e,t,n)=>{var r=n(4124)();e.exports=r},3193:(e,t,n)=>{var r=n(3640);e.exports=r},3640:(e,t,n)=>{var r=n(4023);e.exports=function(e,t){return new r(e.buffer,e.byteOffset+e.BYTES_PER_ELEMENT*t,2*(e.length-t))}},5506:(e,t,n)=>{var r=n(277);e.exports=r},277:(e,t,n)=>{var r=n(3872);e.exports=function(e,t){return new r(e.buffer,e.byteOffset+e.BYTES_PER_ELEMENT*t,2*(e.length-t))}},8161:(e,t,n)=>{var r=n(2020),a=Math.abs,o=String.prototype.toLowerCase,i=String.prototype.toUpperCase,l=String.prototype.replace,s=/e\+(\d)$/,u=/e-(\d)$/,c=/^(\d+)$/,d=/^(\d+)e/,f=/\.0$/,h=/\.0*e/,p=/(\..*[^0])0*e/;e.exports=function(e){var t,n,v=parseFloat(e.arg);if(!isFinite(v)){if(!r(e.arg))throw new Error("invalid floating-point number. Value: "+n);v=e.arg}switch(e.specifier){case"e":case"E":n=v.toExponential(e.precision);break;case"f":case"F":n=v.toFixed(e.precision);break;case"g":case"G":a(v)<1e-4?((t=e.precision)>0&&(t-=1),n=v.toExponential(t)):n=v.toPrecision(e.precision),e.alternate||(n=l.call(n,p,"$1e"),n=l.call(n,h,"e"),n=l.call(n,f,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=l.call(n,s,"e+0$1"),n=l.call(n,u,"e-0$1"),e.alternate&&(n=l.call(n,c,"$1."),n=l.call(n,d,"$1.e")),v>=0&&e.sign&&(n=e.sign+n),n=e.specifier===i.call(e.specifier)?i.call(n):o.call(n)}},5704:(e,t,n)=>{var r=n(2020),a=n(3942),o=String.prototype.toLowerCase,i=String.prototype.toUpperCase;e.exports=function(e){var t,n,l;switch(e.specifier){case"b":t=2;break;case"o":t=8;break;case"x":case"X":t=16;break;default:t=10}if(n=e.arg,l=parseInt(n,10),!isFinite(l)){if(!r(n))throw new Error("invalid integer. Value: "+n);l=0}return l<0&&("u"===e.specifier||10!==t)&&(l=4294967295+l+1),l<0?(n=(-l).toString(t),e.precision&&(n=a(n,e.precision,e.padRight)),n="-"+n):(n=l.toString(t),l||e.precision?e.precision&&(n=a(n,e.precision,e.padRight)):n="",e.sign&&(n=e.sign+n)),16===t&&(e.alternate&&(n="0x"+n),n=e.specifier===i.call(e.specifier)?i.call(n):o.call(n)),8===t&&e.alternate&&"0"!==n.charAt(0)&&(n="0"+n),n}},836:(e,t,n)=>{var r=n(7179);e.exports=r},2020:e=>{e.exports=function(e){return"number"===typeof e}},6256:e=>{e.exports=function(e){return"string"===typeof e}},7179:(e,t,n)=>{var r=n(5704),a=n(6256),o=n(8161),i=n(2848),l=n(3942),s=String.fromCharCode,u=isNaN,c=Array.isArray;function d(e){var t={};return t.specifier=e.specifier,t.precision=void 0===e.precision?1:e.precision,t.width=e.width,t.flags=e.flags||"",t.mapping=e.mapping,t}e.exports=function(e){var t,n,f,h,p,v,m,g,y;if(!c(e))throw new TypeError("invalid argument. First argument must be an array. Value: `"+e+"`.");for(v="",m=1,g=0;g127)throw new Error("invalid character code. Value: "+f.arg);f.arg=u(p)?String(f.arg):s(p)}break;case"e":case"E":case"f":case"F":case"g":case"G":t||(f.precision=6),f.arg=o(f);break;default:throw new Error("invalid specifier: "+f.specifier)}f.maxWidth>=0&&f.arg.length>f.maxWidth&&(f.arg=f.arg.substring(0,f.maxWidth)),f.padZeros?f.arg=l(f.arg,f.width||f.precision,f.padRight):f.width&&(f.arg=i(f.arg,f.width,f.padRight)),v+=f.arg||"",m+=1}return v}},2848:e=>{function t(e){var t,n="";for(t=0;t{function t(e){var t,n="";for(t=0;t{var r=n(6772);e.exports=r},6772:e=>{var t=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function n(e){var t={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(t.precision="1"),t}e.exports=function(e){var r,a,o,i;for(a=[],i=0,o=t.exec(e);o;)(r=e.slice(i,t.lastIndex-o[0].length)).length&&a.push(r),a.push(n(o)),i=t.lastIndex,o=t.exec(e);return(r=e.slice(i)).length&&a.push(r),a}},6132:(e,t,n)=>{var r=n(5579);e.exports=r},6832:e=>{e.exports=function(e){return"string"===typeof e}},5579:(e,t,n)=>{var r=n(836),a=n(5440),o=n(6832);e.exports=function e(t){var n,i;if(!o(t))throw new TypeError(e("invalid argument. First argument must be a string. Value: `%s`.",t));for(n=[a(t)],i=1;i{var r=n(3245);e.exports=r},3245:e=>{var t="function"===typeof Symbol?Symbol:void 0;e.exports=t},2510:(e,t,n)=>{var r=n(7937);e.exports=r},7937:(e,t,n)=>{var r=n(7128)()?Symbol.iterator:null;e.exports=r},2672:(e,t,n)=>{var r=n(8647);e.exports=r},8647:e=>{e.exports=function(e){return function(){return e}}},2793:(e,t,n)=>{var r=n(9432);e.exports=r},9432:(e,t,n)=>{var r=n(9359),a=n(8893).REGEXP,o=n(971);e.exports=function(e){var t,n,i;if(("Object"===(n=r(e).slice(8,-1))||"Error"===n)&&e.constructor){if("string"===typeof(i=e.constructor).name)return i.name;if(t=a.exec(i.toString()))return t[1]}return o(e)?"Buffer":n}},9274:(e,t,n)=>{var r=n(5629);e.exports=r},5629:(e,t,n)=>{var r=n(9872);e.exports=function(e,t,n){r(e,t,{configurable:!1,enumerable:!1,get:n})}},404:(e,t,n)=>{var r=n(5627);e.exports=r},5627:(e,t,n)=>{var r=n(9872);e.exports=function(e,t,n){r(e,t,{configurable:!1,enumerable:!1,writable:!1,value:n})}},9333:(e,t,n)=>{var r=n(4420);e.exports=r},4420:(e,t,n)=>{var r=n(9872);e.exports=function(e,t,n,a){r(e,t,{configurable:!1,enumerable:!1,get:n,set:a})}},5863:e=>{var t=Object.defineProperty;e.exports=t},4609:e=>{var t="function"===typeof Object.defineProperty?Object.defineProperty:null;e.exports=t},42:(e,t,n)=>{var r=n(4609);e.exports=function(){try{return r({},"x",{}),!0}catch(e){return!1}}},9872:(e,t,n)=>{var r,a=n(42),o=n(5863),i=n(4657);r=a()?o:i,e.exports=r},4657:(e,t,n)=>{var r=n(6132),a=Object.prototype,o=a.toString,i=a.__defineGetter__,l=a.__defineSetter__,s=a.__lookupGetter__,u=a.__lookupSetter__;e.exports=function(e,t,n){var c,d,f,h;if("object"!==typeof e||null===e||"[object Array]"===o.call(e))throw new TypeError(r("invalid argument. First argument must be an object. Value: `%s`.",e));if("object"!==typeof n||null===n||"[object Array]"===o.call(n))throw new TypeError(r("invalid argument. Property descriptor must be an object. Value: `%s`.",n));if((d="value"in n)&&(s.call(e,t)||u.call(e,t)?(c=e.__proto__,e.__proto__=a,delete e[t],e[t]=n.value,e.__proto__=c):e[t]=n.value),f="get"in n,h="set"in n,d&&(f||h))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return f&&i&&i.call(e,t,n.get),h&&l&&l.call(e,t,n.set),e}},167:(e,t,n)=>{var r=n(5794);e.exports=r},5794:(e,t,n)=>{var r=n(1393),a=n(6932),o=n(9767);e.exports=function(e){var t,n,i;for(t=r(e),n=a(e),i=0;i{var r=n(8146);e.exports=r},8146:(e,t,n)=>{var r=n(3629),a=n(2357),o=n(6132),i=n(8893).REGEXP,l=a();e.exports=function(e){if(!1===r(e))throw new TypeError(o("invalid argument. Must provide a function. Value: `%s`.",e));return l?e.name:i.exec(e.toString())[1]}},8651:(e,t,n)=>{var r,a=n(3629),o=n(2055),i=n(8955);r=a(Object.getPrototypeOf)?o:i,e.exports=r},9578:(e,t,n)=>{var r=n(8669);e.exports=r},8669:(e,t,n)=>{var r=n(2107),a=n(8651);e.exports=function(e){return null===e||void 0===e?null:(e=r(e),a(e))}},2055:e=>{var t=Object.getPrototypeOf;e.exports=t},8955:(e,t,n)=>{var r=n(9359),a=n(6404);e.exports=function(e){var t=a(e);return t||null===t?t:"[object Function]"===r(e.constructor)?e.constructor.prototype:e instanceof Object?Object.prototype:null}},6404:e=>{e.exports=function(e){return e.__proto__}},8610:(e,t,n)=>{var r=n(5111).isPrimitive,a=n(6132),o=n(1791),i=n(5654),l=n(360),s=n(2914);e.exports=function(e){if(arguments.length){if(!r(e))throw new TypeError(a("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return o()}if(s)return s;if(i)return i;if(l)return l;throw new Error("unexpected error. Unable to resolve global object.")}},1791:e=>{e.exports=function(){return new Function("return this;")()}},2914:e=>{var t="object"===typeof globalThis?globalThis:null;e.exports=t},5654:e=>{var t="object"===typeof self?self:null;e.exports=t},360:e=>{var t="object"===typeof window?window:null;e.exports=t},5675:(e,t,n)=>{var r=n(8870);e.exports=r},8870:(e,t,n)=>{var r=n(830),a=n(1317),o=n(3408).isPrimitive,i=n(4689).isPrimitive,l=n(6132);e.exports=function(e,t,n){var s,u;if(!a(e)&&!o(e))throw new TypeError(l("invalid argument. First argument must be an array-like object. Value: `%s`.",e));if(0===(s=e.length))return-1;if(3===arguments.length){if(!i(n))throw new TypeError(l("invalid argument. Third argument must be an integer. Value: `%s`.",n));if(n>=0){if(n>=s)return-1;u=n}else(u=s+n)<0&&(u=0)}else u=0;if(r(t)){for(;u{e.exports=function(e){return Object.keys(Object(e))}},9266:(e,t,n)=>{var r=n(6631),a=n(4574),o=Array.prototype.slice;e.exports=function(e){return r(e)?a(o.call(e)):a(e)}},5027:(e,t,n)=>{var r=n(4574);e.exports=function(){return function(){return 2!==(r(arguments)||"").length}(1,2)}},4535:(e,t,n)=>{var r,a=n(7615),o=n(5675),i=n(6253),l=n(9223),s=n(9608),u=n(4993);r=function(){var e;if("undefined"===i(u))return!1;for(e in u)try{-1===o(s,e)&&a(u,e)&&null!==u[e]&&"object"===i(u[e])&&l(u[e])}catch(t){return!0}return!1}(),e.exports=r},4185:e=>{var t="undefined"!==typeof Object.keys;e.exports=t},2894:(e,t,n)=>{var r=n(9767)(n(7521),"prototype");e.exports=r},2009:(e,t,n)=>{var r=!n(9767)({toString:null},"toString");e.exports=r},6764:e=>{var t="undefined"!==typeof window;e.exports=t},1393:(e,t,n)=>{var r=n(7952);e.exports=r},9223:e=>{e.exports=function(e){return e.constructor&&e.constructor.prototype===e}},4755:(e,t,n)=>{var r=n(4535),a=n(9223),o=n(6764);e.exports=function(e){if(!1===o&&!r)return a(e);try{return a(e)}catch(t){return!1}}},7952:(e,t,n)=>{var r,a=n(5027),o=n(4185),i=n(4574),l=n(9266),s=n(3510);r=o?a()?l:i:s,e.exports=r},3510:(e,t,n)=>{var r=n(4242),a=n(7615),o=n(6631),i=n(2894),l=n(2009),s=n(4755),u=n(9547);e.exports=function(e){var t,n,c,d,f,h,p;if(d=[],o(e)){for(p=0;p0&&!a(e,"0"))for(p=0;p{var t="undefined"===typeof window?void 0:window;e.exports=t},9359:(e,t,n)=>{var r,a=n(9681),o=n(2346),i=n(3460);r=a()?i:o,e.exports=r},2346:(e,t,n)=>{var r=n(8983);e.exports=function(e){return r.call(e)}},3460:(e,t,n)=>{var r=n(7615),a=n(3103),o=n(8983);e.exports=function(e){var t,n,i;if(null===e||void 0===e)return o.call(e);n=e[a],t=r(e,a);try{e[a]=void 0}catch(l){return o.call(e)}return i=o.call(e),t?e[a]=n:delete e[a],i}},8983:e=>{var t=Object.prototype.toString;e.exports=t},3103:(e,t,n)=>{var r=n(2490),a="function"===typeof r?r.toStringTag:"";e.exports=a},7521:(e,t,n)=>{var r=n(2032);e.exports=r},2032:e=>{e.exports=function(){}},8387:(e,t,n)=>{var r=n(2107),a=r.getOwnPropertySymbols;e.exports=function(e){return a(r(e))}},2100:e=>{var t="undefined"!==typeof Object.getOwnPropertySymbols;e.exports=t},6932:(e,t,n)=>{var r,a=n(2100),o=n(8387),i=n(4365);r=a?o:i,e.exports=r},4365:e=>{e.exports=function(){return[]}},5921:(e,t,n)=>{var r=n(6279),a=n(3506),o=n(6087);e.exports=function(){return"function"===typeof r||"object"===typeof o||"function"===typeof a}},3506:(e,t,n)=>{var r=n(8610)(),a=r.document&&r.document.childNodes;e.exports=a},6279:e=>{e.exports=/./},6087:e=>{var t=Int8Array;e.exports=t},6253:(e,t,n)=>{var r=n(5921),a=n(8124),o=n(7466),i=r()?o:a;e.exports=i},8124:(e,t,n)=>{var r=n(2793);e.exports=function(e){var t;return null===e?"null":"object"===(t=typeof e)?r(e).toLowerCase():t}},7466:(e,t,n)=>{var r=n(2793);e.exports=function(e){return r(e).toLowerCase()}},2730:(e,t,n)=>{var r=n(5043),a=n(8853);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n