nautobot 2.3.3__py3-none-any.whl → 2.3.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nautobot might be problematic. Click here for more details.
- nautobot/core/celery/schedulers.py +2 -2
- nautobot/core/settings.py +3 -1
- nautobot/core/settings.yaml +40 -23
- nautobot/core/tests/runner.py +13 -6
- nautobot/core/tests/test_settings_schema.py +7 -3
- nautobot/core/tests/test_views.py +40 -1
- nautobot/core/views/generic.py +15 -15
- nautobot/core/views/mixins.py +12 -1
- nautobot/core/views/renderers.py +3 -1
- nautobot/core/views/utils.py +1 -1
- nautobot/dcim/api/serializers.py +1 -0
- nautobot/dcim/api/views.py +2 -0
- nautobot/dcim/forms.py +1 -1
- nautobot/dcim/tables/power.py +1 -1
- nautobot/dcim/templates/dcim/devicefamily_retrieve.html +1 -1
- nautobot/dcim/tests/test_api.py +58 -4
- nautobot/dcim/tests/test_filters.py +1 -1
- nautobot/dcim/tests/test_models.py +0 -2
- nautobot/dcim/views.py +5 -2
- nautobot/extras/api/views.py +9 -0
- nautobot/extras/models/jobs.py +9 -1
- nautobot/extras/querysets.py +10 -1
- nautobot/extras/tables.py +3 -0
- nautobot/extras/tests/test_api.py +36 -0
- nautobot/extras/tests/test_views.py +76 -1
- nautobot/extras/views.py +10 -7
- nautobot/ipam/forms.py +6 -1
- nautobot/ipam/models.py +5 -11
- nautobot/ipam/navigation.py +8 -1
- nautobot/ipam/templates/ipam/prefix.html +1 -1
- nautobot/ipam/tests/test_filters.py +1 -1
- nautobot/ipam/tests/test_views.py +41 -41
- nautobot/ipam/views.py +1 -1
- nautobot/project-static/docs/404.html +60 -148
- nautobot/project-static/docs/additional-features/caching.html +3 -3
- nautobot/project-static/docs/additional-features/healthcheck.html +3 -3
- nautobot/project-static/docs/apps/index.html +60 -148
- nautobot/project-static/docs/apps/nautobot-apps.html +60 -148
- nautobot/project-static/docs/assets/javascripts/workers/{search.07f07601.min.js → search.6ce7567c.min.js} +3 -3
- nautobot/project-static/docs/assets/javascripts/workers/{search.07f07601.min.js.map → search.6ce7567c.min.js.map} +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +60 -148
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +60 -148
- nautobot/project-static/docs/configuration/optional-settings.html +3 -3
- nautobot/project-static/docs/configuration/required-settings.html +3 -3
- nautobot/project-static/docs/development/apps/api/configuration-view.html +60 -148
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +60 -148
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +60 -148
- nautobot/project-static/docs/development/apps/api/models/global-search.html +60 -148
- nautobot/project-static/docs/development/apps/api/models/graphql.html +60 -148
- nautobot/project-static/docs/development/apps/api/models/index.html +60 -148
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +60 -148
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +60 -148
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +60 -148
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +60 -148
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +60 -148
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +60 -148
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +60 -148
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +60 -148
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +60 -148
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +62 -150
- nautobot/project-static/docs/development/apps/api/prometheus.html +60 -148
- nautobot/project-static/docs/development/apps/api/setup.html +60 -148
- nautobot/project-static/docs/development/apps/api/testing.html +61 -149
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +60 -148
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +60 -148
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +60 -148
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +60 -148
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/base-template.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/index.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/notes.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +60 -148
- nautobot/project-static/docs/development/apps/api/views/urls.html +60 -148
- nautobot/project-static/docs/development/apps/index.html +61 -149
- nautobot/project-static/docs/development/apps/migration/code-updates.html +60 -148
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +60 -148
- nautobot/project-static/docs/development/apps/migration/from-v1.html +60 -148
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +60 -148
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +60 -148
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +60 -148
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +60 -148
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +60 -148
- nautobot/project-static/docs/development/core/application-registry.html +60 -148
- nautobot/project-static/docs/development/core/best-practices.html +60 -148
- nautobot/project-static/docs/development/core/bootstrap-ui.html +60 -148
- nautobot/project-static/docs/development/core/caching.html +60 -148
- nautobot/project-static/docs/development/core/controllers.html +60 -148
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +60 -148
- nautobot/project-static/docs/development/core/generic-views.html +60 -148
- nautobot/project-static/docs/development/core/getting-started.html +85 -169
- nautobot/project-static/docs/development/core/homepage.html +60 -148
- nautobot/project-static/docs/development/core/index.html +60 -148
- nautobot/project-static/docs/development/core/model-checklist.html +60 -148
- nautobot/project-static/docs/development/core/model-features.html +60 -148
- nautobot/project-static/docs/development/core/natural-keys.html +60 -148
- nautobot/project-static/docs/development/core/navigation-menu.html +60 -148
- nautobot/project-static/docs/development/core/release-checklist.html +60 -148
- nautobot/project-static/docs/development/core/role-internals.html +60 -148
- nautobot/project-static/docs/development/core/settings.html +60 -148
- nautobot/project-static/docs/development/core/style-guide.html +60 -148
- nautobot/project-static/docs/development/core/templates.html +60 -148
- nautobot/project-static/docs/development/core/testing.html +72 -152
- nautobot/project-static/docs/development/core/user-preferences.html +60 -148
- nautobot/project-static/docs/development/index.html +60 -148
- nautobot/project-static/docs/development/jobs/index.html +68 -156
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +61 -149
- nautobot/project-static/docs/docker/index.html +3 -3
- nautobot/project-static/docs/index.html +60 -148
- nautobot/project-static/docs/installation/selinux-troubleshooting.html +3 -3
- nautobot/project-static/docs/overview/application_stack.html +60 -148
- nautobot/project-static/docs/overview/design_philosophy.html +60 -148
- nautobot/project-static/docs/release-notes/index.html +60 -148
- nautobot/project-static/docs/release-notes/version-1.0.html +60 -148
- nautobot/project-static/docs/release-notes/version-1.1.html +61 -149
- nautobot/project-static/docs/release-notes/version-1.2.html +63 -151
- nautobot/project-static/docs/release-notes/version-1.3.html +61 -149
- nautobot/project-static/docs/release-notes/version-1.4.html +62 -150
- nautobot/project-static/docs/release-notes/version-1.5.html +62 -150
- nautobot/project-static/docs/release-notes/version-1.6.html +64 -152
- nautobot/project-static/docs/release-notes/version-2.0.html +61 -149
- nautobot/project-static/docs/release-notes/version-2.1.html +62 -150
- nautobot/project-static/docs/release-notes/version-2.2.html +60 -148
- nautobot/project-static/docs/release-notes/version-2.3.html +475 -236
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +277 -285
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +62 -150
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +61 -149
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +62 -150
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +71 -169
- nautobot/project-static/docs/user-guide/administration/configuration/optional-settings.html +13 -12524
- nautobot/project-static/docs/user-guide/administration/configuration/redis.html +8966 -0
- nautobot/project-static/docs/user-guide/administration/configuration/required-settings.html +13 -9218
- nautobot/project-static/docs/user-guide/administration/configuration/settings.html +12734 -0
- nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +64 -152
- nautobot/project-static/docs/user-guide/administration/guides/caching.html +13 -9108
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +61 -149
- nautobot/project-static/docs/user-guide/administration/guides/docker.html +9491 -0
- nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +9478 -0
- nautobot/project-static/docs/user-guide/administration/guides/healthcheck.html +13 -8833
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +64 -152
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +61 -149
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +61 -149
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +60 -148
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +60 -148
- nautobot/project-static/docs/user-guide/administration/guides/selinux-troubleshooting.html +8978 -0
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +60 -148
- nautobot/project-static/docs/user-guide/administration/installation/docker.html +3 -3
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +63 -151
- nautobot/project-static/docs/user-guide/administration/installation/health-checks.html +3 -3
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +61 -151
- nautobot/project-static/docs/user-guide/administration/installation/index.html +62 -150
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +60 -148
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +76 -161
- nautobot/project-static/docs/user-guide/administration/installation/selinux-troubleshooting.html +3 -3
- nautobot/project-static/docs/user-guide/administration/installation/services.html +62 -150
- nautobot/project-static/docs/user-guide/administration/installation-extras/docker.html +13 -9577
- nautobot/project-static/docs/user-guide/administration/installation-extras/health-checks.html +13 -9560
- nautobot/project-static/docs/user-guide/administration/installation-extras/selinux-troubleshooting.html +13 -9064
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +62 -150
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +60 -148
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +66 -154
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +63 -151
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +66 -154
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +63 -151
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +63 -151
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +63 -151
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +63 -151
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +63 -151
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +63 -151
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +65 -153
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +63 -151
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloud.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudaccount.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetwork.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetworkprefixassignment.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudresourcetype.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservice.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservicenetworkassignment.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/module.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebay.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebaytemplate.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/moduletype.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +61 -149
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +61 -149
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +60 -148
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +61 -149
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +60 -148
- nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +60 -148
- nautobot/project-static/docs/user-guide/index.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +61 -149
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +61 -149
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +62 -150
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +61 -149
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +61 -149
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/objectmetadata.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +61 -149
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +61 -149
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +62 -150
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/savedview.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/staticgroupassociation.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +60 -148
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +60 -148
- nautobot/virtualization/filters.py +6 -1
- nautobot/virtualization/tables.py +2 -2
- {nautobot-2.3.3.dist-info → nautobot-2.3.5.dist-info}/METADATA +2 -2
- {nautobot-2.3.3.dist-info → nautobot-2.3.5.dist-info}/RECORD +332 -328
- nautobot/project-static/docs/user-guide/administration/configuration/render-settings-fragment.j2 +0 -76
- {nautobot-2.3.3.dist-info → nautobot-2.3.5.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.3.3.dist-info → nautobot-2.3.5.dist-info}/NOTICE +0 -0
- {nautobot-2.3.3.dist-info → nautobot-2.3.5.dist-info}/WHEEL +0 -0
- {nautobot-2.3.3.dist-info → nautobot-2.3.5.dist-info}/entry_points.txt +0 -0
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
<link rel="icon" href="../assets/favicon.ico">
|
|
19
|
-
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.
|
|
19
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.35">
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -781,7 +781,7 @@
|
|
|
781
781
|
|
|
782
782
|
|
|
783
783
|
<span class="md-ellipsis">
|
|
784
|
-
|
|
784
|
+
Upgrading
|
|
785
785
|
</span>
|
|
786
786
|
|
|
787
787
|
|
|
@@ -790,115 +790,6 @@
|
|
|
790
790
|
|
|
791
791
|
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_2_label" aria-expanded="false">
|
|
792
792
|
<label class="md-nav__title" for="__nav_2_1_2">
|
|
793
|
-
<span class="md-nav__icon md-icon"></span>
|
|
794
|
-
Installation Extras
|
|
795
|
-
</label>
|
|
796
|
-
<ul class="md-nav__list" data-md-scrollfix>
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
<li class="md-nav__item">
|
|
805
|
-
<a href="../user-guide/administration/installation-extras/docker.html" class="md-nav__link">
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
<span class="md-ellipsis">
|
|
809
|
-
Nautobot Docker Images
|
|
810
|
-
</span>
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
</a>
|
|
814
|
-
</li>
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
<li class="md-nav__item">
|
|
826
|
-
<a href="../user-guide/administration/installation-extras/health-checks.html" class="md-nav__link">
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
<span class="md-ellipsis">
|
|
830
|
-
Health Checks
|
|
831
|
-
</span>
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
</a>
|
|
835
|
-
</li>
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
<li class="md-nav__item">
|
|
847
|
-
<a href="../user-guide/administration/installation-extras/selinux-troubleshooting.html" class="md-nav__link">
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
<span class="md-ellipsis">
|
|
851
|
-
SELinux Troubleshooting
|
|
852
|
-
</span>
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
</a>
|
|
856
|
-
</li>
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
</ul>
|
|
862
|
-
</nav>
|
|
863
|
-
|
|
864
|
-
</li>
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
<li class="md-nav__item md-nav__item--nested">
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_3" >
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
<label class="md-nav__link" for="__nav_2_1_3" id="__nav_2_1_3_label" tabindex="0">
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
<span class="md-ellipsis">
|
|
893
|
-
Upgrading
|
|
894
|
-
</span>
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
<span class="md-nav__icon md-icon"></span>
|
|
898
|
-
</label>
|
|
899
|
-
|
|
900
|
-
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_3_label" aria-expanded="false">
|
|
901
|
-
<label class="md-nav__title" for="__nav_2_1_3">
|
|
902
793
|
<span class="md-nav__icon md-icon"></span>
|
|
903
794
|
Upgrading
|
|
904
795
|
</label>
|
|
@@ -963,7 +854,7 @@
|
|
|
963
854
|
|
|
964
855
|
|
|
965
856
|
|
|
966
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
857
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_2_3" >
|
|
967
858
|
|
|
968
859
|
|
|
969
860
|
|
|
@@ -979,14 +870,14 @@
|
|
|
979
870
|
</a>
|
|
980
871
|
|
|
981
872
|
|
|
982
|
-
<label class="md-nav__link " for="
|
|
873
|
+
<label class="md-nav__link " for="__nav_2_1_2_3" id="__nav_2_1_2_3_label" tabindex="0">
|
|
983
874
|
<span class="md-nav__icon md-icon"></span>
|
|
984
875
|
</label>
|
|
985
876
|
|
|
986
877
|
</div>
|
|
987
878
|
|
|
988
|
-
<nav class="md-nav" data-md-level="4" aria-labelledby="
|
|
989
|
-
<label class="md-nav__title" for="
|
|
879
|
+
<nav class="md-nav" data-md-level="4" aria-labelledby="__nav_2_1_2_3_label" aria-expanded="false">
|
|
880
|
+
<label class="md-nav__title" for="__nav_2_1_2_3">
|
|
990
881
|
<span class="md-nav__icon md-icon"></span>
|
|
991
882
|
Upgrading Nautobot from v1.X to v2.0
|
|
992
883
|
</label>
|
|
@@ -1030,7 +921,7 @@
|
|
|
1030
921
|
|
|
1031
922
|
|
|
1032
923
|
|
|
1033
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
924
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_2_3_2" >
|
|
1034
925
|
|
|
1035
926
|
|
|
1036
927
|
|
|
@@ -1046,14 +937,14 @@
|
|
|
1046
937
|
</a>
|
|
1047
938
|
|
|
1048
939
|
|
|
1049
|
-
<label class="md-nav__link " for="
|
|
940
|
+
<label class="md-nav__link " for="__nav_2_1_2_3_2" id="__nav_2_1_2_3_2_label" tabindex="0">
|
|
1050
941
|
<span class="md-nav__icon md-icon"></span>
|
|
1051
942
|
</label>
|
|
1052
943
|
|
|
1053
944
|
</div>
|
|
1054
945
|
|
|
1055
|
-
<nav class="md-nav" data-md-level="5" aria-labelledby="
|
|
1056
|
-
<label class="md-nav__title" for="
|
|
946
|
+
<nav class="md-nav" data-md-level="5" aria-labelledby="__nav_2_1_2_3_2_label" aria-expanded="false">
|
|
947
|
+
<label class="md-nav__title" for="__nav_2_1_2_3_2">
|
|
1057
948
|
<span class="md-nav__icon md-icon"></span>
|
|
1058
949
|
IPAM Migration Guide
|
|
1059
950
|
</label>
|
|
@@ -1184,10 +1075,10 @@
|
|
|
1184
1075
|
|
|
1185
1076
|
|
|
1186
1077
|
|
|
1187
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
1078
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_3" >
|
|
1188
1079
|
|
|
1189
1080
|
|
|
1190
|
-
<label class="md-nav__link" for="
|
|
1081
|
+
<label class="md-nav__link" for="__nav_2_1_3" id="__nav_2_1_3_label" tabindex="0">
|
|
1191
1082
|
|
|
1192
1083
|
|
|
1193
1084
|
<span class="md-ellipsis">
|
|
@@ -1198,8 +1089,8 @@
|
|
|
1198
1089
|
<span class="md-nav__icon md-icon"></span>
|
|
1199
1090
|
</label>
|
|
1200
1091
|
|
|
1201
|
-
<nav class="md-nav" data-md-level="3" aria-labelledby="
|
|
1202
|
-
<label class="md-nav__title" for="
|
|
1092
|
+
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_3_label" aria-expanded="false">
|
|
1093
|
+
<label class="md-nav__title" for="__nav_2_1_3">
|
|
1203
1094
|
<span class="md-nav__icon md-icon"></span>
|
|
1204
1095
|
Migration
|
|
1205
1096
|
</label>
|
|
@@ -1272,7 +1163,7 @@
|
|
|
1272
1163
|
|
|
1273
1164
|
|
|
1274
1165
|
|
|
1275
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
1166
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_4" >
|
|
1276
1167
|
|
|
1277
1168
|
|
|
1278
1169
|
|
|
@@ -1288,14 +1179,14 @@
|
|
|
1288
1179
|
</a>
|
|
1289
1180
|
|
|
1290
1181
|
|
|
1291
|
-
<label class="md-nav__link " for="
|
|
1182
|
+
<label class="md-nav__link " for="__nav_2_1_4" id="__nav_2_1_4_label" tabindex="0">
|
|
1292
1183
|
<span class="md-nav__icon md-icon"></span>
|
|
1293
1184
|
</label>
|
|
1294
1185
|
|
|
1295
1186
|
</div>
|
|
1296
1187
|
|
|
1297
|
-
<nav class="md-nav" data-md-level="3" aria-labelledby="
|
|
1298
|
-
<label class="md-nav__title" for="
|
|
1188
|
+
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_4_label" aria-expanded="false">
|
|
1189
|
+
<label class="md-nav__title" for="__nav_2_1_4">
|
|
1299
1190
|
<span class="md-nav__icon md-icon"></span>
|
|
1300
1191
|
Configuration
|
|
1301
1192
|
</label>
|
|
@@ -1308,11 +1199,11 @@
|
|
|
1308
1199
|
|
|
1309
1200
|
|
|
1310
1201
|
<li class="md-nav__item">
|
|
1311
|
-
<a href="../user-guide/administration/configuration/
|
|
1202
|
+
<a href="../user-guide/administration/configuration/settings.html" class="md-nav__link">
|
|
1312
1203
|
|
|
1313
1204
|
|
|
1314
1205
|
<span class="md-ellipsis">
|
|
1315
|
-
|
|
1206
|
+
Settings
|
|
1316
1207
|
</span>
|
|
1317
1208
|
|
|
1318
1209
|
|
|
@@ -1329,11 +1220,11 @@
|
|
|
1329
1220
|
|
|
1330
1221
|
|
|
1331
1222
|
<li class="md-nav__item">
|
|
1332
|
-
<a href="../user-guide/administration/configuration/
|
|
1223
|
+
<a href="../user-guide/administration/configuration/redis.html" class="md-nav__link">
|
|
1333
1224
|
|
|
1334
1225
|
|
|
1335
1226
|
<span class="md-ellipsis">
|
|
1336
|
-
|
|
1227
|
+
Redis
|
|
1337
1228
|
</span>
|
|
1338
1229
|
|
|
1339
1230
|
|
|
@@ -1381,10 +1272,10 @@
|
|
|
1381
1272
|
|
|
1382
1273
|
|
|
1383
1274
|
|
|
1384
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
1275
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_4_4" >
|
|
1385
1276
|
|
|
1386
1277
|
|
|
1387
|
-
<label class="md-nav__link" for="
|
|
1278
|
+
<label class="md-nav__link" for="__nav_2_1_4_4" id="__nav_2_1_4_4_label" tabindex="0">
|
|
1388
1279
|
|
|
1389
1280
|
|
|
1390
1281
|
<span class="md-ellipsis">
|
|
@@ -1395,8 +1286,8 @@
|
|
|
1395
1286
|
<span class="md-nav__icon md-icon"></span>
|
|
1396
1287
|
</label>
|
|
1397
1288
|
|
|
1398
|
-
<nav class="md-nav" data-md-level="4" aria-labelledby="
|
|
1399
|
-
<label class="md-nav__title" for="
|
|
1289
|
+
<nav class="md-nav" data-md-level="4" aria-labelledby="__nav_2_1_4_4_label" aria-expanded="false">
|
|
1290
|
+
<label class="md-nav__title" for="__nav_2_1_4_4">
|
|
1400
1291
|
<span class="md-nav__icon md-icon"></span>
|
|
1401
1292
|
External Authentication
|
|
1402
1293
|
</label>
|
|
@@ -1498,10 +1389,10 @@
|
|
|
1498
1389
|
|
|
1499
1390
|
|
|
1500
1391
|
|
|
1501
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
1392
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_5" >
|
|
1502
1393
|
|
|
1503
1394
|
|
|
1504
|
-
<label class="md-nav__link" for="
|
|
1395
|
+
<label class="md-nav__link" for="__nav_2_1_5" id="__nav_2_1_5_label" tabindex="0">
|
|
1505
1396
|
|
|
1506
1397
|
|
|
1507
1398
|
<span class="md-ellipsis">
|
|
@@ -1512,8 +1403,8 @@
|
|
|
1512
1403
|
<span class="md-nav__icon md-icon"></span>
|
|
1513
1404
|
</label>
|
|
1514
1405
|
|
|
1515
|
-
<nav class="md-nav" data-md-level="3" aria-labelledby="
|
|
1516
|
-
<label class="md-nav__title" for="
|
|
1406
|
+
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_5_label" aria-expanded="false">
|
|
1407
|
+
<label class="md-nav__title" for="__nav_2_1_5">
|
|
1517
1408
|
<span class="md-nav__icon md-icon"></span>
|
|
1518
1409
|
Tools
|
|
1519
1410
|
</label>
|
|
@@ -1586,10 +1477,10 @@
|
|
|
1586
1477
|
|
|
1587
1478
|
|
|
1588
1479
|
|
|
1589
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
1480
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_6" >
|
|
1590
1481
|
|
|
1591
1482
|
|
|
1592
|
-
<label class="md-nav__link" for="
|
|
1483
|
+
<label class="md-nav__link" for="__nav_2_1_6" id="__nav_2_1_6_label" tabindex="0">
|
|
1593
1484
|
|
|
1594
1485
|
|
|
1595
1486
|
<span class="md-ellipsis">
|
|
@@ -1600,8 +1491,8 @@
|
|
|
1600
1491
|
<span class="md-nav__icon md-icon"></span>
|
|
1601
1492
|
</label>
|
|
1602
1493
|
|
|
1603
|
-
<nav class="md-nav" data-md-level="3" aria-labelledby="
|
|
1604
|
-
<label class="md-nav__title" for="
|
|
1494
|
+
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_6_label" aria-expanded="false">
|
|
1495
|
+
<label class="md-nav__title" for="__nav_2_1_6">
|
|
1605
1496
|
<span class="md-nav__icon md-icon"></span>
|
|
1606
1497
|
Guides
|
|
1607
1498
|
</label>
|
|
@@ -1614,11 +1505,32 @@
|
|
|
1614
1505
|
|
|
1615
1506
|
|
|
1616
1507
|
<li class="md-nav__item">
|
|
1617
|
-
<a href="../user-guide/administration/guides/
|
|
1508
|
+
<a href="../user-guide/administration/guides/docker.html" class="md-nav__link">
|
|
1618
1509
|
|
|
1619
1510
|
|
|
1620
1511
|
<span class="md-ellipsis">
|
|
1621
|
-
|
|
1512
|
+
Nautobot Docker Images
|
|
1513
|
+
</span>
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
</a>
|
|
1517
|
+
</li>
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
<li class="md-nav__item">
|
|
1529
|
+
<a href="../user-guide/administration/guides/selinux-troubleshooting.html" class="md-nav__link">
|
|
1530
|
+
|
|
1531
|
+
|
|
1532
|
+
<span class="md-ellipsis">
|
|
1533
|
+
SELinux Troubleshooting
|
|
1622
1534
|
</span>
|
|
1623
1535
|
|
|
1624
1536
|
|
|
@@ -1635,11 +1547,11 @@
|
|
|
1635
1547
|
|
|
1636
1548
|
|
|
1637
1549
|
<li class="md-nav__item">
|
|
1638
|
-
<a href="../user-guide/administration/guides/
|
|
1550
|
+
<a href="../user-guide/administration/guides/health-checks.html" class="md-nav__link">
|
|
1639
1551
|
|
|
1640
1552
|
|
|
1641
1553
|
<span class="md-ellipsis">
|
|
1642
|
-
Health
|
|
1554
|
+
Health Checks
|
|
1643
1555
|
</span>
|
|
1644
1556
|
|
|
1645
1557
|
|
|
@@ -8815,7 +8727,7 @@
|
|
|
8815
8727
|
</div>
|
|
8816
8728
|
|
|
8817
8729
|
|
|
8818
|
-
<script id="__config" type="application/json">{"base": "..", "features": ["content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "../assets/javascripts/workers/search.
|
|
8730
|
+
<script id="__config" type="application/json">{"base": "..", "features": ["content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "../assets/javascripts/workers/search.6ce7567c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
|
|
8819
8731
|
|
|
8820
8732
|
|
|
8821
8733
|
<script src="../assets/javascripts/bundle.56dfad97.min.js"></script>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var xe=Object.create;var U=Object.defineProperty,ve=Object.defineProperties,Se=Object.getOwnPropertyDescriptor,Te=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertyNames,
|
|
1
|
+
"use strict";(()=>{var xe=Object.create;var U=Object.defineProperty,ve=Object.defineProperties,Se=Object.getOwnPropertyDescriptor,Te=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols,Ee=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable;var K=Math.pow,X=(t,e,r)=>e in t?U(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,A=(t,e)=>{for(var r in e||(e={}))Z.call(e,r)&&X(t,r,e[r]);if(J)for(var r of J(e))be.call(e,r)&&X(t,r,e[r]);return t},G=(t,e)=>ve(t,Te(e));var Le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var we=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qe(e))!Z.call(t,i)&&i!==r&&U(t,i,{get:()=>e[i],enumerable:!(n=Se(e,i))||n.enumerable});return t};var Pe=(t,e,r)=>(r=t!=null?xe(Ee(t)):{},we(e||!t||!t.__esModule?U(r,"default",{value:t,enumerable:!0}):r,t));var B=(t,e,r)=>new Promise((n,i)=>{var s=u=>{try{a(r.next(u))}catch(c){i(c)}},o=u=>{try{a(r.throw(u))}catch(c){i(c)}},a=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,o);a((r=r.apply(t,e)).next())});var re=Le((ee,te)=>{/**
|
|
2
2
|
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9
|
|
3
3
|
* Copyright (C) 2020 Oliver Nightingale
|
|
4
4
|
* @license MIT
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
*/t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(r){var n=new t.QueryParser(e,r);n.parse()})},t.Index.prototype.query=function(e){for(var r=new t.Query(this.fields),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u<this.fields.length;u++)i[this.fields[u]]=new t.Vector;e.call(r,r);for(var u=0;u<r.clauses.length;u++){var c=r.clauses[u],f=null,g=t.Set.empty;c.usePipeline?f=this.pipeline.runString(c.term,{fields:c.fields}):f=[c.term];for(var l=0;l<f.length;l++){var m=f[l];c.term=m;var x=t.TokenSet.fromClause(c),v=this.tokenSet.intersect(x).toArray();if(v.length===0&&c.presence===t.Query.presence.REQUIRED){for(var d=0;d<c.fields.length;d++){var y=c.fields[d];o[y]=t.Set.empty}break}for(var b=0;b<v.length;b++)for(var E=v[b],w=this.invertedIndex[E],R=w._index,d=0;d<c.fields.length;d++){var y=c.fields[d],j=w[y],_=Object.keys(j),D=E+"/"+y,N=new t.Set(_);if(c.presence==t.Query.presence.REQUIRED&&(g=g.union(N),o[y]===void 0&&(o[y]=t.Set.complete)),c.presence==t.Query.presence.PROHIBITED){a[y]===void 0&&(a[y]=t.Set.empty),a[y]=a[y].union(N);continue}if(i[y].upsert(R,c.boost,function(ye,me){return ye+me}),!s[D]){for(var C=0;C<_.length;C++){var V=_[C],P=new t.FieldRef(V,y),z=j[V],$;($=n[P])===void 0?n[P]=new t.MatchData(E,y,z):$.add(E,y,z)}s[D]=!0}}}if(c.presence===t.Query.presence.REQUIRED)for(var d=0;d<c.fields.length;d++){var y=c.fields[d];o[y]=o[y].intersect(g)}}for(var M=t.Set.complete,I=t.Set.empty,u=0;u<this.fields.length;u++){var y=this.fields[u];o[y]&&(M=M.intersect(o[y])),a[y]&&(I=I.union(a[y]))}var h=Object.keys(n),S=[],k=Object.create(null);if(r.isNegated()){h=Object.keys(this.fieldVectors);for(var u=0;u<h.length;u++){var P=h[u],L=t.FieldRef.fromString(P);n[P]=new t.MatchData}}for(var u=0;u<h.length;u++){var L=t.FieldRef.fromString(h[u]),p=L.docRef;if(M.contains(p)&&!I.contains(p)){var T=this.fieldVectors[L],O=i[L.fieldName].similarity(T),F;if((F=k[p])!==void 0)F.score+=O,F.matchData.combine(n[L]);else{var Q={ref:p,score:O,matchData:n[L]};k[p]=Q,S.push(Q)}}}return S.sort(function(pe,ge){return ge.score-pe.score})},t.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map(function(n){return[n,this.invertedIndex[n]]},this),r=Object.keys(this.fieldVectors).map(function(n){return[n,this.fieldVectors[n].toJSON()]},this);return{version:t.version,fields:this.fields,fieldVectors:r,invertedIndex:e,pipeline:this.pipeline.toJSON()}},t.Index.load=function(e){var r={},n={},i=e.fieldVectors,s=Object.create(null),o=e.invertedIndex,a=new t.TokenSet.Builder,u=t.Pipeline.load(e.pipeline);e.version!=t.version&&t.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+t.version+"' does not match serialized index '"+e.version+"'");for(var c=0;c<i.length;c++){var f=i[c],g=f[0],l=f[1];n[g]=new t.Vector(l)}for(var c=0;c<o.length;c++){var f=o[c],m=f[0],x=f[1];a.insert(m),s[m]=x}return a.finish(),r.fields=e.fields,r.fieldVectors=n,r.invertedIndex=s,r.tokenSet=a.root,r.pipeline=u,new t.Index(r)};/*!
|
|
38
38
|
* lunr.Builder
|
|
39
39
|
* Copyright (C) 2020 Oliver Nightingale
|
|
40
|
-
*/t.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=t.tokenizer,this.pipeline=new t.Pipeline,this.searchPipeline=new t.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},t.Builder.prototype.ref=function(e){this._ref=e},t.Builder.prototype.field=function(e,r){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=r||{}},t.Builder.prototype.b=function(e){e<0?this._b=0:e>1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,r){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=r||{},this.documentCount+=1;for(var s=0;s<i.length;s++){var o=i[s],a=this._fields[o].extractor,u=a?a(e):e[o],c=this.tokenizer(u,{fields:[o]}),f=this.pipeline.run(c),g=new t.FieldRef(n,o),l=Object.create(null);this.fieldTermFrequencies[g]=l,this.fieldLengths[g]=0,this.fieldLengths[g]+=f.length;for(var m=0;m<f.length;m++){var x=f[m];if(l[x]==null&&(l[x]=0),l[x]+=1,this.invertedIndex[x]==null){var v=Object.create(null);v._index=this.termIndex,this.termIndex+=1;for(var d=0;d<i.length;d++)v[i[d]]=Object.create(null);this.invertedIndex[x]=v}this.invertedIndex[x][o][n]==null&&(this.invertedIndex[x][o][n]=Object.create(null));for(var y=0;y<this.metadataWhitelist.length;y++){var b=this.metadataWhitelist[y],E=x.metadata[b];this.invertedIndex[x][o][n][b]==null&&(this.invertedIndex[x][o][n][b]=[]),this.invertedIndex[x][o][n][b].push(E)}}}},t.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),r=e.length,n={},i={},s=0;s<r;s++){var o=t.FieldRef.fromString(e[s]),a=o.fieldName;i[a]||(i[a]=0),i[a]+=1,n[a]||(n[a]=0),n[a]+=this.fieldLengths[o]}for(var u=Object.keys(this._fields),s=0;s<u.length;s++){var c=u[s];n[c]=n[c]/i[c]}this.averageFieldLength=n},t.Builder.prototype.createFieldVectors=function(){for(var e={},r=Object.keys(this.fieldTermFrequencies),n=r.length,i=Object.create(null),s=0;s<n;s++){for(var o=t.FieldRef.fromString(r[s]),a=o.fieldName,u=this.fieldLengths[o],c=new t.Vector,f=this.fieldTermFrequencies[o],g=Object.keys(f),l=g.length,m=this._fields[a].boost||1,x=this._documents[o.docRef].boost||1,v=0;v<l;v++){var d=g[v],y=f[d],b=this.invertedIndex[d]._index,E,w,R;i[d]===void 0?(E=t.idf(this.invertedIndex[d],this.documentCount),i[d]=E):E=i[d],w=E*((this._k1+1)*y)/(this._k1*(1-this._b+this._b*(u/this.averageFieldLength[a]))+y),w*=m,w*=x,R=Math.round(w*1e3)/1e3,c.insert(b,R)}e[o]=c}this.fieldVectors=e},t.Builder.prototype.createTokenSet=function(){this.tokenSet=t.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},t.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new t.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},t.Builder.prototype.use=function(e){var r=Array.prototype.slice.call(arguments,1);r.unshift(this),e.apply(this,r)},t.MatchData=function(e,r,n){for(var i=Object.create(null),s=Object.keys(n||{}),o=0;o<s.length;o++){var a=s[o];i[a]=n[a].slice()}this.metadata=Object.create(null),e!==void 0&&(this.metadata[e]=Object.create(null),this.metadata[e][r]=i)},t.MatchData.prototype.combine=function(e){for(var r=Object.keys(e.metadata),n=0;n<r.length;n++){var i=r[n],s=Object.keys(e.metadata[i]);this.metadata[i]==null&&(this.metadata[i]=Object.create(null));for(var o=0;o<s.length;o++){var a=s[o],u=Object.keys(e.metadata[i][a]);this.metadata[i][a]==null&&(this.metadata[i][a]=Object.create(null));for(var c=0;c<u.length;c++){var f=u[c];this.metadata[i][a][f]==null?this.metadata[i][a][f]=e.metadata[i][a][f]:this.metadata[i][a][f]=this.metadata[i][a][f].concat(e.metadata[i][a][f])}}}},t.MatchData.prototype.add=function(e,r,n){if(!(e in this.metadata)){this.metadata[e]=Object.create(null),this.metadata[e][r]=n;return}if(!(r in this.metadata[e])){this.metadata[e][r]=n;return}for(var i=Object.keys(n),s=0;s<i.length;s++){var o=i[s];o in this.metadata[e][r]?this.metadata[e][r][o]=this.metadata[e][r][o].concat(n[o]):this.metadata[e][r][o]=n[o]}},t.Query=function(e){this.clauses=[],this.allFields=e},t.Query.wildcard=new String("*"),t.Query.wildcard.NONE=0,t.Query.wildcard.LEADING=1,t.Query.wildcard.TRAILING=2,t.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},t.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=t.Query.wildcard.NONE),e.wildcard&t.Query.wildcard.LEADING&&e.term.charAt(0)!=t.Query.wildcard&&(e.term="*"+e.term),e.wildcard&t.Query.wildcard.TRAILING&&e.term.slice(-1)!=t.Query.wildcard&&(e.term=""+e.term+"*"),"presence"in e||(e.presence=t.Query.presence.OPTIONAL),this.clauses.push(e),this},t.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=t.Query.presence.PROHIBITED)return!1;return!0},t.Query.prototype.term=function(e,r){if(Array.isArray(e))return e.forEach(function(i){this.term(i,t.utils.clone(r))},this),this;var n=r||{};return n.term=e.toString(),this.clause(n),this},t.QueryParseError=function(e,r,n){this.name="QueryParseError",this.message=e,this.start=r,this.end=n},t.QueryParseError.prototype=new Error,t.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},t.QueryLexer.prototype.run=function(){for(var e=t.QueryLexer.lexText;e;)e=e(this)},t.QueryLexer.prototype.sliceString=function(){for(var e=[],r=this.start,n=this.pos,i=0;i<this.escapeCharPositions.length;i++)n=this.escapeCharPositions[i],e.push(this.str.slice(r,n)),r=n+1;return e.push(this.str.slice(r,this.pos)),this.escapeCharPositions.length=0,e.join("")},t.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},t.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},t.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,r;do e=this.next(),r=e.charCodeAt(0);while(r>47&&r<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos<this.length},t.QueryLexer.EOS="EOS",t.QueryLexer.FIELD="FIELD",t.QueryLexer.TERM="TERM",t.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",t.QueryLexer.BOOST="BOOST",t.QueryLexer.PRESENCE="PRESENCE",t.QueryLexer.lexField=function(e){return e.backup(),e.emit(t.QueryLexer.FIELD),e.ignore(),t.QueryLexer.lexText},t.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var r=e.next();if(r==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(r.charCodeAt(0)==92){e.escapeCharacter();continue}if(r==":")return t.QueryLexer.lexField;if(r=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(r=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(r=="+"&&e.width()===1||r=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(r.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,r){this.lexer=new t.QueryLexer(e),this.query=r,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var r=e.peekLexeme();if(r!=null)switch(r.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(n+=" with value '"+r.str+"'"),new t.QueryParseError(n,r.start,r.end)}},t.QueryParser.parsePresence=function(e){var r=e.consumeLexeme();if(r!=null){switch(r.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+r.str+"'";throw new t.QueryParseError(n,r.start,r.end)}var i=e.peekLexeme();if(i==null){var n="expecting term or field, found nothing";throw new t.QueryParseError(n,r.start,r.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(n,i.start,i.end)}}},t.QueryParser.parseField=function(e){var r=e.consumeLexeme();if(r!=null){if(e.query.allFields.indexOf(r.str)==-1){var n=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+r.str+"', possible fields: "+n;throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.fields=[r.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,r.start,r.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var r=e.consumeLexeme();if(r!=null){e.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(n==null){e.nextClause();return}switch(n.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new t.QueryParseError(i,n.start,n.end)}}},t.QueryParser.parseEditDistance=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.editDistance=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="boost must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.boost=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,r){typeof define=="function"&&define.amd?define(r):typeof K=="object"?ee.exports=r():e.lunr=r()}(this,function(){return t})})()});var de=Pe(te());function re(t,e=document){let r=ke(t,e);if(typeof r=="undefined")throw new ReferenceError(`Missing element: expected "${t}" to be present`);return r}function ke(t,e=document){return e.querySelector(t)||void 0}Object.entries||(Object.entries=function(t){let e=[];for(let r of Object.keys(t))e.push([r,t[r]]);return e});Object.values||(Object.values=function(t){let e=[];for(let r of Object.keys(t))e.push(t[r]);return e});typeof Element!="undefined"&&(Element.prototype.scrollTo||(Element.prototype.scrollTo=function(t,e){typeof t=="object"?(this.scrollLeft=t.left,this.scrollTop=t.top):(this.scrollLeft=t,this.scrollTop=e)}),Element.prototype.replaceWith||(Element.prototype.replaceWith=function(...t){let e=this.parentNode;if(e){t.length===0&&e.removeChild(this);for(let r=t.length-1;r>=0;r--){let n=t[r];typeof n=="string"?n=document.createTextNode(n):n.parentNode&&n.parentNode.removeChild(n),r?e.insertBefore(this.previousSibling,n):e.replaceChild(n,this)}}}));function ne(t){let e=new Map;for(let r of t){let[n]=r.location.split("#"),i=e.get(n);typeof i=="undefined"?e.set(n,r):(e.set(r.location,r),r.parent=i)}return e}function W(t,e,r){var s;e=new RegExp(e,"g");let n,i=0;do{n=e.exec(t);let o=(s=n==null?void 0:n.index)!=null?s:t.length;if(i<o&&r(i,o),n){let[a]=n;i=n.index+a.length,a.length===0&&(e.lastIndex=n.index+1)}}while(n)}function ie(t,e){let r=0,n=0,i=0;for(let s=0;i<t.length;i++)t.charAt(i)==="<"&&i>n?e(r,1,n,n=i):t.charAt(i)===">"&&(t.charAt(n+1)==="/"?--s===0&&e(r++,2,n,i+1):t.charAt(i-1)!=="/"&&s++===0&&e(r,0,n,i+1),n=i+1);i>n&&e(r,1,n,i)}function se(t,e,r,n=!1){return q([t],e,r,n).pop()}function q(t,e,r,n=!1){let i=[0];for(let s=1;s<e.length;s++){let o=e[s-1],a=e[s],u=o[o.length-1]>>>2&1023,c=a[0]>>>12;i.push(+(u>c)+i[i.length-1])}return t.map((s,o)=>{let a=0,u=new Map;for(let f of r.sort((g,l)=>g-l)){let g=f&1048575,l=f>>>20;if(i[l]!==o)continue;let m=u.get(l);typeof m=="undefined"&&u.set(l,m=[]),m.push(g)}if(u.size===0)return s;let c=[];for(let[f,g]of u){let l=e[f],m=l[0]>>>12,x=l[l.length-1]>>>12,v=l[l.length-1]>>>2&1023;n&&m>a&&c.push(s.slice(a,m));let d=s.slice(m,x+v);for(let y of g.sort((b,E)=>E-b)){let b=(l[y]>>>12)-m,E=(l[y]>>>2&1023)+b;d=[d.slice(0,b),"<mark>",d.slice(b,E),"</mark>",d.slice(E)].join("")}if(a=x+v,c.push(d)===2)break}return n&&a<s.length&&c.push(s.slice(a)),c.join("")})}function oe(t){let e=[];if(typeof t=="undefined")return e;let r=Array.isArray(t)?t:[t];for(let n=0;n<r.length;n++){let i=lunr.tokenizer.table,s=i.length;ie(r[n],(o,a,u,c)=>{var f;switch(i[f=o+=s]||(i[f]=[]),a){case 0:case 2:i[o].push(u<<12|c-u<<2|a);break;case 1:let g=r[n].slice(u,c);W(g,lunr.tokenizer.separator,(l,m)=>{if(typeof lunr.segmenter!="undefined"){let x=g.slice(l,m);if(/^[MHIK]$/.test(lunr.segmenter.ctype_(x))){let v=lunr.segmenter.segment(x);for(let d=0,y=0;d<v.length;d++)i[o]||(i[o]=[]),i[o].push(u+l+y<<12|v[d].length<<2|a),e.push(new lunr.Token(v[d].toLowerCase(),{position:o<<20|i[o].length-1})),y+=v[d].length;return}}i[o].push(u+l<<12|m-l<<2|a),e.push(new lunr.Token(g.slice(l,m).toLowerCase(),{position:o<<20|i[o].length-1}))})}})}return e}function ae(t,e=r=>r){return t.trim().split(/"([^"]+)"/g).map((r,n)=>n&1?r.replace(/^\b|^(?![^\x00-\x7F]|$)|\s+/g," +"):r).join("").replace(/"|(?:^|\s+)[*+\-:^~]+(?=\s+|$)/g,"").split(/\s+/g).reduce((r,n)=>{let i=e(n);return[...r,...Array.isArray(i)?i:[i]]},[]).map(r=>/([~^]$)/.test(r)?`${r}1`:r).map(r=>/(^[+-]|[~^]\d+$)/.test(r)?r:`${r}*`).join(" ")}function ue(t){return ae(t,e=>{let r=[],n=new lunr.QueryLexer(e);n.run();for(let{type:i,str:s,start:o,end:a}of n.lexemes)switch(i){case"FIELD":["title","text","tags"].includes(s)||(e=[e.slice(0,a)," ",e.slice(a+1)].join(""));break;case"TERM":W(s,lunr.tokenizer.separator,(...u)=>{r.push([e.slice(0,o),s.slice(...u),e.slice(a)].join(""))})}return r})}function ce(t){let e=new lunr.Query(["title","text","tags"]);new lunr.QueryParser(t,e).parse();for(let n of e.clauses)n.usePipeline=!0,n.term.startsWith("*")&&(n.wildcard=lunr.Query.wildcard.LEADING,n.term=n.term.slice(1)),n.term.endsWith("*")&&(n.wildcard=lunr.Query.wildcard.TRAILING,n.term=n.term.slice(0,-1));return e.clauses}function le(t,e){var i;let r=new Set(t),n={};for(let s=0;s<e.length;s++)for(let o of r)e[s].startsWith(o.term)&&(n[o.term]=!0,r.delete(o));for(let s of r)(i=lunr.stopWordFilter)!=null&&i.call(lunr,s.term)&&(n[s.term]=!1);return n}function he(t,e){let r=new Set,n=new Uint16Array(t.length);for(let s=0;s<t.length;s++)for(let o=s+1;o<t.length;o++)t.slice(s,o)in e&&(n[s]=o-s);let i=[0];for(let s=i.length;s>0;){let o=i[--s];for(let u=1;u<n[o];u++)n[o+u]>n[o]-u&&(r.add(t.slice(o,o+u)),i[s++]=o+u);let a=o+n[o];n[a]&&a<t.length-1&&(i[s++]=a),r.add(t.slice(o,a))}return r.has("")?new Set([t]):r}function Oe(t){return e=>r=>{if(typeof r[e]=="undefined")return;let n=[r.location,e].join(":");return t.set(n,lunr.tokenizer.table=[]),r[e]}}function Re(t,e){let[r,n]=[new Set(t),new Set(e)];return[...new Set([...r].filter(i=>!n.has(i)))]}var H=class{constructor({config:e,docs:r,options:n}){let i=Oe(this.table=new Map);this.map=ne(r),this.options=n,this.index=lunr(function(){this.metadataWhitelist=["position"],this.b(0),e.lang.length===1&&e.lang[0]!=="en"?this.use(lunr[e.lang[0]]):e.lang.length>1&&this.use(lunr.multiLanguage(...e.lang)),this.tokenizer=oe,lunr.tokenizer.separator=new RegExp(e.separator),lunr.segmenter="TinySegmenter"in lunr?new lunr.TinySegmenter:void 0;let s=Re(["trimmer","stopWordFilter","stemmer"],e.pipeline);for(let o of e.lang.map(a=>a==="en"?lunr:lunr[a]))for(let a of s)this.pipeline.remove(o[a]),this.searchPipeline.remove(o[a]);this.ref("location"),this.field("title",{boost:1e3,extractor:i("title")}),this.field("text",{boost:1,extractor:i("text")}),this.field("tags",{boost:1e6,extractor:i("tags")});for(let o of r)this.add(o,{boost:o.boost})})}search(e){if(e=e.replace(new RegExp("\\p{sc=Han}+","gu"),s=>[...he(s,this.index.invertedIndex)].join("* ")),e=ue(e),!e)return{items:[]};let r=ce(e).filter(s=>s.presence!==lunr.Query.presence.PROHIBITED),n=this.index.search(e).reduce((s,{ref:o,score:a,matchData:u})=>{let c=this.map.get(o);if(typeof c!="undefined"){c=A({},c),c.tags&&(c.tags=[...c.tags]);let f=le(r,Object.keys(u.metadata));for(let l of this.index.fields){if(typeof c[l]=="undefined")continue;let m=[];for(let d of Object.values(u.metadata))typeof d[l]!="undefined"&&m.push(...d[l].position);if(!m.length)continue;let x=this.table.get([c.location,l].join(":")),v=Array.isArray(c[l])?q:se;c[l]=v(c[l],x,m,l!=="text")}let g=+!c.parent+Object.values(f).filter(l=>l).length/Object.keys(f).length;s.push(G(A({},c),{score:a*(1+Z(g,2)),terms:f}))}return s},[]).sort((s,o)=>o.score-s.score).reduce((s,o)=>{let a=this.map.get(o.location);if(typeof a!="undefined"){let u=a.parent?a.parent.location:a.location;s.set(u,[...s.get(u)||[],o])}return s},new Map);for(let[s,o]of n)if(!o.find(a=>a.location===s)){let a=this.map.get(s);o.push(G(A({},a),{score:0,terms:{}}))}let i;if(this.options.suggest){let s=this.index.query(o=>{for(let a of r)o.term(a.term,{fields:["title"],presence:lunr.Query.presence.REQUIRED,wildcard:lunr.Query.wildcard.TRAILING})});i=s.length?Object.keys(s[0].matchData.metadata):[]}return A({items:[...n.values()]},typeof i!="undefined"&&{suggest:i})}};var fe;function Ie(t){return B(this,null,function*(){let e="../lunr";if(typeof parent!="undefined"&&"IFrameWorker"in parent){let n=re("script[src]"),[i]=n.src.split("/worker");e=e.replace("..",i)}let r=[];for(let n of t.lang){switch(n){case"ja":r.push(`${e}/tinyseg.js`);break;case"hi":case"th":r.push(`${e}/wordcut.js`);break}n!=="en"&&r.push(`${e}/min/lunr.${n}.min.js`)}t.lang.length>1&&r.push(`${e}/min/lunr.multi.min.js`),r.length&&(yield importScripts(`${e}/min/lunr.stemmer.support.min.js`,...r))})}function Fe(t){return B(this,null,function*(){switch(t.type){case 0:return yield Ie(t.data.config),fe=new H(t.data),{type:1};case 2:let e=t.data;try{return{type:3,data:fe.search(e)}}catch(r){return console.warn(`Invalid query: ${e} \u2013 see https://bit.ly/2s3ChXG`),console.warn(r),{type:3,data:{items:[]}}}default:throw new TypeError("Invalid message type")}})}self.lunr=de.default;addEventListener("message",t=>B(void 0,null,function*(){postMessage(yield Fe(t.data))}));})();
|
|
41
|
-
//# sourceMappingURL=search.
|
|
40
|
+
*/t.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=t.tokenizer,this.pipeline=new t.Pipeline,this.searchPipeline=new t.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},t.Builder.prototype.ref=function(e){this._ref=e},t.Builder.prototype.field=function(e,r){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=r||{}},t.Builder.prototype.b=function(e){e<0?this._b=0:e>1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,r){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=r||{},this.documentCount+=1;for(var s=0;s<i.length;s++){var o=i[s],a=this._fields[o].extractor,u=a?a(e):e[o],c=this.tokenizer(u,{fields:[o]}),f=this.pipeline.run(c),g=new t.FieldRef(n,o),l=Object.create(null);this.fieldTermFrequencies[g]=l,this.fieldLengths[g]=0,this.fieldLengths[g]+=f.length;for(var m=0;m<f.length;m++){var x=f[m];if(l[x]==null&&(l[x]=0),l[x]+=1,this.invertedIndex[x]==null){var v=Object.create(null);v._index=this.termIndex,this.termIndex+=1;for(var d=0;d<i.length;d++)v[i[d]]=Object.create(null);this.invertedIndex[x]=v}this.invertedIndex[x][o][n]==null&&(this.invertedIndex[x][o][n]=Object.create(null));for(var y=0;y<this.metadataWhitelist.length;y++){var b=this.metadataWhitelist[y],E=x.metadata[b];this.invertedIndex[x][o][n][b]==null&&(this.invertedIndex[x][o][n][b]=[]),this.invertedIndex[x][o][n][b].push(E)}}}},t.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),r=e.length,n={},i={},s=0;s<r;s++){var o=t.FieldRef.fromString(e[s]),a=o.fieldName;i[a]||(i[a]=0),i[a]+=1,n[a]||(n[a]=0),n[a]+=this.fieldLengths[o]}for(var u=Object.keys(this._fields),s=0;s<u.length;s++){var c=u[s];n[c]=n[c]/i[c]}this.averageFieldLength=n},t.Builder.prototype.createFieldVectors=function(){for(var e={},r=Object.keys(this.fieldTermFrequencies),n=r.length,i=Object.create(null),s=0;s<n;s++){for(var o=t.FieldRef.fromString(r[s]),a=o.fieldName,u=this.fieldLengths[o],c=new t.Vector,f=this.fieldTermFrequencies[o],g=Object.keys(f),l=g.length,m=this._fields[a].boost||1,x=this._documents[o.docRef].boost||1,v=0;v<l;v++){var d=g[v],y=f[d],b=this.invertedIndex[d]._index,E,w,R;i[d]===void 0?(E=t.idf(this.invertedIndex[d],this.documentCount),i[d]=E):E=i[d],w=E*((this._k1+1)*y)/(this._k1*(1-this._b+this._b*(u/this.averageFieldLength[a]))+y),w*=m,w*=x,R=Math.round(w*1e3)/1e3,c.insert(b,R)}e[o]=c}this.fieldVectors=e},t.Builder.prototype.createTokenSet=function(){this.tokenSet=t.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},t.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new t.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},t.Builder.prototype.use=function(e){var r=Array.prototype.slice.call(arguments,1);r.unshift(this),e.apply(this,r)},t.MatchData=function(e,r,n){for(var i=Object.create(null),s=Object.keys(n||{}),o=0;o<s.length;o++){var a=s[o];i[a]=n[a].slice()}this.metadata=Object.create(null),e!==void 0&&(this.metadata[e]=Object.create(null),this.metadata[e][r]=i)},t.MatchData.prototype.combine=function(e){for(var r=Object.keys(e.metadata),n=0;n<r.length;n++){var i=r[n],s=Object.keys(e.metadata[i]);this.metadata[i]==null&&(this.metadata[i]=Object.create(null));for(var o=0;o<s.length;o++){var a=s[o],u=Object.keys(e.metadata[i][a]);this.metadata[i][a]==null&&(this.metadata[i][a]=Object.create(null));for(var c=0;c<u.length;c++){var f=u[c];this.metadata[i][a][f]==null?this.metadata[i][a][f]=e.metadata[i][a][f]:this.metadata[i][a][f]=this.metadata[i][a][f].concat(e.metadata[i][a][f])}}}},t.MatchData.prototype.add=function(e,r,n){if(!(e in this.metadata)){this.metadata[e]=Object.create(null),this.metadata[e][r]=n;return}if(!(r in this.metadata[e])){this.metadata[e][r]=n;return}for(var i=Object.keys(n),s=0;s<i.length;s++){var o=i[s];o in this.metadata[e][r]?this.metadata[e][r][o]=this.metadata[e][r][o].concat(n[o]):this.metadata[e][r][o]=n[o]}},t.Query=function(e){this.clauses=[],this.allFields=e},t.Query.wildcard=new String("*"),t.Query.wildcard.NONE=0,t.Query.wildcard.LEADING=1,t.Query.wildcard.TRAILING=2,t.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},t.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=t.Query.wildcard.NONE),e.wildcard&t.Query.wildcard.LEADING&&e.term.charAt(0)!=t.Query.wildcard&&(e.term="*"+e.term),e.wildcard&t.Query.wildcard.TRAILING&&e.term.slice(-1)!=t.Query.wildcard&&(e.term=""+e.term+"*"),"presence"in e||(e.presence=t.Query.presence.OPTIONAL),this.clauses.push(e),this},t.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=t.Query.presence.PROHIBITED)return!1;return!0},t.Query.prototype.term=function(e,r){if(Array.isArray(e))return e.forEach(function(i){this.term(i,t.utils.clone(r))},this),this;var n=r||{};return n.term=e.toString(),this.clause(n),this},t.QueryParseError=function(e,r,n){this.name="QueryParseError",this.message=e,this.start=r,this.end=n},t.QueryParseError.prototype=new Error,t.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},t.QueryLexer.prototype.run=function(){for(var e=t.QueryLexer.lexText;e;)e=e(this)},t.QueryLexer.prototype.sliceString=function(){for(var e=[],r=this.start,n=this.pos,i=0;i<this.escapeCharPositions.length;i++)n=this.escapeCharPositions[i],e.push(this.str.slice(r,n)),r=n+1;return e.push(this.str.slice(r,this.pos)),this.escapeCharPositions.length=0,e.join("")},t.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},t.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},t.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,r;do e=this.next(),r=e.charCodeAt(0);while(r>47&&r<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos<this.length},t.QueryLexer.EOS="EOS",t.QueryLexer.FIELD="FIELD",t.QueryLexer.TERM="TERM",t.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",t.QueryLexer.BOOST="BOOST",t.QueryLexer.PRESENCE="PRESENCE",t.QueryLexer.lexField=function(e){return e.backup(),e.emit(t.QueryLexer.FIELD),e.ignore(),t.QueryLexer.lexText},t.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var r=e.next();if(r==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(r.charCodeAt(0)==92){e.escapeCharacter();continue}if(r==":")return t.QueryLexer.lexField;if(r=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(r=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(r=="+"&&e.width()===1||r=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(r.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,r){this.lexer=new t.QueryLexer(e),this.query=r,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var r=e.peekLexeme();if(r!=null)switch(r.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(n+=" with value '"+r.str+"'"),new t.QueryParseError(n,r.start,r.end)}},t.QueryParser.parsePresence=function(e){var r=e.consumeLexeme();if(r!=null){switch(r.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+r.str+"'";throw new t.QueryParseError(n,r.start,r.end)}var i=e.peekLexeme();if(i==null){var n="expecting term or field, found nothing";throw new t.QueryParseError(n,r.start,r.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(n,i.start,i.end)}}},t.QueryParser.parseField=function(e){var r=e.consumeLexeme();if(r!=null){if(e.query.allFields.indexOf(r.str)==-1){var n=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+r.str+"', possible fields: "+n;throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.fields=[r.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,r.start,r.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var r=e.consumeLexeme();if(r!=null){e.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(n==null){e.nextClause();return}switch(n.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new t.QueryParseError(i,n.start,n.end)}}},t.QueryParser.parseEditDistance=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.editDistance=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="boost must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.boost=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,r){typeof define=="function"&&define.amd?define(r):typeof ee=="object"?te.exports=r():e.lunr=r()}(this,function(){return t})})()});var Y=Pe(re());function ne(t,e=document){let r=ke(t,e);if(typeof r=="undefined")throw new ReferenceError(`Missing element: expected "${t}" to be present`);return r}function ke(t,e=document){return e.querySelector(t)||void 0}Object.entries||(Object.entries=function(t){let e=[];for(let r of Object.keys(t))e.push([r,t[r]]);return e});Object.values||(Object.values=function(t){let e=[];for(let r of Object.keys(t))e.push(t[r]);return e});typeof Element!="undefined"&&(Element.prototype.scrollTo||(Element.prototype.scrollTo=function(t,e){typeof t=="object"?(this.scrollLeft=t.left,this.scrollTop=t.top):(this.scrollLeft=t,this.scrollTop=e)}),Element.prototype.replaceWith||(Element.prototype.replaceWith=function(...t){let e=this.parentNode;if(e){t.length===0&&e.removeChild(this);for(let r=t.length-1;r>=0;r--){let n=t[r];typeof n=="string"?n=document.createTextNode(n):n.parentNode&&n.parentNode.removeChild(n),r?e.insertBefore(this.previousSibling,n):e.replaceChild(n,this)}}}));function ie(t){let e=new Map;for(let r of t){let[n]=r.location.split("#"),i=e.get(n);typeof i=="undefined"?e.set(n,r):(e.set(r.location,r),r.parent=i)}return e}function W(t,e,r){var s;e=new RegExp(e,"g");let n,i=0;do{n=e.exec(t);let o=(s=n==null?void 0:n.index)!=null?s:t.length;if(i<o&&r(i,o),n){let[a]=n;i=n.index+a.length,a.length===0&&(e.lastIndex=n.index+1)}}while(n)}function se(t,e){let r=0,n=0,i=0;for(let s=0;i<t.length;i++)t.charAt(i)==="<"&&i>n?e(r,1,n,n=i):t.charAt(i)===">"&&(t.charAt(n+1)==="/"?--s===0&&e(r++,2,n,i+1):t.charAt(i-1)!=="/"&&s++===0&&e(r,0,n,i+1),n=i+1);i>n&&e(r,1,n,i)}function oe(t,e,r,n=!1){return q([t],e,r,n).pop()}function q(t,e,r,n=!1){let i=[0];for(let s=1;s<e.length;s++){let o=e[s-1],a=e[s],u=o[o.length-1]>>>2&1023,c=a[0]>>>12;i.push(+(u>c)+i[i.length-1])}return t.map((s,o)=>{let a=0,u=new Map;for(let f of r.sort((g,l)=>g-l)){let g=f&1048575,l=f>>>20;if(i[l]!==o)continue;let m=u.get(l);typeof m=="undefined"&&u.set(l,m=[]),m.push(g)}if(u.size===0)return s;let c=[];for(let[f,g]of u){let l=e[f],m=l[0]>>>12,x=l[l.length-1]>>>12,v=l[l.length-1]>>>2&1023;n&&m>a&&c.push(s.slice(a,m));let d=s.slice(m,x+v);for(let y of g.sort((b,E)=>E-b)){let b=(l[y]>>>12)-m,E=(l[y]>>>2&1023)+b;d=[d.slice(0,b),"<mark>",d.slice(b,E),"</mark>",d.slice(E)].join("")}if(a=x+v,c.push(d)===2)break}return n&&a<s.length&&c.push(s.slice(a)),c.join("")})}function ae(t){let e=[];if(typeof t=="undefined")return e;let r=Array.isArray(t)?t:[t];for(let n=0;n<r.length;n++){let i=lunr.tokenizer.table,s=i.length;se(r[n],(o,a,u,c)=>{var f;switch(i[f=o+=s]||(i[f]=[]),a){case 0:case 2:i[o].push(u<<12|c-u<<2|a);break;case 1:let g=r[n].slice(u,c);W(g,lunr.tokenizer.separator,(l,m)=>{if(typeof lunr.segmenter!="undefined"){let x=g.slice(l,m);if(/^[MHIK]$/.test(lunr.segmenter.ctype_(x))){let v=lunr.segmenter.segment(x);for(let d=0,y=0;d<v.length;d++)i[o]||(i[o]=[]),i[o].push(u+l+y<<12|v[d].length<<2|a),e.push(new lunr.Token(v[d].toLowerCase(),{position:o<<20|i[o].length-1})),y+=v[d].length;return}}i[o].push(u+l<<12|m-l<<2|a),e.push(new lunr.Token(g.slice(l,m).toLowerCase(),{position:o<<20|i[o].length-1}))})}})}return e}function ue(t,e=r=>r){return t.trim().split(/"([^"]+)"/g).map((r,n)=>n&1?r.replace(/^\b|^(?![^\x00-\x7F]|$)|\s+/g," +"):r).join("").replace(/"|(?:^|\s+)[*+\-:^~]+(?=\s+|$)/g,"").split(/\s+/g).reduce((r,n)=>{let i=e(n);return[...r,...Array.isArray(i)?i:[i]]},[]).map(r=>/([~^]$)/.test(r)?`${r}1`:r).map(r=>/(^[+-]|[~^]\d+$)/.test(r)?r:`${r}*`).join(" ")}function ce(t){return ue(t,e=>{let r=[],n=new lunr.QueryLexer(e);n.run();for(let{type:i,str:s,start:o,end:a}of n.lexemes)switch(i){case"FIELD":["title","text","tags"].includes(s)||(e=[e.slice(0,a)," ",e.slice(a+1)].join(""));break;case"TERM":W(s,lunr.tokenizer.separator,(...u)=>{r.push([e.slice(0,o),s.slice(...u),e.slice(a)].join(""))})}return r})}function le(t){let e=new lunr.Query(["title","text","tags"]);new lunr.QueryParser(t,e).parse();for(let n of e.clauses)n.usePipeline=!0,n.term.startsWith("*")&&(n.wildcard=lunr.Query.wildcard.LEADING,n.term=n.term.slice(1)),n.term.endsWith("*")&&(n.wildcard=lunr.Query.wildcard.TRAILING,n.term=n.term.slice(0,-1));return e.clauses}function he(t,e){var i;let r=new Set(t),n={};for(let s=0;s<e.length;s++)for(let o of r)e[s].startsWith(o.term)&&(n[o.term]=!0,r.delete(o));for(let s of r)(i=lunr.stopWordFilter)!=null&&i.call(lunr,s.term)&&(n[s.term]=!1);return n}function fe(t,e){let r=new Set,n=new Uint16Array(t.length);for(let s=0;s<t.length;s++)for(let o=s+1;o<t.length;o++)t.slice(s,o)in e&&(n[s]=o-s);let i=[0];for(let s=i.length;s>0;){let o=i[--s];for(let u=1;u<n[o];u++)n[o+u]>n[o]-u&&(r.add(t.slice(o,o+u)),i[s++]=o+u);let a=o+n[o];n[a]&&a<t.length-1&&(i[s++]=a),r.add(t.slice(o,a))}return r.has("")?new Set([t]):r}function Oe(t){return e=>r=>{if(typeof r[e]=="undefined")return;let n=[r.location,e].join(":");return t.set(n,lunr.tokenizer.table=[]),r[e]}}function Re(t,e){let[r,n]=[new Set(t),new Set(e)];return[...new Set([...r].filter(i=>!n.has(i)))]}var H=class{constructor({config:e,docs:r,options:n}){let i=Oe(this.table=new Map);this.map=ie(r),this.options=n,this.index=lunr(function(){this.metadataWhitelist=["position"],this.b(0),e.lang.length===1&&e.lang[0]!=="en"?this.use(lunr[e.lang[0]]):e.lang.length>1&&this.use(lunr.multiLanguage(...e.lang)),this.tokenizer=ae,lunr.tokenizer.separator=new RegExp(e.separator),lunr.segmenter="TinySegmenter"in lunr?new lunr.TinySegmenter:void 0;let s=Re(["trimmer","stopWordFilter","stemmer"],e.pipeline);for(let o of e.lang.map(a=>a==="en"?lunr:lunr[a]))for(let a of s)this.pipeline.remove(o[a]),this.searchPipeline.remove(o[a]);this.ref("location"),this.field("title",{boost:1e3,extractor:i("title")}),this.field("text",{boost:1,extractor:i("text")}),this.field("tags",{boost:1e6,extractor:i("tags")});for(let o of r)this.add(o,{boost:o.boost})})}search(e){if(e=e.replace(new RegExp("\\p{sc=Han}+","gu"),s=>[...fe(s,this.index.invertedIndex)].join("* ")),e=ce(e),!e)return{items:[]};let r=le(e).filter(s=>s.presence!==lunr.Query.presence.PROHIBITED),n=this.index.search(e).reduce((s,{ref:o,score:a,matchData:u})=>{let c=this.map.get(o);if(typeof c!="undefined"){c=A({},c),c.tags&&(c.tags=[...c.tags]);let f=he(r,Object.keys(u.metadata));for(let l of this.index.fields){if(typeof c[l]=="undefined")continue;let m=[];for(let d of Object.values(u.metadata))typeof d[l]!="undefined"&&m.push(...d[l].position);if(!m.length)continue;let x=this.table.get([c.location,l].join(":")),v=Array.isArray(c[l])?q:oe;c[l]=v(c[l],x,m,l!=="text")}let g=+!c.parent+Object.values(f).filter(l=>l).length/Object.keys(f).length;s.push(G(A({},c),{score:a*(1+K(g,2)),terms:f}))}return s},[]).sort((s,o)=>o.score-s.score).reduce((s,o)=>{let a=this.map.get(o.location);if(typeof a!="undefined"){let u=a.parent?a.parent.location:a.location;s.set(u,[...s.get(u)||[],o])}return s},new Map);for(let[s,o]of n)if(!o.find(a=>a.location===s)){let a=this.map.get(s);o.push(G(A({},a),{score:0,terms:{}}))}let i;if(this.options.suggest){let s=this.index.query(o=>{for(let a of r)o.term(a.term,{fields:["title"],presence:lunr.Query.presence.REQUIRED,wildcard:lunr.Query.wildcard.TRAILING})});i=s.length?Object.keys(s[0].matchData.metadata):[]}return A({items:[...n.values()]},typeof i!="undefined"&&{suggest:i})}};var de;function Ie(t){return B(this,null,function*(){let e="../lunr";if(typeof parent!="undefined"&&"IFrameWorker"in parent){let n=ne("script[src]"),[i]=n.src.split("/worker");e=e.replace("..",i)}let r=[];for(let n of t.lang){switch(n){case"ja":r.push(`${e}/tinyseg.js`);break;case"hi":case"th":r.push(`${e}/wordcut.js`);break}n!=="en"&&r.push(`${e}/min/lunr.${n}.min.js`)}t.lang.length>1&&r.push(`${e}/min/lunr.multi.min.js`),r.length&&(yield importScripts(`${e}/min/lunr.stemmer.support.min.js`,...r))})}function Fe(t){return B(this,null,function*(){switch(t.type){case 0:return yield Ie(t.data.config),de=new H(t.data),{type:1};case 2:let e=t.data;try{return{type:3,data:de.search(e)}}catch(r){return console.warn(`Invalid query: ${e} \u2013 see https://bit.ly/2s3ChXG`),console.warn(r),{type:3,data:{items:[]}}}default:throw new TypeError("Invalid message type")}})}self.lunr=Y.default;Y.default.utils.warn=console.warn;addEventListener("message",t=>B(void 0,null,function*(){postMessage(yield Fe(t.data))}));})();
|
|
41
|
+
//# sourceMappingURL=search.6ce7567c.min.js.map
|
|
42
42
|
|