@kitware/vtk.js 19.2.13 → 19.3.0
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/Common/Core/Base64.js +1 -1
- package/Common/Core/CellArray.js +2 -3
- package/Common/Core/ClassHierarchy.js +1 -1
- package/Common/Core/DataArray/Constants.js +1 -2
- package/Common/Core/DataArray.js +3 -4
- package/Common/Core/Endian.js +1 -2
- package/Common/Core/ImageHelper.js +1 -1
- package/Common/Core/LookupTable.js +1 -2
- package/Common/Core/MatrixBuilder.js +1 -1
- package/Common/Core/Points.js +1 -2
- package/Common/Core/PriorityQueue.js +1 -2
- package/Common/Core/ProgressHandler.js +1 -2
- package/Common/Core/ScalarsToColors/Constants.js +1 -2
- package/Common/Core/ScalarsToColors.js +2 -3
- package/Common/Core/StringArray.js +1 -2
- package/Common/Core/URLExtract.js +1 -1
- package/Common/Core/VariantArray.js +1 -2
- package/Common/Core.js +1 -1
- package/Common/DataModel/BoundingBox.js +2 -3
- package/Common/DataModel/Box.js +2 -3
- package/Common/DataModel/CardinalSpline1D.js +1 -2
- package/Common/DataModel/Cell.js +1 -2
- package/Common/DataModel/CellLinks.js +26 -27
- package/Common/DataModel/CellTypes/Constants.js +1 -2
- package/Common/DataModel/CellTypes.js +2 -3
- package/Common/DataModel/Cone.js +1 -2
- package/Common/DataModel/Cylinder.js +2 -3
- package/Common/DataModel/DataSet/Constants.js +1 -2
- package/Common/DataModel/DataSet.js +2 -3
- package/Common/DataModel/DataSetAttributes/Constants.js +1 -2
- package/Common/DataModel/DataSetAttributes/FieldData.js +1 -2
- package/Common/DataModel/DataSetAttributes.js +2 -3
- package/Common/DataModel/ITKHelper.js +1 -1
- package/Common/DataModel/ImageData.js +1 -2
- package/Common/DataModel/ImplicitBoolean/Constants.js +1 -2
- package/Common/DataModel/ImplicitBoolean.js +2 -3
- package/Common/DataModel/KochanekSpline1D.js +1 -2
- package/Common/DataModel/Line/Constants.js +1 -2
- package/Common/DataModel/Line.js +2 -3
- package/Common/DataModel/Molecule.js +1 -2
- package/Common/DataModel/PiecewiseFunction.js +1 -2
- package/Common/DataModel/Plane.js +2 -3
- package/Common/DataModel/PointSet.js +1 -2
- package/Common/DataModel/PolyData/Constants.js +1 -2
- package/Common/DataModel/PolyData.js +1 -2
- package/Common/DataModel/Polygon.js +1 -2
- package/Common/DataModel/SelectionNode/Constants.js +1 -2
- package/Common/DataModel/SelectionNode.js +2 -3
- package/Common/DataModel/Sphere.js +2 -3
- package/Common/DataModel/Spline1D.js +1 -2
- package/Common/DataModel/Spline3D/Constants.js +1 -2
- package/Common/DataModel/Spline3D.js +1 -2
- package/Common/DataModel/StructuredData/Constants.js +1 -2
- package/Common/DataModel/StructuredData.js +2 -3
- package/Common/DataModel/Triangle.js +2 -3
- package/Common/DataModel.js +1 -1
- package/Common/System/MobileVR/headsets.js +1 -1
- package/Common/System/MobileVR.js +1 -1
- package/Common/System/TimerLog.js +1 -2
- package/Common/System.js +1 -1
- package/Common/Transform/LandmarkTransform/Constants.js +1 -2
- package/Common/Transform/LandmarkTransform.js +2 -3
- package/Common/Transform.js +1 -1
- package/Common/index.js +1 -1
- package/Filters/Core/Cutter.js +3 -4
- package/Filters/Core.js +1 -1
- package/Filters/Cornerstone/ImageDataToCornerstoneImage.js +1 -2
- package/Filters/Cornerstone.js +1 -1
- package/Filters/General/AppendPolyData.js +1 -2
- package/Filters/General/Calculator.js +2 -3
- package/Filters/General/ClosedPolyLineToSurfaceFilter.js +1 -2
- package/Filters/General/ImageCropFilter.js +1 -2
- package/Filters/General/ImageMarchingCubes/caseTable.js +1 -1
- package/Filters/General/ImageMarchingCubes.js +1 -2
- package/Filters/General/ImageMarchingSquares/caseTable.js +1 -1
- package/Filters/General/ImageMarchingSquares.js +1 -2
- package/Filters/General/ImageOutlineFilter.js +1 -2
- package/Filters/General/ImageSliceFilter.js +1 -2
- package/Filters/General/ImageStreamline.js +1 -2
- package/Filters/General/LineFilter.js +1 -2
- package/Filters/General/MoleculeToRepresentation.js +1 -2
- package/Filters/General/OutlineFilter.js +1 -2
- package/Filters/General/PaintFilter/PaintFilter.worker.js +3 -3
- package/Filters/General/PaintFilter.js +3 -4
- package/Filters/General/ScalarToRGBA.js +1 -2
- package/Filters/General/TriangleFilter.js +1 -2
- package/Filters/General/TubeFilter/Constants.js +1 -2
- package/Filters/General/TubeFilter.js +1 -2
- package/Filters/General/WarpScalar.js +1 -2
- package/Filters/General/WindowedSincPolyDataFilter.js +43 -44
- package/Filters/General.js +1 -1
- package/Filters/Sources/Arrow2DSource/Constants.js +1 -2
- package/Filters/Sources/Arrow2DSource.js +2 -3
- package/Filters/Sources/ArrowSource.js +1 -2
- package/Filters/Sources/CircleSource.js +2 -3
- package/Filters/Sources/ConcentricCylinderSource.js +1 -2
- package/Filters/Sources/ConeSource.js +1 -2
- package/Filters/Sources/CubeSource.js +1 -2
- package/Filters/Sources/Cursor3D.js +12 -13
- package/Filters/Sources/CylinderSource.js +1 -2
- package/Filters/Sources/ImageGridSource.js +1 -2
- package/Filters/Sources/LineSource.js +1 -2
- package/Filters/Sources/PlaneSource.js +1 -2
- package/Filters/Sources/PointSource.js +1 -2
- package/Filters/Sources/RTAnalyticSource.js +1 -2
- package/Filters/Sources/SLICSource.js +1 -2
- package/Filters/Sources/SphereSource.js +1 -2
- package/Filters/Sources/ViewFinderSource.js +1 -2
- package/Filters/Sources.js +1 -1
- package/Filters/Texture/TextureMapToPlane.js +1 -2
- package/Filters/Texture/TextureMapToSphere.js +1 -2
- package/Filters/Texture.js +1 -1
- package/Filters/index.js +1 -1
- package/IO/Core/BinaryHelper.js +1 -1
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +1 -1
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +1 -1
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +3 -3
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js +1 -1
- package/IO/Core/DataAccessHelper.js +1 -2
- package/IO/Core/HttpDataSetReader.js +1 -2
- package/IO/Core/HttpDataSetSeriesReader.js +1 -2
- package/IO/Core/HttpSceneLoader.js +2 -3
- package/IO/Core/ImageStream/DefaultProtocol.js +1 -1
- package/IO/Core/ImageStream/ViewStream.js +1 -2
- package/IO/Core/ImageStream.js +1 -2
- package/IO/Core/ResourceLoader.js +1 -2
- package/IO/Core/Serializer/ArraySerializer.js +1 -2
- package/IO/Core/Serializer/FieldDataSerializer.js +1 -1
- package/IO/Core/Serializer/ImageDataSerializer.js +1 -1
- package/IO/Core/Serializer/PolyDataSerializer.js +1 -1
- package/IO/Core/Serializer.js +1 -1
- package/IO/Core/WSLinkClient.js +1 -2
- package/IO/Core/ZipMultiDataSetReader.js +3 -4
- package/IO/Core/ZipMultiDataSetWriter.js +3 -4
- package/IO/Core.js +1 -1
- package/IO/Geometry/DracoReader.js +1 -2
- package/IO/Geometry/PLYReader.js +1 -2
- package/IO/Geometry/STLReader.js +1 -2
- package/IO/Geometry/STLWriter/Constants.js +1 -2
- package/IO/Geometry/STLWriter.js +2 -3
- package/IO/Geometry.js +1 -1
- package/IO/Legacy/LegacyAsciiParser.js +1 -1
- package/IO/Legacy/PolyDataReader.js +1 -2
- package/IO/Legacy.js +1 -1
- package/IO/Misc/ElevationReader.js +1 -2
- package/IO/Misc/HttpDataSetLODsLoader.js +1 -2
- package/IO/Misc/ITKImageReader.js +1 -2
- package/IO/Misc/ITKPolyDataReader.js +1 -2
- package/IO/Misc/JSONNucleoReader.js +1 -2
- package/IO/Misc/JSONReader.js +1 -2
- package/IO/Misc/MTLReader.js +2 -3
- package/IO/Misc/OBJReader.js +1 -2
- package/IO/Misc/PDBReader.js +1 -2
- package/IO/Misc/SkyboxReader.js +3 -4
- package/IO/Misc.js +1 -1
- package/IO/XML/XMLImageDataReader.js +1 -2
- package/IO/XML/XMLImageDataWriter.js +2 -3
- package/IO/XML/XMLPolyDataReader.js +1 -2
- package/IO/XML/XMLPolyDataWriter.js +2 -3
- package/IO/XML/XMLReader.js +1 -2
- package/IO/XML/XMLWriter/Constants.js +1 -2
- package/IO/XML/XMLWriter.js +4 -4
- package/IO/XML.js +1 -1
- package/IO/index.js +1 -1
- package/Imaging/Core/AbstractImageInterpolator/Constants.js +1 -2
- package/Imaging/Core/AbstractImageInterpolator/InterpolationInfo.js +2 -3
- package/Imaging/Core/AbstractImageInterpolator.js +2 -3
- package/Imaging/Core/ImageInterpolator.js +2 -3
- package/Imaging/Core/ImagePointDataIterator.js +1 -2
- package/Imaging/Core/ImageReslice/Constants.js +1 -2
- package/Imaging/Core/ImageReslice.js +2 -3
- package/Imaging/Core.js +1 -1
- package/Imaging/Hybrid/SampleFunction.js +2 -3
- package/Imaging/Hybrid.js +1 -1
- package/Imaging/index.js +1 -1
- package/Interaction/Animations/TimeStepBasedAnimationHandler.js +2 -3
- package/Interaction/Manipulators/CompositeCameraManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeGestureManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeKeyboardManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeMouseManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeVRManipulator.js +1 -2
- package/Interaction/Manipulators/GestureCameraManipulator.js +1 -2
- package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -2
- package/Interaction/Manipulators/MouseBoxSelectorManipulator.js +3 -4
- package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraSliceManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseRangeManipulator.js +1 -2
- package/Interaction/Manipulators/VRButtonPanManipulator.js +1 -2
- package/Interaction/Manipulators.js +1 -1
- package/Interaction/Misc/DeviceOrientationToCamera.js +1 -1
- package/Interaction/Misc.js +1 -1
- package/Interaction/Style/InteractorStyleImage.js +1 -2
- package/Interaction/Style/InteractorStyleMPRSlice.js +1 -2
- package/Interaction/Style/InteractorStyleManipulator/Presets.js +1 -1
- package/Interaction/Style/InteractorStyleManipulator.js +2 -3
- package/Interaction/Style/InteractorStyleRemoteMouse.js +2 -3
- package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -2
- package/Interaction/Style/InteractorStyleUnicam.js +1 -2
- package/Interaction/Style.js +1 -1
- package/Interaction/UI/CornerAnnotation.js +1 -2
- package/Interaction/UI/FPSMonitor.js +2 -3
- package/Interaction/UI/Icons.js +1 -1
- package/Interaction/UI/Slider/Constants.js +1 -2
- package/Interaction/UI/Slider.js +2 -3
- package/Interaction/UI/VolumeController.js +1 -2
- package/Interaction/UI.js +1 -1
- package/Interaction/Widgets/AbstractWidget.js +2 -3
- package/Interaction/Widgets/DistanceRepresentation.js +2 -3
- package/Interaction/Widgets/DistanceWidget.js +2 -3
- package/Interaction/Widgets/HandleRepresentation/Constants.js +1 -2
- package/Interaction/Widgets/HandleRepresentation.js +2 -3
- package/Interaction/Widgets/HandleWidget/Constants.js +1 -2
- package/Interaction/Widgets/HandleWidget.js +2 -3
- package/Interaction/Widgets/ImageCroppingRegionsRepresentation.js +1 -2
- package/Interaction/Widgets/ImageCroppingRegionsWidget/Constants.js +1 -1
- package/Interaction/Widgets/ImageCroppingRegionsWidget.js +2 -3
- package/Interaction/Widgets/LabelRepresentation/Constants.js +1 -2
- package/Interaction/Widgets/LabelRepresentation.js +3 -4
- package/Interaction/Widgets/LabelWidget.js +2 -3
- package/Interaction/Widgets/LineRepresentation/Constants.js +1 -2
- package/Interaction/Widgets/LineRepresentation.js +2 -3
- package/Interaction/Widgets/LineWidget/Constants.js +1 -2
- package/Interaction/Widgets/LineWidget.js +2 -3
- package/Interaction/Widgets/OrientationMarkerWidget/Constants.js +1 -1
- package/Interaction/Widgets/OrientationMarkerWidget.js +2 -3
- package/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +3 -3
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +15 -16
- package/Interaction/Widgets/PointPlacer.js +1 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursor/Constants.js +1 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +2 -3
- package/Interaction/Widgets/ResliceCursor/ResliceCursorActor/Constants.js +1 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursorActor.js +2 -3
- package/Interaction/Widgets/ResliceCursor/ResliceCursorLineRepresentation.js +1 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursorPolyDataAlgorithm.js +2 -3
- package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +1 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget/Constants.js +1 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget.js +2 -3
- package/Interaction/Widgets/SphereHandleRepresentation.js +2 -3
- package/Interaction/Widgets/WidgetRepresentation.js +1 -2
- package/Interaction/Widgets.js +1 -1
- package/Interaction/index.js +1 -1
- package/Proxy/Animation/AbstractAnimationProxy.js +1 -2
- package/Proxy/Animation/AnimationProxyManager.js +1 -2
- package/Proxy/Animation/TimeStepBasedAnimationHandlerProxy.js +1 -2
- package/Proxy/Core/AbstractRepresentationProxy.js +1 -1
- package/Proxy/Core/LookupTableProxy/Constants.js +1 -1
- package/Proxy/Core/LookupTableProxy.js +1 -2
- package/Proxy/Core/PiecewiseFunctionProxy/Constants.js +1 -1
- package/Proxy/Core/PiecewiseFunctionProxy.js +2 -3
- package/Proxy/Core/ProxyManager/core.js +2 -2
- package/Proxy/Core/ProxyManager/properties.js +2 -2
- package/Proxy/Core/ProxyManager/state.js +2 -2
- package/Proxy/Core/ProxyManager/view.js +1 -1
- package/Proxy/Core/ProxyManager.js +1 -2
- package/Proxy/Core/SourceProxy.js +1 -2
- package/Proxy/Core/View2DProxy.js +1 -2
- package/Proxy/Core/ViewProxy.js +4 -4
- package/Proxy/Core.js +1 -1
- package/Proxy/Representations/GeometryRepresentationProxy.js +1 -2
- package/Proxy/Representations/GlyphRepresentationProxy.js +1 -2
- package/Proxy/Representations/MoleculeRepresentationProxy.js +1 -2
- package/Proxy/Representations/SkyboxRepresentationProxy.js +1 -2
- package/Proxy/Representations/SliceRepresentationProxy.js +2 -3
- package/Proxy/Representations/SlicedGeometryRepresentationProxy.js +1 -2
- package/Proxy/Representations/VolumeRepresentationProxy.js +1 -2
- package/Proxy/Representations.js +1 -1
- package/Proxy/index.js +1 -1
- package/Rendering/Core/AbstractMapper.js +1 -2
- package/Rendering/Core/AbstractMapper3D.js +1 -2
- package/Rendering/Core/AbstractPicker.js +1 -2
- package/Rendering/Core/Actor.js +2 -3
- package/Rendering/Core/Actor2D.js +1 -2
- package/Rendering/Core/AnnotatedCubeActor/Presets.js +1 -1
- package/Rendering/Core/AnnotatedCubeActor.js +2 -3
- package/Rendering/Core/AxesActor.js +2 -3
- package/Rendering/Core/Camera.js +1 -2
- package/Rendering/Core/CellPicker.js +2 -3
- package/Rendering/Core/ColorTransferFunction/ColorMaps.js +1 -1
- package/Rendering/Core/ColorTransferFunction/ColorMapsLite.js +1 -1
- package/Rendering/Core/ColorTransferFunction/Constants.js +1 -2
- package/Rendering/Core/ColorTransferFunction.js +2 -3
- package/Rendering/Core/Coordinate/Constants.js +1 -2
- package/Rendering/Core/Coordinate.js +2 -3
- package/Rendering/Core/CubeAxesActor.js +2 -3
- package/Rendering/Core/Follower.js +2 -3
- package/Rendering/Core/Glyph3DMapper/Constants.js +1 -2
- package/Rendering/Core/Glyph3DMapper.js +2 -3
- package/Rendering/Core/HardwareSelector.js +1 -2
- package/Rendering/Core/ImageMapper/Constants.js +1 -2
- package/Rendering/Core/ImageMapper.js +2 -3
- package/Rendering/Core/ImageProperty/Constants.js +1 -2
- package/Rendering/Core/ImageProperty.js +1 -2
- package/Rendering/Core/ImageSlice.js +1 -2
- package/Rendering/Core/InteractorObserver.js +2 -3
- package/Rendering/Core/InteractorStyle/Constants.js +1 -2
- package/Rendering/Core/InteractorStyle.js +2 -3
- package/Rendering/Core/Light.js +1 -2
- package/Rendering/Core/Mapper/CoincidentTopologyHelper.js +1 -2
- package/Rendering/Core/Mapper/Constants.js +1 -2
- package/Rendering/Core/Mapper/Static.js +1 -2
- package/Rendering/Core/Mapper.js +2 -3
- package/Rendering/Core/Picker.js +2 -3
- package/Rendering/Core/PixelSpaceCallbackMapper.js +1 -2
- package/Rendering/Core/PointPicker.js +1 -9
- package/Rendering/Core/Prop.js +1 -2
- package/Rendering/Core/Prop3D.js +1 -2
- package/Rendering/Core/Property/Constants.js +1 -2
- package/Rendering/Core/Property.js +2 -3
- package/Rendering/Core/Property2D.js +1 -2
- package/Rendering/Core/RenderWindow.js +1 -2
- package/Rendering/Core/RenderWindowInteractor/Constants.js +1 -2
- package/Rendering/Core/RenderWindowInteractor.js +2 -3
- package/Rendering/Core/Renderer.js +2 -3
- package/Rendering/Core/ScalarBarActor.js +2 -3
- package/Rendering/Core/Skybox.js +1 -2
- package/Rendering/Core/SphereMapper.js +1 -2
- package/Rendering/Core/StickMapper.js +1 -2
- package/Rendering/Core/SurfaceLICInterface/Constants.js +1 -2
- package/Rendering/Core/SurfaceLICInterface.js +1 -2
- package/Rendering/Core/SurfaceLICMapper.js +1 -2
- package/Rendering/Core/Texture.js +1 -2
- package/Rendering/Core/Viewport.js +1 -2
- package/Rendering/Core/Volume.js +1 -2
- package/Rendering/Core/VolumeMapper/Constants.js +1 -2
- package/Rendering/Core/VolumeMapper.js +1 -2
- package/Rendering/Core/VolumeProperty/Constants.js +1 -2
- package/Rendering/Core/VolumeProperty.js +2 -3
- package/Rendering/Core.js +2 -2
- package/Rendering/Misc/CanvasView.js +1 -2
- package/Rendering/Misc/FullScreenRenderWindow.js +1 -2
- package/Rendering/Misc/GenericRenderWindow.js +1 -2
- package/Rendering/Misc/RemoteView.js +1 -2
- package/Rendering/Misc/RenderWindowWithControlBar.js +2 -3
- package/Rendering/Misc/SynchronizableRenderWindow/vtkObjectManager.js +2 -2
- package/Rendering/Misc/SynchronizableRenderWindow.js +3 -4
- package/Rendering/Misc/TextureLODsDownloader.js +1 -2
- package/Rendering/Misc.js +1 -1
- package/Rendering/OpenGL/Actor.js +2 -3
- package/Rendering/OpenGL/Actor2D.js +2 -3
- package/Rendering/OpenGL/BufferObject/Constants.js +1 -2
- package/Rendering/OpenGL/BufferObject.js +2 -3
- package/Rendering/OpenGL/Camera.js +2 -3
- package/Rendering/OpenGL/CellArrayBufferObject.js +2 -4
- package/Rendering/OpenGL/Convolution2DPass.js +1 -2
- package/Rendering/OpenGL/ForwardPass.js +1 -2
- package/Rendering/OpenGL/Framebuffer.js +2 -3
- package/Rendering/OpenGL/Glyph3DMapper.js +3 -4
- package/Rendering/OpenGL/HardwareSelector/Constants.js +1 -2
- package/Rendering/OpenGL/HardwareSelector.js +2 -3
- package/Rendering/OpenGL/Helper.js +1 -2
- package/Rendering/OpenGL/ImageMapper.js +2 -3
- package/Rendering/OpenGL/ImageSlice.js +2 -3
- package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +1 -2
- package/Rendering/OpenGL/PolyDataMapper.js +2 -3
- package/Rendering/OpenGL/RadialDistortionPass.js +1 -2
- package/Rendering/OpenGL/RenderWindow.js +1 -2
- package/Rendering/OpenGL/Renderer.js +2 -3
- package/Rendering/OpenGL/ReplacementShaderMapper.js +1 -1
- package/Rendering/OpenGL/Shader.js +1 -2
- package/Rendering/OpenGL/ShaderCache.js +1 -2
- package/Rendering/OpenGL/ShaderProgram.js +1 -1
- package/Rendering/OpenGL/Skybox.js +2 -3
- package/Rendering/OpenGL/SphereMapper.js +2 -3
- package/Rendering/OpenGL/StickMapper.js +2 -3
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D/pingpong.js +1 -2
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D.js +1 -2
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICInterface.js +1 -2
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICMapper.js +3 -4
- package/Rendering/OpenGL/SurfaceLIC.js +1 -1
- package/Rendering/OpenGL/Texture/Constants.js +1 -2
- package/Rendering/OpenGL/Texture.js +3 -4
- package/Rendering/OpenGL/TextureUnitManager.js +1 -2
- package/Rendering/OpenGL/VertexArrayObject.js +1 -2
- package/Rendering/OpenGL/ViewNodeFactory.js +1 -2
- package/Rendering/OpenGL/Volume.js +2 -3
- package/Rendering/OpenGL/VolumeMapper.js +3 -4
- package/Rendering/OpenGL.js +1 -1
- package/Rendering/SceneGraph/RenderPass.js +1 -2
- package/Rendering/SceneGraph/RenderWindowViewNode.js +1 -2
- package/Rendering/SceneGraph/ViewNode.js +1 -1
- package/Rendering/SceneGraph/ViewNodeFactory.js +1 -2
- package/Rendering/SceneGraph.js +1 -1
- package/Rendering/WebGPU/Actor.js +1 -2
- package/Rendering/WebGPU/BindGroup.js +1 -2
- package/Rendering/WebGPU/Buffer.js +2 -3
- package/Rendering/WebGPU/BufferManager/Constants.js +1 -2
- package/Rendering/WebGPU/BufferManager.js +3 -4
- package/Rendering/WebGPU/Camera.js +1 -2
- package/Rendering/WebGPU/Device.js +2 -3
- package/Rendering/WebGPU/ForwardPass.js +1 -2
- package/Rendering/WebGPU/FullScreenQuad.js +1 -2
- package/Rendering/WebGPU/Glyph3DMapper.js +3 -4
- package/Rendering/WebGPU/HardwareSelectionPass.js +1 -2
- package/Rendering/WebGPU/HardwareSelector.js +1 -2
- package/Rendering/WebGPU/MapperHelper.js +1 -2
- package/Rendering/WebGPU/OpaquePass.js +2 -4
- package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -2
- package/Rendering/WebGPU/Pipeline.js +2 -3
- package/Rendering/WebGPU/PixelSpaceCallbackMapper.js +1 -2
- package/Rendering/WebGPU/PolyDataMapper.js +3 -4
- package/Rendering/WebGPU/RenderEncoder.js +2 -3
- package/Rendering/WebGPU/RenderWindow.js +11 -3
- package/Rendering/WebGPU/Renderer.js +2 -3
- package/Rendering/WebGPU/Sampler.js +1 -2
- package/Rendering/WebGPU/ShaderCache.js +1 -2
- package/Rendering/WebGPU/ShaderDescription.js +1 -2
- package/Rendering/WebGPU/ShaderModule.js +1 -1
- package/Rendering/WebGPU/SphereMapper.js +1 -2
- package/Rendering/WebGPU/StickMapper.js +1 -2
- package/Rendering/WebGPU/StorageBuffer.js +1 -2
- package/Rendering/WebGPU/Texture.js +2 -3
- package/Rendering/WebGPU/TextureManager.js +24 -7
- package/Rendering/WebGPU/TextureView.js +19 -4
- package/Rendering/WebGPU/Types.js +83 -42
- package/Rendering/WebGPU/UniformBuffer.js +1 -2
- package/Rendering/WebGPU/VertexInput.js +2 -3
- package/Rendering/WebGPU/ViewNodeFactory.js +1 -2
- package/Rendering/WebGPU/Volume.js +1 -2
- package/Rendering/WebGPU/VolumePass.js +2 -3
- package/Rendering/WebGPU/VolumePassFSQ.js +4 -4
- package/Rendering/WebGPU.js +1 -1
- package/Rendering/index.js +1 -1
- package/ThirdParty/index.js +2 -2
- package/Utilities/DataGenerator/convert-cli.js +10 -8
- package/Utilities/ExampleRunner/example-runner-cli.js +2 -1
- package/Utilities/ExampleRunner/template-config.js +8 -6
- package/Utilities/TestResults/TESTS-Chrome_Headless_93.0.4577.63_(Linux_x86_64).xml +1058 -1058
- package/Utilities/XMLConverter/xml2json-cli.js +5 -4
- package/Widgets/Core/AbstractWidget/Constants.js +1 -2
- package/Widgets/Core/AbstractWidget.js +1 -2
- package/Widgets/Core/AbstractWidgetFactory.js +2 -3
- package/Widgets/Core/StateBuilder/boundsMixin.js +1 -2
- package/Widgets/Core/StateBuilder/colorMixin.js +1 -2
- package/Widgets/Core/StateBuilder/cornerMixin.js +1 -2
- package/Widgets/Core/StateBuilder/directionMixin.js +1 -2
- package/Widgets/Core/StateBuilder/manipulatorMixin.js +1 -2
- package/Widgets/Core/StateBuilder/nameMixin.js +1 -2
- package/Widgets/Core/StateBuilder/orientationMixin.js +1 -2
- package/Widgets/Core/StateBuilder/originMixin.js +1 -2
- package/Widgets/Core/StateBuilder/scale1Mixin.js +1 -2
- package/Widgets/Core/StateBuilder/scale3Mixin.js +1 -2
- package/Widgets/Core/StateBuilder/shapeMixin.js +1 -2
- package/Widgets/Core/StateBuilder/textMixin.js +1 -2
- package/Widgets/Core/StateBuilder/visibleMixin.js +1 -2
- package/Widgets/Core/StateBuilder.js +1 -2
- package/Widgets/Core/WidgetManager/Constants.js +1 -2
- package/Widgets/Core/WidgetManager.js +1 -2
- package/Widgets/Core/WidgetState.js +1 -2
- package/Widgets/Core.js +1 -1
- package/Widgets/Manipulators/LineManipulator.js +1 -2
- package/Widgets/Manipulators/PlaneManipulator.js +1 -2
- package/Widgets/Manipulators/TrackballManipulator.js +1 -2
- package/Widgets/Manipulators.js +1 -1
- package/Widgets/Representations/ArrowHandleRepresentation.js +2 -3
- package/Widgets/Representations/CircleContextRepresentation.js +1 -2
- package/Widgets/Representations/ContextRepresentation.js +2 -3
- package/Widgets/Representations/ConvexFaceContextRepresentation.js +1 -2
- package/Widgets/Representations/CroppingOutlineRepresentation.js +1 -2
- package/Widgets/Representations/CubeHandleRepresentation.js +1 -2
- package/Widgets/Representations/HandleRepresentation.js +2 -3
- package/Widgets/Representations/ImplicitPlaneRepresentation.js +1 -2
- package/Widgets/Representations/OutlineContextRepresentation.js +1 -2
- package/Widgets/Representations/PolyLineRepresentation.js +2 -3
- package/Widgets/Representations/RectangleContextRepresentation.js +1 -2
- package/Widgets/Representations/ResliceCursorContextRepresentation.js +2 -3
- package/Widgets/Representations/SphereHandleRepresentation.js +1 -2
- package/Widgets/Representations/SplineContextRepresentation.js +1 -2
- package/Widgets/Representations/WidgetRepresentation/Constants.js +1 -2
- package/Widgets/Representations/WidgetRepresentation.js +1 -2
- package/Widgets/Representations.js +1 -1
- package/Widgets/SVG/SVGLandmarkRepresentation.js +2 -3
- package/Widgets/SVG/SVGRepresentation.js +3 -2
- package/Widgets/Widgets3D/AngleWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/AngleWidget/state.js +1 -1
- package/Widgets/Widgets3D/AngleWidget.js +1 -2
- package/Widgets/Widgets3D/DistanceWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/DistanceWidget/state.js +1 -1
- package/Widgets/Widgets3D/DistanceWidget.js +1 -2
- package/Widgets/Widgets3D/EllipseWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/EllipseWidget/state.js +1 -1
- package/Widgets/Widgets3D/EllipseWidget.js +2 -3
- package/Widgets/Widgets3D/ImageCroppingWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/ImageCroppingWidget/state.js +1 -1
- package/Widgets/Widgets3D/ImageCroppingWidget.js +1 -2
- package/Widgets/Widgets3D/ImplicitPlaneWidget.js +1 -2
- package/Widgets/Widgets3D/InteractiveOrientationWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/InteractiveOrientationWidget/state.js +1 -2
- package/Widgets/Widgets3D/InteractiveOrientationWidget.js +1 -2
- package/Widgets/Widgets3D/LineWidget/Constants.js +1 -2
- package/Widgets/Widgets3D/LineWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/LineWidget/state.js +1 -1
- package/Widgets/Widgets3D/LineWidget.js +1 -2
- package/Widgets/Widgets3D/PaintWidget.js +1 -2
- package/Widgets/Widgets3D/PolyLineWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/PolyLineWidget/state.js +1 -1
- package/Widgets/Widgets3D/PolyLineWidget.js +1 -2
- package/Widgets/Widgets3D/RectangleWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/RectangleWidget/state.js +1 -1
- package/Widgets/Widgets3D/RectangleWidget.js +2 -3
- package/Widgets/Widgets3D/ResliceCursorWidget/Constants.js +1 -2
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/state.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -2
- package/Widgets/Widgets3D/ShapeWidget/Constants.js +1 -2
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/ShapeWidget.js +1 -2
- package/Widgets/Widgets3D/SplineWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/SplineWidget/state.js +1 -1
- package/Widgets/Widgets3D/SplineWidget.js +1 -2
- package/Widgets/Widgets3D.js +1 -1
- package/Widgets/index.js +1 -1
- package/_vendor/base64-js/index.js_commonjs-exports +1 -0
- package/_vendor/blueimp-md5/js/md5.js_commonjs-module +3 -0
- package/_vendor/define-properties/index.js_commonjs-proxy +1 -1
- package/_vendor/globalthis/implementation.browser.js_commonjs-module +3 -0
- package/_vendor/globalthis/implementation.browser.js_commonjs-proxy +1 -1
- package/_vendor/globalthis/polyfill.js_commonjs-proxy +1 -1
- package/_vendor/globalthis/shim.js_commonjs-proxy +2 -1
- package/_vendor/jszip/dist/jszip.min.js_commonjs-module +3 -0
- package/_vendor/object-keys/implementation.js_commonjs-proxy +1 -1
- package/_vendor/object-keys/index.js_commonjs-proxy +1 -1
- package/_vendor/object-keys/isArguments.js_commonjs-proxy +1 -1
- package/_vendor/seedrandom/lib/alea.js_commonjs-module +3 -0
- package/_vendor/seedrandom/lib/alea.js_commonjs-proxy +1 -1
- package/_vendor/seedrandom/lib/tychei.js_commonjs-module +3 -0
- package/_vendor/seedrandom/lib/tychei.js_commonjs-proxy +1 -1
- package/_vendor/seedrandom/lib/xor128.js_commonjs-module +3 -0
- package/_vendor/seedrandom/lib/xor128.js_commonjs-proxy +1 -1
- package/_vendor/seedrandom/lib/xor4096.js_commonjs-module +3 -0
- package/_vendor/seedrandom/lib/xor4096.js_commonjs-proxy +1 -1
- package/_vendor/seedrandom/lib/xorshift7.js_commonjs-module +3 -0
- package/_vendor/seedrandom/lib/xorshift7.js_commonjs-proxy +1 -1
- package/_vendor/seedrandom/lib/xorwow.js_commonjs-module +3 -0
- package/_vendor/seedrandom/lib/xorwow.js_commonjs-proxy +1 -1
- package/_vendor/seedrandom/seedrandom.js_commonjs-module +3 -0
- package/_vendor/seedrandom/seedrandom.js_commonjs-proxy +1 -1
- package/_vendor/webworker-promise/lib/register.js_commonjs-module +3 -0
- package/_vendor/webworker-promise/lib/tiny-emitter.js_commonjs-proxy +1 -1
- package/_vendor/webworker-promise/src/tiny-emitter.js_commonjs-proxy +1 -0
- package/_vendor/xmlbuilder2/lib/xmlbuilder2.min.js_commonjs-module +3 -0
- package/_virtual/commonjsHelpers.js +3 -4
- package/_virtual/{polyfill-node_buffer.js → polyfill-node.buffer.js} +1 -1
- package/_virtual/{polyfill-node_global.js → polyfill-node.global.js} +0 -0
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +1 -1
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +1 -1
- package/macros.js +4 -5
- package/package.json +54 -55
- package/vendor/base64-js/index.js +1 -87
- package/vendor/blueimp-md5/js/md5.js +6 -3
- package/vendor/d3-array/src/ascending.js +1 -1
- package/vendor/d3-array/src/bisect.js +2 -1
- package/vendor/d3-array/src/bisector.js +21 -23
- package/vendor/d3-array/src/mode.js +1 -0
- package/vendor/d3-scale/src/continuous.js +2 -2
- package/vendor/d3-time/src/ticks.js +1 -0
- package/vendor/define-properties/index.js +2 -1
- package/vendor/globalthis/implementation.browser.js +4 -9
- package/vendor/globalthis/index.js +13 -6
- package/vendor/globalthis/polyfill.js +6 -3
- package/vendor/globalthis/shim.js +12 -9
- package/vendor/jszip/dist/jszip.min.js +11 -0
- package/vendor/object-keys/index.js +2 -2
- package/vendor/pako/dist/pako.esm.mjs +397 -388
- package/vendor/seedrandom/index.js +28 -21
- package/vendor/seedrandom/lib/alea.js +4 -5
- package/vendor/seedrandom/lib/tychei.js +4 -5
- package/vendor/seedrandom/lib/xor128.js +4 -5
- package/vendor/seedrandom/lib/xor4096.js +4 -5
- package/vendor/seedrandom/lib/xorshift7.js +4 -5
- package/vendor/seedrandom/lib/xorwow.js +4 -5
- package/vendor/seedrandom/seedrandom.js +4 -5
- package/vendor/webworker-promise/lib/register.js +14 -8
- package/vendor/webworker-promise/src/index.js +110 -0
- package/vendor/webworker-promise/src/tiny-emitter.js +51 -0
- package/vendor/xmlbuilder2/lib/xmlbuilder2.min.js +6 -7
- package/vtk.js +2 -3
- package/_vendor/base64-js/index.js_commonjs-proxy +0 -1
- package/_vendor/buffer/index.js_commonjs-proxy +0 -1
- package/_vendor/ieee754/index.js_commonjs-proxy +0 -1
- package/_vendor/immediate/lib/browser.js_commonjs-proxy +0 -1
- package/_vendor/inherits/inherits_browser.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/base64.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/compressedObject.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/compressions.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/crc32.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/defaults.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/external.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/flate.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/generate/ZipFileWorker.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/generate/index.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/load.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/nodejs/NodejsStreamInputAdapter.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/nodejs/NodejsStreamOutputAdapter.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/nodejsUtils.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/object.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/readable-stream-browser.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/reader/ArrayReader.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/reader/DataReader.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/reader/NodeBufferReader.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/reader/StringReader.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/reader/Uint8ArrayReader.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/reader/readerFor.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/signature.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/stream/ConvertWorker.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/stream/Crc32Probe.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/stream/DataLengthProbe.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/stream/DataWorker.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/stream/GenericWorker.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/stream/StreamHelper.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/support.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/utf8.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/utils.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/zipEntries.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/zipEntry.js_commonjs-proxy +0 -1
- package/_vendor/jszip/lib/zipObject.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/index.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/deflate.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/inflate.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/utils/common.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/utils/strings.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/adler32.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/constants.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/crc32.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/deflate.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/gzheader.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/inffast.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/inflate.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/inftrees.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/messages.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/trees.js_commonjs-proxy +0 -1
- package/_vendor/jszip/node_modules/pako/lib/zlib/zstream.js_commonjs-proxy +0 -1
- package/_vendor/lie/lib/browser.js_commonjs-proxy +0 -1
- package/_vendor/safe-buffer/index.js_commonjs-proxy +0 -1
- package/_vendor/set-immediate-shim/index.js_commonjs-proxy +0 -1
- package/_vendor/util/support/isBufferBrowser.js_commonjs-proxy +0 -1
- package/_virtual/_polyfill-node_stream.js_commonjs-proxy.js +0 -6
- package/_virtual/polyfill-node__buffer_list.js +0 -59
- package/_virtual/polyfill-node__stream_duplex.js +0 -44
- package/_virtual/polyfill-node__stream_passthrough.js +0 -15
- package/_virtual/polyfill-node__stream_readable.js +0 -896
- package/_virtual/polyfill-node__stream_transform.js +0 -132
- package/_virtual/polyfill-node__stream_writable.js +0 -480
- package/_virtual/polyfill-node_process.js +0 -225
- package/_virtual/polyfill-node_stream.js +0 -120
- package/vendor/buffer/index.js +0 -2112
- package/vendor/events/events.js +0 -457
- package/vendor/ieee754/index.js +0 -92
- package/vendor/immediate/lib/browser.js +0 -72
- package/vendor/inherits/inherits_browser.js +0 -29
- package/vendor/jszip/lib/base64.js +0 -113
- package/vendor/jszip/lib/compressedObject.js +0 -74
- package/vendor/jszip/lib/compressions.js +0 -20
- package/vendor/jszip/lib/crc32.js +0 -77
- package/vendor/jszip/lib/defaults.js +0 -25
- package/vendor/jszip/lib/external.js +0 -22
- package/vendor/jszip/lib/flate.js +0 -96
- package/vendor/jszip/lib/generate/ZipFileWorker.js +0 -540
- package/vendor/jszip/lib/generate/index.js +0 -61
- package/vendor/jszip/lib/index.js +0 -58
- package/vendor/jszip/lib/load.js +0 -82
- package/vendor/jszip/lib/nodejs/NodejsStreamInputAdapter.js +0 -74
- package/vendor/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +0 -45
- package/vendor/jszip/lib/nodejsUtils.js +0 -59
- package/vendor/jszip/lib/object.js +0 -389
- package/vendor/jszip/lib/readable-stream-browser.js +0 -14
- package/vendor/jszip/lib/reader/ArrayReader.js +0 -58
- package/vendor/jszip/lib/reader/DataReader.js +0 -117
- package/vendor/jszip/lib/reader/NodeBufferReader.js +0 -20
- package/vendor/jszip/lib/reader/StringReader.js +0 -39
- package/vendor/jszip/lib/reader/Uint8ArrayReader.js +0 -23
- package/vendor/jszip/lib/reader/readerFor.js +0 -28
- package/vendor/jszip/lib/signature.js +0 -17
- package/vendor/jszip/lib/stream/ConvertWorker.js +0 -26
- package/vendor/jszip/lib/stream/Crc32Probe.js +0 -24
- package/vendor/jszip/lib/stream/DataLengthProbe.js +0 -28
- package/vendor/jszip/lib/stream/DataWorker.js +0 -116
- package/vendor/jszip/lib/stream/GenericWorker.js +0 -263
- package/vendor/jszip/lib/stream/StreamHelper.js +0 -214
- package/vendor/jszip/lib/support.js +0 -45
- package/vendor/jszip/lib/utf8.js +0 -284
- package/vendor/jszip/lib/utils.js +0 -486
- package/vendor/jszip/lib/zipEntries.js +0 -257
- package/vendor/jszip/lib/zipEntry.js +0 -293
- package/vendor/jszip/lib/zipObject.js +0 -133
- package/vendor/jszip/node_modules/pako/index.js +0 -18
- package/vendor/jszip/node_modules/pako/lib/deflate.js +0 -406
- package/vendor/jszip/node_modules/pako/lib/inflate.js +0 -429
- package/vendor/jszip/node_modules/pako/lib/utils/common.js +0 -110
- package/vendor/jszip/node_modules/pako/lib/utils/strings.js +0 -192
- package/vendor/jszip/node_modules/pako/lib/zlib/adler32.js +0 -51
- package/vendor/jszip/node_modules/pako/lib/zlib/constants.js +0 -68
- package/vendor/jszip/node_modules/pako/lib/zlib/crc32.js +0 -59
- package/vendor/jszip/node_modules/pako/lib/zlib/deflate.js +0 -1892
- package/vendor/jszip/node_modules/pako/lib/zlib/gzheader.js +0 -58
- package/vendor/jszip/node_modules/pako/lib/zlib/inffast.js +0 -345
- package/vendor/jszip/node_modules/pako/lib/zlib/inflate.js +0 -1572
- package/vendor/jszip/node_modules/pako/lib/zlib/inftrees.js +0 -345
- package/vendor/jszip/node_modules/pako/lib/zlib/messages.js +0 -32
- package/vendor/jszip/node_modules/pako/lib/zlib/trees.js +0 -1232
- package/vendor/jszip/node_modules/pako/lib/zlib/zstream.js +0 -47
- package/vendor/lie/lib/browser.js +0 -274
- package/vendor/process/browser.js +0 -190
- package/vendor/safe-buffer/index.js +0 -69
- package/vendor/set-immediate-shim/index.js +0 -8
- package/vendor/string_decoder/lib/string_decoder.js +0 -276
- package/vendor/util/support/isBufferBrowser.js +0 -8
- package/vendor/util/util.js +0 -706
- package/vendor/webworker-promise/lib/index.js +0 -172
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { D as Duplex } from './polyfill-node__stream_duplex.js';
|
|
2
|
-
import { u as util } from '../vendor/util/util.js';
|
|
3
|
-
|
|
4
|
-
// a transform stream is a readable/writable stream where you do
|
|
5
|
-
util.inherits(Transform, Duplex);
|
|
6
|
-
|
|
7
|
-
function TransformState(stream) {
|
|
8
|
-
this.afterTransform = function (er, data) {
|
|
9
|
-
return afterTransform(stream, er, data);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
this.needTransform = false;
|
|
13
|
-
this.transforming = false;
|
|
14
|
-
this.writecb = null;
|
|
15
|
-
this.writechunk = null;
|
|
16
|
-
this.writeencoding = null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function afterTransform(stream, er, data) {
|
|
20
|
-
var ts = stream._transformState;
|
|
21
|
-
ts.transforming = false;
|
|
22
|
-
|
|
23
|
-
var cb = ts.writecb;
|
|
24
|
-
|
|
25
|
-
if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));
|
|
26
|
-
|
|
27
|
-
ts.writechunk = null;
|
|
28
|
-
ts.writecb = null;
|
|
29
|
-
|
|
30
|
-
if (data !== null && data !== undefined) stream.push(data);
|
|
31
|
-
|
|
32
|
-
cb(er);
|
|
33
|
-
|
|
34
|
-
var rs = stream._readableState;
|
|
35
|
-
rs.reading = false;
|
|
36
|
-
if (rs.needReadable || rs.length < rs.highWaterMark) {
|
|
37
|
-
stream._read(rs.highWaterMark);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function Transform(options) {
|
|
41
|
-
if (!(this instanceof Transform)) return new Transform(options);
|
|
42
|
-
|
|
43
|
-
Duplex.call(this, options);
|
|
44
|
-
|
|
45
|
-
this._transformState = new TransformState(this);
|
|
46
|
-
|
|
47
|
-
// when the writable side finishes, then flush out anything remaining.
|
|
48
|
-
var stream = this;
|
|
49
|
-
|
|
50
|
-
// start out asking for a readable event once data is transformed.
|
|
51
|
-
this._readableState.needReadable = true;
|
|
52
|
-
|
|
53
|
-
// we have implemented the _read method, and done the other things
|
|
54
|
-
// that Readable wants before the first _read call, so unset the
|
|
55
|
-
// sync guard flag.
|
|
56
|
-
this._readableState.sync = false;
|
|
57
|
-
|
|
58
|
-
if (options) {
|
|
59
|
-
if (typeof options.transform === 'function') this._transform = options.transform;
|
|
60
|
-
|
|
61
|
-
if (typeof options.flush === 'function') this._flush = options.flush;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
this.once('prefinish', function () {
|
|
65
|
-
if (typeof this._flush === 'function') this._flush(function (er) {
|
|
66
|
-
done(stream, er);
|
|
67
|
-
});else done(stream);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
Transform.prototype.push = function (chunk, encoding) {
|
|
72
|
-
this._transformState.needTransform = false;
|
|
73
|
-
return Duplex.prototype.push.call(this, chunk, encoding);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// This is the part where you do stuff!
|
|
77
|
-
// override this function in implementation classes.
|
|
78
|
-
// 'chunk' is an input chunk.
|
|
79
|
-
//
|
|
80
|
-
// Call `push(newChunk)` to pass along transformed output
|
|
81
|
-
// to the readable side. You may call 'push' zero or more times.
|
|
82
|
-
//
|
|
83
|
-
// Call `cb(err)` when you are done with this chunk. If you pass
|
|
84
|
-
// an error, then that'll put the hurt on the whole operation. If you
|
|
85
|
-
// never call cb(), then you'll never get another chunk.
|
|
86
|
-
Transform.prototype._transform = function (chunk, encoding, cb) {
|
|
87
|
-
throw new Error('Not implemented');
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
Transform.prototype._write = function (chunk, encoding, cb) {
|
|
91
|
-
var ts = this._transformState;
|
|
92
|
-
ts.writecb = cb;
|
|
93
|
-
ts.writechunk = chunk;
|
|
94
|
-
ts.writeencoding = encoding;
|
|
95
|
-
if (!ts.transforming) {
|
|
96
|
-
var rs = this._readableState;
|
|
97
|
-
if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
// Doesn't matter what the args are here.
|
|
102
|
-
// _transform does all the work.
|
|
103
|
-
// That we got here means that the readable side wants more data.
|
|
104
|
-
Transform.prototype._read = function (n) {
|
|
105
|
-
var ts = this._transformState;
|
|
106
|
-
|
|
107
|
-
if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
|
|
108
|
-
ts.transforming = true;
|
|
109
|
-
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
|
|
110
|
-
} else {
|
|
111
|
-
// mark that we need a transform, so that any data that comes in
|
|
112
|
-
// will get processed, now that we've asked for it.
|
|
113
|
-
ts.needTransform = true;
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
function done(stream, er) {
|
|
118
|
-
if (er) return stream.emit('error', er);
|
|
119
|
-
|
|
120
|
-
// if there's nothing in the write buffer, then that means
|
|
121
|
-
// that nothing more will ever be provided
|
|
122
|
-
var ws = stream._writableState;
|
|
123
|
-
var ts = stream._transformState;
|
|
124
|
-
|
|
125
|
-
if (ws.length) throw new Error('Calling transform done when ws.length != 0');
|
|
126
|
-
|
|
127
|
-
if (ts.transforming) throw new Error('Calling transform done when still transforming');
|
|
128
|
-
|
|
129
|
-
return stream.push(null);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export { Transform as T };
|
|
@@ -1,480 +0,0 @@
|
|
|
1
|
-
import { u as util } from '../vendor/util/util.js';
|
|
2
|
-
import { b as buffer } from '../vendor/buffer/index.js';
|
|
3
|
-
import { e as events } from '../vendor/events/events.js';
|
|
4
|
-
import { D as Duplex } from './polyfill-node__stream_duplex.js';
|
|
5
|
-
import { b as browser } from '../vendor/process/browser.js';
|
|
6
|
-
|
|
7
|
-
// A bit simpler than readable streams.
|
|
8
|
-
Writable.WritableState = WritableState;
|
|
9
|
-
util.inherits(Writable, events.EventEmitter);
|
|
10
|
-
|
|
11
|
-
function nop() {}
|
|
12
|
-
|
|
13
|
-
function WriteReq(chunk, encoding, cb) {
|
|
14
|
-
this.chunk = chunk;
|
|
15
|
-
this.encoding = encoding;
|
|
16
|
-
this.callback = cb;
|
|
17
|
-
this.next = null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function WritableState(options, stream) {
|
|
21
|
-
Object.defineProperty(this, 'buffer', {
|
|
22
|
-
get: util.deprecate(function () {
|
|
23
|
-
return this.getBuffer();
|
|
24
|
-
}, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')
|
|
25
|
-
});
|
|
26
|
-
options = options || {};
|
|
27
|
-
|
|
28
|
-
// object stream flag to indicate whether or not this stream
|
|
29
|
-
// contains buffers or objects.
|
|
30
|
-
this.objectMode = !!options.objectMode;
|
|
31
|
-
|
|
32
|
-
if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
|
|
33
|
-
|
|
34
|
-
// the point at which write() starts returning false
|
|
35
|
-
// Note: 0 is a valid value, means that we always return false if
|
|
36
|
-
// the entire buffer is not flushed immediately on write()
|
|
37
|
-
var hwm = options.highWaterMark;
|
|
38
|
-
var defaultHwm = this.objectMode ? 16 : 16 * 1024;
|
|
39
|
-
this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
|
|
40
|
-
|
|
41
|
-
// cast to ints.
|
|
42
|
-
this.highWaterMark = ~ ~this.highWaterMark;
|
|
43
|
-
|
|
44
|
-
this.needDrain = false;
|
|
45
|
-
// at the start of calling end()
|
|
46
|
-
this.ending = false;
|
|
47
|
-
// when end() has been called, and returned
|
|
48
|
-
this.ended = false;
|
|
49
|
-
// when 'finish' is emitted
|
|
50
|
-
this.finished = false;
|
|
51
|
-
|
|
52
|
-
// should we decode strings into buffers before passing to _write?
|
|
53
|
-
// this is here so that some node-core streams can optimize string
|
|
54
|
-
// handling at a lower level.
|
|
55
|
-
var noDecode = options.decodeStrings === false;
|
|
56
|
-
this.decodeStrings = !noDecode;
|
|
57
|
-
|
|
58
|
-
// Crypto is kind of old and crusty. Historically, its default string
|
|
59
|
-
// encoding is 'binary' so we have to make this configurable.
|
|
60
|
-
// Everything else in the universe uses 'utf8', though.
|
|
61
|
-
this.defaultEncoding = options.defaultEncoding || 'utf8';
|
|
62
|
-
|
|
63
|
-
// not an actual buffer we keep track of, but a measurement
|
|
64
|
-
// of how much we're waiting to get pushed to some underlying
|
|
65
|
-
// socket or file.
|
|
66
|
-
this.length = 0;
|
|
67
|
-
|
|
68
|
-
// a flag to see when we're in the middle of a write.
|
|
69
|
-
this.writing = false;
|
|
70
|
-
|
|
71
|
-
// when true all writes will be buffered until .uncork() call
|
|
72
|
-
this.corked = 0;
|
|
73
|
-
|
|
74
|
-
// a flag to be able to tell if the onwrite cb is called immediately,
|
|
75
|
-
// or on a later tick. We set this to true at first, because any
|
|
76
|
-
// actions that shouldn't happen until "later" should generally also
|
|
77
|
-
// not happen before the first write call.
|
|
78
|
-
this.sync = true;
|
|
79
|
-
|
|
80
|
-
// a flag to know if we're processing previously buffered items, which
|
|
81
|
-
// may call the _write() callback in the same tick, so that we don't
|
|
82
|
-
// end up in an overlapped onwrite situation.
|
|
83
|
-
this.bufferProcessing = false;
|
|
84
|
-
|
|
85
|
-
// the callback that's passed to _write(chunk,cb)
|
|
86
|
-
this.onwrite = function (er) {
|
|
87
|
-
onwrite(stream, er);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
// the callback that the user supplies to write(chunk,encoding,cb)
|
|
91
|
-
this.writecb = null;
|
|
92
|
-
|
|
93
|
-
// the amount that is being written when _write is called.
|
|
94
|
-
this.writelen = 0;
|
|
95
|
-
|
|
96
|
-
this.bufferedRequest = null;
|
|
97
|
-
this.lastBufferedRequest = null;
|
|
98
|
-
|
|
99
|
-
// number of pending user-supplied write callbacks
|
|
100
|
-
// this must be 0 before 'finish' can be emitted
|
|
101
|
-
this.pendingcb = 0;
|
|
102
|
-
|
|
103
|
-
// emit prefinish if the only thing we're waiting for is _write cbs
|
|
104
|
-
// This is relevant for synchronous Transform streams
|
|
105
|
-
this.prefinished = false;
|
|
106
|
-
|
|
107
|
-
// True if the error was already emitted and should not be thrown again
|
|
108
|
-
this.errorEmitted = false;
|
|
109
|
-
|
|
110
|
-
// count buffered requests
|
|
111
|
-
this.bufferedRequestCount = 0;
|
|
112
|
-
|
|
113
|
-
// allocate the first CorkedRequest, there is always
|
|
114
|
-
// one allocated and free to use, and we maintain at most two
|
|
115
|
-
this.corkedRequestsFree = new CorkedRequest(this);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
WritableState.prototype.getBuffer = function writableStateGetBuffer() {
|
|
119
|
-
var current = this.bufferedRequest;
|
|
120
|
-
var out = [];
|
|
121
|
-
while (current) {
|
|
122
|
-
out.push(current);
|
|
123
|
-
current = current.next;
|
|
124
|
-
}
|
|
125
|
-
return out;
|
|
126
|
-
};
|
|
127
|
-
function Writable(options) {
|
|
128
|
-
|
|
129
|
-
// Writable ctor is applied to Duplexes, though they're not
|
|
130
|
-
// instanceof Writable, they're instanceof Readable.
|
|
131
|
-
if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);
|
|
132
|
-
|
|
133
|
-
this._writableState = new WritableState(options, this);
|
|
134
|
-
|
|
135
|
-
// legacy.
|
|
136
|
-
this.writable = true;
|
|
137
|
-
|
|
138
|
-
if (options) {
|
|
139
|
-
if (typeof options.write === 'function') this._write = options.write;
|
|
140
|
-
|
|
141
|
-
if (typeof options.writev === 'function') this._writev = options.writev;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
events.EventEmitter.call(this);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Otherwise people can pipe Writable streams, which is just wrong.
|
|
148
|
-
Writable.prototype.pipe = function () {
|
|
149
|
-
this.emit('error', new Error('Cannot pipe, not readable'));
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
function writeAfterEnd(stream, cb) {
|
|
153
|
-
var er = new Error('write after end');
|
|
154
|
-
// TODO: defer error events consistently everywhere, not just the cb
|
|
155
|
-
stream.emit('error', er);
|
|
156
|
-
browser.nextTick(cb, er);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// If we get something that is not a buffer, string, null, or undefined,
|
|
160
|
-
// and we're not in objectMode, then that's an error.
|
|
161
|
-
// Otherwise stream chunks are all considered to be of length=1, and the
|
|
162
|
-
// watermarks determine how many objects to keep in the buffer, rather than
|
|
163
|
-
// how many bytes or characters.
|
|
164
|
-
function validChunk(stream, state, chunk, cb) {
|
|
165
|
-
var valid = true;
|
|
166
|
-
var er = false;
|
|
167
|
-
// Always throw error if a null is written
|
|
168
|
-
// if we are not in object mode then throw
|
|
169
|
-
// if it is not a buffer, string, or undefined.
|
|
170
|
-
if (chunk === null) {
|
|
171
|
-
er = new TypeError('May not write null values to stream');
|
|
172
|
-
} else if (!buffer.Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
|
|
173
|
-
er = new TypeError('Invalid non-string/buffer chunk');
|
|
174
|
-
}
|
|
175
|
-
if (er) {
|
|
176
|
-
stream.emit('error', er);
|
|
177
|
-
browser.nextTick(cb, er);
|
|
178
|
-
valid = false;
|
|
179
|
-
}
|
|
180
|
-
return valid;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
Writable.prototype.write = function (chunk, encoding, cb) {
|
|
184
|
-
var state = this._writableState;
|
|
185
|
-
var ret = false;
|
|
186
|
-
|
|
187
|
-
if (typeof encoding === 'function') {
|
|
188
|
-
cb = encoding;
|
|
189
|
-
encoding = null;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (buffer.Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
|
|
193
|
-
|
|
194
|
-
if (typeof cb !== 'function') cb = nop;
|
|
195
|
-
|
|
196
|
-
if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
|
|
197
|
-
state.pendingcb++;
|
|
198
|
-
ret = writeOrBuffer(this, state, chunk, encoding, cb);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return ret;
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
Writable.prototype.cork = function () {
|
|
205
|
-
var state = this._writableState;
|
|
206
|
-
|
|
207
|
-
state.corked++;
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
Writable.prototype.uncork = function () {
|
|
211
|
-
var state = this._writableState;
|
|
212
|
-
|
|
213
|
-
if (state.corked) {
|
|
214
|
-
state.corked--;
|
|
215
|
-
|
|
216
|
-
if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
|
|
221
|
-
// node::ParseEncoding() requires lower case.
|
|
222
|
-
if (typeof encoding === 'string') encoding = encoding.toLowerCase();
|
|
223
|
-
if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
|
|
224
|
-
this._writableState.defaultEncoding = encoding;
|
|
225
|
-
return this;
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
function decodeChunk(state, chunk, encoding) {
|
|
229
|
-
if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
|
|
230
|
-
chunk = buffer.Buffer.from(chunk, encoding);
|
|
231
|
-
}
|
|
232
|
-
return chunk;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// if we're already writing something, then just put this
|
|
236
|
-
// in the queue, and wait our turn. Otherwise, call _write
|
|
237
|
-
// If we return false, then we need a drain event, so set that flag.
|
|
238
|
-
function writeOrBuffer(stream, state, chunk, encoding, cb) {
|
|
239
|
-
chunk = decodeChunk(state, chunk, encoding);
|
|
240
|
-
|
|
241
|
-
if (buffer.Buffer.isBuffer(chunk)) encoding = 'buffer';
|
|
242
|
-
var len = state.objectMode ? 1 : chunk.length;
|
|
243
|
-
|
|
244
|
-
state.length += len;
|
|
245
|
-
|
|
246
|
-
var ret = state.length < state.highWaterMark;
|
|
247
|
-
// we must ensure that previous needDrain will not be reset to false.
|
|
248
|
-
if (!ret) state.needDrain = true;
|
|
249
|
-
|
|
250
|
-
if (state.writing || state.corked) {
|
|
251
|
-
var last = state.lastBufferedRequest;
|
|
252
|
-
state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);
|
|
253
|
-
if (last) {
|
|
254
|
-
last.next = state.lastBufferedRequest;
|
|
255
|
-
} else {
|
|
256
|
-
state.bufferedRequest = state.lastBufferedRequest;
|
|
257
|
-
}
|
|
258
|
-
state.bufferedRequestCount += 1;
|
|
259
|
-
} else {
|
|
260
|
-
doWrite(stream, state, false, len, chunk, encoding, cb);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
return ret;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
function doWrite(stream, state, writev, len, chunk, encoding, cb) {
|
|
267
|
-
state.writelen = len;
|
|
268
|
-
state.writecb = cb;
|
|
269
|
-
state.writing = true;
|
|
270
|
-
state.sync = true;
|
|
271
|
-
if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
|
|
272
|
-
state.sync = false;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
function onwriteError(stream, state, sync, er, cb) {
|
|
276
|
-
--state.pendingcb;
|
|
277
|
-
if (sync) browser.nextTick(cb, er);else cb(er);
|
|
278
|
-
|
|
279
|
-
stream._writableState.errorEmitted = true;
|
|
280
|
-
stream.emit('error', er);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
function onwriteStateUpdate(state) {
|
|
284
|
-
state.writing = false;
|
|
285
|
-
state.writecb = null;
|
|
286
|
-
state.length -= state.writelen;
|
|
287
|
-
state.writelen = 0;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
function onwrite(stream, er) {
|
|
291
|
-
var state = stream._writableState;
|
|
292
|
-
var sync = state.sync;
|
|
293
|
-
var cb = state.writecb;
|
|
294
|
-
|
|
295
|
-
onwriteStateUpdate(state);
|
|
296
|
-
|
|
297
|
-
if (er) onwriteError(stream, state, sync, er, cb);else {
|
|
298
|
-
// Check if we're actually ready to finish, but don't emit yet
|
|
299
|
-
var finished = needFinish(state);
|
|
300
|
-
|
|
301
|
-
if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
|
|
302
|
-
clearBuffer(stream, state);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
if (sync) {
|
|
306
|
-
/*<replacement>*/
|
|
307
|
-
browser.nextTick(afterWrite, stream, state, finished, cb);
|
|
308
|
-
/*</replacement>*/
|
|
309
|
-
} else {
|
|
310
|
-
afterWrite(stream, state, finished, cb);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
function afterWrite(stream, state, finished, cb) {
|
|
316
|
-
if (!finished) onwriteDrain(stream, state);
|
|
317
|
-
state.pendingcb--;
|
|
318
|
-
cb();
|
|
319
|
-
finishMaybe(stream, state);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
// Must force callback to be called on nextTick, so that we don't
|
|
323
|
-
// emit 'drain' before the write() consumer gets the 'false' return
|
|
324
|
-
// value, and has a chance to attach a 'drain' listener.
|
|
325
|
-
function onwriteDrain(stream, state) {
|
|
326
|
-
if (state.length === 0 && state.needDrain) {
|
|
327
|
-
state.needDrain = false;
|
|
328
|
-
stream.emit('drain');
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
// if there's something in the buffer waiting, then process it
|
|
333
|
-
function clearBuffer(stream, state) {
|
|
334
|
-
state.bufferProcessing = true;
|
|
335
|
-
var entry = state.bufferedRequest;
|
|
336
|
-
|
|
337
|
-
if (stream._writev && entry && entry.next) {
|
|
338
|
-
// Fast case, write everything using _writev()
|
|
339
|
-
var l = state.bufferedRequestCount;
|
|
340
|
-
var buffer = new Array(l);
|
|
341
|
-
var holder = state.corkedRequestsFree;
|
|
342
|
-
holder.entry = entry;
|
|
343
|
-
|
|
344
|
-
var count = 0;
|
|
345
|
-
while (entry) {
|
|
346
|
-
buffer[count] = entry;
|
|
347
|
-
entry = entry.next;
|
|
348
|
-
count += 1;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
doWrite(stream, state, true, state.length, buffer, '', holder.finish);
|
|
352
|
-
|
|
353
|
-
// doWrite is almost always async, defer these to save a bit of time
|
|
354
|
-
// as the hot path ends with doWrite
|
|
355
|
-
state.pendingcb++;
|
|
356
|
-
state.lastBufferedRequest = null;
|
|
357
|
-
if (holder.next) {
|
|
358
|
-
state.corkedRequestsFree = holder.next;
|
|
359
|
-
holder.next = null;
|
|
360
|
-
} else {
|
|
361
|
-
state.corkedRequestsFree = new CorkedRequest(state);
|
|
362
|
-
}
|
|
363
|
-
} else {
|
|
364
|
-
// Slow case, write chunks one-by-one
|
|
365
|
-
while (entry) {
|
|
366
|
-
var chunk = entry.chunk;
|
|
367
|
-
var encoding = entry.encoding;
|
|
368
|
-
var cb = entry.callback;
|
|
369
|
-
var len = state.objectMode ? 1 : chunk.length;
|
|
370
|
-
|
|
371
|
-
doWrite(stream, state, false, len, chunk, encoding, cb);
|
|
372
|
-
entry = entry.next;
|
|
373
|
-
// if we didn't call the onwrite immediately, then
|
|
374
|
-
// it means that we need to wait until it does.
|
|
375
|
-
// also, that means that the chunk and cb are currently
|
|
376
|
-
// being processed, so move the buffer counter past them.
|
|
377
|
-
if (state.writing) {
|
|
378
|
-
break;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
if (entry === null) state.lastBufferedRequest = null;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
state.bufferedRequestCount = 0;
|
|
386
|
-
state.bufferedRequest = entry;
|
|
387
|
-
state.bufferProcessing = false;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
Writable.prototype._write = function (chunk, encoding, cb) {
|
|
391
|
-
cb(new Error('not implemented'));
|
|
392
|
-
};
|
|
393
|
-
|
|
394
|
-
Writable.prototype._writev = null;
|
|
395
|
-
|
|
396
|
-
Writable.prototype.end = function (chunk, encoding, cb) {
|
|
397
|
-
var state = this._writableState;
|
|
398
|
-
|
|
399
|
-
if (typeof chunk === 'function') {
|
|
400
|
-
cb = chunk;
|
|
401
|
-
chunk = null;
|
|
402
|
-
encoding = null;
|
|
403
|
-
} else if (typeof encoding === 'function') {
|
|
404
|
-
cb = encoding;
|
|
405
|
-
encoding = null;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
|
|
409
|
-
|
|
410
|
-
// .end() fully uncorks
|
|
411
|
-
if (state.corked) {
|
|
412
|
-
state.corked = 1;
|
|
413
|
-
this.uncork();
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
// ignore unnecessary end() calls.
|
|
417
|
-
if (!state.ending && !state.finished) endWritable(this, state, cb);
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
function needFinish(state) {
|
|
421
|
-
return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
function prefinish(stream, state) {
|
|
425
|
-
if (!state.prefinished) {
|
|
426
|
-
state.prefinished = true;
|
|
427
|
-
stream.emit('prefinish');
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
function finishMaybe(stream, state) {
|
|
432
|
-
var need = needFinish(state);
|
|
433
|
-
if (need) {
|
|
434
|
-
if (state.pendingcb === 0) {
|
|
435
|
-
prefinish(stream, state);
|
|
436
|
-
state.finished = true;
|
|
437
|
-
stream.emit('finish');
|
|
438
|
-
} else {
|
|
439
|
-
prefinish(stream, state);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
return need;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
function endWritable(stream, state, cb) {
|
|
446
|
-
state.ending = true;
|
|
447
|
-
finishMaybe(stream, state);
|
|
448
|
-
if (cb) {
|
|
449
|
-
if (state.finished) browser.nextTick(cb);else stream.once('finish', cb);
|
|
450
|
-
}
|
|
451
|
-
state.ended = true;
|
|
452
|
-
stream.writable = false;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
// It seems a linked list but it is not
|
|
456
|
-
// there will be only 2 of these for each stream
|
|
457
|
-
function CorkedRequest(state) {
|
|
458
|
-
var _this = this;
|
|
459
|
-
|
|
460
|
-
this.next = null;
|
|
461
|
-
this.entry = null;
|
|
462
|
-
|
|
463
|
-
this.finish = function (err) {
|
|
464
|
-
var entry = _this.entry;
|
|
465
|
-
_this.entry = null;
|
|
466
|
-
while (entry) {
|
|
467
|
-
var cb = entry.callback;
|
|
468
|
-
state.pendingcb--;
|
|
469
|
-
cb(err);
|
|
470
|
-
entry = entry.next;
|
|
471
|
-
}
|
|
472
|
-
if (state.corkedRequestsFree) {
|
|
473
|
-
state.corkedRequestsFree.next = _this;
|
|
474
|
-
} else {
|
|
475
|
-
state.corkedRequestsFree = _this;
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
export { Writable as W };
|