Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- Dockerfile +12 -0
- README.md +5 -5
- __init__.py +0 -0
- __pycache__/app.cpython-310.pyc +0 -0
- app.py +16 -0
- requirements.txt +1 -0
- src/.gitignore +9 -0
- src/README.md +10 -0
- src/backend/gradio_pannellum/__init__.py +4 -0
- src/backend/gradio_pannellum/pannellum.py +158 -0
- src/backend/gradio_pannellum/pannellum.pyi +308 -0
- src/backend/gradio_pannellum/templates/component/__vite-browser-external-2447137e.js +4 -0
- src/backend/gradio_pannellum/templates/component/index.js +0 -0
- src/backend/gradio_pannellum/templates/component/style.css +1 -0
- src/backend/gradio_pannellum/templates/component/wrapper-98f94c21-f7f71f53.js +2449 -0
- src/backend/gradio_pannellum/templates/example/index.js +264 -0
- src/backend/gradio_pannellum/templates/example/style.css +1 -0
- src/demo/__init__.py +0 -0
- src/demo/app.py +16 -0
- src/flagged/log.csv +2 -0
- src/flagged/output/cede47ebb714a3a805f0/image.png +3 -0
- src/flagged/x/6204ba86727afb158f2c/sample.jpeg +0 -0
- src/frontend/Example.svelte +39 -0
- src/frontend/Index.svelte +139 -0
- src/frontend/package-lock.json +1766 -0
- src/frontend/package.json +29 -0
- src/frontend/shared/ClearImage.svelte +30 -0
- src/frontend/shared/Image.svelte +24 -0
- src/frontend/shared/ImagePreview.svelte +59 -0
- src/frontend/shared/ImageUploader.svelte +136 -0
- src/frontend/shared/SveltePannellum.svelte +20 -0
- src/frontend/shared/utils.ts +24 -0
- src/package-lock.json +6 -0
- src/package.json +1 -0
- src/pyproject.toml +49 -0
- src/sample.jpeg +0 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
src/flagged/output/cede47ebb714a3a805f0/image.png filter=lfs diff=lfs merge=lfs -text
|
Dockerfile
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
FROM python:3.9
|
3 |
+
|
4 |
+
WORKDIR /code
|
5 |
+
|
6 |
+
COPY --link --chown=1000 . .
|
7 |
+
|
8 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
9 |
+
|
10 |
+
ENV PYTHONUNBUFFERED=1 GRADIO_ALLOW_FLAGGING=never GRADIO_NUM_PORTS=1 GRADIO_SERVER_NAME=0.0.0.0 GRADIO_SERVER_PORT=7860 SYSTEM=spaces
|
11 |
+
|
12 |
+
CMD ["python", "app.py"]
|
README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
|
|
1 |
---
|
2 |
-
|
3 |
-
|
4 |
-
colorFrom:
|
5 |
colorTo: pink
|
6 |
sdk: docker
|
7 |
pinned: false
|
|
|
8 |
---
|
9 |
-
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
+
|
2 |
---
|
3 |
+
tags: [gradio-custom-component, gradio-template-Image]
|
4 |
+
title: gradio_pannellum V0.0.1
|
5 |
+
colorFrom: indigo
|
6 |
colorTo: pink
|
7 |
sdk: docker
|
8 |
pinned: false
|
9 |
+
license: apache-2.0
|
10 |
---
|
|
|
|
__init__.py
ADDED
File without changes
|
__pycache__/app.cpython-310.pyc
ADDED
Binary file (423 Bytes). View file
|
|
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import gradio as gr
|
3 |
+
from gradio_pannellum import Pannellum
|
4 |
+
|
5 |
+
|
6 |
+
example = Pannellum().example_inputs()
|
7 |
+
|
8 |
+
demo = gr.Interface(
|
9 |
+
lambda x:x,
|
10 |
+
Pannellum(), # interactive version of your component
|
11 |
+
Pannellum(), # static version of your component
|
12 |
+
examples=[[example]], # uncomment this line to view the "example version" of your component
|
13 |
+
)
|
14 |
+
|
15 |
+
|
16 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
gradio_pannellum-0.0.1-py3-none-any.whl
|
src/.gitignore
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.eggs/
|
2 |
+
dist/
|
3 |
+
*.pyc
|
4 |
+
__pycache__/
|
5 |
+
*.py[cod]
|
6 |
+
*$py.class
|
7 |
+
__tmp/*
|
8 |
+
*.pyi
|
9 |
+
node_modules
|
src/README.md
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# gradio_pannellum
|
3 |
+
A Custom Gradio component.
|
4 |
+
|
5 |
+
## Example usage
|
6 |
+
|
7 |
+
```python
|
8 |
+
import gradio as gr
|
9 |
+
from gradio_pannellum import Pannellum
|
10 |
+
```
|
src/backend/gradio_pannellum/__init__.py
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
from .pannellum import Pannellum
|
3 |
+
|
4 |
+
__all__ = ['Pannellum']
|
src/backend/gradio_pannellum/pannellum.py
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""gr.Image() component."""
|
2 |
+
|
3 |
+
from __future__ import annotations
|
4 |
+
|
5 |
+
import warnings
|
6 |
+
from pathlib import Path
|
7 |
+
from typing import Any, Literal, cast
|
8 |
+
|
9 |
+
import numpy as np
|
10 |
+
from gradio_client.documentation import document, set_documentation_group
|
11 |
+
from PIL import Image as _Image # using _ to minimize namespace pollution
|
12 |
+
|
13 |
+
import gradio.image_utils as image_utils
|
14 |
+
from gradio import utils
|
15 |
+
from gradio.components.base import Component
|
16 |
+
from gradio.data_classes import FileData
|
17 |
+
from gradio.events import Events
|
18 |
+
|
19 |
+
set_documentation_group("component")
|
20 |
+
_Image.init() # fixes https://github.com/gradio-app/gradio/issues/2843
|
21 |
+
|
22 |
+
|
23 |
+
@document()
|
24 |
+
class Pannellum(Component):
|
25 |
+
"""
|
26 |
+
Creates an image component that can be used to upload images (as an input) or display images (as an output).
|
27 |
+
Preprocessing: passes the uploaded image as a {numpy.array}, {PIL.Image} or {str} filepath depending on `type`.
|
28 |
+
Postprocessing: expects a {numpy.array}, {PIL.Image} or {str} or {pathlib.Path} filepath to an image and displays the image.
|
29 |
+
Examples-format: a {str} local filepath or URL to an image.
|
30 |
+
Demos: image_mod, image_mod_default_image
|
31 |
+
Guides: image-classification-in-pytorch, image-classification-in-tensorflow, image-classification-with-vision-transformers, create-your-own-friends-with-a-gan
|
32 |
+
"""
|
33 |
+
|
34 |
+
EVENTS = [
|
35 |
+
Events.clear,
|
36 |
+
Events.change,
|
37 |
+
Events.select,
|
38 |
+
Events.upload,
|
39 |
+
]
|
40 |
+
|
41 |
+
data_model = FileData
|
42 |
+
|
43 |
+
def __init__(
|
44 |
+
self,
|
45 |
+
value: str | _Image.Image | np.ndarray | None = None,
|
46 |
+
*,
|
47 |
+
height: int | None = None,
|
48 |
+
width: int | None = None,
|
49 |
+
image_mode: Literal[
|
50 |
+
"1", "L", "P", "RGB", "RGBA", "CMYK", "YCbCr", "LAB", "HSV", "I", "F"
|
51 |
+
] = "RGB",
|
52 |
+
sources: list[Literal["upload", "clipboard"]] | None = None,
|
53 |
+
type: Literal["numpy", "pil", "filepath"] = "numpy",
|
54 |
+
label: str | None = None,
|
55 |
+
every: float | None = None,
|
56 |
+
show_label: bool | None = None,
|
57 |
+
show_download_button: bool = True,
|
58 |
+
container: bool = True,
|
59 |
+
scale: int | None = None,
|
60 |
+
min_width: int = 160,
|
61 |
+
interactive: bool | None = None,
|
62 |
+
visible: bool = True,
|
63 |
+
elem_id: str | None = None,
|
64 |
+
elem_classes: list[str] | str | None = None,
|
65 |
+
render: bool = True,
|
66 |
+
show_share_button: bool | None = None,
|
67 |
+
):
|
68 |
+
"""
|
69 |
+
Parameters:
|
70 |
+
value: A PIL Pannellum, numpy array, path or URL for the default value that Pannellum component is going to take. If callable, the function will be called whenever the app loads to set the initial value of the component.
|
71 |
+
height: Height of the displayed image in pixels.
|
72 |
+
width: Width of the displayed image in pixels.
|
73 |
+
image_mode: "RGB" if color, or "L" if black and white. See https://pillow.readthedocs.io/en/stable/handbook/concepts.html for other supported image modes and their meaning.
|
74 |
+
sources: List of sources for the image. "upload" creates a box where user can drop an image file, "clipboard" allows users to paste an image from the clipboard. If None, defaults to ["upload", "clipboard"].
|
75 |
+
type: The format the image is converted to before being passed into the prediction function. "numpy" converts the image to a numpy array with shape (height, width, 3) and values from 0 to 255, "pil" converts the image to a PIL image object, "filepath" passes a str path to a temporary file containing the image.
|
76 |
+
label: The label for this component. Appears above the component and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component is assigned to.
|
77 |
+
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
|
78 |
+
show_label: if True, will display label.
|
79 |
+
show_download_button: If True, will display button to download image.
|
80 |
+
container: If True, will place the component in a container - providing some extra padding around the border.
|
81 |
+
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
|
82 |
+
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
|
83 |
+
interactive: if True, will allow users to upload and edit an image; if False, can only be used to display images. If not provided, this is inferred based on whether the component is used as an input or output.
|
84 |
+
visible: If False, component will be hidden.
|
85 |
+
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
|
86 |
+
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
|
87 |
+
render: If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
|
88 |
+
show_share_button: If True, will show a share icon in the corner of the component that allows user to share outputs to Hugging Face Spaces Discussions. If False, icon does not appear. If set to None (default behavior), then the icon appears if this Gradio app is launched on Spaces, but not otherwise.
|
89 |
+
"""
|
90 |
+
valid_types = ["numpy", "pil", "filepath"]
|
91 |
+
if type not in valid_types:
|
92 |
+
raise ValueError(
|
93 |
+
f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}"
|
94 |
+
)
|
95 |
+
self.type = type
|
96 |
+
self.height = height
|
97 |
+
self.width = width
|
98 |
+
self.image_mode = image_mode
|
99 |
+
valid_sources = ["upload", "clipboard"]
|
100 |
+
if sources is None:
|
101 |
+
self.sources = ["upload", "clipboard"]
|
102 |
+
elif isinstance(sources, str):
|
103 |
+
self.sources = [sources] # type: ignore
|
104 |
+
else:
|
105 |
+
self.sources = sources
|
106 |
+
for source in self.sources: # type: ignore
|
107 |
+
if source not in valid_sources:
|
108 |
+
raise ValueError(
|
109 |
+
f"`sources` must a list consisting of elements in {valid_sources}"
|
110 |
+
)
|
111 |
+
self.show_download_button = show_download_button
|
112 |
+
self.show_share_button = (
|
113 |
+
(utils.get_space() is not None)
|
114 |
+
if show_share_button is None
|
115 |
+
else show_share_button
|
116 |
+
)
|
117 |
+
super().__init__(
|
118 |
+
label=label,
|
119 |
+
every=every,
|
120 |
+
show_label=show_label,
|
121 |
+
container=container,
|
122 |
+
scale=scale,
|
123 |
+
min_width=min_width,
|
124 |
+
interactive=interactive,
|
125 |
+
visible=visible,
|
126 |
+
elem_id=elem_id,
|
127 |
+
elem_classes=elem_classes,
|
128 |
+
render=render,
|
129 |
+
value=value,
|
130 |
+
)
|
131 |
+
|
132 |
+
def preprocess(
|
133 |
+
self, payload: FileData | None
|
134 |
+
) -> np.ndarray | _Image.Image | str | None:
|
135 |
+
if payload is None:
|
136 |
+
return payload
|
137 |
+
im = _Image.open(payload.path)
|
138 |
+
with warnings.catch_warnings():
|
139 |
+
warnings.simplefilter("ignore")
|
140 |
+
im = im.convert(self.image_mode)
|
141 |
+
return image_utils.format_image(
|
142 |
+
im, cast(Literal["numpy", "pil", "filepath"], self.type), self.GRADIO_CACHE
|
143 |
+
)
|
144 |
+
|
145 |
+
def postprocess(
|
146 |
+
self, value: np.ndarray | _Image.Image | str | Path | None
|
147 |
+
) -> FileData | None:
|
148 |
+
if value is None:
|
149 |
+
return None
|
150 |
+
return FileData(path=image_utils.save_image(value, self.GRADIO_CACHE))
|
151 |
+
|
152 |
+
def as_example(self, input_data: str | Path | None) -> str | None:
|
153 |
+
if input_data is None:
|
154 |
+
return None
|
155 |
+
return self.move_resource_to_block_cache(input_data)
|
156 |
+
|
157 |
+
def example_inputs(self) -> Any:
|
158 |
+
return "https://pannellum.org/images/alma.jpg"
|
src/backend/gradio_pannellum/pannellum.pyi
ADDED
@@ -0,0 +1,308 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""gr.Image() component."""
|
2 |
+
|
3 |
+
from __future__ import annotations
|
4 |
+
|
5 |
+
import warnings
|
6 |
+
from pathlib import Path
|
7 |
+
from typing import Any, Literal, cast
|
8 |
+
|
9 |
+
import numpy as np
|
10 |
+
from gradio_client.documentation import document, set_documentation_group
|
11 |
+
from PIL import Image as _Image # using _ to minimize namespace pollution
|
12 |
+
|
13 |
+
import gradio.image_utils as image_utils
|
14 |
+
from gradio import utils
|
15 |
+
from gradio.components.base import Component, StreamingInput
|
16 |
+
from gradio.data_classes import FileData
|
17 |
+
from gradio.events import Events
|
18 |
+
|
19 |
+
set_documentation_group("component")
|
20 |
+
_Image.init() # fixes https://github.com/gradio-app/gradio/issues/2843
|
21 |
+
|
22 |
+
from gradio.events import Dependency
|
23 |
+
|
24 |
+
@document()
|
25 |
+
class Pannellum(Component):
|
26 |
+
"""
|
27 |
+
Creates an image component that can be used to upload images (as an input) or display images (as an output).
|
28 |
+
Preprocessing: passes the uploaded image as a {numpy.array}, {PIL.Image} or {str} filepath depending on `type`.
|
29 |
+
Postprocessing: expects a {numpy.array}, {PIL.Image} or {str} or {pathlib.Path} filepath to an image and displays the image.
|
30 |
+
Examples-format: a {str} local filepath or URL to an image.
|
31 |
+
Demos: image_mod, image_mod_default_image
|
32 |
+
Guides: image-classification-in-pytorch, image-classification-in-tensorflow, image-classification-with-vision-transformers, create-your-own-friends-with-a-gan
|
33 |
+
"""
|
34 |
+
|
35 |
+
EVENTS = [
|
36 |
+
Events.clear,
|
37 |
+
Events.change,
|
38 |
+
Events.select,
|
39 |
+
Events.upload,
|
40 |
+
]
|
41 |
+
|
42 |
+
data_model = FileData
|
43 |
+
|
44 |
+
def __init__(
|
45 |
+
self,
|
46 |
+
value: str | _Image.Image | np.ndarray | None = None,
|
47 |
+
*,
|
48 |
+
height: int | None = None,
|
49 |
+
width: int | None = None,
|
50 |
+
image_mode: Literal[
|
51 |
+
"1", "L", "P", "RGB", "RGBA", "CMYK", "YCbCr", "LAB", "HSV", "I", "F"
|
52 |
+
] = "RGB",
|
53 |
+
sources: list[Literal["upload", "clipboard"]] | None = None,
|
54 |
+
type: Literal["numpy", "pil", "filepath"] = "numpy",
|
55 |
+
label: str | None = None,
|
56 |
+
every: float | None = None,
|
57 |
+
show_label: bool | None = None,
|
58 |
+
show_download_button: bool = True,
|
59 |
+
container: bool = True,
|
60 |
+
scale: int | None = None,
|
61 |
+
min_width: int = 160,
|
62 |
+
interactive: bool | None = None,
|
63 |
+
visible: bool = True,
|
64 |
+
elem_id: str | None = None,
|
65 |
+
elem_classes: list[str] | str | None = None,
|
66 |
+
render: bool = True,
|
67 |
+
show_share_button: bool | None = None,
|
68 |
+
):
|
69 |
+
"""
|
70 |
+
Parameters:
|
71 |
+
value: A PIL Pannellum, numpy array, path or URL for the default value that Pannellum component is going to take. If callable, the function will be called whenever the app loads to set the initial value of the component.
|
72 |
+
height: Height of the displayed image in pixels.
|
73 |
+
width: Width of the displayed image in pixels.
|
74 |
+
image_mode: "RGB" if color, or "L" if black and white. See https://pillow.readthedocs.io/en/stable/handbook/concepts.html for other supported image modes and their meaning.
|
75 |
+
sources: List of sources for the image. "upload" creates a box where user can drop an image file, "clipboard" allows users to paste an image from the clipboard. If None, defaults to ["upload", "clipboard"].
|
76 |
+
type: The format the image is converted to before being passed into the prediction function. "numpy" converts the image to a numpy array with shape (height, width, 3) and values from 0 to 255, "pil" converts the image to a PIL image object, "filepath" passes a str path to a temporary file containing the image.
|
77 |
+
label: The label for this component. Appears above the component and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component is assigned to.
|
78 |
+
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
|
79 |
+
show_label: if True, will display label.
|
80 |
+
show_download_button: If True, will display button to download image.
|
81 |
+
container: If True, will place the component in a container - providing some extra padding around the border.
|
82 |
+
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
|
83 |
+
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
|
84 |
+
interactive: if True, will allow users to upload and edit an image; if False, can only be used to display images. If not provided, this is inferred based on whether the component is used as an input or output.
|
85 |
+
visible: If False, component will be hidden.
|
86 |
+
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
|
87 |
+
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
|
88 |
+
render: If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
|
89 |
+
show_share_button: If True, will show a share icon in the corner of the component that allows user to share outputs to Hugging Face Spaces Discussions. If False, icon does not appear. If set to None (default behavior), then the icon appears if this Gradio app is launched on Spaces, but not otherwise.
|
90 |
+
"""
|
91 |
+
valid_types = ["numpy", "pil", "filepath"]
|
92 |
+
if type not in valid_types:
|
93 |
+
raise ValueError(
|
94 |
+
f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}"
|
95 |
+
)
|
96 |
+
self.type = type
|
97 |
+
self.height = height
|
98 |
+
self.width = width
|
99 |
+
self.image_mode = image_mode
|
100 |
+
valid_sources = ["upload", "clipboard"]
|
101 |
+
if sources is None:
|
102 |
+
self.sources = ["upload", "clipboard"]
|
103 |
+
elif isinstance(sources, str):
|
104 |
+
self.sources = [sources] # type: ignore
|
105 |
+
else:
|
106 |
+
self.sources = sources
|
107 |
+
for source in self.sources: # type: ignore
|
108 |
+
if source not in valid_sources:
|
109 |
+
raise ValueError(
|
110 |
+
f"`sources` must a list consisting of elements in {valid_sources}"
|
111 |
+
)
|
112 |
+
self.show_download_button = show_download_button
|
113 |
+
self.show_share_button = (
|
114 |
+
(utils.get_space() is not None)
|
115 |
+
if show_share_button is None
|
116 |
+
else show_share_button
|
117 |
+
)
|
118 |
+
super().__init__(
|
119 |
+
label=label,
|
120 |
+
every=every,
|
121 |
+
show_label=show_label,
|
122 |
+
container=container,
|
123 |
+
scale=scale,
|
124 |
+
min_width=min_width,
|
125 |
+
interactive=interactive,
|
126 |
+
visible=visible,
|
127 |
+
elem_id=elem_id,
|
128 |
+
elem_classes=elem_classes,
|
129 |
+
render=render,
|
130 |
+
value=value,
|
131 |
+
)
|
132 |
+
|
133 |
+
def preprocess(
|
134 |
+
self, payload: FileData | None
|
135 |
+
) -> np.ndarray | _Image.Image | str | None:
|
136 |
+
if payload is None:
|
137 |
+
return payload
|
138 |
+
im = _Image.open(payload.path)
|
139 |
+
with warnings.catch_warnings():
|
140 |
+
warnings.simplefilter("ignore")
|
141 |
+
im = im.convert(self.image_mode)
|
142 |
+
return image_utils.format_image(
|
143 |
+
im, cast(Literal["numpy", "pil", "filepath"], self.type), self.GRADIO_CACHE
|
144 |
+
)
|
145 |
+
|
146 |
+
def postprocess(
|
147 |
+
self, value: np.ndarray | _Image.Image | str | Path | None
|
148 |
+
) -> FileData | None:
|
149 |
+
if value is None:
|
150 |
+
return None
|
151 |
+
return FileData(path=image_utils.save_image(value, self.GRADIO_CACHE))
|
152 |
+
|
153 |
+
def as_example(self, input_data: str | Path | None) -> str | None:
|
154 |
+
if input_data is None:
|
155 |
+
return None
|
156 |
+
return self.move_resource_to_block_cache(input_data)
|
157 |
+
|
158 |
+
def example_inputs(self) -> Any:
|
159 |
+
return "https://pannellum.org/images/alma.jpg"
|
160 |
+
|
161 |
+
|
162 |
+
def clear(self,
|
163 |
+
fn: Callable | None,
|
164 |
+
inputs: Component | Sequence[Component] | set[Component] | None = None,
|
165 |
+
outputs: Component | Sequence[Component] | None = None,
|
166 |
+
api_name: str | None | Literal[False] = None,
|
167 |
+
status_tracker: None = None,
|
168 |
+
scroll_to_output: bool = False,
|
169 |
+
show_progress: Literal["full", "minimal", "hidden"] = "full",
|
170 |
+
queue: bool | None = None,
|
171 |
+
batch: bool = False,
|
172 |
+
max_batch_size: int = 4,
|
173 |
+
preprocess: bool = True,
|
174 |
+
postprocess: bool = True,
|
175 |
+
cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
|
176 |
+
every: float | None = None,
|
177 |
+
trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
|
178 |
+
js: str | None = None,) -> Dependency:
|
179 |
+
"""
|
180 |
+
Parameters:
|
181 |
+
fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
|
182 |
+
inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
|
183 |
+
outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
|
184 |
+
api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
|
185 |
+
scroll_to_output: If True, will scroll to output component on completion
|
186 |
+
show_progress: If True, will show progress animation while pending
|
187 |
+
queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
|
188 |
+
batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
|
189 |
+
max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
|
190 |
+
preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
|
191 |
+
postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
|
192 |
+
cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
|
193 |
+
every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
|
194 |
+
trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` event) would allow a second submission after the pending event is complete.
|
195 |
+
js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
|
196 |
+
"""
|
197 |
+
...
|
198 |
+
|
199 |
+
def change(self,
|
200 |
+
fn: Callable | None,
|
201 |
+
inputs: Component | Sequence[Component] | set[Component] | None = None,
|
202 |
+
outputs: Component | Sequence[Component] | None = None,
|
203 |
+
api_name: str | None | Literal[False] = None,
|
204 |
+
status_tracker: None = None,
|
205 |
+
scroll_to_output: bool = False,
|
206 |
+
show_progress: Literal["full", "minimal", "hidden"] = "full",
|
207 |
+
queue: bool | None = None,
|
208 |
+
batch: bool = False,
|
209 |
+
max_batch_size: int = 4,
|
210 |
+
preprocess: bool = True,
|
211 |
+
postprocess: bool = True,
|
212 |
+
cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
|
213 |
+
every: float | None = None,
|
214 |
+
trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
|
215 |
+
js: str | None = None,) -> Dependency:
|
216 |
+
"""
|
217 |
+
Parameters:
|
218 |
+
fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
|
219 |
+
inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
|
220 |
+
outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
|
221 |
+
api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
|
222 |
+
scroll_to_output: If True, will scroll to output component on completion
|
223 |
+
show_progress: If True, will show progress animation while pending
|
224 |
+
queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
|
225 |
+
batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
|
226 |
+
max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
|
227 |
+
preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
|
228 |
+
postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
|
229 |
+
cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
|
230 |
+
every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
|
231 |
+
trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` event) would allow a second submission after the pending event is complete.
|
232 |
+
js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
|
233 |
+
"""
|
234 |
+
...
|
235 |
+
|
236 |
+
def select(self,
|
237 |
+
fn: Callable | None,
|
238 |
+
inputs: Component | Sequence[Component] | set[Component] | None = None,
|
239 |
+
outputs: Component | Sequence[Component] | None = None,
|
240 |
+
api_name: str | None | Literal[False] = None,
|
241 |
+
status_tracker: None = None,
|
242 |
+
scroll_to_output: bool = False,
|
243 |
+
show_progress: Literal["full", "minimal", "hidden"] = "full",
|
244 |
+
queue: bool | None = None,
|
245 |
+
batch: bool = False,
|
246 |
+
max_batch_size: int = 4,
|
247 |
+
preprocess: bool = True,
|
248 |
+
postprocess: bool = True,
|
249 |
+
cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
|
250 |
+
every: float | None = None,
|
251 |
+
trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
|
252 |
+
js: str | None = None,) -> Dependency:
|
253 |
+
"""
|
254 |
+
Parameters:
|
255 |
+
fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
|
256 |
+
inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
|
257 |
+
outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
|
258 |
+
api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
|
259 |
+
scroll_to_output: If True, will scroll to output component on completion
|
260 |
+
show_progress: If True, will show progress animation while pending
|
261 |
+
queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
|
262 |
+
batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
|
263 |
+
max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
|
264 |
+
preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
|
265 |
+
postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
|
266 |
+
cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
|
267 |
+
every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
|
268 |
+
trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` event) would allow a second submission after the pending event is complete.
|
269 |
+
js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
|
270 |
+
"""
|
271 |
+
...
|
272 |
+
|
273 |
+
def upload(self,
|
274 |
+
fn: Callable | None,
|
275 |
+
inputs: Component | Sequence[Component] | set[Component] | None = None,
|
276 |
+
outputs: Component | Sequence[Component] | None = None,
|
277 |
+
api_name: str | None | Literal[False] = None,
|
278 |
+
status_tracker: None = None,
|
279 |
+
scroll_to_output: bool = False,
|
280 |
+
show_progress: Literal["full", "minimal", "hidden"] = "full",
|
281 |
+
queue: bool | None = None,
|
282 |
+
batch: bool = False,
|
283 |
+
max_batch_size: int = 4,
|
284 |
+
preprocess: bool = True,
|
285 |
+
postprocess: bool = True,
|
286 |
+
cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
|
287 |
+
every: float | None = None,
|
288 |
+
trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
|
289 |
+
js: str | None = None,) -> Dependency:
|
290 |
+
"""
|
291 |
+
Parameters:
|
292 |
+
fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
|
293 |
+
inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
|
294 |
+
outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
|
295 |
+
api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
|
296 |
+
scroll_to_output: If True, will scroll to output component on completion
|
297 |
+
show_progress: If True, will show progress animation while pending
|
298 |
+
queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
|
299 |
+
batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
|
300 |
+
max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
|
301 |
+
preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
|
302 |
+
postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
|
303 |
+
cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
|
304 |
+
every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
|
305 |
+
trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` event) would allow a second submission after the pending event is complete.
|
306 |
+
js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
|
307 |
+
"""
|
308 |
+
...
|
src/backend/gradio_pannellum/templates/component/__vite-browser-external-2447137e.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const e = {};
|
2 |
+
export {
|
3 |
+
e as default
|
4 |
+
};
|
src/backend/gradio_pannellum/templates/component/index.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
src/backend/gradio_pannellum/templates/component/style.css
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
.block.svelte-1t38q2d{position:relative;margin:0;box-shadow:var(--block-shadow);border-width:var(--block-border-width);border-color:var(--block-border-color);border-radius:var(--block-radius);background:var(--block-background-fill);width:100%;line-height:var(--line-sm)}.block.border_focus.svelte-1t38q2d{border-color:var(--color-accent)}.padded.svelte-1t38q2d{padding:var(--block-padding)}.hidden.svelte-1t38q2d{display:none}.hide-container.svelte-1t38q2d{margin:0;box-shadow:none;--block-border-width:0;background:transparent;padding:0;overflow:visible}div.svelte-1hnfib2{margin-bottom:var(--spacing-lg);color:var(--block-info-text-color);font-weight:var(--block-info-text-weight);font-size:var(--block-info-text-size);line-height:var(--line-sm)}span.has-info.svelte-22c38v{margin-bottom:var(--spacing-xs)}span.svelte-22c38v:not(.has-info){margin-bottom:var(--spacing-lg)}span.svelte-22c38v{display:inline-block;position:relative;z-index:var(--layer-4);border:solid var(--block-title-border-width) var(--block-title-border-color);border-radius:var(--block-title-radius);background:var(--block-title-background-fill);padding:var(--block-title-padding);color:var(--block-title-text-color);font-weight:var(--block-title-text-weight);font-size:var(--block-title-text-size);line-height:var(--line-sm)}.hide.svelte-22c38v{margin:0;height:0}label.svelte-9gxdi0{display:inline-flex;align-items:center;z-index:var(--layer-2);box-shadow:var(--block-label-shadow);border:var(--block-label-border-width) solid var(--border-color-primary);border-top:none;border-left:none;border-radius:var(--block-label-radius);background:var(--block-label-background-fill);padding:var(--block-label-padding);pointer-events:none;color:var(--block-label-text-color);font-weight:var(--block-label-text-weight);font-size:var(--block-label-text-size);line-height:var(--line-sm)}.gr-group label.svelte-9gxdi0{border-top-left-radius:0}label.float.svelte-9gxdi0{position:absolute;top:var(--block-label-margin);left:var(--block-label-margin)}label.svelte-9gxdi0:not(.float){position:static;margin-top:var(--block-label-margin);margin-left:var(--block-label-margin)}.hide.svelte-9gxdi0{height:0}span.svelte-9gxdi0{opacity:.8;margin-right:var(--size-2);width:calc(var(--block-label-text-size) - 1px);height:calc(var(--block-label-text-size) - 1px)}.hide-label.svelte-9gxdi0{box-shadow:none;border-width:0;background:transparent;overflow:visible}button.svelte-xtz2g8{display:flex;justify-content:center;align-items:center;gap:1px;z-index:var(--layer-2);border-radius:var(--radius-sm);color:var(--block-label-text-color);border:1px solid transparent}.padded.svelte-xtz2g8{padding:2px;background:var(--background-fill-primary);box-shadow:var(--shadow-drop);border:1px solid var(--button-secondary-border-color)}button.svelte-xtz2g8:hover{cursor:pointer;color:var(--color-accent)}.padded.svelte-xtz2g8:hover{border:2px solid var(--button-secondary-border-color-hover);padding:1px;color:var(--block-label-text-color)}span.svelte-xtz2g8{padding:0 1px;font-size:10px}div.svelte-xtz2g8{padding:2px;display:flex;align-items:flex-end}.small.svelte-xtz2g8{width:14px;height:14px}.large.svelte-xtz2g8{width:22px;height:22px}.pending.svelte-xtz2g8{animation:svelte-xtz2g8-flash .5s infinite}@keyframes svelte-xtz2g8-flash{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.empty.svelte-3w3rth{display:flex;justify-content:center;align-items:center;margin-top:calc(0px - var(--size-6));height:var(--size-full)}.icon.svelte-3w3rth{opacity:.5;height:var(--size-5);color:var(--body-text-color)}.small.svelte-3w3rth{min-height:calc(var(--size-32) - 20px)}.large.svelte-3w3rth{min-height:calc(var(--size-64) - 20px)}.unpadded_box.svelte-3w3rth{margin-top:0}.small_parent.svelte-3w3rth{min-height:100%!important}.dropdown-arrow.svelte-145leq6{fill:currentColor}.wrap.svelte-kzcjhc{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:var(--size-60);color:var(--block-label-text-color);line-height:var(--line-md);height:100%;padding-top:var(--size-3)}.or.svelte-kzcjhc{color:var(--body-text-color-subdued);display:flex}.icon-wrap.svelte-kzcjhc{width:30px;margin-bottom:var(--spacing-lg)}@media (--screen-md){.wrap.svelte-kzcjhc{font-size:var(--text-lg)}}.hovered.svelte-kzcjhc{color:var(--color-accent)}div.svelte-1nba87b{border-top:1px solid transparent;display:flex;max-height:100%;justify-content:center;gap:var(--spacing-sm);height:auto;align-items:flex-end;box-shadow:var(--shadow-drop);padding:var(--spacing-xl) 0;color:var(--block-label-text-color);flex-shrink:0;width:95%}.show_border.svelte-1nba87b{border-top:1px solid var(--block-border-color);margin-top:var(--spacing-xxl)}.source-selection.svelte-lde7lt{display:flex;align-items:center;justify-content:center;border-top:1px solid var(--border-color-primary);width:95%;bottom:0;left:0;right:0;margin-left:auto;margin-right:auto;align-self:flex-end}.icon.svelte-lde7lt{width:22px;height:22px;margin:var(--spacing-lg) var(--spacing-xs);padding:var(--spacing-xs);color:var(--neutral-400);border-radius:var(--radius-md)}.selected.svelte-lde7lt{color:var(--color-accent)}.icon.svelte-lde7lt:hover,.icon.svelte-lde7lt:focus{color:var(--color-accent)}.pnlm-container{margin:0;padding:0;overflow:hidden;position:relative;cursor:default;width:100%;height:100%;font-family:Helvetica,Nimbus Sans L,Liberation Sans,Arial,sans-serif;background:#f4f4f4 url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2267%22%20height%3D%22100%22%20viewBox%3D%220%200%2067%20100%22%3E%0A%3Cpath%20stroke%3D%22%23ccc%22%20fill%3D%22none%22%20d%3D%22M33.5%2C50%2C0%2C63%2C33.5%2C75%2C67%2C63%2C33.5%2C50m-33.5-50%2C67%2C25m-0.5%2C0%2C0%2C75m-66.5-75%2C67-25m-33.5%2C75%2C0%2C25m0-100%2C0%2C50%22%2F%3E%0A%3C%2Fsvg%3E%0A) repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none;outline:0;line-height:1.4;contain:content}.pnlm-container *{box-sizing:content-box}.pnlm-ui{position:absolute;width:100%;height:100%;z-index:1}.pnlm-grab{cursor:grab;cursor:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2226%22%20width%3D%2226%22%3E%0A%3Cpath%20stroke%3D%22%23000%22%20stroke-width%3D%221px%22%20fill%3D%22%23fff%22%20d%3D%22m15.3%2020.5s6.38-6.73%204.64-8.24-3.47%201.01-3.47%201.01%203.61-5.72%201.41-6.49c-2.2-0.769-3.33%204.36-3.33%204.36s0.873-5.76-1.06-5.76-1.58%205.39-1.58%205.39-0.574-4.59-2.18-4.12c-1.61%200.468-0.572%205.51-0.572%205.51s-1.58-4.89-2.93-3.79c-1.35%201.11%200.258%205.25%200.572%206.62%200.836%202.43%202.03%202.94%202.17%205.55%22%2F%3E%0A%3C%2Fsvg%3E%0A) 12 8,default}.pnlm-grabbing{cursor:grabbing;cursor:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2226%22%20width%3D%2226%22%3E%0A%3Cpath%20stroke%3D%22%23000%22%20stroke-width%3D%221px%22%20fill%3D%22%23fff%22%20d%3D%22m15.3%2020.5s5.07-5.29%203.77-6.74c-1.31-1.45-2.53%200.14-2.53%200.14s2.74-3.29%200.535-4.06c-2.2-0.769-2.52%201.3-2.52%201.3s0.81-2.13-1.12-2.13-1.52%201.77-1.52%201.77-0.261-1.59-1.87-1.12c-1.61%200.468-0.874%202.17-0.874%202.17s-0.651-1.55-2-0.445c-1.35%201.11-0.68%202.25-0.365%203.62%200.836%202.43%202.03%202.94%202.17%205.55%22%2F%3E%0A%3C%2Fsvg%3E%0A) 12 8,default}.pnlm-sprite{background-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2226%22%20height%3D%22208%22%3E%0A%3Ccircle%20fill-opacity%3D%22.78%22%20cy%3D%22117%22%20cx%3D%2213%22%20r%3D%2211%22%20fill%3D%22%23fff%22%2F%3E%0A%3Ccircle%20fill-opacity%3D%22.78%22%20cy%3D%22143%22%20cx%3D%2213%22%20r%3D%2211%22%20fill%3D%22%23fff%22%2F%3E%0A%3Ccircle%20cy%3D%22169%22%20cx%3D%2213%22%20r%3D%227%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%2F%3E%0A%3Ccircle%20cy%3D%22195%22%20cx%3D%2213%22%20r%3D%227%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%2F%3E%0A%3Ccircle%20cx%3D%2213%22%20cy%3D%22195%22%20r%3D%222.5%22%2F%3E%0A%3Cpath%20d%3D%22m5%2083v6h2v-4h4v-2zm10%200v2h4v4h2v-6zm-5%205v6h6v-6zm-5%205v6h6v-2h-4v-4zm14%200v4h-4v2h6v-6z%22%2F%3E%0A%3Cpath%20d%3D%22m13%20110a7%207%200%200%200%20-7%207%207%207%200%200%200%207%207%207%207%200%200%200%207%20-7%207%207%200%200%200%20-7%20-7zm-1%203h2v2h-2zm0%203h2v5h-2z%22%2F%3E%0A%3Cpath%20d%3D%22m5%2057v6h2v-4h4v-2zm10%200v2h4v4h2v-6zm-10%2010v6h6v-2h-4v-4zm14%200v4h-4v2h6v-6z%22%2F%3E%0A%3Cpath%20d%3D%22m17%2038v2h-8v-2z%22%2F%3E%0A%3Cpath%20d%3D%22m12%209v3h-3v2h3v3h2v-3h3v-2h-3v-3z%22%2F%3E%0A%3Cpath%20d%3D%22m13%20136-6.125%206.125h4.375v7.875h3.5v-7.875h4.375z%22%2F%3E%0A%3Cpath%20d%3D%22m10.428%20173.33v-5.77l5-2.89v5.77zm1-1.73%203-1.73-3.001-1.74z%22%2F%3E%0A%3C%2Fsvg%3E%0A)}.pnlm-container:-moz-full-screen{height:100%!important;width:100%!important;position:static!important}.pnlm-container:-webkit-full-screen{height:100%!important;width:100%!important;position:static!important}.pnlm-container:-ms-fullscreen{height:100%!important;width:100%!important;position:static!important}.pnlm-container:fullscreen{height:100%!important;width:100%!important;position:static!important}.pnlm-render-container{cursor:inherit;position:absolute;height:100%;width:100%}.pnlm-controls{margin-top:4px;background-color:#fff;border:1px solid #999;border-color:#0006;border-radius:3px;cursor:pointer;z-index:2;-webkit-transform:translateZ(9999px);transform:translateZ(9999px)}.pnlm-control:hover{background-color:#f8f8f8}.pnlm-controls-container{position:absolute;top:0;left:4px;z-index:1}.pnlm-zoom-controls{width:26px;height:52px}.pnlm-zoom-in{width:100%;height:50%;position:absolute;top:0;border-radius:3px 3px 0 0}.pnlm-zoom-out{width:100%;height:50%;position:absolute;bottom:0;background-position:0 -26px;border-top:1px solid #ddd;border-top-color:#0000001a;border-radius:0 0 3px 3px}.pnlm-fullscreen-toggle-button,.pnlm-orientation-button,.pnlm-hot-spot-debug-indicator{width:26px;height:26px}.pnlm-hot-spot-debug-indicator{position:absolute;top:50%;left:50%;width:26px;height:26px;margin:-13px 0 0 -13px;background-color:#ffffff80;border-radius:13px;display:none}.pnlm-orientation-button-inactive{background-position:0 -156px}.pnlm-orientation-button-active{background-position:0 -182px}.pnlm-fullscreen-toggle-button-inactive{background-position:0 -52px}.pnlm-fullscreen-toggle-button-active{background-position:0 -78px}.pnlm-panorama-info{position:absolute;bottom:4px;background-color:#000000b3;border-radius:0 3px 3px 0;padding-right:10px;color:#fff;text-align:left;display:none;z-index:2;-webkit-transform:translateZ(9999px);transform:translateZ(9999px)}.pnlm-title-box{position:relative;font-size:20px;display:table;padding-left:5px;margin-bottom:3px}.pnlm-author-box{position:relative;font-size:12px;display:table;padding-left:5px}.pnlm-load-box{position:absolute;top:50%;left:50%;width:200px;height:150px;margin:-75px 0 0 -100px;background-color:#000000b3;border-radius:3px;text-align:center;font-size:20px;display:none;color:#fff}.pnlm-load-box p{margin:20px 0}.pnlm-lbox{position:absolute;top:50%;left:50%;width:20px;height:20px;margin:-10px 0 0 -10px;display:none}.pnlm-loading{animation-duration:1.5s;-webkit-animation-duration:1.5s;animation-name:pnlm-mv;-webkit-animation-name:pnlm-mv;animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;animation-timing-function:linear;-webkit-animation-timing-function:linear;height:10px;width:10px;background-color:#fff;position:relative}@keyframes pnlm-mv{0%{left:0;top:0}25%{left:10px;top:0}50%{left:10px;top:10px}75%{left:0;top:10px}to{left:0;top:0}}@-webkit-keyframes pnlm-mv{0%{left:0;top:0}25%{left:10px;top:0}50%{left:10px;top:10px}75%{left:0;top:10px}to{left:0;top:0}}.pnlm-load-button{position:absolute;top:50%;left:50%;width:200px;height:100px;margin:-50px 0 0 -100px;background-color:#000000b3;border-radius:3px;text-align:center;font-size:20px;display:table;color:#fff;cursor:pointer}.pnlm-load-button:hover{background-color:#000c}.pnlm-load-button p{display:table-cell;vertical-align:middle}.pnlm-info-box{font-size:15px;position:absolute;top:50%;left:50%;width:200px;height:150px;margin:-75px 0 0 -100px;background-color:#000;border-radius:3px;display:table;text-align:center;color:#fff;table-layout:fixed}.pnlm-info-box a,.pnlm-author-box a{color:#fff;word-wrap:break-word;overflow-wrap:break-word}.pnlm-info-box p{display:table-cell;vertical-align:middle;padding:0 5px}.pnlm-error-msg{display:none}.pnlm-about-msg{font-size:11px;line-height:11px;color:#fff;padding:5px 8px;background:rgba(0,0,0,.7);border-radius:3px;position:absolute;top:50px;left:50px;display:none;opacity:0;-moz-transition:opacity .3s ease-in-out;-webkit-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;z-index:1}.pnlm-about-msg a:link,.pnlm-about-msg a:visited{color:#fff}.pnlm-about-msg a:hover,.pnlm-about-msg a:active{color:#eee}.pnlm-hotspot-base{position:absolute;visibility:hidden;cursor:default;vertical-align:middle;top:0;z-index:1}.pnlm-hotspot{height:26px;width:26px;border-radius:13px}.pnlm-hotspot:hover{background-color:#fff3}.pnlm-hotspot.pnlm-info{background-position:0 -104px}.pnlm-hotspot.pnlm-scene{background-position:0 -130px}div.pnlm-tooltip span{visibility:hidden;position:absolute;border-radius:3px;background-color:#000000b3;color:#fff;text-align:center;max-width:200px;padding:5px 10px;margin-left:-220px;cursor:default}div.pnlm-tooltip:hover span{visibility:visible}div.pnlm-tooltip:hover span:after{content:"";position:absolute;width:0;height:0;border-width:10px;border-style:solid;border-color:rgba(0,0,0,.7) transparent transparent transparent;bottom:-20px;left:-10px;margin:0 50%}.pnlm-compass{position:absolute;width:50px;height:50px;right:4px;bottom:4px;border-radius:25px;background-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2250%22%20width%3D%2250%22%3E%0A%3Cpath%20d%3D%22m24.5078%206-3.2578%2018h7.5l-3.25781-18h-0.984376zm-3.2578%2020%203.2578%2018h0.9844l3.2578-18h-7.5zm1.19531%200.9941h5.10938l-2.5547%2014.1075-2.5547-14.1075z%22%2F%3E%0A%3C%2Fsvg%3E%0A);cursor:default;display:none}.pnlm-world{position:absolute;left:50%;top:50%}.pnlm-face{position:absolute;-webkit-transform-origin:0 0;transform-origin:0 0}.pnlm-dragfix,.pnlm-preview-img{position:absolute;height:100%;width:100%}.pnlm-preview-img{background-size:cover;background-position:center}.pnlm-lbar{width:150px;margin:0 auto;border:#fff 1px solid;height:6px}.pnlm-lbar-fill{background:#fff;height:100%;width:0}.pnlm-lmsg{font-size:12px}.pnlm-fade-img{position:absolute;top:0;left:0}.pnlm-pointer{cursor:pointer}.icon-buttons.svelte-1mrvp2o{display:flex;position:absolute;top:6px;right:6px;gap:var(--size-1)}.wrap.svelte-12ckl9l.svelte-12ckl9l{overflow-y:auto;transition:opacity .5s ease-in-out;background:var(--block-background-fill);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:var(--size-40)}.wrap.svelte-12ckl9l.svelte-12ckl9l:after{content:"";position:absolute;top:0;left:0;width:var(--upload-progress-width);height:100%;transition:all .5s ease-in-out;z-index:1}.uploading.svelte-12ckl9l.svelte-12ckl9l{font-size:var(--text-lg);font-family:var(--font);z-index:2}.file-name.svelte-12ckl9l.svelte-12ckl9l{margin:var(--spacing-md);font-size:var(--text-lg);color:var(--body-text-color-subdued)}.file.svelte-12ckl9l.svelte-12ckl9l{font-size:var(--text-md);z-index:2;display:flex;align-items:center}.file.svelte-12ckl9l progress.svelte-12ckl9l{display:inline;height:var(--size-1);width:100%;transition:all .5s ease-in-out;color:var(--color-accent);border:none}.file.svelte-12ckl9l progress[value].svelte-12ckl9l::-webkit-progress-value{background-color:var(--color-accent);border-radius:20px}.file.svelte-12ckl9l progress[value].svelte-12ckl9l::-webkit-progress-bar{background-color:var(--border-color-accent);border-radius:20px}.progress-bar.svelte-12ckl9l.svelte-12ckl9l{width:14px;height:14px;border-radius:50%;background:radial-gradient(closest-side,var(--block-background-fill) 64%,transparent 53% 100%),conic-gradient(var(--color-accent) var(--upload-progress-width),var(--border-color-accent) 0);transition:all .5s ease-in-out}button.svelte-a356bc{cursor:pointer;width:var(--size-full)}.hidden.svelte-a356bc{display:none;height:0;position:absolute}.center.svelte-a356bc{display:flex;justify-content:center}.flex.svelte-a356bc{display:flex;justify-content:center;align-items:center}input.svelte-a356bc{display:none}div.svelte-1wj0ocy{display:flex;top:var(--size-2);right:var(--size-2);justify-content:flex-end;gap:var(--spacing-sm);z-index:var(--layer-1)}.not-absolute.svelte-1wj0ocy{margin:var(--size-1)}div.svelte-1g74h68{display:flex;position:absolute;top:var(--size-2);right:var(--size-2);justify-content:flex-end;gap:var(--spacing-sm);z-index:var(--layer-5)}.upload-container.svelte-1h6b24t{height:100%;flex-shrink:1;max-height:100%;width:100%}.image-container.svelte-1h6b24t{display:flex;height:100%;flex-direction:column;justify-content:center;align-items:center;max-height:100%}svg.svelte-43sxxs.svelte-43sxxs{width:var(--size-20);height:var(--size-20)}svg.svelte-43sxxs path.svelte-43sxxs{fill:var(--loader-color)}div.svelte-43sxxs.svelte-43sxxs{z-index:var(--layer-2)}.margin.svelte-43sxxs.svelte-43sxxs{margin:var(--size-4)}.wrap.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-5);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden;pointer-events:none}.wrap.center.svelte-14miwb5.svelte-14miwb5{top:0;right:0;left:0}.wrap.default.svelte-14miwb5.svelte-14miwb5{top:0;right:0;bottom:0;left:0}.hide.svelte-14miwb5.svelte-14miwb5{opacity:0;pointer-events:none}.generating.svelte-14miwb5.svelte-14miwb5{animation:svelte-14miwb5-pulse 2s cubic-bezier(.4,0,.6,1) infinite;border:2px solid var(--color-accent);background:transparent}.translucent.svelte-14miwb5.svelte-14miwb5{background:none}@keyframes svelte-14miwb5-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-14miwb5.svelte-14miwb5{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-14miwb5.svelte-14miwb5{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-14miwb5.svelte-14miwb5{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-14miwb5.svelte-14miwb5{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-14miwb5.svelte-14miwb5{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.svelte-14miwb5 .progress-text.svelte-14miwb5{background:var(--block-background-fill)}.border.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary)}.toast-body.svelte-solcu7{display:flex;position:relative;right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;border-radius:var(--container-radius);overflow:hidden;pointer-events:auto}.toast-body.error.svelte-solcu7{border:1px solid var(--color-red-700);background:var(--color-red-50)}.dark .toast-body.error.svelte-solcu7{border:1px solid var(--color-red-500);background-color:var(--color-grey-950)}.toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-700);background:var(--color-yellow-50)}.dark .toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-500);background-color:var(--color-grey-950)}.toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-700);background:var(--color-grey-50)}.dark .toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-500);background-color:var(--color-grey-950)}.toast-title.svelte-solcu7{display:flex;align-items:center;font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-sm);text-transform:capitalize}.toast-title.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-title.error.svelte-solcu7{color:var(--color-red-50)}.toast-title.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-title.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-title.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-title.info.svelte-solcu7{color:var(--color-grey-50)}.toast-close.svelte-solcu7{margin:0 var(--size-3);border-radius:var(--size-3);padding:0px var(--size-1-5);font-size:var(--size-5);line-height:var(--size-5)}.toast-close.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-close.error.svelte-solcu7{color:var(--color-red-500)}.toast-close.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-close.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-close.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-close.info.svelte-solcu7{color:var(--color-grey-500)}.toast-text.svelte-solcu7{font-size:var(--text-lg)}.toast-text.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-text.error.svelte-solcu7{color:var(--color-red-50)}.toast-text.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-text.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-text.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-text.info.svelte-solcu7{color:var(--color-grey-50)}.toast-details.svelte-solcu7{margin:var(--size-3) var(--size-3) var(--size-3) 0;width:100%}.toast-icon.svelte-solcu7{display:flex;position:absolute;position:relative;flex-shrink:0;justify-content:center;align-items:center;margin:var(--size-2);border-radius:var(--radius-full);padding:var(--size-1);padding-left:calc(var(--size-1) - 1px);width:35px;height:35px}.toast-icon.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-icon.error.svelte-solcu7{color:var(--color-red-500)}.toast-icon.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-icon.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-icon.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-icon.info.svelte-solcu7{color:var(--color-grey-500)}@keyframes svelte-solcu7-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.timer.svelte-solcu7{position:absolute;bottom:0;left:0;transform-origin:0 0;animation:svelte-solcu7-countdown 10s linear forwards;width:100%;height:var(--size-1)}.timer.error.svelte-solcu7{background:var(--color-red-700)}.dark .timer.error.svelte-solcu7{background:var(--color-red-500)}.timer.warning.svelte-solcu7{background:var(--color-yellow-700)}.dark .timer.warning.svelte-solcu7{background:var(--color-yellow-500)}.timer.info.svelte-solcu7{background:var(--color-grey-700)}.dark .timer.info.svelte-solcu7{background:var(--color-grey-500)}.toast-wrap.svelte-gatr8h{display:flex;position:fixed;top:var(--size-4);right:var(--size-4);flex-direction:column;align-items:end;gap:var(--size-2);z-index:var(--layer-top);width:calc(100% - var(--size-8))}@media (--screen-sm){.toast-wrap.svelte-gatr8h{width:calc(var(--size-96) + var(--size-10))}}img.svelte-1k8xp4f{max-width:100%;max-height:100%;border-radius:var(--radius-lg);max-width:none}.container.selected.svelte-1iqucjz{border-color:var(--border-color-accent)}.container.table.svelte-1iqucjz{margin:0 auto;border:2px solid var(--border-color-primary);border-radius:var(--radius-lg);width:var(--size-20);height:var(--size-20);object-fit:cover}.container.gallery.svelte-1iqucjz{border:2px solid var(--border-color-primary);height:var(--size-20);max-height:var(--size-20);object-fit:cover}
|
src/backend/gradio_pannellum/templates/component/wrapper-98f94c21-f7f71f53.js
ADDED
@@ -0,0 +1,2449 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import S from "./__vite-browser-external-2447137e.js";
|
2 |
+
function z(s) {
|
3 |
+
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
4 |
+
}
|
5 |
+
function gt(s) {
|
6 |
+
if (s.__esModule)
|
7 |
+
return s;
|
8 |
+
var e = s.default;
|
9 |
+
if (typeof e == "function") {
|
10 |
+
var t = function r() {
|
11 |
+
return this instanceof r ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
|
12 |
+
};
|
13 |
+
t.prototype = e.prototype;
|
14 |
+
} else
|
15 |
+
t = {};
|
16 |
+
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(s).forEach(function(r) {
|
17 |
+
var i = Object.getOwnPropertyDescriptor(s, r);
|
18 |
+
Object.defineProperty(t, r, i.get ? i : {
|
19 |
+
enumerable: !0,
|
20 |
+
get: function() {
|
21 |
+
return s[r];
|
22 |
+
}
|
23 |
+
});
|
24 |
+
}), t;
|
25 |
+
}
|
26 |
+
const { Duplex: yt } = S;
|
27 |
+
function Oe(s) {
|
28 |
+
s.emit("close");
|
29 |
+
}
|
30 |
+
function vt() {
|
31 |
+
!this.destroyed && this._writableState.finished && this.destroy();
|
32 |
+
}
|
33 |
+
function Qe(s) {
|
34 |
+
this.removeListener("error", Qe), this.destroy(), this.listenerCount("error") === 0 && this.emit("error", s);
|
35 |
+
}
|
36 |
+
function St(s, e) {
|
37 |
+
let t = !0;
|
38 |
+
const r = new yt({
|
39 |
+
...e,
|
40 |
+
autoDestroy: !1,
|
41 |
+
emitClose: !1,
|
42 |
+
objectMode: !1,
|
43 |
+
writableObjectMode: !1
|
44 |
+
});
|
45 |
+
return s.on("message", function(n, o) {
|
46 |
+
const l = !o && r._readableState.objectMode ? n.toString() : n;
|
47 |
+
r.push(l) || s.pause();
|
48 |
+
}), s.once("error", function(n) {
|
49 |
+
r.destroyed || (t = !1, r.destroy(n));
|
50 |
+
}), s.once("close", function() {
|
51 |
+
r.destroyed || r.push(null);
|
52 |
+
}), r._destroy = function(i, n) {
|
53 |
+
if (s.readyState === s.CLOSED) {
|
54 |
+
n(i), process.nextTick(Oe, r);
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
let o = !1;
|
58 |
+
s.once("error", function(f) {
|
59 |
+
o = !0, n(f);
|
60 |
+
}), s.once("close", function() {
|
61 |
+
o || n(i), process.nextTick(Oe, r);
|
62 |
+
}), t && s.terminate();
|
63 |
+
}, r._final = function(i) {
|
64 |
+
if (s.readyState === s.CONNECTING) {
|
65 |
+
s.once("open", function() {
|
66 |
+
r._final(i);
|
67 |
+
});
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
s._socket !== null && (s._socket._writableState.finished ? (i(), r._readableState.endEmitted && r.destroy()) : (s._socket.once("finish", function() {
|
71 |
+
i();
|
72 |
+
}), s.close()));
|
73 |
+
}, r._read = function() {
|
74 |
+
s.isPaused && s.resume();
|
75 |
+
}, r._write = function(i, n, o) {
|
76 |
+
if (s.readyState === s.CONNECTING) {
|
77 |
+
s.once("open", function() {
|
78 |
+
r._write(i, n, o);
|
79 |
+
});
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
s.send(i, o);
|
83 |
+
}, r.on("end", vt), r.on("error", Qe), r;
|
84 |
+
}
|
85 |
+
var Et = St;
|
86 |
+
const Vs = /* @__PURE__ */ z(Et);
|
87 |
+
var te = { exports: {} }, U = {
|
88 |
+
BINARY_TYPES: ["nodebuffer", "arraybuffer", "fragments"],
|
89 |
+
EMPTY_BUFFER: Buffer.alloc(0),
|
90 |
+
GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
|
91 |
+
kForOnEventAttribute: Symbol("kIsForOnEventAttribute"),
|
92 |
+
kListener: Symbol("kListener"),
|
93 |
+
kStatusCode: Symbol("status-code"),
|
94 |
+
kWebSocket: Symbol("websocket"),
|
95 |
+
NOOP: () => {
|
96 |
+
}
|
97 |
+
}, bt, xt;
|
98 |
+
const { EMPTY_BUFFER: kt } = U, Se = Buffer[Symbol.species];
|
99 |
+
function wt(s, e) {
|
100 |
+
if (s.length === 0)
|
101 |
+
return kt;
|
102 |
+
if (s.length === 1)
|
103 |
+
return s[0];
|
104 |
+
const t = Buffer.allocUnsafe(e);
|
105 |
+
let r = 0;
|
106 |
+
for (let i = 0; i < s.length; i++) {
|
107 |
+
const n = s[i];
|
108 |
+
t.set(n, r), r += n.length;
|
109 |
+
}
|
110 |
+
return r < e ? new Se(t.buffer, t.byteOffset, r) : t;
|
111 |
+
}
|
112 |
+
function Je(s, e, t, r, i) {
|
113 |
+
for (let n = 0; n < i; n++)
|
114 |
+
t[r + n] = s[n] ^ e[n & 3];
|
115 |
+
}
|
116 |
+
function et(s, e) {
|
117 |
+
for (let t = 0; t < s.length; t++)
|
118 |
+
s[t] ^= e[t & 3];
|
119 |
+
}
|
120 |
+
function Ot(s) {
|
121 |
+
return s.length === s.buffer.byteLength ? s.buffer : s.buffer.slice(s.byteOffset, s.byteOffset + s.length);
|
122 |
+
}
|
123 |
+
function Ee(s) {
|
124 |
+
if (Ee.readOnly = !0, Buffer.isBuffer(s))
|
125 |
+
return s;
|
126 |
+
let e;
|
127 |
+
return s instanceof ArrayBuffer ? e = new Se(s) : ArrayBuffer.isView(s) ? e = new Se(s.buffer, s.byteOffset, s.byteLength) : (e = Buffer.from(s), Ee.readOnly = !1), e;
|
128 |
+
}
|
129 |
+
te.exports = {
|
130 |
+
concat: wt,
|
131 |
+
mask: Je,
|
132 |
+
toArrayBuffer: Ot,
|
133 |
+
toBuffer: Ee,
|
134 |
+
unmask: et
|
135 |
+
};
|
136 |
+
if (!process.env.WS_NO_BUFFER_UTIL)
|
137 |
+
try {
|
138 |
+
const s = require("bufferutil");
|
139 |
+
xt = te.exports.mask = function(e, t, r, i, n) {
|
140 |
+
n < 48 ? Je(e, t, r, i, n) : s.mask(e, t, r, i, n);
|
141 |
+
}, bt = te.exports.unmask = function(e, t) {
|
142 |
+
e.length < 32 ? et(e, t) : s.unmask(e, t);
|
143 |
+
};
|
144 |
+
} catch {
|
145 |
+
}
|
146 |
+
var ne = te.exports;
|
147 |
+
const Ce = Symbol("kDone"), ue = Symbol("kRun");
|
148 |
+
let Ct = class {
|
149 |
+
/**
|
150 |
+
* Creates a new `Limiter`.
|
151 |
+
*
|
152 |
+
* @param {Number} [concurrency=Infinity] The maximum number of jobs allowed
|
153 |
+
* to run concurrently
|
154 |
+
*/
|
155 |
+
constructor(e) {
|
156 |
+
this[Ce] = () => {
|
157 |
+
this.pending--, this[ue]();
|
158 |
+
}, this.concurrency = e || 1 / 0, this.jobs = [], this.pending = 0;
|
159 |
+
}
|
160 |
+
/**
|
161 |
+
* Adds a job to the queue.
|
162 |
+
*
|
163 |
+
* @param {Function} job The job to run
|
164 |
+
* @public
|
165 |
+
*/
|
166 |
+
add(e) {
|
167 |
+
this.jobs.push(e), this[ue]();
|
168 |
+
}
|
169 |
+
/**
|
170 |
+
* Removes a job from the queue and runs it if possible.
|
171 |
+
*
|
172 |
+
* @private
|
173 |
+
*/
|
174 |
+
[ue]() {
|
175 |
+
if (this.pending !== this.concurrency && this.jobs.length) {
|
176 |
+
const e = this.jobs.shift();
|
177 |
+
this.pending++, e(this[Ce]);
|
178 |
+
}
|
179 |
+
}
|
180 |
+
};
|
181 |
+
var Tt = Ct;
|
182 |
+
const W = S, Te = ne, Lt = Tt, { kStatusCode: tt } = U, Nt = Buffer[Symbol.species], Pt = Buffer.from([0, 0, 255, 255]), se = Symbol("permessage-deflate"), w = Symbol("total-length"), V = Symbol("callback"), C = Symbol("buffers"), J = Symbol("error");
|
183 |
+
let K, Rt = class {
|
184 |
+
/**
|
185 |
+
* Creates a PerMessageDeflate instance.
|
186 |
+
*
|
187 |
+
* @param {Object} [options] Configuration options
|
188 |
+
* @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support
|
189 |
+
* for, or request, a custom client window size
|
190 |
+
* @param {Boolean} [options.clientNoContextTakeover=false] Advertise/
|
191 |
+
* acknowledge disabling of client context takeover
|
192 |
+
* @param {Number} [options.concurrencyLimit=10] The number of concurrent
|
193 |
+
* calls to zlib
|
194 |
+
* @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
|
195 |
+
* use of a custom server window size
|
196 |
+
* @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
|
197 |
+
* disabling of server context takeover
|
198 |
+
* @param {Number} [options.threshold=1024] Size (in bytes) below which
|
199 |
+
* messages should not be compressed if context takeover is disabled
|
200 |
+
* @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on
|
201 |
+
* deflate
|
202 |
+
* @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
|
203 |
+
* inflate
|
204 |
+
* @param {Boolean} [isServer=false] Create the instance in either server or
|
205 |
+
* client mode
|
206 |
+
* @param {Number} [maxPayload=0] The maximum allowed message length
|
207 |
+
*/
|
208 |
+
constructor(e, t, r) {
|
209 |
+
if (this._maxPayload = r | 0, this._options = e || {}, this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024, this._isServer = !!t, this._deflate = null, this._inflate = null, this.params = null, !K) {
|
210 |
+
const i = this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10;
|
211 |
+
K = new Lt(i);
|
212 |
+
}
|
213 |
+
}
|
214 |
+
/**
|
215 |
+
* @type {String}
|
216 |
+
*/
|
217 |
+
static get extensionName() {
|
218 |
+
return "permessage-deflate";
|
219 |
+
}
|
220 |
+
/**
|
221 |
+
* Create an extension negotiation offer.
|
222 |
+
*
|
223 |
+
* @return {Object} Extension parameters
|
224 |
+
* @public
|
225 |
+
*/
|
226 |
+
offer() {
|
227 |
+
const e = {};
|
228 |
+
return this._options.serverNoContextTakeover && (e.server_no_context_takeover = !0), this._options.clientNoContextTakeover && (e.client_no_context_takeover = !0), this._options.serverMaxWindowBits && (e.server_max_window_bits = this._options.serverMaxWindowBits), this._options.clientMaxWindowBits ? e.client_max_window_bits = this._options.clientMaxWindowBits : this._options.clientMaxWindowBits == null && (e.client_max_window_bits = !0), e;
|
229 |
+
}
|
230 |
+
/**
|
231 |
+
* Accept an extension negotiation offer/response.
|
232 |
+
*
|
233 |
+
* @param {Array} configurations The extension negotiation offers/reponse
|
234 |
+
* @return {Object} Accepted configuration
|
235 |
+
* @public
|
236 |
+
*/
|
237 |
+
accept(e) {
|
238 |
+
return e = this.normalizeParams(e), this.params = this._isServer ? this.acceptAsServer(e) : this.acceptAsClient(e), this.params;
|
239 |
+
}
|
240 |
+
/**
|
241 |
+
* Releases all resources used by the extension.
|
242 |
+
*
|
243 |
+
* @public
|
244 |
+
*/
|
245 |
+
cleanup() {
|
246 |
+
if (this._inflate && (this._inflate.close(), this._inflate = null), this._deflate) {
|
247 |
+
const e = this._deflate[V];
|
248 |
+
this._deflate.close(), this._deflate = null, e && e(
|
249 |
+
new Error(
|
250 |
+
"The deflate stream was closed while data was being processed"
|
251 |
+
)
|
252 |
+
);
|
253 |
+
}
|
254 |
+
}
|
255 |
+
/**
|
256 |
+
* Accept an extension negotiation offer.
|
257 |
+
*
|
258 |
+
* @param {Array} offers The extension negotiation offers
|
259 |
+
* @return {Object} Accepted configuration
|
260 |
+
* @private
|
261 |
+
*/
|
262 |
+
acceptAsServer(e) {
|
263 |
+
const t = this._options, r = e.find((i) => !(t.serverNoContextTakeover === !1 && i.server_no_context_takeover || i.server_max_window_bits && (t.serverMaxWindowBits === !1 || typeof t.serverMaxWindowBits == "number" && t.serverMaxWindowBits > i.server_max_window_bits) || typeof t.clientMaxWindowBits == "number" && !i.client_max_window_bits));
|
264 |
+
if (!r)
|
265 |
+
throw new Error("None of the extension offers can be accepted");
|
266 |
+
return t.serverNoContextTakeover && (r.server_no_context_takeover = !0), t.clientNoContextTakeover && (r.client_no_context_takeover = !0), typeof t.serverMaxWindowBits == "number" && (r.server_max_window_bits = t.serverMaxWindowBits), typeof t.clientMaxWindowBits == "number" ? r.client_max_window_bits = t.clientMaxWindowBits : (r.client_max_window_bits === !0 || t.clientMaxWindowBits === !1) && delete r.client_max_window_bits, r;
|
267 |
+
}
|
268 |
+
/**
|
269 |
+
* Accept the extension negotiation response.
|
270 |
+
*
|
271 |
+
* @param {Array} response The extension negotiation response
|
272 |
+
* @return {Object} Accepted configuration
|
273 |
+
* @private
|
274 |
+
*/
|
275 |
+
acceptAsClient(e) {
|
276 |
+
const t = e[0];
|
277 |
+
if (this._options.clientNoContextTakeover === !1 && t.client_no_context_takeover)
|
278 |
+
throw new Error('Unexpected parameter "client_no_context_takeover"');
|
279 |
+
if (!t.client_max_window_bits)
|
280 |
+
typeof this._options.clientMaxWindowBits == "number" && (t.client_max_window_bits = this._options.clientMaxWindowBits);
|
281 |
+
else if (this._options.clientMaxWindowBits === !1 || typeof this._options.clientMaxWindowBits == "number" && t.client_max_window_bits > this._options.clientMaxWindowBits)
|
282 |
+
throw new Error(
|
283 |
+
'Unexpected or invalid parameter "client_max_window_bits"'
|
284 |
+
);
|
285 |
+
return t;
|
286 |
+
}
|
287 |
+
/**
|
288 |
+
* Normalize parameters.
|
289 |
+
*
|
290 |
+
* @param {Array} configurations The extension negotiation offers/reponse
|
291 |
+
* @return {Array} The offers/response with normalized parameters
|
292 |
+
* @private
|
293 |
+
*/
|
294 |
+
normalizeParams(e) {
|
295 |
+
return e.forEach((t) => {
|
296 |
+
Object.keys(t).forEach((r) => {
|
297 |
+
let i = t[r];
|
298 |
+
if (i.length > 1)
|
299 |
+
throw new Error(`Parameter "${r}" must have only a single value`);
|
300 |
+
if (i = i[0], r === "client_max_window_bits") {
|
301 |
+
if (i !== !0) {
|
302 |
+
const n = +i;
|
303 |
+
if (!Number.isInteger(n) || n < 8 || n > 15)
|
304 |
+
throw new TypeError(
|
305 |
+
`Invalid value for parameter "${r}": ${i}`
|
306 |
+
);
|
307 |
+
i = n;
|
308 |
+
} else if (!this._isServer)
|
309 |
+
throw new TypeError(
|
310 |
+
`Invalid value for parameter "${r}": ${i}`
|
311 |
+
);
|
312 |
+
} else if (r === "server_max_window_bits") {
|
313 |
+
const n = +i;
|
314 |
+
if (!Number.isInteger(n) || n < 8 || n > 15)
|
315 |
+
throw new TypeError(
|
316 |
+
`Invalid value for parameter "${r}": ${i}`
|
317 |
+
);
|
318 |
+
i = n;
|
319 |
+
} else if (r === "client_no_context_takeover" || r === "server_no_context_takeover") {
|
320 |
+
if (i !== !0)
|
321 |
+
throw new TypeError(
|
322 |
+
`Invalid value for parameter "${r}": ${i}`
|
323 |
+
);
|
324 |
+
} else
|
325 |
+
throw new Error(`Unknown parameter "${r}"`);
|
326 |
+
t[r] = i;
|
327 |
+
});
|
328 |
+
}), e;
|
329 |
+
}
|
330 |
+
/**
|
331 |
+
* Decompress data. Concurrency limited.
|
332 |
+
*
|
333 |
+
* @param {Buffer} data Compressed data
|
334 |
+
* @param {Boolean} fin Specifies whether or not this is the last fragment
|
335 |
+
* @param {Function} callback Callback
|
336 |
+
* @public
|
337 |
+
*/
|
338 |
+
decompress(e, t, r) {
|
339 |
+
K.add((i) => {
|
340 |
+
this._decompress(e, t, (n, o) => {
|
341 |
+
i(), r(n, o);
|
342 |
+
});
|
343 |
+
});
|
344 |
+
}
|
345 |
+
/**
|
346 |
+
* Compress data. Concurrency limited.
|
347 |
+
*
|
348 |
+
* @param {(Buffer|String)} data Data to compress
|
349 |
+
* @param {Boolean} fin Specifies whether or not this is the last fragment
|
350 |
+
* @param {Function} callback Callback
|
351 |
+
* @public
|
352 |
+
*/
|
353 |
+
compress(e, t, r) {
|
354 |
+
K.add((i) => {
|
355 |
+
this._compress(e, t, (n, o) => {
|
356 |
+
i(), r(n, o);
|
357 |
+
});
|
358 |
+
});
|
359 |
+
}
|
360 |
+
/**
|
361 |
+
* Decompress data.
|
362 |
+
*
|
363 |
+
* @param {Buffer} data Compressed data
|
364 |
+
* @param {Boolean} fin Specifies whether or not this is the last fragment
|
365 |
+
* @param {Function} callback Callback
|
366 |
+
* @private
|
367 |
+
*/
|
368 |
+
_decompress(e, t, r) {
|
369 |
+
const i = this._isServer ? "client" : "server";
|
370 |
+
if (!this._inflate) {
|
371 |
+
const n = `${i}_max_window_bits`, o = typeof this.params[n] != "number" ? W.Z_DEFAULT_WINDOWBITS : this.params[n];
|
372 |
+
this._inflate = W.createInflateRaw({
|
373 |
+
...this._options.zlibInflateOptions,
|
374 |
+
windowBits: o
|
375 |
+
}), this._inflate[se] = this, this._inflate[w] = 0, this._inflate[C] = [], this._inflate.on("error", Bt), this._inflate.on("data", st);
|
376 |
+
}
|
377 |
+
this._inflate[V] = r, this._inflate.write(e), t && this._inflate.write(Pt), this._inflate.flush(() => {
|
378 |
+
const n = this._inflate[J];
|
379 |
+
if (n) {
|
380 |
+
this._inflate.close(), this._inflate = null, r(n);
|
381 |
+
return;
|
382 |
+
}
|
383 |
+
const o = Te.concat(
|
384 |
+
this._inflate[C],
|
385 |
+
this._inflate[w]
|
386 |
+
);
|
387 |
+
this._inflate._readableState.endEmitted ? (this._inflate.close(), this._inflate = null) : (this._inflate[w] = 0, this._inflate[C] = [], t && this.params[`${i}_no_context_takeover`] && this._inflate.reset()), r(null, o);
|
388 |
+
});
|
389 |
+
}
|
390 |
+
/**
|
391 |
+
* Compress data.
|
392 |
+
*
|
393 |
+
* @param {(Buffer|String)} data Data to compress
|
394 |
+
* @param {Boolean} fin Specifies whether or not this is the last fragment
|
395 |
+
* @param {Function} callback Callback
|
396 |
+
* @private
|
397 |
+
*/
|
398 |
+
_compress(e, t, r) {
|
399 |
+
const i = this._isServer ? "server" : "client";
|
400 |
+
if (!this._deflate) {
|
401 |
+
const n = `${i}_max_window_bits`, o = typeof this.params[n] != "number" ? W.Z_DEFAULT_WINDOWBITS : this.params[n];
|
402 |
+
this._deflate = W.createDeflateRaw({
|
403 |
+
...this._options.zlibDeflateOptions,
|
404 |
+
windowBits: o
|
405 |
+
}), this._deflate[w] = 0, this._deflate[C] = [], this._deflate.on("data", Ut);
|
406 |
+
}
|
407 |
+
this._deflate[V] = r, this._deflate.write(e), this._deflate.flush(W.Z_SYNC_FLUSH, () => {
|
408 |
+
if (!this._deflate)
|
409 |
+
return;
|
410 |
+
let n = Te.concat(
|
411 |
+
this._deflate[C],
|
412 |
+
this._deflate[w]
|
413 |
+
);
|
414 |
+
t && (n = new Nt(n.buffer, n.byteOffset, n.length - 4)), this._deflate[V] = null, this._deflate[w] = 0, this._deflate[C] = [], t && this.params[`${i}_no_context_takeover`] && this._deflate.reset(), r(null, n);
|
415 |
+
});
|
416 |
+
}
|
417 |
+
};
|
418 |
+
var oe = Rt;
|
419 |
+
function Ut(s) {
|
420 |
+
this[C].push(s), this[w] += s.length;
|
421 |
+
}
|
422 |
+
function st(s) {
|
423 |
+
if (this[w] += s.length, this[se]._maxPayload < 1 || this[w] <= this[se]._maxPayload) {
|
424 |
+
this[C].push(s);
|
425 |
+
return;
|
426 |
+
}
|
427 |
+
this[J] = new RangeError("Max payload size exceeded"), this[J].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH", this[J][tt] = 1009, this.removeListener("data", st), this.reset();
|
428 |
+
}
|
429 |
+
function Bt(s) {
|
430 |
+
this[se]._inflate = null, s[tt] = 1007, this[V](s);
|
431 |
+
}
|
432 |
+
var re = { exports: {} };
|
433 |
+
const $t = {}, Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
434 |
+
__proto__: null,
|
435 |
+
default: $t
|
436 |
+
}, Symbol.toStringTag, { value: "Module" })), It = /* @__PURE__ */ gt(Mt);
|
437 |
+
var Le;
|
438 |
+
const { isUtf8: Ne } = S, Dt = [
|
439 |
+
0,
|
440 |
+
0,
|
441 |
+
0,
|
442 |
+
0,
|
443 |
+
0,
|
444 |
+
0,
|
445 |
+
0,
|
446 |
+
0,
|
447 |
+
0,
|
448 |
+
0,
|
449 |
+
0,
|
450 |
+
0,
|
451 |
+
0,
|
452 |
+
0,
|
453 |
+
0,
|
454 |
+
0,
|
455 |
+
// 0 - 15
|
456 |
+
0,
|
457 |
+
0,
|
458 |
+
0,
|
459 |
+
0,
|
460 |
+
0,
|
461 |
+
0,
|
462 |
+
0,
|
463 |
+
0,
|
464 |
+
0,
|
465 |
+
0,
|
466 |
+
0,
|
467 |
+
0,
|
468 |
+
0,
|
469 |
+
0,
|
470 |
+
0,
|
471 |
+
0,
|
472 |
+
// 16 - 31
|
473 |
+
0,
|
474 |
+
1,
|
475 |
+
0,
|
476 |
+
1,
|
477 |
+
1,
|
478 |
+
1,
|
479 |
+
1,
|
480 |
+
1,
|
481 |
+
0,
|
482 |
+
0,
|
483 |
+
1,
|
484 |
+
1,
|
485 |
+
0,
|
486 |
+
1,
|
487 |
+
1,
|
488 |
+
0,
|
489 |
+
// 32 - 47
|
490 |
+
1,
|
491 |
+
1,
|
492 |
+
1,
|
493 |
+
1,
|
494 |
+
1,
|
495 |
+
1,
|
496 |
+
1,
|
497 |
+
1,
|
498 |
+
1,
|
499 |
+
1,
|
500 |
+
0,
|
501 |
+
0,
|
502 |
+
0,
|
503 |
+
0,
|
504 |
+
0,
|
505 |
+
0,
|
506 |
+
// 48 - 63
|
507 |
+
0,
|
508 |
+
1,
|
509 |
+
1,
|
510 |
+
1,
|
511 |
+
1,
|
512 |
+
1,
|
513 |
+
1,
|
514 |
+
1,
|
515 |
+
1,
|
516 |
+
1,
|
517 |
+
1,
|
518 |
+
1,
|
519 |
+
1,
|
520 |
+
1,
|
521 |
+
1,
|
522 |
+
1,
|
523 |
+
// 64 - 79
|
524 |
+
1,
|
525 |
+
1,
|
526 |
+
1,
|
527 |
+
1,
|
528 |
+
1,
|
529 |
+
1,
|
530 |
+
1,
|
531 |
+
1,
|
532 |
+
1,
|
533 |
+
1,
|
534 |
+
1,
|
535 |
+
0,
|
536 |
+
0,
|
537 |
+
0,
|
538 |
+
1,
|
539 |
+
1,
|
540 |
+
// 80 - 95
|
541 |
+
1,
|
542 |
+
1,
|
543 |
+
1,
|
544 |
+
1,
|
545 |
+
1,
|
546 |
+
1,
|
547 |
+
1,
|
548 |
+
1,
|
549 |
+
1,
|
550 |
+
1,
|
551 |
+
1,
|
552 |
+
1,
|
553 |
+
1,
|
554 |
+
1,
|
555 |
+
1,
|
556 |
+
1,
|
557 |
+
// 96 - 111
|
558 |
+
1,
|
559 |
+
1,
|
560 |
+
1,
|
561 |
+
1,
|
562 |
+
1,
|
563 |
+
1,
|
564 |
+
1,
|
565 |
+
1,
|
566 |
+
1,
|
567 |
+
1,
|
568 |
+
1,
|
569 |
+
0,
|
570 |
+
1,
|
571 |
+
0,
|
572 |
+
1,
|
573 |
+
0
|
574 |
+
// 112 - 127
|
575 |
+
];
|
576 |
+
function Wt(s) {
|
577 |
+
return s >= 1e3 && s <= 1014 && s !== 1004 && s !== 1005 && s !== 1006 || s >= 3e3 && s <= 4999;
|
578 |
+
}
|
579 |
+
function be(s) {
|
580 |
+
const e = s.length;
|
581 |
+
let t = 0;
|
582 |
+
for (; t < e; )
|
583 |
+
if (!(s[t] & 128))
|
584 |
+
t++;
|
585 |
+
else if ((s[t] & 224) === 192) {
|
586 |
+
if (t + 1 === e || (s[t + 1] & 192) !== 128 || (s[t] & 254) === 192)
|
587 |
+
return !1;
|
588 |
+
t += 2;
|
589 |
+
} else if ((s[t] & 240) === 224) {
|
590 |
+
if (t + 2 >= e || (s[t + 1] & 192) !== 128 || (s[t + 2] & 192) !== 128 || s[t] === 224 && (s[t + 1] & 224) === 128 || // Overlong
|
591 |
+
s[t] === 237 && (s[t + 1] & 224) === 160)
|
592 |
+
return !1;
|
593 |
+
t += 3;
|
594 |
+
} else if ((s[t] & 248) === 240) {
|
595 |
+
if (t + 3 >= e || (s[t + 1] & 192) !== 128 || (s[t + 2] & 192) !== 128 || (s[t + 3] & 192) !== 128 || s[t] === 240 && (s[t + 1] & 240) === 128 || // Overlong
|
596 |
+
s[t] === 244 && s[t + 1] > 143 || s[t] > 244)
|
597 |
+
return !1;
|
598 |
+
t += 4;
|
599 |
+
} else
|
600 |
+
return !1;
|
601 |
+
return !0;
|
602 |
+
}
|
603 |
+
re.exports = {
|
604 |
+
isValidStatusCode: Wt,
|
605 |
+
isValidUTF8: be,
|
606 |
+
tokenChars: Dt
|
607 |
+
};
|
608 |
+
if (Ne)
|
609 |
+
Le = re.exports.isValidUTF8 = function(s) {
|
610 |
+
return s.length < 24 ? be(s) : Ne(s);
|
611 |
+
};
|
612 |
+
else if (!process.env.WS_NO_UTF_8_VALIDATE)
|
613 |
+
try {
|
614 |
+
const s = It;
|
615 |
+
Le = re.exports.isValidUTF8 = function(e) {
|
616 |
+
return e.length < 32 ? be(e) : s(e);
|
617 |
+
};
|
618 |
+
} catch {
|
619 |
+
}
|
620 |
+
var ae = re.exports;
|
621 |
+
const { Writable: At } = S, Pe = oe, {
|
622 |
+
BINARY_TYPES: Ft,
|
623 |
+
EMPTY_BUFFER: Re,
|
624 |
+
kStatusCode: jt,
|
625 |
+
kWebSocket: Gt
|
626 |
+
} = U, { concat: de, toArrayBuffer: Vt, unmask: Ht } = ne, { isValidStatusCode: zt, isValidUTF8: Ue } = ae, X = Buffer[Symbol.species], A = 0, Be = 1, $e = 2, Me = 3, _e = 4, Yt = 5;
|
627 |
+
let qt = class extends At {
|
628 |
+
/**
|
629 |
+
* Creates a Receiver instance.
|
630 |
+
*
|
631 |
+
* @param {Object} [options] Options object
|
632 |
+
* @param {String} [options.binaryType=nodebuffer] The type for binary data
|
633 |
+
* @param {Object} [options.extensions] An object containing the negotiated
|
634 |
+
* extensions
|
635 |
+
* @param {Boolean} [options.isServer=false] Specifies whether to operate in
|
636 |
+
* client or server mode
|
637 |
+
* @param {Number} [options.maxPayload=0] The maximum allowed message length
|
638 |
+
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
639 |
+
* not to skip UTF-8 validation for text and close messages
|
640 |
+
*/
|
641 |
+
constructor(e = {}) {
|
642 |
+
super(), this._binaryType = e.binaryType || Ft[0], this._extensions = e.extensions || {}, this._isServer = !!e.isServer, this._maxPayload = e.maxPayload | 0, this._skipUTF8Validation = !!e.skipUTF8Validation, this[Gt] = void 0, this._bufferedBytes = 0, this._buffers = [], this._compressed = !1, this._payloadLength = 0, this._mask = void 0, this._fragmented = 0, this._masked = !1, this._fin = !1, this._opcode = 0, this._totalPayloadLength = 0, this._messageLength = 0, this._fragments = [], this._state = A, this._loop = !1;
|
643 |
+
}
|
644 |
+
/**
|
645 |
+
* Implements `Writable.prototype._write()`.
|
646 |
+
*
|
647 |
+
* @param {Buffer} chunk The chunk of data to write
|
648 |
+
* @param {String} encoding The character encoding of `chunk`
|
649 |
+
* @param {Function} cb Callback
|
650 |
+
* @private
|
651 |
+
*/
|
652 |
+
_write(e, t, r) {
|
653 |
+
if (this._opcode === 8 && this._state == A)
|
654 |
+
return r();
|
655 |
+
this._bufferedBytes += e.length, this._buffers.push(e), this.startLoop(r);
|
656 |
+
}
|
657 |
+
/**
|
658 |
+
* Consumes `n` bytes from the buffered data.
|
659 |
+
*
|
660 |
+
* @param {Number} n The number of bytes to consume
|
661 |
+
* @return {Buffer} The consumed bytes
|
662 |
+
* @private
|
663 |
+
*/
|
664 |
+
consume(e) {
|
665 |
+
if (this._bufferedBytes -= e, e === this._buffers[0].length)
|
666 |
+
return this._buffers.shift();
|
667 |
+
if (e < this._buffers[0].length) {
|
668 |
+
const r = this._buffers[0];
|
669 |
+
return this._buffers[0] = new X(
|
670 |
+
r.buffer,
|
671 |
+
r.byteOffset + e,
|
672 |
+
r.length - e
|
673 |
+
), new X(r.buffer, r.byteOffset, e);
|
674 |
+
}
|
675 |
+
const t = Buffer.allocUnsafe(e);
|
676 |
+
do {
|
677 |
+
const r = this._buffers[0], i = t.length - e;
|
678 |
+
e >= r.length ? t.set(this._buffers.shift(), i) : (t.set(new Uint8Array(r.buffer, r.byteOffset, e), i), this._buffers[0] = new X(
|
679 |
+
r.buffer,
|
680 |
+
r.byteOffset + e,
|
681 |
+
r.length - e
|
682 |
+
)), e -= r.length;
|
683 |
+
} while (e > 0);
|
684 |
+
return t;
|
685 |
+
}
|
686 |
+
/**
|
687 |
+
* Starts the parsing loop.
|
688 |
+
*
|
689 |
+
* @param {Function} cb Callback
|
690 |
+
* @private
|
691 |
+
*/
|
692 |
+
startLoop(e) {
|
693 |
+
let t;
|
694 |
+
this._loop = !0;
|
695 |
+
do
|
696 |
+
switch (this._state) {
|
697 |
+
case A:
|
698 |
+
t = this.getInfo();
|
699 |
+
break;
|
700 |
+
case Be:
|
701 |
+
t = this.getPayloadLength16();
|
702 |
+
break;
|
703 |
+
case $e:
|
704 |
+
t = this.getPayloadLength64();
|
705 |
+
break;
|
706 |
+
case Me:
|
707 |
+
this.getMask();
|
708 |
+
break;
|
709 |
+
case _e:
|
710 |
+
t = this.getData(e);
|
711 |
+
break;
|
712 |
+
default:
|
713 |
+
this._loop = !1;
|
714 |
+
return;
|
715 |
+
}
|
716 |
+
while (this._loop);
|
717 |
+
e(t);
|
718 |
+
}
|
719 |
+
/**
|
720 |
+
* Reads the first two bytes of a frame.
|
721 |
+
*
|
722 |
+
* @return {(RangeError|undefined)} A possible error
|
723 |
+
* @private
|
724 |
+
*/
|
725 |
+
getInfo() {
|
726 |
+
if (this._bufferedBytes < 2) {
|
727 |
+
this._loop = !1;
|
728 |
+
return;
|
729 |
+
}
|
730 |
+
const e = this.consume(2);
|
731 |
+
if (e[0] & 48)
|
732 |
+
return this._loop = !1, g(
|
733 |
+
RangeError,
|
734 |
+
"RSV2 and RSV3 must be clear",
|
735 |
+
!0,
|
736 |
+
1002,
|
737 |
+
"WS_ERR_UNEXPECTED_RSV_2_3"
|
738 |
+
);
|
739 |
+
const t = (e[0] & 64) === 64;
|
740 |
+
if (t && !this._extensions[Pe.extensionName])
|
741 |
+
return this._loop = !1, g(
|
742 |
+
RangeError,
|
743 |
+
"RSV1 must be clear",
|
744 |
+
!0,
|
745 |
+
1002,
|
746 |
+
"WS_ERR_UNEXPECTED_RSV_1"
|
747 |
+
);
|
748 |
+
if (this._fin = (e[0] & 128) === 128, this._opcode = e[0] & 15, this._payloadLength = e[1] & 127, this._opcode === 0) {
|
749 |
+
if (t)
|
750 |
+
return this._loop = !1, g(
|
751 |
+
RangeError,
|
752 |
+
"RSV1 must be clear",
|
753 |
+
!0,
|
754 |
+
1002,
|
755 |
+
"WS_ERR_UNEXPECTED_RSV_1"
|
756 |
+
);
|
757 |
+
if (!this._fragmented)
|
758 |
+
return this._loop = !1, g(
|
759 |
+
RangeError,
|
760 |
+
"invalid opcode 0",
|
761 |
+
!0,
|
762 |
+
1002,
|
763 |
+
"WS_ERR_INVALID_OPCODE"
|
764 |
+
);
|
765 |
+
this._opcode = this._fragmented;
|
766 |
+
} else if (this._opcode === 1 || this._opcode === 2) {
|
767 |
+
if (this._fragmented)
|
768 |
+
return this._loop = !1, g(
|
769 |
+
RangeError,
|
770 |
+
`invalid opcode ${this._opcode}`,
|
771 |
+
!0,
|
772 |
+
1002,
|
773 |
+
"WS_ERR_INVALID_OPCODE"
|
774 |
+
);
|
775 |
+
this._compressed = t;
|
776 |
+
} else if (this._opcode > 7 && this._opcode < 11) {
|
777 |
+
if (!this._fin)
|
778 |
+
return this._loop = !1, g(
|
779 |
+
RangeError,
|
780 |
+
"FIN must be set",
|
781 |
+
!0,
|
782 |
+
1002,
|
783 |
+
"WS_ERR_EXPECTED_FIN"
|
784 |
+
);
|
785 |
+
if (t)
|
786 |
+
return this._loop = !1, g(
|
787 |
+
RangeError,
|
788 |
+
"RSV1 must be clear",
|
789 |
+
!0,
|
790 |
+
1002,
|
791 |
+
"WS_ERR_UNEXPECTED_RSV_1"
|
792 |
+
);
|
793 |
+
if (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1)
|
794 |
+
return this._loop = !1, g(
|
795 |
+
RangeError,
|
796 |
+
`invalid payload length ${this._payloadLength}`,
|
797 |
+
!0,
|
798 |
+
1002,
|
799 |
+
"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"
|
800 |
+
);
|
801 |
+
} else
|
802 |
+
return this._loop = !1, g(
|
803 |
+
RangeError,
|
804 |
+
`invalid opcode ${this._opcode}`,
|
805 |
+
!0,
|
806 |
+
1002,
|
807 |
+
"WS_ERR_INVALID_OPCODE"
|
808 |
+
);
|
809 |
+
if (!this._fin && !this._fragmented && (this._fragmented = this._opcode), this._masked = (e[1] & 128) === 128, this._isServer) {
|
810 |
+
if (!this._masked)
|
811 |
+
return this._loop = !1, g(
|
812 |
+
RangeError,
|
813 |
+
"MASK must be set",
|
814 |
+
!0,
|
815 |
+
1002,
|
816 |
+
"WS_ERR_EXPECTED_MASK"
|
817 |
+
);
|
818 |
+
} else if (this._masked)
|
819 |
+
return this._loop = !1, g(
|
820 |
+
RangeError,
|
821 |
+
"MASK must be clear",
|
822 |
+
!0,
|
823 |
+
1002,
|
824 |
+
"WS_ERR_UNEXPECTED_MASK"
|
825 |
+
);
|
826 |
+
if (this._payloadLength === 126)
|
827 |
+
this._state = Be;
|
828 |
+
else if (this._payloadLength === 127)
|
829 |
+
this._state = $e;
|
830 |
+
else
|
831 |
+
return this.haveLength();
|
832 |
+
}
|
833 |
+
/**
|
834 |
+
* Gets extended payload length (7+16).
|
835 |
+
*
|
836 |
+
* @return {(RangeError|undefined)} A possible error
|
837 |
+
* @private
|
838 |
+
*/
|
839 |
+
getPayloadLength16() {
|
840 |
+
if (this._bufferedBytes < 2) {
|
841 |
+
this._loop = !1;
|
842 |
+
return;
|
843 |
+
}
|
844 |
+
return this._payloadLength = this.consume(2).readUInt16BE(0), this.haveLength();
|
845 |
+
}
|
846 |
+
/**
|
847 |
+
* Gets extended payload length (7+64).
|
848 |
+
*
|
849 |
+
* @return {(RangeError|undefined)} A possible error
|
850 |
+
* @private
|
851 |
+
*/
|
852 |
+
getPayloadLength64() {
|
853 |
+
if (this._bufferedBytes < 8) {
|
854 |
+
this._loop = !1;
|
855 |
+
return;
|
856 |
+
}
|
857 |
+
const e = this.consume(8), t = e.readUInt32BE(0);
|
858 |
+
return t > Math.pow(2, 53 - 32) - 1 ? (this._loop = !1, g(
|
859 |
+
RangeError,
|
860 |
+
"Unsupported WebSocket frame: payload length > 2^53 - 1",
|
861 |
+
!1,
|
862 |
+
1009,
|
863 |
+
"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"
|
864 |
+
)) : (this._payloadLength = t * Math.pow(2, 32) + e.readUInt32BE(4), this.haveLength());
|
865 |
+
}
|
866 |
+
/**
|
867 |
+
* Payload length has been read.
|
868 |
+
*
|
869 |
+
* @return {(RangeError|undefined)} A possible error
|
870 |
+
* @private
|
871 |
+
*/
|
872 |
+
haveLength() {
|
873 |
+
if (this._payloadLength && this._opcode < 8 && (this._totalPayloadLength += this._payloadLength, this._totalPayloadLength > this._maxPayload && this._maxPayload > 0))
|
874 |
+
return this._loop = !1, g(
|
875 |
+
RangeError,
|
876 |
+
"Max payload size exceeded",
|
877 |
+
!1,
|
878 |
+
1009,
|
879 |
+
"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"
|
880 |
+
);
|
881 |
+
this._masked ? this._state = Me : this._state = _e;
|
882 |
+
}
|
883 |
+
/**
|
884 |
+
* Reads mask bytes.
|
885 |
+
*
|
886 |
+
* @private
|
887 |
+
*/
|
888 |
+
getMask() {
|
889 |
+
if (this._bufferedBytes < 4) {
|
890 |
+
this._loop = !1;
|
891 |
+
return;
|
892 |
+
}
|
893 |
+
this._mask = this.consume(4), this._state = _e;
|
894 |
+
}
|
895 |
+
/**
|
896 |
+
* Reads data bytes.
|
897 |
+
*
|
898 |
+
* @param {Function} cb Callback
|
899 |
+
* @return {(Error|RangeError|undefined)} A possible error
|
900 |
+
* @private
|
901 |
+
*/
|
902 |
+
getData(e) {
|
903 |
+
let t = Re;
|
904 |
+
if (this._payloadLength) {
|
905 |
+
if (this._bufferedBytes < this._payloadLength) {
|
906 |
+
this._loop = !1;
|
907 |
+
return;
|
908 |
+
}
|
909 |
+
t = this.consume(this._payloadLength), this._masked && this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3] && Ht(t, this._mask);
|
910 |
+
}
|
911 |
+
if (this._opcode > 7)
|
912 |
+
return this.controlMessage(t);
|
913 |
+
if (this._compressed) {
|
914 |
+
this._state = Yt, this.decompress(t, e);
|
915 |
+
return;
|
916 |
+
}
|
917 |
+
return t.length && (this._messageLength = this._totalPayloadLength, this._fragments.push(t)), this.dataMessage();
|
918 |
+
}
|
919 |
+
/**
|
920 |
+
* Decompresses data.
|
921 |
+
*
|
922 |
+
* @param {Buffer} data Compressed data
|
923 |
+
* @param {Function} cb Callback
|
924 |
+
* @private
|
925 |
+
*/
|
926 |
+
decompress(e, t) {
|
927 |
+
this._extensions[Pe.extensionName].decompress(e, this._fin, (i, n) => {
|
928 |
+
if (i)
|
929 |
+
return t(i);
|
930 |
+
if (n.length) {
|
931 |
+
if (this._messageLength += n.length, this._messageLength > this._maxPayload && this._maxPayload > 0)
|
932 |
+
return t(
|
933 |
+
g(
|
934 |
+
RangeError,
|
935 |
+
"Max payload size exceeded",
|
936 |
+
!1,
|
937 |
+
1009,
|
938 |
+
"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"
|
939 |
+
)
|
940 |
+
);
|
941 |
+
this._fragments.push(n);
|
942 |
+
}
|
943 |
+
const o = this.dataMessage();
|
944 |
+
if (o)
|
945 |
+
return t(o);
|
946 |
+
this.startLoop(t);
|
947 |
+
});
|
948 |
+
}
|
949 |
+
/**
|
950 |
+
* Handles a data message.
|
951 |
+
*
|
952 |
+
* @return {(Error|undefined)} A possible error
|
953 |
+
* @private
|
954 |
+
*/
|
955 |
+
dataMessage() {
|
956 |
+
if (this._fin) {
|
957 |
+
const e = this._messageLength, t = this._fragments;
|
958 |
+
if (this._totalPayloadLength = 0, this._messageLength = 0, this._fragmented = 0, this._fragments = [], this._opcode === 2) {
|
959 |
+
let r;
|
960 |
+
this._binaryType === "nodebuffer" ? r = de(t, e) : this._binaryType === "arraybuffer" ? r = Vt(de(t, e)) : r = t, this.emit("message", r, !0);
|
961 |
+
} else {
|
962 |
+
const r = de(t, e);
|
963 |
+
if (!this._skipUTF8Validation && !Ue(r))
|
964 |
+
return this._loop = !1, g(
|
965 |
+
Error,
|
966 |
+
"invalid UTF-8 sequence",
|
967 |
+
!0,
|
968 |
+
1007,
|
969 |
+
"WS_ERR_INVALID_UTF8"
|
970 |
+
);
|
971 |
+
this.emit("message", r, !1);
|
972 |
+
}
|
973 |
+
}
|
974 |
+
this._state = A;
|
975 |
+
}
|
976 |
+
/**
|
977 |
+
* Handles a control message.
|
978 |
+
*
|
979 |
+
* @param {Buffer} data Data to handle
|
980 |
+
* @return {(Error|RangeError|undefined)} A possible error
|
981 |
+
* @private
|
982 |
+
*/
|
983 |
+
controlMessage(e) {
|
984 |
+
if (this._opcode === 8)
|
985 |
+
if (this._loop = !1, e.length === 0)
|
986 |
+
this.emit("conclude", 1005, Re), this.end();
|
987 |
+
else {
|
988 |
+
const t = e.readUInt16BE(0);
|
989 |
+
if (!zt(t))
|
990 |
+
return g(
|
991 |
+
RangeError,
|
992 |
+
`invalid status code ${t}`,
|
993 |
+
!0,
|
994 |
+
1002,
|
995 |
+
"WS_ERR_INVALID_CLOSE_CODE"
|
996 |
+
);
|
997 |
+
const r = new X(
|
998 |
+
e.buffer,
|
999 |
+
e.byteOffset + 2,
|
1000 |
+
e.length - 2
|
1001 |
+
);
|
1002 |
+
if (!this._skipUTF8Validation && !Ue(r))
|
1003 |
+
return g(
|
1004 |
+
Error,
|
1005 |
+
"invalid UTF-8 sequence",
|
1006 |
+
!0,
|
1007 |
+
1007,
|
1008 |
+
"WS_ERR_INVALID_UTF8"
|
1009 |
+
);
|
1010 |
+
this.emit("conclude", t, r), this.end();
|
1011 |
+
}
|
1012 |
+
else
|
1013 |
+
this._opcode === 9 ? this.emit("ping", e) : this.emit("pong", e);
|
1014 |
+
this._state = A;
|
1015 |
+
}
|
1016 |
+
};
|
1017 |
+
var rt = qt;
|
1018 |
+
function g(s, e, t, r, i) {
|
1019 |
+
const n = new s(
|
1020 |
+
t ? `Invalid WebSocket frame: ${e}` : e
|
1021 |
+
);
|
1022 |
+
return Error.captureStackTrace(n, g), n.code = i, n[jt] = r, n;
|
1023 |
+
}
|
1024 |
+
const qs = /* @__PURE__ */ z(rt), { randomFillSync: Kt } = S, Ie = oe, { EMPTY_BUFFER: Xt } = U, { isValidStatusCode: Zt } = ae, { mask: De, toBuffer: M } = ne, x = Symbol("kByteLength"), Qt = Buffer.alloc(4);
|
1025 |
+
let Jt = class P {
|
1026 |
+
/**
|
1027 |
+
* Creates a Sender instance.
|
1028 |
+
*
|
1029 |
+
* @param {(net.Socket|tls.Socket)} socket The connection socket
|
1030 |
+
* @param {Object} [extensions] An object containing the negotiated extensions
|
1031 |
+
* @param {Function} [generateMask] The function used to generate the masking
|
1032 |
+
* key
|
1033 |
+
*/
|
1034 |
+
constructor(e, t, r) {
|
1035 |
+
this._extensions = t || {}, r && (this._generateMask = r, this._maskBuffer = Buffer.alloc(4)), this._socket = e, this._firstFragment = !0, this._compress = !1, this._bufferedBytes = 0, this._deflating = !1, this._queue = [];
|
1036 |
+
}
|
1037 |
+
/**
|
1038 |
+
* Frames a piece of data according to the HyBi WebSocket protocol.
|
1039 |
+
*
|
1040 |
+
* @param {(Buffer|String)} data The data to frame
|
1041 |
+
* @param {Object} options Options object
|
1042 |
+
* @param {Boolean} [options.fin=false] Specifies whether or not to set the
|
1043 |
+
* FIN bit
|
1044 |
+
* @param {Function} [options.generateMask] The function used to generate the
|
1045 |
+
* masking key
|
1046 |
+
* @param {Boolean} [options.mask=false] Specifies whether or not to mask
|
1047 |
+
* `data`
|
1048 |
+
* @param {Buffer} [options.maskBuffer] The buffer used to store the masking
|
1049 |
+
* key
|
1050 |
+
* @param {Number} options.opcode The opcode
|
1051 |
+
* @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
|
1052 |
+
* modified
|
1053 |
+
* @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
|
1054 |
+
* RSV1 bit
|
1055 |
+
* @return {(Buffer|String)[]} The framed data
|
1056 |
+
* @public
|
1057 |
+
*/
|
1058 |
+
static frame(e, t) {
|
1059 |
+
let r, i = !1, n = 2, o = !1;
|
1060 |
+
t.mask && (r = t.maskBuffer || Qt, t.generateMask ? t.generateMask(r) : Kt(r, 0, 4), o = (r[0] | r[1] | r[2] | r[3]) === 0, n = 6);
|
1061 |
+
let l;
|
1062 |
+
typeof e == "string" ? (!t.mask || o) && t[x] !== void 0 ? l = t[x] : (e = Buffer.from(e), l = e.length) : (l = e.length, i = t.mask && t.readOnly && !o);
|
1063 |
+
let f = l;
|
1064 |
+
l >= 65536 ? (n += 8, f = 127) : l > 125 && (n += 2, f = 126);
|
1065 |
+
const a = Buffer.allocUnsafe(i ? l + n : n);
|
1066 |
+
return a[0] = t.fin ? t.opcode | 128 : t.opcode, t.rsv1 && (a[0] |= 64), a[1] = f, f === 126 ? a.writeUInt16BE(l, 2) : f === 127 && (a[2] = a[3] = 0, a.writeUIntBE(l, 4, 6)), t.mask ? (a[1] |= 128, a[n - 4] = r[0], a[n - 3] = r[1], a[n - 2] = r[2], a[n - 1] = r[3], o ? [a, e] : i ? (De(e, r, a, n, l), [a]) : (De(e, r, e, 0, l), [a, e])) : [a, e];
|
1067 |
+
}
|
1068 |
+
/**
|
1069 |
+
* Sends a close message to the other peer.
|
1070 |
+
*
|
1071 |
+
* @param {Number} [code] The status code component of the body
|
1072 |
+
* @param {(String|Buffer)} [data] The message component of the body
|
1073 |
+
* @param {Boolean} [mask=false] Specifies whether or not to mask the message
|
1074 |
+
* @param {Function} [cb] Callback
|
1075 |
+
* @public
|
1076 |
+
*/
|
1077 |
+
close(e, t, r, i) {
|
1078 |
+
let n;
|
1079 |
+
if (e === void 0)
|
1080 |
+
n = Xt;
|
1081 |
+
else {
|
1082 |
+
if (typeof e != "number" || !Zt(e))
|
1083 |
+
throw new TypeError("First argument must be a valid error code number");
|
1084 |
+
if (t === void 0 || !t.length)
|
1085 |
+
n = Buffer.allocUnsafe(2), n.writeUInt16BE(e, 0);
|
1086 |
+
else {
|
1087 |
+
const l = Buffer.byteLength(t);
|
1088 |
+
if (l > 123)
|
1089 |
+
throw new RangeError("The message must not be greater than 123 bytes");
|
1090 |
+
n = Buffer.allocUnsafe(2 + l), n.writeUInt16BE(e, 0), typeof t == "string" ? n.write(t, 2) : n.set(t, 2);
|
1091 |
+
}
|
1092 |
+
}
|
1093 |
+
const o = {
|
1094 |
+
[x]: n.length,
|
1095 |
+
fin: !0,
|
1096 |
+
generateMask: this._generateMask,
|
1097 |
+
mask: r,
|
1098 |
+
maskBuffer: this._maskBuffer,
|
1099 |
+
opcode: 8,
|
1100 |
+
readOnly: !1,
|
1101 |
+
rsv1: !1
|
1102 |
+
};
|
1103 |
+
this._deflating ? this.enqueue([this.dispatch, n, !1, o, i]) : this.sendFrame(P.frame(n, o), i);
|
1104 |
+
}
|
1105 |
+
/**
|
1106 |
+
* Sends a ping message to the other peer.
|
1107 |
+
*
|
1108 |
+
* @param {*} data The message to send
|
1109 |
+
* @param {Boolean} [mask=false] Specifies whether or not to mask `data`
|
1110 |
+
* @param {Function} [cb] Callback
|
1111 |
+
* @public
|
1112 |
+
*/
|
1113 |
+
ping(e, t, r) {
|
1114 |
+
let i, n;
|
1115 |
+
if (typeof e == "string" ? (i = Buffer.byteLength(e), n = !1) : (e = M(e), i = e.length, n = M.readOnly), i > 125)
|
1116 |
+
throw new RangeError("The data size must not be greater than 125 bytes");
|
1117 |
+
const o = {
|
1118 |
+
[x]: i,
|
1119 |
+
fin: !0,
|
1120 |
+
generateMask: this._generateMask,
|
1121 |
+
mask: t,
|
1122 |
+
maskBuffer: this._maskBuffer,
|
1123 |
+
opcode: 9,
|
1124 |
+
readOnly: n,
|
1125 |
+
rsv1: !1
|
1126 |
+
};
|
1127 |
+
this._deflating ? this.enqueue([this.dispatch, e, !1, o, r]) : this.sendFrame(P.frame(e, o), r);
|
1128 |
+
}
|
1129 |
+
/**
|
1130 |
+
* Sends a pong message to the other peer.
|
1131 |
+
*
|
1132 |
+
* @param {*} data The message to send
|
1133 |
+
* @param {Boolean} [mask=false] Specifies whether or not to mask `data`
|
1134 |
+
* @param {Function} [cb] Callback
|
1135 |
+
* @public
|
1136 |
+
*/
|
1137 |
+
pong(e, t, r) {
|
1138 |
+
let i, n;
|
1139 |
+
if (typeof e == "string" ? (i = Buffer.byteLength(e), n = !1) : (e = M(e), i = e.length, n = M.readOnly), i > 125)
|
1140 |
+
throw new RangeError("The data size must not be greater than 125 bytes");
|
1141 |
+
const o = {
|
1142 |
+
[x]: i,
|
1143 |
+
fin: !0,
|
1144 |
+
generateMask: this._generateMask,
|
1145 |
+
mask: t,
|
1146 |
+
maskBuffer: this._maskBuffer,
|
1147 |
+
opcode: 10,
|
1148 |
+
readOnly: n,
|
1149 |
+
rsv1: !1
|
1150 |
+
};
|
1151 |
+
this._deflating ? this.enqueue([this.dispatch, e, !1, o, r]) : this.sendFrame(P.frame(e, o), r);
|
1152 |
+
}
|
1153 |
+
/**
|
1154 |
+
* Sends a data message to the other peer.
|
1155 |
+
*
|
1156 |
+
* @param {*} data The message to send
|
1157 |
+
* @param {Object} options Options object
|
1158 |
+
* @param {Boolean} [options.binary=false] Specifies whether `data` is binary
|
1159 |
+
* or text
|
1160 |
+
* @param {Boolean} [options.compress=false] Specifies whether or not to
|
1161 |
+
* compress `data`
|
1162 |
+
* @param {Boolean} [options.fin=false] Specifies whether the fragment is the
|
1163 |
+
* last one
|
1164 |
+
* @param {Boolean} [options.mask=false] Specifies whether or not to mask
|
1165 |
+
* `data`
|
1166 |
+
* @param {Function} [cb] Callback
|
1167 |
+
* @public
|
1168 |
+
*/
|
1169 |
+
send(e, t, r) {
|
1170 |
+
const i = this._extensions[Ie.extensionName];
|
1171 |
+
let n = t.binary ? 2 : 1, o = t.compress, l, f;
|
1172 |
+
if (typeof e == "string" ? (l = Buffer.byteLength(e), f = !1) : (e = M(e), l = e.length, f = M.readOnly), this._firstFragment ? (this._firstFragment = !1, o && i && i.params[i._isServer ? "server_no_context_takeover" : "client_no_context_takeover"] && (o = l >= i._threshold), this._compress = o) : (o = !1, n = 0), t.fin && (this._firstFragment = !0), i) {
|
1173 |
+
const a = {
|
1174 |
+
[x]: l,
|
1175 |
+
fin: t.fin,
|
1176 |
+
generateMask: this._generateMask,
|
1177 |
+
mask: t.mask,
|
1178 |
+
maskBuffer: this._maskBuffer,
|
1179 |
+
opcode: n,
|
1180 |
+
readOnly: f,
|
1181 |
+
rsv1: o
|
1182 |
+
};
|
1183 |
+
this._deflating ? this.enqueue([this.dispatch, e, this._compress, a, r]) : this.dispatch(e, this._compress, a, r);
|
1184 |
+
} else
|
1185 |
+
this.sendFrame(
|
1186 |
+
P.frame(e, {
|
1187 |
+
[x]: l,
|
1188 |
+
fin: t.fin,
|
1189 |
+
generateMask: this._generateMask,
|
1190 |
+
mask: t.mask,
|
1191 |
+
maskBuffer: this._maskBuffer,
|
1192 |
+
opcode: n,
|
1193 |
+
readOnly: f,
|
1194 |
+
rsv1: !1
|
1195 |
+
}),
|
1196 |
+
r
|
1197 |
+
);
|
1198 |
+
}
|
1199 |
+
/**
|
1200 |
+
* Dispatches a message.
|
1201 |
+
*
|
1202 |
+
* @param {(Buffer|String)} data The message to send
|
1203 |
+
* @param {Boolean} [compress=false] Specifies whether or not to compress
|
1204 |
+
* `data`
|
1205 |
+
* @param {Object} options Options object
|
1206 |
+
* @param {Boolean} [options.fin=false] Specifies whether or not to set the
|
1207 |
+
* FIN bit
|
1208 |
+
* @param {Function} [options.generateMask] The function used to generate the
|
1209 |
+
* masking key
|
1210 |
+
* @param {Boolean} [options.mask=false] Specifies whether or not to mask
|
1211 |
+
* `data`
|
1212 |
+
* @param {Buffer} [options.maskBuffer] The buffer used to store the masking
|
1213 |
+
* key
|
1214 |
+
* @param {Number} options.opcode The opcode
|
1215 |
+
* @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
|
1216 |
+
* modified
|
1217 |
+
* @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
|
1218 |
+
* RSV1 bit
|
1219 |
+
* @param {Function} [cb] Callback
|
1220 |
+
* @private
|
1221 |
+
*/
|
1222 |
+
dispatch(e, t, r, i) {
|
1223 |
+
if (!t) {
|
1224 |
+
this.sendFrame(P.frame(e, r), i);
|
1225 |
+
return;
|
1226 |
+
}
|
1227 |
+
const n = this._extensions[Ie.extensionName];
|
1228 |
+
this._bufferedBytes += r[x], this._deflating = !0, n.compress(e, r.fin, (o, l) => {
|
1229 |
+
if (this._socket.destroyed) {
|
1230 |
+
const f = new Error(
|
1231 |
+
"The socket was closed while data was being compressed"
|
1232 |
+
);
|
1233 |
+
typeof i == "function" && i(f);
|
1234 |
+
for (let a = 0; a < this._queue.length; a++) {
|
1235 |
+
const c = this._queue[a], h = c[c.length - 1];
|
1236 |
+
typeof h == "function" && h(f);
|
1237 |
+
}
|
1238 |
+
return;
|
1239 |
+
}
|
1240 |
+
this._bufferedBytes -= r[x], this._deflating = !1, r.readOnly = !1, this.sendFrame(P.frame(l, r), i), this.dequeue();
|
1241 |
+
});
|
1242 |
+
}
|
1243 |
+
/**
|
1244 |
+
* Executes queued send operations.
|
1245 |
+
*
|
1246 |
+
* @private
|
1247 |
+
*/
|
1248 |
+
dequeue() {
|
1249 |
+
for (; !this._deflating && this._queue.length; ) {
|
1250 |
+
const e = this._queue.shift();
|
1251 |
+
this._bufferedBytes -= e[3][x], Reflect.apply(e[0], this, e.slice(1));
|
1252 |
+
}
|
1253 |
+
}
|
1254 |
+
/**
|
1255 |
+
* Enqueues a send operation.
|
1256 |
+
*
|
1257 |
+
* @param {Array} params Send operation parameters.
|
1258 |
+
* @private
|
1259 |
+
*/
|
1260 |
+
enqueue(e) {
|
1261 |
+
this._bufferedBytes += e[3][x], this._queue.push(e);
|
1262 |
+
}
|
1263 |
+
/**
|
1264 |
+
* Sends a frame.
|
1265 |
+
*
|
1266 |
+
* @param {Buffer[]} list The frame to send
|
1267 |
+
* @param {Function} [cb] Callback
|
1268 |
+
* @private
|
1269 |
+
*/
|
1270 |
+
sendFrame(e, t) {
|
1271 |
+
e.length === 2 ? (this._socket.cork(), this._socket.write(e[0]), this._socket.write(e[1], t), this._socket.uncork()) : this._socket.write(e[0], t);
|
1272 |
+
}
|
1273 |
+
};
|
1274 |
+
var it = Jt;
|
1275 |
+
const Ks = /* @__PURE__ */ z(it), { kForOnEventAttribute: F, kListener: pe } = U, We = Symbol("kCode"), Ae = Symbol("kData"), Fe = Symbol("kError"), je = Symbol("kMessage"), Ge = Symbol("kReason"), I = Symbol("kTarget"), Ve = Symbol("kType"), He = Symbol("kWasClean");
|
1276 |
+
class B {
|
1277 |
+
/**
|
1278 |
+
* Create a new `Event`.
|
1279 |
+
*
|
1280 |
+
* @param {String} type The name of the event
|
1281 |
+
* @throws {TypeError} If the `type` argument is not specified
|
1282 |
+
*/
|
1283 |
+
constructor(e) {
|
1284 |
+
this[I] = null, this[Ve] = e;
|
1285 |
+
}
|
1286 |
+
/**
|
1287 |
+
* @type {*}
|
1288 |
+
*/
|
1289 |
+
get target() {
|
1290 |
+
return this[I];
|
1291 |
+
}
|
1292 |
+
/**
|
1293 |
+
* @type {String}
|
1294 |
+
*/
|
1295 |
+
get type() {
|
1296 |
+
return this[Ve];
|
1297 |
+
}
|
1298 |
+
}
|
1299 |
+
Object.defineProperty(B.prototype, "target", { enumerable: !0 });
|
1300 |
+
Object.defineProperty(B.prototype, "type", { enumerable: !0 });
|
1301 |
+
class Y extends B {
|
1302 |
+
/**
|
1303 |
+
* Create a new `CloseEvent`.
|
1304 |
+
*
|
1305 |
+
* @param {String} type The name of the event
|
1306 |
+
* @param {Object} [options] A dictionary object that allows for setting
|
1307 |
+
* attributes via object members of the same name
|
1308 |
+
* @param {Number} [options.code=0] The status code explaining why the
|
1309 |
+
* connection was closed
|
1310 |
+
* @param {String} [options.reason=''] A human-readable string explaining why
|
1311 |
+
* the connection was closed
|
1312 |
+
* @param {Boolean} [options.wasClean=false] Indicates whether or not the
|
1313 |
+
* connection was cleanly closed
|
1314 |
+
*/
|
1315 |
+
constructor(e, t = {}) {
|
1316 |
+
super(e), this[We] = t.code === void 0 ? 0 : t.code, this[Ge] = t.reason === void 0 ? "" : t.reason, this[He] = t.wasClean === void 0 ? !1 : t.wasClean;
|
1317 |
+
}
|
1318 |
+
/**
|
1319 |
+
* @type {Number}
|
1320 |
+
*/
|
1321 |
+
get code() {
|
1322 |
+
return this[We];
|
1323 |
+
}
|
1324 |
+
/**
|
1325 |
+
* @type {String}
|
1326 |
+
*/
|
1327 |
+
get reason() {
|
1328 |
+
return this[Ge];
|
1329 |
+
}
|
1330 |
+
/**
|
1331 |
+
* @type {Boolean}
|
1332 |
+
*/
|
1333 |
+
get wasClean() {
|
1334 |
+
return this[He];
|
1335 |
+
}
|
1336 |
+
}
|
1337 |
+
Object.defineProperty(Y.prototype, "code", { enumerable: !0 });
|
1338 |
+
Object.defineProperty(Y.prototype, "reason", { enumerable: !0 });
|
1339 |
+
Object.defineProperty(Y.prototype, "wasClean", { enumerable: !0 });
|
1340 |
+
class le extends B {
|
1341 |
+
/**
|
1342 |
+
* Create a new `ErrorEvent`.
|
1343 |
+
*
|
1344 |
+
* @param {String} type The name of the event
|
1345 |
+
* @param {Object} [options] A dictionary object that allows for setting
|
1346 |
+
* attributes via object members of the same name
|
1347 |
+
* @param {*} [options.error=null] The error that generated this event
|
1348 |
+
* @param {String} [options.message=''] The error message
|
1349 |
+
*/
|
1350 |
+
constructor(e, t = {}) {
|
1351 |
+
super(e), this[Fe] = t.error === void 0 ? null : t.error, this[je] = t.message === void 0 ? "" : t.message;
|
1352 |
+
}
|
1353 |
+
/**
|
1354 |
+
* @type {*}
|
1355 |
+
*/
|
1356 |
+
get error() {
|
1357 |
+
return this[Fe];
|
1358 |
+
}
|
1359 |
+
/**
|
1360 |
+
* @type {String}
|
1361 |
+
*/
|
1362 |
+
get message() {
|
1363 |
+
return this[je];
|
1364 |
+
}
|
1365 |
+
}
|
1366 |
+
Object.defineProperty(le.prototype, "error", { enumerable: !0 });
|
1367 |
+
Object.defineProperty(le.prototype, "message", { enumerable: !0 });
|
1368 |
+
class xe extends B {
|
1369 |
+
/**
|
1370 |
+
* Create a new `MessageEvent`.
|
1371 |
+
*
|
1372 |
+
* @param {String} type The name of the event
|
1373 |
+
* @param {Object} [options] A dictionary object that allows for setting
|
1374 |
+
* attributes via object members of the same name
|
1375 |
+
* @param {*} [options.data=null] The message content
|
1376 |
+
*/
|
1377 |
+
constructor(e, t = {}) {
|
1378 |
+
super(e), this[Ae] = t.data === void 0 ? null : t.data;
|
1379 |
+
}
|
1380 |
+
/**
|
1381 |
+
* @type {*}
|
1382 |
+
*/
|
1383 |
+
get data() {
|
1384 |
+
return this[Ae];
|
1385 |
+
}
|
1386 |
+
}
|
1387 |
+
Object.defineProperty(xe.prototype, "data", { enumerable: !0 });
|
1388 |
+
const es = {
|
1389 |
+
/**
|
1390 |
+
* Register an event listener.
|
1391 |
+
*
|
1392 |
+
* @param {String} type A string representing the event type to listen for
|
1393 |
+
* @param {(Function|Object)} handler The listener to add
|
1394 |
+
* @param {Object} [options] An options object specifies characteristics about
|
1395 |
+
* the event listener
|
1396 |
+
* @param {Boolean} [options.once=false] A `Boolean` indicating that the
|
1397 |
+
* listener should be invoked at most once after being added. If `true`,
|
1398 |
+
* the listener would be automatically removed when invoked.
|
1399 |
+
* @public
|
1400 |
+
*/
|
1401 |
+
addEventListener(s, e, t = {}) {
|
1402 |
+
for (const i of this.listeners(s))
|
1403 |
+
if (!t[F] && i[pe] === e && !i[F])
|
1404 |
+
return;
|
1405 |
+
let r;
|
1406 |
+
if (s === "message")
|
1407 |
+
r = function(n, o) {
|
1408 |
+
const l = new xe("message", {
|
1409 |
+
data: o ? n : n.toString()
|
1410 |
+
});
|
1411 |
+
l[I] = this, Z(e, this, l);
|
1412 |
+
};
|
1413 |
+
else if (s === "close")
|
1414 |
+
r = function(n, o) {
|
1415 |
+
const l = new Y("close", {
|
1416 |
+
code: n,
|
1417 |
+
reason: o.toString(),
|
1418 |
+
wasClean: this._closeFrameReceived && this._closeFrameSent
|
1419 |
+
});
|
1420 |
+
l[I] = this, Z(e, this, l);
|
1421 |
+
};
|
1422 |
+
else if (s === "error")
|
1423 |
+
r = function(n) {
|
1424 |
+
const o = new le("error", {
|
1425 |
+
error: n,
|
1426 |
+
message: n.message
|
1427 |
+
});
|
1428 |
+
o[I] = this, Z(e, this, o);
|
1429 |
+
};
|
1430 |
+
else if (s === "open")
|
1431 |
+
r = function() {
|
1432 |
+
const n = new B("open");
|
1433 |
+
n[I] = this, Z(e, this, n);
|
1434 |
+
};
|
1435 |
+
else
|
1436 |
+
return;
|
1437 |
+
r[F] = !!t[F], r[pe] = e, t.once ? this.once(s, r) : this.on(s, r);
|
1438 |
+
},
|
1439 |
+
/**
|
1440 |
+
* Remove an event listener.
|
1441 |
+
*
|
1442 |
+
* @param {String} type A string representing the event type to remove
|
1443 |
+
* @param {(Function|Object)} handler The listener to remove
|
1444 |
+
* @public
|
1445 |
+
*/
|
1446 |
+
removeEventListener(s, e) {
|
1447 |
+
for (const t of this.listeners(s))
|
1448 |
+
if (t[pe] === e && !t[F]) {
|
1449 |
+
this.removeListener(s, t);
|
1450 |
+
break;
|
1451 |
+
}
|
1452 |
+
}
|
1453 |
+
};
|
1454 |
+
var ts = {
|
1455 |
+
CloseEvent: Y,
|
1456 |
+
ErrorEvent: le,
|
1457 |
+
Event: B,
|
1458 |
+
EventTarget: es,
|
1459 |
+
MessageEvent: xe
|
1460 |
+
};
|
1461 |
+
function Z(s, e, t) {
|
1462 |
+
typeof s == "object" && s.handleEvent ? s.handleEvent.call(s, t) : s.call(e, t);
|
1463 |
+
}
|
1464 |
+
const { tokenChars: j } = ae;
|
1465 |
+
function k(s, e, t) {
|
1466 |
+
s[e] === void 0 ? s[e] = [t] : s[e].push(t);
|
1467 |
+
}
|
1468 |
+
function ss(s) {
|
1469 |
+
const e = /* @__PURE__ */ Object.create(null);
|
1470 |
+
let t = /* @__PURE__ */ Object.create(null), r = !1, i = !1, n = !1, o, l, f = -1, a = -1, c = -1, h = 0;
|
1471 |
+
for (; h < s.length; h++)
|
1472 |
+
if (a = s.charCodeAt(h), o === void 0)
|
1473 |
+
if (c === -1 && j[a] === 1)
|
1474 |
+
f === -1 && (f = h);
|
1475 |
+
else if (h !== 0 && (a === 32 || a === 9))
|
1476 |
+
c === -1 && f !== -1 && (c = h);
|
1477 |
+
else if (a === 59 || a === 44) {
|
1478 |
+
if (f === -1)
|
1479 |
+
throw new SyntaxError(`Unexpected character at index ${h}`);
|
1480 |
+
c === -1 && (c = h);
|
1481 |
+
const v = s.slice(f, c);
|
1482 |
+
a === 44 ? (k(e, v, t), t = /* @__PURE__ */ Object.create(null)) : o = v, f = c = -1;
|
1483 |
+
} else
|
1484 |
+
throw new SyntaxError(`Unexpected character at index ${h}`);
|
1485 |
+
else if (l === void 0)
|
1486 |
+
if (c === -1 && j[a] === 1)
|
1487 |
+
f === -1 && (f = h);
|
1488 |
+
else if (a === 32 || a === 9)
|
1489 |
+
c === -1 && f !== -1 && (c = h);
|
1490 |
+
else if (a === 59 || a === 44) {
|
1491 |
+
if (f === -1)
|
1492 |
+
throw new SyntaxError(`Unexpected character at index ${h}`);
|
1493 |
+
c === -1 && (c = h), k(t, s.slice(f, c), !0), a === 44 && (k(e, o, t), t = /* @__PURE__ */ Object.create(null), o = void 0), f = c = -1;
|
1494 |
+
} else if (a === 61 && f !== -1 && c === -1)
|
1495 |
+
l = s.slice(f, h), f = c = -1;
|
1496 |
+
else
|
1497 |
+
throw new SyntaxError(`Unexpected character at index ${h}`);
|
1498 |
+
else if (i) {
|
1499 |
+
if (j[a] !== 1)
|
1500 |
+
throw new SyntaxError(`Unexpected character at index ${h}`);
|
1501 |
+
f === -1 ? f = h : r || (r = !0), i = !1;
|
1502 |
+
} else if (n)
|
1503 |
+
if (j[a] === 1)
|
1504 |
+
f === -1 && (f = h);
|
1505 |
+
else if (a === 34 && f !== -1)
|
1506 |
+
n = !1, c = h;
|
1507 |
+
else if (a === 92)
|
1508 |
+
i = !0;
|
1509 |
+
else
|
1510 |
+
throw new SyntaxError(`Unexpected character at index ${h}`);
|
1511 |
+
else if (a === 34 && s.charCodeAt(h - 1) === 61)
|
1512 |
+
n = !0;
|
1513 |
+
else if (c === -1 && j[a] === 1)
|
1514 |
+
f === -1 && (f = h);
|
1515 |
+
else if (f !== -1 && (a === 32 || a === 9))
|
1516 |
+
c === -1 && (c = h);
|
1517 |
+
else if (a === 59 || a === 44) {
|
1518 |
+
if (f === -1)
|
1519 |
+
throw new SyntaxError(`Unexpected character at index ${h}`);
|
1520 |
+
c === -1 && (c = h);
|
1521 |
+
let v = s.slice(f, c);
|
1522 |
+
r && (v = v.replace(/\\/g, ""), r = !1), k(t, l, v), a === 44 && (k(e, o, t), t = /* @__PURE__ */ Object.create(null), o = void 0), l = void 0, f = c = -1;
|
1523 |
+
} else
|
1524 |
+
throw new SyntaxError(`Unexpected character at index ${h}`);
|
1525 |
+
if (f === -1 || n || a === 32 || a === 9)
|
1526 |
+
throw new SyntaxError("Unexpected end of input");
|
1527 |
+
c === -1 && (c = h);
|
1528 |
+
const p = s.slice(f, c);
|
1529 |
+
return o === void 0 ? k(e, p, t) : (l === void 0 ? k(t, p, !0) : r ? k(t, l, p.replace(/\\/g, "")) : k(t, l, p), k(e, o, t)), e;
|
1530 |
+
}
|
1531 |
+
function rs(s) {
|
1532 |
+
return Object.keys(s).map((e) => {
|
1533 |
+
let t = s[e];
|
1534 |
+
return Array.isArray(t) || (t = [t]), t.map((r) => [e].concat(
|
1535 |
+
Object.keys(r).map((i) => {
|
1536 |
+
let n = r[i];
|
1537 |
+
return Array.isArray(n) || (n = [n]), n.map((o) => o === !0 ? i : `${i}=${o}`).join("; ");
|
1538 |
+
})
|
1539 |
+
).join("; ")).join(", ");
|
1540 |
+
}).join(", ");
|
1541 |
+
}
|
1542 |
+
var nt = { format: rs, parse: ss };
|
1543 |
+
const is = S, ns = S, os = S, ot = S, as = S, { randomBytes: ls, createHash: fs } = S, { URL: me } = S, T = oe, hs = rt, cs = it, {
|
1544 |
+
BINARY_TYPES: ze,
|
1545 |
+
EMPTY_BUFFER: Q,
|
1546 |
+
GUID: us,
|
1547 |
+
kForOnEventAttribute: ge,
|
1548 |
+
kListener: ds,
|
1549 |
+
kStatusCode: _s,
|
1550 |
+
kWebSocket: y,
|
1551 |
+
NOOP: at
|
1552 |
+
} = U, {
|
1553 |
+
EventTarget: { addEventListener: ps, removeEventListener: ms }
|
1554 |
+
} = ts, { format: gs, parse: ys } = nt, { toBuffer: vs } = ne, Ss = 30 * 1e3, lt = Symbol("kAborted"), ye = [8, 13], O = ["CONNECTING", "OPEN", "CLOSING", "CLOSED"], Es = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;
|
1555 |
+
let m = class d extends is {
|
1556 |
+
/**
|
1557 |
+
* Create a new `WebSocket`.
|
1558 |
+
*
|
1559 |
+
* @param {(String|URL)} address The URL to which to connect
|
1560 |
+
* @param {(String|String[])} [protocols] The subprotocols
|
1561 |
+
* @param {Object} [options] Connection options
|
1562 |
+
*/
|
1563 |
+
constructor(e, t, r) {
|
1564 |
+
super(), this._binaryType = ze[0], this._closeCode = 1006, this._closeFrameReceived = !1, this._closeFrameSent = !1, this._closeMessage = Q, this._closeTimer = null, this._extensions = {}, this._paused = !1, this._protocol = "", this._readyState = d.CONNECTING, this._receiver = null, this._sender = null, this._socket = null, e !== null ? (this._bufferedAmount = 0, this._isServer = !1, this._redirects = 0, t === void 0 ? t = [] : Array.isArray(t) || (typeof t == "object" && t !== null ? (r = t, t = []) : t = [t]), ht(this, e, t, r)) : this._isServer = !0;
|
1565 |
+
}
|
1566 |
+
/**
|
1567 |
+
* This deviates from the WHATWG interface since ws doesn't support the
|
1568 |
+
* required default "blob" type (instead we define a custom "nodebuffer"
|
1569 |
+
* type).
|
1570 |
+
*
|
1571 |
+
* @type {String}
|
1572 |
+
*/
|
1573 |
+
get binaryType() {
|
1574 |
+
return this._binaryType;
|
1575 |
+
}
|
1576 |
+
set binaryType(e) {
|
1577 |
+
ze.includes(e) && (this._binaryType = e, this._receiver && (this._receiver._binaryType = e));
|
1578 |
+
}
|
1579 |
+
/**
|
1580 |
+
* @type {Number}
|
1581 |
+
*/
|
1582 |
+
get bufferedAmount() {
|
1583 |
+
return this._socket ? this._socket._writableState.length + this._sender._bufferedBytes : this._bufferedAmount;
|
1584 |
+
}
|
1585 |
+
/**
|
1586 |
+
* @type {String}
|
1587 |
+
*/
|
1588 |
+
get extensions() {
|
1589 |
+
return Object.keys(this._extensions).join();
|
1590 |
+
}
|
1591 |
+
/**
|
1592 |
+
* @type {Boolean}
|
1593 |
+
*/
|
1594 |
+
get isPaused() {
|
1595 |
+
return this._paused;
|
1596 |
+
}
|
1597 |
+
/**
|
1598 |
+
* @type {Function}
|
1599 |
+
*/
|
1600 |
+
/* istanbul ignore next */
|
1601 |
+
get onclose() {
|
1602 |
+
return null;
|
1603 |
+
}
|
1604 |
+
/**
|
1605 |
+
* @type {Function}
|
1606 |
+
*/
|
1607 |
+
/* istanbul ignore next */
|
1608 |
+
get onerror() {
|
1609 |
+
return null;
|
1610 |
+
}
|
1611 |
+
/**
|
1612 |
+
* @type {Function}
|
1613 |
+
*/
|
1614 |
+
/* istanbul ignore next */
|
1615 |
+
get onopen() {
|
1616 |
+
return null;
|
1617 |
+
}
|
1618 |
+
/**
|
1619 |
+
* @type {Function}
|
1620 |
+
*/
|
1621 |
+
/* istanbul ignore next */
|
1622 |
+
get onmessage() {
|
1623 |
+
return null;
|
1624 |
+
}
|
1625 |
+
/**
|
1626 |
+
* @type {String}
|
1627 |
+
*/
|
1628 |
+
get protocol() {
|
1629 |
+
return this._protocol;
|
1630 |
+
}
|
1631 |
+
/**
|
1632 |
+
* @type {Number}
|
1633 |
+
*/
|
1634 |
+
get readyState() {
|
1635 |
+
return this._readyState;
|
1636 |
+
}
|
1637 |
+
/**
|
1638 |
+
* @type {String}
|
1639 |
+
*/
|
1640 |
+
get url() {
|
1641 |
+
return this._url;
|
1642 |
+
}
|
1643 |
+
/**
|
1644 |
+
* Set up the socket and the internal resources.
|
1645 |
+
*
|
1646 |
+
* @param {(net.Socket|tls.Socket)} socket The network socket between the
|
1647 |
+
* server and client
|
1648 |
+
* @param {Buffer} head The first packet of the upgraded stream
|
1649 |
+
* @param {Object} options Options object
|
1650 |
+
* @param {Function} [options.generateMask] The function used to generate the
|
1651 |
+
* masking key
|
1652 |
+
* @param {Number} [options.maxPayload=0] The maximum allowed message size
|
1653 |
+
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
1654 |
+
* not to skip UTF-8 validation for text and close messages
|
1655 |
+
* @private
|
1656 |
+
*/
|
1657 |
+
setSocket(e, t, r) {
|
1658 |
+
const i = new hs({
|
1659 |
+
binaryType: this.binaryType,
|
1660 |
+
extensions: this._extensions,
|
1661 |
+
isServer: this._isServer,
|
1662 |
+
maxPayload: r.maxPayload,
|
1663 |
+
skipUTF8Validation: r.skipUTF8Validation
|
1664 |
+
});
|
1665 |
+
this._sender = new cs(e, this._extensions, r.generateMask), this._receiver = i, this._socket = e, i[y] = this, e[y] = this, i.on("conclude", ks), i.on("drain", ws), i.on("error", Os), i.on("message", Cs), i.on("ping", Ts), i.on("pong", Ls), e.setTimeout(0), e.setNoDelay(), t.length > 0 && e.unshift(t), e.on("close", ut), e.on("data", fe), e.on("end", dt), e.on("error", _t), this._readyState = d.OPEN, this.emit("open");
|
1666 |
+
}
|
1667 |
+
/**
|
1668 |
+
* Emit the `'close'` event.
|
1669 |
+
*
|
1670 |
+
* @private
|
1671 |
+
*/
|
1672 |
+
emitClose() {
|
1673 |
+
if (!this._socket) {
|
1674 |
+
this._readyState = d.CLOSED, this.emit("close", this._closeCode, this._closeMessage);
|
1675 |
+
return;
|
1676 |
+
}
|
1677 |
+
this._extensions[T.extensionName] && this._extensions[T.extensionName].cleanup(), this._receiver.removeAllListeners(), this._readyState = d.CLOSED, this.emit("close", this._closeCode, this._closeMessage);
|
1678 |
+
}
|
1679 |
+
/**
|
1680 |
+
* Start a closing handshake.
|
1681 |
+
*
|
1682 |
+
* +----------+ +-----------+ +----------+
|
1683 |
+
* - - -|ws.close()|-->|close frame|-->|ws.close()|- - -
|
1684 |
+
* | +----------+ +-----------+ +----------+ |
|
1685 |
+
* +----------+ +-----------+ |
|
1686 |
+
* CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING
|
1687 |
+
* +----------+ +-----------+ |
|
1688 |
+
* | | | +---+ |
|
1689 |
+
* +------------------------+-->|fin| - - - -
|
1690 |
+
* | +---+ | +---+
|
1691 |
+
* - - - - -|fin|<---------------------+
|
1692 |
+
* +---+
|
1693 |
+
*
|
1694 |
+
* @param {Number} [code] Status code explaining why the connection is closing
|
1695 |
+
* @param {(String|Buffer)} [data] The reason why the connection is
|
1696 |
+
* closing
|
1697 |
+
* @public
|
1698 |
+
*/
|
1699 |
+
close(e, t) {
|
1700 |
+
if (this.readyState !== d.CLOSED) {
|
1701 |
+
if (this.readyState === d.CONNECTING) {
|
1702 |
+
const r = "WebSocket was closed before the connection was established";
|
1703 |
+
b(this, this._req, r);
|
1704 |
+
return;
|
1705 |
+
}
|
1706 |
+
if (this.readyState === d.CLOSING) {
|
1707 |
+
this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted) && this._socket.end();
|
1708 |
+
return;
|
1709 |
+
}
|
1710 |
+
this._readyState = d.CLOSING, this._sender.close(e, t, !this._isServer, (r) => {
|
1711 |
+
r || (this._closeFrameSent = !0, (this._closeFrameReceived || this._receiver._writableState.errorEmitted) && this._socket.end());
|
1712 |
+
}), this._closeTimer = setTimeout(
|
1713 |
+
this._socket.destroy.bind(this._socket),
|
1714 |
+
Ss
|
1715 |
+
);
|
1716 |
+
}
|
1717 |
+
}
|
1718 |
+
/**
|
1719 |
+
* Pause the socket.
|
1720 |
+
*
|
1721 |
+
* @public
|
1722 |
+
*/
|
1723 |
+
pause() {
|
1724 |
+
this.readyState === d.CONNECTING || this.readyState === d.CLOSED || (this._paused = !0, this._socket.pause());
|
1725 |
+
}
|
1726 |
+
/**
|
1727 |
+
* Send a ping.
|
1728 |
+
*
|
1729 |
+
* @param {*} [data] The data to send
|
1730 |
+
* @param {Boolean} [mask] Indicates whether or not to mask `data`
|
1731 |
+
* @param {Function} [cb] Callback which is executed when the ping is sent
|
1732 |
+
* @public
|
1733 |
+
*/
|
1734 |
+
ping(e, t, r) {
|
1735 |
+
if (this.readyState === d.CONNECTING)
|
1736 |
+
throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
|
1737 |
+
if (typeof e == "function" ? (r = e, e = t = void 0) : typeof t == "function" && (r = t, t = void 0), typeof e == "number" && (e = e.toString()), this.readyState !== d.OPEN) {
|
1738 |
+
ve(this, e, r);
|
1739 |
+
return;
|
1740 |
+
}
|
1741 |
+
t === void 0 && (t = !this._isServer), this._sender.ping(e || Q, t, r);
|
1742 |
+
}
|
1743 |
+
/**
|
1744 |
+
* Send a pong.
|
1745 |
+
*
|
1746 |
+
* @param {*} [data] The data to send
|
1747 |
+
* @param {Boolean} [mask] Indicates whether or not to mask `data`
|
1748 |
+
* @param {Function} [cb] Callback which is executed when the pong is sent
|
1749 |
+
* @public
|
1750 |
+
*/
|
1751 |
+
pong(e, t, r) {
|
1752 |
+
if (this.readyState === d.CONNECTING)
|
1753 |
+
throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
|
1754 |
+
if (typeof e == "function" ? (r = e, e = t = void 0) : typeof t == "function" && (r = t, t = void 0), typeof e == "number" && (e = e.toString()), this.readyState !== d.OPEN) {
|
1755 |
+
ve(this, e, r);
|
1756 |
+
return;
|
1757 |
+
}
|
1758 |
+
t === void 0 && (t = !this._isServer), this._sender.pong(e || Q, t, r);
|
1759 |
+
}
|
1760 |
+
/**
|
1761 |
+
* Resume the socket.
|
1762 |
+
*
|
1763 |
+
* @public
|
1764 |
+
*/
|
1765 |
+
resume() {
|
1766 |
+
this.readyState === d.CONNECTING || this.readyState === d.CLOSED || (this._paused = !1, this._receiver._writableState.needDrain || this._socket.resume());
|
1767 |
+
}
|
1768 |
+
/**
|
1769 |
+
* Send a data message.
|
1770 |
+
*
|
1771 |
+
* @param {*} data The message to send
|
1772 |
+
* @param {Object} [options] Options object
|
1773 |
+
* @param {Boolean} [options.binary] Specifies whether `data` is binary or
|
1774 |
+
* text
|
1775 |
+
* @param {Boolean} [options.compress] Specifies whether or not to compress
|
1776 |
+
* `data`
|
1777 |
+
* @param {Boolean} [options.fin=true] Specifies whether the fragment is the
|
1778 |
+
* last one
|
1779 |
+
* @param {Boolean} [options.mask] Specifies whether or not to mask `data`
|
1780 |
+
* @param {Function} [cb] Callback which is executed when data is written out
|
1781 |
+
* @public
|
1782 |
+
*/
|
1783 |
+
send(e, t, r) {
|
1784 |
+
if (this.readyState === d.CONNECTING)
|
1785 |
+
throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
|
1786 |
+
if (typeof t == "function" && (r = t, t = {}), typeof e == "number" && (e = e.toString()), this.readyState !== d.OPEN) {
|
1787 |
+
ve(this, e, r);
|
1788 |
+
return;
|
1789 |
+
}
|
1790 |
+
const i = {
|
1791 |
+
binary: typeof e != "string",
|
1792 |
+
mask: !this._isServer,
|
1793 |
+
compress: !0,
|
1794 |
+
fin: !0,
|
1795 |
+
...t
|
1796 |
+
};
|
1797 |
+
this._extensions[T.extensionName] || (i.compress = !1), this._sender.send(e || Q, i, r);
|
1798 |
+
}
|
1799 |
+
/**
|
1800 |
+
* Forcibly close the connection.
|
1801 |
+
*
|
1802 |
+
* @public
|
1803 |
+
*/
|
1804 |
+
terminate() {
|
1805 |
+
if (this.readyState !== d.CLOSED) {
|
1806 |
+
if (this.readyState === d.CONNECTING) {
|
1807 |
+
const e = "WebSocket was closed before the connection was established";
|
1808 |
+
b(this, this._req, e);
|
1809 |
+
return;
|
1810 |
+
}
|
1811 |
+
this._socket && (this._readyState = d.CLOSING, this._socket.destroy());
|
1812 |
+
}
|
1813 |
+
}
|
1814 |
+
};
|
1815 |
+
Object.defineProperty(m, "CONNECTING", {
|
1816 |
+
enumerable: !0,
|
1817 |
+
value: O.indexOf("CONNECTING")
|
1818 |
+
});
|
1819 |
+
Object.defineProperty(m.prototype, "CONNECTING", {
|
1820 |
+
enumerable: !0,
|
1821 |
+
value: O.indexOf("CONNECTING")
|
1822 |
+
});
|
1823 |
+
Object.defineProperty(m, "OPEN", {
|
1824 |
+
enumerable: !0,
|
1825 |
+
value: O.indexOf("OPEN")
|
1826 |
+
});
|
1827 |
+
Object.defineProperty(m.prototype, "OPEN", {
|
1828 |
+
enumerable: !0,
|
1829 |
+
value: O.indexOf("OPEN")
|
1830 |
+
});
|
1831 |
+
Object.defineProperty(m, "CLOSING", {
|
1832 |
+
enumerable: !0,
|
1833 |
+
value: O.indexOf("CLOSING")
|
1834 |
+
});
|
1835 |
+
Object.defineProperty(m.prototype, "CLOSING", {
|
1836 |
+
enumerable: !0,
|
1837 |
+
value: O.indexOf("CLOSING")
|
1838 |
+
});
|
1839 |
+
Object.defineProperty(m, "CLOSED", {
|
1840 |
+
enumerable: !0,
|
1841 |
+
value: O.indexOf("CLOSED")
|
1842 |
+
});
|
1843 |
+
Object.defineProperty(m.prototype, "CLOSED", {
|
1844 |
+
enumerable: !0,
|
1845 |
+
value: O.indexOf("CLOSED")
|
1846 |
+
});
|
1847 |
+
[
|
1848 |
+
"binaryType",
|
1849 |
+
"bufferedAmount",
|
1850 |
+
"extensions",
|
1851 |
+
"isPaused",
|
1852 |
+
"protocol",
|
1853 |
+
"readyState",
|
1854 |
+
"url"
|
1855 |
+
].forEach((s) => {
|
1856 |
+
Object.defineProperty(m.prototype, s, { enumerable: !0 });
|
1857 |
+
});
|
1858 |
+
["open", "error", "close", "message"].forEach((s) => {
|
1859 |
+
Object.defineProperty(m.prototype, `on${s}`, {
|
1860 |
+
enumerable: !0,
|
1861 |
+
get() {
|
1862 |
+
for (const e of this.listeners(s))
|
1863 |
+
if (e[ge])
|
1864 |
+
return e[ds];
|
1865 |
+
return null;
|
1866 |
+
},
|
1867 |
+
set(e) {
|
1868 |
+
for (const t of this.listeners(s))
|
1869 |
+
if (t[ge]) {
|
1870 |
+
this.removeListener(s, t);
|
1871 |
+
break;
|
1872 |
+
}
|
1873 |
+
typeof e == "function" && this.addEventListener(s, e, {
|
1874 |
+
[ge]: !0
|
1875 |
+
});
|
1876 |
+
}
|
1877 |
+
});
|
1878 |
+
});
|
1879 |
+
m.prototype.addEventListener = ps;
|
1880 |
+
m.prototype.removeEventListener = ms;
|
1881 |
+
var ft = m;
|
1882 |
+
function ht(s, e, t, r) {
|
1883 |
+
const i = {
|
1884 |
+
protocolVersion: ye[1],
|
1885 |
+
maxPayload: 104857600,
|
1886 |
+
skipUTF8Validation: !1,
|
1887 |
+
perMessageDeflate: !0,
|
1888 |
+
followRedirects: !1,
|
1889 |
+
maxRedirects: 10,
|
1890 |
+
...r,
|
1891 |
+
createConnection: void 0,
|
1892 |
+
socketPath: void 0,
|
1893 |
+
hostname: void 0,
|
1894 |
+
protocol: void 0,
|
1895 |
+
timeout: void 0,
|
1896 |
+
method: "GET",
|
1897 |
+
host: void 0,
|
1898 |
+
path: void 0,
|
1899 |
+
port: void 0
|
1900 |
+
};
|
1901 |
+
if (!ye.includes(i.protocolVersion))
|
1902 |
+
throw new RangeError(
|
1903 |
+
`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${ye.join(", ")})`
|
1904 |
+
);
|
1905 |
+
let n;
|
1906 |
+
if (e instanceof me)
|
1907 |
+
n = e, s._url = e.href;
|
1908 |
+
else {
|
1909 |
+
try {
|
1910 |
+
n = new me(e);
|
1911 |
+
} catch {
|
1912 |
+
throw new SyntaxError(`Invalid URL: ${e}`);
|
1913 |
+
}
|
1914 |
+
s._url = e;
|
1915 |
+
}
|
1916 |
+
const o = n.protocol === "wss:", l = n.protocol === "ws+unix:";
|
1917 |
+
let f;
|
1918 |
+
if (n.protocol !== "ws:" && !o && !l ? f = `The URL's protocol must be one of "ws:", "wss:", or "ws+unix:"` : l && !n.pathname ? f = "The URL's pathname is empty" : n.hash && (f = "The URL contains a fragment identifier"), f) {
|
1919 |
+
const u = new SyntaxError(f);
|
1920 |
+
if (s._redirects === 0)
|
1921 |
+
throw u;
|
1922 |
+
ee(s, u);
|
1923 |
+
return;
|
1924 |
+
}
|
1925 |
+
const a = o ? 443 : 80, c = ls(16).toString("base64"), h = o ? ns.request : os.request, p = /* @__PURE__ */ new Set();
|
1926 |
+
let v;
|
1927 |
+
if (i.createConnection = o ? xs : bs, i.defaultPort = i.defaultPort || a, i.port = n.port || a, i.host = n.hostname.startsWith("[") ? n.hostname.slice(1, -1) : n.hostname, i.headers = {
|
1928 |
+
...i.headers,
|
1929 |
+
"Sec-WebSocket-Version": i.protocolVersion,
|
1930 |
+
"Sec-WebSocket-Key": c,
|
1931 |
+
Connection: "Upgrade",
|
1932 |
+
Upgrade: "websocket"
|
1933 |
+
}, i.path = n.pathname + n.search, i.timeout = i.handshakeTimeout, i.perMessageDeflate && (v = new T(
|
1934 |
+
i.perMessageDeflate !== !0 ? i.perMessageDeflate : {},
|
1935 |
+
!1,
|
1936 |
+
i.maxPayload
|
1937 |
+
), i.headers["Sec-WebSocket-Extensions"] = gs({
|
1938 |
+
[T.extensionName]: v.offer()
|
1939 |
+
})), t.length) {
|
1940 |
+
for (const u of t) {
|
1941 |
+
if (typeof u != "string" || !Es.test(u) || p.has(u))
|
1942 |
+
throw new SyntaxError(
|
1943 |
+
"An invalid or duplicated subprotocol was specified"
|
1944 |
+
);
|
1945 |
+
p.add(u);
|
1946 |
+
}
|
1947 |
+
i.headers["Sec-WebSocket-Protocol"] = t.join(",");
|
1948 |
+
}
|
1949 |
+
if (i.origin && (i.protocolVersion < 13 ? i.headers["Sec-WebSocket-Origin"] = i.origin : i.headers.Origin = i.origin), (n.username || n.password) && (i.auth = `${n.username}:${n.password}`), l) {
|
1950 |
+
const u = i.path.split(":");
|
1951 |
+
i.socketPath = u[0], i.path = u[1];
|
1952 |
+
}
|
1953 |
+
let _;
|
1954 |
+
if (i.followRedirects) {
|
1955 |
+
if (s._redirects === 0) {
|
1956 |
+
s._originalIpc = l, s._originalSecure = o, s._originalHostOrSocketPath = l ? i.socketPath : n.host;
|
1957 |
+
const u = r && r.headers;
|
1958 |
+
if (r = { ...r, headers: {} }, u)
|
1959 |
+
for (const [E, $] of Object.entries(u))
|
1960 |
+
r.headers[E.toLowerCase()] = $;
|
1961 |
+
} else if (s.listenerCount("redirect") === 0) {
|
1962 |
+
const u = l ? s._originalIpc ? i.socketPath === s._originalHostOrSocketPath : !1 : s._originalIpc ? !1 : n.host === s._originalHostOrSocketPath;
|
1963 |
+
(!u || s._originalSecure && !o) && (delete i.headers.authorization, delete i.headers.cookie, u || delete i.headers.host, i.auth = void 0);
|
1964 |
+
}
|
1965 |
+
i.auth && !r.headers.authorization && (r.headers.authorization = "Basic " + Buffer.from(i.auth).toString("base64")), _ = s._req = h(i), s._redirects && s.emit("redirect", s.url, _);
|
1966 |
+
} else
|
1967 |
+
_ = s._req = h(i);
|
1968 |
+
i.timeout && _.on("timeout", () => {
|
1969 |
+
b(s, _, "Opening handshake has timed out");
|
1970 |
+
}), _.on("error", (u) => {
|
1971 |
+
_ === null || _[lt] || (_ = s._req = null, ee(s, u));
|
1972 |
+
}), _.on("response", (u) => {
|
1973 |
+
const E = u.headers.location, $ = u.statusCode;
|
1974 |
+
if (E && i.followRedirects && $ >= 300 && $ < 400) {
|
1975 |
+
if (++s._redirects > i.maxRedirects) {
|
1976 |
+
b(s, _, "Maximum redirects exceeded");
|
1977 |
+
return;
|
1978 |
+
}
|
1979 |
+
_.abort();
|
1980 |
+
let q;
|
1981 |
+
try {
|
1982 |
+
q = new me(E, e);
|
1983 |
+
} catch {
|
1984 |
+
const L = new SyntaxError(`Invalid URL: ${E}`);
|
1985 |
+
ee(s, L);
|
1986 |
+
return;
|
1987 |
+
}
|
1988 |
+
ht(s, q, t, r);
|
1989 |
+
} else
|
1990 |
+
s.emit("unexpected-response", _, u) || b(
|
1991 |
+
s,
|
1992 |
+
_,
|
1993 |
+
`Unexpected server response: ${u.statusCode}`
|
1994 |
+
);
|
1995 |
+
}), _.on("upgrade", (u, E, $) => {
|
1996 |
+
if (s.emit("upgrade", u), s.readyState !== m.CONNECTING)
|
1997 |
+
return;
|
1998 |
+
if (_ = s._req = null, u.headers.upgrade.toLowerCase() !== "websocket") {
|
1999 |
+
b(s, E, "Invalid Upgrade header");
|
2000 |
+
return;
|
2001 |
+
}
|
2002 |
+
const q = fs("sha1").update(c + us).digest("base64");
|
2003 |
+
if (u.headers["sec-websocket-accept"] !== q) {
|
2004 |
+
b(s, E, "Invalid Sec-WebSocket-Accept header");
|
2005 |
+
return;
|
2006 |
+
}
|
2007 |
+
const D = u.headers["sec-websocket-protocol"];
|
2008 |
+
let L;
|
2009 |
+
if (D !== void 0 ? p.size ? p.has(D) || (L = "Server sent an invalid subprotocol") : L = "Server sent a subprotocol but none was requested" : p.size && (L = "Server sent no subprotocol"), L) {
|
2010 |
+
b(s, E, L);
|
2011 |
+
return;
|
2012 |
+
}
|
2013 |
+
D && (s._protocol = D);
|
2014 |
+
const ke = u.headers["sec-websocket-extensions"];
|
2015 |
+
if (ke !== void 0) {
|
2016 |
+
if (!v) {
|
2017 |
+
b(s, E, "Server sent a Sec-WebSocket-Extensions header but no extension was requested");
|
2018 |
+
return;
|
2019 |
+
}
|
2020 |
+
let he;
|
2021 |
+
try {
|
2022 |
+
he = ys(ke);
|
2023 |
+
} catch {
|
2024 |
+
b(s, E, "Invalid Sec-WebSocket-Extensions header");
|
2025 |
+
return;
|
2026 |
+
}
|
2027 |
+
const we = Object.keys(he);
|
2028 |
+
if (we.length !== 1 || we[0] !== T.extensionName) {
|
2029 |
+
b(s, E, "Server indicated an extension that was not requested");
|
2030 |
+
return;
|
2031 |
+
}
|
2032 |
+
try {
|
2033 |
+
v.accept(he[T.extensionName]);
|
2034 |
+
} catch {
|
2035 |
+
b(s, E, "Invalid Sec-WebSocket-Extensions header");
|
2036 |
+
return;
|
2037 |
+
}
|
2038 |
+
s._extensions[T.extensionName] = v;
|
2039 |
+
}
|
2040 |
+
s.setSocket(E, $, {
|
2041 |
+
generateMask: i.generateMask,
|
2042 |
+
maxPayload: i.maxPayload,
|
2043 |
+
skipUTF8Validation: i.skipUTF8Validation
|
2044 |
+
});
|
2045 |
+
}), i.finishRequest ? i.finishRequest(_, s) : _.end();
|
2046 |
+
}
|
2047 |
+
function ee(s, e) {
|
2048 |
+
s._readyState = m.CLOSING, s.emit("error", e), s.emitClose();
|
2049 |
+
}
|
2050 |
+
function bs(s) {
|
2051 |
+
return s.path = s.socketPath, ot.connect(s);
|
2052 |
+
}
|
2053 |
+
function xs(s) {
|
2054 |
+
return s.path = void 0, !s.servername && s.servername !== "" && (s.servername = ot.isIP(s.host) ? "" : s.host), as.connect(s);
|
2055 |
+
}
|
2056 |
+
function b(s, e, t) {
|
2057 |
+
s._readyState = m.CLOSING;
|
2058 |
+
const r = new Error(t);
|
2059 |
+
Error.captureStackTrace(r, b), e.setHeader ? (e[lt] = !0, e.abort(), e.socket && !e.socket.destroyed && e.socket.destroy(), process.nextTick(ee, s, r)) : (e.destroy(r), e.once("error", s.emit.bind(s, "error")), e.once("close", s.emitClose.bind(s)));
|
2060 |
+
}
|
2061 |
+
function ve(s, e, t) {
|
2062 |
+
if (e) {
|
2063 |
+
const r = vs(e).length;
|
2064 |
+
s._socket ? s._sender._bufferedBytes += r : s._bufferedAmount += r;
|
2065 |
+
}
|
2066 |
+
if (t) {
|
2067 |
+
const r = new Error(
|
2068 |
+
`WebSocket is not open: readyState ${s.readyState} (${O[s.readyState]})`
|
2069 |
+
);
|
2070 |
+
process.nextTick(t, r);
|
2071 |
+
}
|
2072 |
+
}
|
2073 |
+
function ks(s, e) {
|
2074 |
+
const t = this[y];
|
2075 |
+
t._closeFrameReceived = !0, t._closeMessage = e, t._closeCode = s, t._socket[y] !== void 0 && (t._socket.removeListener("data", fe), process.nextTick(ct, t._socket), s === 1005 ? t.close() : t.close(s, e));
|
2076 |
+
}
|
2077 |
+
function ws() {
|
2078 |
+
const s = this[y];
|
2079 |
+
s.isPaused || s._socket.resume();
|
2080 |
+
}
|
2081 |
+
function Os(s) {
|
2082 |
+
const e = this[y];
|
2083 |
+
e._socket[y] !== void 0 && (e._socket.removeListener("data", fe), process.nextTick(ct, e._socket), e.close(s[_s])), e.emit("error", s);
|
2084 |
+
}
|
2085 |
+
function Ye() {
|
2086 |
+
this[y].emitClose();
|
2087 |
+
}
|
2088 |
+
function Cs(s, e) {
|
2089 |
+
this[y].emit("message", s, e);
|
2090 |
+
}
|
2091 |
+
function Ts(s) {
|
2092 |
+
const e = this[y];
|
2093 |
+
e.pong(s, !e._isServer, at), e.emit("ping", s);
|
2094 |
+
}
|
2095 |
+
function Ls(s) {
|
2096 |
+
this[y].emit("pong", s);
|
2097 |
+
}
|
2098 |
+
function ct(s) {
|
2099 |
+
s.resume();
|
2100 |
+
}
|
2101 |
+
function ut() {
|
2102 |
+
const s = this[y];
|
2103 |
+
this.removeListener("close", ut), this.removeListener("data", fe), this.removeListener("end", dt), s._readyState = m.CLOSING;
|
2104 |
+
let e;
|
2105 |
+
!this._readableState.endEmitted && !s._closeFrameReceived && !s._receiver._writableState.errorEmitted && (e = s._socket.read()) !== null && s._receiver.write(e), s._receiver.end(), this[y] = void 0, clearTimeout(s._closeTimer), s._receiver._writableState.finished || s._receiver._writableState.errorEmitted ? s.emitClose() : (s._receiver.on("error", Ye), s._receiver.on("finish", Ye));
|
2106 |
+
}
|
2107 |
+
function fe(s) {
|
2108 |
+
this[y]._receiver.write(s) || this.pause();
|
2109 |
+
}
|
2110 |
+
function dt() {
|
2111 |
+
const s = this[y];
|
2112 |
+
s._readyState = m.CLOSING, s._receiver.end(), this.end();
|
2113 |
+
}
|
2114 |
+
function _t() {
|
2115 |
+
const s = this[y];
|
2116 |
+
this.removeListener("error", _t), this.on("error", at), s && (s._readyState = m.CLOSING, this.destroy());
|
2117 |
+
}
|
2118 |
+
const Xs = /* @__PURE__ */ z(ft), { tokenChars: Ns } = ae;
|
2119 |
+
function Ps(s) {
|
2120 |
+
const e = /* @__PURE__ */ new Set();
|
2121 |
+
let t = -1, r = -1, i = 0;
|
2122 |
+
for (i; i < s.length; i++) {
|
2123 |
+
const o = s.charCodeAt(i);
|
2124 |
+
if (r === -1 && Ns[o] === 1)
|
2125 |
+
t === -1 && (t = i);
|
2126 |
+
else if (i !== 0 && (o === 32 || o === 9))
|
2127 |
+
r === -1 && t !== -1 && (r = i);
|
2128 |
+
else if (o === 44) {
|
2129 |
+
if (t === -1)
|
2130 |
+
throw new SyntaxError(`Unexpected character at index ${i}`);
|
2131 |
+
r === -1 && (r = i);
|
2132 |
+
const l = s.slice(t, r);
|
2133 |
+
if (e.has(l))
|
2134 |
+
throw new SyntaxError(`The "${l}" subprotocol is duplicated`);
|
2135 |
+
e.add(l), t = r = -1;
|
2136 |
+
} else
|
2137 |
+
throw new SyntaxError(`Unexpected character at index ${i}`);
|
2138 |
+
}
|
2139 |
+
if (t === -1 || r !== -1)
|
2140 |
+
throw new SyntaxError("Unexpected end of input");
|
2141 |
+
const n = s.slice(t, i);
|
2142 |
+
if (e.has(n))
|
2143 |
+
throw new SyntaxError(`The "${n}" subprotocol is duplicated`);
|
2144 |
+
return e.add(n), e;
|
2145 |
+
}
|
2146 |
+
var Rs = { parse: Ps };
|
2147 |
+
const Us = S, ie = S, { createHash: Bs } = S, qe = nt, N = oe, $s = Rs, Ms = ft, { GUID: Is, kWebSocket: Ds } = U, Ws = /^[+/0-9A-Za-z]{22}==$/, Ke = 0, Xe = 1, pt = 2;
|
2148 |
+
class As extends Us {
|
2149 |
+
/**
|
2150 |
+
* Create a `WebSocketServer` instance.
|
2151 |
+
*
|
2152 |
+
* @param {Object} options Configuration options
|
2153 |
+
* @param {Number} [options.backlog=511] The maximum length of the queue of
|
2154 |
+
* pending connections
|
2155 |
+
* @param {Boolean} [options.clientTracking=true] Specifies whether or not to
|
2156 |
+
* track clients
|
2157 |
+
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
2158 |
+
* @param {String} [options.host] The hostname where to bind the server
|
2159 |
+
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
2160 |
+
* size
|
2161 |
+
* @param {Boolean} [options.noServer=false] Enable no server mode
|
2162 |
+
* @param {String} [options.path] Accept only connections matching this path
|
2163 |
+
* @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
|
2164 |
+
* permessage-deflate
|
2165 |
+
* @param {Number} [options.port] The port where to bind the server
|
2166 |
+
* @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S
|
2167 |
+
* server to use
|
2168 |
+
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
2169 |
+
* not to skip UTF-8 validation for text and close messages
|
2170 |
+
* @param {Function} [options.verifyClient] A hook to reject connections
|
2171 |
+
* @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket`
|
2172 |
+
* class to use. It must be the `WebSocket` class or class that extends it
|
2173 |
+
* @param {Function} [callback] A listener for the `listening` event
|
2174 |
+
*/
|
2175 |
+
constructor(e, t) {
|
2176 |
+
if (super(), e = {
|
2177 |
+
maxPayload: 100 * 1024 * 1024,
|
2178 |
+
skipUTF8Validation: !1,
|
2179 |
+
perMessageDeflate: !1,
|
2180 |
+
handleProtocols: null,
|
2181 |
+
clientTracking: !0,
|
2182 |
+
verifyClient: null,
|
2183 |
+
noServer: !1,
|
2184 |
+
backlog: null,
|
2185 |
+
// use default (511 as implemented in net.js)
|
2186 |
+
server: null,
|
2187 |
+
host: null,
|
2188 |
+
path: null,
|
2189 |
+
port: null,
|
2190 |
+
WebSocket: Ms,
|
2191 |
+
...e
|
2192 |
+
}, e.port == null && !e.server && !e.noServer || e.port != null && (e.server || e.noServer) || e.server && e.noServer)
|
2193 |
+
throw new TypeError(
|
2194 |
+
'One and only one of the "port", "server", or "noServer" options must be specified'
|
2195 |
+
);
|
2196 |
+
if (e.port != null ? (this._server = ie.createServer((r, i) => {
|
2197 |
+
const n = ie.STATUS_CODES[426];
|
2198 |
+
i.writeHead(426, {
|
2199 |
+
"Content-Length": n.length,
|
2200 |
+
"Content-Type": "text/plain"
|
2201 |
+
}), i.end(n);
|
2202 |
+
}), this._server.listen(
|
2203 |
+
e.port,
|
2204 |
+
e.host,
|
2205 |
+
e.backlog,
|
2206 |
+
t
|
2207 |
+
)) : e.server && (this._server = e.server), this._server) {
|
2208 |
+
const r = this.emit.bind(this, "connection");
|
2209 |
+
this._removeListeners = js(this._server, {
|
2210 |
+
listening: this.emit.bind(this, "listening"),
|
2211 |
+
error: this.emit.bind(this, "error"),
|
2212 |
+
upgrade: (i, n, o) => {
|
2213 |
+
this.handleUpgrade(i, n, o, r);
|
2214 |
+
}
|
2215 |
+
});
|
2216 |
+
}
|
2217 |
+
e.perMessageDeflate === !0 && (e.perMessageDeflate = {}), e.clientTracking && (this.clients = /* @__PURE__ */ new Set(), this._shouldEmitClose = !1), this.options = e, this._state = Ke;
|
2218 |
+
}
|
2219 |
+
/**
|
2220 |
+
* Returns the bound address, the address family name, and port of the server
|
2221 |
+
* as reported by the operating system if listening on an IP socket.
|
2222 |
+
* If the server is listening on a pipe or UNIX domain socket, the name is
|
2223 |
+
* returned as a string.
|
2224 |
+
*
|
2225 |
+
* @return {(Object|String|null)} The address of the server
|
2226 |
+
* @public
|
2227 |
+
*/
|
2228 |
+
address() {
|
2229 |
+
if (this.options.noServer)
|
2230 |
+
throw new Error('The server is operating in "noServer" mode');
|
2231 |
+
return this._server ? this._server.address() : null;
|
2232 |
+
}
|
2233 |
+
/**
|
2234 |
+
* Stop the server from accepting new connections and emit the `'close'` event
|
2235 |
+
* when all existing connections are closed.
|
2236 |
+
*
|
2237 |
+
* @param {Function} [cb] A one-time listener for the `'close'` event
|
2238 |
+
* @public
|
2239 |
+
*/
|
2240 |
+
close(e) {
|
2241 |
+
if (this._state === pt) {
|
2242 |
+
e && this.once("close", () => {
|
2243 |
+
e(new Error("The server is not running"));
|
2244 |
+
}), process.nextTick(G, this);
|
2245 |
+
return;
|
2246 |
+
}
|
2247 |
+
if (e && this.once("close", e), this._state !== Xe)
|
2248 |
+
if (this._state = Xe, this.options.noServer || this.options.server)
|
2249 |
+
this._server && (this._removeListeners(), this._removeListeners = this._server = null), this.clients ? this.clients.size ? this._shouldEmitClose = !0 : process.nextTick(G, this) : process.nextTick(G, this);
|
2250 |
+
else {
|
2251 |
+
const t = this._server;
|
2252 |
+
this._removeListeners(), this._removeListeners = this._server = null, t.close(() => {
|
2253 |
+
G(this);
|
2254 |
+
});
|
2255 |
+
}
|
2256 |
+
}
|
2257 |
+
/**
|
2258 |
+
* See if a given request should be handled by this server instance.
|
2259 |
+
*
|
2260 |
+
* @param {http.IncomingMessage} req Request object to inspect
|
2261 |
+
* @return {Boolean} `true` if the request is valid, else `false`
|
2262 |
+
* @public
|
2263 |
+
*/
|
2264 |
+
shouldHandle(e) {
|
2265 |
+
if (this.options.path) {
|
2266 |
+
const t = e.url.indexOf("?");
|
2267 |
+
if ((t !== -1 ? e.url.slice(0, t) : e.url) !== this.options.path)
|
2268 |
+
return !1;
|
2269 |
+
}
|
2270 |
+
return !0;
|
2271 |
+
}
|
2272 |
+
/**
|
2273 |
+
* Handle a HTTP Upgrade request.
|
2274 |
+
*
|
2275 |
+
* @param {http.IncomingMessage} req The request object
|
2276 |
+
* @param {(net.Socket|tls.Socket)} socket The network socket between the
|
2277 |
+
* server and client
|
2278 |
+
* @param {Buffer} head The first packet of the upgraded stream
|
2279 |
+
* @param {Function} cb Callback
|
2280 |
+
* @public
|
2281 |
+
*/
|
2282 |
+
handleUpgrade(e, t, r, i) {
|
2283 |
+
t.on("error", Ze);
|
2284 |
+
const n = e.headers["sec-websocket-key"], o = +e.headers["sec-websocket-version"];
|
2285 |
+
if (e.method !== "GET") {
|
2286 |
+
R(this, e, t, 405, "Invalid HTTP method");
|
2287 |
+
return;
|
2288 |
+
}
|
2289 |
+
if (e.headers.upgrade.toLowerCase() !== "websocket") {
|
2290 |
+
R(this, e, t, 400, "Invalid Upgrade header");
|
2291 |
+
return;
|
2292 |
+
}
|
2293 |
+
if (!n || !Ws.test(n)) {
|
2294 |
+
R(this, e, t, 400, "Missing or invalid Sec-WebSocket-Key header");
|
2295 |
+
return;
|
2296 |
+
}
|
2297 |
+
if (o !== 8 && o !== 13) {
|
2298 |
+
R(this, e, t, 400, "Missing or invalid Sec-WebSocket-Version header");
|
2299 |
+
return;
|
2300 |
+
}
|
2301 |
+
if (!this.shouldHandle(e)) {
|
2302 |
+
H(t, 400);
|
2303 |
+
return;
|
2304 |
+
}
|
2305 |
+
const l = e.headers["sec-websocket-protocol"];
|
2306 |
+
let f = /* @__PURE__ */ new Set();
|
2307 |
+
if (l !== void 0)
|
2308 |
+
try {
|
2309 |
+
f = $s.parse(l);
|
2310 |
+
} catch {
|
2311 |
+
R(this, e, t, 400, "Invalid Sec-WebSocket-Protocol header");
|
2312 |
+
return;
|
2313 |
+
}
|
2314 |
+
const a = e.headers["sec-websocket-extensions"], c = {};
|
2315 |
+
if (this.options.perMessageDeflate && a !== void 0) {
|
2316 |
+
const h = new N(
|
2317 |
+
this.options.perMessageDeflate,
|
2318 |
+
!0,
|
2319 |
+
this.options.maxPayload
|
2320 |
+
);
|
2321 |
+
try {
|
2322 |
+
const p = qe.parse(a);
|
2323 |
+
p[N.extensionName] && (h.accept(p[N.extensionName]), c[N.extensionName] = h);
|
2324 |
+
} catch {
|
2325 |
+
R(this, e, t, 400, "Invalid or unacceptable Sec-WebSocket-Extensions header");
|
2326 |
+
return;
|
2327 |
+
}
|
2328 |
+
}
|
2329 |
+
if (this.options.verifyClient) {
|
2330 |
+
const h = {
|
2331 |
+
origin: e.headers[`${o === 8 ? "sec-websocket-origin" : "origin"}`],
|
2332 |
+
secure: !!(e.socket.authorized || e.socket.encrypted),
|
2333 |
+
req: e
|
2334 |
+
};
|
2335 |
+
if (this.options.verifyClient.length === 2) {
|
2336 |
+
this.options.verifyClient(h, (p, v, _, u) => {
|
2337 |
+
if (!p)
|
2338 |
+
return H(t, v || 401, _, u);
|
2339 |
+
this.completeUpgrade(
|
2340 |
+
c,
|
2341 |
+
n,
|
2342 |
+
f,
|
2343 |
+
e,
|
2344 |
+
t,
|
2345 |
+
r,
|
2346 |
+
i
|
2347 |
+
);
|
2348 |
+
});
|
2349 |
+
return;
|
2350 |
+
}
|
2351 |
+
if (!this.options.verifyClient(h))
|
2352 |
+
return H(t, 401);
|
2353 |
+
}
|
2354 |
+
this.completeUpgrade(c, n, f, e, t, r, i);
|
2355 |
+
}
|
2356 |
+
/**
|
2357 |
+
* Upgrade the connection to WebSocket.
|
2358 |
+
*
|
2359 |
+
* @param {Object} extensions The accepted extensions
|
2360 |
+
* @param {String} key The value of the `Sec-WebSocket-Key` header
|
2361 |
+
* @param {Set} protocols The subprotocols
|
2362 |
+
* @param {http.IncomingMessage} req The request object
|
2363 |
+
* @param {(net.Socket|tls.Socket)} socket The network socket between the
|
2364 |
+
* server and client
|
2365 |
+
* @param {Buffer} head The first packet of the upgraded stream
|
2366 |
+
* @param {Function} cb Callback
|
2367 |
+
* @throws {Error} If called more than once with the same socket
|
2368 |
+
* @private
|
2369 |
+
*/
|
2370 |
+
completeUpgrade(e, t, r, i, n, o, l) {
|
2371 |
+
if (!n.readable || !n.writable)
|
2372 |
+
return n.destroy();
|
2373 |
+
if (n[Ds])
|
2374 |
+
throw new Error(
|
2375 |
+
"server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration"
|
2376 |
+
);
|
2377 |
+
if (this._state > Ke)
|
2378 |
+
return H(n, 503);
|
2379 |
+
const a = [
|
2380 |
+
"HTTP/1.1 101 Switching Protocols",
|
2381 |
+
"Upgrade: websocket",
|
2382 |
+
"Connection: Upgrade",
|
2383 |
+
`Sec-WebSocket-Accept: ${Bs("sha1").update(t + Is).digest("base64")}`
|
2384 |
+
], c = new this.options.WebSocket(null);
|
2385 |
+
if (r.size) {
|
2386 |
+
const h = this.options.handleProtocols ? this.options.handleProtocols(r, i) : r.values().next().value;
|
2387 |
+
h && (a.push(`Sec-WebSocket-Protocol: ${h}`), c._protocol = h);
|
2388 |
+
}
|
2389 |
+
if (e[N.extensionName]) {
|
2390 |
+
const h = e[N.extensionName].params, p = qe.format({
|
2391 |
+
[N.extensionName]: [h]
|
2392 |
+
});
|
2393 |
+
a.push(`Sec-WebSocket-Extensions: ${p}`), c._extensions = e;
|
2394 |
+
}
|
2395 |
+
this.emit("headers", a, i), n.write(a.concat(`\r
|
2396 |
+
`).join(`\r
|
2397 |
+
`)), n.removeListener("error", Ze), c.setSocket(n, o, {
|
2398 |
+
maxPayload: this.options.maxPayload,
|
2399 |
+
skipUTF8Validation: this.options.skipUTF8Validation
|
2400 |
+
}), this.clients && (this.clients.add(c), c.on("close", () => {
|
2401 |
+
this.clients.delete(c), this._shouldEmitClose && !this.clients.size && process.nextTick(G, this);
|
2402 |
+
})), l(c, i);
|
2403 |
+
}
|
2404 |
+
}
|
2405 |
+
var Fs = As;
|
2406 |
+
function js(s, e) {
|
2407 |
+
for (const t of Object.keys(e))
|
2408 |
+
s.on(t, e[t]);
|
2409 |
+
return function() {
|
2410 |
+
for (const r of Object.keys(e))
|
2411 |
+
s.removeListener(r, e[r]);
|
2412 |
+
};
|
2413 |
+
}
|
2414 |
+
function G(s) {
|
2415 |
+
s._state = pt, s.emit("close");
|
2416 |
+
}
|
2417 |
+
function Ze() {
|
2418 |
+
this.destroy();
|
2419 |
+
}
|
2420 |
+
function H(s, e, t, r) {
|
2421 |
+
t = t || ie.STATUS_CODES[e], r = {
|
2422 |
+
Connection: "close",
|
2423 |
+
"Content-Type": "text/html",
|
2424 |
+
"Content-Length": Buffer.byteLength(t),
|
2425 |
+
...r
|
2426 |
+
}, s.once("finish", s.destroy), s.end(
|
2427 |
+
`HTTP/1.1 ${e} ${ie.STATUS_CODES[e]}\r
|
2428 |
+
` + Object.keys(r).map((i) => `${i}: ${r[i]}`).join(`\r
|
2429 |
+
`) + `\r
|
2430 |
+
\r
|
2431 |
+
` + t
|
2432 |
+
);
|
2433 |
+
}
|
2434 |
+
function R(s, e, t, r, i) {
|
2435 |
+
if (s.listenerCount("wsClientError")) {
|
2436 |
+
const n = new Error(i);
|
2437 |
+
Error.captureStackTrace(n, R), s.emit("wsClientError", n, t, e);
|
2438 |
+
} else
|
2439 |
+
H(t, r, i);
|
2440 |
+
}
|
2441 |
+
const Zs = /* @__PURE__ */ z(Fs);
|
2442 |
+
export {
|
2443 |
+
qs as Receiver,
|
2444 |
+
Ks as Sender,
|
2445 |
+
Xs as WebSocket,
|
2446 |
+
Zs as WebSocketServer,
|
2447 |
+
Vs as createWebSocketStream,
|
2448 |
+
Xs as default
|
2449 |
+
};
|
src/backend/gradio_pannellum/templates/example/index.js
ADDED
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { setContext: te, getContext: v } = window.__gradio__svelte__internal, y = "WORKER_PROXY_CONTEXT_KEY";
|
2 |
+
function k() {
|
3 |
+
return v(y);
|
4 |
+
}
|
5 |
+
function w(l) {
|
6 |
+
return l.host === window.location.host || l.host === "localhost:7860" || l.host === "127.0.0.1:7860" || // Ref: https://github.com/gradio-app/gradio/blob/v3.32.0/js/app/src/Index.svelte#L194
|
7 |
+
l.host === "lite.local";
|
8 |
+
}
|
9 |
+
async function f(l) {
|
10 |
+
if (l == null)
|
11 |
+
return l;
|
12 |
+
const e = new URL(l);
|
13 |
+
if (!w(e) || e.protocol !== "http:" && e.protocol !== "https:")
|
14 |
+
return l;
|
15 |
+
const o = k();
|
16 |
+
if (o == null)
|
17 |
+
return l;
|
18 |
+
const n = e.pathname;
|
19 |
+
return o.httpRequest({
|
20 |
+
method: "GET",
|
21 |
+
path: n,
|
22 |
+
headers: {},
|
23 |
+
query_string: ""
|
24 |
+
}).then((t) => {
|
25 |
+
if (t.status !== 200)
|
26 |
+
throw new Error(`Failed to get file ${n} from the Wasm worker.`);
|
27 |
+
const s = new Blob([t.body], {
|
28 |
+
type: t.headers["Content-Type"]
|
29 |
+
});
|
30 |
+
return URL.createObjectURL(s);
|
31 |
+
});
|
32 |
+
}
|
33 |
+
const {
|
34 |
+
SvelteComponent: C,
|
35 |
+
append: E,
|
36 |
+
assign: c,
|
37 |
+
compute_rest_props: d,
|
38 |
+
detach: u,
|
39 |
+
element: b,
|
40 |
+
empty: R,
|
41 |
+
exclude_internal_props: q,
|
42 |
+
get_spread_update: O,
|
43 |
+
handle_promise: g,
|
44 |
+
init: T,
|
45 |
+
insert: m,
|
46 |
+
noop: i,
|
47 |
+
safe_not_equal: P,
|
48 |
+
set_attributes: h,
|
49 |
+
set_data: U,
|
50 |
+
set_style: W,
|
51 |
+
src_url_equal: K,
|
52 |
+
text: X,
|
53 |
+
toggle_class: p,
|
54 |
+
update_await_block_branch: Y
|
55 |
+
} = window.__gradio__svelte__internal;
|
56 |
+
function L(l) {
|
57 |
+
let e, o = (
|
58 |
+
/*error*/
|
59 |
+
l[3].message + ""
|
60 |
+
), n;
|
61 |
+
return {
|
62 |
+
c() {
|
63 |
+
e = b("p"), n = X(o), W(e, "color", "red");
|
64 |
+
},
|
65 |
+
m(t, s) {
|
66 |
+
m(t, e, s), E(e, n);
|
67 |
+
},
|
68 |
+
p(t, s) {
|
69 |
+
s & /*src*/
|
70 |
+
1 && o !== (o = /*error*/
|
71 |
+
t[3].message + "") && U(n, o);
|
72 |
+
},
|
73 |
+
d(t) {
|
74 |
+
t && u(e);
|
75 |
+
}
|
76 |
+
};
|
77 |
+
}
|
78 |
+
function N(l) {
|
79 |
+
let e, o, n = [
|
80 |
+
{
|
81 |
+
src: o = /*resolved_src*/
|
82 |
+
l[2]
|
83 |
+
},
|
84 |
+
/*$$restProps*/
|
85 |
+
l[1]
|
86 |
+
], t = {};
|
87 |
+
for (let s = 0; s < n.length; s += 1)
|
88 |
+
t = c(t, n[s]);
|
89 |
+
return {
|
90 |
+
c() {
|
91 |
+
e = b("img"), h(e, t), p(e, "svelte-1k8xp4f", !0);
|
92 |
+
},
|
93 |
+
m(s, r) {
|
94 |
+
m(s, e, r);
|
95 |
+
},
|
96 |
+
p(s, r) {
|
97 |
+
h(e, t = O(n, [
|
98 |
+
r & /*src*/
|
99 |
+
1 && !K(e.src, o = /*resolved_src*/
|
100 |
+
s[2]) && { src: o },
|
101 |
+
r & /*$$restProps*/
|
102 |
+
2 && /*$$restProps*/
|
103 |
+
s[1]
|
104 |
+
])), p(e, "svelte-1k8xp4f", !0);
|
105 |
+
},
|
106 |
+
d(s) {
|
107 |
+
s && u(e);
|
108 |
+
}
|
109 |
+
};
|
110 |
+
}
|
111 |
+
function S(l) {
|
112 |
+
return { c: i, m: i, p: i, d: i };
|
113 |
+
}
|
114 |
+
function j(l) {
|
115 |
+
let e, o, n = {
|
116 |
+
ctx: l,
|
117 |
+
current: null,
|
118 |
+
token: null,
|
119 |
+
hasCatch: !0,
|
120 |
+
pending: S,
|
121 |
+
then: N,
|
122 |
+
catch: L,
|
123 |
+
value: 2,
|
124 |
+
error: 3
|
125 |
+
};
|
126 |
+
return g(o = f(
|
127 |
+
/*src*/
|
128 |
+
l[0]
|
129 |
+
), n), {
|
130 |
+
c() {
|
131 |
+
e = R(), n.block.c();
|
132 |
+
},
|
133 |
+
m(t, s) {
|
134 |
+
m(t, e, s), n.block.m(t, n.anchor = s), n.mount = () => e.parentNode, n.anchor = e;
|
135 |
+
},
|
136 |
+
p(t, [s]) {
|
137 |
+
l = t, n.ctx = l, s & /*src*/
|
138 |
+
1 && o !== (o = f(
|
139 |
+
/*src*/
|
140 |
+
l[0]
|
141 |
+
)) && g(o, n) || Y(n, l, s);
|
142 |
+
},
|
143 |
+
i,
|
144 |
+
o: i,
|
145 |
+
d(t) {
|
146 |
+
t && u(e), n.block.d(t), n.token = null, n = null;
|
147 |
+
}
|
148 |
+
};
|
149 |
+
}
|
150 |
+
function I(l, e, o) {
|
151 |
+
const n = ["src"];
|
152 |
+
let t = d(e, n), { src: s = void 0 } = e;
|
153 |
+
return l.$$set = (r) => {
|
154 |
+
e = c(c({}, e), q(r)), o(1, t = d(e, n)), "src" in r && o(0, s = r.src);
|
155 |
+
}, [s, t];
|
156 |
+
}
|
157 |
+
class x extends C {
|
158 |
+
constructor(e) {
|
159 |
+
super(), T(this, e, I, j, P, { src: 0 });
|
160 |
+
}
|
161 |
+
}
|
162 |
+
const {
|
163 |
+
SvelteComponent: z,
|
164 |
+
attr: B,
|
165 |
+
create_component: F,
|
166 |
+
destroy_component: G,
|
167 |
+
detach: A,
|
168 |
+
element: D,
|
169 |
+
init: H,
|
170 |
+
insert: J,
|
171 |
+
mount_component: M,
|
172 |
+
safe_not_equal: Q,
|
173 |
+
toggle_class: _,
|
174 |
+
transition_in: V,
|
175 |
+
transition_out: Z
|
176 |
+
} = window.__gradio__svelte__internal;
|
177 |
+
function $(l) {
|
178 |
+
let e, o, n;
|
179 |
+
return o = new x({
|
180 |
+
props: {
|
181 |
+
src: (
|
182 |
+
/*samples_dir*/
|
183 |
+
l[1] + /*value*/
|
184 |
+
l[0]
|
185 |
+
),
|
186 |
+
alt: ""
|
187 |
+
}
|
188 |
+
}), {
|
189 |
+
c() {
|
190 |
+
e = D("div"), F(o.$$.fragment), B(e, "class", "container svelte-1iqucjz"), _(
|
191 |
+
e,
|
192 |
+
"table",
|
193 |
+
/*type*/
|
194 |
+
l[2] === "table"
|
195 |
+
), _(
|
196 |
+
e,
|
197 |
+
"gallery",
|
198 |
+
/*type*/
|
199 |
+
l[2] === "gallery"
|
200 |
+
), _(
|
201 |
+
e,
|
202 |
+
"selected",
|
203 |
+
/*selected*/
|
204 |
+
l[3]
|
205 |
+
);
|
206 |
+
},
|
207 |
+
m(t, s) {
|
208 |
+
J(t, e, s), M(o, e, null), n = !0;
|
209 |
+
},
|
210 |
+
p(t, [s]) {
|
211 |
+
const r = {};
|
212 |
+
s & /*samples_dir, value*/
|
213 |
+
3 && (r.src = /*samples_dir*/
|
214 |
+
t[1] + /*value*/
|
215 |
+
t[0]), o.$set(r), (!n || s & /*type*/
|
216 |
+
4) && _(
|
217 |
+
e,
|
218 |
+
"table",
|
219 |
+
/*type*/
|
220 |
+
t[2] === "table"
|
221 |
+
), (!n || s & /*type*/
|
222 |
+
4) && _(
|
223 |
+
e,
|
224 |
+
"gallery",
|
225 |
+
/*type*/
|
226 |
+
t[2] === "gallery"
|
227 |
+
), (!n || s & /*selected*/
|
228 |
+
8) && _(
|
229 |
+
e,
|
230 |
+
"selected",
|
231 |
+
/*selected*/
|
232 |
+
t[3]
|
233 |
+
);
|
234 |
+
},
|
235 |
+
i(t) {
|
236 |
+
n || (V(o.$$.fragment, t), n = !0);
|
237 |
+
},
|
238 |
+
o(t) {
|
239 |
+
Z(o.$$.fragment, t), n = !1;
|
240 |
+
},
|
241 |
+
d(t) {
|
242 |
+
t && A(e), G(o);
|
243 |
+
}
|
244 |
+
};
|
245 |
+
}
|
246 |
+
function ee(l, e, o) {
|
247 |
+
let { value: n } = e, { samples_dir: t } = e, { type: s } = e, { selected: r = !1 } = e;
|
248 |
+
return l.$$set = (a) => {
|
249 |
+
"value" in a && o(0, n = a.value), "samples_dir" in a && o(1, t = a.samples_dir), "type" in a && o(2, s = a.type), "selected" in a && o(3, r = a.selected);
|
250 |
+
}, [n, t, s, r];
|
251 |
+
}
|
252 |
+
class ne extends z {
|
253 |
+
constructor(e) {
|
254 |
+
super(), H(this, e, ee, $, Q, {
|
255 |
+
value: 0,
|
256 |
+
samples_dir: 1,
|
257 |
+
type: 2,
|
258 |
+
selected: 3
|
259 |
+
});
|
260 |
+
}
|
261 |
+
}
|
262 |
+
export {
|
263 |
+
ne as default
|
264 |
+
};
|
src/backend/gradio_pannellum/templates/example/style.css
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
img.svelte-1k8xp4f{max-width:100%;max-height:100%;border-radius:var(--radius-lg);max-width:none}.container.selected.svelte-1iqucjz{border-color:var(--border-color-accent)}.container.table.svelte-1iqucjz{margin:0 auto;border:2px solid var(--border-color-primary);border-radius:var(--radius-lg);width:var(--size-20);height:var(--size-20);object-fit:cover}.container.gallery.svelte-1iqucjz{border:2px solid var(--border-color-primary);height:var(--size-20);max-height:var(--size-20);object-fit:cover}
|
src/demo/__init__.py
ADDED
File without changes
|
src/demo/app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import gradio as gr
|
3 |
+
from gradio_pannellum import Pannellum
|
4 |
+
|
5 |
+
|
6 |
+
example = Pannellum().example_inputs()
|
7 |
+
|
8 |
+
demo = gr.Interface(
|
9 |
+
lambda x:x,
|
10 |
+
Pannellum(), # interactive version of your component
|
11 |
+
Pannellum(), # static version of your component
|
12 |
+
examples=[[example]], # uncomment this line to view the "example version" of your component
|
13 |
+
)
|
14 |
+
|
15 |
+
|
16 |
+
demo.launch()
|
src/flagged/log.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
x,output,flag,username,timestamp
|
2 |
+
"{""path"":""flagged/x/6204ba86727afb158f2c/sample.jpeg"",""url"":""http://localhost:7860/file=/tmp/gradio/0be63cd2cb47b1e6a80790b258b035575a2e6f06/sample.jpeg"",""size"":673128,""orig_name"":""sample.jpeg"",""mime_type"":""""}","{""path"":""flagged/output/cede47ebb714a3a805f0/image.png"",""url"":null,""size"":null,""orig_name"":null,""mime_type"":null}",,,2023-11-16 10:19:49.305170
|
src/flagged/output/cede47ebb714a3a805f0/image.png
ADDED
Git LFS Details
|
src/flagged/x/6204ba86727afb158f2c/sample.jpeg
ADDED
src/frontend/Example.svelte
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script lang="ts">
|
2 |
+
import Image from "./shared/Image.svelte";
|
3 |
+
|
4 |
+
export let value: string;
|
5 |
+
export let samples_dir: string;
|
6 |
+
export let type: "gallery" | "table";
|
7 |
+
export let selected = false;
|
8 |
+
</script>
|
9 |
+
|
10 |
+
<div
|
11 |
+
class="container"
|
12 |
+
class:table={type === "table"}
|
13 |
+
class:gallery={type === "gallery"}
|
14 |
+
class:selected
|
15 |
+
>
|
16 |
+
<Image src={samples_dir + value} alt="" />
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<style>
|
20 |
+
.container.selected {
|
21 |
+
border-color: var(--border-color-accent);
|
22 |
+
}
|
23 |
+
|
24 |
+
.container.table {
|
25 |
+
margin: 0 auto;
|
26 |
+
border: 2px solid var(--border-color-primary);
|
27 |
+
border-radius: var(--radius-lg);
|
28 |
+
width: var(--size-20);
|
29 |
+
height: var(--size-20);
|
30 |
+
object-fit: cover;
|
31 |
+
}
|
32 |
+
|
33 |
+
.container.gallery {
|
34 |
+
border: 2px solid var(--border-color-primary);
|
35 |
+
height: var(--size-20);
|
36 |
+
max-height: var(--size-20);
|
37 |
+
object-fit: cover;
|
38 |
+
}
|
39 |
+
</style>
|
src/frontend/Index.svelte
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svelte:options accessors={true} />
|
2 |
+
|
3 |
+
<script context="module" lang="ts">
|
4 |
+
export { default as BaseImageUploader } from "./shared/ImageUploader.svelte";
|
5 |
+
export { default as BaseStaticImage } from "./shared/ImagePreview.svelte";
|
6 |
+
export { default as BaseExample } from "./Example.svelte";
|
7 |
+
</script>
|
8 |
+
|
9 |
+
<script lang="ts">
|
10 |
+
import type { Gradio, SelectData } from "@gradio/utils";
|
11 |
+
import StaticImage from "./shared/ImagePreview.svelte";
|
12 |
+
import ImageUploader from "./shared/ImageUploader.svelte";
|
13 |
+
|
14 |
+
import { Block, Empty, UploadText } from "@gradio/atoms";
|
15 |
+
import { Image } from "@gradio/icons";
|
16 |
+
import { StatusTracker } from "@gradio/statustracker";
|
17 |
+
import type { FileData } from "@gradio/client";
|
18 |
+
import type { LoadingStatus } from "@gradio/statustracker";
|
19 |
+
import { normalise_file } from "@gradio/client";
|
20 |
+
|
21 |
+
export let elem_id = "";
|
22 |
+
export let elem_classes: string[] = [];
|
23 |
+
export let visible = true;
|
24 |
+
export let value: null | FileData = null;
|
25 |
+
$: _value = normalise_file(value, root, proxy_url);
|
26 |
+
export let label: string;
|
27 |
+
export let show_label: boolean;
|
28 |
+
export let show_download_button: boolean;
|
29 |
+
export let root: string;
|
30 |
+
export let proxy_url: null | string;
|
31 |
+
|
32 |
+
export let height: number | undefined;
|
33 |
+
export let width: number | undefined;
|
34 |
+
|
35 |
+
export let container = true;
|
36 |
+
export let scale: number | null = null;
|
37 |
+
export let min_width: number | undefined = undefined;
|
38 |
+
export let loading_status: LoadingStatus;
|
39 |
+
export let show_share_button = false;
|
40 |
+
export let sources: ("clipboard" | "upload")[] = [ "upload", "clipboard" ];
|
41 |
+
export let interactive: boolean;
|
42 |
+
|
43 |
+
export let gradio: Gradio<{
|
44 |
+
change: never;
|
45 |
+
error: string;
|
46 |
+
edit: never;
|
47 |
+
drag: never;
|
48 |
+
upload: never;
|
49 |
+
clear: never;
|
50 |
+
select: SelectData;
|
51 |
+
share: ShareData;
|
52 |
+
}>;
|
53 |
+
|
54 |
+
$: value?.url && gradio.dispatch("change");
|
55 |
+
let dragging: boolean;
|
56 |
+
</script>
|
57 |
+
|
58 |
+
{#if !interactive}
|
59 |
+
<Block
|
60 |
+
{visible}
|
61 |
+
variant={"solid"}
|
62 |
+
border_mode={dragging ? "focus" : "base"}
|
63 |
+
padding={false}
|
64 |
+
{elem_id}
|
65 |
+
{elem_classes}
|
66 |
+
height={height || undefined}
|
67 |
+
{width}
|
68 |
+
allow_overflow={false}
|
69 |
+
{container}
|
70 |
+
{scale}
|
71 |
+
{min_width}
|
72 |
+
>
|
73 |
+
<StatusTracker
|
74 |
+
autoscroll={gradio.autoscroll}
|
75 |
+
i18n={gradio.i18n}
|
76 |
+
{...loading_status}
|
77 |
+
/>
|
78 |
+
<StaticImage
|
79 |
+
on:select={({ detail }) => gradio.dispatch("select", detail)}
|
80 |
+
on:share={({ detail }) => gradio.dispatch("share", detail)}
|
81 |
+
on:error={({ detail }) => gradio.dispatch("error", detail)}
|
82 |
+
value={_value}
|
83 |
+
{label}
|
84 |
+
{show_label}
|
85 |
+
{show_download_button}
|
86 |
+
{show_share_button}
|
87 |
+
i18n={gradio.i18n}
|
88 |
+
/>
|
89 |
+
</Block>
|
90 |
+
{:else}
|
91 |
+
<Block
|
92 |
+
{visible}
|
93 |
+
variant={_value === null ? "dashed" : "solid"}
|
94 |
+
border_mode={dragging ? "focus" : "base"}
|
95 |
+
padding={false}
|
96 |
+
{elem_id}
|
97 |
+
{elem_classes}
|
98 |
+
height={height || undefined}
|
99 |
+
{width}
|
100 |
+
allow_overflow={false}
|
101 |
+
{container}
|
102 |
+
{scale}
|
103 |
+
{min_width}
|
104 |
+
>
|
105 |
+
<StatusTracker
|
106 |
+
autoscroll={gradio.autoscroll}
|
107 |
+
i18n={gradio.i18n}
|
108 |
+
{...loading_status}
|
109 |
+
/>
|
110 |
+
|
111 |
+
<ImageUploader
|
112 |
+
bind:value
|
113 |
+
{root}
|
114 |
+
{sources}
|
115 |
+
on:edit={() => gradio.dispatch("edit")}
|
116 |
+
on:clear={() => gradio.dispatch("clear")}
|
117 |
+
on:drag={({ detail }) => (dragging = detail)}
|
118 |
+
on:upload={() => gradio.dispatch("upload")}
|
119 |
+
on:select={({ detail }) => gradio.dispatch("select", detail)}
|
120 |
+
on:share={({ detail }) => gradio.dispatch("share", detail)}
|
121 |
+
on:error={({ detail }) => {
|
122 |
+
loading_status = loading_status || {};
|
123 |
+
loading_status.status = "error";
|
124 |
+
gradio.dispatch("error", detail);
|
125 |
+
}}
|
126 |
+
on:click={() => gradio.dispatch("error", "bad thing happened")}
|
127 |
+
on:error
|
128 |
+
{label}
|
129 |
+
{show_label}
|
130 |
+
i18n={gradio.i18n}
|
131 |
+
>
|
132 |
+
{#if sources.includes("upload")}
|
133 |
+
<UploadText i18n={gradio.i18n} type="image" mode="short" />
|
134 |
+
{:else}
|
135 |
+
<Empty unpadded_box={true} size="large"><Image /></Empty>
|
136 |
+
{/if}
|
137 |
+
</ImageUploader>
|
138 |
+
</Block>
|
139 |
+
{/if}
|
src/frontend/package-lock.json
ADDED
@@ -0,0 +1,1766 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "gradio_pannellum",
|
3 |
+
"version": "0.3.5",
|
4 |
+
"lockfileVersion": 2,
|
5 |
+
"requires": true,
|
6 |
+
"packages": {
|
7 |
+
"": {
|
8 |
+
"name": "gradio_pannellum",
|
9 |
+
"version": "0.3.5",
|
10 |
+
"license": "ISC",
|
11 |
+
"dependencies": {
|
12 |
+
"@gradio/atoms": "0.2.1",
|
13 |
+
"@gradio/client": "0.8.1",
|
14 |
+
"@gradio/icons": "0.2.0",
|
15 |
+
"@gradio/statustracker": "0.3.1",
|
16 |
+
"@gradio/upload": "0.4.1",
|
17 |
+
"@gradio/utils": "0.2.0",
|
18 |
+
"@gradio/wasm": "0.3.0",
|
19 |
+
"cropperjs": "^1.5.12",
|
20 |
+
"lazy-brush": "^1.0.1",
|
21 |
+
"pannellum": "^2.5.6",
|
22 |
+
"resize-observer-polyfill": "^1.5.1"
|
23 |
+
}
|
24 |
+
},
|
25 |
+
"node_modules/@ampproject/remapping": {
|
26 |
+
"version": "2.2.1",
|
27 |
+
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
|
28 |
+
"integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
|
29 |
+
"peer": true,
|
30 |
+
"dependencies": {
|
31 |
+
"@jridgewell/gen-mapping": "^0.3.0",
|
32 |
+
"@jridgewell/trace-mapping": "^0.3.9"
|
33 |
+
},
|
34 |
+
"engines": {
|
35 |
+
"node": ">=6.0.0"
|
36 |
+
}
|
37 |
+
},
|
38 |
+
"node_modules/@esbuild/android-arm": {
|
39 |
+
"version": "0.19.5",
|
40 |
+
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz",
|
41 |
+
"integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==",
|
42 |
+
"cpu": [
|
43 |
+
"arm"
|
44 |
+
],
|
45 |
+
"optional": true,
|
46 |
+
"os": [
|
47 |
+
"android"
|
48 |
+
],
|
49 |
+
"engines": {
|
50 |
+
"node": ">=12"
|
51 |
+
}
|
52 |
+
},
|
53 |
+
"node_modules/@esbuild/android-arm64": {
|
54 |
+
"version": "0.19.5",
|
55 |
+
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz",
|
56 |
+
"integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==",
|
57 |
+
"cpu": [
|
58 |
+
"arm64"
|
59 |
+
],
|
60 |
+
"optional": true,
|
61 |
+
"os": [
|
62 |
+
"android"
|
63 |
+
],
|
64 |
+
"engines": {
|
65 |
+
"node": ">=12"
|
66 |
+
}
|
67 |
+
},
|
68 |
+
"node_modules/@esbuild/android-x64": {
|
69 |
+
"version": "0.19.5",
|
70 |
+
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz",
|
71 |
+
"integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==",
|
72 |
+
"cpu": [
|
73 |
+
"x64"
|
74 |
+
],
|
75 |
+
"optional": true,
|
76 |
+
"os": [
|
77 |
+
"android"
|
78 |
+
],
|
79 |
+
"engines": {
|
80 |
+
"node": ">=12"
|
81 |
+
}
|
82 |
+
},
|
83 |
+
"node_modules/@esbuild/darwin-arm64": {
|
84 |
+
"version": "0.19.5",
|
85 |
+
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz",
|
86 |
+
"integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==",
|
87 |
+
"cpu": [
|
88 |
+
"arm64"
|
89 |
+
],
|
90 |
+
"optional": true,
|
91 |
+
"os": [
|
92 |
+
"darwin"
|
93 |
+
],
|
94 |
+
"engines": {
|
95 |
+
"node": ">=12"
|
96 |
+
}
|
97 |
+
},
|
98 |
+
"node_modules/@esbuild/darwin-x64": {
|
99 |
+
"version": "0.19.5",
|
100 |
+
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz",
|
101 |
+
"integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==",
|
102 |
+
"cpu": [
|
103 |
+
"x64"
|
104 |
+
],
|
105 |
+
"optional": true,
|
106 |
+
"os": [
|
107 |
+
"darwin"
|
108 |
+
],
|
109 |
+
"engines": {
|
110 |
+
"node": ">=12"
|
111 |
+
}
|
112 |
+
},
|
113 |
+
"node_modules/@esbuild/freebsd-arm64": {
|
114 |
+
"version": "0.19.5",
|
115 |
+
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz",
|
116 |
+
"integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==",
|
117 |
+
"cpu": [
|
118 |
+
"arm64"
|
119 |
+
],
|
120 |
+
"optional": true,
|
121 |
+
"os": [
|
122 |
+
"freebsd"
|
123 |
+
],
|
124 |
+
"engines": {
|
125 |
+
"node": ">=12"
|
126 |
+
}
|
127 |
+
},
|
128 |
+
"node_modules/@esbuild/freebsd-x64": {
|
129 |
+
"version": "0.19.5",
|
130 |
+
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz",
|
131 |
+
"integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==",
|
132 |
+
"cpu": [
|
133 |
+
"x64"
|
134 |
+
],
|
135 |
+
"optional": true,
|
136 |
+
"os": [
|
137 |
+
"freebsd"
|
138 |
+
],
|
139 |
+
"engines": {
|
140 |
+
"node": ">=12"
|
141 |
+
}
|
142 |
+
},
|
143 |
+
"node_modules/@esbuild/linux-arm": {
|
144 |
+
"version": "0.19.5",
|
145 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz",
|
146 |
+
"integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==",
|
147 |
+
"cpu": [
|
148 |
+
"arm"
|
149 |
+
],
|
150 |
+
"optional": true,
|
151 |
+
"os": [
|
152 |
+
"linux"
|
153 |
+
],
|
154 |
+
"engines": {
|
155 |
+
"node": ">=12"
|
156 |
+
}
|
157 |
+
},
|
158 |
+
"node_modules/@esbuild/linux-arm64": {
|
159 |
+
"version": "0.19.5",
|
160 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz",
|
161 |
+
"integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==",
|
162 |
+
"cpu": [
|
163 |
+
"arm64"
|
164 |
+
],
|
165 |
+
"optional": true,
|
166 |
+
"os": [
|
167 |
+
"linux"
|
168 |
+
],
|
169 |
+
"engines": {
|
170 |
+
"node": ">=12"
|
171 |
+
}
|
172 |
+
},
|
173 |
+
"node_modules/@esbuild/linux-ia32": {
|
174 |
+
"version": "0.19.5",
|
175 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz",
|
176 |
+
"integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==",
|
177 |
+
"cpu": [
|
178 |
+
"ia32"
|
179 |
+
],
|
180 |
+
"optional": true,
|
181 |
+
"os": [
|
182 |
+
"linux"
|
183 |
+
],
|
184 |
+
"engines": {
|
185 |
+
"node": ">=12"
|
186 |
+
}
|
187 |
+
},
|
188 |
+
"node_modules/@esbuild/linux-loong64": {
|
189 |
+
"version": "0.19.5",
|
190 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz",
|
191 |
+
"integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==",
|
192 |
+
"cpu": [
|
193 |
+
"loong64"
|
194 |
+
],
|
195 |
+
"optional": true,
|
196 |
+
"os": [
|
197 |
+
"linux"
|
198 |
+
],
|
199 |
+
"engines": {
|
200 |
+
"node": ">=12"
|
201 |
+
}
|
202 |
+
},
|
203 |
+
"node_modules/@esbuild/linux-mips64el": {
|
204 |
+
"version": "0.19.5",
|
205 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz",
|
206 |
+
"integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==",
|
207 |
+
"cpu": [
|
208 |
+
"mips64el"
|
209 |
+
],
|
210 |
+
"optional": true,
|
211 |
+
"os": [
|
212 |
+
"linux"
|
213 |
+
],
|
214 |
+
"engines": {
|
215 |
+
"node": ">=12"
|
216 |
+
}
|
217 |
+
},
|
218 |
+
"node_modules/@esbuild/linux-ppc64": {
|
219 |
+
"version": "0.19.5",
|
220 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz",
|
221 |
+
"integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==",
|
222 |
+
"cpu": [
|
223 |
+
"ppc64"
|
224 |
+
],
|
225 |
+
"optional": true,
|
226 |
+
"os": [
|
227 |
+
"linux"
|
228 |
+
],
|
229 |
+
"engines": {
|
230 |
+
"node": ">=12"
|
231 |
+
}
|
232 |
+
},
|
233 |
+
"node_modules/@esbuild/linux-riscv64": {
|
234 |
+
"version": "0.19.5",
|
235 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz",
|
236 |
+
"integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==",
|
237 |
+
"cpu": [
|
238 |
+
"riscv64"
|
239 |
+
],
|
240 |
+
"optional": true,
|
241 |
+
"os": [
|
242 |
+
"linux"
|
243 |
+
],
|
244 |
+
"engines": {
|
245 |
+
"node": ">=12"
|
246 |
+
}
|
247 |
+
},
|
248 |
+
"node_modules/@esbuild/linux-s390x": {
|
249 |
+
"version": "0.19.5",
|
250 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz",
|
251 |
+
"integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==",
|
252 |
+
"cpu": [
|
253 |
+
"s390x"
|
254 |
+
],
|
255 |
+
"optional": true,
|
256 |
+
"os": [
|
257 |
+
"linux"
|
258 |
+
],
|
259 |
+
"engines": {
|
260 |
+
"node": ">=12"
|
261 |
+
}
|
262 |
+
},
|
263 |
+
"node_modules/@esbuild/linux-x64": {
|
264 |
+
"version": "0.19.5",
|
265 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz",
|
266 |
+
"integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==",
|
267 |
+
"cpu": [
|
268 |
+
"x64"
|
269 |
+
],
|
270 |
+
"optional": true,
|
271 |
+
"os": [
|
272 |
+
"linux"
|
273 |
+
],
|
274 |
+
"engines": {
|
275 |
+
"node": ">=12"
|
276 |
+
}
|
277 |
+
},
|
278 |
+
"node_modules/@esbuild/netbsd-x64": {
|
279 |
+
"version": "0.19.5",
|
280 |
+
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz",
|
281 |
+
"integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==",
|
282 |
+
"cpu": [
|
283 |
+
"x64"
|
284 |
+
],
|
285 |
+
"optional": true,
|
286 |
+
"os": [
|
287 |
+
"netbsd"
|
288 |
+
],
|
289 |
+
"engines": {
|
290 |
+
"node": ">=12"
|
291 |
+
}
|
292 |
+
},
|
293 |
+
"node_modules/@esbuild/openbsd-x64": {
|
294 |
+
"version": "0.19.5",
|
295 |
+
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz",
|
296 |
+
"integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==",
|
297 |
+
"cpu": [
|
298 |
+
"x64"
|
299 |
+
],
|
300 |
+
"optional": true,
|
301 |
+
"os": [
|
302 |
+
"openbsd"
|
303 |
+
],
|
304 |
+
"engines": {
|
305 |
+
"node": ">=12"
|
306 |
+
}
|
307 |
+
},
|
308 |
+
"node_modules/@esbuild/sunos-x64": {
|
309 |
+
"version": "0.19.5",
|
310 |
+
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz",
|
311 |
+
"integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==",
|
312 |
+
"cpu": [
|
313 |
+
"x64"
|
314 |
+
],
|
315 |
+
"optional": true,
|
316 |
+
"os": [
|
317 |
+
"sunos"
|
318 |
+
],
|
319 |
+
"engines": {
|
320 |
+
"node": ">=12"
|
321 |
+
}
|
322 |
+
},
|
323 |
+
"node_modules/@esbuild/win32-arm64": {
|
324 |
+
"version": "0.19.5",
|
325 |
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz",
|
326 |
+
"integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==",
|
327 |
+
"cpu": [
|
328 |
+
"arm64"
|
329 |
+
],
|
330 |
+
"optional": true,
|
331 |
+
"os": [
|
332 |
+
"win32"
|
333 |
+
],
|
334 |
+
"engines": {
|
335 |
+
"node": ">=12"
|
336 |
+
}
|
337 |
+
},
|
338 |
+
"node_modules/@esbuild/win32-ia32": {
|
339 |
+
"version": "0.19.5",
|
340 |
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz",
|
341 |
+
"integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==",
|
342 |
+
"cpu": [
|
343 |
+
"ia32"
|
344 |
+
],
|
345 |
+
"optional": true,
|
346 |
+
"os": [
|
347 |
+
"win32"
|
348 |
+
],
|
349 |
+
"engines": {
|
350 |
+
"node": ">=12"
|
351 |
+
}
|
352 |
+
},
|
353 |
+
"node_modules/@esbuild/win32-x64": {
|
354 |
+
"version": "0.19.5",
|
355 |
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz",
|
356 |
+
"integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==",
|
357 |
+
"cpu": [
|
358 |
+
"x64"
|
359 |
+
],
|
360 |
+
"optional": true,
|
361 |
+
"os": [
|
362 |
+
"win32"
|
363 |
+
],
|
364 |
+
"engines": {
|
365 |
+
"node": ">=12"
|
366 |
+
}
|
367 |
+
},
|
368 |
+
"node_modules/@formatjs/ecma402-abstract": {
|
369 |
+
"version": "1.11.4",
|
370 |
+
"resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz",
|
371 |
+
"integrity": "sha512-EBikYFp2JCdIfGEb5G9dyCkTGDmC57KSHhRQOC3aYxoPWVZvfWCDjZwkGYHN7Lis/fmuWl906bnNTJifDQ3sXw==",
|
372 |
+
"dependencies": {
|
373 |
+
"@formatjs/intl-localematcher": "0.2.25",
|
374 |
+
"tslib": "^2.1.0"
|
375 |
+
}
|
376 |
+
},
|
377 |
+
"node_modules/@formatjs/fast-memoize": {
|
378 |
+
"version": "1.2.1",
|
379 |
+
"resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-1.2.1.tgz",
|
380 |
+
"integrity": "sha512-Rg0e76nomkz3vF9IPlKeV+Qynok0r7YZjL6syLz4/urSg0IbjPZCB/iYUMNsYA643gh4mgrX3T7KEIFIxJBQeg==",
|
381 |
+
"dependencies": {
|
382 |
+
"tslib": "^2.1.0"
|
383 |
+
}
|
384 |
+
},
|
385 |
+
"node_modules/@formatjs/icu-messageformat-parser": {
|
386 |
+
"version": "2.1.0",
|
387 |
+
"resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.0.tgz",
|
388 |
+
"integrity": "sha512-Qxv/lmCN6hKpBSss2uQ8IROVnta2r9jd3ymUEIjm2UyIkUCHVcbUVRGL/KS/wv7876edvsPe+hjHVJ4z8YuVaw==",
|
389 |
+
"dependencies": {
|
390 |
+
"@formatjs/ecma402-abstract": "1.11.4",
|
391 |
+
"@formatjs/icu-skeleton-parser": "1.3.6",
|
392 |
+
"tslib": "^2.1.0"
|
393 |
+
}
|
394 |
+
},
|
395 |
+
"node_modules/@formatjs/icu-skeleton-parser": {
|
396 |
+
"version": "1.3.6",
|
397 |
+
"resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.6.tgz",
|
398 |
+
"integrity": "sha512-I96mOxvml/YLrwU2Txnd4klA7V8fRhb6JG/4hm3VMNmeJo1F03IpV2L3wWt7EweqNLES59SZ4d6hVOPCSf80Bg==",
|
399 |
+
"dependencies": {
|
400 |
+
"@formatjs/ecma402-abstract": "1.11.4",
|
401 |
+
"tslib": "^2.1.0"
|
402 |
+
}
|
403 |
+
},
|
404 |
+
"node_modules/@formatjs/intl-localematcher": {
|
405 |
+
"version": "0.2.25",
|
406 |
+
"resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.25.tgz",
|
407 |
+
"integrity": "sha512-YmLcX70BxoSopLFdLr1Ds99NdlTI2oWoLbaUW2M406lxOIPzE1KQhRz2fPUkq34xVZQaihCoU29h0KK7An3bhA==",
|
408 |
+
"dependencies": {
|
409 |
+
"tslib": "^2.1.0"
|
410 |
+
}
|
411 |
+
},
|
412 |
+
"node_modules/@gradio/atoms": {
|
413 |
+
"version": "0.2.1",
|
414 |
+
"resolved": "https://registry.npmjs.org/@gradio/atoms/-/atoms-0.2.1.tgz",
|
415 |
+
"integrity": "sha512-di3kKSbjxKGngvTAaqUaA6whOVs5BFlQULlWDPq1m37VRgUD7Oq2MkIE+T+YiNAhByN93pqA0hGrWwAUUuxy5Q==",
|
416 |
+
"dependencies": {
|
417 |
+
"@gradio/icons": "^0.2.0",
|
418 |
+
"@gradio/utils": "^0.2.0"
|
419 |
+
}
|
420 |
+
},
|
421 |
+
"node_modules/@gradio/client": {
|
422 |
+
"version": "0.8.1",
|
423 |
+
"resolved": "https://registry.npmjs.org/@gradio/client/-/client-0.8.1.tgz",
|
424 |
+
"integrity": "sha512-qMFINw6MbubLYQiLorwGhyapH7bUSthH+7tevGgKOPuQWoW5TliPi95VEFRUQ+d2Y/vXqWj0+hubO94RO7v/7w==",
|
425 |
+
"dependencies": {
|
426 |
+
"bufferutil": "^4.0.7",
|
427 |
+
"semiver": "^1.1.0",
|
428 |
+
"ws": "^8.13.0"
|
429 |
+
},
|
430 |
+
"engines": {
|
431 |
+
"node": ">=18.0.0"
|
432 |
+
}
|
433 |
+
},
|
434 |
+
"node_modules/@gradio/column": {
|
435 |
+
"version": "0.1.0",
|
436 |
+
"resolved": "https://registry.npmjs.org/@gradio/column/-/column-0.1.0.tgz",
|
437 |
+
"integrity": "sha512-P24nqqVnMXBaDA1f/zSN5HZRho4PxP8Dq+7VltPHlmxIEiZYik2AJ4J0LeuIha34FDO0guu/16evdrpvGIUAfw=="
|
438 |
+
},
|
439 |
+
"node_modules/@gradio/icons": {
|
440 |
+
"version": "0.2.0",
|
441 |
+
"resolved": "https://registry.npmjs.org/@gradio/icons/-/icons-0.2.0.tgz",
|
442 |
+
"integrity": "sha512-rfCSmOF+ALqBOjTWL1ICasyA8JuO0MPwFrtlVMyAWp7R14AN8YChC/gbz5fZ0kNBiGGEYOOfqpKxyvC95jGGlg=="
|
443 |
+
},
|
444 |
+
"node_modules/@gradio/statustracker": {
|
445 |
+
"version": "0.3.1",
|
446 |
+
"resolved": "https://registry.npmjs.org/@gradio/statustracker/-/statustracker-0.3.1.tgz",
|
447 |
+
"integrity": "sha512-ZpmXZSnbgoFU2J54SrNntwfo2OEuEoRV310Q0zGVTH1VL7loziR7GuYhfIbgS8qFlrWM0MhMoLGDX+k7LAig5w==",
|
448 |
+
"dependencies": {
|
449 |
+
"@gradio/atoms": "^0.2.1",
|
450 |
+
"@gradio/column": "^0.1.0",
|
451 |
+
"@gradio/icons": "^0.2.0",
|
452 |
+
"@gradio/utils": "^0.2.0"
|
453 |
+
}
|
454 |
+
},
|
455 |
+
"node_modules/@gradio/theme": {
|
456 |
+
"version": "0.2.0",
|
457 |
+
"resolved": "https://registry.npmjs.org/@gradio/theme/-/theme-0.2.0.tgz",
|
458 |
+
"integrity": "sha512-33c68Nk7oRXLn08OxPfjcPm7S4tXGOUV1I1bVgzdM2YV5o1QBOS1GEnXPZPu/CEYPePLMB6bsDwffrLEyLGWVQ=="
|
459 |
+
},
|
460 |
+
"node_modules/@gradio/upload": {
|
461 |
+
"version": "0.4.1",
|
462 |
+
"resolved": "https://registry.npmjs.org/@gradio/upload/-/upload-0.4.1.tgz",
|
463 |
+
"integrity": "sha512-iXEckwathXVCDRX+Jrnc6Qu5MDK108niej9p190V7+/B3+vjjP1eCBAd881zH7JR3VHthUBjNVu5/uXZ9cVX1A==",
|
464 |
+
"dependencies": {
|
465 |
+
"@gradio/atoms": "^0.2.1",
|
466 |
+
"@gradio/client": "^0.8.1",
|
467 |
+
"@gradio/icons": "^0.2.0",
|
468 |
+
"@gradio/upload": "^0.4.1",
|
469 |
+
"@gradio/utils": "^0.2.0"
|
470 |
+
}
|
471 |
+
},
|
472 |
+
"node_modules/@gradio/utils": {
|
473 |
+
"version": "0.2.0",
|
474 |
+
"resolved": "https://registry.npmjs.org/@gradio/utils/-/utils-0.2.0.tgz",
|
475 |
+
"integrity": "sha512-YkwzXufi6IxQrlMW+1sFo8Yn6F9NLL69ZoBsbo7QEhms0v5L7pmOTw+dfd7M3dwbRP2lgjrb52i1kAIN3n6aqQ==",
|
476 |
+
"dependencies": {
|
477 |
+
"@gradio/theme": "^0.2.0",
|
478 |
+
"svelte-i18n": "^3.6.0"
|
479 |
+
}
|
480 |
+
},
|
481 |
+
"node_modules/@gradio/wasm": {
|
482 |
+
"version": "0.3.0",
|
483 |
+
"resolved": "https://registry.npmjs.org/@gradio/wasm/-/wasm-0.3.0.tgz",
|
484 |
+
"integrity": "sha512-avgMFBrHUUDzQraBMW9mNgiQMMkObsPzDap0PZV6FgzfDpW8K+R4BBcl+gClq82jRi3ulDjtISTXriUrNNfkrg==",
|
485 |
+
"dependencies": {
|
486 |
+
"@types/path-browserify": "^1.0.0",
|
487 |
+
"path-browserify": "^1.0.1"
|
488 |
+
}
|
489 |
+
},
|
490 |
+
"node_modules/@jridgewell/gen-mapping": {
|
491 |
+
"version": "0.3.3",
|
492 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
|
493 |
+
"integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
|
494 |
+
"peer": true,
|
495 |
+
"dependencies": {
|
496 |
+
"@jridgewell/set-array": "^1.0.1",
|
497 |
+
"@jridgewell/sourcemap-codec": "^1.4.10",
|
498 |
+
"@jridgewell/trace-mapping": "^0.3.9"
|
499 |
+
},
|
500 |
+
"engines": {
|
501 |
+
"node": ">=6.0.0"
|
502 |
+
}
|
503 |
+
},
|
504 |
+
"node_modules/@jridgewell/resolve-uri": {
|
505 |
+
"version": "3.1.1",
|
506 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
|
507 |
+
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
|
508 |
+
"peer": true,
|
509 |
+
"engines": {
|
510 |
+
"node": ">=6.0.0"
|
511 |
+
}
|
512 |
+
},
|
513 |
+
"node_modules/@jridgewell/set-array": {
|
514 |
+
"version": "1.1.2",
|
515 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
|
516 |
+
"integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
|
517 |
+
"peer": true,
|
518 |
+
"engines": {
|
519 |
+
"node": ">=6.0.0"
|
520 |
+
}
|
521 |
+
},
|
522 |
+
"node_modules/@jridgewell/sourcemap-codec": {
|
523 |
+
"version": "1.4.15",
|
524 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
525 |
+
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
|
526 |
+
"peer": true
|
527 |
+
},
|
528 |
+
"node_modules/@jridgewell/trace-mapping": {
|
529 |
+
"version": "0.3.20",
|
530 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
|
531 |
+
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
|
532 |
+
"peer": true,
|
533 |
+
"dependencies": {
|
534 |
+
"@jridgewell/resolve-uri": "^3.1.0",
|
535 |
+
"@jridgewell/sourcemap-codec": "^1.4.14"
|
536 |
+
}
|
537 |
+
},
|
538 |
+
"node_modules/@types/estree": {
|
539 |
+
"version": "1.0.5",
|
540 |
+
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
541 |
+
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
|
542 |
+
"peer": true
|
543 |
+
},
|
544 |
+
"node_modules/@types/path-browserify": {
|
545 |
+
"version": "1.0.2",
|
546 |
+
"resolved": "https://registry.npmjs.org/@types/path-browserify/-/path-browserify-1.0.2.tgz",
|
547 |
+
"integrity": "sha512-ZkC5IUqqIFPXx3ASTTybTzmQdwHwe2C0u3eL75ldQ6T9E9IWFJodn6hIfbZGab73DfyiHN4Xw15gNxUq2FbvBA=="
|
548 |
+
},
|
549 |
+
"node_modules/acorn": {
|
550 |
+
"version": "8.11.2",
|
551 |
+
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
|
552 |
+
"integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
|
553 |
+
"peer": true,
|
554 |
+
"bin": {
|
555 |
+
"acorn": "bin/acorn"
|
556 |
+
},
|
557 |
+
"engines": {
|
558 |
+
"node": ">=0.4.0"
|
559 |
+
}
|
560 |
+
},
|
561 |
+
"node_modules/aria-query": {
|
562 |
+
"version": "5.3.0",
|
563 |
+
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
|
564 |
+
"integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
|
565 |
+
"peer": true,
|
566 |
+
"dependencies": {
|
567 |
+
"dequal": "^2.0.3"
|
568 |
+
}
|
569 |
+
},
|
570 |
+
"node_modules/axobject-query": {
|
571 |
+
"version": "3.2.1",
|
572 |
+
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz",
|
573 |
+
"integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==",
|
574 |
+
"peer": true,
|
575 |
+
"dependencies": {
|
576 |
+
"dequal": "^2.0.3"
|
577 |
+
}
|
578 |
+
},
|
579 |
+
"node_modules/bufferutil": {
|
580 |
+
"version": "4.0.8",
|
581 |
+
"resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz",
|
582 |
+
"integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==",
|
583 |
+
"hasInstallScript": true,
|
584 |
+
"dependencies": {
|
585 |
+
"node-gyp-build": "^4.3.0"
|
586 |
+
},
|
587 |
+
"engines": {
|
588 |
+
"node": ">=6.14.2"
|
589 |
+
}
|
590 |
+
},
|
591 |
+
"node_modules/cli-color": {
|
592 |
+
"version": "2.0.3",
|
593 |
+
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz",
|
594 |
+
"integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==",
|
595 |
+
"dependencies": {
|
596 |
+
"d": "^1.0.1",
|
597 |
+
"es5-ext": "^0.10.61",
|
598 |
+
"es6-iterator": "^2.0.3",
|
599 |
+
"memoizee": "^0.4.15",
|
600 |
+
"timers-ext": "^0.1.7"
|
601 |
+
},
|
602 |
+
"engines": {
|
603 |
+
"node": ">=0.10"
|
604 |
+
}
|
605 |
+
},
|
606 |
+
"node_modules/code-red": {
|
607 |
+
"version": "1.0.4",
|
608 |
+
"resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz",
|
609 |
+
"integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
|
610 |
+
"peer": true,
|
611 |
+
"dependencies": {
|
612 |
+
"@jridgewell/sourcemap-codec": "^1.4.15",
|
613 |
+
"@types/estree": "^1.0.1",
|
614 |
+
"acorn": "^8.10.0",
|
615 |
+
"estree-walker": "^3.0.3",
|
616 |
+
"periscopic": "^3.1.0"
|
617 |
+
}
|
618 |
+
},
|
619 |
+
"node_modules/cropperjs": {
|
620 |
+
"version": "1.6.1",
|
621 |
+
"resolved": "https://registry.npmjs.org/cropperjs/-/cropperjs-1.6.1.tgz",
|
622 |
+
"integrity": "sha512-F4wsi+XkDHCOMrHMYjrTEE4QBOrsHHN5/2VsVAaRq8P7E5z7xQpT75S+f/9WikmBEailas3+yo+6zPIomW+NOA=="
|
623 |
+
},
|
624 |
+
"node_modules/css-tree": {
|
625 |
+
"version": "2.3.1",
|
626 |
+
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
|
627 |
+
"integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
|
628 |
+
"peer": true,
|
629 |
+
"dependencies": {
|
630 |
+
"mdn-data": "2.0.30",
|
631 |
+
"source-map-js": "^1.0.1"
|
632 |
+
},
|
633 |
+
"engines": {
|
634 |
+
"node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
|
635 |
+
}
|
636 |
+
},
|
637 |
+
"node_modules/d": {
|
638 |
+
"version": "1.0.1",
|
639 |
+
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
|
640 |
+
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
|
641 |
+
"dependencies": {
|
642 |
+
"es5-ext": "^0.10.50",
|
643 |
+
"type": "^1.0.1"
|
644 |
+
}
|
645 |
+
},
|
646 |
+
"node_modules/deepmerge": {
|
647 |
+
"version": "4.3.1",
|
648 |
+
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
649 |
+
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
650 |
+
"engines": {
|
651 |
+
"node": ">=0.10.0"
|
652 |
+
}
|
653 |
+
},
|
654 |
+
"node_modules/dequal": {
|
655 |
+
"version": "2.0.3",
|
656 |
+
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
657 |
+
"integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
|
658 |
+
"peer": true,
|
659 |
+
"engines": {
|
660 |
+
"node": ">=6"
|
661 |
+
}
|
662 |
+
},
|
663 |
+
"node_modules/es5-ext": {
|
664 |
+
"version": "0.10.62",
|
665 |
+
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz",
|
666 |
+
"integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==",
|
667 |
+
"hasInstallScript": true,
|
668 |
+
"dependencies": {
|
669 |
+
"es6-iterator": "^2.0.3",
|
670 |
+
"es6-symbol": "^3.1.3",
|
671 |
+
"next-tick": "^1.1.0"
|
672 |
+
},
|
673 |
+
"engines": {
|
674 |
+
"node": ">=0.10"
|
675 |
+
}
|
676 |
+
},
|
677 |
+
"node_modules/es6-iterator": {
|
678 |
+
"version": "2.0.3",
|
679 |
+
"resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
|
680 |
+
"integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
|
681 |
+
"dependencies": {
|
682 |
+
"d": "1",
|
683 |
+
"es5-ext": "^0.10.35",
|
684 |
+
"es6-symbol": "^3.1.1"
|
685 |
+
}
|
686 |
+
},
|
687 |
+
"node_modules/es6-symbol": {
|
688 |
+
"version": "3.1.3",
|
689 |
+
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
|
690 |
+
"integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
|
691 |
+
"dependencies": {
|
692 |
+
"d": "^1.0.1",
|
693 |
+
"ext": "^1.1.2"
|
694 |
+
}
|
695 |
+
},
|
696 |
+
"node_modules/es6-weak-map": {
|
697 |
+
"version": "2.0.3",
|
698 |
+
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
|
699 |
+
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
|
700 |
+
"dependencies": {
|
701 |
+
"d": "1",
|
702 |
+
"es5-ext": "^0.10.46",
|
703 |
+
"es6-iterator": "^2.0.3",
|
704 |
+
"es6-symbol": "^3.1.1"
|
705 |
+
}
|
706 |
+
},
|
707 |
+
"node_modules/esbuild": {
|
708 |
+
"version": "0.19.5",
|
709 |
+
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz",
|
710 |
+
"integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==",
|
711 |
+
"hasInstallScript": true,
|
712 |
+
"bin": {
|
713 |
+
"esbuild": "bin/esbuild"
|
714 |
+
},
|
715 |
+
"engines": {
|
716 |
+
"node": ">=12"
|
717 |
+
},
|
718 |
+
"optionalDependencies": {
|
719 |
+
"@esbuild/android-arm": "0.19.5",
|
720 |
+
"@esbuild/android-arm64": "0.19.5",
|
721 |
+
"@esbuild/android-x64": "0.19.5",
|
722 |
+
"@esbuild/darwin-arm64": "0.19.5",
|
723 |
+
"@esbuild/darwin-x64": "0.19.5",
|
724 |
+
"@esbuild/freebsd-arm64": "0.19.5",
|
725 |
+
"@esbuild/freebsd-x64": "0.19.5",
|
726 |
+
"@esbuild/linux-arm": "0.19.5",
|
727 |
+
"@esbuild/linux-arm64": "0.19.5",
|
728 |
+
"@esbuild/linux-ia32": "0.19.5",
|
729 |
+
"@esbuild/linux-loong64": "0.19.5",
|
730 |
+
"@esbuild/linux-mips64el": "0.19.5",
|
731 |
+
"@esbuild/linux-ppc64": "0.19.5",
|
732 |
+
"@esbuild/linux-riscv64": "0.19.5",
|
733 |
+
"@esbuild/linux-s390x": "0.19.5",
|
734 |
+
"@esbuild/linux-x64": "0.19.5",
|
735 |
+
"@esbuild/netbsd-x64": "0.19.5",
|
736 |
+
"@esbuild/openbsd-x64": "0.19.5",
|
737 |
+
"@esbuild/sunos-x64": "0.19.5",
|
738 |
+
"@esbuild/win32-arm64": "0.19.5",
|
739 |
+
"@esbuild/win32-ia32": "0.19.5",
|
740 |
+
"@esbuild/win32-x64": "0.19.5"
|
741 |
+
}
|
742 |
+
},
|
743 |
+
"node_modules/estree-walker": {
|
744 |
+
"version": "3.0.3",
|
745 |
+
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
|
746 |
+
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
|
747 |
+
"peer": true,
|
748 |
+
"dependencies": {
|
749 |
+
"@types/estree": "^1.0.0"
|
750 |
+
}
|
751 |
+
},
|
752 |
+
"node_modules/event-emitter": {
|
753 |
+
"version": "0.3.5",
|
754 |
+
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
755 |
+
"integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==",
|
756 |
+
"dependencies": {
|
757 |
+
"d": "1",
|
758 |
+
"es5-ext": "~0.10.14"
|
759 |
+
}
|
760 |
+
},
|
761 |
+
"node_modules/ext": {
|
762 |
+
"version": "1.7.0",
|
763 |
+
"resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz",
|
764 |
+
"integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==",
|
765 |
+
"dependencies": {
|
766 |
+
"type": "^2.7.2"
|
767 |
+
}
|
768 |
+
},
|
769 |
+
"node_modules/ext/node_modules/type": {
|
770 |
+
"version": "2.7.2",
|
771 |
+
"resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz",
|
772 |
+
"integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw=="
|
773 |
+
},
|
774 |
+
"node_modules/globalyzer": {
|
775 |
+
"version": "0.1.0",
|
776 |
+
"resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
|
777 |
+
"integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q=="
|
778 |
+
},
|
779 |
+
"node_modules/globrex": {
|
780 |
+
"version": "0.1.2",
|
781 |
+
"resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
|
782 |
+
"integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg=="
|
783 |
+
},
|
784 |
+
"node_modules/intl-messageformat": {
|
785 |
+
"version": "9.13.0",
|
786 |
+
"resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.13.0.tgz",
|
787 |
+
"integrity": "sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw==",
|
788 |
+
"dependencies": {
|
789 |
+
"@formatjs/ecma402-abstract": "1.11.4",
|
790 |
+
"@formatjs/fast-memoize": "1.2.1",
|
791 |
+
"@formatjs/icu-messageformat-parser": "2.1.0",
|
792 |
+
"tslib": "^2.1.0"
|
793 |
+
}
|
794 |
+
},
|
795 |
+
"node_modules/is-promise": {
|
796 |
+
"version": "2.2.2",
|
797 |
+
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
|
798 |
+
"integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
|
799 |
+
},
|
800 |
+
"node_modules/is-reference": {
|
801 |
+
"version": "3.0.2",
|
802 |
+
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
|
803 |
+
"integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
|
804 |
+
"peer": true,
|
805 |
+
"dependencies": {
|
806 |
+
"@types/estree": "*"
|
807 |
+
}
|
808 |
+
},
|
809 |
+
"node_modules/lazy-brush": {
|
810 |
+
"version": "1.0.1",
|
811 |
+
"resolved": "https://registry.npmjs.org/lazy-brush/-/lazy-brush-1.0.1.tgz",
|
812 |
+
"integrity": "sha512-xT/iSClTVi7vLoF8dCWTBhCuOWqsLXCMPa6ucVmVAk6hyNCM5JeS1NLhXqIrJktUg+caEYKlqSOUU4u3cpXzKg=="
|
813 |
+
},
|
814 |
+
"node_modules/locate-character": {
|
815 |
+
"version": "3.0.0",
|
816 |
+
"resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
|
817 |
+
"integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
|
818 |
+
"peer": true
|
819 |
+
},
|
820 |
+
"node_modules/lru-queue": {
|
821 |
+
"version": "0.1.0",
|
822 |
+
"resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz",
|
823 |
+
"integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==",
|
824 |
+
"dependencies": {
|
825 |
+
"es5-ext": "~0.10.2"
|
826 |
+
}
|
827 |
+
},
|
828 |
+
"node_modules/magic-string": {
|
829 |
+
"version": "0.30.5",
|
830 |
+
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
|
831 |
+
"integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
|
832 |
+
"peer": true,
|
833 |
+
"dependencies": {
|
834 |
+
"@jridgewell/sourcemap-codec": "^1.4.15"
|
835 |
+
},
|
836 |
+
"engines": {
|
837 |
+
"node": ">=12"
|
838 |
+
}
|
839 |
+
},
|
840 |
+
"node_modules/mdn-data": {
|
841 |
+
"version": "2.0.30",
|
842 |
+
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
|
843 |
+
"integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
|
844 |
+
"peer": true
|
845 |
+
},
|
846 |
+
"node_modules/memoizee": {
|
847 |
+
"version": "0.4.15",
|
848 |
+
"resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz",
|
849 |
+
"integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==",
|
850 |
+
"dependencies": {
|
851 |
+
"d": "^1.0.1",
|
852 |
+
"es5-ext": "^0.10.53",
|
853 |
+
"es6-weak-map": "^2.0.3",
|
854 |
+
"event-emitter": "^0.3.5",
|
855 |
+
"is-promise": "^2.2.2",
|
856 |
+
"lru-queue": "^0.1.0",
|
857 |
+
"next-tick": "^1.1.0",
|
858 |
+
"timers-ext": "^0.1.7"
|
859 |
+
}
|
860 |
+
},
|
861 |
+
"node_modules/mri": {
|
862 |
+
"version": "1.2.0",
|
863 |
+
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
864 |
+
"integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
|
865 |
+
"engines": {
|
866 |
+
"node": ">=4"
|
867 |
+
}
|
868 |
+
},
|
869 |
+
"node_modules/next-tick": {
|
870 |
+
"version": "1.1.0",
|
871 |
+
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
|
872 |
+
"integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
|
873 |
+
},
|
874 |
+
"node_modules/node-gyp-build": {
|
875 |
+
"version": "4.6.1",
|
876 |
+
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz",
|
877 |
+
"integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==",
|
878 |
+
"bin": {
|
879 |
+
"node-gyp-build": "bin.js",
|
880 |
+
"node-gyp-build-optional": "optional.js",
|
881 |
+
"node-gyp-build-test": "build-test.js"
|
882 |
+
}
|
883 |
+
},
|
884 |
+
"node_modules/pannellum": {
|
885 |
+
"version": "2.5.6",
|
886 |
+
"resolved": "https://registry.npmjs.org/pannellum/-/pannellum-2.5.6.tgz",
|
887 |
+
"integrity": "sha512-R4kSPpj36wQPlyIi9ZftxPfVYF11DEbNBATUEI+pkMGZDFYBV5Jxi6tYFVDdmxA2xaTeKZQHMIuIIj7njVSTQQ=="
|
888 |
+
},
|
889 |
+
"node_modules/path-browserify": {
|
890 |
+
"version": "1.0.1",
|
891 |
+
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
|
892 |
+
"integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="
|
893 |
+
},
|
894 |
+
"node_modules/periscopic": {
|
895 |
+
"version": "3.1.0",
|
896 |
+
"resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz",
|
897 |
+
"integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
|
898 |
+
"peer": true,
|
899 |
+
"dependencies": {
|
900 |
+
"@types/estree": "^1.0.0",
|
901 |
+
"estree-walker": "^3.0.0",
|
902 |
+
"is-reference": "^3.0.0"
|
903 |
+
}
|
904 |
+
},
|
905 |
+
"node_modules/resize-observer-polyfill": {
|
906 |
+
"version": "1.5.1",
|
907 |
+
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
|
908 |
+
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
|
909 |
+
},
|
910 |
+
"node_modules/sade": {
|
911 |
+
"version": "1.8.1",
|
912 |
+
"resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
|
913 |
+
"integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
|
914 |
+
"dependencies": {
|
915 |
+
"mri": "^1.1.0"
|
916 |
+
},
|
917 |
+
"engines": {
|
918 |
+
"node": ">=6"
|
919 |
+
}
|
920 |
+
},
|
921 |
+
"node_modules/semiver": {
|
922 |
+
"version": "1.1.0",
|
923 |
+
"resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz",
|
924 |
+
"integrity": "sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg==",
|
925 |
+
"engines": {
|
926 |
+
"node": ">=6"
|
927 |
+
}
|
928 |
+
},
|
929 |
+
"node_modules/source-map-js": {
|
930 |
+
"version": "1.0.2",
|
931 |
+
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
932 |
+
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
933 |
+
"peer": true,
|
934 |
+
"engines": {
|
935 |
+
"node": ">=0.10.0"
|
936 |
+
}
|
937 |
+
},
|
938 |
+
"node_modules/svelte": {
|
939 |
+
"version": "4.2.3",
|
940 |
+
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.3.tgz",
|
941 |
+
"integrity": "sha512-sqmG9KC6uUc7fb3ZuWoxXvqk6MI9Uu4ABA1M0fYDgTlFYu1k02xp96u6U9+yJZiVm84m9zge7rrA/BNZdFpOKw==",
|
942 |
+
"peer": true,
|
943 |
+
"dependencies": {
|
944 |
+
"@ampproject/remapping": "^2.2.1",
|
945 |
+
"@jridgewell/sourcemap-codec": "^1.4.15",
|
946 |
+
"@jridgewell/trace-mapping": "^0.3.18",
|
947 |
+
"acorn": "^8.9.0",
|
948 |
+
"aria-query": "^5.3.0",
|
949 |
+
"axobject-query": "^3.2.1",
|
950 |
+
"code-red": "^1.0.3",
|
951 |
+
"css-tree": "^2.3.1",
|
952 |
+
"estree-walker": "^3.0.3",
|
953 |
+
"is-reference": "^3.0.1",
|
954 |
+
"locate-character": "^3.0.0",
|
955 |
+
"magic-string": "^0.30.4",
|
956 |
+
"periscopic": "^3.1.0"
|
957 |
+
},
|
958 |
+
"engines": {
|
959 |
+
"node": ">=16"
|
960 |
+
}
|
961 |
+
},
|
962 |
+
"node_modules/svelte-i18n": {
|
963 |
+
"version": "3.7.4",
|
964 |
+
"resolved": "https://registry.npmjs.org/svelte-i18n/-/svelte-i18n-3.7.4.tgz",
|
965 |
+
"integrity": "sha512-yGRCNo+eBT4cPuU7IVsYTYjxB7I2V8qgUZPlHnNctJj5IgbJgV78flsRzpjZ/8iUYZrS49oCt7uxlU3AZv/N5Q==",
|
966 |
+
"dependencies": {
|
967 |
+
"cli-color": "^2.0.3",
|
968 |
+
"deepmerge": "^4.2.2",
|
969 |
+
"esbuild": "^0.19.2",
|
970 |
+
"estree-walker": "^2",
|
971 |
+
"intl-messageformat": "^9.13.0",
|
972 |
+
"sade": "^1.8.1",
|
973 |
+
"tiny-glob": "^0.2.9"
|
974 |
+
},
|
975 |
+
"bin": {
|
976 |
+
"svelte-i18n": "dist/cli.js"
|
977 |
+
},
|
978 |
+
"engines": {
|
979 |
+
"node": ">= 16"
|
980 |
+
},
|
981 |
+
"peerDependencies": {
|
982 |
+
"svelte": "^3 || ^4"
|
983 |
+
}
|
984 |
+
},
|
985 |
+
"node_modules/svelte-i18n/node_modules/estree-walker": {
|
986 |
+
"version": "2.0.2",
|
987 |
+
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
988 |
+
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
|
989 |
+
},
|
990 |
+
"node_modules/timers-ext": {
|
991 |
+
"version": "0.1.7",
|
992 |
+
"resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz",
|
993 |
+
"integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==",
|
994 |
+
"dependencies": {
|
995 |
+
"es5-ext": "~0.10.46",
|
996 |
+
"next-tick": "1"
|
997 |
+
}
|
998 |
+
},
|
999 |
+
"node_modules/tiny-glob": {
|
1000 |
+
"version": "0.2.9",
|
1001 |
+
"resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz",
|
1002 |
+
"integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==",
|
1003 |
+
"dependencies": {
|
1004 |
+
"globalyzer": "0.1.0",
|
1005 |
+
"globrex": "^0.1.2"
|
1006 |
+
}
|
1007 |
+
},
|
1008 |
+
"node_modules/tslib": {
|
1009 |
+
"version": "2.6.2",
|
1010 |
+
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
|
1011 |
+
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
|
1012 |
+
},
|
1013 |
+
"node_modules/type": {
|
1014 |
+
"version": "1.2.0",
|
1015 |
+
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
1016 |
+
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
1017 |
+
},
|
1018 |
+
"node_modules/ws": {
|
1019 |
+
"version": "8.14.2",
|
1020 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
|
1021 |
+
"integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
|
1022 |
+
"engines": {
|
1023 |
+
"node": ">=10.0.0"
|
1024 |
+
},
|
1025 |
+
"peerDependencies": {
|
1026 |
+
"bufferutil": "^4.0.1",
|
1027 |
+
"utf-8-validate": ">=5.0.2"
|
1028 |
+
},
|
1029 |
+
"peerDependenciesMeta": {
|
1030 |
+
"bufferutil": {
|
1031 |
+
"optional": true
|
1032 |
+
},
|
1033 |
+
"utf-8-validate": {
|
1034 |
+
"optional": true
|
1035 |
+
}
|
1036 |
+
}
|
1037 |
+
}
|
1038 |
+
},
|
1039 |
+
"dependencies": {
|
1040 |
+
"@ampproject/remapping": {
|
1041 |
+
"version": "2.2.1",
|
1042 |
+
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
|
1043 |
+
"integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
|
1044 |
+
"peer": true,
|
1045 |
+
"requires": {
|
1046 |
+
"@jridgewell/gen-mapping": "^0.3.0",
|
1047 |
+
"@jridgewell/trace-mapping": "^0.3.9"
|
1048 |
+
}
|
1049 |
+
},
|
1050 |
+
"@esbuild/android-arm": {
|
1051 |
+
"version": "0.19.5",
|
1052 |
+
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz",
|
1053 |
+
"integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==",
|
1054 |
+
"optional": true
|
1055 |
+
},
|
1056 |
+
"@esbuild/android-arm64": {
|
1057 |
+
"version": "0.19.5",
|
1058 |
+
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz",
|
1059 |
+
"integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==",
|
1060 |
+
"optional": true
|
1061 |
+
},
|
1062 |
+
"@esbuild/android-x64": {
|
1063 |
+
"version": "0.19.5",
|
1064 |
+
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz",
|
1065 |
+
"integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==",
|
1066 |
+
"optional": true
|
1067 |
+
},
|
1068 |
+
"@esbuild/darwin-arm64": {
|
1069 |
+
"version": "0.19.5",
|
1070 |
+
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz",
|
1071 |
+
"integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==",
|
1072 |
+
"optional": true
|
1073 |
+
},
|
1074 |
+
"@esbuild/darwin-x64": {
|
1075 |
+
"version": "0.19.5",
|
1076 |
+
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz",
|
1077 |
+
"integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==",
|
1078 |
+
"optional": true
|
1079 |
+
},
|
1080 |
+
"@esbuild/freebsd-arm64": {
|
1081 |
+
"version": "0.19.5",
|
1082 |
+
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz",
|
1083 |
+
"integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==",
|
1084 |
+
"optional": true
|
1085 |
+
},
|
1086 |
+
"@esbuild/freebsd-x64": {
|
1087 |
+
"version": "0.19.5",
|
1088 |
+
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz",
|
1089 |
+
"integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==",
|
1090 |
+
"optional": true
|
1091 |
+
},
|
1092 |
+
"@esbuild/linux-arm": {
|
1093 |
+
"version": "0.19.5",
|
1094 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz",
|
1095 |
+
"integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==",
|
1096 |
+
"optional": true
|
1097 |
+
},
|
1098 |
+
"@esbuild/linux-arm64": {
|
1099 |
+
"version": "0.19.5",
|
1100 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz",
|
1101 |
+
"integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==",
|
1102 |
+
"optional": true
|
1103 |
+
},
|
1104 |
+
"@esbuild/linux-ia32": {
|
1105 |
+
"version": "0.19.5",
|
1106 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz",
|
1107 |
+
"integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==",
|
1108 |
+
"optional": true
|
1109 |
+
},
|
1110 |
+
"@esbuild/linux-loong64": {
|
1111 |
+
"version": "0.19.5",
|
1112 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz",
|
1113 |
+
"integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==",
|
1114 |
+
"optional": true
|
1115 |
+
},
|
1116 |
+
"@esbuild/linux-mips64el": {
|
1117 |
+
"version": "0.19.5",
|
1118 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz",
|
1119 |
+
"integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==",
|
1120 |
+
"optional": true
|
1121 |
+
},
|
1122 |
+
"@esbuild/linux-ppc64": {
|
1123 |
+
"version": "0.19.5",
|
1124 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz",
|
1125 |
+
"integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==",
|
1126 |
+
"optional": true
|
1127 |
+
},
|
1128 |
+
"@esbuild/linux-riscv64": {
|
1129 |
+
"version": "0.19.5",
|
1130 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz",
|
1131 |
+
"integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==",
|
1132 |
+
"optional": true
|
1133 |
+
},
|
1134 |
+
"@esbuild/linux-s390x": {
|
1135 |
+
"version": "0.19.5",
|
1136 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz",
|
1137 |
+
"integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==",
|
1138 |
+
"optional": true
|
1139 |
+
},
|
1140 |
+
"@esbuild/linux-x64": {
|
1141 |
+
"version": "0.19.5",
|
1142 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz",
|
1143 |
+
"integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==",
|
1144 |
+
"optional": true
|
1145 |
+
},
|
1146 |
+
"@esbuild/netbsd-x64": {
|
1147 |
+
"version": "0.19.5",
|
1148 |
+
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz",
|
1149 |
+
"integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==",
|
1150 |
+
"optional": true
|
1151 |
+
},
|
1152 |
+
"@esbuild/openbsd-x64": {
|
1153 |
+
"version": "0.19.5",
|
1154 |
+
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz",
|
1155 |
+
"integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==",
|
1156 |
+
"optional": true
|
1157 |
+
},
|
1158 |
+
"@esbuild/sunos-x64": {
|
1159 |
+
"version": "0.19.5",
|
1160 |
+
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz",
|
1161 |
+
"integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==",
|
1162 |
+
"optional": true
|
1163 |
+
},
|
1164 |
+
"@esbuild/win32-arm64": {
|
1165 |
+
"version": "0.19.5",
|
1166 |
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz",
|
1167 |
+
"integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==",
|
1168 |
+
"optional": true
|
1169 |
+
},
|
1170 |
+
"@esbuild/win32-ia32": {
|
1171 |
+
"version": "0.19.5",
|
1172 |
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz",
|
1173 |
+
"integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==",
|
1174 |
+
"optional": true
|
1175 |
+
},
|
1176 |
+
"@esbuild/win32-x64": {
|
1177 |
+
"version": "0.19.5",
|
1178 |
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz",
|
1179 |
+
"integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==",
|
1180 |
+
"optional": true
|
1181 |
+
},
|
1182 |
+
"@formatjs/ecma402-abstract": {
|
1183 |
+
"version": "1.11.4",
|
1184 |
+
"resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz",
|
1185 |
+
"integrity": "sha512-EBikYFp2JCdIfGEb5G9dyCkTGDmC57KSHhRQOC3aYxoPWVZvfWCDjZwkGYHN7Lis/fmuWl906bnNTJifDQ3sXw==",
|
1186 |
+
"requires": {
|
1187 |
+
"@formatjs/intl-localematcher": "0.2.25",
|
1188 |
+
"tslib": "^2.1.0"
|
1189 |
+
}
|
1190 |
+
},
|
1191 |
+
"@formatjs/fast-memoize": {
|
1192 |
+
"version": "1.2.1",
|
1193 |
+
"resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-1.2.1.tgz",
|
1194 |
+
"integrity": "sha512-Rg0e76nomkz3vF9IPlKeV+Qynok0r7YZjL6syLz4/urSg0IbjPZCB/iYUMNsYA643gh4mgrX3T7KEIFIxJBQeg==",
|
1195 |
+
"requires": {
|
1196 |
+
"tslib": "^2.1.0"
|
1197 |
+
}
|
1198 |
+
},
|
1199 |
+
"@formatjs/icu-messageformat-parser": {
|
1200 |
+
"version": "2.1.0",
|
1201 |
+
"resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.0.tgz",
|
1202 |
+
"integrity": "sha512-Qxv/lmCN6hKpBSss2uQ8IROVnta2r9jd3ymUEIjm2UyIkUCHVcbUVRGL/KS/wv7876edvsPe+hjHVJ4z8YuVaw==",
|
1203 |
+
"requires": {
|
1204 |
+
"@formatjs/ecma402-abstract": "1.11.4",
|
1205 |
+
"@formatjs/icu-skeleton-parser": "1.3.6",
|
1206 |
+
"tslib": "^2.1.0"
|
1207 |
+
}
|
1208 |
+
},
|
1209 |
+
"@formatjs/icu-skeleton-parser": {
|
1210 |
+
"version": "1.3.6",
|
1211 |
+
"resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.6.tgz",
|
1212 |
+
"integrity": "sha512-I96mOxvml/YLrwU2Txnd4klA7V8fRhb6JG/4hm3VMNmeJo1F03IpV2L3wWt7EweqNLES59SZ4d6hVOPCSf80Bg==",
|
1213 |
+
"requires": {
|
1214 |
+
"@formatjs/ecma402-abstract": "1.11.4",
|
1215 |
+
"tslib": "^2.1.0"
|
1216 |
+
}
|
1217 |
+
},
|
1218 |
+
"@formatjs/intl-localematcher": {
|
1219 |
+
"version": "0.2.25",
|
1220 |
+
"resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.25.tgz",
|
1221 |
+
"integrity": "sha512-YmLcX70BxoSopLFdLr1Ds99NdlTI2oWoLbaUW2M406lxOIPzE1KQhRz2fPUkq34xVZQaihCoU29h0KK7An3bhA==",
|
1222 |
+
"requires": {
|
1223 |
+
"tslib": "^2.1.0"
|
1224 |
+
}
|
1225 |
+
},
|
1226 |
+
"@gradio/atoms": {
|
1227 |
+
"version": "0.2.1",
|
1228 |
+
"resolved": "https://registry.npmjs.org/@gradio/atoms/-/atoms-0.2.1.tgz",
|
1229 |
+
"integrity": "sha512-di3kKSbjxKGngvTAaqUaA6whOVs5BFlQULlWDPq1m37VRgUD7Oq2MkIE+T+YiNAhByN93pqA0hGrWwAUUuxy5Q==",
|
1230 |
+
"requires": {
|
1231 |
+
"@gradio/icons": "^0.2.0",
|
1232 |
+
"@gradio/utils": "^0.2.0"
|
1233 |
+
}
|
1234 |
+
},
|
1235 |
+
"@gradio/client": {
|
1236 |
+
"version": "0.8.1",
|
1237 |
+
"resolved": "https://registry.npmjs.org/@gradio/client/-/client-0.8.1.tgz",
|
1238 |
+
"integrity": "sha512-qMFINw6MbubLYQiLorwGhyapH7bUSthH+7tevGgKOPuQWoW5TliPi95VEFRUQ+d2Y/vXqWj0+hubO94RO7v/7w==",
|
1239 |
+
"requires": {
|
1240 |
+
"bufferutil": "^4.0.7",
|
1241 |
+
"semiver": "^1.1.0",
|
1242 |
+
"ws": "^8.13.0"
|
1243 |
+
}
|
1244 |
+
},
|
1245 |
+
"@gradio/column": {
|
1246 |
+
"version": "0.1.0",
|
1247 |
+
"resolved": "https://registry.npmjs.org/@gradio/column/-/column-0.1.0.tgz",
|
1248 |
+
"integrity": "sha512-P24nqqVnMXBaDA1f/zSN5HZRho4PxP8Dq+7VltPHlmxIEiZYik2AJ4J0LeuIha34FDO0guu/16evdrpvGIUAfw=="
|
1249 |
+
},
|
1250 |
+
"@gradio/icons": {
|
1251 |
+
"version": "0.2.0",
|
1252 |
+
"resolved": "https://registry.npmjs.org/@gradio/icons/-/icons-0.2.0.tgz",
|
1253 |
+
"integrity": "sha512-rfCSmOF+ALqBOjTWL1ICasyA8JuO0MPwFrtlVMyAWp7R14AN8YChC/gbz5fZ0kNBiGGEYOOfqpKxyvC95jGGlg=="
|
1254 |
+
},
|
1255 |
+
"@gradio/statustracker": {
|
1256 |
+
"version": "0.3.1",
|
1257 |
+
"resolved": "https://registry.npmjs.org/@gradio/statustracker/-/statustracker-0.3.1.tgz",
|
1258 |
+
"integrity": "sha512-ZpmXZSnbgoFU2J54SrNntwfo2OEuEoRV310Q0zGVTH1VL7loziR7GuYhfIbgS8qFlrWM0MhMoLGDX+k7LAig5w==",
|
1259 |
+
"requires": {
|
1260 |
+
"@gradio/atoms": "^0.2.1",
|
1261 |
+
"@gradio/column": "^0.1.0",
|
1262 |
+
"@gradio/icons": "^0.2.0",
|
1263 |
+
"@gradio/utils": "^0.2.0"
|
1264 |
+
}
|
1265 |
+
},
|
1266 |
+
"@gradio/theme": {
|
1267 |
+
"version": "0.2.0",
|
1268 |
+
"resolved": "https://registry.npmjs.org/@gradio/theme/-/theme-0.2.0.tgz",
|
1269 |
+
"integrity": "sha512-33c68Nk7oRXLn08OxPfjcPm7S4tXGOUV1I1bVgzdM2YV5o1QBOS1GEnXPZPu/CEYPePLMB6bsDwffrLEyLGWVQ=="
|
1270 |
+
},
|
1271 |
+
"@gradio/upload": {
|
1272 |
+
"version": "0.4.1",
|
1273 |
+
"resolved": "https://registry.npmjs.org/@gradio/upload/-/upload-0.4.1.tgz",
|
1274 |
+
"integrity": "sha512-iXEckwathXVCDRX+Jrnc6Qu5MDK108niej9p190V7+/B3+vjjP1eCBAd881zH7JR3VHthUBjNVu5/uXZ9cVX1A==",
|
1275 |
+
"requires": {
|
1276 |
+
"@gradio/atoms": "^0.2.1",
|
1277 |
+
"@gradio/client": "^0.8.1",
|
1278 |
+
"@gradio/icons": "^0.2.0",
|
1279 |
+
"@gradio/upload": "^0.4.1",
|
1280 |
+
"@gradio/utils": "^0.2.0"
|
1281 |
+
}
|
1282 |
+
},
|
1283 |
+
"@gradio/utils": {
|
1284 |
+
"version": "0.2.0",
|
1285 |
+
"resolved": "https://registry.npmjs.org/@gradio/utils/-/utils-0.2.0.tgz",
|
1286 |
+
"integrity": "sha512-YkwzXufi6IxQrlMW+1sFo8Yn6F9NLL69ZoBsbo7QEhms0v5L7pmOTw+dfd7M3dwbRP2lgjrb52i1kAIN3n6aqQ==",
|
1287 |
+
"requires": {
|
1288 |
+
"@gradio/theme": "^0.2.0",
|
1289 |
+
"svelte-i18n": "^3.6.0"
|
1290 |
+
}
|
1291 |
+
},
|
1292 |
+
"@gradio/wasm": {
|
1293 |
+
"version": "0.3.0",
|
1294 |
+
"resolved": "https://registry.npmjs.org/@gradio/wasm/-/wasm-0.3.0.tgz",
|
1295 |
+
"integrity": "sha512-avgMFBrHUUDzQraBMW9mNgiQMMkObsPzDap0PZV6FgzfDpW8K+R4BBcl+gClq82jRi3ulDjtISTXriUrNNfkrg==",
|
1296 |
+
"requires": {
|
1297 |
+
"@types/path-browserify": "^1.0.0",
|
1298 |
+
"path-browserify": "^1.0.1"
|
1299 |
+
}
|
1300 |
+
},
|
1301 |
+
"@jridgewell/gen-mapping": {
|
1302 |
+
"version": "0.3.3",
|
1303 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
|
1304 |
+
"integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
|
1305 |
+
"peer": true,
|
1306 |
+
"requires": {
|
1307 |
+
"@jridgewell/set-array": "^1.0.1",
|
1308 |
+
"@jridgewell/sourcemap-codec": "^1.4.10",
|
1309 |
+
"@jridgewell/trace-mapping": "^0.3.9"
|
1310 |
+
}
|
1311 |
+
},
|
1312 |
+
"@jridgewell/resolve-uri": {
|
1313 |
+
"version": "3.1.1",
|
1314 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
|
1315 |
+
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
|
1316 |
+
"peer": true
|
1317 |
+
},
|
1318 |
+
"@jridgewell/set-array": {
|
1319 |
+
"version": "1.1.2",
|
1320 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
|
1321 |
+
"integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
|
1322 |
+
"peer": true
|
1323 |
+
},
|
1324 |
+
"@jridgewell/sourcemap-codec": {
|
1325 |
+
"version": "1.4.15",
|
1326 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
1327 |
+
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
|
1328 |
+
"peer": true
|
1329 |
+
},
|
1330 |
+
"@jridgewell/trace-mapping": {
|
1331 |
+
"version": "0.3.20",
|
1332 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
|
1333 |
+
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
|
1334 |
+
"peer": true,
|
1335 |
+
"requires": {
|
1336 |
+
"@jridgewell/resolve-uri": "^3.1.0",
|
1337 |
+
"@jridgewell/sourcemap-codec": "^1.4.14"
|
1338 |
+
}
|
1339 |
+
},
|
1340 |
+
"@types/estree": {
|
1341 |
+
"version": "1.0.5",
|
1342 |
+
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
1343 |
+
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
|
1344 |
+
"peer": true
|
1345 |
+
},
|
1346 |
+
"@types/path-browserify": {
|
1347 |
+
"version": "1.0.2",
|
1348 |
+
"resolved": "https://registry.npmjs.org/@types/path-browserify/-/path-browserify-1.0.2.tgz",
|
1349 |
+
"integrity": "sha512-ZkC5IUqqIFPXx3ASTTybTzmQdwHwe2C0u3eL75ldQ6T9E9IWFJodn6hIfbZGab73DfyiHN4Xw15gNxUq2FbvBA=="
|
1350 |
+
},
|
1351 |
+
"acorn": {
|
1352 |
+
"version": "8.11.2",
|
1353 |
+
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
|
1354 |
+
"integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
|
1355 |
+
"peer": true
|
1356 |
+
},
|
1357 |
+
"aria-query": {
|
1358 |
+
"version": "5.3.0",
|
1359 |
+
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
|
1360 |
+
"integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
|
1361 |
+
"peer": true,
|
1362 |
+
"requires": {
|
1363 |
+
"dequal": "^2.0.3"
|
1364 |
+
}
|
1365 |
+
},
|
1366 |
+
"axobject-query": {
|
1367 |
+
"version": "3.2.1",
|
1368 |
+
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz",
|
1369 |
+
"integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==",
|
1370 |
+
"peer": true,
|
1371 |
+
"requires": {
|
1372 |
+
"dequal": "^2.0.3"
|
1373 |
+
}
|
1374 |
+
},
|
1375 |
+
"bufferutil": {
|
1376 |
+
"version": "4.0.8",
|
1377 |
+
"resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz",
|
1378 |
+
"integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==",
|
1379 |
+
"requires": {
|
1380 |
+
"node-gyp-build": "^4.3.0"
|
1381 |
+
}
|
1382 |
+
},
|
1383 |
+
"cli-color": {
|
1384 |
+
"version": "2.0.3",
|
1385 |
+
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz",
|
1386 |
+
"integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==",
|
1387 |
+
"requires": {
|
1388 |
+
"d": "^1.0.1",
|
1389 |
+
"es5-ext": "^0.10.61",
|
1390 |
+
"es6-iterator": "^2.0.3",
|
1391 |
+
"memoizee": "^0.4.15",
|
1392 |
+
"timers-ext": "^0.1.7"
|
1393 |
+
}
|
1394 |
+
},
|
1395 |
+
"code-red": {
|
1396 |
+
"version": "1.0.4",
|
1397 |
+
"resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz",
|
1398 |
+
"integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
|
1399 |
+
"peer": true,
|
1400 |
+
"requires": {
|
1401 |
+
"@jridgewell/sourcemap-codec": "^1.4.15",
|
1402 |
+
"@types/estree": "^1.0.1",
|
1403 |
+
"acorn": "^8.10.0",
|
1404 |
+
"estree-walker": "^3.0.3",
|
1405 |
+
"periscopic": "^3.1.0"
|
1406 |
+
}
|
1407 |
+
},
|
1408 |
+
"cropperjs": {
|
1409 |
+
"version": "1.6.1",
|
1410 |
+
"resolved": "https://registry.npmjs.org/cropperjs/-/cropperjs-1.6.1.tgz",
|
1411 |
+
"integrity": "sha512-F4wsi+XkDHCOMrHMYjrTEE4QBOrsHHN5/2VsVAaRq8P7E5z7xQpT75S+f/9WikmBEailas3+yo+6zPIomW+NOA=="
|
1412 |
+
},
|
1413 |
+
"css-tree": {
|
1414 |
+
"version": "2.3.1",
|
1415 |
+
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
|
1416 |
+
"integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
|
1417 |
+
"peer": true,
|
1418 |
+
"requires": {
|
1419 |
+
"mdn-data": "2.0.30",
|
1420 |
+
"source-map-js": "^1.0.1"
|
1421 |
+
}
|
1422 |
+
},
|
1423 |
+
"d": {
|
1424 |
+
"version": "1.0.1",
|
1425 |
+
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
|
1426 |
+
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
|
1427 |
+
"requires": {
|
1428 |
+
"es5-ext": "^0.10.50",
|
1429 |
+
"type": "^1.0.1"
|
1430 |
+
}
|
1431 |
+
},
|
1432 |
+
"deepmerge": {
|
1433 |
+
"version": "4.3.1",
|
1434 |
+
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
1435 |
+
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="
|
1436 |
+
},
|
1437 |
+
"dequal": {
|
1438 |
+
"version": "2.0.3",
|
1439 |
+
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
1440 |
+
"integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
|
1441 |
+
"peer": true
|
1442 |
+
},
|
1443 |
+
"es5-ext": {
|
1444 |
+
"version": "0.10.62",
|
1445 |
+
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz",
|
1446 |
+
"integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==",
|
1447 |
+
"requires": {
|
1448 |
+
"es6-iterator": "^2.0.3",
|
1449 |
+
"es6-symbol": "^3.1.3",
|
1450 |
+
"next-tick": "^1.1.0"
|
1451 |
+
}
|
1452 |
+
},
|
1453 |
+
"es6-iterator": {
|
1454 |
+
"version": "2.0.3",
|
1455 |
+
"resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
|
1456 |
+
"integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
|
1457 |
+
"requires": {
|
1458 |
+
"d": "1",
|
1459 |
+
"es5-ext": "^0.10.35",
|
1460 |
+
"es6-symbol": "^3.1.1"
|
1461 |
+
}
|
1462 |
+
},
|
1463 |
+
"es6-symbol": {
|
1464 |
+
"version": "3.1.3",
|
1465 |
+
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
|
1466 |
+
"integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
|
1467 |
+
"requires": {
|
1468 |
+
"d": "^1.0.1",
|
1469 |
+
"ext": "^1.1.2"
|
1470 |
+
}
|
1471 |
+
},
|
1472 |
+
"es6-weak-map": {
|
1473 |
+
"version": "2.0.3",
|
1474 |
+
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
|
1475 |
+
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
|
1476 |
+
"requires": {
|
1477 |
+
"d": "1",
|
1478 |
+
"es5-ext": "^0.10.46",
|
1479 |
+
"es6-iterator": "^2.0.3",
|
1480 |
+
"es6-symbol": "^3.1.1"
|
1481 |
+
}
|
1482 |
+
},
|
1483 |
+
"esbuild": {
|
1484 |
+
"version": "0.19.5",
|
1485 |
+
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz",
|
1486 |
+
"integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==",
|
1487 |
+
"requires": {
|
1488 |
+
"@esbuild/android-arm": "0.19.5",
|
1489 |
+
"@esbuild/android-arm64": "0.19.5",
|
1490 |
+
"@esbuild/android-x64": "0.19.5",
|
1491 |
+
"@esbuild/darwin-arm64": "0.19.5",
|
1492 |
+
"@esbuild/darwin-x64": "0.19.5",
|
1493 |
+
"@esbuild/freebsd-arm64": "0.19.5",
|
1494 |
+
"@esbuild/freebsd-x64": "0.19.5",
|
1495 |
+
"@esbuild/linux-arm": "0.19.5",
|
1496 |
+
"@esbuild/linux-arm64": "0.19.5",
|
1497 |
+
"@esbuild/linux-ia32": "0.19.5",
|
1498 |
+
"@esbuild/linux-loong64": "0.19.5",
|
1499 |
+
"@esbuild/linux-mips64el": "0.19.5",
|
1500 |
+
"@esbuild/linux-ppc64": "0.19.5",
|
1501 |
+
"@esbuild/linux-riscv64": "0.19.5",
|
1502 |
+
"@esbuild/linux-s390x": "0.19.5",
|
1503 |
+
"@esbuild/linux-x64": "0.19.5",
|
1504 |
+
"@esbuild/netbsd-x64": "0.19.5",
|
1505 |
+
"@esbuild/openbsd-x64": "0.19.5",
|
1506 |
+
"@esbuild/sunos-x64": "0.19.5",
|
1507 |
+
"@esbuild/win32-arm64": "0.19.5",
|
1508 |
+
"@esbuild/win32-ia32": "0.19.5",
|
1509 |
+
"@esbuild/win32-x64": "0.19.5"
|
1510 |
+
}
|
1511 |
+
},
|
1512 |
+
"estree-walker": {
|
1513 |
+
"version": "3.0.3",
|
1514 |
+
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
|
1515 |
+
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
|
1516 |
+
"peer": true,
|
1517 |
+
"requires": {
|
1518 |
+
"@types/estree": "^1.0.0"
|
1519 |
+
}
|
1520 |
+
},
|
1521 |
+
"event-emitter": {
|
1522 |
+
"version": "0.3.5",
|
1523 |
+
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
1524 |
+
"integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==",
|
1525 |
+
"requires": {
|
1526 |
+
"d": "1",
|
1527 |
+
"es5-ext": "~0.10.14"
|
1528 |
+
}
|
1529 |
+
},
|
1530 |
+
"ext": {
|
1531 |
+
"version": "1.7.0",
|
1532 |
+
"resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz",
|
1533 |
+
"integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==",
|
1534 |
+
"requires": {
|
1535 |
+
"type": "^2.7.2"
|
1536 |
+
},
|
1537 |
+
"dependencies": {
|
1538 |
+
"type": {
|
1539 |
+
"version": "2.7.2",
|
1540 |
+
"resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz",
|
1541 |
+
"integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw=="
|
1542 |
+
}
|
1543 |
+
}
|
1544 |
+
},
|
1545 |
+
"globalyzer": {
|
1546 |
+
"version": "0.1.0",
|
1547 |
+
"resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
|
1548 |
+
"integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q=="
|
1549 |
+
},
|
1550 |
+
"globrex": {
|
1551 |
+
"version": "0.1.2",
|
1552 |
+
"resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
|
1553 |
+
"integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg=="
|
1554 |
+
},
|
1555 |
+
"intl-messageformat": {
|
1556 |
+
"version": "9.13.0",
|
1557 |
+
"resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.13.0.tgz",
|
1558 |
+
"integrity": "sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw==",
|
1559 |
+
"requires": {
|
1560 |
+
"@formatjs/ecma402-abstract": "1.11.4",
|
1561 |
+
"@formatjs/fast-memoize": "1.2.1",
|
1562 |
+
"@formatjs/icu-messageformat-parser": "2.1.0",
|
1563 |
+
"tslib": "^2.1.0"
|
1564 |
+
}
|
1565 |
+
},
|
1566 |
+
"is-promise": {
|
1567 |
+
"version": "2.2.2",
|
1568 |
+
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
|
1569 |
+
"integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
|
1570 |
+
},
|
1571 |
+
"is-reference": {
|
1572 |
+
"version": "3.0.2",
|
1573 |
+
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
|
1574 |
+
"integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
|
1575 |
+
"peer": true,
|
1576 |
+
"requires": {
|
1577 |
+
"@types/estree": "*"
|
1578 |
+
}
|
1579 |
+
},
|
1580 |
+
"lazy-brush": {
|
1581 |
+
"version": "1.0.1",
|
1582 |
+
"resolved": "https://registry.npmjs.org/lazy-brush/-/lazy-brush-1.0.1.tgz",
|
1583 |
+
"integrity": "sha512-xT/iSClTVi7vLoF8dCWTBhCuOWqsLXCMPa6ucVmVAk6hyNCM5JeS1NLhXqIrJktUg+caEYKlqSOUU4u3cpXzKg=="
|
1584 |
+
},
|
1585 |
+
"locate-character": {
|
1586 |
+
"version": "3.0.0",
|
1587 |
+
"resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
|
1588 |
+
"integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
|
1589 |
+
"peer": true
|
1590 |
+
},
|
1591 |
+
"lru-queue": {
|
1592 |
+
"version": "0.1.0",
|
1593 |
+
"resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz",
|
1594 |
+
"integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==",
|
1595 |
+
"requires": {
|
1596 |
+
"es5-ext": "~0.10.2"
|
1597 |
+
}
|
1598 |
+
},
|
1599 |
+
"magic-string": {
|
1600 |
+
"version": "0.30.5",
|
1601 |
+
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
|
1602 |
+
"integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
|
1603 |
+
"peer": true,
|
1604 |
+
"requires": {
|
1605 |
+
"@jridgewell/sourcemap-codec": "^1.4.15"
|
1606 |
+
}
|
1607 |
+
},
|
1608 |
+
"mdn-data": {
|
1609 |
+
"version": "2.0.30",
|
1610 |
+
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
|
1611 |
+
"integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
|
1612 |
+
"peer": true
|
1613 |
+
},
|
1614 |
+
"memoizee": {
|
1615 |
+
"version": "0.4.15",
|
1616 |
+
"resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz",
|
1617 |
+
"integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==",
|
1618 |
+
"requires": {
|
1619 |
+
"d": "^1.0.1",
|
1620 |
+
"es5-ext": "^0.10.53",
|
1621 |
+
"es6-weak-map": "^2.0.3",
|
1622 |
+
"event-emitter": "^0.3.5",
|
1623 |
+
"is-promise": "^2.2.2",
|
1624 |
+
"lru-queue": "^0.1.0",
|
1625 |
+
"next-tick": "^1.1.0",
|
1626 |
+
"timers-ext": "^0.1.7"
|
1627 |
+
}
|
1628 |
+
},
|
1629 |
+
"mri": {
|
1630 |
+
"version": "1.2.0",
|
1631 |
+
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
1632 |
+
"integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="
|
1633 |
+
},
|
1634 |
+
"next-tick": {
|
1635 |
+
"version": "1.1.0",
|
1636 |
+
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
|
1637 |
+
"integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
|
1638 |
+
},
|
1639 |
+
"node-gyp-build": {
|
1640 |
+
"version": "4.6.1",
|
1641 |
+
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz",
|
1642 |
+
"integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ=="
|
1643 |
+
},
|
1644 |
+
"pannellum": {
|
1645 |
+
"version": "2.5.6",
|
1646 |
+
"resolved": "https://registry.npmjs.org/pannellum/-/pannellum-2.5.6.tgz",
|
1647 |
+
"integrity": "sha512-R4kSPpj36wQPlyIi9ZftxPfVYF11DEbNBATUEI+pkMGZDFYBV5Jxi6tYFVDdmxA2xaTeKZQHMIuIIj7njVSTQQ=="
|
1648 |
+
},
|
1649 |
+
"path-browserify": {
|
1650 |
+
"version": "1.0.1",
|
1651 |
+
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
|
1652 |
+
"integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="
|
1653 |
+
},
|
1654 |
+
"periscopic": {
|
1655 |
+
"version": "3.1.0",
|
1656 |
+
"resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz",
|
1657 |
+
"integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
|
1658 |
+
"peer": true,
|
1659 |
+
"requires": {
|
1660 |
+
"@types/estree": "^1.0.0",
|
1661 |
+
"estree-walker": "^3.0.0",
|
1662 |
+
"is-reference": "^3.0.0"
|
1663 |
+
}
|
1664 |
+
},
|
1665 |
+
"resize-observer-polyfill": {
|
1666 |
+
"version": "1.5.1",
|
1667 |
+
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
|
1668 |
+
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
|
1669 |
+
},
|
1670 |
+
"sade": {
|
1671 |
+
"version": "1.8.1",
|
1672 |
+
"resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
|
1673 |
+
"integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
|
1674 |
+
"requires": {
|
1675 |
+
"mri": "^1.1.0"
|
1676 |
+
}
|
1677 |
+
},
|
1678 |
+
"semiver": {
|
1679 |
+
"version": "1.1.0",
|
1680 |
+
"resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz",
|
1681 |
+
"integrity": "sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg=="
|
1682 |
+
},
|
1683 |
+
"source-map-js": {
|
1684 |
+
"version": "1.0.2",
|
1685 |
+
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
1686 |
+
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
1687 |
+
"peer": true
|
1688 |
+
},
|
1689 |
+
"svelte": {
|
1690 |
+
"version": "4.2.3",
|
1691 |
+
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.3.tgz",
|
1692 |
+
"integrity": "sha512-sqmG9KC6uUc7fb3ZuWoxXvqk6MI9Uu4ABA1M0fYDgTlFYu1k02xp96u6U9+yJZiVm84m9zge7rrA/BNZdFpOKw==",
|
1693 |
+
"peer": true,
|
1694 |
+
"requires": {
|
1695 |
+
"@ampproject/remapping": "^2.2.1",
|
1696 |
+
"@jridgewell/sourcemap-codec": "^1.4.15",
|
1697 |
+
"@jridgewell/trace-mapping": "^0.3.18",
|
1698 |
+
"acorn": "^8.9.0",
|
1699 |
+
"aria-query": "^5.3.0",
|
1700 |
+
"axobject-query": "^3.2.1",
|
1701 |
+
"code-red": "^1.0.3",
|
1702 |
+
"css-tree": "^2.3.1",
|
1703 |
+
"estree-walker": "^3.0.3",
|
1704 |
+
"is-reference": "^3.0.1",
|
1705 |
+
"locate-character": "^3.0.0",
|
1706 |
+
"magic-string": "^0.30.4",
|
1707 |
+
"periscopic": "^3.1.0"
|
1708 |
+
}
|
1709 |
+
},
|
1710 |
+
"svelte-i18n": {
|
1711 |
+
"version": "3.7.4",
|
1712 |
+
"resolved": "https://registry.npmjs.org/svelte-i18n/-/svelte-i18n-3.7.4.tgz",
|
1713 |
+
"integrity": "sha512-yGRCNo+eBT4cPuU7IVsYTYjxB7I2V8qgUZPlHnNctJj5IgbJgV78flsRzpjZ/8iUYZrS49oCt7uxlU3AZv/N5Q==",
|
1714 |
+
"requires": {
|
1715 |
+
"cli-color": "^2.0.3",
|
1716 |
+
"deepmerge": "^4.2.2",
|
1717 |
+
"esbuild": "^0.19.2",
|
1718 |
+
"estree-walker": "^2",
|
1719 |
+
"intl-messageformat": "^9.13.0",
|
1720 |
+
"sade": "^1.8.1",
|
1721 |
+
"tiny-glob": "^0.2.9"
|
1722 |
+
},
|
1723 |
+
"dependencies": {
|
1724 |
+
"estree-walker": {
|
1725 |
+
"version": "2.0.2",
|
1726 |
+
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
1727 |
+
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
|
1728 |
+
}
|
1729 |
+
}
|
1730 |
+
},
|
1731 |
+
"timers-ext": {
|
1732 |
+
"version": "0.1.7",
|
1733 |
+
"resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz",
|
1734 |
+
"integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==",
|
1735 |
+
"requires": {
|
1736 |
+
"es5-ext": "~0.10.46",
|
1737 |
+
"next-tick": "1"
|
1738 |
+
}
|
1739 |
+
},
|
1740 |
+
"tiny-glob": {
|
1741 |
+
"version": "0.2.9",
|
1742 |
+
"resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz",
|
1743 |
+
"integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==",
|
1744 |
+
"requires": {
|
1745 |
+
"globalyzer": "0.1.0",
|
1746 |
+
"globrex": "^0.1.2"
|
1747 |
+
}
|
1748 |
+
},
|
1749 |
+
"tslib": {
|
1750 |
+
"version": "2.6.2",
|
1751 |
+
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
|
1752 |
+
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
|
1753 |
+
},
|
1754 |
+
"type": {
|
1755 |
+
"version": "1.2.0",
|
1756 |
+
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
1757 |
+
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
1758 |
+
},
|
1759 |
+
"ws": {
|
1760 |
+
"version": "8.14.2",
|
1761 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
|
1762 |
+
"integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
|
1763 |
+
"requires": {}
|
1764 |
+
}
|
1765 |
+
}
|
1766 |
+
}
|
src/frontend/package.json
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "gradio_pannellum",
|
3 |
+
"version": "0.3.5",
|
4 |
+
"description": "Gradio UI packages",
|
5 |
+
"type": "module",
|
6 |
+
"author": "",
|
7 |
+
"license": "ISC",
|
8 |
+
"private": false,
|
9 |
+
"dependencies": {
|
10 |
+
"@gradio/atoms": "0.2.1",
|
11 |
+
"@gradio/client": "0.8.1",
|
12 |
+
"@gradio/icons": "0.2.0",
|
13 |
+
"@gradio/statustracker": "0.3.1",
|
14 |
+
"@gradio/upload": "0.4.1",
|
15 |
+
"@gradio/utils": "0.2.0",
|
16 |
+
"@gradio/wasm": "0.3.0",
|
17 |
+
"cropperjs": "^1.5.12",
|
18 |
+
"lazy-brush": "^1.0.1",
|
19 |
+
"pannellum": "^2.5.6",
|
20 |
+
"resize-observer-polyfill": "^1.5.1"
|
21 |
+
},
|
22 |
+
"main_changeset": true,
|
23 |
+
"main": "./Index.svelte",
|
24 |
+
"exports": {
|
25 |
+
".": "./Index.svelte",
|
26 |
+
"./example": "./Example.svelte",
|
27 |
+
"./package.json": "./package.json"
|
28 |
+
}
|
29 |
+
}
|
src/frontend/shared/ClearImage.svelte
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script lang="ts">
|
2 |
+
import { createEventDispatcher } from "svelte";
|
3 |
+
import { IconButton } from "@gradio/atoms";
|
4 |
+
import { Clear } from "@gradio/icons";
|
5 |
+
|
6 |
+
const dispatch = createEventDispatcher();
|
7 |
+
</script>
|
8 |
+
|
9 |
+
<div>
|
10 |
+
<IconButton
|
11 |
+
Icon={Clear}
|
12 |
+
label="Remove Image"
|
13 |
+
on:click={(event) => {
|
14 |
+
dispatch("remove_image");
|
15 |
+
event.stopPropagation();
|
16 |
+
}}
|
17 |
+
/>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
<style>
|
21 |
+
div {
|
22 |
+
display: flex;
|
23 |
+
position: absolute;
|
24 |
+
top: var(--size-2);
|
25 |
+
right: var(--size-2);
|
26 |
+
justify-content: flex-end;
|
27 |
+
gap: var(--spacing-sm);
|
28 |
+
z-index: var(--layer-5);
|
29 |
+
}
|
30 |
+
</style>
|
src/frontend/shared/Image.svelte
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script lang="ts">
|
2 |
+
import type { HTMLImgAttributes } from "svelte/elements";
|
3 |
+
type $$Props = HTMLImgAttributes;
|
4 |
+
|
5 |
+
import { resolve_wasm_src } from "@gradio/wasm/svelte";
|
6 |
+
|
7 |
+
export let src: HTMLImgAttributes["src"] = undefined;
|
8 |
+
</script>
|
9 |
+
|
10 |
+
{#await resolve_wasm_src(src) then resolved_src}
|
11 |
+
<!-- svelte-ignore a11y-missing-attribute -->
|
12 |
+
<img src={resolved_src} {...$$restProps} />
|
13 |
+
{:catch error}
|
14 |
+
<p style="color: red;">{error.message}</p>
|
15 |
+
{/await}
|
16 |
+
|
17 |
+
<style>
|
18 |
+
img {
|
19 |
+
max-width: 100%;
|
20 |
+
max-height: 100%;
|
21 |
+
border-radius: var(--radius-lg);
|
22 |
+
max-width: none;
|
23 |
+
}
|
24 |
+
</style>
|
src/frontend/shared/ImagePreview.svelte
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script lang="ts">
|
2 |
+
import { uploadToHuggingFace } from "@gradio/utils";
|
3 |
+
import { BlockLabel, Empty, IconButton, ShareButton } from "@gradio/atoms";
|
4 |
+
import { Download } from "@gradio/icons";
|
5 |
+
|
6 |
+
import { Image } from "@gradio/icons";
|
7 |
+
import { type FileData } from "@gradio/client";
|
8 |
+
import type { I18nFormatter } from "@gradio/utils";
|
9 |
+
import SveltePannellum from './SveltePannellum.svelte';
|
10 |
+
|
11 |
+
export let value: null | FileData;
|
12 |
+
export let label: string | undefined = undefined;
|
13 |
+
export let show_label: boolean;
|
14 |
+
export let show_download_button = true;
|
15 |
+
export let show_share_button = false;
|
16 |
+
export let i18n: I18nFormatter;
|
17 |
+
export let height: number = 400;
|
18 |
+
</script>
|
19 |
+
|
20 |
+
<BlockLabel {show_label} Icon={Image} label={label || i18n("image.image")} />
|
21 |
+
{#if value === null || !value.url}
|
22 |
+
<Empty unpadded_box={true} size="large"><Image /></Empty>
|
23 |
+
{:else}
|
24 |
+
<div class="icon-buttons">
|
25 |
+
{#if show_download_button}
|
26 |
+
<a
|
27 |
+
href={value.url}
|
28 |
+
target={window.__is_colab__ ? "_blank" : null}
|
29 |
+
download={"image"}
|
30 |
+
>
|
31 |
+
<IconButton Icon={Download} label={i18n("common.download")} />
|
32 |
+
</a>
|
33 |
+
{/if}
|
34 |
+
{#if show_share_button}
|
35 |
+
<ShareButton
|
36 |
+
{i18n}
|
37 |
+
on:share
|
38 |
+
on:error
|
39 |
+
formatter={async (value) => {
|
40 |
+
if (!value) return "";
|
41 |
+
let url = await uploadToHuggingFace(value, "base64");
|
42 |
+
return `<img src="${url}" />`;
|
43 |
+
}}
|
44 |
+
{value}
|
45 |
+
/>
|
46 |
+
{/if}
|
47 |
+
</div>
|
48 |
+
<SveltePannellum div_id="pannellum-preview-{value.orig_name}" panorama={value.url} height={height}/>
|
49 |
+
{/if}
|
50 |
+
|
51 |
+
<style>
|
52 |
+
.icon-buttons {
|
53 |
+
display: flex;
|
54 |
+
position: absolute;
|
55 |
+
top: 6px;
|
56 |
+
right: 6px;
|
57 |
+
gap: var(--size-1);
|
58 |
+
}
|
59 |
+
</style>
|
src/frontend/shared/ImageUploader.svelte
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script lang="ts">
|
2 |
+
import { BlockLabel } from "@gradio/atoms";
|
3 |
+
import { Image } from "@gradio/icons";
|
4 |
+
import type { I18nFormatter } from "@gradio/utils";
|
5 |
+
import { ImagePaste, Upload as UploadIcon } from "@gradio/icons";
|
6 |
+
import { Toolbar, IconButton } from "@gradio/atoms";
|
7 |
+
|
8 |
+
import { Upload } from "@gradio/upload";
|
9 |
+
import { type FileData, normalise_file } from "@gradio/client";
|
10 |
+
import ClearImage from "./ClearImage.svelte";
|
11 |
+
import SveltePannellum from './SveltePannellum.svelte';
|
12 |
+
|
13 |
+
export let value: null | FileData;
|
14 |
+
export let label: string | undefined = undefined;
|
15 |
+
export let height: number = 400;
|
16 |
+
export let show_label: boolean;
|
17 |
+
|
18 |
+
export let sources: ("clipboard" | "upload")[] = ["upload", "clipboard"];
|
19 |
+
export let root: string;
|
20 |
+
export let i18n: I18nFormatter;
|
21 |
+
|
22 |
+
let upload: Upload;
|
23 |
+
|
24 |
+
function handle_upload({ detail }: CustomEvent<FileData>): void {
|
25 |
+
value = normalise_file(detail, root, null);
|
26 |
+
}
|
27 |
+
|
28 |
+
$: value && !value.url && (value = normalise_file(value, root, null));
|
29 |
+
|
30 |
+
let dragging = false;
|
31 |
+
|
32 |
+
const sources_meta = {
|
33 |
+
upload: {
|
34 |
+
icon: UploadIcon,
|
35 |
+
label: i18n("Upload"),
|
36 |
+
order: 0
|
37 |
+
},
|
38 |
+
clipboard: {
|
39 |
+
icon: ImagePaste,
|
40 |
+
label: i18n("Paste"),
|
41 |
+
order: 1
|
42 |
+
}
|
43 |
+
};
|
44 |
+
|
45 |
+
$: sources_list = sources.sort(
|
46 |
+
(a, b) => sources_meta[a].order - sources_meta[b].order
|
47 |
+
);
|
48 |
+
|
49 |
+
async function handle_toolbar(
|
50 |
+
source: (typeof sources)[number]
|
51 |
+
): Promise<void> {
|
52 |
+
switch (source) {
|
53 |
+
case "clipboard":
|
54 |
+
navigator.clipboard.read().then(async (items) => {
|
55 |
+
for (let i = 0; i < items.length; i++) {
|
56 |
+
const type = items[i].types.find((t) => t.startsWith("image/"));
|
57 |
+
if (type) {
|
58 |
+
items[i].getType(type).then(async (blob) => {
|
59 |
+
const f = await upload.load_files([
|
60 |
+
new File([blob], `clipboard.${type.replace("image/", "")}`)
|
61 |
+
]);
|
62 |
+
f;
|
63 |
+
value = f?.[0] || null;
|
64 |
+
});
|
65 |
+
break;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
});
|
69 |
+
break;
|
70 |
+
case "upload":
|
71 |
+
upload.open_file_upload();
|
72 |
+
break;
|
73 |
+
default:
|
74 |
+
break;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
</script>
|
78 |
+
|
79 |
+
<BlockLabel {show_label} Icon={Image} label={label || "Image"} />
|
80 |
+
|
81 |
+
<div data-testid="image" class="image-container">
|
82 |
+
{#if value?.url}
|
83 |
+
<ClearImage on:remove_image={() => (value = null)} />
|
84 |
+
{/if}
|
85 |
+
<div class="upload-container">
|
86 |
+
<Upload
|
87 |
+
hidden={value !== null}
|
88 |
+
bind:this={upload}
|
89 |
+
bind:dragging
|
90 |
+
filetype="image/*"
|
91 |
+
on:load={handle_upload}
|
92 |
+
on:error
|
93 |
+
{root}
|
94 |
+
disable_click={!sources.includes("upload")}
|
95 |
+
>
|
96 |
+
{#if value === null}
|
97 |
+
<slot />
|
98 |
+
{/if}
|
99 |
+
</Upload>
|
100 |
+
{#if value !== null}
|
101 |
+
<!-- svelte-ignore a11y-click-events-have-key-events-->
|
102 |
+
<!-- svelte-ignore a11y-no-noninteractive-element-interactions-->
|
103 |
+
<SveltePannellum div_id="pannellum-uploader-{value.orig_name}" panorama={value.url} height={height}/>
|
104 |
+
{/if}
|
105 |
+
</div>
|
106 |
+
{#if sources.length > 1 || sources.includes("clipboard")}
|
107 |
+
<Toolbar show_border={!value?.url}>
|
108 |
+
{#each sources_list as source}
|
109 |
+
<IconButton
|
110 |
+
on:click={() => handle_toolbar(source)}
|
111 |
+
Icon={sources_meta[source].icon}
|
112 |
+
size="large"
|
113 |
+
padded={false}
|
114 |
+
/>
|
115 |
+
{/each}
|
116 |
+
</Toolbar>
|
117 |
+
{/if}
|
118 |
+
</div>
|
119 |
+
|
120 |
+
<style>
|
121 |
+
.upload-container {
|
122 |
+
height: 100%;
|
123 |
+
flex-shrink: 1;
|
124 |
+
max-height: 100%;
|
125 |
+
width: 100%;
|
126 |
+
}
|
127 |
+
|
128 |
+
.image-container {
|
129 |
+
display: flex;
|
130 |
+
height: 100%;
|
131 |
+
flex-direction: column;
|
132 |
+
justify-content: center;
|
133 |
+
align-items: center;
|
134 |
+
max-height: 100%;
|
135 |
+
}
|
136 |
+
</style>
|
src/frontend/shared/SveltePannellum.svelte
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script lang="ts">
|
2 |
+
export let div_id: string;
|
3 |
+
export let panorama: string;
|
4 |
+
export let height: number = 400;
|
5 |
+
|
6 |
+
import { onMount } from 'svelte';
|
7 |
+
import "pannellum";
|
8 |
+
import 'pannellum/build/pannellum.css'
|
9 |
+
|
10 |
+
onMount(() => {
|
11 |
+
window.pannellum.viewer(
|
12 |
+
div_id, {
|
13 |
+
"type": "equirectangular",
|
14 |
+
"panorama": panorama,
|
15 |
+
});
|
16 |
+
});
|
17 |
+
</script>
|
18 |
+
|
19 |
+
<!-- <div id="div-pannellum" alt={alt_text}></div> -->
|
20 |
+
<div id={div_id} style="height: {height}px;"></div>
|
src/frontend/shared/utils.ts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export const get_coordinates_of_clicked_image = (
|
2 |
+
evt: MouseEvent
|
3 |
+
): [number, number] | null => {
|
4 |
+
let image = evt.currentTarget as HTMLImageElement;
|
5 |
+
|
6 |
+
const imageRect = image.getBoundingClientRect();
|
7 |
+
const xScale = image.naturalWidth / imageRect.width;
|
8 |
+
const yScale = image.naturalHeight / imageRect.height;
|
9 |
+
if (xScale > yScale) {
|
10 |
+
const displayed_height = image.naturalHeight / xScale;
|
11 |
+
const y_offset = (imageRect.height - displayed_height) / 2;
|
12 |
+
var x = Math.round((evt.clientX - imageRect.left) * xScale);
|
13 |
+
var y = Math.round((evt.clientY - imageRect.top - y_offset) * xScale);
|
14 |
+
} else {
|
15 |
+
const displayed_width = image.naturalWidth / yScale;
|
16 |
+
const x_offset = (imageRect.width - displayed_width) / 2;
|
17 |
+
var x = Math.round((evt.clientX - imageRect.left - x_offset) * yScale);
|
18 |
+
var y = Math.round((evt.clientY - imageRect.top) * yScale);
|
19 |
+
}
|
20 |
+
if (x < 0 || x >= image.naturalWidth || y < 0 || y >= image.naturalHeight) {
|
21 |
+
return null;
|
22 |
+
}
|
23 |
+
return [x, y];
|
24 |
+
};
|
src/package-lock.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "pannellum",
|
3 |
+
"lockfileVersion": 2,
|
4 |
+
"requires": true,
|
5 |
+
"packages": {}
|
6 |
+
}
|
src/package.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{}
|
src/pyproject.toml
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[build-system]
|
2 |
+
requires = [
|
3 |
+
"hatchling",
|
4 |
+
"hatch-requirements-txt",
|
5 |
+
"hatch-fancy-pypi-readme>=22.5.0",
|
6 |
+
]
|
7 |
+
build-backend = "hatchling.build"
|
8 |
+
|
9 |
+
[project]
|
10 |
+
name = "gradio_pannellum"
|
11 |
+
version = "0.0.1"
|
12 |
+
description = "Python library for easily interacting with trained machine learning models"
|
13 |
+
readme = "README.md"
|
14 |
+
license = "Apache-2.0"
|
15 |
+
requires-python = ">=3.8"
|
16 |
+
authors = [{ name = "YOUR NAME", email = "YOUREMAIL@domain.com" }]
|
17 |
+
keywords = [
|
18 |
+
"machine learning",
|
19 |
+
"reproducibility",
|
20 |
+
"visualization",
|
21 |
+
"gradio",
|
22 |
+
"gradio custom component",
|
23 |
+
"gradio-template-Image"
|
24 |
+
]
|
25 |
+
# Add dependencies here
|
26 |
+
dependencies = ["gradio>=4.0,<5.0"]
|
27 |
+
classifiers = [
|
28 |
+
'Development Status :: 3 - Alpha',
|
29 |
+
'License :: OSI Approved :: Apache Software License',
|
30 |
+
'Operating System :: OS Independent',
|
31 |
+
'Programming Language :: Python :: 3',
|
32 |
+
'Programming Language :: Python :: 3 :: Only',
|
33 |
+
'Programming Language :: Python :: 3.8',
|
34 |
+
'Programming Language :: Python :: 3.9',
|
35 |
+
'Programming Language :: Python :: 3.10',
|
36 |
+
'Programming Language :: Python :: 3.11',
|
37 |
+
'Topic :: Scientific/Engineering',
|
38 |
+
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
39 |
+
'Topic :: Scientific/Engineering :: Visualization',
|
40 |
+
]
|
41 |
+
|
42 |
+
[project.optional-dependencies]
|
43 |
+
dev = ["build", "twine"]
|
44 |
+
|
45 |
+
[tool.hatch.build]
|
46 |
+
artifacts = ["/backend/gradio_pannellum/templates", "*.pyi", "backend/gradio_pannellum/templates"]
|
47 |
+
|
48 |
+
[tool.hatch.build.targets.wheel]
|
49 |
+
packages = ["/backend/gradio_pannellum"]
|
src/sample.jpeg
ADDED