Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
957b4b125e | ||
|
|
a59f632516 |
No files matched your search
Generated
-7
@@ -1,7 +0,0 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
|
||||||
<code_scheme name="Project" version="173">
|
|
||||||
<codeStyleSettings language="Python">
|
|
||||||
<option name="SOFT_MARGINS" value="120" />
|
|
||||||
</codeStyleSettings>
|
|
||||||
</code_scheme>
|
|
||||||
</component>
|
|
||||||
Generated
-5
@@ -1,5 +0,0 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
|
||||||
<state>
|
|
||||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
|
||||||
</state>
|
|
||||||
</component>
|
|
||||||
Generated
-5
@@ -16,10 +16,7 @@
|
|||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/testproj" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/testproj" isTestSource="false" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.cache" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.eggs" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.pytest_cache" />
|
<excludeFolder url="file://$MODULE_DIR$/.pytest_cache" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/docs/.doctrees" />
|
<excludeFolder url="file://$MODULE_DIR$/docs/.doctrees" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/docs/_build" />
|
<excludeFolder url="file://$MODULE_DIR$/docs/_build" />
|
||||||
@@ -29,14 +26,12 @@
|
|||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Python 3 (drf-yasg)" jdkType="Python SDK" />
|
<orderEntry type="jdk" jdkName="Python 3 (drf-yasg)" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="immutable" level="application" />
|
|
||||||
</component>
|
</component>
|
||||||
<component name="TemplatesService">
|
<component name="TemplatesService">
|
||||||
<option name="TEMPLATE_CONFIGURATION" value="Django" />
|
<option name="TEMPLATE_CONFIGURATION" value="Django" />
|
||||||
<option name="TEMPLATE_FOLDERS">
|
<option name="TEMPLATE_FOLDERS">
|
||||||
<list>
|
<list>
|
||||||
<option value="$MODULE_DIR$/src/drf_yasg/templates" />
|
<option value="$MODULE_DIR$/src/drf_yasg/templates" />
|
||||||
<option value="$MODULE_DIR$/testproj/testproj/templates" />
|
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
Generated
-4
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
|
||||||
</project>
|
|
||||||
Generated
-6
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="JavaScriptLibraryMappings">
|
|
||||||
<file url="file://$PROJECT_DIR$" libraries="{immutable}" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
+4
-7
@@ -15,20 +15,18 @@ jobs:
|
|||||||
python: '3.7'
|
python: '3.7'
|
||||||
dist: xenial
|
dist: xenial
|
||||||
sudo: required
|
sudo: required
|
||||||
- python: '3.6'
|
-
|
||||||
|
python: '3.6'
|
||||||
env: TOXENV=djmaster
|
env: TOXENV=djmaster
|
||||||
- # readthedocs uses python 3.5 for building
|
- # readthedocs uses python 3.5 for building
|
||||||
python: '3.5'
|
python: '3.5'
|
||||||
env: TOXENV=docs
|
env: TOXENV=docs
|
||||||
- python: '3.6'
|
-
|
||||||
|
python: '3.6'
|
||||||
env: TOXENV=lint
|
env: TOXENV=lint
|
||||||
|
|
||||||
- stage: publish
|
- stage: publish
|
||||||
python: '3.6'
|
python: '3.6'
|
||||||
before_script:
|
|
||||||
# workaround for Travis' inability to build PEP517 projects; anything added to build-system.requires
|
|
||||||
# will also have to be added here until Travis implements this
|
|
||||||
- pip install setuptools-scm
|
|
||||||
script: skip
|
script: skip
|
||||||
env: PYPI_DEPLOY=true
|
env: PYPI_DEPLOY=true
|
||||||
deploy: &pypi
|
deploy: &pypi
|
||||||
@@ -47,7 +45,6 @@ jobs:
|
|||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python -m pip install -U pip setuptools
|
|
||||||
- pip install -r requirements/ci.txt
|
- pip install -r requirements/ci.txt
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
|
|||||||
+5
-6
@@ -35,7 +35,6 @@ You want to contribute some code? Great! Here are a few steps to get you started
|
|||||||
|
|
||||||
$ virtualenv venv
|
$ virtualenv venv
|
||||||
$ source venv/bin/activate
|
$ source venv/bin/activate
|
||||||
(venv) $ python -m pip install -U pip setuptools
|
|
||||||
(venv) $ pip install -U -e .[validation]
|
(venv) $ pip install -U -e .[validation]
|
||||||
(venv) $ pip install -U -r requirements/dev.txt
|
(venv) $ pip install -U -r requirements/dev.txt
|
||||||
|
|
||||||
@@ -45,6 +44,7 @@ You want to contribute some code? Great! Here are a few steps to get you started
|
|||||||
|
|
||||||
(venv) $ cd testproj
|
(venv) $ cd testproj
|
||||||
(venv) $ python manage.py migrate
|
(venv) $ python manage.py migrate
|
||||||
|
(venv) $ python manage.py shell -c "import createsuperuser"
|
||||||
(venv) $ python manage.py runserver
|
(venv) $ python manage.py runserver
|
||||||
(venv) $ firefox localhost:8000/swagger/
|
(venv) $ firefox localhost:8000/swagger/
|
||||||
|
|
||||||
@@ -57,7 +57,8 @@ You want to contribute some code? Great! Here are a few steps to get you started
|
|||||||
|
|
||||||
.. code:: console
|
.. code:: console
|
||||||
|
|
||||||
(venv) $ python testproj/manage.py generate_swagger ../tests/reference.yaml --overwrite --user admin --url http://test.local:8002/
|
(venv) $ cd testproj
|
||||||
|
(venv) $ python manage.py generate_swagger ../tests/reference.yaml --overwrite --user admin --url http://test.local:8002/
|
||||||
|
|
||||||
After checking the git diff to verify that no unexpected changes appeared, you should commit the new
|
After checking the git diff to verify that no unexpected changes appeared, you should commit the new
|
||||||
``reference.yaml`` together with your changes.
|
``reference.yaml`` together with your changes.
|
||||||
@@ -66,13 +67,11 @@ You want to contribute some code? Great! Here are a few steps to get you started
|
|||||||
|
|
||||||
.. code:: console
|
.. code:: console
|
||||||
|
|
||||||
# install test dependencies
|
|
||||||
(venv) $ pip install -U -r requirements/test.txt
|
|
||||||
# run tests in the current environment, faster than tox
|
|
||||||
(venv) $ pytest -n auto --cov
|
|
||||||
# (optional) sort imports with isort and check flake8 linting
|
# (optional) sort imports with isort and check flake8 linting
|
||||||
(venv) $ isort --apply
|
(venv) $ isort --apply
|
||||||
(venv) $ flake8 src/drf_yasg testproj tests setup.py
|
(venv) $ flake8 src/drf_yasg testproj tests setup.py
|
||||||
|
# run tests in the current environment, faster than tox
|
||||||
|
(venv) $ pytest --cov
|
||||||
# (optional) run tests for other python versions in separate environments
|
# (optional) run tests for other python versions in separate environments
|
||||||
(venv) $ tox
|
(venv) $ tox
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
include README.rst
|
include README.rst
|
||||||
include LICENSE.rst
|
include LICENSE.rst
|
||||||
include pyproject.toml
|
|
||||||
recursive-include requirements *
|
recursive-include requirements *
|
||||||
recursive-include src/drf_yasg/static *
|
recursive-include src/drf_yasg/static *
|
||||||
recursive-include src/drf_yasg/templates *
|
recursive-include src/drf_yasg/templates *
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
release: python testproj/manage.py migrate
|
release: python testproj/manage.py migrate && python testproj/manage.py shell -c "import createsuperuser"
|
||||||
web: gunicorn --chdir testproj testproj.wsgi --log-file -
|
web: gunicorn --chdir testproj testproj.wsgi --log-file -
|
||||||
+3
-3
@@ -114,7 +114,6 @@ In ``urls.py``:
|
|||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
...
|
...
|
||||||
from rest_framework import permissions
|
|
||||||
from drf_yasg.views import get_schema_view
|
from drf_yasg.views import get_schema_view
|
||||||
from drf_yasg import openapi
|
from drf_yasg import openapi
|
||||||
|
|
||||||
@@ -129,6 +128,7 @@ In ``urls.py``:
|
|||||||
contact=openapi.Contact(email="contact@snippets.local"),
|
contact=openapi.Contact(email="contact@snippets.local"),
|
||||||
license=openapi.License(name="BSD License"),
|
license=openapi.License(name="BSD License"),
|
||||||
),
|
),
|
||||||
|
validators=['flex', 'ssv'],
|
||||||
public=True,
|
public=True,
|
||||||
permission_classes=(permissions.AllowAny,),
|
permission_classes=(permissions.AllowAny,),
|
||||||
)
|
)
|
||||||
@@ -140,7 +140,7 @@ In ``urls.py``:
|
|||||||
...
|
...
|
||||||
]
|
]
|
||||||
|
|
||||||
This exposes 4 endpoints:
|
This exposes 4 cached, validated and publicly available endpoints:
|
||||||
|
|
||||||
* A JSON view of your API specification at ``/swagger.json``
|
* A JSON view of your API specification at ``/swagger.json``
|
||||||
* A YAML view of your API specification at ``/swagger.yaml``
|
* A YAML view of your API specification at ``/swagger.yaml``
|
||||||
@@ -294,9 +294,9 @@ For additional usage examples, you can take a look at the test project in the ``
|
|||||||
$ virtualenv venv
|
$ virtualenv venv
|
||||||
$ source venv/bin/activate
|
$ source venv/bin/activate
|
||||||
(venv) $ cd testproj
|
(venv) $ cd testproj
|
||||||
(venv) $ python -m pip install -U pip setuptools
|
|
||||||
(venv) $ pip install -U -r requirements.txt
|
(venv) $ pip install -U -r requirements.txt
|
||||||
(venv) $ python manage.py migrate
|
(venv) $ python manage.py migrate
|
||||||
|
(venv) $ python manage.py shell -c "import createsuperuser"
|
||||||
(venv) $ python manage.py runserver
|
(venv) $ python manage.py runserver
|
||||||
(venv) $ firefox localhost:8000/swagger/
|
(venv) $ firefox localhost:8000/swagger/
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -ex
|
||||||
|
|
||||||
coverage combine || true
|
coverage combine
|
||||||
coverage report
|
coverage report
|
||||||
codecov
|
codecov
|
||||||
+1
-64
@@ -2,69 +2,6 @@
|
|||||||
Changelog
|
Changelog
|
||||||
#########
|
#########
|
||||||
|
|
||||||
**********
|
|
||||||
**1.12.0**
|
|
||||||
**********
|
|
||||||
|
|
||||||
*Release date: Dec 23, 2018*
|
|
||||||
|
|
||||||
- **ADDED:** ``get_security_definitions`` and ``get_security_requirements`` hooks to ``OpenAPISchemaGenerator``
|
|
||||||
- **ADDED:** added ``get_summary_and_description`` and ``split_summary_from_description`` extension points to
|
|
||||||
``SwaggerAutoSchema`` to allow for better customisation
|
|
||||||
- **IMPROVED:** updated ``swagger-ui`` to version 3.20.4
|
|
||||||
- **IMPROVED:** paginator ``next`` and ``previous`` fields are now marked as ``x-nullable`` (:issue:`263`)
|
|
||||||
- **IMPROVED:** added the ``tags`` argument to ``swagger_auto_schema`` (:pr:`259`)
|
|
||||||
- **IMPROVED:** type of ``enum`` will now be automatically detected from ``ChoiceField`` if all ``choices`` values
|
|
||||||
are objects of the same Python class (:pr:`264`)
|
|
||||||
- **IMPROVED:** ``SwaggerValidationError`` details will now be logged and shown in the exception message
|
|
||||||
- **FIXED:** user implementations of ``get_queryset``, ``get_parsers`` and ``get_renderers`` will no longer be bypassed
|
|
||||||
- **FIXED:** fixed handling of lazy objects in user-supplied values
|
|
||||||
- **FIXED:** ``read_only`` serializer fields will be correctly ignored when generating form parameters (:issue:`261`)
|
|
||||||
- **FIXED:** fixed incorrect return type from ``UIRenderer`` (:pr:`268`)
|
|
||||||
- **FIXED:** fixed incosistent ordering of global ``securityDefinitions`` and ``security`` objects
|
|
||||||
- **DEPRECATED:** the ``get_summary`` and ``get_description`` extension points have been deprecated in favor of the
|
|
||||||
new ``get_summary_and_description``, and will be removed in a future release
|
|
||||||
|
|
||||||
**IMPORTANT PACKAGING NOTE**
|
|
||||||
|
|
||||||
Starting with this version, the ``setup_requires`` argument was dropped from ``setup.py`` in favor of
|
|
||||||
``build-system.requires`` in ``pyproject.toml`` . This means that for correctly building or installing from sdist,
|
|
||||||
you will need to use a PEP517/PEP518 compliant tool (tox>=3.3.0, setuptools>=40, pip>=10.0, pep517.build) or manually
|
|
||||||
install the build requirements yourself (just ```setuptools`` and ``setuptools-scm``, for now).
|
|
||||||
|
|
||||||
Additionally, for correct package version detection, a full git checkout is required when building (this was always the
|
|
||||||
case). Building without ``.git`` or without ``setuptools-scm`` will result in a distribution with a version like
|
|
||||||
``drf-yasg-1!0.0.0.dev0+noscm.00000167d19bd859``.
|
|
||||||
|
|
||||||
**********
|
|
||||||
**1.11.1**
|
|
||||||
**********
|
|
||||||
|
|
||||||
*Release date: Nov 29, 2018*
|
|
||||||
|
|
||||||
- **IMPROVED:** updated ``swagger-ui`` to version 3.20.1
|
|
||||||
- **IMPROVED:** updated ``ReDoc`` to version 2.0.0-alpha.41
|
|
||||||
- **FIXED:** ``minLength`` and ``maxLength`` will now also work for ``ListSerializer`` in addition to ``ListField``
|
|
||||||
- **FIXED:** ``MultipleChoiceField`` will now use the ``multi`` ``collectionFormat`` where appropriate (:issue:`257`)
|
|
||||||
- **FIXED:** the ``format``, ``pattern``, ``enum``, ``min_length`` and ``max_length`` attributes of
|
|
||||||
``coreschema.Schema`` will now be persited into the converted ``openapi.Parameter`` (:issue:`212`, :pr:`233`)
|
|
||||||
|
|
||||||
**********
|
|
||||||
**1.11.0**
|
|
||||||
**********
|
|
||||||
|
|
||||||
*Release date: Oct 14, 2018*
|
|
||||||
|
|
||||||
- **ADDED:** ``PERSIST_AUTH``, ``REFETCH_SCHEMA_WITH_AUTH``, ``REFETCH_SCHEMA_ON_LOGOUT``
|
|
||||||
settings and related javascript implementation for persisting authentication data to swagger-ui localStorage
|
|
||||||
- **IMPROVED:** UI-enabled views will now no longer generate the full specification document twice; the HTML part
|
|
||||||
of the view will only generate a barebones ``Swagger`` object with no ``paths`` and ``definitions``
|
|
||||||
- **IMPROVED:** added the ``FETCH_SCHEMA_WITH_QUERY`` setting to enable fetching of the schema document using
|
|
||||||
query parameters passed to the UI view (:issue:`208`)
|
|
||||||
- **IMPROVED:** added support for the very common ``x-nullable`` extension (:issue:`217`)
|
|
||||||
- **IMPROVED:** extensibility of some classes was improved by adding more extension points, together with more blocks
|
|
||||||
for ``swagger-ui.html``/``redoc.html`` and some JavaScript hooks in ``swagger-ui-init.js``
|
|
||||||
- **FIXED:** removed usage of ``inspect.signature`` on python 2.7 (:issue:`222`)
|
|
||||||
|
|
||||||
**********
|
**********
|
||||||
**1.10.2**
|
**1.10.2**
|
||||||
@@ -72,7 +9,7 @@ case). Building without ``.git`` or without ``setuptools-scm`` will result in a
|
|||||||
|
|
||||||
*Release date: Sep 13, 2018*
|
*Release date: Sep 13, 2018*
|
||||||
|
|
||||||
- **ADDED:** added the ``DISPLAY_OPERATION_ID`` ``swagger-ui`` setting
|
- **ADDED:** added the ``DISPLAY_OPERATION_ID `` ``swagger-ui`` setting
|
||||||
- **IMPROVED:** updated ``ReDoc`` to version 2.0.0-alpha.38
|
- **IMPROVED:** updated ``ReDoc`` to version 2.0.0-alpha.38
|
||||||
- **IMPROVED:** Operation summary will now be parsed from multi-line view method docstrings (:issue:`205`)
|
- **IMPROVED:** Operation summary will now be parsed from multi-line view method docstrings (:issue:`205`)
|
||||||
- **IMPROVED:** ``pattern`` will now work on any field with a ``RegexValidator``
|
- **IMPROVED:** ``pattern`` will now work on any field with a ``RegexValidator``
|
||||||
|
|||||||
+1
-4
@@ -171,19 +171,16 @@ nitpick_ignore = [
|
|||||||
('py:class', 'int'),
|
('py:class', 'int'),
|
||||||
('py:class', 'bytes'),
|
('py:class', 'bytes'),
|
||||||
('py:class', 'tuple'),
|
('py:class', 'tuple'),
|
||||||
('py:class', 'function'),
|
('py:class', 'callable'),
|
||||||
('py:class', 'type'),
|
('py:class', 'type'),
|
||||||
('py:class', 'OrderedDict'),
|
('py:class', 'OrderedDict'),
|
||||||
('py:class', 'None'),
|
('py:class', 'None'),
|
||||||
('py:obj', 'None'),
|
|
||||||
|
|
||||||
('py:class', 'Exception'),
|
('py:class', 'Exception'),
|
||||||
('py:class', 'collections.OrderedDict'),
|
('py:class', 'collections.OrderedDict'),
|
||||||
|
|
||||||
('py:class', 'ruamel.yaml.dumper.SafeDumper'),
|
('py:class', 'ruamel.yaml.dumper.SafeDumper'),
|
||||||
('py:class', 'rest_framework.serializers.Serializer'),
|
|
||||||
('py:class', 'rest_framework.renderers.BaseRenderer'),
|
('py:class', 'rest_framework.renderers.BaseRenderer'),
|
||||||
('py:class', 'rest_framework.parsers.BaseParser'),
|
|
||||||
('py:class', 'rest_framework.schemas.generators.EndpointEnumerator'),
|
('py:class', 'rest_framework.schemas.generators.EndpointEnumerator'),
|
||||||
('py:class', 'rest_framework.views.APIView'),
|
('py:class', 'rest_framework.views.APIView'),
|
||||||
|
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ implemented like so:
|
|||||||
))
|
))
|
||||||
class ArticleViewSet(viewsets.ModelViewSet):
|
class ArticleViewSet(viewsets.ModelViewSet):
|
||||||
filter_backends = (DjangoFilterBackend,)
|
filter_backends = (DjangoFilterBackend,)
|
||||||
filterset_fields = ('title',)
|
filter_fields = ('title',)
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -4,12 +4,15 @@ Customizing the web UI
|
|||||||
|
|
||||||
The web UI can be customized using the settings available in :ref:`swagger-ui-settings` and :ref:`redoc-ui-settings`.
|
The web UI can be customized using the settings available in :ref:`swagger-ui-settings` and :ref:`redoc-ui-settings`.
|
||||||
|
|
||||||
You can also extend one of the `drf-yasg/swagger-ui.html`_ or `drf-yasg/redoc.html`_ templates that are used for
|
You can also extend one of the ``drf-yasg/swagger-ui.html`` or ``drf-yasg/redoc.html`` templates that are used for
|
||||||
rendering. See the template source code (linked above) for a complete list of customizable blocks.
|
rendering. The customizable blocks are currently limited to:
|
||||||
|
|
||||||
The ``swagger-ui`` view has some quite involed JavaScript hooks used for some functionality, which you might also
|
{% block extra_styles %}
|
||||||
want to review at `drf-yasg/swagger-ui-init.js`_.
|
additional stylesheets
|
||||||
|
|
||||||
.. _drf-yasg/swagger-ui.html: https://github.com/axnsan12/drf-yasg/blob/master/src/drf_yasg/templates/drf-yasg/swagger-ui.html
|
{% block extra_scripts %}
|
||||||
.. _drf-yasg/swagger-ui-init.js: https://github.com/axnsan12/drf-yasg/blob/master/src/drf_yasg/static/drf-yasg/swagger-ui-init.js
|
additional scripts
|
||||||
.. _drf-yasg/redoc.html: https://github.com/axnsan12/drf-yasg/blob/master/src/drf_yasg/templates/drf-yasg/redoc.html
|
|
||||||
|
{% block user_context_message %}
|
||||||
|
*(swagger-ui session auth only)*
|
||||||
|
logged in user message
|
||||||
+1
-1
@@ -14,7 +14,7 @@ This library generates OpenAPI 2.0 documents. The authoritative specification fo
|
|||||||
be the official documentation over at `swagger.io <https://swagger.io/>`__ and the `OpenAPI 2.0 specification
|
be the official documentation over at `swagger.io <https://swagger.io/>`__ and the `OpenAPI 2.0 specification
|
||||||
page <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__.
|
page <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__.
|
||||||
|
|
||||||
Beause the above specifications are a bit heavy and convoluted, here is a general overview of how the specification
|
Because the above specifications are a bit heavy and convoluted, here is a general overview of how the specification
|
||||||
is structured, starting from the root ``Swagger`` object.
|
is structured, starting from the root ``Swagger`` object.
|
||||||
|
|
||||||
* :class:`.Swagger` object
|
* :class:`.Swagger` object
|
||||||
|
|||||||
@@ -222,40 +222,6 @@ set to ``None`` to remove the badge.
|
|||||||
**Default**: :python:`'http://online.swagger.io/validator/'` |br|
|
**Default**: :python:`'http://online.swagger.io/validator/'` |br|
|
||||||
*Maps to parameter*: ``validatorUrl``
|
*Maps to parameter*: ``validatorUrl``
|
||||||
|
|
||||||
PERSIST_AUTH
|
|
||||||
------------
|
|
||||||
|
|
||||||
Persist swagger-ui authorization data to local storage. |br|
|
|
||||||
**WARNING:** This may be a security risk as the credentials are stored unencrypted and can be accessed
|
|
||||||
by all javascript code running on the same domain.
|
|
||||||
|
|
||||||
**Default**: :python:`False` |br|
|
|
||||||
*Maps to parameter*: -
|
|
||||||
|
|
||||||
REFETCH_SCHEMA_WITH_AUTH
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
Re-fetch the OpenAPI document with the new credentials after authorization is performed through swagger-ui.
|
|
||||||
|
|
||||||
**Default**: :python:`False` |br|
|
|
||||||
*Maps to parameter*: -
|
|
||||||
|
|
||||||
REFETCH_SCHEMA_ON_LOGOUT
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
Re-fetch the OpenAPI document without credentials after authorization is removed through swagger-ui.
|
|
||||||
|
|
||||||
**Default**: :python:`False` |br|
|
|
||||||
*Maps to parameter*: -
|
|
||||||
|
|
||||||
FETCH_SCHEMA_WITH_QUERY
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
Fetch the OpenAPI document using the query parameters passed to the swagger-ui page request.
|
|
||||||
|
|
||||||
**Default**: :python:`True` |br|
|
|
||||||
*Maps to parameter*: -
|
|
||||||
|
|
||||||
OPERATIONS_SORTER
|
OPERATIONS_SORTER
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
@@ -449,13 +415,5 @@ Show required properties first ordered in the same order as in required array.
|
|||||||
**Default**: :python:`False` |br|
|
**Default**: :python:`False` |br|
|
||||||
*Maps to attribute*: ``requiredPropsFirst``
|
*Maps to attribute*: ``requiredPropsFirst``
|
||||||
|
|
||||||
FETCH_SCHEMA_WITH_QUERY
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
Fetch the OpenAPI document using the query parameters passed to the ReDoc page request.
|
|
||||||
|
|
||||||
**Default**: :python:`'True` |br|
|
|
||||||
*Maps to parameter*: -
|
|
||||||
|
|
||||||
|
|
||||||
.. _FORCE_SCRIPT_NAME: https://docs.djangoproject.com/en/2.0/ref/settings/#force-script-name
|
.. _FORCE_SCRIPT_NAME: https://docs.djangoproject.com/en/2.0/ref/settings/#force-script-name
|
||||||
Generated
+227
-68
@@ -3,14 +3,6 @@
|
|||||||
"requires": true,
|
"requires": true,
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": {
|
|
||||||
"version": "7.1.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.5.tgz",
|
|
||||||
"integrity": "sha512-xKnPpXG/pvK1B90JkwwxSGii90rQGKtzcMt2gI5G6+M0REXaq6rOHsGC2ay6/d0Uje7zzvSzjEzfR3ENhFlrfA==",
|
|
||||||
"requires": {
|
|
||||||
"regenerator-runtime": "^0.12.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argparse": {
|
"argparse": {
|
||||||
"version": "1.0.10",
|
"version": "1.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||||
@@ -19,6 +11,25 @@
|
|||||||
"sprintf-js": "~1.0.2"
|
"sprintf-js": "~1.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"asap": {
|
||||||
|
"version": "2.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
|
||||||
|
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
|
||||||
|
},
|
||||||
|
"base64-js": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw=="
|
||||||
|
},
|
||||||
|
"buffer": {
|
||||||
|
"version": "5.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz",
|
||||||
|
"integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==",
|
||||||
|
"requires": {
|
||||||
|
"base64-js": "^1.0.2",
|
||||||
|
"ieee754": "^1.1.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"call-me-maybe": {
|
"call-me-maybe": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
|
||||||
@@ -30,9 +41,9 @@
|
|||||||
"integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
|
"integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
|
||||||
},
|
},
|
||||||
"clipboard": {
|
"clipboard": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.1.tgz",
|
||||||
"integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==",
|
"integrity": "sha512-7yhQBmtN+uYZmfRjjVjKa0dZdWuabzpSKGtyQZN+9C8xlC788SSJjOHWh7tzurfwTqTD5UDYAhIv5fRJg3sHjQ==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"good-listener": "^1.2.2",
|
"good-listener": "^1.2.2",
|
||||||
@@ -40,6 +51,34 @@
|
|||||||
"tiny-emitter": "^2.0.0"
|
"tiny-emitter": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"core-js": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
|
||||||
|
"integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY="
|
||||||
|
},
|
||||||
|
"css-color-keywords": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU="
|
||||||
|
},
|
||||||
|
"css-to-react-native": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.2.1.tgz",
|
||||||
|
"integrity": "sha512-v++LRcf633phJiYZBDqtmGPj3+BVof0isd2jgwYLWZJ5YSuhCkrfYtDsNhM6oJthiEco0f9tDVJ1vUkDJNgGEA==",
|
||||||
|
"requires": {
|
||||||
|
"css-color-keywords": "^1.0.0",
|
||||||
|
"fbjs": "^0.8.5",
|
||||||
|
"postcss-value-parser": "^3.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"debug": {
|
||||||
|
"version": "3.2.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz",
|
||||||
|
"integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==",
|
||||||
|
"requires": {
|
||||||
|
"ms": "^2.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"decko": {
|
"decko": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/decko/-/decko-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/decko/-/decko-1.2.0.tgz",
|
||||||
@@ -61,6 +100,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-1.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-1.0.8.tgz",
|
||||||
"integrity": "sha512-vetRFbN1SXSPfP3ClIiYnxTrXquSqakBEOoB5JESn0SVcSYzpu6ougjakpKnskGctYdlNpwf+riUHSkG7d4XUw=="
|
"integrity": "sha512-vetRFbN1SXSPfP3ClIiYnxTrXquSqakBEOoB5JESn0SVcSYzpu6ougjakpKnskGctYdlNpwf+riUHSkG7d4XUw=="
|
||||||
},
|
},
|
||||||
|
"encoding": {
|
||||||
|
"version": "0.1.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
||||||
|
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
|
||||||
|
"requires": {
|
||||||
|
"iconv-lite": "~0.4.13"
|
||||||
|
}
|
||||||
|
},
|
||||||
"esprima": {
|
"esprima": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||||
@@ -76,6 +123,20 @@
|
|||||||
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
||||||
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
|
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
|
||||||
},
|
},
|
||||||
|
"fbjs": {
|
||||||
|
"version": "0.8.17",
|
||||||
|
"resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz",
|
||||||
|
"integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=",
|
||||||
|
"requires": {
|
||||||
|
"core-js": "^1.0.0",
|
||||||
|
"isomorphic-fetch": "^2.1.1",
|
||||||
|
"loose-envify": "^1.0.0",
|
||||||
|
"object-assign": "^4.1.0",
|
||||||
|
"promise": "^7.1.1",
|
||||||
|
"setimmediate": "^1.0.5",
|
||||||
|
"ua-parser-js": "^0.7.18"
|
||||||
|
}
|
||||||
|
},
|
||||||
"foreach": {
|
"foreach": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
|
||||||
@@ -104,12 +165,41 @@
|
|||||||
"delegate": "^3.1.2"
|
"delegate": "^3.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo="
|
||||||
|
},
|
||||||
"hoist-non-react-statics": {
|
"hoist-non-react-statics": {
|
||||||
"version": "3.2.0",
|
"version": "2.5.5",
|
||||||
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
|
||||||
"integrity": "sha512-3IascCRfaEkbmHjJnUxWSspIUE1okLPjGTMVXW8zraUo1t3yg1BadKAxAGILHwgoBzmMnzrgeeaDGBvpuPz6dA==",
|
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
|
||||||
|
},
|
||||||
|
"iconv-lite": {
|
||||||
|
"version": "0.4.24",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||||
|
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"react-is": "^16.3.2"
|
"safer-buffer": ">= 2.1.2 < 3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ieee754": {
|
||||||
|
"version": "1.1.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
|
||||||
|
"integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA=="
|
||||||
|
},
|
||||||
|
"is-stream": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
|
||||||
|
},
|
||||||
|
"isomorphic-fetch": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
|
||||||
|
"integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=",
|
||||||
|
"requires": {
|
||||||
|
"node-fetch": "^1.0.1",
|
||||||
|
"whatwg-fetch": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"js-tokens": {
|
"js-tokens": {
|
||||||
@@ -135,13 +225,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"json-schema-ref-parser": {
|
"json-schema-ref-parser": {
|
||||||
"version": "6.0.2",
|
"version": "5.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-5.1.3.tgz",
|
||||||
"integrity": "sha512-EENU7mrmuBAdjSsAEJD8mMvodZyDhLBEfuSUBSIMuXqjs+cfMbFaxS8f6+ky675jetRzGzCdhzAU3y2VEtquvQ==",
|
"integrity": "sha512-CpDFlBwz/6la78hZxyB9FECVKGYjIIl3Ms3KLqFj99W7IIb7D00/RDgc++IGB4BBALl0QRhh5m4q5WNSopvLtQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"call-me-maybe": "^1.0.1",
|
"call-me-maybe": "^1.0.1",
|
||||||
|
"debug": "^3.1.0",
|
||||||
"js-yaml": "^3.12.0",
|
"js-yaml": "^3.12.0",
|
||||||
"ono": "^4.0.10"
|
"ono": "^4.0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"loose-envify": {
|
"loose-envify": {
|
||||||
@@ -153,9 +244,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lunr": {
|
"lunr": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.3.tgz",
|
||||||
"integrity": "sha512-EtnfmHsHJTr3u24sito9JctSxej5Ds0SgUD2Lm+qRHyLgM7BGesFlW14eNh1mil0fV5Muh8gf3dBBXzADlUlzQ=="
|
"integrity": "sha512-rlAEsgU9Bnavca2w1WJ6+6cdeHMXNyadcersyk3ZpuhgWb5HBNj8l4WwJz9PjksAhYDlpQffCVXPctOn+wCIVA=="
|
||||||
},
|
},
|
||||||
"mark.js": {
|
"mark.js": {
|
||||||
"version": "8.11.1",
|
"version": "8.11.1",
|
||||||
@@ -163,13 +254,14 @@
|
|||||||
"integrity": "sha1-GA8fnr74sOY45BZq1S24eb6y/8U="
|
"integrity": "sha1-GA8fnr74sOY45BZq1S24eb6y/8U="
|
||||||
},
|
},
|
||||||
"marked": {
|
"marked": {
|
||||||
"version": "git+https://github.com/markedjs/marked.git#fb48827236ed3a43e611d2adb3c070ca3f55ed8e",
|
"version": "0.3.18",
|
||||||
"from": "git+https://github.com/markedjs/marked.git#fb48827"
|
"resolved": "https://registry.npmjs.org/marked/-/marked-0.3.18.tgz",
|
||||||
|
"integrity": "sha512-49i2QYhfULqaXzNZpxC808PisuCTGT2fgG0zrzdCI9N3rIfAWfW0nggvbXr6zvpynZdOG5+9xNxdzP0kwZnERw=="
|
||||||
},
|
},
|
||||||
"memoize-one": {
|
"memoize-one": {
|
||||||
"version": "4.0.3",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-4.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-4.0.2.tgz",
|
||||||
"integrity": "sha512-QmpUu4KqDmX0plH4u+tf0riMc1KHE1+lw95cMrLlXQAFOx/xnBtwhZ52XJxd9X2O6kwKBqX32kmhbhlobD0cuw=="
|
"integrity": "sha512-ucx2DmXTeZTsS4GPPUZCbULAN7kdPT1G+H49Y34JjbQ5ESc6OGhVxKvb1iKhr9v19ZB9OtnHwNnhUnNR/7Wteg=="
|
||||||
},
|
},
|
||||||
"min-document": {
|
"min-document": {
|
||||||
"version": "2.19.0",
|
"version": "2.19.0",
|
||||||
@@ -180,23 +272,37 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mobx-react": {
|
"mobx-react": {
|
||||||
"version": "5.4.2",
|
"version": "5.2.8",
|
||||||
"resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-5.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-5.2.8.tgz",
|
||||||
"integrity": "sha512-alSN0KDAAOb1OkYujfoJjjk0JWxWRKO4sLGB4hN2CuvaJMrlj7bhGQe7CBMJvEFNjtJRbhJcquYVjQ3rrH2zQQ==",
|
"integrity": "sha512-VAkeqkrIpdoy3VPPoqvxjdQmcTT6hi7i3TsZSwcKbSrPbSTuWc7cp1EOiX/zV1wPWEuoNAQ22bCrskQwvdYTJA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"hoist-non-react-statics": "^3.0.0",
|
"hoist-non-react-statics": "^2.5.0",
|
||||||
"react-lifecycles-compat": "^3.0.2"
|
"react-lifecycles-compat": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ms": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
||||||
|
},
|
||||||
|
"node-fetch": {
|
||||||
|
"version": "1.7.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
|
||||||
|
"integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
|
||||||
|
"requires": {
|
||||||
|
"encoding": "^0.1.11",
|
||||||
|
"is-stream": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||||
},
|
},
|
||||||
"ono": {
|
"ono": {
|
||||||
"version": "4.0.10",
|
"version": "4.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/ono/-/ono-4.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/ono/-/ono-4.0.7.tgz",
|
||||||
"integrity": "sha512-4Xz4hlbq7MzV0I3vKfZwRvyj8tCbXODqBNzFqtkjP+KTV93zzDRju8kw1qnf6P5kcZ2+xlIq6wSCqA+euSKxhA==",
|
"integrity": "sha512-FJiGEETwfSVyOwVTwQZD7XN69FRekvgtlobtvPwtilc7PxIHg3gKUykdNP7E9mC/VTF2cxqKZxUZfNKA3MuQLA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"format-util": "^1.0.3"
|
"format-util": "^1.0.3"
|
||||||
}
|
}
|
||||||
@@ -215,12 +321,14 @@
|
|||||||
"integrity": "sha512-/2Sk/khljhdrsamjJYS5NjrH+GKEHEwh7zFSiYyxROyYKagkE4kSn2zDQDRTOMo8mpT2jikxx6yI1dG7lNP/hw=="
|
"integrity": "sha512-/2Sk/khljhdrsamjJYS5NjrH+GKEHEwh7zFSiYyxROyYKagkE4kSn2zDQDRTOMo8mpT2jikxx6yI1dG7lNP/hw=="
|
||||||
},
|
},
|
||||||
"polished": {
|
"polished": {
|
||||||
"version": "2.3.0",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/polished/-/polished-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/polished/-/polished-2.0.3.tgz",
|
||||||
"integrity": "sha512-G2yD9LhJy5HBuU+Im5qe70ubaJI/ZTTOIJO6GRMwJ2WSoAiPzlm8+LjAXMnm9/K0E0NumRVHvQu2HHPKQSYQjw==",
|
"integrity": "sha512-MMwthxXsmZZlZY/x79KX/8kXpSU0lq3ntnDmAdhpQGk9pU9EM/rQmUbsgIuuk2Cvl6zYSWjyBsDEU8sa1598xg=="
|
||||||
"requires": {
|
},
|
||||||
"@babel/runtime": "^7.0.0"
|
"postcss-value-parser": {
|
||||||
}
|
"version": "3.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz",
|
||||||
|
"integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU="
|
||||||
},
|
},
|
||||||
"prismjs": {
|
"prismjs": {
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
@@ -235,6 +343,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz",
|
||||||
"integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8="
|
"integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8="
|
||||||
},
|
},
|
||||||
|
"promise": {
|
||||||
|
"version": "7.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
|
||||||
|
"integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
|
||||||
|
"requires": {
|
||||||
|
"asap": "~2.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"prop-types": {
|
"prop-types": {
|
||||||
"version": "15.6.2",
|
"version": "15.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz",
|
||||||
@@ -253,9 +369,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-hot-loader": {
|
"react-hot-loader": {
|
||||||
"version": "4.3.12",
|
"version": "4.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.3.12.tgz",
|
"resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.3.6.tgz",
|
||||||
"integrity": "sha512-GMM4TsqUVss2QPe+Y33NlgydA5/+7tAVQxR0rZqWvBpapM8JhD7p6ymMwSZzr5yxjoXXlK/6P6qNQBOqm1dqdg==",
|
"integrity": "sha512-iuBeBkLz7tdkKmKduNww9o5JY4ZH1XI0TWwkWToHIqfOSh1xMCqLMSYXUasWfgZWykWWa9IkueYab+cDq2jyWg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"fast-levenshtein": "^2.0.6",
|
"fast-levenshtein": "^2.0.6",
|
||||||
"global": "^4.3.0",
|
"global": "^4.3.0",
|
||||||
@@ -263,19 +379,12 @@
|
|||||||
"prop-types": "^15.6.1",
|
"prop-types": "^15.6.1",
|
||||||
"react-lifecycles-compat": "^3.0.4",
|
"react-lifecycles-compat": "^3.0.4",
|
||||||
"shallowequal": "^1.0.2"
|
"shallowequal": "^1.0.2"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"hoist-non-react-statics": {
|
|
||||||
"version": "2.5.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
|
|
||||||
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-is": {
|
"react-is": {
|
||||||
"version": "16.6.3",
|
"version": "16.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.5.0.tgz",
|
||||||
"integrity": "sha512-u7FDWtthB4rWibG/+mFbVd5FvdI20yde86qKGx4lVUTWmPlSWQ4QxbBIrrs+HnXGbxOUlUzTAP/VDmvCwaP2yA=="
|
"integrity": "sha512-kpkCGLsChXTEQJVmowQqHpCjHKJFwB4SIChYaaaiAkq8OtE2aBg5pQe8/xnFlGmz9KmMx1H4oQRUyxP7qC9v5A=="
|
||||||
},
|
},
|
||||||
"react-lifecycles-compat": {
|
"react-lifecycles-compat": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
@@ -292,19 +401,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"redoc": {
|
"redoc": {
|
||||||
"version": "2.0.0-alpha.41",
|
"version": "2.0.0-alpha.38",
|
||||||
"resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-alpha.41.tgz",
|
"resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-alpha.38.tgz",
|
||||||
"integrity": "sha512-g8XnoDRRNLq2GVk8cNYKtO6cK5cPK95qdCIc6PSNo2ueBVWEQBKooriSF57B6GVuaqoOBacqlGHQDPakvBQLYA==",
|
"integrity": "sha512-4pT/cRJ/aKdLlCxjFOSWvkA9ZVG5b9dUfxIM+H5698hlRaF6rcu4qh29eGwEikSDw0unH0iNd6MHy9u0fAjRGw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"decko": "^1.2.0",
|
"decko": "^1.2.0",
|
||||||
"dompurify": "^1.0.7",
|
"dompurify": "^1.0.7",
|
||||||
"eventemitter3": "^3.0.0",
|
"eventemitter3": "^3.0.0",
|
||||||
"json-pointer": "^0.6.0",
|
"json-pointer": "^0.6.0",
|
||||||
"json-schema-ref-parser": "^6.0.1",
|
"json-schema-ref-parser": "^5.1.2",
|
||||||
"lunr": "^2.3.2",
|
"lunr": "^2.3.2",
|
||||||
"mark.js": "^8.11.1",
|
"mark.js": "^8.11.1",
|
||||||
"marked": "git+https://github.com/markedjs/marked.git#fb48827236ed3a43e611d2adb3c070ca3f55ed8e",
|
"marked": "0.3.18",
|
||||||
"memoize-one": "^4.0.0",
|
"memoize-one": "^4.0.0",
|
||||||
"mobx-react": "^5.2.5",
|
"mobx-react": "^5.2.5",
|
||||||
"openapi-sampler": "1.0.0-beta.14",
|
"openapi-sampler": "1.0.0-beta.14",
|
||||||
@@ -317,13 +426,14 @@
|
|||||||
"react-tabs": "^2.0.0",
|
"react-tabs": "^2.0.0",
|
||||||
"slugify": "^1.3.1",
|
"slugify": "^1.3.1",
|
||||||
"stickyfill": "^1.1.1",
|
"stickyfill": "^1.1.1",
|
||||||
|
"styled-components": "^3.4.5",
|
||||||
"tslib": "^1.9.3"
|
"tslib": "^1.9.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"regenerator-runtime": {
|
"safer-buffer": {
|
||||||
"version": "0.12.1",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||||
"integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg=="
|
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||||
},
|
},
|
||||||
"select": {
|
"select": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
@@ -331,15 +441,20 @@
|
|||||||
"integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=",
|
"integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
"setimmediate": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
|
||||||
|
"integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
|
||||||
|
},
|
||||||
"shallowequal": {
|
"shallowequal": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
|
||||||
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
|
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
|
||||||
},
|
},
|
||||||
"slugify": {
|
"slugify": {
|
||||||
"version": "1.3.3",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.1.tgz",
|
||||||
"integrity": "sha512-aFvcXobuowA7RqU4IBVJvqmhkREDIqsj4oIJKk6JuZ5EO1PCwtAAwDCl8TdsMs4J9zCoDAVkB9FLUElDjNcRSg=="
|
"integrity": "sha512-6BwyhjF5tG5P8s+0DPNyJmBSBePG6iMyhjvIW5zGdA3tFik9PtK+yNkZgTeiroCRGZYgkHftFA62tGVK1EI9Kw=="
|
||||||
},
|
},
|
||||||
"sprintf-js": {
|
"sprintf-js": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
@@ -351,10 +466,44 @@
|
|||||||
"resolved": "https://registry.npmjs.org/stickyfill/-/stickyfill-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/stickyfill/-/stickyfill-1.1.1.tgz",
|
||||||
"integrity": "sha1-OUE/7p0CXHSn5ZzuyyN4TMDxfwI="
|
"integrity": "sha1-OUE/7p0CXHSn5ZzuyyN4TMDxfwI="
|
||||||
},
|
},
|
||||||
|
"styled-components": {
|
||||||
|
"version": "3.4.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/styled-components/-/styled-components-3.4.6.tgz",
|
||||||
|
"integrity": "sha512-HiEVVY93oH/PuekPuIE7ownn2wmO708rS8MM1yS20i0TCyFgPs3mbop8fJqKLRtC2/npVn2fO5Je6azaL6T2tg==",
|
||||||
|
"requires": {
|
||||||
|
"buffer": "^5.0.3",
|
||||||
|
"css-to-react-native": "^2.0.3",
|
||||||
|
"fbjs": "^0.8.16",
|
||||||
|
"hoist-non-react-statics": "^2.5.0",
|
||||||
|
"prop-types": "^15.5.4",
|
||||||
|
"react-is": "^16.3.1",
|
||||||
|
"stylis": "^3.5.0",
|
||||||
|
"stylis-rule-sheet": "^0.0.10",
|
||||||
|
"supports-color": "^3.2.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stylis": {
|
||||||
|
"version": "3.5.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.3.tgz",
|
||||||
|
"integrity": "sha512-TxU0aAscJghF9I3V9q601xcK3Uw1JbXvpsBGj/HULqexKOKlOEzzlIpLFRbKkCK990ccuxfXUqmPbIIo7Fq/cQ=="
|
||||||
|
},
|
||||||
|
"stylis-rule-sheet": {
|
||||||
|
"version": "0.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz",
|
||||||
|
"integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw=="
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "3.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
|
||||||
|
"integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"swagger-ui-dist": {
|
"swagger-ui-dist": {
|
||||||
"version": "3.20.4",
|
"version": "3.18.2",
|
||||||
"resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.20.4.tgz",
|
"resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.18.2.tgz",
|
||||||
"integrity": "sha512-SR/N+N7EIncEhyA4UGiMQ12vJBSv5OKO4S1g7E7etO+9ZUV6SZ7SqKVC8RDDyMOJzdXgMXV7aGIBIiMSCbEMJw=="
|
"integrity": "sha512-pWAEiKkgWUJvjmLW9AojudnutJ+NTn5g6OdNLj1iIJWwCkoy40K3Upwa24DqFbmIE4vLX4XplND61hp2L+s5vg=="
|
||||||
},
|
},
|
||||||
"tiny-emitter": {
|
"tiny-emitter": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
@@ -366,6 +515,16 @@
|
|||||||
"version": "1.9.3",
|
"version": "1.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||||
|
},
|
||||||
|
"ua-parser-js": {
|
||||||
|
"version": "0.7.18",
|
||||||
|
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz",
|
||||||
|
"integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA=="
|
||||||
|
},
|
||||||
|
"whatwg-fetch": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "drf-yasg",
|
"name": "drf-yasg",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"redoc": "^2.0.0-alpha.41",
|
"redoc": "^2.0.0-alpha.38",
|
||||||
"swagger-ui-dist": "^3.20.4"
|
"swagger-ui-dist": "^3.18.2"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
[build-system]
|
|
||||||
requires = ["setuptools >= 40.6.3", "wheel", "setuptools-scm >= 3.0.3"]
|
|
||||||
build-backend = "setuptools.build_meta"
|
|
||||||
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
# this file is only used when deploying to heroku, because heroku insists on having a root-level requirements.txt
|
-r requirements/setup.txt
|
||||||
# for normal usage see the requirements/ directory
|
|
||||||
.[validation]
|
.[validation]
|
||||||
-r requirements/heroku.txt
|
-r requirements/heroku.txt
|
||||||
@@ -2,8 +2,7 @@
|
|||||||
Sphinx>=1.7.0
|
Sphinx>=1.7.0
|
||||||
sphinx_rtd_theme>=0.2.4
|
sphinx_rtd_theme>=0.2.4
|
||||||
Pillow>=4.3.0
|
Pillow>=4.3.0
|
||||||
readme_renderer[md]>=24.0
|
readme_renderer>=17.2
|
||||||
twine>=1.12.1
|
|
||||||
|
|
||||||
Django>=2.0
|
Django>=2.0
|
||||||
djangorestframework_camel_case>=0.2.0
|
djangorestframework_camel_case>=0.2.0
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# needed to build the package setup_requires in setup.py
|
||||||
|
|
||||||
|
setuptools-scm>=3.0.6
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
# requirements for running the tests via pytest
|
# requirements for running the tests via pytest
|
||||||
pytest>=4.0
|
pytest>=2.9,<3.7 # <3.7 because of incompatible pluggy requirement
|
||||||
pytest-pythonpath>=0.7.1
|
pytest-pythonpath>=0.7.1
|
||||||
pytest-cov>=2.6.0
|
pytest-cov>=2.5.1
|
||||||
pytest-xdist>=1.25.0
|
pytest-xdist>=1.22.0
|
||||||
pytest-django>=3.4.4
|
pytest-django>=3.2.0
|
||||||
datadiff==2.0.0
|
datadiff==2.0.0
|
||||||
|
|
||||||
-r testproj.txt
|
-r testproj.txt
|
||||||
@@ -8,5 +8,3 @@ djangorestframework-camel-case>=0.2.0
|
|||||||
djangorestframework-recursive>=0.1.2
|
djangorestframework-recursive>=0.1.2
|
||||||
dj-database-url>=0.4.2
|
dj-database-url>=0.4.2
|
||||||
user_agents>=1.1.0
|
user_agents>=1.1.0
|
||||||
# django-oauth-toolkit 1.2 does not support Django 1.11
|
|
||||||
django-oauth-toolkit>=1.1.0,<1.2.0
|
|
||||||
@@ -1,2 +1,4 @@
|
|||||||
# requirements for building and running tox
|
# requirements for building and running tox
|
||||||
tox>=3.3.0
|
tox>=3.1.2
|
||||||
|
|
||||||
|
-r setup.txt
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
python-3.7.1
|
python-3.6.6
|
||||||
@@ -17,6 +17,7 @@ with io.open('README.rst', encoding='utf-8') as readme:
|
|||||||
description = readme.read()
|
description = readme.read()
|
||||||
|
|
||||||
requirements = read_req('base.txt')
|
requirements = read_req('base.txt')
|
||||||
|
requirements_setup = read_req('setup.txt')
|
||||||
requirements_validation = read_req('validation.txt')
|
requirements_validation = read_req('validation.txt')
|
||||||
|
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ def drf_yasg_setup(**kwargs):
|
|||||||
package_dir={'': 'src'},
|
package_dir={'': 'src'},
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=requirements,
|
install_requires=requirements,
|
||||||
|
setup_requires=requirements_setup,
|
||||||
extras_require={
|
extras_require={
|
||||||
'validation': requirements_validation,
|
'validation': requirements_validation,
|
||||||
},
|
},
|
||||||
@@ -65,27 +67,21 @@ def drf_yasg_setup(**kwargs):
|
|||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# noinspection PyUnresolvedReferences
|
|
||||||
import setuptools_scm # noqa: F401
|
|
||||||
|
|
||||||
drf_yasg_setup(use_scm_version=True)
|
drf_yasg_setup(use_scm_version=True)
|
||||||
except (ImportError, LookupError) as e:
|
except LookupError as e:
|
||||||
if os.getenv('CI', 'false') == 'true' or os.getenv('TRAVIS', 'false') == 'true':
|
if os.getenv('CI', 'false') == 'true' or os.getenv('TRAVIS', 'false') == 'true':
|
||||||
# don't silently fail on travis - we don't want to accidentally push a dummy version to PyPI
|
# don't silently fail on travis - we don't want to accidentally push a dummy version to PyPI
|
||||||
raise
|
raise
|
||||||
|
|
||||||
err_msg = str(e)
|
if 'setuptools-scm' in str(e):
|
||||||
if 'setuptools-scm' in err_msg or 'setuptools_scm' in err_msg:
|
|
||||||
import time
|
import time
|
||||||
import traceback
|
|
||||||
|
|
||||||
timestamp_ms = int(time.time() * 1000)
|
timestamp_ms = int(time.time() * 1000)
|
||||||
timestamp_str = hex(timestamp_ms)[2:].zfill(16)
|
timestamp_str = hex(timestamp_ms)[2:].zfill(16)
|
||||||
dummy_version = '1!0.0.0.dev0+noscm.' + timestamp_str
|
dummy_version = '0.0.0rc0+noscm' + timestamp_str
|
||||||
|
|
||||||
drf_yasg_setup(version=dummy_version)
|
drf_yasg_setup(version=dummy_version)
|
||||||
|
print(str(e), file=sys.stderr)
|
||||||
traceback.print_exc(file=sys.stderr)
|
print("failed to detect version, build was done using dummy version " + dummy_version, file=sys.stderr)
|
||||||
print("failed to detect version, package was built with dummy version " + dummy_version, file=sys.stderr)
|
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
@@ -33,7 +33,7 @@ SWAGGER_DEFAULTS = {
|
|||||||
|
|
||||||
'USE_SESSION_AUTH': True,
|
'USE_SESSION_AUTH': True,
|
||||||
'SECURITY_DEFINITIONS': {
|
'SECURITY_DEFINITIONS': {
|
||||||
'Basic': {
|
'basic': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -42,10 +42,6 @@ SWAGGER_DEFAULTS = {
|
|||||||
'LOGOUT_URL': getattr(settings, 'LOGOUT_URL', None),
|
'LOGOUT_URL': getattr(settings, 'LOGOUT_URL', None),
|
||||||
'SPEC_URL': None,
|
'SPEC_URL': None,
|
||||||
'VALIDATOR_URL': '',
|
'VALIDATOR_URL': '',
|
||||||
'PERSIST_AUTH': False,
|
|
||||||
'REFETCH_SCHEMA_WITH_AUTH': False,
|
|
||||||
'REFETCH_SCHEMA_ON_LOGOUT': False,
|
|
||||||
'FETCH_SCHEMA_WITH_QUERY': True,
|
|
||||||
|
|
||||||
'OPERATIONS_SORTER': None,
|
'OPERATIONS_SORTER': None,
|
||||||
'TAGS_SORTER': None,
|
'TAGS_SORTER': None,
|
||||||
@@ -78,7 +74,6 @@ REDOC_DEFAULTS = {
|
|||||||
'PATH_IN_MIDDLE': False,
|
'PATH_IN_MIDDLE': False,
|
||||||
'NATIVE_SCROLLBARS': False,
|
'NATIVE_SCROLLBARS': False,
|
||||||
'REQUIRED_PROPS_FIRST': False,
|
'REQUIRED_PROPS_FIRST': False,
|
||||||
'FETCH_SCHEMA_WITH_QUERY': True,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPORT_STRINGS = [
|
IMPORT_STRINGS = [
|
||||||
|
|||||||
+10
-15
@@ -2,7 +2,6 @@ from six import raise_from
|
|||||||
|
|
||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
import logging
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from coreapi.compat import force_bytes
|
from coreapi.compat import force_bytes
|
||||||
@@ -11,8 +10,6 @@ from ruamel import yaml
|
|||||||
from . import openapi
|
from . import openapi
|
||||||
from .errors import SwaggerValidationError
|
from .errors import SwaggerValidationError
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def _validate_flex(spec):
|
def _validate_flex(spec):
|
||||||
from flex.core import parse as validate_flex
|
from flex.core import parse as validate_flex
|
||||||
@@ -73,10 +70,7 @@ class _OpenAPICodec(object):
|
|||||||
errors[validator] = str(e)
|
errors[validator] = str(e)
|
||||||
|
|
||||||
if errors:
|
if errors:
|
||||||
exc = SwaggerValidationError("spec validation failed: {}".format(errors), errors, spec, self)
|
raise SwaggerValidationError("spec validation failed", errors, spec, self)
|
||||||
logger.warning(str(exc))
|
|
||||||
raise exc
|
|
||||||
|
|
||||||
return force_bytes(self._dump_dict(spec))
|
return force_bytes(self._dump_dict(spec))
|
||||||
|
|
||||||
def encode_error(self, err):
|
def encode_error(self, err):
|
||||||
@@ -127,7 +121,8 @@ class SaneYamlDumper(yaml.SafeDumper):
|
|||||||
"""
|
"""
|
||||||
return super(SaneYamlDumper, self).increase_indent(flow=flow, indentless=False, **kwargs)
|
return super(SaneYamlDumper, self).increase_indent(flow=flow, indentless=False, **kwargs)
|
||||||
|
|
||||||
def represent_odict(self, mapping, flow_style=None): # pragma: no cover
|
@staticmethod
|
||||||
|
def represent_odict(dump, mapping, flow_style=None): # pragma: no cover
|
||||||
"""https://gist.github.com/miracle2k/3184458
|
"""https://gist.github.com/miracle2k/3184458
|
||||||
|
|
||||||
Make PyYAML output an OrderedDict.
|
Make PyYAML output an OrderedDict.
|
||||||
@@ -139,22 +134,22 @@ class SaneYamlDumper(yaml.SafeDumper):
|
|||||||
tag = YAML_MAP_TAG
|
tag = YAML_MAP_TAG
|
||||||
value = []
|
value = []
|
||||||
node = yaml.MappingNode(tag, value, flow_style=flow_style)
|
node = yaml.MappingNode(tag, value, flow_style=flow_style)
|
||||||
if self.alias_key is not None:
|
if dump.alias_key is not None:
|
||||||
self.represented_objects[self.alias_key] = node
|
dump.represented_objects[dump.alias_key] = node
|
||||||
best_style = True
|
best_style = True
|
||||||
if hasattr(mapping, 'items'):
|
if hasattr(mapping, 'items'):
|
||||||
mapping = mapping.items()
|
mapping = mapping.items()
|
||||||
for item_key, item_value in mapping:
|
for item_key, item_value in mapping:
|
||||||
node_key = self.represent_data(item_key)
|
node_key = dump.represent_data(item_key)
|
||||||
node_value = self.represent_data(item_value)
|
node_value = dump.represent_data(item_value)
|
||||||
if not (isinstance(node_key, yaml.ScalarNode) and not node_key.style):
|
if not (isinstance(node_key, yaml.ScalarNode) and not node_key.style):
|
||||||
best_style = False
|
best_style = False
|
||||||
if not (isinstance(node_value, yaml.ScalarNode) and not node_value.style):
|
if not (isinstance(node_value, yaml.ScalarNode) and not node_value.style):
|
||||||
best_style = False
|
best_style = False
|
||||||
value.append((node_key, node_value))
|
value.append((node_key, node_value))
|
||||||
if flow_style is None:
|
if flow_style is None:
|
||||||
if self.default_flow_style is not None:
|
if dump.default_flow_style is not None:
|
||||||
node.flow_style = self.default_flow_style
|
node.flow_style = dump.default_flow_style
|
||||||
else:
|
else:
|
||||||
node.flow_style = best_style
|
node.flow_style = best_style
|
||||||
return node
|
return node
|
||||||
@@ -175,7 +170,7 @@ def yaml_sane_dump(data, binary):
|
|||||||
:param dict data: the data to be dumped
|
:param dict data: the data to be dumped
|
||||||
:param bool binary: True to return a utf-8 encoded binary object, False to return a string
|
:param bool binary: True to return a utf-8 encoded binary object, False to return a string
|
||||||
:return: the serialized YAML
|
:return: the serialized YAML
|
||||||
:rtype: str or bytes
|
:rtype: str,bytes
|
||||||
"""
|
"""
|
||||||
return yaml.dump(data, Dumper=SaneYamlDumper, default_flow_style=False, encoding='utf-8' if binary else None)
|
return yaml.dump(data, Dumper=SaneYamlDumper, default_flow_style=False, encoding='utf-8' if binary else None)
|
||||||
|
|
||||||
|
|||||||
+25
-69
@@ -8,15 +8,15 @@ from coreapi.compat import urlparse
|
|||||||
from rest_framework import versioning
|
from rest_framework import versioning
|
||||||
from rest_framework.compat import URLPattern, URLResolver, get_original_route
|
from rest_framework.compat import URLPattern, URLResolver, get_original_route
|
||||||
from rest_framework.schemas.generators import EndpointEnumerator as _EndpointEnumerator
|
from rest_framework.schemas.generators import EndpointEnumerator as _EndpointEnumerator
|
||||||
from rest_framework.schemas.generators import SchemaGenerator, endpoint_ordering, get_pk_name
|
from rest_framework.schemas.generators import SchemaGenerator, endpoint_ordering
|
||||||
from rest_framework.schemas.inspectors import get_pk_description
|
from rest_framework.schemas.inspectors import get_pk_description
|
||||||
from rest_framework.settings import api_settings
|
from rest_framework.settings import api_settings as rest_framework_settings
|
||||||
|
|
||||||
from . import openapi
|
from . import openapi
|
||||||
from .app_settings import swagger_settings
|
from .app_settings import swagger_settings
|
||||||
from .errors import SwaggerGenerationError
|
from .errors import SwaggerGenerationError
|
||||||
from .inspectors.field import get_basic_type_info, get_queryset_field, get_queryset_from_view
|
from .inspectors.field import get_basic_type_info, get_queryset_field, get_queryset_from_view
|
||||||
from .openapi import ReferenceResolver, SwaggerDict
|
from .openapi import ReferenceResolver
|
||||||
from .utils import force_real_str, get_consumes, get_produces
|
from .utils import force_real_str, get_consumes, get_produces
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -132,7 +132,7 @@ class EndpointEnumerator(_EndpointEnumerator):
|
|||||||
|
|
||||||
def unescape_path(self, path):
|
def unescape_path(self, path):
|
||||||
"""Remove backslashe escapes from all path components outside {parameters}. This is needed because
|
"""Remove backslashe escapes from all path components outside {parameters}. This is needed because
|
||||||
``simplify_regex`` does not handle this correctly.
|
``simplify_regex`` does not handle this correctly - note however that this implementation is
|
||||||
|
|
||||||
**NOTE:** this might destructively affect some url regex patterns that contain metacharacters (e.g. \\w, \\d)
|
**NOTE:** this might destructively affect some url regex patterns that contain metacharacters (e.g. \\w, \\d)
|
||||||
outside path parameter groups; if you are in this category, God help you
|
outside path parameter groups; if you are in this category, God help you
|
||||||
@@ -164,7 +164,7 @@ class OpenAPISchemaGenerator(object):
|
|||||||
def __init__(self, info, version='', url=None, patterns=None, urlconf=None):
|
def __init__(self, info, version='', url=None, patterns=None, urlconf=None):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
:param openapi.Info info: information about the API
|
:param .Info info: information about the API
|
||||||
:param str version: API version string; if omitted, `info.default_version` will be used
|
:param str version: API version string; if omitted, `info.default_version` will be used
|
||||||
:param str url: API scheme, host and port; if ``None`` is passed and ``DEFAULT_API_URL`` is not set, the url
|
:param str url: API scheme, host and port; if ``None`` is passed and ``DEFAULT_API_URL`` is not set, the url
|
||||||
will be inferred from the request made against the schema view, so you should generally not need to set
|
will be inferred from the request made against the schema view, so you should generally not need to set
|
||||||
@@ -198,40 +198,11 @@ class OpenAPISchemaGenerator(object):
|
|||||||
def url(self):
|
def url(self):
|
||||||
return self._gen.url
|
return self._gen.url
|
||||||
|
|
||||||
def get_security_definitions(self):
|
|
||||||
"""Get the security schemes for this API. This determines what is usable in security requirements,
|
|
||||||
and helps clients configure their authorization credentials.
|
|
||||||
|
|
||||||
:return: the security schemes usable with this API
|
|
||||||
:rtype: dict[str,dict] or None
|
|
||||||
"""
|
|
||||||
security_definitions = swagger_settings.SECURITY_DEFINITIONS
|
|
||||||
if security_definitions is not None:
|
|
||||||
security_definitions = SwaggerDict._as_odict(security_definitions, {})
|
|
||||||
|
|
||||||
return security_definitions
|
|
||||||
|
|
||||||
def get_security_requirements(self, security_definitions):
|
|
||||||
"""Get the base (global) security requirements of the API. This is never called if
|
|
||||||
:meth:`.get_security_definitions` returns `None`.
|
|
||||||
|
|
||||||
:param security_definitions: security definitions as returned by :meth:`.get_security_definitions`
|
|
||||||
:return: the security schemes accepted by default
|
|
||||||
:rtype: list[dict[str,list[str]]] or None
|
|
||||||
"""
|
|
||||||
security_requirements = swagger_settings.SECURITY_REQUIREMENTS
|
|
||||||
if security_requirements is None:
|
|
||||||
security_requirements = [{security_scheme: []} for security_scheme in security_definitions]
|
|
||||||
|
|
||||||
security_requirements = [SwaggerDict._as_odict(sr, {}) for sr in security_requirements]
|
|
||||||
security_requirements = sorted(security_requirements, key=list)
|
|
||||||
return security_requirements
|
|
||||||
|
|
||||||
def get_schema(self, request=None, public=False):
|
def get_schema(self, request=None, public=False):
|
||||||
"""Generate a :class:`.Swagger` object representing the API schema.
|
"""Generate a :class:`.Swagger` object representing the API schema.
|
||||||
|
|
||||||
:param request: the request used for filtering accesible endpoints and finding the spec URI
|
:param Request request: the request used for filtering
|
||||||
:type request: rest_framework.request.Request or None
|
accesible endpoints and finding the spec URI
|
||||||
:param bool public: if True, all endpoints are included regardless of access through `request`
|
:param bool public: if True, all endpoints are included regardless of access through `request`
|
||||||
|
|
||||||
:return: the generated Swagger specification
|
:return: the generated Swagger specification
|
||||||
@@ -239,15 +210,20 @@ class OpenAPISchemaGenerator(object):
|
|||||||
"""
|
"""
|
||||||
endpoints = self.get_endpoints(request)
|
endpoints = self.get_endpoints(request)
|
||||||
components = ReferenceResolver(openapi.SCHEMA_DEFINITIONS)
|
components = ReferenceResolver(openapi.SCHEMA_DEFINITIONS)
|
||||||
self.consumes = get_consumes(api_settings.DEFAULT_PARSER_CLASSES)
|
self.consumes = get_consumes(rest_framework_settings.DEFAULT_PARSER_CLASSES)
|
||||||
self.produces = get_produces(api_settings.DEFAULT_RENDERER_CLASSES)
|
self.produces = get_produces(rest_framework_settings.DEFAULT_RENDERER_CLASSES)
|
||||||
paths, prefix = self.get_paths(endpoints, components, request, public)
|
paths, prefix = self.get_paths(endpoints, components, request, public)
|
||||||
|
|
||||||
security_definitions = self.get_security_definitions()
|
security_definitions = swagger_settings.SECURITY_DEFINITIONS
|
||||||
if security_definitions:
|
if security_definitions is not None:
|
||||||
security_requirements = self.get_security_requirements(security_definitions)
|
security_definitions = OrderedDict(sorted([(key, OrderedDict(sorted(sd.items())))
|
||||||
else:
|
for key, sd in swagger_settings.SECURITY_DEFINITIONS.items()]))
|
||||||
security_requirements = None
|
security_requirements = swagger_settings.SECURITY_REQUIREMENTS
|
||||||
|
if security_requirements is None:
|
||||||
|
security_requirements = [{security_scheme: []} for security_scheme in swagger_settings.SECURITY_DEFINITIONS]
|
||||||
|
|
||||||
|
security_requirements = sorted(security_requirements, key=lambda od: list(sorted(od)))
|
||||||
|
security_requirements = [OrderedDict(sorted(sr.items())) for sr in security_requirements]
|
||||||
|
|
||||||
url = self.url
|
url = self.url
|
||||||
if url is None and request is not None:
|
if url is None and request is not None:
|
||||||
@@ -262,10 +238,9 @@ class OpenAPISchemaGenerator(object):
|
|||||||
def create_view(self, callback, method, request=None):
|
def create_view(self, callback, method, request=None):
|
||||||
"""Create a view instance from a view callback as registered in urlpatterns.
|
"""Create a view instance from a view callback as registered in urlpatterns.
|
||||||
|
|
||||||
:param callback: view callback registered in urlpatterns
|
:param callable callback: view callback registered in urlpatterns
|
||||||
:param str method: HTTP method
|
:param str method: HTTP method
|
||||||
:param request: request to bind to the view
|
:param rest_framework.request.Request request: request to bind to the view
|
||||||
:type request: rest_framework.request.Request or None
|
|
||||||
:return: the view instance
|
:return: the view instance
|
||||||
"""
|
"""
|
||||||
view = self._gen.create_view(callback, method, request)
|
view = self._gen.create_view(callback, method, request)
|
||||||
@@ -280,31 +255,12 @@ class OpenAPISchemaGenerator(object):
|
|||||||
setattr(view, 'swagger_fake_view', True)
|
setattr(view, 'swagger_fake_view', True)
|
||||||
return view
|
return view
|
||||||
|
|
||||||
def coerce_path(self, path, view):
|
|
||||||
"""Coerce {pk} path arguments into the name of the model field, where possible. This is cleaner for an
|
|
||||||
external representation (i.e. "this is an identifier", not "this is a database primary key").
|
|
||||||
|
|
||||||
:param str path: the path
|
|
||||||
:param rest_framework.views.APIView view: associated view
|
|
||||||
:rtype: str
|
|
||||||
"""
|
|
||||||
if '{pk}' not in path:
|
|
||||||
return path
|
|
||||||
|
|
||||||
model = getattr(get_queryset_from_view(view), 'model', None)
|
|
||||||
if model:
|
|
||||||
field_name = get_pk_name(model)
|
|
||||||
else:
|
|
||||||
field_name = 'id'
|
|
||||||
return path.replace('{pk}', '{%s}' % field_name)
|
|
||||||
|
|
||||||
def get_endpoints(self, request):
|
def get_endpoints(self, request):
|
||||||
"""Iterate over all the registered endpoints in the API and return a fake view with the right parameters.
|
"""Iterate over all the registered endpoints in the API and return a fake view with the right parameters.
|
||||||
|
|
||||||
:param request: request to bind to the endpoint views
|
:param rest_framework.request.Request request: request to bind to the endpoint views
|
||||||
:type request: rest_framework.request.Request or None
|
|
||||||
:return: {path: (view_class, list[(http_method, view_instance)])
|
:return: {path: (view_class, list[(http_method, view_instance)])
|
||||||
:rtype: dict[str,(type,list[(str,rest_framework.views.APIView)])]
|
:rtype: dict
|
||||||
"""
|
"""
|
||||||
enumerator = self.endpoint_enumerator_class(self._gen.patterns, self._gen.urlconf, request=request)
|
enumerator = self.endpoint_enumerator_class(self._gen.patterns, self._gen.urlconf, request=request)
|
||||||
endpoints = enumerator.get_api_endpoints()
|
endpoints = enumerator.get_api_endpoints()
|
||||||
@@ -313,7 +269,7 @@ class OpenAPISchemaGenerator(object):
|
|||||||
view_cls = {}
|
view_cls = {}
|
||||||
for path, method, callback in endpoints:
|
for path, method, callback in endpoints:
|
||||||
view = self.create_view(callback, method, request)
|
view = self.create_view(callback, method, request)
|
||||||
path = self.coerce_path(path, view)
|
path = self._gen.coerce_path(path, method, view)
|
||||||
view_paths[path].append((method, view))
|
view_paths[path].append((method, view))
|
||||||
view_cls[path] = callback.cls
|
view_cls[path] = callback.cls
|
||||||
return {path: (view_cls[path], methods) for path, methods in view_paths.items()}
|
return {path: (view_cls[path], methods) for path, methods in view_paths.items()}
|
||||||
@@ -331,7 +287,7 @@ class OpenAPISchemaGenerator(object):
|
|||||||
:param str subpath: path to the operation with any common prefix/base path removed
|
:param str subpath: path to the operation with any common prefix/base path removed
|
||||||
:param str method: HTTP method
|
:param str method: HTTP method
|
||||||
:param view: the view associated with the operation
|
:param view: the view associated with the operation
|
||||||
:rtype: list[str]
|
:rtype: tuple
|
||||||
"""
|
"""
|
||||||
return self._gen.get_keys(subpath, method, view)
|
return self._gen.get_keys(subpath, method, view)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import logging
|
|||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
from .. import openapi
|
from .. import openapi
|
||||||
from ..utils import force_real_str, get_field_default, get_object_classes, is_list_view
|
from ..utils import force_real_str, get_field_default, is_list_view
|
||||||
|
|
||||||
#: Sentinel value that inspectors must return to signal that they do not know how to handle an object
|
#: Sentinel value that inspectors must return to signal that they do not know how to handle an object
|
||||||
NotHandled = object()
|
NotHandled = object()
|
||||||
@@ -12,38 +12,14 @@ NotHandled = object()
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def call_view_method(view, method_name, fallback_attr=None, default=None):
|
|
||||||
"""Call a view method which might throw an exception. If an exception is thrown, log an informative error message
|
|
||||||
and return the value of fallback_attr, or default if not present.
|
|
||||||
|
|
||||||
:param rest_framework.views.APIView view:
|
|
||||||
:param str method_name: name of a method on the view
|
|
||||||
:param str fallback_attr: name of an attribute on the view to fall back on, if calling the method fails
|
|
||||||
:param default: default value if all else fails
|
|
||||||
:return: view method's return value, or value of view's fallback_attr, or default
|
|
||||||
"""
|
|
||||||
if hasattr(view, method_name):
|
|
||||||
try:
|
|
||||||
return getattr(view, method_name)()
|
|
||||||
except Exception: # pragma: no cover
|
|
||||||
logger.warning("view's %s.get_parsers raised exception during schema generation; use "
|
|
||||||
"`getattr(self, 'swagger_fake_view', False)` to detect and short-circuit this",
|
|
||||||
type(view).__name__, exc_info=True)
|
|
||||||
|
|
||||||
if fallback_attr and hasattr(view, fallback_attr):
|
|
||||||
return getattr(view, fallback_attr)
|
|
||||||
|
|
||||||
return default
|
|
||||||
|
|
||||||
|
|
||||||
class BaseInspector(object):
|
class BaseInspector(object):
|
||||||
def __init__(self, view, path, method, components, request):
|
def __init__(self, view, path, method, components, request):
|
||||||
"""
|
"""
|
||||||
:param rest_framework.views.APIView view: the view associated with this endpoint
|
:param view: the view associated with this endpoint
|
||||||
:param str path: the path component of the operation URL
|
:param str path: the path component of the operation URL
|
||||||
:param str method: the http method of the operation
|
:param str method: the http method of the operation
|
||||||
:param openapi.ReferenceResolver components: referenceable components
|
:param openapi.ReferenceResolver components: referenceable components
|
||||||
:param rest_framework.request.Request request: the request made against the schema view; can be None
|
:param Request request: the request made against the schema view; can be None
|
||||||
"""
|
"""
|
||||||
self.view = view
|
self.view = view
|
||||||
self.path = path
|
self.path = path
|
||||||
@@ -105,22 +81,6 @@ class BaseInspector(object):
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def get_renderer_classes(self):
|
|
||||||
"""Get the renderer classes of this view by calling `get_renderers`.
|
|
||||||
|
|
||||||
:return: renderer classes
|
|
||||||
:rtype: list[type[rest_framework.renderers.BaseRenderer]]
|
|
||||||
"""
|
|
||||||
return get_object_classes(call_view_method(self.view, 'get_renderers', 'renderer_classes', []))
|
|
||||||
|
|
||||||
def get_parser_classes(self):
|
|
||||||
"""Get the parser classes of this view by calling `get_parsers`.
|
|
||||||
|
|
||||||
:return: parser classes
|
|
||||||
:rtype: list[type[rest_framework.parsers.BaseParser]]
|
|
||||||
"""
|
|
||||||
return get_object_classes(call_view_method(self.view, 'get_parsers', 'parser_classes', []))
|
|
||||||
|
|
||||||
|
|
||||||
class PaginatorInspector(BaseInspector):
|
class PaginatorInspector(BaseInspector):
|
||||||
"""Base inspector for paginators.
|
"""Base inspector for paginators.
|
||||||
@@ -199,7 +159,7 @@ class FieldInspector(BaseInspector):
|
|||||||
:param kwargs: extra attributes for constructing the object;
|
:param kwargs: extra attributes for constructing the object;
|
||||||
if swagger_object_type is Parameter, ``name`` and ``in_`` should be provided
|
if swagger_object_type is Parameter, ``name`` and ``in_`` should be provided
|
||||||
:return: the swagger object
|
:return: the swagger object
|
||||||
:rtype: openapi.Parameter or openapi.Items or openapi.Schema or openapi.SchemaRef
|
:rtype: openapi.Parameter,openapi.Items,openapi.Schema,openapi.SchemaRef
|
||||||
"""
|
"""
|
||||||
return NotHandled
|
return NotHandled
|
||||||
|
|
||||||
@@ -208,7 +168,7 @@ class FieldInspector(BaseInspector):
|
|||||||
|
|
||||||
All arguments are the same as :meth:`.field_to_swagger_object`.
|
All arguments are the same as :meth:`.field_to_swagger_object`.
|
||||||
|
|
||||||
:rtype: openapi.Parameter or openapi.Items or openapi.Schema or openapi.SchemaRef
|
:rtype: openapi.Parameter,openapi.Items,openapi.Schema,openapi.SchemaRef
|
||||||
"""
|
"""
|
||||||
return self.probe_inspectors(
|
return self.probe_inspectors(
|
||||||
self.field_inspectors, 'field_to_swagger_object', field, {'field_inspectors': self.field_inspectors},
|
self.field_inspectors, 'field_to_swagger_object', field, {'field_inspectors': self.field_inspectors},
|
||||||
@@ -232,7 +192,7 @@ class FieldInspector(BaseInspector):
|
|||||||
|
|
||||||
- arguments specified by the ``kwargs`` parameter of :meth:`._get_partial_types`
|
- arguments specified by the ``kwargs`` parameter of :meth:`._get_partial_types`
|
||||||
- ``instance_kwargs`` passed to the constructor function
|
- ``instance_kwargs`` passed to the constructor function
|
||||||
- ``title``, ``description``, ``required``, ``x-nullable`` and ``default`` inferred from the field,
|
- ``title``, ``description``, ``required`` and ``default`` inferred from the field,
|
||||||
where appropriate
|
where appropriate
|
||||||
|
|
||||||
If ``existing_object`` is not ``None``, it is updated instead of creating a new object.
|
If ``existing_object`` is not ``None``, it is updated instead of creating a new object.
|
||||||
@@ -243,7 +203,7 @@ class FieldInspector(BaseInspector):
|
|||||||
- :class:`.Schema` if `swagger_object_type` is :class:`.Schema`
|
- :class:`.Schema` if `swagger_object_type` is :class:`.Schema`
|
||||||
- :class:`.Items` if `swagger_object_type` is :class:`.Parameter` or :class:`.Items`
|
- :class:`.Items` if `swagger_object_type` is :class:`.Parameter` or :class:`.Items`
|
||||||
|
|
||||||
:rtype: (function,type[openapi.Schema] or type[openapi.Items])
|
:rtype: tuple[callable,(type[openapi.Schema],type[openapi.Items])]
|
||||||
"""
|
"""
|
||||||
assert swagger_object_type in (openapi.Schema, openapi.Parameter, openapi.Items)
|
assert swagger_object_type in (openapi.Schema, openapi.Parameter, openapi.Items)
|
||||||
assert not isinstance(field, openapi.SwaggerDict), "passed field is already a SwaggerDict object"
|
assert not isinstance(field, openapi.SwaggerDict), "passed field is already a SwaggerDict object"
|
||||||
@@ -265,9 +225,6 @@ class FieldInspector(BaseInspector):
|
|||||||
instance_kwargs.setdefault('title', title)
|
instance_kwargs.setdefault('title', title)
|
||||||
if description is not None:
|
if description is not None:
|
||||||
instance_kwargs.setdefault('description', description)
|
instance_kwargs.setdefault('description', description)
|
||||||
if field.allow_null and not instance_kwargs.get('required', False) and not field.required:
|
|
||||||
instance_kwargs['x_nullable'] = True
|
|
||||||
|
|
||||||
instance_kwargs.update(kwargs)
|
instance_kwargs.update(kwargs)
|
||||||
|
|
||||||
if existing_object is not None:
|
if existing_object is not None:
|
||||||
@@ -375,7 +332,7 @@ class ViewInspector(BaseInspector):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
fields = []
|
fields = []
|
||||||
for filter_backend in getattr(self.view, 'filter_backends'):
|
for filter_backend in self.view.filter_backends:
|
||||||
fields += self.probe_inspectors(self.filter_inspectors, 'get_filter_parameters', filter_backend()) or []
|
fields += self.probe_inspectors(self.filter_inspectors, 'get_filter_parameters', filter_backend()) or []
|
||||||
|
|
||||||
return fields
|
return fields
|
||||||
@@ -401,15 +358,14 @@ class ViewInspector(BaseInspector):
|
|||||||
if not self.should_page():
|
if not self.should_page():
|
||||||
return []
|
return []
|
||||||
|
|
||||||
return self.probe_inspectors(self.paginator_inspectors, 'get_paginator_parameters',
|
return self.probe_inspectors(self.paginator_inspectors, 'get_paginator_parameters', self.view.paginator) or []
|
||||||
getattr(self.view, 'paginator')) or []
|
|
||||||
|
|
||||||
def serializer_to_schema(self, serializer):
|
def serializer_to_schema(self, serializer):
|
||||||
"""Convert a serializer to an OpenAPI :class:`.Schema`.
|
"""Convert a serializer to an OpenAPI :class:`.Schema`.
|
||||||
|
|
||||||
:param serializers.BaseSerializer serializer: the ``Serializer`` instance
|
:param serializers.BaseSerializer serializer: the ``Serializer`` instance
|
||||||
:returns: the converted :class:`.Schema`, or ``None`` in case of an unknown serializer
|
:returns: the converted :class:`.Schema`, or ``None`` in case of an unknown serializer
|
||||||
:rtype: openapi.Schema or openapi.SchemaRef
|
:rtype: openapi.Schema,openapi.SchemaRef
|
||||||
"""
|
"""
|
||||||
return self.probe_inspectors(
|
return self.probe_inspectors(
|
||||||
self.field_inspectors, 'get_schema', serializer, {'field_inspectors': self.field_inspectors}
|
self.field_inspectors, 'get_schema', serializer, {'field_inspectors': self.field_inspectors}
|
||||||
@@ -435,4 +391,4 @@ class ViewInspector(BaseInspector):
|
|||||||
:rtype: openapi.Schema
|
:rtype: openapi.Schema
|
||||||
"""
|
"""
|
||||||
return self.probe_inspectors(self.paginator_inspectors, 'get_paginated_response',
|
return self.probe_inspectors(self.paginator_inspectors, 'get_paginated_response',
|
||||||
getattr(self.view, 'paginator'), response_schema=response_schema)
|
self.view.paginator, response_schema=response_schema)
|
||||||
@@ -5,6 +5,7 @@ import operator
|
|||||||
import uuid
|
import uuid
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
from inspect import isclass
|
||||||
|
|
||||||
from django.core import validators
|
from django.core import validators
|
||||||
from django.db import models
|
from django.db import models
|
||||||
@@ -14,18 +15,14 @@ from rest_framework.settings import api_settings as rest_framework_settings
|
|||||||
from .. import openapi
|
from .. import openapi
|
||||||
from ..errors import SwaggerGenerationError
|
from ..errors import SwaggerGenerationError
|
||||||
from ..utils import decimal_as_float, filter_none, get_serializer_class, get_serializer_ref_name
|
from ..utils import decimal_as_float, filter_none, get_serializer_class, get_serializer_ref_name
|
||||||
from .base import FieldInspector, NotHandled, SerializerInspector, call_view_method
|
from .base import FieldInspector, NotHandled, SerializerInspector
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# Python>=3.5
|
||||||
import typing
|
import typing
|
||||||
except ImportError:
|
except ImportError:
|
||||||
typing = None
|
typing = None
|
||||||
|
|
||||||
try:
|
|
||||||
from inspect import signature as inspect_signature
|
|
||||||
except ImportError:
|
|
||||||
inspect_signature = None
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@@ -58,7 +55,6 @@ class InlineSerializerInspector(SerializerInspector):
|
|||||||
)
|
)
|
||||||
for key, value
|
for key, value
|
||||||
in fields.items()
|
in fields.items()
|
||||||
if not getattr(value, 'read_only', False)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
return self.add_manual_parameters(serializer, parameters)
|
return self.add_manual_parameters(serializer, parameters)
|
||||||
@@ -87,10 +83,10 @@ class InlineSerializerInspector(SerializerInspector):
|
|||||||
|
|
||||||
ref_name = self.get_serializer_ref_name(field)
|
ref_name = self.get_serializer_ref_name(field)
|
||||||
|
|
||||||
def make_schema_definition(serializer=field):
|
def make_schema_definition():
|
||||||
properties = OrderedDict()
|
properties = OrderedDict()
|
||||||
required = []
|
required = []
|
||||||
for property_name, child in serializer.fields.items():
|
for property_name, child in field.fields.items():
|
||||||
property_name = self.get_property_name(property_name)
|
property_name = self.get_property_name(property_name)
|
||||||
prop_kwargs = {
|
prop_kwargs = {
|
||||||
'read_only': bool(child.read_only) or None
|
'read_only': bool(child.read_only) or None
|
||||||
@@ -177,7 +173,7 @@ def get_queryset_from_view(view, serializer=None):
|
|||||||
:return: queryset or ``None``
|
:return: queryset or ``None``
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
queryset = call_view_method(view, 'get_queryset', 'queryset', None)
|
queryset = getattr(view, 'queryset', None)
|
||||||
|
|
||||||
if queryset is not None and serializer is not None:
|
if queryset is not None and serializer is not None:
|
||||||
# make sure the view is actually using *this* serializer
|
# make sure the view is actually using *this* serializer
|
||||||
@@ -323,8 +319,8 @@ limit_validators = [
|
|||||||
(validators.MaxLengthValidator, serializers.CharField, 'max_length', operator.__lt__),
|
(validators.MaxLengthValidator, serializers.CharField, 'max_length', operator.__lt__),
|
||||||
|
|
||||||
# minItems and maxItems apply to lists
|
# minItems and maxItems apply to lists
|
||||||
(validators.MinLengthValidator, (serializers.ListField, serializers.ListSerializer), 'min_items', operator.__gt__),
|
(validators.MinLengthValidator, serializers.ListField, 'min_items', operator.__gt__),
|
||||||
(validators.MaxLengthValidator, (serializers.ListField, serializers.ListSerializer), 'max_items', operator.__lt__),
|
(validators.MaxLengthValidator, serializers.ListField, 'max_items', operator.__lt__),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -514,10 +510,12 @@ class SerializerMethodFieldInspector(FieldInspector):
|
|||||||
if method is None:
|
if method is None:
|
||||||
return NotHandled
|
return NotHandled
|
||||||
|
|
||||||
# attribute added by the swagger_serializer_method decorator
|
|
||||||
serializer = getattr(method, "_swagger_serializer", None)
|
serializer = getattr(method, "_swagger_serializer", None)
|
||||||
|
|
||||||
if serializer:
|
if serializer:
|
||||||
|
# attribute added by the swagger_serializer_method decorator
|
||||||
|
serializer = getattr(method, '_swagger_serializer', None)
|
||||||
|
|
||||||
# in order of preference for description, use:
|
# in order of preference for description, use:
|
||||||
# 1) field.help_text from SerializerMethodField(help_text)
|
# 1) field.help_text from SerializerMethodField(help_text)
|
||||||
# 2) serializer.help_text from swagger_serializer_method(serializer)
|
# 2) serializer.help_text from swagger_serializer_method(serializer)
|
||||||
@@ -546,13 +544,13 @@ class SerializerMethodFieldInspector(FieldInspector):
|
|||||||
serializer.read_only = True
|
serializer.read_only = True
|
||||||
|
|
||||||
return self.probe_field_inspectors(serializer, swagger_object_type, use_references, read_only=True)
|
return self.probe_field_inspectors(serializer, swagger_object_type, use_references, read_only=True)
|
||||||
elif typing and inspect_signature:
|
elif typing:
|
||||||
# look for Python 3.5+ style type hinting of the return value
|
# look for Python 3.5+ style type hinting of the return value
|
||||||
hint_class = inspect_signature(method).return_annotation
|
hint_class = inspect.signature(method).return_annotation
|
||||||
|
|
||||||
if not inspect.isclass(hint_class) and hasattr(hint_class, '__args__'):
|
if not isclass(hint_class) and hasattr(hint_class, '__args__'):
|
||||||
hint_class = hint_class.__args__[0]
|
hint_class = hint_class.__args__[0]
|
||||||
if inspect.isclass(hint_class) and not issubclass(hint_class, inspect._empty):
|
if isclass(hint_class) and not issubclass(hint_class, inspect._empty):
|
||||||
type_info = get_basic_type_info_from_hint(hint_class)
|
type_info = get_basic_type_info_from_hint(hint_class)
|
||||||
|
|
||||||
if type_info is not None:
|
if type_info is not None:
|
||||||
@@ -585,7 +583,6 @@ class ChoiceFieldInspector(FieldInspector):
|
|||||||
|
|
||||||
if isinstance(field, serializers.ChoiceField):
|
if isinstance(field, serializers.ChoiceField):
|
||||||
enum_type = openapi.TYPE_STRING
|
enum_type = openapi.TYPE_STRING
|
||||||
enum_values = list(field.choices.keys())
|
|
||||||
|
|
||||||
# for ModelSerializer, try to infer the type from the associated model field
|
# for ModelSerializer, try to infer the type from the associated model field
|
||||||
serializer = get_parent_serializer(field)
|
serializer = get_parent_serializer(field)
|
||||||
@@ -596,29 +593,17 @@ class ChoiceFieldInspector(FieldInspector):
|
|||||||
model_type = get_basic_type_info(model_field)
|
model_type = get_basic_type_info(model_field)
|
||||||
if model_type:
|
if model_type:
|
||||||
enum_type = model_type.get('type', enum_type)
|
enum_type = model_type.get('type', enum_type)
|
||||||
else:
|
|
||||||
# Try to infer field type based on enum values
|
|
||||||
enum_value_types = {type(v) for v in enum_values}
|
|
||||||
if len(enum_value_types) == 1:
|
|
||||||
values_type = get_basic_type_info_from_hint(next(iter(enum_value_types)))
|
|
||||||
if values_type:
|
|
||||||
enum_type = values_type.get('type', enum_type)
|
|
||||||
|
|
||||||
if isinstance(field, serializers.MultipleChoiceField):
|
if isinstance(field, serializers.MultipleChoiceField):
|
||||||
result = SwaggerType(
|
return SwaggerType(
|
||||||
type=openapi.TYPE_ARRAY,
|
type=openapi.TYPE_ARRAY,
|
||||||
items=ChildSwaggerType(
|
items=ChildSwaggerType(
|
||||||
type=enum_type,
|
type=enum_type,
|
||||||
enum=enum_values
|
enum=list(field.choices.keys())
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if swagger_object_type == openapi.Parameter:
|
|
||||||
if result['in'] in (openapi.IN_FORM, openapi.IN_QUERY):
|
|
||||||
result.collection_format = 'multi'
|
|
||||||
else:
|
|
||||||
result = SwaggerType(type=enum_type, enum=enum_values)
|
|
||||||
|
|
||||||
return result
|
return SwaggerType(type=enum_type, enum=list(field.choices.keys()))
|
||||||
|
|
||||||
return NotHandled
|
return NotHandled
|
||||||
|
|
||||||
@@ -690,57 +675,43 @@ try:
|
|||||||
from djangorestframework_camel_case.render import CamelCaseJSONRenderer
|
from djangorestframework_camel_case.render import CamelCaseJSONRenderer
|
||||||
from djangorestframework_camel_case.render import camelize
|
from djangorestframework_camel_case.render import camelize
|
||||||
except ImportError: # pragma: no cover
|
except ImportError: # pragma: no cover
|
||||||
CamelCaseJSONParser = CamelCaseJSONRenderer = None
|
class CamelCaseJSONFilter(FieldInspector):
|
||||||
|
|
||||||
def camelize(data):
|
|
||||||
return data
|
|
||||||
|
|
||||||
|
|
||||||
class CamelCaseJSONFilter(FieldInspector):
|
|
||||||
"""Converts property names to camelCase if ``djangorestframework_camel_case`` is used."""
|
"""Converts property names to camelCase if ``djangorestframework_camel_case`` is used."""
|
||||||
|
pass
|
||||||
def camelize_string(self, s):
|
else:
|
||||||
"""Hack to force ``djangorestframework_camel_case`` to camelize a plain string.
|
def camelize_string(s):
|
||||||
|
"""Hack to force ``djangorestframework_camel_case`` to camelize a plain string."""
|
||||||
:param str s: the string
|
|
||||||
:return: camelized string
|
|
||||||
:rtype: str
|
|
||||||
"""
|
|
||||||
return next(iter(camelize({s: ''})))
|
return next(iter(camelize({s: ''})))
|
||||||
|
|
||||||
def camelize_schema(self, schema):
|
def camelize_schema(schema_or_ref, components):
|
||||||
"""Recursively camelize property names for the given schema using ``djangorestframework_camel_case``.
|
"""Recursively camelize property names for the given schema using ``djangorestframework_camel_case``."""
|
||||||
The target schema object must be modified in-place.
|
schema = openapi.resolve_ref(schema_or_ref, components)
|
||||||
|
|
||||||
:param openapi.Schema schema: the :class:`.Schema` object
|
|
||||||
"""
|
|
||||||
if getattr(schema, 'properties', {}):
|
if getattr(schema, 'properties', {}):
|
||||||
schema.properties = OrderedDict(
|
schema.properties = OrderedDict(
|
||||||
(self.camelize_string(key), self.camelize_schema(openapi.resolve_ref(val, self.components)) or val)
|
(camelize_string(key), camelize_schema(val, components))
|
||||||
for key, val in schema.properties.items()
|
for key, val in schema.properties.items()
|
||||||
)
|
)
|
||||||
|
|
||||||
if getattr(schema, 'required', []):
|
if getattr(schema, 'required', []):
|
||||||
schema.required = [self.camelize_string(p) for p in schema.required]
|
schema.required = [camelize_string(p) for p in schema.required]
|
||||||
|
|
||||||
|
return schema_or_ref
|
||||||
|
|
||||||
|
class CamelCaseJSONFilter(FieldInspector):
|
||||||
|
"""Converts property names to camelCase if ``CamelCaseJSONParser`` or ``CamelCaseJSONRenderer`` are used."""
|
||||||
|
|
||||||
|
def is_camel_case(self):
|
||||||
|
return (
|
||||||
|
any(issubclass(parser, CamelCaseJSONParser) for parser in self.view.parser_classes) or
|
||||||
|
any(issubclass(renderer, CamelCaseJSONRenderer) for renderer in self.view.renderer_classes)
|
||||||
|
)
|
||||||
|
|
||||||
def process_result(self, result, method_name, obj, **kwargs):
|
def process_result(self, result, method_name, obj, **kwargs):
|
||||||
if isinstance(result, openapi.Schema.OR_REF) and self.is_camel_case():
|
if isinstance(result, openapi.Schema.OR_REF) and self.is_camel_case():
|
||||||
schema = openapi.resolve_ref(result, self.components)
|
return camelize_schema(result, self.components)
|
||||||
self.camelize_schema(schema)
|
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
if CamelCaseJSONParser and CamelCaseJSONRenderer:
|
|
||||||
def is_camel_case(self):
|
|
||||||
return (
|
|
||||||
any(issubclass(parser, CamelCaseJSONParser) for parser in self.get_parser_classes()) or
|
|
||||||
any(issubclass(renderer, CamelCaseJSONRenderer) for renderer in self.get_renderer_classes())
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
def is_camel_case(self):
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from rest_framework_recursive.fields import RecursiveField
|
from rest_framework_recursive.fields import RecursiveField
|
||||||
except ImportError: # pragma: no cover
|
except ImportError: # pragma: no cover
|
||||||
|
|||||||
@@ -44,16 +44,12 @@ class CoreAPICompatInspector(PaginatorInspector, FilterInspector):
|
|||||||
coreschema.String: openapi.TYPE_STRING,
|
coreschema.String: openapi.TYPE_STRING,
|
||||||
coreschema.Boolean: openapi.TYPE_BOOLEAN,
|
coreschema.Boolean: openapi.TYPE_BOOLEAN,
|
||||||
}
|
}
|
||||||
|
|
||||||
coreschema_attrs = ['format', 'pattern', 'enum', 'min_length', 'max_length']
|
|
||||||
schema = field.schema
|
|
||||||
return openapi.Parameter(
|
return openapi.Parameter(
|
||||||
name=field.name,
|
name=field.name,
|
||||||
in_=location_to_in[field.location],
|
in_=location_to_in[field.location],
|
||||||
|
type=coreapi_types.get(type(field.schema), openapi.TYPE_STRING),
|
||||||
required=field.required,
|
required=field.required,
|
||||||
description=force_real_str(schema.description) if schema else None,
|
description=force_real_str(field.schema.description) if field.schema else None,
|
||||||
type=coreapi_types.get(type(schema), openapi.TYPE_STRING),
|
|
||||||
**OrderedDict((attr, getattr(schema, attr, None)) for attr in coreschema_attrs)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -71,8 +67,8 @@ class DjangoRestResponsePagination(PaginatorInspector):
|
|||||||
type=openapi.TYPE_OBJECT,
|
type=openapi.TYPE_OBJECT,
|
||||||
properties=OrderedDict((
|
properties=OrderedDict((
|
||||||
('count', openapi.Schema(type=openapi.TYPE_INTEGER) if has_count else None),
|
('count', openapi.Schema(type=openapi.TYPE_INTEGER) if has_count else None),
|
||||||
('next', openapi.Schema(type=openapi.TYPE_STRING, format=openapi.FORMAT_URI, x_nullable=True)),
|
('next', openapi.Schema(type=openapi.TYPE_STRING, format=openapi.FORMAT_URI)),
|
||||||
('previous', openapi.Schema(type=openapi.TYPE_STRING, format=openapi.FORMAT_URI, x_nullable=True)),
|
('previous', openapi.Schema(type=openapi.TYPE_STRING, format=openapi.FORMAT_URI)),
|
||||||
('results', response_schema),
|
('results', response_schema),
|
||||||
)),
|
)),
|
||||||
required=['results']
|
required=['results']
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import logging
|
import logging
|
||||||
import warnings
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from rest_framework.request import is_form_media_type
|
from rest_framework.request import is_form_media_type
|
||||||
@@ -9,12 +8,12 @@ from rest_framework.status import is_success
|
|||||||
from .. import openapi
|
from .. import openapi
|
||||||
from ..errors import SwaggerGenerationError
|
from ..errors import SwaggerGenerationError
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
filter_none, force_real_str, force_serializer_instance, get_consumes, get_produces, guess_response_status,
|
force_real_str, force_serializer_instance, get_consumes, get_produces, guess_response_status, is_list_view,
|
||||||
is_list_view, merge_params, no_body, param_list_to_odict
|
merge_params, no_body, param_list_to_odict
|
||||||
)
|
)
|
||||||
from .base import ViewInspector, call_view_method
|
from .base import ViewInspector
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class SwaggerAutoSchema(ViewInspector):
|
class SwaggerAutoSchema(ViewInspector):
|
||||||
@@ -23,22 +22,6 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
self._sch = AutoSchema()
|
self._sch = AutoSchema()
|
||||||
self._sch.view = view
|
self._sch.view = view
|
||||||
|
|
||||||
def _summary_and_description_compat(self):
|
|
||||||
# TODO: remove in 1.13
|
|
||||||
base_methods = (SwaggerAutoSchema.get_summary, SwaggerAutoSchema.get_description)
|
|
||||||
self_methods = (type(self).get_summary, type(self).get_description)
|
|
||||||
if self_methods != base_methods:
|
|
||||||
warnings.warn(
|
|
||||||
"`SwaggerAutoSchema` methods `get_summary` and `get_description` are deprecated and "
|
|
||||||
"will be removed in drf-yasg 1.13. Override `get_summary_and_description` instead.",
|
|
||||||
DeprecationWarning, stacklevel=2
|
|
||||||
)
|
|
||||||
# if get_summary or get_description are overriden by a child class,
|
|
||||||
# we must call them for backwards compatibility
|
|
||||||
return self.get_summary(), self.get_description()
|
|
||||||
|
|
||||||
return self.get_summary_and_description()
|
|
||||||
|
|
||||||
def get_operation(self, operation_keys):
|
def get_operation(self, operation_keys):
|
||||||
consumes = self.get_consumes()
|
consumes = self.get_consumes()
|
||||||
produces = self.get_produces()
|
produces = self.get_produces()
|
||||||
@@ -46,13 +29,14 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
body = self.get_request_body_parameters(consumes)
|
body = self.get_request_body_parameters(consumes)
|
||||||
query = self.get_query_parameters()
|
query = self.get_query_parameters()
|
||||||
parameters = body + query
|
parameters = body + query
|
||||||
parameters = filter_none(parameters)
|
parameters = [param for param in parameters if param is not None]
|
||||||
parameters = self.add_manual_parameters(parameters)
|
parameters = self.add_manual_parameters(parameters)
|
||||||
|
|
||||||
operation_id = self.get_operation_id(operation_keys)
|
operation_id = self.get_operation_id(operation_keys)
|
||||||
summary, description = self._summary_and_description_compat()
|
description = self.get_description()
|
||||||
|
summary = self.get_summary()
|
||||||
security = self.get_security()
|
security = self.get_security()
|
||||||
assert security is None or isinstance(security, list), "security must be a list of security requirement objects"
|
assert security is None or isinstance(security, list), "security must be a list of securiy requirement objects"
|
||||||
deprecated = self.is_deprecated()
|
deprecated = self.is_deprecated()
|
||||||
tags = self.get_tags(operation_keys)
|
tags = self.get_tags(operation_keys)
|
||||||
|
|
||||||
@@ -103,12 +87,21 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
"""Return the serializer as defined by the view's ``get_serializer()`` method.
|
"""Return the serializer as defined by the view's ``get_serializer()`` method.
|
||||||
|
|
||||||
:return: the view's ``Serializer``
|
:return: the view's ``Serializer``
|
||||||
:rtype: rest_framework.serializers.Serializer
|
|
||||||
"""
|
"""
|
||||||
return call_view_method(self.view, 'get_serializer')
|
if not hasattr(self.view, 'get_serializer'):
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
return self.view.get_serializer()
|
||||||
|
except Exception:
|
||||||
|
log.warning("view's get_serializer raised exception (%s %s %s)",
|
||||||
|
self.method, self.path, type(self.view).__name__, exc_info=True)
|
||||||
|
return None
|
||||||
|
|
||||||
def _get_request_body_override(self):
|
def _get_request_body_override(self):
|
||||||
"""Parse the request_body key in the override dict. This method is not public API."""
|
"""Parse the request_body key in the override dict. This method is not public API.
|
||||||
|
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
body_override = self.overrides.get('request_body', None)
|
body_override = self.overrides.get('request_body', None)
|
||||||
|
|
||||||
if body_override is not None:
|
if body_override is not None:
|
||||||
@@ -127,7 +120,6 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
"""Return the request serializer (used for parsing the request payload) for this endpoint.
|
"""Return the request serializer (used for parsing the request payload) for this endpoint.
|
||||||
|
|
||||||
:return: the request serializer, or one of :class:`.Schema`, :class:`.SchemaRef`, ``None``
|
:return: the request serializer, or one of :class:`.Schema`, :class:`.SchemaRef`, ``None``
|
||||||
:rtype: rest_framework.serializers.Serializer
|
|
||||||
"""
|
"""
|
||||||
body_override = self._get_request_body_override()
|
body_override = self._get_request_body_override()
|
||||||
|
|
||||||
@@ -175,13 +167,12 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
if any(param.in_ == openapi.IN_BODY for param in manual_parameters): # pragma: no cover
|
if any(param.in_ == openapi.IN_BODY for param in manual_parameters): # pragma: no cover
|
||||||
raise SwaggerGenerationError("specify the body parameter as a Schema or Serializer in request_body")
|
raise SwaggerGenerationError("specify the body parameter as a Schema or Serializer in request_body")
|
||||||
if any(param.in_ == openapi.IN_FORM for param in manual_parameters): # pragma: no cover
|
if any(param.in_ == openapi.IN_FORM for param in manual_parameters): # pragma: no cover
|
||||||
has_body_parameter = any(param.in_ == openapi.IN_BODY for param in parameters)
|
if any(param.in_ == openapi.IN_BODY for param in parameters):
|
||||||
if has_body_parameter or not any(is_form_media_type(encoding) for encoding in self.get_consumes()):
|
|
||||||
raise SwaggerGenerationError("cannot add form parameters when the request has a request body; "
|
raise SwaggerGenerationError("cannot add form parameters when the request has a request body; "
|
||||||
"did you forget to set an appropriate parser class on the view?")
|
"did you forget to set an appropriate parser class on the view?")
|
||||||
if self.method not in self.body_methods:
|
if self.method not in self.body_methods:
|
||||||
raise SwaggerGenerationError("form parameters can only be applied to "
|
raise SwaggerGenerationError("form parameters can only be applied to (" + ','.join(self.body_methods) +
|
||||||
"(" + ','.join(self.body_methods) + ") HTTP methods")
|
") HTTP methods")
|
||||||
|
|
||||||
return merge_params(parameters, manual_parameters)
|
return merge_params(parameters, manual_parameters)
|
||||||
|
|
||||||
@@ -330,32 +321,7 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
operation_id = '_'.join(operation_keys)
|
operation_id = '_'.join(operation_keys)
|
||||||
return operation_id
|
return operation_id
|
||||||
|
|
||||||
def split_summary_from_description(self, description):
|
def _extract_description_and_summary(self):
|
||||||
"""Decide if and how to split a summary out of the given description. The default implementation
|
|
||||||
uses the first paragraph of the description as a summary if it is less than 120 characters long.
|
|
||||||
|
|
||||||
:param description: the full description to be analyzed
|
|
||||||
:return: summary and description
|
|
||||||
:rtype: (str,str)
|
|
||||||
"""
|
|
||||||
# https://www.python.org/dev/peps/pep-0257/#multi-line-docstrings
|
|
||||||
summary = None
|
|
||||||
summary_max_len = 120 # OpenAPI 2.0 spec says summary should be under 120 characters
|
|
||||||
sections = description.split('\n\n', 1)
|
|
||||||
if len(sections) == 2:
|
|
||||||
sections[0] = sections[0].strip()
|
|
||||||
if len(sections[0]) < summary_max_len:
|
|
||||||
summary, description = sections
|
|
||||||
description = description.strip()
|
|
||||||
|
|
||||||
return summary, description
|
|
||||||
|
|
||||||
def get_summary_and_description(self):
|
|
||||||
"""Return an operation summary and description determined from the view's docstring.
|
|
||||||
|
|
||||||
:return: summary and description
|
|
||||||
:rtype: (str,str)
|
|
||||||
"""
|
|
||||||
description = self.overrides.get('operation_description', None)
|
description = self.overrides.get('operation_description', None)
|
||||||
summary = self.overrides.get('operation_summary', None)
|
summary = self.overrides.get('operation_summary', None)
|
||||||
if description is None:
|
if description is None:
|
||||||
@@ -364,17 +330,15 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
|
|
||||||
if description and (summary is None):
|
if description and (summary is None):
|
||||||
# description from docstring ... do summary magic
|
# description from docstring ... do summary magic
|
||||||
summary, description = self.split_summary_from_description(description)
|
# https://www.python.org/dev/peps/pep-0257/#multi-line-docstrings
|
||||||
|
summary_max_len = 120 # OpenAPI 2.0 spec says summary should be under 120 characters
|
||||||
|
sections = description.split('\n\n', 1)
|
||||||
|
if len(sections) == 2:
|
||||||
|
sections[0] = sections[0].strip()
|
||||||
|
if len(sections[0]) < summary_max_len:
|
||||||
|
summary, description = sections
|
||||||
|
|
||||||
return summary, description
|
return description, summary
|
||||||
|
|
||||||
def get_summary(self):
|
|
||||||
"""Return a summary description for this operation.
|
|
||||||
|
|
||||||
:return: the summary
|
|
||||||
:rtype: str
|
|
||||||
"""
|
|
||||||
return self.get_summary_and_description()[0]
|
|
||||||
|
|
||||||
def get_description(self):
|
def get_description(self):
|
||||||
"""Return an operation description determined as appropriate from the view's method and class docstrings.
|
"""Return an operation description determined as appropriate from the view's method and class docstrings.
|
||||||
@@ -382,7 +346,15 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
:return: the operation description
|
:return: the operation description
|
||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
return self.get_summary_and_description()[1]
|
return self._extract_description_and_summary()[0]
|
||||||
|
|
||||||
|
def get_summary(self):
|
||||||
|
"""Return a summary description for this operation.
|
||||||
|
|
||||||
|
:return: the summary
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
return self._extract_description_and_summary()[1]
|
||||||
|
|
||||||
def get_security(self):
|
def get_security(self):
|
||||||
"""Return a list of security requirements for this operation.
|
"""Return a list of security requirements for this operation.
|
||||||
@@ -404,29 +376,24 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
|
|
||||||
def get_tags(self, operation_keys):
|
def get_tags(self, operation_keys):
|
||||||
"""Get a list of tags for this operation. Tags determine how operations relate with each other, and in the UI
|
"""Get a list of tags for this operation. Tags determine how operations relate with each other, and in the UI
|
||||||
each tag will show as a group containing the operations that use it. If not provided in overrides,
|
each tag will show as a group containing the operations that use it.
|
||||||
tags will be inferred from the operation url.
|
|
||||||
|
|
||||||
:param tuple[str] operation_keys: an array of keys derived from the pathdescribing the hierarchical layout
|
:param tuple[str] operation_keys: an array of keys derived from the pathdescribing the hierarchical layout
|
||||||
of this view in the API; e.g. ``('snippets', 'list')``, ``('snippets', 'retrieve')``, etc.
|
of this view in the API; e.g. ``('snippets', 'list')``, ``('snippets', 'retrieve')``, etc.
|
||||||
:rtype: list[str]
|
:rtype: list[str]
|
||||||
"""
|
"""
|
||||||
tags = self.overrides.get('tags')
|
return [operation_keys[0]]
|
||||||
if not tags:
|
|
||||||
tags = [operation_keys[0]]
|
|
||||||
|
|
||||||
return tags
|
|
||||||
|
|
||||||
def get_consumes(self):
|
def get_consumes(self):
|
||||||
"""Return the MIME types this endpoint can consume.
|
"""Return the MIME types this endpoint can consume.
|
||||||
|
|
||||||
:rtype: list[str]
|
:rtype: list[str]
|
||||||
"""
|
"""
|
||||||
return get_consumes(self.get_parser_classes())
|
return get_consumes(getattr(self.view, 'parser_classes', []))
|
||||||
|
|
||||||
def get_produces(self):
|
def get_produces(self):
|
||||||
"""Return the MIME types this endpoint can produce.
|
"""Return the MIME types this endpoint can produce.
|
||||||
|
|
||||||
:rtype: list[str]
|
:rtype: list[str]
|
||||||
"""
|
"""
|
||||||
return get_produces(self.get_renderer_classes())
|
return get_produces(getattr(self.view, 'renderer_classes', []))
|
||||||
@@ -43,7 +43,7 @@ class Command(BaseCommand):
|
|||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-f', '--format', dest='format',
|
'-f', '--format', dest='format',
|
||||||
default='', choices=['json', 'yaml'],
|
default='', choices=('json', 'yaml'),
|
||||||
type=str,
|
type=str,
|
||||||
help='Output format. If not given, it is guessed from the output file extension and defaults to json.'
|
help='Output format. If not given, it is guessed from the output file extension and defaults to json.'
|
||||||
)
|
)
|
||||||
@@ -158,7 +158,6 @@ class Command(BaseCommand):
|
|||||||
else:
|
else:
|
||||||
# normally this would be easily done with open(mode='x'/'w'),
|
# normally this would be easily done with open(mode='x'/'w'),
|
||||||
# but python 2 is a pain in the ass as usual
|
# but python 2 is a pain in the ass as usual
|
||||||
# TODO: simplify when dropping support for python 2.7
|
|
||||||
flags = os.O_CREAT | os.O_WRONLY
|
flags = os.O_CREAT | os.O_WRONLY
|
||||||
flags = flags | (os.O_TRUNC if overwrite else os.O_EXCL)
|
flags = flags | (os.O_TRUNC if overwrite else os.O_EXCL)
|
||||||
with os.fdopen(os.open(output_file, flags), "w") as stream:
|
with os.fdopen(os.open(output_file, flags), "w") as stream:
|
||||||
|
|||||||
+46
-72
@@ -1,21 +1,12 @@
|
|||||||
import six
|
|
||||||
|
|
||||||
import collections
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from coreapi.compat import urlparse
|
from coreapi.compat import urlparse
|
||||||
from django.urls import get_script_prefix
|
from django.urls import get_script_prefix
|
||||||
from django.utils.functional import Promise
|
|
||||||
from inflection import camelize
|
from inflection import camelize
|
||||||
|
|
||||||
from .utils import filter_none, force_real_str
|
from .utils import filter_none
|
||||||
|
|
||||||
try:
|
|
||||||
from collections import abc as collections_abc
|
|
||||||
except ImportError:
|
|
||||||
collections_abc = collections
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -137,22 +128,13 @@ class SwaggerDict(OrderedDict):
|
|||||||
if id(obj) in memo:
|
if id(obj) in memo:
|
||||||
return memo[id(obj)]
|
return memo[id(obj)]
|
||||||
|
|
||||||
if isinstance(obj, Promise) and hasattr(obj, '_proxy____cast'):
|
if isinstance(obj, dict):
|
||||||
# handle __proxy__ objects from django.utils.functional.lazy
|
|
||||||
obj = obj._proxy____cast()
|
|
||||||
|
|
||||||
if isinstance(obj, collections_abc.Mapping):
|
|
||||||
result = OrderedDict()
|
result = OrderedDict()
|
||||||
memo[id(obj)] = result
|
memo[id(obj)] = result
|
||||||
items = obj.items()
|
for attr, val in obj.items():
|
||||||
if not isinstance(obj, OrderedDict):
|
|
||||||
items = sorted(items)
|
|
||||||
for attr, val in items:
|
|
||||||
result[attr] = SwaggerDict._as_odict(val, memo)
|
result[attr] = SwaggerDict._as_odict(val, memo)
|
||||||
return result
|
return result
|
||||||
elif isinstance(obj, six.string_types):
|
elif isinstance(obj, (list, tuple)):
|
||||||
return force_real_str(obj)
|
|
||||||
elif isinstance(obj, collections_abc.Iterable) and not isinstance(obj, collections_abc.Iterator):
|
|
||||||
return type(obj)(SwaggerDict._as_odict(elem, memo) for elem in obj)
|
return type(obj)(SwaggerDict._as_odict(elem, memo) for elem in obj)
|
||||||
|
|
||||||
return obj
|
return obj
|
||||||
@@ -242,12 +224,12 @@ class Swagger(SwaggerDict):
|
|||||||
:param str _prefix: api path prefix to use in setting basePath; this will be appended to the wsgi
|
:param str _prefix: api path prefix to use in setting basePath; this will be appended to the wsgi
|
||||||
SCRIPT_NAME prefix or Django's FORCE_SCRIPT_NAME if applicable
|
SCRIPT_NAME prefix or Django's FORCE_SCRIPT_NAME if applicable
|
||||||
:param str _version: version string to override Info
|
:param str _version: version string to override Info
|
||||||
:param dict[str,dict] security_definitions: list of supported authentication mechanisms
|
:param dict[str,dict[str,str]] security_definitions: list of supported authentication mechanisms
|
||||||
:param list[dict[str,list[str]]] security: authentication mechanisms accepted globally
|
:param list[dict] security: authentication mechanisms accepted by default; can be overriden in Operation
|
||||||
:param list[str] consumes: consumed MIME types; can be overriden in Operation
|
:param list[str] consumes: consumed MIME types; can be overriden in Operation
|
||||||
:param list[str] produces: produced MIME types; can be overriden in Operation
|
:param list[str] produces: produced MIME types; can be overriden in Operation
|
||||||
:param Paths paths: paths object
|
:param .Paths paths: paths object
|
||||||
:param dict[str,Schema] definitions: named models
|
:param dict[str,.Schema] definitions: named models
|
||||||
"""
|
"""
|
||||||
super(Swagger, self).__init__(**extra)
|
super(Swagger, self).__init__(**extra)
|
||||||
self.swagger = '2.0'
|
self.swagger = '2.0'
|
||||||
@@ -298,7 +280,7 @@ class Paths(SwaggerDict):
|
|||||||
def __init__(self, paths, **extra):
|
def __init__(self, paths, **extra):
|
||||||
"""A listing of all the paths in the API.
|
"""A listing of all the paths in the API.
|
||||||
|
|
||||||
:param dict[str,PathItem] paths:
|
:param dict[str,.PathItem] paths:
|
||||||
"""
|
"""
|
||||||
super(Paths, self).__init__(**extra)
|
super(Paths, self).__init__(**extra)
|
||||||
for path, path_obj in paths.items():
|
for path, path_obj in paths.items():
|
||||||
@@ -315,14 +297,14 @@ class PathItem(SwaggerDict):
|
|||||||
head=None, patch=None, parameters=None, **extra):
|
head=None, patch=None, parameters=None, **extra):
|
||||||
"""Information about a single path
|
"""Information about a single path
|
||||||
|
|
||||||
:param Operation get: operation for GET
|
:param .Operation get: operation for GET
|
||||||
:param Operation put: operation for PUT
|
:param .Operation put: operation for PUT
|
||||||
:param Operation post: operation for POST
|
:param .Operation post: operation for POST
|
||||||
:param Operation delete: operation for DELETE
|
:param .Operation delete: operation for DELETE
|
||||||
:param Operation options: operation for OPTIONS
|
:param .Operation options: operation for OPTIONS
|
||||||
:param Operation head: operation for HEAD
|
:param .Operation head: operation for HEAD
|
||||||
:param Operation patch: operation for PATCH
|
:param .Operation patch: operation for PATCH
|
||||||
:param list[Parameter] parameters: parameters that apply to all operations
|
:param list[.Parameter] parameters: parameters that apply to all operations
|
||||||
"""
|
"""
|
||||||
super(PathItem, self).__init__(**extra)
|
super(PathItem, self).__init__(**extra)
|
||||||
self.get = get
|
self.get = get
|
||||||
@@ -351,8 +333,8 @@ class Operation(SwaggerDict):
|
|||||||
"""Information about an API operation (path + http method combination)
|
"""Information about an API operation (path + http method combination)
|
||||||
|
|
||||||
:param str operation_id: operation ID, should be unique across all operations
|
:param str operation_id: operation ID, should be unique across all operations
|
||||||
:param Responses responses: responses returned
|
:param .Responses responses: responses returned
|
||||||
:param list[Parameter] parameters: parameters accepted
|
:param list[.Parameter] parameters: parameters accepted
|
||||||
:param list[str] consumes: content types accepted
|
:param list[str] consumes: content types accepted
|
||||||
:param list[str] produces: content types produced
|
:param list[str] produces: content types produced
|
||||||
:param str summary: operation summary; should be < 120 characters
|
:param str summary: operation summary; should be < 120 characters
|
||||||
@@ -373,17 +355,6 @@ class Operation(SwaggerDict):
|
|||||||
self._insert_extras__()
|
self._insert_extras__()
|
||||||
|
|
||||||
|
|
||||||
def _check_type(type, format, enum, pattern, items, _obj_type):
|
|
||||||
if items and type != TYPE_ARRAY:
|
|
||||||
raise AssertionError("items can only be used when type is array")
|
|
||||||
if type == TYPE_ARRAY and not items:
|
|
||||||
raise AssertionError("TYPE_ARRAY requires the items attribute")
|
|
||||||
if pattern and type != TYPE_STRING:
|
|
||||||
raise AssertionError("pattern can only be used when type is string")
|
|
||||||
if (format or enum or pattern) and type in (TYPE_OBJECT, TYPE_ARRAY, None):
|
|
||||||
raise AssertionError("[format, enum, pattern] can only be applied to primitive " + _obj_type)
|
|
||||||
|
|
||||||
|
|
||||||
class Items(SwaggerDict):
|
class Items(SwaggerDict):
|
||||||
def __init__(self, type=None, format=None, enum=None, pattern=None, items=None, **extra):
|
def __init__(self, type=None, format=None, enum=None, pattern=None, items=None, **extra):
|
||||||
"""Used when defining an array :class:`.Parameter` to describe the array elements.
|
"""Used when defining an array :class:`.Parameter` to describe the array elements.
|
||||||
@@ -402,7 +373,10 @@ class Items(SwaggerDict):
|
|||||||
self.pattern = pattern
|
self.pattern = pattern
|
||||||
self.items = items
|
self.items = items
|
||||||
self._insert_extras__()
|
self._insert_extras__()
|
||||||
_check_type(type, format, enum, pattern, items, self.__class__)
|
if items and type != TYPE_ARRAY:
|
||||||
|
raise AssertionError("items can only be used when type is array")
|
||||||
|
if pattern and type != TYPE_STRING:
|
||||||
|
raise AssertionError("pattern can only be used when type is string")
|
||||||
|
|
||||||
|
|
||||||
class Parameter(SwaggerDict):
|
class Parameter(SwaggerDict):
|
||||||
@@ -415,8 +389,7 @@ class Parameter(SwaggerDict):
|
|||||||
:param str in_: parameter location
|
:param str in_: parameter location
|
||||||
:param str description: parameter description
|
:param str description: parameter description
|
||||||
:param bool required: whether the parameter is required for the operation
|
:param bool required: whether the parameter is required for the operation
|
||||||
:param schema: required if `in_` is ``body``
|
:param .Schema,.SchemaRef schema: required if `in_` is ``body``
|
||||||
:type schema: Schema or SchemaRef
|
|
||||||
:param str type: parameter type; required if `in_` is not ``body``; must not be ``object``
|
:param str type: parameter type; required if `in_` is not ``body``; must not be ``object``
|
||||||
:param str format: value format, see OpenAPI spec
|
:param str format: value format, see OpenAPI spec
|
||||||
:param list enum: restrict possible values
|
:param list enum: restrict possible values
|
||||||
@@ -447,9 +420,12 @@ class Parameter(SwaggerDict):
|
|||||||
self.required = True
|
self.required = True
|
||||||
if self['in'] != IN_BODY and schema is not None:
|
if self['in'] != IN_BODY and schema is not None:
|
||||||
raise AssertionError("schema can only be applied to a body Parameter, not %s" % type)
|
raise AssertionError("schema can only be applied to a body Parameter, not %s" % type)
|
||||||
if default and not type:
|
if (format or enum or pattern or default) and not type:
|
||||||
raise AssertionError("default can only be applied to a non-body Parameter")
|
raise AssertionError("[format, enum, pattern, default] can only be applied to non-body Parameter")
|
||||||
_check_type(type, format, enum, pattern, items, self.__class__)
|
if items and type != TYPE_ARRAY:
|
||||||
|
raise AssertionError("items can only be used when type is array")
|
||||||
|
if pattern and type != TYPE_STRING:
|
||||||
|
raise AssertionError("pattern can only be used when type is string")
|
||||||
|
|
||||||
|
|
||||||
class Schema(SwaggerDict):
|
class Schema(SwaggerDict):
|
||||||
@@ -465,13 +441,10 @@ class Schema(SwaggerDict):
|
|||||||
:param str format: value format, see OpenAPI spec
|
:param str format: value format, see OpenAPI spec
|
||||||
:param list enum: restrict possible values
|
:param list enum: restrict possible values
|
||||||
:param str pattern: pattern if type is ``string``
|
:param str pattern: pattern if type is ``string``
|
||||||
:param properties: object properties; required if `type` is ``object``
|
:param dict[str,(.Schema,.SchemaRef)] properties: object properties; required if `type` is ``object``
|
||||||
:type properties: dict[str,Schema or SchemaRef]
|
:param bool,.Schema,.SchemaRef additional_properties: allow wildcard properties not listed in `properties`
|
||||||
:param additional_properties: allow wildcard properties not listed in `properties`
|
|
||||||
:type additional_properties: bool or Schema or SchemaRef
|
|
||||||
:param list[str] required: list of requried property names
|
:param list[str] required: list of requried property names
|
||||||
:param items: type of array items, only valid if `type` is ``array``
|
:param .Schema,.SchemaRef items: type of array items, only valid if `type` is ``array``
|
||||||
:type items: Schema or SchemaRef
|
|
||||||
:param default: only valid when insider another ``Schema``\\ 's ``properties``;
|
:param default: only valid when insider another ``Schema``\\ 's ``properties``;
|
||||||
the default value of this property if it is not provided, must conform to the type of this Schema
|
the default value of this property if it is not provided, must conform to the type of this Schema
|
||||||
:param read_only: only valid when insider another ``Schema``\\ 's ``properties``;
|
:param read_only: only valid when insider another ``Schema``\\ 's ``properties``;
|
||||||
@@ -498,7 +471,12 @@ class Schema(SwaggerDict):
|
|||||||
self._insert_extras__()
|
self._insert_extras__()
|
||||||
if (properties or (additional_properties is not None)) and type != TYPE_OBJECT:
|
if (properties or (additional_properties is not None)) and type != TYPE_OBJECT:
|
||||||
raise AssertionError("only object Schema can have properties")
|
raise AssertionError("only object Schema can have properties")
|
||||||
_check_type(type, format, enum, pattern, items, self.__class__)
|
if (format or enum or pattern) and type in (TYPE_OBJECT, TYPE_ARRAY):
|
||||||
|
raise AssertionError("[format, enum, pattern] can only be applied to primitive Schema")
|
||||||
|
if items and type != TYPE_ARRAY:
|
||||||
|
raise AssertionError("items can only be used when type is array")
|
||||||
|
if pattern and type != TYPE_STRING:
|
||||||
|
raise AssertionError("pattern can only be used when type is string")
|
||||||
|
|
||||||
def _remove_read_only(self):
|
def _remove_read_only(self):
|
||||||
# readOnly is only valid for Schemas inside another Schema's properties;
|
# readOnly is only valid for Schemas inside another Schema's properties;
|
||||||
@@ -517,7 +495,7 @@ class _Ref(SwaggerDict):
|
|||||||
:param str name: referenced object name, e.g. "Article"
|
:param str name: referenced object name, e.g. "Article"
|
||||||
:param str scope: reference scope, e.g. "definitions"
|
:param str scope: reference scope, e.g. "definitions"
|
||||||
:param type[.SwaggerDict] expected_type: the expected type that will be asserted on the object found in resolver
|
:param type[.SwaggerDict] expected_type: the expected type that will be asserted on the object found in resolver
|
||||||
:param bool ignore_unresolved: do not throw if the referenced object does not exist
|
:param bool ignore_unresolved: allow the reference to be not defined in resolver
|
||||||
"""
|
"""
|
||||||
super(_Ref, self).__init__()
|
super(_Ref, self).__init__()
|
||||||
assert not type(self) == _Ref, "do not instantiate _Ref directly"
|
assert not type(self) == _Ref, "do not instantiate _Ref directly"
|
||||||
@@ -552,7 +530,7 @@ class SchemaRef(_Ref):
|
|||||||
|
|
||||||
:param .ReferenceResolver resolver: component resolver which must contain the definition
|
:param .ReferenceResolver resolver: component resolver which must contain the definition
|
||||||
:param str schema_name: schema name
|
:param str schema_name: schema name
|
||||||
:param bool ignore_unresolved: do not throw if the referenced object does not exist
|
:param bool ignore_unresolved: allow the reference to be not defined in resolver
|
||||||
"""
|
"""
|
||||||
assert SCHEMA_DEFINITIONS in resolver.scopes
|
assert SCHEMA_DEFINITIONS in resolver.scopes
|
||||||
super(SchemaRef, self).__init__(resolver, schema_name, SCHEMA_DEFINITIONS, Schema, ignore_unresolved)
|
super(SchemaRef, self).__init__(resolver, schema_name, SCHEMA_DEFINITIONS, Schema, ignore_unresolved)
|
||||||
@@ -564,8 +542,7 @@ Schema.OR_REF = (Schema, SchemaRef)
|
|||||||
def resolve_ref(ref_or_obj, resolver):
|
def resolve_ref(ref_or_obj, resolver):
|
||||||
"""Resolve `ref_or_obj` if it is a reference type. Return it unchaged if not.
|
"""Resolve `ref_or_obj` if it is a reference type. Return it unchaged if not.
|
||||||
|
|
||||||
:param ref_or_obj: object to derefernece
|
:param SwaggerDict,_Ref ref_or_obj:
|
||||||
:type ref_or_obj: SwaggerDict or _Ref
|
|
||||||
:param resolver: component resolver which must contain the referenced object
|
:param resolver: component resolver which must contain the referenced object
|
||||||
"""
|
"""
|
||||||
if isinstance(ref_or_obj, _Ref):
|
if isinstance(ref_or_obj, _Ref):
|
||||||
@@ -577,9 +554,8 @@ class Responses(SwaggerDict):
|
|||||||
def __init__(self, responses, default=None, **extra):
|
def __init__(self, responses, default=None, **extra):
|
||||||
"""Describes the expected responses of an :class:`.Operation`.
|
"""Describes the expected responses of an :class:`.Operation`.
|
||||||
|
|
||||||
:param responses: mapping of status code to response definition
|
:param dict[(str,int),.Response] responses: mapping of status code to response definition
|
||||||
:type responses: dict[str or int,Response]
|
:param .Response default: description of the response structure to expect if another status code is returned
|
||||||
:param Response default: description of the response structure to expect if another status code is returned
|
|
||||||
"""
|
"""
|
||||||
super(Responses, self).__init__(**extra)
|
super(Responses, self).__init__(**extra)
|
||||||
for status, response in responses.items():
|
for status, response in responses.items():
|
||||||
@@ -594,9 +570,7 @@ class Response(SwaggerDict):
|
|||||||
"""Describes the structure of an operation's response.
|
"""Describes the structure of an operation's response.
|
||||||
|
|
||||||
:param str description: response description
|
:param str description: response description
|
||||||
:param schema: sturcture of the response body
|
:param .Schema,.SchemaRef schema: sturcture of the response body
|
||||||
:type schema: Schema or SchemaRef or rest_framework.serializers.Serializer
|
|
||||||
or type[rest_framework.serializers.Serializer]
|
|
||||||
:param dict examples: example bodies mapped by mime type
|
:param dict examples: example bodies mapped by mime type
|
||||||
"""
|
"""
|
||||||
super(Response, self).__init__(**extra)
|
super(Response, self).__init__(**extra)
|
||||||
@@ -669,7 +643,7 @@ class ReferenceResolver(object):
|
|||||||
"""Set an object in the given scope only if it does not exist.
|
"""Set an object in the given scope only if it does not exist.
|
||||||
|
|
||||||
:param str name: reference name
|
:param str name: reference name
|
||||||
:param function maker: object factory, called only if necessary
|
:param callable maker: object factory, called only if necessary
|
||||||
:param str scope: reference scope
|
:param str scope: reference scope
|
||||||
"""
|
"""
|
||||||
scope = self._check_scope(scope)
|
scope = self._check_scope(scope)
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
+16
-28
@@ -1,11 +1,9 @@
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from django.shortcuts import resolve_url
|
from django.shortcuts import render, resolve_url
|
||||||
from django.template.loader import render_to_string
|
|
||||||
from django.utils.encoding import force_text
|
|
||||||
from django.utils.functional import Promise
|
from django.utils.functional import Promise
|
||||||
from rest_framework.renderers import BaseRenderer, JSONRenderer, TemplateHTMLRenderer
|
from rest_framework.renderers import BaseRenderer, JSONRenderer, TemplateHTMLRenderer
|
||||||
from rest_framework.utils import encoders, json
|
from rest_framework.utils import json
|
||||||
|
|
||||||
from .app_settings import redoc_settings, swagger_settings
|
from .app_settings import redoc_settings, swagger_settings
|
||||||
from .codecs import VALIDATORS, OpenAPICodecJson, OpenAPICodecYaml
|
from .codecs import VALIDATORS, OpenAPICodecJson, OpenAPICodecYaml
|
||||||
@@ -30,10 +28,9 @@ class _SpecRenderer(BaseRenderer):
|
|||||||
|
|
||||||
if not isinstance(data, Swagger): # pragma: no cover
|
if not isinstance(data, Swagger): # pragma: no cover
|
||||||
# if `swagger` is not a ``Swagger`` object, it means we somehow got a non-success ``Response``
|
# if `swagger` is not a ``Swagger`` object, it means we somehow got a non-success ``Response``
|
||||||
# in that case, it's probably better to let the default ``JSONRenderer`` render it
|
# in that case, it's probably better to let the default ``TemplateHTMLRenderer`` render it
|
||||||
# see https://github.com/axnsan12/drf-yasg/issues/58
|
# see https://github.com/axnsan12/drf-yasg/issues/58
|
||||||
return JSONRenderer().render(data, media_type, renderer_context)
|
return JSONRenderer().render(data, media_type, renderer_context)
|
||||||
|
|
||||||
return codec.encode(data)
|
return codec.encode(data)
|
||||||
|
|
||||||
|
|
||||||
@@ -70,14 +67,17 @@ class _UIRenderer(BaseRenderer):
|
|||||||
# in that case, it's probably better to let the default ``TemplateHTMLRenderer`` render it
|
# in that case, it's probably better to let the default ``TemplateHTMLRenderer`` render it
|
||||||
# see https://github.com/axnsan12/drf-yasg/issues/58
|
# see https://github.com/axnsan12/drf-yasg/issues/58
|
||||||
return TemplateHTMLRenderer().render(swagger, accepted_media_type, renderer_context)
|
return TemplateHTMLRenderer().render(swagger, accepted_media_type, renderer_context)
|
||||||
|
|
||||||
self.set_context(renderer_context, swagger)
|
self.set_context(renderer_context, swagger)
|
||||||
return render_to_string(self.template, renderer_context, renderer_context['request'])
|
return render(
|
||||||
|
renderer_context['request'],
|
||||||
|
self.template,
|
||||||
|
renderer_context
|
||||||
|
)
|
||||||
|
|
||||||
def set_context(self, renderer_context, swagger=None):
|
def set_context(self, renderer_context, swagger):
|
||||||
renderer_context['title'] = swagger.info.title or '' if swagger else ''
|
renderer_context['title'] = swagger.info.title
|
||||||
renderer_context['version'] = swagger.info.version or '' if swagger else ''
|
renderer_context['version'] = swagger.info.version
|
||||||
renderer_context['oauth2_config'] = json.dumps(self.get_oauth2_config(), cls=encoders.JSONEncoder)
|
renderer_context['oauth2_config'] = json.dumps(self.get_oauth2_config())
|
||||||
renderer_context['USE_SESSION_AUTH'] = swagger_settings.USE_SESSION_AUTH
|
renderer_context['USE_SESSION_AUTH'] = swagger_settings.USE_SESSION_AUTH
|
||||||
renderer_context.update(self.get_auth_urls())
|
renderer_context.update(self.get_auth_urls())
|
||||||
|
|
||||||
@@ -119,16 +119,9 @@ class SwaggerUIRenderer(_UIRenderer):
|
|||||||
template = 'drf-yasg/swagger-ui.html'
|
template = 'drf-yasg/swagger-ui.html'
|
||||||
format = 'swagger'
|
format = 'swagger'
|
||||||
|
|
||||||
def set_context(self, renderer_context, swagger=None):
|
def set_context(self, renderer_context, swagger):
|
||||||
super(SwaggerUIRenderer, self).set_context(renderer_context, swagger)
|
super(SwaggerUIRenderer, self).set_context(renderer_context, swagger)
|
||||||
swagger_ui_settings = self.get_swagger_ui_settings()
|
renderer_context['swagger_settings'] = json.dumps(self.get_swagger_ui_settings())
|
||||||
|
|
||||||
request = renderer_context.get('request', None)
|
|
||||||
oauth_redirect_url = force_text(swagger_ui_settings.get('oauth2RedirectUrl', ''))
|
|
||||||
if request and oauth_redirect_url:
|
|
||||||
swagger_ui_settings['oauth2RedirectUrl'] = request.build_absolute_uri(oauth_redirect_url)
|
|
||||||
|
|
||||||
renderer_context['swagger_settings'] = json.dumps(swagger_ui_settings, cls=encoders.JSONEncoder)
|
|
||||||
|
|
||||||
def get_swagger_ui_settings(self):
|
def get_swagger_ui_settings(self):
|
||||||
data = {
|
data = {
|
||||||
@@ -145,10 +138,6 @@ class SwaggerUIRenderer(_UIRenderer):
|
|||||||
'oauth2RedirectUrl': swagger_settings.OAUTH2_REDIRECT_URL,
|
'oauth2RedirectUrl': swagger_settings.OAUTH2_REDIRECT_URL,
|
||||||
'supportedSubmitMethods': swagger_settings.SUPPORTED_SUBMIT_METHODS,
|
'supportedSubmitMethods': swagger_settings.SUPPORTED_SUBMIT_METHODS,
|
||||||
'displayOperationId': swagger_settings.DISPLAY_OPERATION_ID,
|
'displayOperationId': swagger_settings.DISPLAY_OPERATION_ID,
|
||||||
'persistAuth': swagger_settings.PERSIST_AUTH,
|
|
||||||
'refetchWithAuth': swagger_settings.REFETCH_SCHEMA_WITH_AUTH,
|
|
||||||
'refetchOnLogout': swagger_settings.REFETCH_SCHEMA_ON_LOGOUT,
|
|
||||||
'fetchSchemaWithQuery': swagger_settings.FETCH_SCHEMA_WITH_QUERY,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data = filter_none(data)
|
data = filter_none(data)
|
||||||
@@ -163,9 +152,9 @@ class ReDocRenderer(_UIRenderer):
|
|||||||
template = 'drf-yasg/redoc.html'
|
template = 'drf-yasg/redoc.html'
|
||||||
format = 'redoc'
|
format = 'redoc'
|
||||||
|
|
||||||
def set_context(self, renderer_context, swagger=None):
|
def set_context(self, renderer_context, swagger):
|
||||||
super(ReDocRenderer, self).set_context(renderer_context, swagger)
|
super(ReDocRenderer, self).set_context(renderer_context, swagger)
|
||||||
renderer_context['redoc_settings'] = json.dumps(self.get_redoc_settings(), cls=encoders.JSONEncoder)
|
renderer_context['redoc_settings'] = json.dumps(self.get_redoc_settings())
|
||||||
|
|
||||||
def get_redoc_settings(self):
|
def get_redoc_settings(self):
|
||||||
data = {
|
data = {
|
||||||
@@ -176,7 +165,6 @@ class ReDocRenderer(_UIRenderer):
|
|||||||
'pathInMiddlePanel': redoc_settings.PATH_IN_MIDDLE,
|
'pathInMiddlePanel': redoc_settings.PATH_IN_MIDDLE,
|
||||||
'nativeScrollbars': redoc_settings.NATIVE_SCROLLBARS,
|
'nativeScrollbars': redoc_settings.NATIVE_SCROLLBARS,
|
||||||
'requiredPropsFirst': redoc_settings.REQUIRED_PROPS_FIRST,
|
'requiredPropsFirst': redoc_settings.REQUIRED_PROPS_FIRST,
|
||||||
'fetchSchemaWithQuery': redoc_settings.FETCH_SCHEMA_WITH_QUERY,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return filter_none(data)
|
return filter_none(data)
|
||||||
|
|||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Immutable=e()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return o(t)?t:O(t)}function r(t){return u(t)?t:x(t)}function n(t){return s(t)?t:k(t)}function i(t){return o(t)&&!a(t)?t:A(t)}function o(t){return!(!t||!t[ar])}function u(t){return!(!t||!t[hr])}function s(t){return!(!t||!t[fr])}function a(t){return u(t)||s(t)}function h(t){return!(!t||!t[cr])}function f(t){return t.value=!1,t}function c(t){t&&(t.value=!0)}function _(){}function p(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function v(t){return void 0===t.size&&(t.size=t.__iterate(y)),t.size}function l(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return 0>e?v(t)+e:e}function y(){return!0}function d(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function m(t,e){return w(t,e,0)}function g(t,e){return w(t,e,e)}function w(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function S(t){this.next=t}function z(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function I(){return{value:void 0,done:!0}}function b(t){return!!M(t)}function q(t){return t&&"function"==typeof t.next}function D(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(zr&&t[zr]||t[Ir]);return"function"==typeof e?e:void 0}function E(t){return t&&"number"==typeof t.length}function O(t){return null===t||void 0===t?T():o(t)?t.toSeq():C(t)}function x(t){return null===t||void 0===t?T().toKeyedSeq():o(t)?u(t)?t.toSeq():t.fromEntrySeq():B(t)}function k(t){return null===t||void 0===t?T():o(t)?u(t)?t.entrySeq():t.toIndexedSeq():W(t)}function A(t){return(null===t||void 0===t?T():o(t)?u(t)?t.entrySeq():t:W(t)).toSetSeq()}function j(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,
|
|
||||||
this.size=e.length}function U(t){this._iterable=t,this.size=t.length||t.size}function K(t){this._iterator=t,this._iteratorCache=[]}function L(t){return!(!t||!t[qr])}function T(){return Dr||(Dr=new j([]))}function B(t){var e=Array.isArray(t)?new j(t).fromEntrySeq():q(t)?new K(t).fromEntrySeq():b(t)?new U(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function W(t){var e=J(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function C(t){var e=J(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function J(t){return E(t)?new j(t):q(t)?new K(t):b(t)?new U(t):void 0}function N(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var s=i[r?o-u:u];if(e(s[1],n?s[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,r)}function P(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new S(function(){var t=i[r?o-u:u];return u++>o?I():z(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function H(t,e){return e?V(e,t,"",{"":t}):Y(t)}function V(t,e,r,n){return Array.isArray(e)?t.call(n,r,k(e).map(function(r,n){return V(t,r,n,e)})):Q(e)?t.call(n,r,x(e).map(function(r,n){return V(t,r,n,e)})):e}function Y(t){return Array.isArray(t)?k(t).map(Y).toList():Q(t)?x(t).map(Y).toMap():t}function Q(t){return t&&(t.constructor===Object||void 0===t.constructor)}function X(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function F(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||u(t)!==u(e)||s(t)!==s(e)||h(t)!==h(e))return!1;if(0===t.size&&0===e.size)return!0;
|
|
||||||
var r=!a(t);if(h(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&X(i[1],t)&&(r||X(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var f=t;t=e,e=f}var c=!0,_=e.__iterate(function(e,n){return(r?t.has(e):i?X(e,t.get(n,yr)):X(t.get(n,yr),e))?void 0:(c=!1,!1)});return c&&t.size===_}function G(t,e){if(!(this instanceof G))return new G(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(Mr)return Mr;Mr=this}}function Z(t,e){if(!t)throw Error(e)}function $(t,e,r){if(!(this instanceof $))return new $(t,e,r);if(Z(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(Er)return Er;Er=this}}function tt(){throw TypeError("Abstract")}function et(){}function rt(){}function nt(){}function it(t){return t>>>1&1073741824|3221225471&t}function ot(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return it(r)}if("string"===e)return t.length>Kr?ut(t):st(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return at(t);if("function"==typeof t.toString)return st(""+t);throw Error("Value type "+e+" cannot be hashed.")}function ut(t){var e=Br[t];return void 0===e&&(e=st(t),Tr===Lr&&(Tr=0,Br={}),Tr++,Br[t]=e),e}function st(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)|0;return it(e)}function at(t){var e;if(jr&&(e=Or.get(t),void 0!==e))return e;if(e=t[Ur],void 0!==e)return e;if(!Ar){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ur],void 0!==e)return e;if(e=ht(t),void 0!==e)return e}if(e=++Rr,1073741824&Rr&&(Rr=0),jr)Or.set(t,e);else{if(void 0!==kr&&kr(t)===!1)throw Error("Non-extensible objects are not allowed as keys.");
|
|
||||||
if(Ar)Object.defineProperty(t,Ur,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Ur]=e;else{if(void 0===t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[Ur]=e}}return e}function ht(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ft(t){Z(t!==1/0,"Cannot perform this action with an infinite size.")}function ct(t){return null===t||void 0===t?zt():_t(t)&&!h(t)?t:zt().withMutations(function(e){var n=r(t);ft(n.size),n.forEach(function(t,r){return e.set(r,t)})})}function _t(t){return!(!t||!t[Wr])}function pt(t,e){this.ownerID=t,this.entries=e}function vt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function lt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function yt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function dt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function mt(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&wt(t._root)}function gt(t,e){return z(t,e[0],e[1])}function wt(t,e){return{node:t,index:0,__prev:e}}function St(t,e,r,n){var i=Object.create(Cr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function zt(){return Jr||(Jr=St(0))}function It(t,e,r){var n,i;if(t._root){var o=f(dr),u=f(mr);if(n=bt(t._root,t.__ownerID,0,void 0,e,r,o,u),!u.value)return t;i=t.size+(o.value?r===yr?-1:1:0)}else{if(r===yr)return t;i=1,n=new pt(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?St(i,n):zt()}function bt(t,e,r,n,i,o,u,s){return t?t.update(e,r,n,i,o,u,s):o===yr?t:(c(s),c(u),new dt(e,n,[i,o]))}function qt(t){return t.constructor===dt||t.constructor===yt}function Dt(t,e,r,n,i){if(t.keyHash===n)return new yt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&lr,s=(0===r?n:n>>>r)&lr,a=u===s?[Dt(t,e,r+pr,n,i)]:(o=new dt(e,n,i),
|
|
||||||
s>u?[t,o]:[o,t]);return new vt(e,1<<u|1<<s,a)}function Mt(t,e,r,n){t||(t=new _);for(var i=new dt(t,ot(r),[r,n]),o=0;e.length>o;o++){var u=e[o];i=i.update(t,0,void 0,u[0],u[1])}return i}function Et(t,e,r,n){for(var i=0,o=0,u=Array(r),s=0,a=1,h=e.length;h>s;s++,a<<=1){var f=e[s];void 0!==f&&s!==n&&(i|=a,u[o++]=f)}return new vt(t,i,u)}function Ot(t,e,r,n,i){for(var o=0,u=Array(vr),s=0;0!==r;s++,r>>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new lt(t,o+1,u)}function xt(t,e,n){for(var i=[],u=0;n.length>u;u++){var s=n[u],a=r(s);o(s)||(a=a.map(function(t){return H(t)})),i.push(a)}return jt(t,e,i)}function kt(t,e,r){return t&&t.mergeDeep&&o(e)?t.mergeDeep(e):X(t,e)?t:e}function At(t){return function(e,r,n){if(e&&e.mergeDeepWith&&o(r))return e.mergeDeepWith(t,r);var i=t(e,r,n);return X(e,i)?e:i}}function jt(t,e,r){return r=r.filter(function(t){return 0!==t.size}),0===r.length?t:0!==t.size||t.__ownerID||1!==r.length?t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,yr,function(t){return t===yr?r:e(t,r,n)})}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)}):t.constructor(r[0])}function Rt(t,e,r,n){var i=t===yr,o=e.next();if(o.done){var u=i?r:t,s=n(u);return s===u?t:s}Z(i||t&&t.set,"invalid keyPath");var a=o.value,h=i?yr:t.get(a,yr),f=Rt(h,e,r,n);return f===h?t:f===yr?t.remove(a):(i?zt():t).set(a,f)}function Ut(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function Kt(t,e,r,n){var i=n?t:p(t);return i[e]=r,i}function Lt(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=Array(i),u=0,s=0;i>s;s++)s===e?(o[s]=r,u=-1):o[s]=t[s+u];return o}function Tt(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;n>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function Bt(t){var e=Pt();if(null===t||void 0===t)return e;if(Wt(t))return t;var r=n(t),i=r.size;return 0===i?e:(ft(i),i>0&&vr>i?Nt(0,i,pr,null,new Ct(r.toArray())):e.withMutations(function(t){t.setSize(i),r.forEach(function(e,r){return t.set(r,e)})}))}function Wt(t){
|
|
||||||
return!(!t||!t[Vr])}function Ct(t,e){this.array=t,this.ownerID=e}function Jt(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===s?a&&a.array:t&&t.array,i=r>o?0:o-r,h=u-r;return h>vr&&(h=vr),function(){if(i===h)return Xr;var t=e?--h:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,h=i>o?0:o-i>>n,f=(u-i>>n)+1;return f>vr&&(f=vr),function(){for(;;){if(s){var t=s();if(t!==Xr)return t;s=null}if(h===f)return Xr;var o=e?--f:h++;s=r(a&&a[o],n-pr,i+(o<<n))}}}var o=t._origin,u=t._capacity,s=Gt(u),a=t._tail;return r(t._root,t._level,0)}function Nt(t,e,r,n,i,o,u){var s=Object.create(Yr);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function Pt(){return Qr||(Qr=Nt(0,0,pr))}function Ht(t,e,r){if(e=l(t,e),e!==e)return t;if(e>=t.size||0>e)return t.withMutations(function(t){0>e?Xt(t,e).set(0,r):Xt(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,o=f(mr);return e>=Gt(t._capacity)?n=Vt(n,t.__ownerID,0,e,r,o):i=Vt(i,t.__ownerID,t._level,e,r,o),o.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Nt(t._origin,t._capacity,t._level,i,n):t}function Vt(t,e,r,n,i,o){var u=n>>>r&lr,s=t&&t.array.length>u;if(!s&&void 0===i)return t;var a;if(r>0){var h=t&&t.array[u],f=Vt(h,e,r-pr,n,i,o);return f===h?t:(a=Yt(t,e),a.array[u]=f,a)}return s&&t.array[u]===i?t:(c(o),a=Yt(t,e),void 0===i&&u===a.array.length-1?a.array.pop():a.array[u]=i,a)}function Yt(t,e){return e&&t&&e===t.ownerID?t:new Ct(t?t.array.slice():[],e)}function Qt(t,e){if(e>=Gt(t._capacity))return t._tail;if(1<<t._level+pr>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&lr],n-=pr;return r}}function Xt(t,e,r){void 0!==e&&(e=0|e),void 0!==r&&(r=0|r);var n=t.__ownerID||new _,i=t._origin,o=t._capacity,u=i+e,s=void 0===r?o:0>r?o+r:i+r;if(u===i&&s===o)return t;if(u>=s)return t.clear();for(var a=t._level,h=t._root,f=0;0>u+f;)h=new Ct(h&&h.array.length?[void 0,h]:[],n),a+=pr,f+=1<<a;f&&(u+=f,i+=f,s+=f,o+=f);for(var c=Gt(o),p=Gt(s);p>=1<<a+pr;)h=new Ct(h&&h.array.length?[h]:[],n),
|
|
||||||
a+=pr;var v=t._tail,l=c>p?Qt(t,s-1):p>c?new Ct([],n):v;if(v&&p>c&&o>u&&v.array.length){h=Yt(h,n);for(var y=h,d=a;d>pr;d-=pr){var m=c>>>d&lr;y=y.array[m]=Yt(y.array[m],n)}y.array[c>>>pr&lr]=v}if(o>s&&(l=l&&l.removeAfter(n,0,s)),u>=p)u-=p,s-=p,a=pr,h=null,l=l&&l.removeBefore(n,0,u);else if(u>i||c>p){for(f=0;h;){var g=u>>>a&lr;if(g!==p>>>a&lr)break;g&&(f+=(1<<a)*g),a-=pr,h=h.array[g]}h&&u>i&&(h=h.removeBefore(n,a,u-f)),h&&c>p&&(h=h.removeAfter(n,a,p-f)),f&&(u-=f,s-=f)}return t.__ownerID?(t.size=s-u,t._origin=u,t._capacity=s,t._level=a,t._root=h,t._tail=l,t.__hash=void 0,t.__altered=!0,t):Nt(u,s,a,h,l)}function Ft(t,e,r){for(var i=[],u=0,s=0;r.length>s;s++){var a=r[s],h=n(a);h.size>u&&(u=h.size),o(a)||(h=h.map(function(t){return H(t)})),i.push(h)}return u>t.size&&(t=t.setSize(u)),jt(t,e,i)}function Gt(t){return vr>t?0:t-1>>>pr<<pr}function Zt(t){return null===t||void 0===t?ee():$t(t)?t:ee().withMutations(function(e){var n=r(t);ft(n.size),n.forEach(function(t,r){return e.set(r,t)})})}function $t(t){return _t(t)&&h(t)}function te(t,e,r,n){var i=Object.create(Zt.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function ee(){return Fr||(Fr=te(zt(),Pt()))}function re(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===yr){if(!a)return t;u.size>=vr&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&s!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):te(n,i)}function ne(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function ue(t){this._iter=t,this.size=t.size}function se(t){var e=Ee(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);
|
|
||||||
return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Oe,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===Sr){var n=t.__iterator(e,r);return new S(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===wr?gr:wr,r)},e}function ae(t,e,r){var n=Ee(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,yr);return o===yr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(Sr,i);return new S(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return z(n,s,e.call(r,u[1],s,t),i)})},n}function he(t,e){var r=Ee(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=se(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=Oe,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function fe(t,e,r,n){var i=Ee(t);return n&&(i.has=function(n){var i=t.get(n,yr);return i!==yr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,yr);return o!==yr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate(function(t,o,a){return e.call(r,t,o,a)?(s++,i(t,n?o:s-1,u)):void 0},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(Sr,o),s=0;return new S(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,h=a[0],f=a[1];if(e.call(r,f,h,t))return z(i,n?h:s++,f,o)}})},i}function ce(t,e,r){var n=ct().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){
|
|
||||||
return t+1})}),n.asImmutable()}function _e(t,e,r){var n=u(t),i=(h(t)?Zt():ct()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=Me(t);return i.map(function(e){return be(t,o(e))})}function pe(t,e,r,n){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==r&&(r=r===1/0?i:0|r),d(e,r,i))return t;var o=m(e,i),u=g(r,i);if(o!==o||u!==u)return pe(t.toSeq().cacheResult(),e,r,n);var s,a=u-o;a===a&&(s=0>a?0:a);var h=Ee(t);return h.size=0===s?s:t.size&&s||void 0,!n&&L(t)&&s>=0&&(h.get=function(e,r){return e=l(this,e),e>=0&&s>e?t.get(e+o,r):r}),h.__iterateUncached=function(e,r){var i=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,a=!0,h=0;return t.__iterate(function(t,r){return a&&(a=u++<o)?void 0:(h++,e(t,n?r:h-1,i)!==!1&&h!==s)}),h},h.__iteratorUncached=function(e,r){if(0!==s&&r)return this.cacheResult().__iterator(e,r);var i=0!==s&&t.__iterator(e,r),u=0,a=0;return new S(function(){for(;u++<o;)i.next();if(++a>s)return I();var t=i.next();return n||e===wr?t:e===gr?z(e,a-1,void 0,t):z(e,a-1,t.value[1],t)})},h}function ve(t,e,r){var n=Ee(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,s){return e.call(r,t,i,s)&&++u&&n(t,i,o)}),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(Sr,i),s=!0;return new S(function(){if(!s)return I();var t=u.next();if(t.done)return t;var i=t.value,a=i[0],h=i[1];return e.call(r,h,a,o)?n===Sr?t:z(n,a,h,t):(s=!1,I())})},n}function le(t,e,r,n){var i=Ee(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,a=0;return t.__iterate(function(t,o,h){return s&&(s=e.call(r,t,o,h))?void 0:(a++,i(t,n?o:a-1,u))}),a},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(Sr,o),a=!0,h=0;return new S(function(){var t,o,f;do{if(t=s.next(),t.done)return n||i===wr?t:i===gr?z(i,h++,void 0,t):z(i,h++,t.value[1],t);
|
|
||||||
var c=t.value;o=c[0],f=c[1],a&&(a=e.call(r,f,o,u))}while(a);return i===Sr?t:z(i,o,f,t)})},i}function ye(t,e){var n=u(t),i=[t].concat(e).map(function(t){return o(t)?n&&(t=r(t)):t=n?B(t):W(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var a=i[0];if(a===t||n&&u(a)||s(t)&&s(a))return a}var h=new j(i);return n?h=h.toKeyedSeq():s(t)||(h=h.toSetSeq()),h=h.flatten(!0),h.size=i.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),h}function de(t,e,r){var n=Ee(t);return n.__iterateUncached=function(n,i){function u(t,h){var f=this;t.__iterate(function(t,i){return(!e||e>h)&&o(t)?u(t,h+1):n(t,r?i:s++,f)===!1&&(a=!0),!a},i)}var s=0,a=!1;return u(t,0),s},n.__iteratorUncached=function(n,i){var u=t.__iterator(n,i),s=[],a=0;return new S(function(){for(;u;){var t=u.next();if(t.done===!1){var h=t.value;if(n===Sr&&(h=h[1]),e&&!(e>s.length)||!o(h))return r?t:z(n,a++,h,t);s.push(u),u=h.__iterator(n,i)}else u=s.pop()}return I()})},n}function me(t,e,r){var n=Me(t);return t.toSeq().map(function(i,o){return n(e.call(r,i,o,t))}).flatten(!0)}function ge(t,e){var r=Ee(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate(function(t,n){return(!o||r(e,o++,i)!==!1)&&r(t,o++,i)!==!1},n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(wr,n),u=0;return new S(function(){return(!i||u%2)&&(i=o.next(),i.done)?i:u%2?z(r,u++,e):z(r,u++,i.value,i)})},r}function we(t,e,r){e||(e=xe);var n=u(t),i=0,o=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).toArray();return o.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?x(o):s(t)?k(o):A(o)}function Se(t,e,r){if(e||(e=xe),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return ze(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return ze(e,t,r)?r:t})}function ze(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!==r)||n>0}function Ie(t,r,n){
|
|
||||||
var i=Ee(t);return i.size=new j(n).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(wr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(t,i){var o=n.map(function(t){return t=e(t),D(i?t.reverse():t)}),u=0,s=!1;return new S(function(){var e;return s||(e=o.map(function(t){return t.next()}),s=e.some(function(t){return t.done})),s?I():z(t,u++,r.apply(null,e.map(function(t){return t.value})))})},i}function be(t,e){return L(t)?e:t.constructor(e)}function qe(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function De(t){return ft(t.size),v(t)}function Me(t){return u(t)?r:s(t)?n:i}function Ee(t){return Object.create((u(t)?x:s(t)?k:A).prototype)}function Oe(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function xe(t,e){return t>e?1:e>t?-1:0}function ke(t){var r=D(t);if(!r){if(!E(t))throw new TypeError("Expected iterable or array-like: "+t);r=D(e(t))}return r}function Ae(t,e){var r,n=function(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var u=Object.keys(t);Ue(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=ct(o)},i=n.prototype=Object.create(Gr);return i.constructor=n,n}function je(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Re(t){return t._name||t.constructor.name||"Record"}function Ue(t,e){try{e.forEach(Ke.bind(void 0,t))}catch(r){}}function Ke(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){Z(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Le(t){return null===t||void 0===t?Ce():Te(t)&&!h(t)?t:Ce().withMutations(function(e){var r=i(t);ft(r.size),r.forEach(function(t){return e.add(t)})})}function Te(t){return!(!t||!t[Zr])}function Be(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function We(t,e){var r=Object.create($r);
|
|
||||||
return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ce(){return tn||(tn=We(zt()))}function Je(t){return null===t||void 0===t?He():Ne(t)?t:He().withMutations(function(e){var r=i(t);ft(r.size),r.forEach(function(t){return e.add(t)})})}function Ne(t){return Te(t)&&h(t)}function Pe(t,e){var r=Object.create(en);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function He(){return rn||(rn=Pe(ee()))}function Ve(t){return null===t||void 0===t?Xe():Ye(t)?t:Xe().unshiftAll(t)}function Ye(t){return!(!t||!t[nn])}function Qe(t,e,r,n){var i=Object.create(on);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Xe(){return un||(un=Qe(0))}function Fe(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Ge(t,e){return e}function Ze(t,e){return[e,t]}function $e(t){return function(){return!t.apply(this,arguments)}}function tr(t){return function(){return-t.apply(this,arguments)}}function er(t){return"string"==typeof t?JSON.stringify(t):t+""}function rr(){return p(arguments)}function nr(t,e){return e>t?1:t>e?-1:0}function ir(t){if(t.size===1/0)return 0;var e=h(t),r=u(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+ur(ot(t),ot(e))|0}:function(t,e){n=n+ur(ot(t),ot(e))|0}:e?function(t){n=31*n+ot(t)|0}:function(t){n=n+ot(t)|0});return or(i,n)}function or(t,e){return e=xr(e,3432918353),e=xr(e<<15|e>>>-15,461845907),e=xr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=xr(e^e>>>16,2246822507),e=xr(e^e>>>13,3266489909),e=it(e^e>>>16)}function ur(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var sr=Array.prototype.slice;t(r,e),t(n,e),t(i,e),e.isIterable=o,e.isKeyed=u,e.isIndexed=s,e.isAssociative=a,e.isOrdered=h,e.Keyed=r,e.Indexed=n,e.Set=i;var ar="@@__IMMUTABLE_ITERABLE__@@",hr="@@__IMMUTABLE_KEYED__@@",fr="@@__IMMUTABLE_INDEXED__@@",cr="@@__IMMUTABLE_ORDERED__@@",_r="delete",pr=5,vr=1<<pr,lr=vr-1,yr={},dr={value:!1},mr={value:!1},gr=0,wr=1,Sr=2,zr="function"==typeof Symbol&&Symbol.iterator,Ir="@@iterator",br=zr||Ir;
|
|
||||||
S.prototype.toString=function(){return"[Iterator]"},S.KEYS=gr,S.VALUES=wr,S.ENTRIES=Sr,S.prototype.inspect=S.prototype.toSource=function(){return""+this},S.prototype[br]=function(){return this},t(O,e),O.of=function(){return O(arguments)},O.prototype.toSeq=function(){return this},O.prototype.toString=function(){return this.__toString("Seq {","}")},O.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},O.prototype.__iterate=function(t,e){return N(this,t,e,!0)},O.prototype.__iterator=function(t,e){return P(this,t,e,!0)},t(x,O),x.prototype.toKeyedSeq=function(){return this},t(k,O),k.of=function(){return k(arguments)},k.prototype.toIndexedSeq=function(){return this},k.prototype.toString=function(){return this.__toString("Seq [","]")},k.prototype.__iterate=function(t,e){return N(this,t,e,!1)},k.prototype.__iterator=function(t,e){return P(this,t,e,!1)},t(A,O),A.of=function(){return A(arguments)},A.prototype.toSetSeq=function(){return this},O.isSeq=L,O.Keyed=x,O.Set=A,O.Indexed=k;var qr="@@__IMMUTABLE_SEQ__@@";O.prototype[qr]=!0,t(j,k),j.prototype.get=function(t,e){return this.has(t)?this._array[l(this,t)]:e},j.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},j.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new S(function(){return i>n?I():z(t,i,r[e?n-i++:i++])})},t(R,x),R.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},R.prototype.has=function(t){return this._object.hasOwnProperty(t)},R.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;i>=o;o++){var u=n[e?i-o:o];if(t(r[u],u,this)===!1)return o+1}return o},R.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new S(function(){var u=n[e?i-o:o];return o++>i?I():z(t,u,r[u])})},R.prototype[cr]=!0,t(U,k),U.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);
|
|
||||||
var r=this._iterable,n=D(r),i=0;if(q(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},U.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=D(r);if(!q(n))return new S(I);var i=0;return new S(function(){var e=n.next();return e.done?e:z(t,i++,e.value)})},t(K,k),K.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var o;!(o=r.next()).done;){var u=o.value;if(n[i]=u,t(u,i++,this)===!1)break}return i},K.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new S(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return z(t,i,n[i++])})};var Dr;t(G,k),G.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},G.prototype.get=function(t,e){return this.has(t)?this._value:e},G.prototype.includes=function(t){return X(this._value,t)},G.prototype.slice=function(t,e){var r=this.size;return d(t,e,r)?this:new G(this._value,g(e,r)-m(t,r))},G.prototype.reverse=function(){return this},G.prototype.indexOf=function(t){return X(this._value,t)?0:-1},G.prototype.lastIndexOf=function(t){return X(this._value,t)?this.size:-1},G.prototype.__iterate=function(t,e){for(var r=0;this.size>r;r++)if(t(this._value,r,this)===!1)return r+1;return r},G.prototype.__iterator=function(t,e){var r=this,n=0;return new S(function(){return r.size>n?z(t,n++,r._value):I()})},G.prototype.equals=function(t){return t instanceof G?X(this._value,t._value):F(t)};var Mr;t($,k),$.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},$.prototype.get=function(t,e){return this.has(t)?this._start+l(this,t)*this._step:e},$.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&this.size>e&&e===Math.floor(e);
|
|
||||||
},$.prototype.slice=function(t,e){return d(t,e,this.size)?this:(t=m(t,this.size),e=g(e,this.size),t>=e?new $(0,0):new $(this.get(t,this._end),this.get(e,this._end),this._step))},$.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.size>r)return r}return-1},$.prototype.lastIndexOf=function(t){return this.indexOf(t)},$.prototype.__iterate=function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;r>=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},$.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new S(function(){var u=i;return i+=e?-n:n,o>r?I():z(t,o++,u)})},$.prototype.equals=function(t){return t instanceof $?this._start===t._start&&this._end===t._end&&this._step===t._step:F(this,t)};var Er;t(tt,e),t(et,tt),t(rt,tt),t(nt,tt),tt.Keyed=et,tt.Indexed=rt,tt.Set=nt;var Or,xr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},kr=Object.isExtensible,Ar=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),jr="function"==typeof WeakMap;jr&&(Or=new WeakMap);var Rr=0,Ur="__immutablehash__";"function"==typeof Symbol&&(Ur=Symbol(Ur));var Kr=16,Lr=255,Tr=0,Br={};t(ct,et),ct.of=function(){var t=sr.call(arguments,0);return zt().withMutations(function(e){for(var r=0;t.length>r;r+=2){if(r+1>=t.length)throw Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}})},ct.prototype.toString=function(){return this.__toString("Map {","}")},ct.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},ct.prototype.set=function(t,e){return It(this,t,e)},ct.prototype.setIn=function(t,e){return this.updateIn(t,yr,function(){return e})},ct.prototype.remove=function(t){return It(this,t,yr)},ct.prototype.deleteIn=function(t){return this.updateIn(t,function(){return yr})},ct.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r);
|
|
||||||
},ct.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=Rt(this,ke(t),e,r);return n===yr?void 0:n},ct.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):zt()},ct.prototype.merge=function(){return xt(this,void 0,arguments)},ct.prototype.mergeWith=function(t){var e=sr.call(arguments,1);return xt(this,t,e)},ct.prototype.mergeIn=function(t){var e=sr.call(arguments,1);return this.updateIn(t,zt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},ct.prototype.mergeDeep=function(){return xt(this,kt,arguments)},ct.prototype.mergeDeepWith=function(t){var e=sr.call(arguments,1);return xt(this,At(t),e)},ct.prototype.mergeDeepIn=function(t){var e=sr.call(arguments,1);return this.updateIn(t,zt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},ct.prototype.sort=function(t){return Zt(we(this,t))},ct.prototype.sortBy=function(t,e){return Zt(we(this,e,t))},ct.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},ct.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new _)},ct.prototype.asImmutable=function(){return this.__ensureOwner()},ct.prototype.wasAltered=function(){return this.__altered},ct.prototype.__iterator=function(t,e){return new mt(this,t,e)},ct.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},ct.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?St(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},ct.isMap=_t;var Wr="@@__IMMUTABLE_MAP__@@",Cr=ct.prototype;Cr[Wr]=!0,Cr[_r]=Cr.remove,Cr.removeIn=Cr.deleteIn,pt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},pt.prototype.update=function(t,e,r,n,i,o,u){for(var s=i===yr,a=this.entries,h=0,f=a.length;f>h&&!X(n,a[h][0]);h++);
|
|
||||||
var _=f>h;if(_?a[h][1]===i:s)return this;if(c(u),(s||!_)&&c(o),!s||1!==a.length){if(!_&&!s&&a.length>=Nr)return Mt(t,a,n,i);var v=t&&t===this.ownerID,l=v?a:p(a);return _?s?h===f-1?l.pop():l[h]=l.pop():l[h]=[n,i]:l.push([n,i]),v?(this.entries=l,this):new pt(t,l)}},vt.prototype.get=function(t,e,r,n){void 0===e&&(e=ot(r));var i=1<<((0===t?e:e>>>t)&lr),o=this.bitmap;return 0===(o&i)?n:this.nodes[Ut(o&i-1)].get(t+pr,e,r,n)},vt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=ot(n));var s=(0===e?r:r>>>e)&lr,a=1<<s,h=this.bitmap,f=0!==(h&a);if(!f&&i===yr)return this;var c=Ut(h&a-1),_=this.nodes,p=f?_[c]:void 0,v=bt(p,t,e+pr,r,n,i,o,u);if(v===p)return this;if(!f&&v&&_.length>=Pr)return Ot(t,_,h,s,v);if(f&&!v&&2===_.length&&qt(_[1^c]))return _[1^c];if(f&&v&&1===_.length&&qt(v))return v;var l=t&&t===this.ownerID,y=f?v?h:h^a:h|a,d=f?v?Kt(_,c,v,l):Tt(_,c,l):Lt(_,c,v,l);return l?(this.bitmap=y,this.nodes=d,this):new vt(t,y,d)},lt.prototype.get=function(t,e,r,n){void 0===e&&(e=ot(r));var i=(0===t?e:e>>>t)&lr,o=this.nodes[i];return o?o.get(t+pr,e,r,n):n},lt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=ot(n));var s=(0===e?r:r>>>e)&lr,a=i===yr,h=this.nodes,f=h[s];if(a&&!f)return this;var c=bt(f,t,e+pr,r,n,i,o,u);if(c===f)return this;var _=this.count;if(f){if(!c&&(_--,Hr>_))return Et(t,h,_,s)}else _++;var p=t&&t===this.ownerID,v=Kt(h,s,c,p);return p?(this.count=_,this.nodes=v,this):new lt(t,_,v)},yt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},yt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=ot(n));var s=i===yr;if(r!==this.keyHash)return s?this:(c(u),c(o),Dt(this,t,e,r,[n,i]));for(var a=this.entries,h=0,f=a.length;f>h&&!X(n,a[h][0]);h++);var _=f>h;if(_?a[h][1]===i:s)return this;if(c(u),(s||!_)&&c(o),s&&2===f)return new dt(t,this.keyHash,a[1^h]);var v=t&&t===this.ownerID,l=v?a:p(a);return _?s?h===f-1?l.pop():l[h]=l.pop():l[h]=[n,i]:l.push([n,i]),v?(this.entries=l,this):new yt(t,this.keyHash,l)},dt.prototype.get=function(t,e,r,n){return X(r,this.entry[0])?this.entry[1]:n;
|
|
||||||
},dt.prototype.update=function(t,e,r,n,i,o,u){var s=i===yr,a=X(n,this.entry[0]);return(a?i===this.entry[1]:s)?this:(c(u),s?void c(o):a?t&&t===this.ownerID?(this.entry[1]=i,this):new dt(t,this.keyHash,[n,i]):(c(o),Dt(this,t,e,ot(n),[n,i])))},pt.prototype.iterate=yt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},vt.prototype.iterate=lt.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},dt.prototype.iterate=function(t,e){return t(this.entry)},t(mt,S),mt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return gt(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return gt(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return gt(t,o.entry);e=this._stack=wt(o,e)}continue}e=this._stack=this._stack.__prev}return I()};var Jr,Nr=vr/4,Pr=vr/2,Hr=vr/4;t(Bt,rt),Bt.of=function(){return this(arguments)},Bt.prototype.toString=function(){return this.__toString("List [","]")},Bt.prototype.get=function(t,e){if(t=l(this,t),t>=0&&this.size>t){t+=this._origin;var r=Qt(this,t);return r&&r.array[t&lr]}return e},Bt.prototype.set=function(t,e){return Ht(this,t,e)},Bt.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},Bt.prototype.insert=function(t,e){return this.splice(t,0,e)},Bt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=pr,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Pt()},Bt.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){Xt(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},Bt.prototype.pop=function(){return Xt(this,0,-1)},Bt.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){Xt(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r]);
|
|
||||||
})},Bt.prototype.shift=function(){return Xt(this,1)},Bt.prototype.merge=function(){return Ft(this,void 0,arguments)},Bt.prototype.mergeWith=function(t){var e=sr.call(arguments,1);return Ft(this,t,e)},Bt.prototype.mergeDeep=function(){return Ft(this,kt,arguments)},Bt.prototype.mergeDeepWith=function(t){var e=sr.call(arguments,1);return Ft(this,At(t),e)},Bt.prototype.setSize=function(t){return Xt(this,0,t)},Bt.prototype.slice=function(t,e){var r=this.size;return d(t,e,r)?this:Xt(this,m(t,r),g(e,r))},Bt.prototype.__iterator=function(t,e){var r=0,n=Jt(this,e);return new S(function(){var e=n();return e===Xr?I():z(t,r++,e)})},Bt.prototype.__iterate=function(t,e){for(var r,n=0,i=Jt(this,e);(r=i())!==Xr&&t(r,n++,this)!==!1;);return n},Bt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Nt(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},Bt.isList=Wt;var Vr="@@__IMMUTABLE_LIST__@@",Yr=Bt.prototype;Yr[Vr]=!0,Yr[_r]=Yr.remove,Yr.setIn=Cr.setIn,Yr.deleteIn=Yr.removeIn=Cr.removeIn,Yr.update=Cr.update,Yr.updateIn=Cr.updateIn,Yr.mergeIn=Cr.mergeIn,Yr.mergeDeepIn=Cr.mergeDeepIn,Yr.withMutations=Cr.withMutations,Yr.asMutable=Cr.asMutable,Yr.asImmutable=Cr.asImmutable,Yr.wasAltered=Cr.wasAltered,Ct.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&lr;if(n>=this.array.length)return new Ct([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-pr,r),i===u&&o)return this}if(o&&!i)return this;var s=Yt(this,t);if(!o)for(var a=0;n>a;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},Ct.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n=r-1>>>e&lr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-pr,r),i===o&&n===this.array.length-1)return this}var u=Yt(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Qr,Xr={};t(Zt,ct),Zt.of=function(){return this(arguments)},Zt.prototype.toString=function(){return this.__toString("OrderedMap {","}");
|
|
||||||
},Zt.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},Zt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Zt.prototype.set=function(t,e){return re(this,t,e)},Zt.prototype.remove=function(t){return re(this,t,yr)},Zt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Zt.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},Zt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Zt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?te(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},Zt.isOrderedMap=$t,Zt.prototype[cr]=!0,Zt.prototype[_r]=Zt.prototype.remove;var Fr;t(ne,x),ne.prototype.get=function(t,e){return this._iter.get(t,e)},ne.prototype.has=function(t){return this._iter.has(t)},ne.prototype.valueSeq=function(){return this._iter.valueSeq()},ne.prototype.reverse=function(){var t=this,e=he(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},ne.prototype.map=function(t,e){var r=this,n=ae(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},ne.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?De(this):0,function(i){return t(i,e?--r:r++,n)}),e)},ne.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(wr,e),n=e?De(this):0;return new S(function(){var i=r.next();return i.done?i:z(t,e?--n:n++,i.value,i)})},ne.prototype[cr]=!0,t(ie,k),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ie.prototype.__iterator=function(t,e){var r=this._iter.__iterator(wr,e),n=0;
|
|
||||||
return new S(function(){var e=r.next();return e.done?e:z(t,n++,e.value,e)})},t(oe,A),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},oe.prototype.__iterator=function(t,e){var r=this._iter.__iterator(wr,e);return new S(function(){var e=r.next();return e.done?e:z(t,e.value,e.value,e)})},t(ue,x),ue.prototype.entrySeq=function(){return this._iter.toSeq()},ue.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){qe(e);var n=o(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ue.prototype.__iterator=function(t,e){var r=this._iter.__iterator(wr,e);return new S(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){qe(n);var i=o(n);return z(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ie.prototype.cacheResult=ne.prototype.cacheResult=oe.prototype.cacheResult=ue.prototype.cacheResult=Oe,t(Ae,et),Ae.prototype.toString=function(){return this.__toString(Re(this)+" {","}")},Ae.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Ae.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},Ae.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=je(this,zt()))},Ae.prototype.set=function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+Re(this));if(this._map&&!this._map.has(t)){var r=this._defaultValues[t];if(e===r)return this}var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:je(this,n)},Ae.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:je(this,e)},Ae.prototype.wasAltered=function(){return this._map.wasAltered()},Ae.prototype.__iterator=function(t,e){var n=this;return r(this._defaultValues).map(function(t,e){return n.get(e)}).__iterator(t,e)},Ae.prototype.__iterate=function(t,e){
|
|
||||||
var n=this;return r(this._defaultValues).map(function(t,e){return n.get(e)}).__iterate(t,e)},Ae.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?je(this,e,t):(this.__ownerID=t,this._map=e,this)};var Gr=Ae.prototype;Gr[_r]=Gr.remove,Gr.deleteIn=Gr.removeIn=Cr.removeIn,Gr.merge=Cr.merge,Gr.mergeWith=Cr.mergeWith,Gr.mergeIn=Cr.mergeIn,Gr.mergeDeep=Cr.mergeDeep,Gr.mergeDeepWith=Cr.mergeDeepWith,Gr.mergeDeepIn=Cr.mergeDeepIn,Gr.setIn=Cr.setIn,Gr.update=Cr.update,Gr.updateIn=Cr.updateIn,Gr.withMutations=Cr.withMutations,Gr.asMutable=Cr.asMutable,Gr.asImmutable=Cr.asImmutable,t(Le,nt),Le.of=function(){return this(arguments)},Le.fromKeys=function(t){return this(r(t).keySeq())},Le.prototype.toString=function(){return this.__toString("Set {","}")},Le.prototype.has=function(t){return this._map.has(t)},Le.prototype.add=function(t){return Be(this,this._map.set(t,!0))},Le.prototype.remove=function(t){return Be(this,this._map.remove(t))},Le.prototype.clear=function(){return Be(this,this._map.clear())},Le.prototype.union=function(){var t=sr.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;t.length>r;r++)i(t[r]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},Le.prototype.intersect=function(){var t=sr.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.every(function(t){return t.includes(e)})||r.remove(e)})})},Le.prototype.subtract=function(){var t=sr.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.remove(e)})})},Le.prototype.merge=function(){return this.union.apply(this,arguments)},Le.prototype.mergeWith=function(t){var e=sr.call(arguments,1);return this.union.apply(this,e)},
|
|
||||||
Le.prototype.sort=function(t){return Je(we(this,t))},Le.prototype.sortBy=function(t,e){return Je(we(this,e,t))},Le.prototype.wasAltered=function(){return this._map.wasAltered()},Le.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},Le.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},Le.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},Le.isSet=Te;var Zr="@@__IMMUTABLE_SET__@@",$r=Le.prototype;$r[Zr]=!0,$r[_r]=$r.remove,$r.mergeDeep=$r.merge,$r.mergeDeepWith=$r.mergeWith,$r.withMutations=Cr.withMutations,$r.asMutable=Cr.asMutable,$r.asImmutable=Cr.asImmutable,$r.__empty=Ce,$r.__make=We;var tn;t(Je,Le),Je.of=function(){return this(arguments)},Je.fromKeys=function(t){return this(r(t).keySeq())},Je.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Je.isOrderedSet=Ne;var en=Je.prototype;en[cr]=!0,en.__empty=He,en.__make=Pe;var rn;t(Ve,rt),Ve.of=function(){return this(arguments)},Ve.prototype.toString=function(){return this.__toString("Stack [","]")},Ve.prototype.get=function(t,e){var r=this._head;for(t=l(this,t);r&&t--;)r=r.next;return r?r.value:e},Ve.prototype.peek=function(){return this._head&&this._head.value},Ve.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Qe(t,e)},Ve.prototype.pushAll=function(t){if(t=n(t),0===t.size)return this;ft(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Qe(e,r)},Ve.prototype.pop=function(){return this.slice(1)},Ve.prototype.unshift=function(){return this.push.apply(this,arguments)},Ve.prototype.unshiftAll=function(t){
|
|
||||||
return this.pushAll(t)},Ve.prototype.shift=function(){return this.pop.apply(this,arguments)},Ve.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xe()},Ve.prototype.slice=function(t,e){if(d(t,e,this.size))return this;var r=m(t,this.size),n=g(e,this.size);if(n!==this.size)return rt.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Qe(i,o)},Ve.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Qe(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ve.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},Ve.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new S(function(){if(n){var e=n.value;return n=n.next,z(t,r++,e)}return I()})},Ve.isStack=Ye;var nn="@@__IMMUTABLE_STACK__@@",on=Ve.prototype;on[nn]=!0,on.withMutations=Cr.withMutations,on.asMutable=Cr.asMutable,on.asImmutable=Cr.asImmutable,on.wasAltered=Cr.wasAltered;var un;e.Iterator=S,Fe(e,{toArray:function(){ft(this.size);var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new ne(this,!0)},toMap:function(){return ct(this.toKeyedSeq())},toObject:function(){ft(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return Zt(this.toKeyedSeq())},toOrderedSet:function(){return Je(u(this)?this.valueSeq():this)},toSet:function(){return Le(u(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this);
|
|
||||||
},toSeq:function(){return s(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ve(u(this)?this.valueSeq():this)},toList:function(){return Bt(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=sr.call(arguments,0);return be(this,ye(this,t))},includes:function(t){return this.some(function(e){return X(e,t)})},entries:function(){return this.__iterator(Sr)},every:function(t,e){ft(this.size);var r=!0;return this.__iterate(function(n,i,o){return t.call(e,n,i,o)?void 0:(r=!1,!1)}),r},filter:function(t,e){return be(this,fe(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return ft(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){ft(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?""+n:""}),e},keys:function(){return this.__iterator(gr)},map:function(t,e){return be(this,ae(this,t,e))},reduce:function(t,e,r){ft(this.size);var n,i;return arguments.length<2?i=!0:n=e,this.__iterate(function(e,o,u){i?(i=!1,n=e):n=t.call(r,n,e,o,u)}),n},reduceRight:function(t,e,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return be(this,he(this,!0))},slice:function(t,e){return be(this,pe(this,t,e,!0))},some:function(t,e){return!this.every($e(t),e)},sort:function(t){return be(this,we(this,t))},values:function(){return this.__iterator(wr)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return v(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return ce(this,t,e)},equals:function(t){return F(this,t)},entrySeq:function(){var t=this;if(t._cache)return new j(t._cache);var e=t.toSeq().map(Ze).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){
|
|
||||||
return this.filter($e(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?(n=[i,r],!1):void 0}),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(y)},flatMap:function(t,e){return be(this,me(this,t,e))},flatten:function(t){return be(this,de(this,t,!0))},fromEntrySeq:function(){return new ue(this)},get:function(t,e){return this.find(function(e,r){return X(r,t)},void 0,e)},getIn:function(t,e){for(var r,n=this,i=ke(t);!(r=i.next()).done;){var o=r.value;if(n=n&&n.get?n.get(o,yr):yr,n===yr)return e}return n},groupBy:function(t,e){return _e(this,t,e)},has:function(t){return this.get(t,yr)!==yr},hasIn:function(t){return this.getIn(t,yr)!==yr},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return X(e,t)})},keySeq:function(){return this.toSeq().map(Ge).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Se(this,t)},maxBy:function(t,e){return Se(this,e,t)},min:function(t){return Se(this,t?tr(t):nr)},minBy:function(t,e){return Se(this,e?tr(e):nr,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return be(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return be(this,le(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile($e(t),e)},sortBy:function(t,e){return be(this,we(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return be(this,this.toSeq().reverse().take(t).reverse());
|
|
||||||
},takeWhile:function(t,e){return be(this,ve(this,t,e))},takeUntil:function(t,e){return this.takeWhile($e(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var sn=e.prototype;sn[ar]=!0,sn[br]=sn.values,sn.__toJS=sn.toArray,sn.__toStringMapper=er,sn.inspect=sn.toSource=function(){return""+this},sn.chain=sn.flatMap,sn.contains=sn.includes,Fe(r,{flip:function(){return be(this,se(this))},mapEntries:function(t,e){var r=this,n=0;return be(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return be(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}});var an=r.prototype;an[hr]=!0,an[br]=sn.entries,an.__toJS=sn.toObject,an.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+er(t)},Fe(n,{toKeyedSeq:function(){return new ne(this,!1)},filter:function(t,e){return be(this,fe(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return be(this,he(this,!1))},slice:function(t,e){return be(this,pe(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=m(t,0>t?this.count():this.size);var n=this.slice(0,t);return be(this,1===r?n:n.concat(p(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(){return this.get(0)},flatten:function(t){return be(this,de(this,t,!1))},get:function(t,e){return t=l(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=l(this,t),t>=0&&(void 0!==this.size?this.size===1/0||this.size>t:-1!==this.indexOf(t))},interpose:function(t){return be(this,ge(this,t))},interleave:function(){var t=[this].concat(p(arguments)),e=Ie(this.toSeq(),k.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),
|
|
||||||
be(this,r)},keySeq:function(){return $(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return be(this,le(this,t,e,!1))},zip:function(){var t=[this].concat(p(arguments));return be(this,Ie(this,rr,t))},zipWith:function(t){var e=p(arguments);return e[0]=this,be(this,Ie(this,t,e))}}),n.prototype[fr]=!0,n.prototype[cr]=!0,Fe(i,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=sn.includes,i.prototype.contains=i.prototype.includes,Fe(x,r.prototype),Fe(k,n.prototype),Fe(A,i.prototype),Fe(et,r.prototype),Fe(rt,n.prototype),Fe(nt,i.prototype);var hn={Iterable:e,Seq:O,Collection:tt,Map:ct,OrderedMap:Zt,List:Bt,Stack:Ve,Set:Le,OrderedSet:Je,Record:Ae,Range:$,Repeat:G,is:X,fromJS:H};return hn});
|
|
||||||
@@ -7,20 +7,8 @@ var redoc = document.createElement("redoc");
|
|||||||
var redocSettings = JSON.parse(document.getElementById('redoc-settings').innerHTML);
|
var redocSettings = JSON.parse(document.getElementById('redoc-settings').innerHTML);
|
||||||
if (redocSettings.url) {
|
if (redocSettings.url) {
|
||||||
specURL = redocSettings.url;
|
specURL = redocSettings.url;
|
||||||
|
delete redocSettings.url;
|
||||||
}
|
}
|
||||||
delete redocSettings.url;
|
|
||||||
if (redocSettings.fetchSchemaWithQuery) {
|
|
||||||
var query = new URLSearchParams(window.location.search || '').entries();
|
|
||||||
var url = specURL.split('?');
|
|
||||||
var usp = new URLSearchParams(url[1] || '');
|
|
||||||
for (var it = query.next(); !it.done; it = query.next()) {
|
|
||||||
usp.set(it.value[0], it.value[1]);
|
|
||||||
}
|
|
||||||
url[1] = usp.toString();
|
|
||||||
specURL = url[1] ? url.join('?') : url[0];
|
|
||||||
}
|
|
||||||
delete redocSettings.fetchSchemaWithQuery;
|
|
||||||
|
|
||||||
redoc.setAttribute("spec-url", specURL);
|
redoc.setAttribute("spec-url", specURL);
|
||||||
|
|
||||||
function camelToKebab(str) {
|
function camelToKebab(str) {
|
||||||
@@ -35,7 +23,7 @@ for (var p in redocSettings) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.body.replaceChild(redoc, document.getElementById('redoc-placeholder'));
|
document.body.appendChild(redoc);
|
||||||
|
|
||||||
function hideEmptyVersion() {
|
function hideEmptyVersion() {
|
||||||
// 'span.api-info-version' is for redoc 1.x, 'div.api-info span' is for redoc 2-alpha
|
// 'span.api-info-version' is for redoc 1.x, 'div.api-info span' is for redoc 2-alpha
|
||||||
@@ -48,8 +36,8 @@ function hideEmptyVersion() {
|
|||||||
var versionString = apiVersion.innerText;
|
var versionString = apiVersion.innerText;
|
||||||
if (versionString) {
|
if (versionString) {
|
||||||
// trim spaces and surrounding ()
|
// trim spaces and surrounding ()
|
||||||
versionString = versionString.replace(/ /g, '');
|
versionString = versionString.replace(/ /g,'');
|
||||||
versionString = versionString.replace(/(^\()|(\)$)/g, '');
|
versionString = versionString.replace(/(^\()|(\)$)/g,'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!versionString) {
|
if (!versionString) {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.9 KiB |
+33
-41
@@ -1,10 +1,10 @@
|
|||||||
/*!
|
/*!
|
||||||
* ReDoc - OpenAPI/Swagger-generated API Reference Documentation
|
* ReDoc - OpenAPI/Swagger-generated API Reference Documentation
|
||||||
* -------------------------------------------------------------
|
* -------------------------------------------------------------
|
||||||
* Version: "2.0.0-alpha.41"
|
* Version: "2.0.0-alpha.38"
|
||||||
* Repo: https://github.com/Rebilly/ReDoc
|
* Repo: https://github.com/Rebilly/ReDoc
|
||||||
*/
|
*/
|
||||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("null"),function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["null","esprima"],t):"object"==typeof exports?exports.Redoc=t(require("null"),function(){try{return require("esprima")}catch(e){}}()):e.Redoc=t(e.null,e.esprima)}(this,function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=133)}([function(e,t,n){"use strict";e.exports=n(177)},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",function(){return Qt}),n.d(t,"b",function(){return Ut}),n.d(t,"o",function(){return Nt}),n.d(t,"g",function(){return De}),n.d(t,"n",function(){return v}),n.d(t,"k",function(){return ne}),n.d(t,"i",function(){return Qe}),n.d(t,"j",function(){return Re}),n.d(t,"l",function(){return be}),n.d(t,"e",function(){return le}),n.d(t,"m",function(){return Yt}),n.d(t,"d",function(){return O}),n.d(t,"f",function(){return Vt}),n.d(t,"h",function(){return Le}),n.d(t,"c",function(){return x});
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("null"),function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["null","esprima"],t):"object"==typeof exports?exports.Redoc=t(require("null"),function(){try{return require("esprima")}catch(e){}}()):e.Redoc=t(e.null,e.esprima)}(this,function(__WEBPACK_EXTERNAL_MODULE__132__,__WEBPACK_EXTERNAL_MODULE__233__){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=147)}([function(e,t,n){"use strict";e.exports=n(191)},function(e,t,n){"use strict";n.d(t,"d",function(){return o}),n.d(t,"a",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"b",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return c});
|
||||||
/*! *****************************************************************************
|
/*! *****************************************************************************
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
@@ -19,14 +19,29 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|||||||
See the Apache Version 2.0 License for specific language governing permissions
|
See the Apache Version 2.0 License for specific language governing permissions
|
||||||
and limitations under the License.
|
and limitations under the License.
|
||||||
***************************************************************************** */
|
***************************************************************************** */
|
||||||
var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};function i(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}var c={},u={};function p(e){if(!0!==e.__mobxDidRunLazyInitializers){var t=e.__mobxDecorators;if(t)for(var n in st(e,"__mobxDidRunLazyInitializers",!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function f(e,t){return function(){var n,r=function(r,o,i,s){if(!0===s)return t(r,o,i,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,"__mobxDecorators")){var l=r.__mobxDecorators;st(r,"__mobxDecorators",a({},l))}return r.__mobxDecorators[o]={prop:o,propertyCreator:t,descriptor:i,decoratorTarget:r,decoratorArguments:n},function(e,t){var n=t?c:u;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return p(this),this[e]},set:function(t){p(this),this[e]=t}})}(o,e)};return function(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}(arguments)?(n=Ge,r.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),r)}}function d(){return!!bt.spyListeners.length}function h(e){if(bt.spyListeners.length)for(var t=bt.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function m(e){h(a({},e,{spyReportStart:!0}))}var g={spyReportEnd:!0};function y(e){h(e?a({},e,{spyReportEnd:!0}):g)}function v(e){return bt.spyListeners.push(e),rt(function(){bt.spyListeners=bt.spyListeners.filter(function(t){return t!==e})})}function b(e,t){var n=function(){return w(e,t,this,arguments)};return n.isMobxAction=!0,n}function w(e,t,n,r){var o=function(e,t,n,r){var o=d()&&!!e,i=0;if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var l=0;l<a;l++)s[l]=r[l];m({type:"action",name:e,object:n,arguments:s})}var c=Lt();St();var u=k(!0);return{prevDerivation:c,prevAllowStateChanges:u,notifySpy:o,startTime:i}}(e,0,n,r);try{return t.apply(n,r)}finally{!function(e){E(e.prevAllowStateChanges),_t(),Mt(e.prevDerivation),e.notifySpy&&y({time:Date.now()-e.startTime})}(o)}}function x(e,t){var n,r=k(e);try{n=t()}finally{E(r)}return n}function k(e){var t=bt.allowStateChanges;return bt.allowStateChanges=e,t}function E(e){bt.allowStateChanges=e}function S(){et(!1)}function _(e){return function(t,n,r){if(r){if(r.value)return{value:b(e,r.value),enumerable:!1,configurable:!0,writable:!0};var o=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return b(e,o.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){st(this,n,O(e,t))}})}}(e).apply(this,arguments)}}var O=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?b(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?b(e,t):1===arguments.length&&"string"==typeof e?_(e):!0!==r?_(t).apply(null,arguments):void(e[t]=b(e.name||t,n.value))};function C(e,t,n){st(e,t,b(t,n.bind(e)))}O.bound=function(e,t,n,r){return!0===r?(C(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return C(this,t,n.value||n.initializer.call(this)),this[t]},set:S}:{enumerable:!1,configurable:!0,set:function(e){C(this,t,e)},get:function(){}}};var T=Object.prototype.toString;function A(e,t){return I(e,t)}function I(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&function(e,t,n,r){e=P(e),t=P(t);var o=T.call(e);if(o!==T.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];var l=n.length;for(;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),i){if((l=e.length)!==t.length)return!1;for(;l--;)if(!I(e[l],t[l],n,r))return!1}else{var c,u=Object.keys(e);if(l=u.length,Object.keys(t).length!==l)return!1;for(;l--;)if(c=u[l],!R(t,c)||!I(e[c],Line truncated
|
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}l((r=r.apply(e,t||[])).next())})}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function c(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}},function(e,t,n){"use strict";var r=n(48),o=n(11),i=n(19),a=n(63),s=(n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),"clike");function l(e,t){void 0===t&&(t=s),t=t.toLowerCase();var n=a.languages[t];return n||(n=a.languages[function(e){return{json:"js","c++":"cpp","c#":"csharp","objective-c":"objectivec",shell:"bash",viml:"vim"}[e]||s}(t)]),a.highlight(e,n)}var c=n(60),u=n(16);function p(e){return function(t,n,r){r.value=function(e,t){var n,r,o,i=null,a=0,s=function(){a=(new Date).getTime(),i=null,o=e.apply(n,r),i||(n=r=null)};return function(){var l=(new Date).getTime(),c=t-(l-a);return n=this,r=arguments,c<=0||c>t?(i&&(clearTimeout(i),i=null),a=l,o=e.apply(n,r),i||(n=r=null)):i||(i=setTimeout(s,c)),o}}(r.value,e)}}n(33);var f=n(1),d={};function h(e,t,n){if("function"==typeof n.value)return function(e,t,n){if(!n.value||n.value.length>0)throw new Error("@memoize decorator can only be applied to methods of zero arguments");var r="_memoized_"+t,o=n.value;return e[r]=d,f.a({},n,{value:function(){return this[r]===d&&(this[r]=o.call(this)),this[r]}})}(e,t,n);if("function"==typeof n.get)return function(e,t,n){var r="_memoized_"+t,o=n.get;return e[r]=d,f.a({},n,{get:function(){return this[r]===d&&(this[r]=o.call(this)),this[r]}})}(e,t,n);throw new Error("@memoize decorator can be applied to methods or getters, got "+String(n.value)+" instead")}n.d(t,"b",function(){return r.a}),n.d(t,"q",function(){return o.k}),n.d(t,"j",function(){return o.e}),n.d(t,"o",function(){return o.i}),n.d(t,"i",function(){return o.d}),n.d(t,"g",function(){return o.c}),n.d(t,"p",function(){return o.j}),n.d(t,"m",function(){return o.g}),n.d(t,"r",function(){return o.l}),n.d(t,"n",function(){return o.h}),n.d(t,"l",function(){return o.f}),n.d(t,"C",function(){return o.r}),n.d(t,"w",function(){return o.m}),n.d(t,"x",function(){return o.n}),n.d(t,"y",function(){return o.o}),n.d(t,"c",function(){return o.a}),n.d(t,"d",function(){return o.b}),n.d(t,"B",function(){return o.p}),n.d(t,"u",function(){return i.e}),n.d(t,"t",function(){return i.d}),n.d(t,"h",function(){return i.b}),n.d(t,"f",function(){return i.a}),n.d(t,"A",function(){return i.h}),n.d(t,"k",function(){return l}),n.d(t,"s",function(){return c.a}),n.d(t,"a",function(){return u.a}),n.d(t,"z",function(){return u.b}),n.d(t,"e",function(){return p}),n.d(t,"v",function(){return h})},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",function(){return Qt}),n.d(t,"b",function(){return Ut}),n.d(t,"o",function(){return Nt}),n.d(t,"g",function(){return De}),n.d(t,"n",function(){return y}),n.d(t,"k",function(){return ne}),n.d(t,"i",function(){return Qe}),n.d(t,"j",function(){return Re}),n.dLine truncated
|
||||||
|
/*! *****************************************************************************
|
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
|
this file except in compliance with the License. You may obtain a copy of the
|
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions
|
||||||
|
and limitations under the License.
|
||||||
|
***************************************************************************** */
|
||||||
|
var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};function i(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}var c={},u={};function p(e){if(!0!==e.__mobxDidRunLazyInitializers){var t=e.__mobxDecorators;if(t)for(var n in st(e,"__mobxDidRunLazyInitializers",!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function f(e,t){return function(){var n,r=function(r,o,i,s){if(!0===s)return t(r,o,i,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,"__mobxDecorators")){var l=r.__mobxDecorators;st(r,"__mobxDecorators",a({},l))}return r.__mobxDecorators[o]={prop:o,propertyCreator:t,descriptor:i,decoratorTarget:r,decoratorArguments:n},function(e,t){var n=t?c:u;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return p(this),this[e]},set:function(t){p(this),this[e]=t}})}(o,e)};return function(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}(arguments)?(n=Ge,r.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),r)}}function d(){return!!vt.spyListeners.length}function h(e){if(vt.spyListeners.length)for(var t=vt.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function m(e){h(a({},e,{spyReportStart:!0}))}var g={spyReportEnd:!0};function v(e){h(e?a({},e,{spyReportEnd:!0}):g)}function y(e){return vt.spyListeners.push(e),rt(function(){vt.spyListeners=vt.spyListeners.filter(function(t){return t!==e})})}function b(e,t){var n=function(){return w(e,t,this,arguments)};return n.isMobxAction=!0,n}function w(e,t,n,r){var o=function(e,t,n,r){var o=d()&&!!e,i=0;if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var l=0;l<a;l++)s[l]=r[l];m({type:"action",name:e,object:n,arguments:s})}var c=Lt();_t();var u=k(!0);return{prevDerivation:c,prevAllowStateChanges:u,notifySpy:o,startTime:i}}(e,0,n,r);try{return t.apply(n,r)}finally{!function(e){E(e.prevAllowStateChanges),St(),Mt(e.prevDerivation),e.notifySpy&&v({time:Date.now()-e.startTime})}(o)}}function x(e,t){var n,r=k(e);try{n=t()}finally{E(r)}return n}function k(e){var t=vt.allowStateChanges;return vt.allowStateChanges=e,t}function E(e){vt.allowStateChanges=e}function _(){et(!1)}function S(e){return function(t,n,r){if(r){if(r.value)return{value:b(e,r.value),enumerable:!1,configurable:!0,writable:!0};var o=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return b(e,o.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){st(this,n,O(e,t))}})}}(e).apply(this,arguments)}}var O=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?b(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?b(e,t):1===arguments.length&&"string"==typeof e?S(e):!0!==r?S(t).apply(null,arguments):void(e[t]=b(e.name||t,n.value))};function C(e,t,n){st(e,t,b(t,n.bind(e)))}O.bound=function(e,t,n,r){return!0===r?(C(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return C(this,t,n.value||n.initializer.call(this)),this[t]},set:_}:{enumerable:!1,configurable:!0,set:function(e){C(this,t,e)},get:function(){}}};var T=Object.prototype.toString;function A(e,t){return P(e,t)}function P(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&function(e,t,n,r){e=I(e),t=I(t);var o=T.call(e);if(o!==T.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];var l=n.length;for(;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),i){if((l=e.length)!==t.length)return!1;for(;l--;)if(!P(e[l],t[l],n,r))return!1}else{var c,u=Object.keys(e);if(l=u.length,Object.keys(t).length!==l)return!1;for(;l--;)if(c=u[l],!R(t,c)||!P(e[c],Line truncated
|
||||||
/*!
|
/*!
|
||||||
* The buffer module from node.js, for the browser.
|
* The buffer module from node.js, for the browser.
|
||||||
*
|
*
|
||||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
var r=n(191),o=n(192),i=n(100);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=s(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?s(e,0):f(e,t);if("Buffer"===t.type&&i(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t){if(u(t),e=s(e,t<0?0:0|d(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else-1!==u&&(i-=i-u),u=-1}else for(n+l>s&&(n=s-l),i=n;i>=0;i--){for(var p=!0,f=0;f<l;f++)if(c(e,i+f)!==c(t,f)){p=!1;break}if(p)return i}return-1}function v(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return $(B(t,e.length-n),e,n,r)}function w(e,t,n,r){return $(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return w(e,t,n,r)}function k(e,t,n,r){return $(z(t),e,n,r)}function E(e,t,n,r){return $(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,l,c=e[o],u=null,p=c>239?4:c>223?3:c>191?2:1;if(o+p<=n)switch(p){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[o+1],Line truncated
|
var r=n(210),o=n(211),i=n(113);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=s(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?s(e,0):f(e,t);if("Buffer"===t.type&&i(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t){if(u(t),e=s(e,t<0?0:0|d(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else-1!==u&&(i-=i-u),u=-1}else for(n+l>s&&(n=s-l),i=n;i>=0;i--){for(var p=!0,f=0;f<l;f++)if(c(e,i+f)!==c(t,f)){p=!1;break}if(p)return i}return-1}function y(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return $(B(t,e.length-n),e,n,r)}function w(e,t,n,r){return $(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return w(e,t,n,r)}function k(e,t,n,r){return $(z(t),e,n,r)}function E(e,t,n,r){return $(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,l,c=e[o],u=null,p=c>239?4:c>223?3:c>191?2:1;if(o+p<=n)switch(p){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[o+1],Line truncated
|
||||||
/*!
|
/*!
|
||||||
Copyright (c) 2017 Jed Watson.
|
Copyright (c) 2017 Jed Watson.
|
||||||
Licensed under the MIT License (MIT), see
|
Licensed under the MIT License (MIT), see
|
||||||
@@ -37,51 +52,43 @@ var r=n(191),o=n(192),i=n(100);function a(){return l.TYPED_ARRAY_SUPPORT?2147483
|
|||||||
Licensed under the MIT License (MIT), see
|
Licensed under the MIT License (MIT), see
|
||||||
http://jedwatson.github.io/classnames
|
http://jedwatson.github.io/classnames
|
||||||
*/
|
*/
|
||||||
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}void 0!==e&&e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(178)},function(e,t,n){var r=n(8);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";var r=n(246);function o(e,t,n){if(3===arguments.length)return o.set(e,t,n);if(2===arguments.length)return o.get(e,t);var r=o.bind(o,e);for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i].bind(r,e));return r}e.exports=o,o.get=function(e,t){for(var n=Array.isArray(t)?t:o.parse(t),r=0;r<n.length;++r){var i=n[r];if(!("object"==typeof e&&i in e))throw new Error("Invalid reference token: "+i);e=e[i]}return e},o.set=function(e,t,n){for(var r=Array.isArray(t)?t:o.parse(t),i=r[0],a=0;a<r.length-1;++a){var s=r[a];"-"===s&&Array.isArray(e)&&(s=e.length),i=r[a+1],s in e||(i.match(/^(\d+|-)$/)?e[s]=[]:e[s]={}),e=e[s]}return"-"===i&&Array.isArray(e)&&(i=e.length),e[i]=n,this},o.remove=function(e,t){var n=Array.isArray(t)?t:o.parse(t),r=n[n.length-1];if(void 0===r)throw new Error('Invalid JSON pointer for remove: "'+t+'"');var i=o.get(e,n.slice(0,-1));if(Array.isArray(i)){var a=+r;if(""===r&&isNaN(a))throw new Error('Invalid array index: "'+r+'"');Array.prototype.splice.call(i,a,1)}else delete i[r]},o.dict=function(e,t){var n={};return o.walk(e,function(e,t){n[t]=e},t),n},o.walk=function(e,t,n){var i=[];n=n||function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t},function e(a){r(a,function(r,a){i.push(String(a)),n(r)?e(r):t(r,o.compile(i)),i.pop()})}(e)},o.has=function(e,t){try{o.get(e,t)}catch(e){return!1}return!0},o.escape=function(e){return e.toString().replace(/~/g,"~0").replace(/\//g,"~1")},o.unescape=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},o.parse=function(e){if(""===e)return[];if("/"!==e.charAt(0))throw new Error("Invalid JSON pointer: "+e);return e.substring(1).split(/\//).map(o.unescape)},o.compile=function(e){return 0===e.length?"":"/"+e.map(o.escape).join("/")}},function(e,t,n){var r=n(14),o=n(81),i=n(58),a=Object.defineProperty;t.f=n(17)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(27)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(5),o=n(7),i=n(22),a=n(21),s=n(24),l=function(e,t,n){var c,u,p,f,d=e&l.F,h=e&l.G,m=e&l.S,g=e&l.P,y=e&l.B,v=h?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?o:o[t]||(o[t]={}),w=b.prototype||(b.prototype={});for(c in h&&(n=t),n)p=((u=!d&&v&&void 0!==v[c])?v:n)[c],f=y&&u?s(p,r):g&&"function"==typeof p?s(Function.call,p):p,v&&a(v,c,p,e&l.U),b[c]!=p&&i(b,c,f),g&&w[c]!=p&&(w[c]=p)};r.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";(function(r){var o=/^win/.test(r.platform),i=/\//g,a=/^(\w{2,}):\/\//i,s=e.exports,l=[/\?/g,"%3F",/\#/g,"%23"],c=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];t.parse=n(10).parse,t.resolve=n(10).resolve,t.cwd=function(){return r.browser?location.href:r.cwd()+"/"},t.getProtocol=function(e){var t=a.exec(e);if(t)return t[1].toLowerCase()},t.getExtension=function(e){var t=e.lastIndexOf(".");return t>=0?e.substr(t).toLowerCase():""},t.getHash=function(e){var t=e.indexOf("#");return t>=0?e.substr(t):"#"},t.stripHash=function(e){var t=e.indexOf("#");return t>=0&&(e=e.substr(0,t)),e},t.isHttp=function(e){var t=s.getProtocol(e);return"http"===t||"https"===t||void 0===t&&r.browser},t.isFileSystemPath=function(e){if(r.browser)return!1;var t=s.getProtocol(e);return void 0===t||"file"===t},t.fromFileSystemPath=function(e){o&&(e=e.replace(/\\/g,"/")),e=encodeURI(e);for(var t=0;t<l.length;t+=2)e=e.replace(l[t],l[t+1]);return e},t.toFileSystemPath=function(e,t){e=decodeURI(e);for(var n=0;n<c.length;n+=2)e=e.replace(c[n],c[n+1]);var r="file://"===e.substr(0,7).toLowerCase();return r&&(e="/"===e[7]?e.substr(8):e.substr(7),o&&"/"===e[1]&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(r=!1,e=o?e:"/"+e)),o&&!r&&":\\"===(e=e.replace(i,"\\")).substr(1,2)&&(e=e[0].toUpperCase()+e.substr(1)),e}}).call(this,n(6))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:eLine truncated
|
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}void 0!==e&&e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";n.d(t,"e",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return c}),n.d(t,"c",function(){return p}),n.d(t,"a",function(){return f}),n.d(t,"f",function(){return d}),n.d(t,"h",function(){return m}),n.d(t,"g",function(){return g});var r=n(1),o=n(138),i=n.n(o),a=n(15);function s(e,t){for(var n=[],r=0;r<e.length-1;r++)n.push(t(e[r],!1));return 0!==e.length&&n.push(t(e[e.length-1],!0)),n}function l(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r],r,e));return n}function c(e,t){var n=[],r=function(e){for(var o=0,i=e;o<i.length;o++){var a=i[o];n.push(a),a[t]&&r(a[t])}};return r(e),n}function u(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function p(e){return!isNaN(parseFloat(e))&&isFinite(e)}function f(e,t,n){var r=new RegExp("(^|\\n)#\\s?"+t+"\\s*\\n","i"),o=new RegExp("((\\n|^)#\\s*"+t+"\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)","i");return r.test(e)?e.replace(o,"$1\n\n"+n+"\n$4"):""+e+(""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n")+"# "+t+"\n\n"+n}var d=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!t.length)return e;var r=t.shift();return void 0===r?e:(h(e)&&h(r)&&Object.keys(r).forEach(function(t){h(r[t])?(e[t]||(e[t]={}),d(e[t],r[t])):e[t]=r[t]}),d.apply(void 0,[e].concat(t)))},h=function(e){return function(e){return null!==e&&"object"==typeof e}(e)&&!Array.isArray(e)};function m(e){return i()(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/\--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function g(e,t){var n;if(t.startsWith("//"))n=""+Object(a.parse)(e).protocol+t;else if(function(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}(t))n=t;else if(t.startsWith("/")){var o=Object(a.parse)(e);n=Object(a.format)(r.a({},o,{pathname:t}))}else n=u(e)+"/"+t;return u(n)}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(192)},function(e,t,n){"use strict";var r=n(268);function o(e,t,n){if(3===arguments.length)return o.set(e,t,n);if(2===arguments.length)return o.get(e,t);var r=o.bind(o,e);for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i].bind(r,e));return r}e.exports=o,o.get=function(e,t){for(var n=Array.isArray(t)?t:o.parse(t),r=0;r<n.length;++r){var i=n[r];if(!("object"==typeof e&&i in e))throw new Error("Invalid reference token: "+i);e=e[i]}return e},o.set=function(e,t,n){for(var r=Array.isArray(t)?t:o.parse(t),i=r[0],a=0;a<r.length-1;++a){var s=r[a];"-"===s&&Array.isArray(e)&&(s=e.length),i=r[a+1],s in e||(i.match(/^(\d+|-)$/)?e[s]=[]:e[s]={}),e=e[s]}return"-"===i&&Array.isArray(e)&&(i=e.length),e[i]=n,this},o.remove=function(e,t){var n=Array.isArray(t)?t:o.parse(t),r=n[n.length-1];if(void 0===r)throw new Error('Invalid JSON pointer for remove: "'+t+'"');var i=o.get(e,n.slice(0,-1));if(Array.isArray(i)){var a=+r;if(""===r&&isNaN(a))throw new Error('Invalid array index: "'+r+'"');Array.prototype.splice.call(i,a,1)}else delete i[r]},o.dict=function(e,t){var n={};return o.walk(e,function(e,t){n[t]=e},t),n},o.walk=function(e,t,n){var i=[];n=n||function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t},function e(a){r(a,function(r,a){i.push(String(a)),n(r)?e(r):t(r,o.compile(i)),i.pop()})}(e)},o.has=function(e,t){try{o.get(e,t)}catch(e){return!1}return!0},o.escape=function(e){return e.toString().replace(/~/g,"~0").replace(/\//g,"~1")},o.unescape=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},o.parse=function(e){if(""===e)return[];if("/"!==e.charAt(0))throw new Error("Invalid JSON pointer: "+e);return e.substring(1).split(/\//).map(o.unescape)},o.compile=function(e){return 0===e.length?"":"/"+e.map(o.escape).join("/")}},function(e,t,n){var r=n(18),o=n(91),i=n(68),a=Object.defineProperty;t.f=n(23)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(35)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(9),o=n(12),i=n(29),a=n(28),s=n(31),l=function(e,t,n){var c,u,p,f,d=e&l.F,h=e&l.G,m=e&l.S,g=e&l.P,v=e&l.B,y=h?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?oLine truncated
|
||||||
/*!***************************************************
|
/*!***************************************************
|
||||||
* mark.js v8.11.1
|
* mark.js v8.11.1
|
||||||
* https://markjs.io/
|
* https://markjs.io/
|
||||||
* Copyright (c) 2014–2018, Julian Kühnel
|
* Copyright (c) 2014–2018, Julian Kühnel
|
||||||
* Released under the MIT license https://git.io/vwTVl
|
* Released under the MIT license https://git.io/vwTVl
|
||||||
*****************************************************/
|
*****************************************************/
|
||||||
e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(n){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=o,this.iframesTimeout=i}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(t){var n=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||n||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var o=e.contentWindow;if(r=o.document,!o||!r)throw new Error("iframe inaccessible")}catch(e){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim(),r=e.contentWindow.location.href;return r===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,o=!1,i=null,a=function a(){if(!o){o=!0,clearTimeout(i);try{r.isIframeBlank(e)||(e.removeEventListener("load",a),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",a),i=setTimeout(a,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,function(){return!0},function(e){r++,n.waitForIframes(e.querySelector("html"),function(){--r||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=t.querySelectorAll("iframe"),s=a.length,l=0;a=Array.prototype.slice.call(a);var c=function(){--s<=0&&i(l)};s||c(),a.forEach(function(t){e.matches(t,o.exclude)?c():o.onIframeReady(t,function(e){n(t)&&(l++,r(e)),c()},c)})}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){var r=e.compareDocumentPosition(n),o=Node.DOCUMENT_POSITION_PRECEDING;if(r&o){if(null===t)return!0;var i=t.compareDocumentPosition(n),a=Node.DOCUMENT_POSITION_FOLLOWING;if(i&a)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode(),n=void 0;return n=null===t?e.nextNode():e.nextNode()&&e.nextNode(),{prevNode:t,node:n}}},{key:"checkIframeFilter",value:function(e,t,n,r){var o=!1,i=!1;return r.forEach(function(e,t){e.val===n&&(o=t,i=e.handled)}),this.compareNodeIframe(e,t,n)?(!1!==o||i?!1===o||i||(r[o].handled=!0):r.push({val:n,handled:!0}),!0):(!1===o&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var o=this;e.forEach(function(e){e.handled||o.getIframeContents(e.val,function(e){o.createInstanceOnIframe(e).forEachNode(t,n,r)})})}},{key:"iterateThroughNodes",value:function(e,t,n,r,o){for(var i=this,a=this.createIterator(t,e,r),s=[],l=[],c=void 0,u=void 0,p=function(){var e=i.getIteratorNode(a);return u=e.prevNode,c=e.node};p();)this.iframes&&this.forEachIframe(t,function(e){return i.checkIframeFilter(c,u,e,s)},function(t){i.createInstanceOnIframe(t).forEachNode(e,function(e){return l.push(e)},r)}),l.push(c);l.forEach(function(e){n(e)}),this.iframes&&this.handleOpenIframes(s,e,n,r),o()}},{key:"forEachNode",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=this.getContexts(),a=i.length;a||o(),i.forEach(function(i){var s=function(){r.iterateThroughNodes(e,i,t,n,function(){--a<=0&&o()})};r.iframes?r.waitForIframes(i,s):s()})}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var o=!1;return n.every(function(t){return!r.call(e,t)||(o=!0,!1)}),o}return!1}}]),e}(),i=function(){functLine truncated
|
e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(n){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=o,this.iframesTimeout=i}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(t){var n=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||n||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var o=e.contentWindow;if(r=o.document,!o||!r)throw new Error("iframe inaccessible")}catch(e){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim(),r=e.contentWindow.location.href;return r===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,o=!1,i=null,a=function a(){if(!o){o=!0,clearTimeout(i);try{r.isIframeBlank(e)||(e.removeEventListener("load",a),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",a),i=setTimeout(a,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,function(){return!0},function(e){r++,n.waitForIframes(e.querySelector("html"),function(){--r||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=t.querySelectorAll("iframe"),s=a.length,l=0;a=Array.prototype.slice.call(a);var c=function(){--s<=0&&i(l)};s||c(),a.forEach(function(t){e.matches(t,o.exclude)?c():o.onIframeReady(t,function(e){n(t)&&(l++,r(e)),c()},c)})}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){var r=e.compareDocumentPosition(n),o=Node.DOCUMENT_POSITION_PRECEDING;if(r&o){if(null===t)return!0;var i=t.compareDocumentPosition(n),a=Node.DOCUMENT_POSITION_FOLLOWING;if(i&a)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode(),n=void 0;return n=null===t?e.nextNode():e.nextNode()&&e.nextNode(),{prevNode:t,node:n}}},{key:"checkIframeFilter",value:function(e,t,n,r){var o=!1,i=!1;return r.forEach(function(e,t){e.val===n&&(o=t,i=e.handled)}),this.compareNodeIframe(e,t,n)?(!1!==o||i?!1===o||i||(r[o].handled=!0):r.push({val:n,handled:!0}),!0):(!1===o&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var o=this;e.forEach(function(e){e.handled||o.getIframeContents(e.val,function(e){o.createInstanceOnIframe(e).forEachNode(t,n,r)})})}},{key:"iterateThroughNodes",value:function(e,t,n,r,o){for(var i=this,a=this.createIterator(t,e,r),s=[],l=[],c=void 0,u=void 0,p=function(){var e=i.getIteratorNode(a);return u=e.prevNode,c=e.node};p();)this.iframes&&this.forEachIframe(t,function(e){return i.checkIframeFilter(c,u,e,s)},function(t){i.createInstanceOnIframe(t).forEachNode(e,function(e){return l.push(e)},r)}),l.push(c);l.forEach(function(e){n(e)}),this.iframes&&this.handleOpenIframes(s,e,n,r),o()}},{key:"forEachNode",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=this.getContexts(),a=i.length;a||o(),i.forEach(function(i){var s=function(){r.iterateThroughNodes(e,i,t,n,function(){--a<=0&&o()})};r.iframes?r.waitForIframes(i,s):s()})}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var o=!1;return n.every(function(t){return!r.call(e,t)||(o=!0,!1)}),o}return!1}}]),e}(),i=function(){functLine truncated
|
||||||
/*
|
/*
|
||||||
object-assign
|
object-assign
|
||||||
(c) Sindre Sorhus
|
(c) Sindre Sorhus
|
||||||
@license MIT
|
@license MIT
|
||||||
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))o.call(n,c)&&(s[c]=n[c]);if(r){a=r(n);for(var u=0;u<a.length;u++)i.call(n,a[u])&&(s[a[u]]=n[a[u]])}}return s}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(193),o=n(194),i=n(217),a=n(218),s=n(219),l=n(221);function c(e){u(this,c.defaults),u(this,e)}function u(e,t){if(p(t))for(var n=Object.keys(t),r=0;r<n.length;r++){var o=n[r],i=t[o],a=e[o];p(i)?e[o]=u(a||{},i):void 0!==i&&(e[o]=i)}return e}function p(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}e.exports=c,c.defaults={parse:{json:r,yaml:o,text:i,binary:a},resolve:{file:s,http:l,external:!0},dereference:{circular:!0}}},function(e,t,n){"use strict";var r=n(71),o=n(25);e.exports={parse:function(e,t){try{return r.safeLoad(e)}catch(e){throw e instanceof Error?e:o(e,e.message)}},stringify:function(e,t,n){try{var i=("string"==typeof n?n.length:n)||2;return r.safeDump(e,{indent:i})}catch(e){throw e instanceof Error?e:o(e,e.message)}}}},function(e,t,n){"use strict";var r=n(29);e.exports=new r({include:[n(104)]})},function(e,t,n){"use strict";var r=n(29);e.exports=new r({include:[n(72)],implicit:[n(201),n(202),n(203),n(204)]})},function(e,t,n){(function(e){var r=n(222),o=n(107),i=n(231),a=n(232),s=n(10),l=t;l.request=function(t,n){t="string"==typeof t?s.parse(t):i(t);var o=-1===e.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||o,l=t.hostname||t.host,c=t.port,u=t.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),t.url=(l?a+"//"+l:"")+(c?":"+c:"")+u,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var p=new r(t);return n&&p.on("response",n),p},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=r,l.IncomingMessage=o.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(4))},function(e,t,n){(function(e){t.fetch=s(e.fetch)&&s(e.ReadableStream),t.writableStream=s(e.WritableStream),t.abortController=s(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var n;function r(){if(void 0!==n)return n;if(e.XMLHttpRequest){n=new e.XMLHttpRequest;try{n.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var i=void 0!==e.ArrayBuffer,a=i&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}t.arraybuffer=t.fetch||i&&o("arraybuffer"),t.msstream=!t.fetch&&a&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&s(r().overrideMimeType),t.vbArray=s(e.VBArray),n=null}).call(this,n(4))},function(e,t,n){(function(e,r,o){var i=n(106),a=n(20),s=n(108),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(t,n,a,l){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){e.nextTick(function(){c.emit("close")})}),"fetch"===a){if(c._fetchResponse=n,c.url=n.url,c.statusCode=n.status,c.statusMessage=n.statusText,n.headers.forEach(function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)}),i.writableStream){var u=new WritableStream({write:function(e){return new Promise(function(t,n){c._destroyed?n():c.push(new r(e))?t():c._resumeFetch=t})},close:function(){o.clearTimeout(l),c._destroyed||c.push(null)},abort:function(e){c._destroyed||c.emit("error",e)}});try{return void n.body.pipeTo(u).catch(function(e){o.clearTimeout(l),c._destroyed||c.emit("error",e)})}catch(e){}}var p=n.body.getReader();!function e(){p.read().then(function(t){if(!c._destroyed){if(t.done)return o.clearTimeout(l),void c.push(null);c.push(new r(t.value)),e()}}).catch(function(e){o.clearTimeout(l),c._destroyed||c.emit("error",e)})}()}eLine truncated
|
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))o.call(n,c)&&(s[c]=n[c]);if(r){a=r(n);for(var u=0;u<a.length;u++)i.call(n,a[u])&&(s[a[u]]=n[a[u]])}}return s}},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,i,a,s,l){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,i,a,s,l],p=0;(c=new Error(t.replace(/%s/g,function(){return u[p++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(212),o=n(213),i=n(236),a=n(237),s=n(238),l=n(243);function c(e){u(this,c.defaults),u(this,e)}function u(e,t){if(p(t))for(var n=Object.keys(t),r=0;r<n.length;r++){var o=n[r],i=t[o],a=e[o];p(i)?e[o]=u(a||{},i):void 0!==i&&(e[o]=i)}return e}function p(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}e.exports=c,c.defaults={parse:{json:r,yaml:o,text:i,binary:a},resolve:{file:s,http:l,external:!0},dereference:{circular:!0}}},function(e,t,n){"use strict";var r=n(81),o=n(32);e.exports={parse:function(e,t){try{return r.safeLoad(e)}catch(e){throw e instanceof Error?e:o(e,e.message)}},stringify:function(e,t,n){try{var i=("string"==typeof n?n.length:n)||2;return r.safeDump(e,{indent:i})}catch(e){throw e instanceof Error?e:o(e,e.message)}}}},function(e,t,n){"use strict";var r=n(37);e.exports=new r({include:[n(117)]})},function(e,t,n){"use strict";var r=n(37);e.exports=new r({include:[n(82)],implicit:[n(220),n(221),n(222),n(223)]})},function(e,t,n){(function(e){var r=n(244),o=n(120),i=n(253),a=n(254),s=n(15),l=t;l.request=function(t,n){t="string"==typeof t?s.parse(t):i(t);var o=-1===e.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||o,l=t.hostname||t.host,c=t.port,u=t.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),t.url=(l?a+"//"+l:"")+(c?":"+c:"")+u,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var p=new r(t);return n&&p.on("response",n),p},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=r,l.IncomingMessage=o.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(8))},function(e,t,n){(function(e){t.fetch=s(e.fetch)&&s(e.ReadableStream),t.writableStream=s(e.WritableStream),t.abortController=s(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var n;function r(){if(void 0!==n)return n;if(e.XMLHttpRequest){n=new e.XMLHttpRequest;try{n.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var i=void 0!==e.ArrayBuffer,a=i&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}t.arraybuffer=t.fetch||i&&o("arraybuffer"),t.msstream=!t.fetch&&a&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&s(r().overrideMimeType),t.vbArray=s(e.VBArray),n=null}).call(this,n(8))},function(e,t,n){(function(e,r,o){var i=n(119),a=n(26),s=n(121),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(t,n,a,l){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){e.nextTick(function(){c.emit("close")})}),"fetch"===a){if(c._fetchResponse=n,c.url=n.url,c.statusCode=n.status,c.statusMessage=Line truncated
|
||||||
/** @license React v16.5.2
|
/** @license React v16.4.2
|
||||||
* react.production.min.js
|
* react.production.min.js
|
||||||
*
|
*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/var r=n(99),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,u=o?Symbol.for("react.provider"):60109,p=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.async_mode"):60111,d=o?Symbol.for("react.forward_ref"):60112;o&&Symbol.for("react.placeholder");var h="function"==typeof Symbol&&Symbol.iterator;function m(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,o,i,a,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,s],c=0;(e=Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y={};function v(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||g}function b(){}function w(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&m("85"),this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=v.prototype;var x=w.prototype=new b;x.constructor=w,r(x,v.prototype),x.isPureReactComponent=!0;var k={current:null,currentDispatcher:null},E=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,n){var r=void 0,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)E.call(t,r)&&!S.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:k.current}}function O(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var C=/\/+/g,T=[];function A(e,t,n,r){if(T.length){var o=T.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function I(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>T.length&&T.push(e)}function P(e,t,n){return null==e?0:function e(t,n,r,o){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case i:case a:l=!0}}if(l)return r(o,t,""===n?"."+R(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=n+R(s=t[c],c);l+=e(s,u,r,o)}else if(u=null===t||"object"!=typeof t?null:"function"==typeof(u=h&&t[h]||t["@@iterator"])?u:null,"function"==typeof u)for(t=u.call(t),c=0;!(s=t.next()).done;)l+=e(s=s.value,u=n+R(s,c++),r,o);else"object"===s&&m("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return l}(e,"",t,n)}function R(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function j(e,t){e.func.call(e.context,t,e.count++)}function N(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?L(e,r,n,function(e){return e}):null!=e&&(O(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(C,"$&/")+"/")+n)),r.push(e))}function L(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(C,"$&/")+"/"),P(e,N,t=A(t,i,r,o)),I(t)}var M={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return L(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;P(e,j,t=A(null,null,t,n)),I(t)},count:function(e){return P(e,function(){return null},null)},toArray:function(e){var t=[];return L(e,t,null,function(e){return e}),t},only:function(e){return O(e)||m("143"),e}},createRef:function(){return{current:null}},Component:v,PureComponent:w,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:p,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,Provider:null,Consumer:null,unstable_read:null}).Provider={$$typeof:u,_context:e},e.Consumer=e,e.unstable_read=function(e,t){var n=k.currentDispatcher;return null===n&&m("277"),n.readContext(e,t)}.bind(null,e),e},forwardRef:function(e){return{$$typeof:d,render:e}},Fragment:s,StrictMode:l,unstable_AsyncMode:f,unstable_Profiler:c,createElement:_,cloneElement:Line truncated
|
*/var r=n(109),o=n(110),i=n(111),a=n(112),s="function"==typeof Symbol&&Symbol.for,l=s?Symbol.for("react.element"):60103,c=s?Symbol.for("react.portal"):60106,u=s?Symbol.for("react.fragment"):60107,p=s?Symbol.for("react.strict_mode"):60108,f=s?Symbol.for("react.profiler"):60114,d=s?Symbol.for("react.provider"):60109,h=s?Symbol.for("react.context"):60110,m=s?Symbol.for("react.async_mode"):60111,g=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var v="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);o(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function w(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}function x(){}function k(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&y("85"),this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var E=k.prototype=new x;E.constructor=k,r(E,w.prototype),E.isPureReactComponent=!0;var _={current:null},S=Object.prototype.hasOwnProperty,O={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var r=void 0,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)S.call(t,r)&&!O.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:l,type:e,key:i,ref:a,props:o,_owner:_.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var A=/\/+/g,P=[];function I(e,t,n,r){if(P.length){var o=P.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function R(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function j(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var i=!1;if(null===e)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case l:case c:i=!0}}if(i)return n(r,e,""===t?"."+N(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var a=0;a<e.length;a++){var s=t+N(o=e[a],a);i+=j(o,s,n,r)}else if(null===e||void 0===e?s=null:s="function"==typeof(s=v&&e[v]||e["@@iterator"])?s:null,"function"==typeof s)for(e=s.call(e),a=0;!(o=e.next()).done;)i+=j(o=o.value,s=t+N(o,a++),n,r);else"object"===o&&y("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return i}function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function L(e,t){e.func.call(e.context,t,e.count++)}function M(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?D(e,r,n,a.thatReturnsArgument):null!=e&&(T(e)&&(t=o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(A,"$&/")+"/")+n,e={$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function D(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),t=I(t,i,r,o),null==e||j(e,"",M,t),R(t)}var F={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return D(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=I(null,null,t,n),null==e||j(e,"",L,t),R(t)},count:function(e){return null==e?0:j(e,"",a.thatReturnsNull,null)},toArray:function(e){var t=[];return D(e,t,null,a.thatReturnsArgument),t},only:function(e){return T(e)||y("143"),e}},createRef:function(){return{current:null}},Component:w,PureComponent:k,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_currentValue2:e,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:d,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:g,render:e}},Fragment:u,StrictMode:p,unstable_AsyncMode:m,unstable_Profiler:f,createElement:C,cloneElement:function(e,t,n){(null===e||void 0===e)&&y("267",e);var o=void 0,i=r({},e.props),a=e.key,s=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,c=_.current),void 0!==t.key&&(a=""+t.key);var u=void 0;for(o in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)S.call(t,o)&&!O.hasOwnProperty(o)&&(i[o]=void 0===t[o]&&void 0!==u?u[o]:t[o])}if(1===(o=arguments.length-2))i.children=n;else if(1<o){u=Array(o);for(var p=0;p<o;p++)u[p]=arguments[p+2];i.children=Line truncated
|
||||||
/** @license React v16.5.2
|
/** @license React v16.4.2
|
||||||
* react-dom.production.min.js
|
* react-dom.production.min.js
|
||||||
*
|
*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/var r=n(0),o=n(99),i=n(179);function a(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,o,i,a,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,s],c=0;(e=Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}r||a("227");var s=!1,l=null,c=!1,u=null,p={onError:function(e){s=!0,l=e}};function f(e,t,n,r,o,i,a,c,u){s=!1,l=null,function(e,t,n,r,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}.apply(p,arguments)}var d=null,h={};function m(){if(d)for(var e in h){var t=h[e],n=d.indexOf(e);if(-1<n||a("96",e),!y[n])for(var r in t.extractEvents||a("97",e),y[n]=t,n=t.eventTypes){var o=void 0,i=n[r],s=t,l=r;v.hasOwnProperty(l)&&a("99",l),v[l]=i;var c=i.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&g(c[o],s,l);o=!0}else i.registrationName?(g(i.registrationName,s,l),o=!0):o=!1;o||a("98",r,e)}}}function g(e,t,n){b[e]&&a("100",e),b[e]=t,w[e]=t.eventTypes[n].dependencies}var y=[],v={},b={},w={},x=null,k=null,E=null;function S(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=E(r),function(e,t,n,r,o,i,p,d,h){if(f.apply(this,arguments),s){if(s){var m=l;s=!1,l=null}else a("198"),m=void 0;c||(c=!0,u=m)}}(t,n,void 0,e),e.currentTarget=null}function _(e,t){return null==t&&a("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function O(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var C=null;function T(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)S(e,t,n[o],r[o]);else n&&S(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function A(e){return T(e,!0)}function I(e){return T(e,!1)}var P={injectEventPluginOrder:function(e){d&&a("101"),d=Array.prototype.slice.call(e),m()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];h.hasOwnProperty(t)&&h[t]===r||(h[t]&&a("102",t),h[t]=r,n=!0)}n&&m()}};function R(e,t){var n=e.stateNode;if(!n)return null;var r=x(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&a("231",t,typeof n),n)}function j(e,t){if(null!==e&&(C=_(C,e)),e=C,C=null,e&&(O(e,t?A:I),C&&a("95"),c))throw t=u,c=!1,u=null,t}var N=Math.random().toString(36).slice(2),L="__reactInternalInstance$"+N,M="__reactEventHandlers$"+N;function D(e){if(e[L])return e[L];for(;!e[L];){if(!e.parentNode)return null;e=e.parentNode}return 7===(e=e[L]).tag||8===e.tag?e:null}function F(e){return!(e=e[L])||7!==e.tag&&8!==e.tag?null:e}function U(e){if(7===e.tag||8===e.tag)return e.stateNode;a("33")}function B(e){return e[M]||null}function z(e){do{e=e.return}while(e&&7!==e.tag);return e||null}function $(e,t,n){(t=R(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=_(n._dispatchListeners,t),n._dispatchInstances=_(n._dispatchInstances,e))}function q(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=z(t);for(t=n.length;0<t--;)$(n[t],"captured",e);for(t=0;t<n.length;t++)$(n[t],"bubbled",e)}}function W(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=R(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=_(n._dispatchListeners,t),n._dispatchInstances=_(n._dispatchInstances,e))}function H(e){e&&e.dispatchConfig.registrationName&&W(e._targetInst,null,e)}function Y(e){O(e,q)}var V=!("undefined"==typeof window||!window.document||!window.document.createElement);function Q(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var X={animationend:Q("Animation","AnimationEnd"),animationiteration:Q("Animation","AnimationIteration"),animationstart:Q("Animation","AnimationStart"),transitionend:Q("Transition","TransitionEnd")},G={},K={};function J(e){if(G[e])return G[e];if(!X[e])return e;var t,n=X[e];for(t in n)if(n.hasOwnProperty(t)&&t in K)return G[e]=n[t];return e}V&&(K=document.createElement("div").style,"AnimationEvent"in window||(delete X.animationend.animation,delete X.animationiteration.animation,delete X.animationstart.animation),"TransitionEvent"in window||delete X.transitionend.transition);var Z=J("animLine truncated
|
*/var r=n(110),o=n(0),i=n(193),a=n(109),s=n(112),l=n(194),c=n(195),u=n(196),p=n(111);function f(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=0;o<t;o++)n+="&args[]="+encodeURIComponent(arguments[o+1]);r(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}o||f("227");var d={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,o,i,a,s,l){(function(e,t,n,r,o,i,a,s,l){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this._caughtError=e,this._hasCaughtError=!0}}).apply(d,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,a,s,l){if(d.invokeGuardedCallback.apply(this,arguments),d.hasCaughtError()){var c=d.clearCaughtError();d._hasRethrowError||(d._hasRethrowError=!0,d._rethrowError=c)}},rethrowCaughtError:function(){return function(){if(d._hasRethrowError){var e=d._rethrowError;throw d._rethrowError=null,d._hasRethrowError=!1,e}}.apply(d,arguments)},hasCaughtError:function(){return d._hasCaughtError},clearCaughtError:function(){if(d._hasCaughtError){var e=d._caughtError;return d._caughtError=null,d._hasCaughtError=!1,e}f("198")}};var h=null,m={};function g(){if(h)for(var e in m){var t=m[e],n=h.indexOf(e);if(-1<n||f("96",e),!y[n])for(var r in t.extractEvents||f("97",e),y[n]=t,n=t.eventTypes){var o=void 0,i=n[r],a=t,s=r;b.hasOwnProperty(s)&&f("99",s),b[s]=i;var l=i.phasedRegistrationNames;if(l){for(o in l)l.hasOwnProperty(o)&&v(l[o],a,s);o=!0}else i.registrationName?(v(i.registrationName,a,s),o=!0):o=!1;o||f("98",r,e)}}}function v(e,t,n){w[e]&&f("100",e),w[e]=t,x[e]=t.eventTypes[n].dependencies}var y=[],b={},w={},x={};function k(e){h&&f("101"),h=Array.prototype.slice.call(e),g()}function E(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];m.hasOwnProperty(t)&&m[t]===r||(m[t]&&f("102",t),m[t]=r,n=!0)}n&&g()}var _={plugins:y,eventNameDispatchConfigs:b,registrationNameModules:w,registrationNameDependencies:x,possibleRegistrationNames:null,injectEventPluginOrder:k,injectEventPluginsByName:E},S=null,O=null,C=null;function T(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=C(r),d.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function A(e,t){return null==t&&f("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function P(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var I=null;function R(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)T(e,t,n[o],r[o]);else n&&T(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function j(e){return R(e,!0)}function N(e){return R(e,!1)}var L={injectEventPluginOrder:k,injectEventPluginsByName:E};function M(e,t){var n=e.stateNode;if(!n)return null;var r=S(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&f("231",t,typeof n),n)}function D(e,t){null!==e&&(I=A(I,e)),e=I,I=null,e&&(P(e,t?j:N),I&&f("95"),d.rethrowCaughtError())}function F(e,t,n,r){for(var o=null,i=0;i<y.length;i++){var a=y[i];a&&(a=a.extractEvents(e,t,n,r))&&(o=A(o,a))}D(o,!1)}var U={injection:L,getListener:M,runEventsInBatch:D,runExtractedEventsInBatch:F},B=Math.random().toString(36).slice(2),z="__reactInternalInstance$"+B,$="__reactEventHandlers$"+B;function W(e){if(e[z])return e[z];for(;!e[z];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[z]).tag||6===e.tag?e:null}function q(e){if(5===e.tag||6===e.tag)return e.stateNode;f("33")}function H(e){return e[$]||null}var Y={precacheFiberNode:function(e,t){t[z]=e},getClosestInstanceFromNode:W,getInstanceFromNode:function(e){return!(e=e[z])||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:q,getFiberCurrentPropsFromNode:H,updateFiberProps:function(e,t){e[$]=t}};function V(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Q(e,t,n){for(var r=[];e;)r.push(e),e=V(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function X(e,t,n){(t=M(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=A(n._dispatchListeners,t),n._dispatchInstances=A(n._dispatchInstances,e))}function G(e){e&&e.dispatchConfig.phasedRegistrationNames&&Q(e._targetInst,X,e)}function K(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;Q(t=t?V(t):null,X,e)}}function J(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=M(e,Line truncated
|
||||||
/** @license React v16.5.2
|
/** @license React v16.4.2
|
||||||
* schedule.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/Object.defineProperty(t,"__esModule",{value:!0});var r=null,o=!1,i=!1,a="object"==typeof performance&&"function"==typeof performance.now,s={timeRemaining:a?function(){var e=m()-performance.now();return 0<e?e:0}:function(){var e=m()-Date.now();return 0<e?e:0},didTimeout:!1};function l(){if(!o){var e=r.timesOutAt;i?h():i=!0,d(u,e)}}function c(){var e=r,t=r.next;if(r===t)r=null;else{var n=r.previous;r=n.next=t,t.previous=n}e.next=e.previous=null,(e=e.callback)(s)}function u(e){o=!0,s.didTimeout=e;try{if(e)for(;null!==r;){var n=t.unstable_now();if(!(r.timesOutAt<=n))break;do{c()}while(null!==r&&r.timesOutAt<=n)}else if(null!==r)do{c()}while(null!==r&&0<m()-t.unstable_now())}finally{o=!1,null!==r?l():i=!1}}var p,f,d,h,m,g=Date,y="function"==typeof setTimeout?setTimeout:void 0,v="function"==typeof clearTimeout?clearTimeout:void 0,b="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,w="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function x(e){p=b(function(t){v(f),e(t)}),f=y(function(){w(p),e(t.unstable_now())},100)}if(a){var k=performance;t.unstable_now=function(){return k.now()}}else t.unstable_now=function(){return g.now()};if("undefined"==typeof window){var E=-1;d=function(e){E=setTimeout(e,0,!0)},h=function(){clearTimeout(E)},m=function(){return 0}}else if(window._schedMock){var S=window._schedMock;d=S[0],h=S[1],m=S[2]}else{"undefined"!=typeof console&&("function"!=typeof b&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof w&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var _=null,O=!1,C=-1,T=!1,A=!1,I=0,P=33,R=33;m=function(){return I};var j="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===j){O=!1;var n=t.unstable_now();if(e=!1,0>=I-n){if(!(-1!==C&&C<=n))return void(T||(T=!0,x(N)));e=!0}if(C=-1,n=_,_=null,null!==n){A=!0;try{n(e)}finally{A=!1}}}},!1);var N=function(e){T=!1;var t=e-I+R;t<R&&P<R?(8>t&&(t=8),R=t<P?P:t):P=t,I=e+R,O||(O=!0,window.postMessage(j,"*"))};d=function(e,t){_=e,C=t,A?window.postMessage(j,"*"):T||(T=!0,x(N))},h=function(){_=null,O=!1,C=-1}}t.unstable_scheduleWork=function(e,n){var o=t.unstable_now();if(e={callback:e,timesOutAt:n=void 0!==n&&null!==n&&null!==n.timeout&&void 0!==n.timeout?o+n.timeout:o+5e3,next:null,previous:null},null===r)r=e.next=e.previous=e,l();else{o=null;var i=r;do{if(i.timesOutAt>n){o=i;break}i=i.next}while(i!==r);null===o?o=r:o===r&&(r=e,l()),(n=o.previous).next=o.previous=e,e.next=o,e.previous=n}return e},t.unstable_cancelScheduledWork=function(e){var t=e.next;if(null!==t){if(t===e)r=null;else{e===r&&(r=t);var n=e.previous;n.next=t,t.previous=n}e.next=e.previous=null}}},function(e,t,n){"use strict";var r=n(182);function o(){}e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){"object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,l=2147483647,c=36,u=1,p=26,f=38,d=700,h=72,m=128,g="-",y=/^xn--/,v=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=c-u,k=Math.floor,E=String.fromCharCode;function S(e){throw new RangeError(w[e])}function _(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function O(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+_((e=e.replace(b,".")).split("."),t).join(".")}function C(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function T(e){return _(e,function(e){var t="";return e>65535&&(t+=E((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=E(e)}).join("")}function A(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function I(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function P(e,t,n){var r=0;for(e=n?k(e/d):e>>1,e+=k(e/t);e>x*p>>1;r+=c)e=k(e/x);return k(r+(x+1)*e/(e+f))}function R(e){var t,n,r,o,i,a,s,f,d,y,v=[],b=e.length,w=0,x=m,E=h;for((n=e
Line truncated
|
|
||||||
/** @license React v16.5.2
|
|
||||||
* react-is.production.min.js
|
* react-is.production.min.js
|
||||||
*
|
*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.placeholder"):60113;function h(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case a:case l:case s:return e;default:switch(e=e&&e.$$typeof){case u:case f:case c:return e;default:return t}}case i:return t}}}t.typeOf=h,t.AsyncMode=p,t.ContextConsumer=u,t.ContextProvider=c,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Profiler=l,t.Portal=i,t.StrictMode=s,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===l||e===s||e===d||"object"==typeof e&&null!==e&&("function"==typeof e.then||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f)},t.isAsyncMode=function(e){return h(e)===p},t.isContextConsumer=function(e){return h(e)===u},t.isContextProvider=function(e){return h(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return h(e)===f},t.isFragment=function(e){return h(e)===a},t.isProfiler=function(e){return h(e)===l},t.isPortal=function(e){return h(e)===i},t.isStrictMode=function(e){return h(e)===s}},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=c(e),r=n[0],a=n[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),l=0,u=a>0?r-4:r,p=0;p<u;p+=4)t=o[e.charCodeAt(p)]<<18|o[e.charCodeAt(p+1)]<<12|o[e.charCodeAt(p+2)]<<6|o[e.charCodeAt(p+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;2===a&&(t=o[e.charCodeAt(p)]<<2|o[e.charCodeAt(p+1)]>>4,s[l++]=255&t);1===a&&(t=o[e.charCodeAt(p)]<<10|o[e.charCodeAt(p+1)]<<4|o[e.charCodeAt(p+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(p(e,a,a+16383>s?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function p(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<<s)-1,c=l>>1,u=-7,p=n?o-1:0,f=n?-1:1,d=e[t+p];for(p+=f,i=d&(1<<-u)-1,d>>=-u,u+=s;u>0;i=256*i+e[t+p],p+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+p],p+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=c}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,l,c=8*i-o-1,u=(1<<c)-1,p=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+p>=1?f/l:f*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=u?(s=0,a=u):a+p>=1?(s=(t*l-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+d]=255&a,d+=h,a/=256,c-=8);e[n+d-h]|=128*m}},function(e,t,n){"use strict";(function(t){e.exports={order:100,allowEmpty:!0,canParse:".json",parse:function(e){return new Promise(function(n,r){var o=e.data;t.isBuffer(o)&&(o=o.toString()),"string"==typeof o?0===o.trim().length?n(void 0):n(JSON.parse(o)):n(o)})}}}).call(this,n(9).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(102);e.exports={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],parse:function(e){return new Promise(function(n,o){var i=e.data;t.isBuffer(i)&&(i=i.toString()),n("string"==typeof i?r.parse(i):i)})}}}).call(this,n(9).Buffer)},function(e,t,n){"use strict";var r=n(196),o=n(215);function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(3),e.exports.Schema=n(29),e.exports.FAILSAFE_SCHEMA=n(72),e.exports.JSON_SCHEMA=n(104),e.exports.CORE_SCHEMA=n(103),e.exports.DEFAULT_SAFE_SCHEMA=n(47),e.exports.DEFAULT_FULL_SCHEMA=n(73),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=n(46),e.exports.MINIMAL_SCHEMA=n(72),e.exporLine truncated
|
*/Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.timeout"):60113;function h(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case a:case l:case s:return e;default:switch(e=e&&e.$$typeof){case u:case f:case c:return e;default:return t}}case i:return t}}}t.typeOf=h,t.AsyncMode=p,t.ContextConsumer=u,t.ContextProvider=c,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Profiler=l,t.Portal=i,t.StrictMode=s,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===l||e===s||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===u||e.$$typeof===f)},t.isAsyncMode=function(e){return h(e)===p},t.isContextConsumer=function(e){return h(e)===u},t.isContextProvider=function(e){return h(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return h(e)===f},t.isFragment=function(e){return h(e)===a},t.isProfiler=function(e){return h(e)===l},t.isPortal=function(e){return h(e)===i},t.isStrictMode=function(e){return h(e)===s}},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=c(e),r=n[0],a=n[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),l=0,u=a>0?r-4:r,p=0;p<u;p+=4)t=o[e.charCodeAt(p)]<<18|o[e.charCodeAt(p+1)]<<12|o[e.charCodeAt(p+2)]<<6|o[e.charCodeAt(p+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;2===a&&(t=o[e.charCodeAt(p)]<<2|o[e.charCodeAt(p+1)]>>4,s[l++]=255&t);1===a&&(t=o[e.charCodeAt(p)]<<10|o[e.charCodeAt(p+1)]<<4|o[e.charCodeAt(p+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(p(e,a,a+16383>s?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function p(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<<s)-1,c=l>>1,u=-7,p=n?o-1:0,f=n?-1:1,d=e[t+p];for(p+=f,i=d&(1<<-u)-1,d>>=-u,u+=s;u>0;i=256*i+e[t+p],p+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+p],p+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=c}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,l,c=8*i-o-1,u=(1<<c)-1,p=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+p>=1?f/l:f*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=u?(s=0,a=u):a+p>=1?(s=(t*l-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+d]=255&a,d+=h,a/=256,c-=8);e[n+d-h]|=128*m}},function(e,t,n){"use strict";(function(t){e.exports={order:100,allowEmpty:!0,canParse:".json",parse:function(e){return new Promise(function(n,r){var o=e.data;t.isBuffer(o)&&(o=o.toString()),"string"==typeof o?0===o.trim().length?n(void 0):n(JSON.parse(o)):n(o)})}}}).call(this,n(14).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(115);e.exports={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],parse:function(e){return new Promise(function(n,o){var i=e.data;t.isBuffer(i)&&(i=i.toString()),n("string"==typeof i?r.parse(i):i)})}}}).call(this,n(14).Buffer)},function(e,t,n){"use strict";var r=n(215),o=n(234);function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(7),e.exports.Schema=n(37),e.exports.FAILSAFE_SCHEMA=n(82),e.exports.JSON_SCHEMA=n(117),e.exports.CORE_SCHEMA=n(116),e.exports.DEFAULT_SAFE_SCHEMA=n(56),e.exports.DEFAULT_FULL_SCHEMA=n(83),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=n(55),e.exports.MINIMAL_SCHEMA=n(82),e.exports.SAFE_SCHEMA=n(56),e.exportLine truncated
|
||||||
/*!
|
/*!
|
||||||
* Stickyfill -- `position: sticky` polyfill
|
* Stickyfill -- `position: sticky` polyfill
|
||||||
* v. 1.1.1 | https://github.com/wilddeer/stickyfill
|
* v. 1.1.1 | https://github.com/wilddeer/stickyfill
|
||||||
@@ -89,26 +96,11 @@ object-assign
|
|||||||
*
|
*
|
||||||
* MIT License
|
* MIT License
|
||||||
*/
|
*/
|
||||||
e.exports=function(e,t){e||(e=document),t||(t=window);var n,r,o=[],i=!1,a=e.documentElement,s=function(){},l="hidden",c="visibilitychange";void 0!==e.webkitHidden&&(l="webkitHidden",c="webkitvisibilitychange"),t.getComputedStyle||d();for(var u=["","-webkit-","-moz-","-ms-"],p=document.createElement("div"),f=u.length-1;f>=0;f--){try{p.style.position=u[f]+"sticky"}catch(e){}""!=p.style.position&&d()}function d(){I=L=P=R=j=N=s}function h(e){return parseFloat(e)||0}function m(){n={top:t.pageYOffset,left:t.pageXOffset}}function g(){if(t.pageXOffset!=n.left)return m(),void P();t.pageYOffset!=n.top&&(m(),v())}function y(e){setTimeout(function(){t.pageYOffset!=n.top&&(n.top=t.pageYOffset,v())},0)}function v(){for(var e=o.length-1;e>=0;e--)b(o[e])}function b(e){if(e.inited){var t=n.top<=e.limit.start?0:n.top>=e.limit.end?2:1;e.mode!=t&&function(e,t){var n=e.node.style;switch(t){case 0:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top=e.offset.top+"px",n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 1:n.position="fixed",n.left=e.box.left+"px",n.right=e.box.right+"px",n.top=e.css.top,n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 2:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top="auto",n.bottom=0,n.width="auto",n.marginLeft=0,n.marginRight=0}e.mode=t}(e,t)}}function w(e){isNaN(parseFloat(e.computed.top))||e.isCell||(e.inited=!0,e.clone||function(e){e.clone=document.createElement("div");var t=e.node.nextSibling||e.node,n=e.clone.style;n.height=e.height+"px",n.width=e.width+"px",n.marginTop=e.computed.marginTop,n.marginBottom=e.computed.marginBottom,n.marginLeft=e.computed.marginLeft,n.marginRight=e.computed.marginRight,n.padding=n.border=n.borderSpacing=0,n.fontSize="1em",n.position="static",n.cssFloat=e.computed.cssFloat,e.node.parentNode.insertBefore(e.clone,t)}(e),"absolute"!=e.parent.computed.position&&"relative"!=e.parent.computed.position&&(e.parent.node.style.position="relative"),b(e),e.parent.height=e.parent.node.offsetHeight,e.docOffsetTop=_(e.clone))}function x(e){var t=!0;e.clone&&function(e){e.clone.parentNode.removeChild(e.clone),e.clone=void 0}(e),function(e,t){for(key in t)t.hasOwnProperty(key)&&(e[key]=t[key])}(e.node.style,e.css);for(var n=o.length-1;n>=0;n--)if(o[n].node!==e.node&&o[n].parent.node===e.parent.node){t=!1;break}t&&(e.parent.node.style.position=e.parent.css.position),e.mode=-1}function k(){for(var e=o.length-1;e>=0;e--)w(o[e])}function E(){for(var e=o.length-1;e>=0;e--)x(o[e])}function S(e){var t=getComputedStyle(e),n=e.parentNode,r=getComputedStyle(n),o=e.style.position;e.style.position="relative";var i={top:t.top,marginTop:t.marginTop,marginBottom:t.marginBottom,marginLeft:t.marginLeft,marginRight:t.marginRight,cssFloat:t.cssFloat},s={top:h(t.top),marginBottom:h(t.marginBottom),paddingLeft:h(t.paddingLeft),paddingRight:h(t.paddingRight),borderLeftWidth:h(t.borderLeftWidth),borderRightWidth:h(t.borderRightWidth)};e.style.position=o;var l={position:e.style.position,top:e.style.top,bottom:e.style.bottom,left:e.style.left,right:e.style.right,width:e.style.width,marginTop:e.style.marginTop,marginLeft:e.style.marginLeft,marginRight:e.style.marginRight},c=O(e),u=O(n),p={node:n,css:{position:n.style.position},computed:{position:r.position},numeric:{borderLeftWidth:h(r.borderLeftWidth),borderRightWidth:h(r.borderRightWidth),borderTopWidth:h(r.borderTopWidth),borderBottomWidth:h(r.borderBottomWidth)}};return{node:e,box:{left:c.win.left,right:a.clientWidth-c.win.right},offset:{top:c.win.top-u.win.top-p.numeric.borderTopWidth,left:c.win.left-u.win.left-p.numeric.borderLeftWidth,right:-c.win.right+u.win.right-p.numeric.borderRightWidth},css:l,isCell:"table-cell"==t.display,computed:i,numeric:s,width:c.win.right-c.win.left,height:c.win.bottom-c.win.top,mode:-1,inited:!1,parent:p,limit:{start:c.doc.top-s.top,end:u.doc.top+n.offsetHeight-p.numeric.borderBottomWidth-e.offsetHeight-s.top-s.marginBottom}}}function _(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}function O(e){var n=e.getBoundingClientRect();return{doc:{top:n.top+t.pageYOffset,left:n.left+t.pageXOffset},win:n}}function C(){r=setInterval(function(){!function(){for(var e=o.length-1;e>=0;e--)if(o[e].inited){var t=Math.abs(_(o[e].clone)-o[e].docOffsetTop),n=Math.abs(o[e].parent.node.offsetHeight-o[e].parent.height);if(t>=2||n>=2)return!1}return!0}()&&P()},500)}function T(){clearInterval(r)}function A(){i&&(document[l]?T():C())}function I(){i||(m(),k(),t.addEventListener("scroll",g),t.addEventListener("wheel",y),t.addEventListener("resize",P),t.addEventListener("orientationchange",P),e.addEventListener(c,A),C(),i=!0)}function P(){if(i){E();for(var e=o.length-1;e>=0;e--)o[e]=S(o[e].node);k()}}function R(){t.removeEventListener("scroll",g),t.removeEventListener("wheel",y),t.removeEventListener("resize",P),t.removeEventListener("orientationchange",P),e.removeEventListener(c,A),T(),i=!1}functiLine truncated
|
e.exports=function(e,t){e||(e=document),t||(t=window);var n,r,o=[],i=!1,a=e.documentElement,s=function(){},l="hidden",c="visibilitychange";void 0!==e.webkitHidden&&(l="webkitHidden",c="webkitvisibilitychange"),t.getComputedStyle||d();for(var u=["","-webkit-","-moz-","-ms-"],p=document.createElement("div"),f=u.length-1;f>=0;f--){try{p.style.position=u[f]+"sticky"}catch(e){}""!=p.style.position&&d()}function d(){P=L=I=R=j=N=s}function h(e){return parseFloat(e)||0}function m(){n={top:t.pageYOffset,left:t.pageXOffset}}function g(){if(t.pageXOffset!=n.left)return m(),void I();t.pageYOffset!=n.top&&(m(),y())}function v(e){setTimeout(function(){t.pageYOffset!=n.top&&(n.top=t.pageYOffset,y())},0)}function y(){for(var e=o.length-1;e>=0;e--)b(o[e])}function b(e){if(e.inited){var t=n.top<=e.limit.start?0:n.top>=e.limit.end?2:1;e.mode!=t&&function(e,t){var n=e.node.style;switch(t){case 0:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top=e.offset.top+"px",n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 1:n.position="fixed",n.left=e.box.left+"px",n.right=e.box.right+"px",n.top=e.css.top,n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 2:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top="auto",n.bottom=0,n.width="auto",n.marginLeft=0,n.marginRight=0}e.mode=t}(e,t)}}function w(e){isNaN(parseFloat(e.computed.top))||e.isCell||(e.inited=!0,e.clone||function(e){e.clone=document.createElement("div");var t=e.node.nextSibling||e.node,n=e.clone.style;n.height=e.height+"px",n.width=e.width+"px",n.marginTop=e.computed.marginTop,n.marginBottom=e.computed.marginBottom,n.marginLeft=e.computed.marginLeft,n.marginRight=e.computed.marginRight,n.padding=n.border=n.borderSpacing=0,n.fontSize="1em",n.position="static",n.cssFloat=e.computed.cssFloat,e.node.parentNode.insertBefore(e.clone,t)}(e),"absolute"!=e.parent.computed.position&&"relative"!=e.parent.computed.position&&(e.parent.node.style.position="relative"),b(e),e.parent.height=e.parent.node.offsetHeight,e.docOffsetTop=S(e.clone))}function x(e){var t=!0;e.clone&&function(e){e.clone.parentNode.removeChild(e.clone),e.clone=void 0}(e),function(e,t){for(key in t)t.hasOwnProperty(key)&&(e[key]=t[key])}(e.node.style,e.css);for(var n=o.length-1;n>=0;n--)if(o[n].node!==e.node&&o[n].parent.node===e.parent.node){t=!1;break}t&&(e.parent.node.style.position=e.parent.css.position),e.mode=-1}function k(){for(var e=o.length-1;e>=0;e--)w(o[e])}function E(){for(var e=o.length-1;e>=0;e--)x(o[e])}function _(e){var t=getComputedStyle(e),n=e.parentNode,r=getComputedStyle(n),o=e.style.position;e.style.position="relative";var i={top:t.top,marginTop:t.marginTop,marginBottom:t.marginBottom,marginLeft:t.marginLeft,marginRight:t.marginRight,cssFloat:t.cssFloat},s={top:h(t.top),marginBottom:h(t.marginBottom),paddingLeft:h(t.paddingLeft),paddingRight:h(t.paddingRight),borderLeftWidth:h(t.borderLeftWidth),borderRightWidth:h(t.borderRightWidth)};e.style.position=o;var l={position:e.style.position,top:e.style.top,bottom:e.style.bottom,left:e.style.left,right:e.style.right,width:e.style.width,marginTop:e.style.marginTop,marginLeft:e.style.marginLeft,marginRight:e.style.marginRight},c=O(e),u=O(n),p={node:n,css:{position:n.style.position},computed:{position:r.position},numeric:{borderLeftWidth:h(r.borderLeftWidth),borderRightWidth:h(r.borderRightWidth),borderTopWidth:h(r.borderTopWidth),borderBottomWidth:h(r.borderBottomWidth)}};return{node:e,box:{left:c.win.left,right:a.clientWidth-c.win.right},offset:{top:c.win.top-u.win.top-p.numeric.borderTopWidth,left:c.win.left-u.win.left-p.numeric.borderLeftWidth,right:-c.win.right+u.win.right-p.numeric.borderRightWidth},css:l,isCell:"table-cell"==t.display,computed:i,numeric:s,width:c.win.right-c.win.left,height:c.win.bottom-c.win.top,mode:-1,inited:!1,parent:p,limit:{start:c.doc.top-s.top,end:u.doc.top+n.offsetHeight-p.numeric.borderBottomWidth-e.offsetHeight-s.top-s.marginBottom}}}function S(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}function O(e){var n=e.getBoundingClientRect();return{doc:{top:n.top+t.pageYOffset,left:n.left+t.pageXOffset},win:n}}function C(){r=setInterval(function(){!function(){for(var e=o.length-1;e>=0;e--)if(o[e].inited){var t=Math.abs(S(o[e].clone)-o[e].docOffsetTop),n=Math.abs(o[e].parent.node.offsetHeight-o[e].parent.height);if(t>=2||n>=2)return!1}return!0}()&&I()},500)}function T(){clearInterval(r)}function A(){i&&(document[l]?T():C())}function P(){i||(m(),k(),t.addEventListener("scroll",g),t.addEventListener("wheel",v),t.addEventListener("resize",I),t.addEventListener("orientationchange",I),e.addEventListener(c,A),C(),i=!0)}function I(){if(i){E();for(var e=o.length-1;e>=0;e--)o[e]=_(o[e].node);k()}}function R(){t.removeEventListener("scroll",g),t.removeEventListener("wheel",v),t.removeEventListener("resize",I),t.removeEventListener("orientationchange",I),e.removeEventListener(c,A),T(),i=!1}functiLine truncated
|
||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
||||||
this file except in compliance with the License. You may obtain a copy of the
|
|
||||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
||||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
||||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
See the Apache Version 2.0 License for specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
***************************************************************************** */
|
|
||||||
var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}l((r=r.apply(e,t||[])).next())})}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function u(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var p=n(0),f=n.n(p),d=n(13),h=n(11);function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function g(e){return Math.round(255*e)}function y(e,t,n){return g(e)+","+g(t)+","+g(n)}function v(e,t,n,r){if(void 0===r&&(r=y),0===t)return r(n,n,n);var o=e%360/60,i=(1-Math.abs(2*n-1))*t,a=i*(1-Math.abs(o%2-1)),s=0,l=0,c=0;o>=0&&o<1?(s=i,l=a):o>=1&&o<2?(s=a,l=i):o>=2&&o<3?(l=i,c=a):o>=3&&o<4?(l=a,c=i):o>=4&&o<5?(s=a,c=i):o>=5&&o<6&&(s=i,c=a);var u=n-i/2;return r(s+u,l+u,c+u)}var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:Line truncated
|
|
||||||
/*!
|
/*!
|
||||||
* perfect-scrollbar v1.4.0
|
* perfect-scrollbar v1.4.0
|
||||||
* (c) 2018 Hyunje Jun
|
* (c) 2018 Hyunje Jun
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
function pr(e){return getComputedStyle(e)}function fr(e,t){for(var n in t){var r=t[n];"number"==typeof r&&(r+="px"),e.style[n]=r}return e}function dr(e){var t=document.createElement("div");return t.className=e,t}var hr="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function mr(e,t){if(!hr)throw new Error("No element matching method supported");return hr.call(e,t)}function gr(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function yr(e,t){return Array.prototype.filter.call(e.children,function(e){return mr(e,t)})}var vr={main:"ps",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},br={x:null,y:null};function wr(e,t){var n=e.element.classList,r=vr.state.scrolling(t);n.contains(r)?clearTimeout(br[t]):n.add(r)}function xr(e,t){br[t]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(vr.state.scrolling(t))},e.settings.scrollingThreshold)}var kr=function(e){this.element=e,this.handlers={}},Er={isEmpty:{configurable:!0}};kr.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},kr.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter(function(r){return!(!t||r===t)||(n.element.removeEventListener(e,r,!1),!1)})},kr.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},Er.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(t){return 0===e.handlers[t].length})},Object.defineProperties(kr.prototype,Er);var Sr=function(){this.eventElements=[]};function _r(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}Sr.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return t||(t=new kr(e),this.eventElements.push(t)),t},Sr.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},Sr.prototype.unbind=function(e,t,n){var r=this.eventElement(e);r.unbind(t,n),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},Sr.prototype.unbindAll=function(){this.eventElements.forEach(function(e){return e.unbindAll()}),this.eventElements=[]},Sr.prototype.once=function(e,t,n){var r=this.eventElement(e),o=function(e){r.unbind(t,o),n(e)};r.bind(t,o)};var Or=function(e,t,n,r,o){var i;if(void 0===r&&(r=!0),void 0===o&&(o=!1),"top"===t)i=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");i=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,r,o){var i=n[0],a=n[1],s=n[2],l=n[3],c=n[4],u=n[5];void 0===r&&(r=!0);void 0===o&&(o=!1);var p=e.element;e.reach[l]=null,p[s]<1&&(e.reach[l]="start");p[s]>e[i]-e[a]-1&&(e.reach[l]="end");t&&(p.dispatchEvent(_r("ps-scroll-"+l)),t<0?p.dispatchEvent(_r("ps-scroll-"+c)):t>0&&p.dispatchEvent(_r("ps-scroll-"+u)),r&&function(e,t){wr(e,t),xr(e,t)}(e,l));e.reach[l]&&(t||o)&&p.dispatchEvent(_r("ps-"+l+"-reach-"+e.reach[l]))}(e,n,i,r,o)};function Cr(e){return parseInt(e,10)||0}var Tr={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},Ar=function(e){var t=e.element,n=Math.floor(t.scrollTop);e.containerWidth=t.clientWidth,e.containerHeight=t.clientHeight,e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(yr(t,vr.element.rail("x")).forEach(function(e){return gr(e)}),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(yr(t,vr.element.rail("y")).forEach(function(e){return gr(e)}),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=Ir(e,Cr(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=Cr((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=Ir(e,Cr(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTLine truncated
|
function kn(e){return getComputedStyle(e)}function En(e,t){for(var n in t){var r=t[n];"number"==typeof r&&(r+="px"),e.style[n]=r}return e}function _n(e){var t=document.createElement("div");return t.className=e,t}var Sn="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function On(e,t){if(!Sn)throw new Error("No element matching method supported");return Sn.call(e,t)}function Cn(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function Tn(e,t){return Array.prototype.filter.call(e.children,function(e){return On(e,t)})}var An={main:"ps",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},Pn={x:null,y:null};function In(e,t){var n=e.element.classList,r=An.state.scrolling(t);n.contains(r)?clearTimeout(Pn[t]):n.add(r)}function Rn(e,t){Pn[t]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(An.state.scrolling(t))},e.settings.scrollingThreshold)}var jn=function(e){this.element=e,this.handlers={}},Nn={isEmpty:{configurable:!0}};jn.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},jn.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter(function(r){return!(!t||r===t)||(n.element.removeEventListener(e,r,!1),!1)})},jn.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},Nn.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(t){return 0===e.handlers[t].length})},Object.defineProperties(jn.prototype,Nn);var Ln=function(){this.eventElements=[]};function Mn(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}Ln.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return t||(t=new jn(e),this.eventElements.push(t)),t},Ln.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},Ln.prototype.unbind=function(e,t,n){var r=this.eventElement(e);r.unbind(t,n),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},Ln.prototype.unbindAll=function(){this.eventElements.forEach(function(e){return e.unbindAll()}),this.eventElements=[]},Ln.prototype.once=function(e,t,n){var r=this.eventElement(e),o=function(e){r.unbind(t,o),n(e)};r.bind(t,o)};var Dn=function(e,t,n,r,o){var i;if(void 0===r&&(r=!0),void 0===o&&(o=!1),"top"===t)i=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");i=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,r,o){var i=n[0],a=n[1],s=n[2],l=n[3],c=n[4],u=n[5];void 0===r&&(r=!0);void 0===o&&(o=!1);var p=e.element;e.reach[l]=null,p[s]<1&&(e.reach[l]="start");p[s]>e[i]-e[a]-1&&(e.reach[l]="end");t&&(p.dispatchEvent(Mn("ps-scroll-"+l)),t<0?p.dispatchEvent(Mn("ps-scroll-"+c)):t>0&&p.dispatchEvent(Mn("ps-scroll-"+u)),r&&function(e,t){In(e,t),Rn(e,t)}(e,l));e.reach[l]&&(t||o)&&p.dispatchEvent(Mn("ps-"+l+"-reach-"+e.reach[l]))}(e,n,i,r,o)};function Fn(e){return parseInt(e,10)||0}var Un={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},Bn=function(e){var t=e.element,n=Math.floor(t.scrollTop);e.containerWidth=t.clientWidth,e.containerHeight=t.clientHeight,e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(Tn(t,An.element.rail("x")).forEach(function(e){return Cn(e)}),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(Tn(t,An.element.rail("y")).forEach(function(e){return Cn(e)}),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=zn(e,Fn(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=Fn((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=zn(e,Fn(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTLine truncated
|
||||||
//# sourceMappingURL=redoc.standalone.js.map
|
//# sourceMappingURL=redoc.standalone.js.map
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 445 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -1,27 +1,27 @@
|
|||||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=446)}([function(e,t,n){"use strict";e.exports=n(75)},function(e,t,n){e.exports=n(854)()},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(263),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){e.exports={default:n(767),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(45),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(769)),o=a(n(350)),i=a(n(45));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,i.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){var r;r=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:J(e)}function r(e){return u(e)?e:Y(e)}function o(e){return s(e)?e:K(e)}function i(e){return a(e)&&!l(e)?e:G(e)}function a(e){return!(!e||!e[f])}function u(e){return!(!e||!e[p])}function s(e){return!(!e||!e[d])}function l(e){return u(e)||s(e)}function c(e){return!(!e||!e[h])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=u,n.isIndexed=s,n.isAssociative=l,n.isOrdered=c,n.Keyed=r,n.Indexed=o,n.Set=i;var f="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",d="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",v=5,m=1<<v,g=m-1,y={},b={value:!1},_={value:!1};function w(e){return e.value=!1,e}function E(e){e&&(e.value=!0)}function x(){}function S(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(A)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function A(){return!0}function O(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function P(e,t){return M(e,t,0)}function T(e,t){return M(e,t,t)}function M(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var I=0,j=1,N=2,R="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",L=R||D;function U(e){this.next=e}function q(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function F(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function B(e){return e&&"function"==typeof e.next}function V(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(R&&e[R]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function J(e){return null===e||void 0===e?ie():a(e)?e.toSeq():function(e){var t=se(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function Y(e){return null===e||void 0===e?ie().toKeyedSeq():a(e)?u(e)?e.toSeq():e.fromEntrySeq():ae(e)}function K(e){return null===e||void 0===e?ie():a(e)?u(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null===e||void 0===e?ie():a(e)?u(e)?e.entrySeq():e:ue(e)).toSetSeq()}U.prototype.toString=function(){return"[Iterator]"},U.KEYS=I,U.VALUES=j,U.ENTRIES=N,U.prototype.inspect=U.prototype.toSource=function(){return this.toString()},U.prototype[L]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prLine truncated
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=445)}([function(e,t,n){"use strict";e.exports=n(75)},function(e,t,n){e.exports=n(855)()},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(262),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){e.exports={default:n(768),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(45),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(770)),o=a(n(349)),i=a(n(45));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,i.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){var r;r=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:J(e)}function r(e){return u(e)?e:Y(e)}function o(e){return s(e)?e:K(e)}function i(e){return a(e)&&!l(e)?e:G(e)}function a(e){return!(!e||!e[f])}function u(e){return!(!e||!e[p])}function s(e){return!(!e||!e[d])}function l(e){return u(e)||s(e)}function c(e){return!(!e||!e[h])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=u,n.isIndexed=s,n.isAssociative=l,n.isOrdered=c,n.Keyed=r,n.Indexed=o,n.Set=i;var f="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",d="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",v=5,m=1<<v,g=m-1,y={},b={value:!1},_={value:!1};function w(e){return e.value=!1,e}function E(e){e&&(e.value=!0)}function x(){}function S(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(A)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function A(){return!0}function O(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function P(e,t){return M(e,t,0)}function T(e,t){return M(e,t,t)}function M(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var I=0,j=1,N=2,R="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",L=R||D;function U(e){this.next=e}function q(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function F(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function B(e){return e&&"function"==typeof e.next}function V(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(R&&e[R]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function J(e){return null===e||void 0===e?ie():a(e)?e.toSeq():function(e){var t=se(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function Y(e){return null===e||void 0===e?ie().toKeyedSeq():a(e)?u(e)?e.toSeq():e.fromEntrySeq():ae(e)}function K(e){return null===e||void 0===e?ie():a(e)?u(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null===e||void 0===e?ie():a(e)?u(e)?e.entrySeq():e:ue(e)).toSetSeq()}U.prototype.toString=function(){return"[Iterator]"},U.KEYS=I,U.VALUES=j,U.ENTRIES=N,U.prototype.inspect=U.prototype.toSource=function(){return this.toString()},U.prototype[L]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=Line truncated
|
||||||
/*
|
/*
|
||||||
object-assign
|
object-assign
|
||||||
(c) Sindre Sorhus
|
(c) Sindre Sorhus
|
||||||
@license MIT
|
@license MIT
|
||||||
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,u=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var l in n=Object(arguments[s]))o.call(n,l)&&(u[l]=n[l]);if(r){a=r(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(u[a[c]]=n[a[c]])}}return u}},function(e,t,n){"use strict";var r=n(11),o=n(87),i=n(351),a=(n(8),o.ID_ATTRIBUTE_NAME),u=i,s="__reactInternalInstance$"+Math.random().toString(36).slice(2);function l(e,t){return 1===e.nodeType&&e.getAttribute(a)===String(t)||8===e.nodeType&&e.nodeValue===" react-text: "+t+" "||8===e.nodeType&&e.nodeValue===" react-empty: "+t+" "}function c(e){for(var t;t=e._renderedComponent;)e=t;return e}function f(e,t){var n=c(e);n._hostNode=t,t[s]=n}function p(e,t){if(!(e._flags&u.hasCachedChildNodes)){var n=e._renderedChildren,o=t.firstChild;e:for(var i in n)if(n.hasOwnProperty(i)){var a=n[i],s=c(a)._domID;if(0!==s){for(;null!==o;o=o.nextSibling)if(l(o,s)){f(a,o);continue e}r("32",s)}}e._flags|=u.hasCachedChildNodes}}function d(e){if(e[s])return e[s];for(var t,n,r=[];!e[s];){if(r.push(e),!e.parentNode)return null;e=e.parentNode}for(;e&&(n=e[s]);e=r.pop())t=n,r.length&&p(n,e);return t}var h={getClosestInstanceFromNode:d,getInstanceFromNode:function(e){var t=d(e);return null!=t&&t._hostNode===e?t:null},getNodeFromInstance:function(e){if(void 0===e._hostNode&&r("33"),e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent||r("34"),e=e._hostParent;for(;t.length;e=t.pop())p(e,e._hostNode);return e._hostNode},precacheChildNodes:p,precacheNode:f,uncacheNode:function(e){var t=e._hostNode;t&&(delete t[s],e._hostNode=null)}};e.exports=h},function(e,t){var n=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var r=n(107),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){a[String(t)]=e})}),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(569)),o=i(n(91));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){return function(e,t){if(Array.isArray(e))return e;if((0,r.default)(Object(e)))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var u,s=(0,o.default)(e);!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){var r=n(243)("wks"),o=n(168),i=n(33).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(163)("wks"),o=n(116),i=n(21).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(21),o=n(15),i=n(49),a=n(50),u=n(52),s=function(e,t,n){var l,c,f,p=e&s.F,d=e&s.G,h=e&s.S,v=e&s.P,m=e&s.B,g=e&s.W,y=d?o:o[t]||(o[t]={}),b=y.prototype,_=d?r:h?r[t]:(r[t]||{}).prototype;for(l in d&&(n=t),n)(c=!p&&_&&void 0!==_[l])&&u(y,l)||(f=c?_[l]:n[l],y[l]=d&&"function"!=typeof _[l]?n[l]:m&&c?i(f,r):g&&_[l]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[l]=f,e&s.R&&b&&!b[l]&&a(b,l,f)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:FunctiLine truncated
|
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,u=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var l in n=Object(arguments[s]))o.call(n,l)&&(u[l]=n[l]);if(r){a=r(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(u[a[c]]=n[a[c]])}}return u}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var r=n(10),o=n(87),i=n(350),a=(n(8),o.ID_ATTRIBUTE_NAME),u=i,s="__reactInternalInstance$"+Math.random().toString(36).slice(2);function l(e,t){return 1===e.nodeType&&e.getAttribute(a)===String(t)||8===e.nodeType&&e.nodeValue===" react-text: "+t+" "||8===e.nodeType&&e.nodeValue===" react-empty: "+t+" "}function c(e){for(var t;t=e._renderedComponent;)e=t;return e}function f(e,t){var n=c(e);n._hostNode=t,t[s]=n}function p(e,t){if(!(e._flags&u.hasCachedChildNodes)){var n=e._renderedChildren,o=t.firstChild;e:for(var i in n)if(n.hasOwnProperty(i)){var a=n[i],s=c(a)._domID;if(0!==s){for(;null!==o;o=o.nextSibling)if(l(o,s)){f(a,o);continue e}r("32",s)}}e._flags|=u.hasCachedChildNodes}}function d(e){if(e[s])return e[s];for(var t,n,r=[];!e[s];){if(r.push(e),!e.parentNode)return null;e=e.parentNode}for(;e&&(n=e[s]);e=r.pop())t=n,r.length&&p(n,e);return t}var h={getClosestInstanceFromNode:d,getInstanceFromNode:function(e){var t=d(e);return null!=t&&t._hostNode===e?t:null},getNodeFromInstance:function(e){if(void 0===e._hostNode&&r("33"),e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent||r("34"),e=e._hostParent;for(;t.length;e=t.pop())p(e,e._hostNode);return e._hostNode},precacheChildNodes:p,precacheNode:f,uncacheNode:function(e){var t=e._hostNode;t&&(delete t[s],e._hostNode=null)}};e.exports=h},function(e,t,n){"use strict";var r=n(108),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){a[String(t)]=e})}),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){var r=n(243)("wks"),o=n(168),i=n(29).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(569)),o=i(n(91));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){return function(e,t){if(Array.isArray(e))return e;if((0,r.default)(Object(e)))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var u,s=(0,o.default)(e);!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(162)("wks"),o=n(116),i=n(19).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(19),o=n(14),i=n(49),a=n(50),u=n(52),s=function(e,t,n){var l,c,f,p=e&s.F,d=e&s.G,h=e&s.S,v=e&s.P,m=e&s.B,g=e&s.W,y=d?o:o[t]||(o[t]={}),b=y.prototype,_=d?r:h?r[t]:(r[t]||{}).prototype;for(l in d&&(n=t),n)(c=!p&&_&&void 0!==_[l])&&u(y,l)||(f=c?_[l]:n[l],y[l]=d&&"function"!=typeof _[l]?n[l]:m&&c?i(f,r):g&&_[l]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[l]=f,e&s.R&&b&&!b[l]&&a(b,l,f)))};s.F=1,s.G=2,s.SLine truncated
|
||||||
/*!
|
/*!
|
||||||
* The buffer module from node.js, for the browser.
|
* The buffer module from node.js, for the browser.
|
||||||
*
|
*
|
||||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
var r=n(529),o=n(530),i=n(262);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=p(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=u(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|d(t.length);return 0===(e=u(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?u(e,0):p(e,t);if("Buffer"===t.type&&i(t.data))return p(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=u(e,t<0?0:0|d(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|d(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=n;i<u;i++)if(l(e,i)===l(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(n+s>u&&(n=u-s),i=n;i>=0;i--){for(var f=!0,p=0;p<s;p++)if(l(e,i+p)!==l(t,p)){f=!1;break}if(f)return i}return-1}function y(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var u=parseInt(t.substr(2*a,2),16);if(isNaN(u))return a;e[n+a]=u}return a}function b(e,t,n,r){return B(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return _(e,t,n,r)}function E(e,t,n,r){return B(z(t),e,n,r)}function x(e,t,n,r){return B(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,u,s,l=e[o],c=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&l)<<6|63&i)>127&&(c=s);break;case 3:i=e[o+1],a=e[o+2],128=Line truncated
|
var r=n(529),o=n(530),i=n(261);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=p(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=u(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|d(t.length);return 0===(e=u(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?u(e,0):p(e,t);if("Buffer"===t.type&&i(t.data))return p(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=u(e,t<0?0:0|d(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|d(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=n;i<u;i++)if(l(e,i)===l(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(n+s>u&&(n=u-s),i=n;i>=0;i--){for(var f=!0,p=0;p<s;p++)if(l(e,i+p)!==l(t,p)){f=!1;break}if(f)return i}return-1}function y(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var u=parseInt(t.substr(2*a,2),16);if(isNaN(u))return a;e[n+a]=u}return a}function b(e,t,n,r){return B(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return _(e,t,n,r)}function E(e,t,n,r){return B(z(t),e,n,r)}function x(e,t,n,r){return B(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,u,s,l=e[o],c=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&l)<<6|63&i)>127&&(c=s);break;case 3:i=e[o+1],a=e[o+2],128=Line truncated
|
||||||
/*!
|
/*!
|
||||||
Copyright (c) 2016 Jed Watson.
|
Copyright (c) 2017 Jed Watson.
|
||||||
Licensed under the MIT License (MIT), see
|
Licensed under the MIT License (MIT), see
|
||||||
http://jedwatson.github.io/classnames
|
http://jedwatson.github.io/classnames
|
||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
Copyright (c) 2016 Jed Watson.
|
Copyright (c) 2017 Jed Watson.
|
||||||
Licensed under the MIT License (MIT), see
|
Licensed under the MIT License (MIT), see
|
||||||
http://jedwatson.github.io/classnames
|
http://jedwatson.github.io/classnames
|
||||||
*/
|
*/
|
||||||
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}void 0!==e&&e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=!0},function(e,t,n){var r=n(161),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(59),o=n(460),i=n(461),a=Object.defineProperty;t.f=n(100)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(121);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(466),o=n(53);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=n(58),o=n(73),i=n(101),a=n(53),u=n(18);e.exports=function(e,t,n){var s=u(e),l=n(a,s,""[e]),c=l[0],f=l[1];i(function(){var t={};return t[s]=function(){return 7},7!=""[e](t)})&&(o(String.prototype,e,c),r(RegExp.prototype,s,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)}))}},function(e,t,n){var r=n(116)("meta"),o=n(28),i=n(52),a=n(40).f,u=0,s=Object.isExtensible||function(){return!0},l=!n(51)(function(){return s(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++u,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!s(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!s(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return l&&f.NEED&&s(e)&&!i(e,r)&&c(e),e}}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR_BY=t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR_BATCH=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=function(e){return{type:a,payload:(0,i.default)(e)}},t.newThrownErrBatch=function(e){return{type:u,payload:e}},t.newSpecErr=function(e){return{type:s,payload:e}},t.newSpecErrBatch=function(e){return{type:l,payload:e}},t.newAuthErr=function(e){return{type:c,payload:e}},t.clear=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:f,payload:e}},t.clearBy=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:p,payload:e}};var r,o=n(180),i=(r=o)&&r.__esModule?r:{default:r};var a=t.NEW_THROWN_ERR="err_new_thrown_err",u=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",s=t.NEW_SPEC_ERR="err_new_spec_err",l=t.NEW_SPEC_ERR_BATCH="err_new_spec_err_batch",c=t.NEW_AUTH_ERR="err_new_auth_err",f=t.CLEAR="err_clear",p=t.CLEAR_BY="err_clear_by"},function(e,t,n){var r=n(62),o=n(47),i="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&r(e)==i}},function(e,t,n){var r=n(63)(Object,"create");e.exports=r},function(e,t,n){var r=n(601),o=n(602),i=n(603),a=n(604),u=n(605);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(105);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(607);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(612),o=n(640),i=n(193),a=n(24),u=n(645);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):u(e)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=typeof e;return!!(t=null==t?n:t)&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(Line truncated
|
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var u in r)n.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}void 0!==e&&e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(160),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(60),o=n(459),i=n(460),a=Object.defineProperty;t.f=n(101)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(121);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(465),o=n(54);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=n(59),o=n(73),i=n(102),a=n(54),u=n(17);e.exports=function(e,t,n){var s=u(e),l=n(a,s,""[e]),c=l[0],f=l[1];i(function(){var t={};return t[s]=function(){return 7},7!=""[e](t)})&&(o(String.prototype,e,c),r(RegExp.prototype,s,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)}))}},function(e,t,n){var r=n(116)("meta"),o=n(28),i=n(52),a=n(39).f,u=0,s=Object.isExtensible||function(){return!0},l=!n(51)(function(){return s(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++u,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!s(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!s(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return l&&f.NEED&&s(e)&&!i(e,r)&&c(e),e}}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR_BY=t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR_BATCH=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=function(e){return{type:a,payload:(0,i.default)(e)}},t.newThrownErrBatch=function(e){return{type:u,payload:e}},t.newSpecErr=function(e){return{type:s,payload:e}},t.newSpecErrBatch=function(e){return{type:l,payload:e}},t.newAuthErr=function(e){return{type:c,payload:e}},t.clear=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:f,payload:e}},t.clearBy=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:p,payload:e}};var r,o=n(180),i=(r=o)&&r.__esModule?r:{default:r};var a=t.NEW_THROWN_ERR="err_new_thrown_err",u=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",s=t.NEW_SPEC_ERR="err_new_spec_err",l=t.NEW_SPEC_ERR_BATCH="err_new_spec_err_batch",c=t.NEW_AUTH_ERR="err_new_auth_err",f=t.CLEAR="err_clear",p=t.CLEAR_BY="err_clear_by"},function(e,t,n){var r=n(62),o=n(47),i="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&r(e)==i}},function(e,t,n){var r=n(63)(Object,"create");e.exports=r},function(e,t,n){var r=n(601),o=n(602),i=n(603),a=n(604),u=n(605);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(106);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(607);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(612),o=n(640),i=n(192),a=n(24),u=n(645);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):u(e)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=typeof e;return!!(t=null==t?n:t)&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}},fLine truncated
|
||||||
/*!
|
/*!
|
||||||
* @description Recursive object extending
|
* @description Recursive object extending
|
||||||
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
||||||
@@ -48,7 +48,7 @@ var r=n(529),o=n(530),i=n(262);function a(){return s.TYPED_ARRAY_SUPPORT?2147483
|
|||||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e,t){return"__proto__"===t?void 0:e[t]}var i=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0];return Array.prototype.slice.call(arguments,1).forEach(function(u){"object"!=typeof u||null===u||Array.isArray(u)||Object.keys(u).forEach(function(s){return t=o(a,s),(e=o(u,s))===a?void 0:"object"!=typeof e||null===e?void(a[s]=e):Array.isArray(e)?void(a[s]=function e(t){var o=[];return t.forEach(function(t,a){"object"==typeof t&&null!==t?Array.isArray(t)?o[a]=e(t):n(t)?o[a]=r(t):o[a]=i({},t):o[a]=t}),o}(e)):n(e)?void(a[s]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[s]=i({},e)):void(a[s]=i(t,e))})}),a}}).call(t,n(54).Buffer)},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e?function e(t,n){var r;r=Array.isArray(t)?[]:{};n.push(t);Object.keys(t).forEach(function(o){var i=t[o];"function"!=typeof i&&(i&&"object"==typeof i?-1!==n.indexOf(t[o])?r[o]="[Circular]":r[o]=e(t[o],n.slice(0)):r[o]=i)});"string"==typeof t.name&&(r.name=t.name);"string"==typeof t.message&&(r.message=t.message);"string"==typeof t.stack&&(r.stack=t.stack);return r}(e,[]):"function"==typeof e?"[Function: "+(e.name||"anonymous")+"]":e}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e){return null===e?"null":void 0===e?"undefined":"object"===(void 0===e?"undefined":r(e))?Array.isArray(e)?"array":"object":void 0===e?"undefined":r(e)}function i(e){return"object"===o(e)?u(e):"array"===o(e)?a(e):e}function a(e){return e.map(i)}function u(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=i(e[n]));return t}function s(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n={arrayBehaviour:(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).arrayBehaviour||"replace"},r=t.map(function(e){return e||{}}),i=e||{},l=0;l<r.length;l++)for(var c=r[l],f=Object.keys(c),p=0;p<f.length;p++){var d=f[p],h=c[d],v=o(h),m=o(i[d]);if("object"===v)if("undefined"!==m){var g="object"===m?i[d]:{};i[d]=s({},[g,u(h)],n)}else i[d]=u(h);else if("array"===v)if("array"===m){var y=a(h);i[d]="merge"===n.arrayBehaviour?i[d].concat(y):y}else i[d]=a(h);else i[d]=h}return i}e.exports=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return s(e,n)},e.exports.noMutate=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return s({},t)},e.exports.withOptions=function(e,t,n){return s(e,t,n)}},function(e,t,n){var r=n(590),o=n(606),i=n(608),a=n(609),u=n(610);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(63)(n(37),"Map");e.exports=r},function(e,t,n){var r=n(130),o=n(614),i=n(615),a=n(616),u=n(617),s=n(618);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(628),o=n(295),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=u},function(e,t,n){var r=n(630),o=n(47),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t,n){(function(e){var r=n(37),o=n(631),i="object"==typeof t&&t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=a&&a.exports===i?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;e.exports=s}).call(t,n(134)(e))},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(279),o="object"==typeof t&&t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u}).call(t,n(134)(e))},function(e,t,n){var r=n(24),o=n(128),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbolLine truncated
|
function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e,t){return"__proto__"===t?void 0:e[t]}var i=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0];return Array.prototype.slice.call(arguments,1).forEach(function(u){"object"!=typeof u||null===u||Array.isArray(u)||Object.keys(u).forEach(function(s){return t=o(a,s),(e=o(u,s))===a?void 0:"object"!=typeof e||null===e?void(a[s]=e):Array.isArray(e)?void(a[s]=function e(t){var o=[];return t.forEach(function(t,a){"object"==typeof t&&null!==t?Array.isArray(t)?o[a]=e(t):n(t)?o[a]=r(t):o[a]=i({},t):o[a]=t}),o}(e)):n(e)?void(a[s]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[s]=i({},e)):void(a[s]=i(t,e))})}),a}}).call(t,n(55).Buffer)},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e?function e(t,n){var r;r=Array.isArray(t)?[]:{};n.push(t);Object.keys(t).forEach(function(o){var i=t[o];"function"!=typeof i&&(i&&"object"==typeof i?-1!==n.indexOf(t[o])?r[o]="[Circular]":r[o]=e(t[o],n.slice(0)):r[o]=i)});"string"==typeof t.name&&(r.name=t.name);"string"==typeof t.message&&(r.message=t.message);"string"==typeof t.stack&&(r.stack=t.stack);return r}(e,[]):"function"==typeof e?"[Function: "+(e.name||"anonymous")+"]":e}},function(e,t,n){var r=n(590),o=n(606),i=n(608),a=n(609),u=n(610);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(63)(n(36),"Map");e.exports=r},function(e,t,n){var r=n(130),o=n(614),i=n(615),a=n(616),u=n(617),s=n(618);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(628),o=n(294),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=u},function(e,t,n){var r=n(630),o=n(47),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t,n){(function(e){var r=n(36),o=n(631),i="object"==typeof t&&t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=a&&a.exports===i?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;e.exports=s}).call(t,n(134)(e))},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(278),o="object"==typeof t&&t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u}).call(t,n(134)(e))},function(e,t,n){var r=n(24),o=n(128),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.memoizedSampleFromSchema=t.memoizedCreateXMLExample=t.sampleXmlFromSchema=t.inferSchema=t.sampleFromSchema=void 0,t.createXMLExample=f;var r=n(9),o=a(n(657)),i=a(n(670));function a(e){return e&&e.__esModule?e:{default:e}}var u={string:function(){return"string"},string_email:function(){return"user@example.com"},"string_date-time":function(){return(new Date).toISOString()},number:function(){return 0},number_float:function(){return 0},integer:function(){return 0},boolean:function(e){return"boolean"!=typeof e.default||e.default}},s=function(e){var t=e=(0,r.objectify)(e),n=t.type,o=t.format,i=u[n+"_"+o]||u[n];return(0,r.isFunc)(i)?i(e):"Unknown Type: "+e.type},l=t.sampleFromSchema=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,r.objectify)(t),i=o.type,a=o.example,u=o.properties,l=o.additionalProperties,c=o.items,f=n.includeReadOnly,p=n.includeWriteOnly;if(void 0!==a)return(0,r.deeplyStripKey)(a,"$$ref",function(e){return"string"==typeof e&&e.indexOf("#")>-1});if(!i)if(u)i="object";else{if(!c)return;i="array"}if("object"===i){var d=(0,r.objectify)(u),h={};for(var v in d)d[v]&&d[v].deprecated||d[v]&&d[v].readOnly&&!f||d[v]&&d[v].writeOnly&&!p||(h[v]=e(d[v],n));if(!0===Line truncated
|
||||||
/**
|
/**
|
||||||
* Checks if an event is supported in the current execution environment.
|
* Checks if an event is supported in the current execution environment.
|
||||||
*
|
*
|
||||||
@@ -62,24 +62,24 @@ function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}func
|
|||||||
* @return {boolean} True if the event is supported.
|
* @return {boolean} True if the event is supported.
|
||||||
* @internal
|
* @internal
|
||||||
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
||||||
*/,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},function(e,t,n){"use strict";var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=r[e];return!!n&&!!t[n]}e.exports=function(e){return o}},function(e,t,n){"use strict";var r=n(89),o=n(790),i=(n(14),n(39),n(219)),a=n(150),u=n(360);function s(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}var l=i(function(e,t,n){e.insertBefore(t,n)});function c(e,t,n){r.insertTreeBefore(e,t,n)}function f(e,t,n){Array.isArray(t)?function(e,t,n,r){var o=t;for(;;){var i=o.nextSibling;if(l(e,o,r),o===n)break;o=i}}(e,t[0],t[1],n):l(e,t,n)}function p(e,t){if(Array.isArray(t)){var n=t[1];d(e,t=t[0],n),e.removeChild(n)}e.removeChild(t)}function d(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}var h=o.dangerouslyReplaceNodeWithMarkup;var v={dangerouslyReplaceNodeWithMarkup:h,replaceDelimitedText:function(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&l(r,document.createTextNode(n),o):n?(u(o,n),d(r,o,t)):d(r,e,t)},processUpdates:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];switch(r.type){case"INSERT_MARKUP":c(e,r.content,s(e,r.afterNode));break;case"MOVE_EXISTING":f(e,r.fromNode,s(e,r.afterNode));break;case"SET_MARKUP":a(e,r.content);break;case"TEXT_CONTENT":u(e,r.content);break;case"REMOVE_NODE":p(e,r.fromNode)}}}};e.exports=v},function(e,t,n){"use strict";e.exports={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}},function(e,t,n){"use strict";e.exports=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}},function(e,t,n){"use strict";var r=n(11),o=n(808),i=n(269)(n(75).isValidElement),a=(n(8),n(10),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0});function u(e){null!=e.checkedLink&&null!=e.valueLink&&r("87")}function s(e){u(e),(null!=e.value||null!=e.onChange)&&r("88")}function l(e){u(e),(null!=e.checked||null!=e.onChange)&&r("89")}var c={value:function(e,t,n){return!e[t]||a[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:i.func},f={};function p(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var d={checkPropTypes:function(e,t,n){for(var r in c){if(c.hasOwnProperty(r))var i=c[r](t,r,e,"prop",null,o);if(i instanceof Error&&!(i.message in f)){f[i.message]=!0;p(n)}}},getValue:function(e){return e.valueLink?(s(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(l(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(s(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(l(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=d},function(e,t,n){"use strict";var r=n(11),o=(n(8),!1),i={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o&&r("104"),i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=i},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!r.call(t,n[a])||!o(e[n[a]],t[n[a]]))return!1;return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n=null===e||!1===e,r=null===t||!1===t;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}},function(e,t,n){"use strict";var r={escape:function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})},unescape:function(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}};e.exports=r},function(e,t,n){"use strict";var r=n(11),o=(n(46),n(112)
Line truncated
|
*/,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},function(e,t,n){"use strict";var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=r[e];return!!n&&!!t[n]}e.exports=function(e){return o}},function(e,t,n){"use strict";var r=n(89),o=n(791),i=(n(15),n(38),n(219)),a=n(149),u=n(359);function s(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}var l=i(function(e,t,n){e.insertBefore(t,n)});function c(e,t,n){r.insertTreeBefore(e,t,n)}function f(e,t,n){Array.isArray(t)?function(e,t,n,r){var o=t;for(;;){var i=o.nextSibling;if(l(e,o,r),o===n)break;o=i}}(e,t[0],t[1],n):l(e,t,n)}function p(e,t){if(Array.isArray(t)){var n=t[1];d(e,t=t[0],n),e.removeChild(n)}e.removeChild(t)}function d(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}var h=o.dangerouslyReplaceNodeWithMarkup;var v={dangerouslyReplaceNodeWithMarkup:h,replaceDelimitedText:function(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&l(r,document.createTextNode(n),o):n?(u(o,n),d(r,o,t)):d(r,e,t)},processUpdates:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];switch(r.type){case"INSERT_MARKUP":c(e,r.content,s(e,r.afterNode));break;case"MOVE_EXISTING":f(e,r.fromNode,s(e,r.afterNode));break;case"SET_MARKUP":a(e,r.content);break;case"TEXT_CONTENT":u(e,r.content);break;case"REMOVE_NODE":p(e,r.fromNode)}}}};e.exports=v},function(e,t,n){"use strict";e.exports={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}},function(e,t,n){"use strict";e.exports=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}},function(e,t,n){"use strict";var r=n(10),o=n(809),i=n(268)(n(75).isValidElement),a=(n(8),n(12),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0});function u(e){null!=e.checkedLink&&null!=e.valueLink&&r("87")}function s(e){u(e),(null!=e.value||null!=e.onChange)&&r("88")}function l(e){u(e),(null!=e.checked||null!=e.onChange)&&r("89")}var c={value:function(e,t,n){return!e[t]||a[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:i.func},f={};function p(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var d={checkPropTypes:function(e,t,n){for(var r in c){if(c.hasOwnProperty(r))var i=c[r](t,r,e,"prop",null,o);if(i instanceof Error&&!(i.message in f)){f[i.message]=!0;p(n)}}},getValue:function(e){return e.valueLink?(s(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(l(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(s(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(l(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=d},function(e,t,n){"use strict";var r=n(10),o=(n(8),!1),i={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o&&r("104"),i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=i},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!r.call(t,n[a])||!o(e[n[a]],t[n[a]]))return!1;return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n=null===e||!1===e,r=null===t||!1===t;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}},function(e,t,n){"use strict";var r={escape:function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})},unescape:function(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}};e.exports=r},function(e,t,n){"use strict";var r=n(10),o=(n(46),n(113)
Line truncated
|
||||||
/*!
|
/*!
|
||||||
* https://github.com/Starcounter-Jack/JSON-Patch
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
||||||
* (c) 2017 Joachim Wester
|
* (c) 2017 Joachim Wester
|
||||||
* MIT license
|
* MIT license
|
||||||
*/function o(e,t){return r.call(e,t)}function i(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)o(e,r)&&t.push(r);return t}function a(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e,t){var n;for(var r in e)if(o(e,r)){if(e[r]===t)return a(r)+"/";if("object"==typeof e[r]&&""!=(n=u(e[r],t)))return a(r)+"/"+n}return""}t.hasOwnProperty=o,t._objectKeys=i,t._deepClone=function(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}},t.isInteger=function(e){for(var t,n=0,r=e.length;n<r;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0},t.escapePathComponent=a,t.unescapePathComponent=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},t._getPathRecursive=u,t.getPath=function(e,t){if(e===t)return"/";var n=u(e,t);if(""===n)throw new Error("Object not found in root");return"/"+n},t.hasUndefined=function e(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0}else if("object"==typeof t){var o=i(t),a=o.length;for(n=0;n<a;n++)if(e(t[o[n]]))return!0}return!1};var s=function(e){function t(t,n,r,o,i){e.call(this,t),this.message=t,this.name=n,this.index=r,this.operation=o,this.tree=i}return n(t,e),t}(Error);t.PatchError=s},function(e,t,n){var r=n(49),o=n(155),i=n(72),a=n(115),u=n(917);e.exports=function(e,t){var n=1==e,s=2==e,l=3==e,c=4==e,f=6==e,p=5==e||f,d=t||u;return function(t,u,h){for(var v,m,g=i(t),y=o(g),b=r(u,h,3),_=a(y.length),w=0,E=n?d(t,_):s?d(t,0):void 0;_>w;w++)if((p||w in y)&&(m=b(v=y[w],w,g),e))if(n)E[w]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:E.push(v)}else if(c)return!1;return f?-1:l||c?c:E}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authorizeRequest=t.authorizeAccessCodeWithBasicAuthentication=t.authorizeAccessCodeWithFormParams=t.authorizeApplication=t.authorizePassword=t.preAuthorizeImplicit=t.CONFIGURE_AUTH=t.VALIDATE=t.AUTHORIZE_OAUTH2=t.PRE_AUTHORIZE_OAUTH2=t.LOGOUT=t.AUTHORIZE=t.SHOW_AUTH_POPUP=void 0;var r=l(n(45)),o=l(n(23)),i=l(n(41));t.showDefinitions=function(e){return{type:c,payload:e}},t.authorize=function(e){return{type:f,payload:e}},t.logout=function(e){return{type:p,payload:e}},t.authorizeOauth2=function(e){return{type:d,payload:e}},t.configureAuth=function(e){return{type:h,payload:e}};var a=l(n(210)),u=l(n(32)),s=n(9);function l(e){return e&&e.__esModule?e:{default:e}}var c=t.SHOW_AUTH_POPUP="show_popup",f=t.AUTHORIZE="authorize",p=t.LOGOUT="logout",d=(t.PRE_AUTHORIZE_OAUTH2="pre_authorize_oauth2",t.AUTHORIZE_OAUTH2="authorize_oauth2"),h=(t.VALIDATE="validate",t.CONFIGURE_AUTH="configure_auth");t.preAuthorizeImplicit=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,a=e.token,s=e.isValid,l=o.schema,c=o.name,f=l.get("flow");delete u.default.swaggerUIRedirectOauth2,"accessCode"===f||s||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),a.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:(0,i.default)(a)}):n.authorizeOauth2({auth:o,token:a})}};t.authorizePassword=function(e){return function(t){var n=t.authActions,r=e.schema,i=e.name,a=e.username,u=e.password,l=e.passwordType,c=e.clientId,f=e.clientSecret,p={grant_type:"password",scope:e.scopes.join(" "),username:a,password:u},d={};switch(l){case"request-body":!function(e,t,n){t&&(0,o.default)(e,{client_id:t});n&&(0,o.default)(e,{client_secret:n})}(p,c,f);break;case"basic":d.Authorization="Basic "+(0,s.btoa)(c+":"+f);break;default:console.warn("Warning: invalid passwordType "+l+" was passed, not including client id and secret")}return n.authorizeRequest({body:(0,s.buildFormData)(p),url:r.get("tokenUrl"),name:i,headers:d,query:{},auth:e})}};t.authorizeApplication=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,i=e.name,a=e.clientId,u=e.clientSecret,l={Authorization:"Basic "+(0,s.btoa)(a+":"+u)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:(0,s.buildFormData)(c),name:i,url:r.get("tokenUrl"),auth:e,headers:l})}},t.authorizeAccessCodeWithFormParams=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,l={grant_type:"authorization_code",code:t.code,client_id:a,client_secret:u,redirect_uri:n};return r.authorizeRequest({body:(0,s.buildFormData)(l),name:i,url:o.get("tokenUrl"),auth:t})}},t.authorizeAccessCodeWithBasicAuthentication=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,l={Authorization:"Basic "+(0,s.btoa)(a+":"+u)},c={grant_type:"authorization_code",code:t.code,client_id:a,redirect_uri:n};return r.authoriLine truncated
|
*/function o(e,t){return r.call(e,t)}function i(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)o(e,r)&&t.push(r);return t}function a(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e,t){var n;for(var r in e)if(o(e,r)){if(e[r]===t)return a(r)+"/";if("object"==typeof e[r]&&""!=(n=u(e[r],t)))return a(r)+"/"+n}return""}t.hasOwnProperty=o,t._objectKeys=i,t._deepClone=function(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}},t.isInteger=function(e){for(var t,n=0,r=e.length;n<r;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0},t.escapePathComponent=a,t.unescapePathComponent=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},t._getPathRecursive=u,t.getPath=function(e,t){if(e===t)return"/";var n=u(e,t);if(""===n)throw new Error("Object not found in root");return"/"+n},t.hasUndefined=function e(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0}else if("object"==typeof t){var o=i(t),a=o.length;for(n=0;n<a;n++)if(e(t[o[n]]))return!0}return!1};var s=function(e){function t(t,n,r,o,i){e.call(this,t),this.message=t,this.name=n,this.index=r,this.operation=o,this.tree=i}return n(t,e),t}(Error);t.PatchError=s},function(e,t,n){var r=n(49),o=n(154),i=n(72),a=n(115),u=n(919);e.exports=function(e,t){var n=1==e,s=2==e,l=3==e,c=4==e,f=6==e,p=5==e||f,d=t||u;return function(t,u,h){for(var v,m,g=i(t),y=o(g),b=r(u,h,3),_=a(y.length),w=0,E=n?d(t,_):s?d(t,0):void 0;_>w;w++)if((p||w in y)&&(m=b(v=y[w],w,g),e))if(n)E[w]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:E.push(v)}else if(c)return!1;return f?-1:l||c?c:E}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authorizeRequest=t.authorizeAccessCodeWithBasicAuthentication=t.authorizeAccessCodeWithFormParams=t.authorizeApplication=t.authorizePassword=t.preAuthorizeImplicit=t.CONFIGURE_AUTH=t.VALIDATE=t.AUTHORIZE_OAUTH2=t.PRE_AUTHORIZE_OAUTH2=t.LOGOUT=t.AUTHORIZE=t.SHOW_AUTH_POPUP=void 0;var r=l(n(45)),o=l(n(23)),i=l(n(40));t.showDefinitions=function(e){return{type:c,payload:e}},t.authorize=function(e){return{type:f,payload:e}},t.logout=function(e){return{type:p,payload:e}},t.authorizeOauth2=function(e){return{type:d,payload:e}},t.configureAuth=function(e){return{type:h,payload:e}};var a=l(n(210)),u=l(n(33)),s=n(9);function l(e){return e&&e.__esModule?e:{default:e}}var c=t.SHOW_AUTH_POPUP="show_popup",f=t.AUTHORIZE="authorize",p=t.LOGOUT="logout",d=(t.PRE_AUTHORIZE_OAUTH2="pre_authorize_oauth2",t.AUTHORIZE_OAUTH2="authorize_oauth2"),h=(t.VALIDATE="validate",t.CONFIGURE_AUTH="configure_auth");t.preAuthorizeImplicit=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,a=e.token,s=e.isValid,l=o.schema,c=o.name,f=l.get("flow");delete u.default.swaggerUIRedirectOauth2,"accessCode"===f||s||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),a.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:(0,i.default)(a)}):n.authorizeOauth2({auth:o,token:a})}};t.authorizePassword=function(e){return function(t){var n=t.authActions,r=e.schema,i=e.name,a=e.username,u=e.password,l=e.passwordType,c=e.clientId,f=e.clientSecret,p={grant_type:"password",scope:e.scopes.join(" ")},d={},h={};return"basic"===l?h.Authorization="Basic "+(0,s.btoa)(a+":"+u):((0,o.default)(p,{username:a},{password:u}),"query"===l?(c&&(d.client_id=c),f&&(d.client_secret=f)):h.Authorization="Basic "+(0,s.btoa)(c+":"+f)),n.authorizeRequest({body:(0,s.buildFormData)(p),url:r.get("tokenUrl"),name:i,headers:h,query:d,auth:e})}},t.authorizeApplication=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,i=e.name,a=e.clientId,u=e.clientSecret,l={Authorization:"Basic "+(0,s.btoa)(a+":"+u)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:(0,s.buildFormData)(c),name:i,url:r.get("tokenUrl"),auth:e,headers:l})}},t.authorizeAccessCodeWithFormParams=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,l={grant_type:"authorization_code",code:t.code,client_id:a,client_secret:u,redirect_uri:n};return r.authorizeRequest({body:(0,s.buildFormData)(l),name:i,url:o.get("tokenUrl"),auth:t})}},t.authorizeAccessCodeWithBasicAuthentication=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,l={Authorization:"Basic "+(0,s.btoa)(a+":"+u)},c={grant_type:"authorization_code",code:t.code,client_id:a,redirect_uri:n};return r.authorizeRequest({body:(0,s.buildFormData)(c),name:i,url:o.get("tokenUrl"),auth:t,headers:l})}},t.authorizeRequest=function(eLine truncated
|
||||||
/*!
|
/*!
|
||||||
* cookie
|
* cookie
|
||||||
* Copyright(c) 2012-2014 Roman Shtylman
|
* Copyright(c) 2012-2014 Roman Shtylman
|
||||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},a=e.split(i),s=o.decode||r,l=0;l<a.length;l++){var c=a[l],f=c.indexOf("=");if(!(f<0)){var p=c.substr(0,f).trim(),d=c.substr(++f,c.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),void 0==n[p]&&(n[p]=u(d,s))}}return n},t.serialize=function(e,t,n){var r=n||{},i=r.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var u=i(t);if(u&&!a.test(u))throw new TypeError("argument val is invalid");var s=e+"="+u;if(null!=r.maxAge){var l=r.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");s+="; Max-Age="+Math.floor(l)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(s+="; HttpOnly");r.secure&&(s+="; Secure");if(r.sameSite){var c="string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;default:throw new TypeError("option sameSite is invalid")}}return s};var r=decodeURIComponent,o=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function u(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){e.exports=function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){var o=e.charCodeAt(n+1);if(o>=56320&&o<=57343){var i=1024*(r-55296)+o-56320+65536;t.push(240+Math.floor(i/64/64/64),128+Math.floor(i/64/64)%64,128+Math.floor(i/64)%64,128+i%64),n+=1;continue}}r>=2048?t.push(224+Math.floor(r/64/64),128+Math.floor(r/64)%64,128+r%64):r>=128?t.push(192+Math.floor(r/64),128+r%64):t.push(r)}return t}},function(e,t){!function(){var e;function n(e,t){function n(e,t,n){if(!r(e))return n;var o=0,i=0;do{var a=t.exec(e);if(null===a)break;if(!(i<n))break;o+=a[0].length,i++}while(null!==a);return o>=e.length?-1:o}function r(e){return a.test(e)}function o(e,n){void 0==e&&(e=["[^]"]),void 0==n&&(n="g");var r=[];return t.forEach(function(e){r.push(e.source)}),r.push(i.source),r=r.concat(e),new RegExp(r.join("|"),n)}e.findCharIndex=function(e,t){if(t>=e.length)return-1;if(!r(e))return t;for(var n=o(),i=0;null!==n.exec(e)&&!(n.lastIndex>t);)i++;return i},e.findByteIndex=function(e,t){return t>=this.length(e)?-1:n(e,o(),t)},e.charAt=function(e,t){var n=this.findByteIndex(e,t);if(n<0||n>=e.length)return"";var r=e.slice(n,n+8),o=a.exec(r);return null===o?r[0]:o[0]},e.charCodeAt=function(e,t){var r=function(e,t){return n(e,new RegExp(i.source,"g"),t)}(e,t);if(r<0)return NaN;var o=e.charCodeAt(r);return 55296<=o&&o<=56319?1024*(o-55296)+(e.charCodeAt(r+1)-56320)+65536:o},e.fromCharCode=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):String.fromCharCode(e)},e.indexOf=function(e,t,n){void 0!==n&&null!==n||(n=0);var r=this.findByteIndex(e,n),o=e.indexOf(t,r);return o<0?-1:this.findCharIndex(e,o)},e.lastIndexOf=function(e,t,n){var r;if(void 0===n||null===n)r=e.lastIndexOf(t);else{var o=this.findByteIndex(e,n);r=e.lastIndexOf(t,o)}return r<0?-1:this.findCharIndex(e,r)},e.slice=function(e,t,n){var r,o=this.findByteIndex(e,t);return o<0&&(o=e.length),void 0===n||null===n?r=e.length:(r=this.findByteIndex(e,n))<0&&(r=e.length),e.slice(o,r)},e.substr=function(e,t,n){return t<0&&(t=this.length(e)+t),void 0===n||null===n?this.slice(e,t):this.slice(e,t,t+n)},e.substring=e.slice,e.length=function(e){return this.findCharIndex(e,e.length-1)+1},e.stringToCodePoints=function(e){for(var t=[],n=0;n<e.length&&(codePoint=this.charCodeAt(e,n),codePoint);n++)t.push(codePoint);return t},e.codePointsToString=function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.fromCharCode(e[n]));return t.join("")},e.stringToBytes=function(e){for(var t=[],n=0;n<e.length;n++){for(var r=e.charCodeAt(n),o=[];r>0;)o.push(255&r),r>>=8;1==o.length&&o.push(0),t=t.concat(o.reverse())}return t},e.bytesToString=function(e){for(var t=[],n=0;n<e.length;n+=2){var r=e[n]<<8|e[n+1];t.push(String.fromCharCode(r))}return t.join("")},e.stringToCharArray=function(e){var t=[],n=o();do{var r=n.exec(e);if(null===r)break;t.push(r[0])}while(null!==r);return t};var i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,a=o([],"")}void 0!==t&&null!==t?e=t:"undefined"!=typeof window&&null!==window&&(void 0!==window.UtfString&&null!==window.UtfString||(window.UtfString={}),e=window.UtfString);e.visual={},n(e,[]),n(e.visual,[/\uD83C[\uDDE6-\uDDFF]\uD83C[\uDDE6-\uDDFF]/])}()},function(e,t){e.exports='---\nurl: "https://
Line truncated
|
*/t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},a=e.split(i),s=o.decode||r,l=0;l<a.length;l++){var c=a[l],f=c.indexOf("=");if(!(f<0)){var p=c.substr(0,f).trim(),d=c.substr(++f,c.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),void 0==n[p]&&(n[p]=u(d,s))}}return n},t.serialize=function(e,t,n){var r=n||{},i=r.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var u=i(t);if(u&&!a.test(u))throw new TypeError("argument val is invalid");var s=e+"="+u;if(null!=r.maxAge){var l=r.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");s+="; Max-Age="+Math.floor(l)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(s+="; HttpOnly");r.secure&&(s+="; Secure");if(r.sameSite){var c="string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;default:throw new TypeError("option sameSite is invalid")}}return s};var r=decodeURIComponent,o=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function u(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){e.exports=function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){var o=e.charCodeAt(n+1);if(o>=56320&&o<=57343){var i=1024*(r-55296)+o-56320+65536;t.push(240+Math.floor(i/64/64/64),128+Math.floor(i/64/64)%64,128+Math.floor(i/64)%64,128+i%64),n+=1;continue}}r>=2048?t.push(224+Math.floor(r/64/64),128+Math.floor(r/64)%64,128+r%64):r>=128?t.push(192+Math.floor(r/64),128+r%64):t.push(r)}return t}},function(e,t){!function(){var e;function n(e,t){function n(e,t,n){if(!r(e))return n;var o=0,i=0;do{var a=t.exec(e);if(null===a)break;if(!(i<n))break;o+=a[0].length,i++}while(null!==a);return o>=e.length?-1:o}function r(e){return a.test(e)}function o(e,n){void 0==e&&(e=["[^]"]),void 0==n&&(n="g");var r=[];return t.forEach(function(e){r.push(e.source)}),r.push(i.source),r=r.concat(e),new RegExp(r.join("|"),n)}e.findCharIndex=function(e,t){if(t>=e.length)return-1;if(!r(e))return t;for(var n=o(),i=0;null!==n.exec(e)&&!(n.lastIndex>t);)i++;return i},e.findByteIndex=function(e,t){return t>=this.length(e)?-1:n(e,o(),t)},e.charAt=function(e,t){var n=this.findByteIndex(e,t);if(n<0||n>=e.length)return"";var r=e.slice(n,n+8),o=a.exec(r);return null===o?r[0]:o[0]},e.charCodeAt=function(e,t){var r=function(e,t){return n(e,new RegExp(i.source,"g"),t)}(e,t);if(r<0)return NaN;var o=e.charCodeAt(r);return 55296<=o&&o<=56319?1024*(o-55296)+(e.charCodeAt(r+1)-56320)+65536:o},e.fromCharCode=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):String.fromCharCode(e)},e.indexOf=function(e,t,n){void 0!==n&&null!==n||(n=0);var r=this.findByteIndex(e,n),o=e.indexOf(t,r);return o<0?-1:this.findCharIndex(e,o)},e.lastIndexOf=function(e,t,n){var r;if(void 0===n||null===n)r=e.lastIndexOf(t);else{var o=this.findByteIndex(e,n);r=e.lastIndexOf(t,o)}return r<0?-1:this.findCharIndex(e,r)},e.slice=function(e,t,n){var r,o=this.findByteIndex(e,t);return o<0&&(o=e.length),void 0===n||null===n?r=e.length:(r=this.findByteIndex(e,n))<0&&(r=e.length),e.slice(o,r)},e.substr=function(e,t,n){return t<0&&(t=this.length(e)+t),void 0===n||null===n?this.slice(e,t):this.slice(e,t,t+n)},e.substring=e.slice,e.length=function(e){return this.findCharIndex(e,e.length-1)+1},e.stringToCodePoints=function(e){for(var t=[],n=0;n<e.length&&(codePoint=this.charCodeAt(e,n),codePoint);n++)t.push(codePoint);return t},e.codePointsToString=function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.fromCharCode(e[n]));return t.join("")},e.stringToBytes=function(e){for(var t=[],n=0;n<e.length;n++){for(var r=e.charCodeAt(n),o=[];r>0;)o.push(255&r),r>>=8;1==o.length&&o.push(0),t=t.concat(o.reverse())}return t},e.bytesToString=function(e){for(var t=[],n=0;n<e.length;n+=2){var r=e[n]<<8|e[n+1];t.push(String.fromCharCode(r))}return t.join("")},e.stringToCharArray=function(e){var t=[],n=o();do{var r=n.exec(e);if(null===r)break;t.push(r[0])}while(null!==r);return t};var i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,a=o([],"")}void 0!==t&&null!==t?e=t:"undefined"!=typeof window&&null!==window&&(void 0!==window.UtfString&&null!==window.UtfString||(window.UtfString={}),e=window.UtfString);e.visual={},n(e,[]),n(e.visual,[/\uD83C[\uDDE6-\uDDFF]\uD83C[\uDDE6-\uDDFF]/])}()},function(e,t){e.exports='---\nurl: "https://
Line truncated
|
||||||
/*!
|
/*!
|
||||||
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||||
* Licensed under the MIT License.
|
* Licensed under the MIT License.
|
||||||
*/var r,o="";e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||void 0===r)r=e,o="";else if(o.length>=n)return o.substr(0,n);for(;n>o.length&&t>1;)1&t&&(o+=e),t>>=1,e+=e;return o=(o+=e).substr(0,n)}},function(e,t,n){var r=n(61);e.exports=function(e){return r(e).toLowerCase()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(4)),o=f(n(2)),i=f(n(3)),a=f(n(5)),u=f(n(6)),s=n(0),l=f(s),c=(f(n(1)),f(n(12)),f(n(7)));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onChange=function(e,t,n){var r=i.props;(0,r.specActions.changeParamByIdentity)(r.onChangeKey,e,t,n)},i.onChangeConsumesWrapper=function(e){var t=i.props;(0,t.specActions.changeConsumesValue)(t.onChangeKey,e)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.onTryoutClick,r=t.onCancelClick,o=t.parameters,i=t.allowTryItOut,a=t.tryItOutEnabled,u=t.specPath,s=t.fn,f=t.getComponent,p=t.getConfigs,d=t.specSelectors,h=t.specActions,v=t.pathMethod,m=f("parameterRow"),g=f("TryItOutButton"),y=a&&i;return l.default.createElement("div",{className:"opblock-section"},l.default.createElement("div",{className:"opblock-section-header"},l.default.createElement("div",{className:"tab-header"},l.default.createElement("h4",{className:"opblock-title"},"Parameters")),i?l.default.createElement(g,{enabled:a,onCancelClick:r,onTryoutClick:n}):null),o.count()?l.default.createElement("div",{className:"table-container"},l.default.createElement("table",{className:"parameters"},l.default.createElement("thead",null,l.default.createElement("tr",null,l.default.createElement("th",{className:"col col_header parameters-col_name"},"Name"),l.default.createElement("th",{className:"col col_header parameters-col_description"},"Description"))),l.default.createElement("tbody",null,function(e,t){return e.valueSeq().filter(c.default.Map.isMap).map(t)}(o,function(t,n){return l.default.createElement(m,{fn:s,specPath:u.push(n.toString()),getComponent:f,getConfigs:p,rawParam:t,param:d.parameterWithMetaByIdentity(v,t),key:t.get("in")+"."+t.get("name"),onChange:e.onChange,onChangeConsumes:e.onChangeConsumesWrapper,specSelectors:d,specActions:h,pathMethod:v,isExecute:y})}).toArray()))):l.default.createElement("div",{className:"opblock-description-wrapper"},l.default.createElement("p",null,"No parameters")))}}]),t}(s.Component);p.defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterExt=void 0;var r=o(n(0));o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var i=t.ParameterExt=function(e){var t=e.xKey,n=e.xVal;return r.default.createElement("div",{className:"parameter__extension"},t,": ",String(n))};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterIncludeEmpty=void 0;var r=i(n(0)),o=i(n(113));i(n(1)),i(n(12));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.ParameterIncludeEmpty=function(e){var t=e.param,n=e.isIncluded,i=e.onChange,a=e.isDisabled;return t.get("allowEmptyValue")?r.default.createElement("div",{className:(0,o.default)("parameter__empty_value_toggle",{disabled:a})},r.default.createElement("input",{type:"checkbox",disabled:a,checked:!a&&n,onChange:function(e){i(e.target.checked)}}),"Send empty value"):null};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(4)),o=d(n(2)),i=d(n(3)),a=d(n(5)),u=d(n(6)),s=n(0),l=d(s),c=n(7),f=(d(n(1)),d(n(12)),d(n(32))),p=n(9);function d(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));return i.onChangeWrapper=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=i.props;return(0,n.onChange)(n.rawParam,""===e||e&&0===e.size?null:e,t)},i.onChangeIncludeEmpty=function(e){var t=i.props,n=t.specActions,r=t.param,o=t.pathMethod,a=r.get("name"),u=r.get("in");return n.updateEmptyParamInclusion(o,a,u,e)},i.setDefaultValue=function(){var e=i.props,t=e.specSelectors,n=e.pathMethod,r=e.rawParam,o=t.parameterWithMetaByIdentity(n,r);if(o&&void 0===o.get("value")&&"body"!==o.get("in")){var a=void 0;t.isSwagger2()?a=o.get("x-example")||o.getIn(["default"])||o.getIn(["schema","example"])||o.getIn(["schema","default"]):t.isOAS3()&&(a=o.get("example")||o.getIn(["schema","example"])||o.getIn(["schema","default"])),void 0!==a&&i.onChangeWrapper((0,p.numberToString)(a))}},i.setDefaultValue(),i}retuLine truncated
|
*/var r,o="";e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||void 0===r)r=e,o="";else if(o.length>=n)return o.substr(0,n);for(;n>o.length&&t>1;)1&t&&(o+=e),t>>=1,e+=e;return o=(o+=e).substr(0,n)}},function(e,t,n){var r=n(61);e.exports=function(e){return r(e).toLowerCase()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(4)),o=f(n(2)),i=f(n(3)),a=f(n(5)),u=f(n(6)),s=n(0),l=f(s),c=(f(n(1)),f(n(11)),f(n(7)));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onChange=function(e,t,n){var r=i.props;(0,r.specActions.changeParamByIdentity)(r.onChangeKey,e,t,n)},i.onChangeConsumesWrapper=function(e){var t=i.props;(0,t.specActions.changeConsumesValue)(t.onChangeKey,e)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.onTryoutClick,r=t.onCancelClick,o=t.parameters,i=t.allowTryItOut,a=t.tryItOutEnabled,u=t.specPath,s=t.fn,f=t.getComponent,p=t.getConfigs,d=t.specSelectors,h=t.specActions,v=t.pathMethod,m=f("parameterRow"),g=f("TryItOutButton"),y=a&&i;return l.default.createElement("div",{className:"opblock-section"},l.default.createElement("div",{className:"opblock-section-header"},l.default.createElement("div",{className:"tab-header"},l.default.createElement("h4",{className:"opblock-title"},"Parameters")),i?l.default.createElement(g,{enabled:a,onCancelClick:r,onTryoutClick:n}):null),o.count()?l.default.createElement("div",{className:"table-container"},l.default.createElement("table",{className:"parameters"},l.default.createElement("thead",null,l.default.createElement("tr",null,l.default.createElement("th",{className:"col col_header parameters-col_name"},"Name"),l.default.createElement("th",{className:"col col_header parameters-col_description"},"Description"))),l.default.createElement("tbody",null,function(e,t){return e.valueSeq().filter(c.default.Map.isMap).map(t)}(o,function(t,n){return l.default.createElement(m,{fn:s,specPath:u.push(n.toString()),getComponent:f,getConfigs:p,rawParam:t,param:d.parameterWithMetaByIdentity(v,t),key:t.get("in")+"."+t.get("name"),onChange:e.onChange,onChangeConsumes:e.onChangeConsumesWrapper,specSelectors:d,specActions:h,pathMethod:v,isExecute:y})}).toArray()))):l.default.createElement("div",{className:"opblock-description-wrapper"},l.default.createElement("p",null,"No parameters")))}}]),t}(s.Component);p.defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterExt=void 0;var r=o(n(0));o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var i=t.ParameterExt=function(e){var t=e.xKey,n=e.xVal;return r.default.createElement("div",{className:"parameter__extension"},t,": ",String(n))};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterIncludeEmpty=void 0;var r=i(n(0)),o=i(n(114));i(n(1)),i(n(11));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.ParameterIncludeEmpty=function(e){var t=e.param,n=e.isIncluded,i=e.onChange,a=e.isDisabled;return t.get("allowEmptyValue")?r.default.createElement("div",{className:(0,o.default)("parameter__empty_value_toggle",{disabled:a})},r.default.createElement("input",{type:"checkbox",disabled:a,checked:!a&&n,onChange:function(e){i(e.target.checked)}}),"Send empty value"):null};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(4)),o=d(n(2)),i=d(n(3)),a=d(n(5)),u=d(n(6)),s=n(0),l=d(s),c=n(7),f=(d(n(1)),d(n(11)),d(n(33))),p=n(9);function d(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));return i.onChangeWrapper=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=i.props;return(0,n.onChange)(n.rawParam,""===e||e&&0===e.size?null:e,t)},i.onChangeIncludeEmpty=function(e){var t=i.props,n=t.specActions,r=t.param,o=t.pathMethod,a=r.get("name"),u=r.get("in");return n.updateEmptyParamInclusion(o,a,u,e)},i.setDefaultValue=function(){var e=i.props,t=e.specSelectors,n=e.pathMethod,r=e.rawParam,o=t.parameterWithMetaByIdentity(n,r);if(void 0===o.get("value")&&"body"!==o.get("in")){var a=void 0;t.isSwagger2()?a=o.get("x-example")||o.getIn(["default"])||o.getIn(["schema","example"])||o.getIn(["schema","default"]):t.isOAS3()&&(a=o.get("example")||o.getIn(["schema","example"])||o.getIn(["schema","default"])),void 0!==a&&i.onChangeWrapper((0,p.numberToString)(a))}},i.setDefaultValue(),i}return(Line truncated
|
||||||
/*!
|
/*!
|
||||||
* Autolinker.js
|
* Autolinker.js
|
||||||
* 0.15.3
|
* 0.15.3
|
||||||
@@ -89,5 +89,5 @@ function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}func
|
|||||||
*
|
*
|
||||||
* https://github.com/gregjacobs/Autolinker.js
|
* https://github.com/gregjacobs/Autolinker.js
|
||||||
*/
|
*/
|
||||||
var e,t,n,r,o=function(e){o.Util.assign(this,e)};return o.prototype={constructor:o,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=this.getHtmlParser().parse(e),n=0,r=[],o=0,i=t.length;o<i;o++){var a=t[o],u=a.getType(),s=a.getText();if("element"===u)"a"===a.getTagName()&&(a.isClosing()?n=Math.max(n-1,0):n++),r.push(s);else if("entity"===u)r.push(s);else if(0===n){var l=this.linkifyStr(s);r.push(l)}else r.push(s)}return r.join("")},linkifyStr:function(e){return this.getMatchParser().replace(e,this.createMatchReturnVal,this)},createMatchReturnVal:function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this,this,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof o.HtmlTag?t.toString():this.getTagBuilder().build(e).toString()},getHtmlParser:function(){var e=this.htmlParser;return e||(e=this.htmlParser=new o.htmlParser.HtmlParser),e},getMatchParser:function(){var e=this.matchParser;return e||(e=this.matchParser=new o.matchParser.MatchParser({urls:this.urls,email:this.email,twitter:this.twitter,stripPrefix:this.stripPrefix})),e},getTagBuilder:function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new o.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e}},o.link=function(e,t){return new o(t).link(e)},o.match={},o.htmlParser={},o.matchParser={},o.Util={abstractMethod:function(){throw"abstract"},assign:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},extend:function(e,t){var n,r=e.prototype,i=function(){};i.prototype=r;var a=(n=t.hasOwnProperty("constructor")?t.constructor:function(){r.constructor.apply(this,arguments)}).prototype=new i;return a.constructor=n,a.superclass=r,delete t.constructor,o.Util.assign(a,t),n},ellipsis:function(e,t,n){return e.length>t&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},splitAndCapture:function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var n,r=[],o=0;n=t.exec(e);)r.push(e.substring(o,n.index)),r.push(n[0]),o=n.index+n[0].length;return r.push(e.substring(o)),r}},o.HtmlTag=o.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(e){o.Util.assign(this,e),this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(e){return this.tagName=e,this},getTagName:function(){return this.tagName||""},setAttr:function(e,t){return this.getAttrs()[e]=t,this},getAttr:function(e){return this.getAttrs()[e]},setAttrs:function(e){var t=this.getAttrs();return o.Util.assign(t,e),this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(e){return this.setAttr("class",e)},addClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,i=o.Util.indexOf,a=n?n.split(r):[],u=e.split(r);t=u.shift();)-1===i(a,t)&&a.push(t);return this.getAttrs().class=a.join(" "),this},removeClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,i=o.Util.indexOf,a=n?n.split(r):[],u=e.split(r);a.length&&(t=u.shift());){var s=i(a,t);-1!==s&&a.splice(s,1)}return this.getAttrs().class=a.join(" "),this},getClass:function(){return this.getAttrs().class||""},hasClass:function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},setInnerHtml:function(e){return this.innerHtml=e,this},getInnerHtml:function(){return this.innerHtml||""},toString:function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),o.AnchorTagBuilder=o.Util.extend(Object,{constructor:function(e){o.Util.assign(this,e)},build:function(e){return new o.HtmlTag({tagName:"a",attrs:this.createAttrs(e.getType(),e.getAnchorHref()),innerHtml:this.processAnchorText(e.getAnchorText())})},createAttrs:function(e,t){var n={href:t},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank"),n},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(e){return o.Util.ellipsis(e,this.truncate||Number.POSITIVE_INFINITY)}}),o.htmlParser.HtmlParser=o.Util.extend(Object,{htmlRegex:(e=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,t=/[^\s\0"'>\/=\x01-\x1F\x7F]+/.source+"(?:\\s*=\\s*"+e.source+")?",new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",t,"|",e.source+")",")*",">",")","|","(?:","<(/)?","("+/[0-9a-zA-Z][0-9a-zA-Z:]*/.source+")","(?:","\\s+",t,")*","\\s*/?",">",")"].join(""),"gi")),htmlCharacterEntitiesRegex:/( | |<|<|>|>|"|"|')/gi,parse:function(e){for(var t,n,r=this.htmlRegex,o=0,i=[];null!==(t=r.exec(e));){var a=t[0],u=t[1]||t[3],s=!!t[2],l=e.substring(o,t.index)Line truncated
|
var e,t,n,r,o=function(e){o.Util.assign(this,e)};return o.prototype={constructor:o,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=this.getHtmlParser().parse(e),n=0,r=[],o=0,i=t.length;o<i;o++){var a=t[o],u=a.getType(),s=a.getText();if("element"===u)"a"===a.getTagName()&&(a.isClosing()?n=Math.max(n-1,0):n++),r.push(s);else if("entity"===u)r.push(s);else if(0===n){var l=this.linkifyStr(s);r.push(l)}else r.push(s)}return r.join("")},linkifyStr:function(e){return this.getMatchParser().replace(e,this.createMatchReturnVal,this)},createMatchReturnVal:function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this,this,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof o.HtmlTag?t.toString():this.getTagBuilder().build(e).toString()},getHtmlParser:function(){var e=this.htmlParser;return e||(e=this.htmlParser=new o.htmlParser.HtmlParser),e},getMatchParser:function(){var e=this.matchParser;return e||(e=this.matchParser=new o.matchParser.MatchParser({urls:this.urls,email:this.email,twitter:this.twitter,stripPrefix:this.stripPrefix})),e},getTagBuilder:function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new o.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e}},o.link=function(e,t){return new o(t).link(e)},o.match={},o.htmlParser={},o.matchParser={},o.Util={abstractMethod:function(){throw"abstract"},assign:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},extend:function(e,t){var n,r=e.prototype,i=function(){};i.prototype=r;var a=(n=t.hasOwnProperty("constructor")?t.constructor:function(){r.constructor.apply(this,arguments)}).prototype=new i;return a.constructor=n,a.superclass=r,delete t.constructor,o.Util.assign(a,t),n},ellipsis:function(e,t,n){return e.length>t&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},splitAndCapture:function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var n,r=[],o=0;n=t.exec(e);)r.push(e.substring(o,n.index)),r.push(n[0]),o=n.index+n[0].length;return r.push(e.substring(o)),r}},o.HtmlTag=o.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(e){o.Util.assign(this,e),this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(e){return this.tagName=e,this},getTagName:function(){return this.tagName||""},setAttr:function(e,t){return this.getAttrs()[e]=t,this},getAttr:function(e){return this.getAttrs()[e]},setAttrs:function(e){var t=this.getAttrs();return o.Util.assign(t,e),this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(e){return this.setAttr("class",e)},addClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,i=o.Util.indexOf,a=n?n.split(r):[],u=e.split(r);t=u.shift();)-1===i(a,t)&&a.push(t);return this.getAttrs().class=a.join(" "),this},removeClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,i=o.Util.indexOf,a=n?n.split(r):[],u=e.split(r);a.length&&(t=u.shift());){var s=i(a,t);-1!==s&&a.splice(s,1)}return this.getAttrs().class=a.join(" "),this},getClass:function(){return this.getAttrs().class||""},hasClass:function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},setInnerHtml:function(e){return this.innerHtml=e,this},getInnerHtml:function(){return this.innerHtml||""},toString:function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),o.AnchorTagBuilder=o.Util.extend(Object,{constructor:function(e){o.Util.assign(this,e)},build:function(e){return new o.HtmlTag({tagName:"a",attrs:this.createAttrs(e.getType(),e.getAnchorHref()),innerHtml:this.processAnchorText(e.getAnchorText())})},createAttrs:function(e,t){var n={href:t},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank"),n},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(e){return o.Util.ellipsis(e,this.truncate||Number.POSITIVE_INFINITY)}}),o.htmlParser.HtmlParser=o.Util.extend(Object,{htmlRegex:(e=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,t=/[^\s\0"'>\/=\x01-\x1F\x7F]+/.source+"(?:\\s*=\\s*"+e.source+")?",new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",t,"|",e.source+")",")*",">",")","|","(?:","<(/)?","("+/[0-9a-zA-Z][0-9a-zA-Z:]*/.source+")","(?:","\\s+",t,")*","\\s*/?",">",")"].join(""),"gi")),htmlCharacterEntitiesRegex:/( | |<|<|>|>|"|"|')/gi,parse:function(e){for(var t,n,r=this.htmlRegex,o=0,i=[];null!==(t=r.exec(e));){var a=t[0],u=t[1]||t[3],s=!!t[2],l=e.substring(o,t.index)Line truncated
|
||||||
//# sourceMappingURL=swagger-ui-bundle.js.map
|
//# sourceMappingURL=swagger-ui-bundle.js.map
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SwaggerUIStandalonePreset=e():t.SwaggerUIStandalonePreset=e()}(this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist",n(n.s=206)}([function(t,e,n){"use strict";var r=n(52),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];t.exports=function(t,e){var n,u;if(e=e||{},Object.keys(e).forEach(function(e){if(-1===i.indexOf(e))throw new r('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(n=e.styleAliases||null,u={},null!==n&&Object.keys(n).forEach(function(t){n[t].forEach(function(e){u[String(e)]=t})}),u),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},function(t,e,n){var r=n(133)("wks"),i=n(98),o=n(5).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,e){var n=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(5),i=n(19),o=n(17),u=n(30),s=n(60),a=function(t,e,n){var c,f,l,p,h=t&a.F,d=t&a.G,y=t&a.S,v=t&a.P,g=t&a.B,w=d?r:y?r[e]||(r[e]={}):(r[e]||{}).prototype,M=d?i:i[e]||(i[e]={}),m=M.prototype||(M.prototype={});for(c in d&&(n=e),n)l=((f=!h&&w&&void 0!==w[c])?w:n)[c],p=g&&f?s(l,r):v&&"function"==typeof l?s(Function.call,l):l,w&&u(w,c,l,t&a.U),M[c]!=l&&o(M,c,p),v&&m[c]!=l&&(m[c]=l)};r.core=i,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var r=n(3),i=n(43),o=n(10),u=/"/g,s=function(t,e,n,r){var i=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(u,""")+'"'),s+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(93)("wks"),i=n(55),o=n(9).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(169),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,n){var r=n(9),i=n(2),o=n(126),u=n(26),s=n(16),a=function(t,e,n){var c,f,l,p=t&a.F,h=t&a.G,d=t&a.S,y=t&a.P,v=t&a.B,g=t&a.W,w=h?i:i[e]||(i[e]={}),M=w.prototype,m=h?r:d?r[e]:(r[e]||{}).prototype;for(c in h&&(n=e),n)(f=!p&&m&&void 0!==m[c])&&s(w,c)||(l=f?m[c]:n[c],w[c]=h&&"function"!=typeof m[c]?n[c]:v&&f?o(l,r):g&&m[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):y&&"function"==typeof l?o(Function.call,l):l,y&&((w.virtual||(w.virtual={}))[c]=l,t&a.R&&M&&!M[c]&&u(M,c,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var r=n(27),i=n(127),o=n(89),u=Object.defineProperty;e.f=n(15)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(29)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(tLine truncated
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SwaggerUIStandalonePreset=e():t.SwaggerUIStandalonePreset=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist",n(n.s=206)}([function(t,e,n){"use strict";var r=n(52),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];t.exports=function(t,e){var n,u;if(e=e||{},Object.keys(e).forEach(function(e){if(-1===i.indexOf(e))throw new r('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(n=e.styleAliases||null,u={},null!==n&&Object.keys(n).forEach(function(t){n[t].forEach(function(e){u[String(e)]=t})}),u),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},function(t,e,n){var r=n(133)("wks"),i=n(97),o=n(3).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(3),i=n(10),o=n(18),u=n(29),a=n(61),s=function(t,e,n){var c,f,l,p,h=t&s.F,d=t&s.G,v=t&s.S,y=t&s.P,g=t&s.B,m=d?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,_=d?i:i[e]||(i[e]={}),b=_.prototype||(_.prototype={});for(c in d&&(n=e),n)l=((f=!h&&m&&void 0!==m[c])?m:n)[c],p=g&&f?a(l,r):y&&"function"==typeof l?a(Function.call,l):l,m&&u(m,c,l,t&s.U),_[c]!=l&&o(_,c,p),y&&b[c]!=l&&(b[c]=l)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){var r=n(4),i=n(42),o=n(11),u=/"/g,a=function(t,e,n,r){var i=String(o(t)),a="<"+e;return""!==n&&(a+=" "+n+'="'+String(r).replace(u,""")+'"'),a+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(a),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){var r=n(91)("wks"),i=n(56),o=n(9).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(169),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,n){var r=n(9),i=n(2),o=n(126),u=n(25),a=n(17),s=function(t,e,n){var c,f,l,p=t&s.F,h=t&s.G,d=t&s.S,v=t&s.P,y=t&s.B,g=t&s.W,m=h?i:i[e]||(i[e]={}),_=m.prototype,b=h?r:d?r[e]:(r[e]||{}).prototype;for(c in h&&(n=e),n)(f=!p&&b&&void 0!==b[c])&&a(m,c)||(l=f?b[c]:n[c],m[c]=h&&"function"!=typeof b[c]?n[c]:y&&f?o(l,r):g&&b[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((m.virtual||(m.virtual={}))[c]=l,t&s.R&&_&&!_[c]&&u(_,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){var r=n(26),i=n(127),o=n(87),u=Object.defineProperty;e.f=n(16)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(28)(function(){return 7!=Object.defineProperty({},"a",{get:function(){rLine truncated
|
||||||
/*
|
/*
|
||||||
object-assign
|
object-assign
|
||||||
(c) Sindre Sorhus
|
(c) Sindre Sorhus
|
||||||
@license MIT
|
@license MIT
|
||||||
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),a=1;a<arguments.length;a++){for(var c in n=Object(arguments[a]))i.call(n,c)&&(s[c]=n[c]);if(r){u=r(n);for(var f=0;f<u.length;f++)o.call(n,u[f])&&(s[u[f]]=n[u[f]])}}return s}},function(t,e,n){var r=n(343);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(69),i=n(345),o=n(346),u="[object Null]",s="[object Undefined]",a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:u:a&&a in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(e,n(68).Buffer)},function(t,e,n){"use strict";function r(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},t.exports=r},function(t,e,n){"use strict";var r=n(38);t.exports=new r({include:[n(202)],implicit:[n(532),n(533)],explicit:[n(534),n(535),n(536),n(537)]})},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(87);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(18),i=n(224),o=n(225),u=Object.defineProperty;e.f=n(42)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(61);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(230),i=n(10);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";var r=n(17),i=n(30),o=n(43),u=n(10),s=n(1);t.exports=function(t,e,n){var a=s(t),c=n(u,a,""[t]),f=c[0],l=c[1];o(function(){var e={};return e[a]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,f),r(RegExp.prototype,a,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)}))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";t.exports=function(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.Line truncated
|
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,a=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))i.call(n,c)&&(a[c]=n[c]);if(r){u=r(n);for(var f=0;f<u.length;f++)o.call(n,u[f])&&(a[u[f]]=n[u[f]])}}return a}},function(t,e,n){"use strict";var r=function(t){};t.exports=function(t,e,n,i,o,u,a,s){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,i,o,u,a,s],l=0;(c=new Error(e.replace(/%s/g,function(){return f[l++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(t,e,n){var r=n(344);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(68),i=n(346),o=n(347),u="[object Null]",a="[object Undefined]",s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:u:s&&s in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(e,n(67).Buffer)},function(t,e,n){"use strict";function r(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},t.exports=r},function(t,e,n){"use strict";var r=n(37);t.exports=new r({include:[n(202)],implicit:[n(532),n(533)],explicit:[n(534),n(535),n(536),n(537)]})},function(t,e){t.exports=!0},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(86);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(19),i=n(224),o=n(225),u=Object.defineProperty;e.f=n(41)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(62);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(230),i=n(11);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";var r=n(18),i=n(29),o=n(42),u=n(11),a=n(1);t.exports=function(t,e,n){var s=a(t),c=n(u,s,""[t]),f=c[0],l=c[1];o(function(){var e={};return e[s]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,f),r(RegExp.prototype,s,2==e?function(t,e){return l.call(t,this,e)}:function(t){returnLine truncated
|
||||||
/*!
|
/*!
|
||||||
* The buffer module from node.js, for the browser.
|
* The buffer module from node.js, for the browser.
|
||||||
*
|
*
|
||||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
var r=n(325),i=n(326),o=n(167);function u(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(u()<e)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=a.prototype:(null===t&&(t=new a(e)),t.length=e),t}function a(t,e,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);a.TYPED_ARRAY_SUPPORT?(t=e).__proto__=a.prototype:t=p(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=s(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(a.isBuffer(e)){var n=0|h(e.length);return 0===(t=s(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|h(e)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|h(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return R(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(r)return R(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=a.from(e,r)),a.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,u=1,s=t.length,a=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;u=2,s/=2,a/=2,n/=2}function c(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(i){var f=-1;for(o=n;o<s;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===a)return f*u}else-1!==f&&(o-=o-f),f=-1}else for(n+a>s&&(n=s-a),o=n;o>=0;o--){for(var l=!0,p=0;p<a;p++)if(c(t,o+p)!==c(e,p)){l=!1;break}if(l)return o}return-1}function w(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var s=parseInt(e.substr(2*u,2),16);if(isNaN(s))return u;t[n+u]=s}return u}function M(t,e,n,r){return Q(R(e,t.length-n),t,n,r)}function m(t,e,n,r){return Q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function L(t,e,n,r){return m(t,e,n,r)}function _(t,e,n,r){return Q(F(e),t,n,r)}function j(t,e,n,r){return Q(function(t,e){for(var n,r,i,o=[],u=0;u<t.length&&!((e-=2)<0);++u)n=t.charCodeAt(u),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function b(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function x(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,u,s,a,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(a=(31&c)<<6|63&o)>127&&(f=a);break;case 3:o=t[i+1],u=t[i+2],128=Line truncated
|
var r=n(326),i=n(327),o=n(167);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(u()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=p(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(s.isBuffer(e)){var n=0|h(e.length);return 0===(t=a(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?a(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=a(t,e<0?0:0|h(e)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|h(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,u=1,a=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;u=2,a/=2,s/=2,n/=2}function c(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(i){var f=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===s)return f*u}else-1!==f&&(o-=o-f),f=-1}else for(n+s>a&&(n=a-s),o=n;o>=0;o--){for(var l=!0,p=0;p<s;p++)if(c(t,o+p)!==c(e,p)){l=!1;break}if(l)return o}return-1}function m(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var a=parseInt(e.substr(2*u,2),16);if(isNaN(a))return u;t[n+u]=a}return u}function _(t,e,n,r){return q(U(e,t.length-n),t,n,r)}function b(t,e,n,r){return q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return b(t,e,n,r)}function x(t,e,n,r){return q(B(e),t,n,r)}function S(t,e,n,r){return q(function(t,e){for(var n,r,i,o=[],u=0;u<t.length&&!((e-=2)<0);++u)n=t.charCodeAt(u),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,u,a,s,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(f=s);break;case 3:o=t[i+1],u=t[i+2],128=Line truncated
|
||||||
//# sourceMappingURL=swagger-ui-standalone-preset.js.map
|
//# sourceMappingURL=swagger-ui-standalone-preset.js.map
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
.swagger-ui{
|
.swagger-ui{
|
||||||
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */font-family:sans-serif;color:#3b4151}.swagger-ui html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.swagger-ui body{margin:0}.swagger-ui article,.swagger-ui aside,.swagger-ui footer,.swagger-ui header,.swagger-ui nav,.swagger-ui section{display:block}.swagger-ui h1{font-size:2em;margin:.67em 0}.swagger-ui figcaption,.swagger-ui figure,.swagger-ui main{display:block}.swagger-ui figure{margin:1em 40px}.swagger-ui hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}.swagger-ui pre{font-family:monospace,monospace;font-size:1em}.swagger-ui a{background-color:transparent;-webkit-text-decoration-skip:objects}.swagger-ui abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.swagger-ui b,.swagger-ui strong{font-weight:inherit;font-weight:bolder}.swagger-ui code,.swagger-ui kbd,.swagger-ui samp{font-family:monospace,monospace;font-size:1em}.swagger-ui dfn{font-style:italic}.swagger-ui mark{background-color:#ff0;color:#000}.swagger-ui small{font-size:80%}.swagger-ui sub,.swagger-ui sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.swagger-ui sub{bottom:-.25em}.swagger-ui sup{top:-.5em}.swagger-ui audio,.swagger-ui video{display:inline-block}.swagger-ui audio:not([controls]){display:none;height:0}.swagger-ui img{border-style:none}.swagger-ui svg:not(:root){overflow:hidden}.swagger-ui button,.swagger-ui input,.swagger-ui optgroup,.swagger-ui select,.swagger-ui textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.swagger-ui button,.swagger-ui input{overflow:visible}.swagger-ui button,.swagger-ui select{text-transform:none}.swagger-ui [type=reset],.swagger-ui [type=submit],.swagger-ui button,.swagger-ui html [type=button]{-webkit-appearance:button}.swagger-ui [type=button]::-moz-focus-inner,.swagger-ui [type=reset]::-moz-focus-inner,.swagger-ui [type=submit]::-moz-focus-inner,.swagger-ui button::-moz-focus-inner{border-style:none;padding:0}.swagger-ui [type=button]:-moz-focusring,.swagger-ui [type=reset]:-moz-focusring,.swagger-ui [type=submit]:-moz-focusring,.swagger-ui button:-moz-focusring{outline:1px dotted ButtonText}.swagger-ui fieldset{padding:.35em .75em .625em}.swagger-ui legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}.swagger-ui progress{display:inline-block;vertical-align:baseline}.swagger-ui textarea{overflow:auto}.swagger-ui [type=checkbox],.swagger-ui [type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}.swagger-ui [type=number]::-webkit-inner-spin-button,.swagger-ui [type=number]::-webkit-outer-spin-button{height:auto}.swagger-ui [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.swagger-ui [type=search]::-webkit-search-cancel-button,.swagger-ui [type=search]::-webkit-search-decoration{-webkit-appearance:none}.swagger-ui ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.swagger-ui details,.swagger-ui menu{display:block}.swagger-ui summary{display:list-item}.swagger-ui canvas{display:inline-block}.swagger-ui [hidden],.swagger-ui template{display:none}.swagger-ui .debug *{outline:1px solid gold}.swagger-ui .debug-white *{outline:1px solid #fff}.swagger-ui .debug-black *{outline:1px solid #000}.swagger-ui .debug-grid{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTRDOTY4N0U2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTRDOTY4N0Q2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3NjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3NzY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsBS+GMAAAAjSURBVHjaYvz//z8DLsD4gcGXiYEAGBIKGBne//fFpwAgwAB98AaF2pjlUQAAAABJRU5ErkJggg==) repeat 0 0}.swagger-ui .debug-grid-16{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54Line truncated
|
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */font-family:sans-serif;color:#3b4151}.swagger-ui html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.swagger-ui body{margin:0}.swagger-ui article,.swagger-ui aside,.swagger-ui footer,.swagger-ui header,.swagger-ui nav,.swagger-ui section{display:block}.swagger-ui h1{font-size:2em;margin:.67em 0}.swagger-ui figcaption,.swagger-ui figure,.swagger-ui main{display:block}.swagger-ui figure{margin:1em 40px}.swagger-ui hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}.swagger-ui pre{font-family:monospace,monospace;font-size:1em}.swagger-ui a{background-color:transparent;-webkit-text-decoration-skip:objects}.swagger-ui abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.swagger-ui b,.swagger-ui strong{font-weight:inherit;font-weight:bolder}.swagger-ui code,.swagger-ui kbd,.swagger-ui samp{font-family:monospace,monospace;font-size:1em}.swagger-ui dfn{font-style:italic}.swagger-ui mark{background-color:#ff0;color:#000}.swagger-ui small{font-size:80%}.swagger-ui sub,.swagger-ui sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.swagger-ui sub{bottom:-.25em}.swagger-ui sup{top:-.5em}.swagger-ui audio,.swagger-ui video{display:inline-block}.swagger-ui audio:not([controls]){display:none;height:0}.swagger-ui img{border-style:none}.swagger-ui svg:not(:root){overflow:hidden}.swagger-ui button,.swagger-ui input,.swagger-ui optgroup,.swagger-ui select,.swagger-ui textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.swagger-ui button,.swagger-ui input{overflow:visible}.swagger-ui button,.swagger-ui select{text-transform:none}.swagger-ui [type=reset],.swagger-ui [type=submit],.swagger-ui button,.swagger-ui html [type=button]{-webkit-appearance:button}.swagger-ui [type=button]::-moz-focus-inner,.swagger-ui [type=reset]::-moz-focus-inner,.swagger-ui [type=submit]::-moz-focus-inner,.swagger-ui button::-moz-focus-inner{border-style:none;padding:0}.swagger-ui [type=button]:-moz-focusring,.swagger-ui [type=reset]:-moz-focusring,.swagger-ui [type=submit]:-moz-focusring,.swagger-ui button:-moz-focusring{outline:1px dotted ButtonText}.swagger-ui fieldset{padding:.35em .75em .625em}.swagger-ui legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}.swagger-ui progress{display:inline-block;vertical-align:baseline}.swagger-ui textarea{overflow:auto}.swagger-ui [type=checkbox],.swagger-ui [type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}.swagger-ui [type=number]::-webkit-inner-spin-button,.swagger-ui [type=number]::-webkit-outer-spin-button{height:auto}.swagger-ui [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.swagger-ui [type=search]::-webkit-search-cancel-button,.swagger-ui [type=search]::-webkit-search-decoration{-webkit-appearance:none}.swagger-ui ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.swagger-ui details,.swagger-ui menu{display:block}.swagger-ui summary{display:list-item}.swagger-ui canvas{display:inline-block}.swagger-ui [hidden],.swagger-ui template{display:none}.swagger-ui .debug *{outline:1px solid gold}.swagger-ui .debug-white *{outline:1px solid #fff}.swagger-ui .debug-black *{outline:1px solid #000}.swagger-ui .debug-grid{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTRDOTY4N0U2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTRDOTY4N0Q2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3NjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3NzY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsBS+GMAAAAjSURBVHjaYvz//z8DLsD4gcGXiYEAGBIKGBne//fFpwAgwAB98AaF2pjlUQAAAABJRU5ErkJggg==) repeat 0 0}.swagger-ui .debug-grid-16{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54Line truncated
|
||||||
/*# sourceMappingURL=swagger-ui.css.map*/
|
/*# sourceMappingURL=swagger-ui.css.map*/
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory();else if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")exports["SwaggerUICore"]=factory();else root["SwaggerUICore"]=factory()})(typeof self!=="undefined"?self:this,function(){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter})}};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="/dist";return __webpack_require__(__webpack_require__.s=287)}([function(module,exports){module.exports=require("react")},function(module,exports){module.exports=require("prop-types")},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;exports.default=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;var _defineProperty=__webpack_require__(179);var _defineProperty2=_interopRequireDefault(_defineProperty);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;(0,_defineProperty2.default)(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}()},function(module,exports,__webpack_require__){module.exports={default:__webpack_require__(530),__esModule:true}},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;var _typeof2=__webpack_require__(37);var _typeof3=_interopRequireDefault(_typeof2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&((typeof call==="undefined"?"undefined":(0,_typeof3.default)(call))==="object"||typeof call==="function")?call:self}},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;var _setPrototypeOf=__webpack_require__(532);var _setPrototypeOf2=_interopRequireDefault(_setPrototypeOf);var _create=__webpack_require__(536);var _create2=_interopRequireDefault(_create);var _typeof2=__webpack_require__(37);var _typeof3=_interopRequireDefault(_typeof2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+(typeof superClass==="undefined"?"undefined":(0,_typeof3.default)(superClass)))}subClass.prototype=(0,_create2.default)(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)_setPrototypeOf2.default?(0,_setPrototypeOf2.default)(subClass,superClass):subClass.__proto__=superClass}},function(module,exports){module.exports=require("immutable")},function(module,exports,__webpack_require__){"use strict";(function(Buffer){Object.defineProperty(exports,"__esModule",{value:true});exports.getCommonExtensions=exports.getExtensions=exports.escapeDeepLinkPath=exports.createDeepLinkPath=exports.shallowEqualKeys=exports.buildFormData=exports.sorters=exports.btoa=exports.serializeSearch=exports.parseSearch=exports.getSampleSchema=exports.validateParam=exports.validatePattern=exports.validateMinLength=exports.validateMaxLength=exports.validateGuid=exports.validateDateTime=exports.validateString=exports.validateBoolean=exports.validateFile=exports.validateInteger=exports.validateNumber=exports.validateMinimum=exports.validateMaximum=exports.propChecker=exports.memoize=exports.isImmutable=undefined;var _stringify=__webpack_require__(30);var _stringify2=_interopRequireDefault(_stringiLine truncated
|
||||||
|
/*!
|
||||||
|
* The buffer module from node.js, for the browser.
|
||||||
|
*
|
||||||
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
var base64=__webpack_require__(383);var ieee754=__webpack_require__(384);var isArray=__webpack_require__(385);exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length){throw new RangeError("Invalid typed array length")}if(Buffer.TYPED_ARRAY_SUPPORT){that=new Uint8Array(length);that.__proto__=Buffer.prototype}else{if(that===null){that=new Buffer(length)}that.length=length}return that}function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length)}if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}Buffer.poolSize=8192;Buffer._augment=function(arr){arr.__proto__=Buffer.prototype;return arr};function from(that,value,encodingOrOffset,length){if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){return fromArrayBuffer(that,value,encodingOrOffset,length)}if(typeof value==="string"){return fromString(that,value,encodingOrOffset)}return fromObject(that,value)}Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)};if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true})}}function assertSize(size){if(typeof size!=="number"){throw new TypeError('"size" argument must be a number')}else if(size<0){throw new RangeError('"size" argument must not be negative')}}function alloc(that,size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(that,size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill)}return createBuffer(that,size)}Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)};function allocUnsafe(that,size){assertSize(size);that=createBuffer(that,size<0?0:checked(size)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<size;++i){that[i]=0}}return that}Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)};function fromString(that,string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError('"encoding" must be a valid string encoding')}var length=byteLength(string,encoding)|0;that=createBuffer(that,length);var actual=that.write(string,encoding);if(actual!==length){that=that.slice(0,actual)}return that}function fromArrayLike(that,array){var length=array.length<0?0:checked(array.length)|0;that=createBuffer(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}function fromArrayBuffer(that,array,byteOffset,length){array.byteLength;if(byteOffset<0||array.byteLength<byteOffset){throw new RangeError("'offset' is out of bounds")}if(array.byteLength<byteOffset+(length||0)){throw new RangeError("'length' is out of bounds")}if(byteOffset===undefined&&length===undefined){array=new Uint8Array(array)}else if(length===undefined){array=new Uint8Array(array,byteOffset)}else{array=new Uint8Array(array,byteOffset,length)}if(Buffer.TYPED_ARRAY_SUPPORT){that=array;that.__proto__=Buffer.prototype}else{that=fromArrayLike(that,array)}return that}function fromObject(that,obj){if(Buffer.isBuffer(obj)){var len=checked(obj.length)|0;that=createBuffer(that,len);if(that.length===0){return that}obj.copy(that,0,0,len);return that}if(obj){if(typeof ArrayBuffer!=="undefined"&&obj.buffer instanceof ArrayBuffer||"length"in obj){if(typeof obj.length!=="number"||isnan(obj.length)){return createBuffer(that,0)}return fromArrayLike(that,obj)}if(obj.type==="Buffer"&&isArray(obj.data)){return fromArrayLike(that,obj.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){returnLine truncated
|
||||||
|
//# sourceMappingURL=swagger-ui.js.map
|
||||||
@@ -1,24 +1,36 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
var currentPath = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
var currentPath = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
||||||
var defaultSpecUrl = currentPath + '?format=openapi';
|
var specURL = currentPath + '?format=openapi';
|
||||||
|
|
||||||
function slugify(text) {
|
function patchSwaggerUi() {
|
||||||
return text.toString().toLowerCase()
|
var authWrapper = document.querySelector('.auth-wrapper');
|
||||||
.replace(/\s+/g, '-') // Replace spaces with -
|
var authorizeButton = document.querySelector('.auth-wrapper .authorize');
|
||||||
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
|
var djangoSessionAuth = document.querySelector('#django-session-auth');
|
||||||
.replace(/--+/g, '-') // Replace multiple - with single -
|
if (!djangoSessionAuth) {
|
||||||
.replace(/^-+/, '') // Trim - from start of text
|
console.log("WARNING: session auth disabled");
|
||||||
.replace(/-+$/, ''); // Trim - from end of text
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.querySelector('.auth-wrapper #django-session-auth')) {
|
||||||
|
console.log("WARNING: session auth already patched; skipping patchSwaggerUi()");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
authWrapper.insertBefore(djangoSessionAuth, authorizeButton);
|
||||||
|
djangoSessionAuth.classList.remove("hidden");
|
||||||
|
|
||||||
|
var divider = document.createElement("div");
|
||||||
|
divider.classList.add("divider");
|
||||||
|
authWrapper.insertBefore(divider, authorizeButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
var KEY_AUTH = slugify(window.location.pathname) + "-drf-yasg-auth";
|
function initSwaggerUi() {
|
||||||
|
if (window.ui) {
|
||||||
// load the saved authorization state from localStorage; ImmutableJS is used for consistency with swagger-ui state
|
console.log("WARNING: skipping initSwaggerUi() because window.ui is already defined");
|
||||||
var savedAuth = Immutable.fromJS({});
|
return;
|
||||||
|
}
|
||||||
// global SwaggerUI config object; can be changed directly or by hooking initSwaggerUiConfig
|
var swaggerConfig = {
|
||||||
var swaggerUiConfig = {
|
url: specURL,
|
||||||
url: defaultSpecUrl,
|
|
||||||
dom_id: '#swagger-ui',
|
dom_id: '#swagger-ui',
|
||||||
displayRequestDuration: true,
|
displayRequestDuration: true,
|
||||||
presets: [
|
presets: [
|
||||||
@@ -36,350 +48,39 @@ var swaggerUiConfig = {
|
|||||||
if (csrftoken) {
|
if (csrftoken) {
|
||||||
headers["X-CSRFToken"] = csrftoken.value;
|
headers["X-CSRFToken"] = csrftoken.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function patchSwaggerUi() {
|
|
||||||
if (document.querySelector('.auth-wrapper #django-session-auth')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var authWrapper = document.querySelector('.auth-wrapper');
|
|
||||||
var authorizeButton = document.querySelector('.auth-wrapper .authorize');
|
|
||||||
var djangoSessionAuth = document.querySelector('#django-session-auth');
|
|
||||||
|
|
||||||
if (!djangoSessionAuth) {
|
|
||||||
console.log("WARNING: session auth disabled");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
djangoSessionAuth = djangoSessionAuth.cloneNode(true);
|
|
||||||
authWrapper.insertBefore(djangoSessionAuth, authorizeButton);
|
|
||||||
djangoSessionAuth.classList.remove("hidden");
|
|
||||||
}
|
|
||||||
|
|
||||||
function initSwaggerUi() {
|
|
||||||
if (window.ui) {
|
|
||||||
console.log("WARNING: skipping initSwaggerUi() because window.ui is already defined");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (document.querySelector('.auth-wrapper .authorize')) {
|
|
||||||
patchSwaggerUi();
|
|
||||||
} else {
|
|
||||||
insertionQ('.auth-wrapper .authorize').every(patchSwaggerUi);
|
|
||||||
}
|
|
||||||
|
|
||||||
var swaggerSettings = JSON.parse(document.getElementById('swagger-settings').innerHTML);
|
var swaggerSettings = JSON.parse(document.getElementById('swagger-settings').innerHTML);
|
||||||
|
if (!('oauth2RedirectUrl' in swaggerSettings)) {
|
||||||
var oauth2RedirectUrl = document.getElementById('oauth2-redirect-url');
|
var oauth2RedirectUrl = document.getElementById('oauth2-redirect-url');
|
||||||
if (oauth2RedirectUrl) {
|
|
||||||
if (!('oauth2RedirectUrl' in swaggerSettings)) {
|
|
||||||
if (oauth2RedirectUrl) {
|
if (oauth2RedirectUrl) {
|
||||||
swaggerSettings['oauth2RedirectUrl'] = oauth2RedirectUrl.href;
|
swaggerSettings['oauth2RedirectUrl'] = oauth2RedirectUrl.href;
|
||||||
}
|
|
||||||
}
|
|
||||||
oauth2RedirectUrl.parentNode.removeChild(oauth2RedirectUrl);
|
oauth2RedirectUrl.parentNode.removeChild(oauth2RedirectUrl);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
console.log('swaggerSettings', swaggerSettings);
|
console.log('swaggerSettings', swaggerSettings);
|
||||||
|
for (var p in swaggerSettings) {
|
||||||
|
if (swaggerSettings.hasOwnProperty(p)) {
|
||||||
|
swaggerConfig[p] = swaggerSettings[p];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.ui = SwaggerUIBundle(swaggerConfig);
|
||||||
|
|
||||||
var oauth2Config = JSON.parse(document.getElementById('oauth2-config').innerHTML);
|
var oauth2Config = JSON.parse(document.getElementById('oauth2-config').innerHTML);
|
||||||
console.log('oauth2Config', oauth2Config);
|
console.log('oauth2Config', oauth2Config);
|
||||||
|
|
||||||
initSwaggerUiConfig(swaggerSettings, oauth2Config);
|
|
||||||
window.ui = SwaggerUIBundle(swaggerUiConfig);
|
|
||||||
window.ui.initOAuth(oauth2Config);
|
window.ui.initOAuth(oauth2Config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
window.onload = function () {
|
||||||
* Initialize the global swaggerUiConfig with any given additional settings.
|
initSwaggerUi();
|
||||||
* @param swaggerSettings SWAGGER_SETTINGS from Django settings
|
};
|
||||||
* @param oauth2Settings OAUTH2_CONFIG from Django settings
|
|
||||||
*/
|
|
||||||
function initSwaggerUiConfig(swaggerSettings, oauth2Settings) {
|
|
||||||
var persistAuth = swaggerSettings.persistAuth;
|
|
||||||
var refetchWithAuth = swaggerSettings.refetchWithAuth;
|
|
||||||
var refetchOnLogout = swaggerSettings.refetchOnLogout;
|
|
||||||
var fetchSchemaWithQuery = swaggerSettings.fetchSchemaWithQuery;
|
|
||||||
delete swaggerSettings['persistAuth'];
|
|
||||||
delete swaggerSettings['refetchWithAuth'];
|
|
||||||
delete swaggerSettings['refetchOnLogout'];
|
|
||||||
delete swaggerSettings['fetchSchemaWithQuery'];
|
|
||||||
|
|
||||||
for (var p in swaggerSettings) {
|
if (document.querySelector('.auth-wrapper .authorize')) {
|
||||||
if (swaggerSettings.hasOwnProperty(p)) {
|
patchSwaggerUi();
|
||||||
swaggerUiConfig[p] = swaggerSettings[p];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var specURL = swaggerUiConfig.url;
|
|
||||||
if (fetchSchemaWithQuery) {
|
|
||||||
// only add query params from document for the first spec request
|
|
||||||
// this ensures we otherwise honor the spec selector box which might be manually modified
|
|
||||||
var query = new URLSearchParams(window.location.search || '').entries();
|
|
||||||
for (var it = query.next(); !it.done; it = query.next()) {
|
|
||||||
specURL = setQueryParam(specURL, it.value[0], it.value[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (persistAuth) {
|
|
||||||
try {
|
|
||||||
savedAuth = Immutable.fromJS(JSON.parse(localStorage.getItem(KEY_AUTH)) || {});
|
|
||||||
} catch (e) {
|
|
||||||
localStorage.removeItem(KEY_AUTH);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (refetchWithAuth) {
|
|
||||||
specURL = applyAuth(savedAuth, specURL) || specURL;
|
|
||||||
}
|
|
||||||
swaggerUiConfig.url = specURL;
|
|
||||||
|
|
||||||
if (persistAuth || refetchWithAuth) {
|
|
||||||
var hookedAuth = false;
|
|
||||||
|
|
||||||
var oldOnComplete = swaggerUiConfig.onComplete;
|
|
||||||
swaggerUiConfig.onComplete = function () {
|
|
||||||
if (persistAuth) {
|
|
||||||
preauthorizeAll(savedAuth, window.ui);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!hookedAuth) {
|
|
||||||
hookAuthActions(window.ui, persistAuth, refetchWithAuth, refetchOnLogout);
|
|
||||||
hookedAuth = true;
|
|
||||||
}
|
|
||||||
if (oldOnComplete) {
|
|
||||||
oldOnComplete();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var specRequestsInFlight = {};
|
|
||||||
var oldRequestInterceptor = swaggerUiConfig.requestInterceptor;
|
|
||||||
swaggerUiConfig.requestInterceptor = function (request) {
|
|
||||||
var headers = request.headers || {};
|
|
||||||
if (request.loadSpec) {
|
|
||||||
var newUrl = request.url;
|
|
||||||
if (refetchWithAuth) {
|
|
||||||
newUrl = applyAuth(savedAuth, newUrl, headers) || newUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newUrl !== request.url) {
|
|
||||||
request.url = newUrl;
|
|
||||||
|
|
||||||
if (window.ui) {
|
|
||||||
// this visually updates the spec url before the request is done, i.e. while loading
|
|
||||||
window.ui.specActions.updateUrl(request.url);
|
|
||||||
} else {
|
|
||||||
// setTimeout is needed here because the request interceptor can be called *during*
|
|
||||||
// window.ui initialization (by the SwaggerUIBundle constructor)
|
|
||||||
setTimeout(function () {
|
|
||||||
window.ui.specActions.updateUrl(request.url);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// need to manually remember requests for spec urls because
|
|
||||||
// responseInterceptor has no reference to the request...
|
|
||||||
var absUrl = new URL(request.url, currentPath);
|
|
||||||
specRequestsInFlight[absUrl.href] = request.url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oldRequestInterceptor) {
|
|
||||||
request = oldRequestInterceptor(request);
|
|
||||||
}
|
|
||||||
return request;
|
|
||||||
};
|
|
||||||
|
|
||||||
var oldResponseInterceptor = swaggerUiConfig.responseInterceptor;
|
|
||||||
swaggerUiConfig.responseInterceptor = function (response) {
|
|
||||||
var absUrl = new URL(response.url, currentPath);
|
|
||||||
if (absUrl.href in specRequestsInFlight) {
|
|
||||||
var setToUrl = specRequestsInFlight[absUrl.href];
|
|
||||||
delete specRequestsInFlight[absUrl.href];
|
|
||||||
if (response.ok) {
|
|
||||||
// need setTimeout here because swagger-ui insists to call updateUrl
|
|
||||||
// with the initial request url after the response...
|
|
||||||
setTimeout(function () {
|
|
||||||
var currentUrl = new URL(window.ui.specSelectors.url(), currentPath);
|
|
||||||
if (currentUrl.href !== absUrl.href) {
|
|
||||||
window.ui.specActions.updateUrl(setToUrl);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oldResponseInterceptor) {
|
|
||||||
response = oldResponseInterceptor(response);
|
|
||||||
}
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
function _usp(url, fn) {
|
insertionQ('.auth-wrapper .authorize').every(patchSwaggerUi);
|
||||||
url = url.split('?');
|
|
||||||
var usp = new URLSearchParams(url[1] || '');
|
|
||||||
fn(usp);
|
|
||||||
url[1] = usp.toString();
|
|
||||||
return url[1] ? url.join('?') : url[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setQueryParam(url, key, value) {
|
|
||||||
return _usp(url, function (usp) {
|
|
||||||
usp.set(key, value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeQueryParam(url, key) {
|
|
||||||
return _usp(url, function (usp) {
|
|
||||||
usp.delete(key);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Call sui.preauthorize### for all authorizations in authorization.
|
|
||||||
* @param authorization authorization object {key => authScheme} saved from authActions.authorize
|
|
||||||
* @param sui SwaggerUI or SwaggerUIBundle instance
|
|
||||||
*/
|
|
||||||
function preauthorizeAll(authorization, sui) {
|
|
||||||
authorization.valueSeq().forEach(function (authScheme) {
|
|
||||||
var schemeName = authScheme.get("name"), schemeType = authScheme.getIn(["schema", "type"]);
|
|
||||||
if (schemeType === "basic" && schemeName) {
|
|
||||||
var username = authScheme.getIn(["value", "username"]);
|
|
||||||
var password = authScheme.getIn(["value", "password"]);
|
|
||||||
if (username && password) {
|
|
||||||
sui.preauthorizeBasic(schemeName, username, password);
|
|
||||||
}
|
|
||||||
} else if (schemeType === "apiKey" && schemeName) {
|
|
||||||
var key = authScheme.get("value");
|
|
||||||
if (key) {
|
|
||||||
sui.preauthorizeApiKey(schemeName, key);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// TODO: OAuth2
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Manually apply auth headers from the given auth object.
|
|
||||||
* @param {object} authorization authorization object {key => authScheme} saved from authActions.authorize
|
|
||||||
* @param {string} requestUrl the request url
|
|
||||||
* @param {object} requestHeaders target headers, modified in place by the function
|
|
||||||
* @return string new request url
|
|
||||||
*/
|
|
||||||
function applyAuth(authorization, requestUrl, requestHeaders) {
|
|
||||||
authorization.valueSeq().forEach(function (authScheme) {
|
|
||||||
requestHeaders = requestHeaders || {};
|
|
||||||
var schemeName = authScheme.get("name"), schemeType = authScheme.getIn(["schema", "type"]);
|
|
||||||
if (schemeType === "basic" && schemeName) {
|
|
||||||
var username = authScheme.getIn(["value", "username"]);
|
|
||||||
var password = authScheme.getIn(["value", "password"]);
|
|
||||||
if (username && password) {
|
|
||||||
requestHeaders["Authorization"] = "Basic " + btoa(username + ":" + password);
|
|
||||||
}
|
|
||||||
} else if (schemeType === "apiKey" && schemeName) {
|
|
||||||
var _in = authScheme.getIn(["schema", "in"]), paramName = authScheme.getIn(["schema", "name"]);
|
|
||||||
var key = authScheme.get("value");
|
|
||||||
if (key && paramName) {
|
|
||||||
if (_in === "header") {
|
|
||||||
requestHeaders[paramName] = key;
|
|
||||||
}
|
|
||||||
if (_in === "query") {
|
|
||||||
if (requestUrl) {
|
|
||||||
requestUrl = setQueryParam(requestUrl, paramName, key);
|
|
||||||
} else {
|
|
||||||
console.warn("WARNING: cannot apply apiKey query parameter via interceptor");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// TODO: OAuth2
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return requestUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the given authorization scheme from the url.
|
|
||||||
* @param {object} authorization authorization object {key => authScheme} containing schemes to deauthorize
|
|
||||||
* @param {string} requestUrl request url
|
|
||||||
* @return string new request url
|
|
||||||
*/
|
|
||||||
function deauthUrl(authorization, requestUrl) {
|
|
||||||
authorization.valueSeq().forEach(function (authScheme) {
|
|
||||||
var schemeType = authScheme.getIn(["schema", "type"]);
|
|
||||||
if (schemeType === "apiKey") {
|
|
||||||
var _in = authScheme.getIn(["schema", "in"]), paramName = authScheme.getIn(["schema", "name"]);
|
|
||||||
if (_in === "query" && requestUrl && paramName) {
|
|
||||||
requestUrl = removeQueryParam(requestUrl, paramName);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// TODO: OAuth2?
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return requestUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hook the authorize and logout actions of SwaggerUI.
|
|
||||||
* The hooks are used to persist authorization data and trigger schema refetch.
|
|
||||||
* @param sui SwaggerUI or SwaggerUIBundle instance
|
|
||||||
* @param {boolean} persistAuth true to save auth to local storage
|
|
||||||
* @param {boolean} refetchWithAuth true to trigger schema fetch on login
|
|
||||||
* @param {boolean} refetchOnLogout true to trigger schema fetch on logout
|
|
||||||
*/
|
|
||||||
function hookAuthActions(sui, persistAuth, refetchWithAuth, refetchOnLogout) {
|
|
||||||
if (!persistAuth && !refetchWithAuth) {
|
|
||||||
// nothing to do
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var originalAuthorize = sui.authActions.authorize;
|
|
||||||
sui.authActions.authorize = function (authorization) {
|
|
||||||
originalAuthorize(authorization);
|
|
||||||
// authorization is map of scheme name to scheme object
|
|
||||||
// need to use ImmutableJS because schema is already an ImmutableJS object
|
|
||||||
var newAuths = Immutable.fromJS(authorization);
|
|
||||||
savedAuth = savedAuth.merge(newAuths);
|
|
||||||
|
|
||||||
if (refetchWithAuth) {
|
|
||||||
var url = sui.specSelectors.url();
|
|
||||||
url = applyAuth(savedAuth, url) || url;
|
|
||||||
sui.specActions.updateUrl(url);
|
|
||||||
sui.specActions.download();
|
|
||||||
sui.authActions.showDefinitions(); // hide authorize dialog
|
|
||||||
}
|
|
||||||
if (persistAuth) {
|
|
||||||
localStorage.setItem(KEY_AUTH, JSON.stringify(savedAuth.toJSON()));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var originalLogout = sui.authActions.logout;
|
|
||||||
sui.authActions.logout = function (authorization) {
|
|
||||||
// stash logged out methods for use with deauthUrl
|
|
||||||
var loggedOut = savedAuth.filter(function (val, key) {
|
|
||||||
return authorization.indexOf(key) !== -1;
|
|
||||||
}).mapEntries(function (entry) {
|
|
||||||
return [entry[0], entry[1].set("value", null)]
|
|
||||||
});
|
|
||||||
// remove logged out methods from savedAuth
|
|
||||||
savedAuth = savedAuth.filter(function (val, key) {
|
|
||||||
return authorization.indexOf(key) === -1;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (refetchWithAuth) {
|
|
||||||
var url = sui.specSelectors.url();
|
|
||||||
url = deauthUrl(loggedOut, url) || url;
|
|
||||||
sui.specActions.updateUrl(url);
|
|
||||||
sui.specActions.download(url);
|
|
||||||
sui.authActions.showDefinitions(); // hide authorize dialog
|
|
||||||
}
|
|
||||||
if (persistAuth) {
|
|
||||||
localStorage.setItem(KEY_AUTH, JSON.stringify(savedAuth.toJSON()));
|
|
||||||
}
|
|
||||||
originalLogout(authorization);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('load', initSwaggerUi);
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
(function(t){var e=function(){try{return!!Symbol.iterator}catch(e){return false}};var r=e();var n=function(t){var e={next:function(){var e=t.shift();return{done:e===void 0,value:e}}};if(r){e[Symbol.iterator]=function(){return e}}return e};var i=function(e){return encodeURIComponent(e).replace(/%20/g,"+")};var a=function(e){return decodeURIComponent(e).replace(/\+/g," ")};var o=function(){var a=function(e){Object.defineProperty(this,"_entries",{writable:true,value:{}});if(typeof e==="string"){if(e!==""){this._fromString(e)}}else if(e instanceof a){var r=this;e.forEach(function(e,t){r.append(t,e)})}else if(e!==null&&typeof e==="object"){if(Object.prototype.toString.call(e)==="[object Array]"){for(var t=0;t<e.length;t++){var n=e[t];if(Object.prototype.toString.call(n)==="[object Array]"||n.length!==2){this.append(n[0],n[1])}else{throw new TypeError("Expected [string, any] as entry at index "+t+" of URLSearchParams's input")}}}else{for(var i in e){if(e.hasOwnProperty(i)){this.append(i,e[i])}}}}else{throw new TypeError("Unsupported input's type for URLSearchParams")}};var e=a.prototype;e.append=function(e,t){if(e in this._entries){this._entries[e].push(String(t))}else{this._entries[e]=[String(t)]}};e.delete=function(e){delete this._entries[e]};e.get=function(e){return e in this._entries?this._entries[e][0]:null};e.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]};e.has=function(e){return e in this._entries};e.set=function(e,t){this._entries[e]=[String(t)]};e.forEach=function(e,t){var r;for(var n in this._entries){if(this._entries.hasOwnProperty(n)){r=this._entries[n];for(var i=0;i<r.length;i++){e.call(t,r[i],n,this)}}}};e.keys=function(){var r=[];this.forEach(function(e,t){r.push(t)});return n(r)};e.values=function(){var t=[];this.forEach(function(e){t.push(e)});return n(t)};e.entries=function(){var r=[];this.forEach(function(e,t){r.push([t,e])});return n(r)};if(r){e[Symbol.iterator]=e.entries}e.toString=function(){var r=[];this.forEach(function(e,t){r.push(i(t)+"="+i(e))});return r.join("&")};t.URLSearchParams=a};if(!("URLSearchParams"in t)||new URLSearchParams("?a=1").toString()!=="a=1"){o()}var s=URLSearchParams.prototype;if(typeof s.sort!=="function"){s.sort=function(){var r=this;var n=[];this.forEach(function(e,t){n.push([t,e]);if(!r._entries){r.delete(t)}});n.sort(function(e,t){if(e[0]<t[0]){return-1}else if(e[0]>t[0]){return+1}else{return 0}});if(r._entries){r._entries={}}for(var e=0;e<n.length;e++){this.append(n[e][0],n[e][1])}}}if(typeof s._fromString!=="function"){Object.defineProperty(s,"_fromString",{enumerable:false,configurable:false,writable:false,value:function(e){if(this._entries){this._entries={}}else{var r=this;this.searchParams.forEach(function(e,t){r.delete(t)})}e=e.replace(/^\?/,"");var t=e.split("&");var n;for(var i=0;i<t.length;i++){n=t[i].split("=");this.append(a(n[0]),n.length>1?a(n[1]):"")}}})}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);(function(h){var e=function(){try{var e=new URL("b","http://a");e.pathname="c%20d";return e.href==="http://a/c%20d"&&e.searchParams}catch(e){return false}};var t=function(){var t=h.URL;var e=function(e,t){if(typeof e!=="string")e=String(e);var r=document,n;if(t&&(h.location===void 0||t!==h.location.href)){r=document.implementation.createHTMLDocument("");n=r.createElement("base");n.href=t;r.head.appendChild(n);try{if(n.href.indexOf(t)!==0)throw new Error(n.href)}catch(e){throw new Error("URL unable to set base "+t+" due to "+e)}}var i=r.createElement("a");i.href=e;if(n){r.body.appendChild(i);i.href=i.href}if(i.protocol===":"||!/:/.test(i.href)){throw new TypeError("Invalid URL")}Object.defineProperty(this,"_anchorElement",{value:i});var a=new URLSearchParams(this.search);var o=true;var s=true;var c=this;["append","delete","set"].forEach(function(e){var t=a[e];a[e]=function(){t.apply(a,arguments);if(o){s=false;c.search=a.toString();s=true}}});Object.defineProperty(this,"searchParams",{value:a,enumerable:true});var f=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:false,configurable:false,writable:false,value:function(){if(this.search!==f){f=this.search;if(s){o=false;this.searchParams._fromString(this.search);o=true}}}})};var r=e.prototype;var n=function(t){Object.defineProperty(r,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:true})};["hash","host","hostname","port","protocol"].forEach(function(e){n(e)});Object.defineProperty(r,"search",{get:function(){return this._anchorElement["search"]},set:function(e){this._anchorElement["search"]=e;this._updateSearchParams()},enumerable:true});Object.defineProperties(r,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e;this._updateSearchParams()},enumerable:true},pathname:{get:function(){return this._anchorElement.pathnLine truncated
|
|
||||||
@@ -2,46 +2,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<title>{{ title }}</title>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>{% block title %}{{ title }}{% endblock %}</title>
|
|
||||||
|
|
||||||
{% block extra_head %}
|
|
||||||
{# -- Add any extra HTML heads tags here - except scripts and styles -- #}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block favicon %}
|
|
||||||
{# -- Maybe replace the favicon -- #}
|
|
||||||
<link rel="icon" type="image/png" href="{% static 'drf-yasg/redoc/redoc-logo.png' %}"/>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block main_styles %}
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/style.css' %}"/>
|
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/style.css' %}"/>
|
||||||
{% endblock %}
|
|
||||||
{% block extra_styles %}
|
{% block extra_styles %}
|
||||||
{# -- Add any additional CSS scripts here -- #}
|
{# -- Add any additional CSS scripts here -- #}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
{% block extra_body %}
|
|
||||||
{# -- Add any header/body markup here (rendered BEFORE the swagger-ui/redoc element) -- #}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
<div id="redoc-placeholder"></div>
|
|
||||||
|
|
||||||
{% block footer %}
|
|
||||||
{# -- Add any footer markup here (rendered AFTER the swagger-ui/redoc element) -- #}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
<script id="redoc-settings" type="application/json">{{ redoc_settings | safe }}</script>
|
<script id="redoc-settings" type="application/json">{{ redoc_settings | safe }}</script>
|
||||||
|
|
||||||
{% block main_scripts %}
|
<script src="{% static 'drf-yasg/insQ.min.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/insQ.min.js' %}"></script>
|
<script src="{% static 'drf-yasg/redoc-init.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/url-polyfill.min.js' %}"></script>
|
<script src="{% static 'drf-yasg/redoc/redoc.min.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/redoc-init.js' %}"></script>
|
|
||||||
<script src="{% static 'drf-yasg/redoc/redoc.min.js' %}"></script>
|
|
||||||
{% endblock %}
|
|
||||||
{% block extra_scripts %}
|
{% block extra_scripts %}
|
||||||
{# -- Add any additional scripts here -- #}
|
{# -- Add any additional scripts here -- #}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,23 +1,16 @@
|
|||||||
|
<!-- HTML for static distribution bundle build -->
|
||||||
{% load static %}
|
{% load static %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="UTF-8">
|
||||||
<title>{% block title %}{{ title }}{% endblock %}</title>
|
<title>{{ title }}</title>
|
||||||
|
|
||||||
{% block extra_head %}
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700">
|
||||||
{# -- Add any extra HTML heads tags here - except scripts and styles -- #}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block favicon %}
|
|
||||||
{# -- Maybe replace the favicon -- #}
|
|
||||||
<link rel="icon" type="image/png" href="{% static 'drf-yasg/swagger-ui-dist/favicon-32x32.png' %}"/>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block main_styles %}
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/style.css' %}"/>
|
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/style.css' %}"/>
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/swagger-ui-dist/swagger-ui.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/swagger-ui-dist/swagger-ui.css' %}">
|
||||||
{% endblock %}
|
<link rel="icon" type="image/png" href="{% static 'drf-yasg/swagger-ui-dist/favicon-32x32.png' %}" sizes="32x32"/>
|
||||||
|
<link rel="icon" type="image/png" href="{% static 'drf-yasg/swagger-ui-dist/favicon-16x16.png' %}" sizes="16x16"/>
|
||||||
{% block extra_styles %}
|
{% block extra_styles %}
|
||||||
{# -- Add any additional CSS scripts here -- #}
|
{# -- Add any additional CSS scripts here -- #}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -25,27 +18,15 @@
|
|||||||
|
|
||||||
<body class="swagger-body">
|
<body class="swagger-body">
|
||||||
|
|
||||||
{% block extra_body %}
|
|
||||||
{# -- Add any header/body markup here (rendered BEFORE the swagger-ui/redoc element) -- #}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
<div id="swagger-ui"></div>
|
<div id="swagger-ui"></div>
|
||||||
|
|
||||||
{% block footer %}
|
|
||||||
{# -- Add any footer markup here (rendered AFTER the swagger-ui/redoc element) -- #}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
<script id="swagger-settings" type="application/json">{{ swagger_settings | safe }}</script>
|
<script id="swagger-settings" type="application/json">{{ swagger_settings | safe }}</script>
|
||||||
<script id="oauth2-config" type="application/json">{{ oauth2_config | safe }}</script>
|
<script id="oauth2-config" type="application/json">{{ oauth2_config | safe }}</script>
|
||||||
|
|
||||||
{% block main_scripts %}
|
<script src="{% static 'drf-yasg/swagger-ui-dist/swagger-ui-bundle.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/swagger-ui-dist/swagger-ui-bundle.js' %}"></script>
|
<script src="{% static 'drf-yasg/swagger-ui-dist/swagger-ui-standalone-preset.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/swagger-ui-dist/swagger-ui-standalone-preset.js' %}"></script>
|
<script src="{% static 'drf-yasg/insQ.min.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/insQ.min.js' %}"></script>
|
<script src="{% static 'drf-yasg/swagger-ui-init.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/immutable.min.js' %}"></script>
|
|
||||||
<script src="{% static 'drf-yasg/url-polyfill.min.js' %}"></script>
|
|
||||||
<script src="{% static 'drf-yasg/swagger-ui-init.js' %}"></script>
|
|
||||||
{% endblock %}
|
|
||||||
{% block extra_scripts %}
|
{% block extra_scripts %}
|
||||||
{# -- Add any additional scripts here -- #}
|
{# -- Add any additional scripts here -- #}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -54,14 +35,12 @@
|
|||||||
|
|
||||||
{% if USE_SESSION_AUTH %}
|
{% if USE_SESSION_AUTH %}
|
||||||
<div id="django-session-auth" class="hidden">
|
<div id="django-session-auth" class="hidden">
|
||||||
{% block session_auth_button %}
|
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
{% block user_context_message %}
|
{% block user_context_message %}
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
<div class="hello">
|
<div class="hello">
|
||||||
<span class="django-session">Django</span> <span
|
<span class="django-session">Django</span> <span class="label label-primary">{{ request.user }}</span>
|
||||||
class="label label-primary">{{ request.user }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -83,7 +62,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+25
-60
@@ -29,7 +29,7 @@ class unset(object):
|
|||||||
def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_body=None, query_serializer=None,
|
def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_body=None, query_serializer=None,
|
||||||
manual_parameters=None, operation_id=None, operation_description=None, operation_summary=None,
|
manual_parameters=None, operation_id=None, operation_description=None, operation_summary=None,
|
||||||
security=None, deprecated=None, responses=None, field_inspectors=None, filter_inspectors=None,
|
security=None, deprecated=None, responses=None, field_inspectors=None, filter_inspectors=None,
|
||||||
paginator_inspectors=None, tags=None, **extra_overrides):
|
paginator_inspectors=None, **extra_overrides):
|
||||||
"""Decorate a view method to customize the :class:`.Operation` object generated from it.
|
"""Decorate a view method to customize the :class:`.Operation` object generated from it.
|
||||||
|
|
||||||
`method` and `methods` are mutually exclusive and must only be present when decorating a view method that accepts
|
`method` and `methods` are mutually exclusive and must only be present when decorating a view method that accepts
|
||||||
@@ -39,11 +39,11 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
|
|
||||||
:param str method: for multi-method views, the http method the options should apply to
|
:param str method: for multi-method views, the http method the options should apply to
|
||||||
:param list[str] methods: for multi-method views, the http methods the options should apply to
|
:param list[str] methods: for multi-method views, the http methods the options should apply to
|
||||||
:param drf_yasg.inspectors.SwaggerAutoSchema auto_schema: custom class to use for generating the Operation object;
|
:param .inspectors.SwaggerAutoSchema auto_schema: custom class to use for generating the Operation object;
|
||||||
this overrides both the class-level ``swagger_schema`` attribute and the ``DEFAULT_AUTO_SCHEMA_CLASS``
|
this overrides both the class-level ``swagger_schema`` attribute and the ``DEFAULT_AUTO_SCHEMA_CLASS``
|
||||||
setting, and can be set to ``None`` to prevent this operation from being generated
|
setting, and can be set to ``None`` to prevent this operation from being generated
|
||||||
:param request_body: custom request body which will be used as the ``schema`` property of a
|
:param .Schema,.SchemaRef,.Serializer request_body: custom request body, or :class:`.no_body`. The value given here
|
||||||
:class:`.Parameter` with ``in: 'body'``.
|
will be used as the ``schema`` property of a :class:`.Parameter` with ``in: 'body'``.
|
||||||
|
|
||||||
A Schema or SchemaRef is not valid if this request consumes form-data, because ``form`` and ``body`` parameters
|
A Schema or SchemaRef is not valid if this request consumes form-data, because ``form`` and ``body`` parameters
|
||||||
are mutually exclusive in an :class:`.Operation`. If you need to set custom ``form`` parameters, you can use
|
are mutually exclusive in an :class:`.Operation`. If you need to set custom ``form`` parameters, you can use
|
||||||
@@ -51,11 +51,9 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
|
|
||||||
If a ``Serializer`` class or instance is given, it will be automatically converted into a :class:`.Schema`
|
If a ``Serializer`` class or instance is given, it will be automatically converted into a :class:`.Schema`
|
||||||
used as a ``body`` :class:`.Parameter`, or into a list of ``form`` :class:`.Parameter`\\ s, as appropriate.
|
used as a ``body`` :class:`.Parameter`, or into a list of ``form`` :class:`.Parameter`\\ s, as appropriate.
|
||||||
:type request_body: drf_yasg.openapi.Schema or drf_yasg.openapi.SchemaRef or rest_framework.serializers.Serializer
|
|
||||||
or type[no_body]
|
|
||||||
|
|
||||||
:param rest_framework.serializers.Serializer query_serializer: if you use a ``Serializer`` to parse query
|
:param .Serializer query_serializer: if you use a ``Serializer`` to parse query parameters, you can pass it here
|
||||||
parameters, you can pass it here and have :class:`.Parameter` objects be generated automatically from it.
|
and have :class:`.Parameter` objects be generated automatically from it.
|
||||||
|
|
||||||
If any ``Field`` on the serializer cannot be represented as a ``query`` :class:`.Parameter`
|
If any ``Field`` on the serializer cannot be represented as a ``query`` :class:`.Parameter`
|
||||||
(e.g. nested Serializers, file fields, ...), the schema generation will fail with an error.
|
(e.g. nested Serializers, file fields, ...), the schema generation will fail with an error.
|
||||||
@@ -63,8 +61,7 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
Schema generation will also fail if the name of any Field on the `query_serializer` conflicts with parameters
|
Schema generation will also fail if the name of any Field on the `query_serializer` conflicts with parameters
|
||||||
generated by ``filter_backends`` or ``paginator``.
|
generated by ``filter_backends`` or ``paginator``.
|
||||||
|
|
||||||
:param list[drf_yasg.openapi.Parameter] manual_parameters: a list of manual parameters to override the
|
:param list[.Parameter] manual_parameters: a list of manual parameters to override the automatically generated ones
|
||||||
automatically generated ones
|
|
||||||
|
|
||||||
:class:`.Parameter`\\ s are identified by their (``name``, ``in``) combination, and any parameters given
|
:class:`.Parameter`\\ s are identified by their (``name``, ``in``) combination, and any parameters given
|
||||||
here will fully override automatically generated parameters if they collide.
|
here will fully override automatically generated parameters if they collide.
|
||||||
@@ -78,7 +75,7 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
is requried to call this API; an empty list marks the endpoint as unauthenticated (i.e. removes all accepted
|
is requried to call this API; an empty list marks the endpoint as unauthenticated (i.e. removes all accepted
|
||||||
authentication schemes), and ``None`` will inherit the top-level secuirty requirements
|
authentication schemes), and ``None`` will inherit the top-level secuirty requirements
|
||||||
:param bool deprecated: deprecation status for operation
|
:param bool deprecated: deprecation status for operation
|
||||||
:param responses: a dict of documented manual responses
|
:param dict[str,(.Schema,.SchemaRef,.Response,str,Serializer)] responses: a dict of documented manual responses
|
||||||
keyed on response status code. If no success (``2xx``) response is given, one will automatically be
|
keyed on response status code. If no success (``2xx``) response is given, one will automatically be
|
||||||
generated from the request body and http method. If any ``2xx`` response is given the automatic response is
|
generated from the request body and http method. If any ``2xx`` response is given the automatic response is
|
||||||
suppressed.
|
suppressed.
|
||||||
@@ -92,16 +89,13 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
* a ``Serializer`` class or instance will be converted into a :class:`.Schema` and treated as above
|
* a ``Serializer`` class or instance will be converted into a :class:`.Schema` and treated as above
|
||||||
* a :class:`.Response` object will be used as-is; however if its ``schema`` attribute is a ``Serializer``,
|
* a :class:`.Response` object will be used as-is; however if its ``schema`` attribute is a ``Serializer``,
|
||||||
it will automatically be converted into a :class:`.Schema`
|
it will automatically be converted into a :class:`.Schema`
|
||||||
:type responses: dict[str,(drf_yasg.openapi.Schema or drf_yasg.openapi.SchemaRef or drf_yasg.openapi.Response or
|
|
||||||
str or rest_framework.serializers.Serializer)]
|
|
||||||
|
|
||||||
:param list[type[drf_yasg.inspectors.FieldInspector]] field_inspectors: extra serializer and field inspectors; these
|
:param list[.FieldInspector] field_inspectors: extra serializer and field inspectors; these will be tried
|
||||||
will be tried before :attr:`.ViewInspector.field_inspectors` on the :class:`.inspectors.SwaggerAutoSchema`
|
before :attr:`.ViewInspector.field_inspectors` on the :class:`.inspectors.SwaggerAutoSchema` instance
|
||||||
:param list[type[drf_yasg.inspectors.FilterInspector]] filter_inspectors: extra filter inspectors; these will be
|
:param list[.FilterInspector] filter_inspectors: extra filter inspectors; these will be tried before
|
||||||
tried before :attr:`.ViewInspector.filter_inspectors` on the :class:`.inspectors.SwaggerAutoSchema`
|
:attr:`.ViewInspector.filter_inspectors` on the :class:`.inspectors.SwaggerAutoSchema` instance
|
||||||
:param list[type[drf_yasg.inspectors.PaginatorInspector]] paginator_inspectors: extra paginator inspectors; these
|
:param list[.PaginatorInspector] paginator_inspectors: extra paginator inspectors; these will be tried before
|
||||||
will be tried before :attr:`.ViewInspector.paginator_inspectors` on the :class:`.inspectors.SwaggerAutoSchema`
|
:attr:`.ViewInspector.paginator_inspectors` on the :class:`.inspectors.SwaggerAutoSchema` instance
|
||||||
:param list[str] tags: tags override
|
|
||||||
:param extra_overrides: extra values that will be saved into the ``overrides`` dict; these values will be available
|
:param extra_overrides: extra values that will be saved into the ``overrides`` dict; these values will be available
|
||||||
in the handling :class:`.inspectors.SwaggerAutoSchema` instance via ``self.overrides``
|
in the handling :class:`.inspectors.SwaggerAutoSchema` instance via ``self.overrides``
|
||||||
"""
|
"""
|
||||||
@@ -121,7 +115,6 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
'filter_inspectors': list(filter_inspectors) if filter_inspectors else None,
|
'filter_inspectors': list(filter_inspectors) if filter_inspectors else None,
|
||||||
'paginator_inspectors': list(paginator_inspectors) if paginator_inspectors else None,
|
'paginator_inspectors': list(paginator_inspectors) if paginator_inspectors else None,
|
||||||
'field_inspectors': list(field_inspectors) if field_inspectors else None,
|
'field_inspectors': list(field_inspectors) if field_inspectors else None,
|
||||||
'tags': list(tags) if tags else None,
|
|
||||||
}
|
}
|
||||||
data = filter_none(data)
|
data = filter_none(data)
|
||||||
if auto_schema is not unset:
|
if auto_schema is not unset:
|
||||||
@@ -214,7 +207,7 @@ def is_list_view(path, method, view):
|
|||||||
"""
|
"""
|
||||||
# for ViewSets, it could be the default 'list' action, or a list_route
|
# for ViewSets, it could be the default 'list' action, or a list_route
|
||||||
action = getattr(view, 'action', '')
|
action = getattr(view, 'action', '')
|
||||||
method = getattr(view, action, None) or method
|
method = getattr(view, action, None)
|
||||||
detail = getattr(method, 'detail', None)
|
detail = getattr(method, 'detail', None)
|
||||||
suffix = getattr(view, 'suffix', None)
|
suffix = getattr(view, 'suffix', None)
|
||||||
if action in ('list', 'create') or detail is False or suffix == 'List':
|
if action in ('list', 'create') or detail is False or suffix == 'List':
|
||||||
@@ -252,9 +245,9 @@ def param_list_to_odict(parameters):
|
|||||||
|
|
||||||
Raises an ``AssertionError`` if `parameters` contains duplicate parameters (by their name + in combination).
|
Raises an ``AssertionError`` if `parameters` contains duplicate parameters (by their name + in combination).
|
||||||
|
|
||||||
:param list[drf_yasg.openapi.Parameter] parameters: the list of parameters
|
:param list[.Parameter] parameters: the list of parameters
|
||||||
:return: `parameters` keyed by ``(name, in_)``
|
:return: `parameters` keyed by ``(name, in_)``
|
||||||
:rtype: dict[(str,str),drf_yasg.openapi.Parameter]
|
:rtype: dict[tuple(str,str),.Parameter]
|
||||||
"""
|
"""
|
||||||
result = OrderedDict(((param.name, param.in_), param) for param in parameters)
|
result = OrderedDict(((param.name, param.in_), param) for param in parameters)
|
||||||
assert len(result) == len(parameters), "duplicate Parameters found"
|
assert len(result) == len(parameters), "duplicate Parameters found"
|
||||||
@@ -267,10 +260,10 @@ def merge_params(parameters, overrides):
|
|||||||
|
|
||||||
Raises an ``AssertionError`` if either list contains duplicate parameters.
|
Raises an ``AssertionError`` if either list contains duplicate parameters.
|
||||||
|
|
||||||
:param list[drf_yasg.openapi.Parameter] parameters: initial parameters
|
:param list[.Parameter] parameters: initial parameters
|
||||||
:param list[drf_yasg.openapi.Parameter] overrides: overriding parameters
|
:param list[.Parameter] overrides: overriding parameters
|
||||||
:return: merged list
|
:return: merged list
|
||||||
:rtype: list[drf_yasg.openapi.Parameter]
|
:rtype: list[.Parameter]
|
||||||
"""
|
"""
|
||||||
parameters = param_list_to_odict(parameters)
|
parameters = param_list_to_odict(parameters)
|
||||||
parameters.update(param_list_to_odict(overrides))
|
parameters.update(param_list_to_odict(overrides))
|
||||||
@@ -280,7 +273,7 @@ def merge_params(parameters, overrides):
|
|||||||
def filter_none(obj):
|
def filter_none(obj):
|
||||||
"""Remove ``None`` values from tuples, lists or dictionaries. Return other objects as-is.
|
"""Remove ``None`` values from tuples, lists or dictionaries. Return other objects as-is.
|
||||||
|
|
||||||
:param obj: the object
|
:param obj:
|
||||||
:return: collection with ``None`` values removed
|
:return: collection with ``None`` values removed
|
||||||
"""
|
"""
|
||||||
if obj is None:
|
if obj is None:
|
||||||
@@ -300,7 +293,6 @@ def force_serializer_instance(serializer):
|
|||||||
an assertion error.
|
an assertion error.
|
||||||
|
|
||||||
:param serializer: serializer class or instance
|
:param serializer: serializer class or instance
|
||||||
:type serializer: serializers.BaseSerializer or type[serializers.BaseSerializer]
|
|
||||||
:return: serializer instance
|
:return: serializer instance
|
||||||
:rtype: serializers.BaseSerializer
|
:rtype: serializers.BaseSerializer
|
||||||
"""
|
"""
|
||||||
@@ -333,55 +325,28 @@ def get_serializer_class(serializer):
|
|||||||
return type(serializer)
|
return type(serializer)
|
||||||
|
|
||||||
|
|
||||||
def get_object_classes(classes_or_instances, expected_base_class=None):
|
|
||||||
"""Given a list of instances or class objects, return the list of their classes.
|
|
||||||
|
|
||||||
:param classes_or_instances: mixed list to parse
|
|
||||||
:type classes_or_instances: list[type or object]
|
|
||||||
:param expected_base_class: if given, only subclasses or instances of this type will be returned
|
|
||||||
:type expected_base_class: type
|
|
||||||
:return: list of classes
|
|
||||||
:rtype: list
|
|
||||||
"""
|
|
||||||
classes_or_instances = classes_or_instances or []
|
|
||||||
result = []
|
|
||||||
for obj in classes_or_instances:
|
|
||||||
if inspect.isclass(obj):
|
|
||||||
if not expected_base_class or issubclass(obj, expected_base_class):
|
|
||||||
result.append(obj)
|
|
||||||
else:
|
|
||||||
if not expected_base_class or isinstance(obj, expected_base_class):
|
|
||||||
result.append(type(obj))
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
|
|
||||||
def get_consumes(parser_classes):
|
def get_consumes(parser_classes):
|
||||||
"""Extract ``consumes`` MIME types from a list of parser classes.
|
"""Extract ``consumes`` MIME types from a list of parser classes.
|
||||||
|
|
||||||
:param list parser_classes: parser classes
|
:param list parser_classes: parser classes
|
||||||
:type parser_classes: list[rest_framework.parsers.BaseParser or type[rest_framework.parsers.BaseParser]]
|
|
||||||
:return: MIME types for ``consumes``
|
:return: MIME types for ``consumes``
|
||||||
:rtype: list[str]
|
:rtype: list[str]
|
||||||
"""
|
"""
|
||||||
parser_classes = get_object_classes(parser_classes)
|
|
||||||
media_types = [parser.media_type for parser in parser_classes or []]
|
media_types = [parser.media_type for parser in parser_classes or []]
|
||||||
non_form_media_types = [encoding for encoding in media_types if not is_form_media_type(encoding)]
|
if all(is_form_media_type(encoding) for encoding in media_types):
|
||||||
if len(non_form_media_types) == 0:
|
|
||||||
return media_types
|
return media_types
|
||||||
else:
|
else:
|
||||||
return non_form_media_types
|
media_types = [encoding for encoding in media_types if not is_form_media_type(encoding)]
|
||||||
|
return media_types
|
||||||
|
|
||||||
|
|
||||||
def get_produces(renderer_classes):
|
def get_produces(renderer_classes):
|
||||||
"""Extract ``produces`` MIME types from a list of renderer classes.
|
"""Extract ``produces`` MIME types from a list of renderer classes.
|
||||||
|
|
||||||
:param list renderer_classes: renderer classes
|
:param list renderer_classes: renderer classes
|
||||||
:type renderer_classes: list[rest_framework.renderers.BaseRenderer or type[rest_framework.renderers.BaseRenderer]]
|
|
||||||
:return: MIME types for ``produces``
|
:return: MIME types for ``produces``
|
||||||
:rtype: list[str]
|
:rtype: list[str]
|
||||||
"""
|
"""
|
||||||
renderer_classes = get_object_classes(renderer_classes)
|
|
||||||
media_types = [renderer.media_type for renderer in renderer_classes or []]
|
media_types = [renderer.media_type for renderer in renderer_classes or []]
|
||||||
media_types = [encoding for encoding in media_types
|
media_types = [encoding for encoding in media_types
|
||||||
if not any(excluded in encoding for excluded in swagger_settings.EXCLUDED_MEDIA_TYPES)]
|
if not any(excluded in encoding for excluded in swagger_settings.EXCLUDED_MEDIA_TYPES)]
|
||||||
@@ -406,7 +371,7 @@ def get_serializer_ref_name(serializer):
|
|||||||
|
|
||||||
:param serializer: Serializer instance
|
:param serializer: Serializer instance
|
||||||
:return: Serializer's ``ref_name`` or ``None`` for inline serializer
|
:return: Serializer's ``ref_name`` or ``None`` for inline serializer
|
||||||
:rtype: str or None
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
serializer_meta = getattr(serializer, 'Meta', None)
|
serializer_meta = getattr(serializer, 'Meta', None)
|
||||||
serializer_name = type(serializer).__name__
|
serializer_name = type(serializer).__name__
|
||||||
|
|||||||
+6
-12
@@ -12,8 +12,7 @@ from rest_framework.views import APIView
|
|||||||
|
|
||||||
from .app_settings import swagger_settings
|
from .app_settings import swagger_settings
|
||||||
from .renderers import (
|
from .renderers import (
|
||||||
OpenAPIRenderer, ReDocOldRenderer, ReDocRenderer, SwaggerJSONRenderer, SwaggerUIRenderer, SwaggerYAMLRenderer,
|
OpenAPIRenderer, ReDocOldRenderer, ReDocRenderer, SwaggerJSONRenderer, SwaggerUIRenderer, SwaggerYAMLRenderer
|
||||||
_SpecRenderer
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SPEC_RENDERERS = (SwaggerYAMLRenderer, SwaggerJSONRenderer, OpenAPIRenderer)
|
SPEC_RENDERERS = (SwaggerYAMLRenderer, SwaggerJSONRenderer, OpenAPIRenderer)
|
||||||
@@ -62,7 +61,7 @@ def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=Fal
|
|||||||
:param tuple authentication_classes: authentication classes for the schema view itself
|
:param tuple authentication_classes: authentication classes for the schema view itself
|
||||||
:param tuple permission_classes: permission classes for the schema view itself
|
:param tuple permission_classes: permission classes for the schema view itself
|
||||||
:return: SchemaView class
|
:return: SchemaView class
|
||||||
:rtype: type[drf_yasg.views.SchemaView]
|
:rtype: type[.SchemaView]
|
||||||
"""
|
"""
|
||||||
_public = public
|
_public = public
|
||||||
_generator_class = generator_class or swagger_settings.DEFAULT_GENERATOR_CLASS
|
_generator_class = generator_class or swagger_settings.DEFAULT_GENERATOR_CLASS
|
||||||
@@ -86,12 +85,7 @@ def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=Fal
|
|||||||
renderer_classes = _spec_renderers
|
renderer_classes = _spec_renderers
|
||||||
|
|
||||||
def get(self, request, version='', format=None):
|
def get(self, request, version='', format=None):
|
||||||
version = request.version or version or ''
|
generator = self.generator_class(info, request.version or version or '', url, patterns, urlconf)
|
||||||
if isinstance(request.accepted_renderer, _SpecRenderer):
|
|
||||||
generator = self.generator_class(info, version, url, patterns, urlconf)
|
|
||||||
else:
|
|
||||||
generator = self.generator_class(info, version, url, patterns=[])
|
|
||||||
|
|
||||||
schema = generator.get_schema(request, self.public)
|
schema = generator.get_schema(request, self.public)
|
||||||
if schema is None:
|
if schema is None:
|
||||||
raise exceptions.PermissionDenied() # pragma: no cover
|
raise exceptions.PermissionDenied() # pragma: no cover
|
||||||
@@ -112,7 +106,7 @@ def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=Fal
|
|||||||
def as_cached_view(cls, cache_timeout=0, cache_kwargs=None, **initkwargs):
|
def as_cached_view(cls, cache_timeout=0, cache_kwargs=None, **initkwargs):
|
||||||
"""
|
"""
|
||||||
Calls .as_view() and wraps the result in a cache_page decorator.
|
Calls .as_view() and wraps the result in a cache_page decorator.
|
||||||
See https://docs.djangoproject.com/en/dev/topics/cache/
|
See https://docs.djangoproject.com/en/1.11/topics/cache/
|
||||||
|
|
||||||
:param int cache_timeout: same as cache_page; set to 0 for no cache
|
:param int cache_timeout: same as cache_page; set to 0 for no cache
|
||||||
:param dict cache_kwargs: dictionary of kwargs to be passed to cache_page
|
:param dict cache_kwargs: dictionary of kwargs to be passed to cache_page
|
||||||
@@ -131,7 +125,7 @@ def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=Fal
|
|||||||
def without_ui(cls, cache_timeout=0, cache_kwargs=None):
|
def without_ui(cls, cache_timeout=0, cache_kwargs=None):
|
||||||
"""
|
"""
|
||||||
Instantiate this view with just JSON and YAML renderers, optionally wrapped with cache_page.
|
Instantiate this view with just JSON and YAML renderers, optionally wrapped with cache_page.
|
||||||
See https://docs.djangoproject.com/en/dev/topics/cache/.
|
See https://docs.djangoproject.com/en/1.11/topics/cache/.
|
||||||
|
|
||||||
:param int cache_timeout: same as cache_page; set to 0 for no cache
|
:param int cache_timeout: same as cache_page; set to 0 for no cache
|
||||||
:param dict cache_kwargs: dictionary of kwargs to be passed to cache_page
|
:param dict cache_kwargs: dictionary of kwargs to be passed to cache_page
|
||||||
@@ -143,7 +137,7 @@ def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=Fal
|
|||||||
def with_ui(cls, renderer='swagger', cache_timeout=0, cache_kwargs=None):
|
def with_ui(cls, renderer='swagger', cache_timeout=0, cache_kwargs=None):
|
||||||
"""
|
"""
|
||||||
Instantiate this view with a Web UI renderer, optionally wrapped with cache_page.
|
Instantiate this view with a Web UI renderer, optionally wrapped with cache_page.
|
||||||
See https://docs.djangoproject.com/en/dev/topics/cache/.
|
See https://docs.djangoproject.com/en/1.11/topics/cache/.
|
||||||
|
|
||||||
:param str renderer: UI renderer; allowed values are ``swagger``, ``redoc``
|
:param str renderer: UI renderer; allowed values are ``swagger``, ``redoc``
|
||||||
:param int cache_timeout: same as cache_page; set to 0 for no cache
|
:param int cache_timeout: same as cache_page; set to 0 for no cache
|
||||||
|
|||||||
@@ -33,13 +33,7 @@ class ArticleSerializer(serializers.ModelSerializer):
|
|||||||
|
|
||||||
|
|
||||||
class ImageUploadSerializer(serializers.Serializer):
|
class ImageUploadSerializer(serializers.Serializer):
|
||||||
image_id = serializers.UUIDField(read_only=True)
|
what_am_i_doing = serializers.RegexField(regex=r"^69$", help_text="test", default="69")
|
||||||
what_am_i_doing = serializers.RegexField(
|
|
||||||
regex=r"^69$",
|
|
||||||
help_text="test",
|
|
||||||
default="69",
|
|
||||||
allow_null=True
|
|
||||||
)
|
|
||||||
image_styles = serializers.ListSerializer(
|
image_styles = serializers.ListSerializer(
|
||||||
child=serializers.ChoiceField(choices=['wide', 'tall', 'thumb', 'social']),
|
child=serializers.ChoiceField(choices=['wide', 'tall', 'thumb', 'social']),
|
||||||
help_text="Parameter with Items"
|
help_text="Parameter with Items"
|
||||||
|
|||||||
+27
-19
@@ -1,10 +1,10 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import functools
|
|
||||||
|
|
||||||
from django.utils.decorators import method_decorator
|
from django.utils.decorators import method_decorator
|
||||||
from django_filters.rest_framework import DjangoFilterBackend
|
from django_filters.rest_framework import DjangoFilterBackend
|
||||||
from rest_framework import viewsets
|
from rest_framework import viewsets
|
||||||
# noinspection PyDeprecation
|
# noinspection PyDeprecation
|
||||||
|
from rest_framework.decorators import detail_route, list_route
|
||||||
from rest_framework.filters import OrderingFilter
|
from rest_framework.filters import OrderingFilter
|
||||||
from rest_framework.pagination import LimitOffsetPagination
|
from rest_framework.pagination import LimitOffsetPagination
|
||||||
from rest_framework.parsers import MultiPartParser
|
from rest_framework.parsers import MultiPartParser
|
||||||
@@ -62,7 +62,7 @@ class ArticlePagination(LimitOffsetPagination):
|
|||||||
|
|
||||||
@method_decorator(name='list', decorator=swagger_auto_schema(
|
@method_decorator(name='list', decorator=swagger_auto_schema(
|
||||||
operation_description="description from swagger_auto_schema via method_decorator",
|
operation_description="description from swagger_auto_schema via method_decorator",
|
||||||
filter_inspectors=[DjangoFilterDescriptionInspector],
|
filter_inspectors=[DjangoFilterDescriptionInspector]
|
||||||
))
|
))
|
||||||
class ArticleViewSet(viewsets.ModelViewSet):
|
class ArticleViewSet(viewsets.ModelViewSet):
|
||||||
"""
|
"""
|
||||||
@@ -84,10 +84,7 @@ class ArticleViewSet(viewsets.ModelViewSet):
|
|||||||
|
|
||||||
pagination_class = ArticlePagination
|
pagination_class = ArticlePagination
|
||||||
filter_backends = (DjangoFilterBackend, OrderingFilter)
|
filter_backends = (DjangoFilterBackend, OrderingFilter)
|
||||||
filterset_fields = ('title',)
|
filter_fields = ('title',)
|
||||||
# django-filter 1.1 compatibility; was renamed to filterset_fields in 2.0
|
|
||||||
# TODO: remove when dropping support for Django 1.11
|
|
||||||
filter_fields = filterset_fields
|
|
||||||
ordering_fields = ('date_modified', 'date_created')
|
ordering_fields = ('date_modified', 'date_created')
|
||||||
ordering = ('date_created',)
|
ordering = ('date_created',)
|
||||||
|
|
||||||
@@ -95,15 +92,9 @@ class ArticleViewSet(viewsets.ModelViewSet):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from rest_framework.decorators import action
|
from rest_framework.decorators import action
|
||||||
list_route = functools.partial(action, detail=False)
|
|
||||||
detail_route = functools.partial(action, detail=True)
|
|
||||||
except ImportError:
|
|
||||||
# TODO: remove when dropping support for DRF 3.7
|
|
||||||
action = None
|
|
||||||
from rest_framework.decorators import list_route, detail_route
|
|
||||||
|
|
||||||
@swagger_auto_schema(auto_schema=NoPagingAutoSchema, filter_inspectors=[DjangoFilterDescriptionInspector])
|
@swagger_auto_schema(auto_schema=NoPagingAutoSchema, filter_inspectors=[DjangoFilterDescriptionInspector])
|
||||||
@list_route(methods=['get'])
|
@action(detail=False, methods=['get'])
|
||||||
def today(self, request):
|
def today(self, request):
|
||||||
today_min = datetime.datetime.combine(datetime.date.today(), datetime.time.min)
|
today_min = datetime.datetime.combine(datetime.date.today(), datetime.time.min)
|
||||||
today_max = datetime.datetime.combine(datetime.date.today(), datetime.time.max)
|
today_max = datetime.datetime.combine(datetime.date.today(), datetime.time.max)
|
||||||
@@ -113,12 +104,29 @@ class ArticleViewSet(viewsets.ModelViewSet):
|
|||||||
|
|
||||||
@swagger_auto_schema(method='get', operation_description="image GET description override")
|
@swagger_auto_schema(method='get', operation_description="image GET description override")
|
||||||
@swagger_auto_schema(method='post', request_body=serializers.ImageUploadSerializer)
|
@swagger_auto_schema(method='post', request_body=serializers.ImageUploadSerializer)
|
||||||
@swagger_auto_schema(method='delete', manual_parameters=[openapi.Parameter(
|
@action(detail=True, methods=['get', 'post'], parser_classes=(MultiPartParser,))
|
||||||
name='delete_form_param', in_=openapi.IN_FORM,
|
def image(self, request, slug=None):
|
||||||
type=openapi.TYPE_INTEGER,
|
"""
|
||||||
description="this should not crash (form parameter on DELETE method)"
|
image method docstring
|
||||||
)])
|
"""
|
||||||
@detail_route(methods=['get', 'post', 'delete'], parser_classes=(MultiPartParser,))
|
pass
|
||||||
|
except ImportError:
|
||||||
|
action = None
|
||||||
|
|
||||||
|
# noinspection PyDeprecation
|
||||||
|
@swagger_auto_schema(auto_schema=NoPagingAutoSchema, filter_inspectors=[DjangoFilterDescriptionInspector])
|
||||||
|
@list_route(methods=['get'])
|
||||||
|
def today(self, request):
|
||||||
|
today_min = datetime.datetime.combine(datetime.date.today(), datetime.time.min)
|
||||||
|
today_max = datetime.datetime.combine(datetime.date.today(), datetime.time.max)
|
||||||
|
articles = self.get_queryset().filter(date_created__range=(today_min, today_max)).all()
|
||||||
|
serializer = self.serializer_class(articles, many=True)
|
||||||
|
return Response(serializer.data)
|
||||||
|
|
||||||
|
# noinspection PyDeprecation
|
||||||
|
@swagger_auto_schema(method='get', operation_description="image GET description override")
|
||||||
|
@swagger_auto_schema(method='post', request_body=serializers.ImageUploadSerializer)
|
||||||
|
@detail_route(methods=['get', 'post'], parser_classes=(MultiPartParser,))
|
||||||
def image(self, request, slug=None):
|
def image(self, request, slug=None):
|
||||||
"""
|
"""
|
||||||
image method docstring
|
image method docstring
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
from django.db.utils import IntegrityError
|
||||||
|
|
||||||
|
username = 'admin'
|
||||||
|
email = 'admin@admin.admin'
|
||||||
|
password = 'passwordadmin'
|
||||||
|
|
||||||
|
try:
|
||||||
|
User.objects.create_superuser(username, email, password)
|
||||||
|
except IntegrityError:
|
||||||
|
print("User '%s <%s>' already exists" % (username, email))
|
||||||
|
else:
|
||||||
|
print("Created superuser '%s <%s>' with password '%s'" % (username, email, password))
|
||||||
@@ -7,6 +7,9 @@ if __name__ == "__main__":
|
|||||||
try:
|
try:
|
||||||
from django.core.management import execute_from_command_line
|
from django.core.management import execute_from_command_line
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
# The above import may fail for some other reason. Ensure that the
|
||||||
|
# issue is really that Django is missing to avoid masking other
|
||||||
|
# exceptions on Python 2.
|
||||||
try:
|
try:
|
||||||
import django # noqa: F401
|
import django # noqa: F401
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
# Generated by Django 2.1.3 on 2018-12-19 08:16
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('snippets', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='snippet',
|
|
||||||
name='language',
|
|
||||||
field=models.CharField(choices=[('abap', 'ABAP'), ('abnf', 'ABNF'), ('ada', 'Ada'), ('adl', 'ADL'), ('agda', 'Agda'), ('aheui', 'Aheui'), ('ahk', 'autohotkey'), ('alloy', 'Alloy'), ('ampl', 'Ampl'), ('antlr', 'ANTLR'), ('antlr-as', 'ANTLR With ActionScript Target'), ('antlr-cpp', 'ANTLR With CPP Target'), ('antlr-csharp', 'ANTLR With C# Target'), ('antlr-java', 'ANTLR With Java Target'), ('antlr-objc', 'ANTLR With ObjectiveC Target'), ('antlr-perl', 'ANTLR With Perl Target'), ('antlr-python', 'ANTLR With Python Target'), ('antlr-ruby', 'ANTLR With Ruby Target'), ('apacheconf', 'ApacheConf'), ('apl', 'APL'), ('applescript', 'AppleScript'), ('arduino', 'Arduino'), ('as', 'ActionScript'), ('as3', 'ActionScript 3'), ('aspectj', 'AspectJ'), ('aspx-cs', 'aspx-cs'), ('aspx-vb', 'aspx-vb'), ('asy', 'Asymptote'), ('at', 'AmbientTalk'), ('autoit', 'AutoIt'), ('awk', 'Awk'), ('basemake', 'Base Makefile'), ('bash', 'Bash'), ('bat', 'Batchfile'), ('bbcode', 'BBCode'), ('bc', 'BC'), ('befunge', 'Befunge'), ('bib', 'BibTeX'), ('blitzbasic', 'BlitzBasic'), ('blitzmax', 'BlitzMax'), ('bnf', 'BNF'), ('boo', 'Boo'), ('boogie', 'Boogie'), ('brainfuck', 'Brainfuck'), ('bro', 'Bro'), ('bst', 'BST'), ('bugs', 'BUGS'), ('c', 'C'), ('c-objdump', 'c-objdump'), ('ca65', 'ca65 assembler'), ('cadl', 'cADL'), ('camkes', 'CAmkES'), ('capdl', 'CapDL'), ('capnp', "Cap'n Proto"), ('cbmbas', 'CBM BASIC V2'), ('ceylon', 'Ceylon'), ('cfc', 'Coldfusion CFC'), ('cfengine3', 'CFEngine3'), ('cfm', 'Coldfusion HTML'), ('cfs', 'cfstatement'), ('chai', 'ChaiScript'), ('chapel', 'Chapel'), ('cheetah', 'Cheetah'), ('cirru', 'Cirru'), ('clay', 'Clay'), ('clean', 'Clean'), ('clojure', 'Clojure'), ('clojurescript', 'ClojureScript'), ('cmake', 'CMake'), ('cobol', 'COBOL'), ('cobolfree', 'COBOLFree'), ('coffee-script', 'CoffeeScript'), ('common-lisp', 'Common Lisp'), ('componentpascal', 'Component Pascal'), ('console', 'Bash Session'), ('control', 'Debian Control file'), ('coq', 'Coq'), ('cpp', 'C++'), ('cpp-objdump', 'cpp-objdump'), ('cpsa', 'CPSA'), ('cr', 'Crystal'), ('crmsh', 'Crmsh'), ('croc', 'Croc'), ('cryptol', 'Cryptol'), ('csharp', 'C#'), ('csound', 'Csound Orchestra'), ('csound-document', 'Csound Document'), ('csound-score', 'Csound Score'), ('css', 'CSS'), ('css+django', 'CSS+Django/Jinja'), ('css+erb', 'CSS+Ruby'), ('css+genshitext', 'CSS+Genshi Text'), ('css+lasso', 'CSS+Lasso'), ('css+mako', 'CSS+Mako'), ('css+mozpreproc', 'CSS+mozpreproc'), ('css+myghty', 'CSS+Myghty'), ('css+php', 'CSS+PHP'), ('css+smarty', 'CSS+Smarty'), ('cucumber', 'Gherkin'), ('cuda', 'CUDA'), ('cypher', 'Cypher'), ('cython', 'Cython'), ('d', 'D'), ('d-objdump', 'd-objdump'), ('dart', 'Dart'), ('delphi', 'Delphi'), ('dg', 'dg'), ('diff', 'Diff'), ('django', 'Django/Jinja'), ('docker', 'Docker'), ('doscon', 'MSDOS Session'), ('dpatch', 'Darcs Patch'), ('dtd', 'DTD'), ('duel', 'Duel'), ('dylan', 'Dylan'), ('dylan-console', 'Dylan session'), ('dylan-lid', 'DylanLID'), ('earl-grey', 'Earl Grey'), ('easytrieve', 'Easytrieve'), ('ebnf', 'EBNF'), ('ec', 'eC'), ('ecl', 'ECL'), ('eiffel', 'Eiffel'), ('elixir', 'Elixir'), ('elm', 'Elm'), ('emacs', 'EmacsLisp'), ('erb', 'ERB'), ('erl', 'Erlang erl session'), ('erlang', 'Erlang'), ('evoque', 'Evoque'), ('extempore', 'xtlang'), ('ezhil', 'Ezhil'), ('factor', 'Factor'), ('fan', 'Fantom'), ('fancy', 'Fancy'), ('felix', 'Felix'), ('fennel', 'Fennel'), ('fish', 'Fish'), ('flatline', 'Flatline'), ('forth', 'Forth'), ('fortran', 'Fortran'), ('fortranfixed', 'FortranFixed'), ('foxpro', 'FoxPro'), ('fsharp', 'FSharp'), ('gap', 'GAP'), ('gas', 'GAS'), ('genshi', 'Genshi'), ('genshitext', 'Genshi Text'), ('glsl', 'GLSL'), ('gnuplot', 'Gnuplot'), ('go', 'Go'), ('golo', 'Golo'), ('gooddata-cl', 'GoodData-CL'), ('gosu', 'Gosu'), ('groff', 'Groff'), ('groovy', 'Groovy'), ('gst', 'Gosu Template'), ('haml', 'Haml'), ('handlebars', 'Handlebars'), ('haskell', 'Haskell'), ('haxeml', 'Hxml'), ('hexdump', 'Hexdump'), ('hlsl', 'HLSL'), ('hsail', 'HSAIL'), ('html', 'HTML'), ('html+cheetah', 'HTML+Cheetah'), ('html+django', 'HTML+Django/Jinja'), ('html+evoque', 'HTML+Evoque'), ('html+genshi', 'HTML+Genshi'), ('html+handlebars', 'HTML+Handlebars'), ('html+lasso', 'HTML+Lasso'), ('html+mako', 'HTML+Mako'), ('html+myghty', 'HTML+Myghty'), ('html+ng2', 'HTML + Angular2'), ('html+php', 'HTML+PHP'), ('html+smarty', 'HTML+Smarty'), ('html+twig', 'HTML+Twig'), ('html+velocity', 'HTML+Velocity'), ('http', 'HTTP'), ('hx', 'Haxe'), ('hybris', 'Hybris'), ('hylang', 'Hy'), ('i6t', 'Inform 6 template'), ('idl', 'IDL'), ('idris', 'Idris'), ('iex', 'Elixir iex session'), ('igor', 'Igor'), ('inform6', 'Inform 6'), ('inform7', 'Inform 7'), ('ini', 'INI'), ('io', 'Io'), ('ioke', 'Ioke'), ('irc', 'IRC logs'), ('isabelle', 'Isabelle'), ('j', 'J'), ('jags', 'JAGS'), ('jasmin', 'Jasmin'), ('java', 'Java'), ('javascript+mozpreproc', 'Javascript+mozpreproc'), ('jcl', 'JCL'), ('jlcon', 'Julia console'), ('js', 'JavaScript'), ('js+cheetah', 'JavaScript+Cheetah'), ('js+dLine truncated
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -83,6 +83,11 @@ class SnippetDetail(generics.RetrieveUpdateDestroyAPIView):
|
|||||||
description="path parameter override",
|
description="path parameter override",
|
||||||
required=True
|
required=True
|
||||||
),
|
),
|
||||||
|
openapi.Parameter(
|
||||||
|
name='delete_form_param', in_=openapi.IN_FORM,
|
||||||
|
type=openapi.TYPE_INTEGER,
|
||||||
|
description="this should not crash (form parameter on DELETE method)"
|
||||||
|
),
|
||||||
],
|
],
|
||||||
responses={
|
responses={
|
||||||
status.HTTP_204_NO_CONTENT: openapi.Response(
|
status.HTTP_204_NO_CONTENT: openapi.Response(
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import os
|
|||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
|
|
||||||
from testproj.util import static_lazy
|
|
||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
|
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
@@ -24,7 +22,6 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'oauth2_provider',
|
|
||||||
'corsheaders',
|
'corsheaders',
|
||||||
|
|
||||||
'drf_yasg',
|
'drf_yasg',
|
||||||
@@ -52,7 +49,7 @@ ROOT_URLCONF = 'testproj.urls'
|
|||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
'DIRS': [os.path.join(BASE_DIR, 'testproj', 'templates')],
|
'DIRS': [],
|
||||||
'APP_DIRS': True,
|
'APP_DIRS': True,
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'context_processors': [
|
'context_processors': [
|
||||||
@@ -67,9 +64,9 @@ TEMPLATES = [
|
|||||||
|
|
||||||
WSGI_APPLICATION = 'testproj.wsgi.application'
|
WSGI_APPLICATION = 'testproj.wsgi.application'
|
||||||
|
|
||||||
LOGIN_URL = reverse_lazy('admin:login')
|
|
||||||
|
|
||||||
# Password validation
|
# Password validation
|
||||||
|
# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
|
||||||
|
|
||||||
AUTH_PASSWORD_VALIDATORS = [
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
{
|
{
|
||||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||||
@@ -86,28 +83,18 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# Django Rest Framework
|
# Django Rest Framework
|
||||||
|
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
'DEFAULT_PERMISSION_CLASSES': (
|
'DEFAULT_PERMISSION_CLASSES': (
|
||||||
'rest_framework.permissions.IsAuthenticated',
|
'rest_framework.permissions.IsAuthenticated',
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
OAUTH2_CLIENT_ID = '12ee6bgxtpSEgP8TioWcHSXOiDBOUrVav4mRbVEs'
|
|
||||||
OAUTH2_CLIENT_SECRET = '5FvYALo7W4uNnWE2ySw7Yzpkxh9PSf5GuY37RvOys00ydEyph64dbl1ECOKI9ceQ' \
|
|
||||||
'AKoz0JpiVQtq0DUnsxNhU3ubrJgZ9YbtiXymbLGJq8L7n4fiER7gXbXaNSbze3BN'
|
|
||||||
OAUTH2_APP_NAME = 'drf-yasg OAuth2 provider'
|
|
||||||
|
|
||||||
OAUTH2_REDIRECT_URL = static_lazy('drf-yasg/swagger-ui-dist/oauth2-redirect.html')
|
|
||||||
OAUTH2_AUTHORIZE_URL = reverse_lazy('oauth2_provider:authorize')
|
|
||||||
OAUTH2_TOKEN_URL = reverse_lazy('oauth2_provider:token')
|
|
||||||
|
|
||||||
# drf-yasg
|
# drf-yasg
|
||||||
|
|
||||||
SWAGGER_SETTINGS = {
|
SWAGGER_SETTINGS = {
|
||||||
'LOGIN_URL': reverse_lazy('admin:login'),
|
'LOGIN_URL': reverse_lazy('admin:login'),
|
||||||
'LOGOUT_URL': '/admin/logout',
|
'LOGOUT_URL': '/admin/logout',
|
||||||
'PERSIST_AUTH': True,
|
|
||||||
'REFETCH_SCHEMA_WITH_AUTH': True,
|
|
||||||
'REFETCH_SCHEMA_ON_LOGOUT': True,
|
|
||||||
|
|
||||||
'DEFAULT_INFO': 'testproj.urls.swagger_info',
|
'DEFAULT_INFO': 'testproj.urls.swagger_info',
|
||||||
|
|
||||||
@@ -119,28 +106,8 @@ SWAGGER_SETTINGS = {
|
|||||||
'type': 'apiKey',
|
'type': 'apiKey',
|
||||||
'name': 'Authorization',
|
'name': 'Authorization',
|
||||||
'in': 'header'
|
'in': 'header'
|
||||||
},
|
|
||||||
'Query': {
|
|
||||||
'type': 'apiKey',
|
|
||||||
'name': 'auth',
|
|
||||||
'in': 'query'
|
|
||||||
},
|
|
||||||
'OAuth2 password': {
|
|
||||||
'type': 'oauth2',
|
|
||||||
'flow': 'password',
|
|
||||||
'tokenUrl': OAUTH2_TOKEN_URL,
|
|
||||||
'scopes': {
|
|
||||||
'read': 'Read everything.',
|
|
||||||
'write': 'Write everything,',
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
'OAUTH2_REDIRECT_URL': OAUTH2_REDIRECT_URL,
|
|
||||||
'OAUTH2_CONFIG': {
|
|
||||||
'clientId': OAUTH2_CLIENT_ID,
|
|
||||||
'clientSecret': OAUTH2_CLIENT_SECRET,
|
|
||||||
'appName': OAUTH2_APP_NAME,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
REDOC_SETTINGS = {
|
REDOC_SETTINGS = {
|
||||||
@@ -148,23 +115,30 @@ REDOC_SETTINGS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
|
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
||||||
|
|
||||||
LANGUAGE_CODE = 'en-us'
|
LANGUAGE_CODE = 'en-us'
|
||||||
|
|
||||||
TIME_ZONE = 'UTC'
|
TIME_ZONE = 'UTC'
|
||||||
|
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
|
|
||||||
USE_L10N = True
|
USE_L10N = True
|
||||||
|
|
||||||
USE_TZ = True
|
USE_TZ = True
|
||||||
|
|
||||||
# Static files (CSS, JavaScript, Images)
|
# Static files (CSS, JavaScript, Images)
|
||||||
|
# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
||||||
STATICFILES_DIRS = [
|
|
||||||
os.path.join(BASE_DIR, 'testproj', 'static'),
|
|
||||||
]
|
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
|
|
||||||
TEST_RUNNER = 'testproj.runner.PytestTestRunner'
|
TEST_RUNNER = 'testproj.runner.PytestTestRunner'
|
||||||
|
|
||||||
# Logging configuration
|
# Logging configuration
|
||||||
|
|
||||||
LOGGING = {
|
LOGGING = {
|
||||||
'version': 1,
|
'version': 1,
|
||||||
'disable_existing_loggers': True,
|
'disable_existing_loggers': True,
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
|||||||
MIDDLEWARE.insert(0, 'whitenoise.middleware.WhiteNoiseMiddleware')
|
MIDDLEWARE.insert(0, 'whitenoise.middleware.WhiteNoiseMiddleware')
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
|
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': dj_database_url.config(conn_max_age=600)
|
'default': dj_database_url.config(conn_max_age=600)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
# Quick-start development settings - unsuitable for production
|
||||||
|
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = '!z1yj(9uz)zk0gg@5--j)bc4h^i!8))r^dezco8glf190e0&#p'
|
SECRET_KEY = '!z1yj(9uz)zk0gg@5--j)bc4h^i!8))r^dezco8glf190e0&#p'
|
||||||
|
|||||||
Whitespace-only changes.
Whitespace-only changes.
@@ -47,12 +47,6 @@ def root_redirect(request):
|
|||||||
return redirect(schema_view, permanent=True)
|
return redirect(schema_view, permanent=True)
|
||||||
|
|
||||||
|
|
||||||
# urlpatterns required for settings values
|
|
||||||
required_urlpatterns = [
|
|
||||||
url(r'^admin/', admin.site.urls),
|
|
||||||
url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
|
|
||||||
]
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=0), name='schema-json'),
|
url(r'^swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=0), name='schema-json'),
|
||||||
url(r'^swagger/$', SchemaView.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
url(r'^swagger/$', SchemaView.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
||||||
@@ -65,10 +59,11 @@ urlpatterns = [
|
|||||||
|
|
||||||
url(r'^$', root_redirect),
|
url(r'^$', root_redirect),
|
||||||
|
|
||||||
|
url(r'^admin/', admin.site.urls),
|
||||||
url(r'^snippets/', include('snippets.urls')),
|
url(r'^snippets/', include('snippets.urls')),
|
||||||
url(r'^articles/', include('articles.urls')),
|
url(r'^articles/', include('articles.urls')),
|
||||||
url(r'^users/', include('users.urls')),
|
url(r'^users/', include('users.urls')),
|
||||||
url(r'^todo/', include('todo.urls')),
|
url(r'^todo/', include('todo.urls')),
|
||||||
url(r'^people/', include('people.urls')),
|
url(r'^people/', include('people.urls')),
|
||||||
url(r'^plain/', plain_view),
|
url(r'^plain/', plain_view),
|
||||||
] + required_urlpatterns
|
]
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
from django.templatetags.static import static
|
|
||||||
from django.utils.functional import lazy
|
|
||||||
|
|
||||||
static_lazy = lazy(static, str)
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
# Generated by Django 2.1.3 on 2018-12-19 08:07
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from django.conf import settings
|
|
||||||
from django.contrib.auth.hashers import make_password
|
|
||||||
from django.db import migrations, IntegrityError
|
|
||||||
|
|
||||||
|
|
||||||
def add_default_user(apps, schema_editor):
|
|
||||||
username = 'admin'
|
|
||||||
email = 'admin@admin.admin'
|
|
||||||
password = 'passwordadmin'
|
|
||||||
User = apps.get_model(settings.AUTH_USER_MODEL)
|
|
||||||
|
|
||||||
try:
|
|
||||||
admin = User(
|
|
||||||
username=username,
|
|
||||||
email=email,
|
|
||||||
password=make_password(password),
|
|
||||||
is_superuser=True,
|
|
||||||
is_staff=True
|
|
||||||
)
|
|
||||||
admin.save()
|
|
||||||
except IntegrityError:
|
|
||||||
sys.stdout.write(" User '%s <%s>' already exists..." % (username, email))
|
|
||||||
else:
|
|
||||||
sys.stdout.write(" Created superuser '%s <%s>' with password '%s'!" % (username, email, password))
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(add_default_user)
|
|
||||||
]
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
# Generated by Django 2.1.3 on 2018-12-19 07:57
|
|
||||||
from django.conf import settings
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def add_oauth_apps(apps, schema_editor):
|
|
||||||
# We can't import the Person model directly as it may be a newer
|
|
||||||
# version than this migration expects. We use the historical version.
|
|
||||||
User = apps.get_model(settings.AUTH_USER_MODEL)
|
|
||||||
Application = apps.get_model('oauth2_provider', 'application')
|
|
||||||
|
|
||||||
user = User.objects.get(username='admin')
|
|
||||||
|
|
||||||
oauth2_apps = [
|
|
||||||
{
|
|
||||||
"user": user,
|
|
||||||
"client_type": "public",
|
|
||||||
"authorization_grant_type": "password",
|
|
||||||
"client_id": settings.OAUTH2_CLIENT_ID,
|
|
||||||
"client_secret": settings.OAUTH2_CLIENT_SECRET,
|
|
||||||
"redirect_uris": settings.OAUTH2_REDIRECT_URL,
|
|
||||||
"name": settings.OAUTH2_APP_NAME
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
for app in oauth2_apps:
|
|
||||||
Application.objects.get_or_create(client_id=app['client_id'], defaults=app)
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
||||||
('oauth2_provider', '0006_auto_20171214_2232'),
|
|
||||||
('users', '0001_create_admin_user'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(add_oauth_apps)
|
|
||||||
]
|
|
||||||
Whitespace-only changes.
@@ -81,4 +81,3 @@ class UserSerializerrr(serializers.ModelSerializer):
|
|||||||
class UserListQuerySerializer(serializers.Serializer):
|
class UserListQuerySerializer(serializers.Serializer):
|
||||||
username = serializers.CharField(help_text="this field is generated from a query_serializer", required=False)
|
username = serializers.CharField(help_text="this field is generated from a query_serializer", required=False)
|
||||||
is_staff = serializers.BooleanField(help_text="this one too!", required=False)
|
is_staff = serializers.BooleanField(help_text="this one too!", required=False)
|
||||||
styles = serializers.MultipleChoiceField(help_text="and this one is fancy!", choices=('a', 'b', 'c', 'd'))
|
|
||||||
+5
-12
@@ -13,11 +13,7 @@ from users.serializers import UserListQuerySerializer, UserSerializerrr
|
|||||||
class UserList(APIView):
|
class UserList(APIView):
|
||||||
"""UserList cbv classdoc"""
|
"""UserList cbv classdoc"""
|
||||||
|
|
||||||
@swagger_auto_schema(
|
@swagger_auto_schema(query_serializer=UserListQuerySerializer, responses={200: UserSerializerrr(many=True)})
|
||||||
query_serializer=UserListQuerySerializer,
|
|
||||||
responses={200: UserSerializerrr(many=True)},
|
|
||||||
tags=['Users'],
|
|
||||||
)
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
queryset = User.objects.all()
|
queryset = User.objects.all()
|
||||||
serializer = UserSerializerrr(queryset, many=True)
|
serializer = UserSerializerrr(queryset, many=True)
|
||||||
@@ -32,8 +28,7 @@ class UserList(APIView):
|
|||||||
'username': openapi.Schema(type=openapi.TYPE_STRING)
|
'username': openapi.Schema(type=openapi.TYPE_STRING)
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
security=[],
|
security=[]
|
||||||
tags=['Users'],
|
|
||||||
)
|
)
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
serializer = UserSerializerrr(request.data)
|
serializer = UserSerializerrr(request.data)
|
||||||
@@ -41,19 +36,17 @@ class UserList(APIView):
|
|||||||
serializer.save()
|
serializer.save()
|
||||||
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
||||||
|
|
||||||
@swagger_auto_schema(operation_id="users_dummy", operation_description="dummy operation", tags=['Users'])
|
@swagger_auto_schema(operation_id="users_dummy", operation_description="dummy operation")
|
||||||
def patch(self, request):
|
def patch(self, request):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@swagger_auto_schema(method='put', request_body=UserSerializerrr, tags=['Users'])
|
@swagger_auto_schema(method='put', request_body=UserSerializerrr)
|
||||||
@swagger_auto_schema(methods=['get'], manual_parameters=[
|
@swagger_auto_schema(methods=['get'], manual_parameters=[
|
||||||
openapi.Parameter('test', openapi.IN_QUERY, "test manual param", type=openapi.TYPE_BOOLEAN),
|
openapi.Parameter('test', openapi.IN_QUERY, "test manual param", type=openapi.TYPE_BOOLEAN),
|
||||||
openapi.Parameter('test_array', openapi.IN_QUERY, "test query array arg", type=openapi.TYPE_ARRAY,
|
|
||||||
items=openapi.Items(type=openapi.TYPE_STRING), required=True, collection_format='multi'),
|
|
||||||
], responses={
|
], responses={
|
||||||
200: openapi.Response('response description', UserSerializerrr),
|
200: openapi.Response('response description', UserSerializerrr),
|
||||||
}, tags=['Users'])
|
})
|
||||||
@api_view(['GET', 'PUT'])
|
@api_view(['GET', 'PUT'])
|
||||||
def user_detail(request, pk):
|
def user_detail(request, pk):
|
||||||
"""user_detail fbv docstring"""
|
"""user_detail fbv docstring"""
|
||||||
|
|||||||
+3
-2
@@ -22,7 +22,8 @@ def mock_schema_request(db):
|
|||||||
from rest_framework.test import force_authenticate
|
from rest_framework.test import force_authenticate
|
||||||
|
|
||||||
factory = APIRequestFactory()
|
factory = APIRequestFactory()
|
||||||
user = User.objects.get(username='admin')
|
user = User.objects.create_user(username='admin', is_staff=True, is_superuser=True)
|
||||||
|
|
||||||
request = factory.get('/swagger.json')
|
request = factory.get('/swagger.json')
|
||||||
force_authenticate(request, user=user)
|
force_authenticate(request, user=user)
|
||||||
request = APIView().initialize_request(request)
|
request = APIView().initialize_request(request)
|
||||||
@@ -55,7 +56,7 @@ def swagger_dict(swagger, codec_json):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def validate_schema():
|
def validate_schema(db):
|
||||||
def validate_schema(swagger):
|
def validate_schema(swagger):
|
||||||
from flex.core import parse as validate_flex
|
from flex.core import parse as validate_flex
|
||||||
from swagger_spec_validator.validator20 import validate_spec as validate_ssv
|
from swagger_spec_validator.validator20 import validate_spec as validate_ssv
|
||||||
|
|||||||
+9
-70
@@ -27,22 +27,9 @@ securityDefinitions:
|
|||||||
in: header
|
in: header
|
||||||
name: Authorization
|
name: Authorization
|
||||||
type: apiKey
|
type: apiKey
|
||||||
OAuth2 password:
|
|
||||||
flow: password
|
|
||||||
scopes:
|
|
||||||
read: Read everything.
|
|
||||||
write: Write everything,
|
|
||||||
tokenUrl: /o/token/
|
|
||||||
type: oauth2
|
|
||||||
Query:
|
|
||||||
in: query
|
|
||||||
name: auth
|
|
||||||
type: apiKey
|
|
||||||
security:
|
security:
|
||||||
- Basic: []
|
- Basic: []
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
- OAuth2 password: []
|
|
||||||
- Query: []
|
|
||||||
paths:
|
paths:
|
||||||
/articles/:
|
/articles/:
|
||||||
get:
|
get:
|
||||||
@@ -83,11 +70,9 @@ paths:
|
|||||||
next:
|
next:
|
||||||
type: string
|
type: string
|
||||||
format: uri
|
format: uri
|
||||||
x-nullable: true
|
|
||||||
previous:
|
previous:
|
||||||
type: string
|
type: string
|
||||||
format: uri
|
format: uri
|
||||||
x-nullable: true
|
|
||||||
results:
|
results:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@@ -222,7 +207,6 @@ paths:
|
|||||||
pattern: ^69$
|
pattern: ^69$
|
||||||
default: '69'
|
default: '69'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
x-nullable: true
|
|
||||||
- name: image_styles
|
- name: image_styles
|
||||||
in: formData
|
in: formData
|
||||||
description: Parameter with Items
|
description: Parameter with Items
|
||||||
@@ -249,21 +233,6 @@ paths:
|
|||||||
- multipart/form-data
|
- multipart/form-data
|
||||||
tags:
|
tags:
|
||||||
- articles
|
- articles
|
||||||
delete:
|
|
||||||
operationId: articles_image_delete
|
|
||||||
description: image method docstring
|
|
||||||
parameters:
|
|
||||||
- name: delete_form_param
|
|
||||||
in: formData
|
|
||||||
description: this should not crash (form parameter on DELETE method)
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
'204':
|
|
||||||
description: ''
|
|
||||||
consumes:
|
|
||||||
- multipart/form-data
|
|
||||||
tags:
|
|
||||||
- articles
|
|
||||||
parameters:
|
parameters:
|
||||||
- name: slug
|
- name: slug
|
||||||
in: path
|
in: path
|
||||||
@@ -493,6 +462,10 @@ paths:
|
|||||||
description: path parameter override
|
description: path parameter override
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
|
- name: delete_form_param
|
||||||
|
in: formData
|
||||||
|
description: this should not crash (form parameter on DELETE method)
|
||||||
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
'204':
|
'204':
|
||||||
description: this should not crash (response object with no schema)
|
description: this should not crash (response object with no schema)
|
||||||
@@ -761,19 +734,6 @@ paths:
|
|||||||
description: this one too!
|
description: this one too!
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
- name: styles
|
|
||||||
in: query
|
|
||||||
description: and this one is fancy!
|
|
||||||
required: true
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- a
|
|
||||||
- b
|
|
||||||
- c
|
|
||||||
- d
|
|
||||||
collectionFormat: multi
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: ''
|
description: ''
|
||||||
@@ -782,7 +742,7 @@ paths:
|
|||||||
items:
|
items:
|
||||||
$ref: '#/definitions/UserSerializerrr'
|
$ref: '#/definitions/UserSerializerrr'
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- users
|
||||||
post:
|
post:
|
||||||
operationId: users_create
|
operationId: users_create
|
||||||
description: apiview post description override
|
description: apiview post description override
|
||||||
@@ -808,7 +768,7 @@ paths:
|
|||||||
username:
|
username:
|
||||||
type: string
|
type: string
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- users
|
||||||
security: []
|
security: []
|
||||||
patch:
|
patch:
|
||||||
operationId: users_dummy
|
operationId: users_dummy
|
||||||
@@ -818,7 +778,7 @@ paths:
|
|||||||
'200':
|
'200':
|
||||||
description: ''
|
description: ''
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- users
|
||||||
parameters: []
|
parameters: []
|
||||||
/users/{id}/:
|
/users/{id}/:
|
||||||
get:
|
get:
|
||||||
@@ -829,21 +789,13 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
description: test manual param
|
description: test manual param
|
||||||
type: boolean
|
type: boolean
|
||||||
- name: test_array
|
|
||||||
in: query
|
|
||||||
description: test query array arg
|
|
||||||
required: true
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
collectionFormat: multi
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: response description
|
description: response description
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/UserSerializerrr'
|
$ref: '#/definitions/UserSerializerrr'
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- users
|
||||||
put:
|
put:
|
||||||
operationId: users_update
|
operationId: users_update
|
||||||
description: user_detail fbv docstring
|
description: user_detail fbv docstring
|
||||||
@@ -859,7 +811,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/UserSerializerrr'
|
$ref: '#/definitions/UserSerializerrr'
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- users
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: id
|
||||||
in: path
|
in: path
|
||||||
@@ -933,7 +885,6 @@ definitions:
|
|||||||
- 3
|
- 3
|
||||||
- 7
|
- 7
|
||||||
- 8
|
- 8
|
||||||
x-nullable: true
|
|
||||||
group:
|
group:
|
||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
@@ -946,17 +897,12 @@ definitions:
|
|||||||
- image_styles
|
- image_styles
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
image_id:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
readOnly: true
|
|
||||||
what_am_i_doing:
|
what_am_i_doing:
|
||||||
description: test
|
description: test
|
||||||
type: string
|
type: string
|
||||||
pattern: ^69$
|
pattern: ^69$
|
||||||
default: '69'
|
default: '69'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
x-nullable: true
|
|
||||||
image_styles:
|
image_styles:
|
||||||
description: Parameter with Items
|
description: Parameter with Items
|
||||||
type: array
|
type: array
|
||||||
@@ -985,14 +931,12 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
maxLength: 30
|
maxLength: 30
|
||||||
minLength: 1
|
minLength: 1
|
||||||
x-nullable: true
|
|
||||||
last_name:
|
last_name:
|
||||||
title: Last name
|
title: Last name
|
||||||
description: <strong>Here's some HTML!</strong>
|
description: <strong>Here's some HTML!</strong>
|
||||||
type: string
|
type: string
|
||||||
maxLength: 30
|
maxLength: 30
|
||||||
minLength: 1
|
minLength: 1
|
||||||
x-nullable: true
|
|
||||||
Person:
|
Person:
|
||||||
required:
|
required:
|
||||||
- identity
|
- identity
|
||||||
@@ -1205,7 +1149,6 @@ definitions:
|
|||||||
- fan
|
- fan
|
||||||
- fancy
|
- fancy
|
||||||
- felix
|
- felix
|
||||||
- fennel
|
|
||||||
- fish
|
- fish
|
||||||
- flatline
|
- flatline
|
||||||
- forth
|
- forth
|
||||||
@@ -1231,7 +1174,6 @@ definitions:
|
|||||||
- haskell
|
- haskell
|
||||||
- haxeml
|
- haxeml
|
||||||
- hexdump
|
- hexdump
|
||||||
- hlsl
|
|
||||||
- hsail
|
- hsail
|
||||||
- html
|
- html
|
||||||
- html+cheetah
|
- html+cheetah
|
||||||
@@ -1498,7 +1440,6 @@ definitions:
|
|||||||
- xml+php
|
- xml+php
|
||||||
- xml+smarty
|
- xml+smarty
|
||||||
- xml+velocity
|
- xml+velocity
|
||||||
- xorg.conf
|
|
||||||
- xquery
|
- xquery
|
||||||
- xslt
|
- xslt
|
||||||
- xtend
|
- xtend
|
||||||
@@ -1547,7 +1488,6 @@ definitions:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: integer
|
type: integer
|
||||||
x-nullable: true
|
|
||||||
exampleProjects:
|
exampleProjects:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@@ -1612,7 +1552,6 @@ definitions:
|
|||||||
parent_id:
|
parent_id:
|
||||||
type: integer
|
type: integer
|
||||||
title: Parent id
|
title: Parent id
|
||||||
x-nullable: true
|
|
||||||
TodoTree:
|
TodoTree:
|
||||||
required:
|
required:
|
||||||
- title
|
- title
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
import pytest
|
|
||||||
from django.conf.urls import url
|
|
||||||
from django.utils.decorators import method_decorator
|
|
||||||
from rest_framework.authtoken.views import ObtainAuthToken
|
|
||||||
from rest_framework.settings import api_settings
|
|
||||||
|
|
||||||
from drf_yasg import openapi
|
|
||||||
from drf_yasg.errors import SwaggerGenerationError
|
|
||||||
from drf_yasg.generators import OpenAPISchemaGenerator
|
|
||||||
from drf_yasg.utils import swagger_auto_schema
|
|
||||||
|
|
||||||
|
|
||||||
def test_no_form_parameters_with_non_form_parsers():
|
|
||||||
# see https://github.com/axnsan12/drf-yasg/issues/270
|
|
||||||
# test that manual form parameters for views that haven't set
|
|
||||||
# all their parsers classes to form parsers are not allowed
|
|
||||||
# even when the request body is empty
|
|
||||||
|
|
||||||
@method_decorator(name='post', decorator=swagger_auto_schema(
|
|
||||||
operation_description="Logins a user and returns a token",
|
|
||||||
manual_parameters=[
|
|
||||||
openapi.Parameter(
|
|
||||||
"username",
|
|
||||||
openapi.IN_FORM,
|
|
||||||
required=True,
|
|
||||||
type=openapi.TYPE_STRING,
|
|
||||||
description="Valid username or email for authentication"
|
|
||||||
),
|
|
||||||
]
|
|
||||||
))
|
|
||||||
class CustomObtainAuthToken(ObtainAuthToken):
|
|
||||||
throttle_classes = api_settings.DEFAULT_THROTTLE_CLASSES
|
|
||||||
|
|
||||||
urlpatterns = [
|
|
||||||
url(r'token/$', CustomObtainAuthToken.as_view()),
|
|
||||||
]
|
|
||||||
|
|
||||||
generator = OpenAPISchemaGenerator(
|
|
||||||
info=openapi.Info(title="Test generator", default_version="v1"),
|
|
||||||
patterns=urlpatterns
|
|
||||||
)
|
|
||||||
|
|
||||||
with pytest.raises(SwaggerGenerationError):
|
|
||||||
generator.get_schema(None, True)
|
|
||||||
@@ -6,6 +6,7 @@ import tempfile
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
|
||||||
from drf_yasg import openapi
|
from drf_yasg import openapi
|
||||||
from drf_yasg.codecs import yaml_sane_load
|
from drf_yasg.codecs import yaml_sane_load
|
||||||
@@ -13,6 +14,8 @@ from drf_yasg.generators import OpenAPISchemaGenerator
|
|||||||
|
|
||||||
|
|
||||||
def test_reference_schema(call_generate_swagger, db, reference_schema):
|
def test_reference_schema(call_generate_swagger, db, reference_schema):
|
||||||
|
User.objects.create_superuser('admin', 'admin@admin.admin', 'blabla')
|
||||||
|
|
||||||
output = call_generate_swagger(format='yaml', api_url='http://test.local:8002/', user='admin')
|
output = call_generate_swagger(format='yaml', api_url='http://test.local:8002/', user='admin')
|
||||||
output_schema = yaml_sane_load(output)
|
output_schema = yaml_sane_load(output)
|
||||||
assert output_schema == reference_schema
|
assert output_schema == reference_schema
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ from collections import OrderedDict
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
from django.utils.inspect import get_func_args
|
|
||||||
from rest_framework import routers, serializers, viewsets
|
from rest_framework import routers, serializers, viewsets
|
||||||
from rest_framework.decorators import api_view
|
from rest_framework.decorators import api_view
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
@@ -87,14 +86,6 @@ def test_securiy_requirements(swagger_settings, mock_schema_request):
|
|||||||
assert swagger['security'] == []
|
assert swagger['security'] == []
|
||||||
|
|
||||||
|
|
||||||
def _basename_or_base_name(basename):
|
|
||||||
# freaking DRF... TODO: remove when dropping support for DRF 3.8
|
|
||||||
if 'basename' in get_func_args(routers.BaseRouter.register):
|
|
||||||
return {'basename': basename}
|
|
||||||
else:
|
|
||||||
return {'base_name': basename}
|
|
||||||
|
|
||||||
|
|
||||||
def test_replaced_serializer():
|
def test_replaced_serializer():
|
||||||
class DetailSerializer(serializers.Serializer):
|
class DetailSerializer(serializers.Serializer):
|
||||||
detail = serializers.CharField()
|
detail = serializers.CharField()
|
||||||
@@ -108,7 +99,7 @@ def test_replaced_serializer():
|
|||||||
return Response(serializer.data)
|
return Response(serializer.data)
|
||||||
|
|
||||||
router = routers.DefaultRouter()
|
router = routers.DefaultRouter()
|
||||||
router.register(r'details', DetailViewSet, **_basename_or_base_name('details'))
|
router.register(r'details', DetailViewSet, base_name='details')
|
||||||
|
|
||||||
generator = OpenAPISchemaGenerator(
|
generator = OpenAPISchemaGenerator(
|
||||||
info=openapi.Info(title="Test generator", default_version="v1"),
|
info=openapi.Info(title="Test generator", default_version="v1"),
|
||||||
@@ -155,8 +146,7 @@ def test_url_order():
|
|||||||
assert swagger['paths']['/test/']['get']['description'] == 'description override'
|
assert swagger['paths']['/test/']['get']['description'] == 'description override'
|
||||||
|
|
||||||
# get_endpoints only includes one endpoint
|
# get_endpoints only includes one endpoint
|
||||||
endpoints = generator.get_endpoints(None)
|
assert len(generator.get_endpoints(None)['/test/'][1]) == 1
|
||||||
assert len(endpoints['/test/'][1]) == 1
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -182,7 +172,7 @@ def test_action_mapping():
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
router = routers.DefaultRouter()
|
router = routers.DefaultRouter()
|
||||||
router.register(r'action', ActionViewSet, **_basename_or_base_name('action'))
|
router.register(r'action', ActionViewSet, base_name='action')
|
||||||
|
|
||||||
generator = OpenAPISchemaGenerator(
|
generator = OpenAPISchemaGenerator(
|
||||||
info=openapi.Info(title="Test generator", default_version="v1"),
|
info=openapi.Info(title="Test generator", default_version="v1"),
|
||||||
@@ -200,32 +190,3 @@ def test_action_mapping():
|
|||||||
assert action_ops['post']['description'] == 'mapping docstring post'
|
assert action_ops['post']['description'] == 'mapping docstring post'
|
||||||
assert action_ops['get']['description'] == 'mapping docstring get/delete'
|
assert action_ops['get']['description'] == 'mapping docstring get/delete'
|
||||||
assert action_ops['delete']['description'] == 'mapping docstring get/delete'
|
assert action_ops['delete']['description'] == 'mapping docstring get/delete'
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('choices, expected_type', [
|
|
||||||
(['A', 'B'], openapi.TYPE_STRING),
|
|
||||||
([123, 456], openapi.TYPE_INTEGER),
|
|
||||||
([1.2, 3.4], openapi.TYPE_NUMBER),
|
|
||||||
(['A', 456], openapi.TYPE_STRING)
|
|
||||||
])
|
|
||||||
def test_choice_field(choices, expected_type):
|
|
||||||
class DetailSerializer(serializers.Serializer):
|
|
||||||
detail = serializers.ChoiceField(choices)
|
|
||||||
|
|
||||||
class DetailViewSet(viewsets.ViewSet):
|
|
||||||
@swagger_auto_schema(responses={200: openapi.Response("OK", DetailSerializer)})
|
|
||||||
def retrieve(self, request, pk=None):
|
|
||||||
return Response({'detail': None})
|
|
||||||
|
|
||||||
router = routers.DefaultRouter()
|
|
||||||
router.register(r'details', DetailViewSet, **_basename_or_base_name('details'))
|
|
||||||
|
|
||||||
generator = OpenAPISchemaGenerator(
|
|
||||||
info=openapi.Info(title="Test generator", default_version="v1"),
|
|
||||||
patterns=router.urls
|
|
||||||
)
|
|
||||||
|
|
||||||
swagger = generator.get_schema(None, True)
|
|
||||||
property_schema = swagger['definitions']['Detail']['properties']['detail']
|
|
||||||
|
|
||||||
assert property_schema == openapi.Schema(title='Detail', type=expected_type, enum=choices)
|
|
||||||
@@ -1,13 +1,11 @@
|
|||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
|
||||||
from testproj.urls import required_urlpatterns
|
|
||||||
|
|
||||||
|
|
||||||
def dummy(request):
|
def dummy(request):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = required_urlpatterns + [
|
urlpatterns = [
|
||||||
url(r'^test/login$', dummy, name='login'),
|
url(r'^test/login$', dummy, name='login'),
|
||||||
url(r'^test/logout$', dummy, name='logout'),
|
url(r'^test/logout$', dummy, name='logout'),
|
||||||
]
|
]
|
||||||
@@ -3,7 +3,6 @@ from rest_framework import generics, versioning
|
|||||||
|
|
||||||
from snippets.models import Snippet
|
from snippets.models import Snippet
|
||||||
from snippets.serializers import SnippetSerializer
|
from snippets.serializers import SnippetSerializer
|
||||||
from testproj.urls import required_urlpatterns
|
|
||||||
|
|
||||||
|
|
||||||
class SnippetList(generics.ListCreateAPIView):
|
class SnippetList(generics.ListCreateAPIView):
|
||||||
@@ -22,6 +21,6 @@ class SnippetList(generics.ListCreateAPIView):
|
|||||||
|
|
||||||
app_name = 'test_ns_versioning'
|
app_name = 'test_ns_versioning'
|
||||||
|
|
||||||
urlpatterns = required_urlpatterns + [
|
urlpatterns = [
|
||||||
url(r"^$", SnippetList.as_view())
|
url(r"^$", SnippetList.as_view())
|
||||||
]
|
]
|
||||||
@@ -2,7 +2,6 @@ from django.conf.urls import url
|
|||||||
from rest_framework import fields
|
from rest_framework import fields
|
||||||
|
|
||||||
from snippets.serializers import SnippetSerializer
|
from snippets.serializers import SnippetSerializer
|
||||||
from testproj.urls import required_urlpatterns
|
|
||||||
|
|
||||||
from .ns_version1 import SnippetList as SnippetListV1
|
from .ns_version1 import SnippetList as SnippetListV1
|
||||||
|
|
||||||
@@ -20,6 +19,6 @@ class SnippetListV2(SnippetListV1):
|
|||||||
|
|
||||||
app_name = '2.0'
|
app_name = '2.0'
|
||||||
|
|
||||||
urlpatterns = required_urlpatterns + [
|
urlpatterns = [
|
||||||
url(r"^$", SnippetListV2.as_view())
|
url(r"^$", SnippetListV2.as_view())
|
||||||
]
|
]
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
from django.conf.urls import include, url
|
from django.conf.urls import include, url
|
||||||
from rest_framework import versioning
|
from rest_framework import versioning
|
||||||
|
|
||||||
from testproj.urls import SchemaView, required_urlpatterns
|
from testproj.urls import SchemaView
|
||||||
|
|
||||||
from . import ns_version1, ns_version2
|
from . import ns_version1, ns_version2
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ schema_patterns = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = required_urlpatterns + [
|
urlpatterns = [
|
||||||
url(VERSION_PREFIX_NS + r"v1.0/snippets/", include(ns_version1, namespace='1.0')),
|
url(VERSION_PREFIX_NS + r"v1.0/snippets/", include(ns_version1, namespace='1.0')),
|
||||||
url(VERSION_PREFIX_NS + r"v2.0/snippets/", include(ns_version2)),
|
url(VERSION_PREFIX_NS + r"v2.0/snippets/", include(ns_version2)),
|
||||||
url(VERSION_PREFIX_NS + r'v1.0/', include((schema_patterns, '1.0'))),
|
url(VERSION_PREFIX_NS + r'v1.0/', include((schema_patterns, '1.0'))),
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from rest_framework import fields, generics, versioning
|
|||||||
|
|
||||||
from snippets.models import Snippet
|
from snippets.models import Snippet
|
||||||
from snippets.serializers import SnippetSerializer
|
from snippets.serializers import SnippetSerializer
|
||||||
from testproj.urls import SchemaView, required_urlpatterns
|
from testproj.urls import SchemaView
|
||||||
|
|
||||||
|
|
||||||
class SnippetSerializerV2(SnippetSerializer):
|
class SnippetSerializerV2(SnippetSerializer):
|
||||||
@@ -42,7 +42,7 @@ class VersionedSchemaView(SchemaView):
|
|||||||
versioning_class = versioning.URLPathVersioning
|
versioning_class = versioning.URLPathVersioning
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = required_urlpatterns + [
|
urlpatterns = [
|
||||||
url(VERSION_PREFIX_URL + r"snippets/$", SnippetList.as_view()),
|
url(VERSION_PREFIX_URL + r"snippets/$", SnippetList.as_view()),
|
||||||
url(VERSION_PREFIX_URL + r'swagger(?P<format>.json|.yaml)$', VersionedSchemaView.without_ui(), name='vschema-json'),
|
url(VERSION_PREFIX_URL + r'swagger(?P<format>.json|.yaml)$', VersionedSchemaView.without_ui(), name='vschema-json'),
|
||||||
]
|
]
|
||||||
@@ -1,19 +1,11 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 3.3.0
|
|
||||||
isolated_build = true
|
|
||||||
isolated_build_env=.package
|
|
||||||
|
|
||||||
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
|
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
|
||||||
envlist =
|
envlist =
|
||||||
py{27,34,35,36}-django111-drf{37,38,39},
|
py{27,34,35,36}-django111-drf{37,38},
|
||||||
py{34,35,36,37}-django20-drf{37,38,39},
|
py{34,35,36,37}-django20-drf{37,38},
|
||||||
py{35,36,37}-django21-drf{37,38,39},
|
py{35,36,37}-django21-drf{37,38},
|
||||||
djmaster, lint, docs
|
djmaster, lint, docs
|
||||||
|
|
||||||
[testenv:.package]
|
|
||||||
# no additional dependencies besides PEP 517
|
|
||||||
deps =
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
django111: Django>=1.11,<2.0
|
django111: Django>=1.11,<2.0
|
||||||
@@ -22,42 +14,44 @@ deps =
|
|||||||
|
|
||||||
drf37: djangorestframework>=3.7.7,<3.8
|
drf37: djangorestframework>=3.7.7,<3.8
|
||||||
drf38: djangorestframework>=3.8.0,<3.9
|
drf38: djangorestframework>=3.8.0,<3.9
|
||||||
drf39: djangorestframework>=3.9,<3.10
|
|
||||||
|
|
||||||
# test with the latest build of django-rest-framework to get early warning of compatibility issues
|
# test with the latest build of django-rest-framework to get early warning of compatibility issues
|
||||||
djmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
|
djmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
|
||||||
djmaster: https://github.com/django/django/archive/master.tar.gz
|
djmaster: https://github.com/django/django/archive/master.tar.gz
|
||||||
|
|
||||||
# other dependencies
|
# other dependencies
|
||||||
-r requirements/validation.txt
|
-rrequirements/setup.txt
|
||||||
-r requirements/test.txt
|
-rrequirements/validation.txt
|
||||||
|
-rrequirements/test.txt
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
pytest -n 2 --cov --cov-config .coveragerc --cov-append --cov-report="" {posargs}
|
pytest --cov --cov-config .coveragerc --cov-append --cov-report="" {posargs}
|
||||||
|
|
||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
skip_install = true
|
skip_install = true
|
||||||
deps =
|
deps =
|
||||||
-r requirements/lint.txt
|
-rrequirements/setup.txt
|
||||||
|
-rrequirements/lint.txt
|
||||||
commands =
|
commands =
|
||||||
flake8 src/drf_yasg testproj tests setup.py
|
flake8 src/drf_yasg testproj tests setup.py
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps =
|
deps =
|
||||||
-r requirements/docs.txt
|
-rrequirements/setup.txt
|
||||||
|
-rrequirements/docs.txt
|
||||||
commands =
|
commands =
|
||||||
twine check .tox/dist/*
|
python setup.py check --restructuredtext --metadata --strict
|
||||||
sphinx-build -WnEa -b html docs docs/_build/html
|
sphinx-build -WnEa -b html docs docs/_build/html
|
||||||
|
|
||||||
[pytest]
|
[pytest]
|
||||||
DJANGO_SETTINGS_MODULE = testproj.settings.local
|
DJANGO_SETTINGS_MODULE = testproj.settings.local
|
||||||
python_paths = testproj
|
python_paths = testproj
|
||||||
addopts = --ignore=node_modules
|
addopts = -n 2 --ignore=node_modules
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
exclude = **/migrations/*
|
exclude = **/migrations/*
|
||||||
ignore = F405,W504
|
ignore = F405
|
||||||
|
|
||||||
[isort]
|
[isort]
|
||||||
skip = .eggs,.tox,docs,env,venv,node_modules
|
skip = .eggs,.tox,docs,env,venv,node_modules
|
||||||
@@ -73,5 +67,5 @@ known_standard_library =
|
|||||||
known_third_party =
|
known_third_party =
|
||||||
coreapi,coreschema,datadiff,dj_database_url,django,django_filters,djangorestframework_camel_case,
|
coreapi,coreschema,datadiff,dj_database_url,django,django_filters,djangorestframework_camel_case,
|
||||||
rest_framework_recursive,flex,gunicorn,inflection,pygments,pytest,rest_framework,ruamel,setuptools_scm,
|
rest_framework_recursive,flex,gunicorn,inflection,pygments,pytest,rest_framework,ruamel,setuptools_scm,
|
||||||
swagger_spec_validator,uritemplate,user_agents,whitenoise,oauth2_provider
|
swagger_spec_validator,uritemplate,user_agents,whitenoise
|
||||||
known_first_party = drf_yasg,testproj,articles,people,snippets,todo,users,urlconfs
|
known_first_party = drf_yasg,testproj,articles,people,snippets,todo,users,urlconfs
|
||||||
+2
-2
@@ -7,6 +7,6 @@ wget https://rebilly.github.io/ReDoc/releases/v1.x.x/redoc.min.js -O src/drf_yas
|
|||||||
|
|
||||||
cp -r node_modules/swagger-ui-dist src/drf_yasg/static/drf-yasg/
|
cp -r node_modules/swagger-ui-dist src/drf_yasg/static/drf-yasg/
|
||||||
pushd src/drf_yasg/static/drf-yasg/swagger-ui-dist/ >/dev/null
|
pushd src/drf_yasg/static/drf-yasg/swagger-ui-dist/ >/dev/null
|
||||||
rm -f package.json .npmignore README.md favicon-16x16.png
|
rm -f package.json .npmignore README.md
|
||||||
rm -f swagger-ui.js index.html *.map
|
rm -f index.html *.map
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
Reference in new issue
Block a user