volview 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/app.925b979f.css +1 -0
- package/dist/css/chunk-vendors.43a6a19a.css +5 -0
- package/{public → dist}/favicon.ico +0 -0
- package/{public → dist}/global.css +0 -0
- package/{src/assets/KitwareHeadAndNeck.jpg → dist/img/KitwareHeadAndNeck.11db5ffb.jpg} +0 -0
- package/dist/index.html +1 -0
- package/dist/itk/image-io/BMPImageIOReadImage.js +1 -0
- package/dist/itk/image-io/BMPImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/BMPImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/BMPImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/BMPImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/BMPImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/GDCMImageIOReadImage.js +1 -0
- package/dist/itk/image-io/GDCMImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/GDCMImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/GDCMImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/GDCMImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/GDCMImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/JPEGImageIOReadImage.js +1 -0
- package/dist/itk/image-io/JPEGImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/JPEGImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/JPEGImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/JPEGImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/JPEGImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/MetaImageIOReadImage.js +1 -0
- package/dist/itk/image-io/MetaImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/MetaImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/MetaImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/MetaImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/MetaImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/NiftiImageIOReadImage.js +1 -0
- package/dist/itk/image-io/NiftiImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/NiftiImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/NiftiImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/NiftiImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/NiftiImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/NrrdImageIOReadImage.js +1 -0
- package/dist/itk/image-io/NrrdImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/NrrdImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/NrrdImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/NrrdImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/NrrdImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/PNGImageIOReadImage.js +1 -0
- package/dist/itk/image-io/PNGImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/PNGImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/PNGImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/PNGImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/PNGImageIOWriteImage.wasm +0 -0
- package/dist/itk/image-io/ReadDICOMTags.js +1 -0
- package/dist/itk/image-io/ReadDICOMTags.umd.js +1 -0
- package/dist/itk/image-io/ReadDICOMTags.wasm +0 -0
- package/dist/itk/image-io/ReadImageDICOMFileSeries.js +1 -0
- package/dist/itk/image-io/ReadImageDICOMFileSeries.umd.js +1 -0
- package/dist/itk/image-io/ReadImageDICOMFileSeries.wasm +0 -0
- package/dist/itk/image-io/VTKImageIOReadImage.js +1 -0
- package/dist/itk/image-io/VTKImageIOReadImage.umd.js +1 -0
- package/dist/itk/image-io/VTKImageIOReadImage.wasm +0 -0
- package/dist/itk/image-io/VTKImageIOWriteImage.js +1 -0
- package/dist/itk/image-io/VTKImageIOWriteImage.umd.js +1 -0
- package/dist/itk/image-io/VTKImageIOWriteImage.wasm +0 -0
- package/dist/itk/pipelines/dicom.js +1 -0
- package/dist/itk/pipelines/dicom.umd.js +1 -0
- package/{src/io/itk-dicom/web-build → dist/itk/pipelines}/dicom.umd.wasm +0 -0
- package/{src/io/itk-dicom/web-build → dist/itk/pipelines}/dicom.wasm +0 -0
- package/dist/itk/web-workers/IOInput.d.ts +6 -0
- package/dist/itk/web-workers/IOInput.js +1 -0
- package/dist/itk/web-workers/ITKConfig.d.ts +8 -0
- package/dist/itk/web-workers/ITKConfig.js +1 -0
- package/dist/itk/web-workers/RunPipelineInput.d.ts +10 -0
- package/dist/itk/web-workers/RunPipelineInput.js +1 -0
- package/dist/itk/web-workers/WebWorkerInput.d.ts +6 -0
- package/dist/itk/web-workers/WebWorkerInput.js +1 -0
- package/dist/itk/web-workers/bundles/pipeline.worker.js +1 -0
- package/dist/itk/web-workers/loadImageIOPipelineModule.d.ts +4 -0
- package/dist/itk/web-workers/loadImageIOPipelineModule.js +1 -0
- package/dist/itk/web-workers/loadMeshIOPipelineModule.d.ts +4 -0
- package/dist/itk/web-workers/loadMeshIOPipelineModule.js +1 -0
- package/dist/itk/web-workers/loadPipelineModule.d.ts +3 -0
- package/dist/itk/web-workers/loadPipelineModule.js +1 -0
- package/dist/itk/web-workers/min-bundles/pipeline.worker.js +3 -0
- package/dist/itk/web-workers/pipeline.worker.d.ts +1 -0
- package/dist/itk/web-workers/pipeline.worker.js +1 -0
- package/dist/itk/web-workers/runPipeline.d.ts +5 -0
- package/dist/itk/web-workers/runPipeline.js +1 -0
- package/dist/js/23.be4d694e.js +21 -0
- package/dist/js/23.be4d694e.js.map +1 -0
- package/dist/js/385.51ca48a2.js +2 -0
- package/dist/js/385.51ca48a2.js.map +1 -0
- package/dist/js/422.c64a6aa7.js +2 -0
- package/dist/js/422.c64a6aa7.js.map +1 -0
- package/dist/js/979.c4823352.js +2 -0
- package/dist/js/979.c4823352.js.map +1 -0
- package/dist/js/app.81e49d9a.js +2 -0
- package/dist/js/app.81e49d9a.js.map +1 -0
- package/dist/js/chunk-vendors.0ab48f8d.js +33 -0
- package/dist/js/chunk-vendors.0ab48f8d.js.map +1 -0
- package/{public → dist}/pvm-sample.png +0 -0
- package/package.json +3 -2
- package/.browserslistrc +0 -4
- package/.editorconfig +0 -6
- package/.env +0 -6
- package/.eslintrc.js +0 -109
- package/.gitattributes +0 -1
- package/.github/workflows/checks.yml +0 -16
- package/.github/workflows/publish.yml +0 -52
- package/.prettierignore +0 -5
- package/CONTRIBUTING.md +0 -29
- package/babel.config.js +0 -3
- package/documentation/config.js +0 -15
- package/documentation/content/KWVolViewLogo.png +0 -0
- package/documentation/content/KWVolViewLogo.svg +0 -35
- package/documentation/content/VolViewLogo.png +0 -0
- package/documentation/content/VolViewLogo.svg +0 -22
- package/documentation/content/doc/index.md +0 -64
- package/documentation/content/doc/loading_data.md +0 -30
- package/documentation/content/doc/mouse_controls.md +0 -34
- package/documentation/content/doc/quick_start_guide.md +0 -75
- package/documentation/content/doc/rendering.md +0 -27
- package/documentation/content/doc/state_files.md +0 -18
- package/documentation/content/doc/toolbar.md +0 -20
- package/documentation/content/doc/welcome_screen.md +0 -23
- package/documentation/content/gallery/01-volview-welcome-notes.jpg +0 -0
- package/documentation/content/gallery/01-volview-welcome.jpg +0 -0
- package/documentation/content/gallery/02-volview-about.jpg +0 -0
- package/documentation/content/gallery/02-volview-notifications.jpg +0 -0
- package/documentation/content/gallery/02-volview-settings.jpg +0 -0
- package/documentation/content/gallery/03-volview-sample-datasets.jpg +0 -0
- package/documentation/content/gallery/04-volview-active-data.jpg +0 -0
- package/documentation/content/gallery/05-volview-select-data-to-delete.jpg +0 -0
- package/documentation/content/gallery/06-volview-corner-annotation.jpg +0 -0
- package/documentation/content/gallery/07-volview-layout-notes.jpg +0 -0
- package/documentation/content/gallery/07-volview-layout.jpg +0 -0
- package/documentation/content/gallery/09-volview-layout-3DPrimary.jpg +0 -0
- package/documentation/content/gallery/10-volview-wl-pan-zoom-notes.jpg +0 -0
- package/documentation/content/gallery/10-volview-wl-pan-zoom.jpg +0 -0
- package/documentation/content/gallery/11-volview-paint-notes.jpg +0 -0
- package/documentation/content/gallery/11-volview-paint.jpg +0 -0
- package/documentation/content/gallery/12-volview-paint-options.jpg +0 -0
- package/documentation/content/gallery/13-volview-crop-notes.jpg +0 -0
- package/documentation/content/gallery/13-volview-crop.jpg +0 -0
- package/documentation/content/gallery/14-volview-ruler.jpg +0 -0
- package/documentation/content/gallery/15-volview-crosshairs.jpg +0 -0
- package/documentation/content/gallery/16-volview-rendering.jpg +0 -0
- package/documentation/content/gallery/17-volview-colormap-notes.jpg +0 -0
- package/documentation/content/gallery/17-volview-colormap.jpg +0 -0
- package/documentation/content/gallery/17-volview-opacity-notes.jpg +0 -0
- package/documentation/content/gallery/17-volview-opacity.jpg +0 -0
- package/documentation/content/gallery/17-volview-opacity2.jpg +0 -0
- package/documentation/content/gallery/18-volview-presets.jpg +0 -0
- package/documentation/content/gallery/19-volview-color.jpg +0 -0
- package/documentation/content/gallery/19-volview-color2.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera0.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera1.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera2.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera3.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid-final.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid0.0.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid0.5.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid1.0.jpg +0 -0
- package/documentation/content/gallery/LocalAmbientOcclusion.jpg +0 -0
- package/documentation/content/gallery/Notes.pptx +0 -0
- package/documentation/content/gallery/VolView-Overview.jpg +0 -0
- package/documentation/content/gallery/index.md +0 -53
- package/documentation/content/icon/favicon-16x16.png +0 -0
- package/documentation/content/icon/favicon-196x196.png +0 -0
- package/documentation/content/icon/favicon-32x32.png +0 -0
- package/documentation/content/icon/favicon-96x96.png +0 -0
- package/documentation/content/index.pug +0 -43
- package/documentation/content/logo.png +0 -0
- package/documentation/content/logo.svg +0 -20
- package/documentation/data/menu.yml +0 -3
- package/documentation/themes/navy/layout/partial/footer.swig +0 -22
- package/documentation/tpl/__en__ +0 -31
- package/documentation/tpl/__sidebar__ +0 -11
- package/patches/jsdom-global+3.0.2.patch +0 -12
- package/patches/vue-toastification+1.7.14.patch +0 -41
- package/patches/vuetify+2.6.10.patch +0 -13
- package/prettier.config.js +0 -9
- package/public/index.html +0 -28
- package/server/helper.py +0 -147
- package/server/host.js +0 -134
- package/server/serialize.js +0 -111
- package/server/serialize.py +0 -203
- package/server/server.py +0 -84
- package/server/test.py +0 -17
- package/src/assets/logo.png +0 -0
- package/src/assets/logo.svg +0 -20
- package/src/assets/samples/3DUS-Fetus.jpg +0 -0
- package/src/assets/samples/CTA-Head_and_Neck.jpg +0 -0
- package/src/assets/samples/MRA-Head_and_Neck.jpg +0 -0
- package/src/assets/samples/MRI-Cardiac.jpg +0 -0
- package/src/assets/samples/MRI-PROSTATEx.jpg +0 -0
- package/src/components/AboutBox.vue +0 -157
- package/src/components/AiModule.vue +0 -60
- package/src/components/AnnotationsModule.vue +0 -37
- package/src/components/App.vue +0 -539
- package/src/components/ColorFunctionSlider.vue +0 -181
- package/src/components/DataBrowser.vue +0 -173
- package/src/components/DragAndDrop.vue +0 -107
- package/src/components/GroupableItem.vue +0 -30
- package/src/components/ImageDataBrowser.vue +0 -186
- package/src/components/ImageListCard.vue +0 -114
- package/src/components/ItemGroup.vue +0 -74
- package/src/components/LabelmapList.vue +0 -36
- package/src/components/LayoutGrid.vue +0 -96
- package/src/components/MeasurementsList.vue +0 -134
- package/src/components/MessageCenter.vue +0 -189
- package/src/components/MessageItem.vue +0 -83
- package/src/components/MessageNotificationContent.vue +0 -20
- package/src/components/MessageNotifications.vue +0 -84
- package/src/components/ModelBrowser.vue +0 -83
- package/src/components/ModulePanel.vue +0 -137
- package/src/components/PaintControls.vue +0 -174
- package/src/components/PatientBrowser.vue +0 -280
- package/src/components/PatientStudyVolumeBrowser.vue +0 -325
- package/src/components/RenderingModule.vue +0 -49
- package/src/components/ResizableNavDrawer.vue +0 -158
- package/src/components/SampleDataBrowser.vue +0 -198
- package/src/components/SaveSession.vue +0 -57
- package/src/components/Settings.vue +0 -35
- package/src/components/SliceSlider.vue +0 -182
- package/src/components/SpleenModule.vue +0 -101
- package/src/components/ToolButton.vue +0 -58
- package/src/components/ToolStrip.vue +0 -186
- package/src/components/ViewOverlayGrid.vue +0 -84
- package/src/components/VolumePresets.vue +0 -165
- package/src/components/VolumeProperties.vue +0 -171
- package/src/components/VolumeRendering.vue +0 -365
- package/src/components/VtkThreeView.vue +0 -512
- package/src/components/VtkTwoView.vue +0 -665
- package/src/components/__tests__/ResizableNavDrawer.spec.js +0 -32
- package/src/components/__tests__/ToolButton.spec.js +0 -46
- package/src/components/icons/KitwareLogoIcon.vue +0 -54
- package/src/components/icons/VolViewFullLogo.vue +0 -139
- package/src/components/icons/VolViewLogo.vue +0 -78
- package/src/components/styles/utils.css +0 -16
- package/src/components/styles/vtk-view.css +0 -116
- package/src/components/tools/CropTool.vue +0 -61
- package/src/components/tools/CrosshairsTool.vue +0 -93
- package/src/components/tools/MouseManipulatorTool.vue +0 -108
- package/src/components/tools/PaintTool.vue +0 -54
- package/src/components/tools/PanTool.vue +0 -35
- package/src/components/tools/RulerTool.vue +0 -202
- package/src/components/tools/SliceScrollTool.vue +0 -123
- package/src/components/tools/WindowLevelTool.vue +0 -191
- package/src/components/tools/ZoomTool.vue +0 -35
- package/src/components/tools/crop/Crop2D.vue +0 -367
- package/src/components/tools/crop/Crop2DLineHandle.vue +0 -103
- package/src/components/tools/crop/Crop3D.vue +0 -192
- package/src/components/tools/crop/CropControls.vue +0 -38
- package/src/components/tools/crop/types.ts +0 -12
- package/src/components/tools/crosshairs/CrosshairSVG2D.vue +0 -125
- package/src/components/tools/crosshairs/CrosshairsWidget2D.vue +0 -100
- package/src/components/tools/paint/PaintWidget2D.vue +0 -192
- package/src/components/tools/ruler/RulerSVG2D.vue +0 -181
- package/src/components/tools/ruler/RulerWidget2D.vue +0 -154
- package/src/composables/__tests__/useDoubleRecord.spec.ts +0 -57
- package/src/composables/__tests__/useOrientationLabels.spec.ts +0 -29
- package/src/composables/isViewAnimating.ts +0 -25
- package/src/composables/manageVTKSubscription.ts +0 -6
- package/src/composables/onProxyManagerEvent.ts +0 -50
- package/src/composables/proxyManager.ts +0 -13
- package/src/composables/sync/__tests__/createPrimitiveSyncContext.spec.ts +0 -41
- package/src/composables/sync/__tests__/useWindowingSync.spec.ts +0 -51
- package/src/composables/sync/createPrimitiveSyncContext.ts +0 -83
- package/src/composables/sync/useWindowingSync.ts +0 -48
- package/src/composables/useAppLoadingNotifications.ts +0 -73
- package/src/composables/useCameraOrientation.ts +0 -34
- package/src/composables/useCurrentImage.ts +0 -74
- package/src/composables/useCurrentSlice.ts +0 -43
- package/src/composables/useDoubleRecord.ts +0 -77
- package/src/composables/useEventListener.ts +0 -26
- package/src/composables/useGlobalErrorHook.ts +0 -18
- package/src/composables/useMultiSelection.ts +0 -29
- package/src/composables/useOrientationLabels.ts +0 -62
- package/src/composables/usePanels.ts +0 -42
- package/src/composables/usePersistCameraConfig.ts +0 -138
- package/src/composables/useResizeObserver.ts +0 -37
- package/src/composables/useResizeToFit.ts +0 -50
- package/src/composables/useSceneBuilder.ts +0 -96
- package/src/composables/useToast.js +0 -11
- package/src/composables/useVTKCallback.ts +0 -33
- package/src/composables/useVTKWorldToDisplay.ts +0 -141
- package/src/composables/useViewProxy.ts +0 -87
- package/src/composables/useVolumeThumbnailing.ts +0 -173
- package/src/composables/useWebGLWatchdog.ts +0 -32
- package/src/composables/useWidgetManager.ts +0 -41
- package/src/config.ts +0 -182
- package/src/constants.ts +0 -38
- package/src/core/id.ts +0 -18
- package/src/core/provider.ts +0 -31
- package/src/core/proxies.ts +0 -90
- package/src/core/thumbnailers/__tests__/vtk-image.spec.ts +0 -58
- package/src/core/thumbnailers/index.ts +0 -5
- package/src/core/thumbnailers/volume-thumbnailer.ts +0 -130
- package/src/core/thumbnailers/vtk-image.ts +0 -142
- package/src/core/tools/__tests__/paint.spec.ts +0 -101
- package/src/core/tools/__tests__/ruler.spec.ts +0 -73
- package/src/core/tools/paint/brush.ts +0 -20
- package/src/core/tools/paint/ellipse-brush.ts +0 -96
- package/src/core/tools/paint/index.ts +0 -141
- package/src/core/tools/ruler.ts +0 -149
- package/src/global.d.ts +0 -24
- package/src/io/__tests__/io.spec.ts +0 -26
- package/src/io/dicom.ts +0 -187
- package/src/io/index.ts +0 -11
- package/src/io/io.ts +0 -157
- package/src/io/itk/itkConfig.js +0 -8
- package/src/io/itk-dicom/dicom.cpp +0 -327
- package/src/io/itk-dicom/web-build/dicom.js +0 -16
- package/src/io/itk-dicom/web-build/dicom.umd.js +0 -21
- package/src/io/manifest.ts +0 -30
- package/src/io/readers.ts +0 -36
- package/src/io/state-file/index.ts +0 -170
- package/src/io/state-file/schema.ts +0 -277
- package/src/io/state-file/utils.ts +0 -33
- package/src/io/types.ts +0 -4
- package/src/io/vtk/async.reader.worker.ts +0 -50
- package/src/io/vtk/async.ts +0 -58
- package/src/io/vtk/async.writer.worker.ts +0 -46
- package/src/io/vtk/common.ts +0 -30
- package/src/io/zip.ts +0 -31
- package/src/main.js +0 -66
- package/src/main.ts +0 -1
- package/src/plugins/vuetify.js +0 -25
- package/src/shims-itk.d.ts +0 -67
- package/src/shims-misc.d.ts +0 -4
- package/src/shims-tsx.d.ts +0 -13
- package/src/shims-vtk.d.ts +0 -1042
- package/src/shims-vue.d.ts +0 -5
- package/src/store/__tests__/datasets.spec.ts +0 -75
- package/src/store/__tests__/messages.spec.ts +0 -74
- package/src/store/__tests__/rulers.spec.ts +0 -77
- package/src/store/__tests__/view-configs.spec.ts +0 -37
- package/src/store/datasets-dicom.ts +0 -398
- package/src/store/datasets-files.ts +0 -35
- package/src/store/datasets-images.ts +0 -118
- package/src/store/datasets-labelmaps.ts +0 -136
- package/src/store/datasets-models.ts +0 -25
- package/src/store/datasets.ts +0 -341
- package/src/store/messages.ts +0 -144
- package/src/store/tools/crop.ts +0 -136
- package/src/store/tools/crosshairs.ts +0 -131
- package/src/store/tools/index.ts +0 -95
- package/src/store/tools/paint.ts +0 -191
- package/src/store/tools/rulers.ts +0 -305
- package/src/store/tools/types.ts +0 -54
- package/src/store/view-configs/camera.ts +0 -51
- package/src/store/view-configs/common.ts +0 -61
- package/src/store/view-configs/slicing.ts +0 -86
- package/src/store/view-configs/types.ts +0 -39
- package/src/store/view-configs/volume-coloring.ts +0 -193
- package/src/store/view-configs/windowing.ts +0 -69
- package/src/store/view-configs.ts +0 -78
- package/src/store/views.ts +0 -130
- package/src/types/index.ts +0 -16
- package/src/types/layout.ts +0 -10
- package/src/types/lps.ts +0 -40
- package/src/types/views.ts +0 -65
- package/src/types/vtk-types.ts +0 -29
- package/src/utils/__tests__/lps.spec.ts +0 -102
- package/src/utils/color.ts +0 -23
- package/src/utils/errors.js +0 -3
- package/src/utils/fetch.ts +0 -101
- package/src/utils/hacks.ts +0 -14
- package/src/utils/index.ts +0 -83
- package/src/utils/lps.ts +0 -129
- package/src/utils/manipulators.ts +0 -35
- package/src/utils/promise-worker.ts +0 -45
- package/src/utils/vtk-helpers.ts +0 -215
- package/src/utils/workerHandler.js +0 -42
- package/src/vtk/ColorMaps.ts +0 -72
- package/src/vtk/CrosshairsWidget/behavior.ts +0 -112
- package/src/vtk/CrosshairsWidget/index.d.ts +0 -22
- package/src/vtk/CrosshairsWidget/index.js +0 -73
- package/src/vtk/CrosshairsWidget/state.ts +0 -51
- package/src/vtk/IJKSliceRepresentationProxy/index.d.ts +0 -9
- package/src/vtk/IJKSliceRepresentationProxy/index.js +0 -59
- package/src/vtk/LPSView2DProxy/index.d.ts +0 -18
- package/src/vtk/LPSView2DProxy/index.js +0 -89
- package/src/vtk/LPSView3DProxy/index.d.ts +0 -16
- package/src/vtk/LPSView3DProxy/index.js +0 -78
- package/src/vtk/LabelMap/index.d.ts +0 -16
- package/src/vtk/LabelMap/index.js +0 -49
- package/src/vtk/LabelMapSliceRepProxy/index.d.ts +0 -6
- package/src/vtk/LabelMapSliceRepProxy/index.js +0 -104
- package/src/vtk/MedicalColorPresets.json +0 -1448
- package/src/vtk/PaintBrushContextRepresentation/index.js +0 -191
- package/src/vtk/PaintWidget/behavior.ts +0 -101
- package/src/vtk/PaintWidget/index.d.ts +0 -28
- package/src/vtk/PaintWidget/index.js +0 -56
- package/src/vtk/PaintWidget/state.ts +0 -41
- package/src/vtk/PiecewiseWidget/index.js +0 -203
- package/src/vtk/RulerWidget/behavior.ts +0 -185
- package/src/vtk/RulerWidget/index.d.ts +0 -25
- package/src/vtk/RulerWidget/index.js +0 -79
- package/src/vtk/RulerWidget/state.ts +0 -63
- package/src/vtk/TreJsonConverter/index.js +0 -150
- package/src/vtk/proxy.js +0 -66
- package/src/vtk/proxyUtils.js +0 -16
- package/src/vtk/webvr-empty.js +0 -1
- package/tests/testUtils.js +0 -12
- package/tsconfig.json +0 -46
- package/vue.config.js +0 -86
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/index.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>VolView</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"><script defer="defer" src="/js/chunk-vendors.0ab48f8d.js"></script><script defer="defer" src="/js/app.81e49d9a.js"></script><link href="/css/chunk-vendors.43a6a19a.css" rel="stylesheet"><link href="/css/app.925b979f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but VolView doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var BMPImageIOReadImage=(()=>{var r="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!==typeof __filename&&(r=r||__filename),function(e){e=e||{};var t,n,o="undefined"!=typeof e?e:{};o["ready"]=new Promise((function(r,e){t=r,n=e}));var i=null,a=null;o["resetModuleStdout"]=function(){i=""},o["resetModuleStderr"]=function(){a=""},o["print"]=function(r){console.log(r),i+=r+"\n"},o["printErr"]=function(r){console.error(r),a+=r+"\n"},o["getModuleStdout"]=function(){return i},o["getModuleStderr"]=function(){return a};i=null,a=null;o["resetModuleStdout"]=function(){i=""},o["resetModuleStderr"]=function(){a=""},o["print"]=function(r){console.log(r),i+=r+"\n"},o["printErr"]=function(r){console.error(r),a+=r+"\n"},o["getModuleStdout"]=function(){return i},o["getModuleStderr"]=function(){return a};var s,u,c,l,d,f,m=Object.assign({},o),h=[],p="./this.program",E=(r,e)=>{throw e},w="object"==typeof window,v="function"==typeof importScripts,y="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,g="";function _(r){return o["locateFile"]?o["locateFile"](r,g):g+r}function k(r){if(r instanceof Ue)return;let e=r;D("exiting due to exception: "+e)}y?(g=v?require("path").dirname(g)+"/":__dirname+"/",f=()=>{d||(l=require("fs"),d=require("path"))},s=function(r,e){return f(),r=d["normalize"](r),l.readFileSync(r,e?void 0:"utf8")},c=r=>{var e=s(r,!0);return e.buffer||(e=new Uint8Array(e)),e},u=(r,e,t)=>{f(),r=d["normalize"](r),l.readFile(r,(function(r,n){r?t(r):e(n.buffer)}))},process["argv"].length>1&&(p=process["argv"][1].replace(/\\/g,"/")),h=process["argv"].slice(2),process["on"]("uncaughtException",(function(r){if(!(r instanceof Ue))throw r})),process["on"]("unhandledRejection",(function(r){throw r})),E=(r,e)=>{if(tr())throw process["exitCode"]=r,e;k(e),process["exit"](r)},o["inspect"]=function(){return"[Emscripten Module object]"}):(w||v)&&(v?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),r&&(g=r),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},v&&(c=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),u=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)});var S,b=o["print"]||console.log.bind(console),D=o["printErr"]||console.warn.bind(console);Object.assign(o,m),m=null,o["arguments"]&&(h=o["arguments"]),o["thisProgram"]&&(p=o["thisProgram"]),o["quit"]&&(E=o["quit"]),o["wasmBinary"]&&(S=o["wasmBinary"]);var N,F=o["noExitRuntime"]||!0;"object"!=typeof WebAssembly&&Er("no native wasm support detected");var O,P=!1;function A(r,e){r||Er(e)}function M(r){var e=o["_"+r];return e}function R(r,e,t,n,o){var i={string:function(r){var e=0;if(null!==r&&void 0!==r&&0!==r){var t=1+(r.length<<2);e=xe(t),W(r,e,t)}return e},array:function(r){var e=xe(r.length);return K(r,e),e}};function a(r){return"string"===e?H(r):"boolean"===e?Boolean(r):r}var s=M(r),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var d=i[t[l]];d?(0===c&&(c=Be()),u[l]=d(n[l])):u[l]=n[l]}var f=s.apply(null,u);function m(r){return 0!==c&&ze(c),a(r)}return f=m(f),f}function T(r,e,t,n){t=t||[];var o=t.every((function(r){return"number"===r})),i="string"!==e;return i&&o&&!n?M(r):function(){return R(r,e,t,arguments,n)}}var C,I,L,B,z,x,j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function U(r,e,t){var n=e+t,o=e;while(r[o]&&!(o>=n))++o;if(o-e>16&&r.buffer&&j)return j.decode(r.subarray(e,o));var i="";while(e<o){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if(a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++],a<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function H(r,e){return r?U(L,r,e):""}function Y(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343){var u=r.charCodeAt(++a);s=65536+((1023&s)<<10)|1023&u}if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function W(r,e,t){return Y(r,L,e,t)}function q(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function G(r){var e="";while(1){var t=L[r++>>0];if(!t)return e;e+=String.fromCharCode(t)}}function X(r){var e=q(r)+1,t=xe(e);return Y(r,I,t,e),t}function K(r,e){I.set(r,e)}function V(r,e,t){for(var n=0;n<r.length;++n)I[e++>>0]=r.charCodeAt(n);t||(I[e>>0]=0)}function Q(r){C=r,o["HEAP8"]=I=new Int8Array(r),o["HEAP16"]=B=new Int16Array(r),o["HEAP32"]=z=new Int32Array(r),o["HEAPU8"]=L=new Uint8Array(r),o["HEAPU16"]=new Uint16Array(r),o["HEAPU32"]=x=new Uint32Array(r),o["HEAPF32"]=new Float32Array(r),o["HEAPF64"]=new Float64Array(r)}o["INITIAL_MEMORY"];var J,Z=[],$=[],rr=[],er=[];function tr(){return F}function nr(){if(o["preRun"]){"function"==typeof o["preRun"]&&(o["preRun"]=[o["preRun"]]);while(o["preRun"].length)sr(o["preRun"].shift())}Nr(Z)}function or(){!0,o["noFSInit"]||Hr.init.initialized||Hr.init(),Hr.ignorePermissions=!1,Lr.init(),Nr($)}function ir(){Nr(rr)}function ar(){if(o["postRun"]){"function"==typeof o["postRun"]&&(o["postRun"]=[o["postRun"]]);while(o["postRun"].length)cr(o["postRun"].shift())}Nr(er)}function sr(r){Z.unshift(r)}function ur(r){$.unshift(r)}function cr(r){er.unshift(r)}var lr=0,dr=null,fr=null;function mr(r){return r}function hr(r){lr++,o["monitorRunDependencies"]&&o["monitorRunDependencies"](lr)}function pr(r){if(lr--,o["monitorRunDependencies"]&&o["monitorRunDependencies"](lr),0==lr&&(null!==dr&&(clearInterval(dr),dr=null),fr)){var e=fr;fr=null,e()}}function Er(r){o["onAbort"]&&o["onAbort"](r),r="Aborted("+r+")",D(r),P=!0,O=1,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var wr,vr,yr,gr="data:application/octet-stream;base64,";function _r(r){return r.startsWith(gr)}function kr(r){return r.startsWith("file://")}function Sr(r){try{if(r==wr&&S)return new Uint8Array(S);if(c)return c(r);throw"both async and sync fetching of the wasm failed"}catch(D){Er(D)}}function br(){if(!S&&(w||v)){if("function"==typeof fetch&&!kr(wr))return fetch(wr,{credentials:"same-origin"}).then((function(r){if(!r["ok"])throw"failed to load wasm binary file at '"+wr+"'";return r["arrayBuffer"]()})).catch((function(){return Sr(wr)}));if(u)return new Promise((function(r,e){u(wr,(function(e){r(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Sr(wr)}))}function Dr(){var r={a:Ce};function e(r,e){var t=r.exports;o["asm"]=t,N=o["asm"]["A"],Q(N.buffer),J=o["asm"]["M"],ur(o["asm"]["B"]),pr("wasm-instantiate")}function t(r){e(r["instance"])}function i(e){return br().then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){D("failed to asynchronously prepare wasm: "+r),Er(r)}))}function a(){return S||"function"!=typeof WebAssembly.instantiateStreaming||_r(wr)||kr(wr)||y||"function"!=typeof fetch?i(t):fetch(wr,{credentials:"same-origin"}).then((function(e){var n=WebAssembly.instantiateStreaming(e,r);return n.then(t,(function(r){return D("wasm streaming compile failed: "+r),D("falling back to ArrayBuffer instantiation"),i(t)}))}))}if(hr("wasm-instantiate"),o["instantiateWasm"])try{var s=o["instantiateWasm"](r,e);return s}catch(u){return D("Module.instantiateWasm callback failed with error: "+u),!1}return a().catch(n),{}}function Nr(r){while(r.length>0){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?Or(t)():Or(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}wr="BMPImageIOReadImage.wasm",_r(wr)||(wr=_(wr));var Fr=[];function Or(r){var e=Fr[r];return e||(r>=Fr.length&&(Fr.length=r+1),Fr[r]=e=J.get(r)),e}function Pr(r){if(r instanceof Ue||"unwind"==r)return O;E(1,r)}function Ar(r){return Le(r+24)+24}function Mr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){x[this.ptr+4>>2]=r},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(r){x[this.ptr+8>>2]=r},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(r){z[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,I[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=I[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,I[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=I[this.ptr+13>>0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=z[this.ptr>>2];z[this.ptr>>2]=r+1},this.release_ref=function(){var r=z[this.ptr>>2];return z[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){x[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){var r=je(this.get_type());if(r)return x[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function Rr(r,e,t){var n=new Mr(r);throw n.init(e,t),r,r}var Tr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(r).slice(1)},normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=Tr.isAbs(r),t="/"===r.substr(-1);return r=Tr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"),r||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=Tr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";r=Tr.normalize(r),r=r.replace(/\/$/,"");var e=r.lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments,0);return Tr.normalize(r.join("/"))},join2:(r,e)=>Tr.normalize(r+"/"+e)};function Cr(){if("object"==typeof crypto&&"function"==typeof crypto["getRandomValues"]){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}if(y)try{var e=require("crypto");return function(){return e["randomBytes"](1)[0]}}catch(t){}return function(){Er("randomDevice")}}var Ir={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Hr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=Tr.isAbs(n)}return r=Tr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"),(e?"/":"")+r||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length;e++)if(""!==r[e])break;for(var t=r.length-1;t>=0;t--)if(""!==r[t])break;return e>t?[]:r.slice(e,t-e+1)}r=Ir.resolve(r).substr(1),e=Ir.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return u=u.concat(o.slice(a)),u.join("/")}},Lr={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){Lr.ttys[r]={input:[],output:[],ops:e},Hr.registerDevice(r,Lr.stream_ops)},stream_ops:{open:function(r){var e=Lr.ttys[r.node.rdev];if(!e)throw new Hr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Hr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(u){throw new Hr.ErrnoError(29)}if(void 0===s&&0===i)throw new Hr.ErrnoError(6);if(null===s||void 0===s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Hr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(a){throw new Hr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if(y){var t=256,n=Buffer.alloc(t),o=0;try{o=l.readSync(process.stdin.fd,n,0,t,-1)}catch(i){if(!i.toString().includes("EOF"))throw i;o=0}e=o>0?n.slice(0,o).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(e=window.prompt("Input: "),null!==e&&(e+="\n")):"function"==typeof readline&&(e=readline(),null!==e&&(e+="\n"));if(!e)return null;r.input=Re(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(b(U(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(b(U(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(D(U(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(D(U(r.output,0)),r.output=[])}}};function Br(r){Er()}var zr={ops_table:null,mount:function(r){return zr.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(Hr.isBlkdev(t)||Hr.isFIFO(t))throw new Hr.ErrnoError(63);zr.ops_table||(zr.ops_table={dir:{node:{getattr:zr.node_ops.getattr,setattr:zr.node_ops.setattr,lookup:zr.node_ops.lookup,mknod:zr.node_ops.mknod,rename:zr.node_ops.rename,unlink:zr.node_ops.unlink,rmdir:zr.node_ops.rmdir,readdir:zr.node_ops.readdir,symlink:zr.node_ops.symlink},stream:{llseek:zr.stream_ops.llseek}},file:{node:{getattr:zr.node_ops.getattr,setattr:zr.node_ops.setattr},stream:{llseek:zr.stream_ops.llseek,read:zr.stream_ops.read,write:zr.stream_ops.write,allocate:zr.stream_ops.allocate,mmap:zr.stream_ops.mmap,msync:zr.stream_ops.msync}},link:{node:{getattr:zr.node_ops.getattr,setattr:zr.node_ops.setattr,readlink:zr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:zr.node_ops.getattr,setattr:zr.node_ops.setattr},stream:Hr.chrdev_stream_ops}});var o=Hr.createNode(r,e,t,n);return Hr.isDir(o.mode)?(o.node_ops=zr.ops_table.dir.node,o.stream_ops=zr.ops_table.dir.stream,o.contents={}):Hr.isFile(o.mode)?(o.node_ops=zr.ops_table.file.node,o.stream_ops=zr.ops_table.file.stream,o.usedBytes=0,o.contents=null):Hr.isLink(o.mode)?(o.node_ops=zr.ops_table.link.node,o.stream_ops=zr.ops_table.link.stream):Hr.isChrdev(o.mode)&&(o.node_ops=zr.ops_table.chrdev.node,o.stream_ops=zr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1048576;e=Math.max(e,t*(t<n?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var o=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(o.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=Hr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Hr.isDir(r.mode)?e.size=4096:Hr.isFile(r.mode)?e.size=r.usedBytes:Hr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&zr.resizeFileStorage(r,e.size)},lookup:function(r,e){throw Hr.genericErrors[44]},mknod:function(r,e,t,n){return zr.createNode(r,e,t,n)},rename:function(r,e,t){if(Hr.isDir(r.mode)){var n;try{n=Hr.lookupNode(e,t)}catch(i){}if(n)for(var o in n.contents)throw new Hr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=Hr.lookupNode(r,e);for(var n in t.contents)throw new Hr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=zr.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!Hr.isLink(r.mode))throw new Hr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===I.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(zr.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Hr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Hr.ErrnoError(28);return n},allocate:function(r,e,t){zr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);var i,a,s=r.node.contents;if(2&o||s.buffer!==C){if((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),a=!0,i=Br(e),!i)throw new Hr.ErrnoError(48);I.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(r,e,t,n,o){if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);if(2&o)return 0;zr.stream_ops.write(r,e,0,n,t,!1);return 0}}};function xr(r,e,t,n){var o=n?"":mr("al "+r);u(r,(function(t){A(t,'Loading data file "'+r+'" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&pr(o)}),(function(e){if(!t)throw'Loading data file "'+r+'" failed.';t()})),o&&hr(o)}var jr={},Ur={isWindows:!1,staticInit:()=>{Ur.isWindows=!!process.platform.match(/^win/);var r=process["binding"]("constants");r["fs"]&&(r=r["fs"]),Ur.flagsForNodeMap={1024:r["O_APPEND"],64:r["O_CREAT"],128:r["O_EXCL"],256:r["O_NOCTTY"],0:r["O_RDONLY"],2:r["O_RDWR"],4096:r["O_SYNC"],512:r["O_TRUNC"],1:r["O_WRONLY"],131072:r["O_NOFOLLOW"]}},convertNodeCode:r=>{var e=r.code;return jr[e]},mount:r=>Ur.createNode(null,"/",Ur.getMode(r.opts.root),0),createNode:(r,e,t,n)=>{if(!Hr.isDir(t)&&!Hr.isFile(t)&&!Hr.isLink(t))throw new Hr.ErrnoError(28);var o=Hr.createNode(r,e,t);return o.node_ops=Ur.node_ops,o.stream_ops=Ur.stream_ops,o},getMode:r=>{var e;try{e=l.lstatSync(r),Ur.isWindows&&(e.mode=e.mode|(292&e.mode)>>2)}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}return e.mode},realPath:r=>{var e=[];while(r.parent!==r)e.push(r.name),r=r.parent;return e.push(r.mount.opts.root),e.reverse(),Tr.join.apply(null,e)},flagsForNode:r=>{r&=-2097153,r&=-2049,r&=-32769,r&=-524289,r&=-65537;var e=0;for(var t in Ur.flagsForNodeMap)r&t&&(e|=Ur.flagsForNodeMap[t],r^=t);if(r)throw new Hr.ErrnoError(28);return e},node_ops:{getattr:r=>{var e,t=Ur.realPath(r);try{e=l.lstatSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}return Ur.isWindows&&!e.blksize&&(e.blksize=4096),Ur.isWindows&&!e.blocks&&(e.blocks=(e.size+e.blksize-1)/e.blksize|0),{dev:e.dev,ino:e.ino,mode:e.mode,nlink:e.nlink,uid:e.uid,gid:e.gid,rdev:e.rdev,size:e.size,atime:e.atime,mtime:e.mtime,ctime:e.ctime,blksize:e.blksize,blocks:e.blocks}},setattr:(r,e)=>{var t=Ur.realPath(r);try{if(void 0!==e.mode&&(l.chmodSync(t,e.mode),r.mode=e.mode),void 0!==e.timestamp){var n=new Date(e.timestamp);l.utimesSync(t,n,n)}void 0!==e.size&&l.truncateSync(t,e.size)}catch(o){if(!o.code)throw o;throw new Hr.ErrnoError(Ur.convertNodeCode(o))}},lookup:(r,e)=>{var t=Tr.join2(Ur.realPath(r),e),n=Ur.getMode(t);return Ur.createNode(r,e,n)},mknod:(r,e,t,n)=>{var o=Ur.createNode(r,e,t,n),i=Ur.realPath(o);try{Hr.isDir(o.mode)?l.mkdirSync(i,o.mode):l.writeFileSync(i,"",{mode:o.mode})}catch(a){if(!a.code)throw a;throw new Hr.ErrnoError(Ur.convertNodeCode(a))}return o},rename:(r,e,t)=>{var n=Ur.realPath(r),o=Tr.join2(Ur.realPath(e),t);try{l.renameSync(n,o)}catch(i){if(!i.code)throw i;throw new Hr.ErrnoError(Ur.convertNodeCode(i))}r.name=t},unlink:(r,e)=>{var t=Tr.join2(Ur.realPath(r),e);try{l.unlinkSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}},rmdir:(r,e)=>{var t=Tr.join2(Ur.realPath(r),e);try{l.rmdirSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}},readdir:r=>{var e=Ur.realPath(r);try{return l.readdirSync(e)}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}},symlink:(r,e,t)=>{var n=Tr.join2(Ur.realPath(r),e);try{l.symlinkSync(t,n)}catch(o){if(!o.code)throw o;throw new Hr.ErrnoError(Ur.convertNodeCode(o))}},readlink:r=>{var e=Ur.realPath(r);try{return e=l.readlinkSync(e),e=d.relative(d.resolve(r.mount.opts.root),e),e}catch(t){if(!t.code)throw t;if("UNKNOWN"===t.code)throw new Hr.ErrnoError(28);throw new Hr.ErrnoError(Ur.convertNodeCode(t))}}},stream_ops:{open:r=>{var e=Ur.realPath(r.node);try{Hr.isFile(r.node.mode)&&(r.nfd=l.openSync(e,Ur.flagsForNode(r.flags)))}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}},close:r=>{try{Hr.isFile(r.node.mode)&&r.nfd&&l.closeSync(r.nfd)}catch(e){if(!e.code)throw e;throw new Hr.ErrnoError(Ur.convertNodeCode(e))}},read:(r,e,t,n,o)=>{if(0===n)return 0;try{return l.readSync(r.nfd,Buffer.from(e.buffer),t,n,o)}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}},write:(r,e,t,n,o)=>{try{return l.writeSync(r.nfd,Buffer.from(e.buffer),t,n,o)}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}},llseek:(r,e,t)=>{var n=e;if(1===t)n+=r.position;else if(2===t&&Hr.isFile(r.node.mode))try{var o=l.fstatSync(r.nfd);n+=o.size}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}if(n<0)throw new Hr.ErrnoError(28);return n},mmap:(r,e,t,n,o)=>{if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);var i=Br(e);return Ur.stream_ops.read(r,I,i,e,t),{ptr:i,allocated:!0}},msync:(r,e,t,n,o)=>{if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);if(2&o)return 0;Ur.stream_ops.write(r,e,0,n,t,!1);return 0}}},Hr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(r=Ir.resolve(Hr.cwd(),r),!r)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(e=Object.assign(t,e),e.recurse_count>8)throw new Hr.ErrnoError(32);for(var n=Tr.normalizeArray(r.split("/").filter((r=>!!r)),!1),o=Hr.root,i="/",a=0;a<n.length;a++){var s=a===n.length-1;if(s&&e.parent)break;if(o=Hr.lookupNode(o,n[a]),i=Tr.join2(i,n[a]),Hr.isMountpoint(o)&&(!s||s&&e.follow_mount)&&(o=o.mounted.root),!s||e.follow){var u=0;while(Hr.isLink(o.mode)){var c=Hr.readlink(i);i=Ir.resolve(Tr.dirname(i),c);var l=Hr.lookupPath(i,{recurse_count:e.recurse_count+1});if(o=l.node,u++>40)throw new Hr.ErrnoError(32)}}}return{path:i,node:o}},getPath:r=>{var e;while(1){if(Hr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Hr.nameTable.length},hashAddNode:r=>{var e=Hr.hashName(r.parent.id,r.name);r.name_next=Hr.nameTable[e],Hr.nameTable[e]=r},hashRemoveNode:r=>{var e=Hr.hashName(r.parent.id,r.name);if(Hr.nameTable[e]===r)Hr.nameTable[e]=r.name_next;else{var t=Hr.nameTable[e];while(t){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}}},lookupNode:(r,e)=>{var t=Hr.mayLookup(r);if(t)throw new Hr.ErrnoError(t,r);for(var n=Hr.hashName(r.id,e),o=Hr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return Hr.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new Hr.FSNode(r,e,t,n);return Hr.hashAddNode(o),o},destroyNode:r=>{Hr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768===(61440&r),isDir:r=>16384===(61440&r),isLink:r=>40960===(61440&r),isChrdev:r=>8192===(61440&r),isBlkdev:r=>24576===(61440&r),isFIFO:r=>4096===(61440&r),isSocket:r=>49152===(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=Hr.flagModes[r];if("undefined"==typeof e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>Hr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var e=Hr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{Hr.lookupNode(r,e);return 20}catch(t){}return Hr.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=Hr.lookupNode(r,e)}catch(i){return i.errno}var o=Hr.nodePermissions(r,"wx");if(o)return o;if(t){if(!Hr.isDir(n.mode))return 54;if(Hr.isRoot(n)||Hr.getPath(n)===Hr.cwd())return 10}else if(Hr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Hr.isLink(r.mode)?32:Hr.isDir(r.mode)&&("r"!==Hr.flagsToPermissionString(e)||512&e)?31:Hr.nodePermissions(r,Hr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=Hr.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!Hr.streams[t])return t;throw new Hr.ErrnoError(33)},getStream:r=>Hr.streams[r],createStream:(r,e,t)=>{Hr.FSStream||(Hr.FSStream=function(){this.shared={}},Hr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!==(2097155&this.flags)}},isWrite:{get:function(){return 0!==(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get function(){return this.shared.position},set:function(r){this.shared.position=r}}}),r=Object.assign(new Hr.FSStream,r);var n=Hr.nextfd(e,t);return r.fd=n,Hr.streams[n]=r,r},closeStream:r=>{Hr.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=Hr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new Hr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{Hr.devices[r]={stream_ops:e}},getDevice:r=>Hr.devices[r],getMounts:r=>{var e=[],t=[r];while(t.length){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),Hr.syncFSRequests++,Hr.syncFSRequests>1&&D("warning: "+Hr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Hr.getMounts(Hr.root.mount),n=0;function o(r){return Hr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o="/"===t,i=!t;if(o&&Hr.root)throw new Hr.ErrnoError(10);if(!o&&!i){var a=Hr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Hr.isMountpoint(n))throw new Hr.ErrnoError(10);if(!Hr.isDir(n.mode))throw new Hr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Hr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=Hr.lookupPath(r,{follow_mount:!1});if(!Hr.isMountpoint(e.node))throw new Hr.ErrnoError(28);var t=e.node,n=t.mounted,o=Hr.getMounts(n);Object.keys(Hr.nameTable).forEach((r=>{var e=Hr.nameTable[r];while(e){var t=e.name_next;o.includes(e.mount)&&Hr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=Hr.lookupPath(r,{parent:!0}),o=n.node,i=Tr.basename(r);if(!i||"."===i||".."===i)throw new Hr.ErrnoError(28);var a=Hr.mayCreate(o,i);if(a)throw new Hr.ErrnoError(a);if(!o.node_ops.mknod)throw new Hr.ErrnoError(63);return o.node_ops.mknod(o,i,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Hr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Hr.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Hr.mkdir(n,e)}catch(i){if(20!=i.errno)throw i}}},mkdev:(r,e,t)=>("undefined"==typeof t&&(t=e,e=438),e|=8192,Hr.mknod(r,e,t)),symlink:(r,e)=>{if(!Ir.resolve(r))throw new Hr.ErrnoError(44);var t=Hr.lookupPath(e,{parent:!0}),n=t.node;if(!n)throw new Hr.ErrnoError(44);var o=Tr.basename(e),i=Hr.mayCreate(n,o);if(i)throw new Hr.ErrnoError(i);if(!n.node_ops.symlink)throw new Hr.ErrnoError(63);return n.node_ops.symlink(n,o,r)},rename:(r,e)=>{var t,n,o,i=Tr.dirname(r),a=Tr.dirname(e),s=Tr.basename(r),u=Tr.basename(e);if(t=Hr.lookupPath(r,{parent:!0}),n=t.node,t=Hr.lookupPath(e,{parent:!0}),o=t.node,!n||!o)throw new Hr.ErrnoError(44);if(n.mount!==o.mount)throw new Hr.ErrnoError(75);var c,l=Hr.lookupNode(n,s),d=Ir.relative(r,a);if("."!==d.charAt(0))throw new Hr.ErrnoError(28);if(d=Ir.relative(e,i),"."!==d.charAt(0))throw new Hr.ErrnoError(55);try{c=Hr.lookupNode(o,u)}catch(h){}if(l!==c){var f=Hr.isDir(l.mode),m=Hr.mayDelete(n,s,f);if(m)throw new Hr.ErrnoError(m);if(m=c?Hr.mayDelete(o,u,f):Hr.mayCreate(o,u),m)throw new Hr.ErrnoError(m);if(!n.node_ops.rename)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(l)||c&&Hr.isMountpoint(c))throw new Hr.ErrnoError(10);if(o!==n&&(m=Hr.nodePermissions(n,"w"),m))throw new Hr.ErrnoError(m);Hr.hashRemoveNode(l);try{n.node_ops.rename(l,o,u)}catch(h){throw h}finally{Hr.hashAddNode(l)}}},rmdir:r=>{var e=Hr.lookupPath(r,{parent:!0}),t=e.node,n=Tr.basename(r),o=Hr.lookupNode(t,n),i=Hr.mayDelete(t,n,!0);if(i)throw new Hr.ErrnoError(i);if(!t.node_ops.rmdir)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(o))throw new Hr.ErrnoError(10);t.node_ops.rmdir(t,n),Hr.destroyNode(o)},readdir:r=>{var e=Hr.lookupPath(r,{follow:!0}),t=e.node;if(!t.node_ops.readdir)throw new Hr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var e=Hr.lookupPath(r,{parent:!0}),t=e.node;if(!t)throw new Hr.ErrnoError(44);var n=Tr.basename(r),o=Hr.lookupNode(t,n),i=Hr.mayDelete(t,n,!1);if(i)throw new Hr.ErrnoError(i);if(!t.node_ops.unlink)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(o))throw new Hr.ErrnoError(10);t.node_ops.unlink(t,n),Hr.destroyNode(o)},readlink:r=>{var e=Hr.lookupPath(r),t=e.node;if(!t)throw new Hr.ErrnoError(44);if(!t.node_ops.readlink)throw new Hr.ErrnoError(28);return Ir.resolve(Hr.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,e)=>{var t=Hr.lookupPath(r,{follow:!e}),n=t.node;if(!n)throw new Hr.ErrnoError(44);if(!n.node_ops.getattr)throw new Hr.ErrnoError(63);return n.node_ops.getattr(n)},lstat:r=>Hr.stat(r,!0),chmod:(r,e,t)=>{var n;if("string"==typeof r){var o=Hr.lookupPath(r,{follow:!t});n=o.node}else n=r;if(!n.node_ops.setattr)throw new Hr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{Hr.chmod(r,e,!0)},fchmod:(r,e)=>{var t=Hr.getStream(r);if(!t)throw new Hr.ErrnoError(8);Hr.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if("string"==typeof r){var i=Hr.lookupPath(r,{follow:!n});o=i.node}else o=r;if(!o.node_ops.setattr)throw new Hr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{Hr.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=Hr.getStream(r);if(!n)throw new Hr.ErrnoError(8);Hr.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new Hr.ErrnoError(28);var t;if("string"==typeof r){var n=Hr.lookupPath(r,{follow:!0});t=n.node}else t=r;if(!t.node_ops.setattr)throw new Hr.ErrnoError(63);if(Hr.isDir(t.mode))throw new Hr.ErrnoError(31);if(!Hr.isFile(t.mode))throw new Hr.ErrnoError(28);var o=Hr.nodePermissions(t,"w");if(o)throw new Hr.ErrnoError(o);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=Hr.getStream(r);if(!t)throw new Hr.ErrnoError(8);if(0===(2097155&t.flags))throw new Hr.ErrnoError(28);Hr.truncate(t.node,e)},utime:(r,e,t)=>{var n=Hr.lookupPath(r,{follow:!0}),o=n.node;o.node_ops.setattr(o,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new Hr.ErrnoError(44);var n;if(e="string"==typeof e?Hr.modeStringToFlags(e):e,t="undefined"==typeof t?438:t,t=64&e?4095&t|32768:0,"object"==typeof r)n=r;else{r=Tr.normalize(r);try{var i=Hr.lookupPath(r,{follow:!(131072&e)});n=i.node}catch(c){}}var a=!1;if(64&e)if(n){if(128&e)throw new Hr.ErrnoError(20)}else n=Hr.mknod(r,t,0),a=!0;if(!n)throw new Hr.ErrnoError(44);if(Hr.isChrdev(n.mode)&&(e&=-513),65536&e&&!Hr.isDir(n.mode))throw new Hr.ErrnoError(54);if(!a){var s=Hr.mayOpen(n,e);if(s)throw new Hr.ErrnoError(s)}512&e&&!a&&Hr.truncate(n,0),e&=-131713;var u=Hr.createStream({node:n,path:Hr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),!o["logReadFiles"]||1&e||(Hr.readFiles||(Hr.readFiles={}),r in Hr.readFiles||(Hr.readFiles[r]=1)),u},close:r=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{Hr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Hr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Hr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new Hr.ErrnoError(28);if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(1===(2097155&r.flags))throw new Hr.ErrnoError(8);if(Hr.isDir(r.node.mode))throw new Hr.ErrnoError(31);if(!r.stream_ops.read)throw new Hr.ErrnoError(28);var i="undefined"!=typeof o;if(i){if(!r.seekable)throw new Hr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new Hr.ErrnoError(28);if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(0===(2097155&r.flags))throw new Hr.ErrnoError(8);if(Hr.isDir(r.node.mode))throw new Hr.ErrnoError(31);if(!r.stream_ops.write)throw new Hr.ErrnoError(28);r.seekable&&1024&r.flags&&Hr.llseek(r,0,2);var a="undefined"!=typeof o;if(a){if(!r.seekable)throw new Hr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(e<0||t<=0)throw new Hr.ErrnoError(28);if(0===(2097155&r.flags))throw new Hr.ErrnoError(8);if(!Hr.isFile(r.node.mode)&&!Hr.isDir(r.node.mode))throw new Hr.ErrnoError(43);if(!r.stream_ops.allocate)throw new Hr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o)=>{if(0!==(2&n)&&0===(2&o)&&2!==(2097155&r.flags))throw new Hr.ErrnoError(2);if(1===(2097155&r.flags))throw new Hr.ErrnoError(2);if(!r.stream_ops.mmap)throw new Hr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new Hr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var t,n=Hr.open(r,e.flags),o=Hr.stat(r),i=o.size,a=new Uint8Array(i);return Hr.read(n,a,0,i,0),"utf8"===e.encoding?t=U(a,0):"binary"===e.encoding&&(t=a),Hr.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=Hr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(q(e)+1),i=Y(e,o,0,o.length);Hr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Hr.write(n,e,0,e.byteLength,void 0,t.canOwn)}Hr.close(n)},cwd:()=>Hr.currentPath,chdir:r=>{var e=Hr.lookupPath(r,{follow:!0});if(null===e.node)throw new Hr.ErrnoError(44);if(!Hr.isDir(e.node.mode))throw new Hr.ErrnoError(54);var t=Hr.nodePermissions(e.node,"x");if(t)throw new Hr.ErrnoError(t);Hr.currentPath=e.path},createDefaultDirectories:()=>{Hr.mkdir("/tmp"),Hr.mkdir("/home"),Hr.mkdir("/home/web_user")},createDefaultDevices:()=>{Hr.mkdir("/dev"),Hr.registerDevice(Hr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Hr.mkdev("/dev/null",Hr.makedev(1,3)),Lr.register(Hr.makedev(5,0),Lr.default_tty_ops),Lr.register(Hr.makedev(6,0),Lr.default_tty1_ops),Hr.mkdev("/dev/tty",Hr.makedev(5,0)),Hr.mkdev("/dev/tty1",Hr.makedev(6,0));var r=Cr();Hr.createDevice("/dev","random",r),Hr.createDevice("/dev","urandom",r),Hr.mkdir("/dev/shm"),Hr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Hr.mkdir("/proc");var r=Hr.mkdir("/proc/self");Hr.mkdir("/proc/self/fd"),Hr.mount({mount:()=>{var e=Hr.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=Hr.getStream(t);if(!n)throw new Hr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o["stdin"]?Hr.createDevice("/dev","stdin",o["stdin"]):Hr.symlink("/dev/tty","/dev/stdin"),o["stdout"]?Hr.createDevice("/dev","stdout",null,o["stdout"]):Hr.symlink("/dev/tty","/dev/stdout"),o["stderr"]?Hr.createDevice("/dev","stderr",null,o["stderr"]):Hr.symlink("/dev/tty1","/dev/stderr");Hr.open("/dev/stdin",0),Hr.open("/dev/stdout",1),Hr.open("/dev/stderr",1)},ensureErrnoError:()=>{Hr.ErrnoError||(Hr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Hr.ErrnoError.prototype=new Error,Hr.ErrnoError.prototype.constructor=Hr.ErrnoError,[44].forEach((r=>{Hr.genericErrors[r]=new Hr.ErrnoError(r),Hr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{Hr.ensureErrnoError(),Hr.nameTable=new Array(4096),Hr.mount(zr,{},"/"),Hr.createDefaultDirectories(),Hr.createDefaultDevices(),Hr.createSpecialDirectories(),Hr.filesystems={MEMFS:zr,NODEFS:Ur}},init:(r,e,t)=>{Hr.init.initialized=!0,Hr.ensureErrnoError(),o["stdin"]=r||o["stdin"],o["stdout"]=e||o["stdout"],o["stderr"]=t||o["stderr"],Hr.createStandardStreams()},quit:()=>{Hr.init.initialized=!1;for(var r=0;r<Hr.streams.length;r++){var e=Hr.streams[r];e&&Hr.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=Hr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{var t=Hr.lookupPath(r,{follow:!e});r=t.path}catch(o){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{t=Hr.lookupPath(r,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=Tr.basename(r),t=Hr.lookupPath(r,{follow:!e}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(o){n.error=o.errno}return n},createPath:(r,e,t,n)=>{r="string"==typeof r?r:Hr.getPath(r);var o=e.split("/").reverse();while(o.length){var i=o.pop();if(i){var a=Tr.join2(r,i);try{Hr.mkdir(a)}catch(s){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=Tr.join2("string"==typeof r?r:Hr.getPath(r),e),a=Hr.getMode(n,o);return Hr.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r="string"==typeof r?r:Hr.getPath(r),a=e?Tr.join2(r,e):r);var s=Hr.getMode(n,o),u=Hr.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}Hr.chmod(u,146|s);var f=Hr.open(u,577);Hr.write(f,t,0,t.length,0,i),Hr.close(f),Hr.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=Tr.join2("string"==typeof r?r:Hr.getPath(r),e),i=Hr.getMode(!!t,!!n);Hr.createDevice.major||(Hr.createDevice.major=64);var a=Hr.makedev(Hr.createDevice.major++,0);return Hr.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(c){throw new Hr.ErrnoError(29)}if(void 0===u&&0===a)throw new Hr.ErrnoError(6);if(null===u||void 0===u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(s){throw new Hr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Hr.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=Re(s(r.url),!0),r.usedBytes=r.contents.length}catch(e){throw new Hr.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=(r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Re(o.responseText||"",!0)},u=this;u.setDataGetter((r=>{var e=r*a,t=(r+1)*a-1;if(t=Math.min(t,n-1),"undefined"==typeof u.chunks[r]&&(u.chunks[r]=s(e,t)),"undefined"==typeof u.chunks[r])throw new Error("doXHR failed!");return u.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!v)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:t};var u=Hr.createFile(r,e,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={},l=Object.keys(u.stream_ops);function d(r,e,t,n,o){var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)e[t+s]=i[o+s];else for(s=0;s<a;s++)e[t+s]=i.get(o+s);return a}return l.forEach((r=>{var e=u.stream_ops[r];c[r]=function(){return Hr.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(r,e,t,n,o)=>(Hr.forceLoadFile(u),d(r,e,t,n,o)),c.mmap=(r,e,t,n,o)=>{Hr.forceLoadFile(u);var i=Br(e);if(!i)throw new Hr.ErrnoError(48);return d(r,I,i,e,t),{ptr:i,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,e,t,n,o,i,a,s,u,c)=>{var l=e?Ir.resolve(Tr.join2(r,e)):r,d=mr("cp "+l);function f(t){function f(t){c&&c(),s||Hr.createDataFile(r,e,t,n,o,u),i&&i(),pr(d)}Browser.handledByPreloadPlugin(t,l,f,(()=>{a&&a(),pr(d)}))||f(t)}hr(d),"string"==typeof t?xr(t,(r=>f(r)),a):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Hr.indexedDB();try{var o=n.open(Hr.DB_NAME(),Hr.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=()=>{b("creating db");var r=o.result;r.createObjectStore(Hr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result,i=n.transaction([Hr.DB_STORE_NAME],"readwrite"),a=i.objectStore(Hr.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.put(Hr.analyzePath(r).object.contents,r);e.onsuccess=()=>{s++,s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Hr.indexedDB();try{var o=n.open(Hr.DB_NAME(),Hr.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([Hr.DB_STORE_NAME],"readonly")}catch(i){return void t(i)}var s=a.objectStore(Hr.DB_STORE_NAME),u=0,c=0,l=r.length;function d(){0==c?e():t()}r.forEach((r=>{var e=s.get(r);e.onsuccess=()=>{Hr.analyzePath(r).exists&&Hr.unlink(r),Hr.createDataFile(Tr.dirname(r),Tr.basename(r),e.result,!0,!0,!0),u++,u+c==l&&d()},e.onerror=()=>{c++,u+c==l&&d()}})),a.onerror=t},o.onerror=t}},Yr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(Tr.isAbs(e))return e;var n;if(-100===r)n=Hr.cwd();else{var o=Hr.getStream(r);if(!o)throw new Hr.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new Hr.ErrnoError(44);return n}return Tr.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(o){if(o&&o.node&&Tr.normalize(e)!==Tr.normalize(Hr.getPath(o.node)))return-54;throw o}return z[t>>2]=n.dev,z[t+4>>2]=0,z[t+8>>2]=n.ino,z[t+12>>2]=n.mode,z[t+16>>2]=n.nlink,z[t+20>>2]=n.uid,z[t+24>>2]=n.gid,z[t+28>>2]=n.rdev,z[t+32>>2]=0,yr=[n.size>>>0,(vr=n.size,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],z[t+40>>2]=yr[0],z[t+44>>2]=yr[1],z[t+48>>2]=4096,z[t+52>>2]=n.blocks,z[t+56>>2]=n.atime.getTime()/1e3|0,z[t+60>>2]=0,z[t+64>>2]=n.mtime.getTime()/1e3|0,z[t+68>>2]=0,z[t+72>>2]=n.ctime.getTime()/1e3|0,z[t+76>>2]=0,yr=[n.ino>>>0,(vr=n.ino,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],z[t+80>>2]=yr[0],z[t+84>>2]=yr[1],0},doMsync:function(r,e,t,n,o){var i=L.slice(r,r+t);Hr.msync(e,i,o,t,n)},varargs:void 0,get:function(){Yr.varargs+=4;var r=z[Yr.varargs-4>>2];return r},getStr:function(r){var e=H(r);return e},getStreamFromFD:function(r){var e=Hr.getStream(r);if(!e)throw new Hr.ErrnoError(8);return e}};function Wr(r,e,t,n){try{if(e=Yr.getStr(e),e=Yr.calculateAt(r,e),-8&t)return-28;var o=Hr.lookupPath(e,{follow:!0}),i=o.node;if(!i)return-44;var a="";return 4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&Hr.nodePermissions(i,a)?-2:0}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function qr(r){return z[Ie()>>2]=r,r}function Gr(r,e,t){Yr.varargs=t;try{var n=Yr.getStreamFromFD(r);switch(e){case 0:var o,i=Yr.get();return i<0?-28:(o=Hr.createStream(n,i),o.fd);case 1:case 2:return 0;case 3:return n.flags;case 4:i=Yr.get();return n.flags|=i,0;case 5:i=Yr.get();var a=0;return B[i+a>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return qr(28),-1;default:return-28}}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function Xr(r,e){try{if(0===e)return-28;var t=Hr.cwd(),n=q(t)+1;return e<n?-68:(W(t,r,e),n)}catch(o){if("undefined"==typeof Hr||!(o instanceof Hr.ErrnoError))throw o;return-o.errno}}function Kr(r,e,t){Yr.varargs=t;try{var n=Yr.getStreamFromFD(r);switch(e){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Yr.get();return z[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=Yr.get();return Hr.ioctl(n,e,o);case 21523:return n.tty?0:-59;case 21524:return n.tty?0:-59;default:Er("bad ioctl syscall "+e)}}catch(i){if("undefined"==typeof Hr||!(i instanceof Hr.ErrnoError))throw i;return-i.errno}}function Vr(r,e){try{return r=Yr.getStr(r),Yr.doStat(Hr.lstat,r,e)}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return-t.errno}}function Qr(r,e,t){try{return e=Yr.getStr(e),e=Yr.calculateAt(r,e),e=Tr.normalize(e),"/"===e[e.length-1]&&(e=e.substr(0,e.length-1)),Hr.mkdir(e,t,0),0}catch(n){if("undefined"==typeof Hr||!(n instanceof Hr.ErrnoError))throw n;return-n.errno}}function Jr(r,e,t,n){try{e=Yr.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=Yr.calculateAt(r,e,i),Yr.doStat(o?Hr.lstat:Hr.stat,e,t)}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return-a.errno}}function Zr(r,e,t,n){Yr.varargs=n;try{e=Yr.getStr(e),e=Yr.calculateAt(r,e);var o=n?Yr.get():0;return Hr.open(e,t,o).fd}catch(i){if("undefined"==typeof Hr||!(i instanceof Hr.ErrnoError))throw i;return-i.errno}}function $r(r,e,t,n){try{if(e=Yr.getStr(e),e=Yr.calculateAt(r,e),n<=0)return-28;var o=Hr.readlink(e),i=Math.min(n,q(o)),a=I[t+i];return W(o,t,n+1),I[t+i]=a,i}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function re(r,e){try{return r=Yr.getStr(r),Yr.doStat(Hr.stat,r,e)}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return-t.errno}}function ee(r,e,t){try{return e=Yr.getStr(e),e=Yr.calculateAt(r,e),0===t?Hr.unlink(e):512===t?Hr.rmdir(e):Er("Invalid flags passed to unlinkat"),0}catch(n){if("undefined"==typeof Hr||!(n instanceof Hr.ErrnoError))throw n;return-n.errno}}function te(r,e,t,n){try{if(e=Yr.getStr(e),e=Yr.calculateAt(r,e,!0),t){var o=z[t>>2],i=z[t+4>>2];a=1e3*o+i/1e6,t+=8,o=z[t>>2],i=z[t+4>>2],s=1e3*o+i/1e6}else var a=Date.now(),s=a;return Hr.utime(e,a,s),0}catch(u){if("undefined"==typeof Hr||!(u instanceof Hr.ErrnoError))throw u;return-u.errno}}function ne(){Er("")}function oe(r,e,t){L.copyWithin(r,e,e+t)}function ie(){return 2147483648}function ae(r){try{return N.grow(r-C.byteLength+65535>>>16),Q(N.buffer),1}catch(e){}}function se(r){var e=L.length;r>>>=0;var t=ie();if(r>t)return!1;let n=(r,e)=>r+(e-r%e)%e;for(var o=1;o<=4;o*=2){var i=e*(1+.2/o);i=Math.min(i,r+100663296);var a=Math.min(t,n(Math.max(r,i),65536)),s=ae(a);if(s)return!0}return!1}var ue={};function ce(){return p||"./this.program"}function le(){if(!le.strings){var r=("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:ce()};for(var t in ue)void 0===ue[t]?delete e[t]:e[t]=ue[t];var n=[];for(var t in e)n.push(t+"="+e[t]);le.strings=n}return le.strings}function de(r,e){var t=0;return le().forEach((function(n,o){var i=e+t;x[r+4*o>>2]=i,V(n,i),t+=n.length+1})),0}function fe(r,e){var t=le();x[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),x[e>>2]=n,0}function me(r){We(r)}function he(r){try{var e=Yr.getStreamFromFD(r);return Hr.close(e),0}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return t.errno}}function pe(r,e){try{var t=Yr.getStreamFromFD(r),n=t.tty?2:Hr.isDir(t.mode)?3:Hr.isLink(t.mode)?7:4;return I[e>>0]=n,0}catch(o){if("undefined"==typeof Hr||!(o instanceof Hr.ErrnoError))throw o;return o.errno}}function Ee(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=x[e>>2],s=x[e+4>>2];e+=8;var u=Hr.read(r,I,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}function we(r,e,t,n){try{var o=Yr.getStreamFromFD(r),i=Ee(o,e,t);return z[n>>2]=i,0}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return a.errno}}function ve(r,e){return e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN}function ye(r,e,t,n,o){try{var i=ve(e,t);if(isNaN(i))return 61;var a=Yr.getStreamFromFD(r);return Hr.llseek(a,i,n),yr=[a.position>>>0,(vr=a.position,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],z[o>>2]=yr[0],z[o+4>>2]=yr[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return s.errno}}function ge(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=x[e>>2],s=x[e+4>>2];e+=8;var u=Hr.write(r,I,a,s,n);if(u<0)return-1;o+=u}return o}function _e(r,e,t,n){try{var o=Yr.getStreamFromFD(r),i=ge(o,e,t);return x[n>>2]=i,0}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return a.errno}}function ke(r){return r%4===0&&(r%100!==0||r%400===0)}function Se(r,e){for(var t=0,n=0;n<=e;t+=r[n++]);return t}var be=[31,29,31,30,31,30,31,31,30,31,30,31],De=[31,28,31,30,31,30,31,31,30,31,30,31];function Ne(r,e){var t=new Date(r.getTime());while(e>0){var n=ke(t.getFullYear()),o=t.getMonth(),i=(n?be:De)[o];if(!(e>i-t.getDate()))return t.setDate(t.getDate()+e),t;e-=i-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}function Fe(r,e,t,n){var o=z[n+40>>2],i={tm_sec:z[n>>2],tm_min:z[n+4>>2],tm_hour:z[n+8>>2],tm_mday:z[n+12>>2],tm_mon:z[n+16>>2],tm_year:z[n+20>>2],tm_wday:z[n+24>>2],tm_yday:z[n+28>>2],tm_isdst:z[n+32>>2],tm_gmtoff:z[n+36>>2],tm_zone:o?H(o):""},a=H(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(r,e,t){var n="number"==typeof r?r.toString():r||"";while(n.length<e)n=t[0]+n;return n}function f(r,e){return d(r,e,"0")}function m(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.getDate())),n}function h(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function p(r){var e=Ne(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=h(t),i=h(n);return m(o,e)<=0?m(i,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var E={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return l[r.tm_mon].substring(0,3)},"%B":function(r){return l[r.tm_mon]},"%C":function(r){var e=r.tm_year+1900;return f(e/100|0,2)},"%d":function(r){return f(r.tm_mday,2)},"%e":function(r){return d(r.tm_mday,2," ")},"%g":function(r){return p(r).toString().substring(2)},"%G":function(r){return p(r)},"%H":function(r){return f(r.tm_hour,2)},"%I":function(r){var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),f(e,2)},"%j":function(r){return f(r.tm_mday+Se(ke(r.tm_year+1900)?be:De,r.tm_mon-1),3)},"%m":function(r){return f(r.tm_mon+1,2)},"%M":function(r){return f(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return f(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var e=r.tm_yday+7-r.tm_wday;return f(Math.floor(e/7),2)},"%V":function(r){var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&ke(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&ke(r.tm_year%400-1))&&e++}return f(e,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var e=r.tm_yday+7-(r.tm_wday+6)%7;return f(Math.floor(e/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var e=r.tm_gmtoff,t=e>=0;return e=Math.abs(e)/60,e=e/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),E)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),E[u](i)));a=a.replace(/\0\0/g,"%");var w=Re(a,!1);return w.length>e?0:(K(w,r),w.length-1)}function Oe(r,e,t,n){return Fe(r,e,t,n)}var Pe=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Hr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},Ae=365,Me=146;function Re(r,e,t){var n=t>0?t:q(r)+1,o=new Array(n),i=Y(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(Pe.prototype,{read:{get:function(){return(this.mode&Ae)===Ae},set:function(r){r?this.mode|=Ae:this.mode&=~Ae}},write:{get:function(){return(this.mode&Me)===Me},set:function(r){r?this.mode|=Me:this.mode&=~Me}},isFolder:{get:function(){return Hr.isDir(this.mode)}},isDevice:{get:function(){return Hr.isChrdev(this.mode)}}}),Hr.FSNode=Pe,Hr.staticInit(),o["FS_createPath"]=Hr.createPath,o["FS_createDataFile"]=Hr.createDataFile,o["FS_createPreloadedFile"]=Hr.createPreloadedFile,o["FS_unlink"]=Hr.unlink,o["FS_createLazyFile"]=Hr.createLazyFile,o["FS_createDevice"]=Hr.createDevice,y&&(f(),Ur.staticInit()),jr={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Te,Ce={a:Ar,b:Rr,k:Wr,e:Gr,x:Xr,i:Kr,s:Vr,q:Qr,r:Jr,j:Zr,p:$r,t:re,o:ee,n:te,c:ne,y:oe,d:se,v:de,w:fe,z:me,f:he,u:pe,h:we,l:ye,g:_e,m:Oe},Ie=(Dr(),o["___wasm_call_ctors"]=function(){return(o["___wasm_call_ctors"]=o["asm"]["B"]).apply(null,arguments)},o["_main"]=function(){return(o["_main"]=o["asm"]["C"]).apply(null,arguments)},o["___errno_location"]=function(){return(Ie=o["___errno_location"]=o["asm"]["D"]).apply(null,arguments)}),Le=(o["_itk_wasm_input_array_alloc"]=function(){return(o["_itk_wasm_input_array_alloc"]=o["asm"]["E"]).apply(null,arguments)},o["_itk_wasm_input_json_alloc"]=function(){return(o["_itk_wasm_input_json_alloc"]=o["asm"]["F"]).apply(null,arguments)},o["_itk_wasm_output_json_address"]=function(){return(o["_itk_wasm_output_json_address"]=o["asm"]["G"]).apply(null,arguments)},o["_itk_wasm_output_json_size"]=function(){return(o["_itk_wasm_output_json_size"]=o["asm"]["H"]).apply(null,arguments)},o["_itk_wasm_output_array_address"]=function(){return(o["_itk_wasm_output_array_address"]=o["asm"]["I"]).apply(null,arguments)},o["_itk_wasm_output_array_size"]=function(){return(o["_itk_wasm_output_array_size"]=o["asm"]["J"]).apply(null,arguments)},o["_itk_wasm_free_all"]=function(){return(o["_itk_wasm_free_all"]=o["asm"]["K"]).apply(null,arguments)},o["_malloc"]=function(){return(Le=o["_malloc"]=o["asm"]["L"]).apply(null,arguments)}),Be=o["stackSave"]=function(){return(Be=o["stackSave"]=o["asm"]["N"]).apply(null,arguments)},ze=o["stackRestore"]=function(){return(ze=o["stackRestore"]=o["asm"]["O"]).apply(null,arguments)},xe=o["stackAlloc"]=function(){return(xe=o["stackAlloc"]=o["asm"]["P"]).apply(null,arguments)},je=o["___cxa_is_pointer_type"]=function(){return(je=o["___cxa_is_pointer_type"]=o["asm"]["Q"]).apply(null,arguments)};function Ue(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}o["ccall"]=R,o["cwrap"]=T,o["addRunDependency"]=hr,o["removeRunDependency"]=pr,o["FS_createPath"]=Hr.createPath,o["FS_createDataFile"]=Hr.createDataFile,o["FS_createPreloadedFile"]=Hr.createPreloadedFile,o["FS_createLazyFile"]=Hr.createLazyFile,o["FS_createDevice"]=Hr.createDevice,o["FS_unlink"]=Hr.unlink,o["callMain"]=He,o["AsciiToString"]=G,o["writeArrayToMemory"]=K,o["writeAsciiToMemory"]=V;function He(r){var e=o["_main"];r=r||[],r.unshift(p);var t=r.length,n=xe(4*(t+1)),i=n>>2;r.forEach((r=>{z[i++]=X(r)})),z[i]=0;try{var a=e(t,n);return We(a,!0),a}catch(s){return Pr(s)}finally{!0}}function Ye(r){function e(){Te||(Te=!0,o["calledRun"]=!0,P||(or(),ir(),t(o),o["onRuntimeInitialized"]&&o["onRuntimeInitialized"](),Ge&&He(r),ar()))}r=r||h,lr>0||(nr(),lr>0||(o["setStatus"]?(o["setStatus"]("Running..."),setTimeout((function(){setTimeout((function(){o["setStatus"]("")}),1),e()}),1)):e()))}function We(r,e){O=r,qe(r)}function qe(r){O=r,tr()||(o["onExit"]&&o["onExit"](r),P=!0),E(r,new Ue(r))}if(fr=function r(){Te||Ye(),Te||(fr=r)},o["run"]=Ye,o["preInit"]){"function"==typeof o["preInit"]&&(o["preInit"]=[o["preInit"]]);while(o["preInit"].length>0)o["preInit"].pop()()}var Ge=!1;return o["noInitialRun"]&&(Ge=!1),Ye(),o.mountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);if(!Hr.isDir(t)&&"/"!==t){for(var n="/",o=t.split(e.sep),i=1;i<o.length;i++)n+=o[i],Hr.analyzePath(n).exists||Hr.mkdir(n),n+="/";return Hr.mount(Ur,{root:t},n),n+e.basename(r)}}},o.unmountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);Hr.unmount(t)}},o.fs_mkdirs=function(r){for(var e="/",t=r.split("/"),n=1;n<t.length;++n)e+=t[n],Hr.analyzePath(e).exists||Hr.mkdir(e),e+="/"},o.fs_readFile=function(r,e){return Hr.readFile(r,e)},o.fs_writeFile=function(r,e,t){return Hr.writeFile(r,e,t)},o.fs_unlink=function(r){return Hr.unlink(r)},o.fs_open=function(r,e,t){return Hr.open(r,e,t)},o.fs_stat=function(r){return Hr.stat(r)},o.fs_read=function(r,e,t,n,o){return Hr.read(r,e,t,n,o)},o.fs_close=function(r){return Hr.close(r)},o.mountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);if(!Hr.isDir(t)&&"/"!==t){for(var n="/",o=t.split(e.sep),i=1;i<o.length;i++)n+=o[i],Hr.analyzePath(n).exists||Hr.mkdir(n),n+="/";return Hr.mount(Ur,{root:t},n),n+e.basename(r)}}},o.unmountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);Hr.unmount(t)}},o.fs_mkdirs=function(r){for(var e="/",t=r.split("/"),n=1;n<t.length;++n)e+=t[n],Hr.analyzePath(e).exists||Hr.mkdir(e),e+="/"},o.fs_readFile=function(r,e){return Hr.readFile(r,e)},o.fs_writeFile=function(r,e,t){return Hr.writeFile(r,e,t)},o.fs_unlink=function(r){return Hr.unlink(r)},o.fs_open=function(r,e,t){return Hr.open(r,e,t)},o.fs_stat=function(r){return Hr.stat(r)},o.fs_read=function(r,e,t,n,o){return Hr.read(r,e,t,n,o)},o.fs_close=function(r){return Hr.close(r)},e.ready}})();export default BMPImageIOReadImage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var BMPImageIOReadImage=(()=>{var r="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!==typeof __filename&&(r=r||__filename),function(e){e=e||{};var t,n,o="undefined"!=typeof e?e:{};o["ready"]=new Promise((function(r,e){t=r,n=e}));var i=null,a=null;o["resetModuleStdout"]=function(){i=""},o["resetModuleStderr"]=function(){a=""},o["print"]=function(r){console.log(r),i+=r+"\n"},o["printErr"]=function(r){console.error(r),a+=r+"\n"},o["getModuleStdout"]=function(){return i},o["getModuleStderr"]=function(){return a};i=null,a=null;o["resetModuleStdout"]=function(){i=""},o["resetModuleStderr"]=function(){a=""},o["print"]=function(r){console.log(r),i+=r+"\n"},o["printErr"]=function(r){console.error(r),a+=r+"\n"},o["getModuleStdout"]=function(){return i},o["getModuleStderr"]=function(){return a};var s,u,c,d,f,l,m=Object.assign({},o),h=[],p="./this.program",E=(r,e)=>{throw e},w="object"==typeof window,v="function"==typeof importScripts,y="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,g="";function _(r){return o["locateFile"]?o["locateFile"](r,g):g+r}function k(r){if(r instanceof Ue)return;let e=r;D("exiting due to exception: "+e)}y?(g=v?require("path").dirname(g)+"/":__dirname+"/",l=()=>{f||(d=require("fs"),f=require("path"))},s=function(r,e){return l(),r=f["normalize"](r),d.readFileSync(r,e?void 0:"utf8")},c=r=>{var e=s(r,!0);return e.buffer||(e=new Uint8Array(e)),e},u=(r,e,t)=>{l(),r=f["normalize"](r),d.readFile(r,(function(r,n){r?t(r):e(n.buffer)}))},process["argv"].length>1&&(p=process["argv"][1].replace(/\\/g,"/")),h=process["argv"].slice(2),process["on"]("uncaughtException",(function(r){if(!(r instanceof Ue))throw r})),process["on"]("unhandledRejection",(function(r){throw r})),E=(r,e)=>{if(tr())throw process["exitCode"]=r,e;k(e),process["exit"](r)},o["inspect"]=function(){return"[Emscripten Module object]"}):(w||v)&&(v?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),r&&(g=r),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},v&&(c=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),u=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)});var S,b=o["print"]||console.log.bind(console),D=o["printErr"]||console.warn.bind(console);Object.assign(o,m),m=null,o["arguments"]&&(h=o["arguments"]),o["thisProgram"]&&(p=o["thisProgram"]),o["quit"]&&(E=o["quit"]),o["wasmBinary"]&&(S=o["wasmBinary"]);var N,F=o["noExitRuntime"]||!0;"object"!=typeof WebAssembly&&Er("no native wasm support detected");var O,P=!1;function A(r,e){r||Er(e)}function M(r){var e=o["_"+r];return e}function R(r,e,t,n,o){var i={string:function(r){var e=0;if(null!==r&&void 0!==r&&0!==r){var t=1+(r.length<<2);e=ze(t),W(r,e,t)}return e},array:function(r){var e=ze(r.length);return K(r,e),e}};function a(r){return"string"===e?H(r):"boolean"===e?Boolean(r):r}var s=M(r),u=[],c=0;if(n)for(var d=0;d<n.length;d++){var f=i[t[d]];f?(0===c&&(c=Le()),u[d]=f(n[d])):u[d]=n[d]}var l=s.apply(null,u);function m(r){return 0!==c&&xe(c),a(r)}return l=m(l),l}function T(r,e,t,n){t=t||[];var o=t.every((function(r){return"number"===r})),i="string"!==e;return i&&o&&!n?M(r):function(){return R(r,e,t,arguments,n)}}var C,I,B,L,x,z,j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function U(r,e,t){var n=e+t,o=e;while(r[o]&&!(o>=n))++o;if(o-e>16&&r.buffer&&j)return j.decode(r.subarray(e,o));var i="";while(e<o){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if(a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++],a<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function H(r,e){return r?U(B,r,e):""}function Y(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343){var u=r.charCodeAt(++a);s=65536+((1023&s)<<10)|1023&u}if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function W(r,e,t){return Y(r,B,e,t)}function q(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function G(r){var e="";while(1){var t=B[r++>>0];if(!t)return e;e+=String.fromCharCode(t)}}function X(r){var e=q(r)+1,t=ze(e);return Y(r,I,t,e),t}function K(r,e){I.set(r,e)}function V(r,e,t){for(var n=0;n<r.length;++n)I[e++>>0]=r.charCodeAt(n);t||(I[e>>0]=0)}function Q(r){C=r,o["HEAP8"]=I=new Int8Array(r),o["HEAP16"]=L=new Int16Array(r),o["HEAP32"]=x=new Int32Array(r),o["HEAPU8"]=B=new Uint8Array(r),o["HEAPU16"]=new Uint16Array(r),o["HEAPU32"]=z=new Uint32Array(r),o["HEAPF32"]=new Float32Array(r),o["HEAPF64"]=new Float64Array(r)}o["INITIAL_MEMORY"];var J,Z=[],$=[],rr=[],er=[];function tr(){return F}function nr(){if(o["preRun"]){"function"==typeof o["preRun"]&&(o["preRun"]=[o["preRun"]]);while(o["preRun"].length)sr(o["preRun"].shift())}Nr(Z)}function or(){!0,o["noFSInit"]||Hr.init.initialized||Hr.init(),Hr.ignorePermissions=!1,Br.init(),Nr($)}function ir(){Nr(rr)}function ar(){if(o["postRun"]){"function"==typeof o["postRun"]&&(o["postRun"]=[o["postRun"]]);while(o["postRun"].length)cr(o["postRun"].shift())}Nr(er)}function sr(r){Z.unshift(r)}function ur(r){$.unshift(r)}function cr(r){er.unshift(r)}var dr=0,fr=null,lr=null;function mr(r){return r}function hr(r){dr++,o["monitorRunDependencies"]&&o["monitorRunDependencies"](dr)}function pr(r){if(dr--,o["monitorRunDependencies"]&&o["monitorRunDependencies"](dr),0==dr&&(null!==fr&&(clearInterval(fr),fr=null),lr)){var e=lr;lr=null,e()}}function Er(r){o["onAbort"]&&o["onAbort"](r),r="Aborted("+r+")",D(r),P=!0,O=1,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var wr,vr,yr,gr="data:application/octet-stream;base64,";function _r(r){return r.startsWith(gr)}function kr(r){return r.startsWith("file://")}function Sr(r){try{if(r==wr&&S)return new Uint8Array(S);if(c)return c(r);throw"both async and sync fetching of the wasm failed"}catch(D){Er(D)}}function br(){if(!S&&(w||v)){if("function"==typeof fetch&&!kr(wr))return fetch(wr,{credentials:"same-origin"}).then((function(r){if(!r["ok"])throw"failed to load wasm binary file at '"+wr+"'";return r["arrayBuffer"]()})).catch((function(){return Sr(wr)}));if(u)return new Promise((function(r,e){u(wr,(function(e){r(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Sr(wr)}))}function Dr(){var r={a:Ce};function e(r,e){var t=r.exports;o["asm"]=t,N=o["asm"]["A"],Q(N.buffer),J=o["asm"]["M"],ur(o["asm"]["B"]),pr("wasm-instantiate")}function t(r){e(r["instance"])}function i(e){return br().then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){D("failed to asynchronously prepare wasm: "+r),Er(r)}))}function a(){return S||"function"!=typeof WebAssembly.instantiateStreaming||_r(wr)||kr(wr)||y||"function"!=typeof fetch?i(t):fetch(wr,{credentials:"same-origin"}).then((function(e){var n=WebAssembly.instantiateStreaming(e,r);return n.then(t,(function(r){return D("wasm streaming compile failed: "+r),D("falling back to ArrayBuffer instantiation"),i(t)}))}))}if(hr("wasm-instantiate"),o["instantiateWasm"])try{var s=o["instantiateWasm"](r,e);return s}catch(u){return D("Module.instantiateWasm callback failed with error: "+u),!1}return a().catch(n),{}}function Nr(r){while(r.length>0){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?Or(t)():Or(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}wr="BMPImageIOReadImage.umd.wasm",_r(wr)||(wr=_(wr));var Fr=[];function Or(r){var e=Fr[r];return e||(r>=Fr.length&&(Fr.length=r+1),Fr[r]=e=J.get(r)),e}function Pr(r){if(r instanceof Ue||"unwind"==r)return O;E(1,r)}function Ar(r){return Be(r+24)+24}function Mr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){z[this.ptr+4>>2]=r},this.get_type=function(){return z[this.ptr+4>>2]},this.set_destructor=function(r){z[this.ptr+8>>2]=r},this.get_destructor=function(){return z[this.ptr+8>>2]},this.set_refcount=function(r){x[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,I[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=I[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,I[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=I[this.ptr+13>>0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=x[this.ptr>>2];x[this.ptr>>2]=r+1},this.release_ref=function(){var r=x[this.ptr>>2];return x[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){z[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return z[this.ptr+16>>2]},this.get_exception_ptr=function(){var r=je(this.get_type());if(r)return z[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function Rr(r,e,t){var n=new Mr(r);throw n.init(e,t),r,r}var Tr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(r).slice(1)},normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=Tr.isAbs(r),t="/"===r.substr(-1);return r=Tr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"),r||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=Tr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";r=Tr.normalize(r),r=r.replace(/\/$/,"");var e=r.lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments,0);return Tr.normalize(r.join("/"))},join2:(r,e)=>Tr.normalize(r+"/"+e)};function Cr(){if("object"==typeof crypto&&"function"==typeof crypto["getRandomValues"]){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}if(y)try{var e=require("crypto");return function(){return e["randomBytes"](1)[0]}}catch(t){}return function(){Er("randomDevice")}}var Ir={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Hr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=Tr.isAbs(n)}return r=Tr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"),(e?"/":"")+r||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length;e++)if(""!==r[e])break;for(var t=r.length-1;t>=0;t--)if(""!==r[t])break;return e>t?[]:r.slice(e,t-e+1)}r=Ir.resolve(r).substr(1),e=Ir.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return u=u.concat(o.slice(a)),u.join("/")}},Br={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){Br.ttys[r]={input:[],output:[],ops:e},Hr.registerDevice(r,Br.stream_ops)},stream_ops:{open:function(r){var e=Br.ttys[r.node.rdev];if(!e)throw new Hr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Hr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(u){throw new Hr.ErrnoError(29)}if(void 0===s&&0===i)throw new Hr.ErrnoError(6);if(null===s||void 0===s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Hr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(a){throw new Hr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if(y){var t=256,n=Buffer.alloc(t),o=0;try{o=d.readSync(process.stdin.fd,n,0,t,-1)}catch(i){if(!i.toString().includes("EOF"))throw i;o=0}e=o>0?n.slice(0,o).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(e=window.prompt("Input: "),null!==e&&(e+="\n")):"function"==typeof readline&&(e=readline(),null!==e&&(e+="\n"));if(!e)return null;r.input=Re(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(b(U(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(b(U(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(D(U(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(D(U(r.output,0)),r.output=[])}}};function Lr(r){Er()}var xr={ops_table:null,mount:function(r){return xr.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(Hr.isBlkdev(t)||Hr.isFIFO(t))throw new Hr.ErrnoError(63);xr.ops_table||(xr.ops_table={dir:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr,lookup:xr.node_ops.lookup,mknod:xr.node_ops.mknod,rename:xr.node_ops.rename,unlink:xr.node_ops.unlink,rmdir:xr.node_ops.rmdir,readdir:xr.node_ops.readdir,symlink:xr.node_ops.symlink},stream:{llseek:xr.stream_ops.llseek}},file:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr},stream:{llseek:xr.stream_ops.llseek,read:xr.stream_ops.read,write:xr.stream_ops.write,allocate:xr.stream_ops.allocate,mmap:xr.stream_ops.mmap,msync:xr.stream_ops.msync}},link:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr,readlink:xr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xr.node_ops.getattr,setattr:xr.node_ops.setattr},stream:Hr.chrdev_stream_ops}});var o=Hr.createNode(r,e,t,n);return Hr.isDir(o.mode)?(o.node_ops=xr.ops_table.dir.node,o.stream_ops=xr.ops_table.dir.stream,o.contents={}):Hr.isFile(o.mode)?(o.node_ops=xr.ops_table.file.node,o.stream_ops=xr.ops_table.file.stream,o.usedBytes=0,o.contents=null):Hr.isLink(o.mode)?(o.node_ops=xr.ops_table.link.node,o.stream_ops=xr.ops_table.link.stream):Hr.isChrdev(o.mode)&&(o.node_ops=xr.ops_table.chrdev.node,o.stream_ops=xr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1048576;e=Math.max(e,t*(t<n?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var o=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(o.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=Hr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Hr.isDir(r.mode)?e.size=4096:Hr.isFile(r.mode)?e.size=r.usedBytes:Hr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&xr.resizeFileStorage(r,e.size)},lookup:function(r,e){throw Hr.genericErrors[44]},mknod:function(r,e,t,n){return xr.createNode(r,e,t,n)},rename:function(r,e,t){if(Hr.isDir(r.mode)){var n;try{n=Hr.lookupNode(e,t)}catch(i){}if(n)for(var o in n.contents)throw new Hr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=Hr.lookupNode(r,e);for(var n in t.contents)throw new Hr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=xr.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!Hr.isLink(r.mode))throw new Hr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===I.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(xr.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Hr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Hr.ErrnoError(28);return n},allocate:function(r,e,t){xr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);var i,a,s=r.node.contents;if(2&o||s.buffer!==C){if((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),a=!0,i=Lr(e),!i)throw new Hr.ErrnoError(48);I.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(r,e,t,n,o){if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);if(2&o)return 0;xr.stream_ops.write(r,e,0,n,t,!1);return 0}}};function zr(r,e,t,n){var o=n?"":mr("al "+r);u(r,(function(t){A(t,'Loading data file "'+r+'" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&pr(o)}),(function(e){if(!t)throw'Loading data file "'+r+'" failed.';t()})),o&&hr(o)}var jr={},Ur={isWindows:!1,staticInit:()=>{Ur.isWindows=!!process.platform.match(/^win/);var r=process["binding"]("constants");r["fs"]&&(r=r["fs"]),Ur.flagsForNodeMap={1024:r["O_APPEND"],64:r["O_CREAT"],128:r["O_EXCL"],256:r["O_NOCTTY"],0:r["O_RDONLY"],2:r["O_RDWR"],4096:r["O_SYNC"],512:r["O_TRUNC"],1:r["O_WRONLY"],131072:r["O_NOFOLLOW"]}},convertNodeCode:r=>{var e=r.code;return jr[e]},mount:r=>Ur.createNode(null,"/",Ur.getMode(r.opts.root),0),createNode:(r,e,t,n)=>{if(!Hr.isDir(t)&&!Hr.isFile(t)&&!Hr.isLink(t))throw new Hr.ErrnoError(28);var o=Hr.createNode(r,e,t);return o.node_ops=Ur.node_ops,o.stream_ops=Ur.stream_ops,o},getMode:r=>{var e;try{e=d.lstatSync(r),Ur.isWindows&&(e.mode=e.mode|(292&e.mode)>>2)}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}return e.mode},realPath:r=>{var e=[];while(r.parent!==r)e.push(r.name),r=r.parent;return e.push(r.mount.opts.root),e.reverse(),Tr.join.apply(null,e)},flagsForNode:r=>{r&=-2097153,r&=-2049,r&=-32769,r&=-524289,r&=-65537;var e=0;for(var t in Ur.flagsForNodeMap)r&t&&(e|=Ur.flagsForNodeMap[t],r^=t);if(r)throw new Hr.ErrnoError(28);return e},node_ops:{getattr:r=>{var e,t=Ur.realPath(r);try{e=d.lstatSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}return Ur.isWindows&&!e.blksize&&(e.blksize=4096),Ur.isWindows&&!e.blocks&&(e.blocks=(e.size+e.blksize-1)/e.blksize|0),{dev:e.dev,ino:e.ino,mode:e.mode,nlink:e.nlink,uid:e.uid,gid:e.gid,rdev:e.rdev,size:e.size,atime:e.atime,mtime:e.mtime,ctime:e.ctime,blksize:e.blksize,blocks:e.blocks}},setattr:(r,e)=>{var t=Ur.realPath(r);try{if(void 0!==e.mode&&(d.chmodSync(t,e.mode),r.mode=e.mode),void 0!==e.timestamp){var n=new Date(e.timestamp);d.utimesSync(t,n,n)}void 0!==e.size&&d.truncateSync(t,e.size)}catch(o){if(!o.code)throw o;throw new Hr.ErrnoError(Ur.convertNodeCode(o))}},lookup:(r,e)=>{var t=Tr.join2(Ur.realPath(r),e),n=Ur.getMode(t);return Ur.createNode(r,e,n)},mknod:(r,e,t,n)=>{var o=Ur.createNode(r,e,t,n),i=Ur.realPath(o);try{Hr.isDir(o.mode)?d.mkdirSync(i,o.mode):d.writeFileSync(i,"",{mode:o.mode})}catch(a){if(!a.code)throw a;throw new Hr.ErrnoError(Ur.convertNodeCode(a))}return o},rename:(r,e,t)=>{var n=Ur.realPath(r),o=Tr.join2(Ur.realPath(e),t);try{d.renameSync(n,o)}catch(i){if(!i.code)throw i;throw new Hr.ErrnoError(Ur.convertNodeCode(i))}r.name=t},unlink:(r,e)=>{var t=Tr.join2(Ur.realPath(r),e);try{d.unlinkSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}},rmdir:(r,e)=>{var t=Tr.join2(Ur.realPath(r),e);try{d.rmdirSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}},readdir:r=>{var e=Ur.realPath(r);try{return d.readdirSync(e)}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}},symlink:(r,e,t)=>{var n=Tr.join2(Ur.realPath(r),e);try{d.symlinkSync(t,n)}catch(o){if(!o.code)throw o;throw new Hr.ErrnoError(Ur.convertNodeCode(o))}},readlink:r=>{var e=Ur.realPath(r);try{return e=d.readlinkSync(e),e=f.relative(f.resolve(r.mount.opts.root),e),e}catch(t){if(!t.code)throw t;if("UNKNOWN"===t.code)throw new Hr.ErrnoError(28);throw new Hr.ErrnoError(Ur.convertNodeCode(t))}}},stream_ops:{open:r=>{var e=Ur.realPath(r.node);try{Hr.isFile(r.node.mode)&&(r.nfd=d.openSync(e,Ur.flagsForNode(r.flags)))}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}},close:r=>{try{Hr.isFile(r.node.mode)&&r.nfd&&d.closeSync(r.nfd)}catch(e){if(!e.code)throw e;throw new Hr.ErrnoError(Ur.convertNodeCode(e))}},read:(r,e,t,n,o)=>{if(0===n)return 0;try{return d.readSync(r.nfd,Buffer.from(e.buffer),t,n,o)}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}},write:(r,e,t,n,o)=>{try{return d.writeSync(r.nfd,Buffer.from(e.buffer),t,n,o)}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}},llseek:(r,e,t)=>{var n=e;if(1===t)n+=r.position;else if(2===t&&Hr.isFile(r.node.mode))try{var o=d.fstatSync(r.nfd);n+=o.size}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}if(n<0)throw new Hr.ErrnoError(28);return n},mmap:(r,e,t,n,o)=>{if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);var i=Lr(e);return Ur.stream_ops.read(r,I,i,e,t),{ptr:i,allocated:!0}},msync:(r,e,t,n,o)=>{if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);if(2&o)return 0;Ur.stream_ops.write(r,e,0,n,t,!1);return 0}}},Hr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(r=Ir.resolve(Hr.cwd(),r),!r)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(e=Object.assign(t,e),e.recurse_count>8)throw new Hr.ErrnoError(32);for(var n=Tr.normalizeArray(r.split("/").filter((r=>!!r)),!1),o=Hr.root,i="/",a=0;a<n.length;a++){var s=a===n.length-1;if(s&&e.parent)break;if(o=Hr.lookupNode(o,n[a]),i=Tr.join2(i,n[a]),Hr.isMountpoint(o)&&(!s||s&&e.follow_mount)&&(o=o.mounted.root),!s||e.follow){var u=0;while(Hr.isLink(o.mode)){var c=Hr.readlink(i);i=Ir.resolve(Tr.dirname(i),c);var d=Hr.lookupPath(i,{recurse_count:e.recurse_count+1});if(o=d.node,u++>40)throw new Hr.ErrnoError(32)}}}return{path:i,node:o}},getPath:r=>{var e;while(1){if(Hr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Hr.nameTable.length},hashAddNode:r=>{var e=Hr.hashName(r.parent.id,r.name);r.name_next=Hr.nameTable[e],Hr.nameTable[e]=r},hashRemoveNode:r=>{var e=Hr.hashName(r.parent.id,r.name);if(Hr.nameTable[e]===r)Hr.nameTable[e]=r.name_next;else{var t=Hr.nameTable[e];while(t){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}}},lookupNode:(r,e)=>{var t=Hr.mayLookup(r);if(t)throw new Hr.ErrnoError(t,r);for(var n=Hr.hashName(r.id,e),o=Hr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return Hr.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new Hr.FSNode(r,e,t,n);return Hr.hashAddNode(o),o},destroyNode:r=>{Hr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768===(61440&r),isDir:r=>16384===(61440&r),isLink:r=>40960===(61440&r),isChrdev:r=>8192===(61440&r),isBlkdev:r=>24576===(61440&r),isFIFO:r=>4096===(61440&r),isSocket:r=>49152===(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=Hr.flagModes[r];if("undefined"==typeof e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>Hr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var e=Hr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{Hr.lookupNode(r,e);return 20}catch(t){}return Hr.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=Hr.lookupNode(r,e)}catch(i){return i.errno}var o=Hr.nodePermissions(r,"wx");if(o)return o;if(t){if(!Hr.isDir(n.mode))return 54;if(Hr.isRoot(n)||Hr.getPath(n)===Hr.cwd())return 10}else if(Hr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Hr.isLink(r.mode)?32:Hr.isDir(r.mode)&&("r"!==Hr.flagsToPermissionString(e)||512&e)?31:Hr.nodePermissions(r,Hr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=Hr.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!Hr.streams[t])return t;throw new Hr.ErrnoError(33)},getStream:r=>Hr.streams[r],createStream:(r,e,t)=>{Hr.FSStream||(Hr.FSStream=function(){this.shared={}},Hr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!==(2097155&this.flags)}},isWrite:{get:function(){return 0!==(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get function(){return this.shared.position},set:function(r){this.shared.position=r}}}),r=Object.assign(new Hr.FSStream,r);var n=Hr.nextfd(e,t);return r.fd=n,Hr.streams[n]=r,r},closeStream:r=>{Hr.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=Hr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new Hr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{Hr.devices[r]={stream_ops:e}},getDevice:r=>Hr.devices[r],getMounts:r=>{var e=[],t=[r];while(t.length){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),Hr.syncFSRequests++,Hr.syncFSRequests>1&&D("warning: "+Hr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Hr.getMounts(Hr.root.mount),n=0;function o(r){return Hr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o="/"===t,i=!t;if(o&&Hr.root)throw new Hr.ErrnoError(10);if(!o&&!i){var a=Hr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Hr.isMountpoint(n))throw new Hr.ErrnoError(10);if(!Hr.isDir(n.mode))throw new Hr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Hr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=Hr.lookupPath(r,{follow_mount:!1});if(!Hr.isMountpoint(e.node))throw new Hr.ErrnoError(28);var t=e.node,n=t.mounted,o=Hr.getMounts(n);Object.keys(Hr.nameTable).forEach((r=>{var e=Hr.nameTable[r];while(e){var t=e.name_next;o.includes(e.mount)&&Hr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=Hr.lookupPath(r,{parent:!0}),o=n.node,i=Tr.basename(r);if(!i||"."===i||".."===i)throw new Hr.ErrnoError(28);var a=Hr.mayCreate(o,i);if(a)throw new Hr.ErrnoError(a);if(!o.node_ops.mknod)throw new Hr.ErrnoError(63);return o.node_ops.mknod(o,i,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Hr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Hr.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Hr.mkdir(n,e)}catch(i){if(20!=i.errno)throw i}}},mkdev:(r,e,t)=>("undefined"==typeof t&&(t=e,e=438),e|=8192,Hr.mknod(r,e,t)),symlink:(r,e)=>{if(!Ir.resolve(r))throw new Hr.ErrnoError(44);var t=Hr.lookupPath(e,{parent:!0}),n=t.node;if(!n)throw new Hr.ErrnoError(44);var o=Tr.basename(e),i=Hr.mayCreate(n,o);if(i)throw new Hr.ErrnoError(i);if(!n.node_ops.symlink)throw new Hr.ErrnoError(63);return n.node_ops.symlink(n,o,r)},rename:(r,e)=>{var t,n,o,i=Tr.dirname(r),a=Tr.dirname(e),s=Tr.basename(r),u=Tr.basename(e);if(t=Hr.lookupPath(r,{parent:!0}),n=t.node,t=Hr.lookupPath(e,{parent:!0}),o=t.node,!n||!o)throw new Hr.ErrnoError(44);if(n.mount!==o.mount)throw new Hr.ErrnoError(75);var c,d=Hr.lookupNode(n,s),f=Ir.relative(r,a);if("."!==f.charAt(0))throw new Hr.ErrnoError(28);if(f=Ir.relative(e,i),"."!==f.charAt(0))throw new Hr.ErrnoError(55);try{c=Hr.lookupNode(o,u)}catch(h){}if(d!==c){var l=Hr.isDir(d.mode),m=Hr.mayDelete(n,s,l);if(m)throw new Hr.ErrnoError(m);if(m=c?Hr.mayDelete(o,u,l):Hr.mayCreate(o,u),m)throw new Hr.ErrnoError(m);if(!n.node_ops.rename)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(d)||c&&Hr.isMountpoint(c))throw new Hr.ErrnoError(10);if(o!==n&&(m=Hr.nodePermissions(n,"w"),m))throw new Hr.ErrnoError(m);Hr.hashRemoveNode(d);try{n.node_ops.rename(d,o,u)}catch(h){throw h}finally{Hr.hashAddNode(d)}}},rmdir:r=>{var e=Hr.lookupPath(r,{parent:!0}),t=e.node,n=Tr.basename(r),o=Hr.lookupNode(t,n),i=Hr.mayDelete(t,n,!0);if(i)throw new Hr.ErrnoError(i);if(!t.node_ops.rmdir)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(o))throw new Hr.ErrnoError(10);t.node_ops.rmdir(t,n),Hr.destroyNode(o)},readdir:r=>{var e=Hr.lookupPath(r,{follow:!0}),t=e.node;if(!t.node_ops.readdir)throw new Hr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var e=Hr.lookupPath(r,{parent:!0}),t=e.node;if(!t)throw new Hr.ErrnoError(44);var n=Tr.basename(r),o=Hr.lookupNode(t,n),i=Hr.mayDelete(t,n,!1);if(i)throw new Hr.ErrnoError(i);if(!t.node_ops.unlink)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(o))throw new Hr.ErrnoError(10);t.node_ops.unlink(t,n),Hr.destroyNode(o)},readlink:r=>{var e=Hr.lookupPath(r),t=e.node;if(!t)throw new Hr.ErrnoError(44);if(!t.node_ops.readlink)throw new Hr.ErrnoError(28);return Ir.resolve(Hr.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,e)=>{var t=Hr.lookupPath(r,{follow:!e}),n=t.node;if(!n)throw new Hr.ErrnoError(44);if(!n.node_ops.getattr)throw new Hr.ErrnoError(63);return n.node_ops.getattr(n)},lstat:r=>Hr.stat(r,!0),chmod:(r,e,t)=>{var n;if("string"==typeof r){var o=Hr.lookupPath(r,{follow:!t});n=o.node}else n=r;if(!n.node_ops.setattr)throw new Hr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{Hr.chmod(r,e,!0)},fchmod:(r,e)=>{var t=Hr.getStream(r);if(!t)throw new Hr.ErrnoError(8);Hr.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if("string"==typeof r){var i=Hr.lookupPath(r,{follow:!n});o=i.node}else o=r;if(!o.node_ops.setattr)throw new Hr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{Hr.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=Hr.getStream(r);if(!n)throw new Hr.ErrnoError(8);Hr.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new Hr.ErrnoError(28);var t;if("string"==typeof r){var n=Hr.lookupPath(r,{follow:!0});t=n.node}else t=r;if(!t.node_ops.setattr)throw new Hr.ErrnoError(63);if(Hr.isDir(t.mode))throw new Hr.ErrnoError(31);if(!Hr.isFile(t.mode))throw new Hr.ErrnoError(28);var o=Hr.nodePermissions(t,"w");if(o)throw new Hr.ErrnoError(o);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=Hr.getStream(r);if(!t)throw new Hr.ErrnoError(8);if(0===(2097155&t.flags))throw new Hr.ErrnoError(28);Hr.truncate(t.node,e)},utime:(r,e,t)=>{var n=Hr.lookupPath(r,{follow:!0}),o=n.node;o.node_ops.setattr(o,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new Hr.ErrnoError(44);var n;if(e="string"==typeof e?Hr.modeStringToFlags(e):e,t="undefined"==typeof t?438:t,t=64&e?4095&t|32768:0,"object"==typeof r)n=r;else{r=Tr.normalize(r);try{var i=Hr.lookupPath(r,{follow:!(131072&e)});n=i.node}catch(c){}}var a=!1;if(64&e)if(n){if(128&e)throw new Hr.ErrnoError(20)}else n=Hr.mknod(r,t,0),a=!0;if(!n)throw new Hr.ErrnoError(44);if(Hr.isChrdev(n.mode)&&(e&=-513),65536&e&&!Hr.isDir(n.mode))throw new Hr.ErrnoError(54);if(!a){var s=Hr.mayOpen(n,e);if(s)throw new Hr.ErrnoError(s)}512&e&&!a&&Hr.truncate(n,0),e&=-131713;var u=Hr.createStream({node:n,path:Hr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),!o["logReadFiles"]||1&e||(Hr.readFiles||(Hr.readFiles={}),r in Hr.readFiles||(Hr.readFiles[r]=1)),u},close:r=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{Hr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Hr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Hr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new Hr.ErrnoError(28);if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(1===(2097155&r.flags))throw new Hr.ErrnoError(8);if(Hr.isDir(r.node.mode))throw new Hr.ErrnoError(31);if(!r.stream_ops.read)throw new Hr.ErrnoError(28);var i="undefined"!=typeof o;if(i){if(!r.seekable)throw new Hr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new Hr.ErrnoError(28);if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(0===(2097155&r.flags))throw new Hr.ErrnoError(8);if(Hr.isDir(r.node.mode))throw new Hr.ErrnoError(31);if(!r.stream_ops.write)throw new Hr.ErrnoError(28);r.seekable&&1024&r.flags&&Hr.llseek(r,0,2);var a="undefined"!=typeof o;if(a){if(!r.seekable)throw new Hr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(e<0||t<=0)throw new Hr.ErrnoError(28);if(0===(2097155&r.flags))throw new Hr.ErrnoError(8);if(!Hr.isFile(r.node.mode)&&!Hr.isDir(r.node.mode))throw new Hr.ErrnoError(43);if(!r.stream_ops.allocate)throw new Hr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o)=>{if(0!==(2&n)&&0===(2&o)&&2!==(2097155&r.flags))throw new Hr.ErrnoError(2);if(1===(2097155&r.flags))throw new Hr.ErrnoError(2);if(!r.stream_ops.mmap)throw new Hr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new Hr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var t,n=Hr.open(r,e.flags),o=Hr.stat(r),i=o.size,a=new Uint8Array(i);return Hr.read(n,a,0,i,0),"utf8"===e.encoding?t=U(a,0):"binary"===e.encoding&&(t=a),Hr.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=Hr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(q(e)+1),i=Y(e,o,0,o.length);Hr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Hr.write(n,e,0,e.byteLength,void 0,t.canOwn)}Hr.close(n)},cwd:()=>Hr.currentPath,chdir:r=>{var e=Hr.lookupPath(r,{follow:!0});if(null===e.node)throw new Hr.ErrnoError(44);if(!Hr.isDir(e.node.mode))throw new Hr.ErrnoError(54);var t=Hr.nodePermissions(e.node,"x");if(t)throw new Hr.ErrnoError(t);Hr.currentPath=e.path},createDefaultDirectories:()=>{Hr.mkdir("/tmp"),Hr.mkdir("/home"),Hr.mkdir("/home/web_user")},createDefaultDevices:()=>{Hr.mkdir("/dev"),Hr.registerDevice(Hr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Hr.mkdev("/dev/null",Hr.makedev(1,3)),Br.register(Hr.makedev(5,0),Br.default_tty_ops),Br.register(Hr.makedev(6,0),Br.default_tty1_ops),Hr.mkdev("/dev/tty",Hr.makedev(5,0)),Hr.mkdev("/dev/tty1",Hr.makedev(6,0));var r=Cr();Hr.createDevice("/dev","random",r),Hr.createDevice("/dev","urandom",r),Hr.mkdir("/dev/shm"),Hr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Hr.mkdir("/proc");var r=Hr.mkdir("/proc/self");Hr.mkdir("/proc/self/fd"),Hr.mount({mount:()=>{var e=Hr.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=Hr.getStream(t);if(!n)throw new Hr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o["stdin"]?Hr.createDevice("/dev","stdin",o["stdin"]):Hr.symlink("/dev/tty","/dev/stdin"),o["stdout"]?Hr.createDevice("/dev","stdout",null,o["stdout"]):Hr.symlink("/dev/tty","/dev/stdout"),o["stderr"]?Hr.createDevice("/dev","stderr",null,o["stderr"]):Hr.symlink("/dev/tty1","/dev/stderr");Hr.open("/dev/stdin",0),Hr.open("/dev/stdout",1),Hr.open("/dev/stderr",1)},ensureErrnoError:()=>{Hr.ErrnoError||(Hr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Hr.ErrnoError.prototype=new Error,Hr.ErrnoError.prototype.constructor=Hr.ErrnoError,[44].forEach((r=>{Hr.genericErrors[r]=new Hr.ErrnoError(r),Hr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{Hr.ensureErrnoError(),Hr.nameTable=new Array(4096),Hr.mount(xr,{},"/"),Hr.createDefaultDirectories(),Hr.createDefaultDevices(),Hr.createSpecialDirectories(),Hr.filesystems={MEMFS:xr,NODEFS:Ur}},init:(r,e,t)=>{Hr.init.initialized=!0,Hr.ensureErrnoError(),o["stdin"]=r||o["stdin"],o["stdout"]=e||o["stdout"],o["stderr"]=t||o["stderr"],Hr.createStandardStreams()},quit:()=>{Hr.init.initialized=!1;for(var r=0;r<Hr.streams.length;r++){var e=Hr.streams[r];e&&Hr.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=Hr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{var t=Hr.lookupPath(r,{follow:!e});r=t.path}catch(o){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{t=Hr.lookupPath(r,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=Tr.basename(r),t=Hr.lookupPath(r,{follow:!e}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(o){n.error=o.errno}return n},createPath:(r,e,t,n)=>{r="string"==typeof r?r:Hr.getPath(r);var o=e.split("/").reverse();while(o.length){var i=o.pop();if(i){var a=Tr.join2(r,i);try{Hr.mkdir(a)}catch(s){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=Tr.join2("string"==typeof r?r:Hr.getPath(r),e),a=Hr.getMode(n,o);return Hr.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r="string"==typeof r?r:Hr.getPath(r),a=e?Tr.join2(r,e):r);var s=Hr.getMode(n,o),u=Hr.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),d=0,f=t.length;d<f;++d)c[d]=t.charCodeAt(d);t=c}Hr.chmod(u,146|s);var l=Hr.open(u,577);Hr.write(l,t,0,t.length,0,i),Hr.close(l),Hr.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=Tr.join2("string"==typeof r?r:Hr.getPath(r),e),i=Hr.getMode(!!t,!!n);Hr.createDevice.major||(Hr.createDevice.major=64);var a=Hr.makedev(Hr.createDevice.major++,0);return Hr.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(c){throw new Hr.ErrnoError(29)}if(void 0===u&&0===a)throw new Hr.ErrnoError(6);if(null===u||void 0===u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(s){throw new Hr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Hr.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=Re(s(r.url),!0),r.usedBytes=r.contents.length}catch(e){throw new Hr.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=(r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Re(o.responseText||"",!0)},u=this;u.setDataGetter((r=>{var e=r*a,t=(r+1)*a-1;if(t=Math.min(t,n-1),"undefined"==typeof u.chunks[r]&&(u.chunks[r]=s(e,t)),"undefined"==typeof u.chunks[r])throw new Error("doXHR failed!");return u.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!v)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:t};var u=Hr.createFile(r,e,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={},d=Object.keys(u.stream_ops);function f(r,e,t,n,o){var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)e[t+s]=i[o+s];else for(s=0;s<a;s++)e[t+s]=i.get(o+s);return a}return d.forEach((r=>{var e=u.stream_ops[r];c[r]=function(){return Hr.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(r,e,t,n,o)=>(Hr.forceLoadFile(u),f(r,e,t,n,o)),c.mmap=(r,e,t,n,o)=>{Hr.forceLoadFile(u);var i=Lr(e);if(!i)throw new Hr.ErrnoError(48);return f(r,I,i,e,t),{ptr:i,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,e,t,n,o,i,a,s,u,c)=>{var d=e?Ir.resolve(Tr.join2(r,e)):r,f=mr("cp "+d);function l(t){function l(t){c&&c(),s||Hr.createDataFile(r,e,t,n,o,u),i&&i(),pr(f)}Browser.handledByPreloadPlugin(t,d,l,(()=>{a&&a(),pr(f)}))||l(t)}hr(f),"string"==typeof t?zr(t,(r=>l(r)),a):l(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Hr.indexedDB();try{var o=n.open(Hr.DB_NAME(),Hr.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=()=>{b("creating db");var r=o.result;r.createObjectStore(Hr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result,i=n.transaction([Hr.DB_STORE_NAME],"readwrite"),a=i.objectStore(Hr.DB_STORE_NAME),s=0,u=0,c=r.length;function d(){0==u?e():t()}r.forEach((r=>{var e=a.put(Hr.analyzePath(r).object.contents,r);e.onsuccess=()=>{s++,s+u==c&&d()},e.onerror=()=>{u++,s+u==c&&d()}})),i.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Hr.indexedDB();try{var o=n.open(Hr.DB_NAME(),Hr.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([Hr.DB_STORE_NAME],"readonly")}catch(i){return void t(i)}var s=a.objectStore(Hr.DB_STORE_NAME),u=0,c=0,d=r.length;function f(){0==c?e():t()}r.forEach((r=>{var e=s.get(r);e.onsuccess=()=>{Hr.analyzePath(r).exists&&Hr.unlink(r),Hr.createDataFile(Tr.dirname(r),Tr.basename(r),e.result,!0,!0,!0),u++,u+c==d&&f()},e.onerror=()=>{c++,u+c==d&&f()}})),a.onerror=t},o.onerror=t}},Yr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(Tr.isAbs(e))return e;var n;if(-100===r)n=Hr.cwd();else{var o=Hr.getStream(r);if(!o)throw new Hr.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new Hr.ErrnoError(44);return n}return Tr.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(o){if(o&&o.node&&Tr.normalize(e)!==Tr.normalize(Hr.getPath(o.node)))return-54;throw o}return x[t>>2]=n.dev,x[t+4>>2]=0,x[t+8>>2]=n.ino,x[t+12>>2]=n.mode,x[t+16>>2]=n.nlink,x[t+20>>2]=n.uid,x[t+24>>2]=n.gid,x[t+28>>2]=n.rdev,x[t+32>>2]=0,yr=[n.size>>>0,(vr=n.size,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],x[t+40>>2]=yr[0],x[t+44>>2]=yr[1],x[t+48>>2]=4096,x[t+52>>2]=n.blocks,x[t+56>>2]=n.atime.getTime()/1e3|0,x[t+60>>2]=0,x[t+64>>2]=n.mtime.getTime()/1e3|0,x[t+68>>2]=0,x[t+72>>2]=n.ctime.getTime()/1e3|0,x[t+76>>2]=0,yr=[n.ino>>>0,(vr=n.ino,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],x[t+80>>2]=yr[0],x[t+84>>2]=yr[1],0},doMsync:function(r,e,t,n,o){var i=B.slice(r,r+t);Hr.msync(e,i,o,t,n)},varargs:void 0,get:function(){Yr.varargs+=4;var r=x[Yr.varargs-4>>2];return r},getStr:function(r){var e=H(r);return e},getStreamFromFD:function(r){var e=Hr.getStream(r);if(!e)throw new Hr.ErrnoError(8);return e}};function Wr(r,e,t,n){try{if(e=Yr.getStr(e),e=Yr.calculateAt(r,e),-8&t)return-28;var o=Hr.lookupPath(e,{follow:!0}),i=o.node;if(!i)return-44;var a="";return 4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&Hr.nodePermissions(i,a)?-2:0}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function qr(r){return x[Ie()>>2]=r,r}function Gr(r,e,t){Yr.varargs=t;try{var n=Yr.getStreamFromFD(r);switch(e){case 0:var o,i=Yr.get();return i<0?-28:(o=Hr.createStream(n,i),o.fd);case 1:case 2:return 0;case 3:return n.flags;case 4:i=Yr.get();return n.flags|=i,0;case 5:i=Yr.get();var a=0;return L[i+a>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return qr(28),-1;default:return-28}}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function Xr(r,e){try{if(0===e)return-28;var t=Hr.cwd(),n=q(t)+1;return e<n?-68:(W(t,r,e),n)}catch(o){if("undefined"==typeof Hr||!(o instanceof Hr.ErrnoError))throw o;return-o.errno}}function Kr(r,e,t){Yr.varargs=t;try{var n=Yr.getStreamFromFD(r);switch(e){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Yr.get();return x[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=Yr.get();return Hr.ioctl(n,e,o);case 21523:return n.tty?0:-59;case 21524:return n.tty?0:-59;default:Er("bad ioctl syscall "+e)}}catch(i){if("undefined"==typeof Hr||!(i instanceof Hr.ErrnoError))throw i;return-i.errno}}function Vr(r,e){try{return r=Yr.getStr(r),Yr.doStat(Hr.lstat,r,e)}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return-t.errno}}function Qr(r,e,t){try{return e=Yr.getStr(e),e=Yr.calculateAt(r,e),e=Tr.normalize(e),"/"===e[e.length-1]&&(e=e.substr(0,e.length-1)),Hr.mkdir(e,t,0),0}catch(n){if("undefined"==typeof Hr||!(n instanceof Hr.ErrnoError))throw n;return-n.errno}}function Jr(r,e,t,n){try{e=Yr.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=Yr.calculateAt(r,e,i),Yr.doStat(o?Hr.lstat:Hr.stat,e,t)}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return-a.errno}}function Zr(r,e,t,n){Yr.varargs=n;try{e=Yr.getStr(e),e=Yr.calculateAt(r,e);var o=n?Yr.get():0;return Hr.open(e,t,o).fd}catch(i){if("undefined"==typeof Hr||!(i instanceof Hr.ErrnoError))throw i;return-i.errno}}function $r(r,e,t,n){try{if(e=Yr.getStr(e),e=Yr.calculateAt(r,e),n<=0)return-28;var o=Hr.readlink(e),i=Math.min(n,q(o)),a=I[t+i];return W(o,t,n+1),I[t+i]=a,i}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function re(r,e){try{return r=Yr.getStr(r),Yr.doStat(Hr.stat,r,e)}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return-t.errno}}function ee(r,e,t){try{return e=Yr.getStr(e),e=Yr.calculateAt(r,e),0===t?Hr.unlink(e):512===t?Hr.rmdir(e):Er("Invalid flags passed to unlinkat"),0}catch(n){if("undefined"==typeof Hr||!(n instanceof Hr.ErrnoError))throw n;return-n.errno}}function te(r,e,t,n){try{if(e=Yr.getStr(e),e=Yr.calculateAt(r,e,!0),t){var o=x[t>>2],i=x[t+4>>2];a=1e3*o+i/1e6,t+=8,o=x[t>>2],i=x[t+4>>2],s=1e3*o+i/1e6}else var a=Date.now(),s=a;return Hr.utime(e,a,s),0}catch(u){if("undefined"==typeof Hr||!(u instanceof Hr.ErrnoError))throw u;return-u.errno}}function ne(){Er("")}function oe(r,e,t){B.copyWithin(r,e,e+t)}function ie(){return 2147483648}function ae(r){try{return N.grow(r-C.byteLength+65535>>>16),Q(N.buffer),1}catch(e){}}function se(r){var e=B.length;r>>>=0;var t=ie();if(r>t)return!1;let n=(r,e)=>r+(e-r%e)%e;for(var o=1;o<=4;o*=2){var i=e*(1+.2/o);i=Math.min(i,r+100663296);var a=Math.min(t,n(Math.max(r,i),65536)),s=ae(a);if(s)return!0}return!1}var ue={};function ce(){return p||"./this.program"}function de(){if(!de.strings){var r=("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:ce()};for(var t in ue)void 0===ue[t]?delete e[t]:e[t]=ue[t];var n=[];for(var t in e)n.push(t+"="+e[t]);de.strings=n}return de.strings}function fe(r,e){var t=0;return de().forEach((function(n,o){var i=e+t;z[r+4*o>>2]=i,V(n,i),t+=n.length+1})),0}function le(r,e){var t=de();z[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),z[e>>2]=n,0}function me(r){We(r)}function he(r){try{var e=Yr.getStreamFromFD(r);return Hr.close(e),0}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return t.errno}}function pe(r,e){try{var t=Yr.getStreamFromFD(r),n=t.tty?2:Hr.isDir(t.mode)?3:Hr.isLink(t.mode)?7:4;return I[e>>0]=n,0}catch(o){if("undefined"==typeof Hr||!(o instanceof Hr.ErrnoError))throw o;return o.errno}}function Ee(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=z[e>>2],s=z[e+4>>2];e+=8;var u=Hr.read(r,I,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}function we(r,e,t,n){try{var o=Yr.getStreamFromFD(r),i=Ee(o,e,t);return x[n>>2]=i,0}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return a.errno}}function ve(r,e){return e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN}function ye(r,e,t,n,o){try{var i=ve(e,t);if(isNaN(i))return 61;var a=Yr.getStreamFromFD(r);return Hr.llseek(a,i,n),yr=[a.position>>>0,(vr=a.position,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],x[o>>2]=yr[0],x[o+4>>2]=yr[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return s.errno}}function ge(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=z[e>>2],s=z[e+4>>2];e+=8;var u=Hr.write(r,I,a,s,n);if(u<0)return-1;o+=u}return o}function _e(r,e,t,n){try{var o=Yr.getStreamFromFD(r),i=ge(o,e,t);return z[n>>2]=i,0}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return a.errno}}function ke(r){return r%4===0&&(r%100!==0||r%400===0)}function Se(r,e){for(var t=0,n=0;n<=e;t+=r[n++]);return t}var be=[31,29,31,30,31,30,31,31,30,31,30,31],De=[31,28,31,30,31,30,31,31,30,31,30,31];function Ne(r,e){var t=new Date(r.getTime());while(e>0){var n=ke(t.getFullYear()),o=t.getMonth(),i=(n?be:De)[o];if(!(e>i-t.getDate()))return t.setDate(t.getDate()+e),t;e-=i-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}function Fe(r,e,t,n){var o=x[n+40>>2],i={tm_sec:x[n>>2],tm_min:x[n+4>>2],tm_hour:x[n+8>>2],tm_mday:x[n+12>>2],tm_mon:x[n+16>>2],tm_year:x[n+20>>2],tm_wday:x[n+24>>2],tm_yday:x[n+28>>2],tm_isdst:x[n+32>>2],tm_gmtoff:x[n+36>>2],tm_zone:o?H(o):""},a=H(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(r,e,t){var n="number"==typeof r?r.toString():r||"";while(n.length<e)n=t[0]+n;return n}function l(r,e){return f(r,e,"0")}function m(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.getDate())),n}function h(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function p(r){var e=Ne(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=h(t),i=h(n);return m(o,e)<=0?m(i,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var E={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return d[r.tm_mon].substring(0,3)},"%B":function(r){return d[r.tm_mon]},"%C":function(r){var e=r.tm_year+1900;return l(e/100|0,2)},"%d":function(r){return l(r.tm_mday,2)},"%e":function(r){return f(r.tm_mday,2," ")},"%g":function(r){return p(r).toString().substring(2)},"%G":function(r){return p(r)},"%H":function(r){return l(r.tm_hour,2)},"%I":function(r){var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),l(e,2)},"%j":function(r){return l(r.tm_mday+Se(ke(r.tm_year+1900)?be:De,r.tm_mon-1),3)},"%m":function(r){return l(r.tm_mon+1,2)},"%M":function(r){return l(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return l(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var e=r.tm_yday+7-r.tm_wday;return l(Math.floor(e/7),2)},"%V":function(r){var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&ke(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&ke(r.tm_year%400-1))&&e++}return l(e,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var e=r.tm_yday+7-(r.tm_wday+6)%7;return l(Math.floor(e/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var e=r.tm_gmtoff,t=e>=0;return e=Math.abs(e)/60,e=e/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),E)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),E[u](i)));a=a.replace(/\0\0/g,"%");var w=Re(a,!1);return w.length>e?0:(K(w,r),w.length-1)}function Oe(r,e,t,n){return Fe(r,e,t,n)}var Pe=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Hr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},Ae=365,Me=146;function Re(r,e,t){var n=t>0?t:q(r)+1,o=new Array(n),i=Y(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(Pe.prototype,{read:{get:function(){return(this.mode&Ae)===Ae},set:function(r){r?this.mode|=Ae:this.mode&=~Ae}},write:{get:function(){return(this.mode&Me)===Me},set:function(r){r?this.mode|=Me:this.mode&=~Me}},isFolder:{get:function(){return Hr.isDir(this.mode)}},isDevice:{get:function(){return Hr.isChrdev(this.mode)}}}),Hr.FSNode=Pe,Hr.staticInit(),o["FS_createPath"]=Hr.createPath,o["FS_createDataFile"]=Hr.createDataFile,o["FS_createPreloadedFile"]=Hr.createPreloadedFile,o["FS_unlink"]=Hr.unlink,o["FS_createLazyFile"]=Hr.createLazyFile,o["FS_createDevice"]=Hr.createDevice,y&&(l(),Ur.staticInit()),jr={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Te,Ce={a:Ar,b:Rr,k:Wr,e:Gr,x:Xr,i:Kr,s:Vr,q:Qr,r:Jr,j:Zr,p:$r,t:re,o:ee,n:te,c:ne,y:oe,d:se,v:fe,w:le,z:me,f:he,u:pe,h:we,l:ye,g:_e,m:Oe},Ie=(Dr(),o["___wasm_call_ctors"]=function(){return(o["___wasm_call_ctors"]=o["asm"]["B"]).apply(null,arguments)},o["_main"]=function(){return(o["_main"]=o["asm"]["C"]).apply(null,arguments)},o["___errno_location"]=function(){return(Ie=o["___errno_location"]=o["asm"]["D"]).apply(null,arguments)}),Be=(o["_itk_wasm_input_array_alloc"]=function(){return(o["_itk_wasm_input_array_alloc"]=o["asm"]["E"]).apply(null,arguments)},o["_itk_wasm_input_json_alloc"]=function(){return(o["_itk_wasm_input_json_alloc"]=o["asm"]["F"]).apply(null,arguments)},o["_itk_wasm_output_json_address"]=function(){return(o["_itk_wasm_output_json_address"]=o["asm"]["G"]).apply(null,arguments)},o["_itk_wasm_output_json_size"]=function(){return(o["_itk_wasm_output_json_size"]=o["asm"]["H"]).apply(null,arguments)},o["_itk_wasm_output_array_address"]=function(){return(o["_itk_wasm_output_array_address"]=o["asm"]["I"]).apply(null,arguments)},o["_itk_wasm_output_array_size"]=function(){return(o["_itk_wasm_output_array_size"]=o["asm"]["J"]).apply(null,arguments)},o["_itk_wasm_free_all"]=function(){return(o["_itk_wasm_free_all"]=o["asm"]["K"]).apply(null,arguments)},o["_malloc"]=function(){return(Be=o["_malloc"]=o["asm"]["L"]).apply(null,arguments)}),Le=o["stackSave"]=function(){return(Le=o["stackSave"]=o["asm"]["N"]).apply(null,arguments)},xe=o["stackRestore"]=function(){return(xe=o["stackRestore"]=o["asm"]["O"]).apply(null,arguments)},ze=o["stackAlloc"]=function(){return(ze=o["stackAlloc"]=o["asm"]["P"]).apply(null,arguments)},je=o["___cxa_is_pointer_type"]=function(){return(je=o["___cxa_is_pointer_type"]=o["asm"]["Q"]).apply(null,arguments)};function Ue(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}o["ccall"]=R,o["cwrap"]=T,o["addRunDependency"]=hr,o["removeRunDependency"]=pr,o["FS_createPath"]=Hr.createPath,o["FS_createDataFile"]=Hr.createDataFile,o["FS_createPreloadedFile"]=Hr.createPreloadedFile,o["FS_createLazyFile"]=Hr.createLazyFile,o["FS_createDevice"]=Hr.createDevice,o["FS_unlink"]=Hr.unlink,o["callMain"]=He,o["AsciiToString"]=G,o["writeArrayToMemory"]=K,o["writeAsciiToMemory"]=V;function He(r){var e=o["_main"];r=r||[],r.unshift(p);var t=r.length,n=ze(4*(t+1)),i=n>>2;r.forEach((r=>{x[i++]=X(r)})),x[i]=0;try{var a=e(t,n);return We(a,!0),a}catch(s){return Pr(s)}finally{!0}}function Ye(r){function e(){Te||(Te=!0,o["calledRun"]=!0,P||(or(),ir(),t(o),o["onRuntimeInitialized"]&&o["onRuntimeInitialized"](),Ge&&He(r),ar()))}r=r||h,dr>0||(nr(),dr>0||(o["setStatus"]?(o["setStatus"]("Running..."),setTimeout((function(){setTimeout((function(){o["setStatus"]("")}),1),e()}),1)):e()))}function We(r,e){O=r,qe(r)}function qe(r){O=r,tr()||(o["onExit"]&&o["onExit"](r),P=!0),E(r,new Ue(r))}if(lr=function r(){Te||Ye(),Te||(lr=r)},o["run"]=Ye,o["preInit"]){"function"==typeof o["preInit"]&&(o["preInit"]=[o["preInit"]]);while(o["preInit"].length>0)o["preInit"].pop()()}var Ge=!1;return o["noInitialRun"]&&(Ge=!1),Ye(),o.mountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);if(!Hr.isDir(t)&&"/"!==t){for(var n="/",o=t.split(e.sep),i=1;i<o.length;i++)n+=o[i],Hr.analyzePath(n).exists||Hr.mkdir(n),n+="/";return Hr.mount(Ur,{root:t},n),n+e.basename(r)}}},o.unmountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);Hr.unmount(t)}},o.fs_mkdirs=function(r){for(var e="/",t=r.split("/"),n=1;n<t.length;++n)e+=t[n],Hr.analyzePath(e).exists||Hr.mkdir(e),e+="/"},o.fs_readFile=function(r,e){return Hr.readFile(r,e)},o.fs_writeFile=function(r,e,t){return Hr.writeFile(r,e,t)},o.fs_unlink=function(r){return Hr.unlink(r)},o.fs_open=function(r,e,t){return Hr.open(r,e,t)},o.fs_stat=function(r){return Hr.stat(r)},o.fs_read=function(r,e,t,n,o){return Hr.read(r,e,t,n,o)},o.fs_close=function(r){return Hr.close(r)},o.mountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);if(!Hr.isDir(t)&&"/"!==t){for(var n="/",o=t.split(e.sep),i=1;i<o.length;i++)n+=o[i],Hr.analyzePath(n).exists||Hr.mkdir(n),n+="/";return Hr.mount(Ur,{root:t},n),n+e.basename(r)}}},o.unmountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);Hr.unmount(t)}},o.fs_mkdirs=function(r){for(var e="/",t=r.split("/"),n=1;n<t.length;++n)e+=t[n],Hr.analyzePath(e).exists||Hr.mkdir(e),e+="/"},o.fs_readFile=function(r,e){return Hr.readFile(r,e)},o.fs_writeFile=function(r,e,t){return Hr.writeFile(r,e,t)},o.fs_unlink=function(r){return Hr.unlink(r)},o.fs_open=function(r,e,t){return Hr.open(r,e,t)},o.fs_stat=function(r){return Hr.stat(r)},o.fs_read=function(r,e,t,n,o){return Hr.read(r,e,t,n,o)},o.fs_close=function(r){return Hr.close(r)},e.ready}})();"object"===typeof exports&&"object"===typeof module?module.exports=BMPImageIOReadImage:"function"===typeof define&&define["amd"]?define([],(function(){return BMPImageIOReadImage})):"object"===typeof exports&&(exports["BMPImageIOReadImage"]=BMPImageIOReadImage);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var BMPImageIOWriteImage=(()=>{var r="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!==typeof __filename&&(r=r||__filename),function(e){e=e||{};var t,n,o="undefined"!=typeof e?e:{};o["ready"]=new Promise((function(r,e){t=r,n=e}));var i=null,a=null;o["resetModuleStdout"]=function(){i=""},o["resetModuleStderr"]=function(){a=""},o["print"]=function(r){console.log(r),i+=r+"\n"},o["printErr"]=function(r){console.error(r),a+=r+"\n"},o["getModuleStdout"]=function(){return i},o["getModuleStderr"]=function(){return a};i=null,a=null;o["resetModuleStdout"]=function(){i=""},o["resetModuleStderr"]=function(){a=""},o["print"]=function(r){console.log(r),i+=r+"\n"},o["printErr"]=function(r){console.error(r),a+=r+"\n"},o["getModuleStdout"]=function(){return i},o["getModuleStderr"]=function(){return a};var s,u,c,l,f,d,m=Object.assign({},o),h=[],p="./this.program",E=(r,e)=>{throw e},w="object"==typeof window,v="function"==typeof importScripts,y="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,g="";function _(r){return o["locateFile"]?o["locateFile"](r,g):g+r}function k(r){if(r instanceof Ue)return;let e=r;D("exiting due to exception: "+e)}y?(g=v?require("path").dirname(g)+"/":__dirname+"/",d=()=>{f||(l=require("fs"),f=require("path"))},s=function(r,e){return d(),r=f["normalize"](r),l.readFileSync(r,e?void 0:"utf8")},c=r=>{var e=s(r,!0);return e.buffer||(e=new Uint8Array(e)),e},u=(r,e,t)=>{d(),r=f["normalize"](r),l.readFile(r,(function(r,n){r?t(r):e(n.buffer)}))},process["argv"].length>1&&(p=process["argv"][1].replace(/\\/g,"/")),h=process["argv"].slice(2),process["on"]("uncaughtException",(function(r){if(!(r instanceof Ue))throw r})),process["on"]("unhandledRejection",(function(r){throw r})),E=(r,e)=>{if(tr())throw process["exitCode"]=r,e;k(e),process["exit"](r)},o["inspect"]=function(){return"[Emscripten Module object]"}):(w||v)&&(v?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),r&&(g=r),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},v&&(c=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),u=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)});var S,b=o["print"]||console.log.bind(console),D=o["printErr"]||console.warn.bind(console);Object.assign(o,m),m=null,o["arguments"]&&(h=o["arguments"]),o["thisProgram"]&&(p=o["thisProgram"]),o["quit"]&&(E=o["quit"]),o["wasmBinary"]&&(S=o["wasmBinary"]);var N,F=o["noExitRuntime"]||!0;"object"!=typeof WebAssembly&&Er("no native wasm support detected");var O,P=!1;function A(r,e){r||Er(e)}function M(r){var e=o["_"+r];return e}function R(r,e,t,n,o){var i={string:function(r){var e=0;if(null!==r&&void 0!==r&&0!==r){var t=1+(r.length<<2);e=xe(t),Y(r,e,t)}return e},array:function(r){var e=xe(r.length);return K(r,e),e}};function a(r){return"string"===e?H(r):"boolean"===e?Boolean(r):r}var s=M(r),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=i[t[l]];f?(0===c&&(c=Be()),u[l]=f(n[l])):u[l]=n[l]}var d=s.apply(null,u);function m(r){return 0!==c&&ze(c),a(r)}return d=m(d),d}function T(r,e,t,n){t=t||[];var o=t.every((function(r){return"number"===r})),i="string"!==e;return i&&o&&!n?M(r):function(){return R(r,e,t,arguments,n)}}var C,I,L,B,z,x,j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function U(r,e,t){var n=e+t,o=e;while(r[o]&&!(o>=n))++o;if(o-e>16&&r.buffer&&j)return j.decode(r.subarray(e,o));var i="";while(e<o){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if(a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++],a<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function H(r,e){return r?U(L,r,e):""}function W(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343){var u=r.charCodeAt(++a);s=65536+((1023&s)<<10)|1023&u}if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function Y(r,e,t){return W(r,L,e,t)}function q(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function G(r){var e="";while(1){var t=L[r++>>0];if(!t)return e;e+=String.fromCharCode(t)}}function X(r){var e=q(r)+1,t=xe(e);return W(r,I,t,e),t}function K(r,e){I.set(r,e)}function V(r,e,t){for(var n=0;n<r.length;++n)I[e++>>0]=r.charCodeAt(n);t||(I[e>>0]=0)}function Q(r){C=r,o["HEAP8"]=I=new Int8Array(r),o["HEAP16"]=B=new Int16Array(r),o["HEAP32"]=z=new Int32Array(r),o["HEAPU8"]=L=new Uint8Array(r),o["HEAPU16"]=new Uint16Array(r),o["HEAPU32"]=x=new Uint32Array(r),o["HEAPF32"]=new Float32Array(r),o["HEAPF64"]=new Float64Array(r)}o["INITIAL_MEMORY"];var J,Z=[],$=[],rr=[],er=[];function tr(){return F}function nr(){if(o["preRun"]){"function"==typeof o["preRun"]&&(o["preRun"]=[o["preRun"]]);while(o["preRun"].length)sr(o["preRun"].shift())}Nr(Z)}function or(){!0,o["noFSInit"]||Hr.init.initialized||Hr.init(),Hr.ignorePermissions=!1,Lr.init(),Nr($)}function ir(){Nr(rr)}function ar(){if(o["postRun"]){"function"==typeof o["postRun"]&&(o["postRun"]=[o["postRun"]]);while(o["postRun"].length)cr(o["postRun"].shift())}Nr(er)}function sr(r){Z.unshift(r)}function ur(r){$.unshift(r)}function cr(r){er.unshift(r)}var lr=0,fr=null,dr=null;function mr(r){return r}function hr(r){lr++,o["monitorRunDependencies"]&&o["monitorRunDependencies"](lr)}function pr(r){if(lr--,o["monitorRunDependencies"]&&o["monitorRunDependencies"](lr),0==lr&&(null!==fr&&(clearInterval(fr),fr=null),dr)){var e=dr;dr=null,e()}}function Er(r){o["onAbort"]&&o["onAbort"](r),r="Aborted("+r+")",D(r),P=!0,O=1,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var wr,vr,yr,gr="data:application/octet-stream;base64,";function _r(r){return r.startsWith(gr)}function kr(r){return r.startsWith("file://")}function Sr(r){try{if(r==wr&&S)return new Uint8Array(S);if(c)return c(r);throw"both async and sync fetching of the wasm failed"}catch(D){Er(D)}}function br(){if(!S&&(w||v)){if("function"==typeof fetch&&!kr(wr))return fetch(wr,{credentials:"same-origin"}).then((function(r){if(!r["ok"])throw"failed to load wasm binary file at '"+wr+"'";return r["arrayBuffer"]()})).catch((function(){return Sr(wr)}));if(u)return new Promise((function(r,e){u(wr,(function(e){r(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Sr(wr)}))}function Dr(){var r={a:Ce};function e(r,e){var t=r.exports;o["asm"]=t,N=o["asm"]["A"],Q(N.buffer),J=o["asm"]["M"],ur(o["asm"]["B"]),pr("wasm-instantiate")}function t(r){e(r["instance"])}function i(e){return br().then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){D("failed to asynchronously prepare wasm: "+r),Er(r)}))}function a(){return S||"function"!=typeof WebAssembly.instantiateStreaming||_r(wr)||kr(wr)||y||"function"!=typeof fetch?i(t):fetch(wr,{credentials:"same-origin"}).then((function(e){var n=WebAssembly.instantiateStreaming(e,r);return n.then(t,(function(r){return D("wasm streaming compile failed: "+r),D("falling back to ArrayBuffer instantiation"),i(t)}))}))}if(hr("wasm-instantiate"),o["instantiateWasm"])try{var s=o["instantiateWasm"](r,e);return s}catch(u){return D("Module.instantiateWasm callback failed with error: "+u),!1}return a().catch(n),{}}function Nr(r){while(r.length>0){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?Or(t)():Or(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}wr="BMPImageIOWriteImage.wasm",_r(wr)||(wr=_(wr));var Fr=[];function Or(r){var e=Fr[r];return e||(r>=Fr.length&&(Fr.length=r+1),Fr[r]=e=J.get(r)),e}function Pr(r){if(r instanceof Ue||"unwind"==r)return O;E(1,r)}function Ar(r){return Ie(r+24)+24}function Mr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){x[this.ptr+4>>2]=r},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(r){x[this.ptr+8>>2]=r},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(r){z[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,I[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=I[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,I[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=I[this.ptr+13>>0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=z[this.ptr>>2];z[this.ptr>>2]=r+1},this.release_ref=function(){var r=z[this.ptr>>2];return z[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){x[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){var r=je(this.get_type());if(r)return x[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function Rr(r,e,t){var n=new Mr(r);throw n.init(e,t),r,r}var Tr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(r).slice(1)},normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=Tr.isAbs(r),t="/"===r.substr(-1);return r=Tr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"),r||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=Tr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";r=Tr.normalize(r),r=r.replace(/\/$/,"");var e=r.lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments,0);return Tr.normalize(r.join("/"))},join2:(r,e)=>Tr.normalize(r+"/"+e)};function Cr(){if("object"==typeof crypto&&"function"==typeof crypto["getRandomValues"]){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}if(y)try{var e=require("crypto");return function(){return e["randomBytes"](1)[0]}}catch(t){}return function(){Er("randomDevice")}}var Ir={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Hr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=Tr.isAbs(n)}return r=Tr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"),(e?"/":"")+r||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length;e++)if(""!==r[e])break;for(var t=r.length-1;t>=0;t--)if(""!==r[t])break;return e>t?[]:r.slice(e,t-e+1)}r=Ir.resolve(r).substr(1),e=Ir.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return u=u.concat(o.slice(a)),u.join("/")}},Lr={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){Lr.ttys[r]={input:[],output:[],ops:e},Hr.registerDevice(r,Lr.stream_ops)},stream_ops:{open:function(r){var e=Lr.ttys[r.node.rdev];if(!e)throw new Hr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Hr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(u){throw new Hr.ErrnoError(29)}if(void 0===s&&0===i)throw new Hr.ErrnoError(6);if(null===s||void 0===s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Hr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(a){throw new Hr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if(y){var t=256,n=Buffer.alloc(t),o=0;try{o=l.readSync(process.stdin.fd,n,0,t,-1)}catch(i){if(!i.toString().includes("EOF"))throw i;o=0}e=o>0?n.slice(0,o).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(e=window.prompt("Input: "),null!==e&&(e+="\n")):"function"==typeof readline&&(e=readline(),null!==e&&(e+="\n"));if(!e)return null;r.input=Re(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(b(U(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(b(U(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(D(U(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(D(U(r.output,0)),r.output=[])}}};function Br(r){Er()}var zr={ops_table:null,mount:function(r){return zr.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(Hr.isBlkdev(t)||Hr.isFIFO(t))throw new Hr.ErrnoError(63);zr.ops_table||(zr.ops_table={dir:{node:{getattr:zr.node_ops.getattr,setattr:zr.node_ops.setattr,lookup:zr.node_ops.lookup,mknod:zr.node_ops.mknod,rename:zr.node_ops.rename,unlink:zr.node_ops.unlink,rmdir:zr.node_ops.rmdir,readdir:zr.node_ops.readdir,symlink:zr.node_ops.symlink},stream:{llseek:zr.stream_ops.llseek}},file:{node:{getattr:zr.node_ops.getattr,setattr:zr.node_ops.setattr},stream:{llseek:zr.stream_ops.llseek,read:zr.stream_ops.read,write:zr.stream_ops.write,allocate:zr.stream_ops.allocate,mmap:zr.stream_ops.mmap,msync:zr.stream_ops.msync}},link:{node:{getattr:zr.node_ops.getattr,setattr:zr.node_ops.setattr,readlink:zr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:zr.node_ops.getattr,setattr:zr.node_ops.setattr},stream:Hr.chrdev_stream_ops}});var o=Hr.createNode(r,e,t,n);return Hr.isDir(o.mode)?(o.node_ops=zr.ops_table.dir.node,o.stream_ops=zr.ops_table.dir.stream,o.contents={}):Hr.isFile(o.mode)?(o.node_ops=zr.ops_table.file.node,o.stream_ops=zr.ops_table.file.stream,o.usedBytes=0,o.contents=null):Hr.isLink(o.mode)?(o.node_ops=zr.ops_table.link.node,o.stream_ops=zr.ops_table.link.stream):Hr.isChrdev(o.mode)&&(o.node_ops=zr.ops_table.chrdev.node,o.stream_ops=zr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1048576;e=Math.max(e,t*(t<n?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var o=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(o.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=Hr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Hr.isDir(r.mode)?e.size=4096:Hr.isFile(r.mode)?e.size=r.usedBytes:Hr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&zr.resizeFileStorage(r,e.size)},lookup:function(r,e){throw Hr.genericErrors[44]},mknod:function(r,e,t,n){return zr.createNode(r,e,t,n)},rename:function(r,e,t){if(Hr.isDir(r.mode)){var n;try{n=Hr.lookupNode(e,t)}catch(i){}if(n)for(var o in n.contents)throw new Hr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=Hr.lookupNode(r,e);for(var n in t.contents)throw new Hr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=zr.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!Hr.isLink(r.mode))throw new Hr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===I.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(zr.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Hr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Hr.ErrnoError(28);return n},allocate:function(r,e,t){zr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);var i,a,s=r.node.contents;if(2&o||s.buffer!==C){if((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),a=!0,i=Br(e),!i)throw new Hr.ErrnoError(48);I.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(r,e,t,n,o){if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);if(2&o)return 0;zr.stream_ops.write(r,e,0,n,t,!1);return 0}}};function xr(r,e,t,n){var o=n?"":mr("al "+r);u(r,(function(t){A(t,'Loading data file "'+r+'" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&pr(o)}),(function(e){if(!t)throw'Loading data file "'+r+'" failed.';t()})),o&&hr(o)}var jr={},Ur={isWindows:!1,staticInit:()=>{Ur.isWindows=!!process.platform.match(/^win/);var r=process["binding"]("constants");r["fs"]&&(r=r["fs"]),Ur.flagsForNodeMap={1024:r["O_APPEND"],64:r["O_CREAT"],128:r["O_EXCL"],256:r["O_NOCTTY"],0:r["O_RDONLY"],2:r["O_RDWR"],4096:r["O_SYNC"],512:r["O_TRUNC"],1:r["O_WRONLY"],131072:r["O_NOFOLLOW"]}},convertNodeCode:r=>{var e=r.code;return jr[e]},mount:r=>Ur.createNode(null,"/",Ur.getMode(r.opts.root),0),createNode:(r,e,t,n)=>{if(!Hr.isDir(t)&&!Hr.isFile(t)&&!Hr.isLink(t))throw new Hr.ErrnoError(28);var o=Hr.createNode(r,e,t);return o.node_ops=Ur.node_ops,o.stream_ops=Ur.stream_ops,o},getMode:r=>{var e;try{e=l.lstatSync(r),Ur.isWindows&&(e.mode=e.mode|(292&e.mode)>>2)}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}return e.mode},realPath:r=>{var e=[];while(r.parent!==r)e.push(r.name),r=r.parent;return e.push(r.mount.opts.root),e.reverse(),Tr.join.apply(null,e)},flagsForNode:r=>{r&=-2097153,r&=-2049,r&=-32769,r&=-524289,r&=-65537;var e=0;for(var t in Ur.flagsForNodeMap)r&t&&(e|=Ur.flagsForNodeMap[t],r^=t);if(r)throw new Hr.ErrnoError(28);return e},node_ops:{getattr:r=>{var e,t=Ur.realPath(r);try{e=l.lstatSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}return Ur.isWindows&&!e.blksize&&(e.blksize=4096),Ur.isWindows&&!e.blocks&&(e.blocks=(e.size+e.blksize-1)/e.blksize|0),{dev:e.dev,ino:e.ino,mode:e.mode,nlink:e.nlink,uid:e.uid,gid:e.gid,rdev:e.rdev,size:e.size,atime:e.atime,mtime:e.mtime,ctime:e.ctime,blksize:e.blksize,blocks:e.blocks}},setattr:(r,e)=>{var t=Ur.realPath(r);try{if(void 0!==e.mode&&(l.chmodSync(t,e.mode),r.mode=e.mode),void 0!==e.timestamp){var n=new Date(e.timestamp);l.utimesSync(t,n,n)}void 0!==e.size&&l.truncateSync(t,e.size)}catch(o){if(!o.code)throw o;throw new Hr.ErrnoError(Ur.convertNodeCode(o))}},lookup:(r,e)=>{var t=Tr.join2(Ur.realPath(r),e),n=Ur.getMode(t);return Ur.createNode(r,e,n)},mknod:(r,e,t,n)=>{var o=Ur.createNode(r,e,t,n),i=Ur.realPath(o);try{Hr.isDir(o.mode)?l.mkdirSync(i,o.mode):l.writeFileSync(i,"",{mode:o.mode})}catch(a){if(!a.code)throw a;throw new Hr.ErrnoError(Ur.convertNodeCode(a))}return o},rename:(r,e,t)=>{var n=Ur.realPath(r),o=Tr.join2(Ur.realPath(e),t);try{l.renameSync(n,o)}catch(i){if(!i.code)throw i;throw new Hr.ErrnoError(Ur.convertNodeCode(i))}r.name=t},unlink:(r,e)=>{var t=Tr.join2(Ur.realPath(r),e);try{l.unlinkSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}},rmdir:(r,e)=>{var t=Tr.join2(Ur.realPath(r),e);try{l.rmdirSync(t)}catch(n){if(!n.code)throw n;throw new Hr.ErrnoError(Ur.convertNodeCode(n))}},readdir:r=>{var e=Ur.realPath(r);try{return l.readdirSync(e)}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}},symlink:(r,e,t)=>{var n=Tr.join2(Ur.realPath(r),e);try{l.symlinkSync(t,n)}catch(o){if(!o.code)throw o;throw new Hr.ErrnoError(Ur.convertNodeCode(o))}},readlink:r=>{var e=Ur.realPath(r);try{return e=l.readlinkSync(e),e=f.relative(f.resolve(r.mount.opts.root),e),e}catch(t){if(!t.code)throw t;if("UNKNOWN"===t.code)throw new Hr.ErrnoError(28);throw new Hr.ErrnoError(Ur.convertNodeCode(t))}}},stream_ops:{open:r=>{var e=Ur.realPath(r.node);try{Hr.isFile(r.node.mode)&&(r.nfd=l.openSync(e,Ur.flagsForNode(r.flags)))}catch(t){if(!t.code)throw t;throw new Hr.ErrnoError(Ur.convertNodeCode(t))}},close:r=>{try{Hr.isFile(r.node.mode)&&r.nfd&&l.closeSync(r.nfd)}catch(e){if(!e.code)throw e;throw new Hr.ErrnoError(Ur.convertNodeCode(e))}},read:(r,e,t,n,o)=>{if(0===n)return 0;try{return l.readSync(r.nfd,Buffer.from(e.buffer),t,n,o)}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}},write:(r,e,t,n,o)=>{try{return l.writeSync(r.nfd,Buffer.from(e.buffer),t,n,o)}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}},llseek:(r,e,t)=>{var n=e;if(1===t)n+=r.position;else if(2===t&&Hr.isFile(r.node.mode))try{var o=l.fstatSync(r.nfd);n+=o.size}catch(i){throw new Hr.ErrnoError(Ur.convertNodeCode(i))}if(n<0)throw new Hr.ErrnoError(28);return n},mmap:(r,e,t,n,o)=>{if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);var i=Br(e);return Ur.stream_ops.read(r,I,i,e,t),{ptr:i,allocated:!0}},msync:(r,e,t,n,o)=>{if(!Hr.isFile(r.node.mode))throw new Hr.ErrnoError(43);if(2&o)return 0;Ur.stream_ops.write(r,e,0,n,t,!1);return 0}}},Hr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(r=Ir.resolve(Hr.cwd(),r),!r)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(e=Object.assign(t,e),e.recurse_count>8)throw new Hr.ErrnoError(32);for(var n=Tr.normalizeArray(r.split("/").filter((r=>!!r)),!1),o=Hr.root,i="/",a=0;a<n.length;a++){var s=a===n.length-1;if(s&&e.parent)break;if(o=Hr.lookupNode(o,n[a]),i=Tr.join2(i,n[a]),Hr.isMountpoint(o)&&(!s||s&&e.follow_mount)&&(o=o.mounted.root),!s||e.follow){var u=0;while(Hr.isLink(o.mode)){var c=Hr.readlink(i);i=Ir.resolve(Tr.dirname(i),c);var l=Hr.lookupPath(i,{recurse_count:e.recurse_count+1});if(o=l.node,u++>40)throw new Hr.ErrnoError(32)}}}return{path:i,node:o}},getPath:r=>{var e;while(1){if(Hr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Hr.nameTable.length},hashAddNode:r=>{var e=Hr.hashName(r.parent.id,r.name);r.name_next=Hr.nameTable[e],Hr.nameTable[e]=r},hashRemoveNode:r=>{var e=Hr.hashName(r.parent.id,r.name);if(Hr.nameTable[e]===r)Hr.nameTable[e]=r.name_next;else{var t=Hr.nameTable[e];while(t){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}}},lookupNode:(r,e)=>{var t=Hr.mayLookup(r);if(t)throw new Hr.ErrnoError(t,r);for(var n=Hr.hashName(r.id,e),o=Hr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return Hr.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new Hr.FSNode(r,e,t,n);return Hr.hashAddNode(o),o},destroyNode:r=>{Hr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768===(61440&r),isDir:r=>16384===(61440&r),isLink:r=>40960===(61440&r),isChrdev:r=>8192===(61440&r),isBlkdev:r=>24576===(61440&r),isFIFO:r=>4096===(61440&r),isSocket:r=>49152===(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=Hr.flagModes[r];if("undefined"==typeof e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>Hr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var e=Hr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{Hr.lookupNode(r,e);return 20}catch(t){}return Hr.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=Hr.lookupNode(r,e)}catch(i){return i.errno}var o=Hr.nodePermissions(r,"wx");if(o)return o;if(t){if(!Hr.isDir(n.mode))return 54;if(Hr.isRoot(n)||Hr.getPath(n)===Hr.cwd())return 10}else if(Hr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Hr.isLink(r.mode)?32:Hr.isDir(r.mode)&&("r"!==Hr.flagsToPermissionString(e)||512&e)?31:Hr.nodePermissions(r,Hr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=Hr.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!Hr.streams[t])return t;throw new Hr.ErrnoError(33)},getStream:r=>Hr.streams[r],createStream:(r,e,t)=>{Hr.FSStream||(Hr.FSStream=function(){this.shared={}},Hr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!==(2097155&this.flags)}},isWrite:{get:function(){return 0!==(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get function(){return this.shared.position},set:function(r){this.shared.position=r}}}),r=Object.assign(new Hr.FSStream,r);var n=Hr.nextfd(e,t);return r.fd=n,Hr.streams[n]=r,r},closeStream:r=>{Hr.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=Hr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new Hr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{Hr.devices[r]={stream_ops:e}},getDevice:r=>Hr.devices[r],getMounts:r=>{var e=[],t=[r];while(t.length){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),Hr.syncFSRequests++,Hr.syncFSRequests>1&&D("warning: "+Hr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Hr.getMounts(Hr.root.mount),n=0;function o(r){return Hr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o="/"===t,i=!t;if(o&&Hr.root)throw new Hr.ErrnoError(10);if(!o&&!i){var a=Hr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Hr.isMountpoint(n))throw new Hr.ErrnoError(10);if(!Hr.isDir(n.mode))throw new Hr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Hr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=Hr.lookupPath(r,{follow_mount:!1});if(!Hr.isMountpoint(e.node))throw new Hr.ErrnoError(28);var t=e.node,n=t.mounted,o=Hr.getMounts(n);Object.keys(Hr.nameTable).forEach((r=>{var e=Hr.nameTable[r];while(e){var t=e.name_next;o.includes(e.mount)&&Hr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=Hr.lookupPath(r,{parent:!0}),o=n.node,i=Tr.basename(r);if(!i||"."===i||".."===i)throw new Hr.ErrnoError(28);var a=Hr.mayCreate(o,i);if(a)throw new Hr.ErrnoError(a);if(!o.node_ops.mknod)throw new Hr.ErrnoError(63);return o.node_ops.mknod(o,i,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Hr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Hr.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Hr.mkdir(n,e)}catch(i){if(20!=i.errno)throw i}}},mkdev:(r,e,t)=>("undefined"==typeof t&&(t=e,e=438),e|=8192,Hr.mknod(r,e,t)),symlink:(r,e)=>{if(!Ir.resolve(r))throw new Hr.ErrnoError(44);var t=Hr.lookupPath(e,{parent:!0}),n=t.node;if(!n)throw new Hr.ErrnoError(44);var o=Tr.basename(e),i=Hr.mayCreate(n,o);if(i)throw new Hr.ErrnoError(i);if(!n.node_ops.symlink)throw new Hr.ErrnoError(63);return n.node_ops.symlink(n,o,r)},rename:(r,e)=>{var t,n,o,i=Tr.dirname(r),a=Tr.dirname(e),s=Tr.basename(r),u=Tr.basename(e);if(t=Hr.lookupPath(r,{parent:!0}),n=t.node,t=Hr.lookupPath(e,{parent:!0}),o=t.node,!n||!o)throw new Hr.ErrnoError(44);if(n.mount!==o.mount)throw new Hr.ErrnoError(75);var c,l=Hr.lookupNode(n,s),f=Ir.relative(r,a);if("."!==f.charAt(0))throw new Hr.ErrnoError(28);if(f=Ir.relative(e,i),"."!==f.charAt(0))throw new Hr.ErrnoError(55);try{c=Hr.lookupNode(o,u)}catch(h){}if(l!==c){var d=Hr.isDir(l.mode),m=Hr.mayDelete(n,s,d);if(m)throw new Hr.ErrnoError(m);if(m=c?Hr.mayDelete(o,u,d):Hr.mayCreate(o,u),m)throw new Hr.ErrnoError(m);if(!n.node_ops.rename)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(l)||c&&Hr.isMountpoint(c))throw new Hr.ErrnoError(10);if(o!==n&&(m=Hr.nodePermissions(n,"w"),m))throw new Hr.ErrnoError(m);Hr.hashRemoveNode(l);try{n.node_ops.rename(l,o,u)}catch(h){throw h}finally{Hr.hashAddNode(l)}}},rmdir:r=>{var e=Hr.lookupPath(r,{parent:!0}),t=e.node,n=Tr.basename(r),o=Hr.lookupNode(t,n),i=Hr.mayDelete(t,n,!0);if(i)throw new Hr.ErrnoError(i);if(!t.node_ops.rmdir)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(o))throw new Hr.ErrnoError(10);t.node_ops.rmdir(t,n),Hr.destroyNode(o)},readdir:r=>{var e=Hr.lookupPath(r,{follow:!0}),t=e.node;if(!t.node_ops.readdir)throw new Hr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var e=Hr.lookupPath(r,{parent:!0}),t=e.node;if(!t)throw new Hr.ErrnoError(44);var n=Tr.basename(r),o=Hr.lookupNode(t,n),i=Hr.mayDelete(t,n,!1);if(i)throw new Hr.ErrnoError(i);if(!t.node_ops.unlink)throw new Hr.ErrnoError(63);if(Hr.isMountpoint(o))throw new Hr.ErrnoError(10);t.node_ops.unlink(t,n),Hr.destroyNode(o)},readlink:r=>{var e=Hr.lookupPath(r),t=e.node;if(!t)throw new Hr.ErrnoError(44);if(!t.node_ops.readlink)throw new Hr.ErrnoError(28);return Ir.resolve(Hr.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,e)=>{var t=Hr.lookupPath(r,{follow:!e}),n=t.node;if(!n)throw new Hr.ErrnoError(44);if(!n.node_ops.getattr)throw new Hr.ErrnoError(63);return n.node_ops.getattr(n)},lstat:r=>Hr.stat(r,!0),chmod:(r,e,t)=>{var n;if("string"==typeof r){var o=Hr.lookupPath(r,{follow:!t});n=o.node}else n=r;if(!n.node_ops.setattr)throw new Hr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{Hr.chmod(r,e,!0)},fchmod:(r,e)=>{var t=Hr.getStream(r);if(!t)throw new Hr.ErrnoError(8);Hr.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if("string"==typeof r){var i=Hr.lookupPath(r,{follow:!n});o=i.node}else o=r;if(!o.node_ops.setattr)throw new Hr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{Hr.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=Hr.getStream(r);if(!n)throw new Hr.ErrnoError(8);Hr.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new Hr.ErrnoError(28);var t;if("string"==typeof r){var n=Hr.lookupPath(r,{follow:!0});t=n.node}else t=r;if(!t.node_ops.setattr)throw new Hr.ErrnoError(63);if(Hr.isDir(t.mode))throw new Hr.ErrnoError(31);if(!Hr.isFile(t.mode))throw new Hr.ErrnoError(28);var o=Hr.nodePermissions(t,"w");if(o)throw new Hr.ErrnoError(o);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=Hr.getStream(r);if(!t)throw new Hr.ErrnoError(8);if(0===(2097155&t.flags))throw new Hr.ErrnoError(28);Hr.truncate(t.node,e)},utime:(r,e,t)=>{var n=Hr.lookupPath(r,{follow:!0}),o=n.node;o.node_ops.setattr(o,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new Hr.ErrnoError(44);var n;if(e="string"==typeof e?Hr.modeStringToFlags(e):e,t="undefined"==typeof t?438:t,t=64&e?4095&t|32768:0,"object"==typeof r)n=r;else{r=Tr.normalize(r);try{var i=Hr.lookupPath(r,{follow:!(131072&e)});n=i.node}catch(c){}}var a=!1;if(64&e)if(n){if(128&e)throw new Hr.ErrnoError(20)}else n=Hr.mknod(r,t,0),a=!0;if(!n)throw new Hr.ErrnoError(44);if(Hr.isChrdev(n.mode)&&(e&=-513),65536&e&&!Hr.isDir(n.mode))throw new Hr.ErrnoError(54);if(!a){var s=Hr.mayOpen(n,e);if(s)throw new Hr.ErrnoError(s)}512&e&&!a&&Hr.truncate(n,0),e&=-131713;var u=Hr.createStream({node:n,path:Hr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),!o["logReadFiles"]||1&e||(Hr.readFiles||(Hr.readFiles={}),r in Hr.readFiles||(Hr.readFiles[r]=1)),u},close:r=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{Hr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Hr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Hr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new Hr.ErrnoError(28);if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(1===(2097155&r.flags))throw new Hr.ErrnoError(8);if(Hr.isDir(r.node.mode))throw new Hr.ErrnoError(31);if(!r.stream_ops.read)throw new Hr.ErrnoError(28);var i="undefined"!=typeof o;if(i){if(!r.seekable)throw new Hr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new Hr.ErrnoError(28);if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(0===(2097155&r.flags))throw new Hr.ErrnoError(8);if(Hr.isDir(r.node.mode))throw new Hr.ErrnoError(31);if(!r.stream_ops.write)throw new Hr.ErrnoError(28);r.seekable&&1024&r.flags&&Hr.llseek(r,0,2);var a="undefined"!=typeof o;if(a){if(!r.seekable)throw new Hr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(Hr.isClosed(r))throw new Hr.ErrnoError(8);if(e<0||t<=0)throw new Hr.ErrnoError(28);if(0===(2097155&r.flags))throw new Hr.ErrnoError(8);if(!Hr.isFile(r.node.mode)&&!Hr.isDir(r.node.mode))throw new Hr.ErrnoError(43);if(!r.stream_ops.allocate)throw new Hr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o)=>{if(0!==(2&n)&&0===(2&o)&&2!==(2097155&r.flags))throw new Hr.ErrnoError(2);if(1===(2097155&r.flags))throw new Hr.ErrnoError(2);if(!r.stream_ops.mmap)throw new Hr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new Hr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var t,n=Hr.open(r,e.flags),o=Hr.stat(r),i=o.size,a=new Uint8Array(i);return Hr.read(n,a,0,i,0),"utf8"===e.encoding?t=U(a,0):"binary"===e.encoding&&(t=a),Hr.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=Hr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(q(e)+1),i=W(e,o,0,o.length);Hr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Hr.write(n,e,0,e.byteLength,void 0,t.canOwn)}Hr.close(n)},cwd:()=>Hr.currentPath,chdir:r=>{var e=Hr.lookupPath(r,{follow:!0});if(null===e.node)throw new Hr.ErrnoError(44);if(!Hr.isDir(e.node.mode))throw new Hr.ErrnoError(54);var t=Hr.nodePermissions(e.node,"x");if(t)throw new Hr.ErrnoError(t);Hr.currentPath=e.path},createDefaultDirectories:()=>{Hr.mkdir("/tmp"),Hr.mkdir("/home"),Hr.mkdir("/home/web_user")},createDefaultDevices:()=>{Hr.mkdir("/dev"),Hr.registerDevice(Hr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Hr.mkdev("/dev/null",Hr.makedev(1,3)),Lr.register(Hr.makedev(5,0),Lr.default_tty_ops),Lr.register(Hr.makedev(6,0),Lr.default_tty1_ops),Hr.mkdev("/dev/tty",Hr.makedev(5,0)),Hr.mkdev("/dev/tty1",Hr.makedev(6,0));var r=Cr();Hr.createDevice("/dev","random",r),Hr.createDevice("/dev","urandom",r),Hr.mkdir("/dev/shm"),Hr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Hr.mkdir("/proc");var r=Hr.mkdir("/proc/self");Hr.mkdir("/proc/self/fd"),Hr.mount({mount:()=>{var e=Hr.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=Hr.getStream(t);if(!n)throw new Hr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o["stdin"]?Hr.createDevice("/dev","stdin",o["stdin"]):Hr.symlink("/dev/tty","/dev/stdin"),o["stdout"]?Hr.createDevice("/dev","stdout",null,o["stdout"]):Hr.symlink("/dev/tty","/dev/stdout"),o["stderr"]?Hr.createDevice("/dev","stderr",null,o["stderr"]):Hr.symlink("/dev/tty1","/dev/stderr");Hr.open("/dev/stdin",0),Hr.open("/dev/stdout",1),Hr.open("/dev/stderr",1)},ensureErrnoError:()=>{Hr.ErrnoError||(Hr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Hr.ErrnoError.prototype=new Error,Hr.ErrnoError.prototype.constructor=Hr.ErrnoError,[44].forEach((r=>{Hr.genericErrors[r]=new Hr.ErrnoError(r),Hr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{Hr.ensureErrnoError(),Hr.nameTable=new Array(4096),Hr.mount(zr,{},"/"),Hr.createDefaultDirectories(),Hr.createDefaultDevices(),Hr.createSpecialDirectories(),Hr.filesystems={MEMFS:zr,NODEFS:Ur}},init:(r,e,t)=>{Hr.init.initialized=!0,Hr.ensureErrnoError(),o["stdin"]=r||o["stdin"],o["stdout"]=e||o["stdout"],o["stderr"]=t||o["stderr"],Hr.createStandardStreams()},quit:()=>{Hr.init.initialized=!1;for(var r=0;r<Hr.streams.length;r++){var e=Hr.streams[r];e&&Hr.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=Hr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{var t=Hr.lookupPath(r,{follow:!e});r=t.path}catch(o){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{t=Hr.lookupPath(r,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=Tr.basename(r),t=Hr.lookupPath(r,{follow:!e}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(o){n.error=o.errno}return n},createPath:(r,e,t,n)=>{r="string"==typeof r?r:Hr.getPath(r);var o=e.split("/").reverse();while(o.length){var i=o.pop();if(i){var a=Tr.join2(r,i);try{Hr.mkdir(a)}catch(s){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=Tr.join2("string"==typeof r?r:Hr.getPath(r),e),a=Hr.getMode(n,o);return Hr.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r="string"==typeof r?r:Hr.getPath(r),a=e?Tr.join2(r,e):r);var s=Hr.getMode(n,o),u=Hr.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,f=t.length;l<f;++l)c[l]=t.charCodeAt(l);t=c}Hr.chmod(u,146|s);var d=Hr.open(u,577);Hr.write(d,t,0,t.length,0,i),Hr.close(d),Hr.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=Tr.join2("string"==typeof r?r:Hr.getPath(r),e),i=Hr.getMode(!!t,!!n);Hr.createDevice.major||(Hr.createDevice.major=64);var a=Hr.makedev(Hr.createDevice.major++,0);return Hr.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(c){throw new Hr.ErrnoError(29)}if(void 0===u&&0===a)throw new Hr.ErrnoError(6);if(null===u||void 0===u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(s){throw new Hr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Hr.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=Re(s(r.url),!0),r.usedBytes=r.contents.length}catch(e){throw new Hr.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=(r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Re(o.responseText||"",!0)},u=this;u.setDataGetter((r=>{var e=r*a,t=(r+1)*a-1;if(t=Math.min(t,n-1),"undefined"==typeof u.chunks[r]&&(u.chunks[r]=s(e,t)),"undefined"==typeof u.chunks[r])throw new Error("doXHR failed!");return u.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!v)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:t};var u=Hr.createFile(r,e,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={},l=Object.keys(u.stream_ops);function f(r,e,t,n,o){var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)e[t+s]=i[o+s];else for(s=0;s<a;s++)e[t+s]=i.get(o+s);return a}return l.forEach((r=>{var e=u.stream_ops[r];c[r]=function(){return Hr.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(r,e,t,n,o)=>(Hr.forceLoadFile(u),f(r,e,t,n,o)),c.mmap=(r,e,t,n,o)=>{Hr.forceLoadFile(u);var i=Br(e);if(!i)throw new Hr.ErrnoError(48);return f(r,I,i,e,t),{ptr:i,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,e,t,n,o,i,a,s,u,c)=>{var l=e?Ir.resolve(Tr.join2(r,e)):r,f=mr("cp "+l);function d(t){function d(t){c&&c(),s||Hr.createDataFile(r,e,t,n,o,u),i&&i(),pr(f)}Browser.handledByPreloadPlugin(t,l,d,(()=>{a&&a(),pr(f)}))||d(t)}hr(f),"string"==typeof t?xr(t,(r=>d(r)),a):d(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Hr.indexedDB();try{var o=n.open(Hr.DB_NAME(),Hr.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=()=>{b("creating db");var r=o.result;r.createObjectStore(Hr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result,i=n.transaction([Hr.DB_STORE_NAME],"readwrite"),a=i.objectStore(Hr.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.put(Hr.analyzePath(r).object.contents,r);e.onsuccess=()=>{s++,s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Hr.indexedDB();try{var o=n.open(Hr.DB_NAME(),Hr.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([Hr.DB_STORE_NAME],"readonly")}catch(i){return void t(i)}var s=a.objectStore(Hr.DB_STORE_NAME),u=0,c=0,l=r.length;function f(){0==c?e():t()}r.forEach((r=>{var e=s.get(r);e.onsuccess=()=>{Hr.analyzePath(r).exists&&Hr.unlink(r),Hr.createDataFile(Tr.dirname(r),Tr.basename(r),e.result,!0,!0,!0),u++,u+c==l&&f()},e.onerror=()=>{c++,u+c==l&&f()}})),a.onerror=t},o.onerror=t}},Wr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(Tr.isAbs(e))return e;var n;if(-100===r)n=Hr.cwd();else{var o=Hr.getStream(r);if(!o)throw new Hr.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new Hr.ErrnoError(44);return n}return Tr.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(o){if(o&&o.node&&Tr.normalize(e)!==Tr.normalize(Hr.getPath(o.node)))return-54;throw o}return z[t>>2]=n.dev,z[t+4>>2]=0,z[t+8>>2]=n.ino,z[t+12>>2]=n.mode,z[t+16>>2]=n.nlink,z[t+20>>2]=n.uid,z[t+24>>2]=n.gid,z[t+28>>2]=n.rdev,z[t+32>>2]=0,yr=[n.size>>>0,(vr=n.size,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],z[t+40>>2]=yr[0],z[t+44>>2]=yr[1],z[t+48>>2]=4096,z[t+52>>2]=n.blocks,z[t+56>>2]=n.atime.getTime()/1e3|0,z[t+60>>2]=0,z[t+64>>2]=n.mtime.getTime()/1e3|0,z[t+68>>2]=0,z[t+72>>2]=n.ctime.getTime()/1e3|0,z[t+76>>2]=0,yr=[n.ino>>>0,(vr=n.ino,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],z[t+80>>2]=yr[0],z[t+84>>2]=yr[1],0},doMsync:function(r,e,t,n,o){var i=L.slice(r,r+t);Hr.msync(e,i,o,t,n)},varargs:void 0,get:function(){Wr.varargs+=4;var r=z[Wr.varargs-4>>2];return r},getStr:function(r){var e=H(r);return e},getStreamFromFD:function(r){var e=Hr.getStream(r);if(!e)throw new Hr.ErrnoError(8);return e}};function Yr(r,e,t,n){try{if(e=Wr.getStr(e),e=Wr.calculateAt(r,e),-8&t)return-28;var o=Hr.lookupPath(e,{follow:!0}),i=o.node;if(!i)return-44;var a="";return 4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&Hr.nodePermissions(i,a)?-2:0}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function qr(r){return z[Le()>>2]=r,r}function Gr(r,e,t){Wr.varargs=t;try{var n=Wr.getStreamFromFD(r);switch(e){case 0:var o,i=Wr.get();return i<0?-28:(o=Hr.createStream(n,i),o.fd);case 1:case 2:return 0;case 3:return n.flags;case 4:i=Wr.get();return n.flags|=i,0;case 5:i=Wr.get();var a=0;return B[i+a>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return qr(28),-1;default:return-28}}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function Xr(r,e){try{if(0===e)return-28;var t=Hr.cwd(),n=q(t)+1;return e<n?-68:(Y(t,r,e),n)}catch(o){if("undefined"==typeof Hr||!(o instanceof Hr.ErrnoError))throw o;return-o.errno}}function Kr(r,e,t){Wr.varargs=t;try{var n=Wr.getStreamFromFD(r);switch(e){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Wr.get();return z[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=Wr.get();return Hr.ioctl(n,e,o);case 21523:return n.tty?0:-59;case 21524:return n.tty?0:-59;default:Er("bad ioctl syscall "+e)}}catch(i){if("undefined"==typeof Hr||!(i instanceof Hr.ErrnoError))throw i;return-i.errno}}function Vr(r,e){try{return r=Wr.getStr(r),Wr.doStat(Hr.lstat,r,e)}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return-t.errno}}function Qr(r,e,t){try{return e=Wr.getStr(e),e=Wr.calculateAt(r,e),e=Tr.normalize(e),"/"===e[e.length-1]&&(e=e.substr(0,e.length-1)),Hr.mkdir(e,t,0),0}catch(n){if("undefined"==typeof Hr||!(n instanceof Hr.ErrnoError))throw n;return-n.errno}}function Jr(r,e,t,n){try{e=Wr.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=Wr.calculateAt(r,e,i),Wr.doStat(o?Hr.lstat:Hr.stat,e,t)}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return-a.errno}}function Zr(r,e,t,n){Wr.varargs=n;try{e=Wr.getStr(e),e=Wr.calculateAt(r,e);var o=n?Wr.get():0;return Hr.open(e,t,o).fd}catch(i){if("undefined"==typeof Hr||!(i instanceof Hr.ErrnoError))throw i;return-i.errno}}function $r(r,e,t,n){try{if(e=Wr.getStr(e),e=Wr.calculateAt(r,e),n<=0)return-28;var o=Hr.readlink(e),i=Math.min(n,q(o)),a=I[t+i];return Y(o,t,n+1),I[t+i]=a,i}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return-s.errno}}function re(r,e){try{return r=Wr.getStr(r),Wr.doStat(Hr.stat,r,e)}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return-t.errno}}function ee(r,e,t){try{return e=Wr.getStr(e),e=Wr.calculateAt(r,e),0===t?Hr.unlink(e):512===t?Hr.rmdir(e):Er("Invalid flags passed to unlinkat"),0}catch(n){if("undefined"==typeof Hr||!(n instanceof Hr.ErrnoError))throw n;return-n.errno}}function te(r,e,t,n){try{if(e=Wr.getStr(e),e=Wr.calculateAt(r,e,!0),t){var o=z[t>>2],i=z[t+4>>2];a=1e3*o+i/1e6,t+=8,o=z[t>>2],i=z[t+4>>2],s=1e3*o+i/1e6}else var a=Date.now(),s=a;return Hr.utime(e,a,s),0}catch(u){if("undefined"==typeof Hr||!(u instanceof Hr.ErrnoError))throw u;return-u.errno}}function ne(){Er("")}function oe(r,e,t){L.copyWithin(r,e,e+t)}function ie(){return 2147483648}function ae(r){try{return N.grow(r-C.byteLength+65535>>>16),Q(N.buffer),1}catch(e){}}function se(r){var e=L.length;r>>>=0;var t=ie();if(r>t)return!1;let n=(r,e)=>r+(e-r%e)%e;for(var o=1;o<=4;o*=2){var i=e*(1+.2/o);i=Math.min(i,r+100663296);var a=Math.min(t,n(Math.max(r,i),65536)),s=ae(a);if(s)return!0}return!1}var ue={};function ce(){return p||"./this.program"}function le(){if(!le.strings){var r=("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:ce()};for(var t in ue)void 0===ue[t]?delete e[t]:e[t]=ue[t];var n=[];for(var t in e)n.push(t+"="+e[t]);le.strings=n}return le.strings}function fe(r,e){var t=0;return le().forEach((function(n,o){var i=e+t;x[r+4*o>>2]=i,V(n,i),t+=n.length+1})),0}function de(r,e){var t=le();x[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),x[e>>2]=n,0}function me(r){Ye(r)}function he(r){try{var e=Wr.getStreamFromFD(r);return Hr.close(e),0}catch(t){if("undefined"==typeof Hr||!(t instanceof Hr.ErrnoError))throw t;return t.errno}}function pe(r,e){try{var t=Wr.getStreamFromFD(r),n=t.tty?2:Hr.isDir(t.mode)?3:Hr.isLink(t.mode)?7:4;return I[e>>0]=n,0}catch(o){if("undefined"==typeof Hr||!(o instanceof Hr.ErrnoError))throw o;return o.errno}}function Ee(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=x[e>>2],s=x[e+4>>2];e+=8;var u=Hr.read(r,I,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}function we(r,e,t,n){try{var o=Wr.getStreamFromFD(r),i=Ee(o,e,t);return z[n>>2]=i,0}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return a.errno}}function ve(r,e){return e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN}function ye(r,e,t,n,o){try{var i=ve(e,t);if(isNaN(i))return 61;var a=Wr.getStreamFromFD(r);return Hr.llseek(a,i,n),yr=[a.position>>>0,(vr=a.position,+Math.abs(vr)>=1?vr>0?(0|Math.min(+Math.floor(vr/4294967296),4294967295))>>>0:~~+Math.ceil((vr-+(~~vr>>>0))/4294967296)>>>0:0)],z[o>>2]=yr[0],z[o+4>>2]=yr[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(s){if("undefined"==typeof Hr||!(s instanceof Hr.ErrnoError))throw s;return s.errno}}function ge(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=x[e>>2],s=x[e+4>>2];e+=8;var u=Hr.write(r,I,a,s,n);if(u<0)return-1;o+=u}return o}function _e(r,e,t,n){try{var o=Wr.getStreamFromFD(r),i=ge(o,e,t);return x[n>>2]=i,0}catch(a){if("undefined"==typeof Hr||!(a instanceof Hr.ErrnoError))throw a;return a.errno}}function ke(r){return r%4===0&&(r%100!==0||r%400===0)}function Se(r,e){for(var t=0,n=0;n<=e;t+=r[n++]);return t}var be=[31,29,31,30,31,30,31,31,30,31,30,31],De=[31,28,31,30,31,30,31,31,30,31,30,31];function Ne(r,e){var t=new Date(r.getTime());while(e>0){var n=ke(t.getFullYear()),o=t.getMonth(),i=(n?be:De)[o];if(!(e>i-t.getDate()))return t.setDate(t.getDate()+e),t;e-=i-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}function Fe(r,e,t,n){var o=z[n+40>>2],i={tm_sec:z[n>>2],tm_min:z[n+4>>2],tm_hour:z[n+8>>2],tm_mday:z[n+12>>2],tm_mon:z[n+16>>2],tm_year:z[n+20>>2],tm_wday:z[n+24>>2],tm_yday:z[n+28>>2],tm_isdst:z[n+32>>2],tm_gmtoff:z[n+36>>2],tm_zone:o?H(o):""},a=H(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(r,e,t){var n="number"==typeof r?r.toString():r||"";while(n.length<e)n=t[0]+n;return n}function d(r,e){return f(r,e,"0")}function m(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.getDate())),n}function h(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function p(r){var e=Ne(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=h(t),i=h(n);return m(o,e)<=0?m(i,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var E={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return l[r.tm_mon].substring(0,3)},"%B":function(r){return l[r.tm_mon]},"%C":function(r){var e=r.tm_year+1900;return d(e/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return f(r.tm_mday,2," ")},"%g":function(r){return p(r).toString().substring(2)},"%G":function(r){return p(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),d(e,2)},"%j":function(r){return d(r.tm_mday+Se(ke(r.tm_year+1900)?be:De,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var e=r.tm_yday+7-r.tm_wday;return d(Math.floor(e/7),2)},"%V":function(r){var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&ke(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&ke(r.tm_year%400-1))&&e++}return d(e,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var e=r.tm_yday+7-(r.tm_wday+6)%7;return d(Math.floor(e/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var e=r.tm_gmtoff,t=e>=0;return e=Math.abs(e)/60,e=e/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),E)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),E[u](i)));a=a.replace(/\0\0/g,"%");var w=Re(a,!1);return w.length>e?0:(K(w,r),w.length-1)}function Oe(r,e,t,n){return Fe(r,e,t,n)}var Pe=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Hr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},Ae=365,Me=146;function Re(r,e,t){var n=t>0?t:q(r)+1,o=new Array(n),i=W(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(Pe.prototype,{read:{get:function(){return(this.mode&Ae)===Ae},set:function(r){r?this.mode|=Ae:this.mode&=~Ae}},write:{get:function(){return(this.mode&Me)===Me},set:function(r){r?this.mode|=Me:this.mode&=~Me}},isFolder:{get:function(){return Hr.isDir(this.mode)}},isDevice:{get:function(){return Hr.isChrdev(this.mode)}}}),Hr.FSNode=Pe,Hr.staticInit(),o["FS_createPath"]=Hr.createPath,o["FS_createDataFile"]=Hr.createDataFile,o["FS_createPreloadedFile"]=Hr.createPreloadedFile,o["FS_unlink"]=Hr.unlink,o["FS_createLazyFile"]=Hr.createLazyFile,o["FS_createDevice"]=Hr.createDevice,y&&(d(),Ur.staticInit()),jr={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Te,Ce={a:Ar,b:Rr,k:Yr,e:Gr,x:Xr,i:Kr,s:Vr,q:Qr,r:Jr,j:Zr,p:$r,t:re,o:ee,n:te,c:ne,y:oe,d:se,v:fe,w:de,z:me,f:he,u:pe,h:we,l:ye,g:_e,m:Oe},Ie=(Dr(),o["___wasm_call_ctors"]=function(){return(o["___wasm_call_ctors"]=o["asm"]["B"]).apply(null,arguments)},o["_main"]=function(){return(o["_main"]=o["asm"]["C"]).apply(null,arguments)},o["_malloc"]=function(){return(Ie=o["_malloc"]=o["asm"]["D"]).apply(null,arguments)}),Le=o["___errno_location"]=function(){return(Le=o["___errno_location"]=o["asm"]["E"]).apply(null,arguments)},Be=(o["_itk_wasm_input_array_alloc"]=function(){return(o["_itk_wasm_input_array_alloc"]=o["asm"]["F"]).apply(null,arguments)},o["_itk_wasm_input_json_alloc"]=function(){return(o["_itk_wasm_input_json_alloc"]=o["asm"]["G"]).apply(null,arguments)},o["_itk_wasm_output_json_address"]=function(){return(o["_itk_wasm_output_json_address"]=o["asm"]["H"]).apply(null,arguments)},o["_itk_wasm_output_json_size"]=function(){return(o["_itk_wasm_output_json_size"]=o["asm"]["I"]).apply(null,arguments)},o["_itk_wasm_output_array_address"]=function(){return(o["_itk_wasm_output_array_address"]=o["asm"]["J"]).apply(null,arguments)},o["_itk_wasm_output_array_size"]=function(){return(o["_itk_wasm_output_array_size"]=o["asm"]["K"]).apply(null,arguments)},o["_itk_wasm_free_all"]=function(){return(o["_itk_wasm_free_all"]=o["asm"]["L"]).apply(null,arguments)},o["stackSave"]=function(){return(Be=o["stackSave"]=o["asm"]["N"]).apply(null,arguments)}),ze=o["stackRestore"]=function(){return(ze=o["stackRestore"]=o["asm"]["O"]).apply(null,arguments)},xe=o["stackAlloc"]=function(){return(xe=o["stackAlloc"]=o["asm"]["P"]).apply(null,arguments)},je=o["___cxa_is_pointer_type"]=function(){return(je=o["___cxa_is_pointer_type"]=o["asm"]["Q"]).apply(null,arguments)};function Ue(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}o["ccall"]=R,o["cwrap"]=T,o["addRunDependency"]=hr,o["removeRunDependency"]=pr,o["FS_createPath"]=Hr.createPath,o["FS_createDataFile"]=Hr.createDataFile,o["FS_createPreloadedFile"]=Hr.createPreloadedFile,o["FS_createLazyFile"]=Hr.createLazyFile,o["FS_createDevice"]=Hr.createDevice,o["FS_unlink"]=Hr.unlink,o["callMain"]=He,o["AsciiToString"]=G,o["writeArrayToMemory"]=K,o["writeAsciiToMemory"]=V;function He(r){var e=o["_main"];r=r||[],r.unshift(p);var t=r.length,n=xe(4*(t+1)),i=n>>2;r.forEach((r=>{z[i++]=X(r)})),z[i]=0;try{var a=e(t,n);return Ye(a,!0),a}catch(s){return Pr(s)}finally{!0}}function We(r){function e(){Te||(Te=!0,o["calledRun"]=!0,P||(or(),ir(),t(o),o["onRuntimeInitialized"]&&o["onRuntimeInitialized"](),Ge&&He(r),ar()))}r=r||h,lr>0||(nr(),lr>0||(o["setStatus"]?(o["setStatus"]("Running..."),setTimeout((function(){setTimeout((function(){o["setStatus"]("")}),1),e()}),1)):e()))}function Ye(r,e){O=r,qe(r)}function qe(r){O=r,tr()||(o["onExit"]&&o["onExit"](r),P=!0),E(r,new Ue(r))}if(dr=function r(){Te||We(),Te||(dr=r)},o["run"]=We,o["preInit"]){"function"==typeof o["preInit"]&&(o["preInit"]=[o["preInit"]]);while(o["preInit"].length>0)o["preInit"].pop()()}var Ge=!1;return o["noInitialRun"]&&(Ge=!1),We(),o.mountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);if(!Hr.isDir(t)&&"/"!==t){for(var n="/",o=t.split(e.sep),i=1;i<o.length;i++)n+=o[i],Hr.analyzePath(n).exists||Hr.mkdir(n),n+="/";return Hr.mount(Ur,{root:t},n),n+e.basename(r)}}},o.unmountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);Hr.unmount(t)}},o.fs_mkdirs=function(r){for(var e="/",t=r.split("/"),n=1;n<t.length;++n)e+=t[n],Hr.analyzePath(e).exists||Hr.mkdir(e),e+="/"},o.fs_readFile=function(r,e){return Hr.readFile(r,e)},o.fs_writeFile=function(r,e,t){return Hr.writeFile(r,e,t)},o.fs_unlink=function(r){return Hr.unlink(r)},o.fs_open=function(r,e,t){return Hr.open(r,e,t)},o.fs_stat=function(r){return Hr.stat(r)},o.fs_read=function(r,e,t,n,o){return Hr.read(r,e,t,n,o)},o.fs_close=function(r){return Hr.close(r)},o.mountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);if(!Hr.isDir(t)&&"/"!==t){for(var n="/",o=t.split(e.sep),i=1;i<o.length;i++)n+=o[i],Hr.analyzePath(n).exists||Hr.mkdir(n),n+="/";return Hr.mount(Ur,{root:t},n),n+e.basename(r)}}},o.unmountContainingDir=function(r){if(y){var e=require("path"),t=e.dirname(r);Hr.unmount(t)}},o.fs_mkdirs=function(r){for(var e="/",t=r.split("/"),n=1;n<t.length;++n)e+=t[n],Hr.analyzePath(e).exists||Hr.mkdir(e),e+="/"},o.fs_readFile=function(r,e){return Hr.readFile(r,e)},o.fs_writeFile=function(r,e,t){return Hr.writeFile(r,e,t)},o.fs_unlink=function(r){return Hr.unlink(r)},o.fs_open=function(r,e,t){return Hr.open(r,e,t)},o.fs_stat=function(r){return Hr.stat(r)},o.fs_read=function(r,e,t,n,o){return Hr.read(r,e,t,n,o)},o.fs_close=function(r){return Hr.close(r)},e.ready}})();export default BMPImageIOWriteImage;
|